/* Shared look with /sudoku, /patiens and /fyra */
:root {
  --paper: #f4efe4;
  --paper-2: #fbf8f1;
  --ink: #1b1a17;
  --ink-2: #3b3830;
  --muted: #736d60;
  --line: #d6cdb9;
  --rule: #1b1a17;
  --entry: #2346b8;
  --sel: #ffd84a;
  --peer: #ebe3cf;
  --same: #f1dc93;
  --bad: #c4362b;
  --bad-bg: #f6d9d3;
  --good: #2f7d4f;
  --hint: #2346b8;
  --hint-bg: #dfe6fb;
  --shadow: #1b1a17;
  --grain-op: .32;
  --grain-blend: multiply;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151410; --paper-2: #1d1c17; --ink: #efe8d6; --ink-2: #cfc8b4; --muted: #9a937f;
    --line: #3a372d; --rule: #efe8d6; --entry: #93b2ff; --sel: #7d6312; --peer: #27251e; --same: #4b3f19;
    --bad: #ff8070; --bad-bg: #4a2420; --good: #6fcf97; --hint: #93b2ff; --hint-bg: #22304f; --shadow: #000;
    --grain-op: .18; --grain-blend: soft-light; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151410; --paper-2: #1d1c17; --ink: #efe8d6; --ink-2: #cfc8b4; --muted: #9a937f;
  --line: #3a372d; --rule: #efe8d6; --entry: #93b2ff; --sel: #7d6312; --peer: #27251e; --same: #4b3f19;
  --bad: #ff8070; --bad-bg: #4a2420; --good: #6fcf97; --hint: #93b2ff; --hint-bg: #22304f; --shadow: #000;
  --grain-op: .18; --grain-blend: soft-light; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.45 "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: var(--grain-op);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .38 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:where(button, a) svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.page { position: relative; z-index: 1; max-width: 1020px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-left)) 40px; }

/* ---------- masthead ---------- */
.masthead { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.mast-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-variation-settings: "opsz" 144;
  font-size: clamp(44px, 8vw, 76px);
  letter-spacing: -.035em;
  line-height: .9;
  margin: 0;
}
.mast-actions { display: flex; gap: 4px; padding-bottom: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  display: grid; place-items: center; transition: background .15s;
}
.icon-btn:hover { background: var(--peer); }
a.icon-btn { color: inherit; }
.mast-sep { width: 1px; height: 22px; background: var(--line); align-self: center; margin: 0 4px; }
.icon-btn.small { width: 34px; height: 34px; }
.dateline {
  margin-top: 12px; padding: 7px 0;
  border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.today-link { border: 0; background: none; padding: 0; font-weight: 700; letter-spacing: .08em; color: var(--entry); text-transform: uppercase; font-size: 12px; }
.today-link:hover { text-decoration: underline; }


.kbd-help { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.9; }
kbd { font: 600 11px/1 "Libre Franklin", sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: var(--paper-2); }

.primary, .ghost {
  border-radius: 99px; padding: 11px 22px; font-weight: 700; border: 1.5px solid var(--ink);
  transition: transform .08s;
}
.primary { background: var(--ink); color: var(--paper); }
.ghost { background: transparent; }
.primary:active, .ghost:active { transform: scale(.96); }
.primary.small, .ghost.small { padding: 7px 15px; font-size: 13px; }
.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 99px; font-weight: 600;
  z-index: 50; max-width: calc(100vw - 32px); text-align: center; animation: toast .25s ease-out both;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- modals ---------- */
.modal {
  border: 1.5px solid var(--ink); background: var(--paper-2); color: var(--ink);
  box-shadow: 8px 8px 0 var(--shadow); padding: 26px 28px 24px; width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 40px); overflow: auto;
}
.modal[open] { animation: pop .2s ease-out both; }
.modal::backdrop { background: color-mix(in srgb, var(--paper) 55%, transparent); backdrop-filter: blur(2px); }
.modal-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.modal-x:hover { background: var(--peer); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.fine { font-size: 12px; color: var(--muted); margin: 16px 0 0; }

.win-title { font-family: "Fraunces", Georgia, serif; font-size: 46px; line-height: 1; margin: 2px 0 8px; font-weight: 800; letter-spacing: -.03em; }
.win-sub { margin: 0; color: var(--ink-2); }
.win-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.win-stats div { text-align: center; }
.win-stats b, .stats-grid b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.win-stats span, .stats-grid span { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.win-burst { position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; background: var(--sel); opacity: .55; pointer-events: none; animation: burst .7s cubic-bezier(.2,.8,.2,1) both; }
.modal#dlg-win { overflow: hidden; }
.modal#dlg-win > *:not(.win-burst):not(.modal-x) { position: relative; }
@keyframes burst { from { transform: scale(0); } to { transform: scale(1); } }
.setting select { font: inherit; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.confirm-text { font-family: "Fraunces", Georgia, serif; font-size: 19px; margin: 4px 0 0; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }


/* ========== GeoGissa ========== */
:root { --pin: #c8372d; --opp: #2346b8; --gold: #e0a812; --hud-shadow: rgba(0,0,0,.55); }
.title span { font-style: italic; font-weight: 500; color: var(--pin); }
a.icon-btn { color: inherit; }
.mast-sep { width: 1px; height: 22px; background: var(--line); align-self: center; margin: 0 4px; }
.online { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); letter-spacing: .1em; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.online.up .dot-live { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }

/* ---------- lobby ---------- */
.lobby { margin-top: 26px; animation: rise .6s .08s cubic-bezier(.2,.7,.2,1) both; }
.nick-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nick-row span, .field > span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nick-row input, .invite-link input {
  font: inherit; font-weight: 600; padding: 8px 15px; border-radius: 99px; border: 1.5px solid var(--ink);
  background: var(--paper-2); color: var(--ink); min-width: 0;
}
.nick-row input { width: min(260px, 100%); }
.nick-row input:focus, .invite-link input:focus { outline: 2px solid var(--entry); outline-offset: 1px; }
.nick-row input.bad { border-color: var(--bad); }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.opt {
  background: var(--paper-2); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--shadow);
  padding: 20px 22px 22px; display: flex; flex-direction: column; min-width: 0;
  animation: rise .55s cubic-bezier(.2,.7,.2,1) both;
}
.options .opt:nth-child(2) { animation-delay: .07s; } .options .opt:nth-child(3) { animation-delay: .14s; }
.opt.solo { border-width: 2.5px; }
.opt-kicker { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.opt h2 { font-family: "Fraunces", Georgia, serif; font-size: 27px; font-weight: 600; line-height: 1.1; margin: 6px 0 8px; letter-spacing: -.01em; }
.opt-text { margin: 0; color: var(--ink-2); }
.opt-meta { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.opt-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rules { margin: 0; font-weight: 600; color: var(--ink-2); }
.field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.field.col { flex-direction: column; align-items: stretch; gap: 6px; }
.seg { display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--ink); border-radius: 99px; padding: 2px; }
.seg.wide { grid-auto-columns: 1fr; }
.seg button { border: 0; background: none; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 13px; transition: background .18s, color .18s; }
.seg button.active { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1.5px solid var(--line); background: var(--paper); border-radius: 99px; padding: 5px 11px; font-weight: 600; font-size: 13px; transition: border-color .15s, background .15s; }
.chips button:hover:not(:disabled) { border-color: var(--ink); }
.chips button.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chips button:disabled { opacity: .35; cursor: not-allowed; }
.searching { margin-top: 16px; text-align: center; }
.searching p { margin: 10px 0; }
.pulse-pins { display: flex; justify-content: center; gap: 12px; }
.pulse-pins i { width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); animation: bob 1.2s ease-in-out infinite; }
.pulse-pins i:nth-child(2) { animation-delay: .15s; background: var(--opp); } .pulse-pins i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 40% { translate: 0 -10px; } }
.invite { margin-top: 16px; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; font-size: 13px; }
.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--entry); cursor: pointer; }
.link:hover { text-decoration: underline; }
.credit { margin-top: 26px; text-align: center; }
.challenge-card { margin-top: 20px; border-width: 2.5px; background: color-mix(in srgb, var(--sel) 22%, var(--paper-2)); }

/* leaderboards */
.board { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: none; font-variant-numeric: tabular-nums; }
.board li { display: grid; grid-template-columns: 2.2em 1fr auto auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.board li:last-child { border-bottom: 0; }
.board li .r { color: var(--muted); font-weight: 700; font-size: 12px; }
.board li .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .s { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 16px; }
.board li .t { color: var(--muted); font-size: 12px; min-width: 3.4em; text-align: right; }
.board li.me { background: color-mix(in srgb, var(--sel) 45%, transparent); }
.board li.empty { display: block; color: var(--muted); font-style: italic; border: 0; }
.board.full { max-height: 60vh; overflow: auto; }

/* ---------- play ---------- */
.play { position: fixed; inset: 0; z-index: 10; background: #111; color: var(--ink); overflow: hidden; }
.pano { position: absolute; inset: 0; }
/* links in the panorama (Google logo, "report a problem") reveal the location — keep them visible but inert */
.pano a { pointer-events: none !important; }
.pano .gm-iv-address, .pano .gmnoprint.gm-bundled-control .gm-svpc { display: none !important; }
.shield { position: absolute; inset: 0; z-index: 2; cursor: not-allowed; }
.pano-msg { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; color: #f4efe4; font: 600 18px "Fraunces", serif; text-align: center; padding: 20px; background: #111; }

.hud-left { position: absolute; top: 14px; left: 14px; z-index: 5; display: flex; gap: 8px; }
.hud-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--hud-shadow);
}
.hud-btn:hover { background: var(--sel); }
.hud-btn.small { width: 34px; height: 34px; box-shadow: 2px 2px 0 var(--hud-shadow); }
.hud-btn.small svg { width: 17px; height: 17px; }
.hud-btn.on { background: var(--ink); color: var(--paper); }

.hud-card {
  position: absolute; top: 14px; right: 14px; z-index: 5; display: flex;
  background: var(--paper-2); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--hud-shadow);
}
.hud-card div { padding: 7px 16px 8px; border-left: 1px solid var(--line); min-width: 74px; }
.hud-card div:first-child { border-left: 0; }
.hud-card span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hud-card b { font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.timer {
  position: absolute; top: 16px; left: 50%; translate: -50% 0; z-index: 5;
  background: var(--paper-2); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--hud-shadow);
  border-radius: 99px; padding: 6px 20px; font: 600 24px/1.1 "Fraunces", Georgia, serif; font-variant-numeric: tabular-nums;
}
.timer.low { background: var(--bad); color: #fff; border-color: #000; animation: tick 1s steps(1) infinite; }
@keyframes tick { 50% { scale: 1.06; } }
.banner {
  position: absolute; top: 70px; left: 50%; translate: -50% 0; z-index: 5; white-space: nowrap;
  background: var(--ink); color: var(--paper); padding: 8px 18px; border-radius: 99px; font-weight: 700;
  animation: rise .3s ease-out both;
}

/* duel HUD */
.hud-duel {
  position: absolute; top: 14px; left: 50%; translate: -50% 0; z-index: 5; width: min(680px, calc(100vw - 140px));
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
  background: var(--paper-2); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--hud-shadow); padding: 8px 14px;
}
.hud-duel ~ .timer { top: 86px; }
.hud-duel ~ .banner { top: 140px; }
.hp { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; min-width: 0; }
.hp.opp { grid-template-columns: auto 1fr auto; }
.hp-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.hp b { font: 600 18px "Fraunces", serif; font-variant-numeric: tabular-nums; }
.hp-bar { height: 12px; border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--paper); }
.hp-bar i { display: block; height: 100%; width: 100%; background: var(--pin); transition: width .9s cubic-bezier(.2,.7,.2,1); }
.hp.me .hp-bar i { background: var(--good); }
.hp.opp .hp-bar { transform: scaleX(-1); }
.hp.opp .hp-bar i { background: var(--opp); }
.hp-mid { text-align: center; line-height: 1.1; }
.hp-mid span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hp-mid b { font: 800 20px "Fraunces", serif; }
.hp-mid b.hot { color: var(--pin); }
.hp.hit { animation: shake .45s; }
@keyframes shake { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }

/* guess map */
.guess {
  position: absolute; right: 16px; bottom: 22px; z-index: 6; width: 300px;
  display: flex; flex-direction: column; gap: 8px; opacity: .72;
  transition: width .2s ease, opacity .2s ease;
}
.guess:hover, .guess.big, .guess.pinned { opacity: 1; width: min(640px, 55vw); }
.guess.huge { width: min(1000px, 80vw); opacity: 1; }
.guess-tools { display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.guess:hover .guess-tools, .guess.pinned .guess-tools, .guess.big .guess-tools, .guess.huge .guess-tools { opacity: 1; }
.gmap { height: 200px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--hud-shadow); background: #aad3df; transition: height .2s ease; cursor: crosshair; }
.guess:hover .gmap, .guess.big .gmap, .guess.pinned .gmap { height: min(420px, 50vh); }
.guess.huge .gmap { height: min(640px, 70vh); }
.gmap.leaflet-container { cursor: crosshair; }
.guess-btn {
  border: 1.5px solid var(--ink); border-radius: 99px; padding: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: 13px;
  background: var(--paper-2); color: var(--muted); box-shadow: 3px 3px 0 var(--hud-shadow);
}
.guess-btn:not(:disabled) { background: var(--pin); color: #fff; border-color: #000; }
.guess-btn:not(:disabled):hover { filter: brightness(1.08); }
.guess-btn:disabled { cursor: default; }
.map-toggle { display: none; }

/* pins */
.pin-icon { width: 28px; height: 28px; }
.pin-icon i { position: absolute; left: 4px; top: -2px; width: 20px; height: 20px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); border: 2px solid #fff; box-shadow: 1px 2px 4px rgba(0,0,0,.45); }
.pin-icon.opp i { background: var(--opp); }
.pin-icon b { position: absolute; left: 4px; top: -2px; width: 20px; height: 20px; display: grid; place-items: center; color: #fff; font: 700 10px "Libre Franklin", sans-serif; z-index: 1; }
.flag-icon { width: 26px; height: 34px; }
.flag-icon svg { width: 26px; height: 34px; stroke: none; filter: drop-shadow(1px 2px 2px rgba(0,0,0,.5)); }
.leaflet-container { font-family: "Libre Franklin", sans-serif; }

/* round result */
.result, .final { position: absolute; inset: 0; z-index: 8; background: var(--paper); display: grid; grid-template-rows: 1fr auto; animation: fade .25s ease-out both; }
@keyframes fade { from { opacity: 0; } }
.rmap, .fmap { min-height: 0; }
.result-panel, .final-panel { border-top: 3px double var(--rule); background: var(--paper-2); padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0)); display: grid; justify-items: center; gap: 12px; }
.result-main { text-align: center; }
.result-main .pts { font: 800 44px/1 "Fraunces", Georgia, serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result-main .pts small { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.result-main .dist { margin-top: 6px; color: var(--ink-2); font-size: 16px; }
.result-main .dist b { font-weight: 700; }
.result-main .place { margin-top: 2px; color: var(--muted); font-size: 13px; }
.duel-scores { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.duel-scores .side { text-align: center; }
.duel-scores .side span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.duel-scores .side.me span { color: var(--pin); } .duel-scores .side.opp span { color: var(--opp); }
.duel-scores .side b { font: 800 34px/1.05 "Fraunces", serif; font-variant-numeric: tabular-nums; }
.duel-scores .side small { display: block; color: var(--muted); }
.duel-scores .dmg { font: 800 22px "Fraunces", serif; color: var(--bad); text-align: center; }
.duel-scores .dmg small { display: block; font: 600 11px "Libre Franklin", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pts-bar { width: min(520px, 100%); height: 10px; border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; background: var(--paper); }
.pts-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pin), var(--gold)); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.pts-bar.big { height: 14px; }
.result-actions, .final-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.result-actions .fine { margin: 0; }

/* final summary */
.final { grid-template-rows: minmax(200px, 1fr) auto; }
.final-panel { max-height: 60vh; overflow: auto; }
.final-total { font: 800 52px/1 "Fraunces", Georgia, serif; margin: 0; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.final-total small { font-size: 20px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.rounds { border-collapse: collapse; font-variant-numeric: tabular-nums; width: min(520px, 100%); }
.rounds td { padding: 5px 8px; border-bottom: 1px dotted var(--line); font-size: 14px; }
.rounds td:first-child { font-weight: 700; color: var(--muted); width: 2em; }
.rounds td:last-child { text-align: right; font-family: "Fraunces", serif; font-weight: 600; font-size: 16px; }
.rounds td.c { color: var(--ink-2); }
.final-board { width: min(520px, 100%); }
.final .invite { width: min(520px, 100%); margin: 0; }

@media (max-width: 900px) { .options { grid-template-columns: 1fr; } .opt { box-shadow: 4px 4px 0 var(--shadow); } }
@media (max-width: 700px) {
  .hud-card div { padding: 5px 9px 6px; min-width: 0; }
  .hud-card b { font-size: 16px; }
  .hud-card div:first-child { display: none; }
  .timer { top: 70px; font-size: 20px; }
  .hud-duel { top: 66px; width: calc(100vw - 28px); padding: 6px 10px; }
  .hud-duel ~ .timer { top: 130px; }
  .hp-name { display: none; }
  .guess { right: 10px; left: 10px; bottom: 10px; width: auto !important; opacity: 1; display: none; }
  .guess.open { display: flex; }
  .guess .gmap { height: 60vh !important; }
  .guess-tools { display: none; }
  .map-toggle {
    display: block; position: absolute; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0)); z-index: 6;
    border: 1.5px solid #000; border-radius: 99px; padding: 13px 24px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    background: var(--pin); color: #fff; box-shadow: 3px 3px 0 var(--hud-shadow);
  }
  .guess.open ~ .map-toggle { bottom: auto; top: 14px; right: 14px; background: var(--paper-2); color: var(--ink); }
  .result-main .pts { font-size: 36px; }
  .final-total { font-size: 40px; }
}
@media (max-width: 420px) {
  .page { padding-top: 10px; }
  .title { font-size: 44px; }
  .dateline { font-size: 11px; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition: none !important; }
}
