:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --soft: #f7f8fa;
  --ink: #1d1d1f;
  --muted: #66686d;
  --line: #e4e5e7;
  --green: #2f64e9;
  --green-light: #edf3ff;
  --coral: #c46049;
  --shadow: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto auto; align-items: center; gap: clamp(18px, 2.8vw, 36px); padding: 16px clamp(22px, 3.5vw, 48px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(18px); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.user-badge { max-width: min(220px, 24vw); padding: 6px 9px; overflow: hidden; border: 0; border-radius: 999px; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.user-badge:hover { color: var(--green); background: var(--green-light); }
.brand { display: flex; align-items: center; color: inherit; text-decoration: none; width: fit-content; }
.brand-word { color: var(--green); font-size: 30px; font-weight: 800; letter-spacing: -.1em; white-space: nowrap; }
.brand-pitch { display: flex; min-width: 0; align-items: center; gap: 12px; }
.brand-pitch-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border: 1px solid #d8dadd; border-radius: 9px; color: var(--ink); background: var(--soft); font-size: 14px; font-weight: 800; letter-spacing: -.05em; }
.brand-pitch p { min-width: 0; margin: 0; color: #55575b; font-size: 14px; line-height: 1.35; white-space: nowrap; }
.brand-pitch strong { margin-right: 10px; color: var(--ink); font-size: 15px; }
nav { display: flex; gap: 2px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.nav-button, .icon-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.nav-button { padding: 8px 11px; border-radius: 8px; color: var(--muted); }
.nav-button:hover { color: var(--green); }
.nav-button.active { color: var(--green); background: var(--green-light); }
.count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 3px; border-radius: 10px; font-size: 11px; background: rgba(47,100,233,.1); }
.nav-button:not(.active) .count { background: var(--green-light); color: var(--green); }
.count.accent:not(:empty) { background: var(--coral); color: white; }
.topbar > .icon-button { justify-self: end; }
.icon-button { width: 38px; height: 38px; border-radius: 9px; font-size: 20px; }
.icon-button:hover { background: var(--green-light); }
main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 100px; }
.view { display: none; }
.view.active { display: block; animation: enter .25s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-weight: 680; letter-spacing: -.035em; }
.dialog-copy { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.search-card, .result-card, .item-card, .review-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.search-card { padding: 18px; border-radius: 11px; background: var(--soft); }
.search-card > label, dialog label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: none; }
textarea { padding: 14px 16px; resize: vertical; line-height: 1.55; }
input, select { padding: 11px 13px; }
textarea:focus, input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(49, 95, 135, .11); }
.primary-button, .secondary-button { border-radius: 9px; padding: 11px 17px; border: 1px solid var(--green); cursor: pointer; font-weight: 700; }
.primary-button { color: white; background: var(--green); }
.primary-button:hover { background: #2452c9; }
.secondary-button { color: var(--green); background: transparent; }
.secondary-button:hover { background: var(--green-light); }
.search-row .primary-button { display: flex; min-width: 112px; align-items: center; justify-content: space-between; }
.search-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12px; }
kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.status-message { margin: 14px 0; padding: 12px 15px; border-radius: 9px; color: var(--green); background: var(--green-light); }
.status-message.error { color: #8c3529; background: #f5ded8; }
.result-card { --result-pad: clamp(22px, 4vw, 38px); margin-top: 22px; padding: var(--result-pad); border-radius: 12px; }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.result-heading { flex: 1 1 auto; min-width: 0; }
.result-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; }
.result-back { flex: 0 0 auto; margin-right: 2px; padding: 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 30px; line-height: 1; }
.result-back:hover { transform: translateX(-2px); }
.result-title { margin: 0; font-size: clamp(38px, 6vw, 58px); font-weight: 720; letter-spacing: -.045em; overflow-wrap: anywhere; }
.result-title-line .phonetic { white-space: nowrap; }
.phonetic { color: var(--coral); font-family: Georgia, serif; }
.result-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.favorite-star { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: #9ba0aa; background: transparent; cursor: pointer; font-size: 31px; line-height: 1; }
.favorite-star:hover { background: var(--soft); }
.favorite-star.active { color: #f4b400; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 17px; }
.result-tool { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.result-tool span { color: var(--green); font-size: 18px; line-height: 1; }
.result-tool:hover { color: var(--green); background: var(--green-light); }
.result-actions > .secondary-button { padding: 7px 10px; border-color: transparent; font-size: 13px; }
.result-section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.result-section h3 { font-size: 13px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.definition { margin-bottom: 17px; line-height: 1.6; }
.definition strong { display: inline-block; min-width: 55px; color: var(--green); font-size: 12px; }
.example { margin: 6px 0 0 55px; color: var(--muted); font-style: italic; }
.ai-content { white-space: pre-wrap; line-height: 1.8; }
.local-dictionary { margin: 24px calc(-1 * var(--result-pad)) calc(-1 * var(--result-pad)); font-size: 16px; line-height: 1.68; overflow-wrap: anywhere; }
.dictionary-section-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--result-pad); border: solid var(--line); border-width: 1px 0; color: var(--ink); background: var(--soft); cursor: pointer; font-size: 15px; font-weight: 720; text-align: left; }
.dictionary-section-toggle:hover { background: #f1f3f6; }
.dictionary-chevron { flex: 0 0 auto; color: var(--muted); font-size: 18px; transition: transform .18s ease; }
.dictionary-section-toggle[aria-expanded="false"] .dictionary-chevron { transform: rotate(180deg); }
.dictionary-section-body { padding: 22px var(--result-pad) var(--result-pad); }
.dictionary-section-body[hidden] { display: none !important; }
.dictionary-source-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0; }
.dictionary-source-tab { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 720; white-space: nowrap; }
.dictionary-source-tab:hover { color: var(--green); background: var(--green-light); }
.dictionary-source-tab.active { color: white; border-color: var(--green); background: var(--green); }
.dictionary-source-tab.explanation-ai-tab { color: #a94d32; border-color: #d46949; background: #f5e4de; }
.dictionary-source-tab.explanation-ai-tab.active { color: white; border-color: var(--coral); background: var(--coral); }
.dictionary-source-tab:disabled { cursor: wait; opacity: .72; }
.dictionary-source-panel[hidden] { display: none !important; }
.online-explanation-panel { padding: clamp(18px, 3vw, 30px); border-radius: 12px; background: #edf1f4; }
.online-source-note { margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.online-phonetic { margin-bottom: 6px; color: var(--coral); font-family: Georgia, serif; font-size: 18px; }
.online-state { margin: 0; color: var(--muted); }
.online-state.error { color: #8c3529; }
.local-dictionary .lemma-notice { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 12px; border-radius: 10px; color: #80513f; background: #f5e4de; font-size: 13px; }
.local-dictionary .lemma-notice strong { color: #a94d32; }
.local-dictionary .cixing_tiaozhuan { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.local-dictionary .pos-tab { padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px; color: #596673; background: #f7f8fa; cursor: pointer; font-size: 13px; font-weight: 750; transition: transform .15s ease, color .15s ease, background .15s ease; }
.local-dictionary .pos-tab:hover { transform: translateY(-1px); }
.local-dictionary .pos-tab.active.pos-tone-tab-0 { color: white; background: var(--green); }
.local-dictionary .pos-tab.active.pos-tone-tab-1 { color: white; background: #94614f; }
.local-dictionary .pos-tab.active.pos-tone-tab-2 { color: white; background: #586b82; }
.local-dictionary .pos-tab.active.pos-tone-tab-3 { color: white; background: #747461; }
.local-dictionary .pos-ai-button { padding: 7px 16px; border-radius: 999px; }
.local-dictionary .pos-ai-button.active { color: white; border-color: var(--coral); background: var(--coral); }
.local-dictionary .replaced-pos-label { display: none !important; }
.local-dictionary .dictionary-single-content[hidden],
.local-dictionary .ai-tab-panel[hidden] { display: none !important; }
.local-dictionary .ai-tab-panel { margin: 16px 0 0; padding: clamp(18px, 3vw, 30px); border-radius: 18px; background: #f5e4de; }
.local-dictionary .cixing_part[hidden] { display: none !important; }
.local-dictionary .cixing_part { margin: 18px 0 0; padding: 0; }
.local-dictionary .cixing_part.pos-tone-0,
.local-dictionary .cixing_part.pos-tone-1,
.local-dictionary .cixing_part.pos-tone-2,
.local-dictionary .cixing_part.pos-tone-3 { background: transparent; }
.local-dictionary h-g, .local-dictionary top-g, .local-dictionary sn-gs,
.local-dictionary sn-blk, .local-dictionary sn-blk-nolist, .local-dictionary sn-g,
.local-dictionary def, .local-dictionary x-gs, .local-dictionary x-g-blk,
.local-dictionary x, .local-dictionary dr-gs, .local-dictionary dr-g-blk,
.local-dictionary dr-g, .local-dictionary idm-g, .local-dictionary idm-blk,
.local-dictionary unbox, .local-dictionary unbox-g, .local-dictionary unbox-gs {
  display: block;
}
.local-dictionary h { display: block; margin-bottom: 7px; color: var(--ink); font: 700 31px/1.25 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.025em; }
.local-dictionary pos-g, .local-dictionary gram-g, .local-dictionary pron-gs { display: block; margin: 5px 0; }
.local-dictionary top-g:has(> .headword-line) { display: grid !important; grid-template-columns: minmax(0, 1fr); row-gap: 9px; }
.local-dictionary top-g:has(> .headword-line) > infl:empty { display: none; }
.local-dictionary .headword-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; min-width: 0; width: 100%; }
.local-dictionary .headword-line h { display: inline; flex: 0 0 auto; margin: 0; }
.local-dictionary .headword-line > pron[gs], .local-dictionary .headword-line > pron-gs { display: inline-flex; flex: 0 1 auto; flex-wrap: nowrap; align-items: baseline; gap: 4px 10px; min-width: 0; margin: 0; font-size: clamp(12px, 1.6vw, 16px); }
.local-dictionary .headword-line pron-g-blk { white-space: nowrap; }
.local-dictionary .headword-line xhtml\:br { display: none; }
.local-dictionary .headword-line > .inflection-summary { display: inline; flex: 0 0 auto; color: var(--muted); font-size: 13px; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.local-dictionary .pos-tools-line { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; width: 100%; margin: 0 0 12px; }
.local-dictionary top-g:has(> .headword-line) > .pos-tools-line { grid-column: 1; }
.local-dictionary .pos-tools-line pos-g { display: block; margin: 0; }
.local-dictionary .pos-tools-line pos { display: inline-block; padding: 4px 8px; border-radius: 6px; color: #073c52; background: #70e7ef; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.local-dictionary .related-pos { padding: 5px 10px; border-radius: 8px; color: var(--green); background: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 750; }
.local-dictionary .word-family-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.local-dictionary .word-family-label { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.local-dictionary .word-family-item { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .75); }
.local-dictionary .word-family-item strong { color: var(--ink); }
.local-dictionary .word-family-item small { color: var(--muted); font-size: 12px; }
.local-dictionary res-g { display: contents; }
.local-dictionary .forms-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border: 0; border-radius: 9px; color: var(--green); background: rgba(255, 255, 255, .7); cursor: pointer; font-size: 13px; font-weight: 750; }
.local-dictionary .forms-toggle:hover { background: white; }
.local-dictionary .forms-toggle[aria-expanded="true"] { margin-bottom: 9px; }
.local-dictionary vp-gs { display: block; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .55); }
.local-dictionary vp-gs[hidden] { display: none !important; }
.local-dictionary vp-gs::before { content: "词形变化"; display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.local-dictionary .forms-table { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(150px, 1.2fr); gap: 7px 18px; }
.local-dictionary .forms-label { color: var(--muted); font-size: 13px; }
.local-dictionary .forms-value { color: var(--ink); }
.local-dictionary vpform { display: block; color: var(--muted); font-size: 13px; }
.local-dictionary vp-g { display: block; color: var(--ink); font-weight: 750; }
.local-dictionary vp-g pron { display: none !important; }
.local-dictionary pos { color: var(--green); font-weight: 750; }
.local-dictionary gram, .local-dictionary gram-blk, .local-dictionary gram-g { color: #a73b8d; font-weight: 780; }
.local-dictionary phon, .local-dictionary brelabel, .local-dictionary namelabel { color: var(--coral); }
.local-dictionary def { margin: 13px 0 8px; padding: 0; border: 0; color: #25262a; font-weight: 620; }
.local-dictionary chn { color: #45474c; font-weight: 650; }
.local-dictionary chnsep::before { content: "  "; }
.local-dictionary x-g-blk { margin: 8px 0 15px 14px; padding-left: 13px; border-left: 3px solid #d8dbe0; color: #98601c; }
.local-dictionary x { color: #98601c; font-style: italic; }
.local-dictionary x chn { display: block; color: #777a80; font-style: normal; }
.local-dictionary sn, .local-dictionary sn-label { color: var(--green); font-weight: 800; }
.local-dictionary dr-g, .local-dictionary idm-g, .local-dictionary unbox { margin-top: 22px; padding: 16px; border-radius: 10px; background: #edf1f4; }
.local-dictionary .cixing_part dr-g, .local-dictionary .cixing_part idm-g, .local-dictionary .cixing_part unbox { background: rgba(255, 255, 255, .56); }
.local-dictionary dr { font-size: 20px; font-weight: 750; }
.local-dictionary audio-gb, .local-dictionary audio-us,
.local-dictionary audio-gbs-liju, .local-dictionary audio-uss-liju,
.local-dictionary xsymb, .local-dictionary drtri { display: none; }
.local-dictionary xhtml\:br { display: block; }
.local-dictionary a { color: inherit; text-decoration: none; pointer-events: none; }
.local-dictionary hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.local-dictionary img { display: block; width: auto; max-width: min(100%, 760px); height: auto; margin: 16px auto; border-radius: 10px; }
.local-dictionary img[src*=".svg"], .local-dictionary img[data-device-resource$=".svg"] { display: inline-block; max-width: 24px; max-height: 24px; margin: 0 5px; border-radius: 0; vertical-align: middle; }
.has-result > .search-card, .has-result > .recent-section { display: none; }
.has-result > .result-card { margin-top: 0; }
.recent-section { margin-top: 42px; }
.section-heading, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .page-heading h1 { margin-bottom: 0; font-size: 30px; }
.text-button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.card-list { display: grid; gap: 12px; }
.item-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 20px; border-radius: 11px; box-shadow: none; }
.item-card h3 { margin-bottom: 7px; font-size: 22px; font-weight: 680; letter-spacing: -.025em; overflow-wrap: anywhere; }
.item-card p { margin-bottom: 8px; color: var(--muted); line-height: 1.55; }
.item-meta, .tag-list { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; }
.pill, .tag { padding: 4px 8px; border-radius: 99px; background: var(--green-light); color: var(--green); }
.tag { background: #eee9dc; color: #655f54; }
.item-actions { display: flex; gap: 5px; align-items: start; }
.item-actions button { border: 0; border-radius: 9px; padding: 8px 10px; background: transparent; cursor: pointer; }
.item-actions button:hover { background: var(--green-light); }
.filter-bar { display: grid; grid-template-columns: 1fr 180px; gap: 12px; margin-bottom: 20px; }
.manual-card { padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.manual-intro { max-width: 700px; margin-bottom: 24px; color: var(--muted); line-height: 1.65; }
.manual-grid { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(240px, 1.35fr); gap: 18px; }
.manual-grid label { display: block; color: var(--ink); font-size: 13px; font-weight: 700; }
.manual-grid label > textarea, .manual-grid label > input, .manual-grid label > select { margin-top: 8px; font-weight: 400; }
.manual-wide { grid-column: 1 / -1; }
.manual-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.study-schedule { margin: 9px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 0; }
.empty { padding: 54px 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); }
.empty span { display: block; color: var(--coral); font-size: 28px; }
.empty h3 { margin: 10px 0 6px; color: var(--ink); }
.review-stage { max-width: 760px; margin: 20px auto; }
.review-card { padding: clamp(26px, 6vw, 52px); text-align: center; }
.review-topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.review-progress { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; }
.review-topline .review-progress { grid-column: 2; }
.review-edit-button { display: inline-flex; grid-column: 3; justify-self: end; align-items: center; gap: 5px; padding: 7px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.review-edit-button span { color: var(--green); font-size: 16px; }
.review-edit-button:hover { color: var(--green); background: var(--green-light); }
.review-card blockquote { margin: 25px 0; font: 650 27px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.025em; }
.practice-box { margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; text-align: left; background: var(--soft); }
.practice-box > label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 750; }
.practice-box > p { margin-bottom: 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.practice-box textarea { min-height: 88px; background: white; }
.practice-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.practice-inline-status { margin-top: 11px; padding: 10px 12px; border-radius: 8px; color: var(--green); background: var(--green-light); font-size: 13px; }
.practice-inline-status.error { color: #8c3529; background: #f5ded8; }
.practice-result { margin-top: 15px; padding: 16px; border-radius: 10px; background: white; }
.practice-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.practice-score { display: inline-flex; align-items: baseline; gap: 2px; color: #a44235; font-size: 25px; font-weight: 800; }
.practice-score.partial { color: #9a6b18; }
.practice-score.strong { color: #267047; }
.practice-score small { font-size: 11px; font-weight: 650; }
.practice-result .practice-sentence { margin: 10px 0; color: var(--ink); font-size: 14px; font-style: italic; }
.practice-feedback { color: var(--ink); white-space: pre-wrap; line-height: 1.7; }
.practice-result .practice-suggestion { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--green); font-size: 13px; font-weight: 700; }
.review-answer { padding-top: 22px; border-top: 1px solid var(--line); text-align: left; line-height: 1.7; }
.review-phonetic { margin-bottom: 14px; color: var(--coral); font-family: Georgia, serif; text-align: center; }
.review-pos { margin: 12px 0; padding: 17px 20px; border-radius: 14px; }
.review-pos.pos-tone-0 { background: #edf2f6; }
.review-pos.pos-tone-1 { background: #f3efec; }
.review-pos.pos-tone-2 { background: #eef0f4; }
.review-pos.pos-tone-3 { background: #f2f2ee; }
.review-pos h3 { display: inline-block; margin: 0 0 10px; padding: 3px 9px; border-radius: 7px; color: white; background: var(--green); font-size: 13px; }
.review-pos.pos-tone-1 h3 { background: #94614f; }
.review-pos.pos-tone-2 h3 { background: #586b82; }
.review-pos.pos-tone-3 h3 { background: #747461; }
.review-definition { margin: 5px 0; font-weight: 600; }
.review-example { margin: 9px 0 0 16px; color: var(--muted); font-style: italic; }
.review-note { padding: 16px 18px; border-radius: 14px; background: var(--green-light); }
.review-note p { margin: 7px 0 0; white-space: pre-wrap; }
.review-extra-note { padding-top: 12px; margin-top: 14px !important; border-top: 1px solid rgba(47, 100, 233, .16); color: var(--muted); }
.review-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; }
dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 30px 90px rgba(25,30,25,.2); }
dialog::backdrop { background: rgba(23, 27, 23, .45); backdrop-filter: blur(3px); }
dialog form { padding: 25px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; }
dialog label { margin: 16px 0; }
dialog label input, dialog label textarea, dialog label select { margin-top: 7px; font-weight: 400; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.toggle-row small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.toggle-row input { width: 20px; height: 20px; }
.provider-settings { padding: 3px 14px; border-radius: 11px; background: #edf1f4; }
.provider-settings[hidden] { display: none; }
.settings-note { margin: 10px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.settings-note code { padding: 2px 5px; border-radius: 5px; background: white; color: var(--green); }
.settings-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-section h3 { margin-bottom: 7px; font-size: 15px; }
.inline-status { margin: 12px 0; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: #edf1f4; font-size: 13px; line-height: 1.5; }
.inline-actions { display: flex; align-items: center; gap: 12px; }
.device-data-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.device-data-group h4 { margin: 0 0 6px; font-size: 14px; }
.ai-button { border-color: var(--coral); color: #a94d32; }
.ai-button:hover { background: #f5e4de; }
.ai-hint { color: var(--muted); }
@media (max-width: 720px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding: 10px 14px; }
  .brand-word { font-size: 26px; }
  nav { position: static; justify-self: center; transform: none; box-shadow: none; }
  .nav-button { padding: 7px 7px; font-size: 13px; }
  .count { min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
  .brand-pitch { display: none; }
  .top-actions { justify-self: end; }
  .user-badge { display: none; }
  main { padding-top: 24px; padding-bottom: 70px; }
  .search-row, .filter-bar { grid-template-columns: 1fr; }
  .manual-grid { grid-template-columns: 1fr; }
  .manual-wide { grid-column: auto; }
  .manual-actions { display: grid; grid-template-columns: 1fr 1.7fr; }
  .search-row .primary-button { justify-content: center; gap: 10px; min-height: 48px; }
  .search-meta span:last-child { display: none; }
  .result-card { margin-right: -20px; margin-left: -20px; border-right: 0; border-left: 0; border-radius: 0; }
  .result-top, .page-heading { align-items: start; }
  .result-title { font-size: clamp(39px, 13vw, 55px); }
  .result-title-line { gap: 5px 10px; }
  .result-back { font-size: 28px; }
  .result-title-line .phonetic { font-size: 14px; }
  .favorite-star { width: 40px; height: 40px; font-size: 29px; }
  .result-meta-line { margin-top: 11px; }
  .result-actions { flex-wrap: nowrap; margin-right: calc(-1 * var(--result-pad)); margin-left: calc(-1 * var(--result-pad)); padding: 0 var(--result-pad) 4px; overflow-x: auto; scrollbar-width: none; }
  .result-actions::-webkit-scrollbar { display: none; }
  .result-actions > * { flex: 0 0 auto; }
  .dictionary-section-toggle { padding-top: 14px; padding-bottom: 14px; font-size: 14px; }
  .dictionary-section-body { padding-top: 18px; }
  .local-dictionary { font-size: 15px; line-height: 1.62; }
  .local-dictionary .cixing_part { margin-top: 14px; }
  .local-dictionary def { margin-top: 11px; }
  .local-dictionary x-g-blk { margin-left: 7px; padding-left: 11px; }
  .item-card { grid-template-columns: 1fr; }
  .item-actions { border-top: 1px solid var(--line); padding-top: 10px; }
  .review-actions { grid-template-columns: 1fr; }
  .review-topline { grid-template-columns: 1fr auto; }
  .review-topline .review-progress { grid-column: 1; justify-content: flex-start; text-align: left; }
  .review-edit-button { grid-column: 2; }
  .practice-actions .secondary-button { width: 100%; }
  .local-dictionary .forms-table { grid-template-columns: minmax(125px, .9fr) minmax(100px, 1.1fr); gap: 7px 12px; }
  .local-dictionary .headword-line { gap: 5px 9px; }
  .local-dictionary .headword-line h { font-size: 27px; }
  .local-dictionary .headword-line > pron[gs], .local-dictionary .headword-line > pron-gs { gap: 3px 7px; font-size: 12px; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .brand-pitch { display: none; }
}
