html,
body {
    width: 100%;
    min-height: 100%;
}

* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f1e8;
    --bg-soft: #fcfaf5;
    --card: #ffffff;
    --ink: #2f281d;
    --ink-soft: #635a4a;
    --ink-fade: #8b826f;
    --line: rgba(56, 45, 30, 0.13);
    --line-strong: rgba(56, 45, 30, 0.25);
    --accent: #9c6a2f;
    --accent-soft: #f1dfc2;
    --shadow: 0 18px 45px rgba(63, 48, 25, 0.08);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: all 0.25s ease;
}

a:hover,
a:focus {
    color: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
    letter-spacing: 0.5px;
}

p {
    margin: 0;
    color: var(--ink-soft);
}

/* legacy homepage wrapper compatibility */
#mainbody {
    position: relative;
    width: 100%;
    background: var(--bg);
    color: var(--ink);
}

.page-home {
    background: var(--bg);
    color: var(--ink);
}

.home {
    position: relative;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(252, 250, 245, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.site-header .navbar {
    padding: 12px 0;
}

.site-header .navbar-brand {
    color: var(--ink);
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-weight: 700;
    letter-spacing: 1.2px;
    font-size: 1.2rem;
}

.site-nav-link {
    color: var(--ink-soft);
    font-weight: 600;
    position: relative;
}

.site-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: transparent;
    transform: scaleX(0.45);
    transition: all 0.25s ease;
}

.site-nav-link:hover::after,
.site-nav-link:focus::after {
    background: var(--accent);
    transform: scaleX(1);
}

.hero {
    position: relative;
    padding: 58px 0 74px;
    background:
        radial-gradient(circle at 0% 0%, rgba(156, 106, 47, 0.18), transparent 35%),
        radial-gradient(circle at 95% 10%, rgba(114, 96, 61, 0.12), transparent 30%),
        linear-gradient(140deg, #fbf6ec, #f2ebde);
}

.home-hero::before,
.home-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.home-hero::before {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    right: 8%;
    top: 58px;
    background: radial-gradient(circle, rgba(156, 106, 47, 0.2), rgba(156, 106, 47, 0));
}

.home-hero::after {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    left: 6%;
    bottom: 26px;
    transform: rotate(22deg);
    border: 1px dashed rgba(156, 106, 47, 0.24);
}

.hero-main,
.hero-side,
.tool-card,
.data-card,
.highlight-item,
.highlight-card,
.component-card {
    animation: riseIn 0.55s ease both;
}

.hero-main {
    max-width: 860px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(156, 106, 47, 0.22);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 1.2px;
    color: #7c5320;
    background: var(--accent-soft);
}

.hero-title {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: clamp(32px, 3.8vw, 52px);
    line-height: 1.2;
    color: #2c2419;
}

.hero-subtitle {
    margin-top: 14px;
    font-size: 17px;
    line-height: 1.85;
}

.hero-search {
    margin-top: 24px;
}

.hero-search .form-control {
    border-color: var(--line-strong);
    border-radius: 12px 0 0 12px;
    background: #fffefc;
}

.hero-search .btn {
    border-radius: 0 12px 12px 0;
}

.hero-links {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink-soft);
}

.hero-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.hero-tip {
    margin-top: 14px;
    font-size: 13px;
    color: var(--ink-fade);
}

.hero-tip code {
    background: rgba(156, 106, 47, 0.12);
    color: #75491a;
    padding: 2px 6px;
    border-radius: 6px;
}

.hero-side {
    height: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 24px;
}

.hero-side-title {
    font-family: "Noto Serif SC", serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero-side-item {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--bg-soft);
}

.hero-side-item:last-child {
    margin-bottom: 0;
}

.hero-side-item strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.hero-side-item span {
    color: var(--ink-soft);
    font-size: 13px;
}

.hero-side-item:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.hero-card-foot {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-fade);
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62px;
    background: linear-gradient(to bottom, rgba(245, 241, 232, 0), var(--bg));
}

.home-section {
    padding: 54px 0;
}

.home-section.pt-0 {
    padding-top: 0;
}

.section-head {
    margin-bottom: 22px;
}

.section-head-compact {
    margin-bottom: 18px;
}

.section-title {
    margin-bottom: 8px;
    font-size: clamp(28px, 2.8vw, 38px);
    font-weight: 700;
    color: #2f2418;
}

.section-subtitle {
    font-size: 16px;
    color: var(--ink-soft);
}

.category-hero {
    padding: 36px 0 26px;
}

.category-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-fade);
    margin-bottom: 10px;
}

.category-crumb a {
    color: var(--ink-soft);
}

.tool-card {
    height: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 9px 24px rgba(59, 46, 29, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(156, 106, 47, 0.33);
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 19px;
}

.tool-card h3 {
    margin-bottom: 6px;
    font-size: 22px;
}

.tool-card p {
    margin-bottom: 10px;
    line-height: 1.7;
}

.tool-link {
    font-size: 14px;
    font-weight: 700;
    color: #7f4e1d;
}

.tool-link:hover {
    color: var(--accent);
}

.home-highlight {
    position: relative;
    background: #f8f4eb;
    border-top: 1px solid rgba(156, 106, 47, 0.16);
    border-bottom: 1px solid rgba(156, 106, 47, 0.16);
}

.highlight-card {
    height: 100%;
    border-radius: 18px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(155deg, #674019, #8f5a23);
    color: #fff;
    box-shadow: 0 15px 35px rgba(102, 63, 24, 0.3);
}

.highlight-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.highlight-card p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 1.85;
}

.highlight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.highlight-tags span {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
}

.highlight-list {
    display: grid;
    gap: 12px;
}

.highlight-item {
    border-radius: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--card);
}

.highlight-item .item-title {
    font-family: "Noto Serif SC", serif;
    font-size: 17px;
    margin-bottom: 4px;
}

.highlight-item .item-desc {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.data-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 9px 24px rgba(59, 46, 29, 0.05);
}

.data-card h3 {
    margin-bottom: 8px;
    font-size: 24px;
}

.data-card p {
    margin-bottom: 12px;
    line-height: 1.75;
}

.data-foot {
    font-size: 13px;
    color: var(--ink-fade);
    margin-bottom: 2px;
}

.flow-list {
    display: grid;
    gap: 10px;
}

.flow-item {
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--ink-soft);
}

.flow-item span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
    background: rgba(156, 106, 47, 0.14);
    color: #7a4f20;
    font-size: 12px;
    font-weight: 700;
}

.query-card {
    border-left: 4px solid #bf8744;
}

.result-card {
    position: relative;
}

.search-bar .form-label,
.query-card .form-label {
    font-size: 14px;
    color: var(--ink-soft);
}

.stroke-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stroke-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
}

.stroke-chip span {
    font-size: 12px;
    color: var(--ink-fade);
}

.stroke-chip.active {
    background: #7f4e1d;
    color: #fff;
    border-color: #7f4e1d;
}

.stroke-chip.active span {
    color: rgba(255, 255, 255, 0.8);
}

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

.char-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
}

.char-pill {
    display: grid;
    place-items: center;
    min-height: 54px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: #352a1b;
    font-size: 22px;
}

.char-pill:hover {
    background: #f3e4cb;
    border-color: rgba(156, 106, 47, 0.45);
    transform: translateY(-1px);
}

.component-card {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    padding: 16px;
}

.component-card:hover {
    border-color: rgba(156, 106, 47, 0.5);
    box-shadow: var(--shadow);
}

.bujian-card {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf8, #faf4e8);
    padding: 16px 16px 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bujian-card:hover {
    border-color: rgba(156, 106, 47, 0.5);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.bujian-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.bujian-card-title {
    font-size: 19px;
    line-height: 1.35;
    color: #2f2418;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    font-weight: 700;
}

.bujian-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.bujian-card-meta span {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(156, 106, 47, 0.1);
    color: #7c5320;
    font-size: 12px;
}

.bujian-card-char {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(155deg, #8f5a23, #b17e3c);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    flex: 0 0 auto;
    box-shadow: 0 10px 20px rgba(95, 61, 29, 0.22);
}

.bujian-card-components {
    font-size: 13px;
    line-height: 1.65;
    color: #8b5a24;
    margin-bottom: 8px;
    word-break: break-word;
}

.bujian-card-summary {
    font-size: 14px;
    line-height: 1.75;
    color: var(--ink-soft);
}

.chengyu-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    transition: all 0.22s ease;
}

.chengyu-card:hover {
    border-color: rgba(156, 106, 47, 0.5);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.chengyu-card-word {
    font-size: 20px;
    line-height: 1.35;
    color: #2f2418;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    margin-bottom: 2px;
}

.chengyu-card-pinyin {
    font-size: 13px;
    color: #9a6a2f;
    margin-bottom: 8px;
}

.chengyu-card-summary {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-soft);
}

.ciyu-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    transition: all 0.22s ease;
}

.ciyu-card:hover {
    border-color: rgba(156, 106, 47, 0.5);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.ciyu-card-word {
    font-size: 19px;
    line-height: 1.35;
    color: #2f2418;
    font-family: "Noto Serif SC", "Source Han Serif SC", serif;
    margin-bottom: 8px;
}

.ciyu-card-summary {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-soft);
}

.chengyu-pager {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pager-nums {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pager-btn,
.pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
    transition: all 0.2s ease;
}

.pager-btn:hover,
.pager-num:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pager-num.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #7f4e1d;
    font-weight: 600;
}

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

.detail-overview {
    border-top: 4px solid #b17e3c;
}

.detail-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-char {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #7b4a1d, #ab7834);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(95, 61, 29, 0.32);
}

.detail-hero-text .hero-pinyin {
    font-family: "Noto Serif SC", serif;
    font-size: 30px;
    color: #312518;
    line-height: 1.25;
}

.detail-hero-text .hero-subline {
    margin-top: 4px;
    color: var(--ink-fade);
    font-size: 14px;
}

.detail-meta,
.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-meta div,
.detail-list div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-soft);
}

.detail-meta span,
.detail-list span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--ink-fade);
}

.detail-meta strong,
.detail-list strong {
    font-size: 16px;
    color: var(--ink);
}

.detail-block {
    margin-top: 20px;
}

.zidian-main-card {
    border-top: 4px solid #b17e3c;
}

.zidian-glyph-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--bg-soft);
    text-align: center;
}

.hanzi-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(56, 45, 30, 0.09);
    padding: 8px;
}

.hanzi-fallback {
    width: 100%;
    max-width: 220px;
    min-height: 220px;
    margin: 0 auto;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #7b4a1d, #ab7834);
    color: #fff;
    font-size: 86px;
    font-family: "Noto Serif SC", serif;
    box-shadow: 0 10px 20px rgba(95, 61, 29, 0.25);
}

.glyph-tip {
    margin-top: 10px;
    font-size: 12px;
    color: var(--ink-fade);
}

.zidian-pronounce {
    font-size: 26px;
    line-height: 1.35;
    color: #302415;
    font-family: "Noto Serif SC", serif;
}

.zidian-pronounce-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-color: rgba(56, 45, 30, 0.2);
    color: #6f4a20;
    background: #fffaf2;
    white-space: nowrap;
}

.tts-btn:hover,
.tts-btn:focus {
    border-color: rgba(156, 106, 47, 0.45);
    color: #7f4e1d;
    background: #fff3de;
}

.tts-btn.is-playing {
    border-color: #7f4e1d;
    background: #7f4e1d;
    color: #fff;
}

.tts-btn.is-paused {
    border-color: #8f6230;
    background: #fff3e0;
    color: #7f4e1d;
}

.tts-status {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    font-size: 12px;
    color: var(--ink-fade);
}

.zidian-basic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.zidian-basic-grid div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-soft);
}

.zidian-basic-grid span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--ink-fade);
}

.zidian-basic-grid strong {
    font-size: 16px;
    color: var(--ink);
    font-weight: 600;
    word-break: break-word;
}

.dict-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: #3f2d19;
    font-family: "Noto Serif SC", serif;
}

.dict-dot {
    color: #7f4e1d;
    font-size: 20px;
    line-height: 1;
}

.dict-py {
    color: #7f4e1d;
    font-size: 16px;
}

.zidian-prose {
    line-height: 1.95;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 6px 12px;
    color: var(--ink-soft);
    font-size: 14px;
}

.tag:hover {
    color: var(--accent);
    border-color: rgba(156, 106, 47, 0.45);
}

.tag.active {
    color: #fff;
    background: #7f4e1d;
    border-color: #7f4e1d;
}

.component-guide {
    font-size: 13px;
    color: var(--ink-fade);
    line-height: 1.7;
}

.component-guide code {
    background: rgba(156, 106, 47, 0.12);
    color: #7b4d1b;
    padding: 1px 6px;
    border-radius: 6px;
}

.component-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.component-picker-wrap.is-collapsed-six {
    max-height: 228px;
}

.component-picker-wrap.is-collapsed-six::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card));
}

.component-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    padding: 5px 11px;
    font-size: 14px;
    line-height: 1.2;
}

.component-chip:hover {
    border-color: rgba(156, 106, 47, 0.5);
    color: var(--accent);
    background: #fff9ef;
}

.component-chip.active {
    border-color: #7f4e1d;
    background: #7f4e1d;
    color: #fff;
}

.component-chip.active:hover {
    border-color: #7f4e1d;
    background: #6f4317;
    color: #fff;
}

.component-chip-clear {
    color: #8b4a33;
    border-color: rgba(139, 74, 51, 0.3);
    background: #fff5f2;
}

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

.component-tags-wrap.is-collapsed {
    max-height: 122px;
}

.component-tags-wrap.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card));
}

.component-toggle {
    margin-top: 10px;
    border: 0;
    background: transparent;
    padding: 0;
    color: #7f4e1d;
    font-size: 13px;
    font-weight: 600;
}

.component-toggle:hover {
    color: var(--accent);
    text-decoration: underline;
}

.dict-card {
    border-left: 4px solid #a86e2f;
}

.dict-source {
    font-size: 12px;
    color: var(--ink-fade);
}

.dict-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dict-head-actions .tts-btn {
    margin-right: 2px;
}

.dict-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-soft);
    padding: 12px;
}

.dict-title {
    font-size: 13px;
    font-weight: 700;
    color: #6f4c23;
    margin-bottom: 8px;
}

.dict-content {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-soft);
    white-space: normal;
    word-break: break-word;
}

.state-empty {
    display: inline-block;
    font-size: 14px;
    color: var(--ink-fade);
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(156, 106, 47, 0.08);
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    color: #6f614e;
    font-size: 13px;
    font-weight: 600;
    border-bottom-color: var(--line);
}

.table tbody td {
    border-color: rgba(56, 45, 30, 0.08);
}

.site-footer {
    margin-top: 24px;
    padding: 30px 0;
    text-align: center;
    background: #efe6d7;
    border-top: 1px solid rgba(56, 45, 30, 0.12);
}

.site-footer .footer-brand {
    font-family: "Noto Serif SC", serif;
    font-size: 18px;
    font-weight: 700;
}

.site-footer .footer-links {
    margin-top: 8px;
    font-size: 14px;
}

.site-footer .footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6f4a20;
    font-weight: 600;
}

.site-footer .footer-meta {
    font-size: 13px;
    color: #786f61;
    margin-top: 5px;
}

.site-footer .footer-meta a {
    color: #786f61;
}

.btn-primary {
    background: #7f4e1d;
    border-color: #7f4e1d;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #6f4317;
    border-color: #6f4317;
}

.form-control,
.form-select {
    border-color: rgba(56, 45, 30, 0.2);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(156, 106, 47, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(156, 106, 47, 0.15);
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1199px) {
    .hero-title {
        font-size: clamp(30px, 4vw, 42px);
    }
}

@media (max-width: 991px) {
    .hero {
        padding: 56px 0 90px;
    }

    .section-title {
        font-size: 30px;
    }

    .detail-meta,
    .detail-list,
    .zidian-basic-grid {
        grid-template-columns: 1fr;
    }

    .category-hero {
        padding: 28px 0 20px;
    }
}

@media (max-width: 575px) {
    .hero-main,
    .hero-side,
    .data-card,
    .tool-card,
    .highlight-card,
    .highlight-item {
        padding: 16px;
    }

    .hero-links {
        gap: 8px;
    }

    .hero-link {
        font-size: 12px;
        padding: 6px 11px;
    }

    .detail-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-char {
        width: 78px;
        height: 78px;
        font-size: 34px;
    }

    .detail-hero-text .hero-pinyin {
        font-size: 25px;
    }

    .zidian-pronounce {
        font-size: 22px;
    }

    .zidian-pronounce-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .char-grid {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    }

    .hanzi-fallback {
        min-height: 180px;
        font-size: 68px;
    }

    .component-tags-wrap.is-collapsed {
        max-height: 108px;
    }

    .component-picker-wrap.is-collapsed-six {
        max-height: 192px;
    }
}

/* ===== 问题列表样式 ===== */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    display: block;
    padding: 16px 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(63, 48, 25, 0.04);
}

.question-item:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(156, 106, 47, 0.12);
    transform: translateY(-2px);
}

.question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.question-category {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(156, 106, 47, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.question-difficulty {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(56, 45, 30, 0.08);
    color: var(--ink-fade);
}

.question-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.question-title a {
    color: var(--ink);
}

.question-title a:hover {
    color: var(--accent);
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--ink-soft);
}

.question-answer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.question-answer strong {
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
}

.question-pinyin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-fade);
}

.page-what .category-hero {
    background: linear-gradient(135deg, rgba(156, 106, 47, 0.08) 0%, rgba(245, 241, 232, 0) 100%);
    padding: 48px 0;
}

.page-what-item .category-hero,
.page-what-cate .category-hero {
    background: linear-gradient(135deg, rgba(156, 106, 47, 0.1) 0%, rgba(245, 241, 232, 0) 100%);
}

.item-answer-badge,
.item-pinyin-badge {
    display: inline-block;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(156, 106, 47, 0.15);
    color: var(--accent);
    font-weight: 600;
    margin-right: 8px;
}

.item-pinyin-badge {
    background: rgba(56, 45, 30, 0.1);
    color: var(--ink-soft);
}

.detail-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-section:first-child {
    padding-top: 0;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.detail-title i {
    color: var(--accent);
}

.detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-soft);
}

.explanation-text,
.examples-text,
.misread-text {
    margin: 0;
    padding: 12px 16px;
    background: rgba(156, 106, 47, 0.06);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    color: var(--ink-fade);
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.word-dict-intro {
    margin: 0 0 16px;
    color: var(--ink-soft);
}

.word-char-card {
    height: 100%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(156, 106, 47, 0.04) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.word-char-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.word-char-glyph {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(156, 106, 47, 0.12);
    color: #6c4518;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-family: "Noto Serif SC", serif;
    font-weight: 600;
    flex: 0 0 58px;
}

.word-char-head-meta {
    min-width: 0;
}

.word-char-pinyin {
    font-size: 22px;
    line-height: 1.35;
    color: #302415;
    font-family: "Noto Serif SC", serif;
}

.word-char-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--accent);
}

.word-char-link:hover {
    color: #8a5d24;
    text-decoration: underline;
}

.word-char-grid {
    margin-bottom: 14px;
}

.word-char-summary {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(56, 45, 30, 0.04);
    color: var(--ink-soft);
    line-height: 1.75;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.related-item:hover {
    border-color: var(--accent);
    background: rgba(156, 106, 47, 0.05);
}

.related-question {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.related-answer {
    font-size: 13px;
    color: var(--accent);
}
