/* Monster Hunt tutorial – styles in the look of the Monster Hunt app. */

@font-face { font-family: "PiSCoffinsandGhosts"; src: url("../assets/fonts/PiSCoffinsandGhosts.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat Alternates"; font-weight: 400; src: url("../assets/fonts/montserrat-alternates-v12-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat Alternates"; font-weight: 700; src: url("../assets/fonts/montserrat-alternates-v12-latin-700.woff2") format("woff2"); font-display: swap; }

:root {
  /* App palette (from the app's style.css) */
  --black: #000;
  --navy: #1d2c4d;
  --purple: #774be2;
  --violet: #9663ff;
  --lavender: #b59fff;
  --mint: #def3d7;
  --sage: #81ac95;
  --magenta: #fd00f9;
  --pink: #ff00b3;
  --pink-pale: #ffc2ff;
  --yellow: #fffc2a;
  --lime: #a5ff00;
  --cyan: #00faff;

  --font-display: "PiSCoffinsandGhosts", "Montserrat Alternates", system-ui, sans-serif;
  --font-story: "Trattatello", "Montserrat Alternates", system-ui, sans-serif;
  --font-body: "Montserrat Alternates", system-ui, sans-serif;

  --frame: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Monster card: as wide as the phone, but never so tall that Georgina has no room above it */
  /* card fits on screen completely when open: 70 px free at the top, 14 px at the bottom */
  --card-w: min(100vw, 430px, calc((100dvh - 84px - var(--safe-top) - var(--safe-bottom)) * 0.5859));
  --peek: calc(var(--card-w) * 0.3787);     /* closed: card shows its top 142 of 375 … */
  --peek-vis: calc(var(--card-w) * 0.232);  /* … of which the small hex + card edge are visible (87 of 375) */
}

* { box-sizing: border-box; }
html { touch-action: manipulation; } /* no double-tap page zoom */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--navy); color: var(--purple); font-family: var(--font-body); -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Layers ---------- */
.layer { position: fixed !important; inset: 0; width: 100%; height: 100%; } /* Google sets position:relative inline */
/* Teleport: the map zooms into the pin and fades out, Street View fades in.
   Next chapter: Street View fades out and the map fades back in. */
#map { z-index: 1; transition: opacity 1.1s ease-in-out; }
body[data-phase="teleport"] #map { transition: opacity .9s ease-in-out 1.35s; } /* zoom in first, fade at the very end */
body[data-phase="teleport"] #map,
body[data-phase="streetview"] #map,
body[data-phase="found"] #map,
body[data-phase="story"] #map,
body[data-phase="end"] #map { opacity: 0; }
#pano { z-index: 2; opacity: 0; pointer-events: none; transition: opacity 1s ease-in-out; }
body[data-phase="streetview"] #pano,
body[data-phase="found"] #pano,
body[data-phase="story"] #pano,
body[data-phase="end"] #pano { opacity: 1; pointer-events: auto; }
body[data-phase="hop"] #pano { opacity: 0; transition-duration: .9s; }

/* Street View and the map always fill the whole screen (the closed card sits on top). */
:root { --dock: calc(var(--card-w) * 14 / 375); } /* height of the closed card's edge strip – the mini map sits above it */

/* Start screen: night sky, Vienna's silhouettes in two layers drifting slowly, smoke on top.
   Google only loads after Start. */
.welcome-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--navy);
  transition: opacity .4s ease-out; }
.welcome-bg__sky { position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 46% at 50% 100%, rgba(253,0,249,.34), rgba(253,0,249,0) 70%),
    radial-gradient(ellipse 90% 60% at 50% 62%, rgba(119,75,226,.62), rgba(29,44,77,0) 74%),
    linear-gradient(180deg, #121a33 0%, var(--navy) 55%, #3a2a78 100%); }
/* The city stands on the top edge of the box (--welcome-lift is set from the box's height in welcome-fx.js);
   below it a dark ground fills the space around the box. Each layer is one tile wide per scroll and repeats seamlessly. */
:root { --welcome-lift: 300px; --sky-far: clamp(150px, 25dvh, 270px); --sky-near: clamp(86px, 14dvh, 150px); }
.welcome-bg__ground { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--welcome-lift) + 4px); background: #0d1330; transition: height .4s ease; }
.welcome-bg__skyline { position: absolute; left: 0; bottom: calc(var(--welcome-lift) + 2px); width: calc(100% + var(--tile)); height: var(--h);
  background-repeat: repeat-x; background-position: 0 100%; background-size: auto 100%; will-change: transform;
  transition: bottom .4s ease; }
.welcome-bg__skyline--far  { --h: var(--sky-far);  --tile: calc(var(--sky-far) * 800 / 300);  background-image: url("../assets/ui/vienna_skyline_far.svg");  animation: skyline-drift 150s linear infinite; }
.welcome-bg__skyline--near { --h: var(--sky-near); --tile: calc(var(--sky-near) * 800 / 300); background-image: url("../assets/ui/vienna_skyline_near.svg"); animation: skyline-drift 90s linear infinite; bottom: calc(var(--welcome-lift) - 2px); }
@keyframes skyline-drift { to { transform: translate3d(calc(-1 * var(--tile)), 0, 0); } }
@media (prefers-reduced-motion: reduce) { .welcome-bg__skyline { animation: none; } }
/* Start tapped: the city is gone at once (the smoke thickens while it fades) */
.welcome-bg__skyline, .welcome-bg__ground { transition: bottom .4s ease, opacity .7s ease-out; }
body.starting .welcome-bg__skyline, body.starting .welcome-bg__ground { opacity: 0; }
/* once the tutorial starts the city just freezes while it fades (no jump back to the start) */
body:not([data-phase="welcome"]) .welcome-bg__skyline { animation-play-state: paused; }
body:not([data-phase="welcome"]) .welcome-bg { opacity: 0; }
body[data-phase="welcome"] #map { opacity: 0; }
/* The map is simply there, under the thick smoke; only the smoke dissolves. (A fading map would show the
   start screen's city through it, and fading a big map layer is heavy on phones.) */
body[data-phase="intro"] #map { transition: none; }

/* smoke over everything on the start screen (below the box); thick while the map loads, then frozen and
   dissolved by CSS (GPU only: opacity + a slight rise) once the tutorial starts */
.smoke { position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; opacity: 1;
  transition: opacity 3.2s cubic-bezier(.4,0,.5,1), transform 3.6s ease-out; will-change: opacity, transform; } /* 3.2 s = FADE_MS in js/welcome-fx.js */
.smoke.is-leaving { opacity: 0; transform: translateY(-5%) scale(1.08); }
.smoke.is-thick { filter: brightness(1.15); }

/* ---------- Buttons (app style: purple slab with lime base) ---------- */
.btn {
  position: relative; border: 0; border-radius: 4px;
  padding: 14px 22px 18px; min-height: 52px;
  font-family: var(--font-display); font-size: 20px; line-height: 1; letter-spacing: .02em;
  text-transform: uppercase;
}
.btn--primary {
  background: var(--purple); color: var(--cyan);
  text-shadow: -2px 1px 0 var(--magenta);
  box-shadow: inset 0 -6px 0 var(--lime), 0 0 18px 2px rgba(165,255,0,.45);
}
.btn--primary:active { transform: translateY(2px); box-shadow: inset 0 -3px 0 var(--lime), 0 0 12px 2px rgba(165,255,0,.45); }
.btn--ghost { background: transparent; color: var(--mint); font-family: var(--font-body); font-weight: 700; font-size: 15px; text-transform: none; text-shadow: none; }

/* ---------- Card frame (the app's chamfered card: main_menu_card.svg) ---------- */
.card-frame {
  -webkit-mask-box-image-source: url("../assets/ui/main_menu_card.svg");
  -webkit-mask-box-image-slice: 34% fill;
  -webkit-mask-box-image-width: 1.5rem;
  mask-border-source: url("../assets/ui/main_menu_card.svg");
  mask-border-slice: 34% fill;
  mask-border-width: 1.5rem;
}

/* ---------- Welcome: big logo, title, roomy box at the bottom ---------- */
.welcome { position: fixed; z-index: 10; inset: 0; pointer-events: none;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center;
  padding: calc(18px + var(--safe-top)) var(--frame) calc(var(--frame) + var(--safe-bottom)); }
.welcome__logo { width: min(66vw, 300px, 34dvh); height: auto; display: block;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.95)) drop-shadow(0 0 28px rgba(255,255,255,.6)) drop-shadow(0 0 60px rgba(0,250,255,.45));
  animation: logo-glow 3.2s ease-in-out infinite; }
@keyframes logo-glow { 50% { filter: drop-shadow(0 0 14px rgba(255,255,255,1)) drop-shadow(0 0 36px rgba(255,255,255,.7)) drop-shadow(0 0 80px rgba(0,250,255,.55)); } }
.welcome__title { align-self: center; margin: 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 16vw, 92px); line-height: 1; letter-spacing: .02em; text-transform: uppercase;
  color: var(--cyan); text-shadow: -4px 3px 0 var(--magenta), 0 0 30px rgba(29,44,77,.9), 0 0 60px rgba(119,75,226,.8); }
/* generous padding so the chamfered frame never touches the text; the text sits in the middle as one block */
.welcome__box { width: 100%; max-width: 460px; padding: 30px 34px 30px; text-align: center; pointer-events: auto;
  background: radial-gradient(circle at 50% 20%, var(--yellow), var(--pink-pale) 70%); color: var(--purple);
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  -webkit-mask-box-image-source: url("../assets/ui/main_menu_card.svg"); -webkit-mask-box-image-slice: 34% fill; -webkit-mask-box-image-width: 1.5rem;
  mask-border-source: url("../assets/ui/main_menu_card.svg"); mask-border-slice: 34% fill; mask-border-width: 1.5rem; }
.welcome > * { transition: transform .6s cubic-bezier(.5,0,.75,0), opacity .5s; }
body:not([data-phase="welcome"]) .welcome { pointer-events: none; }
body:not([data-phase="welcome"]) .welcome > * { opacity: 0; pointer-events: none; }
body:not([data-phase="welcome"]) .welcome__logo { transform: translateY(-24px) scale(.94); transition: opacity 2.4s ease-in-out .2s, transform 2.8s ease-out; }
body:not([data-phase="welcome"]) .welcome__title { transform: scale(1.15); }
body:not([data-phase="welcome"]) .welcome__box { transform: translateY(120%); }
/* Start tapped: title and box step aside, logo stays in the smoke until the map is ready */
body.starting .welcome__title, body.starting .welcome__box { opacity: 0; pointer-events: none; transition: opacity .5s, transform .6s ease-in; }
body.starting .welcome__box { transform: translateY(40px); }
body.starting .welcome__title { transform: scale(1.08); }
.welcome__text { margin: 0 auto 20px; max-width: 30ch; font-size: 16.5px; line-height: 1.5; color: #3b2a72; text-wrap: balance; }
.welcome__step #start { min-width: 200px; }
#start.is-loading { opacity: .75; cursor: progress; }
.welcome__privacy { margin: 16px auto 0; max-width: 34ch; font-size: 11.5px; line-height: 1.45; color: #5b4a92; text-wrap: balance; }
.welcome__privacy a { color: var(--purple); font-weight: 700; }

/* Phones held sideways: too little height for card and Street View */
.rotate { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate { display: grid; position: fixed; inset: 0; z-index: 200; place-content: center; justify-items: center; gap: 14px; padding: 24px;
    background: var(--navy); color: var(--mint); text-align: center; font-weight: 700; font-size: 18px; }
  .rotate img { width: 90px; height: auto; }
  .rotate p { margin: 0; max-width: 320px; }
}
.welcome__ask { margin: 0 0 14px; font-family: var(--font-story); font-size: 26px; line-height: 1.1; color: var(--purple); }
.welcome__ask--en { margin: 14px 0 0; }
.welcome__note { margin: 16px auto 0; max-width: 34ch; font-size: 11.5px; line-height: 1.5; color: #5b4a92; text-wrap: balance; }
/* start screen: two buttons of their own (not one pill with two halves) */
.lang-split { display: flex; gap: 14px; justify-content: center; }
.lang-split .btn { flex: 1 1 0; min-width: 0; max-width: 170px; }
.lang--big { display: flex; gap: 6px; justify-content: center; }
.lang--big button { min-width: 112px; padding: 11px 16px; font-size: 16px; }

.lang { display: inline-flex; background: rgba(119,75,226,.15); border-radius: 99px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--purple); font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: 99px; min-width: 44px; }
.lang button[aria-pressed="true"] { background: var(--purple); color: var(--cyan); }
.mapmode button { min-width: 0; flex: 1; font-size: 14px; padding: 10px 8px; }

/* ---------- Georgina's speech bubble ---------- */
.bubble {
  position: fixed; z-index: 20;
  left: var(--frame); right: var(--frame);
  bottom: calc(var(--frame) + 6px + var(--safe-bottom));
  max-width: 460px; margin: 0 auto;
  display: grid; justify-items: center;
  pointer-events: none;
  animation: bubble-in .35s ease-out;
}
/* While the card bookmark is showing, Georgina sits above it. */
body.has-card .bubble { bottom: calc(var(--peek-vis) + 10px); }
/* While the card is open: compact message at the very bottom, over the card's foot. */
body.has-card .bubble--card { bottom: calc(6px + var(--safe-bottom)); z-index: 32; }
.bubble--card .bubble__head { display: none; }
.bubble--card .bubble__box { padding: 14px 32px 12px; }
.bubble--card .bubble__text { font-size: 17px; line-height: 1.2; min-height: 0; margin: 0; }
.bubble--top, body.has-card .bubble--top { bottom: auto; top: calc(10px + var(--safe-top)); z-index: 32; }
.bubble--top .bubble__head { width: 92px; }
.bubble--top .bubble__text { font-size: 18px; min-height: 0; }
@keyframes bubble-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.bubble__head { width: 132px; height: auto; display: block; margin: 0 auto -2px; }
.bubble__head--active { display: none; }
/* pressed: the app's second palette (yellow -> cyan, magenta text, magenta Georgina) */
.bubble__box { cursor: pointer; -webkit-user-select: none; user-select: none; transition: color .12s; }
.bubble__box.is-pressed { color: var(--magenta); background: radial-gradient(circle at 50% 25%, var(--yellow), var(--yellow) 40%, var(--cyan)); }
.bubble__box.is-pressed .bubble__head { display: none; }
.bubble__box.is-pressed .bubble__head--active { display: block; }
.bubble--card .bubble__box.is-pressed .bubble__head--active { display: none; }

/* Settings (top right) */
/* Menu: the app's moth (top right) */
.settings-btn { position: fixed; z-index: 33; right: 10px; top: calc(8px + var(--safe-top)); width: 52px; height: 63px; padding: 0; border: 0; background: none;
  filter: drop-shadow(0 0 6px rgba(165,255,0,.7)) drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.settings-btn__moth { width: 100%; height: 100%; display: block; pointer-events: none; }
.card__flipbtn *, .card__close img { pointer-events: none; }
.settings-btn, .view-btn, .georgina-btn, .settings button, .card__flipbtn, .card__close { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.view-btn img, .georgina-btn *, .motion-toggle * { pointer-events: none; }
.settings-btn__moth--active { display: none; }
.settings-btn:active .settings-btn__moth { display: none; }
.settings-btn:active .settings-btn__moth--active { display: block; }
.settings { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: var(--frame); background: rgba(29,44,77,.55); }
.settings__box { width: 100%; max-width: 360px; padding: 28px 32px 30px; text-align: center; display: grid; gap: 10px;
  background: radial-gradient(circle at 50% 20%, var(--yellow), var(--pink-pale) 70%); color: var(--purple);
  -webkit-mask-box-image-source: url("../assets/ui/main_menu_card.svg"); -webkit-mask-box-image-slice: 34% fill; -webkit-mask-box-image-width: 1.5rem;
  mask-border-source: url("../assets/ui/main_menu_card.svg"); mask-border-slice: 34% fill; mask-border-width: 1.5rem; }
.settings__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--purple); text-shadow: -2px 1px 0 var(--cyan); }
.settings__label { margin: 4px 0 0; font-family: var(--font-story); font-size: 20px; }
.settings .btn--ghost { color: var(--purple); }
.dev.is-min { width: auto; padding: 2px; background: rgba(0,0,0,.5); }

/* Georgina folded away into a small face – tap to read again */
.georgina-btn { position: fixed; z-index: 33; left: calc(50% - 29px); top: calc(12px + var(--safe-top)); width: 58px; height: 58px; padding: 0; border: 0;
  border-radius: 50%; background: radial-gradient(circle at 50% 30%, var(--yellow), var(--pink-pale) 75%);
  box-shadow: 0 0 0 3px var(--purple), 0 0 0 5px var(--lime), 0 4px 14px rgba(0,0,0,.45); animation: g-in .35s cubic-bezier(.3,1.5,.5,1); }
.georgina-btn:active { background: radial-gradient(circle at 50% 30%, var(--yellow), var(--cyan) 80%); }
.georgina-btn__face { position: absolute; inset: 0; border-radius: 50%;
  background: url("../assets/ui/storyBubbleHeader.svg") 50% 22% / 265% auto no-repeat; }
.georgina-btn:active .georgina-btn__face { background-image: url("../assets/ui/storyBubbleHeaderActive.svg"); }
.georgina-btn__dot { position: absolute; right: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--magenta);
  border: 2px solid #fff; display: none; }
.georgina-btn.has-new .georgina-btn__dot { display: block; animation: dot 1.2s ease-in-out infinite; }
@keyframes dot { 50% { transform: scale(1.3); } }
@keyframes g-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.bubble__box {
  width: 100%;
  padding: 18px 34px 20px;
  background: radial-gradient(circle at 50% 25%, var(--yellow), var(--pink-pale) 70%);
  color: var(--purple);
  text-align: center;
  pointer-events: auto;
  -webkit-mask-box-image-source: url("../assets/ui/main_menu_card.svg"); -webkit-mask-box-image-slice: 34% fill; -webkit-mask-box-image-width: 1.5rem;
  mask-border-source: url("../assets/ui/main_menu_card.svg"); mask-border-slice: 34% fill; mask-border-width: 1.5rem;
}
.bubble__close { position: absolute; right: 12px; top: 14px; width: 30px; height: 30px; padding: 4px; border: 0; background: none; z-index: 2; touch-action: manipulation; }
.bubble__close img { width: 100%; height: 100%; display: block; pointer-events: none; }
.bubble__close:active { transform: scale(.9); }
.bubble__box { position: relative; }
.bubble__text { margin: 4px auto 8px; font-family: var(--font-story); font-size: 21px; line-height: 1.22; min-height: 2.4em; text-wrap: balance; }
.bubble__next {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--magenta);
  font-family: var(--font-story); font-size: 19px; padding: 6px 10px;
}
.bubble__next img { height: 24px; width: auto; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

/* ---------- Georgina's teleport pin on the map ---------- */
/* The pin graphic leans left – its tip (anchor) is at --tip-x of its width. */
.gpin { position: absolute; width: 60px; aspect-ratio: 261/451; cursor: pointer; transform: translate(calc(-1 * var(--tip-x, 50%)), -100%); animation: pin-drop .7s cubic-bezier(.3,1.6,.5,1) both; }
.gpin img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 10px rgba(0,250,255,.8)); }
.gpin__ring { /* pulsing ring at the pin's tip */
  position: absolute; left: var(--tip-x, 50%); bottom: -8px; width: 34px; height: 16px; margin-left: -17px;
  border-radius: 50%; border: 3px solid var(--cyan); animation: pulse 1.4s ease-out infinite;
}
/* Chapter 1: the app's monster pin (magenta hexagon with the grimace, green point) – tip in the middle */
.gpin--monster { width: 64px; aspect-ratio: 38/71.2; }
.gpin--monster svg { position: relative; z-index: 1; width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 0 10px rgba(253,0,249,.75)); }
.gpin--monster .gpin__ring { border-color: var(--lime); }
@keyframes pin-drop { from { transform: translate(calc(-1 * var(--tip-x, 50%)), -260%); opacity: 0; } to { transform: translate(calc(-1 * var(--tip-x, 50%)), -100%); opacity: 1; } }
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- Purple vignette over Street View (app look) ---------- */
.vignette { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(ellipse 75% 65% at 50% 46%, rgba(119,75,226,0) 55%, rgba(119,75,226,.38) 78%, rgba(60,20,140,.85) 100%); }
body[data-phase="streetview"] .vignette, body[data-phase="found"] .vignette,
body[data-phase="story"] .vignette, body[data-phase="end"] .vignette { opacity: 1; }

/* ---------- Viewfinder ---------- */
.finder { position: fixed; z-index: 15; left: 50%; top: 46%; width: min(42vmin, 220px); aspect-ratio: 174/200; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .4s; --near: 0; }
body[data-phase="streetview"] .finder { opacity: 1; }
.finder__hex, .finder__glow { position: absolute; inset: 0; -webkit-mask: url("../assets/ui/hex.svg") center / contain no-repeat; mask: url("../assets/ui/hex.svg") center / contain no-repeat; }
.finder__hex { background: transparent; box-shadow: none;
  /* outline of the hexagon: two stacked masks would be heavier – use a thin ring via radial trick */
  background: conic-gradient(from 0deg, var(--cyan), var(--magenta), var(--lime), var(--cyan));
  -webkit-mask: url("../assets/ui/hex.svg") center / contain no-repeat, url("../assets/ui/hex.svg") center / 86% no-repeat;
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: calc(.45 + var(--near) * .55);
}
.finder__glow { background: radial-gradient(circle, rgba(255,252,42,.55), rgba(255,252,42,0) 70%); opacity: calc(var(--near) * var(--near)); }
.finder.is-locking .finder__hex { animation: spin 0.7s linear infinite; }
/* hold still: a lime line runs once round the hexagon until the monster counts */
.finder__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.finder__ring polygon { fill: none; stroke: var(--lime); stroke-width: 7; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(165,255,0,.8)); }
.finder.is-locking .finder__ring polygon { opacity: 1; animation: hold-ring var(--hold, .9s) linear forwards; }
@keyframes hold-ring { to { stroke-dashoffset: 0; } }
@keyframes spin { to { filter: hue-rotate(360deg); } }

/* drag hint */
.drag-hint { position: fixed; z-index: 16; left: 50%; top: calc(46% + min(25vmin, 130px)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
  padding: 8px 14px; border-radius: 99px; background: rgba(29,44,77,.75); color: var(--mint); font-size: 14px; font-weight: 700; pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; }
body[data-phase="streetview"] .drag-hint.show, body[data-phase="pin"] .drag-hint.show { opacity: 1; }
.drag-hint__hand { width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: drag 1.6s ease-in-out infinite; }
@keyframes drag { 0%,100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
/* walking: the dot taps (presses in, a ring spreads) instead of sliding */
.drag-hint.is-tap .drag-hint__hand { position: relative; animation: tap 1.4s ease-in-out infinite; }
.drag-hint.is-tap .drag-hint__hand::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--cyan); opacity: 0; animation: tap-ring 1.4s ease-out infinite; }
@keyframes tap { 0%, 30%, 100% { transform: scale(1); } 40% { transform: scale(.62); } 55% { transform: scale(1.05); } }
@keyframes tap-ring { 0%, 38% { transform: scale(.6); opacity: 0; } 42% { opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }

/* found flash */
.flash { position: fixed; inset: 0; z-index: 40; background: var(--yellow); opacity: 0; pointer-events: none; }
.flash.go { animation: flash 1s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .95; } 100% { opacity: 0; } }

/* ---------- Found banner ---------- */
.found { position: fixed; z-index: 25; left: 50%; top: calc(var(--frame) + var(--safe-top) + 4px); transform: translateX(-50%); text-align: center; animation: found-in .6s cubic-bezier(.3,1.5,.5,1) both; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
@keyframes found-in { from { transform: translate(-50%, -30px) scale(.6); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.found__flip { position: relative; width: 104px; aspect-ratio: 174/200; margin: 0 auto 6px; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.4,1.5,.5,1), width .9s ease; }
.found__flip.is-flipped { transform: rotateY(180deg); width: 132px; }
.found__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  -webkit-mask: url("../assets/ui/hex.svg") center / contain no-repeat; mask: url("../assets/ui/hex.svg") center / contain no-repeat;
  background: radial-gradient(circle, var(--yellow), var(--lime)); }
.found__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.found__face--back { transform: rotateY(180deg); background: #fff; }
.found__flip.is-flipped::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(255,252,42,.6), rgba(255,252,42,0) 65%); transform: rotateY(180deg); animation: glow-out 1.4s ease-out forwards; pointer-events: none; }
@keyframes glow-out { from { opacity: 1; } to { opacity: 0; } }
.found__label { margin: 0; font-family: var(--font-display); font-size: 16px; color: var(--lime); text-shadow: 0 0 8px rgba(0,0,0,.8), -1px 1px 0 var(--purple); }
.found__name { margin: 2px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; color: var(--cyan); text-shadow: -2px 1px 0 var(--magenta), 0 0 14px rgba(0,0,0,.7); }
body[data-phase="story"] .found, body[data-phase="end"] .found { animation: none; }

/* ---------- End of chapter ---------- */
.chapter-end a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.chapter-end { display: grid; gap: 10px; margin-top: 12px; }
.chapter-end .btn--ghost { color: var(--purple); }

/* ---------- Monster card ---------- */
/* Built from the app's card design (375 × 667 artboard, card art cropped to
   y 20–660 → 375 × 640). Every position below is in that 375 px grid:
   N * var(--u). Closed, only the hex and the top edge of the card peek out. */
.card { position: fixed; z-index: 30; left: 50%; bottom: 0; width: var(--card-w);
  transform: translate(-50%, calc(100% - var(--peek))); transition: transform .42s cubic-bezier(.2,.9,.3,1);
  pointer-events: none; }
/* Open: the whole card is visible, its bottom edge just above the screen edge – like holding a card. */
.card.is-open { transform: translate(-50%, calc(-14px - var(--safe-bottom))); }
.card.is-dragging { transition: none; }
/* hidden while the screen changes (teleport, flying between places) */
body[data-phase="teleport"] .card, body[data-phase="hop"] .card { opacity: 0; pointer-events: none; }
.card { transition: transform .42s cubic-bezier(.2,.9,.3,1), opacity .4s; }
.card.is-dragging { transition: none; }

.card__art { position: relative; width: 100%; aspect-ratio: 375/640; container-type: inline-size; --u: calc(100cqw / 375);
  perspective: 1600px; }
.card__art > *, .card__side > * { position: absolute; margin: 0; }

/* the card turns over: front (riddle) <-> back (map or story) */
.card__flip { inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.4,1.25,.5,1); pointer-events: none; z-index: 1; }
.card.is-flipped .card__flip { transform: rotateY(180deg); }
.card__side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 -6px 22px rgba(0,0,0,.45)); }
.card__side--back { transform: rotateY(180deg); }
.card.is-flipped .card__side--front *, .card:not(.is-flipped) .card__side--back * { pointer-events: none !important; }
.card[data-back="map"] .card__only-solved, .card[data-back="solved"] .card__only-map { display: none; }
.card__body { inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.card__plate { /* the card surface: grab anywhere to drag */
  left: calc(16 * var(--u)); top: calc(128 * var(--u)); right: calc(16 * var(--u)); bottom: 0;
  pointer-events: auto; touch-action: none; cursor: grab; }
.card.is-dragging .card__plate, .card.is-dragging .card__hex { cursor: grabbing; }

.card__hex { left: calc(116 * var(--u)); top: 0; width: calc(143 * var(--u)); height: calc(170 * var(--u));
  padding: 0; border: 0; background: none; pointer-events: auto; touch-action: none; cursor: grab; z-index: 2;
  transform-origin: 50% 100%; transition: transform .4s cubic-bezier(.2,.9,.3,1); filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
/* closed: a small bookmark – half size, sitting on the card's top edge */
.card:not(.is-open):not(.is-dragging) .card__hex { transform: translateY(calc(-28 * var(--u))) scale(.5); }
.card__hex.is-turning { transform: rotateY(90deg); transition-timing-function: ease-in; transition-duration: .35s; }
.card__hex.is-solved { filter: drop-shadow(0 0 14px rgba(255,252,42,.9)); }
/* found: the grimace can be scratched off the hex – which grows for it
   (bottom edge stays where it is, so it never covers the name) */
.card__hex, .card__hex * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.card.is-open .card__hex { transition: transform .4s cubic-bezier(.2,.9,.3,1), left .4s, top .4s, width .4s, height .4s, filter .3s; }
.card.is-open.is-face-scratch .card__hex { cursor: crosshair; left: calc(90.75 * var(--u)); top: calc(-60 * var(--u)); width: calc(193.5 * var(--u)); height: calc(230 * var(--u)); }
.card.is-open .card__hex.is-solved { left: calc(103.5 * var(--u)); top: calc(-30 * var(--u)); width: calc(168 * var(--u)); height: calc(200 * var(--u)); }
body.face-scratch .georgina-btn { display: none !important; }
.card.is-face-scratch .card__close, .card.is-face-scratch .card__flipbtn { opacity: 0; pointer-events: none; }
.card__hex.is-calling { animation: face-call 1.4s ease-in-out infinite; }
@keyframes face-call { 50% { filter: drop-shadow(0 0 18px rgba(165,255,0,.95)) drop-shadow(0 0 4px #fff); } }
/* the snake at the bottom of the card: its head creeps to its tail while the
   grimace is scratched off (--bite 0…0.8), its eye turns red and it bites (1) */
.card__snake { inset: 0; pointer-events: none; }
.card__snake svg { width: 100%; height: 100%; display: block; }
.card__snake .snake-head { transform: translateX(calc(var(--bite, 0) * 126px)); transition: transform .1s linear; }
.card.is-glow .card__snake .snake-head { transition: transform .25s ease-out; }
.card__snake svg { transition: filter .3s; }
.card.is-glow .card__snake svg { filter: drop-shadow(0 0 4px #fffc2a) drop-shadow(0 0 10px rgba(255,252,42,.8)); }
.card__hex { transition: transform .4s cubic-bezier(.2,.9,.3,1), filter .3s; }
/* unlocking: the card trembles very gently, rises a little and starts to glow … */
.card.is-shaking .card__art { transform-origin: 50% 60%; animation: card-tremble 1.15s ease-in-out both; }
@keyframes card-tremble {
  0%   { transform: translate(0,0) scale(1); }
  14%  { transform: translate(-.5px,-.5px) scale(1.002); }  28% { transform: translate(.7px,-1px) scale(1.004); }
  42%  { transform: translate(-.8px,-1.5px) scale(1.006); } 56% { transform: translate(1px,-2px) scale(1.008); }
  70%  { transform: translate(-1.1px,-2.5px) scale(1.01); } 84% { transform: translate(1.2px,-3px) scale(1.012); }
  100% { transform: translate(0,-3.5px) scale(1.015); }
}
.card.is-shaking .card__side--front { animation: card-charge 1.15s ease-in both; }
@keyframes card-charge {
  0%   { filter: drop-shadow(0 -6px 22px rgba(0,0,0,.45)); }
  100% { filter: brightness(1.08) drop-shadow(0 0 30px rgba(255,236,110,.9)); }
}
/* … then it bursts and its real, golden side is there */
.card.is-reborn .card__side--back { animation: reborn 1.4s ease-out both; }
@keyframes reborn {
  0%   { filter: brightness(2.6) saturate(1.5) drop-shadow(0 0 48px rgba(255,252,42,1)); transform: rotateY(180deg) scale(1.04); }
  35%  { filter: brightness(1.5) saturate(1.2) drop-shadow(0 0 36px rgba(255,236,80,.95)); }
  100% { filter: brightness(1) saturate(1) drop-shadow(0 -6px 22px rgba(0,0,0,.45)); transform: rotateY(180deg) scale(1); }
}
/* the card itself flashes gold (same shape as the card) and dissolves into the dust */
.gold-flash { position: fixed; z-index: 36; pointer-events: none; opacity: 0; border-radius: 4px; mix-blend-mode: screen;
  background: linear-gradient(180deg, rgba(255,246,170,.9), rgba(255,206,70,.85));
  box-shadow: 0 0 26px 8px rgba(255,214,80,.75), 0 0 56px 18px rgba(255,190,40,.35); }
.gold-flash.go { animation: gold-flash 1.15s cubic-bezier(.2,.6,.3,1) forwards; }
@keyframes gold-flash { 0% { opacity: 0; transform: scale(.985); } 14% { opacity: 1; transform: scale(1.015); } 100% { opacity: 0; transform: scale(1.1); } }
.burst { position: fixed; inset: 0; z-index: 37; width: 100%; height: 100%; pointer-events: none; }
.card__snake .snake-eye { opacity: 0; transition: opacity .35s ease-in; }
.card.snake-awake .card__snake .snake-eye { opacity: 1; filter: drop-shadow(0 0 2px #ff1a1a); }
/* …then the card transforms into its solved side */
.card.no-flip-anim .card__flip { transition: none; }
.card__hex.is-new { animation: tab-bounce 1.3s ease-in-out infinite; }
@keyframes tab-bounce { 0%,100% { translate: 0 0; } 50% { translate: 0 calc(-14 * var(--u)); } }
.card__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card__face { position: absolute; z-index: 1; left: 9%; top: 8.5%; width: 82%; height: 81%; background: #000;
  -webkit-mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; }
.card__face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }

.card__close { left: calc(332 * var(--u)); top: calc(101 * var(--u)); width: calc(33 * var(--u)); height: calc(33 * var(--u));
  padding: calc(6 * var(--u)); border: 0; background: none; pointer-events: auto; opacity: 0; transition: opacity .3s; z-index: 2; }
.card__close img { width: 100%; height: 100%; display: block; }
.card.is-open .card__close { opacity: 1; }
.card:not(.is-open) .card__close { pointer-events: none; }

.card__name { left: calc(80 * var(--u)); top: calc(181 * var(--u)); width: calc(215 * var(--u)); height: calc(69 * var(--u));
  display: grid; place-items: center; text-align: center; pointer-events: none;
  font-family: var(--font-story); font-weight: 400; font-size: calc(var(--fs, 25) * var(--u)); line-height: 1.05;
  text-transform: uppercase; letter-spacing: .03em; color: var(--purple); }
.card__label { left: calc(110 * var(--u)); width: calc(155 * var(--u)); text-align: center; pointer-events: none;
  font-family: var(--font-story); font-size: calc(19 * var(--u)); line-height: 1; color: var(--purple); }
.card__label--legend { top: calc(287 * var(--u)); }
.card__label--hint { top: calc(419 * var(--u)); }

/* back, solved: story + location (app design, artboard 4) */
.card__side--back .card__name { color: var(--yellow); }
.card[data-back="map"] .card__side--back .card__name { color: var(--purple); }
.card[data-back="solved"] .card__side--back .card__label { color: var(--yellow); text-shadow: 0 1px 0 rgba(119,75,226,.5); }
.card__text { left: calc(30 * var(--u)); width: calc(315 * var(--u)); text-align: center; pointer-events: none; padding: 0 calc(14 * var(--u)); overflow: hidden;
  font-family: var(--font-body); color: #0d1430; font-size: calc(var(--fs, 14.5) * var(--u)); line-height: 1.26; text-wrap: balance; }
.card__text--story { top: calc(312 * var(--u)); height: calc(104 * var(--u)); display: grid; place-items: center; }
.card__text--location { top: calc(446 * var(--u)); height: calc(60 * var(--u)); display: grid; place-items: center; font-weight: 700; }

/* mini pin under the address: back into Street View, looking at the monster */
.card__pin { left: calc(165 * var(--u)); top: calc(508 * var(--u)); width: calc(45 * var(--u)); height: calc(54 * var(--u)); padding: calc(4 * var(--u)); border: 0; background: none;
  pointer-events: auto; touch-action: manipulation; z-index: 3; filter: drop-shadow(0 0 calc(6 * var(--u)) rgba(165,255,0,.9)); animation: pin-bob 1.8s ease-in-out infinite; }
.card__pin svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.card__pin:active { transform: scale(.9); }
@keyframes pin-bob { 50% { translate: 0 calc(-3 * var(--u)); } }

/* back, map: the whole card is the map of the zone (like the printed cards) */
.card__map { left: calc(16 * var(--u)); top: calc(128 * var(--u)); width: calc(343 * var(--u)); height: calc(505 * var(--u));
  overflow: hidden; background: #1d2c4d; box-shadow: inset 0 0 0 calc(4 * var(--u)) var(--purple); }
#card-map { position: absolute; inset: calc(4 * var(--u)); }
.card[data-back="map"] .card__side--back .card__name { display: none; }

/* "flip" button: top-left corner of the card, opposite the close X */
.card__flipbtn { left: calc(20 * var(--u)); top: calc(96 * var(--u)); width: calc(92 * var(--u)); height: calc(30 * var(--u));
  display: flex; align-items: center; justify-content: center; gap: calc(4 * var(--u)); padding: 0;
  border: 0; border-radius: calc(5 * var(--u)); background: var(--purple); color: var(--cyan); z-index: 3; pointer-events: auto;
  font-family: var(--font-display); font-size: calc(13 * var(--u)); text-transform: uppercase; text-shadow: -1px 1px 0 var(--magenta);
  box-shadow: inset 0 calc(-3 * var(--u)) 0 var(--lime), 0 0 12px rgba(165,255,0,.45); transition: opacity .3s; }
.card:not(.is-open) .card__flipbtn { opacity: 0; pointer-events: none; }
.card__flipicon { font-family: var(--font-body); font-size: calc(16 * var(--u)); text-shadow: none; }
.card__flipbtn.is-calling { animation: call 1.1s ease-in-out infinite; }
@keyframes call { 50% { transform: scale(1.08); box-shadow: inset 0 calc(-4 * var(--u)) 0 var(--lime), 0 0 26px rgba(253,0,249,.8); } }

/* ---------- Zone map overlays ---------- */
/* a freed zone: the monster's face sits right on its (yellow) hexagon; at the end, tap it to see its card */
body[data-phase="explore"] .zpin { pointer-events: auto; cursor: pointer; }
.zpin { position: absolute; width: 40px; aspect-ratio: 174/200; transform: translate(-50%, -50%); pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255,252,42,.9)); animation: zpin-in .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes zpin-in { from { transform: translate(-50%, -50%) scale(.2); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.zpin span { position: absolute; inset: 0; background: var(--yellow);
  -webkit-mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; }
.zpin img { position: absolute; left: 9%; top: 8%; width: 82%; height: 84%; object-fit: cover;
  -webkit-mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; mask: url("../assets/ui/hex.svg") center / 100% 100% no-repeat; }
.you { position: absolute; transform: translate(-50%, -50%); pointer-events: none; display: grid; justify-items: center; }
.you i { width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(0,250,255,.7); animation: you 1.6s ease-out infinite; }
.you b { margin-top: 3px; padding: 1px 6px; border-radius: 99px; background: rgba(29,44,77,.85); color: var(--cyan); font: 700 11px var(--font-body); }
@keyframes you { to { box-shadow: 0 0 0 16px rgba(0,250,255,0); } }

/* ---------- Scratch fields: the card's green pattern, gone dusty ---------- */
.scratch { display: grid; place-items: center; padding: calc(5 * var(--u)) calc(14 * var(--u)); overflow: hidden; pointer-events: auto; }
.scratch--riddle { left: calc(30 * var(--u)); top: calc(314 * var(--u)); width: calc(315 * var(--u)); height: calc(99 * var(--u)); }
.scratch--hint1 { left: calc(30 * var(--u)); top: calc(446 * var(--u)); width: calc(152 * var(--u)); height: calc(66 * var(--u)); }
.scratch--hint2 { left: calc(193 * var(--u)); top: calc(446 * var(--u)); width: calc(152 * var(--u)); height: calc(66 * var(--u)); }
.scratch p { margin: 0; text-align: center; font-family: var(--font-body); font-weight: 400; color: #000;
  font-size: calc(var(--fs, 14.5) * var(--u)); line-height: 1.25; text-wrap: balance; }
.scratch--hint1 p, .scratch--hint2 p { font-size: calc(var(--fs, 13.5) * var(--u)); line-height: 1.22; }
.scratch__canvas { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }

/* ---------- Error ---------- */
.error { position: fixed; z-index: 50; left: var(--frame); right: var(--frame); top: 40%; max-width: 420px; margin: 0 auto; padding: 16px; border-radius: 8px; background: var(--mint); color: var(--navy); font-weight: 700; text-align: center; }

/* ---------- Dev panel ---------- */
.dev { position: fixed; z-index: 60; right: 8px; top: calc(80px + var(--safe-top)); width: 230px; padding: 8px 10px; border-radius: 6px; background: rgba(0,0,0,.78); color: #b6ffb0; font: 11px/1.45 ui-monospace, Menlo, monospace; }
.dev button { margin: 4px 4px 0 0; padding: 4px 8px; font: 11px ui-monospace, Menlo, monospace; border: 1px solid #b6ffb0; background: transparent; color: #b6ffb0; border-radius: 4px; }
.dev .ok { color: var(--yellow); }

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



/* ---------- Street View <-> map ---------- */
.view-btn { position: fixed; z-index: 33; left: 10px; top: calc(10px + var(--safe-top)); width: 60px; height: 60px; padding: 0; border: 0;
  border-radius: 50%; background: none; filter: drop-shadow(0 0 8px rgba(165,255,0,.65)) drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.view-btn img { width: 100%; height: 100%; display: block; }
.view-btn:active { transform: scale(.94); }
/* looking at the map while in Street View */
/* Mini map: while walking, the city map itself becomes a small hexagon
   bottom left (like the app) and follows the player. Tap → the big map. */
.mini-ring { display: none; }
body.mini #map { inset: auto; left: 12px; bottom: calc(var(--dock, 0px) + 12px + var(--safe-bottom)); width: 128px; height: 147px;
  z-index: 6; opacity: 1 !important; pointer-events: auto; cursor: pointer;
  -webkit-mask: url("../assets/ui/hex.svg") center / contain no-repeat; mask: url("../assets/ui/hex.svg") center / contain no-repeat; }
body.has-card.mini #map { bottom: calc(var(--dock) + 12px); }
body.mini .mini-ring { display: block; position: fixed; z-index: 7; left: 12px; bottom: calc(var(--dock, 0px) + 12px + var(--safe-bottom)); width: 128px; height: 147px; pointer-events: none; }
body.has-card.mini .mini-ring { bottom: calc(var(--dock) + 12px); }
/* Georgina's messages sit above the mini map, so it stays tappable */
body.mini .bubble:not(.bubble--top):not(.bubble--card) { bottom: calc(var(--dock) + 12px + 147px + 10px + var(--safe-bottom)); }
.mini-ring polygon { fill: none; stroke: var(--lime); stroke-width: 7; filter: drop-shadow(0 0 6px rgba(165,255,0,.75)); }
.gpin--drag { touch-action: none; cursor: grab; }
.gpin.is-dragging { cursor: grabbing; animation: none; transform: translate(calc(-1 * var(--tip-x, 50%)), -100%) scale(1.12); }
.gpin.is-dragging .gpin__ring { display: none; }
.gpin.is-settled { animation: none; } /* don't drop again after being dragged */

body.map-view #pano { opacity: 0 !important; pointer-events: none !important; }
body.map-view #map { opacity: 1 !important; transition: opacity .35s ease; }
body.map-view .vignette, body.map-view .finder, body.map-view .drag-hint { opacity: 0 !important; }
/* the player on the map: the app's Street View marker, turned to where they look */
.me { position: absolute; width: 30px; height: 40px; transform: translate(-50%, -50%); pointer-events: none; }
.me img { width: 100%; height: 100%; display: block; transform-origin: 50% 62%; filter: drop-shadow(0 0 6px rgba(255,252,42,.9)); }

/* menu: motion control */
.motion-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: rgba(119,75,226,.12); color: var(--purple); font: 700 13.5px/1.25 var(--font-body); text-align: left; }
.motion-toggle img { width: 34px; height: 34px; flex: none; }
.motion-toggle__on { display: none; }
.motion-toggle[aria-pressed="true"] { background: rgba(253,0,249,.15); }
.motion-toggle[aria-pressed="true"] .motion-toggle__on { display: block; }
.motion-toggle[aria-pressed="true"] .motion-toggle__off { display: none; }
