/* ============================================================
   SAMIMI brand layer for Story Quest (v1)
   The same family as the practice app: deep navy + iris blue, Manrope / Inter
   type, the owl mark, calm motion and one line-icon set for the interface.
   Decorations only: every rule here restyles what styles.css lays out.
   Nothing about layout logic, behaviour or content changes.
   ============================================================ */

/* ---------- typefaces (self-hosted, open licence: see vendor/fonts) ---------- */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("vendor/fonts/manrope-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- palette: the app's own variables, pointed at the family colours ---------- */
:root {
  --ink: #1c2440;
  --muted: #5b6580;
  --border: #e3e6ef;
  --line: #d3d8e6;
  --accent: #4a5be8;
  --accent-soft: #eef0fd;
  --accent-deep: #3646c4;
  --accent-2: #6b78f0;
  --green: #137a47;
  --amber: #d97706;
  --navy: #1b2a5b;
  --navy-deep: #121c45;
  --gold: #f6b23c;
  --teal: #149c8f;
  --card: #ffffff;
  --focus-ring: 0 0 0 3px rgba(74, 91, 232, .16);
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-card: 0 1px 2px rgba(27, 42, 91, .04), 0 10px 28px -18px rgba(27, 42, 91, .24);
}

/* ---------- base ---------- */
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: radial-gradient(900px 460px at 50% -240px, rgba(74, 91, 232, .10), transparent 70%), #f5f6fa;
  background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.005em; }
a { color: var(--accent); }
::selection { background: rgba(74, 91, 232, .2); }
* { scrollbar-color: #c9cedd transparent; }
::-webkit-scrollbar-thumb { background: #c9cedd; }
footer { font-size: 12px; color: #7a83a0; letter-spacing: .01em; }
footer a { font-weight: 600; }

/* ---------- background doodles: quiet, still, almost invisible ---------- */
.deco-item { opacity: .09 !important; animation: none !important; filter: grayscale(1) brightness(.35); }
.deco-blob { display: none; }

/* ---------- header: deep navy band with the owl lockup ---------- */
header.topbar {
  position: relative; isolation: isolate;
  gap: 12px; padding: 10px 20px;
  background: linear-gradient(100deg, #121c45 0%, #1b2a5b 52%, #2a3a80 100%);
  border-bottom-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 30px -20px rgba(18, 28, 69, .7);
  color: #fff;
}
header.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 140% at 86% 130%, rgba(74, 91, 232, .5), transparent 60%),
    radial-gradient(40% 120% at 62% -70%, rgba(20, 156, 143, .3), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23fff' fill-opacity='.09'/%3E%3C/svg%3E");
}
.topbar-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; flex: none; align-self: center; }
header.topbar h1 {
  font-size: 17px; font-weight: 600; letter-spacing: .005em; color: #fff; margin-right: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
header.topbar .wordmark {
  display: none; flex: none; align-self: center; padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  font-family: var(--font-display); font-weight: 800; font-size: 13px; line-height: 1; letter-spacing: .13em;
  color: rgba(255, 255, 255, .78); user-select: none; white-space: nowrap;
}
@media (min-width: 760px) { header.topbar .wordmark { display: block; } }
header.topbar h1 .ico { color: rgba(255, 255, 255, .9); }
/* on a wide screen the lockup says who we are: the page title carries no icon */
@media (min-width: 1101px) { header.topbar h1 .ico { display: none; } }
header.topbar .sub { color: rgba(255, 255, 255, .7) !important; font-size: 12.5px !important; }
/* everything that sits in the navy band turns light */
header.topbar .btn.ghost, header.topbar .btn.line {
  background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none;
}
header.topbar .btn.ghost:hover, header.topbar .btn.line:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); transform: none; }
header.topbar .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); color: #fff; font-weight: 500; border-radius: 8px; }
header.topbar .chip.clickable:hover { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16); }
body.sq .sq-auth-chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; font-weight: 500; border-radius: 8px; }
body.sq .sq-auth-chip:hover { background: rgba(255, 255, 255, .2); }
body.sq .sq-auth-chip.on { background: rgba(20, 156, 143, .28); border-color: rgba(255, 255, 255, .4); color: #fff; }
/* its sign-in dialog keeps the family colours too (its own stylesheet loads later, so the rules carry the body class) */
body.sq .sq-auth-card { border-radius: 18px; font-family: var(--font-body); }
body.sq .sq-auth-card h3 { color: var(--ink); font-family: var(--font-display); }
body.sq .sq-auth-sub, body.sq .sq-auth-field label { color: var(--muted); }
body.sq .sq-auth-tab { border-radius: 8px; border-color: var(--line); color: var(--muted); font-weight: 600; }
body.sq .sq-auth-tab.on { background: var(--accent); border-color: var(--accent); }
body.sq .sq-auth-field input { border-radius: 9px; border-color: var(--line); }
body.sq .sq-auth-field input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
body.sq .sq-auth-send { border-radius: 8px; border-color: #c7cdef; background: #fff; color: var(--accent); }
body.sq .sq-auth-go { border-radius: 10px; background: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(27, 42, 91, .2); }
body.sq .sq-auth-note, body.sq .sq-auth-close { color: var(--muted); }

/* ---------- chips ---------- */
.chip { border-radius: 8px; background: #fff; border-color: var(--line); color: #3a4463; font-weight: 500; padding: 6px 13px; }
.chip.clickable:hover { border-color: #b9c2f5; }
.token-chip { border-radius: 8px; font-weight: 600; background: #fff6dc; border-color: #f0d9a0; color: #7c5300; }
.sync-dot.local { background: var(--amber); }

/* ---------- cards ---------- */
.card { border-radius: 16px; border-color: var(--border); box-shadow: var(--shadow-card); padding: 22px 24px; }
.card h2 { font-size: 18px; font-weight: 700; }
.card h3 { font-weight: 700; }
.card .sub { font-size: 13.5px; line-height: 1.6; }
/* the rewards card opens with a picture (same banner as the practice app's medals page) */
.art-banner {
  height: 190px; margin: -22px -24px 20px; border-radius: 15px 15px 0 0; overflow: hidden;
  background: var(--navy); position: relative;
}
.art-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.art-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 28, 69, 0) 55%, rgba(18, 28, 69, .28)); }

/* ---------- mode bar: a segmented control instead of gradient tiles ---------- */
.mode-bar { gap: 4px; padding: 4px; border-radius: 14px; background: #e9ebf3; border-color: transparent; margin-bottom: 18px; }
.mode-btn {
  position: relative; border-radius: 10px; padding: 9px 14px 11px; color: #55607e; font-weight: 600; font-size: 14.5px;
  transition: background .15s, color .15s;
}
.mode-btn small { font-weight: 500; font-size: 12px; color: #6b7490; line-height: 1.35; }
.mode-btn:hover { background: rgba(255, 255, 255, .65); color: var(--ink); }
.mode-btn.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgba(27, 42, 91, .1), 0 6px 16px -12px rgba(27, 42, 91, .4);
}
.mode-btn.active small { color: var(--muted); }
.mode-btn.active .ico { color: var(--accent); }
.mode-btn.active::after {
  content: ""; position: absolute; left: 14px; bottom: 6px; width: 22px; height: 3px; border-radius: 2px; background: var(--accent);
}
.mode-btn:focus-visible, .btn:focus-visible, .chip:focus-visible, .sq-tab:focus-visible { outline: 3px solid rgba(74, 91, 232, .4); outline-offset: 2px; }

/* ---------- guide stage: night landscape, the owl in brand colours ---------- */
.stage { border-radius: 20px; background: radial-gradient(125% 145% at 18% 0%, #2a3a80 0%, #1b2a5b 46%, #121c45 100%); box-shadow: 0 24px 48px -28px rgba(18, 28, 69, .75); }
@media (min-width: 701px) { .stage { display: flex; flex-direction: column; justify-content: center; min-height: 290px; } }   /* room for the landscape behind the guide */
.stage-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 14%; pointer-events: none; }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 28, 69, .42) 0%, rgba(18, 28, 69, .06) 46%, rgba(18, 28, 69, 0) 70%), linear-gradient(0deg, rgba(18, 28, 69, .55), rgba(18, 28, 69, 0) 45%);
}
.stage-sky { z-index: 1; }
.stage-inner { z-index: 2; }
.bubble { border-radius: 16px; font-weight: 500; font-size: 15.5px; background: rgba(255, 255, 255, .97); color: #1c2440; box-shadow: 0 14px 32px rgba(6, 8, 30, .35); }
.caret-blink { background: var(--accent); }
.guide-tag { font-family: var(--font-display); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .66); white-space: nowrap; }
.say-choice { border-radius: 999px; font-weight: 600; }
.say-choice:hover { transform: none; }
.say-choice.primary { background: linear-gradient(120deg, #f6b23c, #f09a1a); color: #3b2a00; box-shadow: 0 8px 18px -6px rgba(240, 154, 26, .6); }

/* ---------- quest card ---------- */
.quest-card { border-radius: 18px; background: #fff; border-color: #dfe3f5; box-shadow: var(--shadow-card); }
.q-glow, .q-shine { display: none; }
.q-cover { background: linear-gradient(160deg, #4a5be8, #2a3a80); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .2), 0 14px 28px -14px rgba(42, 58, 128, .7); }
.q-emoji { animation: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.q-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 25px; }
.q-kicker, .reader-kicker { color: var(--accent); font-family: var(--font-display); }
.q-hint { color: #3a4463; line-height: 1.6; }
.quest-empty { border-radius: 18px; }
.qe-ico { font-size: 0; line-height: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.qe-ico .ico { width: 42px; height: 42px; margin: 0; color: var(--accent); }
.quest-empty.done .qe-ico .ico { color: #c9922b; }
.quest-empty h2 { font-weight: 700; }

/* ---------- path ahead / trail ---------- */
.trail-title { font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.trail-step { border: 1px solid var(--border); border-radius: 12px; background: #fff; opacity: 1; box-shadow: var(--shadow-card); }
.ts-name { color: #3a4463; }
.ts-lvl { color: var(--muted); }

/* ---------- rank strip & ladder ---------- */
.rank-strip { border-radius: 16px; border-color: var(--border); box-shadow: var(--shadow-card); background: #fff; }
.rs-cur-txt b { font-family: var(--font-display); font-weight: 700; }
.rs-meter { background: #eceef4; }
.rs-meter i, .rank-bar i, .medal-bar i { background: linear-gradient(90deg, #4a5be8, #149c8f); }
.rs-count { border-radius: 8px; font-weight: 600; background: #fff6dc; border-color: #f0d9a0; color: #7c5300; }
.rs-ladder { border-top: 1px solid var(--border); }
.rs-step span { font-size: 9px; letter-spacing: 0; padding: 0 3px; }
.rs-step.now .rank-svg { filter: drop-shadow(0 4px 8px rgba(74, 91, 232, .35)); animation: none; }
.rank-card { background: linear-gradient(120deg, #eef0fd, #f6f8ff 55%, #eaf7f5); border-color: #dfe3f5; border-radius: 16px; }
.rank-name { font-family: var(--font-display); font-weight: 700; }
.rank-bar { background: #e6e9f3; }
.rank-stats div { border-radius: 10px; border-color: #e3e6f2; background: #fff; }
.rank-stats b { font-family: var(--font-display); color: var(--ink); }
.ladder-title { font-weight: 700; }
.lad-row { border-radius: 12px; }
.lad-row.now { background: var(--accent-soft); border-color: #c9cff7; box-shadow: none; }
.lad-txt b { font-weight: 600; }
.lad-req { border-radius: 6px; font-weight: 600; color: var(--accent-deep); background: var(--accent-soft); }
.lad-now { border-radius: 6px; letter-spacing: .08em; font-weight: 700; background: var(--accent); }
.medal-card { border-radius: 14px; box-shadow: var(--shadow-card); }
.medal-name { font-weight: 600; }

/* ---------- buttons: solid, grounded, no bounce ---------- */
.btn {
  border-radius: 10px; font-weight: 600; font-family: var(--font-body);
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(27, 42, 91, .2);
}
.btn:hover:not(:disabled) {
  opacity: 1; transform: none; background: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 14px -6px rgba(74, 91, 232, .6);
}
.btn.ghost, .btn.line { background: #fff; color: var(--accent); border: 1px solid #c7cdef; box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.ghost:hover:not(:disabled), .btn.line:hover:not(:disabled) { background: #f6f7fe; border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 1px 2px rgba(27, 42, 91, .06); }
.btn.danger { background: #fff; color: #d83a3a; border: 1px solid #f1c3c3; }
.btn.danger:hover:not(:disabled) { background: #fef3f3; border-color: #d83a3a; }
.btn.small { border-radius: 8px; font-weight: 600; }
.btn.tiny { border-radius: 7px; font-weight: 600; }
.rankup-card .btn { background: var(--gold); color: #3b2a00; }
.rankup-card .btn:hover:not(:disabled) { background: #f0a51f; }
/* a ghost button on a dark card has to stay light */
.rankup-card .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }

/* ---------- story shelves ---------- */
.level-title { font-family: var(--font-display); font-weight: 700; }
.level-title .lvl-pill { border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
.story-card { border-radius: 14px; box-shadow: var(--shadow-card); }
.story-card:hover { transform: none; box-shadow: 0 1px 2px rgba(27, 42, 91, .06), 0 16px 30px -18px rgba(27, 42, 91, .4); border-color: #c9cff7; }
.story-meta .genre-tag { border-radius: 6px; background: #f1f3fa; color: #55607e; font-weight: 600; }
.lock-overlay { border-radius: 14px; background: rgba(245, 246, 250, .82); color: #4a5470; }

/* ---------- reader ---------- */
.reader-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.reader-text { font-size: 17.5px; line-height: 1.8; border-radius: 12px; background: #fff; border-color: var(--border); color: #2b3352; }
.pg-btn { width: 42px; height: 42px; border-radius: 50%; color: #3a4463; }
.pg-btn:hover:not(:disabled) { transform: none; border-color: var(--accent); color: var(--accent-deep); }
#finishBtn.pg-last { animation: none; }
.after-title { font-weight: 600; }
.reader-text.as-pages .bk-page { border-radius: 12px; border-color: var(--border); }
.pb-caption { border-radius: 14px; font-size: 18px; }
.pb-scene { border-radius: 14px; }
.pb-dot.on { background: var(--accent); }

/* ---------- quiz, recommendations, choices ---------- */
.quiz-q { font-weight: 600; }
.quiz-opt { border-radius: 10px; font-weight: 500; }
.quiz-opt:hover:not(.right):not(.wrong) { border-color: var(--accent); }
.quiz-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.right { border-color: var(--green); background: #ecfdf3; }
.quiz-opt.wrong { border-color: #e86a6a; background: #fef2f2; }
.quiz-feedback { font-weight: 600; }
.rec-answer { border-radius: 12px; font-weight: 500; }
.rec-answer:hover { border-color: var(--accent); background: #f7f8fe; transform: none; }
.rec-reason { border-radius: 12px; background: #f7f8fe; border-color: var(--border); }
.rec-card { border-radius: 14px; box-shadow: var(--shadow-card); }
.avatar-opt, .lvl-opt, .mk-opt { border-radius: 12px; border-color: var(--line); }
.avatar-opt:hover, .mk-opt:hover { transform: none; border-color: #b9c2f5; }
.avatar-opt.sel, .lvl-opt.sel, .mk-opt.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.avatar-opt.sel img { outline-color: var(--accent); }
.avatar-opt.sel small { color: var(--accent-deep); font-weight: 600; }
.mk-book { border-radius: 12px; }
.mk-book:hover { border-color: var(--accent); }
.mk-thumb { border-radius: 8px; }

/* ---------- dialogs, toasts, ceremonies ---------- */
.modal-back { background: rgba(18, 28, 69, .52); }
.modal-card { border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 30px 70px -20px rgba(18, 28, 69, .5); padding: 26px 28px; }
.modal-x { width: 32px; height: 32px; border-radius: 9px; background: #f1f2f7; color: #55607e; font-size: 0; }
.modal-x .ico { width: 16px; height: 16px; margin: 0; vertical-align: 0; }
.modal-x:hover { background: #e6e8f0; }
.toast { background: var(--navy); border-radius: 10px; font-weight: 600; box-shadow: 0 12px 30px -8px rgba(18, 28, 69, .6); }
.toast-medal { background: linear-gradient(120deg, #8a5e00, #c9922b 65%, #e3b85a); }
.medal-pop-back, .medal-pop { background: rgba(18, 28, 69, .6); }
.medal-pop-card { border-radius: 18px; }
.medal-pop-card h3 { font-weight: 700; }
.medal-pop-kicker { color: #c9922b; font-family: var(--font-display); }
.rankup { background: rgba(18, 28, 69, .78); }
.rankup-card { background: linear-gradient(170deg, #1b2a5b, #121c45); border-radius: 22px; }
.rankup-kicker { color: var(--gold); font-family: var(--font-display); }
.rankup-card h2 { font-weight: 700; }
.gate-card { border-radius: 18px; }
.gate-lock { font-size: 0; line-height: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.gate-lock .ico { width: 40px; height: 40px; margin: 0; color: var(--navy); }

/* ---------- fields (make-a-book, story manager) ---------- */
.field label { font-size: 12.5px; font-weight: 600; color: #55607e; letter-spacing: .01em; }
.field input, .field select, .field textarea { border-radius: 9px; border-color: var(--line); font-size: 14.5px; background-color: #fcfcfe; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background-color: #fff; box-shadow: var(--focus-ring); }
.gate-card input { border-radius: 9px; border-color: var(--line); }
.gate-card input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.gate-err { border-radius: 9px; }

/* ---------- story manager ---------- */
.upload-zone { border: 2px dashed #c5cbe0; border-radius: 14px; background: #f7f8fc; }
.upload-zone:hover { transform: none; border-color: var(--accent); background: #f5f6fe; }
.upload-zone > div:first-child { font-size: 0 !important; line-height: 1 !important; min-height: 36px; display: flex; align-items: center; justify-content: center; }
.upload-zone > div:first-child .ico { width: 34px; height: 34px; margin: 0; color: var(--accent); }
.upload-zone > div:first-child .ico > svg { stroke-width: 1.6; }
.fmt-banner { border-radius: 12px; }
.rights { border-radius: 10px; border-color: var(--line); background: #f8f9fd; }
.rights input { accent-color: var(--accent); }
.store-stats .stat { border-radius: 12px; background: #f7f8fc; border-color: var(--border); }
.store-stats b { font-family: var(--font-display); color: var(--ink); }
table.list th { font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; color: #6b7490; border-bottom-color: var(--line); }
table.list th, table.list td { padding: 11px 10px; }
table.list tbody tr:hover { background: #f8f9fd; }
.pill, .type-tag { border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.ok { background: #ecfdf3; color: #15803d; }
.pill.pic { background: #f1f3fa; color: #55607e; }
.sq-tabs { border-bottom-color: var(--border); }
.sq-tab { border-radius: 8px; border-color: var(--line); color: var(--muted); font-weight: 600; }
.sq-tab:hover { border-color: #b9c2f5; color: var(--accent-deep); }
.sq-tab.on { background: var(--accent-soft); border-color: #c9cff7; color: var(--accent-deep); box-shadow: none; }
.pv-q { border-radius: 12px; }
.pv-letter { border-radius: 5px; background: #eef0f6; color: #55607e; }

/* ---------- UI icons (see ui-icons.js) ---------- */
.ico {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 1.1em; height: 1.1em; margin-right: .14em; vertical-align: -.19em;
}
.ico-end { margin-right: 0; margin-left: .14em; }
.ico-e { display: none !important; }
.ico > svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2 > .ico, h3 > .ico, h4 > .ico, th > .ico, .card h2 .ico { color: var(--accent); }
.btn .ico, .token-chip .ico, .mode-btn .ico, .say-choice .ico { margin: 0; }
.mode-btn .ico { width: 1.25em; height: 1.25em; vertical-align: -.26em; }
.trail-title .ico, .q-meta .ico, .lad-req .ico, .rs-count .ico, .rank-stats .ico { color: #b8860b; }
footer .ico { color: var(--accent); }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  header.topbar { padding: 8px 12px; gap: 8px; }
  .topbar-logo { width: 32px; height: 32px; border-radius: 9px; }
  header.topbar h1 { font-size: 15px; }
  .card { padding: 18px 16px; }
  .art-banner { height: 150px; margin: -18px -16px 16px; border-radius: 15px 15px 0 0; }
  .mode-btn { min-width: calc(50% - 4px); }
}

/* ---------- print stays plain paper ---------- */
@media print {
  body { background: #fff; }
  header.topbar { background: #fff; color: var(--ink); box-shadow: none; }
  header.topbar::before { display: none; }
  header.topbar h1 { color: var(--ink); }
}
