:root {
  --bg: #121826;
  --panel: #1c2538;
  --line: rgba(255, 255, 255, .15);
  --text: #f6efe4;
  --mist: #a8b0c4;
  --gold: #ff8a5c;
  --good: #6fd08c;
  --bad: #ff7b6b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg) radial-gradient(900px 500px at 50% -10%, #2a3a5c 0%, rgba(42, 58, 92, 0) 65%) no-repeat;
  color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 8px; width: 100%; max-width: 620px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.logo { width: 38px; height: 38px; flex: none; }
h1 { margin: 0; font-size: 19px; letter-spacing: .2em; text-transform: uppercase; }
.brand p { margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.hud { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--mist); font-size: 14px; }
.hud b { font-size: 22px; color: var(--gold); }
.round { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(18, 24, 38, .85); color: var(--text); font-size: 17px; cursor: pointer; }
@media (max-width: 400px) { .brand p { display: none; } h1 { font-size: 15px; letter-spacing: .1em; } }

main { width: 100%; max-width: 620px; margin: 0 auto; padding: 14px 16px max(24px, env(safe-area-inset-bottom)); flex: 1; display: flex; flex-direction: column; }
#card, #under { display: flex; flex-direction: column; }
#card:has(.foot) { flex: 1; }
#card > * { animation: rise .38s cubic-bezier(.2, .7, .2, 1) both; }
#card > :nth-child(2) { animation-delay: .05s; }
#card > :nth-child(3) { animation-delay: .1s; }
#card > :nth-child(n+4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.eyebrow { margin: 0 0 4px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 10px; }
.muted { color: var(--mist); font-size: 14px; }
.btn {
  display: block; width: 100%; margin-top: 10px; padding: 14px 18px; border: 0; border-radius: 12px;
  background: var(--gold); color: #2b1206; font: inherit; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  transition: transform .12s, filter .12s, opacity .2s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn:focus-visible, .round:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--mist); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* ---- the journey ---- */
.status { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--mist); }
.status b { font-size: 19px; color: var(--gold); font-variant-numeric: tabular-nums; }
.banner { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 15px; border: 1px solid var(--line); }
.banner.ok { background: rgba(111, 208, 140, .14); border-color: rgba(111, 208, 140, .5); }
.banner.no { background: rgba(255, 123, 107, .12); border-color: rgba(255, 123, 107, .45); }
.q { font-size: 22px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.opt { min-height: 54px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.opt:hover, .opt:focus-visible { border-color: var(--gold); }
.opt.picked { background: var(--gold); color: #2b1206; }
.pay { margin: 0 0 6px; font-size: 13px; }
.cards { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.cards li { padding: 6px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--gold); font-weight: 600; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.chip { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--gold); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.chip span { color: var(--gold); font-variant-numeric: tabular-nums; }
.chip.far { border-color: var(--line); opacity: .65; }
.chip.far span { color: var(--bad); }
.pick { margin: 6px 0 0; }
.pick .muted { margin: 4px 0; text-align: center; }
.leg { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 2px 2px 0; }
.leg b { font-size: 19px; }
.leg span { color: var(--gold); font-variant-numeric: tabular-nums; }
.city .dot { fill: #c9d3e6; stroke: #121826; stroke-width: 1.5; }
.city .halo { fill: none; }
.city.far .dot { fill: #5b667d; }
.city.seen .dot { fill: #7d8aa5; }
.city.goal .dot { fill: #ffd166; }
.city.goal .halo { stroke: #ffd166; stroke-width: 2; }
.city.got .dot { fill: var(--good); }
.city.here .dot { fill: #ff6b4a; stroke: #fff; stroke-width: 2; }
.city.here .halo { stroke: #ff6b4a; stroke-width: 2; }
.city.chosen .halo { stroke: #fff; stroke-width: 2.5; }
.log .d { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--mist); }
/* ---- the map ---- */
#stage { position: relative; aspect-ratio: 16 / 10; max-height: 60vh; margin: 6px 0 4px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0e2530; }
#stage[hidden] { display: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
#map.dragging { cursor: grabbing; }
#sea { fill: #0e2530; }
#frame { stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .35; }
#land path { fill: #3d5a4a; stroke: #1c3329; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trail { stroke: #ff8a65; stroke-width: 2.5; stroke-dasharray: 7 6; stroke-linecap: round; vector-effect: non-scaling-stroke; fill: none; }
.pin path { fill: #ff6b4a; stroke: #fff; stroke-width: 1.6; }
.pin circle { fill: #fff; }
.pin.drop { animation: drop .28s cubic-bezier(.3, 1.5, .5, 1); }
.pin.old path { fill: #9aa7ab; }
@keyframes drop { from { opacity: 0; } }
.truth .ring { fill: none; stroke: var(--gold); stroke-width: 3; }
.truth .dot { fill: var(--gold); stroke: #0e2530; stroke-width: 2; }
.truth .pulse { fill: none; stroke: var(--gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.tag text { font: 700 10px system-ui, sans-serif; fill: #121826; text-anchor: middle; }
.tag rect { fill: #ffd166; }
.tag.here rect { fill: #ff6b4a; }
.tag.chosen rect { fill: #fff; }
.tag { pointer-events: none; }
.zoom { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; z-index: 2; }
.zoom .round { width: 34px; height: 34px; font-size: 16px; }
.notice { margin: 10px 0 0; font-size: 14px; color: var(--bad); text-align: center; }
.reveal { text-align: center; margin: 2px 0 4px; }
.reveal h2 { margin: 0; }
.gain { text-align: center; font-size: 15px; }
.gain b { color: var(--gold); font-size: 22px; }
.row5 { margin: 8px 0; font-size: 26px; letter-spacing: 4px; }
.row5 span { display: inline-block; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.log .p { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }

.big { margin: 2px 0; font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: 18px; font-weight: 600; color: var(--mist); }
.row10 { margin: 8px 0; font-size: 22px; letter-spacing: 2px; }
.row10 span { display: inline-block; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 0; }
.stats div { padding: 9px 6px; border-radius: 12px; background: rgba(255, 255, 255, .07); text-align: center; }
.stats b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.log { list-style: none; margin: 12px 0 0; padding: 0; }
.log li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: center; }
.log .m { font-size: 15px; letter-spacing: .05em; white-space: nowrap; }
.log .a { font-weight: 600; font-size: 15px; }
.log .q { font-size: 13px; color: var(--mist); }
.foot { margin-top: auto; padding-top: 18px; text-align: center; }

dialog { width: min(520px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); }
dialog::backdrop { background: rgba(6, 9, 16, .8); }
dialog h2 { font-size: 17px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }
dialog ul { padding-left: 20px; margin: 0 0 16px; }
dialog li { margin-bottom: 8px; }
dialog p { color: var(--mist); font-size: 14px; }
dialog .more { margin: 14px 0 0; text-align: center; }
#feedback label { display: block; margin: 12px 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
#feedback select, #feedback textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #25304a; color: var(--text); font: inherit; resize: vertical; }
#feedback .fine { margin: 10px 0 0; font-size: 13px; }
.status { min-height: 20px; margin: 8px 0 0; font-size: 14px; color: var(--bad); }
.status.ok { color: var(--good); }
.petal { position: fixed; z-index: 9; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  #card > *, .row5 span, .pin.drop, .truth .pulse { animation: none; }
}

/* ---- today's top ten (added 11.11.2026) ---- */
.lb { margin: 22px 0 6px; }
.lb h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.lb ol { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 9px; font-size: 15px; }
.lb li:nth-child(odd) { background: rgba(255, 255, 255, .05); }
.lb li.me { outline: 1.5px solid currentColor; font-weight: 700; }
.lb .n { opacity: .65; font-variant-numeric: tabular-nums; }
.lb .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .p { font-variant-numeric: tabular-nums; font-weight: 700; }
.lbnote { margin: 8px 0 0; font-size: 14px; opacity: .8; }
