:root {
    --bg: #f7f8fb;
    --surface: #fff;
    --text: #172033;
    --muted: #687188;
    --line: #e4e8f0;
    --accent: #605cff;
    --accent2: #17b890;
    --shadow: 0 12px 35px rgba(31, 39, 73, .08)
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    line-height: 1.8
}

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin: auto
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line)
}

.head-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.brand {
    text-decoration: none;
    color: var(--text);
    font-weight: 900;
    font-size: 1.24rem
}

.brand span,
.hero h1 span {
    color: var(--accent)
}

.search {
    display: flex;
    width: min(420px, 48vw)
}

.search input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 12px 0 0 12px;
    padding: 10px 13px;
    background: #fff;
    font-size: 16px
}

.search button {
    border: 0;
    border-radius: 0 12px 12px 0;
    background: var(--text);
    color: #fff;
    padding: 0 18px;
    font-weight: 700
}

.hero {
    margin: 36px 0;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(135deg, #fff 30%, #eeedff);
    box-shadow: var(--shadow)
}

.eyebrow {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--accent);
    text-transform: uppercase
}

.hero h1 {
    font-size: clamp(2.1rem, 6vw, 4.5rem);
    line-height: 1.08;
    margin: 8px 0 16px
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: var(--muted)
}

.hero-tag-cloud {
    flex: 0 0 min(360px, 38%);
    background: #fff;
    border: 1px solid var(--line);
    padding: 18px 20px;
    border-radius: 18px
}

.hero-tag-cloud>strong {
    display: block;
    margin-bottom: 10px;
    font-size: .78rem;
    color: var(--muted)
}

.hero-tag-cloud>div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px 13px
}

.hero-tag-cloud a {
    color: #4f4bd8;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none
}

.hero-tag-cloud a:hover {
    color: #3733b5;
    text-decoration: underline;
    text-underline-offset: 3px
}

.hero-tag-cloud .tag-cloud-more {
    font-size: .82rem !important;
    color: var(--muted)
}

.tag-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px
}

.tag-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    color: #4f4bd8;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none
}

.tag-list a:hover {
    border-color: #aaa7ef;
    background: #f8f7ff
}

.tag-list span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .78rem
}

section {
    margin: 32px 0
}

.list-intro {
    margin: -2px 0 22px;
    color: var(--muted)
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 28px
}

.pagination a,
.pagination span {
    padding: 9px 15px;
    border-radius: 10px
}

.pagination a {
    color: #4f4bd8;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 800;
    text-decoration: none
}

.pagination a:hover {
    background: #f8f7ff;
    border-color: #aaa7ef
}

.pagination span {
    color: var(--muted)
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px
}

.section-head h1,
.section-head h2 {
    margin: 0;
    line-height: 1.25
}

.section-head span,
.section-head a {
    font-size: .85rem;
    color: var(--muted)
}

.more-link {
    margin-top: 20px;
    text-align: center
}

.more-link a {
    display: inline-block;
    padding: 9px 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #4f4bd8;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none
}

.more-link a:hover {
    border-color: #4f4bd8;
    background: #efefff
}

.word-cloud {
    min-height: 190px;
    padding: 30px;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow)
}

.word-cloud a {
    color: #4f4bd8;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.15
}

.word-cloud a:hover {
    color: #3733b5;
    text-decoration: underline;
    text-underline-offset: 3px
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 5px 18px rgba(31, 39, 73, .04)
}

.card h3 {
    font-size: 1.15rem;
    margin: 8px 0 0
}

.card h3 a {
    color: #4f4bd8;
    text-decoration: none
}

.card h3 a:hover {
    color: #3733b5;
    text-decoration: underline;
    text-underline-offset: 3px
}

.card p {
    font-size: .9rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.tag {
    display: inline-block;
    background: #efefff;
    color: #4b48c9;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 800
}

.tag+.tag {
    margin-left: 6px
}

.meta {
    font-size: .75rem;
    color: #8a91a4
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden
}

.rank {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text);
    text-decoration: none;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line)
}

.rank:nth-child(odd) {
    border-right: 1px solid var(--line)
}

.rank:nth-last-child(-n+2) {
    border-bottom: 0
}

.rank>b {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f1f3f8
}

.rank span {
    display: flex;
    flex-direction: column
}

.rank small {
    color: var(--muted)
}

.rank strong {
    color: #4f4bd8
}

.rank:hover strong {
    color: #3733b5;
    text-decoration: underline;
    text-underline-offset: 3px
}

.crumb {
    margin: 26px 0;
    font-size: .82rem;
    color: var(--muted)
}

.crumb a {
    color: var(--muted)
}

.crumb span {
    padding: 0 8px
}

.term-page {
    max-width: 850px;
    margin: auto
}

.term-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end
}

.term-title h1 {
    font-size: clamp(2rem, 6vw, 3.8rem);
    line-height: 1.2;
    margin: 8px 0
}

.reading {
    color: var(--muted)
}

.term-stats {
    white-space: nowrap;
    color: var(--muted);
    font-size: .82rem
}

.lead {
    font-size: 1.14rem;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    padding: 22px 24px;
    border-radius: 14px
}

.article-section {
    margin: 36px 0
}

.article-section h2,
.related h2 {
    font-size: 1.35rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 4px
}

.article-section p {
    font-size: 1.01rem
}

.term-link {
    color: #4f4bd8;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 650
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px
}

.chips a {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    color: var(--text);
    font-weight: 700
}

.chips small {
    color: var(--accent)
}

.feedback-box {
    margin-top: 50px;
    background: #161d30;
    color: #fff;
    padding: 22px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px
}

.feedback-box>div:first-child {
    display: flex;
    flex-direction: column
}

.feedback-box span {
    font-size: .78rem;
    color: #aeb6ca
}

.feedback-actions {
    display: flex;
    gap: 9px
}

.feedback-actions button,
.report-panel button {
    border: 0;
    border-radius: 11px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer
}

.good.active {
    background: #ffebef;
    color: #dc3157
}

.report-panel {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 16px 16px
}

.report-panel form {
    display: grid;
    gap: 12px
}

.report-panel label {
    display: grid;
    gap: 5px;
    font-weight: 700
}

.report-panel select,
.report-panel textarea {
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px
}

.report-panel textarea {
    min-height: 90px
}

.generated {
    margin: 16px 0 40px;
    text-align: right;
    font-size: .75rem;
    color: var(--muted)
}

.pending,
.empty {
    text-align: center;
    padding: 80px 20px
}

.pending .pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    margin: auto;
    animation: pulse 1.2s infinite
}

@keyframes pulse {
    50% {
        transform: scale(1.8);
        opacity: .25
    }
}

footer {
    margin-top: 20px;
    border-top: 1px solid var(--line);
    padding: 24px 0;
    color: var(--muted);
    font-size: .8rem;
    background: #fff
}

footer a {
    color: inherit
}

@media(max-width:760px) {
    .rank-list {
        grid-template-columns: 1fr
    }

    .rank:nth-child(odd) {
        border-right: 0
    }

    .rank:nth-last-child(2) {
        border-bottom: 1px solid var(--line)
    }

    .head-inner {
        height: auto;
        padding: 12px 0;
        display: block
    }

    .brand {
        display: block;
        margin-bottom: 9px
    }

    .search {
        width: 100%
    }

    .hero {
        padding: 26px;
        display: block
    }

    .hero-tag-cloud {
        margin-top: 25px
    }

    .cards {
        grid-template-columns: 1fr
    }

    .term-title {
        display: block
    }

    .term-stats {
        margin-top: 10px
    }

    .feedback-box {
        display: block
    }

    .feedback-actions {
        margin-top: 15px
    }

    .word-cloud {
        padding: 20px
    }

    .section-head {
        align-items: center
    }
}
