/* Reading comfort: calm surfaces, open spacing and consistent sans-serif type. */
:root {
  --paper: #f4f6f1;
  --card: #fffefa;
  --ink: #34463c;
  --muted: #6b786e;
  --line: #e3e9df;
  --green: #426b58;
  --green2: #4d785f;
  --mint: #eaf0e5;
  --orange: #b98b62;
  --amber: #ead0a6;
  --radius: 24px;
  --shadow: 0 8px 28px rgba(50, 72, 55, .035);
  --ui-font: 'Nunito Sans Variable', 'Noto Sans SC Variable', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
html { scroll-padding-bottom: 110px; }
body {
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 420;
  line-height: 1.8;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-synthesis: none;
  background: radial-gradient(ellipse at 85% 0, #edf2e7 0, transparent 55%), var(--paper);
}
button, input, select, textarea { font-family: var(--ui-font); }
button { touch-action: manipulation; transition: background-color .18s, border-color .18s, box-shadow .18s, transform .18s; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #92b49a66; outline-offset: 3px;
}
::selection { background: #dce9d5; color: #304d3b; }
.sidebar { background: #eff3e9; border-color: #e1e7da; padding-top: 32px; }
.brand { gap: 13px; padding-bottom: 36px; }
.brand-mark { font: 550 22px/1 var(--ui-font); border-radius: 15px; box-shadow: none; background: #547b61; }
.brand-name { font-size: 17px; font-weight: 620; letter-spacing: .035em; }
.brand-sub { font-size: 10px; letter-spacing: .14em; margin-top: 4px; }
.nav-label { font-size: 11px; letter-spacing: .12em; color: #7b897a; }
.nav { gap: 7px; }
.nav button { font-size: 14px; font-weight: 480; padding: 13px 14px; border-radius: 15px; color: #697769; }
.nav button.active { font-weight: 620; background: #e0e9d9; color: #45654b; }
.nav button:hover { background: #e6eddf; }
.nav-icon { width: 21px; height: 23px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; }
.nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-short { display: none; }
.side-note { background: #e7eddf; border-color: #dfe7d7; padding: 17px; border-radius: 20px; }
.side-note small { font-size: 12px; line-height: 1.9; }
.side-note strong { font-size: 14px; font-weight: 580; margin: 6px 0; }
.local-state { font-size: 12px; line-height: 1.7; }
.dot { background: #83a47e; box-shadow: 0 0 0 3px #e0ead9; }
.main { padding-top: 30px; padding-bottom: 58px; }
.topbar { margin-bottom: 38px; }
.crumb { font-size: 13px; }
.top-actions { gap: 9px; }
.icon-btn, .quiet-btn { height: 42px; border-radius: 14px; background: #fffefb; color: #60705f; font-size: 13px; }
.icon-btn { width: 42px; }
.quiet-btn:hover, .icon-btn:hover { background: #f8faf4; border-color: #becfba; }
.page-head { margin-bottom: 28px; align-items: center; }
.eyebrow { font-size: 11px; letter-spacing: .15em; font-weight: 650; color: #a37f5e; }
.page h1 { font-family: var(--ui-font); font-size: clamp(29px, 3vw, 38px); font-weight: 580; letter-spacing: -.025em; line-height: 1.5; margin: 9px 0 8px; }
.page-head p { font-size: 14px; line-height: 1.9; }
.today-date { font-size: 12px; color: #788373; }
.hero { background: linear-gradient(120deg, #4b725c, #3e6653); border-radius: 30px; padding: 32px 35px; grid-template-columns: minmax(0, 1fr) 155px; gap: 24px; color: #fbfcf6; box-shadow: 0 14px 30px #34533f0b; }
.hero h2 { font-family: var(--ui-font); font-size: clamp(27px, 2.6vw, 34px); font-weight: 520; letter-spacing: -.02em; line-height: 1.55; margin: 13px 0 15px; }
.hero p { font-size: 14px; line-height: 1.9; color: #dfe8db; max-width: 440px; margin-bottom: 24px; }
.hero .eyebrow { color: #d9e5d1; }
.hero:before, .hero:after { border-color: #ffffff0c; }
.primary-btn { background: #ead0a6; font-size: 14px; font-weight: 650; padding: 13px 20px; min-height: 47px; border-radius: 15px; color: #344e3e; box-shadow: 0 4px 10px #243f3312; }
.primary-btn:hover { background: #f0dabb; transform: translateY(-1px); }
.ring { width: 124px; height: 124px; background: conic-gradient(#e7c89a var(--progress, 0%), #ffffff16 0); }
.ring:before { inset: 8px; background: #426b56; }
.ring-content strong { font-family: var(--ui-font); font-size: 29px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
.ring-content span { font-size: 11px; letter-spacing: .025em; color: #e2eadb; }
.ring-caption { font-size: 12px; line-height: 1.8; color: #e1ead9; }
.stats { gap: 14px; margin: 19px 0 28px; }
.stat-card, .panel, .word-panel, .reading-card, .plan-card { border-color: #e5eadd; background: #fffefa; box-shadow: var(--shadow); }
.stat-card { min-height: 111px; padding: 19px 20px; }
.stat-top { font-size: 13px; }
.stat-ico { border-radius: 11px; width: 29px; height: 29px; background: #f0f4ea; color: #72916c; }
.stat-value, .streak-number, .metric strong, .timer-face { font-family: var(--ui-font); font-weight: 570; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.stat-value { font-size: 29px; line-height: 1.4; margin-top: 7px; }
.stat-value span, .streak-number small { font-family: var(--ui-font); font-size: 12px; font-weight: 430; }
.panel { padding: 24px; }
.panel-head { gap: 12px; margin-bottom: 20px; }
.panel-head h3 { font-size: 17px; font-weight: 600; }
.panel-head p { font-size: 12px; line-height: 1.8; margin-top: 5px; }
.text-link { font-size: 13px; font-weight: 600; padding: 7px 3px; }
.task-list { gap: 11px; }
.task { padding: 14px 13px; gap: 12px; border-radius: 18px; border-color: #edf0e8; }
.task:hover { background: #f9fbf5; border-color: #d7e2ce; }
.task-icon { background: #edf2e6; border-radius: 14px; width: 40px; height: 40px; color: #70926a; }
.task:nth-child(2) .task-icon { background: #f5eddf; color: #b39366; }
.task:nth-child(3) .task-icon { background: #ecf1ec; }
.task strong { font-size: 14px; font-weight: 600; }
.task small { font-size: 12px; line-height: 1.7; margin-top: 3px; }
.task-cta { font-size: 12px; font-weight: 550; padding: 9px 12px; min-height: 40px; border-radius: 12px; color: #607c56; }
.streak-card { background: #f2eddf; border-color: #e9e1d1; padding: 23px; }
.streak-top span { font-size: 13px; color: #86765e; }
.streak-number { font-size: 35px; margin-top: 6px; color: #615743; }
.week-day { font-size: 11px; }
.week-dot { width: 24px; height: 24px; border-color: #d9cfb7; background: #fbf8ef; }
.quote-card { background: #edf2e7; border-color: #e0e8d9; padding: 22px; }
.quote-card blockquote { font-family: var(--ui-font); font-size: 17px; font-weight: 450; line-height: 1.65; color: #4d6550; }
.quote-card small { font-size: 12px; line-height: 1.8; }
.quote-mark { color: #abc0a0; }
.motivation-card { display: flex; flex-direction: column; min-width: 0; min-height: 245px; }
.quote-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.quote-toolbar .quote-mark { padding-top: 6px; }
.quote-refresh { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 6px 10px; border: 1px solid #d9e3d1; border-radius: 12px; background: #f8faf3; color: #637b59; font-size: 12px; font-weight: 550; cursor: pointer; }
.quote-refresh:hover { background: #e2ebda; }
.quote-refresh:focus-visible, .quote-source:focus-visible { outline: 2px solid #668761; outline-offset: 3px; }
.quote-refresh svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.motivation-card blockquote { margin: 0 0 11px; overflow-wrap: anywhere; }
.quote-translation { margin: 0 0 17px; font-size: 14px; line-height: 1.85; color: #75816c; }
.quote-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid #dfe7d7; }
.quote-footer small { color: #7b8873; }
.quote-source { flex-shrink: 0; min-height: 32px; display: inline-flex; align-items: center; padding: 4px 2px; color: #7b8873; font-size: 11px; text-decoration: none; }
.quote-source:hover { color: #4d6550; text-decoration: underline; }
.current-book-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 18px; padding: 17px 21px; border: 1px solid #e0e8d9; border-radius: 20px; background: #fafcf5; }
.current-book-bar > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; min-width: 0; }
.current-book-bar small { color: #8b9983; font-size: 12px; }
.current-book-bar strong { font-size: 16px; color: #526c49; font-weight: 600; }
.current-book-bar span { color: #839078; font-size: 12px; line-height: 1.8; }
.current-book-bar .book-open { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 42px; font-size: 13px; padding: 9px 13px; background: #edf3e6; border-color: #dce6d1; }
.book-shelf { margin: 0 0 24px; padding: 22px; border: 1px solid var(--line); border-radius: 23px; background: #fbfcf7; }
.book-shelf-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; }
.book-shelf-summary::-webkit-details-marker { display: none; }
.book-shelf-summary strong { display: block; font-size: 17px; font-weight: 600; }
.book-shelf-summary small { display: block; font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 4px; }
.book-shelf-summary > span:last-child { color: #79916d; font-size: 13px; flex-shrink: 0; }
.book-shelf[open] .book-shelf-summary { margin-bottom: 20px; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.book-choice { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 165px; padding: 18px; border: 1px solid #e2e8db; border-radius: 19px; background: #fffef9; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.book-choice:hover { border-color: #b8cba9; background: #f6f9ef; }
.book-choice.selected { background: #eaf2e0; border-color: #a7bd95; box-shadow: inset 0 0 0 1px #a7bd9550; }
.book-choice-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; width: 100%; }
.book-code { color: #8b9b7c; font-size: 10px; letter-spacing: .07em; }
.book-selected { color: #89967f; font-size: 11px; }
.book-choice.selected .book-selected { color: #5a7c48; font-weight: 650; }
.book-choice strong { font-size: 18px; font-weight: 600; }
.book-description { color: #849079; font-size: 12px; line-height: 1.75; }
.book-count { margin-top: auto; color: #647e54; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.book-shelf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.book-shelf-bottom p { margin: 0; font-size: 11px; color: #929d8b; line-height: 1.9; }
.book-shelf-bottom a { color: #7d9070; text-underline-offset: 3px; }
.personal-book { padding: 8px 11px; border: 1px solid transparent; border-radius: 11px; }
.personal-book.selected { border-color: #d2dfc6; background: #eef4e7; }
.book-status { font-size: 12px; line-height: 1.85; color: #8b9782; margin: 11px 0 0; }
.word-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 5px; }
.word-pagination span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.word-pagination button:disabled, .extra-review:disabled { opacity: .4; cursor: default; }
.word-pagination[hidden], #retryBook[hidden] { display: none; }
.extra-review { display: block; margin: 16px auto 0; }
.book-choice:focus-visible, .book-shelf-summary:focus-visible { outline: 2px solid #6e8d5d; outline-offset: 3px; }
.word-cn { overflow-wrap: anywhere; }
@media (min-width: 1400px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .current-book-bar { padding: 15px; border-radius: 18px; align-items: flex-start; }
  .current-book-bar > div { gap: 3px 8px; }
  .current-book-bar span { flex-basis: 100%; font-size: 11px; }
  .current-book-bar .book-open { font-size: 12px; padding: 8px 10px; }
  .book-shelf { padding: 17px; border-radius: 20px; }
  .book-grid { gap: 9px; }
  .book-choice { min-height: 182px; padding: 13px; gap: 9px; border-radius: 15px; }
  .book-choice strong { font-size: 16px; }
  .book-description { font-size: 11px; }
  .book-code { font-size: 9px; }
  .book-selected { font-size: 10px; }
}
.toolbar { gap: 10px; }
.search, .select { font-size: 15px; padding: 12px 14px; border-radius: 14px; min-height: 47px; border-color: var(--line); }
.search { min-width: 210px; }
.word-row { padding: 18px 22px; gap: 15px; border-color: #eef1e9; }
.word-en { font-family: var(--ui-font); font-size: 23px; font-weight: 560; letter-spacing: -.015em; }
.word-ipa { font-family: var(--ui-font); font-size: 13px; color: #7d887c; }
.word-cn { font-size: 14px; }
.word-state, .word-example { font-family: var(--ui-font); font-size: 12px; line-height: 1.8; }
.word-actions { gap: 8px; }
.mini-btn, .add-word, .audio-btn, .mode-btn { border-radius: 12px; font-size: 13px; font-weight: 520; min-height: 40px; padding: 9px 12px; }
.add-word { font-size: 14px; padding: 12px 16px; }
.reading-card { padding: 32px; }
.reading-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.reading-card h2 { font: 580 30px/1.45 var(--ui-font); letter-spacing: -.02em; margin: 13px 0 10px; }
.reading-meta { font-size: 13px; line-height: 1.8; padding-bottom: 20px; margin-bottom: 24px; }
.passage { font-family: var(--ui-font); font-size: 18px; font-weight: 430; line-height: 1.95; color: #435448; letter-spacing: .005em; }
.passage p { margin-bottom: 22px; }
.passage mark { background: #f3e9ce; color: #655635; border-radius: 5px; padding: 1px 3px; }
.reading-tip { font-size: 12px; line-height: 1.85; }
.quiz-panel { background: #f3f5ed; border-radius: 21px; padding: 22px; margin-top: 26px; }
.quiz-panel h3 { font-size: 16px; font-weight: 600; }
.q-title { font-size: 15px; font-weight: 570; line-height: 1.9; }
.answer { font-size: 14px; line-height: 1.85; padding: 11px 13px; border-radius: 13px; border-color: #e1e8d9; }
.explanation { font-size: 13px; line-height: 1.9; margin-top: 12px; }
.question { padding: 18px 0; border-color: #e1e7d9; }
.reading-side .panel { padding: 22px; }
.reading-side h3 { font-size: 16px; font-weight: 600; }
.strategy p { font-size: 13px; line-height: 1.9; }
.strategy-number { width: 28px; height: 28px; font-size: 12px; font-weight: 600; border-radius: 10px; background: #edf2e6; }
.review-progress, .study-mode-hint { font-size: 13px; line-height: 1.8; }
.study-modebar { row-gap: 14px; margin-bottom: 12px; }
.study-mode-buttons { gap: 9px; }
.mode-btn { border-color: #e0e7d8; }
.mode-btn.active { background: #e7efdf; border-color: #c8d8bc; font-weight: 620; }
.voice-setting, .voice-setting select { font-size: 13px; }
.voice-setting select { border-radius: 11px; padding: 8px 10px; }
.progress-bar { background: #e6ecdf; height: 6px; }
.flashcard { border-radius: 30px; min-height: 370px; padding: 35px 28px; }
.flashcard:before { border-color: #edf1e7; border-radius: 23px; }
.flash-label { font-size: 12px; font-weight: 550; letter-spacing: .1em; }
.flash-word { font-family: var(--ui-font); font-size: clamp(43px, 6vw, 64px); font-weight: 580; line-height: 1.3; letter-spacing: -.025em; margin-top: 18px; overflow-wrap: anywhere; }
.flash-ipa { font-family: var(--ui-font); font-size: 17px; font-weight: 400; }
.flash-meaning { font-family: var(--ui-font); font-size: 23px; font-weight: 520; line-height: 1.7; }
.flash-example { font-family: var(--ui-font); font-size: 16px; font-weight: 420; line-height: 1.9; font-style: normal; max-width: 520px; }
.flip-btn { font-size: 13px; line-height: 1.9; text-underline-offset: 4px; padding: 10px; }
.audio-btn { margin-top: 14px; color: #5f8056; border-color: #dde7d4; background: #f1f5eb; }
.audio-status, .listen-feedback { font-size: 12px; }
.family-hint { background: #f1f5eb; border-color: #e1e9d8; padding: 17px; border-radius: 20px; gap: 12px; }
.family-hint-title { font-size: 12px; }
.family-item { padding: 10px 12px; border-radius: 14px; }
.family-word-btn { font: 550 20px/1.6 var(--ui-font); }
.family-item small { font-size: 11px; line-height: 1.7; }
.family-item.current { outline-color: #c1d3b8; background: #e6efdd; }
.rate-btn { font-size: 14px; font-weight: 580; padding: 15px 10px; border-radius: 16px; min-height: 72px; }
.rate-btn span { font-size: 12px; line-height: 1.7; margin-top: 5px; }
.review-done h2 { font: 560 30px/1.6 var(--ui-font); }
.listen-panel { background: #f2f5ed; border-color: #e1e8d9; padding: 17px; border-radius: 19px; }
.listen-panel p { font-size: 13px; line-height: 1.85; }
.listen-controls input { font-size: 16px; border-radius: 13px; padding: 12px; }
.listen-controls .primary-btn, .listen-controls .mini-btn { font-size: 13px; }
.mistake-card strong { font-family: var(--ui-font); font-size: 21px; font-weight: 560; }
.mistake-card p { font-size: 13px; line-height: 1.8; }
.mistake-count { font-size: 12px; background: #f7eee3; color: #9b7855; border-radius: 11px; }
.chart-label, .chart-value { font-size: 12px; }
.chart-bar { background: #b4c9a7; }
.metric { padding: 17px; background: #f1f5eb; border-radius: 18px; }
.metric small { font-size: 12px; line-height: 1.8; }
.metric strong { font-size: 28px; line-height: 1.5; }
.goal-row { padding: 17px 0; gap: 12px; }
.goal-row strong { font-size: 15px; font-weight: 570; }
.goal-row small { font-size: 12px; line-height: 1.9; }
.stepper { gap: 10px; flex-shrink: 0; }
.stepper button { width: 34px; height: 34px; border-radius: 11px; font-weight: 550; }
.stepper span { font-size: 14px; font-weight: 600; min-width: 46px; }
.check-row { font-size: 14px; line-height: 1.9; }
.check-row input { width: 17px; height: 17px; }
.timer-face { font-size: 57px; font-weight: 520; }
.timer-actions button, .danger-btn { border-radius: 13px; padding: 11px 14px; font-size: 13px; min-height: 43px; }
.success-note { font-size: 13px; line-height: 1.9; }
.modal-backdrop { background: #33463866; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); padding: 22px; }
.modal { background: #fffefa; border: 1px solid #e5eadf; border-radius: 28px; padding: 30px; width: min(100%, 460px); max-height: calc(100dvh - 44px); overflow-y: auto; box-shadow: 0 24px 85px #263d3826; }
.modal h2 { font-family: var(--ui-font); font-size: 23px; font-weight: 580; letter-spacing: -.02em; line-height: 1.65; }
.modal-close { font-weight: 400; border-radius: 50%; width: 34px; height: 34px; flex-shrink: 0; background: #f0f3eb; color: #7a8877; }
.form-grid { margin-top: 23px; gap: 17px; }
.field label { font-size: 13px; line-height: 1.9; margin-bottom: 7px; }
.field input { font-size: 16px; padding: 12px 14px; border-radius: 14px; line-height: 1.6; color: var(--ink); border-color: #dfe7d7; }
.field input::placeholder { color: #929b8c; font-size: 14px; }
.modal .primary-btn { background: var(--green); color: #fffefa; margin-top: 8px; box-shadow: none; }
.modal .primary-btn:hover { background: #3e614d; }
.account-panel { max-width: 490px; }
.recovery-code { font-family: ui-monospace, monospace; font-size: 15px; line-height: 1.9; background: #f1f5eb; border-color: #bdccb3; }
.modal p[style*='font-size:10px'], .modal p[style*='font-size:11px'], .page p[style*='font-size:10px'] { font-size: 12px !important; line-height: 1.9; }
@media (max-width: 1040px) {
  .main { padding-left: 25px; padding-right: 25px; }
  .hero { grid-template-columns: minmax(0, 1fr) 130px; padding: 29px; }
  .hero h2 { font-size: 29px; }
  .content-grid, .reading-layout, .progress-grid, .plan-grid { gap: 20px; }
}
@media (min-width: 701px) and (max-width: 1040px) {
  .word-row { grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto; row-gap: 5px; }
  .word-state { grid-column: 1 / 3; }
  .word-actions { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 700px) {
  .main { padding: 22px 17px calc(103px + env(safe-area-inset-bottom)); }
  .sidebar { padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); background: #fbfcf6ef; border-color: #e0e7d7; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .nav { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .nav button { padding: 7px 2px; gap: 5px; font-size: 11px; line-height: 1.3; border-radius: 13px; min-height: 53px; }
  .nav-icon { font-size: 21px; height: 23px; line-height: 23px; }
  .nav-full { display: none; }
  .nav-short { display: block; }
  .topbar { margin-bottom: 27px; gap: 10px; }
  .crumb { font-size: 12px; }
  .top-actions { gap: 7px; }
  .top-actions #accountButton { font-size: 12px; padding: 0 12px; max-width: 150px; }
  .page-head { display: block; margin-bottom: 22px; }
  .page-head .today-date { margin-top: 10px; font-size: 12px; }
  .page-head .add-word, .page-head > .quiet-btn { margin-top: 14px; }
  .page h1 { font-size: 29px; line-height: 1.5; letter-spacing: -.035em; }
  .page-head p { font-size: 13px; line-height: 1.9; }
  .eyebrow { font-size: 10px; }
  .hero { padding: 26px; border-radius: 26px; gap: 21px; }
  .hero h2 { font-size: 28px; }
  .hero p { font-size: 13px; line-height: 1.95; }
  .ring { width: 96px; height: 96px; }
  .ring:before { inset: 6px; }
  .ring-content strong { font-size: 24px; }
  .ring-content span { font-size: 10px; }
  .ring-caption { font-size: 11px; }
  .stats { gap: 11px; margin: 15px 0 23px; }
  .stat-card { border-radius: 21px; padding: 17px; min-height: 104px; }
  .stat-value { font-size: 28px; }
  .panel { padding: 20px; border-radius: 23px; }
  .panel-head h3 { font-size: 16px; }
  .task { padding: 13px 11px; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; }
  .task-icon { width: 33px; height: 36px; border-radius: 12px; }
  .task strong { font-size: 13px; }
  .task small { font-size: 11px; }
  .task-cta { font-size: 11px; padding: 9px; min-height: 38px; }
  .word-row { padding: 16px; }
  .word-ipa { display: block; margin: 3px 0 0; font-size: 13px; }
  .word-cn { font-size: 14px; }
  .word-actions { gap: 5px; }
  .word-actions .mini-btn { font-size: 12px; padding: 8px; }
  .reading-card { padding: 23px 20px; }
  .reading-card h2 { font-size: 27px; }
  .passage { font-size: 17px; line-height: 1.95; }
  .quiz-panel { padding: 17px; }
  .q-title { font-size: 15px; }
  .answer { font-size: 14px; }
  .flashcard { padding: 28px 19px; border-radius: 26px; min-height: 342px; }
  .flash-word { font-size: clamp(39px, 10vw, 55px); }
  .flash-meaning { font-size: 21px; }
  .flash-example { font-size: 16px; }
  .mode-btn { font-size: 12px; min-height: 42px; padding: 9px 7px; }
  .study-mode-buttons { gap: 6px; }
  .family-word-btn { font-size: 18px; }
  .family-item { min-width: 80px; padding: 9px; }
  .rate-btn { min-height: 74px; font-size: 14px; }
  .modal-backdrop { padding: 18px; }
  .modal { padding: 24px; border-radius: 25px; max-height: calc(100dvh - 36px); }
  .modal h2 { font-size: 22px; }
  .goal-row strong { font-size: 14px; }
  .goal-row small { font-size: 12px; max-width: 180px; }
  .stepper { gap: 7px; }
}
@media (max-width: 560px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 21px; padding: 25px; }
  .hero h2 { font-size: 27px; }
  .hero p { max-width: none; margin-bottom: 21px; }
  .hero-side { flex-direction: row; justify-content: flex-start; gap: 18px; border-top: 1px solid #ffffff19; padding-top: 20px; }
  .ring { width: 82px; height: 82px; flex-shrink: 0; }
  .ring-content strong { font-size: 20px; }
  .ring-content span { font-size: 9px; }
  .ring-caption { margin: 0; font-size: 13px; text-align: left; }
  .search, .select { font-size: 16px; }
  .top-actions .icon-btn { display: none; }
  .content-grid { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
