:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --surface: #fffdf8;
  --surface-2: #eae5da;
  --ink: #14251f;
  --muted: #69736e;
  --line: rgba(20, 37, 31, .13);
  --brand: #163f35;
  --brand-2: #205c4d;
  --lime: #d7f56d;
  --lime-soft: #effac8;
  --amber: #f4bc54;
  --red: #d86454;
  --red-soft: #fde7e1;
  --green-soft: #e0f3e8;
  --source-a: #2563a8;
  --source-a-soft: #e5f0ff;
  --source-b: #c55b18;
  --source-b-soft: #fff0df;
  --shadow: 0 18px 50px rgba(28, 43, 36, .10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --content: 1120px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1714;
  --surface: #12231e;
  --surface-2: #1c302a;
  --ink: #f2f4ed;
  --muted: #9eaaa4;
  --line: rgba(234, 244, 238, .12);
  --brand: #d7f56d;
  --brand-2: #a9cc43;
  --lime: #d7f56d;
  --lime-soft: #28391f;
  --amber: #efb957;
  --red: #eb7969;
  --red-soft: #3d2421;
  --green-soft: #19372c;
  --source-a: #79b8ff;
  --source-a-soft: #18324d;
  --source-b: #ffab6a;
  --source-b-soft: #472c1c;
  --shadow: 0 22px 60px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--lime) 75%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

.ambient { position: fixed; border-radius: 999px; filter: blur(4px); pointer-events: none; opacity: .55; z-index: -1; }
.ambient-one { width: 260px; height: 260px; top: -120px; right: -90px; background: rgba(215, 245, 109, .25); }
.ambient-two { width: 220px; height: 220px; bottom: 12%; left: -150px; background: rgba(50, 112, 91, .13); }
.app-shell { min-height: 100vh; padding-bottom: calc(88px + var(--safe-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px); border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: var(--bg); font-weight: 900; font-size: 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
html[data-theme="dark"] .brand-mark { color: #102018; }
.brand-mark.large { width: 54px; height: 54px; border-radius: 17px; font-size: 24px; flex: 0 0 auto; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.streak-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--surface) 72%, transparent); font-weight: 800; font-size: 12px; }
.streak-chip span { color: var(--amber); font-size: 10px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; font-size: 18px; }

.main-content { width: min(100%, var(--content)); margin: 0 auto; padding: 12px 16px 40px; }
.view { display: none; animation: view-in .3s ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }
.eyebrow { margin: 0 0 8px; color: var(--brand-2); font-size: 11px; line-height: 1.2; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.hero-card {
  position: relative; overflow: hidden; display: grid; gap: 26px; padding: 28px 24px;
  border-radius: var(--radius-xl); color: #f8fbf3; background: #102d26;
  box-shadow: var(--shadow);
}
.hero-card::before { content: ""; position: absolute; width: 210px; height: 210px; border: 45px solid rgba(215,245,109,.07); border-radius: 50%; right: -110px; top: -125px; }
.hero-card .eyebrow { color: var(--lime); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { max-width: 480px; margin: 0; font-size: clamp(29px, 8.5vw, 48px); line-height: 1.12; letter-spacing: -.04em; }
.hero-copy h1 span { color: var(--lime); }
.hero-note { max-width: 510px; margin: 14px 0 21px; color: rgba(248,251,243,.68); font-size: 14px; line-height: 1.75; }
.primary-button, .secondary-button, .danger-button {
  min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 20px; border-radius: 15px; font-weight: 900; border: 0; cursor: pointer; transition: transform .16s ease, filter .16s ease, background .16s ease;
}
.primary-button { background: var(--lime); color: #142319; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.danger-button { background: var(--red); color: white; }
.primary-button:active, .secondary-button:active, .mission-card:active, .topic-card:active { transform: scale(.985); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.hero-button { min-width: 190px; }
.progress-orbit {
  --progress: 0;
  position: relative; z-index: 1; width: 132px; height: 132px; place-self: center;
  display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0);
}
.progress-orbit::after { content: ""; position: absolute; inset: 8px; border-radius: inherit; background: #17372f; }
.orbit-inner { position: relative; z-index: 1; text-align: center; }
.orbit-inner strong, .orbit-inner span { display: block; }
.orbit-inner strong { font-size: 34px; line-height: 1; }
.orbit-inner span { margin-top: 7px; color: rgba(255,255,255,.58); font-size: 11px; }

.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 14px 0 28px; }
.stats-strip article { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 83%, transparent); }
.stats-strip strong, .stats-strip small { display: block; }
.stats-strip strong { font-size: 20px; line-height: 1; }
.stats-strip small { margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.stat-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 900; }
.stat-icon.green { background: var(--green-soft); color: var(--brand-2); }
.stat-icon.amber { background: color-mix(in srgb, var(--amber) 23%, transparent); color: #9a6611; }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.section-block { margin-top: 27px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-meta { color: var(--muted); font-size: 11px; }
.mission-list { display: grid; gap: 10px; }
.mission-card {
  width: 100%; min-height: 76px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 15px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); text-align: left; cursor: pointer; box-shadow: 0 7px 26px rgba(28,43,36,.04);
}
.mission-number { color: var(--brand-2); font-weight: 900; font-size: 12px; letter-spacing: .08em; }
.mission-copy strong, .mission-copy small { display: block; }
.mission-copy strong { font-size: 15px; }
.mission-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.mission-count { padding: 7px 9px; border-radius: 10px; background: var(--surface-2); font-size: 11px; font-weight: 800; white-space: nowrap; }
.quote-card { position: relative; overflow: hidden; margin-top: 28px; padding: 22px 24px 22px 62px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.quote-mark { position: absolute; left: 19px; top: 8px; color: var(--lime); -webkit-text-stroke: 1px var(--brand-2); font-family: Georgia, serif; font-size: 64px; line-height: 1; }
.quote-card p { margin: 0 0 8px; font-size: 14px; font-weight: 800; line-height: 1.6; }
.quote-card small { color: var(--muted); font-size: 11px; }
.continue-card { width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--lime-soft); text-align: left; cursor: pointer; }
.continue-card strong, .continue-card span { display: block; }
.continue-card strong { margin-bottom: 6px; font-size: 15px; }
.continue-card span { color: var(--muted); font-size: 11px; }

.page-heading { padding: 18px 2px 22px; }
.page-heading h1 { margin: 0; font-size: clamp(30px, 9vw, 48px); line-height: 1.12; letter-spacing: -.05em; }
.page-heading > p:last-child { max-width: 610px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.toolbar-card { display: grid; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.search-field { height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.search-field span { font-size: 22px; color: var(--muted); transform: rotate(-20deg); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--muted); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-2); }
.segmented button, .choice-row button, .review-tabs button { min-height: 39px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.segmented button.is-active, .choice-row button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.segmented button[data-source="A"].is-active { background: var(--source-a-soft); color: var(--source-a); }
.segmented button[data-source="B"].is-active { background: var(--source-b-soft); color: var(--source-b); }
.bank-summary { display: flex; justify-content: space-between; margin: 20px 2px 11px; color: var(--muted); font-size: 11px; }
.topic-list { display: grid; gap: 11px; }
.topic-card { width: 100%; display: grid; grid-template-columns: 46px 1fr 25px; gap: 13px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); text-align: left; cursor: pointer; }
.topic-index { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--lime-soft); color: var(--brand-2); font-size: 13px; font-weight: 900; }
.topic-index.source-a { background: var(--source-a-soft); color: var(--source-a); }
.topic-index.source-b { background: var(--source-b-soft); color: var(--source-b); }
.topic-copy { min-width: 0; }
.topic-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.topic-copy small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.topic-progress { height: 5px; margin-top: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.topic-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand-2); }
.topic-arrow { color: var(--muted); font-size: 20px; }
.empty-state { padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); }

.review-actions { display: grid; gap: 9px; }
.review-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 12px; border-bottom: 1px solid var(--line); }
.review-tabs button { min-height: 44px; border-radius: 0; border-bottom: 2px solid transparent; }
.review-tabs button.is-active { color: var(--ink); border-bottom-color: var(--brand-2); }
.review-list { display: grid; gap: 9px; }
.review-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.review-item button { align-self: start; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.review-item p { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.6; }
.review-item small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }

.settings-list { display: grid; gap: 10px; }
.setting-card { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.setting-card strong, .setting-card small { display: block; }
.setting-card strong { font-size: 14px; }
.setting-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.setting-stack { display: block; }
.choice-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; padding: 4px; border-radius: 13px; background: var(--surface-2); }
.stepper { display: grid; grid-template-columns: 34px 42px 34px; align-items: center; text-align: center; }
.stepper button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.stepper strong { font-size: 17px; }
.switch-card { position: relative; cursor: pointer; }
.switch-card input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; border-radius: 99px; background: var(--surface-2); transition: background .2s ease; }
.switch::after { content: ""; position: absolute; width: 20px; height: 20px; left: 4px; top: 4px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: transform .2s ease; }
.switch-card input:checked + .switch { background: var(--brand-2); }
.switch-card input:checked + .switch::after { transform: translateX(20px); }
.danger-link { padding: 8px; border: 0; background: transparent; color: var(--red); font-size: 12px; font-weight: 800; cursor: pointer; }
.about-card { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 22px; border-radius: var(--radius-lg); background: var(--brand); color: var(--bg); }
html[data-theme="dark"] .about-card { color: #142319; }
.about-card strong { font-size: 16px; }
.about-card p { margin: 5px 0; font-size: 12px; font-weight: 700; }
.about-card small { opacity: .68; font-size: 10px; }

.bottom-nav {
  position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(9px + var(--safe-bottom)); height: 68px;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border: 1px solid var(--line); border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(20px); box-shadow: 0 14px 45px rgba(14,28,22,.16);
}
.bottom-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.bottom-nav button.is-active { background: var(--lime-soft); color: var(--ink); }
.nav-glyph { font-size: 20px; line-height: 1; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 10px); min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: var(--red); color: white; font-size: 9px; }

.practice-screen { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); }
.practice-topbar { min-height: 76px; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 14px; padding: max(10px, env(safe-area-inset-top)) 14px 9px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.practice-close { font-size: 26px; }
.practice-progress-wrap { min-width: 0; }
.practice-labels { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.linear-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.linear-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand-2); transition: width .28s ease; }
.practice-main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.question-card { width: min(100%, 760px); margin: 0 auto; padding: 26px 18px 36px; }
.question-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.question-meta span { padding: 6px 9px; border-radius: 9px; background: var(--lime-soft); color: var(--brand-2); font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.question-meta span + span { background: var(--surface-2); color: var(--muted); }
.question-meta .source-a, .source-a.source-pill { background: var(--source-a-soft); color: var(--source-a); }
.question-meta .source-b, .source-b.source-pill { background: var(--source-b-soft); color: var(--source-b); }
.source-pill { display: inline-flex; width: auto; align-items: center; padding: 6px 9px; border-radius: 9px; }
.question-path { margin: 16px 0 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.question-card h2 { margin: 0 0 24px; font-size: clamp(20px, 5.6vw, 28px); line-height: 1.55; letter-spacing: -.015em; }
.multi-hint { margin: -13px 0 15px; color: var(--brand-2); font-size: 11px; }
.options-list { display: grid; gap: 10px; }
.option-button { width: 100%; min-height: 60px; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.option-button:active { transform: scale(.99); }
.option-label { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); font-size: 12px; font-weight: 900; }
.option-text { font-size: 14px; line-height: 1.55; }
.option-button.is-selected { border-color: var(--brand-2); background: var(--lime-soft); }
.option-button.is-selected .option-label { background: var(--brand-2); color: white; }
.option-button.is-correct { border-color: #4c9879; background: var(--green-soft); }
.option-button.is-correct .option-label { background: #3f8067; color: white; }
.option-button.is-wrong { border-color: var(--red); background: var(--red-soft); }
.option-button.is-wrong .option-label { background: var(--red); color: white; }
.option-button:disabled { cursor: default; }
.feedback-panel { margin-top: 18px; padding: 16px; border-radius: 17px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--brand-2) 30%, transparent); }
.feedback-panel.is-wrong { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.feedback-title { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 15px; font-weight: 900; }
.feedback-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.correct-answer-line { color: var(--ink) !important; font-weight: 700; }
.analysis-box { margin-top: 13px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 76%, transparent); border: 1px solid var(--line); }
.analysis-box strong { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--ink); font-size: 12px; }
.analysis-box strong::before { content: "析"; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--lime-soft); color: var(--brand-2); font-size: 10px; }
.analysis-box p { color: var(--ink) !important; font-size: 12px; line-height: 1.75; }
.answer-source { white-space: nowrap; font-size: 9px; color: var(--muted); }
.practice-footer { display: grid; grid-template-columns: minmax(96px,.35fr) minmax(170px,1fr); gap: 10px; padding: 10px 14px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.practice-submit { width: 100%; grid-column: 2; }
#dont-know { grid-column: 1; grid-row: 1; }
.result-card { text-align: center; padding-top: 6vh; }
.result-badge { width: 92px; height: 92px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 30px; background: var(--lime); color: #132219; font-size: 34px; font-weight: 900; transform: rotate(-4deg); }
.result-card h2 { margin-bottom: 8px; font-size: 32px; }
.result-card > p { color: var(--muted); }
.result-score { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 28px 0; }
.result-score div { padding: 16px 8px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.result-score strong, .result-score small { display: block; }
.result-score strong { font-size: 24px; }
.result-score small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.result-actions { display: grid; gap: 9px; }

.sheet, .confirm-dialog { width: min(calc(100% - 20px), 520px); margin: auto auto 10px; padding: 27px 20px calc(20px + var(--safe-bottom)); border: 0; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sheet::backdrop, .confirm-dialog::backdrop { background: rgba(6,18,14,.56); backdrop-filter: blur(3px); }
.sheet[open], .confirm-dialog[open] { animation: sheet-in .25s ease both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(20px); } }
.sheet-handle { width: 42px; height: 4px; margin: -15px auto 20px; border-radius: 99px; background: var(--line); }
.sheet-close { position: absolute; right: 15px; top: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; font-size: 20px; }
.sheet h2, .confirm-dialog h2 { margin: 0; padding-right: 36px; font-size: 24px; line-height: 1.3; }
.sheet > p:not(.eyebrow), .confirm-dialog p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.sheet-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 18px 0; }
.sheet-stats div { padding: 13px 8px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.sheet-stats strong, .sheet-stats small { display: block; }
.sheet-stats small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.sheet-actions { display: grid; gap: 8px; }
.confirm-dialog { margin: auto; padding-bottom: 20px; }
.confirm-dialog > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: calc(92px + var(--safe-bottom)); max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: #102d26; color: white; font-size: 11px; font-weight: 700; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .22s ease; box-shadow: var(--shadow); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 680px) {
  .main-content { padding: 26px 28px 60px; }
  .topbar { height: 78px; padding-inline: max(28px, calc((100vw - var(--content)) / 2)); }
  .hero-card { grid-template-columns: 1fr 180px; align-items: center; padding: 38px 42px; }
  .stats-strip article { padding: 17px 18px; gap: 12px; }
  .stat-icon { width: 36px; height: 36px; }
  .topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar-card { grid-template-columns: 1fr 330px; align-items: center; }
  .review-actions { grid-template-columns: 1fr 1fr; }
  .bottom-nav { width: 430px; left: 50%; right: auto; transform: translateX(-50%); }
  .sheet { margin-bottom: 24px; }
}

@media (min-width: 980px) {
  .app-shell { padding-bottom: 40px; }
  .main-content { padding-bottom: 80px; }
  .home-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 18px; align-items: start; }
  .hero-card, .stats-strip { grid-column: 1 / -1; }
  .section-block { margin-top: 8px; }
  .quote-card { margin-top: 8px; min-height: 180px; display: flex; flex-direction: column; justify-content: center; }
  .bottom-nav { top: 50%; bottom: auto; left: 26px; width: 74px; height: 330px; transform: translateY(-50%); grid-template-columns: 1fr; grid-template-rows: repeat(4,1fr); }
  .bottom-nav button { font-size: 10px; }
  .topic-list { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .settings-list { grid-template-columns: repeat(2,1fr); }
  .about-card { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
