/* City Disco brand tokens (Mirror Pin). Rules and reasons: docs/brand.md */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
:root {
  --bg: #f4f7f5; --card: #ffffff; --glass: rgba(255, 255, 255, .86); --text: #0f1f2e; --muted: #5a6b78; --line: #e2e9e5;
  --accent: #0e9f6e; --accent-ink: #047857; --accent-soft: #dff5ec; --on-accent: #ffffff;
  /* Filled controls that carry text: the darker mint, so white text reads at 4.5:1 or better. Dark theme: the bright accent with dark text. */
  --accent-fill: var(--accent-ink);
  --spark: #ffc53d; --spark-ink: #8a5c00; --spark-soft: #fff4d6;
  --gor: #2f7cf6; --ye: #f97316; --dene: #e0457b;
  --shadow: 0 1px 2px rgba(15, 31, 46, .05), 0 10px 28px rgba(15, 31, 46, .09);
  --shadow-sm: 0 1px 2px rgba(15, 31, 46, .06), 0 4px 12px rgba(15, 31, 46, .07);
  --grad: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--spark)));
  --f-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Body text is the device's own UI face on purpose (San Francisco, Segoe UI, Roboto): nothing to download, and it reads like the OS. */
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px; --rail: 0px; --side: 0px;
  /* Game layer (hero, quest board, badges, completion): same brand, warmer surfaces. Never on the map. */
  --game: linear-gradient(155deg, color-mix(in srgb, var(--accent) 16%, var(--card)) 0%, var(--card) 55%, color-mix(in srgb, var(--spark) 18%, var(--card)) 100%);
  --game-line: color-mix(in srgb, var(--accent) 22%, var(--line));
}
:root[data-theme="dark"] {
  --bg: #141c21; --card: #1e2a31; --glass: rgba(30, 42, 49, .88); --text: #edf3f1; --muted: #9db0b8; --line: #2e3c45;
  --accent: #34d399; --accent-ink: #6ee7b7; --accent-soft: #173a30; --on-accent: #052e22; --accent-fill: var(--accent);
  --spark: #ffd66b; --spark-ink: #ffd66b; --spark-soft: #3a3016;
  --gor: #6aa5ff; --ye: #ffa15c; --dene: #ff86ad;
  --shadow: 0 10px 28px rgba(0, 0, 0, .4); --shadow-sm: 0 4px 12px rgba(0, 0, 0, .35);
}
/* Colour themes you unlock */
:root[data-accent="ocean"] { --accent: #0284c7; --accent-ink: #0369a1; --accent-soft: #e0f2fe; }
:root[data-accent="sunset"] { --accent: #ea580c; --accent-ink: #c2410c; --accent-soft: #ffedd5; }
:root[data-accent="berry"] { --accent: #db2777; --accent-ink: #be185d; --accent-soft: #fce7f3; }
:root[data-accent="royal"] { --accent: #7c3aed; --accent-ink: #6d28d9; --accent-soft: #ede9fe; }
:root[data-accent="gilded"] { --accent: #b45309; --accent-ink: #92400e; --accent-soft: #fef3c7; }
:root[data-theme="dark"][data-accent="ocean"] { --accent: #38bdf8; --accent-ink: #7dd3fc; --accent-soft: #0c3049; --on-accent: #062033; }
:root[data-theme="dark"][data-accent="sunset"] { --accent: #fb923c; --accent-ink: #fdba74; --accent-soft: #42220f; --on-accent: #2a1205; }
:root[data-theme="dark"][data-accent="berry"] { --accent: #f472b6; --accent-ink: #f9a8d4; --accent-soft: #46132f; --on-accent: #2c0a1d; }
:root[data-theme="dark"][data-accent="royal"] { --accent: #a78bfa; --accent-ink: #c4b5fd; --accent-soft: #2e1f5c; --on-accent: #1a1036; }
:root[data-theme="dark"][data-accent="gilded"] { --accent: #fbbf24; --accent-ink: #fcd34d; --accent-soft: #3d2c08; --on-accent: #2a1d02; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--accent-ink); }
[hidden] { display: none !important; }
#app { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
body.on-map #app { max-width: none; padding: 0; }
.gor { --c: var(--gor); } .ye { --c: var(--ye); } .dene { --c: var(--dene); }
.grow { flex: 1; min-width: 0; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.24em; flex: none; }
.ic.sm { width: 1em; height: 1em; vertical-align: -.15em; margin-right: .25em; }
.ic.big { width: 28px; height: 28px; }
.flag { display: inline-block; width: 1.05em; height: .74em; border-radius: 3px; margin-right: .38em; vertical-align: -.04em; box-shadow: 0 0 0 1px rgba(15, 23, 42, .14); flex: none; }
.fl-nl { background: linear-gradient(#ae1c28 0 33.4%, #fff 0 66.6%, #21468b 0); }
.fl-be { background: linear-gradient(90deg, #111 0 33.4%, #fdda24 0 66.6%, #ef3340 0); }
.fl-de { background: linear-gradient(#000 0 33.4%, #dd0000 0 66.6%, #ffce00 0); }
.fl-lu { background: linear-gradient(#ef3340 0 33.4%, #fff 0 66.6%, #00a3e0 0); }
.fl-fr { background: linear-gradient(90deg, #002395 0 33.4%, #fff 0 66.6%, #ed2939 0); }
.fl-se { background: linear-gradient(90deg, transparent 31.25%, #fecc00 0 43.75%, transparent 0), linear-gradient(transparent 40%, #fecc00 0 60%, transparent 0), #006aa7; }
.fl-ch { background: linear-gradient(#fff, #fff) center / 14% 62% no-repeat, linear-gradient(#fff, #fff) center / 44% 20% no-repeat, #da291c; }
.fl-tr { background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 300 200%27%3E%3Crect width=%27300%27 height=%27200%27 fill=%27%23e30a17%27/%3E%3Ccircle cx=%27108%27 cy=%27100%27 r=%2750%27 fill=%27%23fff%27/%3E%3Ccircle cx=%27120.5%27 cy=%27100%27 r=%2740%27 fill=%27%23e30a17%27/%3E%3Cpolygon fill=%27%23fff%27 points=%27134.0,100.0 151.3,94.4 151.3,76.2 161.9,91.0 179.2,85.3 168.5,100.0 179.2,114.7 161.9,109.0 151.3,123.8 151.3,105.6%27/%3E%3C/svg%3E") center / cover no-repeat; }
.fl-cy { background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 300 200%27%3E%3Crect width=%27300%27 height=%27200%27 fill=%27%23fff%27/%3E%3Cpolygon fill=%27%23d57800%27 points=%2766.0,98.0 67.7,83.0 76.1,86.0 111.4,72.0 118.1,54.0 139.9,60.0 183.6,54.0 234.0,28.0 190.3,63.0 187.0,79.0 197.0,93.0 163.4,98.0 139.9,116.0 121.4,118.0 114.7,127.0 89.5,117.0%27/%3E%3Cg fill=%27none%27 stroke=%27%234e5b31%27 stroke-width=%279%27 stroke-linecap=%27round%27%3E%3Cpath d=%27M152 160 Q111 168 78 140%27/%3E%3Cpath d=%27M148 160 Q189 168 222 140%27/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat; }
.fl-gr { background: linear-gradient(#fff, #fff) 0 25% / 37% 11.1% no-repeat, linear-gradient(#fff, #fff) 16% 0 / 7.4% 55.6% no-repeat, linear-gradient(#0d5eaf, #0d5eaf) 0 0 / 37% 55.6% no-repeat, repeating-linear-gradient(#0d5eaf 0 11.11%, #fff 0 22.22%); }
.fl-at { background: linear-gradient(#c8102e 33.3%, #fff 0 66.7%, #c8102e 0); }
.fl-it { background: linear-gradient(90deg, #009246 33.3%, #fff 0 66.7%, #ce2b37 0); }
.fl-gb { background: url(flags/gb.svg) center / cover; }
.fl-es { background: url(flags/es.svg) center / cover; }
.fl-pt { background: url(flags/pt.svg) center / cover; }
.fl-si { background: url(flags/si.svg) center / cover; }
.fl-hr { background: url(flags/hr.svg) center / cover; }
.fl-ba { background: url(flags/ba.svg) center / cover; }
.fl-me { background: url(flags/me.svg) center / cover; }
.fl-rs { background: url(flags/rs.svg) center / cover; }
.fl-xk { background: url(flags/xk.svg) center / cover; }
.fl-mk { background: url(flags/mk.svg) center / cover; }
.fl-al { background: url(flags/al.svg) center / cover; }
.fl-bg { background: url(flags/bg.svg) center / cover; }
.fl-ro { background: url(flags/ro.svg) center / cover; }
.fl-ie { background: url(flags/ie.svg) center / cover; }
.fl-cz { background: url(flags/cz.svg) center / cover; }
.fl-pl { background: url(flags/pl.svg) center / cover; }
.fl-sk { background: url(flags/sk.svg) center / cover; }
.fl-hu { background: url(flags/hu.svg) center / cover; }
.fl-no { background: url(flags/no.svg) center / cover; }
.fl-fi { background: url(flags/fi.svg) center / cover; }
.fl-is { background: url(flags/is.svg) center / cover; }
.fl-ee { background: url(flags/ee.svg) center / cover; }
.fl-lv { background: url(flags/lv.svg) center / cover; }
.fl-lt { background: url(flags/lt.svg) center / cover; }
.fl-mt { background: url(flags/mt.svg) center / cover; }
.fl-md { background: url(flags/md.svg) center / cover; }
.fl-li { background: url(flags/li.svg) center / cover; }
.fl-ua { background: url(flags/ua.svg) center / cover; }
.fl-ad { background: url(flags/ad.svg) center / cover; }
.fl-mc { background: url(flags/mc.svg) center / cover; }
.fl-sm { background: url(flags/sm.svg) center / cover; }
.fl-ge { background: url(flags/ge.svg) center / cover; }
.fl-am { background: url(flags/am.svg) center / cover; }
.fl-az { background: url(flags/az.svg) center / cover; }
.fl-by { background: url(flags/by.svg) center / cover; }
.fl-dk { background: linear-gradient(90deg, transparent 32.4%, #fff 0 43.2%, transparent 0), linear-gradient(transparent 42.9%, #fff 0 57.1%, transparent 0), #c8102e; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.note.flat { margin: 0; } .note.center { text-align: center; } .note.err { color: #dc2626; }

.head h1, .section h2, #sheet h3, .tc-city, .hero .ttl, .profile .lvx, .cel-h, .qc-xp, .ring.big span { font-family: var(--f-display); }

/* ── Buttons, chips, meters ──────────────────── */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 16px;
  background: var(--accent-fill); color: var(--on-accent); font-weight: 700; text-decoration: none; transition: transform .1s; text-align: center; }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .6; }
.btn.ghost { background: var(--accent-soft); color: var(--accent-ink); }
.btn.soft { background: var(--bg); color: var(--text); font-weight: 650; font-size: 14.5px; min-height: 44px; }
.btn.soft.on { background: var(--accent-soft); color: var(--accent-ink); } .btn.soft.on .ic { fill: currentColor; }
.btn.plain { background: none; color: var(--muted); font-weight: 600; min-height: 44px; }
.btn.danger { color: #dc2626; }
.btn + .btn, .actions .btn + .btn { margin-top: 8px; }
.btn.go { position: relative; overflow: hidden; }
.btn.go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 2.6s ease-in-out 1s infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.two { display: flex; gap: 8px; margin-bottom: 8px; } .two .btn { margin: 0; flex: 1; }
.actions { margin-top: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 3px 12px; scrollbar-width: none; max-width: 632px; margin: 0 auto 2px; align-items: center; }
.chips::-webkit-scrollbar { display: none; }
/* Sideways scrollers fade out at the right edge, so a cut chip or card reads as "more this way", not as clipped. */
.chips:not(.wrap), .sstrip, .pp-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips:not(.wrap)::after, .sstrip::after { content: ""; flex: none; width: 16px; }
.chip { position: relative; flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; font-weight: 600;
  box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
/* Chips look 38px tall but answer a 44px thumb (the row's 3px padding holds the extra). */
.chip::before { content: ""; position: absolute; inset: -3px 0; }
.chip small { opacity: .7; font-size: 11.5px; }
.sep { flex: none; width: 1px; height: 22px; background: var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; } .dot.big { width: 14px; height: 14px; }
.seg { display: flex; background: color-mix(in srgb, var(--line) 60%, var(--bg)); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 38px; padding: 0 10px; border-radius: 11px; font-weight: 650; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 99px; transition: width .4s; }
.meter.xp { height: 6px; margin-top: 6px; } .meter.xp i { background: var(--grad); }
.ring { width: 48px; height: 48px; flex: none; position: relative; color: var(--accent); } .ring.big { width: 84px; height: 84px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 6; } .ring .track { stroke: var(--line); }
.ring .bar { stroke: currentColor; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--text); } .ring.big span { font-size: 19px; }

/* ── Avatar and frames ───────────────────────── */
.av { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--accent-soft); flex: none; }
.av > span { font-size: 24px; line-height: 1; }
.av b { position: absolute; right: -7px; bottom: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--accent-fill); color: var(--on-accent);
  font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); }
.av.xl { width: 88px; height: 88px; border-radius: 28px; } .av.xl > span { font-size: 46px; }
.fr-bronze { box-shadow: 0 0 0 3px #c47a45; } .fr-silver { box-shadow: 0 0 0 3px #cbd5e1, 0 0 0 5px #94a3b8; }
.fr-gold { box-shadow: 0 0 0 3px #fde047, 0 0 0 5px #ca8a04, 0 0 14px rgba(234, 179, 8, .55); }
.fr-aurora { box-shadow: 0 0 0 3px #22d3ee, 0 0 0 6px #10b981, 0 0 18px rgba(34, 211, 238, .6); }
.fr-legend { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f59e0b, 0 0 0 9px #ef4444, 0 0 22px rgba(245, 158, 11, .7); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { filter: brightness(1.15) saturate(1.2); } }

/* ── Map screen ──────────────────────────────── */
#map { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 0; background: var(--bg); }
#map canvas { outline: none; }
.maplibregl-ctrl-attrib { font-size: 10px; background: var(--glass) !important; color: var(--muted) !important; border-radius: 10px !important; margin: 0 0 8px 8px !important; }
.maplibregl-ctrl-attrib a { color: inherit !important; }
.map-top { position: fixed; left: 0; right: 0; top: 0; z-index: 5; pointer-events: none; padding: calc(10px + env(safe-area-inset-top)) 0 0; }
.map-top > * { pointer-events: auto; }
.topcard { max-width: 608px; margin: 0 auto 8px; width: calc(100% - 24px); border-radius: 22px; padding: 10px 14px 10px 12px; display: flex; align-items: center; gap: 14px; }
.tc-city { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; display: flex; align-items: center; max-width: 100%; position: relative; }
/* The city name is one line of type but a 44px tap target: the hit area reaches past it, invisibly. */
.tc-city::before { content: ""; position: absolute; inset: -11px -6px; }
.tc-city .ic { color: var(--muted); margin-left: 2px; }
.tc-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fire { color: #ea580c; font-weight: 700; }
.map-top .chip { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.map-top .chip.on { background: var(--text); }
.area-row { display: none; } body.zoomed .area-row { display: flex; }
.mapctl { position: fixed; right: 12px; bottom: calc(var(--nav-h) + 90px + env(safe-area-inset-bottom)); z-index: 5; display: grid; gap: 8px; transition: opacity .2s; }
.mapctl button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.mapctl .ic { width: 21px; height: 21px; }
.mapctl .desk { display: none; }
@media (hover: hover) and (pointer: fine) { .mapctl .desk { display: grid; } }
.fab { position: fixed; left: 12px; right: 70px; max-width: 420px; bottom: calc(var(--nav-h) + 44px + env(safe-area-inset-bottom)); /* clear of the map attribution button below it */ z-index: 5; min-height: 56px; padding: 8px 16px; border-radius: 20px;
  background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 42%, transparent); display: flex; align-items: center; gap: 12px; text-align: left; transition: opacity .2s, transform .15s; }
.fab:active { transform: scale(.98); }
.fab .ic { width: 24px; height: 24px; }
.fab span { font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fab small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.fab.done { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
body.card-open .fab, body.card-open .mapctl { opacity: 0; pointer-events: none; }
.mapstate { position: fixed; inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; z-index: 3; display: grid; place-items: center; pointer-events: none;
  background: linear-gradient(110deg, var(--bg) 30%, color-mix(in srgb, var(--line) 70%, var(--bg)) 50%, var(--bg) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.ms-load { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.ms-load i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ms-card { pointer-events: auto; background: var(--card); border-radius: 24px; padding: 22px; margin: 24px; max-width: 320px; text-align: center; box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: center; }
.ms-card .ic { width: 34px; height: 34px; color: var(--muted); } .ms-card span { color: var(--muted); font-size: 14px; }

/* ── Page header and lists ───────────────────── */
.head { padding: calc(20px + env(safe-area-inset-top)) 16px 8px; display: flex; align-items: center; gap: 10px; }
.head h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.head h1 button { font: inherit; letter-spacing: inherit; text-align: left; display: flex; align-items: center; } .head h1 .ic { color: var(--muted); }
.head p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.hbtn { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.filters { position: sticky; top: 0; z-index: 4; background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 8px 16px 8px; display: grid; gap: 8px; }
.filters .chips { padding: 2px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; max-width: none; }
.searchrow { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); }
.searchrow .chip { min-height: 44px; border-radius: 14px; }
.list { padding: 6px 16px 0; display: grid; gap: 10px; } .list.flush { padding: 0; }
.ghead { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 2px 0; font-size: 14px; }
.ghead:first-child { margin-top: 2px; } .ghead span { color: var(--muted); font-size: 12.5px; }
.card { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; background: var(--card); border-radius: 20px; padding: 10px 6px 10px 10px; box-shadow: var(--shadow-sm); cursor: pointer; }
.sstrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sstrip::-webkit-scrollbar { display: none; }
.scard { flex: none; width: 148px; scroll-snap-align: start; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-align: left; color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); }
.scard img, .scard .tile { width: 100%; height: 84px; border-radius: 12px; object-fit: cover; }
.scard b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sleft { position: absolute; top: 14px; left: 14px; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .92); color: #0f172a; }
.sleft.soon, .season.soon { color: #dc2626; }
.season { font-weight: 600; }
.tile { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.tile .ic { width: 24px; height: 24px; }
.tile.acc { --c: var(--accent); }
.thumb { flex: none; width: 52px; height: 52px; border-radius: 16px; object-fit: cover; background: var(--line); }
.num { flex: none; width: 22px; text-align: center; font-weight: 800; color: var(--muted); font-size: 13px; margin-right: -4px; }
.card .body { flex: 1; min-width: 0; }
.card .t { font-weight: 650; overflow-wrap: anywhere; line-height: 1.25; font-size: 15px; }
.card .m { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card.done .t { color: var(--muted); } .card.done .thumb { opacity: .6; }
.card .meter { margin-top: 6px; height: 6px; }
.card .xp { flex: none; font-weight: 800; color: var(--accent-ink); font-size: 13px; padding-right: 10px; }
.saved { color: var(--accent); flex: none; } .saved .ic { fill: currentColor; width: 18px; height: 18px; }
.check { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: transparent; }
.check::before { content: ""; grid-area: 1 / 1; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); transition: all .15s; }
.check .ic { grid-area: 1 / 1; width: 18px; height: 18px; stroke-width: 3; z-index: 1; }
.check.on { color: var(--on-accent); } .check.on::before { background: var(--accent); border-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; line-height: 1.6; } .empty .ic { margin-bottom: 6px; }

/* ── Panels ──────────────────────────────────── */
.section { padding: 8px 16px 0; }
.section h2 { font-size: 17px; margin: 22px 0 10px; letter-spacing: -.01em; display: flex; align-items: center; } .section h2.first { margin-top: 6px; }
.panel { background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-sm); display: block; width: 100%; text-align: left; }
.hero { position: relative; display: flex; gap: 18px; align-items: center; }
.hero .lv { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hero .ttl { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.hero .sub { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.hero .ls, .profile .ls { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.edit { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.streak { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.streak.on { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #9a3412; font-weight: 650; }
:root[data-theme="dark"] .streak.on { background: #3b2414; color: #fdba74; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.stat { background: var(--card); border-radius: 16px; padding: 12px 4px; text-align: center; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 19px; letter-spacing: -.02em; } .stat span { font-size: 11.5px; color: var(--muted); }
.daily { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.daily small { display: block; font-size: 12px; font-weight: 700; } .daily b { color: var(--text); font-size: 15px; line-height: 1.25; display: block; }
.nextu { font-size: 14px; color: var(--muted); margin-bottom: 12px; } .nextu b { color: var(--text); }
.ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.ut { text-align: center; padding: 8px 2px 6px; border-radius: 14px; background: var(--bg); }
.ut small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut.locked .uf { filter: grayscale(1); opacity: .35; }
.uf { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; }
.uf.sw { width: 26px; height: 26px; margin: 4px; } .uf.fr { background: var(--accent-soft); font-size: 17px; }
.mem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rank { width: 22px; text-align: center; font-weight: 800; color: var(--muted); } .lba { font-size: 24px; }
.profile { display: flex; align-items: center; gap: 16px; } .profile .lvx { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.row { margin-bottom: 14px; } .row:last-child { margin-bottom: 0; }
.row-h { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 8px; } .row-h span:last-child { color: var(--muted); flex: none; }
.countries { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ctry { background: var(--card); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.ctry-h { display: flex; align-items: center; margin-bottom: 8px; font-size: 14.5px; } .ctry-h span { margin-left: auto; font-weight: 800; color: var(--accent-ink); }
.ctry small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.attr { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; } .attr:last-child { margin-bottom: 0; }
.attr .ai { flex: none; width: 42px; height: 42px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.attr .an { display: flex; justify-content: space-between; font-weight: 650; font-size: 14.5px; } .attr .an span { color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.attr small { color: var(--muted); font-size: 12px; }
.gain { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gain:first-child { padding-top: 0; } .gain:last-child { border-bottom: 0; padding-bottom: 0; }
.gain b { font-size: 14px; display: block; } .gain small { color: var(--muted); font-size: 12px; } .gain > span { flex: none; font-weight: 800; color: var(--accent-ink); }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; } .rules li { margin: 4px 0; }
.rgroup { display: flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.rsoon { display: flex; align-items: center; gap: 2px; padding: 10px 12px; margin: 2px 0 4px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.rgroup:first-of-type { margin-top: 0; } .rgroup small { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
/* Region picker and "All regions": one collapsible section per country */
.rsearch { margin: 0 0 8px; } .rsearch + .note { margin: 0 0 12px; }
.cgroup { border-radius: 18px; background: var(--bg); margin-bottom: 8px; overflow: hidden; }
.panel .cgroup { background: color-mix(in srgb, var(--bg) 70%, var(--card)); }
.cgroup summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; min-height: 56px; }
.cgroup summary::-webkit-details-marker { display: none; }
.cgroup summary .flag { font-size: 22px; margin: 0; width: 1.35em; height: .95em; border-radius: 4px; }
.cgroup summary b { display: block; font-size: 15.5px; font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; }
.cgroup summary small { display: block; color: var(--muted); font-size: 12px; }
.cg-pct { font-weight: 800; font-size: 13px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.cgroup summary > .ic { color: var(--muted); transition: transform .2s; width: 18px; height: 18px; margin: 0; flex: none; }
.cgroup[open] summary > .ic { transform: rotate(180deg); }
.cgroup[open] summary { border-bottom: 1px solid var(--line); }
.cg-body { padding: 4px 6px 8px; background: var(--card); }
.cg-body .rrow { margin: 2px 0; }
.rrow .rp em { font-style: normal; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 6px; border-radius: 99px; margin-right: 6px; }
.rrow:not(.started) .meter i { background: transparent; }
.cg-body .rsoon { align-items: flex-start; gap: 8px; margin: 6px 6px 2px; } .cg-body .rsoon > .ic { margin-top: 2px; flex: none; }
.cg-body .rsoon b { display: block; font-size: 13px; } .cg-body .rsoon span { display: block; font-weight: 500; font-size: 12px; line-height: 1.5; margin-top: 2px; }
.rrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; min-height: 52px; }
.rrow.cur { background: var(--accent-soft); }
.rn { font-weight: 650; margin-bottom: 6px; } .rn small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.rp { flex: none; font-size: 13px; color: var(--muted); min-width: 52px; text-align: right; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; } .setrow + .setrow { margin-top: 10px; }
.setrow .seg { flex: 0 1 230px; }
.switch { width: 52px; height: 32px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.switch.on { background: var(--accent); } .switch.on i { left: 23px; }
.acct { display: flex; align-items: center; gap: 12px; color: var(--accent-ink); } .acct b { display: block; font-size: 15px; overflow-wrap: anywhere; color: var(--text); } .acct small { color: var(--muted); font-size: 12.5px; }

/* ── Badges ──────────────────────────────────── */
.score { display: flex; text-align: center; } .score div { flex: 1; }
.score b { display: block; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; } .score span { color: var(--muted); font-size: 13px; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bdg { background: var(--card); border-radius: 22px; padding: 14px 12px; text-align: center; box-shadow: var(--shadow-sm); border: 2px solid var(--tc, transparent); min-width: 0; }
.bronze { --tc: #c47a45; } .silver { --tc: #94a3b8; } .gold { --tc: #e0a800; }
.bi { font-size: 34px; line-height: 1.2; } .bn { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.bt { font-size: 12px; font-weight: 700; color: var(--tc, var(--muted)); margin: 2px 0 4px; }
.bd { font-size: 12px; color: var(--muted); margin-bottom: 8px; } .bp { font-size: 11px; color: var(--muted); margin-top: 5px; }
.bdg .meter i { background: var(--tc, var(--muted)); } .bdg.locked .bi { filter: grayscale(1); opacity: .45; }

/* ── Bottom navigation ───────────────────────── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; max-width: 160px; height: var(--nav-h); font-size: 11.5px; color: var(--muted); font-weight: 600; display: grid; place-items: center; align-content: center; gap: 3px; }
.tabs .ic { width: 23px; height: 23px; padding: 0; }
.tabs button.on { color: var(--accent-ink); font-weight: 700; } .tabs button.on .ic { stroke-width: 2.4; }
.tabs .rail-logo { display: none; }
@media (min-width: 1024px) {
  .tabs { padding-top: 14px !important; }
  .tabs .rail-logo { display: grid; height: auto; gap: 4px; padding: 0 0 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; }
  .rail-logo img { width: 44px; height: 44px; border-radius: 13px; box-shadow: var(--shadow-sm); transition: transform .15s; }
  .rail-logo:hover img { transform: rotate(-6deg) scale(1.05); }
  .rail-logo span { font-family: var(--f-display); font-weight: 800; font-size: 12.5px; letter-spacing: -.03em; color: var(--text); line-height: 1; }
}

/* ── Sheets ──────────────────────────────────── */
#sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 20; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 28px 28px 0 0; max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(15, 23, 42, .18); animation: up .26s cubic-bezier(.2, .8, .2, 1); }
#sheet.mapcard { left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); max-width: 616px; border-radius: 26px; max-height: 52vh; max-height: 52dvh; padding-bottom: 16px; box-shadow: var(--shadow); }
@keyframes up { from { transform: translateY(50px); opacity: 0; } }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 12px; }
.x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--glass); color: var(--text); display: grid; place-items: center; z-index: 2; box-shadow: var(--shadow-sm); }
.x .ic { width: 18px; height: 18px; }
.cover { height: 170px; margin: -10px -18px 14px; border-radius: 28px 28px 0 0; background: var(--line) center / cover no-repeat; position: relative; }
#sheet.mapcard .cover { height: 130px; border-radius: 26px 26px 0 0; }
#sheet.hasph .grab { display: none; }
.cover a { position: absolute; left: 8px; bottom: 6px; max-width: calc(100% - 16px); font-size: 10px; color: #fff; text-decoration: none; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding-right: 38px; } #sheet.hasph .sh { padding-right: 0; }
.badge { font-size: 12px; font-weight: 700; color: var(--c); letter-spacing: .04em; text-transform: uppercase; } .badge.acc { color: var(--accent-ink); }
#sheet h3 { font-size: 21px; line-height: 1.2; margin: 2px 0 0; letter-spacing: -.02em; }
#sheet p { margin: 0 0 12px; }
.reward { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.reward b { padding: 5px 12px; border-radius: 99px; background: var(--grad); color: #0f1f2e; font-size: 13px; }
.reward span { font-size: 12px; padding: 4px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.reward.done { font-size: 13px; color: var(--accent-ink); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.tip { background: var(--accent-soft); border-radius: 16px; padding: 12px; font-size: 14.5px; } .tip b { color: var(--accent-ink); }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; } label.lbl small { font-size: 11.5px; opacity: .8; }
textarea, .inp { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 12px 14px; }
textarea { min-height: 70px; resize: vertical; } .inp { min-height: 48px; }
.foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.foot a, .foot button { color: var(--muted); font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.foot span a { color: var(--accent-ink); display: inline; }
.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; } .photos::-webkit-scrollbar { display: none; }
.ph { flex: none; width: 76px; height: 76px; border-radius: 16px; background: var(--bg) center / cover no-repeat; box-shadow: var(--shadow-sm); animation: pop .35s ease-out; }
.ph.big { width: auto; height: auto; aspect-ratio: 1; position: relative; overflow: hidden; }
.ph.big span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 10.5px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-add { flex: none; height: 76px; min-width: 130px; padding: 0 14px; border-radius: 16px; border: 2px dashed var(--line); display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--accent-ink); }
.ph-add span { color: var(--text); } .ph-add small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.lb { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 18px; background: #000; margin-top: 4px; } .lb.sharecard { background: none; max-height: 56vh; }
.lb-t { font-weight: 700; margin-top: 10px; }

/* Quest complete */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.qc { text-align: center; }
.qc-badge { width: 84px; height: 84px; margin: 6px auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--c); box-shadow: 0 10px 28px color-mix(in srgb, var(--c) 45%, transparent); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.qc-badge svg { width: 58px; height: 58px; fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.qc-badge circle { stroke: rgba(255,255,255,.35); stroke-dasharray: 145; stroke-dashoffset: 145; animation: draw .6s .15s ease-out forwards; }
.qc-badge path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .45s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.2); } }
.qc-k { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.qc-t { font-size: 20px !important; margin: 4px 0 6px !important; }
.qc-xp { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; color: var(--accent-ink); }
.qc-parts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 12px; }
.qc-parts span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; opacity: 0; animation: chipin .35s ease-out forwards; }
@keyframes chipin { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.qc-lv { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.qc-lv .meter { flex: 1; height: 10px; margin: 0; } .qc-lv .meter i { transition: width .7s cubic-bezier(.3, .8, .3, 1); }
.levelup { text-align: center; margin-bottom: 6px; }
.burst { width: 104px; height: 104px; margin: 4px auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 50px; background: radial-gradient(circle, var(--accent-soft) 0, color-mix(in srgb, var(--accent) 30%, transparent) 55%, transparent 70%); animation: pop .6s ease-out; }
.lu { color: var(--muted); margin-bottom: 4px; }
.unl { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.unl span { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.cel-h { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 14px; letter-spacing: -.02em; } .cel-h.small { font-size: 17px; margin: 14px 0 10px; }
.cel { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 18px; border: 2px solid var(--tc); background: var(--bg); }
.cel .bi { font-size: 40px; animation: pop .5s ease-out; } .cel .bd { margin: 2px 0 0; font-size: 13px; }
.qc-mem { text-align: left; margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--bg); }
.qc-k2 { font-size: 13px; font-weight: 700; margin-bottom: 8px; } .qc-mem textarea { margin-top: 10px; background: var(--card); }

/* Editor and sign-in */
.welcome { text-align: center; margin: 6px 0 4px; color: var(--accent); animation: pop .6s ease-out; } .welcome .ic { width: 52px; height: 52px; } .welcome img { width: 64px; height: 64px; display: inline-block; filter: drop-shadow(0 6px 14px rgba(14, 159, 110, .25)); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pk { min-width: 52px; min-height: 52px; padding: 8px; border-radius: 14px; background: var(--bg); border: 2px solid transparent; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.pk.on { border-color: var(--accent); background: var(--accent-soft); } .pk.locked { opacity: .45; cursor: not-allowed; }
.pk small { font-size: 10.5px; color: var(--muted); }
.pe { font-size: 24px; line-height: 1.1; display: inline-grid; place-items: center; }
.pe.fr { width: 34px; height: 34px; border-radius: 50%; font-size: 18px; background: var(--accent-soft); } .pe.sw { width: 28px; height: 28px; border-radius: 50%; }
.pt { font-size: 13px; font-weight: 600; padding: 2px 4px; }
.pick.cls .pk { flex-direction: row; text-align: left; flex: 1 1 calc(50% - 8px); gap: 8px; padding: 10px; justify-content: flex-start; }
.pc b { display: block; font-size: 14px; } .pc small { display: block; font-size: 11.5px; }
.gbtn b { font-size: 17px; font-weight: 900; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 14px 0 2px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 99px;
  font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); text-align: center; font-weight: 600; box-shadow: var(--shadow); }
@media (max-width: 360px) { .stats { grid-template-columns: repeat(2, 1fr); } .countries { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  #sheet, .cel .bi, .qc-badge, .qc-badge circle, .qc-badge path, .qc-parts span, .btn.go::after, .ph, .welcome, .fr-legend, .burst, .mapstate { animation: none !important; }
  .qc-badge circle, .qc-badge path { stroke-dashoffset: 0; } .qc-parts span { opacity: 1; }
}

/* Suggest a place */
@media (max-width: 1023px) { body.pinmode .tabs { display: none; } }
.pm-pin { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 5; pointer-events: none; color: var(--accent); filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .35)); }
.pm-pin .ic { width: 48px; height: 48px; fill: var(--card); stroke-width: 2.2; }
.pm-pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 5px; margin-left: -5px; border-radius: 50%; background: rgba(15, 23, 42, .35); }
.pm-bar { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6; border-radius: 22px; padding: 14px; display: grid; gap: 10px; max-width: 520px; margin: 0 auto; }
.pm-t b { display: block; font-size: 16px; } .pm-t span { color: var(--muted); font-size: 13px; }
.pm-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; } .pm-btns .btn { margin: 0; }
.mapctl .rec { position: relative; color: var(--accent); }
.mapctl .rec .ic.mini { position: absolute; right: 5px; top: 5px; width: 12px; height: 12px; stroke-width: 3.2; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
textarea.inp { resize: vertical; min-height: 96px; font: inherit; line-height: 1.4; padding-top: 10px; }
.recrow { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 16px; margin-bottom: 10px; background: var(--card); }
.recrow b { display: block; } .recrow small { color: var(--muted); font-size: 12px; } .recrow p { margin: 6px 0; font-size: 13.5px; }
.recbtns { display: flex; flex-direction: column; gap: 6px; }
.rstat { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--muted); }
.rstat.accepted, .rstat.added { background: color-mix(in srgb, #16a34a 16%, transparent); color: #15803d; }
.rstat.rejected { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; }

/* Map menu (right-click / long-press) */
.ctxmenu { position: fixed; z-index: 40; min-width: 230px; max-width: calc(100vw - 16px); border-radius: 18px; padding: 6px; display: grid; animation: ctxin .14s ease-out; }
@keyframes ctxin { from { opacity: 0; transform: scale(.96); } }
.ctxmenu .cx-h { padding: 8px 10px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctxmenu .cx-h b { display: block; font-size: 14px; } .ctxmenu .cx-h small { color: var(--muted); font-size: 12px; }
.ctxmenu button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 12px; text-align: left; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: none; border: 0; cursor: pointer; }
.ctxmenu button:hover, .ctxmenu button:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ctxmenu button .ic { width: 18px; height: 18px; color: var(--accent); }

/* Place search and the nearby panel */
.tc-search { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: color-mix(in srgb, var(--line) 70%, transparent); }
.tc-search .ic { width: 19px; height: 19px; }
.sbar { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 6px 0 14px; border-radius: 18px; max-width: 608px; width: calc(100% - 24px); margin: 0 auto 8px; cursor: text; }
.sbar > .ic { color: var(--muted); width: 19px; height: 19px; flex: none; }
.sbar input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--text); outline: none; }
.sbar input::-webkit-search-cancel-button { display: none; }
.sbar button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.sres { max-width: 608px; width: calc(100% - 24px); margin: 0 auto; border-radius: 20px; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); overflow-y: auto; padding: 4px 6px 8px; }
.sgroup { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 4px; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 12px; text-align: left; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; }
.srow:hover, .srow:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.srow b { display: block; font-size: 14.5px; line-height: 1.25; } .srow small { color: var(--muted); font-size: 12px; }
.srow > .ic { width: 20px; height: 20px; color: var(--accent); flex: none; }
.srow .flag { font-size: 20px; margin-right: 0; }
.tile.sm { width: 34px; height: 34px; border-radius: 10px; } .tile.sm .ic { width: 18px; height: 18px; }
.sres-hint { padding: 6px 10px 10px; }
.nearpanel { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 6; max-width: 616px; margin: 0 auto; border-radius: 24px; padding: 4px 12px 12px; max-height: 46vh; max-height: 46dvh; overflow-y: auto; }
.nearpanel .list.flush, .sidebody .list.flush { display: grid; gap: 10px; }
body.card-open .nearpanel { display: none; }

/* Wide screens: navigation rail on the left, a side panel with the list, the map beside it */
@media (min-width: 1024px) {
  :root { --rail: 84px; }
  body.on-map { --side: clamp(320px, 30vw, 420px); }
  .tabs { top: 0; bottom: 0; right: auto; width: var(--rail); flex-direction: column; justify-content: flex-start; gap: 4px; padding: 18px 0 0; border-top: 0; border-right: 1px solid var(--line); }
  .tabs button { flex: none; width: 100%; max-width: none; height: 72px; }
  #app { max-width: calc(780px + var(--rail)); padding-left: calc(var(--rail) + 24px); padding-right: 24px; padding-bottom: 40px; }
  body.on-map #app { padding: 0; max-width: none; }
  #map { left: calc(var(--rail) + var(--side)); bottom: 0; }
  .side { position: fixed; left: var(--rail); top: 0; bottom: 0; width: var(--side); z-index: 6; background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
  .side .topcard { width: auto; max-width: none; margin: 14px 14px 10px; background: var(--card); box-shadow: var(--shadow-sm); }
  .side .sbar { width: auto; max-width: none; margin: 0 14px 6px; background: var(--card); border: 1px solid var(--line); }
  .sidebody { flex: 1; overflow-y: auto; padding: 4px 14px 28px; }
  .sidebody .chips { margin: 2px -14px 4px; padding: 3px 14px; max-width: none; }
  .sidebody .ghead { margin-top: 14px; }
  .mapctl { right: 16px; bottom: 24px; }
  .fab { left: calc(var(--rail) + var(--side) + 16px); right: auto; width: 380px; bottom: 44px; }
  .mapstate { inset: 0 0 0 calc(var(--rail) + var(--side)); }
  #sheet.mapcard { left: calc(var(--rail) + var(--side) + 16px); right: auto; width: 440px; max-width: 440px; margin: 0; bottom: 16px; max-height: calc(100vh - 32px); }
  #sheet:not(.mapcard) { left: var(--rail); right: 0; top: 50%; bottom: auto; transform: translateY(-50%); border-radius: 28px; max-height: 88vh; max-width: 620px; padding-bottom: 22px; animation: pop .2s ease-out; }
  #sheet:not(.mapcard) .cover { border-radius: 28px 28px 0 0; }
  #toast { bottom: 28px; left: calc(var(--rail) + var(--side) + (100vw - var(--rail) - var(--side)) / 2); }
  .pm-pin { left: calc(var(--rail) + var(--side) + (100vw - var(--rail) - var(--side)) / 2); }
  .pm-bar { left: calc(var(--rail) + var(--side) + 16px); right: auto; width: 460px; margin: 0; bottom: 20px; }
}
@keyframes pop { from { opacity: 0; } }

/* Trails on the map */
.tcard { border-left: 5px solid var(--tc); text-align: left; font: inherit; color: var(--text); width: 100%; }
.tcard .m + .m { margin-top: 0; }
.tcard.done { opacity: .75; }
.trailsbtn { margin: 4px 0 6px; justify-content: flex-start; }
.trailsbtn small { margin-left: auto; color: var(--muted); font-weight: 700; }
.mapctl button.on { background: var(--accent-fill); color: var(--on-accent); }
.trailbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 6; max-width: 616px; margin: 0 auto; border-radius: 24px; padding: 12px; border-top: 4px solid var(--tc); display: grid; gap: 10px; }
.tb-h { display: flex; align-items: center; gap: 10px; } .tb-h b { display: block; font-size: 15px; line-height: 1.2; } .tb-h small { color: var(--muted); font-size: 12px; }
.tb-h .hbtn { width: 38px; height: 38px; }
.tb-stops { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.tb-stops::-webkit-scrollbar { display: none; }
.tb-stops i { flex: 1 0 10px; height: 3px; background: color-mix(in srgb, var(--tc) 35%, transparent); }
.tstop { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--tc); background: var(--card); color: var(--tc); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.tstop.on { background: var(--tc); color: #fff; }
.tb-next { margin: 0; background: var(--tc); border-color: var(--tc); }
.tb-next span, .tb-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdetail { border-radius: 20px; background: var(--card); border-top: 4px solid var(--tc); padding: 14px; margin: 8px 0 12px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); }
.tdetail h3 { margin: 0; font-size: 19px; } .tdetail .note { margin: 0; }
@media (max-width: 1023px) {
  body.has-bar .mapctl { bottom: auto; top: calc(env(safe-area-inset-top) + 150px); }
  body.has-bar .mapctl button:not(.keep) { display: none; }
}

/* Keyboard focus, footer buttons */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
/* The sheet takes focus when it opens: no ring for a tap or click, a clear ring when a keyboard opened it. */
#sheet:focus:not(:focus-visible) { outline: none; }
#sheet:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.foot button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; }

/* Stats: your travels and everyone */
.section > .seg { margin: 4px 0 14px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; width: auto; flex: none; }
.av.lg { width: 56px; height: 56px; border-radius: 18px; } .av.lg > span { font-size: 30px; }
.travel .tv-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.travel .tv-h b { display: block; font-size: 17px; } .travel .tv-h small { color: var(--muted); font-size: 13.5px; }
.travel .tv-h em { font-style: normal; font-weight: 800; color: var(--accent-ink); }
.tl { display: flex; align-items: baseline; gap: 6px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.tl span { flex: 1; color: var(--muted); } .tl b { font-size: 16px; } .tl small { color: var(--muted); font-size: 13px; min-width: 92px; text-align: right; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.fg { display: inline-grid; place-items: center; width: 36px; height: 28px; border-radius: 9px; background: var(--bg); }
.fg .flag { font-size: 20px; margin: 0; filter: grayscale(1); opacity: .35; } .fg.on .flag { filter: none; opacity: 1; }
.cats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.cats3 > div { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; }
.cats3 b { display: block; font-size: 18px; } .cats3 small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 6px; }
.cats3 .gor .meter i { background: #3b82f6; } .cats3 .ye .meter i { background: #f97316; } .cats3 .dene .meter i { background: var(--dene); }
.ext, .rk { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; }
.ext:first-child, .rk-h + .rk { border-top: 0; }
.ext .ed { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; flex: none; }
.ext b, .rk b { display: block; font-size: 14.5px; font-weight: 650; } .ext small, .rk small { display: block; color: var(--muted); font-size: 12.5px; }
.ext .grow, .rk .grow { min-width: 0; } .rk b .ic { margin-right: 4px; vertical-align: -2px; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.recs small { display: block; color: var(--muted); font-size: 12px; } .recs b { display: block; font-size: 16px; margin: 2px 0; } .recs span { display: block; font-size: 12.5px; color: var(--muted); }
.yr-n { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 12px; }
.yr-n b { display: block; font-size: 22px; } .yr-n span { font-size: 12px; color: var(--muted); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 92px; align-items: end; margin-bottom: 10px; }
.mo { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.mo i { display: block; width: 100%; max-width: 18px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--accent) 45%, var(--card)); }
.mo.pk i { background: var(--accent); } .mo small { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.ranks .rk-h { display: flex; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ranks .rk-h span:first-child, .rk .rkn { width: 28px; text-align: right; flex: none; color: var(--muted); }
.rk .rc { font-weight: 700; font-variant-numeric: tabular-nums; }
.section > .chips { padding: 3px 0 10px; margin: 0; }
.doneby { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ── Game layer: explorer card, mastery, badge cabinet ── */
.charcard .ttl, .cc-xp b, .cc-stats b, .td-b b, .lvpill, .h2n { font-family: var(--f-display); }
.cc-xp, .cc-stats b, .stat b, .score b, .qc-xp, .qc-reg b, .cab.more, .card .xp, .rp, .ls { font-variant-numeric: tabular-nums; }
.charcard { position: relative; text-align: center; padding: 22px 16px 16px; background: var(--game); border: 1px solid var(--game-line); box-shadow: var(--shadow); overflow: hidden; }
.charcard::before { content: ""; position: absolute; inset: -40% -20% auto; height: 220px; background: radial-gradient(closest-side, color-mix(in srgb, var(--spark) 26%, transparent), transparent); pointer-events: none; }
.charcard > * { position: relative; }
.cc-av { display: grid; place-items: center; margin-bottom: 12px; }
.cc-av .av.xl { width: 108px; height: 108px; border-radius: 34px; background: var(--card); box-shadow: var(--shadow-sm); } .cc-av .av.xl > span { font-size: 58px; }
.cc-av .av.xl:not([class*="fr-"]), .cc-av .av.fr-none { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--game-line), var(--shadow-sm); }
.cc-lv { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.lvpill, .clspill { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.lvpill { background: var(--text); color: var(--bg); } .clspill { background: var(--accent-soft); color: var(--accent-ink); }
.charcard .ttl { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.charcard .sub { color: var(--accent-ink); font-size: 14px; font-weight: 700; margin-top: 2px; }
.cc-xp { margin: 14px 0 2px; font-size: 14px; font-weight: 700; color: var(--muted); } .cc-xp b { font-size: 26px; color: var(--text); letter-spacing: -.02em; }
.meter.xp.big { height: 10px; max-width: 320px; margin: 6px auto 0; }
.charcard .ls { margin-top: 6px; }
.cc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--game-line); }
.cc-stats b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; } .cc-stats span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cc-stats .hot b { color: #ea580c; } .cc-stats .ic.sm { margin-right: 1px; }
:root[data-theme="dark"] .cc-stats .hot b { color: #fdba74; }
.charcard .edit { z-index: 1; }
.section h2 .h2n { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.mastery .attr .ai { background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--card)); color: var(--c, var(--accent-ink)); }
.mastery .attr .meter i { background: var(--c, var(--grad)); }
.mastery .attr:not(.gor):not(.ye):not(.dene) .meter i { background: var(--grad); }
.mastery .an em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--spark-soft); color: var(--spark-ink); margin: 0 auto 0 8px; align-self: center; }
.cabinet { display: grid; gap: 10px; background: var(--game); border: 1px solid var(--game-line); cursor: pointer; }
.shelf { display: flex; flex-wrap: wrap; gap: 10px; }
.cab { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--card); box-shadow: 0 0 0 3px var(--tc, var(--line)), var(--shadow-sm); }
.cab.gold { box-shadow: 0 0 0 3px #e0a800, 0 0 12px rgba(224, 168, 0, .35); }
.cab.more { font-size: 13px; font-weight: 800; color: var(--muted); }
.cab.empty { color: var(--muted); border: 2px dashed var(--line); box-shadow: none; background: none; }
.cab-go { display: flex; align-items: center; justify-content: flex-end; font-size: 13px; font-weight: 700; color: var(--accent-ink); }

/* ── Quest board: feature card, trails, seasonal ── */
.today { position: relative; display: grid; align-content: space-between; gap: 18px; width: 100%; min-height: 170px; padding: 14px; border-radius: 24px; text-align: left; overflow: hidden;
  color: var(--text); background: var(--game); border: 1px solid var(--game-line); box-shadow: var(--shadow); background-size: cover; background-position: center; margin-bottom: 4px; }
.today.hasph { color: #fff; border: 0; min-height: 200px; }
.today.hasph::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 20, 28, .25) 0%, rgba(10, 20, 28, .05) 35%, rgba(10, 20, 28, .82) 100%); }
.today > * { position: relative; }
.td-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.td-k { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--card); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.td-xp { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: var(--spark); color: #3d2a00; }
.td-b { display: grid; gap: 4px; }
.td-cat { font-size: 12px; font-weight: 700; opacity: .9; } .today:not(.hasph) .td-cat { color: var(--c); }
.td-b b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.td-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.card.trail { position: relative; padding-left: 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, var(--card)), var(--card) 60%); }
.card.trail::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 11px); }
.card.trail .xp { background: var(--spark-soft); color: var(--spark-ink); border-radius: 99px; padding: 4px 9px; margin-right: 8px; }
.scard { border-color: color-mix(in srgb, var(--spark) 45%, var(--line)); background: linear-gradient(180deg, var(--card) 60%, var(--spark-soft)); }
.scard .sleft { background: var(--spark); color: #3d2a00; } .scard .sleft.soon { background: #dc2626; color: #fff; }

/* ── Must-eats strip on the quest board: dishes as passport stamps ── */
.musteat { border-radius: 24px; padding: 12px 14px 12px; background: var(--game); border: 1px solid var(--game-line); box-shadow: var(--shadow-sm); margin-bottom: 4px; }
.me-h { display: flex; align-items: center; gap: 8px; }
.me-k { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ye); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-h b { font-family: var(--f-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.me-h .linkbtn { font-size: 13px; text-decoration: none; color: var(--accent-ink); font-weight: 700; padding: 6px 2px; }
.stamps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 2px 4px; margin: 0 -4px; }
.stamps::-webkit-scrollbar { display: none; }
.stamp { flex: 1 0 64px; max-width: 92px; display: grid; justify-items: center; gap: 5px; padding: 0 2px; color: var(--muted); }
.st-i { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; background: var(--card);
  border: 2px dashed color-mix(in srgb, var(--ye) 45%, var(--line)); transition: transform .15s; }
.stamp:not(.on) .st-i { filter: saturate(.35); }
.stamp:active .st-i { transform: scale(.94); }
.stamp.on .st-i { border: 2.5px solid var(--ye); background: color-mix(in srgb, var(--ye) 12%, var(--card)); transform: rotate(-8deg); box-shadow: 0 0 0 3px var(--card), 0 0 0 4.5px color-mix(in srgb, var(--ye) 40%, transparent); }
.st-i i { position: absolute; right: -4px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: var(--on-accent); border: 2px solid var(--card); transform: rotate(8deg); }
.st-i i .ic { width: 11px; height: 11px; stroke-width: 3.5; }
.st-n { font-size: 11.5px; font-weight: 650; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp.on .st-n { color: var(--text); }
.me-f { font-size: 12px; color: var(--muted); margin-top: 6px; }
.musteat.full { border-color: color-mix(in srgb, var(--ye) 45%, var(--line)); } .musteat.full .me-f { color: var(--accent-ink); font-weight: 700; }

/* Map side panel: the short must-eats card */
.musteat.mini { padding: 10px 12px; margin: 0 0 6px; border-radius: 20px; }
.mm-h { display: flex; align-items: center; gap: 8px; }
.mm-h span { flex: 1; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ye); }
.mm-h b { font-family: var(--f-display); font-size: 14px; font-variant-numeric: tabular-nums; }
.mm-h .linkbtn { font-size: 12.5px; text-decoration: none; color: var(--accent-ink); font-weight: 700; padding: 4px 2px; }
.mm-row { display: grid; gap: 6px; margin-top: 8px; }
.mm-d { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 5px 10px 5px 5px; border-radius: 14px; background: var(--card); text-align: left; box-shadow: var(--shadow-sm); }
.mm-d .st-i { width: 34px; height: 34px; font-size: 18px; flex: none; filter: none; border-width: 1.5px; }
.mm-d b { display: block; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-d small { flex: none; font-size: 11.5px; font-weight: 800; color: var(--spark-ink); background: var(--spark-soft); padding: 2px 8px; border-radius: 99px; }
.mm-d:active { transform: scale(.98); }
.musteat.mini .me-f { margin-top: 4px; }

/* ── Must-eat dishes ── */
.dishhead { display: flex; gap: 12px; background: var(--game); border: 1px solid var(--game-line); }
.dishhead b { font-family: var(--f-display); font-size: 19px; font-variant-numeric: tabular-nums; } .dishhead small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.dish { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 20px; padding: 12px 6px 12px 12px; box-shadow: var(--shadow-sm); }
.dish-i { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--ye) 13%, var(--card)); }
.dish .t { font-weight: 700; font-size: 15.5px; line-height: 1.25; } .dish .t small { font-weight: 500; color: var(--muted); font-size: 12.5px; font-style: italic; }
.dish p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.dish .check { align-self: center; }
.dish.done .dish-i { background: var(--accent-soft); } .dish.done .t { color: var(--muted); }
.spots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.spots span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.spots .chip { min-height: 30px; font-size: 12.5px; padding: 0 10px; box-shadow: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.seg button { white-space: nowrap; }

/* Completion: region progress row */
.qc-reg { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
.qc-reg span:first-child { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-reg .meter { flex: 1; height: 8px; } .qc-reg .meter i { transition: width .5s cubic-bezier(.3, .8, .3, 1); }
.qc-reg b { color: var(--accent-ink); min-width: 38px; text-align: right; }
@media (max-width: 360px) { .cc-stats { grid-template-columns: repeat(2, 1fr); row-gap: 12px; } }
/* Tip link at the end of Settings: small on purpose, for the explorers who look for it */
.kofi { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 0 8px; }
.kofi a { display: inline-block; margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.kofi a:hover { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
/* Show N more under long lists, and folded sections (Stats) */
.morebtn { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin: 6px 0 0; padding: 8px; border: 0; background: none; color: var(--accent-ink); font: 600 13px var(--f-body); cursor: pointer; border-radius: 10px; }
.morebtn:hover { background: var(--accent-soft); } .morebtn svg { transition: transform .2s; } .morebtn.open svg { transform: rotate(180deg); }
.countries > .morebtn, .countries > .mrest { grid-column: 1 / -1; } .countries > .mrest:not([hidden]) { display: contents; }
.list > .mrest:not([hidden]) { display: contents; }
details.fold > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; color: var(--muted); }
details.fold > summary::-webkit-details-marker { display: none; } details.fold > summary svg { transition: transform .2s; } details.fold[open] > summary svg { transform: rotate(180deg); }
/* Quest complete: the map got painted */
.paintmsg { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--rc) 12%, var(--card)); font-size: 13px; color: var(--text); text-align: left; }
.paintmsg i { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--rc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent); animation: paintpop .6s .5s both; }
@keyframes paintpop { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.2); } to { transform: scale(1); opacity: 1; } }
.h2n { font: 700 13px var(--f-body); color: var(--muted); margin-left: 6px; }
.paintmsg span { flex: 1; } .pm-see { flex: none; border: 0; border-radius: 999px; padding: 6px 11px; background: var(--rc); color: #fff; font: 700 12px var(--f-body); cursor: pointer; }
.travel .tv-b { display: flex; gap: 6px; flex: none; }
/* Map buttons: labels slide out to the left (hover with a mouse; always shown in the phone's More list) */
.mapctl button { position: relative; }
.mapctl button::before { content: attr(data-label); position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(10px, -50%) scale(.92);
  transform-origin: right center; opacity: 0; pointer-events: none; white-space: nowrap; padding: 7px 12px; border-radius: 999px;
  background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); font: 600 13px var(--f-body); transition: opacity .18s, transform .22s cubic-bezier(.2, .8, .2, 1); }
.mapctl .gem { color: #d97706; } .mapctl .gem.on { background: #f59e0b; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .mapctl button:hover::before, .mapctl button:focus-visible::before { opacity: 1; transform: translate(0, -50%) scale(1); }
}
/* Four buttons always (More, stamps, trails, location); More opens the rest on every device.
   Not ".x": that is the global close-button class (absolute, right: 12px) and shifted these buttons. */
.mapctl .xtra { display: none; }
.mapctl.open .xtra { display: grid; animation: ctlin .22s cubic-bezier(.2, .8, .2, 1) both; }
.mapctl.open .xtra::before, .mapctl.open .more::before { opacity: 1; transform: translate(0, -50%) scale(1); }
.mapctl.open .xtra:nth-child(4) { animation-delay: 0s; } .mapctl.open .xtra:nth-child(3) { animation-delay: .03s; }
.mapctl.open .xtra:nth-child(2) { animation-delay: .06s; } .mapctl.open .xtra:nth-child(1) { animation-delay: .09s; }
@keyframes ctlin { from { opacity: 0; transform: translateY(14px) scale(.8); } to { opacity: 1; transform: none; } }
.alist { padding: 4px; } .arow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; }
.arow:hover { background: color-mix(in srgb, var(--line) 50%, transparent); } .arow small { display: block; color: var(--muted); font-size: 12px; } .arow b { font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.abars { display: flex; align-items: flex-end; gap: 3px; height: 96px; } .abars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.abars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

/* Admin page (wide screens, admins only) */
.tabs .tab-sep { display: block; width: 40px; height: 1px; background: var(--line); margin: 6px auto; }
@media (min-width: 1024px) { body.adm-page #app { max-width: none; } }
.adm { padding: 22px 8px 40px; }
.adm-h { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; } .adm-h > div { flex: 1; }
.adm-h h1 { margin: 0; font: 800 30px var(--f-display); letter-spacing: -.02em; } .adm-h small { color: var(--muted); }
.adm-h .btn { width: auto; padding: 0 18px; }
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--line) 45%, transparent); width: fit-content; }
.adm-nav button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; font: 700 14px var(--f-body); color: var(--muted); }
.adm-nav button .ic { width: 17px; height: 17px; }
.adm-nav button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.adm-nav i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.adm-grid { display: grid; gap: 12px; margin-bottom: 16px; } .adm-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .adm-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-tile { background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.adm-tile[role="button"] { cursor: pointer; } .adm-tile[role="button"]:hover { outline: 2px solid var(--accent-soft); }
.adm-tile small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.adm-tile b { display: block; font: 800 28px var(--f-display); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.adm-tile span { font-size: 12.5px; color: var(--muted); }
.panel .adm-tile { box-shadow: none; background: color-mix(in srgb, var(--line) 30%, transparent); }
.adm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.adm-cols > .panel, .adm .panel { padding: 16px; } .adm h3 { margin: 0 0 12px; font: 700 16px var(--f-display); }
.abars.tall { height: 180px; }
.adm .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.adm-table { padding: 0 !important; overflow-x: auto; margin-bottom: 14px; }
.adm-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.adm-table th button { font: inherit; color: inherit; } .adm-table th button.on { color: var(--accent-ink); }
.adm-table td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: 0; } .adm-table tbody tr:hover { background: color-mix(in srgb, var(--line) 25%, transparent); }
.adm-table td.msg { max-width: 420px; } .adm-table td.nowrap { white-space: nowrap; } .adm-table td small { color: var(--muted); }
.adm-table td.acts { white-space: nowrap; text-align: right; } .adm-table .hbtn { display: inline-grid; vertical-align: middle; width: 32px; height: 32px; margin-left: 2px; }
.aflag { width: 1.3em; height: .98em; border-radius: 2px; margin-right: .45em; vertical-align: -.12em; box-shadow: 0 0 0 1px rgba(15, 23, 42, .14); object-fit: cover; }
.adm-table b.warn { color: #b45309; }
.adm-kind { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.adm-kind.report { background: #fef3c7; color: #92400e; } .adm-kind.feedback { background: #e0e7ff; color: #3730a3; }
.alink { font: inherit; color: var(--text); text-align: left; display: inline-flex; align-items: center; } .alink:hover { color: var(--accent-ink); text-decoration: underline; }
.adm #admq { margin-bottom: 12px; max-width: 560px; }
.adm-empty b { display: block; margin-bottom: 4px; } .adm-empty p { margin: 0; color: var(--muted); }
.adm-link { display: block; text-decoration: none; color: var(--text); } .adm-link:hover { outline: 2px solid var(--accent-soft); }
.adm-link b { display: block; } .adm-link span { color: var(--muted); font-size: 13px; }
/* ── Stamp hunt ───────────────────────────────── */
/* A collected stamp: perforated paper (the holes are the transparent dots of the outer layer), the landmark's
   drawing, its value in XP, and a round postmark in ink. */
.pstamps { display: grid; grid-auto-flow: column; grid-auto-columns: 138px; gap: 12px; overflow-x: auto; padding: 8px 4px 14px; margin: 8px -4px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pstamps::-webkit-scrollbar { display: none; }
/* Wide enough for the whole set: a grid, nothing to scroll and no half card at the edge. */
@media (min-width: 720px) { .pstamps { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); overflow: visible; } }
.pstamp { position: relative; display: block; border: 0; padding: 6px; cursor: pointer; font: inherit; color: #1f2933; text-align: left; scroll-snap-align: start;
  background: radial-gradient(circle at 5px 5px, transparent 3.2px, #fffaf0 3.6px) -5px -5px / 10px 10px; filter: drop-shadow(0 2px 3px rgba(15, 31, 46, .18)); }
.pstamp .st-paper { display: flex; flex-direction: column; height: 100%; background: #fffaf0; outline: 1.5px solid color-mix(in srgb, var(--rr) 55%, transparent); outline-offset: -4px; padding: 7px 7px 8px; }
.pstamp .st-art { position: relative; display: block; aspect-ratio: 200 / 140; overflow: hidden; background: color-mix(in srgb, var(--rc) 20%, #fff); }
.pstamp .st-art svg { display: block; width: 100%; height: 100%; }
.pstamp .st-val { position: absolute; top: 15px; right: 15px; padding: 1px 6px; border-radius: 6px; background: #fffaf0; font: 800 11.5px var(--f-display); color: var(--rr); }
.pstamp .st-r { margin-top: 7px; font: 800 9.5px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--rr); }
.pstamp b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font: 700 13px/1.25 var(--f-display); }
.pstamp small { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 5px; font-size: 11px; color: #5a6b78; }
.pstamp .st-post { position: absolute; width: 74px; height: 74px; right: -12px; bottom: 26px; color: color-mix(in srgb, var(--rr) 78%, #1e1b4b); opacity: .72; transform: rotate(-14deg); pointer-events: none; mix-blend-mode: multiply; }
.pstamp .st-post svg { width: 100%; height: 100%; overflow: visible; }
.pstamp .st-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .6) 45%, transparent 60%); transform: translateX(-120%); animation: stshine 3.4s ease-in-out infinite; }
.pstamp.legend { filter: drop-shadow(0 0 6px rgba(245, 158, 11, .55)) drop-shadow(0 2px 3px rgba(15, 31, 46, .18)); }
.pstamp.big { width: 236px; margin: 0 auto; cursor: default; padding: 8px; background: radial-gradient(circle at 6px 6px, transparent 4px, #fffaf0 4.4px) -6px -6px / 12px 12px; }
.pstamp.big .st-paper { padding: 10px 10px 12px; } .pstamp.big b { font-size: 17px; } .pstamp.big .st-val { top: 20px; right: 20px; font-size: 14px; }
.pstamp.big .st-post { width: 112px; height: 112px; right: -26px; bottom: 30px; }
.pstamp.mini { width: 46px; padding: 3px; background: radial-gradient(circle at 3px 3px, transparent 1.8px, #fffaf0 2.1px) -3px -3px / 6px 6px; }
.pstamp.mini .st-paper { padding: 3px; outline-offset: -2px; }
@keyframes stshine { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
/* A stamp still to find: an empty slot with its clue */
.slot { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 196px; padding: 12px 11px 10px; border-radius: 6px; border: 2px dashed color-mix(in srgb, var(--rr) 60%, var(--line));
  background: color-mix(in srgb, var(--rr) 6%, var(--card)); font: inherit; color: var(--text); text-align: left; cursor: pointer; scroll-snap-align: start; }
.slot .sl-r { font: 800 9.5px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--rr); }
.slot .sl-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--rr) 16%, var(--card)); color: var(--rr); }
.slot .sl-ic .ic { width: 16px; height: 16px; }
.slot .sl-clue { font: italic 500 12px/1.38 var(--f-body); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.slot small { margin-top: auto; font-size: 11px; color: var(--muted); }
.slot.mini { width: 46px; height: 46px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; color: color-mix(in srgb, var(--rr) 70%, var(--muted)); }
.slot.mini .ic { width: 18px; height: 18px; opacity: .7; }
.blank { display: inline-block; min-width: 2.4em; padding: 0 4px; margin: 0 1px; border-radius: 5px; background: color-mix(in srgb, var(--rr, #d97706) 16%, transparent); color: var(--rr, #d97706); font-style: normal; font-weight: 800; text-align: center; line-height: 1.25; }
.stamphead { display: flex; align-items: center; gap: 10px; } .stamphead h2 { flex: 1; } .stamphead .crest { width: 40px; height: 45px; margin-top: 14px; }
.ttag { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 2px; padding: 3px 9px; border: 0; border-radius: 999px; background: var(--spark-soft); color: var(--spark-ink); font: 700 12px var(--f-body); cursor: pointer; }
/* Stamp sheet: the clue card, the reveal */
.clue { margin: 22px 0 12px; padding: 16px 16px 14px; border-radius: 18px; background: #fffaf0; color: #1f2933; border: 2px dashed color-mix(in srgb, var(--rr) 55%, transparent); }
.cl-top { display: flex; align-items: center; gap: 10px; } .cl-top b { display: block; font: 800 15px var(--f-display); color: var(--rr); } .cl-top small { color: #5a6b78; font-size: 12px; }
.cl-seal { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--rr); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rr) 22%, transparent); }
.clue.legend .cl-seal { background: linear-gradient(135deg, #f59e0b, #fde68a 50%, #d97706); color: #78350f; }
.cl-text { margin: 12px 0 10px; font: italic 500 16px/1.5 var(--f-body); }
.cl-text cite { display: block; margin-top: 4px; font: 600 12px var(--f-body); color: #5a6b78; text-align: right; }
.cl-hints { display: grid; gap: 6px; } .cl-hints span { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #44525e; }
.st-wrap { position: relative; display: flex; justify-content: center; margin: 18px 0 14px; }
.st-line { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 13.5px; line-height: 1.45; }
.st-line.fact::before { content: "Did you know? "; font-weight: 700; color: var(--accent-ink); }
.st-line cite { display: block; margin-top: 3px; text-align: right; font: 600 12px var(--f-body); color: var(--muted); font-style: normal; }
.st-wrap.inked .pstamp { animation: stdrop .5s cubic-bezier(.2, .8, .2, 1) both; }
.st-wrap.inked .st-post { animation: stink .5s .32s cubic-bezier(.5, 0, .75, 0) both; }
.st-wrap.inked { animation: stthud .3s .8s ease-out both; }
.st-wrap.inked::before { content: ""; position: absolute; top: 50%; left: 50%; width: 320px; height: 320px; margin: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 213, 92, .5), transparent 65%); animation: stglow 1.6s .8s ease-out both; pointer-events: none; }
@keyframes stdrop { from { transform: translateY(24px) scale(.85); opacity: 0; } }
@keyframes stink { from { transform: scale(2.8) rotate(-38deg); opacity: 0; } 70% { opacity: .9; } to { transform: scale(1) rotate(-14deg); opacity: .72; } }
@keyframes stthud { 0% { transform: none; } 30% { transform: translateY(3px) scale(.985); } 60% { transform: translateY(-1px); } 100% { transform: none; } }
@keyframes stglow { from { transform: scale(.3); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
#sheet.reveal { text-align: center; } #sheet.reveal .qc-k { color: var(--spark-ink); margin-top: 4px; }
.crestwin { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px; border-radius: 16px; background: var(--spark-soft); text-align: left; font-size: 13px; color: var(--text); }
.crestwin .crest { flex: none; width: 54px; height: 61px; animation: paintpop .7s .9s both; } .crestwin b { display: block; font: 800 15px var(--f-display); }
/* Tracker */
.passbtn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0 12px; padding: 12px 14px; border: 0; border-radius: 16px; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: linear-gradient(135deg, #1e3a5f, #2b5480); box-shadow: var(--shadow-sm); }
.passbtn > .ic:first-child { width: 26px; height: 26px; color: #fde68a; } .passbtn span { flex: 1; } .passbtn b { display: block; font: 800 15px var(--f-display); } .passbtn small { opacity: .85; font-size: 12px; }
.trk { display: grid; gap: 10px; }
.trk-row { border-radius: 16px; background: var(--bg); padding: 10px; border-left: 4px solid var(--rr); }
.trk-row.on { box-shadow: 0 0 0 2px var(--rr); }
.trk-main { display: flex; gap: 10px; width: 100%; border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.trk-seal { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rr); color: #fff; } .trk-seal .ic { width: 17px; height: 17px; }
.trk-main small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.trk-clue { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 3px 0; font: italic 500 13.5px/1.4 var(--f-body); }
.trk-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .trk-btns .btn { margin: 0; flex: 1 1 auto; }
/* Radar: the floating warmer/colder panel on the map */
.radar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 6; max-width: 616px; margin: 0 auto; border-radius: 24px; padding: 10px 12px 12px; border-top: 4px solid var(--rr); display: grid; gap: 8px; }
.rd-h { display: flex; align-items: flex-start; gap: 8px; } .rd-h .hbtn { width: 36px; height: 36px; }
.rd-open { flex: 1; min-width: 0; border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.rd-open small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--rr); }
.rd-clue { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font: italic 500 13px/1.38 var(--f-body); }
.rd-b { display: flex; align-items: center; gap: 12px; }
.rd-arrow { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--rr); color: #fff; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.rd-arrow svg { width: 26px; height: 26px; fill: currentColor; }
.rd-arrow.off { opacity: .35; }
.rd-b b { display: block; font: 800 20px var(--f-display); font-variant-numeric: tabular-nums; }
.rd-t { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.radar.t-warmer .rd-t { color: #ea580c; } .radar.t-colder .rd-t { color: #0284c7; } .radar.t-hot .rd-t { color: #dc2626; }
.radar.t-hot .rd-arrow { animation: rdpulse 1s ease-in-out infinite; background: #dc2626; }
@keyframes rdpulse { 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, .18); } }
.rd-bar { display: block; height: 5px; margin-top: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.rd-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #f59e0b, #ef4444); transition: width .6s; }
.rd-b .btn { width: auto; flex: none; min-height: 44px; margin: 0; }
body.card-open .radar { display: none; }
@media (min-width: 1024px) { .radar { left: calc(var(--rail) + var(--side) + 16px); right: auto; width: 420px; bottom: 20px; margin: 0; } }
/* Passport */
.pp-cover { display: flex; align-items: center; gap: 12px; margin: 4px 40px 12px 0; }
.pp-cover > span { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #1e3a5f, #2b5480); color: #fde68a; }
.pp-cover b { display: block; font: 800 20px var(--f-display); } .pp-cover small { color: var(--muted); font-size: 13px; }
.pp-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; scrollbar-width: none; }
.pp-tabs button { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 600 13px var(--f-body); cursor: pointer; }
.pp-tabs button small { color: var(--muted); font-weight: 700; } .pp-tabs button.on { background: var(--text); color: var(--card); border-color: var(--text); } .pp-tabs button.on small { color: inherit; opacity: .75; }
.pp-page { padding: 14px; border-radius: 18px; background: #fbf6ea; color: #1f2933;
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(30, 58, 95, .05) 27px 28px); }
.pp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .pp-h b { font: 800 17px var(--f-display); } .pp-h small { margin-left: auto; color: #5a6b78; font-size: 12px; }
.pp-reg { padding: 10px 0; border-top: 1px dashed rgba(30, 58, 95, .18); }
.pp-rh { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; } .pp-rh .linkbtn { color: #1f2933; text-decoration: none; font-weight: 700; } .pp-rh small { margin-left: auto; color: #5a6b78; font-weight: 700; font-size: 12px; }
.pp-rh .crest { width: 26px; height: 29px; } .pp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rc); }
.pp-slots { display: flex; gap: 8px; flex-wrap: wrap; } .pp-slots .slot.mini { background: rgba(255, 255, 255, .6); }
.pp-reg.full { background: linear-gradient(90deg, rgba(245, 158, 11, .12), transparent); margin: 0 -14px; padding: 10px 14px; }
@media (prefers-reduced-motion: reduce) {
  .st-wrap.inked, .st-wrap.inked .pstamp, .st-wrap.inked .st-post, .st-wrap.inked::before, .pstamp .st-shine, .crestwin .crest, .radar.t-hot .rd-arrow { animation: none !important; }
}
.adm-sec { font: 800 20px var(--f-display); margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; } .adm-sec small { font: 600 13px var(--f-body); color: var(--muted); }
.adm-cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm h3 small { font: 600 12px var(--f-body); color: var(--muted); margin-left: 6px; }
.adm.adm-sheet { padding: 0; } .adm-sheet .adm-sec { font-size: 17px; margin: 18px 0 10px; }
@media (max-width: 1023px) { .adm-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .adm-cols, .adm-cols.three { grid-template-columns: 1fr; } .adm-tile b { font-size: 22px; } }
/* Stamps tab and the map's Track button */
.findbtn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 10px; padding: 14px 16px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: linear-gradient(135deg, #c2620a, #a14a07); box-shadow: var(--shadow-sm); }
.findbtn > .ic:first-child { width: 28px; height: 28px; } .findbtn span { flex: 1; } .findbtn b { display: block; font: 800 17px var(--f-display); } .findbtn small { opacity: .92; font-size: 12.5px; }
.findbtn.on { background: linear-gradient(135deg, #1e3a4c, #0f1f2e); }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.howto span { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; }
.howto b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--spark-soft); color: var(--spark-ink); font-size: 12.5px; }
.mapctl > * { justify-self: end; } .mapctl .gem { width: auto; min-width: 46px; padding: 0 14px 0 12px; border-radius: 999px; display: flex; gap: 6px; font: 800 14px var(--f-body); }
.mapctl .gem::before { display: none; }
