/* Layout: manuscript-grid notebook. Indigo ink (쪽빛) on cool paper, dancheong red used only for "again" and streaks.
   Big Korean words sit in 원고지 squares so learners see each syllable block. */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --ink: #141a2e;
  --muted: #586079;
  --line: #d9deea;
  --grid: #c9d2ea;
  --accent: #2443a6;
  --accent-ink: #ffffff;
  --accent-soft: #e5e9f8;
  --red: #c4372c;
  --red-soft: #fbe9e7;
  --green: #23744f;
  --green-soft: #e3f3ea;
  --amber: #a86a12;
  --amber-soft: #fbf0dc;
  --shadow: 0 1px 2px rgba(20, 26, 46, .06), 0 4px 16px rgba(20, 26, 46, .05);
  --f-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --f-body: "Inter", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ko: "Gowun Batang", "Noto Serif KR", "Batang", serif;
  --f-ko-sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --r: 10px;
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1120; --surface: #151a2c; --surface-2: #1b2136; --ink: #e7eaf4; --muted: #9ba3bc; --line: #2a3150; --grid: #34407a;
    --accent: #93a6ff; --accent-ink: #0d1120; --accent-soft: #1f2748; --red: #f07a6e; --red-soft: #3a1d1c; --green: #5cc497;
    --green-soft: #15302a; --amber: #e4b45b; --amber-soft: #33270f; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1120; --surface: #151a2c; --surface-2: #1b2136; --ink: #e7eaf4; --muted: #9ba3bc; --line: #2a3150; --grid: #34407a;
  --accent: #93a6ff; --accent-ink: #0d1120; --accent-soft: #1f2748; --red: #f07a6e; --red-soft: #3a1d1c; --green: #5cc497;
  --green-soft: #15302a; --amber: #e4b45b; --amber-soft: #33270f; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55;
  min-height: 100vh; display: flex; flex-direction: column;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.ko { font-family: var(--f-ko-sans); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in, .footer-in, .wrap {
  max-width: var(--maxw); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--f-ko); font-weight: 700; font-size: 20px;
  background: var(--accent); color: var(--accent-ink); border-radius: 8px;
}
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 7px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.on { color: var(--accent); background: var(--accent-soft); }
.due-pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.topbar .menu-btn { display: none; margin-left: auto; }
@media (max-width: 1120px) {
  .topbar .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); flex-direction: column; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 11px 8px; font-size: 15px; }
}

main { flex: 1; outline: none; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); }
.wrap { padding-block: 32px 56px; display: flex; flex-direction: column; gap: 32px; }
.wrap.narrow { max-width: 760px; }
.section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lead { color: var(--muted); font-size: 16px; max-width: 65ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- buttons ---------- */
.btn, .menu-btn {
  font: inherit; font-weight: 600; font-size: 14px; border-radius: 9px; padding: 10px 16px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.big { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent); cursor: pointer; display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.on { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 12px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 14px; }
.hero .btn-row { margin-top: 24px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.badge { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero-card .wod-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- 원고지 word grid ---------- */
.gridword { display: flex; flex-wrap: wrap; gap: 0; justify-content: center; }
.gridword .cell {
  --s: 72px; width: var(--s); height: var(--s); display: grid; place-items: center; font-family: var(--f-ko); font-weight: 700;
  font-size: calc(var(--s) * .62); line-height: 1; color: var(--ink); position: relative; border: 1.5px solid var(--grid); margin-left: -1.5px; background: var(--surface);
  background-image: linear-gradient(var(--surface-2), var(--surface-2)), linear-gradient(var(--surface-2), var(--surface-2));
  background-size: 1px 100%, 100% 1px; background-position: center, center; background-repeat: no-repeat;
}
.gridword .cell:first-child { margin-left: 0; }
.gridword .cell.gap { border-color: transparent; background: transparent; width: calc(var(--s) * .35); }
.gridword.md .cell { --s: 52px; }
.gridword.sm .cell { --s: 40px; }
.gridword.xs .cell { --s: 30px; }
@media (max-width: 480px) { .gridword .cell { --s: 56px; } .gridword.md .cell { --s: 44px; } }
.hom { font-family: var(--f-body); font-size: 12px; color: var(--muted); vertical-align: super; margin-left: 2px; }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 14px; }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card.link { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: var(--accent); }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.course-card .ko-title { font-family: var(--f-ko-sans); color: var(--muted); font-size: 13px; }
.course-card .count { font-family: var(--f-display); font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.course-card p { color: var(--muted); font-size: 13.5px; }
.course-card .btn-row { margin-top: auto; }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); letter-spacing: .02em; }
.lv { display: inline-flex; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px solid currentColor; }
.lv.l1 { color: var(--green); } .lv.l2 { color: var(--accent); } .lv.l3 { color: var(--red); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- today strip ---------- */
.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.today > div { padding: 16px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.today > div:last-child { border-right: 0; }
.today .num { font-family: var(--f-display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.today .lbl { font-size: 12.5px; color: var(--muted); }
.today .num.red { color: var(--red); }
@media (max-width: 640px) { .today { grid-template-columns: 1fr 1fr; } .today > div:nth-child(2) { border-right: 0; } .today > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- lists ---------- */
.wordlist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.wl-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); align-items: center; text-decoration: none; color: inherit; }
.wl-row:last-child { border-bottom: 0; }
a.wl-row:hover { background: var(--surface-2); }
.wl-row .w { font-family: var(--f-ko-sans); font-weight: 700; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.wl-row .w small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 12px; color: var(--muted); }
.wl-row .e { color: var(--muted); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.wl-row .r { display: flex; gap: 6px; align-items: center; }
@media (max-width: 560px) { .wl-row { grid-template-columns: 1fr auto; } .wl-row .e { grid-column: 1 / -1; grid-row: 2; } }

.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.day { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 0; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.day:hover { border-color: var(--accent); }
.day.part { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.day.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day.sel { outline: 2px solid var(--ink); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
a.chip:hover { border-color: var(--accent); }
.chip.ko { font-family: var(--f-ko-sans); }

/* ---------- study ---------- */
.study { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.study-top { display: flex; align-items: center; gap: 12px; }
.study-top .progress { flex: 1; height: 8px; }
.study-top .count { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap; }
.phase { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.flash { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 22px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; box-shadow: var(--shadow); min-height: 300px; }
.flash .rom { color: var(--muted); font-size: 15px; letter-spacing: .02em; }
.flash .pos { font-size: 12px; color: var(--muted); }
.flash .meaning { font-family: var(--f-display); font-size: 24px; font-weight: 700; }
.flash .def { color: var(--muted); max-width: 52ch; font-size: 14px; }
.flash .lit { font-size: 13px; color: var(--muted); font-style: italic; }
.flash hr { width: 100%; border: 0; border-top: 1px dashed var(--line); margin: 2px 0; }
.ex { text-align: left; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 4px; }
.ex .k { font-family: var(--f-ko-sans); font-size: 16px; display: flex; gap: 8px; align-items: flex-start; }
.ex .k button { margin-top: 1px; }
.ex .t { color: var(--muted); font-size: 14px; }
.conj { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 100%; max-width: 520px; }
.conj div { padding: 8px 6px; border-right: 1px solid var(--line); min-width: 0; }
.conj div:last-child { border-right: 0; }
.conj b { display: block; font-family: var(--f-ko-sans); font-size: 15px; overflow-wrap: anywhere; }
.conj span { font-size: 11px; color: var(--muted); }
.flash-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.quiz-q { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.quiz-q .prompt-en { font-family: var(--f-display); font-size: 22px; font-weight: 700; max-width: 40ch; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .options { grid-template-columns: 1fr; } }
.opt { font: inherit; text-align: left; padding: 14px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 56px; display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; }
.opt .k { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; flex-shrink: 0; }
.opt.ko { font-family: var(--f-ko-sans); font-size: 19px; font-weight: 600; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt:disabled { cursor: default; }
.feedback { min-height: 24px; text-align: center; font-weight: 600; }
.feedback.good { color: var(--green); } .feedback.bad { color: var(--red); }

.builder { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.slots { display: flex; gap: 0; }
.slots .cell { --s: 58px; }
.tiles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tile { font-family: var(--f-ko); font-weight: 700; font-size: 26px; width: 56px; height: 56px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 2px 0 var(--line); }
.tile:hover:not(:disabled) { border-color: var(--accent); }
.tile:disabled { opacity: .25; cursor: default; }

.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.rate button { font: inherit; padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rate button b { font-size: 14px; }
.rate button span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rate .again { border-color: var(--red); } .rate .again b { color: var(--red); }
.rate .hard b { color: var(--amber); } .rate .good b { color: var(--green); } .rate .easy b { color: var(--accent); }
.rate button:hover { background: var(--surface-2); }
.kbd-hint { font-size: 12px; color: var(--muted); text-align: center; }

.summary { display: flex; flex-direction: column; gap: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-family: var(--f-display); font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- dictionary ---------- */
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 11px; }
textarea { width: 100%; min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field input, label.field select { font-weight: 400; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.entry-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.entry-head .info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.entry-head .info .line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sense { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.sense .n { font-family: var(--f-display); font-weight: 800; color: var(--accent); font-size: 18px; }
.sense .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sense .en { font-weight: 700; font-size: 16px; }
.sense .kdef { font-family: var(--f-ko-sans); color: var(--muted); font-size: 14px; }
.sense ul { margin: 4px 0 0; padding-left: 18px; font-family: var(--f-ko-sans); font-size: 14.5px; display: flex; flex-direction: column; gap: 3px; }
.rel { font-size: 13px; color: var(--muted); }
.rel a { font-family: var(--f-ko-sans); }

/* ---------- hangul ---------- */
.jamo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.jamo { font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); }
.jamo:hover { border-color: var(--accent); }
.jamo b { font-family: var(--f-ko); font-size: 34px; line-height: 1.1; }
.jamo span { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.jamo small { font-size: 11px; color: var(--muted); text-align: center; }
.composer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .composer { grid-template-columns: 1fr 1fr 1fr; } .composer .out { grid-column: 1 / -1; justify-self: center; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.ko, .ko-big { font-family: var(--f-ko-sans); font-size: 16px; }

/* ---------- me ---------- */
.heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { display: block; width: 13px; height: 13px; border-radius: 3px; background: var(--surface-2); }
.heat i.h1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.heat i.h2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.heat i.h3 { background: color-mix(in srgb, var(--accent) 80%, var(--surface-2)); }
.heat i.h4 { background: var(--accent); }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq details p { margin-top: 8px; color: var(--muted); max-width: 70ch; }

.article { display: flex; flex-direction: column; gap: 16px; max-width: 68ch; }
.article p, .article li { font-size: 16px; line-height: 1.7; }
.article h2 { margin-top: 12px; }
.article ul, .article ol { padding-left: 22px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.callout { background: var(--accent-soft); border-radius: var(--r); padding: 14px 16px; font-size: 14.5px; }
.notice { background: var(--amber-soft); color: var(--ink); border-radius: var(--r); padding: 12px 14px; font-size: 14px; }

.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.footer-in { padding-block: 28px; display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand p { color: var(--muted); font-size: 13.5px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.footer-legal { font-size: 12px; color: var(--muted); max-width: 90ch; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 40; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.timer { font-family: var(--f-display); font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--red); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@keyframes pop { from { transform: scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
.pop { animation: pop .18s ease-out; }
