@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-latin.woff2") format("woff2"); font-weight: 100 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-latin-ext.woff2") format("woff2"); font-weight: 100 700; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "News"; src: url("fonts/newsreader-normal-400-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "News"; src: url("fonts/newsreader-normal-400-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --plate: #1d4f9c; --plate-ink: #ffffff;
  --bg: #eef2f6; --surface: #ffffff; --line: #c5cfdb; --text: #0e1726; --muted: #384456; --accent: #1d4f9c; --focus: #b4410b;
  --b1: #1f7a3d; --b2: #9a5b00; --b3: #b4410b; --b4: #6b7686;
  --map-bg: #f7f9fc; --map-net: #cdd5e0; --map-net-hi: #9fadc0; --map-water: #b7d1ea; --map-park: #d6e7d4; --map-rail: #93a1b4;
  --map-ink: #c2410c; --map-glow: #fb923c; --map-guess: #2f5fbf; --map-label: #1f2a3a; --map-grid: #e4e9f0; --map-city: #7d8ba1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a111d; --surface: #101a2b; --line: #263750; --text: #e9eef6; --muted: #b6c2d4; --accent: #9cc0ff; --focus: #ffc061;
  --b1: #6fdc94; --b2: #ffd166; --b3: #ff9e64; --b4: #9aa7ba;
  --map-bg: #0a111d; --map-net: #24344d; --map-net-hi: #3a4f70; --map-water: #123a63; --map-park: #12291f; --map-rail: #3d4c66;
  --map-ink: #ffc061; --map-glow: #ff9d2e; --map-guess: #8fb3ff; --map-label: #cdd7e6; --map-grid: #141f33; --map-city: #51627f;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0a111d; --surface: #101a2b; --line: #263750; --text: #e9eef6; --muted: #b6c2d4; --accent: #9cc0ff; --focus: #ffc061;
  --b1: #6fdc94; --b2: #ffd166; --b3: #ff9e64; --b4: #9aa7ba;
  --map-bg: #0a111d; --map-net: #24344d; --map-net-hi: #3a4f70; --map-water: #123a63; --map-park: #12291f; --map-rail: #3d4c66;
  --map-ink: #ffc061; --map-glow: #ff9d2e; --map-guess: #8fb3ff; --map-label: #cdd7e6; --map-grid: #141f33; --map-city: #51627f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
svg[hidden] { display: none; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 "Plex", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.topbar { display: flex; align-items: center; gap: 8px; padding: 10px max(16px, env(safe-area-inset-left)); max-width: 1180px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); text-decoration: none; letter-spacing: .01em; }
.spacer { flex: 1; }
.chip { font-size: 14px; padding: 6px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.chip[aria-current] { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; } :root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: none; } :root:not([data-theme="light"]) .i-moon { display: block; } }

main { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 40px; }
.game { padding-top: 6px; }
.head { max-width: 760px; }
.kicker { margin: 0 0 4px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
h1 { font: 500 clamp(30px, 4.6vw, 50px)/1.08 "News", Georgia, serif; margin: 0 0 10px; letter-spacing: -.01em; }
.lede { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }

.board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.sheet-wrap { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--map-bg); aspect-ratio: 1 / 1; max-height: min(78vh, 680px); width: 100%; }
#sheet { display: block; width: 100%; height: 100%; }
.len-tag { position: absolute; left: 14px; top: 10px; margin: 0; font-size: 13px; color: var(--muted); background: var(--map-bg); background: color-mix(in srgb, var(--map-bg) 82%, transparent); padding: 3px 8px; border-radius: 6px; }
.len-tag b { color: var(--text); font-weight: 600; }

.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guesses li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px 4px 4px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-left: 5px solid transparent; }
.guesses li.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .7; }
.guesses li.b1 { border-left-color: var(--b1); } .guesses li.b2 { border-left-color: var(--b2); } .guesses li.b3 { border-left-color: var(--b3); } .guesses li.b4 { border-left-color: var(--b4); }
.guesses li.ok { border-left-color: var(--b1); box-shadow: inset 0 0 0 2px var(--b1); }
.meta { margin-left: auto; font-size: 15px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.arrow { font-size: 19px; color: var(--text); width: 1.2em; text-align: center; }

.plate { display: inline-block; background: var(--plate); color: var(--plate-ink); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--plate), inset 0 0 0 3.5px #fff; line-height: 1.25; overflow-wrap: anywhere; }
.plate.ghost { background: transparent; color: var(--muted); box-shadow: none; text-transform: none; letter-spacing: 0; font-weight: 500; }
.plate.big { font-size: clamp(18px, 2.6vw, 24px); padding: 10px 16px; border-radius: 9px; box-shadow: inset 0 0 0 3px var(--plate), inset 0 0 0 5px #fff; margin: 4px 0 10px; }

.form { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.combo { position: relative; flex: 1 1 240px; min-width: 0; }
.combo input { width: 100%; font: inherit; font-size: 18px; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); min-height: 48px; }
.combo input::placeholder { color: var(--muted); opacity: 1; }
.combo input:focus { border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
[role="listbox"] { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
[role="option"] { padding: 10px 12px; border-radius: 7px; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
[role="option"][aria-selected="true"] { background: var(--line); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
[role="option"] small { color: var(--muted); font-size: 13px; }
[role="option"].none { color: var(--muted); cursor: default; }

.b { font: inherit; font-size: 16px; padding: 10px 16px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.b.primary { background: var(--plate); color: #fff; border-color: var(--plate); font-weight: 600; }
.b.ghost { background: transparent; color: var(--muted); }
.b:hover { border-color: var(--accent); }

.hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15.5px; color: var(--muted); }
.hints li { padding-left: 16px; position: relative; }
.hints li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--map-ink); }
.hints li.new { color: var(--text); }

.after { border-top: 1px solid var(--line); padding-top: 12px; }
.after:focus { outline: none; }
.verdict { margin: 0; font: 500 22px/1.25 "News", Georgia, serif; }
.facts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 15.5px; }
.facts li { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; }
.facts span { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-msg { min-height: 1.3em; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.next { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.status { margin: 0; color: var(--muted); font-size: 15px; }

.sec { padding: 34px 0 6px; border-top: 1px solid var(--line); margin-top: 34px; }
.sec .col { max-width: 760px; }
h2 { font: 500 28px/1.15 "News", Georgia, serif; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
.anchor { font-size: .6em; color: var(--muted); text-decoration: none; opacity: 0; margin-left: 6px; }
h2:hover .anchor, .anchor:focus { opacity: 1; }
.sec.small { font-size: 16px; }
.small { font-size: 15px; color: var(--muted); }
.how { padding-left: 1.3em; } .how li { margin-bottom: 6px; }
.sources { padding-left: 1.3em; font-size: 15px; } .sources li { margin-bottom: 4px; }

.stats { display: flex; gap: 26px; flex-wrap: wrap; }
.stats span { display: flex; flex-direction: column; color: var(--muted); font-size: 14px; }
.stats b { font: 500 34px/1 "News", Georgia, serif; color: var(--text); }
.days { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; }
.days span { white-space: nowrap; }
.days button { width: 100%; text-align: left; font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 9px; padding: 8px 10px; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; min-height: 52px; }
.days b { grid-row: span 2; font: 500 22px/1 "News", Georgia, serif; align-self: center; min-width: 1.4em; }
.days span { color: var(--muted); font-size: 13px; }
.days em { font-style: normal; grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.days i { font-style: normal; grid-row: 1 / span 2; grid-column: 3; align-self: center; font-weight: 600; }
.days .won button { border-left: 4px solid var(--b1); } .days .lost button { border-left: 4px solid var(--b3); } .days .open button { border-left: 4px solid var(--b2); }
.days .cur button { box-shadow: inset 0 0 0 2px var(--accent); }

.mine { margin-top: 14px; display: grid; gap: 10px; justify-items: start; }
#mine-img { width: 100%; max-width: 440px; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); display: block; }

.site-footer { max-width: 1180px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) calc(28px + env(safe-area-inset-bottom)); display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; gap: 14px; }
  .sheet-wrap { aspect-ratio: auto; height: 40svh; min-height: 240px; max-height: none; }
  h1 { font-size: 30px; }
  .lede { font-size: 16px; margin-bottom: 12px; }
  .meta { font-size: 14px; }
  .plate { font-size: 13px; }
  .guesses li { min-height: 40px; }
  .facts li { grid-template-columns: 1fr; gap: 0; }
  .guesses li.empty { min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
