:root {
  --bg: #efe9dc;
  --card: #fbf8f1;
  --card-2: #f3ede0;
  --ink: #1e2128;
  --ink-2: #4b505c;
  --ink-3: #747985;
  --line: #ddd4c2;
  --line-strong: #bdb19a;
  --primary: #23395b;
  --primary-ink: #ffffff;
  --accent: #9b2c1f;
  --accent-ink: #ffffff;
  --ok: #2c6a3d;
  --ok-bg: #e2eedf;
  --bad: #a3312a;
  --bad-bg: #f6e0db;
  --half: #a06a12;
  --info-bg: #f5ebcf;
  --tile: #ffffff;
  --radius: 12px;
  --mono: "Courier New", Courier, ui-monospace, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418;
    --card: #1b1e24;
    --card-2: #23272e;
    --ink: #ece7db;
    --ink-2: #b9b5ab;
    --ink-3: #8d8a82;
    --line: #2f343c;
    --line-strong: #4a505a;
    --primary: #9db9e6;
    --primary-ink: #0f1520;
    --accent: #e8705b;
    --accent-ink: #1a0f0d;
    --ok: #86c896;
    --ok-bg: #1c3123;
    --bad: #f1907f;
    --bad-bg: #3b201c;
    --half: #e0b45a;
    --info-bg: #332b17;
    --tile: #262a32;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121418; --card: #1b1e24; --card-2: #23272e; --ink: #ece7db; --ink-2: #b9b5ab; --ink-3: #8d8a82;
  --line: #2f343c; --line-strong: #4a505a; --primary: #9db9e6; --primary-ink: #0f1520; --accent: #e8705b;
  --accent-ink: #1a0f0d; --ok: #86c896; --ok-bg: #1c3123; --bad: #f1907f; --bad-bg: #3b201c; --half: #e0b45a;
  --info-bg: #332b17; --tile: #262a32; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.75rem; }
.h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.center { text-align: center; }
.spacer { flex: 1; }
.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; flex: none; }

.page {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px 16px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 6px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: var(--ink); text-decoration: none;
}
.iconbtn:active { background: var(--card-2); }
.iconbtn .ic { width: 24px; height: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: .9rem; font-weight: 700; background: var(--card);
}

/* hero */
.hero { text-align: center; padding: 36px 0 20px; padding-top: calc(36px + env(safe-area-inset-top)); }
.logo {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-ink);
}
.logo-ic { width: 38px; height: 38px; }
.hero h1 { font-size: 2.1rem; margin-bottom: 4px; }
.sub { color: var(--ink-2); font-family: var(--mono); margin: 0; }

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
}
details.card > summary {
  cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px;
  min-height: 28px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; margin-left: auto; font-family: var(--mono); font-size: 1.3rem; color: var(--ink-3); }
details.card[open] > summary::after { content: "–"; }
details.card[open] > summary { margin-bottom: 12px; }
.label { display: block; font-size: .8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); margin-bottom: 6px; }
.section-title { font-size: 1.2rem; margin: 24px 0 12px; }

.profile .rank { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.rank-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.rank-stars { text-align: right; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.rank-stars .label { margin: 4px 0 0; }

/* inputs and buttons */
.input {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--tile); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 12px 14px; min-height: 50px; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.input.wrong { border-color: var(--bad); background: var(--bad-bg); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 18px; border-radius: 10px;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  color: var(--ink); background: var(--card); border: 1.5px solid var(--line-strong);
  cursor: pointer; touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn-block { display: flex; width: 100%; margin: 0 0 12px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); margin-top: 8px; }
.btn-danger { background: var(--bad); color: var(--card); border-color: var(--bad); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); font-weight: 600; }
.row { display: flex; gap: 10px; margin: 0 0 12px; }
.row .btn { flex: 1; }
.stack { margin-top: 8px; }

/* badges and stars */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; font-family: var(--mono); letter-spacing: .02em; }
.badge-lvl { border: 1px solid currentColor; }
.lvl1 { color: var(--ok); }
.lvl2 { color: var(--primary); }
.lvl3 { color: var(--accent); }
.badge-run { background: var(--info-bg); color: var(--half); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.stars { white-space: nowrap; letter-spacing: 1px; }
.star { color: var(--line-strong); }
.star.on { color: #d49a1a; }

/* case list */
.caselist { display: grid; gap: 14px; }
.casecard { display: block; text-decoration: none; color: inherit; position: relative; padding-top: 18px; }
.casecard-tab {
  position: absolute; top: 0; left: 14px; padding: 2px 12px 4px; font-size: .78rem; font-weight: 700;
  background: var(--card-2); border: 1px solid var(--line); border-bottom: none; border-radius: 8px 8px 0 0;
  color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em;
}
.casecard-body { background: var(--card); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 14px 16px; }
.casecard:active .casecard-body { background: var(--card-2); }
.casecard-title { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.casecard-place { color: var(--ink-3); font-size: .9rem; margin-bottom: 10px; }
.casecard-meta { display: flex; align-items: center; gap: 8px; }

.footer-links { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.footer-links a { display: flex; align-items: center; gap: 10px; padding: 12px 4px; text-decoration: none; font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line); }

/* case file */
.file { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 8px; }
.file-head { display: flex; align-items: center; margin-bottom: 10px; }
.place { font-family: var(--mono); color: var(--ink-3); font-size: .9rem; }
.story { font-family: var(--serif); font-size: 1.05rem; }
.case-title { font-size: 1.5rem; }

.suspects { display: grid; gap: 10px; margin-bottom: 16px; }
.suspect {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font: inherit; color: inherit; position: relative;
}
details .suspect { background: var(--card-2); }
.suspect.selectable { cursor: pointer; border-width: 1.5px; border-color: var(--line-strong); }
.suspect.selectable:active { background: var(--card-2); }
.suspect.ruled-out { opacity: .55; cursor: not-allowed; }
.ruled-stamp { position: absolute; right: 12px; top: 10px; color: var(--bad); border: 2px solid var(--bad); padding: 0 6px; font-weight: 700; text-transform: uppercase; transform: rotate(-6deg); font-size: .8rem; }
.avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  background: var(--card-2); border: 1.5px solid var(--line-strong); color: var(--ink-2);
}
.suspect-name { font-weight: 700; }
.suspect-role { color: var(--ink-3); font-size: .9rem; margin-bottom: 4px; }
.suspect-info { font-size: .95rem; }

/* board */
.progress { height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); margin: 6px 0 6px; }
.progress-bar { height: 100%; background: var(--ok); transition: width .4s ease; }
.stations { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.station {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 12px; text-decoration: none; color: inherit; min-height: 118px;
}
.station:active { background: var(--card-2); }
.station.done { border-color: var(--ok); background: var(--ok-bg); }
.st-ic { width: 26px; height: 26px; color: var(--primary); margin-bottom: 6px; }
.station.done .st-ic { color: var(--ok); }
.st-name { font-weight: 700; font-family: var(--serif); font-size: 1.1rem; }
.st-topic { font-size: .85rem; color: var(--ink-2); }
.st-status { margin-top: auto; padding-top: 6px; font-size: .8rem; font-weight: 700; font-family: var(--mono); display: inline-flex; align-items: center; gap: 4px; }
.st-status.ok { color: var(--ok); }

.clues { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.clue { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 10px 12px; font-family: var(--serif); }
.clue-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 2px; font-family: var(--mono); }

.confirm { background: var(--bad-bg); border-radius: var(--radius); padding: 14px; margin-top: 8px; }

/* station */
.st-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.st-head .st-ic { margin: 0; width: 32px; height: 32px; }
.dots { margin-left: auto; display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.dot.cur { border-color: var(--primary); }
.dot.ok { background: var(--ok); border-color: var(--ok); }
.dot.half { background: var(--half); border-color: var(--half); }
.dot.bad { background: var(--bad); border-color: var(--bad); }

.instr { font-weight: 700; margin-bottom: 10px; }
.q {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.6;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.blank { display: inline-block; min-width: 2.6em; padding: 0 4px; border-bottom: 2.5px solid var(--primary); color: var(--primary); font-family: var(--mono); font-weight: 700; text-align: center; line-height: 1.2; }
.options { display: grid; gap: 10px; margin-bottom: 12px; }
.opt {
  font: inherit; font-size: 1.05rem; text-align: left; color: var(--ink);
  background: var(--tile); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 14px 16px; min-height: 54px; cursor: pointer; touch-action: manipulation;
}
.opt:active { background: var(--card-2); }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.opt:disabled { cursor: default; }

.gapform { margin-bottom: 8px; }
.gap-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gap-num { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.err { color: var(--bad); font-weight: 600; min-height: 1.4em; margin-bottom: 4px; }
.hint { color: var(--ink-3); margin: 0 0 10px; }
.hint.warn { color: var(--half); font-weight: 700; }

.answer-line {
  min-height: 64px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px;
  padding: 10px; margin-bottom: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--card);
}
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tile {
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--tile); border: 1.5px solid var(--line-strong); border-bottom-width: 3px; border-radius: 9px;
  padding: 8px 12px; min-height: 46px; min-width: 44px; cursor: pointer; touch-action: manipulation;
}
.tile.in { border-color: var(--primary); }
.tile.used { visibility: hidden; }

.q.spot { line-height: 2.3; }
.part {
  font: inherit; color: inherit; background: var(--card-2); border: 1.5px solid var(--line-strong); border-radius: 8px;
  padding: 4px 8px; cursor: pointer; touch-action: manipulation; line-height: 1.5;
}
.part.marked { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.part.okpart { border-color: var(--ok); color: var(--ok); }
.part:disabled { cursor: default; }

.fb { border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; border: 1.5px solid; }
.fb.ok { background: var(--ok-bg); border-color: var(--ok); }
.fb.bad { background: var(--bad-bg); border-color: var(--bad); }
.fb.info { background: var(--info-bg); border-color: var(--half); }
.fb-title { font-weight: 800; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.fb.ok .fb-title { color: var(--ok); }
.fb.bad .fb-title { color: var(--bad); }
.fb-sol { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.fb-exp { margin: 0; }
.filled { color: var(--ok); }
.fb.bad .filled { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ok); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.given { color: var(--ink-2); font-size: .95rem; margin-bottom: 8px; }

.rule { margin-top: 20px; }
.rule-body { font-size: .95rem; }
.rule-body p { margin-bottom: .7em; }
.rt { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: .92rem; }
.rt td { border-top: 1px solid var(--line); padding: 7px 6px 7px 0; vertical-align: top; }
.rt td:first-child { color: var(--ink-2); width: 38%; padding-right: 10px; }

.clue-reveal {
  background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 22px 16px 16px; margin: 8px 0 14px; position: relative; font-family: var(--serif); font-size: 1.15rem;
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.stamp-small {
  position: absolute; top: -13px; left: 14px; background: var(--accent); color: var(--accent-ink);
  padding: 2px 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-radius: 4px;
}

/* report */
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px; position: relative; overflow: hidden; }
.stamp {
  position: absolute; right: 10px; top: 18px; transform: rotate(-12deg);
  border: 3px solid var(--accent); color: var(--accent); padding: 4px 10px; border-radius: 6px;
  font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em;
  animation: stamp .5s cubic-bezier(.2, 1.3, .4, 1) both;
}
.report h1 { padding-right: 120px; }
.kv, .topics { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: .95rem; }
.kv td { padding: 7px 0; border-top: 1px dashed var(--line-strong); }
.kv td:first-child { color: var(--ink-3); width: 46%; }
.topics th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-family: var(--mono); padding: 6px 0; }
.topics td { padding: 8px 0; border-top: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.ok { color: var(--ok); font-weight: 700; }
td.bad { color: var(--bad); font-weight: 700; }
.mistakes { list-style: none; padding: 0; margin: 0; }
.mistake { padding: 10px 0; border-top: 1px solid var(--line); }
.mistake:first-child { border-top: none; padding-top: 0; }

.prose ul { padding-left: 20px; }
.links { list-style: none; padding: 0; }
.links li { padding: 8px 0; border-top: 1px solid var(--line); }
code { font-family: var(--mono); word-break: break-all; color: var(--ink-2); }

/* hero with illustration */
.hero-img {
  position: relative; margin: 0 -16px 16px; min-height: 236px;
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 12, 20, .25), rgba(8, 12, 20, 0) 35%, rgba(8, 12, 20, .88)); }
.hero-top, .hero-text { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: flex-end; padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
.hero-top .iconbtn { color: #fff; background: rgba(0, 0, 0, .38); }
.hero-text { padding: 0 16px 18px; }
.hero-text h1 { color: #fff; font-size: 2.15rem; margin: 0 0 2px; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.hero-text .sub { color: #efe9dc; }
.iconbtn { border: none; background: transparent; cursor: pointer; padding: 0; }
.iconbtn.music .ic { width: 22px; height: 22px; }
.iconbtn.music.off { color: var(--ink-3); }
.hero-top .iconbtn.music.off { color: #c9c3b6; }

/* map */
.mapcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-bottom: 16px; }
.mapcard .fb, .mapcard .nextcase { margin: 10px 0 2px; }
.mapwrap { border-radius: 10px; overflow: hidden; background: #1d3a4f; }
.mapwrap.travel { border: 1px solid var(--line); margin-bottom: 14px; }
.map-svg { display: block; width: 100%; height: auto; }
.route { fill: none; stroke: #b3261e; stroke-width: 11; stroke-dasharray: 26 17; stroke-linecap: round; }
.route-mask { fill: none; stroke: #fff; stroke-width: 44; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.8s cubic-bezier(.45, 0, .25, 1) forwards; }
.pin { cursor: pointer; }
.pin-hit { fill: transparent; }
.pin-dot { fill: #fbf8f1; stroke: #23395b; stroke-width: 8; }
.pin-num { font: 700 38px var(--sans); text-anchor: middle; fill: #23395b; pointer-events: none; }
.pin.solved .pin-dot { fill: #2c6a3d; stroke: #fbf8f1; }
.pin.solved .pin-num { fill: #fff; }
.pin.locked .pin-dot { fill: #cfc5b0; stroke: #6f6553; }
.pin.locked .pin-num { fill: #5d5444; }
.pin.next .pin-dot { fill: #b3261e; stroke: #fbf8f1; }
.pin.next .pin-num { fill: #fff; }
.pin-pulse { fill: none; stroke: #b3261e; stroke-width: 9; transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
.pin-label { font: 700 46px var(--serif); fill: #1e2128; paint-order: stroke; stroke: #fbf8f1; stroke-width: 14px; stroke-linejoin: round; pointer-events: none; }
.plane-shape { fill: #1b2638; stroke: #fbf8f1; stroke-width: .9; stroke-linejoin: round; }
.plane:not(.parked) { animation: land .4s ease-in 2.85s forwards; }
@keyframes land { to { opacity: 0; } }
.travel-head { text-align: center; margin: 4px 0 10px; }
.travel-head h1 { font-size: 2rem; margin: 0; }
.arrive { opacity: 0; transform: translateY(12px); animation: arrive .5s ease-out 2.8s forwards; }

.nextcase {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 10px; margin: 0 0 12px;
}
.nextcase:active { background: var(--card-2); }
.nextcase img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.nextcase-body { flex: 1; min-width: 0; }
.nextcase-body .label { margin-bottom: 2px; color: var(--accent); }
.nextcase-title { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.25; }
.chev { transform: rotate(180deg); color: var(--ink-3); }

/* case list with thumbnails */
.caselist { gap: 10px; }
.caserow {
  display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
}
.caserow:active { background: var(--card-2); }
.caserow .thumb { width: 104px; height: 70px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card-2); }
.caserow-body { flex: 1; min-width: 0; }
.caserow-kicker { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.caserow-title { font-family: var(--serif); font-weight: 700; font-size: 1.06rem; line-height: 1.25; margin: 2px 0 6px; }
.caserow-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.caserow.locked { cursor: pointer; }
.caserow.locked .thumb { filter: grayscale(1) brightness(.75); }
.caserow.locked .caserow-title { color: var(--ink-3); }
.badge-lock { background: var(--card-2); color: var(--ink-3); display: inline-flex; align-items: center; gap: 3px; }
.badge-lock .ic { width: 12px; height: 12px; }

/* images in case views */
.file .cover { display: block; width: calc(100% + 32px); max-width: none; margin: -18px -16px 14px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.banner {
  position: relative; height: 128px; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px;
  background-size: cover; background-position: center; display: flex; align-items: flex-end;
}
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 12, 20, 0) 30%, rgba(8, 12, 20, .85)); }
.banner h1 { position: relative; z-index: 1; color: #fff; margin: 0; padding: 0 14px 10px; font-size: 1.45rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
img.avatar { width: 58px; height: 58px; object-fit: cover; padding: 0; }
.avatar.big { width: 76px; height: 76px; border: 2px solid var(--accent); }
.solution-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.solution-head .h3 { margin: 2px 0 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
@keyframes arrive { to { opacity: 1; transform: none; } }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-12deg) scale(1); opacity: 1; } }
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .stamp, .clue-reveal, .pin-pulse { animation: none; }
  .route-mask { animation-duration: .01s; }
  .arrive { animation-delay: 0s; animation-duration: .01s; }
  .progress-bar { transition: none; }
}
@media (min-width: 560px) {
  .stations { grid-template-columns: 1fr 1fr 1fr; }
}
