/* Gissa förseningen (/gissa, js/guess-page.js). Samma grund som punktlighetssidan (vanlig sida som går att scrolla,
   färgerna från tokens.css så att mörkt läge följer med), och samma rutor, chips och listor. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); }
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; display: grid; gap: 16px; }
a { color: var(--accent); }
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; text-wrap: balance; }
.lead { margin: 6px 0 0; color: var(--muted); max-width: 40em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 14px; display: grid; gap: 2px; }
.list li + li { border-top: 1px solid var(--line); }
.main { font-weight: 600; }
.sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sub b { color: var(--fg); }
.empty { padding: 20px 14px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); max-width: 44em; }
.note p { margin: 0 0 8px; }

/* Sträckorna som chips, som favoriterna på punktlighetssidan */
.gs-routes { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.gs-routes button { font: 600 13px var(--font); min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--fg); cursor: pointer; }
.gs-routes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.gs-routes button span { color: var(--muted); font-weight: 400; }
.gs-routes button:focus-visible, .gs-btn:focus-visible, .gs-step:focus-visible, .gs-card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.gs-cards { display: grid; gap: 16px; }
.gs-card { padding: 16px; display: grid; gap: 10px; }
.gs-card p { margin: 0; }
.gs-eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.gs-scope, .gs-muted, .gs-src, .gs-detail { font-size: 13.5px; color: var(--muted); }
.gs-prev { font-size: 13.5px; }
.gs-lead { font-size: 15px; }
.gs-lead:focus { outline: none; }

/* Facit: den stora siffran som på punktlighetens delningsbild */
.gs-answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.gs-big { font: 800 44px/1 var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gs-what { color: var(--muted); font-weight: 600; }
.gs-score { display: flex; align-items: center; gap: 4px; }
.gs-score i { width: 18px; height: 18px; border-radius: 4px; background: var(--line); }
.gs-score i.on { background: var(--ok); }
.gs-score b { margin-left: 8px; font: 800 18px var(--font); font-variant-numeric: tabular-nums; }

/* Gissningen: − värde + och ett reglage under. Knapparna är 44 px så att de går att träffa på telefonen. */
.gs-pick { display: flex; align-items: center; justify-content: center; gap: 16px; }
.gs-value { min-width: 4.5em; text-align: center; font: 800 40px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.gs-step { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 700 24px/1 var(--font); cursor: pointer; touch-action: manipulation; }
.gs-step:hover { border-color: var(--muted); }
.gs-card input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); touch-action: pan-y; }
.gs-btn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--accent); color: var(--on-accent); font: 800 15px var(--font); cursor: pointer; }
.gs-btn:hover { opacity: .92; }
.gs-btn.ghost { background: var(--panel); color: var(--fg); border: 1px solid var(--line); font-weight: 700; }
.gs-btn.ghost:hover { border-color: var(--muted); opacity: 1; }
.gs-btn svg { width: 18px; height: 18px; flex: none; }

.gs-history { display: grid; gap: 10px; }
.gs-hhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gs-streak { font-weight: 700; color: var(--ok); }

@media (max-width: 560px) {
  h1 { font-size: 23px; }
  .gs-big { font-size: 38px; }
  .list li { padding: 10px 12px; }
}
@media (forced-colors: active) {
  .gs-score i { border: 1px solid CanvasText; background: Canvas; }
  .gs-score i.on { background: Highlight; }
  .gs-btn { border: 1px solid ButtonText; }
}
