/* stylesheet */

:root {
  --paper: #f4f1e8; --paper-deep: #ebe7db; --card: #fffdf7; --ink: #18251e;
  --muted: #68736c; --line: rgba(24,37,30,.12); --green: #1d5a43; --green-dark: #143d2e;
  --green-soft: #dcebdd; --lime: #d9f16f; --sun: #f2c86d; --coral: #dd725f; --coral-soft: #f8e1db;
  --blue-soft: #dce9ef; --shadow: 0 20px 60px rgba(35,48,40,.09); --shadow-small: 0 8px 24px rgba(35,48,40,.08);
  --radius: 26px; --radius-small: 16px;
  --font: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px; margin: 0; color: var(--ink);
  background: radial-gradient(circle at 15% 10%, rgba(217,241,111,.15), transparent 26rem), radial-gradient(circle at 90% 40%, rgba(242,200,109,.12), transparent 26rem), var(--paper);
  font-family: var(--font); -webkit-font-smoothing: antialiased;
}
body::before { position: fixed; inset: 0; z-index: -1; content: ""; pointer-events: none; opacity: .22; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(29,90,67,.26); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.ambient-one { top: 34%; left: -9rem; width: 18rem; height: 18rem; border: 1px solid rgba(29,90,67,.1); }
.ambient-two { right: -7rem; bottom: 12%; width: 16rem; height: 16rem; background: rgba(217,241,111,.08); }
.site-header { display: flex; align-items: center; justify-content: space-between; width: min(1240px, calc(100% - 48px)); margin: 24px auto 0; padding: 10px 12px 10px 14px; border: 1px solid rgba(255,255,255,.7); border-radius: 22px; background: rgba(255,253,247,.75); box-shadow: 0 12px 40px rgba(34,49,40,.05); backdrop-filter: blur(18px); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; color: var(--card); background: var(--green); border-radius: 13px; place-items: center; }
.brand-mark svg { width: 28px; height: 28px; stroke-width: 2.2; }
.brand > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: .03em; }
.brand small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.main-nav { display: flex; gap: 4px; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(244,241,232,.72); }
.nav-link { min-width: 72px; padding: 10px 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 650; cursor: pointer; transition: color 180ms ease, background 180ms ease, transform 180ms ease; }
.nav-link:hover { color: var(--ink); transform: translateY(-1px); }
.nav-link.is-active { color: var(--card); background: var(--green); }
.icon-button { display: grid; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.52); cursor: pointer; place-items: center; transition: background 180ms ease, transform 180ms ease; }
.icon-button:hover { background: white; transform: translateY(-1px); }
.icon-button svg { width: 19px; height: 19px; }
.page-shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.view { display: none; padding: 70px 0 80px; animation: viewIn 360ms cubic-bezier(.2,.8,.2,1) both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.today-heading, .page-heading { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); gap: 70px; align-items: end; margin-bottom: 40px; }
.today-heading h1, .page-heading h1 { max-width: 760px; margin: 0; font-family: "Songti SC", "STSong", Georgia, serif; font-size: clamp(42px,6vw,76px); font-weight: 700; line-height: 1.06; letter-spacing: -.045em; }
.marker { position: relative; z-index: 0; display: inline-block; }
.marker::after { position: absolute; right: -.04em; bottom: .06em; left: -.04em; z-index: -1; height: .27em; content: ""; background: var(--lime); transform: rotate(-1deg); }
.today-intro, .page-heading > p { max-width: 390px; margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.9; }

.unit-hero { position: relative; display: grid; min-height: 390px; overflow: hidden; border-radius: 34px; color: var(--card); background: linear-gradient(120deg,rgba(255,255,255,.05),transparent 40%), var(--green); box-shadow: 0 26px 70px rgba(20,61,46,.2); grid-template-columns: minmax(0,1.25fr) minmax(290px,.75fr); }
.unit-hero::before { position: absolute; top: -50%; right: 16%; width: 1px; height: 200%; content: ""; background: rgba(255,255,255,.08); transform: rotate(24deg); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 52px 58px; }
.pill { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.pill-light { color: var(--lime); border: 1px solid rgba(217,241,111,.33); background: rgba(217,241,111,.08); }
.hero-copy h2 { max-width: 640px; margin: 20px 0 12px; font-family: "Songti SC", "STSong", Georgia, serif; font-size: clamp(31px,4vw,52px); font-weight: 600; line-height: 1.13; letter-spacing: -.035em; }
.hero-copy > p { max-width: 530px; margin: 0; color: rgba(255,253,247,.66); font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { margin-top: 18px !important; color: rgba(255,253,247,.45) !important; font-size: 11px !important; letter-spacing: .02em; }
.button { display: inline-flex; gap: 10px; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button svg { width: 18px; height: 18px; }
.button-sun { color: var(--green-dark); background: var(--lime); box-shadow: 0 10px 26px rgba(217,241,111,.13); }
.button-dark { color: var(--card); background: var(--green); box-shadow: 0 10px 24px rgba(29,90,67,.16); }
.button-dark:hover:not(:disabled) { background: var(--green-dark); box-shadow: 0 14px 30px rgba(29,90,67,.2); }
.button-ghost-light { color: var(--card); border: 1px solid rgba(255,255,255,.19); background: rgba(255,255,255,.06); }
.button-quiet { color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.52); }
.button-wide { width: 100%; }
.button-small { min-height: 38px; padding: 0 15px; font-size: 12px; }
.hero-art { position: relative; min-height: 360px; overflow: hidden; }
.hero-letter { position: absolute; font-family: Georgia, serif; font-weight: 700; line-height: 1; user-select: none; }
.hero-letter-a { top: 58px; left: 18%; color: var(--lime); font-size: clamp(150px,18vw,255px); transform: rotate(-8deg); }
.hero-letter-b { right: 9%; bottom: 30px; color: rgba(255,255,255,.09); font-size: clamp(110px,14vw,200px); transform: rotate(7deg); }
.hero-orbit { position: absolute; top: 45%; left: 48%; width: 270px; height: 270px; border: 1px solid rgba(217,241,111,.2); border-radius: 50%; transform: translate(-50%,-50%) rotate(-15deg); }
.hero-orbit::before, .hero-orbit::after { position: absolute; border-radius: 50%; content: ""; }
.hero-orbit::before { top: 20px; right: 35px; width: 10px; height: 10px; background: var(--sun); }
.hero-orbit::after { bottom: 30px; left: 8px; width: 5px; height: 5px; background: var(--lime); }
.hero-note { position: absolute; right: 36px; bottom: 35px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 700; line-height: 1.55; letter-spacing: .12em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 56px 0 22px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-family: "Songti SC", "STSong", Georgia, serif; font-size: 27px; letter-spacing: -.02em; }
.text-button { display: inline-flex; gap: 7px; align-items: center; padding: 6px 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.text-button span { transition: transform 180ms ease; }
.text-button:hover span { transform: translateX(3px); }
.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat-card { position: relative; display: flex; gap: 15px; align-items: center; min-height: 112px; padding: 20px; overflow: hidden; text-align: left; border: 1px solid rgba(255,255,255,.7); border-radius: 22px; background: var(--card); box-shadow: var(--shadow-small); cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(35,48,40,.1); }
.stat-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; font-family: Georgia, serif; font-size: 17px; font-weight: 700; place-items: center; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-total .stat-icon { color: var(--green); background: var(--green-soft); }
.stat-unfamiliar .stat-icon { color: var(--coral); background: var(--coral-soft); }
.stat-familiar .stat-icon { color: #32714f; background: #e0efdd; }
.stat-neutral .stat-icon { color: #537481; background: var(--blue-soft); }
.stat-copy { display: flex; flex-direction: column; gap: 3px; }
.stat-copy strong { font-family: Georgia, serif; font-size: 31px; font-weight: 500; line-height: 1; }
.stat-copy small { color: var(--muted); font-size: 11px; }
.stat-arrow { position: absolute; top: 15px; right: 17px; color: rgba(24,37,30,.28); font-size: 13px; }
.content-split { display: grid; gap: 18px; margin-top: 18px; grid-template-columns: minmax(0,1.5fr) minmax(300px,.7fr); }
.panel { border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius); background: rgba(255,253,247,.86); box-shadow: var(--shadow); }
.recent-panel { padding: 30px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.unit-list { display: grid; gap: 4px; margin-top: 24px; }
.unit-row { display: grid; padding: 16px 2px; border-top: 1px solid var(--line); grid-template-columns: 72px minmax(0,1fr) auto; gap: 15px; align-items: center; }
.unit-row:first-child { border-top: 0; }
.unit-date-block { display: flex; flex-direction: column; padding-right: 14px; border-right: 1px solid var(--line); }
.unit-date-block strong { font-family: Georgia, serif; font-size: 23px; font-weight: 500; line-height: 1; }
.unit-date-block small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.unit-row-copy strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.unit-row-copy span { color: var(--muted); font-size: 11px; }
.unit-row button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: background 180ms ease, color 180ms ease; }
.unit-row button:hover { color: var(--card); background: var(--green); }
.empty-inline { padding: 36px 0 18px; color: var(--muted); font-size: 13px; }

.review-callout { position: relative; min-height: 100%; padding: 34px; overflow: hidden; color: var(--card); background: var(--green-dark); }
.review-callout::after { position: absolute; right: -55px; bottom: -85px; width: 200px; height: 200px; border: 1px solid rgba(217,241,111,.18); border-radius: 50%; content: ""; }
.review-callout .eyebrow { color: var(--lime); }
.review-callout p:not(.eyebrow) { color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.8; }
.review-callout h2 { font-size: 31px; line-height: 1.25; }
.callout-number { position: absolute; top: 24px; right: 27px; color: rgba(217,241,111,.13); font-family: Georgia, serif; font-size: 76px; font-weight: 700; }
.review-callout .button { position: relative; z-index: 1; margin-top: 14px; color: var(--green-dark); background: var(--lime); }
.page-heading { margin-bottom: 44px; }
.page-heading h1 { font-size: clamp(44px,5.5vw,70px); }
.compact-heading { align-items: center; }
.compact-heading .eyebrow { margin-bottom: 8px; }
.compact-heading h1 { font-size: clamp(38px,4.5vw,58px); }
.review-layout { display: grid; gap: 20px; grid-template-columns: minmax(0,1.45fr) minmax(290px,.65fr); }
.review-config { padding: 38px; }
.count-output { min-width: 78px; color: var(--green); font-family: Georgia, serif; font-size: 58px; font-weight: 500; line-height: .9; text-align: right; }
.range-input { width: 100%; height: 6px; margin: 36px 0 0; border-radius: 999px; background: linear-gradient(90deg,var(--green) 20%,var(--paper-deep) 20%); cursor: pointer; appearance: none; }
.range-input::-webkit-slider-thumb { width: 24px; height: 24px; border: 5px solid var(--card); border-radius: 50%; background: var(--green); box-shadow: 0 3px 12px rgba(24,37,30,.23); appearance: none; }
.range-input::-moz-range-thumb { width: 16px; height: 16px; border: 5px solid var(--card); border-radius: 50%; background: var(--green); box-shadow: 0 3px 12px rgba(24,37,30,.23); }
.range-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 10px; }
.pool-grid { display: grid; gap: 10px; margin-top: 34px; grid-template-columns: repeat(3,1fr); }
.pool-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(244,241,232,.55); }
.pool-card span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.pool-card strong { font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.pool-unfamiliar { border-left: 3px solid var(--coral); }
.pool-familiar { border-left: 3px solid #5e936c; }
.pool-neutral { border-left: 3px solid #799aa7; }
.ratio-card { margin-top: 18px; padding: 22px; border-radius: var(--radius-small); background: var(--green-dark); color: var(--card); }
.ratio-heading { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; }
.ratio-badge { padding: 5px 9px; border-radius: 999px; color: var(--lime); background: rgba(217,241,111,.1); font-family: Georgia, serif; font-size: 14px; }
.ratio-bar { display: flex; height: 9px; overflow: hidden; margin-top: 16px; border-radius: 999px; background: rgba(255,255,255,.1); }
.ratio-bar span { width: 0; transition: width 300ms ease; }
.ratio-unfamiliar { background: var(--coral); }
.ratio-familiar { background: #8fc798; }
.ratio-neutral { background: #91b8c7; }
.ratio-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 13px; color: rgba(255,255,255,.65); font-size: 10px; }
.ratio-legend span { display: flex; gap: 6px; align-items: center; }
.ratio-legend b { color: var(--card); }
.dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; }
.dot-unfamiliar { background: var(--coral); }
.dot-familiar { background: #72ad7c; }
.dot-neutral { background: #7fa7b7; }
.config-note { min-height: 38px; margin: 20px 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.review-side { display: flex; flex-direction: column; gap: 16px; }
.quote-card { position: relative; flex: 1; min-height: 280px; padding: 38px; overflow: hidden; border-radius: var(--radius); color: var(--green-dark); background: var(--lime); }
.quote-mark { position: absolute; top: -25px; right: 22px; color: rgba(20,61,46,.1); font-family: Georgia, serif; font-size: 170px; line-height: 1; }
.quote-card p { position: relative; margin: 42px 0 30px; font-family: "Songti SC", "STSong", Georgia, serif; font-size: 27px; font-weight: 600; line-height: 1.55; }
.quote-card small { font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.rule-list { padding: 25px 28px; border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius); background: rgba(255,253,247,.75); }
.rule-list div { display: grid; padding: 13px 0; border-top: 1px solid var(--line); grid-template-columns: 33px 1fr; }
.rule-list div:first-child { border-top: 0; }
.rule-list span { color: var(--green); font-family: Georgia, serif; font-size: 11px; }
.rule-list p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.library-panel { padding: 28px; }
.library-toolbar { display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.search-box { display: flex; flex: 1; gap: 10px; align-items: center; max-width: 380px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(244,241,232,.6); }
.search-box svg { width: 17px; height: 17px; color: var(--muted); }
.search-box input { width: 100%; height: 44px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.filter-tabs { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(244,241,232,.6); }
.filter-tabs button { padding: 8px 13px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.filter-tabs button.is-active { color: var(--card); background: var(--green); }
.library-summary { display: flex; justify-content: space-between; margin: 25px 0 9px; padding: 0 2px; color: var(--muted); font-size: 10px; }
.word-table { border-top: 1px solid var(--line); }
.table-head, .word-row { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(260px,1.7fr) minmax(190px,.8fr) minmax(80px,.4fr); gap: 20px; align-items: center; }
.table-head { padding: 13px 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.word-row { min-height: 78px; padding: 14px 8px; border-top: 1px solid var(--line); transition: background 150ms ease; }
.word-row:hover { background: rgba(244,241,232,.45); }
.word-term strong { display: block; font-family: Georgia, serif; font-size: 19px; font-weight: 600; }
.word-term span { color: var(--muted); font-family: var(--font); font-size: 10px; }
.word-definition { color: #435149; font-size: 13px; line-height: 1.6; }
.status-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.status-switch button { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.status-switch button.is-active[data-status="unfamiliar"] { color: white; background: var(--coral); }
.status-switch button.is-active[data-status="familiar"] { color: white; background: var(--green); }
.status-switch button.is-active[data-status="neutral"] { color: var(--ink); background: #d5dfe2; }
.word-score { font-size: 10px; color: var(--muted); line-height: 1.55; }
.word-score b { color: var(--ink); font-family: Georgia, serif; font-size: 14px; font-weight: 500; }
.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; padding-top: 24px; }
.pagination span { min-width: 90px; color: var(--muted); font-size: 10px; text-align: center; }
.empty-state { padding: 70px 20px; color: var(--muted); font-size: 13px; text-align: center; }

.import-layout { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); }
.import-editor, .import-preview { padding: 30px; }
.import-preview { position: sticky; top: 24px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .textarea-field > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(244,241,232,.4); font-size: 13px; }
.field input:focus, .textarea-field textarea:focus { border-color: rgba(29,90,67,.38); outline: 0; box-shadow: 0 0 0 3px rgba(29,90,67,.08); }
.drop-zone { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; min-height: 156px; margin: 20px 0; padding: 24px; border: 1px dashed rgba(29,90,67,.3); border-radius: 18px; color: var(--muted); background: rgba(220,235,221,.23); font-size: 12px; text-align: center; cursor: pointer; transition: border 180ms ease, background 180ms ease, transform 180ms ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--green); background: rgba(220,235,221,.52); transform: translateY(-1px); }
.drop-zone input { display: none; }
.drop-zone strong { color: var(--ink); }
.drop-zone small { color: #929a95; font-size: 9px; }
.drop-icon { display: grid; width: 43px; height: 43px; margin-bottom: 5px; border-radius: 50%; color: var(--green); background: var(--card); box-shadow: var(--shadow-small); place-items: center; }
.drop-icon svg { width: 20px; height: 20px; }
.textarea-field textarea { width: 100%; min-height: 250px; padding: 16px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; outline: 0; color: var(--ink); background: rgba(244,241,232,.32); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.8; }
.format-hint { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding: 15px 17px; border-radius: 13px; color: var(--muted); background: var(--paper-deep); font-size: 10px; line-height: 1.6; }
.format-hint strong { color: var(--ink); }
.format-hint code { color: var(--green); font-size: 10px; }
.check-row { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--green); }
.check-row span { display: flex; flex-direction: column; gap: 3px; }
.check-row strong { font-size: 12px; }
.check-row small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.preview-count { display: grid; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 14px; color: var(--green); background: var(--green-soft); font-family: Georgia, serif; font-size: 22px; place-items: center; }
.preview-status { min-height: 56px; margin: 25px 0 12px; padding: 15px; border-radius: 12px; color: var(--muted); background: rgba(244,241,232,.65); font-size: 10px; line-height: 1.65; }
.preview-list { display: grid; max-height: 330px; overflow-y: auto; border-top: 1px solid var(--line); }
.preview-item { display: grid; padding: 12px 2px; border-bottom: 1px solid var(--line); grid-template-columns: minmax(80px,.65fr) minmax(0,1.35fr); gap: 10px; align-items: baseline; }
.preview-item strong { overflow: hidden; font-family: Georgia, serif; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.preview-item span { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.preview-warnings { margin: 12px 0; color: #a76035; font-size: 9px; line-height: 1.6; }
.import-preview .button { margin-top: 18px; }
.practice-screen { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: radial-gradient(circle at 15% 15%,rgba(217,241,111,.14),transparent 29rem), var(--paper); }
.practice-shell { width: min(900px,calc(100% - 40px)); margin: 0 auto; padding: 24px 0 50px; }
.practice-header { display: grid; align-items: center; grid-template-columns: 44px 1fr auto; gap: 15px; }
.practice-title { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.practice-title small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.practice-title strong { font-size: 13px; }
.practice-counter { min-width: 54px; color: var(--muted); font-family: Georgia, serif; font-size: 14px; text-align: right; }
.progress-track { height: 5px; margin: 16px 0 34px; overflow: hidden; border-radius: 999px; background: rgba(24,37,30,.08); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 260ms ease; }
.quiz-stage, .finish-stage { max-width: 760px; margin: 0 auto; animation: viewIn 320ms ease both; }
.question-heading { text-align: center; }
.question-heading > p { margin: 0 0 22px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.word-line { display: flex; gap: 12px; align-items: center; justify-content: center; }
.word-line h2 { margin: 0; overflow-wrap: anywhere; font-family: Georgia,"Times New Roman",serif; font-size: clamp(45px,9vw,82px); font-weight: 500; line-height: 1.08; letter-spacing: -.04em; }
.sound-button { display: grid; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: var(--card); cursor: pointer; place-items: center; }
.sound-button svg { width: 18px; height: 18px; }
.phonetic { display: block; min-height: 20px; margin-top: 6px; color: var(--muted); font-family: Georgia, serif; font-size: 14px; }
.options-grid { display: grid; gap: 12px; margin: 42px auto 0; grid-template-columns: 1fr 1fr; }
.option-button { display: grid; min-height: 82px; padding: 16px 19px; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 6px 20px rgba(35,48,40,.05); cursor: pointer; grid-template-columns: 31px 1fr; gap: 10px; align-items: center; transition: transform 160ms ease, border 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.option-button:hover:not(:disabled) { border-color: rgba(29,90,67,.35); box-shadow: 0 12px 28px rgba(35,48,40,.09); transform: translateY(-2px); }
.option-letter { display: grid; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-family: Georgia, serif; font-size: 12px; place-items: center; }
.option-text { font-size: 14px; font-weight: 600; line-height: 1.5; }
.option-button.is-correct { border-color: #4f8d61; background: #e3f0e1; }
.option-button.is-correct .option-letter { color: white; border-color: var(--green); background: var(--green); }
.option-button.is-wrong { border-color: var(--coral); background: var(--coral-soft); }
.option-button.is-wrong .option-letter { color: white; border-color: var(--coral); background: var(--coral); }
.option-button.is-muted { opacity: .5; }

.feedback-card { display: grid; margin-top: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); grid-template-columns: 38px minmax(0,1fr) auto; gap: 13px; align-items: center; animation: feedbackIn 240ms ease both; }
@keyframes feedbackIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.feedback-icon { display: grid; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; font-weight: 800; place-items: center; }
.feedback-card.is-correct .feedback-icon { color: var(--green); background: var(--green-soft); }
.feedback-card.is-wrong .feedback-icon { color: var(--coral); background: var(--coral-soft); }
.feedback-copy { display: flex; flex-direction: column; gap: 3px; }
.feedback-copy strong { font-size: 12px; }
.feedback-copy p { margin: 0; color: #435149; font-size: 12px; line-height: 1.5; }
.feedback-copy span { color: var(--muted); font-size: 9px; }
.feedback-card .button { min-height: 39px; padding: 0 15px; font-size: 11px; }
.quiz-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.quiz-footer > span { color: #969e99; font-size: 9px; }
.quiz-footer .text-button { font-size: 10px; }
.finish-stage { padding-top: 50px; text-align: center; }
.finish-badge { display: inline-flex; padding: 7px 12px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.finish-stage h2 { margin: 24px 0 10px; font-family: "Songti SC","STSong",Georgia,serif; font-size: clamp(38px,6vw,60px); line-height: 1.12; }
.finish-stage > p { margin: 0 auto; color: var(--muted); font-size: 13px; }
.finish-stats { display: grid; max-width: 520px; margin: 38px auto; padding: 25px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); grid-template-columns: repeat(3,1fr); }
.finish-stats div { display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.finish-stats div:first-child { border-left: 0; }
.finish-stats strong { font-family: Georgia, serif; font-size: 36px; font-weight: 500; }
.finish-stats span { color: var(--muted); font-size: 9px; }
.finish-actions { display: flex; gap: 10px; justify-content: center; }
.auth-gate { position: fixed; inset: 0; z-index: 300; display: grid; padding: 24px; background: rgba(20,61,46,.83); backdrop-filter: blur(18px); place-items: center; }
.auth-card { width: min(410px,100%); padding: 42px; border-radius: 28px; background: var(--card); box-shadow: 0 30px 80px rgba(0,0,0,.25); text-align: center; }
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 25px; border-radius: 17px; }
.auth-card h2 { margin: 0 0 9px; font-family: "Songti SC","STSong",Georgia,serif; font-size: 31px; }
.auth-card > p:not(.eyebrow) { margin: 0 0 26px; color: var(--muted); font-size: 12px; }
.auth-card .field { text-align: left; }
.auth-card .button { margin-top: 17px; }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--coral); font-size: 10px; }
.loading-overlay { position: fixed; inset: 0; z-index: 250; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: rgba(244,241,232,.77); backdrop-filter: blur(8px); }
.loading-overlay p { color: var(--muted); font-size: 11px; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(29,90,67,.15); border-top-color: var(--green); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 400; max-width: min(390px,calc(100% - 48px)); padding: 14px 18px; border-radius: 13px; color: var(--card); background: var(--green-dark); box-shadow: 0 18px 40px rgba(20,61,46,.25); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 200ms ease, transform 200ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #883e32; }
.site-footer { display: flex; justify-content: space-between; width: min(1200px,calc(100% - 48px)); margin: 0 auto; padding: 22px 0 30px; border-top: 1px solid var(--line); color: #858e88; font-size: 9px; letter-spacing: .04em; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .today-heading, .page-heading { gap: 20px; grid-template-columns: 1fr; }
  .today-heading h1, .page-heading h1 { max-width: 660px; }
  .unit-hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 72%; padding: 44px 38px; }
  .hero-art { position: absolute; inset: 0 0 0 55%; opacity: .55; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .content-split, .review-layout, .import-layout { grid-template-columns: 1fr; }
  .review-side { display: grid; grid-template-columns: 1fr 1fr; }
  .import-preview { position: static; }
  .quote-card { min-height: 240px; }
}
@media (max-width: 680px) {
  .site-header { display: grid; width: calc(100% - 28px); margin-top: 14px; padding: 10px; grid-template-columns: 1fr auto; gap: 10px; }
  .main-nav { width: 100%; padding: 3px; grid-column: 1 / -1; grid-row: 2; }
  .nav-link { flex: 1; min-width: 0; padding: 9px 7px; font-size: 12px; }
  .header-logout { width: 38px; height: 38px; }
  .brand-mark { width: 38px; height: 38px; }
  .page-shell { width: calc(100% - 28px); }
  .view { padding: 45px 0 55px; }
  .today-heading, .page-heading { margin-bottom: 28px; }
  .today-heading h1, .page-heading h1 { font-size: clamp(37px,12vw,54px); }
  .today-intro, .page-heading > p { font-size: 13px; }
  .unit-hero { min-height: 410px; border-radius: 26px; }
  .hero-copy { max-width: none; padding: 34px 25px; }
  .hero-copy h2 { max-width: 85%; font-size: 33px; }
  .hero-copy > p { max-width: 83%; font-size: 12px; }
  .hero-actions { align-items: stretch; width: 100%; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .hero-art { left: 43%; opacity: .33; }
  .section-heading { margin-top: 42px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading .text-button { display: none; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 94px; padding: 14px; gap: 11px; border-radius: 17px; }
  .stat-icon { flex-basis: 35px; width: 35px; height: 35px; border-radius: 10px; }
  .stat-copy strong { font-size: 25px; }
  .stat-copy small { font-size: 9px; }
  .content-split { gap: 12px; margin-top: 12px; }
  .recent-panel, .review-callout { padding: 24px; border-radius: 22px; }
  .unit-row { grid-template-columns: 57px minmax(0,1fr) auto; gap: 11px; }
  .review-layout { gap: 12px; }
  .review-config { padding: 25px 20px; border-radius: 22px; }
  .review-side { grid-template-columns: 1fr; }
  .count-output { font-size: 47px; }
  .pool-grid { gap: 6px; margin-top: 26px; }
  .pool-card { padding: 12px 10px; }
  .pool-card span { font-size: 9px; }
  .pool-card strong { font-size: 22px; }
  .library-panel { padding: 18px 14px; border-radius: 21px; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .filter-tabs { overflow-x: auto; }
  .filter-tabs button { flex: 1; }
  .library-summary span:last-child { display: none; }
  .table-head { display: none; }
  .word-row { padding: 17px 2px; grid-template-columns: 1fr auto; gap: 12px; }
  .word-definition { grid-column: 1 / -1; grid-row: 2; padding-right: 4px; }
  .status-switch { grid-column: 2; grid-row: 1; }
  .word-score { display: none; }
  .import-editor, .import-preview { padding: 22px 18px; border-radius: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .practice-shell { width: calc(100% - 28px); padding-top: 14px; }
  .practice-header { grid-template-columns: 40px 1fr auto; gap: 8px; }
  .practice-title strong { font-size: 11px; }
  .progress-track { margin-bottom: 25px; }
  .word-line h2 { font-size: clamp(40px,13vw,66px); }
  .options-grid { margin-top: 31px; grid-template-columns: 1fr; gap: 9px; }
  .option-button { min-height: 65px; padding: 12px 14px; }
  .option-text { font-size: 13px; }
  .feedback-card { grid-template-columns: 34px 1fr; padding: 14px; }
  .feedback-icon { width: 34px; height: 34px; }
  .feedback-card .button { grid-column: 1 / -1; width: 100%; }
  .quiz-footer > span { display: none; }
  .finish-stats { padding: 20px 10px; }
  .finish-stats strong { font-size: 30px; }
  .auth-card { padding: 32px 24px; }
  .site-footer { flex-direction: column; gap: 7px; padding-bottom: 24px; }
  .toast { right: 14px; bottom: 14px; max-width: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.dictionary-heading > p { max-width: 520px; }
.dictionary-layout { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0,1.45fr) minmax(280px,.55fr); }
.dictionary-main { padding: 30px; }
.dictionary-source-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; color: var(--muted); font-size: 10px; }
.dictionary-source-badge { display: inline-flex; gap: 7px; align-items: center; color: var(--green); font-weight: 800; letter-spacing: .04em; }
.dictionary-source-badge i { width: 7px; height: 7px; border-radius: 50%; background: #5da06c; box-shadow: 0 0 0 4px rgba(93,160,108,.13); }
.dictionary-search { display: flex; gap: 10px; }
.dictionary-search-box { max-width: none; flex: 1; height: 50px; background: rgba(244,241,232,.7); }
.dictionary-search .button { min-width: 88px; }
.dictionary-suggestions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 13px; color: var(--muted); font-size: 9px; }
.dictionary-suggestions button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); background: rgba(255,255,255,.4); font-size: 9px; cursor: pointer; transition: background 150ms ease, transform 150ms ease; }
.dictionary-suggestions button:hover { background: var(--green-soft); transform: translateY(-1px); }
.dictionary-result-meta { min-height: 18px; margin: 25px 0 8px; color: var(--muted); font-size: 10px; }
.dictionary-results { border-top: 1px solid var(--line); }
.dictionary-entry { display: grid; padding: 25px 2px; border-bottom: 1px solid var(--line); grid-template-columns: minmax(0,1fr) auto; gap: 18px; }
.dictionary-word-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.dictionary-word-head h3 { margin: 0; font-family: Georgia,serif; font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.dictionary-word-head span { color: var(--muted); font-family: Georgia,serif; font-size: 12px; }
.dictionary-tags { display: flex; flex-wrap: wrap; gap: 5px; grid-column: 2; grid-row: 1; align-content: start; justify-content: flex-end; }
.dictionary-tag { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper-deep); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.dictionary-tag.is-ky { color: var(--green-dark); background: var(--lime); }
.dictionary-translation { margin: 12px 0 0; color: #35443b; font-size: 13px; line-height: 1.85; white-space: pre-line; }
.dictionary-entry-meta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 12px; color: #909892; font-size: 9px; }
.dictionary-forms { overflow-wrap: anywhere; }
.dictionary-aside { display: flex; flex-direction: column; gap: 16px; }
.dictionary-note-card { padding: 32px; border-radius: var(--radius); color: var(--card); background: linear-gradient(155deg,var(--green),var(--green-dark)); box-shadow: var(--shadow); }
.dictionary-note-icon { display: grid; width: 50px; height: 50px; margin-bottom: 28px; border: 1px solid rgba(217,241,111,.3); border-radius: 15px; color: var(--lime); font-family: Georgia,serif; font-size: 20px; place-items: center; }
.dictionary-note-card .eyebrow { color: var(--lime); }
.dictionary-note-card h2 { margin: 0 0 14px; font-family: "Songti SC","STSong",Georgia,serif; font-size: 28px; line-height: 1.35; }
.dictionary-note-card > p:not(.eyebrow) { margin: 0 0 22px; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.8; }
.dictionary-note-card .button { color: var(--green-dark); background: var(--lime); }
.dictionary-attribution { padding: 23px; border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: rgba(255,253,247,.8); }
.dictionary-attribution strong { font-size: 11px; }
.dictionary-attribution p { margin: 5px 0 10px; color: var(--muted); font-size: 9px; }
.dictionary-attribution a { color: var(--green); font-size: 9px; font-weight: 700; text-decoration: none; }
.preview-source { display: inline-flex; margin-left: 5px; padding: 2px 5px; border-radius: 5px; color: var(--green); background: var(--green-soft); font-family: var(--font); font-size: 7px; vertical-align: middle; }
.preview-loading { padding: 28px 8px; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 900px) {
  .dictionary-layout { grid-template-columns: 1fr; }
  .dictionary-aside { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-link { font-size: 11px; }
  .dictionary-main { padding: 22px 16px; border-radius: 21px; }
  .dictionary-source-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .dictionary-search { flex-direction: column; }
  .dictionary-search .button { width: 100%; }
  .dictionary-entry { grid-template-columns: 1fr; gap: 10px; padding: 20px 2px; }
  .dictionary-tags { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .dictionary-word-head h3 { font-size: 25px; }
  .dictionary-aside { grid-template-columns: 1fr; }
}

.form-grid.single-field { grid-template-columns: 1fr; }
.unit-panel-count { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-family: Georgia,serif; font-size: 12px; }
.units-panel .unit-row { min-height: 76px; }
@media (max-width: 680px) {
  .form-grid.single-field { grid-template-columns: 1fr; }
  .units-panel .unit-row { grid-template-columns: 58px minmax(0,1fr) auto; }
  .unit-panel-count { font-size: 10px; }
}
