/* whatplayer.wiki — shared styles.
   Look: a late-90s school textbook. Warm paper on faint graph-paper ruling, navy ink,
   one "chapter" colour per edition (theme), a red pen for marking, gold stars for wins.
   See DESIGN.md for the system. */

/* ===== Tokens ===== */
:root {
  /* paper & ink (neutrals tinted warm; never pure white/black) */
  --paper:     oklch(0.962 0.014 88);   /* the page */
  --paper-2:   oklch(0.928 0.02 88);    /* inactive tabs, quiet fills */
  --sheet:     oklch(0.985 0.007 88);   /* printed sheets: tables, cards, inputs */
  --ink:       oklch(0.25 0.03 265);    /* body text */
  --ink-2:     oklch(0.44 0.025 265);   /* secondary text (AA on paper) */
  --ink-3:     oklch(0.62 0.02 265);    /* control borders */
  --rule:      oklch(0.84 0.018 88);    /* hairlines */
  --rule-soft: oklch(0.9 0.014 88);
  --grid:      oklch(0.8 0.05 235 / 0.28); /* graph-paper ruling */
  --red-pen:   oklch(0.52 0.2 27);
  --gold:      oklch(0.83 0.15 85);
  --gold-edge: oklch(0.62 0.13 70);
  --print:     3px 3px 0 oklch(0.25 0.03 265 / 0.12);  /* offset "printed" shadow, not a blur */

  /* type */
  --font-ui:      "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-book:    "PT Serif", "Century Schoolbook", Georgia, serif;
  --font-display: var(--font-ui);

  /* motion */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);   /* ease-out-quart */

  /* edition: Pitch (default) */
  --chapter:      oklch(0.5 0.13 150);     /* tabs, primary buttons, section labels */
  --chapter-ink:  oklch(0.985 0.007 88);   /* text on --chapter */
  --chapter-tint: oklch(0.94 0.035 150);   /* table heads, sidebars, selection */
  --chapter-2:    oklch(0.86 0.15 95);     /* second colour: swatches, small accents */
  --hi:           oklch(0.9 0.14 95);      /* highlighter swipe behind key numbers */
}

/* ===== Editions (themes): same book, different printing ===== */
[data-theme="pl"] {
  --chapter: oklch(0.36 0.15 325); --chapter-tint: oklch(0.94 0.03 325);
  --chapter-2: oklch(0.78 0.17 160); --hi: oklch(0.89 0.12 160);
}
[data-theme="ucl"] {
  --chapter: oklch(0.32 0.11 265); --chapter-tint: oklch(0.94 0.02 255);
  --chapter-2: oklch(0.78 0.05 240); --hi: oklch(0.88 0.06 235);
}
[data-theme="italia90"] {
  --chapter: oklch(0.47 0.15 32); --chapter-tint: oklch(0.94 0.025 50);
  --chapter-2: oklch(0.5 0.12 150); --hi: oklch(0.9 0.07 85);
  --font-display: var(--font-book);
}
[data-theme="france98"] {
  --chapter: oklch(0.42 0.17 262); --chapter-tint: oklch(0.94 0.03 262);
  --chapter-2: oklch(0.86 0.16 95); --hi: oklch(0.9 0.15 95);
}
[data-theme="wc2002"] {
  --chapter: oklch(0.45 0.19 350); --chapter-tint: oklch(0.94 0.035 350);
  --chapter-2: oklch(0.72 0.16 55); --hi: oklch(0.88 0.1 65);
}
[data-theme="brasil"] {
  --chapter: oklch(0.46 0.12 160); --chapter-tint: oklch(0.93 0.09 100);
  --chapter-2: oklch(0.88 0.17 98); --hi: oklch(0.9 0.16 98);
}
[data-theme="oranje"] {
  --chapter: oklch(0.53 0.16 45); --chapter-tint: oklch(0.94 0.035 55);
  --chapter-2: oklch(0.36 0.1 262); --hi: oklch(0.88 0.1 60);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 56px;
}
.topbar, .chapters, header, .stage, footer { width: 100%; max-width: 480px; }
a { color: var(--chapter); }
:focus-visible { outline: 3px solid var(--chapter); outline-offset: 2px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mark { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }
.mark.pen { color: var(--red-pen); }

/* ===== Top bar: wordmark + edition picker ===== */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wordmark { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--chapter); }

.edition { position: relative; }
.edition-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 6px 12px;
  font: 600 0.875rem var(--font-ui); color: var(--ink);
  background: var(--sheet); border: 1.5px solid var(--ink-3); border-radius: 6px;
  cursor: pointer;
}
.edition-btn:hover { background: var(--paper-2); }
.edition-dots { display: inline-flex; }
.edition-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--chapter); box-shadow: 0 0 0 1.5px var(--sheet); }
.edition-dots i + i { margin-left: -4px; background: var(--chapter-2); }
.edition-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  min-width: 210px; padding: 6px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--print);
}
.edition-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 40px; padding: 8px 10px;
  font: 500 0.9rem var(--font-ui); color: var(--ink); text-align: left;
  background: none; border: none; border-radius: 4px; cursor: pointer;
}
.edition-menu button:hover { background: var(--paper-2); }
.edition-menu button.active { background: var(--chapter-tint); font-weight: 600; }
.edition-menu .sw {
  width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--sw-a) 50%, var(--sw-b) 50%);
  box-shadow: inset 0 0 0 1px oklch(0.25 0.03 265 / 0.2);
}
.edition-menu .mark { margin-left: auto; visibility: hidden; }
.edition-menu button.active .mark { visibility: visible; }

/* ===== Chapter tabs (game switcher), like a textbook's thumb index ===== */
.chapters { display: flex; gap: 6px; border-bottom: 2px solid var(--chapter); margin-bottom: 22px; }
.chapters a {
  flex: 1; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px;
  font-weight: 600; font-size: 0.875rem; line-height: 1.15; color: var(--ink-2); text-decoration: none;
  background: var(--paper-2); border: 1px solid var(--rule); border-bottom: none; border-radius: 6px 6px 0 0;
}
.chapters a:hover { color: var(--ink); }
.chapters .num { font-weight: 800; font-size: 1.1rem; color: var(--chapter); }
.chapters a.active { background: var(--chapter); color: var(--chapter-ink); border-color: var(--chapter); }
.chapters a.active .num { color: var(--chapter-ink); }
@media (max-width: 420px) {
  .chapters { gap: 4px; }
  .chapters a { gap: 5px; padding: 6px 7px; font-size: 0.8rem; }
  .chapters .num { font-size: 1rem; }
}

/* ===== Chapter opener ===== */
header { margin-bottom: 20px; }
.kicker { margin: 0 0 4px; font-weight: 700; font-size: 0.875rem; color: var(--chapter); }
h1 {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: 2.25rem; line-height: 1.02; letter-spacing: -0.025em;
}
.dek { margin: 10px 0 0; font-family: var(--font-book); font-size: 1rem; line-height: 1.45; color: var(--ink-2); max-width: 40ch; }

/* ===== Layout ===== */
.stage { display: flex; flex-direction: column; gap: 14px; }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.scoreline { font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.scoreline b { color: var(--ink); font-weight: 700; }

/* ===== Buttons ===== */
.btn {
  min-height: 46px; padding: 11px 18px;
  font: 600 1rem var(--font-ui); line-height: 1.2;
  border: 1.5px solid transparent; border-radius: 6px; cursor: pointer;
  transition: background 0.15s var(--ease-out), transform 0.1s var(--ease-out), box-shadow 0.1s var(--ease-out);
}
.btn-primary {
  background: var(--chapter); color: var(--chapter-ink);
  box-shadow: 0 3px 0 oklch(from var(--chapter) calc(l - 0.13) c h);   /* the pressable bottom edge */
}
.btn-primary:hover { background: oklch(from var(--chapter) calc(l + 0.04) c h); }
.btn-primary:active { transform: translateY(3px); box-shadow: none; }
.btn-ghost { background: var(--sheet); color: var(--ink); border-color: var(--ink-3); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-ghost:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.link-btn {
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  font: 500 0.875rem var(--font-ui); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* ===== Segmented tabs (Classic / Timed) ===== */
.modebar { display: inline-flex; border: 1.5px solid var(--ink-3); border-radius: 6px; overflow: hidden; background: var(--sheet); }
.mode-btn {
  min-height: 38px; padding: 7px 16px;
  font: 600 0.9rem var(--font-ui); color: var(--ink-2);
  background: none; border: none; cursor: pointer;
}
.mode-btn + .mode-btn { border-left: 1px solid var(--rule); }
.mode-btn:hover { color: var(--ink); }
.mode-btn.active { background: var(--chapter); color: var(--chapter-ink); }

/* ===== Timer (Timed mode) ===== */
.timerbar { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; }
.timerbar .clock { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.timerbar .clock span { background: linear-gradient(transparent 58%, var(--hi) 58%); padding: 0 3px; }
.timerbar .best { font-size: 0.875rem; color: var(--ink-2); }

/* ===== Printed sheet + figure caption ===== */
.card {
  margin: 0;
  background: var(--sheet); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--print);
  overflow: hidden;
}
.figcap { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 8px; border-bottom: 1px solid var(--rule); }
.figcap b { font-weight: 700; font-size: 0.875rem; color: var(--chapter); white-space: nowrap; }
.figcap span { font-family: var(--font-book); font-style: italic; font-size: 0.9rem; color: var(--ink-2); }

/* ===== The career table ===== */
.infobox { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.infobox th, .infobox td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--rule-soft); }
.infobox .colhead th {
  font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); background: var(--chapter-tint); border-bottom: 1px solid var(--rule);
}
.infobox .section th {
  padding-top: 12px; font-weight: 700; font-size: 0.875rem; color: var(--chapter);
  border-top: 2px solid var(--chapter); border-bottom: none; background: none;
}
.infobox tr:first-child.section th { border-top: none; }
.infobox td.team { font-weight: 500; }
.infobox .total td { font-weight: 700; border-top: 3px double var(--ink-3); }
.infobox td.num, .infobox th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* long careers ("Wolverhampton Wanderers", loans) would overflow a phone-width sheet;
   years wrap after the dash (a <wbr> added in rowHtml) */
@media (max-width: 420px) {
  .infobox th, .infobox td { padding: 8px 7px; }
  .infobox th:first-child, .infobox td:first-child { padding-left: 12px; }
  .infobox th:last-child, .infobox td:last-child { padding-right: 12px; }
}
.footnote { padding: 8px 12px 10px; font-family: var(--font-book); font-style: italic; font-size: 0.8rem; color: var(--ink-2); }

/* loading: a ruled skeleton of the table, not a spinner */
.loading { padding: 4px 0 14px; }
.skel { display: grid; grid-template-columns: 26% 1fr 14% 14%; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--rule-soft); }
.skel i { height: 10px; border-radius: 2px; background: var(--paper-2); }
.loading-msg { padding: 10px 12px 0; font-family: var(--font-book); font-style: italic; font-size: 0.9rem; color: var(--ink-2); }

/* timed mode: rows arrive one by one */
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.infobox tr.reveal-in > * { animation: rowIn 0.25s var(--ease-out) both; }
.nextclub { padding: 10px 12px; font-family: var(--font-book); font-style: italic; font-size: 0.875rem; color: var(--ink-2); }
.nextclub .dots::after { content: ""; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ===== Guess input + autocomplete ===== */
.guess-wrap { position: relative; }
.guess-row { display: flex; gap: 8px; }
input[type="text"] {
  flex: 1; min-width: 0; min-height: 46px; padding: 11px 14px;
  font: 400 1rem var(--font-ui); color: var(--ink);
  background: var(--sheet); border: 1.5px solid var(--ink-3); border-radius: 6px; outline: none;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
input[type="text"]::placeholder { color: var(--ink-3); }
input[type="text"]:focus { border-color: var(--chapter); box-shadow: 0 0 0 3px var(--chapter-tint); }
input:disabled { opacity: 0.6; }

.suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  max-height: 290px; overflow-y: auto;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--print);
}
.suggestions div { padding: 11px 14px; cursor: pointer; font-size: 0.95rem; border-bottom: 1px solid var(--rule-soft); }
.suggestions div:last-child { border-bottom: none; }
.suggestions div.active, .suggestions div:hover { background: var(--chapter-tint); }

/* ===== "Did you know?" sidebar ===== */
.note {
  position: relative; margin-top: 10px;
  padding: 16px 14px 12px;
  font-family: var(--font-book); font-size: 0.9rem; line-height: 1.45; color: var(--ink);
  background: var(--chapter-tint); border: 1.5px solid var(--chapter); border-radius: 6px;
}
.note-label {
  position: absolute; top: -0.75em; left: 12px; padding: 2px 8px;
  font: 700 0.72rem var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--chapter-ink); background: var(--chapter); border-radius: 3px;
}
.note p { margin: 0; }

/* ===== Wrong guesses: crossed off in red pen ===== */
.wrong-guesses { display: flex; flex-direction: column; gap: 6px; }
.wrong-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 12px 6px 6px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px;
  animation: rowIn 0.2s var(--ease-out) both;
}
.wrong-chip img { width: 34px; height: 34px; border-radius: 3px; object-fit: cover; filter: grayscale(0.6); flex-shrink: 0; }
.wrong-chip .nm {
  min-width: 0; font-weight: 500; color: var(--ink-2);
  text-decoration: line-through; text-decoration-color: var(--red-pen); text-decoration-thickness: 2px;
}
.wrong-chip .mark { margin-left: auto; width: 22px; height: 22px; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake 0.25s; }

/* ===== Result: the marked answer ===== */
.result {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--print);
}
.result.correct { border-color: var(--chapter); box-shadow: var(--print), inset 0 0 0 1px var(--chapter); }
.result .photo { position: relative; flex-shrink: 0; }
.result img { display: block; width: 78px; height: 78px; border-radius: 3px; object-fit: cover; background: var(--paper-2); }
.result .photo .star { position: absolute; right: -10px; bottom: -10px; width: 32px; height: 32px; }
.result .photo.nophoto .star { position: static; width: 46px; height: 46px; }
.result .verdict { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; color: var(--ink-2); }
.result.correct .verdict { color: var(--red-pen); }
.result.correct .verdict .mark { width: 26px; height: 26px; }
.result .name { margin: 2px 0; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.05; letter-spacing: -0.015em; }
.result .desc { font-family: var(--font-book); font-size: 0.9rem; color: var(--ink-2); }
.result a { font-size: 0.875rem; }
.result .time { font-variant-numeric: tabular-nums; }
.result .newbest {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px;
  font-size: 0.75rem; font-weight: 700; color: var(--ink); background: var(--hi); border-radius: 3px;
}
.result .newbest .star { width: 14px; height: 14px; }

/* ===== Setup worksheet + winner banner (Chapters 2 and 3) ===== */
.sheetpad { padding-bottom: 14px; }
.sheetpad .body { padding: 14px 12px 2px; display: flex; flex-direction: column; gap: 10px; }
.name-row { display: flex; align-items: center; gap: 8px; }
.lineno { width: 1.4em; text-align: right; font-weight: 700; color: var(--chapter); font-variant-numeric: tabular-nums; }
.btn .mark { width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper .val { min-width: 2ch; text-align: center; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper .unit { font-family: var(--font-book); font-style: italic; color: var(--ink-2); }

.banner { display: flex; align-items: center; gap: 12px; }
.banner .star { width: 44px; height: 44px; }
.banner b { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.banner small { display: block; font-family: var(--font-book); font-size: 0.9rem; color: var(--ink-2); }
.hint { margin: 0; font-family: var(--font-book); font-style: italic; font-size: 0.9rem; color: var(--ink-2); }

.detail { display: flex; align-items: center; gap: 12px; background: var(--sheet); }
.detail img { width: 64px; height: 64px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.detail .who { flex: 1; min-width: 0; }
.detail .pick { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.detail .teams { font-family: var(--font-book); font-size: 0.85rem; color: var(--ink-2); }
.detail .caps { text-align: right; font-variant-numeric: tabular-nums; }
.detail .caps b { display: block; font-size: 2rem; line-height: 1; }
.detail .caps span { font-size: 0.75rem; color: var(--ink-2); }
.detail-link { font-size: 0.875rem; background: var(--sheet); align-self: flex-start; }

/* ===== Online rooms (Chapters 2 and 3) ===== */
.playmode { display: flex; align-self: stretch; }
.playmode .mode-btn { flex: 1; min-height: 44px; }
.lobby { padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.roomcode {
  text-align: center; font-weight: 800; font-size: 3.25rem; line-height: 1; letter-spacing: 0.18em;
  padding-left: 0.18em; color: var(--chapter); font-variant-numeric: tabular-nums;
}
.room-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.room-qr svg { width: 168px; height: 168px; padding: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; }
.room-qr span { font-family: var(--font-book); font-style: italic; font-size: 0.85rem; color: var(--ink-2); }
.room-players { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.room-players li { display: flex; align-items: center; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--rule-soft); font-weight: 600; }
.room-players li:last-child { border-bottom: none; }
.room-players .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chapter); flex-shrink: 0; }
.room-players li.away { color: var(--ink-3); }
.room-players .make-host { margin-left: auto; min-height: 36px; }
.room-players li.away .dot { background: var(--ink-3); }
.room-players .tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-2); background: var(--paper-2); border-radius: 3px; padding: 1px 6px;
}
.room-status {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 70;
  padding: 9px 16px; font-weight: 600; font-size: 0.9rem; color: var(--sheet);
  background: var(--ink); border-radius: 6px; box-shadow: var(--print);
}

/* ===== Square icon button ===== */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; flex-shrink: 0;
  color: var(--ink); background: var(--sheet); border: 1.5px solid var(--ink-3); border-radius: 6px; cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn .mark { width: 18px; height: 18px; }

/* ===== Index-card sheet (Sheet in common.js) ===== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 8vh 14px 14px;   /* sits high so the phone keyboard doesn't cover the options */
  background: oklch(0.25 0.03 265 / 0.45);
}
.sheet {
  width: 100%; max-width: 460px; max-height: 84vh; overflow: auto;
  background-color: var(--sheet);
  background-image: repeating-linear-gradient(transparent 0 29px, oklch(0.8 0.05 235 / 0.35) 29px 30px);
  background-position: 0 66px;
  border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--print);
  animation: rowIn 0.2s var(--ease-out) both;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 14px 14px 10px; background: var(--sheet); border-bottom: 2px solid var(--red-pen);
}
.sheet-kicker { font-weight: 600; font-size: 0.8rem; color: var(--ink-2); }
.sheet-title { font-weight: 800; font-size: 1.2rem; }
.sheet-title b { color: var(--chapter); }
.sheet-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.options { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.options:empty { display: none; }
.options button {
  min-height: 46px; padding: 10px 14px; text-align: left;
  font: 500 0.95rem var(--font-ui); color: var(--ink);
  background: var(--sheet); border: none; border-bottom: 1px solid var(--rule-soft); cursor: pointer;
}
.options button:last-child { border-bottom: none; }
.options button:hover, .options button:focus-visible { background: var(--chapter-tint); outline: none; }
.options small { display: block; font-family: var(--font-book); font-size: 0.78rem; color: var(--ink-2); }
.locked-note { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--font-book); font-size: 0.875rem; color: var(--ink-2); background: var(--sheet); }

/* ===== Footer ===== */
footer {
  margin-top: 32px; padding-top: 10px; border-top: 1px solid var(--rule);
  font-family: var(--font-book); font-size: 0.8rem; color: var(--ink-2);
}
footer a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
