/* Just Move It: the night stage of the games, calm page motion; the game itself is lively. */
:root {
  --night: #0D0720; --deep: #120A2A; --card: #1C1238; --line: rgba(185, 140, 255, 0.22);
  --ink: #1A1033; --sun: #FFD60A; --gum: #FF3D8B; --mint: #00D6A3; --lilac: #B98CFF; --sky: #5AD8FF;
  --muted: rgba(255, 255, 255, 0.74);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: #fff; font: 600 16px/1.45 Figtree, system-ui, sans-serif; }
a { color: var(--sun); }
h1, h2, h3 { font-family: 'Bagel Fat One', Figtree, sans-serif; font-weight: 400; margin: 0; line-height: 1; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

#home { max-width: 820px; margin: 0 auto; padding: 0 16px 40px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.brand { text-decoration: none; font-family: 'Bagel Fat One', sans-serif; font-size: 32px; color: var(--sun); line-height: 1; }
.brand span { display: block; font: 900 11px Figtree, sans-serif; letter-spacing: 0.3em; text-transform: uppercase; color: #fff; }
.pill { text-decoration: none; color: #fff; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 900; }
.kicker { margin: 18px 0 8px; color: var(--lilac); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }
.title { font-size: clamp(52px, 15vw, 112px); line-height: 0.95; color: var(--gum); text-shadow: 0 6px 0 var(--ink), 0 0 40px rgba(255, 61, 139, 0.35); }
.lede { color: var(--muted); font-size: 18px; max-width: 46ch; }
.moves { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.moves li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.moves b { font-size: 26px; width: 40px; text-align: center; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { appearance: none; border: 0; min-height: 54px; padding: 0 26px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 900; font-size: 17px; box-shadow: 0 4px 0 #000; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.btn.ghost { background: transparent; color: #fff; border: 2px solid var(--line); box-shadow: none; }
.err { color: #FF8FA3; min-height: 1.4em; }
.note { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.note ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.note li { margin: 6px 0; }
.foot { margin-top: 32px; color: var(--muted); font-size: 14px; }

/* --- your fitness --- */
.fit { margin-top: 26px; display: grid; gap: 12px; }
.fit h2 { font-size: 34px; }
.fit .sub { color: var(--muted); margin: 4px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.tile b { display: block; font: 400 34px 'Bagel Fat One', sans-serif; color: var(--t, var(--sun)); }
.tile span { color: var(--muted); font-size: 14px; }
/* "What worked": the figure with the muscles a run leaned on, and the top few named (js/move-body.js). */
.body { margin: 0 0 4px; background: #0E0A1C; border: 1px solid var(--line); border-radius: 18px; padding: 12px; text-align: left; }
.body h3 { margin: 0 0 8px; font: 400 20px 'Bagel Fat One', sans-serif; color: var(--sun); }
.body__row { display: grid; gap: 12px; }
.body__row svg { flex: 0 0 auto; max-width: 55%; height: auto; }
.body__fig { width: 100%; height: 280px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 50% 42%, #221a3a, #0E0A1C 72%); }
.body__fig canvas { width: 100% !important; height: 100% !important; display: block; border-radius: 14px; }
.body__fig svg { max-width: 100%; }
.body__fig.wait > svg { display: none; }
.body__fig.wait { animation: body-wait 1.6s ease-in-out infinite alternate; }
@keyframes body-wait { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .body__fig.wait { animation: none; } }
.overlay .body .body__hint { margin: 0; font-size: 12px; text-align: center; }
.body ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.body li { display: flex; align-items: center; gap: 8px; }
.body li i { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 4px; }
.body li b { display: block; font-size: 14px; }
.body li span { color: var(--muted); font-size: 13px; }
.overlay .body p, .body p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.days { display: flex; gap: 6px; }
.days i { flex: 1; height: 34px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); display: grid; place-items: center; font: 900 12px Figtree; font-style: normal; color: var(--muted); }
.days i.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.spark { width: 100%; height: 70px; display: block; }
.fit .clear { justify-self: start; background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }

/* --- the run --- */
#play { position: fixed; inset: 0; background: #000; display: grid; place-items: center; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
#hud { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; object-fit: contain; pointer-events: none; }
/* Top left, over the sky: never over the street, where the runner and the things coming are. */
.cam { position: fixed; left: 16px; top: 72px; width: min(20vw, 260px); aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; border: 3px solid var(--line); background: #000; }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam video { opacity: 0.55; }
/* The light tip (move-light.js): a calm line under the camera box while you run. */
.cam-tip { position: fixed; left: 16px; top: calc(72px + min(20vw, 260px) * 0.75 + 14px); width: min(20vw, 260px); min-width: 180px; margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(13, 7, 32, 0.78); border: 1px solid var(--line); color: #fff; font-size: 14px; line-height: 1.35; transition: opacity 0.6s ease; }
.cam-tip[hidden] { display: block; opacity: 0; pointer-events: none; }
body.cam-ready .cam-tip { display: none; }
.cam-debug { position: fixed; right: 12px; bottom: 12px; z-index: 9; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.75); color: #9ff; font: 12px/1.4 ui-monospace, monospace; white-space: pre; pointer-events: none; }
.quit { position: fixed; left: 16px; top: 16px; min-height: 44px; padding: 0 18px; font-size: 15px; background: rgba(13, 7, 32, 0.6); }
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(13, 7, 32, 0.72); padding: 16px; }
.overlay .card { width: min(640px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; text-align: center; display: grid; gap: 14px; }
.overlay h2 { font-size: clamp(36px, 6vw, 60px); color: var(--sun); }
.overlay p { margin: 0; color: var(--muted); font-size: 18px; }
.overlay .tiles { text-align: left; }
.overlay .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pb { color: var(--mint); font-weight: 900; }
.kg summary { cursor: pointer; font-weight: 900; color: var(--muted); }
.kg form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; }
.kg input { font: inherit; width: 5.5em; margin-left: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: #fff; }
.kg .btn { min-height: 42px; padding: 0 16px; }
.kg p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* A weight that can't be one (empty, words, out of range): the box is marked and a line says so. */
.kg input[aria-invalid='true'] { border-color: var(--gum); }
.kg p.err { min-height: 0; color: #FF8FA3; }
.kg p.err:empty { display: none; }
.tick { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; cursor: pointer; }
.tick input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--mint); }

/* --- stickers (js/move-stickers.js): inline SVG, sized by the line or the box they sit in --- */
.stk { display: inline-block; width: 1.6em; height: 1.6em; flex: none; overflow: visible; vertical-align: middle; }
.stk.inline { width: 1.55em; height: 1.55em; margin: -0.3em 0.25em -0.25em 0; }
.stk.mini { width: 20px; height: 20px; }
.moves b { width: 52px; height: 52px; display: grid; place-items: center; }
.moves b .stk { width: 52px; height: 52px; }

/* Big play buttons: a sticker, the words, a white cut-out edge and a chunky shadow. */
.btn--big { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 4px 24px 4px 12px; font-size: 18px; border: 3px solid var(--ink);
  box-shadow: 0 0 0 3px #fff, 0 7px 0 3px #000; margin: 3px 3px 10px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.btn--big:active { transform: translateY(3px); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #000; }
.btn--big.alt { background: var(--gum); color: #fff; }
.btn--big .stk, .btn--big b { width: 44px; height: 44px; display: grid; place-items: center; transition: transform 0.6s ease; }
.btn--big b .stk { width: 44px; height: 44px; }
.btn--big:hover .stk { transform: rotate(-8deg) scale(1.06); }
.btn--big:disabled { opacity: 0.75; }
.btn .btn__stk { width: 30px; height: 30px; margin: -4px 6px -4px -6px; }
.btn:has(.btn__stk) { display: inline-flex; align-items: center; justify-content: center; }

/* --- the level map: an illustrated Mumbai of stickers (js/move-map.js) --- */
.map { margin: 22px 0 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* The map is drawn by the script: hold about its height until then, so "Set up" below doesn't jump. */
/* Measured at 320–1024 px wide: the board's own height (it follows the width on a phone) plus the heading and the pick panel. */
.map:empty { min-height: 1315px; }
@media (max-width: 819px) { .map:empty { min-height: 1377px; } }
@media (max-width: 699px) { .map:empty { min-height: calc(min(760px, (100vw - 42px) * 4 / 3) + 618px); } }
@media (max-width: 560px) { .map:empty { min-height: calc((100vw - 42px) * 2 + 625px); } }
@media (max-width: 440px) { .map:empty { min-height: calc((100vw - 42px) * 2 + 750px); } }
.map__head h2 { font-size: 40px; color: var(--sun); }
.map__head p { margin: 4px 0 0; color: var(--muted); }
.map__board { position: relative; aspect-ratio: 3 / 4; max-height: 760px; margin: 5px; border-radius: 30px; overflow: hidden; border: 3px solid var(--ink);
  box-shadow: 0 0 0 5px #fff, 7px 10px 0 5px #000;
  background: radial-gradient(rgba(255, 255, 255, 0.13) 1.3px, transparent 1.8px) 0 0 / 18px 18px, linear-gradient(165deg, #4A7DFF 0%, #2D5BFF 55%, #2347D6 100%); }
.map__land, .map__path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map__land .beach { fill: none; stroke: var(--sun); stroke-width: 16; stroke-linejoin: round; }
.map__land .land { fill: #FFF1CC; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; }
.map__land .park { fill: var(--mint); stroke: var(--ink); stroke-width: 2.5; }
.map__land .rail { fill: none; stroke: rgba(26, 16, 51, 0.55); stroke-width: 3; }
.map__land .rail--ties { stroke-width: 9; stroke-dasharray: 2 7; stroke: rgba(26, 16, 51, 0.35); }
.map__path path { fill: none; stroke-linecap: round; stroke-dasharray: 0.1 13; }
.map__path .seg-ink { stroke: var(--ink); stroke-width: 11; }
.map__path .seg { stroke: #fff; stroke-width: 6; }
.map__path .seg-ink.seg--shut { stroke: rgba(26, 16, 51, 0.35); stroke-width: 9; }
.map__path .seg.seg--shut { stroke: rgba(255, 255, 255, 0.45); stroke-width: 4; }
.map__path .seg.seg--next { stroke: var(--sun); stroke-width: 7; }
.map__path .seg--next { animation: seg-flow 2.8s linear infinite; }
.map__path .seg-ink.seg--next { stroke-width: 12; }
@keyframes seg-flow { to { stroke-dashoffset: -26; } }

.wave { position: absolute; width: 36px; translate: -50% -50%; opacity: 0.75; pointer-events: none; animation: wave-drift 7s ease-in-out infinite; animation-delay: calc(var(--i) * -0.9s); }
.wave svg { display: block; width: 100%; }
@keyframes wave-drift { 50% { transform: translateX(5px); opacity: 0.4; } }
.sea-name { position: absolute; left: 4.5%; top: 86%; translate: -50% -50%; rotate: -90deg; white-space: nowrap; pointer-events: none;
  font: 400 17px 'Bagel Fat One', sans-serif; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.6); }
.lm { position: absolute; translate: -50% -50%; pointer-events: none; }
.lm svg { display: block; width: 100%; height: auto; overflow: visible; }
.lm--boat { animation: bob 6s ease-in-out infinite; }
.lm--palm { transform-origin: 50% 100%; animation: sway 8s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes sway { 50% { transform: rotate(2.5deg); } }

.node { position: absolute; translate: -50% -34px; display: grid; justify-items: center; gap: 1px; background: none; border: 0; padding: 0; color: var(--ink); text-align: center; z-index: 1;
  animation: bob-soft 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.8s); }
@keyframes bob-soft { 50% { transform: translateY(-3px); } }
.node b { position: relative; width: 68px; height: 68px; display: block; }
.node .badge { width: 100%; height: 100%; overflow: visible; display: block; transition: transform 0.5s ease; }
.node.sel { z-index: 2; }
.node.sel .badge { transform: scale(1.14) rotate(-4deg); }
.node.sel b::before, .node.is-next b::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 10, 0.75), rgba(255, 214, 10, 0)); animation: glow 3.6s ease-in-out infinite; }
.node.is-next:not(.sel) b::before { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); }
@keyframes glow { 50% { opacity: 0.45; transform: scale(0.94); } }
.node:hover .badge, .node:focus-visible .badge { transform: scale(1.1) rotate(4deg); }
.node.sel:hover .badge { transform: scale(1.16) rotate(-2deg); }
.soon-tag { position: absolute; right: -20px; top: -10px; width: 36px; height: 36px; }
.soon-tag .stk { width: 100%; height: 100%; }
/* The street's name on a ticket: notched at both ends, a dashed tear line. */
.node .nm { position: relative; margin-top: 2px; font: 900 13px/1 Figtree, sans-serif; color: var(--ink); background: #fff; padding: 6px 13px 6px; white-space: nowrap; border-radius: 6px;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  box-shadow: inset 0 0 0 2.5px var(--ink); }
.node .nm::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 2px; border-bottom: 1.5px dashed rgba(26, 16, 51, 0.3); }
.node.sel .nm { background: var(--sun); }
.node.locked .nm { background: #E4DDF5; }
.node .st { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font: 900 12px Figtree, sans-serif; color: #fff; background: var(--ink); padding: 2px 8px 2px 4px; border-radius: 999px; white-space: nowrap; }
.node .st:not(:has(.stars-row, .need)) { padding-left: 8px; }
.stars-row { display: inline-flex; gap: 0; }
.stars-row .stk { width: 18px; height: 18px; margin: -2px -1px; }
.need { display: inline-flex; align-items: center; gap: 2px; color: var(--sun); }
.need .stk { width: 16px; height: 16px; }
.node[aria-disabled] { cursor: default; }
.node.hidden-spot b { width: 58px; height: 58px; }

.free-run { position: absolute; right: 12px; top: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; padding: 3px 14px 3px 3px; border-radius: 999px; border: 3px solid var(--ink); background: var(--mint); color: var(--ink);
  font: 400 18px/1 'Bagel Fat One', sans-serif; rotate: 3deg; box-shadow: 0 0 0 4px #fff, 4px 7px 0 4px #000; transition: rotate 0.5s ease, transform 0.25s ease; }
.free-run .stk { width: 42px; height: 42px; }
.free-run:hover { rotate: -2deg; }
.free-run:active { transform: translateY(2px); }
.map__total { position: absolute; left: 10px; top: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 2px; padding: 2px 12px 2px 4px; border-radius: 999px; background: var(--ink); color: var(--sun); font: 400 20px/1 'Bagel Fat One', sans-serif; border: 2px solid #fff; }
.map__total .stk { width: 30px; height: 30px; }

/* --- the pick panel --- */
.pick { background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 18px 16px; display: grid; gap: 14px; }
.pick h3 { font-size: 32px; }
.pick p { margin: 2px 0 0; color: var(--muted); }
.mode { display: grid; gap: 8px; }
/* Workout or Free run: a chunky switch, its knob a sticker that rolls across. */
.switch { display: inline-flex; align-items: center; gap: 10px; justify-self: start; max-width: 100%; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--deep); font-weight: 900; font-size: 16px; }
.switch__side { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, 0.55); transition: color 0.4s ease; white-space: nowrap; }
.switch__side.on { color: #fff; }
.switch__side .stk.mini { width: 24px; height: 24px; }
.switch__side .lockbadge { width: 22px; height: 22px; margin-left: 2px; }
.switch__track { position: relative; flex: none; width: 66px; height: 34px; border-radius: 999px; background: #3A2E66; border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.85); transition: background-color 0.45s ease; }
.switch[aria-checked='true'] .switch__track { background: var(--mint); }
.switch__knob { position: absolute; top: 50%; left: -6px; width: 44px; height: 44px; translate: 0 -50%; transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1), rotate 0.45s ease; }
.switch[aria-checked='true'] .switch__knob { left: 24px; rotate: 20deg; }
.switch__knob .stk { width: 100%; height: 100%; }
.mode__line { font-size: 15px; }
.mode__line b { color: var(--sun); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips button { display: inline-flex; align-items: center; gap: 4px; min-height: 52px; padding: 2px 16px 2px 4px; border-radius: 999px; border: 3px solid var(--ink); background: #2A1F4E; color: #fff; font-weight: 900;
  box-shadow: 0 4px 0 #000, 0 0 0 2px rgba(255, 255, 255, 0.18); transition: background-color 0.35s ease, transform 0.25s ease; }
.chips button .stk { width: 42px; height: 42px; transition: transform 0.5s ease; }
.chips button[aria-checked='true'] { background: var(--sun); color: var(--ink); transform: translateY(2px); box-shadow: 0 2px 0 #000, 0 0 0 3px #fff; }
.chips button[aria-checked='true'] .stk { transform: rotate(-8deg) scale(1.1); }
.stars { margin: 0; display: flex; justify-content: center; gap: 2px; }
.stars .stk.big { width: 64px; height: 64px; animation: star-in 0.7s ease-out both; }
.stars .s1 { animation-delay: 0.18s; margin-top: -10px; }
.stars .s2 { animation-delay: 0.36s; }
@keyframes star-in { from { opacity: 0; transform: scale(0.6) rotate(-12deg); } }
.rank { color: #fff; }
.credit { font-size: 12px; opacity: 0.7; }

/* End run is for the run: the result card stands alone. */
body.over-open .quit { display: none; }
/* The map's stops need room on a phone: tall enough that no two labels touch. */
@media (max-width: 560px) {
  .map__board { aspect-ratio: 1 / 2; max-height: none; }
  .node { translate: -50% -29px; }
  .node b { width: 58px; height: 58px; }
  .node.hidden-spot b { width: 50px; height: 50px; }
  .node .nm { font-size: 12px; padding: 5px 11px; }
  .free-run { font-size: 16px; }
  .free-run .stk { width: 36px; height: 36px; }
  .sea-name { font-size: 14px; }
  .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .switch { gap: 6px; padding: 6px 10px; font-size: 14px; }
  .switch__side { white-space: normal; }
  .switch__side .stk.mini { width: 20px; height: 20px; }
  .chips button { padding-right: 8px; font-size: 14px; line-height: 1.1; text-align: left; }
  .chips button .stk { width: 38px; height: 38px; }
}
/* Calm, and still when asked: nothing on the map moves for anyone who's turned motion down. */
@media (prefers-reduced-motion: reduce) {
  .wave, .lm, .node, .node b::before, .map__path .seg--next, .stars .stk.big { animation: none !important; }
  .switch__knob, .switch__track, .node .badge, .chips button, .chips button .stk, .btn--big .stk { transition: none; }
}
/* Inside the app its close button sits top right. */
body.in-app .top { padding-right: 56px; }
/* Upright phone: the 16:9 scoreboard at the top of the screen, large enough to read, its sides off screen. */
@media (orientation: portrait) {
  #hud { left: -40vw; top: 64px; width: 180vw; height: auto; aspect-ratio: 16 / 9; inset-inline-end: auto; bottom: auto; object-fit: fill; }
}

/* The ready card says what the camera sees; the camera box comes up big and centred until the run starts. */
.overlay .seen { color: #fff; font-weight: 900; font-size: 22px; }
.overlay .seen.ok { color: var(--mint); }
.overlay .seen-tip { color: var(--sun); font-weight: 700; font-size: 17px; }
.overlay .seen-tip[hidden] { display: none; }
.overlay .bar { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.overlay .bar i { display: block; height: 100%; width: 0; background: var(--mint); border-radius: 6px; transition: width 0.12s linear; }
body.cam-ready .cam { z-index: 5; width: min(56vw, 320px); left: 50%; top: calc(env(safe-area-inset-top) + 16px); transform: translateX(-50%); border-color: var(--mint); }
body.cam-ready .overlay { align-items: end; }
.overlay .unlock { color: var(--sun); font-size: 20px; font-weight: 900; }
#err-keys { margin-top: 8px; }
#play { touch-action: none; }

/* The map's own play buttons: pick a street, tap play, right there. */
.pick__go { display: flex; gap: 10px; flex-wrap: wrap; }
.pick__go .btn { flex: 1 1 200px; }
.pick__foot { display: flex; gap: 2px 14px; flex-wrap: wrap; align-items: center; align-content: start; font-size: 13px; min-height: calc(2 * 1.45em + 2px); }
.pick .err { margin: 0; min-height: 0; }
/* Background loading, said small and calm: a dot that fills in when the street is ready. */
.warm { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: color 0.6s ease; }
.warm:empty { display: none; }
.warm::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--lilac); transition: background-color 0.6s ease, border-color 0.6s ease; }
.warm[data-state='loading']::before { animation: warm-breathe 2.4s ease-in-out infinite; }
.warm[data-state='ready'] { color: var(--mint); }
.warm[data-state='ready']::before { background: var(--mint); border-color: var(--mint); }
@keyframes warm-breathe { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .warm[data-state='loading']::before { animation: none; } }

/* The end card: compact, so a phone sees the result and the next move without scrolling. */
.overlay { overflow-y: auto; }
.overlay .card.end { gap: 8px; padding: 18px 16px 14px; }
.overlay { align-items: safe center; }
.overlay .end h2 { font-size: clamp(28px, 7vw, 52px); }
.overlay .end .stars { font-size: 30px; letter-spacing: 4px; line-height: 1; }
.overlay .end .res { color: #fff; font-size: 17px; }
.overlay .end .rank, .overlay .end .unlock { font-size: 15px; }
.overlay .end .go { margin-top: 4px; }
.overlay .end .go .btn { flex: 1 1 140px; padding: 6px 16px; font-size: 16px; line-height: 1.15; }
.overlay .end .err { min-height: 0; font-size: 15px; }
.overlay .end .err:empty { display: none; }
.overlay .end #err-keys { justify-self: center; }
.overlay .end .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.overlay .end .tile { padding: 7px 8px; border-radius: 12px; }
.overlay .end .tile b { font-size: 22px; line-height: 1.1; }
.kcal-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kcal-ask label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 8em; }
.kcal-ask input { font: inherit; width: 5.5em; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--deep); color: #fff; }
.kcal-ask input[aria-invalid='true'] { border-color: var(--gum); }
.kcal-ask .btn { min-height: 36px; padding: 0 12px; }
.overlay .end .tile span { font-size: 11.5px; line-height: 1.25; display: block; }
.overlay .end .more { display: flex; justify-content: center; gap: 18px; }
.link { background: none; border: 0; padding: 8px 4px; min-height: 40px; color: var(--muted); font-weight: 900; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.overlay .end .credit { font-size: 11px; }

/* Stickers on the tiles, the end card and the ready card. */
.tile { position: relative; }
.tile__stk { position: absolute; top: -12px; right: -8px; width: 44px; height: 44px; }
.overlay .end .tile__stk { width: 30px; height: 30px; top: -9px; right: -7px; }
.overlay .end .stars .stk.big { width: 48px; height: 48px; }
.overlay .end .stars .s1 { margin-top: -8px; }
.overlay .end .tiles { margin-top: 6px; }
.overlay .card { position: relative; }
.card__stk { justify-self: center; width: 84px; height: 84px; margin: -64px 0 -6px; }
.overlay .card:has(.card__stk) { margin-top: 40px; }
.pb .stk.inline { margin-right: 2px; }

/* --- The launcher, calmer (Nov 2026): one accent, plain text and lines, no stickers, nothing repeated. ----------- */
#home .kicker { color: var(--muted); letter-spacing: 0.06em; font-size: 12px; margin-top: 10px; }
#home .title { font-size: clamp(40px, 11vw, 72px); color: #fff; text-shadow: none; }
#home .lede { font-size: 16px; margin: 10px 0 0; }
#home .moves { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; }
#home .moves li { display: block; background: none; border: 0; padding: 0; border-radius: 0; color: var(--muted); font-size: 14px; }
#home .moves li strong { color: #fff; }
#home .tile__stk { display: none; }
#home .btn--big { min-height: 52px; padding: 0 20px; font-size: 16px; border: 0; box-shadow: none; border-radius: 14px; }
#home .btn--big:active { transform: translateY(1px); box-shadow: none; }
#home .btn--big.alt { background: transparent; color: #fff; border: 1.5px solid var(--line); }
#home .map { margin-top: 26px; gap: 12px; }
#home .map:empty { min-height: 520px; }
#home .map__head h2 { font-size: 28px; color: #fff; }
#home .map__head p { font-size: 14px; }
.route { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.route__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.route__total { display: inline-flex; align-items: center; gap: 4px; color: #fff; letter-spacing: 0; font-size: 14px; }
.route__list { list-style: none; margin: 0; padding: 0; }
.route__list li + li { border-top: 1px solid var(--line); }
.stop { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; cursor: pointer; }
.stop:focus-visible { outline: 2px solid var(--sun); outline-offset: -2px; }
.stop__n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; border: 1.5px solid var(--line); }
.stop__txt { flex: 1; min-width: 0; display: grid; }
.stop__txt b { font-size: 16px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop__txt small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop__stars, .stop__need { display: inline-flex; align-items: center; gap: 1px; flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.stop .ico, .route__total .ico { width: 16px; height: 16px; }
.stop--locked .stop__txt b, .stop--locked .stop__n { color: rgba(255, 255, 255, 0.5); }
.stop--sel { background: rgba(255, 214, 10, 0.08); box-shadow: inset 3px 0 0 var(--sun); }
.stop--sel .stop__n { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.stop.is-next:not(.stop--sel) .stop__n { border-color: var(--sun); color: var(--sun); }
.route__more { border-top: 1px solid var(--line); }
.route__more summary { padding: 12px 16px; color: var(--muted); font-size: 14px; cursor: pointer; }
.route__more[open] summary { border-bottom: 1px solid var(--line); }
#home .pick { border-width: 1px; border-radius: 18px; gap: 12px; }
#home .pick h3 { font-size: 24px; color: #fff; }
#home .switch { padding: 4px 12px; border-width: 1px; }
#home .switch__track { width: 44px; height: 26px; border: 0; box-shadow: none; }
#home .switch__knob { width: 20px; height: 20px; left: 3px; background: #fff; border-radius: 50%; rotate: none; }
#home .switch[aria-checked='true'] .switch__knob { left: 21px; rotate: none; }
#home .chips { gap: 8px; }
#home .chips button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); background: transparent; box-shadow: none; font-size: 14px; transform: none; }
#home .chips button[aria-checked='true'] { background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; transform: none; }
#home details.note { margin-top: 18px; }
#home details.note summary { cursor: pointer; font-weight: 800; }

/* --- Shorter launcher (14 Nov 2026): the streets in one row you swipe, what opens next under the street you picked,
   seasons in one row, touch said plainly as just the game. ------------------------------------------------------- */
.route__strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.route__strip::-webkit-scrollbar { display: none; }
.route__strip li + li { border-top: 0; }
.route__strip li { flex: 0 0 auto; scroll-snap-align: start; }
.route__strip .stop { flex-direction: column; align-items: stretch; gap: 6px; width: 138px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.route__strip .stop__top { display: flex; justify-content: space-between; align-items: center; }
.route__strip .stop--sel { box-shadow: none; border-color: var(--sun); background: rgba(255, 214, 10, 0.1); }
.route__strip .stop.is-next:not(.stop--sel) { border-color: rgba(255, 214, 10, 0.55); }
.route__strip .stop--locked { opacity: 0.7; }
.route__strip .stop__txt b { font-size: 15px; }
.route__strip .stop__txt small { font-size: 12px; white-space: normal; }
.pick__next { margin: 0; font-size: 14px; color: var(--muted); }
.pick__next b { color: var(--sun); }
#home .pick .pick__next { margin-top: -4px; }
#home .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; display: flex; }
#home .chips::-webkit-scrollbar { display: none; }
#home .chips button { flex: 0 0 auto; white-space: nowrap; }
#home .btn--big.alt { flex-direction: column; gap: 2px; padding: 8px 16px; }
#home .btn--big.alt small { font-size: 12px; font-weight: 600; color: var(--muted); }
#home .map:empty { min-height: 420px; }
#home .note .moves { margin: 8px 0 4px; }
#home #map-note:empty { display: none; }
#home #map-note { margin: 0; }
.route__strip { align-items: stretch; }
.route__strip li { display: flex; }
/* Your fitness, tighter: three small tiles a row. */
#home .fit .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#home .fit .tile { padding: 10px 12px; border-radius: 14px; }
#home .fit .tile b { font-size: 24px; }
#home .fit .tile span { font-size: 12px; }
#home .pick__foot { min-height: 0; }

/* Phone check, 23 Nov 2026: thumb-sized targets (44px) for the season chips, the run switch, the fold-outs and the
   weight box. The game canvas uses the visible height (100dvh above), so a phone's toolbar never hides the bottom. */
#home .chips button { min-height: 44px; }
.switch { min-height: 44px; box-sizing: border-box; }
.kg summary, #home details.note summary { padding-block: 11px; }
.kg input { min-height: 44px; box-sizing: border-box; font-size: 16px; }
.kg .btn { min-height: 44px; }
