body {
    background: #f3f6fb;
    color: #142033;
}

a {
    text-decoration: none;
}

main {
    min-height: calc(100vh - 240px);
}

.site-hero {
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

.data-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.06);
}

.section-eyebrow {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.reading-prose {
    line-height: 1.9;
}

.reading-prose p:last-child {
    margin-bottom: 0;
}

.hanzi-stage {
    min-height: 260px;
}

.hanzi-display {
    font-size: clamp(4rem, 10vw, 7rem);
    line-height: 1;
    font-weight: 700;
}

.hanzi-svg {
    max-width: 100%;
    height: auto;
}

.hanzi-fallback {
    min-height: 220px;
    width: 100%;
    display: grid;
    place-items: center;
    font-size: clamp(4rem, 10vw, 6rem);
    font-weight: 700;
}

.metric-grid,
.detail-list,
.zidian-basic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.metric-item,
.detail-list > div,
.zidian-basic-grid > div {
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: var(--bs-light);
}

.metric-item span,
.detail-list span,
.zidian-basic-grid span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.metric-item strong,
.detail-list strong,
.zidian-basic-grid strong {
    display: block;
    font-size: 1rem;
    word-break: break-word;
}

.char-grid,
.tag-list,
.component-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.char-pill,
.tag,
.component-chip,
.stroke-chip,
.pager-btn,
.pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.5rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #ffffff;
    color: inherit;
}

.char-pill {
    min-width: 3.25rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.char-pill:hover,
.tag:hover,
.component-chip:hover,
.stroke-chip:hover,
.pager-btn:hover,
.pager-num:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.tag.active,
.component-chip.active,
.stroke-chip.active,
.pager-num.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #ffffff;
}

.component-chip-clear {
    background: var(--bs-danger-bg-subtle);
    border-color: rgba(var(--bs-danger-rgb), 0.2);
    color: var(--bs-danger-text-emphasis);
}

.component-picker-wrap,
.component-tags-wrap {
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.component-picker-wrap.is-collapsed-six {
    max-height: 13rem;
}

.component-tags-wrap.is-collapsed {
    max-height: 8rem;
}

.component-toggle {
    margin-top: 0.75rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bs-primary);
    font-weight: 600;
}

.tts-status {
    min-height: 1.25rem;
}

.tts-btn.is-playing {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #ffffff;
}

.tts-btn.is-paused {
    background: var(--bs-warning-bg-subtle);
    border-color: rgba(var(--bs-warning-rgb), 0.35);
    color: var(--bs-emphasis-color);
}

.dict-block {
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: var(--bs-light);
}

.dict-title {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bs-primary);
}

.dict-content {
    line-height: 1.9;
    word-break: break-word;
}

.state-empty {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    border-radius: 0.875rem;
    background: var(--bs-light);
    color: var(--bs-secondary-color);
}

.question-list,
.related-list {
    display: grid;
    gap: 1rem;
}

.question-item,
.related-item {
    display: block;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
}

.question-answer strong,
.related-answer {
    font-weight: 700;
    color: var(--bs-primary);
}

.chengyu-pager,
.pager-nums,
.stroke-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pager-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.doc-sidebar {
    position: sticky;
    top: 5rem;
}

.site-footer a {
    color: inherit;
}

@media (max-width: 991px) {
    .doc-sidebar {
        position: static;
    }

    .hanzi-stage {
        min-height: 220px;
    }
}
