/* Mapcall. Colours and fonts come from theme.css; the map itself is styled in /shared/geo/map.css */
:root { --accent: #0c8f6b; --accent-ink: #ffffff; --found: #d3f1e5; --found-ink: #0a5c44; --warn: #b45309; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #3fd6ad; --accent-ink: #06231b; --found: #12382c; --found-ink: #8ff0cf; --warn: #ffb35c; } }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-body);
  padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; line-height: 1; margin: 0; }
.brand b { color: var(--accent); font-weight: 800; }
.home { color: inherit; display: inline-flex; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.intro { margin: 0; color: var(--muted); max-width: 46rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.panel summary { font-family: var(--f-display); font-weight: 800; cursor: pointer; padding: 2px 0; }
.panel[open] summary { margin-bottom: 10px; }
.panel > .row, .panel > .note { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lbl { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 6.5rem; }
.note { margin: 0; color: var(--muted); font-size: .88rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .82rem; }
.chip.sub { background: var(--surface); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.wrapseg { flex-wrap: wrap; border-radius: 16px; }
.segbtn { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.segbtn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.segbtn:disabled, .chip:disabled { opacity: .55; cursor: not-allowed; }
.check { color: var(--ink); font-size: .92rem; display: inline-flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.custom { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.custom input { width: 5.2rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.console { position: sticky; top: 0; z-index: 6; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.timer { font-family: var(--f-mono); font-weight: 500; font-size: 1.9rem; line-height: 1; min-width: 5.5ch; }
.timer small { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.timer.low { color: var(--warn); }
.entry { min-width: 0; }
.status { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; min-height: 1.2em; }
.status.ok { color: var(--found-ink); font-weight: 700; }
.status.dup { color: var(--warn); font-weight: 600; }
#guess { width: 100%; font-size: 1.15rem; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
#guess:focus { border-color: var(--accent); outline: none; }
.score { text-align: right; }
.score .n { font-family: var(--f-display); font-weight: 800; font-size: 2rem; line-height: 1; }
.score .n span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.controls { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s ease; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-weight: 700; box-shadow: var(--shadow); }
.result small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
#map.nolabels .gm-lb:not(.missl) { display: none; }
.prog { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.proghead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.proghead h2 { font-family: var(--f-display); font-size: 1rem; margin: 0; }
.progrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pc { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 9px 12px; text-align: left; font-weight: 700; font-size: .85rem; }
.pc i { position: absolute; inset: 0 auto 0 0; background: var(--found); transition: width .25s ease; }
.pc span { position: relative; }
.pc.full { color: var(--found-ink); }
.pc:disabled { cursor: default; }
.prog .note { margin-top: 10px; }
.lists { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.listbox { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.listbox h2 { font-family: var(--f-display); font-size: 1rem; margin: 0 0 8px; }
.names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.names li { background: var(--found); color: var(--found-ink); border-radius: 999px; padding: 3px 11px; font-size: .84rem; font-weight: 600; }
.listbox.miss .names li { background: color-mix(in srgb, #ff6b5e 18%, var(--surface)); color: var(--ink); }
.records { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.records h2 { font-family: var(--f-display); font-size: 1rem; margin: 0 0 8px; }
.records .none { margin: 0; color: var(--muted); }
.recstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.recstats div { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; }
.recstats dt { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.recstats dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; }
.recent { list-style: none; margin: 10px 0 0; padding: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.recfoot { margin-top: -8px; }
.foot { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
@media (max-width: 560px) {
  .console { grid-template-columns: 1fr auto; }
  .timer { grid-column: 1; } .score { grid-column: 2; grid-row: 1; } .entry { grid-column: 1 / -1; grid-row: 2; }
  .brand { font-size: 1.7rem; } .lbl { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }
