/* Guess The Place landing page. Colours and UI pieces follow the game (HUD, map sheet, ribbon). */
@font-face {
  font-family: "Bebas Neue";
  src: url(fonts/bebas-neue.ttf) format("truetype");
  font-display: swap;
}

:root {
  --bg: #140c46;
  --violet: #2a1a85;
  --purple: #544aac;
  --raised: #6b5bd2;
  --navy: #21196e;
  --cyan: #2bc7e5;
  --amber: #ffc933;
  --red: #e53935;
  --surface: #faf9fe;
  --muted: #eeeafe;
  --text2: #716aa0;
  --soft: #d4cff8;
  --water: #72d4e9;
  --display: "Bebas Neue", Impact, "Arial Narrow Bold", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  font-family: var(--body); color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 88% 108%, rgba(255, 86, 214, .26), rgba(255, 86, 214, 0) 62%),
    radial-gradient(ellipse 60% 50% at 6% -8%, rgba(43, 199, 229, .20), rgba(43, 199, 229, 0) 62%),
    radial-gradient(ellipse 120% 90% at 50% 38%, #2c1b8a 0%, #1d1266 46%, #110939 100%) fixed;
}
/* The glowing horizon of the store backdrop. */
body::before {
  content: ""; position: fixed; left: -25vw; right: -25vw; bottom: calc(-100vh + 12vh); height: 100vh;
  border-radius: 50%; pointer-events: none; z-index: 0;
  border-top: 2px solid rgba(150, 214, 255, .5);
  box-shadow: 0 -24px 70px rgba(120, 96, 255, .32), inset 0 26px 60px rgba(90, 170, 255, .16);
}
#sky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.page {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh; max-width: 1440px; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(18px, 4vw, 60px) max(12px, env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------------- header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; line-height: 0; }
.brand img {
  display: block; width: auto; height: clamp(56px, 9.5vh, 96px);
  filter: drop-shadow(0 8px 18px rgba(10, 4, 50, .45));
  animation: drop-in .9s cubic-bezier(.2, 1.3, .4, 1) both;
}
.proof { margin: 0; font-size: 14px; color: var(--soft); letter-spacing: .02em; }
.proof b { color: #fff; font-size: 16px; }

/* ---------------------------------------------------------------- hero */
.hero {
  flex: 1; min-height: 0; display: grid; align-items: center;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4.5vw, 72px); padding: 10px 0 14px;
}
.pitch { max-width: 580px; }
.eyebrow {
  margin: 0 0 14px; font-weight: 800; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan);
  animation: rise .7s .15s both;
}
h1 {
  margin: 0; font: 400 clamp(54px, 7.1vw, 102px)/.87 var(--display); text-transform: uppercase; letter-spacing: .01em;
  text-shadow: 0 5px 0 var(--navy), 0 16px 36px rgba(10, 4, 50, .5);
  animation: rise .8s .25s both;
}
h1 span { display: block; color: var(--amber); }
.lead {
  margin: 22px 0 22px; max-width: 30em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; color: var(--soft);
  animation: rise .8s .4s both;
}
.modes { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; animation: rise .8s .5s both; }
.modes li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px 8px 11px; border-radius: 999px;
  font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
}
.modes svg { width: 18px; height: 18px; fill: var(--amber); }

/* ---------------------------------------------------------------- stores */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; animation: rise .8s .6s both; }
.badge { display: block; line-height: 0; border-radius: 10px; transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.badge:hover { transform: translateY(-3px) scale(1.03); }
.badge img { display: block; width: auto; height: 54px; }
.badge--apple img { height: 54px; }
.soon {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; font-size: 14px; color: var(--soft); background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .22);
}
.soon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 201, 51, .6); animation: beacon 2.2s infinite; }
.qr { display: flex; align-items: center; gap: 12px; margin: 0 0 0 6px; }
.qr img { width: 78px; height: 78px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(5, 2, 30, .4); }
.qr figcaption { font-size: 13px; line-height: 1.35; color: var(--soft); }
html:not([data-ios-live]) .badge--apple, html:not([data-ios-live]) .apple-legal { display: none; }
html[data-ios-live] .soon { display: none; }
html:not([data-os="desktop"]) .qr { display: none; }
html[data-os="android"] .soon { display: none; }
html[data-os="ios"] .badge--play { order: 3; }
html[data-os="ios"] .badge--play img { height: 42px; }

/* ---------------------------------------------------------------- play column */
.play { display: flex; flex-direction: column; gap: 14px; min-height: 0; animation: rise .9s .35s both; }
.board { display: flex; justify-content: center; gap: 4px; perspective: 400px; }
.flap {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: clamp(24px, 2.5vw, 36px); height: clamp(34px, 3.6vw, 50px); border-radius: 6px;
  font: 400 clamp(24px, 2.5vw, 36px)/1 var(--display); color: #fff;
  background: linear-gradient(#302780, #1e1760 49.5%, #150f4a 50.5%, #241c68);
  box-shadow: 0 3px 0 rgba(4, 2, 24, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  transform-origin: 50% 50%;
}
.flap::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0, 0, 0, .6); box-shadow: 0 1px 0 rgba(255, 255, 255, .07);
}
.flap.tick { animation: flip .12s ease-in-out; }
.flap.lit { color: var(--amber); text-shadow: 0 0 14px rgba(255, 201, 51, .55); }

/* ---------------------------------------------------------------- card */
.card {
  --cu: 1px;
  position: relative; width: 100%; aspect-ratio: 4 / 3.05; max-height: calc(100dvh - 230px); min-height: 300px;
  border-radius: 28px; overflow: hidden; isolation: isolate; background: #0d0833; outline: none;
  box-shadow: 0 34px 90px rgba(4, 2, 28, .62), 0 0 0 1px rgba(255, 255, 255, .14);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.card:focus-visible { box-shadow: 0 0 0 3px var(--amber), 0 34px 90px rgba(4, 2, 28, .62); }
.card.thud { animation: thud .32s ease-out; }
.street, .mapview, .summary, .loading { position: absolute; inset: 0; }
.street { z-index: 1; cursor: grab; }
.street:active { cursor: grabbing; }
.pano { display: block; width: 100%; height: 100%; }
.pano-fallback { position: absolute; inset: 0; display: none; background-repeat: repeat-x; background-size: auto 230%; background-position: 50% 50%; }
.street-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(20, 12, 70, .42), rgba(20, 12, 70, 0) 30%, rgba(20, 12, 70, 0) 72%, rgba(20, 12, 70, .38));
}

/* HUD: the game's pill with the round badge, whose needle points north as you look around. */
.hud {
  position: absolute; z-index: 10; left: 50%; top: calc(var(--cu) * 14);
  width: min(calc(var(--cu) * 340), calc(100% - 20px)); height: calc(var(--cu) * 56);
  transform: translateX(-50%); pointer-events: none;
}
.hud-pill {
  position: absolute; inset: 0; border-radius: calc(var(--cu) * 28); background: var(--purple);
  border: calc(var(--cu) * 1.5) solid #6558c4; box-shadow: 0 calc(var(--cu) * 3) calc(var(--cu) * 12) rgba(20, 12, 70, .35);
}
.hud-menu { position: absolute; left: calc(var(--cu) * 20); top: 50%; width: calc(var(--cu) * 17); margin-top: calc(var(--cu) * -6.5); }
.hud-menu i { display: block; height: calc(var(--cu) * 2.2); margin-bottom: calc(var(--cu) * 3.3); border-radius: 2px; background: #fff; }
.hud-mode { position: absolute; left: calc(var(--cu) * 50); top: 0; bottom: 0; display: flex; align-items: center; font-weight: 900; font-size: calc(var(--cu) * 16); }
.hud-score {
  position: absolute; right: calc(var(--cu) * 9); top: 50%; width: calc(var(--cu) * 92); height: calc(var(--cu) * 40);
  margin-top: calc(var(--cu) * -20); border-radius: calc(var(--cu) * 20); text-align: center;
  background: var(--navy); border: calc(var(--cu) * 1.5) solid #5e51c6;
}
.hud-score small { display: block; margin-top: calc(var(--cu) * 4); font-weight: 900; font-size: calc(var(--cu) * 8.5); color: #c9c4f0; letter-spacing: .06em; line-height: 1; }
.hud-score b { display: block; font: 400 calc(var(--cu) * 24)/1 var(--display); }
.hud-round {
  position: absolute; left: 50%; top: 50%; width: calc(var(--cu) * 80); height: calc(var(--cu) * 80);
  margin: calc(var(--cu) * -40) 0 0 calc(var(--cu) * -40); border-radius: 50%; text-align: center; color: var(--navy);
  background: #fbfbff; border: calc(var(--cu) * 2.5) solid #5a4fc0; box-shadow: 0 calc(var(--cu) * 3) calc(var(--cu) * 10) rgba(20, 12, 70, .35);
}
.hud-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#round-arc { transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1); }
.needle { position: absolute; left: 50%; top: calc(var(--cu) * 8); width: calc(var(--cu) * 20); height: calc(var(--cu) * 20); margin-left: calc(var(--cu) * -10); }
.hud-round small { position: absolute; left: 0; right: 0; top: calc(var(--cu) * 30); font-weight: 900; font-size: calc(var(--cu) * 8.5); color: var(--text2); letter-spacing: .04em; }
.hud-round b { position: absolute; left: 0; right: 0; top: calc(var(--cu) * 40); font: 400 calc(var(--cu) * 27)/1 var(--display); }

.hint {
  position: absolute; z-index: 2; left: 50%; bottom: calc(var(--cu) * 30); margin: 0; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; white-space: nowrap;
  font-weight: 800; font-size: calc(var(--cu) * 14); background: rgba(20, 12, 70, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none; transition: opacity .45s, transform .45s;
}
.hint svg { width: 22px; height: 22px; fill: #fff; animation: sway 1.8s ease-in-out infinite; }
.hint.gone { opacity: 0; transform: translate(-50%, 12px); }

.map-btn {
  position: absolute; z-index: 2; right: calc(var(--cu) * 16); bottom: calc(var(--cu) * 20);
  width: calc(var(--cu) * 68); height: calc(var(--cu) * 68); border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--raised); border: calc(var(--cu) * 3) solid #e6e2ff; box-shadow: 0 calc(var(--cu) * 4) calc(var(--cu) * 14) rgba(20, 12, 70, .5);
  transition: transform .2s cubic-bezier(.2, 1.4, .4, 1), opacity .3s;
}
.map-btn:hover { transform: scale(1.06); }
.map-btn:active { transform: scale(.92); }
.map-btn svg { width: calc(var(--cu) * 25); height: calc(var(--cu) * 25); fill: #fff; }
.map-btn b { margin-top: calc(var(--cu) * 2); font-weight: 900; font-size: calc(var(--cu) * 12.5); letter-spacing: .03em; line-height: 1; }
.map-btn.nudge { animation: nudge 1.4s ease-in-out infinite; }

/* Map screen */
.mapview { z-index: 3; background: var(--water); transform: translateY(103%); transition: transform .55s cubic-bezier(.2, .85, .2, 1); }
.map { display: block; width: 100%; height: 100%; cursor: crosshair; }
.pin { position: absolute; z-index: 2; left: 0; top: 0; width: calc(var(--cu) * 34); height: calc(var(--cu) * 46); margin: calc(var(--cu) * -46) 0 0 calc(var(--cu) * -17); pointer-events: none; transform-origin: 50% 100%; visibility: hidden; }
.pin svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 3px rgba(20, 12, 70, .4)); }
.pin.drop svg { animation: pin-drop .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.pin-base { position: absolute; z-index: 1; left: 0; top: 0; width: calc(var(--cu) * 30); height: calc(var(--cu) * 11); margin: calc(var(--cu) * -5.5) 0 0 calc(var(--cu) * -15); border-radius: 50%; background: radial-gradient(rgba(135, 33, 252, .55), rgba(135, 33, 252, 0) 70%); visibility: hidden; pointer-events: none; }
.dist-pill {
  position: absolute; z-index: 3; left: 0; top: 0; white-space: nowrap; pointer-events: none; visibility: hidden;
  padding: calc(var(--cu) * 5) calc(var(--cu) * 12); border-radius: 999px; background: var(--red); border: 2px solid #fff;
  font-weight: 900; font-size: calc(var(--cu) * 14); box-shadow: 0 3px 8px rgba(120, 20, 20, .3);
}
.zoom { position: absolute; z-index: 3; left: 12px; top: calc(var(--cu) * 92); display: flex; flex-direction: column; gap: 6px; transition: opacity .3s; }
.zoom button {
  width: 38px; height: 38px; border: 0; border-radius: 12px; cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1;
  color: var(--navy); background: var(--surface); box-shadow: 0 3px 10px rgba(33, 25, 110, .25);
}
.sheet, .result {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: calc(var(--cu) * 22) calc(var(--cu) * 12) calc(var(--cu) * 14);
  background: var(--surface); color: var(--navy); border-radius: calc(var(--cu) * 24) calc(var(--cu) * 24) 0 0;
  box-shadow: 0 -4px 18px rgba(33, 25, 110, .2); transition: transform .5s cubic-bezier(.2, .85, .2, 1);
}
.handle { position: absolute; left: 50%; top: calc(var(--cu) * 9); width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--muted); }
.caption { margin: 0 0 calc(var(--cu) * 12); text-align: center; font-weight: 700; font-size: calc(var(--cu) * 14); color: var(--text2); }
.actions { display: flex; gap: calc(var(--cu) * 12); }
.action {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: calc(var(--cu) * 50);
  padding: 0 10px; border-radius: calc(var(--cu) * 16); cursor: pointer; font-weight: 900; font-size: calc(var(--cu) * 12.5);
  letter-spacing: .05em; box-shadow: 0 3px 8px rgba(33, 25, 110, .2); transition: transform .15s, background .25s, color .25s;
}
.action:active { transform: scale(.96); }
.action svg { width: calc(var(--cu) * 19); height: calc(var(--cu) * 19); fill: currentColor; flex: none; }
.action--primary { border: 0; background: var(--raised); color: var(--surface); }
.action--primary:disabled { cursor: default; background: var(--muted); color: var(--text2); box-shadow: none; }
.action--outline { background: var(--surface); color: var(--navy); border: 2px solid var(--raised); }
.result { transform: translateY(105%); z-index: 9; }
.result-place { margin: 0; text-align: center; font-weight: 800; font-size: calc(var(--cu) * 13); color: var(--text2); letter-spacing: .02em; }
.result-points { margin: 2px 0 calc(var(--cu) * 12); text-align: center; font-size: calc(var(--cu) * 14); color: var(--text2); }
.result-points b { font: 400 calc(var(--cu) * 30)/1 var(--display); color: var(--navy); letter-spacing: .02em; }

/* Result pieces */
.ribbon {
  position: absolute; z-index: 8; left: 50%; top: calc(var(--cu) * 82); width: min(calc(var(--cu) * 320), calc(100% - 16px));
  aspect-ratio: 330 / 78; transform: translateX(-50%) scale(.6) translateY(-30px); opacity: 0; pointer-events: none;
  transition: transform .5s cubic-bezier(.2, 1.5, .4, 1), opacity .3s;
}
.ribbon svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(90, 10, 20, .3)); }
.ribbon b {
  position: absolute; left: 0; right: 0; top: 0; height: 72%; display: flex; align-items: center; justify-content: center;
  font: 400 calc(var(--cu) * 46)/1 var(--display); letter-spacing: .02em; padding-top: 2%;
}
.reaction {
  position: absolute; z-index: 8; left: 0; right: 0; top: calc(var(--cu) * 158); margin: 0; text-align: center; pointer-events: none;
  font: 400 calc(var(--cu) * 40)/1 var(--display); letter-spacing: .02em; color: var(--amber);
  text-shadow: 2px 0 var(--navy), -2px 0 var(--navy), 0 2px var(--navy), 0 -2px var(--navy), 2px 2px var(--navy), -2px 2px var(--navy), 2px -2px var(--navy), -2px -2px var(--navy), 0 5px var(--navy);
  transform: rotate(-4deg) scale(.2); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.6, .4, 1), opacity .25s;
}
.stamp {
  position: absolute; z-index: 8; left: calc(var(--cu) * 10); bottom: calc(var(--cu) * 158); width: calc(var(--cu) * 120); height: calc(var(--cu) * 120);
  color: #e3203f; opacity: 0; pointer-events: none; --r: -12deg; transform: rotate(var(--r)) scale(2.2);
}
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.stamp text { fill: currentColor; font-family: var(--display); }
.stamp-arc { font-size: 17px; letter-spacing: 3px; }
.stamp-city { font-size: 38px; letter-spacing: 1px; }
.stamp-points { font-size: 21px; letter-spacing: 1px; }
.stamp.show { animation: stamp .42s cubic-bezier(.3, 1.2, .5, 1) forwards; }
.confetti { position: absolute; z-index: 7; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Phases */
.card[data-phase="map"] .mapview,
.card[data-phase="result"] .mapview,
.card[data-phase="summary"] .mapview { transform: none; }
.card[data-phase="result"] .sheet, .card[data-phase="summary"] .sheet { transform: translateY(110%); }
.card[data-phase="result"] .result { transform: none; }
.card[data-phase="result"] .zoom, .card[data-phase="summary"] .zoom { opacity: 0; pointer-events: none; }
.card:not([data-phase="explore"]):not([data-phase="review"]) .map-btn { opacity: 0; pointer-events: none; transform: scale(.6); }
.card:not([data-phase="explore"]) .hint { opacity: 0; }
.card[data-phase="result"] .ribbon.on, .card[data-phase="summary"] .ribbon.on { opacity: 1; transform: translateX(-50%); }
.card .reaction.on { opacity: 1; transform: rotate(-4deg) scale(1); }
.card .reaction.on.fade { opacity: 0; transform: rotate(-4deg) scale(.9) translateY(-10px); transition-duration: .6s; }
.card[data-phase="review"] .ribbon, .card[data-phase="review"] .reaction, .card[data-phase="review"] .stamp,
.card[data-phase="summary"] .ribbon, .card[data-phase="summary"] .reaction, .card[data-phase="summary"] .stamp { visibility: hidden; }

.summary {
  z-index: 11; display: flex; align-items: center; justify-content: center; padding: calc(var(--cu) * 80) 18px 18px;
  background: linear-gradient(rgba(29, 18, 102, .93), rgba(17, 9, 57, .98) 55%); color: #fff; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s;
}
.card[data-phase="summary"] .summary { opacity: 1; visibility: visible; transition: opacity .5s; }
.summary-inner { width: 100%; max-width: 420px; }
.summary-kicker { margin: 0; font: 400 calc(var(--cu) * 22)/1 var(--display); letter-spacing: .2em; color: var(--cyan); }
.summary-total { margin: 4px 0 10px; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.summary-total b { font: 400 calc(var(--cu) * 72)/.9 var(--display); color: var(--amber); text-shadow: 0 5px 0 var(--navy); }
.summary-total span { font-weight: 800; color: var(--soft); }
.summary-rounds { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.summary-rounds li {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: 12px;
  font-size: calc(var(--cu) * 14); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
}
.summary-rounds li span { color: var(--soft); }
.summary-rounds li b { font-weight: 800; }
.summary-versus { margin: 0 0 12px; font-weight: 800; color: var(--amber); }
.summary .actions { margin-bottom: 14px; }
.summary .action--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.summary-more { margin: 0 0 10px; font-size: 14px; color: var(--soft); }
.stores--mini { justify-content: center; animation: none; }
.stores--mini .badge img, .stores--mini .soon { height: 44px; }
.stores--mini .qr { display: none; }

.challenge-banner {
  position: absolute; z-index: 9; left: 50%; top: calc(var(--cu) * 84); margin: 0; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; white-space: nowrap; font-weight: 800; font-size: 13px;
  color: var(--navy); background: var(--amber); box-shadow: 0 6px 18px rgba(20, 10, 60, .35); transition: opacity .4s;
}
.card:not([data-phase="explore"]) .challenge-banner { opacity: 0; }
.loading { z-index: 12; display: grid; place-items: center; background: rgba(13, 8, 51, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.card[data-phase="loading"] .loading { opacity: 1; visibility: visible; transition: opacity .3s; }
.loading span { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: var(--cyan); animation: spin .9s linear infinite; }
.toast {
  position: absolute; z-index: 13; left: 50%; bottom: 18px; margin: 0; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--navy); font-weight: 800; font-size: 14px;
  box-shadow: 0 8px 24px rgba(10, 5, 40, .35); transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: absolute; inset: auto 16px 16px; z-index: 13; margin: 0; padding: 12px; border-radius: 12px; background: rgba(13, 8, 51, .8); text-align: center; }
.card:has(noscript) .street { background: url(places/kyoto-low.webp) 40% 50% / auto 180% no-repeat; }

/* ---------------------------------------------------------------- footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; font-size: 12px; color: rgba(212, 207, 248, .72); }
.foot p { margin: 0; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--soft); font-weight: 700; text-decoration: none; }
.foot nav a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 820px) {
  .page { padding: max(10px, env(safe-area-inset-top)) 14px max(8px, env(safe-area-inset-bottom)); }
  .top { justify-content: center; }
  .brand img { height: clamp(44px, 7.4vh, 64px); }
  .proof, .eyebrow, .modes { display: none; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 6px 0 8px; }
  .pitch, .play { display: contents; }
  h1 { order: 1; text-align: center; font-size: clamp(34px, 10.4vw, 54px); }
  .lead { order: 2; display: none; }
  .board { order: 3; }
  .card { order: 4; flex: 1 1 auto; aspect-ratio: auto; max-height: none; min-height: 290px; border-radius: 22px; transform: none; }
  .stores { order: 5; justify-content: center; gap: 10px 14px; }
  .board { gap: 3px; }
  .flap { width: min(6.6vw, 30px); height: min(9.4vw, 42px); font-size: min(6.6vw, 30px); border-radius: 5px; }
  .foot { justify-content: center; text-align: center; font-size: 11px; }
  .foot p { display: none; }
}
@media (max-width: 820px) and (min-height: 760px) {
  .lead { display: block; margin: -4px auto 2px; text-align: center; font-size: 14px; max-width: 34em; }
}
@media (max-height: 640px) and (max-width: 820px) {
  .board { display: none; }
}

/* ---------------------------------------------------------------- motion */
@keyframes drop-in { from { transform: translateY(-40px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(-88deg); } 100% { transform: rotateX(0); } }
@keyframes sway { 0%, 100% { transform: translateX(-7px) rotate(-8deg); } 50% { transform: translateX(7px) rotate(8deg); } }
@keyframes nudge { 0%, 100% { box-shadow: 0 4px 14px rgba(20, 12, 70, .5), 0 0 0 0 rgba(255, 201, 51, .7); } 60% { box-shadow: 0 4px 14px rgba(20, 12, 70, .5), 0 0 0 16px rgba(255, 201, 51, 0); } }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(255, 201, 51, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 201, 51, 0); } }
@keyframes pin-drop { 0% { transform: translateY(-70px) scale(.7); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes stamp { 0% { opacity: 0; transform: rotate(var(--r)) scale(2.2); } 70% { opacity: .95; transform: rotate(var(--r)) scale(.94); } 100% { opacity: .9; transform: rotate(var(--r)) scale(1); } }
@keyframes thud { 0% { translate: 0 0; } 25% { translate: 0 5px; } 55% { translate: 0 -2px; } 100% { translate: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
