/* =====================================================================
   Safety Passport — design system & components
   Passport-maroon and gold theme · bilingual (LTR/RTL via logical props)
   Destination colours: work = amber, home = violet, road = blue
   ===================================================================== */

/* ---------- Fonts (all SIL OFL, self-hosted) ----------
   Plex Arabic: body · Kufi (Reem Kufi): display · Plex Mono: numbers
   Ruqaa (Aref Ruqaa): the creator's signature */
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/plex-arabic-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/plex-arabic-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/plex-arabic-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/plex-arabic-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/plex-arabic-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/plex-arabic-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Kufi"; font-weight: 600; font-display: swap; src: url("../fonts/kufi-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Kufi"; font-weight: 700; font-display: swap; src: url("../fonts/kufi-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Kufi"; font-weight: 600; font-display: swap; src: url("../fonts/kufi-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Kufi"; font-weight: 700; font-display: swap; src: url("../fonts/kufi-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/mono-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: "Ruqaa"; font-weight: 700; font-display: swap; src: url("../fonts/ruqaa-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #160A0F;
  --surface: #221117;
  --surface-2: #2C161F;
  --surface-3: #3C1F2A;
  --line: rgba(242, 220, 168, 0.10);
  --line-2: rgba(242, 220, 168, 0.22);
  --text: #F8EEF0;
  --text-2: #D2BEC4;
  --text-3: #A08A93;
  --maroon: #6B1730;
  --maroon-2: #8C1F3F;
  --gold: #D9B36C;
  --gold-2: #F2DCA8;
  --paper: #F4ECDD;
  --paper-ink: #2B1820;
  --paper-mute: #8A5A66;
  --work: #F5A524;
  --house: #B794F6;
  --road: #42A9F5;
  --safe: #34D399;
  --danger: #FF5A47;
  --accent: var(--gold);
  --good-text: #A7F3D0;
  --bad-text: #FFC2B5;
  --chrome: rgba(22, 10, 15, 0.82);
  --tint: rgba(255, 255, 255, 0.03);
  --tint-2: rgba(255, 255, 255, 0.06);
  --glow: rgba(140, 31, 63, 0.45);
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --font: "Plex Arabic", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --font-display: "Kufi", "Plex Arabic", system-ui, sans-serif;
  --font-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-sign: "Ruqaa", "Plex Arabic", serif;
  --appbar-h: 58px;
  --gutter: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

/* ---------- Light mode: html.theme-light ----------
   Set before the first paint by boot.js: the visitor's own choice (the sun and moon button in the top bar),
   otherwise the phone's light or dark setting.
   Warm ivory and white, deep wine words and a darker gold that reads on light.
   Dark on purpose (their own dark tokens below): the 3D first screen, the fire
   steps card, the 3D views, the games corner header and its "All games" card,
   the maroon parts (emergency card, passport band, buttons, the logo),
   the Hazard Hunt and Smoke Lab scenes, a mini game while it is played
   (html.is-gaming), game messages, the stamp ceremony and the booth TV. */
html.theme-light {
  color-scheme: light;
  --bg: #F6F1EA;
  --surface: #FFFFFF;
  --surface-2: #FBF8F3;
  --surface-3: #EEE5DA;
  --line: rgba(84, 34, 48, 0.11);
  --line-2: rgba(84, 34, 48, 0.21);
  --text: #23121A;
  --text-2: #56434C;
  --text-3: #75616A;
  --gold: #8A5F1A;
  --gold-2: #6B4711;
  --safe: #0F8A5F;
  --danger: #C9321F;
  --accent: #C99A45;
  --good-text: #0B7350;
  --bad-text: #AE2A1B;
  --chrome: rgba(251, 248, 243, 0.88);
  --tint: rgba(84, 34, 48, 0.035);
  --tint-2: rgba(84, 34, 48, 0.075);
  --glow: rgba(140, 31, 63, 0.10);
  --shadow: 0 1px 2px rgba(60, 20, 32, 0.06), 0 18px 40px -24px rgba(60, 20, 32, 0.32);
}
:where(html.theme-light) .stage, :where(html.theme-light) .hero, :where(html.theme-light) .t3d, :where(html.theme-light) .t3d-full, :where(html.theme-light) .arcade-hero, :where(html.theme-light) .game-card--all, :where(html.theme-light) .hunt__stage, :where(html.theme-light) .lab__viewport, html.theme-light.is-gaming, :where(html.theme-light) .toast, :where(html.theme-light) .gm-flash, :where(html.theme-light) .gm-clear, :where(html.theme-light) .ceremony__card, :where(html.theme-light) .ceremony__all, :where(html.theme-light) .sos-card, :where(html.theme-light) .pp-page__band, :where(html.theme-light) .btn--maroon, :where(html.theme-light) .brand__mark, :where(html.theme-light) body.booth { --bg: #160A0F; --surface: #221117; --surface-2: #2C161F; --surface-3: #3C1F2A; --line: rgba(242, 220, 168, 0.10); --line-2: rgba(242, 220, 168, 0.22); --text: #F8EEF0; --text-2: #D2BEC4; --text-3: #A08A93; --gold: #D9B36C; --gold-2: #F2DCA8; --safe: #34D399; --danger: #FF5A47; --good-text: #A7F3D0; --bad-text: #FFC2B5; --chrome: rgba(22, 10, 15, 0.82); --tint: rgba(255, 255, 255, 0.03); --tint-2: rgba(255, 255, 255, 0.06); --glow: rgba(140, 31, 63, 0.45); --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8); color-scheme: dark; color: var(--text); }
/* words in a topic's colour (--ink): the same colour, darkened until it reads on white */
:where(html.theme-light) * { --ink: color-mix(in oklab, var(--accent) 50%, #1A0B11); }
@supports (color: oklch(from red min(l, 0.5) c h)) { :where(html.theme-light) * { --ink: oklch(from var(--accent) min(l, 0.5) c h); } }
:where(html.theme-light) :is(.stage, .hero, .t3d, .t3d-full, .arcade-hero, .game-card--all, .hunt__stage, .lab__viewport, .toast, .gm-flash, .gm-clear, .ceremony__card, .ceremony__all, .sos-card, .pp-page__band, .btn--maroon, .brand__mark, body.booth), :where(html.theme-light) :is(.stage, .hero, .t3d, .t3d-full, .arcade-hero, .game-card--all, .hunt__stage, .lab__viewport, .toast, .gm-flash, .gm-clear, .ceremony__card, .ceremony__all, .sos-card, .pp-page__band, .btn--maroon, .brand__mark, body.booth) *, :where(html.theme-light.is-gaming), :where(html.theme-light.is-gaming) * { --ink: var(--accent); }
:where(html.theme-light) ::selection { background: rgba(138, 95, 26, 0.25); }

html.booth-page, body.booth { --bg: #160A0F; --surface: #221117; --surface-2: #2C161F; --surface-3: #3C1F2A; --line: rgba(242, 220, 168, 0.10); --line-2: rgba(242, 220, 168, 0.22); --text: #F8EEF0; --text-2: #D2BEC4; --text-3: #A08A93; --gold: #D9B36C; --gold-2: #F2DCA8; --safe: #34D399; --danger: #FF5A47; --good-text: #A7F3D0; --bad-text: #FFC2B5; --chrome: rgba(22, 10, 15, 0.82); --tint: rgba(255, 255, 255, 0.03); --tint-2: rgba(255, 255, 255, 0.06); --glow: rgba(140, 31, 63, 0.45); --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8); color-scheme: dark; }


[data-world="work"], .dest--work, .stamp-slot--work, .ceremony__card--work { --accent: var(--work); }
[data-world="house"], .dest--house, .stamp-slot--house, .ceremony__card--house { --accent: var(--house); }
[data-world="road"], .dest--road, .stamp-slot--road, .ceremony__card--road { --accent: var(--road); }

/* Reem Kufi's own space is narrow (0.13em), so widen the gap between words */
.section-label, .brand__name, .screen-title, .hero__top, .dest__title, .world__title, .mission__title, .hunt__sheet-title, .hunt__intro-title, .result__title, .feedback__verdict, .ceremony__title, .pp-page__band, .pp-field__value, .pp-field__input, .pp-tier, .mf-card__verdict, .mf-done__title, .hero__title, .hero__step-title, .journey__title, .modal__title, .booth__title, .qr-card__title, .stamp__label, .stamp__band { word-spacing: .12em; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 50% -180px, var(--glow), transparent 70%),
    var(--bg);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:lang(ar) body, body:lang(ar) { line-height: 1.8; font-size: 17px; }
body.is-locked { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) h4 { line-height: 1.5; letter-spacing: 0 !important; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(217, 179, 108, 0.4); }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 8px; }
main:focus, [tabindex="-1"]:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flip-ltr { transform: scaleX(-1); }
[dir="rtl"] .flip-ltr { transform: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--gold-2); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

.fineprint { margin-top: 12px; font-size: 13px; color: var(--text-3); }
:lang(ar) .fineprint { font-size: 14px; }
.fineprint--center { margin: 0; text-align: center; }

/* ---------- Buttons & small controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 14px;
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .2s, border-color .2s, transform .15s, box-shadow .2s, filter .2s;
}
:lang(ar) .btn { font-size: 16px; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { background: var(--accent); color: #1A0B11; box-shadow: 0 12px 28px -14px var(--accent); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--gold { background: linear-gradient(135deg, #F6E3B4 0%, #D9B36C 55%, #B98E45 100%); color: #2A1208; box-shadow: 0 14px 32px -16px rgba(217, 179, 108, 0.9); }
.btn--gold:hover { filter: brightness(1.06); }
.btn--gold { position: relative; overflow: hidden; isolation: isolate; }
.btn--gold::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-130%); animation: sweep 5s ease-in-out 1.5s infinite; pointer-events: none; }
@keyframes sweep { 0% { transform: translateX(-130%); } 28%, 100% { transform: translateX(130%); } }
.btn--maroon { background: linear-gradient(135deg, #8C1F3F 0%, #6B1730 60%, #4A0F22 100%); color: var(--gold-2); box-shadow: 0 14px 28px -16px rgba(107, 23, 48, 0.95); }
.btn--maroon:hover { filter: brightness(1.1); }
.btn--glass { border-color: rgba(242, 220, 168, 0.38); background: rgba(255, 255, 255, 0.07); color: var(--gold-2); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.12); }
.btn--outline { border-color: var(--line-2); background: var(--tint); }
.btn--outline:hover { border-color: var(--gold); background: var(--tint-2); }
.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { background: var(--tint-2); color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
:lang(ar) .btn--sm { font-size: 15px; }
.btn--lg { min-height: 58px; padding: 0 26px; font-size: 17px; border-radius: 16px; }
.btn--block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-row--center { justify-content: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); color: var(--text); }
.icon-btn:hover { background: var(--tint-2); }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.linkbtn:hover { color: var(--text); background: var(--tint-2); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--tint); font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip .icon { color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill .icon { width: 14px; height: 14px; }
.pill--ok { background: rgba(52, 211, 153, 0.12); color: var(--safe); }
.pill--pending { background: rgba(245, 165, 36, 0.12); color: var(--work); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(217, 179, 108, 0.16); color: var(--gold-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .tag { letter-spacing: 0; font-size: 12px; }

.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
:lang(ar) .kicker { letter-spacing: 0; font-size: 14px; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 18px; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 14px; }

.section-label { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; color: var(--gold); font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
[dir="rtl"] .section-label::after { background: linear-gradient(270deg, var(--line-2), transparent); }
:lang(ar) .section-label { letter-spacing: 0; font-size: 16px; }
.sub-title { margin: 28px 0 12px; font-size: 1.05rem; color: var(--text); }
.card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; min-height: 44px; }
.switch__track { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background-color .2s; flex: none; }
.switch__thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .25s var(--ease), background-color .2s; }
.switch[aria-checked="true"] .switch__track { background: rgba(52, 211, 153, 0.25); border-color: var(--safe); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(20px); background: var(--safe); }
[dir="rtl"] .switch[aria-checked="true"] .switch__thumb { transform: translateX(-20px); }
.switch__text { font-weight: 600; font-size: 14px; }

/* Range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; --fill: 0%; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--road) var(--fill), var(--surface-3) var(--fill)); }
[dir="rtl"] .range::-webkit-slider-runnable-track { background: linear-gradient(270deg, var(--road) var(--fill), var(--surface-3) var(--fill)); }
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--surface-3); }
.range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--road); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 4px solid var(--road); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--road); }

/* Segmented */
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; }
:lang(ar) .segmented button { font-size: 14px; }
@media (max-width: 479px) { .segmented button { flex-direction: column; gap: 2px; min-height: 58px; font-size: 12.5px; line-height: 1.25; } }
.segmented button[aria-checked="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.segmented button[data-door="wedged"][aria-checked="true"] { color: var(--work); }

/* ---------- App bar ---------- */
.appbar { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); background: var(--chrome); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.appbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 680px; height: var(--appbar-h); margin-inline: auto; padding-inline: var(--gutter); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: linear-gradient(160deg, var(--maroon-2), var(--maroon)); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(242, 220, 168, 0.25); }
.brand__mark .icon { width: 18px; height: 18px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--gold-2); white-space: nowrap; }
/* five buttons in the top bar: on a narrow phone the logo stands alone (its name is still read out) */
@media (max-width: 389px) { .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
@media (max-width: 429px) { :lang(ar) .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.backbtn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 0 12px 0 8px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 15px; text-decoration: none; }
[dir="rtl"] .backbtn { padding: 0 8px 0 12px; }
.backbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backbtn:hover { color: var(--text); background: var(--tint-2); }
.appbar__end { display: flex; align-items: center; gap: 8px; flex: none; }
.sharebtn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--gold); }
.sharebtn:hover { border-color: var(--gold); }
.sharebtn .icon { width: 18px; height: 18px; }
.soundbtn[aria-pressed="false"] { color: var(--text-3); }
@media (max-width: 389px) { .langbtn { padding: 0 12px; } .langbtn .icon { display: none; } .brand__name { font-size: 16px; } }
.langbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 600; flex: none; }
.langbtn:hover { border-color: var(--gold); }
.langbtn .icon { color: var(--gold); }

/* ---------- Views ---------- */
.app { display: block; max-width: 680px; margin-inline: auto; padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.view { padding-top: 18px; animation: view-in .4s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.screen-head { margin: 6px 0 20px; }
.screen-title { font-family: var(--font-display); font-size: clamp(1.75rem, 7vw, 2.3rem); color: var(--text); }
.screen-lead { margin-top: 8px; color: var(--text-2); font-size: 16px; }
:lang(ar) .screen-lead { font-size: 17px; }
.screen-actions { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- Guilloche & emblem ---------- */
.guilloche { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.guilloche__line { fill: none; stroke-width: 0.7; }
.guilloche--cover .guilloche__line { stroke: var(--gold); opacity: .14; }
.guilloche--paper .guilloche__line { stroke: var(--maroon); opacity: .09; }
.emblem { width: 76px; height: 76px; margin: 12px auto 8px; }
.emblem__ring { fill: none; stroke: var(--gold); stroke-width: 2; }
.emblem__ring--thin { stroke-width: 0.8; opacity: .8; }
.emblem__leaf { fill: var(--gold); opacity: .9; }
.emblem__flame { fill: var(--gold-2); }
.emblem__base { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; }

/* ---------- Stamps ---------- */
.stamp { width: 100%; height: auto; overflow: visible; }
.stamp__label, .stamp__band { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.stamp__label { font-size: 13.5px; }
.stamp__date { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .04em; }
.stamp-slot { display: grid; place-content: center; justify-items: center; gap: 4px; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent) 50%, transparent); color: color-mix(in srgb, var(--accent) 80%, transparent); font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; }
.stamp-slot .icon { width: 26px; height: 26px; }

/* ---------- Home: the passport cover, opened at "If there's a fire at work" ---------- */
.hero { position: relative; overflow: hidden; padding: 16px 16px 18px; border-radius: 14px 26px 26px 14px; border-inline-start: 8px solid #3F0B1A; background: radial-gradient(460px 280px at 50% -60px, rgba(242, 220, 168, 0.18), transparent 70%), linear-gradient(165deg, #82203E 0%, #5A1329 50%, #350B18 100%); color: var(--gold-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(242, 220, 168, 0.14); animation: hero-in .8s var(--ease) both; }
[dir="rtl"] .hero { border-radius: 26px 14px 14px 26px; }
.hero > :not(.guilloche):not(.embers) { position: relative; z-index: 1; }
.hero__top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .2em; color: var(--gold); }
.hero__top [lang="ar"] { letter-spacing: 0; font-size: 14px; }
.hero .emblem { width: 58px; height: 58px; margin: 6px auto 2px; }
.hero__where { display: flex; justify-content: center; align-items: center; gap: 4px; color: var(--gold); font-size: 12.5px; font-weight: 600; }
.hero__where .icon { width: 14px; height: 14px; }
.hero__title { text-align: center; font-family: var(--font-display); font-size: clamp(1.5rem, 6.8vw, 2rem); line-height: 1.2; background: linear-gradient(100deg, #D9B36C 0%, #FFF3D6 22%, #D9B36C 44%, #D9B36C 56%, #FFF3D6 78%, #D9B36C 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
:lang(ar) .hero__title { line-height: 1.55; }
.hero__steps { display: grid; margin-top: 10px; padding: 2px 12px; border-radius: 18px; background: rgba(22, 6, 11, 0.34); box-shadow: inset 0 0 0 1px rgba(242, 220, 168, 0.10); }
.hero__step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(242, 220, 168, 0.10); animation: rise .6s var(--ease) both; }
.hero__step:first-child { border-top: 0; }
.hero__step:nth-child(1) { animation-delay: .2s; }
.hero__step:nth-child(2) { animation-delay: .3s; }
.hero__step:nth-child(3) { animation-delay: .4s; }
.hero__step:nth-child(4) { animation-delay: .5s; }
.hero__step:nth-child(5) { animation-delay: .6s; }
.hero__step--option { padding-block: 8px; }
.hero__num--option { width: 32px; height: 32px; margin-inline: 3px; background: rgba(242, 220, 168, 0.12); color: var(--gold-2); box-shadow: inset 0 0 0 1.5px rgba(242, 220, 168, 0.45); }
.hero__step--option .hero__step-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .98rem; }
.hero__tag { padding: 1px 8px; border-radius: 999px; background: rgba(242, 220, 168, 0.16); color: var(--gold); font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .hero__tag { font-size: 12px; letter-spacing: 0; }
.hero__step--option .hero__text { font-size: 13.5px; }
:lang(ar) .hero__step--option .hero__text { font-size: 14.5px; }
.hero__map { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 44px; margin-top: 8px; padding: 6px 14px; border: 1px solid rgba(52, 211, 153, 0.45); border-radius: 999px; background: rgba(31, 174, 110, 0.14); color: #BDF5DC; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.hero__map .icon { width: 18px; height: 18px; }
:lang(ar) .hero__map { font-size: 14.5px; }
.hero__num { position: relative; display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF3D6, #D9B36C 55%, #A87C36); color: #3A0C1A; box-shadow: 0 6px 14px -6px rgba(217, 179, 108, 0.8); }
.hero__num .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.hero__n { position: absolute; top: -5px; inset-inline-end: -5px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #3A0C1A; color: var(--gold-2); font-family: var(--font-display); font-size: 11px; font-weight: 700; box-shadow: 0 0 0 2px #5A1329; }
.hero__step:nth-child(1) .hero__num { animation: ring 2.6s ease-in-out 1.2s infinite; }
.hero__body { display: grid; gap: 1px; min-width: 0; }
.hero__step-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: #FFF8EC; }
.hero__text { color: rgba(248, 238, 240, 0.84); font-size: 14.5px; line-height: 1.5; }
:lang(ar) .hero__text { font-size: 15.5px; line-height: 1.7; }
.hero__points { display: grid; gap: 4px; margin-top: 6px; }
.hero__points li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 10px; border-radius: 10px; background: rgba(242, 220, 168, 0.08); font-size: 13.5px; color: rgba(248, 238, 240, 0.84); }
.hero__points b { color: var(--gold-2); }
.hero__points .icon { width: 14px; height: 14px; color: var(--gold); }
.hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; animation: rise .6s var(--ease) .6s both; }
.hero__actions .btn { min-height: 54px; padding: 0 10px; font-size: 15px; font-weight: 700; }
.hero__call span { unicode-bidi: isolate; }
.hero__help { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: rgba(248, 238, 240, 0.74); font-size: 13px; line-height: 1.5; animation: rise .6s var(--ease) .7s both; }
:lang(ar) .hero__help { font-size: 14px; }
.hero__help .icon { margin-top: 2px; color: var(--gold); }
@media (max-width: 349px) { .hero__actions { grid-template-columns: 1fr; } }
@media (max-height: 700px) { .hero .emblem { width: 44px; height: 44px; margin: 2px auto 0; } .hero__step { padding: 8px 0; } }

/* Moving parts of the cover */
.guilloche--spin { inset: -35%; width: 170%; height: 170%; animation: spin 150s linear infinite; }
.guilloche--spin .guilloche__line { stroke-width: 0.35; opacity: .07; }
.emblem__flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flame 1.8s ease-in-out infinite alternate; }
.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.embers span { position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%; background: #FFE2A0; box-shadow: 0 0 8px 2px rgba(255, 196, 102, 0.55); opacity: 0; animation: ember 10s linear infinite; }
.embers span:nth-child(1) { left: 2.9%; width: 3px; height: 3px; animation-duration: 8.3s; animation-delay: -7.8s; }
.embers span:nth-child(2) { left: 13.0%; width: 5px; height: 5px; animation-duration: 8.0s; animation-delay: -7.0s; }
.embers span:nth-child(3) { left: 16.4%; width: 3px; height: 3px; animation-duration: 7.9s; animation-delay: -5.0s; }
.embers span:nth-child(4) { left: 22.8%; width: 3px; height: 3px; animation-duration: 9.6s; animation-delay: -9.9s; }
.embers span:nth-child(5) { left: 35.0%; width: 3px; height: 3px; animation-duration: 10.7s; animation-delay: -7.0s; }
.embers span:nth-child(6) { left: 39.8%; width: 3px; height: 3px; animation-duration: 9.5s; animation-delay: -11.7s; }
.embers span:nth-child(7) { left: 46.8%; width: 5px; height: 5px; animation-duration: 8.2s; animation-delay: -5.0s; }
.embers span:nth-child(8) { left: 51.2%; width: 3px; height: 3px; animation-duration: 9.0s; animation-delay: -9.8s; }
.embers span:nth-child(9) { left: 58.2%; width: 3px; height: 3px; animation-duration: 10.4s; animation-delay: -2.3s; }
.embers span:nth-child(10) { left: 68.0%; width: 3px; height: 3px; animation-duration: 7.8s; animation-delay: -0.7s; }
.embers span:nth-child(11) { left: 74.7%; width: 4px; height: 4px; animation-duration: 10.2s; animation-delay: -9.3s; }
.embers span:nth-child(12) { left: 82.4%; width: 3px; height: 3px; animation-duration: 9.8s; animation-delay: -3.6s; }
.embers span:nth-child(13) { left: 90.1%; width: 5px; height: 5px; animation-duration: 8.7s; animation-delay: -6.9s; }
.embers span:nth-child(14) { left: 96.0%; width: 5px; height: 5px; animation-duration: 9.2s; animation-delay: -5.4s; }

/* The passport's stamp page: the way into the games */

/* The campaign's topics on home: one card each, in its own colour */
.topic-list { display: grid; gap: 10px; }
.topic-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--surface)) 0%, var(--surface) 65%); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
[dir="rtl"] .topic-card { background: linear-gradient(270deg, color-mix(in srgb, var(--accent) 12%, var(--surface)) 0%, var(--surface) 65%); }
@media (hover: hover) { .topic-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-1px); } }
.topic-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink, var(--accent)); }
.topic-card__icon .icon { width: 24px; height: 24px; }
.topic-card__body { display: grid; gap: 2px; min-width: 0; }
.topic-card__title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
:lang(ar) .topic-card__title { line-height: 1.5; }
.topic-card__sub { color: var(--text-3); font-size: 13px; line-height: 1.4; }
:lang(ar) .topic-card__sub { font-size: 13.5px; }
.topic-card__meta { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--ink, var(--accent)); font-size: 12.5px; font-weight: 600; }
.topic-card__meta .icon { width: 14px; height: 14px; }
.topic-card__go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.topic-card__stamp { display: block; width: 56px; }

/* A topic's page */
.topic__hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 92px; grid-template-areas: "icon stamp" "text stamp"; gap: 10px 12px; align-items: start; padding: 18px; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: radial-gradient(420px 220px at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); }
[dir="rtl"] .topic__hero { background: radial-gradient(420px 220px at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); }
.topic__icon { grid-area: icon; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink, var(--accent)); animation: rise .5s var(--ease) both; }
.topic__icon .icon { width: 28px; height: 28px; }
.topic__text { grid-area: text; min-width: 0; }
.topic__kicker { color: var(--ink, var(--accent)); font-size: 13px; font-weight: 700; }
.topic__title { margin-top: 2px; font-family: var(--font-display); font-size: clamp(1.7rem, 7.5vw, 2.2rem); line-height: 1.2; }
:lang(ar) .topic__title { line-height: 1.45; }
.topic__intro { margin-top: 6px; color: var(--text-2); }
.topic__stamp { grid-area: stamp; display: grid; justify-items: center; gap: 6px; }
.topic__stamp .stamp-slot { background: rgba(22, 10, 15, 0.45); }
.topic__stamp > span { color: var(--text-3); font-size: 11px; font-weight: 600; line-height: 1.35; text-align: center; }
:lang(ar) .topic__stamp > span { font-size: 12px; }
.mission__num .icon { width: 20px; height: 20px; }
.topic__next { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin-top: 18px; padding: 12px 16px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--text-2); font-weight: 700; text-align: center; text-decoration: none; }
@media (hover: hover) { .topic__next:hover { border-color: var(--accent); color: var(--text); } }

/* Scroll-in: sections rise into place as they come into view */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (hover: hover) { .js .dest.reveal.is-in:hover, .js .extra.reveal.is-in:hover { transform: translateY(-2px); } }
.dest-list .reveal:nth-child(2), .extras .reveal:nth-child(2) { transition-delay: .08s; }
.dest-list .reveal:nth-child(3), .extras .reveal:nth-child(3) { transition-delay: .16s; }
.extras .reveal:nth-child(4) { transition-delay: .24s; }

@keyframes hero-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flame { from { transform: scale(0.94, 0.9); } to { transform: scale(1.04, 1.08); } }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: .9; } 50% { transform: translate(10px, -280px); } 85% { opacity: .6; } 100% { opacity: 0; transform: translate(-6px, -560px); } }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-12deg); } 80% { transform: rotate(10deg); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(5deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes stamp-in { from { opacity: 0; transform: scale(1.6) rotate(-10deg); } to { opacity: 1; transform: none; } }

/* Destination cards */
.dest-list { display: grid; gap: 12px; }
.dest { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; padding-inline-end: 14px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 60%); text-decoration: none; transition: transform .2s var(--ease), border-color .2s; }
[dir="rtl"] .dest { background: linear-gradient(270deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 60%); }
.dest:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.dest__art { display: block; width: 92px; height: 92px; overflow: hidden; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.thumb { width: 100%; height: 100%; max-width: none; }
.dest__body { display: grid; gap: 2px; min-width: 0; }
.dest__title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.dest__icon { display: inline-grid; color: var(--ink, var(--accent)); }
.dest__place { color: var(--text-3); font-size: 13.5px; line-height: 1.4; }
.dest__meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 600; }
.dest__meta .icon { width: 15px; height: 15px; }
.dest__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.dest__stamp { display: block; width: 62px; }

/* Extras */
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.extra { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 14px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); font: inherit; text-align: start; text-decoration: none; cursor: pointer; transition: border-color .2s, transform .2s var(--ease), opacity .6s var(--ease); }
.extra:hover { border-color: var(--line-2); transform: translateY(-2px); }
.extra__icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 12px; background: rgba(217, 179, 108, 0.12); color: var(--gold); }
.extra__title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.extra__sub { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
:lang(ar) .extra__sub { font-size: 13px; }


/* Emergency bar */
.sos { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 14px 18px; border-radius: 20px; background: linear-gradient(135deg, #E83B2B 0%, #B81F2C 100%); color: #fff; text-decoration: none; box-shadow: 0 18px 40px -22px rgba(232, 59, 43, 0.9); }
.sos__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.sos__text { display: grid; min-width: 0; line-height: 1.35; }
.sos__label { font-weight: 700; }
.sos__who { font-size: 13px; opacity: .85; }
.sos__num { margin-inline-start: auto; font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: .04em; }

/* Credit footer */
.credit { margin-top: 36px; padding: 28px 8px 8px; border-top: 1px solid var(--line); text-align: center; }
/* the name line, with the signature small at its end */
.credit__sig { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 10px; }
.credit__by { flex-basis: 100%; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
:lang(ar) .credit__by { letter-spacing: 0; font-size: 13px; }
.credit__sign { order: 2; margin: 0; font-family: var(--font-sign); font-size: 1.55rem; line-height: 1.2; color: var(--gold); transform: rotate(-4deg); }
.credit__name { order: 1; color: var(--gold-2); font-weight: 600; font-size: 14px; }
.credit__campaign { margin: 16px 0 10px; color: var(--text-2); font-size: 14px; }
.credit__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 10px; }
.credit__fine { max-width: 52ch; margin: 6px auto 0; color: var(--text-3); font-size: 12px; line-height: 1.55; }
:lang(ar) .credit__fine { font-size: 13px; }

/* ---------- Destination page ---------- */
.world__hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.world__art { position: relative; height: 210px; overflow: hidden; }
.world__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--surface) 100%); }
.world__text { position: relative; margin-top: -38px; padding: 0 18px 18px; }
.world__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--ink, var(--accent)); font-size: 14px; font-weight: 700; }
.world__title { margin-top: 2px; font-family: var(--font-display); font-size: clamp(1.9rem, 8vw, 2.4rem); }
.world__intro { margin-top: 6px; color: var(--text-2); }
.world__stamp { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; justify-items: center; gap: 6px; width: 92px; }
.world__stamp .stamp-slot { background: rgba(22, 10, 15, 0.6); backdrop-filter: blur(4px); }
.world__stamp:has(.stamp-slot) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.world__stamp > span { padding: 2px 8px; border-radius: 999px; background: rgba(22, 10, 15, 0.7); color: var(--text-2); font-size: 11px; font-weight: 600; text-align: center; line-height: 1.4; }

.missions { display: grid; gap: 10px; }
.missions + .games { margin-top: 10px; }
.mission { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.mission:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); }
.mission__num { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--accent); color: #1A0B11; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.mission.is-done .mission__num { background: transparent; color: var(--ink, var(--accent)); box-shadow: inset 0 0 0 2px var(--accent); }
.mission__body { display: grid; gap: 2px; min-width: 0; }
.mission__title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; line-height: 1.35; }
.mission__title .icon { color: var(--ink, var(--accent)); }
.mission__sub { color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
:lang(ar) .mission__sub { font-size: 14px; }
.mission__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mission__end--play { flex-direction: row; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink, var(--accent)); font-weight: 700; font-size: 14px; }
.mission__end--play .icon { width: 14px; height: 14px; fill: currentColor; }
.mission__again { color: var(--text-3); font-size: 12px; font-weight: 600; }
.mission--bonus { border-style: dashed; background: transparent; }
.mission--bonus .mission__num { background: rgba(217, 179, 108, 0.14); color: var(--gold); }
.mission--bonus .mission__title { flex-wrap: wrap; }
.mission--bonus .mission__end { color: var(--gold); }

.rules { display: grid; gap: 8px; }
.rule { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border-inline-start: 3px solid var(--accent); font-weight: 600; font-size: 15px; line-height: 1.5; }
:lang(ar) .rule { font-size: 16px; }
.rule__icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink, var(--accent)); }
.rule__icon .icon { width: 17px; height: 17px; }

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 4px; }
.stars__star { display: inline-grid; color: var(--surface-3); }
.stars__star .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.stars__star.is-on { color: var(--gold); }
.stars--sm .stars__star .icon { width: 16px; height: 16px; }
.result__stars { justify-content: center; gap: 8px; }
.result__stars .stars__star .icon { width: 42px; height: 42px; }
.result__stars .stars__star.is-on { animation: star-pop .5s var(--ease) both; filter: drop-shadow(0 4px 12px rgba(217, 179, 108, 0.5)); }
.result__stars .stars__star:nth-child(2) { animation-delay: .15s; transform: translateY(-8px); }
.result__stars .stars__star:nth-child(3) { animation-delay: .3s; }
@keyframes star-pop { from { opacity: 0; scale: .2; } 70% { scale: 1.2; } to { opacity: 1; scale: 1; } }

/* ---------- Play screens (shared) ---------- */
.view--play { padding-top: 12px; }
.play-head { display: grid; gap: 10px; margin-bottom: 12px; }
.play-head__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--ink, var(--accent)); font-size: 14px; font-weight: 700; }

/* ---------- Hazard Hunt ---------- */
.hunt__hud { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.hunt__progress { display: grid; flex: 1; gap: 6px; min-width: 0; }
.hunt__count { font-weight: 700; font-size: 14px; line-height: 1.2; }
.hunt__dots { display: flex; gap: 5px; }
.hunt__dots li { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); transition: background-color .3s; }
.hunt__dots li.is-on { background: var(--accent); }
.hunt__clock { font-family: var(--font-mono); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-2); direction: ltr; }
.hunt__hint .icon { color: var(--gold); }
.hunt__stage { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 150px) * 400 / 520)); max-width: min(100%, calc((100svh - var(--appbar-h) - 150px) * 400 / 520)); min-width: 280px; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: #251A2A; box-shadow: var(--shadow); }
.scene { width: 100%; height: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.hunt-hit { fill: transparent; cursor: pointer; outline: none; }
.hunt-hit:focus-visible { stroke: var(--gold-2); stroke-width: 3; stroke-dasharray: 6 5; }
.hunt-ring { pointer-events: none; }
.hunt-ring__box { fill: rgba(52, 211, 153, 0.12); stroke: var(--safe); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: ring-in .45s var(--ease) both; }
.hunt-ring__badge { fill: var(--safe); stroke: #1A0B11; stroke-width: 2; }
.hunt-ring__mark { fill: none; stroke: #1A0B11; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hunt-ring--safe .hunt-ring__box { fill: rgba(66, 169, 245, 0.12); stroke: var(--road); stroke-dasharray: 8 5; }
.hunt-ring--safe .hunt-ring__badge { fill: var(--road); }
.hunt-miss { pointer-events: none; animation: miss .9s ease-out forwards; }
.hunt-miss circle { fill: rgba(255, 90, 71, 0.22); stroke: var(--danger); stroke-width: 2; }
.hunt-miss path { fill: none; stroke: var(--danger); stroke-width: 2.6; stroke-linecap: round; }
.hunt-hint { fill: none; stroke: var(--gold-2); stroke-width: 3; stroke-dasharray: 7 6; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: hint-pulse 1.3s ease-in-out 2; }
@keyframes ring-in { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: none; } }
@keyframes miss { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hint-pulse { 0%, 100% { opacity: .2; transform: scale(1.15); } 50% { opacity: 1; transform: scale(0.95); } }

.hunt__flash { position: absolute; top: 12px; left: 50%; z-index: 2; max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 999px; background: rgba(22, 10, 15, 0.88); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; }
.hunt__flash.is-on { animation: flash 1.5s ease both; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -6px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

.hunt__sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; max-height: 88%; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 16px; border-radius: 20px 20px 0 0; border-top: 3px solid var(--accent); background: var(--surface); box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6); transform: translateY(105%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; }
.hunt__sheet.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.hunt__sheet--safe { border-top-color: var(--road); }
.hunt__sheet-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .hunt__sheet-kicker { letter-spacing: 0; font-size: 14px; }
.hunt__sheet--safe .hunt__sheet-kicker { color: var(--road); }
.hunt__sheet-title { margin: 4px 0 8px; font-family: var(--font-display); font-size: 1.3rem; }
.hunt__sheet-body dt { margin-top: 10px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .hunt__sheet-body dt { letter-spacing: 0; font-size: 13px; }
.hunt__sheet-body dd { margin-top: 2px; color: var(--text); font-size: 15px; }
:lang(ar) .hunt__sheet-body dd { font-size: 16px; }
.hunt__sheet-body .hunt__fix { padding: 8px 12px; border-radius: 10px; background: rgba(52, 211, 153, 0.08); border-inline-start: 3px solid var(--safe); font-weight: 600; }
.hunt__sheet-safe { color: var(--text); }
.hunt__sheet .btn { margin-top: 14px; }

.hunt__overlay { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(22, 10, 15, 0.7); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.hunt__intro { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 330px; padding: 24px 20px 20px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); text-align: center; box-shadow: var(--shadow); }
.hunt__intro-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.hunt__intro-icon .icon { width: 28px; height: 28px; }
.hunt__intro-title { font-family: var(--font-display); font-size: 1.3rem; }
.hunt__intro p { color: var(--text-2); font-size: 14.5px; }
:lang(ar) .hunt__intro p { font-size: 15.5px; }
.hunt__intro .btn { margin-top: 6px; }

/* Results (hunt overlay and decisions page) */
.result { display: grid; gap: 8px; width: 100%; max-width: 340px; padding: 22px 18px 18px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); text-align: center; box-shadow: var(--shadow); animation: view-in .4s var(--ease); }
.result--page, .hunt__stage.is-done .result { max-width: none; padding: 26px 20px 20px; }
.hunt__stage.is-done { max-width: none; overflow: visible; border: 0; background: none; box-shadow: none; }
.hunt__stage.is-done .scene, .hunt__stage.is-done .hunt__sheet, .hunt__stage.is-done .hunt__flash { display: none; }
.hunt__stage.is-done .hunt__overlay { position: static; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
.result__title { font-family: var(--font-display); font-size: 1.5rem; }
.result__meta { color: var(--text-2); font-size: 14px; }
.result__sub { margin-top: 8px; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .result__sub { letter-spacing: 0; font-size: 13px; }
.result__list { display: grid; gap: 6px; margin-top: 4px; text-align: start; }
.result__list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); font-size: 14px; font-weight: 600; line-height: 1.45; }
:lang(ar) .result__list li { font-size: 15px; }
.result__list .icon { margin-top: 2px; color: var(--safe); }
.result__list li.is-no .icon { color: var(--danger); }
.result__actions { display: grid; gap: 8px; margin-top: 10px; }

/* ---------- What would you do? ---------- */
.steps { display: flex; gap: 6px; }
.steps__seg { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); transition: background-color .3s; }
.steps__seg.is-current { background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.steps__seg.is-ok { background: var(--safe); }
.steps__seg.is-no { background: var(--danger); }
.decide { display: grid; gap: 12px; animation: view-in .35s var(--ease); }
.decide__count { color: var(--text-3); font-size: 13px; font-weight: 600; }
.decide__scene { position: relative; display: grid; gap: 12px; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(360px 180px at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--surface); }
[dir="rtl"] .decide__scene { background: radial-gradient(360px 180px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--surface); }
.decide__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.decide__icon .icon { width: 24px; height: 24px; }
.decide__q { font-size: clamp(1.15rem, 4.6vw, 1.35rem); line-height: 1.45; font-weight: 700; }
:lang(ar) .decide__q { line-height: 1.7; }
.decide__options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.45; text-align: start; transition: border-color .2s, background-color .2s, opacity .2s, transform .15s; }
:lang(ar) .option { font-size: 16px; }
.option:not([disabled]):hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.option:not([disabled]):active { transform: scale(0.99); }
.option[disabled] { cursor: default; }
.option__key { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--surface-3); color: var(--text-2); font-family: var(--font-display); font-weight: 700; }
.option.is-correct { border-color: var(--safe); background: rgba(52, 211, 153, 0.1); }
.option.is-correct .option__key { background: var(--safe); color: #062113; }
.option.is-wrong { border-color: var(--danger); background: rgba(255, 90, 71, 0.1); }
.option.is-wrong .option__key { background: var(--danger); color: #fff; }
.option.is-dim { opacity: .42; }
.feedback { display: grid; gap: 8px; padding: 16px; border-radius: 18px; border: 1px solid; animation: view-in .35s var(--ease); }
.feedback--ok { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.07); }
.feedback--no { border-color: rgba(255, 90, 71, 0.45); background: rgba(255, 90, 71, 0.07); }
.feedback__verdict { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.feedback--ok .feedback__verdict { color: var(--safe); }
.feedback--no .feedback__verdict { color: #FF8A7D; }
.feedback__text { font-size: 15px; }
:lang(ar) .feedback__text { font-size: 16px; }
.feedback__best { color: var(--text-2); font-size: 14.5px; }
.feedback__best b { color: var(--safe); }
.feedback .btn { margin-top: 6px; }

/* ---------- Stamp ceremony ---------- */
.ceremony { position: fixed; inset: 0; z-index: 85; display: flex; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: rgba(10, 4, 7, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.ceremony.is-open { opacity: 1; }
.ceremony__card { width: 100%; max-width: 400px; margin: auto; padding: 22px 20px 20px; border-radius: 22px; background: var(--paper); color: var(--paper-ink); text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); transform: translateY(16px); transition: transform .35s var(--ease); }
.ceremony.is-open .ceremony__card { transform: none; }
.ceremony__stamp { position: relative; width: 168px; margin: 0 auto 8px; }
.ceremony.is-open .ceremony__stamp .stamp { animation: slam .6s cubic-bezier(.2, 1.4, .4, 1) .15s both; }
.ceremony__splash { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent) 0%, transparent 65%); opacity: 0; }
.ceremony.is-open .ceremony__splash { animation: splash .8s ease-out .5s both; }
.confetti { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.confetti span { position: absolute; left: -4px; top: -6px; width: 8px; height: 12px; border-radius: 2px; background: var(--c, var(--gold)); opacity: 0; }
.ceremony.is-open .confetti span { animation: burst 1.4s cubic-bezier(.12, .75, .3, 1) .55s forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.4); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); } }
.confetti span:nth-child(1) { --x: 153px; --y: -40px; --r: 469deg; --c: #D9B36C; }
.confetti span:nth-child(2) { --x: 149px; --y: 8px; --r: -400deg; --c: #F2DCA8; }
.confetti span:nth-child(3) { --x: 109px; --y: 24px; --r: 436deg; --c: #6B1730; }
.confetti span:nth-child(4) { --x: 75px; --y: 72px; --r: -278deg; --c: var(--accent); }
.confetti span:nth-child(5) { --x: 49px; --y: 108px; --r: 539deg; --c: #FFF3D6; }
.confetti span:nth-child(6) { --x: 25px; --y: 106px; --r: -462deg; --c: var(--accent); }
.confetti span:nth-child(7) { --x: -30px; --y: 106px; --r: 402deg; --c: #D9B36C; }
.confetti span:nth-child(8) { --x: -112px; --y: 86px; --r: 525deg; --c: #F2DCA8; }
.confetti span:nth-child(9) { --x: -124px; --y: 29px; --r: 228deg; --c: #6B1730; }
.confetti span:nth-child(10) { --x: -115px; --y: -11px; --r: -413deg; --c: var(--accent); }
.confetti span:nth-child(11) { --x: -187px; --y: -17px; --r: 480deg; --c: #FFF3D6; }
.confetti span:nth-child(12) { --x: -131px; --y: -77px; --r: 453deg; --c: var(--accent); }
.confetti span:nth-child(13) { --x: -131px; --y: -99px; --r: -332deg; --c: #D9B36C; }
.confetti span:nth-child(14) { --x: -100px; --y: -154px; --r: 470deg; --c: #F2DCA8; }
.confetti span:nth-child(15) { --x: -32px; --y: -125px; --r: 437deg; --c: #6B1730; }
.confetti span:nth-child(16) { --x: 19px; --y: -154px; --r: -484deg; --c: var(--accent); }
.confetti span:nth-child(17) { --x: 63px; --y: -144px; --r: 223deg; --c: #FFF3D6; }
.confetti span:nth-child(18) { --x: 85px; --y: -155px; --r: 205deg; --c: var(--accent); }
.confetti span:nth-child(19) { --x: 90px; --y: -88px; --r: -170deg; --c: #D9B36C; }
.confetti span:nth-child(20) { --x: 160px; --y: -80px; --r: -182deg; --c: #F2DCA8; }
@keyframes slam { 0% { opacity: 0; transform: scale(2.6) rotate(-14deg); } 60% { opacity: 1; transform: scale(0.94) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes splash { 0% { opacity: .9; transform: scale(0.5); } 100% { opacity: 0; transform: scale(1.3); } }
.ceremony__kicker { color: var(--paper-mute); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
:lang(ar) .ceremony__kicker { letter-spacing: 0; font-size: 14px; }
.ceremony__title { margin-top: 2px; font-family: var(--font-display); font-size: 1.8rem; color: var(--maroon); }
.ceremony__count { margin-top: 8px; color: var(--paper-mute); font-size: 13px; font-weight: 700; }
.ceremony__all { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: var(--maroon); color: var(--gold-2); font-weight: 700; font-size: 14px; }
.ceremony__sub { margin: 16px 0 8px; color: var(--paper-mute); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: start; }
:lang(ar) .ceremony__sub { letter-spacing: 0; font-size: 14px; }
.ceremony__card .rules { text-align: start; }
.ceremony__card .rule { background: rgba(107, 23, 48, 0.06); color: var(--paper-ink); font-size: 14px; padding: 10px 12px; }
:lang(ar) .ceremony__card .rule { font-size: 15px; }
.ceremony__card .rule__icon { width: 28px; height: 28px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: color-mix(in srgb, var(--accent) 70%, #2B1820); }
.ceremony__actions { display: grid; gap: 8px; margin-top: 16px; }
.ceremony__card .btn--ghost { color: var(--maroon); }
.ceremony__card .btn--ghost:hover { background: rgba(107, 23, 48, 0.08); color: var(--maroon); }

/* ---------- Passport ---------- */
.booklet { display: grid; gap: 14px; }
@media (min-width: 640px) { .booklet { grid-template-columns: 1fr 1fr; gap: 0; } .booklet .pp-page--id { border-start-end-radius: 6px; border-end-end-radius: 6px; } .booklet .pp-page--stamps { border-start-start-radius: 6px; border-end-start-radius: 6px; box-shadow: inset 14px 0 18px -14px rgba(43, 24, 32, 0.35), var(--shadow); } [dir="rtl"] .booklet .pp-page--stamps { box-shadow: inset -14px 0 18px -14px rgba(43, 24, 32, 0.35), var(--shadow); } }
.booklet.is-issued .pp-page { box-shadow: 0 0 0 1px rgba(217, 179, 108, 0.5), 0 24px 60px -24px rgba(217, 179, 108, 0.35); }
.pp-page { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: 18px; background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); }
.pp-page > :not(.guilloche) { position: relative; }
.pp-page__band { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: var(--maroon); color: var(--gold-2); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.pp-page__band [lang="ar"] { letter-spacing: 0; font-size: 14px; }
.pp-page__band .emblem { width: 34px; height: 34px; margin: 0; }
.pp-id { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 16px 16px 8px; }
.pp-photo { position: relative; display: grid; place-items: center; align-self: start; aspect-ratio: 3 / 4; border-radius: 10px; background: linear-gradient(160deg, rgba(107, 23, 48, 0.14), rgba(107, 23, 48, 0.05)); box-shadow: inset 0 0 0 1px rgba(107, 23, 48, 0.2); color: var(--maroon); }
.pp-photo .icon { position: absolute; width: 60%; height: 60%; opacity: .14; stroke-width: 1.5; }
.pp-photo__initial { position: relative; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; }
.pp-fields { display: grid; gap: 8px; align-content: start; min-width: 0; }
.pp-field { display: grid; gap: 0; min-width: 0; }
.pp-field__label { color: var(--paper-mute); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; }
:lang(ar) .pp-field__label { letter-spacing: 0; font-size: 12px; }
.pp-field__value { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.pp-field__input { width: 100%; min-height: 40px; padding: 2px 0; border: 0; border-bottom: 2px dashed rgba(107, 23, 48, 0.35); border-radius: 0; background: transparent; color: var(--paper-ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.pp-field__input::placeholder { color: rgba(43, 24, 32, 0.38); font-weight: 600; }
.pp-field__input:focus { outline: none; border-bottom-style: solid; border-bottom-color: var(--maroon); }
.pp-field__input:focus-visible { outline: none; }
.pp-hint { margin-top: -4px; color: var(--paper-mute); font-size: 11.5px; line-height: 1.4; }
.pp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; }
.pp-issuer { display: grid; justify-items: start; padding: 4px 16px 10px; }
.pp-sign { font-family: var(--font-sign); font-size: 2.4rem; line-height: 1.3; color: var(--maroon); transform: rotate(-4deg); transform-origin: 0 50%; }
[dir="rtl"] .pp-sign { transform-origin: 100% 50%; }
.pp-issuer__name { font-size: 12.5px; font-weight: 600; }
.pp-mrz { display: grid; margin-top: auto; padding: 10px 16px 12px; border-top: 1px dashed rgba(107, 23, 48, 0.25); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; line-height: 1.6; white-space: nowrap; overflow: hidden; color: rgba(43, 24, 32, 0.8); }
.pp-page__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.pp-stamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; padding: 4px 14px 12px; }
.pp-stamp { display: grid; align-content: start; justify-items: center; gap: 2px; text-decoration: none; }
.pp-stamp .stamp { max-width: 100px; }
.pp-stamp .stamp-slot { max-width: 84px; margin: 6px; width: calc(100% - 12px); border-color: rgba(107, 23, 48, 0.25); color: rgba(107, 23, 48, 0.5); }
.pp-stamp .stamp-slot .icon { width: 22px; height: 22px; }
.pp-stamp .stamp-slot span { font-size: 10px; }
.pp-stamp__name { color: var(--paper-mute); font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; }
:lang(ar) .pp-stamp__name { font-size: 11.5px; line-height: 1.35; }
.pp-tier { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 16px 16px; padding: 8px 12px; border: 2px solid var(--maroon); border-radius: 10px; color: var(--maroon); font-family: var(--font-display); font-weight: 700; transform: rotate(-1.5deg); }
.pp-tier--champion { background: rgba(217, 179, 108, 0.22); }

.card-preview { display: grid; gap: 14px; }
.card-preview__img { -webkit-touch-callout: default; }
.card-preview--wide .card-preview__img { max-height: none; width: 100%; border-radius: 12px; }
.card-preview__hint { display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.card-preview__hint .icon { margin-top: 2px; color: var(--gold); }
.card-preview__img { width: auto; max-width: 100%; max-height: 60vh; margin-inline: auto; border-radius: 18px; box-shadow: var(--shadow); }
.modal--card .modal__panel { max-width: 440px; }

/* ---------- Smoke Lab ---------- */
.lab { display: grid; gap: 14px; }
/* the picture with its three readings right under it; on a phone they stay in view while you scroll the controls */
.lab__screen { display: grid; gap: 8px; }
@media (max-width: 699px) and (min-height: 600px) {
  .lab__screen { position: sticky; z-index: 6; top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px)); margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter) 10px; background: var(--bg); box-shadow: 0 12px 14px -10px rgba(0, 0, 0, 0.75); }
}
.lab__viewport { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #0b1424; }
.lab__zones { display: grid; grid-template-columns: 65fr 35fr; direction: ltr; border-bottom: 1px solid rgba(143, 208, 255, 0.12); background: #0a1120; }
.lab__zone { padding: 5px 10px; color: var(--text-2); font-size: 12px; font-weight: 700; line-height: 1.3; unicode-bidi: plaintext; }
:lang(ar) .lab__zone { font-size: 13px; }
.lab__zone--stair { border-left: 1px solid rgba(143, 208, 255, 0.16); color: #8FD0FF; }
.lab__stage { position: relative; }
.lab__canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 440; }
.lab__upper { position: absolute; top: 7%; left: 71%; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 6px; background: rgba(7, 11, 20, 0.72); color: var(--text-3); font-size: 11px; font-weight: 700; line-height: 1.3; pointer-events: none; direction: ltr; unicode-bidi: plaintext; }
:lang(ar) .lab__upper { font-size: 12px; }
.lab__upper .icon { width: 13px; height: 13px; flex: none; }
/* what a person says, over their head */
.lab__say { position: absolute; z-index: 2; top: 0; left: 0; max-width: 46%; padding: 4px 10px; border-radius: 12px; background: var(--paper); color: var(--paper-ink); font-size: 12.5px; font-weight: 800; line-height: 1.25; text-align: center; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s; }
:lang(ar) .lab__say { font-size: 13.5px; }
.lab__say::after { content: ""; position: absolute; top: 100%; left: 50%; border: 6px solid transparent; border-top-color: var(--paper); transform: translateX(-50%); }
.lab__say.is-on { opacity: 1; animation: say-pop .35s var(--ease); }
@keyframes say-pop { from { scale: .6; } }
.lab__playpause { position: absolute; left: 8px; bottom: 8px; width: 40px; height: 40px; background: rgba(7, 11, 20, 0.75); }
.lab__controls { display: grid; gap: 14px; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.control { display: grid; gap: 6px; }
.control--row { display: flex; align-items: center; justify-content: space-between; }
.control__label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.control__label output { color: #8FD0FF; font-variant-numeric: tabular-nums; }
/* the three readings: what each one is, its word, and its bar */
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gauge { display: grid; align-content: space-between; gap: 5px; padding: 8px 9px 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.gauge__top { display: grid; gap: 2px; color: var(--text-3); font-size: 11.5px; font-weight: 600; line-height: 1.25; }
:lang(ar) .gauge__top { font-size: 12.5px; }
.gauge__val { color: var(--text); font-size: 14px; line-height: 1.2; font-variant-numeric: tabular-nums; }
:lang(ar) .gauge__val { font-size: 15px; }
.gauge__bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; direction: ltr; }
.gauge__fill { position: absolute; inset-block: 0; left: 0; width: var(--w, 0%); border-radius: inherit; background: var(--text-3); transition: width .25s, background-color .25s; }
.gauge__fill[data-state="good"] { background: var(--safe); }
.gauge__fill[data-state="warn"] { background: var(--work); }
.gauge__fill[data-state="bad"] { background: var(--danger); }
.gauge__band--dp { position: absolute; inset-block: 0; left: var(--from, 10.4%); width: var(--size, 60.4%); background: rgba(52, 211, 153, 0.18); border-inline: 1px solid rgba(52, 211, 153, 0.6); transition: left .3s var(--ease), width .3s var(--ease); }
.gauge__limit--force { position: absolute; inset-block: -2px; left: 73.9%; width: 2px; background: var(--work); z-index: 1; }
.gauges__legend { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
:lang(ar) .gauges__legend { font-size: 12.5px; }
.gauges__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.gauges__key { flex: none; width: 14px; height: 8px; border-radius: 3px; }
.gauges__key--band { background: rgba(52, 211, 153, 0.35); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.8); }
.gauges__key--limit { width: 3px; height: 12px; background: var(--work); }
@media (min-width: 700px) { .gauge__top { font-size: 12.5px; } .gauge__val { font-size: 15.5px; } }
.insight { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; border-inline-start: 3px solid var(--text-3); background: rgba(255, 255, 255, 0.03); font-size: 15px; color: var(--text); }
.insight[data-state="good"] { border-color: var(--safe); background: rgba(52, 211, 153, 0.07); }
.insight[data-state="warn"] { border-color: var(--work); background: rgba(245, 165, 36, 0.07); }
.insight[data-state="bad"] { border-color: var(--danger); background: rgba(255, 90, 71, 0.07); }
.insight__extra { color: #FFB3A8; font-size: 14px; }
.goal { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--text-2); font-size: 14px; }
.goal .icon { margin-top: 3px; color: var(--work); }
.goal.is-done { border-style: solid; border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.08); color: var(--text); }
.goal.is-done .icon { color: var(--safe); }
.lab > .btn { justify-self: start; }

/* ---------- Myth or Fact ---------- */
.mf { max-width: 600px; margin-inline: auto; }
.mf__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mf__count { color: var(--text-2); font-size: 14px; font-weight: 600; }
.mf__dots { display: flex; gap: 6px; }
.mf__dots li { width: 18px; height: 5px; border-radius: 999px; background: var(--surface-3); }
.mf__dots li.is-done { background: var(--safe); }
.mf__dots li.is-current { background: var(--gold); }
.mf__deck { position: relative; display: grid; padding-bottom: 14px; }
.mf__shadow { grid-area: 1 / 1; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.mf__shadow--1 { transform: translateY(8px) scale(0.965); opacity: .7; }
.mf__shadow--2 { transform: translateY(16px) scale(0.93); opacity: .4; }
.mf-card { grid-area: 1 / 1; position: relative; z-index: 1; perspective: 1400px; touch-action: pan-y; transform: translateX(var(--dx, 0)) rotate(var(--rot, 0)); transition: transform .35s var(--ease); cursor: grab; }
.mf-card.is-dragging { transition: none; cursor: grabbing; }
.mf-card.is-flipped { cursor: default; }
.mf-card__inner { display: grid; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.mf-card.is-flipped .mf-card__inner { transform: rotateY(180deg); }
.mf-card__face { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 300px; padding: 30px 26px; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: linear-gradient(160deg, #3A1626, #24101A); box-shadow: var(--shadow); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.mf-card__back { transform: rotateY(180deg); }
.mf-card__back--ok { border-color: rgba(52, 211, 153, 0.5); }
.mf-card__back--no { border-color: rgba(255, 90, 71, 0.5); }
.mf-card__mark { color: var(--gold); }
.mf-card__mark .icon { width: 30px; height: 30px; }
.mf-card__q { font-size: clamp(1.3rem, 4vw, 1.6rem); font-weight: 700; line-height: 1.4; }
:lang(ar) .mf-card__q { line-height: 1.7; }
.mf-card__q--sm { font-size: 1rem; color: var(--text-3); font-weight: 600; }
.mf-card__hint { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; color: var(--text-3); font-size: 12px; }
.mf-card__hint span { display: inline-flex; align-items: center; gap: 4px; }
.mf-card__hint-myth { color: #FF8A7D; font-weight: 700; }
.mf-card__hint-fact { color: var(--safe); font-weight: 700; }
.mf-stamp { position: absolute; top: 22px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: rotate(-12deg); pointer-events: none; }
:lang(ar) .mf-stamp { letter-spacing: 0; }
.mf-stamp--myth { inset-inline-end: 20px; color: var(--danger); opacity: var(--myth, 0); }
.mf-stamp--fact { inset-inline-start: 20px; color: var(--safe); opacity: var(--fact, 0); transform: rotate(12deg); }
.mf-card__verdict { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; outline: none; }
.mf-card__back--ok .mf-card__verdict { color: var(--safe); }
.mf-card__back--no .mf-card__verdict { color: #FF8A7D; }
.mf-card__answer { display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-weight: 700; font-size: 14px; }
.mf-card__explain { color: var(--text); font-size: 16px; }
:lang(ar) .mf-card__explain { font-size: 17px; }
.mf__actions { display: flex; gap: 12px; margin-top: 18px; }
.mf__actions .btn { flex: 1; }
.mf__actions .btn--primary { --accent: var(--gold); }
.btn--choice { min-height: 58px; font-size: 17px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.btn--myth:hover { border-color: var(--danger); background: rgba(255, 90, 71, 0.1); }
.btn--myth .icon { color: #FF8A7D; }
.btn--fact:hover { border-color: var(--safe); background: rgba(52, 211, 153, 0.1); }
.btn--fact .icon { color: var(--safe); }
.mf-done { text-align: center; }
.mf-done__badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(217, 179, 108, 0.14); color: var(--gold); margin-bottom: 14px; }
.mf-done__badge .icon { width: 30px; height: 30px; }
.mf-done__title { font-family: var(--font-display); font-size: 1.5rem; outline: none; }
.mf-done__score { display: grid; gap: 4px; margin-top: 10px; color: var(--text-2); }
.mf-done__score b { font-size: 2.4rem; color: var(--text); line-height: 1.1; direction: ltr; }

/* ---------- Documents & contacts ---------- */
.trust { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 12px; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.3); color: var(--safe); font-size: 14px; font-weight: 600; }
.sos-card { padding: 20px; border-radius: var(--radius-lg); background: radial-gradient(400px 200px at 100% 0%, rgba(242, 220, 168, 0.14), transparent 70%), linear-gradient(160deg, #6B1730, #350B18); border: 1px solid rgba(242, 220, 168, 0.3); }
.sos-card__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .sos-card__kicker { letter-spacing: 0; text-transform: none; font-size: 15px; }
.sos-card__body { margin: 10px 0 16px; color: rgba(248, 238, 240, 0.86); font-size: 15px; }
.sos-card__call { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 76px; border-radius: 18px; background: linear-gradient(135deg, #F6E3B4 0%, #D9B36C 55%, #B98E45 100%); color: #3A0C1A; text-decoration: none; box-shadow: 0 12px 30px -12px rgba(217, 179, 108, 0.9); transition: transform .15s; }
.sos-card__call:active { transform: scale(0.98); }
.sos-card__call .icon { width: 30px; height: 30px; }
.sos-card__num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; letter-spacing: .06em; }
.sos-card__label { margin-top: 10px; color: rgba(248, 238, 240, 0.8); font-size: 13px; text-align: center; }
.contact-list { display: grid; gap: 8px; }
.contact { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.contact__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; grid-row: span 2; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.contact__label { font-weight: 600; font-size: 14px; }
:lang(ar) .contact__label { font-size: 15px; }
.contact__num { font-weight: 700; color: #8FD0FF; text-decoration: none; font-variant-numeric: tabular-nums; }
.contact__tbc { grid-column: 2 / -1; color: var(--text-3); font-size: 13px; }
.contact.is-pending { border-style: dashed; }
.hub-docs { margin-top: 8px; }
.hub-docs__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.hub-docs__head .section-label { flex: 1 1 100%; margin-bottom: 0; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; }
:lang(ar) .filter-chip { font-size: 14px; }
.filter-chip[aria-pressed="true"] { background: var(--gold-2); border-color: var(--gold-2); color: var(--bg); }
.site { display: grid; gap: 8px; }
.site__row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.site__row > .icon { grid-row: span 2; margin-top: 3px; color: var(--gold); }
.site__k { color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .site__k { letter-spacing: 0; font-size: 13px; text-transform: none; }
.site__v, .site__points { font-weight: 600; font-size: 15px; }
.site__points { display: grid; gap: 2px; }
.site__points span { color: var(--text-2); font-weight: 400; }
.hub-sources { margin-top: 8px; }
.sources { display: grid; gap: 8px; }
.sources li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
:lang(ar) .sources li { font-size: 15px; }
.sources .icon { margin-top: 3px; color: var(--gold); }
.sources__note { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.25); color: var(--text); font-size: 14px; font-weight: 600; }
.sources__note .icon { margin-top: 3px; color: var(--safe); }
.doc-list { display: grid; gap: 10px; }
.hub-pending-note { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; color: var(--text-3); font-size: 13px; }
.hub-pending-note .icon { margin-top: 3px; color: var(--work); }
.doc { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 640px) { .doc { grid-template-columns: auto 1fr auto; align-items: center; } }
.doc--pending { border-style: dashed; background: transparent; }
.doc--empty { display: block; color: var(--text-3); text-align: center; }
.doc__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(217, 179, 108, 0.1); color: var(--gold); }
.doc--pending .doc__icon { background: var(--surface-3); color: var(--text-3); }
.doc__cat { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .doc__cat { letter-spacing: 0; font-size: 13px; text-transform: none; }
.doc__title { font-size: 1rem; margin: 2px 0 4px; }
.doc__desc { color: var(--text-2); font-size: 14px; }
:lang(ar) .doc__desc { font-size: 15px; }
.doc__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.doc__actions { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
@media (min-width: 640px) { .doc__actions { grid-column: auto; flex-direction: column; } }
.preview { display: grid; gap: 8px; }
.preview__frame { width: 100%; height: min(70vh, 720px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.preview--image img { width: 100%; height: auto; border-radius: 12px; }

/* ---------- Mini games ---------- */
[data-game="pass"], .game-card--pass { --accent: var(--work); }
[data-game="escape"], .game-card--escape { --accent: var(--road); }
[data-game="signs"], .game-card--signs { --accent: var(--house); }
.game-card--myths { --accent: var(--gold); }
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.game-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 12px 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 18px; background: radial-gradient(160px 120px at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s var(--ease), opacity .6s var(--ease); }
[dir="rtl"] .game-card { background: radial-gradient(160px 120px at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); }
.game-card:active { transform: scale(0.98); }
.game-card__title { margin-top: 8px; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; line-height: 1.3; word-spacing: .12em; }
.game-card__sub { color: var(--text-3); font-size: 12.5px; line-height: 1.4; flex: 1; }
:lang(ar) .game-card__sub { font-size: 13px; }
.game-card .stars, .game-card__new, .game-card__score { margin-top: 6px; }
.game-card__new { padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink, var(--accent)); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .game-card__new { letter-spacing: 0; font-size: 12px; }
.game-card__score { color: var(--gold); font-family: var(--font-mono); font-size: 13px; }
.game-art { position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 60%, #000)); color: #1A0B11; box-shadow: 0 10px 22px -12px var(--accent); }
.game-art .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.game-art--pass .icon { transform-origin: 50% 90%; animation: flame-dance 1.1s ease-in-out infinite alternate; }
.game-art--escape .icon { animation: walk 1.4s ease-in-out infinite; }
.game-art--signs { animation: card-flip 3.2s ease-in-out infinite; }
.game-art--myths .icon { animation: wobble 2.4s ease-in-out infinite; }
@keyframes flame-dance { from { transform: scale(0.92, 0.88) rotate(-4deg); } to { transform: scale(1.06, 1.1) rotate(4deg); } }
@keyframes walk { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px) translateY(-2px); } }
@keyframes card-flip { 0%, 40%, 100% { transform: rotateY(0); } 50%, 90% { transform: rotateY(180deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-10deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }
.games .reveal:nth-child(2) { transition-delay: .08s; }
.games .reveal:nth-child(3) { transition-delay: .16s; }
.games .reveal:nth-child(4) { transition-delay: .24s; }

.game__stage { position: relative; }
.game-intro { display: grid; justify-items: center; gap: 12px; padding: 26px 20px 20px; border-radius: 22px; border: 1px solid var(--line-2); background: radial-gradient(320px 200px at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); text-align: center; animation: hero-in .5s var(--ease) both; }
.game-intro .game-art { width: 76px; height: 76px; border-radius: 24px; }
.game-intro .game-art .icon { width: 38px; height: 38px; }
.game-intro__title { font-family: var(--font-display); font-size: clamp(1.7rem, 7.5vw, 2.2rem); word-spacing: .12em; }
.game-intro__how { max-width: 36ch; color: var(--text-2); font-size: 15px; }
:lang(ar) .game-intro__how { font-size: 16px; }
.game-intro__safety { display: flex; align-items: flex-start; gap: 8px; max-width: 40ch; padding: 10px 12px; border-radius: 12px; background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.22); font-size: 13.5px; font-weight: 600; text-align: start; }
:lang(ar) .game-intro__safety { font-size: 14.5px; }
.game-intro__safety .icon { margin-top: 2px; color: var(--safe); }
.game-intro__best { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.game-intro .btn { margin-top: 4px; }
.game-result { position: relative; }
.game-result__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--gold); }
.game-result__icon .icon { width: 26px; height: 26px; }
.game-result__best { display: inline-flex; justify-self: center; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(217, 179, 108, 0.16); color: var(--gold-2); font-weight: 700; font-size: 13px; animation: star-pop .5s var(--ease) .4s both; }
.confetti--result { top: 46px; }
.confetti--result span { animation: burst 1.4s cubic-bezier(.12, .75, .3, 1) .35s forwards; }
.confetti--result span:nth-child(odd) { --c: var(--gold); }
.confetti--result span:nth-child(3n) { --c: var(--accent); }

/* Put it out! */
.pass { display: grid; gap: 10px; }
.pass__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pass__chip { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 4px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font-size: 12.5px; font-weight: 700; transition: all .25s; }
.pass__chip b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-family: var(--font-display); font-size: 12px; }
.pass__chip.is-current { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); transform: translateY(-2px); }
.pass__chip.is-current b { background: var(--accent); color: #1A0B11; }
.pass__chip.is-done { color: var(--safe); }
.pass__chip.is-done b { background: var(--safe); color: #062113; }
@media (max-width: 359px) { .pass__chip span { display: none; } }
.pass__prompt { min-height: 2.8em; font-weight: 700; font-size: 15px; line-height: 1.4; }
:lang(ar) .pass__prompt { font-size: 16px; }
.pass__stage { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 300px) * 360 / 420)); max-width: min(100%, calc((100svh - var(--appbar-h) - 300px) * 360 / 420)); min-width: 260px; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pass__canvas { width: 100%; height: auto; aspect-ratio: 360 / 420; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; cursor: crosshair; }
.pass__clock { position: absolute; top: 10px; inset-inline-end: 10px; padding: 2px 9px; border-radius: 999px; background: rgba(22, 10, 15, 0.7); color: var(--text-2); font-family: var(--font-mono); font-size: 13px; direction: ltr; }
.pass__flash { position: absolute; top: 46%; left: 50%; max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 14px; background: rgba(22, 10, 15, 0.9); color: var(--text); font-weight: 700; font-size: 14px; text-align: center; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.pass__flash.is-on { animation: flash-c 1.6s ease both; }
@keyframes flash-c { 0% { opacity: 0; transform: translate(-50%, -40%); } 12%, 75% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
.pass__meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pass__meter { display: grid; gap: 4px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.pass__bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; direction: ltr; }
.pass__bar i { position: absolute; inset-block: 0; left: 0; width: var(--w, 100%); border-radius: inherit; transition: width .15s linear; }
.pass__bar--charge i { background: linear-gradient(90deg, #F6E3B4, #D9B36C); }
.pass__bar--charge i.is-low { background: linear-gradient(90deg, #FF8A7D, #FF5A47); animation: pulse-low .6s ease-in-out infinite alternate; }
.pass__bar--fire i { background: linear-gradient(90deg, #FFD66B, #FF9A3C, #FF5A3C); }
@keyframes pulse-low { to { opacity: .55; } }
.pass__controls { display: grid; gap: 8px; }
.pass__hold { touch-action: none; -webkit-user-select: none; user-select: none; }
.pass__hold:active { transform: scale(0.98); filter: brightness(1.08); }

/* Escape the smoke */
.esc { display: grid; gap: 10px; }
.esc__hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 700; }
.esc__hearts { display: inline-flex; gap: 5px; direction: ltr; }
.esc__heart { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #BDF5DC, var(--safe) 60%, #1A8F65); box-shadow: 0 0 10px -2px rgba(52, 211, 153, 0.7); transition: all .3s; }
.esc__heart.is-lost { background: var(--surface-3); box-shadow: none; transform: scale(0.8); }
.esc__clock { color: var(--text-3); font-family: var(--font-mono); direction: ltr; }
.esc__goal { min-height: 2.6em; font-weight: 700; font-size: 15px; line-height: 1.4; }
:lang(ar) .esc__goal { font-size: 16px; }
.esc__board { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 400px) * 7 / 9)); max-width: min(100%, calc((100svh - var(--appbar-h) - 400px) * 7 / 9)); min-width: 252px; margin-inline: auto; padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--line-2); background: #2C2230; direction: ltr; touch-action: none; -webkit-user-select: none; user-select: none; }
.esc__board.is-hit { animation: hit .35s ease; }
.esc__board.is-lift .esc__token { animation: drop .9s ease-in forwards; }
.esc__board.is-out { filter: grayscale(.6) brightness(.7); transition: filter .8s; }
@keyframes hit { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes drop { to { transform: scale(0.2) rotate(30deg); opacity: 0; } }
.esc__cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 0.5px solid rgba(255, 255, 255, 0.04); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.esc__cell--floor { background: #3A2E40; }
.esc__cell--wall { background: linear-gradient(160deg, #5E4433, #3E2E26); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.08); }
.esc__cell--exit { background: #1FAE6E; box-shadow: inset 0 0 0 2px #7CE2B1; animation: exit-glow 1.6s ease-in-out infinite alternate; }
.esc__cell--exit .icon { width: 46%; height: 46%; }
.esc__cell--exit b, .esc__cell--lift b { position: absolute; bottom: 3px; font-size: 8px; }
:lang(ar) .esc__cell--exit b, :lang(ar) .esc__cell--lift b { font-size: 9px; letter-spacing: 0; }
.esc__cell--lift { grid-template-columns: auto auto; background: #6C6A76; color: #E6E3EC; }
.esc__cell--lift .icon { width: 30%; height: 30%; }
.esc__cell--fire { background: radial-gradient(circle, #FF9A3C 0%, #C2332A 70%); }
.esc__cell--fire .icon { width: 60%; height: 60%; color: #FFE08A; fill: #FFB347; animation: flame-dance .5s ease-in-out infinite alternate; }
.esc__cell--door { background: #3A2E40; }
.esc__door { position: absolute; inset: 14% 8%; border-radius: 3px; border: 3px solid #B7845A; border-top-width: 0; border-bottom-width: 0; }
.esc__cell--door.is-closed .esc__door { inset: 10% 6%; border: 0; background: linear-gradient(90deg, #B7845A, #9A6D48); box-shadow: inset -4px 0 0 rgba(0, 0, 0, 0.2); }
.esc__cell::after { content: ""; position: absolute; inset: -12%; border-radius: 40%; background: radial-gradient(circle, rgba(196, 188, 200, 0.9), rgba(160, 152, 166, 0.6) 55%, transparent 72%); opacity: 0; transition: opacity .6s; pointer-events: none; animation: smoke-drift 4s ease-in-out infinite alternate; }
.esc__cell[data-s="1"]::after { opacity: .3; }
.esc__cell[data-s="2"]::after { opacity: .62; }
.esc__cell[data-s="3"]::after { opacity: .9; }
@keyframes smoke-drift { from { transform: translate(-3%, 2%) scale(.95); } to { transform: translate(3%, -2%) scale(1.06); } }
@keyframes exit-glow { from { box-shadow: inset 0 0 0 2px #7CE2B1; } to { box-shadow: inset 0 0 0 2px #7CE2B1, 0 0 16px 2px rgba(31, 174, 110, 0.7); } }
.esc__token { position: absolute; z-index: 2; top: calc(var(--y) * 100% / 9); left: calc(var(--x) * 100% / 7); width: calc(100% / 7); height: calc(100% / 9); display: grid; place-items: center; transition: top .15s var(--ease), left .15s var(--ease); pointer-events: none; }
.esc__me { width: 78%; height: 78%; padding: 8%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF3D6, var(--gold) 60%, #A87C36); fill: #3A0C1A; box-shadow: 0 0 0 3px rgba(22, 10, 15, 0.6), 0 6px 14px -4px rgba(217, 179, 108, 0.9); }
.esc__token.is-low .esc__me { background: radial-gradient(circle at 35% 30%, #DFF7FF, #42A9F5 60%, #1F6FB0); }
.esc__flash { position: absolute; z-index: 3; top: 8px; left: 50%; max-width: calc(100% - 16px); padding: 6px 12px; border-radius: 12px; background: rgba(22, 10, 15, 0.9); color: var(--text); font-size: 12.5px; font-weight: 700; text-align: center; transform: translateX(-50%); opacity: 0; pointer-events: none; direction: ltr; }
:lang(ar) .esc__flash { direction: rtl; font-size: 13.5px; }
.esc__flash--bad { color: #FFB3A8; }
.esc__flash--good { color: #BDF5DC; }
.esc__flash.is-on { animation: flash 1.8s ease both; }
.esc__clear { position: absolute; z-index: 4; inset: 0; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 18px; background: rgba(22, 10, 15, 0.86); text-align: center; animation: hero-in .4s var(--ease) both; direction: ltr; }
:lang(ar) .esc__clear { direction: rtl; }
.esc__clear-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #1FAE6E; color: #fff; }
.esc__clear-icon .icon { width: 28px; height: 28px; }
.esc__clear-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.esc__clear-text { max-width: 30ch; color: var(--text-2); font-size: 14.5px; }
.esc__pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-areas: ". up ." "left low right" ". down ."; justify-content: center; gap: 6px; direction: ltr; }
.esc__btn { display: grid; place-items: center; min-height: 52px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.esc__btn:active { background: var(--surface-3); transform: scale(0.96); }
.esc__btn .icon { width: 24px; height: 24px; }
.esc__btn--up { grid-area: up; } .esc__btn--down { grid-area: down; } .esc__btn--left { grid-area: left; } .esc__btn--right { grid-area: right; }
.esc__btn--up .icon { transform: none; }
.esc__btn--left .icon { transform: scaleX(-1); }
.esc__low { grid-area: low; align-content: center; gap: 0; padding: 4px; font-size: 10.5px; font-weight: 700; line-height: 1.1; color: var(--text-2); }
:lang(ar) .esc__low { font-size: 11.5px; }
.esc__low .icon { width: 18px; height: 18px; }
.esc__low.is-on { border-color: var(--road); background: rgba(66, 169, 245, 0.18); color: #CDE9FF; }
/* Later levels: wedged doors, hot doors, the alarm call point, a colleague and clouds of smoke */
.esc__cell--fire.is-new { animation: fire-in .5s ease-out; }
@keyframes fire-in { from { transform: scale(.4); filter: brightness(1.8); } }
.esc__wedge { position: absolute; right: 10%; bottom: 8%; width: 36%; height: 24%; background: #FFB547; clip-path: polygon(0 100%, 100% 100%, 0 0); }
.esc__cell--hot { background: #3A2E40; }
.esc__cell--hot .esc__door { inset: 10% 6%; border: 0; background: linear-gradient(90deg, #C2532A, #8E3420); box-shadow: 0 0 10px 2px rgba(255, 106, 60, 0.55), inset -4px 0 0 rgba(0, 0, 0, 0.2); animation: hot-glow 1s ease-in-out infinite alternate; }
.esc__cell--hot .icon { position: relative; width: 44%; height: 44%; color: #FFE08A; }
@keyframes hot-glow { to { box-shadow: 0 0 16px 4px rgba(255, 106, 60, 0.85), inset -4px 0 0 rgba(0, 0, 0, 0.2); } }
.esc__cell--hot.is-burst::before { content: ""; position: absolute; z-index: 1; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 107, 0.95), rgba(255, 90, 60, 0.7) 45%, transparent 70%); animation: door-burst .6s ease-out forwards; pointer-events: none; }
@keyframes door-burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.esc__cell--alarm { background: #3A2E40; }
.esc__callpoint { position: relative; width: 56%; height: 56%; border-radius: 4px; background: #D7263D; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25); }
.esc__callpoint::after { content: ""; position: absolute; inset: 26%; border-radius: 2px; background: #F4ECDD; }
.esc__cell--alarm:not(.is-on) .esc__callpoint { animation: callpoint-hint 1.6s ease-in-out infinite; }
@keyframes callpoint-hint { 50% { transform: scale(1.12); } }
.esc__cell--alarm.is-on .esc__callpoint { animation: alarm-on .45s ease-in-out infinite alternate; }
@keyframes alarm-on { to { box-shadow: 0 0 14px 5px rgba(255, 90, 71, 0.9); } }
.esc__mate, .esc__ghost { position: absolute; z-index: 2; top: calc(var(--y) * 100% / 9); left: calc(var(--x) * 100% / 7); width: calc(100% / 7); height: calc(100% / 9); display: grid; place-items: center; pointer-events: none; transition: top .15s var(--ease), left .15s var(--ease), opacity .3s; }
.esc__mate-art { width: 70%; height: 70%; padding: 6%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FDE2F3, #F9A8D4 60%, #B83280); fill: #3A0C1A; box-shadow: 0 0 0 3px rgba(22, 10, 15, 0.6); }
.esc__mate:not(.is-with) .esc__mate-art { animation: mate-wait 1.2s ease-in-out infinite; }
@keyframes mate-wait { 50% { transform: translateY(-8%) rotate(-6deg); } }
.esc__ghost { z-index: 3; transition: top .4s linear, left .4s linear, opacity .3s; }
.esc__ghost-art { width: 94%; height: 94%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); animation: ghost-float 1.1s ease-in-out infinite alternate; }
@keyframes ghost-float { to { transform: translateY(-7%) scale(1.05); } }
.esc__ghost.is-gone { opacity: 0; }
.esc__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.esc__key { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: 700; line-height: 1.3; }
:lang(ar) .esc__key { font-size: 12.5px; }
.esc__key .icon { flex: none; width: 14px; height: 14px; }
.esc__key--A .icon, .esc__key--F .icon, .esc__key--spread .icon { color: #FF7A5C; }
.esc__key--E .icon { color: var(--safe); }
.esc__key--L .icon { color: #FFB3A8; }
.esc__key--W .icon, .esc__key--D .icon { color: var(--gold); }
.esc__key--G .icon, .esc__key--low .icon { color: #B9B3C2; }
.esc__key--H .icon { color: #FB923C; }
.esc__key--C .icon { color: #F472B6; }
.esc__clear-got { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-2); font-size: 13.5px; font-weight: 700; }
.esc__clear-got .icon { width: 16px; height: 16px; color: var(--gold); }
.esc__clear-miss { max-width: 30ch; color: #FFC2B5; font-size: 13px; }

/* Sign match */
.mm { display: grid; gap: 10px; }
.mm__hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 700; }
.mm__clock { color: var(--text-3); font-family: var(--font-mono); direction: ltr; }
.mm__board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 280px) * 0.8)); max-width: min(100%, calc((100svh - var(--appbar-h) - 280px) * 0.8)); min-width: 260px; margin-inline: auto; perspective: 900px; }
.mm-card { position: relative; aspect-ratio: 1 / 1.06; padding: 0; border: 0; background: none; border-radius: 14px; cursor: pointer; animation: deal .45s var(--ease) var(--d, 0s) both; }
@keyframes deal { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
.mm-card__inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.mm-card.is-open .mm-card__inner, .mm-card.is-done .mm-card__inner { transform: rotateY(180deg); }
.mm-back, .mm-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mm-back { background: radial-gradient(circle at 50% 40%, rgba(242, 220, 168, 0.18), transparent 60%), linear-gradient(160deg, #7E1C39, #3A0C1A); box-shadow: inset 0 0 0 1px rgba(242, 220, 168, 0.25); color: var(--gold); }
.mm-back .icon { width: 34%; height: 34%; opacity: .85; }
/* Face-down text is hidden, not just turned away, so it isn't read out as the card's label */
.mm-face { transform: rotateY(180deg); padding: 8%; visibility: hidden; transition: visibility 0s linear .45s; }
.mm-card.is-open .mm-face, .mm-card.is-done .mm-face { visibility: visible; transition-delay: 0s; }
.mm-face--pic { background: #F4ECDD; }
.mm-sign { width: 82%; height: 82%; }
.mm-face--word { background: var(--paper); color: var(--paper-ink); font-family: var(--font-display); font-weight: 700; font-size: 13.5px; line-height: 1.25; text-align: center; word-spacing: .1em; }
:lang(ar) .mm-face--word { font-size: 15px; line-height: 1.5; }
.mm-card.is-done .mm-face { box-shadow: 0 0 0 3px var(--safe), 0 10px 22px -12px var(--safe); animation: matched .5s var(--ease); }
@keyframes matched { 0% { transform: rotateY(180deg) scale(1); } 50% { transform: rotateY(180deg) scale(1.08); } 100% { transform: rotateY(180deg) scale(1); } }
.mm__tip { min-height: 3em; padding: 10px 12px; border-radius: 14px; background: rgba(217, 179, 108, 0.08); border: 1px solid rgba(217, 179, 108, 0.22); color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.45; }
:lang(ar) .mm__tip { font-size: 15px; }
.mm__tip.is-on { animation: rise .4s var(--ease) both; }
/* The demo hand that finds the first pair */
.mm-hand { position: absolute; z-index: 3; top: 0; left: 0; display: grid; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(244, 236, 221, 0.95); color: #2A2328; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.7); opacity: 0; transform: translate(var(--x, 0), var(--y, 0)); transition: transform .6s var(--ease), opacity .3s; pointer-events: none; }
.mm-hand .icon { width: 26px; height: 26px; }
.mm-hand.is-on { opacity: 1; }
.mm-hand.is-tap .icon { animation: mm-tap .35s ease; }
@keyframes mm-tap { 50% { transform: scale(.75); } }
.mm__skip { justify-self: center; }

/* Kitchen fire!, Make the call, Stop drop & roll: shared parts */
[data-game="kitchen"], .game-card--kitchen, .gk-ghost { --accent: #A3E635; }
[data-game="call"], .game-card--call { --accent: #2DD4BF; }
[data-game="roll"], .game-card--roll { --accent: #8B9CFF; }
.game-card--lab { --accent: #67E8F9; }
.game-card--all { --accent: var(--gold); border-color: rgba(217, 179, 108, 0.5); background: radial-gradient(180px 140px at 100% 100%, rgba(217, 179, 108, 0.28), transparent 70%), linear-gradient(160deg, #4A1023, #2A0D17); }
[dir="rtl"] .game-card--all { background: radial-gradient(180px 140px at 0% 100%, rgba(217, 179, 108, 0.28), transparent 70%), linear-gradient(200deg, #4A1023, #2A0D17); }
.game-card__go { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--gold-2); font-size: 13px; font-weight: 700; }
.game-card__go .icon { width: 16px; height: 16px; }
.game-card__done { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--safe); font-size: 12.5px; font-weight: 700; }
.game-card__done .icon { width: 15px; height: 15px; }
.game-art--kitchen .icon { animation: jiggle 1.8s ease-in-out infinite; }
.game-art--call .icon { animation: phone-ring 1.8s ease-in-out infinite; }
.game-art--roll .icon { animation: roll-over 2.6s var(--ease) infinite; }
.game-art--lab .icon { animation: walk 2.2s ease-in-out infinite; }
.game-art--all .icon { animation: wobble 2.4s ease-in-out infinite; }
@keyframes jiggle { 0%, 45%, 100% { transform: none; } 10% { transform: rotate(-9deg) translateY(-2px); } 20% { transform: rotate(7deg); } 30% { transform: rotate(-4deg); } }
@keyframes phone-ring { 0%, 50%, 100% { transform: rotate(0); } 5%, 15%, 25% { transform: rotate(-14deg); } 10%, 20%, 30% { transform: rotate(14deg); } }
@keyframes roll-over { 0% { transform: translateX(-5px) rotate(0); } 50% { transform: translateX(5px) rotate(180deg); } 100% { transform: translateX(-5px) rotate(360deg); } }
.games .reveal:nth-child(n+5) { transition-delay: .3s; }

.gk, .gc, .gr { display: grid; gap: 10px; }
.gm-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 700; }
.gm-hud__clock { color: var(--text-3); font-family: var(--font-mono); direction: ltr; }
.gm-hearts { display: inline-flex; gap: 5px; direction: ltr; }
.gm-heart { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F4FDE0, var(--accent) 60%, color-mix(in srgb, var(--accent) 55%, #000)); box-shadow: 0 0 10px -2px var(--accent); transition: all .3s; }
.gm-heart.is-lost { background: var(--surface-3); box-shadow: none; transform: scale(0.8); }
.gm-goal { min-height: 2.6em; font-weight: 700; font-size: 15px; line-height: 1.4; }
:lang(ar) .gm-goal { font-size: 16px; }
.gm-meter { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.gm-bar { position: relative; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; direction: ltr; }
.gm-bar i { position: absolute; inset-block: 0; left: 0; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, #FFD66B, #FF9A3C, #FF6A3C); transition: width .15s linear; }
.gm-flash { position: absolute; z-index: 3; top: 10px; left: 50%; width: max-content; max-width: calc(100% - 20px); padding: 7px 12px; border-radius: 12px; background: rgba(22, 10, 15, 0.92); color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center; transform: translateX(-50%); opacity: 0; pointer-events: none; }
:lang(ar) .gm-flash { font-size: 14px; }
/* inside a scene laid out left to right, Arabic messages and questions still read right to left */
:lang(ar) .gm-flash, :lang(ar) .gm-clear { direction: rtl; }
.gm-flash--bad { color: var(--bad-text); }
.gm-flash--good { color: #BDF5DC; }
.gm-flash.is-on { animation: flash 2.4s ease both; }
.gm-clear { position: absolute; z-index: 4; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 14px; overflow-y: auto; background: rgba(22, 10, 15, 0.9); text-align: center; animation: hero-in .4s var(--ease) both; }
.gm-clear__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #1FAE6E; color: #fff; }
.gm-clear--bad .gm-clear__icon { background: #B8612E; }
.gm-clear__icon .icon { width: 24px; height: 24px; }
.gm-clear__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; word-spacing: .12em; }
.gm-clear__text { max-width: 32ch; color: var(--text-2); font-size: 14px; line-height: 1.45; }
:lang(ar) .gm-clear__text { font-size: 15px; }
.gm-clear .btn { max-width: 280px; }

/* Kitchen fire! */
.gk__scene, .gr__scene { position: relative; width: 100%; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); outline: 3px dashed transparent; outline-offset: -6px; transition: outline-color .2s; }
.gk__scene { max-width: min(100%, calc((100vh - var(--appbar-h) - 400px) * 360 / 260)); max-width: min(100%, calc((100svh - var(--appbar-h) - 400px) * 360 / 260)); min-width: 270px; }
.gk-scene, .gr-scene { display: block; width: 100%; height: auto; aspect-ratio: 360 / 260; }
.gk__scene.is-target { outline-color: var(--accent); }
.gk__scene.is-shake .gk-scene { animation: hit .35s ease; }
.gk-panfire { transform-box: view-box; transform-origin: 180px 146px; transform: scale(var(--pan, 1)); transition: transform .3s var(--ease); }
.gk-ovenfire { transform-box: view-box; transform-origin: 180px 250px; transform: scale(var(--oven, 0)); transition: transform .3s var(--ease); }
.gk-wallfire { transform-box: view-box; transform-origin: 200px 160px; transform: scale(var(--wall, 0)); transition: transform .3s var(--ease); }
.gk-smoke { opacity: var(--smoke, .2); transition: opacity .4s; }
.is-cleared .gk-smoke { opacity: .08; }
.gk-lid { transform-box: view-box; transform: translateY(-160px); transition: transform .55s cubic-bezier(.3, 1.35, .5, 1); }
.is-lid .gk-lid { transform: none; }
.gk-knob__mark { transform-box: view-box; transition: transform .35s var(--ease); }
[data-round="pan"] .gk-knob--pan .gk-knob__mark, [data-round="spread"] .gk-knob--pan .gk-knob__mark, [data-round="oven"] .gk-knob--oven .gk-knob__mark { transform: rotate(130deg); }
.is-heatoff .gk-knob--pan .gk-knob__mark, .is-ovenoff .gk-knob--oven .gk-knob__mark { transform: none; }
.gk-pan { transform-box: view-box; transform-origin: 200px 150px; }
.is-wobble .gk-pan { animation: gk-wobble .6s ease; }
.gk-flare { opacity: 0; transform-box: view-box; transform-origin: 180px 120px; pointer-events: none; }
.is-flare .gk-flare { animation: gk-flare .9s ease-out; }
.is-flare-oven .gk-flare { animation: gk-flare-oven .9s ease-out; }
@keyframes gk-flare { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes gk-flare-oven { 0% { opacity: 0; transform: translateY(105px) scale(.2); } 20% { opacity: 1; transform: translateY(95px) scale(.75); } 100% { opacity: 0; transform: translateY(60px) scale(1.1); } }
@keyframes gk-wobble { 0%, 100% { transform: none; } 25% { transform: translateX(14px) rotate(-6deg); } 60% { transform: translateX(6px) rotate(4deg); } }
.gk__door { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; background: linear-gradient(90deg, #8A5F3F, #70492F); color: rgba(255, 255, 255, 0.3); transform: translateX(-102%); transition: transform .7s var(--ease); }
[dir="rtl"] .gk__door { transform: translateX(102%); }
.is-out .gk__door { transform: none; }
.gk__door .icon { width: 28%; height: 28%; }
.gk__door::after { content: ""; position: absolute; top: 50%; inset-inline-end: 8%; width: 26px; height: 8px; border-radius: 4px; background: var(--gold); }
.gk__call { position: absolute; z-index: 3; inset-inline: 12px; bottom: 12px; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: 14px; background: #1FAE6E; color: #fff; font-weight: 700; opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.is-calling .gk__call { opacity: 1; transform: none; animation: call-pulse 1s ease-in-out infinite alternate; }
@keyframes call-pulse { to { box-shadow: 0 0 0 7px rgba(31, 174, 110, 0.25); } }
.gk__hint { color: var(--text-3); font-size: 12.5px; text-align: center; }
:lang(ar) .gk__hint { font-size: 13.5px; }
.gk__tray { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gk-tool { display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.25; text-align: start; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; animation: deal .35s var(--ease) backwards; transition: transform .15s, border-color .2s, background .2s, opacity .2s; }
.gk-tool:nth-child(2) { animation-delay: .05s; } .gk-tool:nth-child(3) { animation-delay: .1s; } .gk-tool:nth-child(4) { animation-delay: .15s; }
:lang(ar) .gk-tool { font-size: 14.5px; }
.gk-tool:active { transform: scale(0.97); }
.gk-tool__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.gk-tool__icon .icon { width: 20px; height: 20px; }
.gk-tool.is-lifting { border-color: var(--accent); transform: scale(1.03); box-shadow: 0 10px 24px -12px var(--accent); }
.gk-tool.is-used { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.08); }
.gk-tool.is-used .gk-tool__icon { background: var(--safe); color: #062113; }
.gk-tool:disabled { cursor: default; }
.gk-tool:disabled:not(.is-used) { opacity: .38; }
.gk-ghost { position: fixed; z-index: 90; top: 0; left: 0; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--accent); color: #1A0B11; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.7); pointer-events: none; }
.gk-ghost .icon { width: 28px; height: 28px; }

/* Make the call */
.phone { position: relative; display: grid; gap: 10px; width: 100%; max-width: 380px; margin-inline: auto; padding: 10px 12px 16px; overflow: hidden; border-radius: 34px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #1B1218, #0F0A0D); box-shadow: var(--shadow), inset 0 0 0 4px #2A1C23; }
.phone__top { display: grid; justify-items: center; gap: 6px; }
.phone__notch { width: 92px; height: 22px; border-radius: 999px; background: #000; }
.phone__status { color: var(--text-2); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.phone__screen { display: grid; min-height: 92px; }
.phone__dial { display: grid; justify-items: center; align-content: center; gap: 2px; }
.phone__digits { min-height: 46px; color: var(--text); font-family: var(--font-mono); font-size: 34px; letter-spacing: .08em; }
.phone__digits.is-wrong { animation: hit .35s ease; color: #FFC2B5; }
.phone__hint { color: var(--text-3); font-size: 13px; text-align: center; }
.phone__pad { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 10px 16px; padding: 0 10px; }
.phone__key { display: grid; place-items: center; align-content: center; width: 68px; height: 68px; max-width: 100%; padding: 0; border: 0; border-radius: 50%; background: #2B2129; color: var(--text); font: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background .15s, transform .1s; }
.phone__key b { font-size: 27px; font-weight: 500; line-height: 1.05; }
.phone__key small { color: var(--text-3); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.phone__key:active { background: #4A3A45; transform: scale(0.94); }
.phone__key--call { background: #1FAE6E; color: #fff; }
.phone__key--call:active { background: #29C984; }
.phone__key--call .icon { width: 28px; height: 28px; }
.phone__key--del { background: transparent; color: var(--text-2); }
.phone__key--del .icon { width: 26px; height: 26px; }
@media (max-height: 720px) { .phone__key { width: 58px; height: 58px; } .phone__key b { font-size: 24px; } .phone__pad { gap: 8px 16px; } }
/* the call: the number and its timer, the live view, how far through the call you are,
   the operator's words, your last reply; then the replies and the red button */
.call { display: grid; gap: 8px; }
.call__who { display: grid; justify-items: center; text-align: center; }
.call__num { color: var(--text); font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: .03em; }
.call__state { color: var(--text-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.call__view { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 20px; background: #2A1520; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); animation: hero-in .6s var(--ease) both; }
.call__view .t3d { position: absolute; inset: 0; height: 100%; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }
.call__view .t3d__canvas { cursor: default; }
.call__you { font-size: 11px; }
.call__chip { position: absolute; z-index: 2; top: 8px; inset-inline-start: 8px; max-width: 52%; padding: 4px 10px; border-radius: 999px; background: rgba(16, 10, 14, 0.85); color: #BDF5DC; font-size: 12px; font-weight: 700; line-height: 1.3; opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s var(--ease); }
:lang(ar) .call__chip { font-size: 13px; }
.call__chip.is-on { opacity: 1; transform: none; }
/* a blue address plate: zone, street and building numbers (no real numbers shown) */
.call__plate { position: absolute; z-index: 2; inset-inline-end: 8px; bottom: 8px; display: grid; gap: 4px; padding: 6px 8px 7px; border-radius: 8px; border: 2px solid #fff; background: #1D4ED8; color: #fff; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.7); opacity: 0; transform: translateY(10px) scale(.85); transition: opacity .35s, transform .35s var(--ease); }
.call__plate.is-on { opacity: 1; transform: none; }
.call__plate-title { font-size: 10.5px; font-weight: 700; text-align: center; }
:lang(ar) .call__plate-title { font-size: 11.5px; }
.call__plate-row { display: flex; gap: 4px; direction: ltr; }
.call__plate-box { display: grid; justify-items: center; min-width: 44px; padding: 2px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); }
.call__plate-box b { font-family: var(--font-mono); font-size: 15px; line-height: 1.1; }
.call__plate-box small { font-size: 9.5px; font-weight: 700; opacity: .9; }
:lang(ar) .call__plate-box small { font-size: 10.5px; }
.call__steps { display: flex; justify-content: center; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.call__steps li { width: 24px; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .3s; }
.call__steps li.is-now { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); animation: pulse-low .7s ease-in-out infinite alternate; }
.call__steps li.is-done { background: var(--accent); }
.call__op { display: grid; align-content: start; gap: 4px; min-height: 88px; padding: 10px 12px 12px; border-radius: 16px; border-inline-start: 3px solid transparent; background: #2B2129; transition: border-color .25s; }
.call__op.is-fix { border-inline-start-color: var(--work); }
.call__op.is-good { border-inline-start-color: var(--safe); }
.call__opwho { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 11.5px; font-weight: 700; }
:lang(ar) .call__opwho { font-size: 12.5px; }
.call__wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; direction: ltr; }
.call__wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--accent); }
.call__op.is-talking .call__wave i { animation: call-wave .5s ease-in-out infinite alternate; }
.call__wave i:nth-child(2) { animation-delay: .12s !important; } .call__wave i:nth-child(3) { animation-delay: .24s !important; } .call__wave i:nth-child(4) { animation-delay: .06s !important; }
@keyframes call-wave { to { height: 12px; } }
.call__optext { color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.4; transition: opacity .2s; }
:lang(ar) .call__optext { font-size: 17px; }
.call__optext.is-on { animation: rise .35s var(--ease) both; }
.call__op.is-typing .call__optext { opacity: .35; }
.call__op.is-ringing .call__optext { color: var(--text-2); animation: pulse-low .8s ease-in-out infinite alternate; }
.call__me { justify-self: end; max-width: 88%; margin: 0; padding: 7px 12px 8px; border-radius: 16px; border-end-end-radius: 6px; background: color-mix(in srgb, var(--accent) 82%, #000); color: #04201C; font-size: 14px; font-weight: 600; line-height: 1.35; opacity: 0; }
:lang(ar) .call__me { font-size: 15px; }
.call__me:empty { display: none; }
.call__me.is-on { opacity: 1; animation: rise .3s var(--ease) both; }
.call__me.is-wrong { background: #5A3A2E; color: #FFDCCF; }
.call__controls { display: grid; gap: 10px; }
.call__endrow { display: flex; justify-content: center; }
.call__end { display: grid; place-items: center; width: 62px; height: 62px; border: 0; border-radius: 50%; background: #E5484D; color: #fff; cursor: pointer; transition: transform .1s, background .15s; }
.call__end .icon { width: 28px; height: 28px; transform: rotate(135deg); }
.call__end:active { transform: scale(0.94); background: #F2555A; }
.call__end.is-no { animation: hit .35s ease; }
.call__end.is-ready { animation: end-ready 1s ease-in-out infinite alternate; }
@keyframes end-ready { from { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); } to { box-shadow: 0 0 0 12px rgba(229, 72, 77, 0); } }
@media (max-height: 720px) { .call__view { aspect-ratio: 16 / 10; } .call__num { font-size: 24px; } .call__op { min-height: 76px; } .call__end { width: 54px; height: 54px; } }
.phone__choices { display: grid; gap: 8px; }
.phone__choice { min-height: 48px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, #1B1218); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.35; text-align: start; cursor: pointer; animation: rise .3s var(--ease) backwards; }
.phone__choice:nth-child(2) { animation-delay: .06s; } .phone__choice:nth-child(3) { animation-delay: .12s; }
:lang(ar) .phone__choice { font-size: 15.5px; }
.phone__choice:active { transform: scale(0.98); }
.phone__choice:disabled { opacity: .5; }
.phone .gm-flash { top: 40px; }

/* Stop, drop & roll */
.gr__scene { max-width: min(100%, calc((100vh - var(--appbar-h) - 420px) * 360 / 260)); max-width: min(100%, calc((100svh - var(--appbar-h) - 420px) * 360 / 260)); min-width: 260px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.gr__scene.is-hit .gr-scene { animation: hit .35s ease; }
.gr-body { transform-box: view-box; transform-origin: 180px 230px; transition: transform .45s var(--ease); }
.gr-leg { transform-box: fill-box; transform-origin: 50% 0; }
[data-pose="run"] .gr-leg--f { animation: leg .32s ease-in-out infinite alternate; }
[data-pose="run"] .gr-leg--b { animation: leg .32s ease-in-out infinite alternate-reverse; }
[data-pose="run"] .gr-body { animation: bob .16s ease-in-out infinite alternate; }
@keyframes leg { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
[data-pose="drop"] .gr-body, [data-pose="cover"] .gr-body, [data-pose="roll"] .gr-body { transform: translate(75px, -16px) rotate(-90deg); }
.gr-arms-up, .gr-arms-down { transition: opacity .2s; }
.gr-arms-up, [data-pose="cover"] .gr-arms-down, [data-pose="roll"] .gr-arms-down { opacity: 0; }
[data-pose="cover"] .gr-arms-up, [data-pose="roll"] .gr-arms-up { opacity: 1; }
.gr-shadow { transform-box: fill-box; transform-origin: center; transition: transform .45s var(--ease); }
[data-pose="drop"] .gr-shadow, [data-pose="cover"] .gr-shadow, [data-pose="roll"] .gr-shadow { transform: scaleX(2.6); }
.gr-water { opacity: 0; transition: opacity .2s; }
.is-cooling .gr-water { opacity: 1; }
.gr-water .drip { animation: pour .6s linear infinite; }
@keyframes pour { from { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(48px); opacity: .2; } }
.gr-puff { opacity: 0; }
.is-out .gr-puff { animation: puff-out 1.4s ease-out; }
@keyframes puff-out { 0% { opacity: 0; } 20% { opacity: .9; } 100% { opacity: 0; } }
.gr__controls--steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gr-step { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; animation: deal .35s var(--ease) backwards; transition: background .2s, border-color .2s, transform .1s; }
:lang(ar) .gr-step { font-size: 16px; }
.gr-step:nth-child(2) { animation-delay: .05s; } .gr-step:nth-child(3) { animation-delay: .1s; } .gr-step:nth-child(4) { animation-delay: .15s; } .gr-step:nth-child(5) { animation-delay: .2s; }
.gr-step:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gr-step .icon { width: 20px; height: 20px; color: var(--ink, var(--accent)); }
.gr-step:active { transform: scale(0.97); }
.gr-step.is-done { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.1); color: #BDF5DC; }
.gr-step.is-done .icon { color: var(--safe); }
.gr__controls--roll { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; direction: ltr; }
.gr-roll { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 76px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 20px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); font: inherit; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; cursor: pointer; -webkit-user-select: none; user-select: none; animation: deal .3s var(--ease) backwards; transition: transform .08s, background .15s; }
.gr-roll .icon { width: 26px; height: 26px; }
.gr-flip { transform: scaleX(-1); }
.gr-roll:active { transform: scale(0.95); background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.gr__controls--cool { display: grid; gap: 10px; }
.gr-cool__text { padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(66, 169, 245, 0.3); background: rgba(66, 169, 245, 0.1); font-size: 14.5px; font-weight: 600; line-height: 1.45; }
:lang(ar) .gr-cool__text { font-size: 15.5px; }
.gr-cool__btn { position: relative; overflow: hidden; isolation: isolate; touch-action: none; -webkit-touch-callout: none; }
.gr-cool__fill { position: absolute; z-index: -1; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: rgba(66, 169, 245, 0.7); transition: width .1s linear; }
.gr-cool__btn.is-on { filter: brightness(1.12); }
/* Who is on fire: you (blue), a colleague (orange), a visitor (violet) */
[data-who="colleague"] .gr-c1 { stroke: #F59E0B; } [data-who="colleague"] .gr-c1--fill { fill: #F59E0B; stroke: none; } [data-who="colleague"] .gr-c2 { stroke: #B9770A; }
[data-who="visitor"] .gr-c1 { stroke: #A78BFA; } [data-who="visitor"] .gr-c1--fill { fill: #A78BFA; stroke: none; } [data-who="visitor"] .gr-c2 { stroke: #7C5FD6; }
/* The visitor sits in a wheelchair */
.gr-chair { display: none; }
[data-pose="sit"] .gr-chair { display: inline; }
[data-pose="sit"] .gr-leg { display: none; }
[data-pose="sit"] .gr-body { transform: translate(-4px, 14px); }
/* The fire blanket comes down over the flames */
.gr-blanket { opacity: 0; transform: translateY(-70px); transition: transform .55s var(--ease), opacity .3s; }
.is-smother .gr-blanket { opacity: 1; transform: none; }
.gr__controls--choice { display: grid; gap: 8px; }
.gr-choice { min-height: 50px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; animation: deal .3s var(--ease) backwards; transition: background .2s, border-color .2s, opacity .2s; }
:lang(ar) .gr-choice { font-size: 15.5px; }
.gr-choice:nth-child(2) { animation-delay: .06s; } .gr-choice:nth-child(3) { animation-delay: .12s; }
.gr-choice:active { transform: scale(0.98); }
.gr-choice:disabled { cursor: default; }
.gr-choice.is-wrong { opacity: .55; border-color: rgba(255, 179, 168, 0.6); animation: hit .35s ease; }
.gr-choice.is-right { border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.14); }

/* Zap the hazards, Hot door?, Plug it in safely */
[data-game="zap"], .game-card--zap { --accent: #FACC15; }
[data-game="door"], .game-card--door { --accent: #FB923C; }
[data-game="plug"], .game-card--plug { --accent: #38BDF8; }
.game-art--zap .icon { animation: zap-blink 1.6s steps(1, end) infinite; }
.game-art--door .icon { transform-origin: 50% 85%; animation: wobble 2.2s ease-in-out infinite; }
.game-art--plug .icon { animation: plug-in 1.8s var(--ease) infinite; }
@keyframes zap-blink { 0%, 60%, 80% { opacity: 1; } 70%, 90% { opacity: .35; } }
@keyframes plug-in { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
.game-card--all { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; }
.game-card--all .game-art { grid-row: 1 / span 3; }
.game-card--all .game-card__title { margin-top: 0; }
.gm-bar--time i { background: linear-gradient(90deg, #FDE68A, #FACC15); transition: none; }

.zap, .gd, .gp { display: grid; gap: 10px; }
.zap__score { font-family: var(--font-display); font-size: 1.05rem; }
.zap__combo { color: var(--ink, var(--accent)); font-weight: 800; }
.zap__wrap { position: relative; }
.zap__board { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 250px))); max-width: min(100%, calc((100svh - var(--appbar-h) - 250px))); min-width: 270px; margin-inline: auto; padding: 8px; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.08), transparent 60%), #241A29; box-shadow: var(--shadow); }
.zap-spot { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: radial-gradient(circle at 50% 120%, #1A1220 40%, #2F2436 41%); color: var(--text); font: inherit; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.zap-item { position: absolute; inset: 0; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 6px 4px; transform: translateY(105%); transition: transform .18s var(--ease); }
.zap-spot.is-up .zap-item { transform: none; }
.zap-spot.is-hit .zap-item { transform: scale(.4); opacity: 0; transition: transform .25s, opacity .25s; }
.zap-spot.is-wrong { animation: hit .35s ease; }
.zap-spot.is-wrong .zap-item { opacity: 0; transition: opacity .3s .15s; }
.zap-spot.is-gone .zap-item { transform: translateY(105%); }
.zap-spot.is-hit::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 4px solid var(--accent); animation: zap-ring .35s ease-out forwards; }
@keyframes zap-ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.zap-art { width: 62%; height: auto; overflow: visible; }
.zap-item__label { max-width: 100%; color: var(--text); font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
:lang(ar) .zap-item__label { font-size: 12px; line-height: 1.35; }
@media (min-width: 380px) { .zap-item__label { font-size: 12px; } :lang(ar) .zap-item__label { font-size: 13px; } }
.zap-pop { position: absolute; z-index: 2; top: 30%; left: 50%; direction: ltr; color: var(--ink, var(--accent)); font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; transform: translateX(-50%); animation: zap-pop .6s ease-out forwards; pointer-events: none; }
.zap-pop--bad { color: #FFB3A8; }
@keyframes zap-pop { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -24px); } }
.zap-count { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; margin: 0; border-radius: 20px; background: rgba(22, 10, 15, 0.7); color: var(--ink, var(--accent)); font-family: var(--font-display); font-size: 4rem; font-weight: 800; }
.zap-count.is-on { animation: count-pop .5s var(--ease); }
@keyframes count-pop { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.zap__hint { color: var(--text-3); font-size: 13px; text-align: center; }
:lang(ar) .zap__hint { font-size: 14px; }
/* The guide before the countdown: every hazard to tap, every piece of safety equipment to leave */
.zap.is-guide .gm-hud, .zap.is-guide .gm-meter, .zap.is-guide .zap__hint { display: none; }
.zap-guide { position: relative; display: grid; gap: 8px; width: 100%; max-width: 520px; margin-inline: auto; padding: 12px; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.1), transparent 60%), #241A29; box-shadow: var(--shadow); }
.zap-guide__head { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.3; word-spacing: .12em; }
.zap-guide__head:focus { outline: none; }
.zap-guide__head b { margin-inline-start: auto; padding: 1px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 13px; direction: ltr; }
.zap-guide__head--tap b { background: rgba(250, 204, 21, 0.16); color: var(--ink, var(--accent)); }
.zap-guide__head--leave { margin-top: 6px; }
.zap-guide__head--leave b { background: rgba(255, 90, 71, 0.14); color: #FFB3A8; }
.zap-guide__badge { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; }
.zap-guide__head--tap .zap-guide__badge { background: var(--accent); color: #1A0B11; }
.zap-guide__head--leave .zap-guide__badge { background: var(--safe); color: #062113; }
.zap-guide__badge .icon { width: 17px; height: 17px; }
.zap-guide__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.zap-guide__grid--safe { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.zap-guide__item { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px 3px 7px; border-radius: 12px; background: #2F2436; text-align: center; animation: zap-guide-in .45s var(--ease) var(--d, 0s) backwards; }
.zap-guide__item.is-h { box-shadow: inset 0 0 0 1.5px rgba(250, 204, 21, 0.35); }
.zap-guide__item.is-safe { box-shadow: inset 0 0 0 1.5px rgba(52, 211, 153, 0.4); }
.zap-guide__item .zap-art { width: 72%; }
.zap-guide__label { max-width: 100%; color: var(--text); font-size: 10.5px; font-weight: 700; line-height: 1.2; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; overflow-wrap: break-word; }
:lang(ar) .zap-guide__label { font-size: 11.5px; line-height: 1.3; }
@media (min-width: 380px) { .zap-guide__label { font-size: 11px; } :lang(ar) .zap-guide__label { font-size: 12px; } }
@keyframes zap-guide-in { from { opacity: 0; transform: translateY(10px) scale(.7); } }
.zap-guide__item.is-zap { animation: zap-guide-zap .5s ease; }
.zap-guide__item.is-zap::after { content: ""; position: absolute; inset: 10%; border-radius: 50%; border: 3px solid var(--accent); animation: zap-ring .45s ease-out forwards; }
@keyframes zap-guide-zap { 40% { transform: scale(.88); background: rgba(250, 204, 21, 0.25); } }
.zap-guide__item.is-no { animation: hit .35s ease; background: rgba(52, 211, 153, 0.16); }
.zap-guide__pop { position: absolute; z-index: 2; top: 26%; left: 50%; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #1A0B11; font-size: 12px; font-weight: 800; white-space: nowrap; transform: translateX(-50%); animation: zap-pop .9s ease-out forwards; pointer-events: none; }
.is-no .zap-guide__pop { background: var(--safe); color: #062113; }
.zap-guide__hand { position: absolute; z-index: 3; top: 0; left: 0; display: grid; place-items: center; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(244, 236, 221, 0.95); color: #2A2328; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.7); opacity: 0; transform: translate(var(--x, 0), var(--y, 0)); transition: transform .6s var(--ease), opacity .3s; pointer-events: none; }
.zap-guide__hand .icon { width: 24px; height: 24px; }
.zap-guide__hand.is-on { opacity: 1; }
.zap-guide__hand.is-tap .icon { animation: mm-tap .35s ease; }
.zap-guide__hand.is-stop { background: #BDF5DC; }
.zap-guide__go { margin-top: 6px; animation: zap-go 1.6s ease-in-out 2s infinite; }
@keyframes zap-go { 50% { box-shadow: 0 0 0 6px rgba(250, 204, 21, 0.18); } }

/* Hot door? */
.gd__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 400px) * 360 / 280)); max-width: min(100%, calc((100svh - var(--appbar-h) - 400px) * 360 / 280)); min-width: 260px; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.gd-scene { display: block; width: 100%; height: auto; aspect-ratio: 360 / 280; }
.gd__sign { position: absolute; z-index: 1; top: 3.5%; left: 50%; padding: 3px 12px; border-radius: 6px; background: #1E1622; color: var(--gold-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; transform: translateX(-50%); }
:lang(ar) .gd__sign { font-size: 13.5px; }
.gd-panel { transform-box: view-box; transform-origin: 120px 150px; transition: transform .6s var(--ease); }
.is-open .gd-panel { transform: scaleX(.12); }
.gd-heat { opacity: 0; transition: opacity .4s; }
.is-hot.is-felt .gd-heat { animation: heat-glow 1s ease-in-out infinite alternate; }
@keyframes heat-glow { from { opacity: .12; } to { opacity: .32; } }
.gd-burst, .gd-smokeburst { opacity: 0; transform-box: view-box; transform-origin: 180px 150px; pointer-events: none; }
.is-burst .gd-burst { animation: gk-flare 1s ease-out; }
.is-smokeburst .gd-smokeburst { animation: gk-flare 1.2s ease-out; }
.gd-under circle { fill: #B9B1BE; }
.gd-add { opacity: 0; transition: opacity .4s; }
.has-seal .gd-add--seal, .has-signal .gd-add--signal { opacity: 1; }
.has-signal .gd-add--signal { animation: wave 1s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 0 50%; }
@keyframes wave { from { transform: skewY(-4deg); } to { transform: skewY(4deg); } }
.has-seal .gd-under--home { opacity: 0; transition: opacity .6s; }
.gd__hand { position: absolute; z-index: 2; top: 42%; left: 50%; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(244, 236, 221, 0.92); color: #2A2328; transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: opacity .2s, transform .25s var(--ease); pointer-events: none; }
.gd__hand .icon { width: 34px; height: 34px; }
.is-feeling .gd__hand { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: hand-press .7s linear; }
.is-felt .gd__hand { opacity: 0; transition-delay: .6s; }
@keyframes hand-press { from { box-shadow: 0 0 0 0 rgba(244, 236, 221, 0.6); } to { box-shadow: 0 0 0 14px rgba(244, 236, 221, 0); } }
.gd__chip { position: absolute; z-index: 2; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; opacity: 0; transform: translateY(8px); transition: all .3s var(--ease); }
.gd__chip.is-on { opacity: 1; transform: none; }
.gd__chip--hot { background: #FB923C; color: #2A0E05; animation: call-pulse .7s ease-in-out infinite alternate; }
.gd__chip--cool { background: #7DD3FC; color: #082F49; }
.gd__progress { min-height: 1.2em; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 700; text-align: center; }
.gd__progress:empty { display: none; }
.gd__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gd-feel { grid-column: 1 / -1; position: relative; overflow: hidden; isolation: isolate; touch-action: none; -webkit-touch-callout: none; }
.gd-feel__fill { position: absolute; z-index: -1; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: rgba(255, 255, 255, 0.35); }
.gd-choice { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.25; cursor: pointer; transition: transform .1s, background .15s; }
:lang(ar) .gd-choice { font-size: 15.5px; }
.gd-choice .icon { width: 20px; height: 20px; color: var(--ink, var(--accent)); flex: none; }
.gd-choice:active { transform: scale(0.97); }
.gd__actions--trap { grid-template-columns: 1fr 1fr; }
.gd-trap { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; animation: deal .35s var(--ease) backwards; transition: background .2s, border-color .2s; }
:lang(ar) .gd-trap { font-size: 14.5px; }
.gd-trap:nth-child(2) { animation-delay: .05s; } .gd-trap:nth-child(3) { animation-delay: .1s; } .gd-trap:nth-child(4) { animation-delay: .15s; } .gd-trap:nth-child(5) { animation-delay: .2s; } .gd-trap:nth-child(6) { animation-delay: .25s; }
.gd-trap__tick { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); color: transparent; }
.gd-trap__tick .icon { width: 14px; height: 14px; }
.gd-trap.is-done { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.1); }
.gd-trap.is-done .gd-trap__tick { border-color: var(--safe); background: var(--safe); color: #062113; }
.gd-trap.is-wrong { animation: hit .35s ease; border-color: rgba(255, 179, 168, 0.6); }

/* Plug it in safely */
.gp__board { display: grid; gap: 12px; padding: 14px 12px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, #3A2E40, #30263A); box-shadow: var(--shadow); }
.gp__board.is-spark { animation: hit .35s ease; }
.gp__wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gp-slot { display: grid; justify-items: center; gap: 4px; }
.gp-slot__label { color: var(--text-3); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.25; }
:lang(ar) .gp-slot__label { font-size: 12.5px; }
.gp-socket { position: relative; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; transition: border-color .2s, transform .1s; }
.gp-socket:active { transform: scale(0.95); }
.gp-plate { width: 100%; height: 100%; }
.gp-socket.is-ready { border-color: var(--accent); border-style: dashed; }
.gp-socket__dev { position: absolute; inset: 8%; display: grid; place-items: center; border-radius: 12px; background: #2A2328; color: var(--ink, var(--accent)); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.7); animation: deal .25s var(--ease) backwards; }
.gp-socket__dev .icon { width: 55%; height: 55%; }
.gp-socket--static { cursor: default; opacity: .75; }
.gp-socket--static .gp-socket__dev { color: var(--text-3); }
.gp-socket.is-wrong .gp-socket__dev { background: #5A3A2E; color: #FFC2B5; }
.gp-socket.is-on .gp-socket__dev, .gp__board.is-on .gp-socket__dev { color: #BDF5DC; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.5), 0 0 18px rgba(52, 211, 153, 0.5); }
.gp-spark { position: absolute; z-index: 1; top: -8px; inset-inline-end: -8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #FACC15; color: #3A2A05; animation: zap-blink .5s steps(1, end) 3; }
.gp-spark .icon { width: 16px; height: 16px; }
.gp__stripwrap { display: grid; gap: 6px; }
.gp__striplabel { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; font-weight: 700; }
:lang(ar) .gp__striplabel { font-size: 13px; }
.gp__striplabel .icon { width: 18px; height: 18px; }
.gp__strip { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; gap: 4px; padding: 8px; border-radius: 16px; background: #EDE7DF; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.gp__strip .gp-socket { width: 58px; height: 58px; }
.gp__strip .gp-plate rect:first-child { stroke: none; fill: #E2DAD0; }
.gp__bin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gp-bin__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 2px dashed var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, 0.15); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.gp-bin__btn .icon { width: 18px; height: 18px; }
.gp-bin__btn.is-ready { border-color: var(--accent); color: var(--text); }
.gp-binned { padding: 0; border: 0; background: none; cursor: pointer; }
.gp-binned.is-wrong .gp-dev { border-color: rgba(255, 179, 168, 0.6); background: #5A3A2E; }
.gp__tray { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.gp-pick { padding: 0; border: 0; background: none; cursor: pointer; animation: deal .3s var(--ease) backwards; }
.gp-dev { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700; line-height: 1.2; text-align: start; transition: transform .15s, border-color .2s, box-shadow .2s; }
[dir="rtl"] .gp-dev { padding: 6px 6px 6px 12px; }
:lang(ar) .gp-dev { font-size: 14.5px; }
.gp-dev__icon { position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink, var(--accent)); }
.gp-dev__icon .icon { width: 19px; height: 19px; }
.gp-dev__badge { position: absolute; top: -5px; inset-inline-end: -5px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #FACC15; color: #3A2A05; }
.gp-dev__badge .icon { width: 11px; height: 11px; }
.gp-pick.is-picked .gp-dev { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); transform: translateY(-3px); }
.gp-pick:active .gp-dev { transform: scale(0.97); }
.gp-binned .gp-dev { min-height: 40px; font-size: 12.5px; opacity: .85; }
.gp__empty { color: var(--text-3); font-size: 13px; }
.gp__feedback:empty { display: none; }
.gp__feedback { padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.07); }
.gp__feedback.is-ok { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.gp-bad__title { margin-bottom: 6px; font-weight: 800; }
.gp-bad { display: grid; gap: 6px; }
.gp-bad li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; }
:lang(ar) .gp-bad li { font-size: 15px; }
.gp-bad .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: #FACC15; }
.gp-ok { display: flex; align-items: center; gap: 8px; color: #BDF5DC; font-weight: 800; }
.gp-ok .icon { color: var(--safe); }
.gp__go:disabled { opacity: .45; }

/* Which extinguisher? */
[data-game="pick"], .game-card--pick { --accent: #F87171; }
.game-art--pick .icon { transform-origin: 50% 100%; animation: wobble 2.6s ease-in-out infinite; }
.gx { display: grid; gap: 10px; }
.gx__alarm { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: rgba(248, 113, 113, 0.16); color: #FFC2B5; font-size: 12px; }
:lang(ar) .gx__alarm { font-size: 13px; }
.gx__alarm .icon { width: 14px; height: 14px; animation: ring 2.4s ease-in-out infinite; }
.gx__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 390px) * 360 / 220)); max-width: min(100%, calc((100svh - var(--appbar-h) - 390px) * 360 / 220)); min-width: 260px; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; }
.gx-scene { display: block; width: 100%; height: auto; aspect-ratio: 360 / 220; transition: filter .6s; }
.gx-fire { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .9s var(--ease) .25s, opacity .9s ease .25s; }
.is-out .gx-fire, .is-out .gx-spark, .is-out .gx-smoke { transform: scale(0); opacity: 0; }
.is-flare .gx-fire { animation: gx-flare .6s ease; }
.gx-spark { animation: zap-blink .5s steps(1, end) infinite; }
.gx-spark--b { animation-delay: -.25s; }
.gx-smoke { transition: opacity .8s; }
.gx-smoke circle { fill: #8E8792; opacity: .8; }
.gx-smoke--top circle { fill: #7E7783; }
.gx-spray { color: var(--spray, #fff); opacity: 0; pointer-events: none; }
.is-out .gx-spray { animation: gx-spray 1.3s ease-out; }
.gx-out { opacity: 0; }
.gx-out circle { fill: #CFC8D3; }
.is-out .gx-out { animation: puff-out 1.6s ease-out .5s; }
.is-left .gx-scene { filter: brightness(.45) saturate(.6); }
.gx__ask { color: var(--text-3); font-size: 12.5px; font-weight: 700; }
:lang(ar) .gx__ask { font-size: 13.5px; }
.gx__kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gx__kit--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gx-ext { display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 96px; padding: 8px 6px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; animation: deal .3s var(--ease) backwards; transition: transform .1s, border-color .2s, background .2s, opacity .2s; }
:lang(ar) .gx-ext { font-size: 14.5px; }
.gx-ext:nth-child(2) { animation-delay: .06s; } .gx-ext:nth-child(3) { animation-delay: .12s; }
.gx-ext:active { transform: scale(0.96); }
.gx-cyl { width: 40px; height: 60px; }
.gx-ext.is-wrong { animation: hit .35s ease; border-color: rgba(255, 179, 168, 0.6); background: rgba(255, 120, 100, 0.08); opacity: .55; }
.gx-ext.is-right { border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.12); }
.gx-ext:disabled:not(.is-right):not(.is-wrong) { opacity: .5; }
.gx-leave { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px 12px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 16px; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
:lang(ar) .gx-leave { font-size: 15.5px; }
.gx-leave .icon { width: 20px; height: 20px; color: var(--ink, var(--accent)); }
.gx-leave:active { transform: scale(0.98); }
.gx-leave:disabled { opacity: .5; }
@keyframes gx-flare { 0%, 100% { transform: none; } 40% { transform: scale(1.25, 1.35); } }
@keyframes gx-spray { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }
.game-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; }
.game-card--wide .game-art { grid-row: 1 / span 3; }
.game-card--wide .game-card__title { margin-top: 0; }
.game-card--wide > :not(.game-art) { justify-self: start; }

/* To the assembly point (played on the tower in 3D) */
[data-game="meet"], .game-card--meet { --accent: #34D399; }
.game-art--meet .icon { animation: bob .9s ease-in-out infinite alternate; }
.gt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gt__scene { position: relative; }
.gt .gm-goal { min-height: 2.8em; }
.gt__scene.is-hit .t3d { animation: hit .35s ease; }
.t3d--game { aspect-ratio: auto; max-height: none; height: clamp(280px, calc(100vh - 330px), 560px); height: clamp(280px, calc(100svh - 330px), 560px); }
.t3d--game .t3d__canvas { touch-action: manipulation; cursor: pointer; }
.t3d__tag--you { padding: 3px 9px 3px 6px; background: #2DD4BF; color: #062A26; box-shadow: 0 6px 16px -6px rgba(45, 212, 191, 0.8); }
[dir="rtl"] .t3d__tag--you { padding: 3px 6px 3px 9px; }
.t3d__tag--you .icon, .t3d__tag--engine .icon { width: 14px; height: 14px; }
.t3d__tag--engine { padding: 3px 9px 3px 6px; background: #DC2626; color: #fff; }
[dir="rtl"] .t3d__tag--engine { padding: 3px 6px 3px 9px; }
.gt .t3d--game { height: clamp(250px, calc(100vh - 440px), 520px); height: clamp(250px, calc(100svh - 440px), 520px); }
.gt__scene { touch-action: none; -webkit-user-select: none; user-select: none; }
.gt__scene .t3d__canvas { touch-action: none; }
.gt__scene.is-bump .t3d { animation: bump .2s ease; }
@keyframes bump { 40% { transform: scale(0.992); } }
.t3d__tag--guest { padding: 3px 9px 3px 6px; background: #B794F6; color: #1F0B3A; }
[dir="rtl"] .t3d__tag--guest { padding: 3px 6px 3px 9px; }
.t3d__tag--guest .icon { width: 14px; height: 14px; }
/* under the view: how far to your point and the visitors with you, then the arrows */
.gt__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.gt__chips { display: grid; gap: 6px; }
.gt__chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700; line-height: 1.25; }
:lang(ar) .gt__chip { font-size: 14.5px; }
.gt__chip .icon { flex: none; width: 17px; height: 17px; color: #34D399; }
.gt__chip--guest .icon { color: #B794F6; }
.gt__pad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-areas: ". up ." "left down right"; gap: 6px; direction: ltr; }
.gt__pad-btn { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); touch-action: manipulation; -webkit-user-select: none; user-select: none; cursor: pointer; }
.gt__pad-btn:active { background: var(--surface-3); transform: scale(0.95); }
.gt__pad-btn .icon { width: 22px; height: 22px; }
.gt__pad-btn--up { grid-area: up; border-color: rgba(52, 211, 153, 0.55); background: rgba(52, 211, 153, 0.12); }
.gt__pad-btn--down { grid-area: down; } .gt__pad-btn--left { grid-area: left; } .gt__pad-btn--right { grid-area: right; }
.gt__pad-btn--left .icon { transform: scaleX(-1); }
.gt-q__list { display: grid; gap: 8px; width: 100%; max-width: 320px; }
.gt-q__btn { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; animation: deal .3s var(--ease) backwards; transition: background .2s, border-color .2s, opacity .2s; }
:lang(ar) .gt-q__btn { font-size: 15.5px; }
.gt-q__btn:nth-child(2) { animation-delay: .06s; } .gt-q__btn:nth-child(3) { animation-delay: .12s; }
.gt-q__btn:active { transform: scale(0.98); }
.gt-q__btn.is-wrong { opacity: .55; border-color: rgba(255, 179, 168, 0.6); animation: hit .35s ease; }
.gt-q__btn.is-right { border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.14); }
.gt-q__fb.is-bad { color: var(--bad-text); }

/* Safety quiz show, Car fire!, Home escape plan */
[data-game="quiz"], .game-card--quiz { --accent: #F472B6; }
[data-game="car"], .game-card--car { --accent: #60A5FA; }
[data-game="plan"], .game-card--plan { --accent: #A78BFA; }
.game-art--quiz .icon { animation: quiz-glow 1.8s ease-in-out infinite; }
.game-art--car .icon { animation: car-drive 1.6s ease-in-out infinite; }
.game-art--plan .icon { animation: bob .9s ease-in-out infinite alternate; }
@keyframes quiz-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12) rotate(-6deg); } }
@keyframes car-drive { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px) translateY(-1px); } }

.qz, .gcar, .gplan { display: grid; gap: 10px; }
.qz__streak { color: var(--ink, var(--accent)); font-weight: 800; }
.qz__streak.is-hot { animation: wobble 1s ease-in-out infinite; }
.qz__points { font-family: var(--font-display); }
.qz__ladder { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.qz__step { height: 6px; border-radius: 3px; background: var(--surface-3); transition: background .3s; }
.qz__step.is-now { background: color-mix(in srgb, var(--accent) 50%, var(--surface-3)); animation: pulse-low .7s ease-in-out infinite alternate; }
.qz__step.is-right { background: var(--safe); }
.qz__step.is-wrong { background: var(--danger); }
/* the question card, with a row of show lights along its top */
.qz__card { position: relative; overflow: hidden; padding: 20px 16px 16px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: radial-gradient(280px 170px at 50% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%), var(--surface); box-shadow: var(--shadow); }
.qz__card::before { content: ""; position: absolute; inset: 7px 12px auto; height: 6px; background: radial-gradient(circle, #FDE68A 0 2px, transparent 3px) 0 0 / 14px 6px repeat-x; opacity: .8; animation: qz-lights 1s steps(2, end) infinite; }
@keyframes qz-lights { 50% { background-position: 7px 0; } }
.qz__card.is-shake { animation: hit .35s ease; }
.qz__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "topic clock" "q clock"; gap: 6px 12px; align-items: start; animation: rise .35s var(--ease) both; }
.qz__topic { grid-area: topic; display: inline-flex; align-items: center; gap: 6px; color: var(--ink, var(--accent)); font-size: 12.5px; font-weight: 700; }
:lang(ar) .qz__topic { font-size: 13.5px; }
.qz__topic .icon { width: 15px; height: 15px; }
.qz__q { grid-area: q; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.4; word-spacing: .12em; }
.qz__q:focus { outline: none; }
.qz__clock { grid-area: clock; position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--accent) var(--p, 100%), var(--surface-3) 0); }
.qz__clock::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.qz__clock.is-low { background: conic-gradient(var(--danger) var(--p, 100%), var(--surface-3) 0); animation: pulse-low .4s ease-in-out infinite alternate; }
.qz__secs { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 18px; font-weight: 700; }
.qz__answers { display: grid; gap: 8px; }
.qz__a { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.35; text-align: start; cursor: pointer; animation: deal .35s var(--ease) var(--d, 0s) backwards; transition: background .2s, border-color .2s, opacity .3s; }
:lang(ar) .qz__a { font-size: 16px; }
.qz__a b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink, var(--accent)); font-size: 14px; }
.qz__a:active { transform: scale(0.98); }
.qz__a:disabled { cursor: default; }
.qz__a.is-right { border-color: rgba(52, 211, 153, 0.7); background: rgba(52, 211, 153, 0.16); }
.qz__a.is-right b { background: var(--safe); color: #062113; }
.qz__a.is-wrong { border-color: rgba(255, 90, 71, 0.6); background: rgba(255, 90, 71, 0.12); animation: hit .35s ease; }
.qz__a.is-gone { opacity: .25; }
.qz__pop { position: absolute; top: 50%; inset-inline-end: 12px; color: var(--safe); font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; transform: translateY(-50%); animation: zap-pop .9s ease-out forwards; direction: ltr; pointer-events: none; }
.qz__hint { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.1); font-size: 14px; font-weight: 600; }
.qz__hint .icon { flex: none; margin-top: 2px; color: #FACC15; }
.qz__why { display: grid; gap: 2px; font-size: 14.5px; line-height: 1.45; }
:lang(ar) .qz__why { font-size: 15.5px; }
.qz__why.is-right, .qz__why.is-wrong { padding: 10px 12px; border-radius: 14px; border-inline-start: 3px solid; animation: rise .3s var(--ease) both; }
.qz__why.is-right { border-color: var(--safe); background: rgba(52, 211, 153, 0.08); }
.qz__why.is-wrong { border-color: var(--danger); background: rgba(255, 90, 71, 0.08); }
.qz__why b { font-size: 15px; }
.qz__lifes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz__life { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 10px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 14px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
:lang(ar) .qz__life { font-size: 14.5px; }
.qz__life b { color: var(--ink, var(--accent)); font-family: var(--font-mono); }
.qz__life .icon { width: 18px; height: 18px; color: var(--ink, var(--accent)); }
.qz__life:disabled { opacity: .4; text-decoration: line-through; cursor: default; }
.qz__burst { position: absolute; inset: 0; pointer-events: none; }
.qz__burst i { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: rotate(var(--a)) translateX(0); animation: qz-burst .8s ease-out forwards; }
.qz__burst i:nth-child(odd) { background: var(--gold); }
@keyframes qz-burst { to { transform: rotate(var(--a)) translateX(130px); opacity: 0; } }

.gcar__scene, .gplan__scene { position: relative; width: 100%; margin-inline: auto; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; }
.gcar__scene { max-width: min(100%, calc((100vh - var(--appbar-h) - 330px) * 360 / 480)); max-width: min(100%, calc((100svh - var(--appbar-h) - 330px) * 360 / 480)); min-width: 250px; touch-action: pan-y; }
.gcar__scene.is-hit .gcar__canvas, .gplan__scene.is-hit .gplan__canvas { animation: hit .35s ease; }
.gcar__canvas { display: block; width: 100%; height: auto; aspect-ratio: 360 / 480; }
.gcar__controls { display: grid; gap: 8px; }
.gcar__row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 8px; direction: ltr; }
.gcar__btn { display: grid; place-items: center; min-height: 52px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.gcar__btn:active { transform: scale(0.96); background: var(--surface-3); }
.gcar__lane .icon { width: 24px; height: 24px; }
.gcar__lane--left .icon { transform: scaleX(-1); }
.gcar__sig { display: flex; align-items: center; justify-content: center; gap: 10px; }
.gcar__blinker { width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid #7A6A45; }
.gcar__sig.is-on { border-color: #FBBF24; background: rgba(251, 191, 36, 0.14); }
.gcar__sig.is-on .gcar__blinker { border-left-color: #FBBF24; animation: zap-blink .66s steps(1, end) infinite; }
.gcar__stop.is-ready { animation: zap-go 1.2s ease-in-out infinite; }
.gcar__steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gcar__step { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; animation: deal .3s var(--ease) backwards; transition: background .2s, border-color .2s, opacity .2s; }
:lang(ar) .gcar__step { font-size: 14.5px; }
.gcar__step .icon { flex: none; width: 20px; height: 20px; color: var(--ink, var(--accent)); }
.gcar__step:active { transform: scale(0.98); }
.gcar__step.is-done { border-color: rgba(52, 211, 153, 0.6); background: rgba(52, 211, 153, 0.14); }
.gcar__step.is-done .icon { color: var(--safe); }
.gcar__step.is-wrong { opacity: .5; border-color: rgba(255, 90, 71, 0.6); animation: hit .35s ease; }

.gplan__alarm { display: inline-flex; align-items: center; gap: 6px; color: #FFB3A8; font-size: 13px; }
.gplan__alarm .icon { width: 16px; height: 16px; animation: phone-ring 1.2s ease-in-out infinite; }
.gplan__scene { max-width: min(100%, calc((100vh - var(--appbar-h) - 330px) * 340 / 476)); max-width: min(100%, calc((100svh - var(--appbar-h) - 330px) * 340 / 476)); min-width: 240px; }
.gplan__canvas { display: block; width: 100%; height: auto; aspect-ratio: 340 / 476; touch-action: none; cursor: crosshair; }
.gplan__undo { justify-self: start; }
.gplan__family { display: flex; justify-content: center; gap: 10px; transition: opacity .3s; }
.gplan__who { display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; animation: deal .35s var(--ease) backwards; }
.gplan__who .icon { width: 26px; height: 26px; }
.gplan__who--0 { color: #F472B6; }
.gplan__who--1 { color: #60A5FA; }
.gplan__who--2 { color: #FACC15; }
.gplan__who.is-counted { border-color: var(--safe); background: rgba(52, 211, 153, 0.16); }
.gplan__who--missing { border-style: dashed; color: var(--text-3); font-size: 22px; cursor: default; }
.gplan__meet.is-q .gplan__family { opacity: .55; }
.gplan .gt-q__fb.is-bad { color: var(--bad-text); }

/* Battery check: a room from above, things on charge to tap, what to do below */
[data-game="battery"], .game-card--battery { --accent: #34D399; }
[data-game="pack"], .game-card--pack { --accent: #F59E0B; }
.game-art--battery .icon { animation: bat-charge 1.6s ease-in-out infinite; }
.game-art--pack .icon { animation: pack-drop 1.3s ease-in-out infinite; }
@keyframes bat-charge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes pack-drop { 0% { transform: translateY(-5px) rotate(-6deg); } 55% { transform: translateY(2px); } 70% { transform: translateY(0) scale(1.06, .94); } 100% { transform: translateY(-5px) rotate(-6deg); } }
.gbat, .gpack { display: grid; gap: 10px; }
.gbat__fixed { color: var(--ink, var(--accent)); font-size: 13.5px; font-weight: 800; }
.gm-hud__clock.is-low { color: #FFB3A8; animation: pulse-low .5s ease-in-out infinite alternate; }
.gbat__scene { position: relative; direction: ltr; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 372px) * 340 / 420)); max-width: min(100%, calc((100svh - var(--appbar-h) - 372px) * 340 / 420)); min-width: 228px; margin-inline: auto; aspect-ratio: 340 / 420; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; }
.gbat__room { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.gbat__layer { position: absolute; inset: 0; }
.gbat__item { position: absolute; left: var(--x); top: var(--y); width: 19%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 16px; background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%); transform: translate(-50%, -50%); cursor: pointer; transition: left .7s var(--ease), top .7s var(--ease), transform .4s var(--ease), opacity .4s; }
.gbat__art { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); pointer-events: none; }
.gbat__item.is-shake .gbat__art { animation: hit .35s ease; }
.gbat__bolt { position: absolute; top: -4%; right: -4%; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 50%; background: #FBBF24; color: #3B2A05; box-shadow: 0 0 0 2px rgba(22, 10, 15, 0.5); animation: pulse-low .8s ease-in-out infinite alternate; transition: transform .3s, opacity .3s, background .3s; }
.gbat__bolt .icon { width: 64%; height: 64%; }
.gbat__item.is-unplug .gbat__bolt, .gbat__item.is-recycle .gbat__bolt { opacity: 0; transform: translate(40%, -60%) rotate(40deg) scale(.4); }
.gbat__item.is-charger .gbat__bolt, .gbat__item.is-fine .gbat__bolt { background: var(--safe); animation: none; }
.gbat__item.is-recycle { transform: translate(-50%, -50%) scale(.35); opacity: 0; transition: left .6s var(--ease), top .6s var(--ease), transform .5s var(--ease) .55s, opacity .4s .7s; }
.gbat__item::after { content: ""; position: absolute; inset: -9%; border-radius: 18px; border: 3px solid transparent; pointer-events: none; }
.gbat__item.is-picked::after { border-color: var(--accent); box-shadow: 0 0 16px rgba(52, 211, 153, 0.6); animation: pulse-low .6s ease-in-out infinite alternate; }
.gbat__item.is-missed::after { border-color: var(--danger); box-shadow: 0 0 16px rgba(255, 90, 71, 0.6); }
.gbat__ok { position: absolute; bottom: -6%; left: -6%; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--safe); color: #062113; box-shadow: 0 0 0 2px rgba(22, 10, 15, 0.5); animation: deal .3s var(--ease) both; }
.gbat__ok .icon { width: 66%; height: 66%; }
.gbat__sheet { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.gbat__what { min-height: 2.7em; margin: 0; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.35; }
:lang(ar) .gbat__what { font-size: 15px; }
.gbat__what.is-good { color: var(--good-text); }
.gbat__acts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.gbat__act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 5px 2px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; cursor: pointer; }
:lang(ar) .gbat__act { font-size: 13px; }
.gbat__act .icon { width: 20px; height: 20px; color: var(--ink, var(--accent)); }
.gbat__act:disabled { opacity: .45; cursor: default; }
.gbat__act:active:not(:disabled) { transform: scale(0.96); background: var(--surface-3); }
/* Pack the car: the desert road and your car's open boot (sizes as Car fire!) */
.gpack__canvas { touch-action: none; cursor: ew-resize; }
.gpack__pad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; direction: ltr; }
.gpack__move { min-height: 56px; touch-action: none; }
.gpack__move .icon { width: 26px; height: 26px; }
.gpack__move--left .icon { transform: scaleX(-1); }

/* Fire triangle: a fire, the triangle it needs, and three things you could do */
[data-game="triangle"], .game-card--triangle { --accent: #FB923C; }
.game-art--triangle .icon { animation: tri-pulse 1.4s ease-in-out infinite; }
@keyframes tri-pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.1) rotate(-5deg); } }
.gtri { display: grid; gap: 10px; }
.gtri__points { display: inline-flex; align-items: baseline; gap: 6px; }
.gtri__pts { color: var(--ink, var(--accent)); font-family: var(--font-display); }
.gtri__streak { color: #FDE68A; font-size: 12.5px; font-weight: 800; }
.gtri__streak.is-hot { animation: wobble 1s ease-in-out infinite; }
.gtri__scene { position: relative; direction: ltr; width: 100%; aspect-ratio: 320 / 200; max-height: 28vh; max-height: 28svh; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; }
.gtri__scene.is-hit { animation: hit .35s ease; }
.gtri__pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.gtri__flame { position: absolute; left: var(--x); top: var(--y); width: calc(17% * var(--k, 1)); aspect-ratio: 60 / 80; transform: translate(-50%, -70%); pointer-events: none; }
.gtri__fire { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 10px rgba(255, 120, 60, 0.85)); transform-origin: 50% 100%; transition: transform .6s var(--ease), opacity .6s; }
.gtri__tongue { transform-box: fill-box; transform-origin: 50% 100%; animation: tri-flicker .5s ease-in-out infinite alternate; }
.gtri__tongue--1 { animation-duration: .4s; animation-delay: -.2s; }
.gtri__tongue--2 { animation-duration: .3s; animation-delay: -.1s; }
@keyframes tri-flicker { from { transform: scale(1, 1) skewX(0); } to { transform: scale(.93, 1.09) skewX(3deg); } }
.gtri__flame.is-flare .gtri__fire { animation: tri-flare .7s ease; }
@keyframes tri-flare { 35% { transform: scale(1.75); } }
.gtri__flame.is-out .gtri__fire { transform: scale(.05); opacity: 0; }
.gtri__puff { position: absolute; left: 50%; bottom: 10%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(205, 205, 215, 0.85), rgba(160, 160, 170, 0) 70%); opacity: 0; transform: translate(-50%, 0) scale(0); }
.gtri__flame.is-out .gtri__puff { animation: tri-puff 1.4s ease-out forwards; }
@keyframes tri-puff { 0% { opacity: .9; transform: translate(-50%, 0) scale(.3); } 100% { opacity: 0; transform: translate(-50%, -120%) scale(2.2); } }
.gtri__row { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 10px; }
.gtri__triangle { position: relative; direction: ltr; width: 136px; height: 98px; }
.gtri__tri { position: absolute; top: 4px; left: 28px; width: 80px; height: 72px; overflow: visible; }
.gtri__side { fill: none; stroke-width: 8; stroke-linecap: round; transform-box: fill-box; transform-origin: center; transition: transform .6s var(--ease), opacity .6s; }
.gtri__side--heat { stroke: #EF4444; }
.gtri__side--air { stroke: #60A5FA; }
.gtri__side--fuel { stroke: #F59E0B; }
.gtri__side.is-gone { opacity: 0; transform: translateY(16px) rotate(24deg); }
.gtri__core { fill: #FB923C; transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s, opacity .5s; animation: tri-flicker .45s ease-in-out infinite alternate; }
.gtri__triangle.is-broken .gtri__core { opacity: .15; transform: scale(.55); animation: none; }
.gtri__label { position: absolute; padding: 2px 5px; border-radius: 6px; background: rgba(22, 10, 15, 0.75); font-size: 11px; font-weight: 800; line-height: 1.1; }
:lang(ar) .gtri__label { font-size: 12px; }
.gtri__label--heat { top: 30px; left: 0; color: #FCA5A5; }
.gtri__label--air { top: 30px; right: 0; color: #93C5FD; }
.gtri__label--fuel { bottom: 0; left: 50%; transform: translateX(-50%); color: #FCD34D; }
.gtri__q { margin: 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.35; }
:lang(ar) .gtri__q { font-size: 16px; }
.gtri__hint { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; }
:lang(ar) .gtri__hint { font-size: 13.5px; }
.gtri__tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gtri__tool { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 88px; padding: 10px 6px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; animation: deal .3s var(--ease) backwards; }
:lang(ar) .gtri__tool { font-size: 13.5px; }
.gtri__tool .icon { flex: none; width: 26px; height: 26px; color: var(--ink, var(--accent)); }
.gtri__tool:active:not(:disabled) { transform: scale(0.97); background: var(--surface-3); }
.gtri__tool:disabled { cursor: default; }
.gtri__tool.is-wrong { opacity: .5; border-color: rgba(255, 90, 71, 0.6); }
.gtri__tool.is-right { border-color: rgba(52, 211, 153, 0.7); background: rgba(52, 211, 153, 0.14); opacity: 1; }
.gtri__tool.is-right .icon { color: var(--safe); }
.gtri__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
:lang(ar) .gtri__fb { font-size: 15px; }
.gtri__fb.is-good { color: var(--good-text); }
.gtri__fb.is-bad { color: var(--bad-text); }
.gtri__next { justify-self: center; min-width: 60%; }
@media (max-height: 720px) {
  .gtri { gap: 8px; }
  .gtri__scene { max-height: 22vh; max-height: 22svh; }
  .gtri__tool { min-height: 72px; padding: 7px 4px; gap: 4px; }
  .gtri__tool .icon { width: 22px; height: 22px; }
  .gtri__fb { min-height: 2.4em; font-size: 13.5px; }
}

/* Desert camp: a plan from above with spots to tap */
[data-game="camp"], .game-card--camp { --accent: #FBBF24; }
.game-art--camp .icon { animation: bob .9s ease-in-out infinite alternate; }
.gcamp { display: grid; gap: 10px; }
.gcamp__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
:lang(ar) .gcamp__fb { font-size: 15px; }
.gcamp__fb.is-good { color: var(--good-text); }
.gcamp__fb.is-bad { color: var(--bad-text); }
.gcamp__wind-tag { display: inline-flex; align-items: center; gap: 5px; color: #FDE68A; font-size: 12.5px; font-weight: 700; }
.gcamp__wind-tag .icon { width: 16px; height: 16px; animation: car-drive 1.6s ease-in-out infinite; }
.gcamp__scene { position: relative; direction: ltr; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 330px) * 340 / 300)); max-width: min(100%, calc((100svh - var(--appbar-h) - 330px) * 340 / 300)); min-width: 250px; margin-inline: auto; aspect-ratio: 340 / 300; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* at night the map gets smaller on short screens, to make room for the questions */
.gcamp__scene { transition: max-width .6s var(--ease); }
.gcamp.is-night .gcamp__scene { max-width: min(100%, calc((100vh - var(--appbar-h) - 450px) * 340 / 300)); max-width: min(100%, calc((100svh - var(--appbar-h) - 450px) * 340 / 300)); min-width: 200px; }
.gcamp__map { display: block; width: 100%; height: 100%; }
.gcamp__dark { opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.gcamp__scene.is-night .gcamp__dark { opacity: .55; }
.gcamp__glow { opacity: .85; transform-box: fill-box; transform-origin: center; transition: opacity .8s, transform .8s; }
.gcamp__scene.is-night .gcamp__glow { opacity: 1; transform: scale(1.35); }
.gcamp__flame { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .8s; animation: tri-flicker .4s ease-in-out infinite alternate; }
.gcamp__scene.is-out .gcamp__flame, .gcamp__scene.is-out .gcamp__glow { opacity: 0; }
.gcamp__wind path { animation: gcamp-wind 1.6s ease-in-out infinite; }
.gcamp__scene.is-windy .gcamp__wind path { stroke-width: 3.5; animation-duration: .6s; }
@keyframes gcamp-wind { 0%, 100% { opacity: .7; transform: translateX(0); } 50% { opacity: 1; transform: translateX(8px); } }
.gcamp__smell { position: absolute; top: 36%; left: 53.5%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(190, 242, 100, 0.65), rgba(190, 242, 100, 0) 70%); opacity: 0; transform: translate(-50%, -50%); pointer-events: none; }
.gcamp__scene.is-gas .gcamp__smell { opacity: 1; animation: pulse-low .8s ease-in-out infinite alternate; }
.gcamp__layer { position: absolute; inset: 0; }
.gcamp__spot { position: absolute; left: var(--x); top: var(--y); display: grid; place-items: center; width: 12%; min-width: 44px; aspect-ratio: 1; padding: 0; border: 2.5px dashed rgba(255, 255, 255, 0.95); border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #FFF; transform: translate(-50%, -50%); cursor: pointer; animation: pulse-low .9s ease-in-out infinite alternate; }
.gcamp__spot b { font-size: 15px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.gcamp__spot.is-no { border-color: var(--danger); background: rgba(255, 90, 71, 0.3); opacity: .6; animation: none; }
.gcamp__spot.is-yes { border-color: var(--safe); background: rgba(52, 211, 153, 0.3); animation: none; }
.gcamp__q { margin: 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.35; }
:lang(ar) .gcamp__q { font-size: 16px; }
.gcamp__choices { max-width: none; }
.gcamp__choices:empty { display: none; }

/* Clear the way: a place from above, a colleague walking through, things in the way */
[data-game="clear"], .game-card--clear { --accent: #2DD4BF; }
.game-art--clear .icon { animation: car-drive 1.4s ease-in-out infinite; }
.gclear { display: grid; gap: 8px; }
.gclear .gm-goal { min-height: 0; }
.gclear__m { color: var(--gold-2); font-family: var(--font-display); font-size: 17px; font-variant-numeric: tabular-nums; direction: ltr; }
.gclear__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 276px) * 360 / 520)); max-width: min(100%, calc((100svh - var(--appbar-h) - 276px) * 360 / 520)); min-width: 230px; margin-inline: auto; aspect-ratio: 360 / 520; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: #2B2230; box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gclear__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; outline: none; }
.gclear__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-2); }
.gclear__combo { position: absolute; left: 50%; top: 10px; z-index: 2; margin: 0; color: #FFD27A; font-family: var(--font-display); font-size: 16px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); transform: translateX(-50%); pointer-events: none; }
.gclear__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
/* the arrows and Fix it, under the picture (swipes do the same) */
.gclear__pad { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 8px; }
.gclear__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: transform .08s; }
.gclear__btn .icon { width: 24px; height: 24px; }
.gclear__btn--left .icon { transform: scaleX(-1); }
.gclear__btn--fix { border-color: transparent; background: #15803D; color: #FFFFFF; }
.gclear__btn:active { transform: scale(0.95); }
:lang(ar) .gclear__fb { font-size: 15px; }
.gclear__fb.is-good { color: var(--good-text); }
.gclear__fb.is-bad { color: var(--bad-text); }

/* Desk & heat check: a colleague at a desk from the side, four settings, then a hot day */
[data-game="desk"], .game-card--desk { --accent: #F472B6; }
.game-art--desk .icon { animation: bob .9s ease-in-out infinite alternate; }
.gdesk { display: grid; gap: 10px; }
.gdesk__score { color: var(--gold-2); font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.gdesk__scene { position: relative; direction: ltr; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 420px) * 340 / 210)); max-width: min(100%, calc((100svh - var(--appbar-h) - 420px) * 340 / 210)); min-width: 220px; margin-inline: auto; aspect-ratio: 340 / 210; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: #E2E8F0; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; cursor: grab; }
.gdesk__scene.is-good { border-color: var(--safe); box-shadow: 0 0 0 2px color-mix(in srgb, var(--safe) 45%, transparent), var(--shadow); }
.gdesk__pic, .gdesk__svg { display: block; width: 100%; height: 100%; }
.gdesk__scene.is-in .gdesk__pic { animation: gdesk-in .4s var(--ease); }
.gdesk__scene.is-out .gdesk__pic { animation: gdesk-out .35s ease both; }
@keyframes gdesk-in { from { opacity: 0; transform: translateX(-24px); } }
@keyframes gdesk-out { to { opacity: 0; transform: translateX(24px); } }
.gdesk__scene.is-thanks .gdesk__pic { filter: saturate(1.15) brightness(1.04); }
.gdesk__glow { opacity: .85; }
.gdesk__fx { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
/* the handles to drag: the seat, the screen, the keyboard */
.gdesk__handle { position: absolute; left: var(--x); top: var(--y); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); pointer-events: none; }
.gdesk__handle i { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed rgba(14, 116, 144, 0.9); background: rgba(255, 255, 255, 0.5); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18); animation: pulse-low .9s ease-in-out infinite alternate; }
.gdesk__handle[data-axis="ns"] i { border-radius: 10px; width: 22px; height: 30px; }
.gdesk__handle[data-axis="ew"] i { border-radius: 10px; width: 32px; height: 20px; }
.gdesk__handle.is-drag { cursor: grabbing; }
.gdesk__handle.is-drag i { background: rgba(56, 189, 248, 0.45); animation: none; }
.gdesk__scene.is-good .gdesk__handle i { border-color: rgba(22, 163, 74, 0.9); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2); animation: none; }
/* each colleague's clock: a bar along the top */
.gdesk__time { position: absolute; inset: 0 0 auto; z-index: 2; height: 6px; background: rgba(15, 23, 42, 0.18); }
.gdesk__time i { display: block; width: var(--left, 100%); height: 100%; background: linear-gradient(90deg, #22C55E, #A3E635); transition: width .1s linear; }
.gdesk__time.is-low i { background: linear-gradient(90deg, #EF4444, #F59E0B); animation: pulse-low .3s ease-in-out infinite alternate; }
.gdesk__controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gdesk__controls[hidden] { display: none; }
.gdesk__row { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "mark label label" ". less more"; align-items: center; gap: 4px 6px; padding: 6px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.gdesk__mark { grid-area: mark; }
.gdesk__label { grid-area: label; }
.gdesk__step[data-dir="-1"] { grid-area: less; }
.gdesk__step[data-dir="1"] { grid-area: more; }
.gdesk__mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: transparent; transition: background .2s, color .2s; }
.gdesk__mark .icon { width: 13px; height: 13px; }
.gdesk__row.is-right { border-color: color-mix(in srgb, var(--safe) 50%, transparent); }
.gdesk__row.is-right .gdesk__mark { background: var(--safe); color: #062E20; }
.gdesk__label { min-width: 0; }
.gdesk__label b { display: block; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
:lang(ar) .gdesk__label b { font-size: 14px; }
.gdesk__step { display: grid; place-items: center; width: 100%; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.gdesk__step:active { transform: scale(0.94); background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.gdesk__quiz[hidden] { display: none; }
.gdesk__choices { max-width: none; }
.gdesk__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
:lang(ar) .gdesk__fb { font-size: 15px; }
.gdesk__fb.is-good { color: var(--good-text); }
.gdesk__fb.is-bad { color: var(--bad-text); }
@media (max-width: 359px) { .gdesk__controls { grid-template-columns: 1fr; } }
@media (max-height: 720px) { .gdesk .gm-goal { display: none; } }

/* Heat watch: a building site on a summer morning */
.gheat { display: grid; gap: 10px; }
.gheat__time { color: var(--gold-2); font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; direction: ltr; }
.gheat__prog { position: relative; display: inline-grid; align-items: center; width: 44%; min-width: 120px; height: 22px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.gheat__prog i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: linear-gradient(90deg, #B45309, #F59E0B); transition: width .3s; }
[dir="rtl"] .gheat__prog i { inset: 0 0 0 auto; }
.gheat__prog span { position: relative; padding-inline: 10px; color: var(--text); font-size: 12px; font-weight: 800; }
.gheat__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 350px) * 340 / 300)); max-width: min(100%, calc((100svh - var(--appbar-h) - 350px) * 340 / 300)); min-width: 220px; margin-inline: auto; aspect-ratio: 340 / 300; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gheat__canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; outline: none; }
.gheat__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-2); }
.gheat__crew { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 8px; direction: ltr; }
.gheat__who { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px; min-height: 48px; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation; }
.gheat__who b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hat); color: #111827; font-size: 13px; }
.gheat__who i { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--heat-col, #4ADE80) var(--heat, 0%), var(--surface-3) var(--heat, 0%)); }
.gheat__who.is-warm { --heat-col: #F59E0B; }
.gheat__who.is-hot { --heat-col: #EF4444; border-color: rgba(239, 68, 68, 0.6); animation: pulse-low .4s ease-in-out infinite alternate; }
.gheat__who.is-rest { border-color: rgba(56, 189, 248, 0.6); background: color-mix(in srgb, #38BDF8 12%, var(--surface)); }
.gheat__who.is-out { opacity: .55; }
.gheat__call { background: linear-gradient(135deg, #EF4444, #B91C1C); color: #fff; animation: pulse-low .4s ease-in-out infinite alternate; }
.gheat__call[hidden] { display: none; }
.gheat__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
:lang(ar) .gheat__fb { font-size: 15px; }
.gheat__fb.is-good { color: var(--good-text); }
.gheat__fb.is-bad { color: var(--bad-text); }
.game-art--heat .icon { animation: breathe 3s ease-in-out infinite; }
[data-game="heat"], .game-card--heat { --accent: #F472B6; }
/* short phones: the setting messages say what to do, so the goal line makes room for the desk */

/* Calm minute: how are you, a breathing circle, what helps */
[data-game="calm"], .game-card--calm { --accent: #B794F6; }
.game-art--calm .icon { animation: breathe 3.4s ease-in-out infinite; }
.gcalm { display: grid; gap: 12px; }
.gcalm__tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 700; }
.gcalm__tag .icon { width: 16px; height: 16px; }
.gcalm__body { display: grid; gap: 12px; }
.gcalm__faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gcalm__face { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 78px; padding: 8px 2px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
:lang(ar) .gcalm__face { font-size: 13px; }
.gcalm__face:active { transform: scale(0.96); }
.gcalm__face[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--text); }
.gcalm__face-img { width: 40px; height: 40px; }
.gcalm__reply { min-height: 3em; margin: 0; color: var(--text); font-size: 15px; line-height: 1.45; }
:lang(ar) .gcalm__reply { font-size: 16px; }
.gcalm__note { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text-3); font-size: 12.5px; }
.gcalm__note .icon { width: 14px; height: 14px; }
.gcalm__sort { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcalm__pick { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.gcalm__pick:active { transform: scale(0.97); }
.gcalm__pick--yes .icon { color: var(--safe); }
.gcalm__pick--no .icon { color: #FFB3A8; }
.gcalm__pick.is-right { border-color: var(--safe); background: rgba(52, 211, 153, 0.14); }
.gcalm__pick.is-wrong { border-color: rgba(255, 179, 168, 0.7); background: rgba(255, 90, 71, 0.12); }
.gcalm__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
:lang(ar) .gcalm__fb { font-size: 15px; }
.gcalm__fb.is-good { color: var(--good-text); }
.gcalm__fb.is-bad { color: var(--bad-text); }
/* the breathing minute: a lantern over the desert at night */
.gcalm__sky { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 330px) * 340 / 300)); max-width: min(100%, calc((100svh - var(--appbar-h) - 330px) * 340 / 300)); min-width: 240px; margin-inline: auto; aspect-ratio: 340 / 300; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: #0B1030; box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gcalm__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; outline: none; }
.gcalm__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-2); }
.gcalm__guide { position: absolute; left: 50%; top: 10px; z-index: 2; margin: 0; padding: 5px 12px; border-radius: 999px; background: rgba(11, 16, 48, 0.55); color: #FDE68A; font-family: var(--font-display); font-size: 15px; white-space: nowrap; transform: translateX(-50%); pointer-events: none; }
:lang(ar) .gcalm__guide { font-size: 16px; }
.gcalm__rings { position: absolute; bottom: 8px; inset-inline-end: 10px; z-index: 2; margin: 0; color: rgba(253, 230, 138, 0.85); font-size: 12.5px; font-weight: 700; pointer-events: none; }
.gcalm__hint { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-3); font-size: 13px; }
.gcalm__hint .icon { width: 16px; height: 16px; flex: none; }
/* the habits: a card to swipe right (helps) or left (doesn't) */
.gcalm__deck { position: relative; perspective: 900px; }
.gcalm__card { position: relative; display: grid; place-items: center; min-height: 140px; padding: 22px 18px; overflow: hidden; border-radius: 22px; border: 1px solid var(--line-2); background: radial-gradient(260px 140px at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); text-align: center; transform: translateX(var(--dx, 0)) rotate(var(--rot, 0)); transition: transform .3s var(--ease), border-color .2s, box-shadow .2s; touch-action: pan-y; cursor: grab; animation: gcalm-card .35s var(--ease); }
@keyframes gcalm-card { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.gcalm__card.is-drag { transition: none; cursor: grabbing; }
.gcalm__card.is-yes { border-color: var(--safe); box-shadow: 0 0 0 2px color-mix(in srgb, var(--safe) 45%, transparent); }
.gcalm__card.is-no { border-color: #FFB3A8; box-shadow: 0 0 0 2px rgba(255, 179, 168, 0.4); }
.gcalm__card p { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
:lang(ar) .gcalm__card p { line-height: 1.6; }
.gcalm__card.is-helps { border-color: color-mix(in srgb, var(--safe) 60%, transparent); }
.gcalm__card.is-not { border-color: rgba(255, 179, 168, 0.6); }
.gcalm__stamp { position: absolute; top: 12px; padding: 3px 10px; border: 2px solid; border-radius: 10px; font-family: var(--font-display); font-size: 14px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.gcalm__stamp--yes { right: 12px; border-color: var(--safe); color: var(--safe); transform: rotate(8deg); }
.gcalm__stamp--no { left: 12px; border-color: #FFB3A8; color: #FFB3A8; transform: rotate(-8deg); }
.gcalm__card.is-yes .gcalm__stamp--yes, .gcalm__card.is-no .gcalm__stamp--no { opacity: 1; }
.gcalm__swipe { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--text-3); font-size: 13px; }
.gcalm__swipe .icon { width: 16px; height: 16px; }
.gcalm__sort { direction: ltr; }

/* Save a life: CPR to the beat, then the AED */
[data-game="cpr"], .game-card--cpr { --accent: #4ADE80; }
.game-art--cpr .icon { animation: gcpr-beat .55s ease-in-out infinite; }
@keyframes gcpr-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.16); } }
.gcpr { display: grid; gap: 10px; }
.gcpr__tag { display: inline-flex; align-items: center; gap: 5px; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 800; direction: ltr; }
.gcpr__tag .icon { width: 15px; height: 15px; }
.gcpr__score { color: var(--gold-2); font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.gcpr__scene { position: relative; direction: ltr; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 420px) * 340 / 240)); max-width: min(100%, calc((100svh - var(--appbar-h) - 420px) * 340 / 240)); min-width: 220px; margin-inline: auto; aspect-ratio: 340 / 240; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.gcpr__pic { position: absolute; inset: 0; display: block; width: 100%; height: 100%; transform-origin: 41% 50%; }
.gcpr__fx { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.gcpr__scene.is-push .gcpr__pic { animation: gcpr-press .16s ease-out; }
@keyframes gcpr-press { 45% { transform: scale(.982); filter: brightness(1.06); } }
.gcpr__scene.is-shock .gcpr__pic { animation: gcpr-shock .4s ease 2; }
@keyframes gcpr-shock { 30% { filter: brightness(1.8) saturate(.6); transform: translateY(-3px); } }
.gcpr__scene.is-shock::after { content: ""; position: absolute; inset: 0; z-index: 4; background: radial-gradient(circle at 41% 50%, rgba(255, 255, 255, 0.85), rgba(147, 197, 253, 0.25) 45%, transparent 70%); animation: gcpr-flash .5s ease-out both; pointer-events: none; }
@keyframes gcpr-flash { from { opacity: 1; } to { opacity: 0; } }
.gcpr__layer { position: absolute; inset: 0; z-index: 2; }
.gcpr__push { position: absolute; left: var(--x); top: var(--y); z-index: 2; display: grid; place-items: center; width: 24%; min-width: 72px; aspect-ratio: 1; padding: 0; border: 3px solid rgba(255, 255, 255, 0.92); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), color-mix(in srgb, var(--accent) 22%, transparent)); color: #fff; font: inherit; transform: translate(-50%, -50%); transition: transform .08s; touch-action: manipulation; cursor: pointer; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08), 0 10px 24px -10px rgba(0, 0, 0, 0.6); }
.gcpr__push[hidden] { display: none; }
.gcpr__push b { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.1rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.gcpr__scene.is-push .gcpr__push { transform: translate(-50%, -50%) scale(.9); }
.gcpr__combo { position: absolute; left: 3%; top: 4%; z-index: 4; margin: 0; color: #FFD27A; font-family: var(--font-display); font-size: 15px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); pointer-events: none; }
.gcpr__combo.is-pop { animation: gcpr-pop .3s var(--ease); }
@keyframes gcpr-pop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
/* blood flow: a tall gauge down the right edge that fills as you push well */
.gcpr__flow { position: absolute; right: 3%; top: 26%; bottom: 26%; z-index: 4; width: 14px; border-radius: 999px; background: rgba(8, 14, 22, 0.65); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.gcpr__flow i { position: absolute; inset: auto 2px 2px; height: calc(var(--flow, 35%) - 4px); min-height: 0; border-radius: 999px; background: linear-gradient(to top, #EF4444, #F59E0B 45%, #4ADE80); transition: height .25s; }
.gcpr__flow .icon { position: absolute; left: 50%; top: -22px; width: 18px; height: 18px; color: #F87171; transform: translateX(-50%); }
.gcpr__scene.is-push .gcpr__flow .icon { animation: gcpr-beat .3s ease; }
.gcpr__flow.is-low .icon { animation: pulse-low .5s ease-in-out infinite alternate; }
.gcpr__aed { position: absolute; right: 4%; bottom: 5%; z-index: 1; display: grid; justify-items: center; gap: 2px; width: 16%; padding: 6px 4px; border-radius: 10px; background: #FACC15; color: #1F2937; font-size: 11px; font-weight: 900; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .4s; }
.gcpr__scene.is-aed .gcpr__aed { opacity: 1; transform: none; }
.gcpr__aed i { display: grid; place-items: center; width: 70%; aspect-ratio: 1; border-radius: 50%; background: #16A34A; color: #fff; }
.gcpr__aed .icon { width: 60%; height: 60%; }
.gcpr__scene.is-aed-on .gcpr__aed i { animation: pulse-low .5s ease-in-out infinite alternate; }
/* the pads: dragged from beside the AED onto the chest */
.gcpr__pad { position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 11%; min-width: 34px; transform: translate(-50%, -50%) rotate(-6deg); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45)); touch-action: none; cursor: grab; transition: left .25s var(--ease), top .25s var(--ease), transform .2s; -webkit-user-drag: none; }
.gcpr__pad.is-drag { z-index: 5; transform: translate(-50%, -60%) rotate(0deg) scale(1.18); transition: none; cursor: grabbing; }
.gcpr__pad.is-on { transform: translate(-50%, -50%) rotate(0deg) scale(.92); cursor: default; }
.gcpr__spot { position: absolute; left: var(--x); top: var(--y); z-index: 1; width: 12%; min-width: 44px; aspect-ratio: 1; padding: 0; border: 2px dashed transparent; border-radius: 10px; background: transparent; transform: translate(-50%, -50%); opacity: 0; cursor: pointer; }
.gcpr__spot:focus-visible { opacity: 1; border-color: #FFF; background: rgba(255, 255, 255, 0.16); }
/* a colleague's hand on the arm, until everyone stands clear */
.gcpr__hand { position: absolute; left: 49%; top: 70%; z-index: 3; display: grid; place-items: center; width: 13%; aspect-ratio: 1; border-radius: 50%; background: #E8B98F; color: #7C4A2D; opacity: 0; transform: translate(-50%, 40%) rotate(-20deg); transition: opacity .3s, transform .35s var(--ease); pointer-events: none; }
.gcpr__hand .icon { width: 62%; height: 62%; }
.gcpr__scene.is-touch .gcpr__hand { opacity: 1; transform: translate(-50%, -50%) rotate(-20deg); }
.gcpr__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcpr__actions .gt-q__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-size: 16px; font-weight: 800; }
.gcpr__actions .icon { width: 20px; height: 20px; }
.gcpr__shock { border-color: rgba(250, 204, 21, 0.4); color: #FDE68A; }
.gcpr__shock.is-ready { background: linear-gradient(135deg, #F59E0B, #EF4444); border-color: transparent; color: #1A0B11; animation: pulse-low .45s ease-in-out infinite alternate; }
.gcpr__panel { display: grid; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.gcpr__count { margin: 0; color: var(--text-2); font-size: 13px; font-weight: 700; }
.gcpr__choices { max-width: none; }
.gcpr__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
:lang(ar) .gcpr__fb { font-size: 15px; }
.gcpr__fb.is-good { color: var(--good-text); }
.gcpr__fb.is-bad { color: var(--bad-text); }
/* Quick help (first aid): the case's picture, the question with its time ring, the picks or what to do */
.gqh { position: relative; display: grid; gap: 9px; }
.gqh .gm-goal { min-height: 0; }
.gqh__pic { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 420px) * 360 / 200)); max-width: min(100%, calc((100svh - var(--appbar-h) - 420px) * 360 / 200)); min-width: 240px; margin-inline: auto; aspect-ratio: 360 / 200; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #E9E2D6; }
.gqh__svg { display: block; width: 100%; height: 100%; }
.gqh__ask { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.gqh__q { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; }
.gqh__ring { flex: none; width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(#34D399 var(--p, 100%), var(--surface-3) 0); -webkit-mask: radial-gradient(circle, transparent 8px, #000 9px); mask: radial-gradient(circle, transparent 8px, #000 9px); }
.gqh__ring.is-low { background: conic-gradient(#F87171 var(--p, 100%), var(--surface-3) 0); }
.gqh__cards { display: grid; gap: 7px; }
.gqh-card { position: relative; display: flex; align-items: center; min-height: 50px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: start; cursor: pointer; touch-action: manipulation; transition: border-color .2s, background-color .2s, transform .1s; }
.gqh-card:active { transform: scale(0.98); }
.gqh-card:disabled { cursor: default; }
.gqh-card__mark { position: absolute; top: -7px; inset-inline-end: -5px; display: none; place-items: center; width: 22px; height: 22px; border: 2px solid var(--bg); border-radius: 50%; color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.gqh-card.is-right .gqh-card__mark, .gqh-card.is-wrong .gqh-card__mark { display: grid; }
.gqh-card.is-right { border-color: rgba(31, 174, 110, 0.7); background: color-mix(in srgb, #1FAE6E 14%, var(--surface)); }
.gqh-card.is-right .gqh-card__mark { background: #1FAE6E; }
.gqh-card.is-right .gqh-card__mark::after { content: "✓"; }
.gqh-card.is-wrong { border-color: rgba(239, 68, 68, 0.6); background: color-mix(in srgb, #EF4444 10%, var(--surface)); color: var(--text-2); }
.gqh-card.is-wrong .gqh-card__mark { background: #EF4444; }
.gqh-card.is-wrong .gqh-card__mark::after { content: "✕"; }
/* a step you do yourself: tap it, or press and hold (no long-press menu on the iPhone) */
.gqh-act { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 76px; padding: 10px 16px; overflow: hidden; border: 0; border-radius: 18px; background: #15803D; color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .08s, background-color .2s; }
.gqh-act:active, .gqh-act.is-on { transform: scale(0.97); }
.gqh-act .icon { width: 26px; height: 26px; }
.gqh-act__n { padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-size: 14px; }
.gqh-act__bar { position: absolute; inset-inline-start: 0; bottom: 0; width: var(--p, 0%); height: 7px; background: #BBF7D0; }
.gqh-act--hold.is-on { background: #166534; }
.gqh__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
:lang(ar) .gqh__fb, :lang(ar) .gqh-card { font-size: 15px; }
.gqh__fb.is-good { color: var(--good-text); }
.gqh__fb.is-bad { color: var(--bad-text); }
.gqh-clear { border-radius: 18px; }
/* the pictures: each right step shows (is-s1, is-s2 and on as the steps are done, is-done at the end) */
.gqh-call, .gqh-ok { opacity: 0; transition: opacity .4s; }
.gqh-call__txt { fill: #FFFFFF; font-family: var(--font-mono); font-size: 16px; font-weight: 800; direction: ltr; }
.gqh-bleed.is-s2 .gqh-call, .gqh-shock.is-s2 .gqh-call, .gqh-side.is-s2 .gqh-call, .is-done .gqh-ok { opacity: 1; }
.gqh-aider { opacity: 0; transition: opacity .4s; }
.gqh-choke.is-s1 .gqh-aider { opacity: 1; }
.gqh-hug { display: none; }
.gqh-choke.is-s3 .gqh-hug { display: inline; }
.gqh-choke.is-s3 .gqh-blow { display: none; }
.gqh-choke .gqh-upper { transform-box: view-box; transform-origin: 211px 122px; transition: transform .5s var(--ease); }
.gqh-choke.is-s1 .gqh-upper { transform: rotate(16deg); }
.gqh-choke.is-s3 .gqh-upper { transform: rotate(3deg); }
.gqh-blow, .gqh-hug { transform-box: fill-box; transform-origin: 0% 50%; }
.is-hit .gqh-blow { animation: gqh-blow .25s ease; }
.is-hit .gqh-hug { animation: gqh-hug .25s ease; }
@keyframes gqh-blow { 40% { transform: rotate(-18deg) translateX(-3px); } }
@keyframes gqh-hug { 40% { transform: translate(-4px, -4px); } }
.gqh-alert { animation: gqh-pulse .8s ease-in-out infinite alternate; }
.is-done .gqh-alert { display: none; }
.gqh-bit { opacity: 0; }
.gqh-choke.is-done .gqh-bit { animation: gqh-out .9s ease-out forwards; }
@keyframes gqh-out { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(40px, 30px); } }
@keyframes gqh-pulse { from { opacity: .35; } to { opacity: 1; } }
.gqh-water { opacity: 0; transition: opacity .3s; }
.gqh-burn.is-s1 .gqh-water { opacity: 1; }
.gqh-burn.is-s2 .gqh-water { opacity: 0; }
.gqh-water line { stroke-dasharray: 8 6; animation: gqh-flow .45s linear infinite; }
@keyframes gqh-flow { to { stroke-dashoffset: -14; } }
.gqh-burnt, .gqh-ring { transition: opacity .8s; }
.gqh-burn.is-s1 .gqh-burnt { opacity: .55; }
.gqh-burn.is-s2 .gqh-ring { opacity: 0; }
.gqh-film { fill: rgba(224, 242, 254, 0.32); stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.5; opacity: 0; transition: opacity .5s; }
.gqh-burn.is-s2 .gqh-film { opacity: 1; }
.gqh-steam path, .gqh-breath path { animation: gqh-rise 1.7s ease-in-out infinite; }
.gqh-steam path:nth-child(2), .gqh-breath path:nth-child(2) { animation-delay: .55s; }
@keyframes gqh-rise { 0% { opacity: 0; transform: translateY(6px); } 50% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px); } }
.gqh-drip circle { animation: gqh-drip 1.1s ease-in infinite; }
.gqh-drip circle:nth-child(2) { animation-delay: .35s; }
.gqh-drip circle:nth-child(3) { animation-delay: .7s; }
@keyframes gqh-drip { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px); } }
.gqh-bleed.is-s1 .gqh-drip, .gqh-nose.is-s2 .gqh-drip { display: none; }
.gqh-pad { opacity: 0; transition: opacity .3s; }
.gqh-bleed.is-s1 .gqh-pad { opacity: 1; }
.gqh-amb__light { fill: #93C5FD; }
.gqh-bleed.is-done .gqh-amb__light { animation: gqh-blink .5s steps(2) infinite; }
@keyframes gqh-blink { 50% { fill: #1D4ED8; } }
.gqh-nose .gqh-upper { transform-box: view-box; transform-origin: 158px 128px; transition: transform .5s var(--ease); }
.gqh-nose.is-s1 .gqh-upper { transform: rotate(18deg); }
.gqh-pinch { opacity: 0; transition: opacity .3s; }
.gqh-nose.is-s2 .gqh-pinch { opacity: 1; }
.gqh-zap path { animation: gqh-zap .18s steps(2) infinite; }
.gqh-zap path:nth-child(2n) { animation-delay: .09s; }
@keyframes gqh-zap { 50% { opacity: .15; } }
.gqh-shock.is-s1 .gqh-zap { display: none; }
.gqh-glow { fill: #F97316; transition: fill .4s; }
.gqh-shock.is-s1 .gqh-glow { fill: #6B7280; }
.gqh-switch { transition: transform .25s, fill .25s; }
.gqh-shock.is-s1 .gqh-switch { transform: translateY(9px); fill: #64748B; }
.gqh-rec, .gqh-breath { opacity: 0; transition: opacity .5s; }
.gqh-back { transition: opacity .5s; }
.gqh-side.is-s1 .gqh-breath { opacity: 1; }
.gqh-chest { transform-box: fill-box; transform-origin: 50% 100%; }
.gqh-side.is-s1 .gqh-chest { animation: gqh-chest 1.8s ease-in-out infinite; }
@keyframes gqh-chest { 50% { transform: scaleY(1.1); } }
.gqh-head { transform-box: fill-box; transform-origin: 90% 60%; transition: transform .5s var(--ease); }
.gqh-side.is-s1 .gqh-head { transform: rotate(-14deg); }
.gqh-side.is-s2 .gqh-back { opacity: 0; }
.gqh-side.is-s2 .gqh-rec { opacity: 1; }
/* Keep your distance (road safety): the gap and its meter in the top bar, the road, the phone, the brake pedal */
.ggap { position: relative; display: grid; gap: 8px; }
.ggap .gm-goal { min-height: 0; }
.ggap__hud { gap: 10px; }
.ggap__gap { min-width: 58px; font-variant-numeric: tabular-nums; }
.ggap__kmh { min-width: 64px; color: var(--text-2); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.ggap__meter { position: relative; flex: 1; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #DC2626 0 var(--r, 16.7%), #F59E0B var(--r, 16.7%) var(--t, 33.3%), #16A34A var(--t, 33.3%) 100%); }
[dir="rtl"] .ggap__meter { background: linear-gradient(270deg, #DC2626 0 var(--r, 16.7%), #F59E0B var(--r, 16.7%) var(--t, 33.3%), #16A34A var(--t, 33.3%) 100%); }
.ggap__meter::after { content: ""; position: absolute; top: -4px; bottom: -4px; inset-inline-start: var(--t, 33.3%); width: 2px; margin-inline-start: -1px; border-radius: 1px; background: #F8FAFC; }
.ggap__needle { position: absolute; top: -6px; inset-inline-start: var(--x, 0%); width: 8px; height: 26px; margin-inline-start: -4px; border-radius: 4px; background: #FFFFFF; box-shadow: 0 0 0 2px #0F172A; }
.ggap__meter.is-bad .ggap__needle { animation: ggap-warn .4s ease-in-out infinite alternate; }
@keyframes ggap-warn { to { background: #FCA5A5; } }
.ggap__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 278px) * 360 / 520)); max-width: min(100%, calc((100svh - var(--appbar-h) - 278px) * 360 / 520)); margin-inline: auto; aspect-ratio: 360 / 520; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #BFE0F7; }
.ggap__canvas { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ggap__phone { position: absolute; top: 10px; inset-inline: 10px; display: flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 10px 6px; border-radius: 16px; background: rgba(17, 24, 39, 0.93); color: #FFFFFF; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6); }
.ggap__phone.is-in { animation: ggap-in .3s var(--ease); }
@keyframes ggap-in { from { transform: translateY(-130%); } }
.ggap__phone-icon .icon { width: 22px; height: 22px; }
.ggap__phone-text { display: grid; flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.25; }
.ggap__phone-text b { color: #A7F3D0; font-size: 12px; }
.ggap__reply { flex: none; min-width: 64px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: #2563EB; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.ggap__brake { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; border: 0; border-radius: 18px; background: #B91C1C; color: #FFFFFF; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .06s, background-color .15s; }
.ggap__brake.is-on { transform: scale(0.97); background: #7F1D1D; }
.ggap__pedal { width: 34px; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, #E5E7EB 0 4px, #9CA3AF 4px 7px); }
.ggap__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
:lang(ar) .ggap__fb { font-size: 15px; }
.ggap__fb.is-good { color: var(--good-text); }
.ggap__fb.is-bad { color: var(--bad-text); }
/* the PIN pad for the booth view */
.pin { display: grid; justify-items: center; gap: 14px; padding: 4px 0; outline: none; }
.pin__lead { margin: 0; color: var(--text-2); font-size: 15px; font-weight: 600; text-align: center; }
:lang(ar) .pin__lead { font-size: 16px; }
.pin__dots { display: flex; gap: 16px; direction: ltr; }
.pin__dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold); transition: background .15s, transform .15s; }
.pin__dots i.is-on { background: var(--gold); transform: scale(1.1); }
.pin.is-wrong .pin__dots { animation: fx-shake .35s ease; }
.pin.is-wrong .pin__dots i { border-color: var(--danger); }
.pin.is-ok .pin__dots i { border-color: var(--safe); background: var(--safe); }
.pin__msg { min-height: 1.4em; margin: 0; color: var(--bad-text, #FFC2B5); font-size: 14px; font-weight: 700; text-align: center; }
.pin__keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; direction: ltr; }
.pin__key { display: grid; place-items: center; height: 64px; padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); color: var(--text); font: inherit; font-family: var(--font-display); font-size: 24px; cursor: pointer; touch-action: manipulation; }
.pin__key:active { transform: scale(0.95); background: color-mix(in srgb, var(--gold) 24%, var(--surface-2)); }
.pin__key--del .icon { width: 24px; height: 24px; }
.credit__booth { margin-top: 12px; }
.booth__lock { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-content: center; justify-items: center; gap: 18px; min-height: 100vh; min-height: 100svh; }
.booth__lock-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(217, 179, 108, 0.14); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(217, 179, 108, 0.35); }
.booth__lock-icon .icon { width: 40px; height: 40px; }
.booth__lock-title { display: grid; justify-items: center; gap: 4px; margin: 0; color: var(--gold-2); font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3rem); }
.booth .pin__lead { font-size: clamp(18px, 1.5vw, 24px); }
.booth .pin__keys { grid-template-columns: repeat(3, 104px); gap: 16px; }
.booth .pin__key { height: 88px; font-size: 34px; border-radius: 22px; }
.booth .pin__dots i { width: 22px; height: 22px; }
/* shared by the games: a shake, and a banner that slides in */
/* words drawn inside the game pictures read right to left in Arabic (the pictures themselves stay left to right) */
:lang(ar) .gcpr__fx, :lang(ar) .gclear__canvas, :lang(ar) .gcalm__canvas, :lang(ar) .gdesk__fx, :lang(ar) .gheat__canvas { direction: rtl; }
.gcpr__combo, .gclear__combo { unicode-bidi: plaintext; }
:lang(ar) .gheat__time { font-family: inherit; font-weight: 800; }
.fx-shake { animation: fx-shake .32s ease; }
.fx-shake--strong { animation: fx-shake .45s ease; --fx-shake: 7px; }
@keyframes fx-shake { 20% { transform: translateX(calc(-1 * var(--fx-shake, 4px))); } 40% { transform: translateX(var(--fx-shake, 4px)); } 60% { transform: translateX(calc(-0.6 * var(--fx-shake, 4px))); } 80% { transform: translateX(calc(0.4 * var(--fx-shake, 4px))); } }
.fx-banner { position: absolute; left: 50%; top: 38%; z-index: 6; display: grid; justify-items: center; gap: 2px; min-width: 62%; padding: 12px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(36, 18, 28, 0.92), rgba(70, 24, 42, 0.92)); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(242, 220, 168, 0.25); color: var(--gold-2); text-align: center; transform: translate(-50%, -50%); animation: fx-in .45s var(--ease) both; pointer-events: none; }
.fx-banner b { font-family: var(--font-display); font-size: 1.35rem; }
.fx-banner span { color: var(--text-2); font-size: 13px; font-weight: 700; }
.fx-banner.is-out { animation: fx-out .5s ease both; }
@keyframes fx-in { from { opacity: 0; transform: translate(-50%, -30%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes fx-out { to { opacity: 0; transform: translate(-50%, -70%) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .fx-shake, .fx-shake--strong { animation: none; } }

/* The games seal (finish every mini game; gold with three stars in each) */
.seal { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3)); }
.pp-seal { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 16px 12px; padding: 10px 12px; border: 1.5px dashed rgba(107, 23, 48, 0.3); border-radius: 14px; color: #5A3A44; text-decoration: none; }
.pp-seal.is-earned { border-style: solid; border-color: rgba(184, 134, 11, 0.5); background: rgba(217, 179, 108, 0.16); }
.pp-seal__slot { display: grid; place-items: center; width: 56px; height: 56px; margin: 4px; border: 2px dashed rgba(107, 23, 48, 0.3); border-radius: 50%; color: rgba(107, 23, 48, 0.5); }
.pp-seal__slot .icon { width: 26px; height: 26px; }
.pp-seal__text { display: grid; gap: 4px; font-size: 13px; line-height: 1.4; }
:lang(ar) .pp-seal__text { font-size: 14px; }
.pp-seal__text b { color: var(--maroon); font-family: var(--font-display); font-size: 15px; word-spacing: .12em; }
.pp-seal__bar { height: 6px; overflow: hidden; border-radius: 6px; background: rgba(107, 23, 48, 0.12); }
.pp-seal__bar i { display: block; width: var(--w, 0%); height: 100%; border-radius: 6px; background: linear-gradient(90deg, #C8962E, #E9C46A); }
.game-result__seal { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid rgba(217, 179, 108, 0.5); border-radius: 16px; background: rgba(217, 179, 108, 0.12); color: var(--text); text-align: start; text-decoration: none; animation: stamp-in .6s var(--ease) .3s backwards; }
.game-result__seal > span { display: grid; gap: 2px; }
.game-result__seal b { color: var(--gold-2); font-size: 15px; line-height: 1.3; }
.game-result__seal > span > span { color: var(--text-2); font-size: 13px; }
.arcade-hero__seal { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border: 1px dashed rgba(217, 179, 108, 0.4); border-radius: 14px; color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.35; text-decoration: none; }
:lang(ar) .arcade-hero__seal { font-size: 14px; }
.arcade-hero__seal.is-earned { border-style: solid; background: rgba(217, 179, 108, 0.12); color: var(--gold-2); }
.arcade-hero__sealslot { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px dashed rgba(217, 179, 108, 0.5); border-radius: 50%; color: var(--gold); }
.arcade-hero__sealslot .icon { width: 18px; height: 18px; }

/* Games page: every game in one place */
.arcade-hero { position: relative; overflow: hidden; display: grid; gap: 8px; padding: 22px 18px 18px; border-radius: 24px; border: 1px solid rgba(242, 220, 168, 0.22); background: radial-gradient(420px 260px at 85% -10%, rgba(140, 31, 63, 0.85), transparent 70%), radial-gradient(300px 200px at 0% 120%, rgba(217, 179, 108, 0.18), transparent 70%), linear-gradient(160deg, #4A1023, #23090F); box-shadow: var(--shadow); animation: hero-in .5s var(--ease) both; }
.arcade-hero > :not(.embers) { position: relative; z-index: 1; }
.arcade-hero__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .arcade-hero__kicker { font-size: 14px; letter-spacing: 0; }
.arcade-hero__kicker .icon { width: 20px; height: 20px; animation: wobble 2.4s ease-in-out infinite; }
.arcade-hero__title { color: var(--gold-2); line-height: 1.15; word-spacing: .12em; }
.arcade-hero__lead { max-width: 40ch; color: var(--text-2); font-size: 15px; }
:lang(ar) .arcade-hero__lead { font-size: 16px; }
.arcade-hero__score { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 12px; border-radius: 16px; border: 1px solid rgba(242, 220, 168, 0.14); background: rgba(0, 0, 0, 0.25); }
.arcade-hero__trophy { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: radial-gradient(circle at 35% 30%, #FFF3D6, var(--gold) 60%, #A87C36); color: #3A0C1A; }
.arcade-hero__trophy .icon { width: 22px; height: 22px; }
.arcade-hero__stars { display: grid; flex: 1; gap: 6px; font-size: 14.5px; }
.arcade-hero__bar { position: relative; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.arcade-hero__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, #F2DCA8, #D9B36C); animation: grow-bar 1.2s var(--ease) .3s both; }
@keyframes grow-bar { from { width: 0; } }
.place-games { display: grid; gap: 10px; }
.place-game--work { --accent: var(--work); } .place-game--house { --accent: var(--house); } .place-game--road { --accent: var(--road); }
.place-game { display: grid; gap: 10px; padding: 12px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: radial-gradient(220px 120px at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--surface); }
[dir="rtl"] .place-game { background: radial-gradient(220px 120px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--surface); }
.place-game__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; word-spacing: .12em; }
.place-game__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink, var(--accent)); }
.place-game__icon .icon { width: 19px; height: 19px; }
.place-game__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.place-game__link { display: grid; justify-items: start; align-content: start; gap: 4px; min-height: 44px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font-size: 13.5px; font-weight: 700; line-height: 1.3; text-decoration: none; transition: transform .15s, border-color .2s; }
:lang(ar) .place-game__link { font-size: 14.5px; }
.place-game__link > .icon { width: 18px; height: 18px; color: var(--ink, var(--accent)); }
.place-game__link:active { transform: scale(0.98); }
.place-game__play { color: var(--ink, var(--accent)); font-size: 12px; }
.extra--wide { margin-top: 18px; }
/* the games page by topic: chips that jump to each topic, then a section for each (its colour, stamp and page) */
.games-jump { display: flex; gap: 8px; margin-top: 18px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.games-jump::-webkit-scrollbar { display: none; }
.games-jump__chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding-block: 6px; padding-inline: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.games-jump__chip .icon { width: 16px; height: 16px; color: var(--ink, var(--accent)); }
.games-topic { margin-top: 26px; scroll-margin-top: calc(var(--appbar-h) + 12px); }
.games-topic__head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.games-topic__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink, var(--accent)); }
.games-topic__icon .icon { width: 22px; height: 22px; }
.games-topic__text { display: grid; gap: 2px; min-width: 0; }
.games-topic__title { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.games-topic__meta { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--ink, var(--accent)); font-size: 12.5px; font-weight: 600; }
.games-topic__meta .icon { width: 14px; height: 14px; }
.games-topic__link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 4px; color: var(--ink, var(--accent)); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.games-topic__link .icon { width: 15px; height: 15px; }
.games-topic--mixed { --accent: var(--gold); }

/* ---------- The tower in 3D ---------- */
/* Home's first screen: Amwal Tower in 3D across the whole width, the passport over it.
   A strip of the fire steps shows under it, so it is clear there is more below. */
.stage { position: relative; display: block; height: clamp(520px, calc(100vh - var(--appbar-h) - 56px), 780px); height: clamp(520px, calc(100svh - var(--appbar-h) - 56px), 780px); margin: -18px calc(-1 * var(--gutter)) 0; overflow: hidden; isolation: isolate; background: #0B1630; }
.stage__view { position: absolute; inset: 0; }
.stage__view .t3d { height: 100%; aspect-ratio: auto; max-height: none; border: 0; border-radius: 0; background: #0B1630; }
.stage::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 96px; background: linear-gradient(rgba(22, 10, 15, 0.6), rgba(22, 10, 15, 0)); pointer-events: none; }
.stage::after { content: ""; position: absolute; z-index: 1; inset: auto 0 0; height: 60%; background: linear-gradient(to top, var(--bg) 3%, rgba(22, 10, 15, 0.92) 28%, rgba(22, 10, 15, 0.55) 58%, rgba(22, 10, 15, 0)); pointer-events: none; }
.stage__top { position: absolute; z-index: 2; top: 12px; inset-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.stage__where { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(22, 10, 15, 0.62); color: var(--gold-2); font-size: 12.5px; font-weight: 700; }
:lang(ar) .stage__where { font-size: 13.5px; }
.stage__where .icon { width: 14px; height: 14px; color: var(--gold); }
.stage__full { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(242, 220, 168, 0.3); border-radius: 999px; background: rgba(22, 10, 15, 0.62); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; pointer-events: auto; }
:lang(ar) .stage__full { font-size: 14px; }
.stage__full .icon { width: 16px; height: 16px; }
.stage__full:active { transform: scale(0.97); }
.stage__body { position: absolute; z-index: 2; inset: auto var(--gutter) 14px; display: grid; gap: 10px; pointer-events: none; }
.stage__body a, .stage__body button { pointer-events: auto; }
.stage__kicker { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; animation: rise .7s var(--ease) .3s both; }
.stage__kicker .icon { width: 14px; height: 14px; }
:lang(ar) .stage__kicker { font-size: 13px; letter-spacing: 0; }
.stage__title { font-family: var(--font-display); font-size: clamp(2.1rem, 10.6vw, 3.4rem); line-height: 1.04; word-spacing: .1em; background: linear-gradient(100deg, #D9B36C 0%, #FFF3D6 22%, #D9B36C 44%, #D9B36C 56%, #FFF3D6 78%, #D9B36C 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .8s var(--ease) .45s both, shimmer 6s linear 1.4s infinite; }
.stage__lead { max-width: 32ch; color: rgba(248, 238, 240, 0.92); font-size: 16px; line-height: 1.45; animation: rise .8s var(--ease) .6s both; }
:lang(ar) .stage__lead { font-size: 17px; line-height: 1.6; }
.stage__progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text-2); font-size: 13px; font-weight: 700; animation: rise .8s var(--ease) .72s both; }
:lang(ar) .stage__progress { font-size: 14px; }
.stage__dots { display: flex; gap: 5px; }
.stage__dots li { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: .8; }
.stage__dots li.is-on { background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 1; }
.stage__actions { display: grid; gap: 8px; margin-top: 2px; animation: rise .8s var(--ease) .85s both; }
.stage__actions .btn { min-height: 56px; padding: 6px 18px; font-size: 17px; font-weight: 700; }
:lang(ar) .stage__actions .btn { font-size: 18px; }
.stage__fire { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; text-decoration: none; padding: 6px 16px; border: 1px solid rgba(255, 120, 73, 0.5); border-radius: 999px; background: rgba(255, 120, 73, 0.14); color: #FFD9C7; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
:lang(ar) .stage__fire { font-size: 16px; }
.stage__fire .icon { width: 18px; height: 18px; color: #FF9B73; }
.stage__fire:active { transform: scale(0.98); }
.stage__note { color: var(--text-3); font-size: 11px; line-height: 1.4; }
:lang(ar) .stage__note { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .stage__kicker, .stage__title, .stage__lead, .stage__progress, .stage__actions { animation: none; } }
/* short screens (iPhone SE): a tighter text block and a darker lower half, so the text reads over the city */
@media (max-height: 720px) { .stage::after { height: 74%; background: linear-gradient(to top, var(--bg) 3%, rgba(22, 10, 15, 0.94) 36%, rgba(22, 10, 15, 0.6) 66%, rgba(22, 10, 15, 0)); } .stage__body { gap: 8px; } .stage__lead { font-size: 15px; } :lang(ar) .stage__lead { font-size: 16px; line-height: 1.5; } }
#fireSteps { scroll-margin-top: calc(var(--appbar-h) + 12px); }
.hero__links { display: flex; flex-wrap: wrap; gap: 0 8px; }

.t3d { position: relative; width: 100%; aspect-ratio: 10 / 9; max-height: 70vh; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: #13213A; -webkit-user-select: none; user-select: none; }
.t3d__canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline: none; }
.t3d--full .t3d__canvas { touch-action: none; }
.t3d__canvas:active { cursor: grabbing; }
.t3d__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-2); }
.t3d__labels { position: absolute; inset: 0; pointer-events: none; }
.t3d__tag { position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(22, 10, 15, 0.82); color: var(--text); font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.8); will-change: transform; }
[dir="rtl"] .t3d__tag { padding: 3px 4px 3px 9px; }
:lang(ar) .t3d__tag { font-size: 12.5px; }
.t3d__tag b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #A79EAD; color: #1A0B11; font-size: 12px; }
.t3d__tag.is-compact { padding: 3px; }
.t3d__tag.is-compact span { display: none; }
.t3d__tag--point.is-ours { background: rgba(10, 60, 40, 0.92); color: #D4FBE8; box-shadow: 0 0 0 1.5px #34D399, 0 8px 18px -8px rgba(52, 211, 153, 0.8); }
.t3d__tag--point.is-ours b { background: #34D399; color: #062113; }
.t3d__tag--name { padding: 3px 10px; background: rgba(217, 179, 108, 0.92); color: #2A0E05; }
.t3d__tag--name .icon { width: 14px; height: 14px; }
.t3d__tag--place { padding: 2px 8px; background: rgba(22, 10, 15, 0.6); color: var(--text-2); font-weight: 600; font-size: 10.5px; }
:lang(ar) .t3d__tag--place { font-size: 11.5px; }
.t3d__hint { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(22, 10, 15, 0.75); color: var(--text-2); font-size: 12px; font-weight: 600; pointer-events: none; transition: opacity .5s; }
.t3d__hint .icon { width: 14px; height: 14px; }
.t3d__hint.is-gone { opacity: 0; }
/* full screen: the hint sits at the top, clear of the buttons along the bottom */
.t3d--full .t3d__hint { top: 10px; bottom: auto; }
.t3d__tools { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 6px; direction: ltr; }
.t3d__btn { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid rgba(242, 220, 168, 0.2); border-radius: 12px; background: rgba(22, 10, 15, 0.78); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.t3d__btn .icon { width: 18px; height: 18px; }
.t3d__btn--text { display: inline-flex; gap: 6px; }
:lang(ar) .t3d__btn { font-size: 13.5px; }
.t3d:not(.t3d--full) .t3d__tools { top: 8px; bottom: auto; }
.t3d__btn b { font-size: 20px; line-height: 1; }
.t3d__btn:active { transform: scale(0.95); }
.t3d-full { position: fixed; z-index: 85; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--bg); animation: hero-in .3s var(--ease) both; }
.t3d-full__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t3d-full__kicker { color: #7CE2B1; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .t3d-full__kicker { letter-spacing: 0; font-size: 13px; }
.t3d-full__title { font-family: var(--font-display); font-size: 1.25rem; word-spacing: .12em; }
.t3d-full__stage { flex: 1; min-height: 0; display: flex; }
.t3d-full__stage .t3d { aspect-ratio: auto; max-height: none; height: 100%; }
.t3d-full__foot { display: grid; gap: 6px; }
.t3d-full__lead { color: var(--text-2); font-size: 14px; line-height: 1.45; }
:lang(ar) .t3d-full__lead { font-size: 15px; }
.t3d-full__legend { display: grid; gap: 4px; }
.t3d-full__legend li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13.5px; }
:lang(ar) .t3d-full__legend li { font-size: 14.5px; }
.t3d-full__legend .icon { width: 15px; height: 15px; color: #34D399; align-self: center; }
.t3d-full__legend span { color: var(--text-3); }
.t3d-full__note { color: var(--text-3); font-size: 11.5px; }

/* ---------- Share ---------- */
.share { display: grid; gap: 14px; }
.share__lead { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
:lang(ar) .share__lead { font-size: 15.5px; }
.share__qr { justify-self: center; width: min(70vw, 250px); padding: 14px; border-radius: 22px; background: var(--paper); box-shadow: 0 22px 44px -26px rgba(217, 179, 108, 0.75); animation: stamp-in .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.share__qr .qr-svg { width: 100%; height: auto; }
.share__url { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text-2); font-family: var(--font-mono); font-size: 16px; text-align: center; -webkit-user-select: all; user-select: all; }
.share__actions { display: grid; gap: 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 720px) { .modal { align-items: center; padding: 24px; } }
.modal__scrim { position: absolute; inset: 0; background: rgba(10, 4, 7, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .22s; }
.modal__panel { position: relative; width: 100%; max-width: 680px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); transform: translateY(24px); opacity: 0; transition: transform .28s var(--ease), opacity .22s; outline: none; }
@media (min-width: 720px) { .modal__panel { border-radius: 22px; padding: 26px 30px 30px; } }
.modal--wide .modal__panel { max-width: 980px; }
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { transform: none; opacity: 1; }
.modal__head { position: sticky; top: -20px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -20px -22px 16px; padding: 16px 22px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .modal__head { top: -26px; margin: -26px -30px 18px; padding: 20px 30px 14px; } }
.modal__title { font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 95; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--gold-2); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; pointer-events: none; text-align: center; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s var(--ease); }

/* ---------- Scene life (Hazard Hunt illustrations) ---------- */
.flicker > path { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .45s ease-in-out infinite alternate; }
.flicker > path:nth-child(2) { animation-duration: .36s; animation-direction: alternate-reverse; }
.flicker > path:nth-child(3) { animation-duration: .28s; }
.flicker--b > path { animation-duration: .38s; animation-delay: -.2s; }
.drift circle, .puff circle { transform-box: fill-box; transform-origin: center; animation: drift 3.4s ease-in-out infinite; }
.drift circle:nth-child(2), .puff circle:nth-child(2) { animation-delay: -.9s; }
.drift circle:nth-child(3), .puff circle:nth-child(3) { animation-delay: -1.8s; }
.drift circle:nth-child(4) { animation-delay: -2.6s; }
.puff circle { animation-name: puff; animation-duration: 2.6s; }
.blink { animation: blink 1.1s steps(2, jump-none) infinite; }
.pulse-soft { transform-box: fill-box; transform-origin: center; animation: pulse-soft 2.2s ease-in-out infinite alternate; }
.drip { animation: drip 2s ease-in infinite; }
@keyframes flicker { from { transform: scale(0.9, 0.86); } to { transform: scale(1.04, 1.1); } }
@keyframes drift { 0%, 100% { transform: translate(0, 4px) scale(0.92); } 50% { transform: translate(3px, -7px) scale(1.12); } }
@keyframes puff { 0%, 100% { transform: translate(2px, 0) scale(0.9); } 50% { transform: translate(-8px, -3px) scale(1.15); } }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .15; } }
@keyframes pulse-soft { from { transform: scale(0.88); } to { transform: scale(1.14); } }
@keyframes drip { 0% { transform: translateY(-2px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ---------- Booth display (booth.html, or index.html#booth) ---------- */
.booth-mode > :not(#boothRoot):not(.sprite):not(script) { display: none !important; }
.booth { height: 100vh; overflow: hidden; background: radial-gradient(1000px 700px at 80% -10%, rgba(140, 31, 63, 0.55), transparent 60%), radial-gradient(800px 500px at 0% 110%, rgba(217, 179, 108, 0.10), transparent 60%), var(--bg); }
.booth__grid { display: grid; gap: 3vh 4vw; height: 100vh; padding: 4vh 5vw; grid-template-columns: 1.2fr 0.8fr; grid-template-rows: 1fr auto; align-items: center; }
@media (max-aspect-ratio: 1/1) { .booth__grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto; text-align: center; } .booth__intro .eyebrow { justify-content: center; } }
.booth__title { font-family: var(--font-display); font-size: clamp(2.4rem, min(6vw, 9vh), 7rem); line-height: 1.05; color: var(--gold-2); }
.booth__title--ar { margin-top: .5vh; font-size: clamp(2rem, min(4.6vw, 7vh), 5.4rem); line-height: 1.35; color: var(--gold); }
.booth__dot { color: var(--danger); }
.booth__tagline { display: flex; flex-wrap: wrap; gap: 0 1.2em; margin-top: 1.6vh; font-size: clamp(1.1rem, min(2.1vw, 3.4vh), 2.2rem); font-weight: 600; color: var(--text); }
@media (max-aspect-ratio: 1/1) { .booth__tagline { justify-content: center; } }
.booth__sub { display: grid; gap: .2em; margin-top: 1.4vh; font-size: clamp(.95rem, min(1.4vw, 2.3vh), 1.5rem); color: var(--text-2); }
.booth__count { margin-top: 2.2vh; font-size: clamp(.9rem, 1.3vw, 1.3rem); padding: .5em 1em; }
.booth__sep { color: var(--text-3); }
.booth__credit { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 0 1.2vw; margin-top: 2.2vh; color: var(--text-2); font-size: clamp(.85rem, min(1.1vw, 1.9vh), 1.2rem); text-align: start; }
@media (max-aspect-ratio: 1/1) { .booth__credit { justify-content: center; } }
.booth__sign { grid-row: span 2; font-family: var(--font-sign); font-size: clamp(2rem, min(3.4vw, 6vh), 4rem); line-height: 1.3; color: var(--gold); transform: rotate(-4deg); }
.booth__qr { display: grid; justify-items: center; gap: 2vh; }
.qr-card { display: grid; justify-items: center; gap: 1.6vh; padding: 3vh 3vh 2.4vh; border-radius: 28px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 30px 80px -30px rgba(217, 179, 108, 0.6); }
.qr-card__code { width: min(26vw, 36vh); }
@media (max-aspect-ratio: 1/1) { .qr-card__code { width: min(46vw, 19vh); } }
.qr-svg { width: 100%; height: auto; }
.qr-bg { fill: var(--paper); }
.qr-fg { fill: #1A0B11; }
.qr-card__title { display: grid; justify-items: center; gap: .2em; font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 2.2rem); color: var(--maroon); }
.qr-card__url { color: var(--paper-mute); font-size: clamp(.8rem, 1vw, 1.1rem); font-weight: 600; }
.booth__free { display: grid; justify-items: center; gap: .2em; color: var(--text-3); font-size: clamp(.9rem, 1.2vw, 1.25rem); text-align: center; }
.booth__fact { grid-column: 1 / -1; display: grid; gap: 1.4vh; padding: 2.6vh 3vw; border-radius: 24px; border: 1px solid var(--line); background: rgba(34, 17, 23, 0.85); }
.booth__fact-k { display: flex; justify-content: space-between; color: var(--gold); font-weight: 700; font-size: clamp(.9rem, 1.2vw, 1.3rem); }
.booth__fact-body { display: grid; grid-template-columns: auto 1fr 1fr; gap: 1vh 3vw; align-items: center; }
@media (max-aspect-ratio: 1/1) { .booth__fact-body { grid-template-columns: 1fr; justify-items: center; } }
.booth__fact-body.is-in { animation: fact-in .8s var(--ease); }
.booth__fact-icon { display: grid; place-items: center; width: clamp(48px, 5vw, 90px); height: clamp(48px, 5vw, 90px); border-radius: 22%; background: rgba(217, 179, 108, 0.14); color: var(--gold); }
.booth__fact-icon .icon { width: 50%; height: 50%; }
.booth__fact-text { display: grid; gap: .3em; font-size: clamp(1rem, min(1.4vw, 2.4vh), 1.6rem); color: var(--text-2); }
.booth__fact-text b { color: var(--text); font-size: 1.25em; }
.booth__fact-dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.booth__fact-dots li { width: 18px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.booth__fact-dots li.is-on { background: var(--gold); }
@keyframes fact-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Games on the booth's touch screen (booth-play.js) ---------- */
/* The booth screen with game tiles, all on one screen: the welcome and the tiles on the left,
   the QR code and today's top scores on the right, the safety tips along the bottom */
.booth__grid--play { gap: 1.6vh 2.4vw; padding: 2.4vh 3vw; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "intro side" "play side" "fact fact"; }
.booth__grid--play .booth__intro { grid-area: intro; align-self: start; }
.booth__grid--play .booth__titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2vw; }
.booth__grid--play .booth__title { font-size: clamp(2rem, min(4.6vw, 7vh), 5.6rem); }
.booth__grid--play .booth__title--ar { margin-top: 0; font-size: clamp(1.7rem, min(3.4vw, 5.4vh), 4.4rem); }
.booth__grid--play .booth__tagline { margin-top: 1.2vh; font-size: clamp(1rem, min(1.6vw, 3vh), 2rem); }
.booth__grid--play .booth__sub { display: flex; flex-wrap: wrap; gap: 0 1.2em; margin-top: 1vh; }
.booth__grid--play .booth__count, .booth__grid--play .booth__credit { margin-top: 2vh; vertical-align: middle; }
.booth__grid--play .booth__credit { display: inline-grid; margin-inline-start: 2.4vw; }
/* the full credit can wrap under the countdown: keep it close and short */
.booth__grid--play .booth__credit { margin-top: 1vh; font-size: clamp(.8rem, min(1vw, 1.8vh), 1.15rem); line-height: 1.35; }
.booth__grid--play .booth__sign { font-size: clamp(1.6rem, min(2.6vw, 4.4vh), 3.2rem); line-height: 1.1; }
.booth__side { grid-area: side; align-self: stretch; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2vh; min-height: 0; }
.booth__grid--play .booth__qr { gap: 1.6vh; }
.booth__grid--play .qr-card { gap: 1.2vh; padding: 2.4vh 2.4vh 2vh; }
.booth__grid--play .qr-card__code { width: min(14vw, 19vh); }
.booth__grid--play .qr-card__title { font-size: clamp(1.1rem, min(1.7vw, 3vh), 2rem); }
/* the tips: the "Remember" label at the side, room for the longest tip so the screen never jumps */
.booth__grid--play .booth__fact { grid-area: fact; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2.4vw; padding: 1.6vh 2.4vw; }
.booth__grid--play .booth__fact-k { flex-direction: column; align-items: center; gap: .1em; }
.booth__grid--play .booth__fact-dots { display: none; }
.booth__grid--play .booth__fact-body { min-height: 14.5vh; }
.booth__grid--play .booth__fact-icon { width: clamp(44px, 3.8vw, 76px); height: clamp(44px, 3.8vw, 76px); }
.booth__grid--play .booth__fact-text { font-size: clamp(.95rem, min(1.2vw, 2.1vh), 1.45rem); line-height: 1.5; }
.booth__play { position: relative; grid-area: play; align-self: end; display: grid; gap: 1.2vh; }
/* sound on or off, at the end of the "Play on this screen" line */
.booth__sound { position: absolute; top: -1.6vh; inset-inline-end: 0; display: grid; place-items: center; width: 5vh; height: 5vh; min-width: 44px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--gold); cursor: pointer; }
.booth__sound .icon { width: 50%; height: 50%; }
.booth__sound[aria-pressed="false"] { color: var(--text-3); }
/* the screen's languages: English, Arabic or both, by the game tiles */
/* the screen's sound and language, small in a corner of the 3D view; the language button opens the three choices */
.booth__corner { position: absolute; z-index: 2; top: 2vh; inset-inline-end: 1.6vw; display: flex; align-items: flex-start; gap: .5vw; }
.booth__corner .booth__sound { position: static; background: rgba(22, 10, 15, 0.55); opacity: .85; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.booth__lang-wrap { position: relative; }
.booth__lang-btn { display: inline-flex; align-items: center; gap: .45em; min-width: 44px; min-height: 44px; height: 5vh; padding: 0 1vw; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(22, 10, 15, 0.55); color: var(--text-2); font: inherit; font-size: clamp(.78rem, 1.6vh, 1.1rem); font-weight: 700; opacity: .85; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.booth__lang-btn .icon { width: 1.15em; height: 1.15em; color: var(--gold); }
.booth__lang-btn[aria-expanded="true"] { border-color: var(--gold); opacity: 1; }
.booth__langs { position: absolute; top: calc(100% + .8vh); inset-inline-end: 0; display: grid; width: max-content; gap: .6vh; padding: .8vh; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(22, 10, 15, 0.94); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9); }
.booth__langs .booth__lang { white-space: nowrap; }
.booth__lang { min-width: 44px; min-height: 44px; height: 5vh; padding: 0 1vw; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-size: clamp(.8rem, 1.7vh, 1.2rem); font-weight: 700; cursor: pointer; }
.booth__lang[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold-2); }
.booth__play-title { display: flex; flex-wrap: wrap; gap: .2em 1em; align-items: baseline; color: var(--gold); font-family: var(--font-display); font-size: clamp(1rem, 2.6vh, 2rem); }
.booth__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4vw; }
/* a tile: the icon on top, the name and one line in each language, the two start buttons at the foot */
.bp-tile { --accent: var(--gold); display: grid; grid-template-rows: auto auto auto 1fr; gap: .9vh; padding: 1.8vh 1.1vw; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: radial-gradient(260px 160px at 100% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), var(--surface); }
.bp-tile--zap { --accent: #FACC15; } .bp-tile--duel { --accent: #FB923C; } .bp-tile--myths { --accent: var(--gold); } .bp-tile--tower { --accent: #34D399; }
.bp-tile__icon { display: grid; place-items: center; width: 6.4vh; height: 6.4vh; border-radius: 1.8vh; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 60%, #000)); color: #1A0B11; }
.bp-tile__icon .icon { width: 3.3vh; height: 3.3vh; stroke-width: 2.2; }
.bp-tile__title { display: grid; font-family: var(--font-display); font-size: clamp(1.05rem, 2.5vh, 2rem); font-weight: 700; line-height: 1.25; }
.bp-tile__sub { display: grid; gap: .2vh; color: var(--text-2); font-size: clamp(.8rem, 1.6vh, 1.25rem); line-height: 1.35; }
/* the buttons sit side by side, or one above the other when the tile is narrow */
.bp-tile__go { align-self: end; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4em), 1fr)); gap: .7vw; margin-top: .4vh; font-size: clamp(1rem, 2.4vh, 1.8rem); }
.bp-tile__btn { min-height: 6.6vh; gap: .35em; padding: 0 .4vw; font-size: inherit; }
.booth__top { align-self: end; padding: 1.4vh 1.2vw; border-radius: 22px; border: 1px dashed rgba(242, 220, 168, 0.3); background: rgba(34, 17, 23, 0.6); }
.booth__top-k { display: flex; align-items: flex-start; gap: .5em; color: var(--gold); font-weight: 700; font-size: clamp(.9rem, 2vh, 1.5rem); line-height: 1.3; }
.booth__top-k > span { display: grid; }
.booth__top-k .icon { margin-top: .15em; }
.booth__top-list { counter-reset: top; display: grid; gap: .3vh; margin-top: 1vh; }
.booth__top-list li { counter-increment: top; display: flex; align-items: baseline; gap: .6em; font-size: clamp(.85rem, 2vh, 1.6rem); line-height: 1.35; }
.booth__top-list li::before { content: counter(top) "."; min-width: 1.3em; color: var(--text-3); }
.booth__top-list b { font-family: var(--font-mono); color: var(--gold-2); }
.booth__top-list span { color: var(--text-3); font-size: .85em; }
.booth__top-empty { display: grid; gap: .3vh; margin-top: 1vh; color: var(--text-2); font-size: clamp(.85rem, 1.8vh, 1.35rem); }
/* Up to 16:10 in landscape the tiles keep their names and buttons only */
@media (min-aspect-ratio: 1001/1000) and (max-aspect-ratio: 16/10) { .bp-tile__sub { display: none; } }
/* A squarer screen (a tablet): the tiles take the full width under the welcome and
   the QR code, and today's top scores are left out */
@media (min-aspect-ratio: 1001/1000) and (max-aspect-ratio: 3/2) {
  .booth__grid--play { grid-template-rows: auto auto auto; grid-template-areas: "intro side" "play play" "fact fact"; align-content: space-between; }
  .booth__side { grid-template-rows: auto; }
  .booth__top { display: none; }
}
/* A portrait screen: one column that scrolls, the QR code beside the top scores */
@media (max-aspect-ratio: 1/1) {
  .booth--play { height: auto; overflow: visible; }
  .booth__grid--play { height: auto; min-height: 100vh; grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "intro" "side" "play" "fact"; }
  .booth__grid--play .booth__titles, .booth__grid--play .booth__sub { justify-content: center; }
  .booth__grid--play .booth__title { font-size: clamp(2rem, 8vw, 5.6rem); }
  .booth__grid--play .booth__title--ar { font-size: clamp(1.7rem, 6vw, 4.4rem); }
  .booth__grid--play .booth__tagline { font-size: clamp(1rem, 3.2vw, 2rem); }
  .booth__grid--play .booth__sub { font-size: clamp(.95rem, 2.4vw, 1.5rem); }
  .booth__grid--play .booth__fact-body { min-height: 0; }
  .booth__grid--play .booth__fact-text { font-size: clamp(.95rem, 2.4vw, 1.45rem); }
  .booth__side { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .booth__grid--play .qr-card__code { width: min(30vw, 16vh); }
  .booth__grid--play .booth__fact { grid-template-columns: 1fr; }
  .booth__tiles { grid-template-columns: 1fr 1fr; }
  .bp-tile__icon { width: min(6.4vh, 11vw); height: min(6.4vh, 11vw); }
  .bp-tile__btn { min-height: min(6.6vh, 10vw); }
}

/* The game layer over the booth screen */
.bp { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2vh; padding: 3vh 3vw; overflow: hidden; background: radial-gradient(1000px 700px at 80% -10%, rgba(140, 31, 63, 0.55), transparent 60%), var(--bg); color: var(--text); -webkit-user-select: none; user-select: none; touch-action: manipulation; animation: hero-in .35s var(--ease) both; }
.bp__top { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.bp__title { display: inline-flex; align-items: center; gap: .5em; font-family: var(--font-display); font-size: clamp(1.4rem, 4.2vh, 3.4rem); color: var(--gold-2); }
.bp__title .icon { color: var(--gold); }
.bp .bp__home { min-height: 6.5vh; padding: 0 2vw; font-size: clamp(1rem, 2.4vh, 1.8rem); }
.bp__body { position: relative; display: grid; min-height: 0; }
.bp .zap-art { width: 46%; }
.bp .zap-item__label { font-size: clamp(14px, 2.1vh, 28px); line-height: 1.25; }
.bp .zap-pop { font-size: clamp(1.6rem, 5vh, 4rem); }
.bp .zap-count { font-size: clamp(4rem, 22vh, 16rem); border-radius: 3vh; }
/* the guide before the countdown, sized for a TV: every hazard in one row, the safety equipment below */
.bp-guide { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; background: rgba(22, 10, 15, 0.94); }
.bp .zap-guide { max-width: min(100%, 165vh); gap: 1.4vh; padding: 2.4vh 2vw; border-radius: 3vh; }
.bp .zap-guide__head { gap: 1vw; font-size: clamp(1.1rem, 3.4vh, 2.6rem); }
.bp .zap-guide__head b { padding: .1em .6em; font-size: .8em; }
.bp .zap-guide__badge { width: 5vh; height: 5vh; border-radius: 1.4vh; }
.bp .zap-guide__badge .icon { width: 3vh; height: 3vh; }
.bp .zap-guide__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1vw; }
.bp .zap-guide__grid--safe { grid-template-columns: repeat(5, minmax(0, 1fr)); width: 64%; justify-self: center; }
.bp .zap-guide__item { padding: 1.2vh .4vw 1.4vh; border-radius: 2vh; }
.bp .zap-guide__item .zap-art { width: auto; max-width: 70%; height: 10vh; }
.bp .zap-guide__label { font-size: clamp(12px, 1.9vh, 24px); line-height: 1.25; }
.bp .zap-guide__pop { font-size: clamp(14px, 2.2vh, 28px); }
.bp .zap-guide__hand { width: 8vh; height: 8vh; margin: -4vh 0 0 -4vh; }
.bp .zap-guide__hand .icon { width: 4.6vh; height: 4.6vh; }
.bp .zap-guide__go { justify-self: center; width: auto; min-width: min(100%, 32vw); min-height: 8vh; font-size: clamp(1.1rem, 3.2vh, 2.4rem); }
@media (max-aspect-ratio: 3/2) { .bp .zap-guide__grid--safe { width: 80%; } }
@media (max-aspect-ratio: 1/1) { .bp .zap-guide__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bp .zap-guide__grid--safe { width: 100%; } }
.bp .gm-flash { font-size: clamp(1rem, 2.4vh, 1.9rem); padding: 1vh 1.4vw; border-radius: 1.6vh; }
.bp-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 1.4vh; height: 74vh; max-width: 100%; aspect-ratio: var(--cols) / var(--rows); padding: 1.2vh; border-radius: 3vh; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.08), transparent 60%), #241A29; touch-action: none; }
.bp-spot { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 2vh; }
.bp-zap { display: grid; grid-template-columns: minmax(0, 24vw) minmax(0, 1fr); gap: 3vw; align-items: center; min-height: 0; }
.bp-zap__panel { display: grid; gap: 2.4vh; align-content: center; }
.bp-zap__hint { font-size: clamp(1rem, 2.6vh, 2rem); font-weight: 700; line-height: 1.35; }
.bp-zap__safety { display: flex; align-items: flex-start; gap: .6em; padding: 1.6vh 1.2vw; border-radius: 16px; border: 1px solid rgba(52, 211, 153, 0.22); background: rgba(52, 211, 153, 0.07); font-size: clamp(.9rem, 2vh, 1.5rem); font-weight: 600; line-height: 1.4; }
.bp-zap__safety .icon { flex: none; margin-top: .15em; color: var(--safe); }
.bp-clock { display: inline-flex; align-items: center; gap: .3em; font-family: var(--font-mono); font-size: clamp(2rem, 7vh, 5.4rem); color: var(--gold-2); direction: ltr; }
.bp-clock .icon { width: .7em; height: .7em; color: #FACC15; }
.bp-clock__n { word-spacing: -.3em; }
.bp-clock__bar { height: 1.4vh; }
.bp-side { display: grid; align-content: center; gap: 1.2vh; min-height: 0; justify-items: center; }
/* the score line spans the board's width: who plays, the points, then the combo at the far end */
.bp-side__hud { display: flex; align-items: baseline; gap: 1.6vw; width: calc(74vh * 4 / 3); max-width: 100%; }
.bp-duel .bp-side__hud { width: 62vh; }
.bp-side__score { font-family: var(--font-display); font-size: clamp(1.4rem, 4.6vh, 3.6rem); font-weight: 800; }
.bp-side__combo { margin-inline-start: auto; color: #FACC15; font-size: clamp(1rem, 3vh, 2.4rem); font-weight: 800; }
.bp-side__wrap { position: relative; display: grid; place-items: center; width: 100%; min-height: 0; }
.bp-side__who { color: var(--pcolor, var(--gold)); font-family: var(--font-display); font-size: clamp(1.2rem, 3.4vh, 2.6rem); font-weight: 800; }
.bp-side--p1 { --pcolor: #38BDF8; } .bp-side--p2 { --pcolor: #FB923C; }
.bp-side--p1 .bp-board, .bp-side--p2 .bp-board { border: 2px solid color-mix(in srgb, var(--pcolor) 60%, transparent); }
.bp-duel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 1.6vh 3vw; min-height: 0; }
.bp-duel__clock { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2vw; }
.bp-duel .bp-board { height: 62vh; }
.bp-duel .bp-zap__hint { max-width: 30vw; font-size: clamp(.9rem, 2.2vh, 1.7rem); }
@media (max-aspect-ratio: 1/1) { .bp-zap, .bp-duel { grid-template-columns: 1fr; } .bp-board { height: auto; width: 100%; } }

/* Results on the big screen */
.bp-result { display: grid; justify-items: center; align-content: center; gap: 2vh; max-width: 74vw; margin: 0 auto; text-align: center; }
.bp-result__title { font-family: var(--font-display); font-size: clamp(2rem, 7vh, 5.6rem); color: var(--gold-2); }
.bp-result__meta { color: var(--text-2); font-size: clamp(1rem, 2.6vh, 2rem); }
.bp-result__rank { display: inline-flex; align-items: center; gap: .5em; padding: 1vh 1.6vw; border-radius: 999px; background: rgba(217, 179, 108, 0.18); color: var(--gold-2); font-size: clamp(1rem, 2.8vh, 2.2rem); font-weight: 800; }
.bp-result__trophy .icon { width: 12vh; height: 12vh; color: var(--gold); }
.bp-result__duel { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; width: 100%; }
.bp-result__player { display: grid; justify-items: center; gap: 1vh; padding: 2vh; border-radius: 22px; border: 1px solid var(--line-2); }
.bp-result__player.is-winner { border-color: var(--gold); background: rgba(217, 179, 108, 0.12); }
.bp-result__player--p1 b { color: #38BDF8; } .bp-result__player--p2 b { color: #FB923C; }
.bp-result__player b { font-size: clamp(1.2rem, 3.4vh, 2.6rem); }
.bp-result__pts { font-family: var(--font-mono); font-size: clamp(1.4rem, 5vh, 4rem); color: var(--gold-2); }
.bp-result__list { display: grid; gap: 1vh; max-width: 60vw; text-align: start; }
.bp-result__list li { display: flex; align-items: flex-start; gap: .6em; font-size: clamp(1rem, 2.4vh, 1.9rem); font-weight: 600; line-height: 1.4; }
.bp-result__list .icon { flex: none; margin-top: .2em; color: var(--safe); }
.bp-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vw; margin-top: 1vh; }
.bp-result__actions .btn { min-height: 8vh; padding: 0 3vw; font-size: clamp(1.1rem, 2.8vh, 2.2rem); }
/* the QR code in a corner of every result, to carry on on a phone */
.bp-scan { position: absolute; inset-inline-end: 0; bottom: 0; display: grid; justify-items: center; gap: 1vh; width: min(14vw, 22vh); padding: 1.4vh; border-radius: 2vh; background: var(--paper); color: var(--paper-ink); font-size: clamp(.85rem, 1.8vh, 1.4rem); font-weight: 700; line-height: 1.3; text-align: center; }
.bp-scan svg { width: 100%; height: auto; }
@media (max-aspect-ratio: 1/1) { .bp-scan { position: static; justify-self: center; margin-top: 2vh; } }
.bp-stars { display: inline-flex; gap: 1vw; }
.bp-stars__star { display: inline-grid; color: var(--surface-3); }
.bp-stars__star .icon { width: 9vh; height: 9vh; fill: currentColor; stroke: none; }
.bp-stars__star.is-on { color: var(--gold); animation: star-pop .5s var(--ease) both; }

/* The tower in 3D on the big screen, turned with a finger */
.bp-tower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28vw); grid-template-rows: minmax(0, 1fr); gap: 2.4vw; min-height: 0; }
.bp-tower__stage { display: flex; min-height: 0; }
.bp-tower__stage .t3d { aspect-ratio: auto; max-height: none; height: 100%; border-radius: 3vh; }
.bp-tower__panel { display: grid; align-content: start; gap: 1.6vh; min-height: 0; overflow: hidden; }
.bp-tower__kicker { color: #7CE2B1; font-size: clamp(.9rem, 2vh, 1.5rem); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .bp-tower__kicker { letter-spacing: 0; }
.bp-tower__title { font-family: var(--font-display); font-size: clamp(1.4rem, 4vh, 3.2rem); line-height: 1.25; word-spacing: .12em; }
.bp-tower__lead { color: var(--text-2); font-size: clamp(1rem, 2.4vh, 1.9rem); line-height: 1.45; }
.bp-tower__points { display: grid; gap: 1vh; }
.bp-tower__points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2vh .6em; padding: 1.2vh 1vw; border-radius: 1.6vh; border: 1px solid rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); font-size: clamp(.95rem, 2.2vh, 1.7rem); line-height: 1.35; }
.bp-tower__points .icon { grid-row: span 2; margin-top: .15em; color: #34D399; }
.bp-tower__points b { color: #D4FBE8; }
.bp-tower__points span { color: var(--text-2); }
.bp-tower__how { display: flex; align-items: flex-start; gap: .6em; font-size: clamp(.95rem, 2.2vh, 1.7rem); font-weight: 600; line-height: 1.4; }
.bp-tower__how .icon { flex: none; margin-top: .2em; color: var(--gold); }
.bp-tower__note { color: var(--text-3); font-size: clamp(.8rem, 1.6vh, 1.2rem); }
/* the 3D view's labels and buttons, sized for a TV */
.bp .t3d__tag { padding-block: .3em; padding-inline: .35em .8em; font-size: clamp(13px, 2vh, 24px); }
.bp .t3d__tag.is-compact { padding: .3em; }
.bp .t3d__tag b { width: 1.7em; height: 1.7em; font-size: .95em; }
.bp .t3d__tag--name { padding-inline: .8em; }
.bp .t3d__tag--name .icon { width: 1.2em; height: 1.2em; }
.bp .t3d__tag--place { font-size: clamp(12px, 1.7vh, 20px); }
.bp .t3d__tools { bottom: 1.4vh; right: 1.4vh; gap: 1vh; }
.bp .t3d__btn { min-width: 7vh; height: 7vh; padding: 0 1.4vh; border-radius: 1.6vh; font-size: clamp(13px, 2.2vh, 26px); }
.bp .t3d__btn .icon { width: 3vh; height: 3vh; }
.bp .t3d__btn b { font-size: 3.4vh; }
.bp .t3d__hint { top: 1.4vh; left: 1.4vh; padding: .4em .9em; font-size: clamp(12px, 2vh, 24px); }
.bp .t3d__hint .icon { width: 1.2em; height: 1.2em; }
@media (max-aspect-ratio: 1/1) { .bp-tower { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } }

/* Myth or Fact for a group */
.bp-myth { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 2.4vh; width: 100%; max-width: 80vw; margin: 0 auto; min-height: 0; }
.bp-myth__count { color: var(--text-2); font-size: clamp(1rem, 2.4vh, 1.8rem); font-weight: 700; text-align: center; }
.bp-myth__card { display: grid; align-content: center; justify-items: center; gap: 2vh; padding: 4vh 4vw; border-radius: 3vh; border: 1px solid var(--line-2); background: linear-gradient(160deg, #3A1626, #24101A); text-align: center; animation: hero-in .4s var(--ease) both; }
.bp-myth__card > .icon { width: 8vh; height: 8vh; color: var(--gold); }
.bp-myth__q { font-size: clamp(1.6rem, 5.6vh, 4.4rem); font-weight: 700; line-height: 1.35; }
.bp-myth__q--sm { color: var(--text-2); font-size: clamp(1.1rem, 3vh, 2.4rem); }
.bp-myth__card--ok { border-color: rgba(52, 211, 153, 0.6); }
.bp-myth__card--no { border-color: rgba(255, 90, 71, 0.6); }
.bp-myth__verdict { display: inline-flex; align-items: center; gap: .4em; font-family: var(--font-display); font-size: clamp(1.8rem, 6vh, 4.6rem); font-weight: 800; }
.bp-myth__card--ok .bp-myth__verdict { color: var(--safe); }
.bp-myth__card--no .bp-myth__verdict { color: #FF8A7D; }
.bp-myth__answer { padding: .6vh 1.6vw; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: clamp(1rem, 2.6vh, 2rem); font-weight: 800; }
.bp-myth__explain { max-width: 60ch; font-size: clamp(1.1rem, 3.2vh, 2.6rem); line-height: 1.45; }
.bp-myth__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; }
.bp-myth__actions .btn { grid-column: 1 / -1; justify-self: center; min-height: 8vh; padding: 0 4vw; font-size: clamp(1.1rem, 2.8vh, 2.2rem); }
.bp-myth__btn { display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 14vh; border: 2px solid; border-radius: 3vh; font: inherit; font-family: var(--font-display); font-size: clamp(1.8rem, 6vh, 4.6rem); font-weight: 800; cursor: pointer; }
.bp-myth__btn .icon { width: .9em; height: .9em; }
.bp-myth__btn--myth { border-color: rgba(255, 90, 71, 0.7); background: rgba(255, 90, 71, 0.14); color: #FFB3A8; }
.bp-myth__btn--fact { border-color: rgba(52, 211, 153, 0.7); background: rgba(52, 211, 153, 0.14); color: #BDF5DC; }
.bp-myth__btn:active { transform: scale(0.98); }

/* ---------- Phones (iPhone first) ---------- */
/* No double-tap zoom delay on controls, no text selection or callout menus
   when a thumb rests on a button or the game scene. */
a, button, input, label, .scene { touch-action: manipulation; }
.btn, .option, .dest, .mission, .extra, .sharebtn, .langbtn, .backbtn, .linkbtn, .filter-chip, .segmented button, .mf-card { -webkit-user-select: none; user-select: none; }
.scene { -webkit-touch-callout: none; }
/* Hover lifts only on devices with a real pointer: on touch screens they stick. */
@media (hover: none) {
  .dest:hover, .extra:hover, .mission:hover { transform: none; }
  .dest:active, .extra:active, .mission:active { transform: scale(0.985); }
}

/* Heat watch: the quick demo, the day's card, a crew of up to six */
.gheat__crew[hidden], .gheat__demo[hidden] { display: none; }
.gheat__demo { display: grid; gap: 10px; }
.gheat__cap { min-height: 2.9em; margin: 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; }
.gheat__hand { position: absolute; z-index: 3; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; margin: -8px 0 0 -14px; border-radius: 50%; background: rgba(244, 236, 221, 0.95); color: #2A2328; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity .2s; }
.gheat__hand .icon { width: 22px; height: 22px; }
.gheat__hand.is-on { opacity: 1; }
.gheat__hand.is-tap .icon { animation: mm-tap .35s ease; }
.gheat__day-card .btn { margin-top: 6px; }
.gheat__pts { color: var(--gold-2); font-weight: 800; }
.gm-clear__icon.gheat__hurt { background: #DC2626; }

/* Layers of protection (process safety): the plant, five layers, and a button for each */
.glay { display: grid; gap: 10px; }
.glay__scene { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 340px) * 340 / 300)); max-width: min(100%, calc((100svh - var(--appbar-h) - 340px) * 340 / 300)); min-width: 220px; margin-inline: auto; aspect-ratio: 340 / 300; overflow: hidden; border-radius: 18px; box-shadow: var(--shadow); }
.glay__canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; outline: none; }
.glay__canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-2); }
:lang(ar) .glay__canvas { direction: rtl; }
.glay__layers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; direction: ltr; }
.glay__layer { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 62px; padding: 8px 2px 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation; transition: border-color .2s, background-color .2s, transform .1s; }
.glay__layer:active { transform: scale(0.95); }
.glay__layer .icon { width: 20px; height: 20px; color: #F6D365; }
.glay__num { position: absolute; top: 4px; inset-inline-start: 7px; color: var(--text-3); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.glay__name { max-width: 100%; overflow: hidden; color: var(--text-2); font-size: 11px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
:lang(ar) .glay__name { font-size: 12px; }
.glay__n { position: absolute; top: -7px; inset-inline-end: -3px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 4px 10px -4px rgba(239, 68, 68, 0.8); }
.glay__n:empty { display: none; }
.glay__layer.is-weak { border-color: rgba(239, 68, 68, 0.65); background: color-mix(in srgb, #EF4444 10%, var(--surface)); }
.glay__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.glay__fb.is-good { color: var(--good-text); }
.glay__fb.is-bad { color: var(--bad-text); }

/* Permit to work (process safety): a plant job, the steps to tap in a safe order, then the permit to sign */
.gpt { position: relative; display: grid; gap: 10px; }
.gpt__steps { display: inline-grid; align-items: center; min-width: 118px; height: 24px; padding-inline: 10px; border-radius: 999px; background: linear-gradient(90deg, #166534 var(--p, 0%), var(--surface-3) var(--p, 0%)); color: var(--text); font-size: 12px; font-weight: 800; text-align: center; }
[dir="rtl"] .gpt__steps { background: linear-gradient(270deg, #166534 var(--p, 0%), var(--surface-3) var(--p, 0%)); }
.gpt .gm-goal { min-height: 0; }
.gpt__pic { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 440px) * 360 / 200)); max-width: min(100%, calc((100svh - var(--appbar-h) - 440px) * 360 / 200)); min-width: 240px; margin-inline: auto; aspect-ratio: 360 / 200; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #1E3A5F; }
.gpt__svg { display: block; width: 100%; height: 100%; }
.gpt__svg text { font-family: var(--font-mono); }
.gpt__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
.gpt__fb.is-good { color: var(--good-text); }
.gpt__fb.is-bad { color: var(--bad-text); }
.gpt__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.gpt-card { position: relative; display: flex; align-items: center; min-height: 50px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: start; cursor: pointer; touch-action: manipulation; transition: border-color .2s, background-color .2s, transform .1s; }
.gpt-card:active { transform: scale(0.97); }
.gpt-card:disabled { cursor: default; }
/* the ✓ or ✕ once a card is tapped, on its corner */
.gpt-card__mark { position: absolute; top: -7px; inset-inline-end: -5px; display: none; place-items: center; width: 22px; height: 22px; border: 2px solid var(--bg); border-radius: 50%; color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.gpt-card.is-right .gpt-card__mark, .gpt-card.is-wrong .gpt-card__mark { display: grid; }
.gpt-card.is-right { border-color: rgba(31, 174, 110, 0.7); background: color-mix(in srgb, #1FAE6E 14%, var(--surface)); }
.gpt-card.is-right .gpt-card__mark { background: #1FAE6E; }
.gpt-card.is-right .gpt-card__mark::after { content: "✓"; }
.gpt-card.is-wrong { border-color: rgba(239, 68, 68, 0.6); background: color-mix(in srgb, #EF4444 10%, var(--surface)); color: var(--text-2); }
.gpt-card.is-wrong .gpt-card__mark { background: #EF4444; }
.gpt-card.is-wrong .gpt-card__mark::after { content: "✕"; }
.gpt-card.is-early { border-color: rgba(245, 165, 36, 0.75); animation: fx-shake .32s ease; }
.gpt__sign { gap: 10px; animation: gpt-sign 1.4s ease-in-out infinite; }
@keyframes gpt-sign { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 25%, transparent); } }
.gpt-clear { border-radius: 18px; }
.gpt-clear__pts { color: var(--gold-2); font-weight: 800; }
/* the plant picture: valves close (red), open (green), the gas flows, leaks and goes to the flare */
.gpt-valve__body { fill: #E2E8F0; stroke: #334155; stroke-width: 1.5; transition: fill .4s; }
.gpt-valve__wheel { fill: none; stroke: #475569; stroke-width: 2.5; }
.gpt-valve.is-closed .gpt-valve__body { fill: #DC2626; }
.gpt-valve.is-open .gpt-valve__body { fill: #22C55E; }
.gpt-flow { stroke: #A3E635; stroke-dasharray: 5 9; opacity: 0; transition: opacity .4s; }
.is-flowing .gpt-flow { opacity: .85; animation: gpt-flow .7s linear infinite; }
@keyframes gpt-flow { to { stroke-dashoffset: -14; } }
.gpt-leak circle { transform-box: fill-box; transform-origin: center; animation: gpt-puff 1.8s ease-out infinite; }
.gpt-leak circle:nth-child(2) { animation-delay: .3s; }
.gpt-leak circle:nth-child(3) { animation-delay: .6s; }
@keyframes gpt-puff { 0% { opacity: 0; transform: translate(0, 6px) scale(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translate(4px, -10px) scale(1.3); } }
.is-venting .gpt-leak { display: none; }
.gpt-new { fill: #E2E8F0; stroke: #22C55E; stroke-width: 2.5; opacity: 0; transition: opacity .5s; }
.is-done .gpt-new { opacity: 1; }
.gpt-flare { fill: #F97316; transform-box: fill-box; transform-origin: 50% 100%; animation: gpt-flick .7s ease-in-out infinite; }
@keyframes gpt-flick { 50% { transform: scale(.85, 1.12); } }
.is-venting .gpt-flare { animation: gpt-burst 1.8s ease-out; }
@keyframes gpt-burst { 25% { fill: #FBBF24; transform: scale(2.2, 2.8); } }
.gpt-needle { transform-box: view-box; transform-origin: 130px 92px; transition: transform 1.2s var(--ease); }
.gpt-step { opacity: 0; transition: opacity .4s; }
.gpt-step.is-on { opacity: 1; }
.gpt-detector__txt { fill: #34D399; font-size: 9px; font-weight: 700; direction: ltr; }
.gpt-rags { transition: opacity .4s; }
.is-clear .gpt-rags { opacity: 0; }
.gpt-bracket { fill: #94A3B8; }
.is-done .gpt-bracket { fill: #E2E8F0; }
.gpt-sparks circle { animation: gpt-spark .5s steps(2) infinite; }
.gpt-sparks circle:nth-child(2) { animation-delay: .15s; }
@keyframes gpt-spark { 50% { opacity: 0; } }
.gpt-cloud { transition: opacity .8s; animation: gpt-drift 3s ease-in-out infinite alternate; }
@keyframes gpt-drift { to { transform: translateX(6px); } }
.is-clean .gpt-cloud { opacity: 0; }
.gpt-air { stroke-dasharray: 4 3; animation: gpt-flow .6s linear infinite; }
.gpt-fan { animation: gpt-spin .9s linear infinite; }
@keyframes gpt-spin { to { transform: rotate(360deg); } }
.gpt-arc { transform-box: fill-box; transform-origin: center; animation: gpt-arc .25s steps(2) infinite; }
@keyframes gpt-arc { 50% { opacity: .5; transform: scale(.7); } }

/* Control room (process safety): the night shift's alarms, the unit and its three gauges, and the calls to make */
.gop { display: grid; gap: 10px; }
.gop__pts { color: var(--gold-2); font-weight: 800; }
.gop__alarm { display: grid; align-content: center; gap: 2px; min-height: 76px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.gop__alarm .gm-goal { min-height: 0; margin: 0; font-size: 14px; }
.gop__alarm.is-on { border-color: rgba(239, 68, 68, 0.75); background: color-mix(in srgb, #EF4444 12%, var(--surface)); animation: gop-alarm .8s ease-in-out infinite alternate; }
.gop__alarm.is-ask { border-color: rgba(245, 165, 36, 0.75); background: color-mix(in srgb, #F5A524 12%, var(--surface)); }
.gop__alarm.is-trip { border-color: #EF4444; background: color-mix(in srgb, #EF4444 24%, var(--surface)); }
@keyframes gop-alarm { to { border-color: rgba(239, 68, 68, 0.2); } }
.gop__banner { margin: 0; color: #FCA5A5; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.gop__alarm.is-ask .gop__banner { color: #FCD34D; }
.gop__pic { position: relative; width: 100%; max-width: min(100%, calc((100vh - var(--appbar-h) - 450px) * 360 / 220)); max-width: min(100%, calc((100svh - var(--appbar-h) - 450px) * 360 / 220)); min-width: 240px; margin-inline: auto; aspect-ratio: 360 / 220; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #0B1220; }
.gop__svg { display: block; width: 100%; height: 100%; }
.gop__fb { min-height: 2.8em; margin: 0; color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
.gop__fb.is-good { color: var(--good-text); }
.gop__fb.is-bad { color: var(--bad-text); }
.gop__plus { margin: 0 .45em; color: var(--gold-2); font-weight: 800; }
.gop__opts { display: grid; gap: 8px; }
.gop-opt { min-height: 50px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; text-align: start; cursor: pointer; touch-action: manipulation; transition: border-color .2s, background-color .2s, opacity .2s, transform .1s; }
.gop-opt:active { transform: scale(0.98); }
.gop-opt:disabled { cursor: default; }
.gop-opt:disabled:not(.is-right):not(.is-wrong) { opacity: .5; }
.gop-opt.is-wrong { border-color: rgba(239, 68, 68, 0.6); background: color-mix(in srgb, #EF4444 10%, var(--surface)); color: var(--text-2); }
.gop-opt.is-right { border-color: rgba(31, 174, 110, 0.8); background: color-mix(in srgb, #1FAE6E 16%, var(--surface)); }
/* the unit: gauges blink at their alarm, a stopped pump turns red, the flare grows while the relief valve lifts */
.gop-gauge__label { fill: #CBD5E1; font-size: 10.5px; font-weight: 700; }
.gop-gauge > circle:first-child { transition: stroke .3s; }
.gop-gauge.is-alarm > circle:first-child { stroke: #F59E0B; stroke-width: 3; animation: gop-blink .6s steps(2) infinite; }
.gop-gauge.is-trip > circle:first-child { stroke: #EF4444; stroke-width: 3.5; }
@keyframes gop-blink { 50% { stroke: #334155; } }
.gop-pump { fill: #22C55E; stroke: #0B1220; stroke-width: 1.5; transition: fill .3s; }
.gop-pump[data-p="b"] { fill: #475569; }
.gop-pump.is-off { fill: #EF4444; }
.gop-pump[data-p="b"].is-on { fill: #22C55E; }
.gop-cool { stroke-dasharray: 3 4; animation: gpt-flow .8s linear infinite; }
.is-nocool .gop-cool { stroke: #EF4444; opacity: .5; animation: none; }
.gop-flow { fill: none; stroke: #A3E635; stroke-width: 2.5; stroke-dasharray: 5 9; animation: gpt-flow .8s linear infinite; }
.is-feed .gop-flow { stroke: #FBBF24; animation-duration: .25s; }
.is-tripped .gop-flow { opacity: 0; }
.gop-feed { fill: #94A3B8; }
.is-feed .gop-feed { fill: #F59E0B; }
.is-heat .gop-cooler { fill: #9A3412; }
.is-ask .gop-trip { stroke: #F59E0B; stroke-width: 2.5; animation: gop-on .6s steps(2) infinite; }
/* the ring round the part an alarm is about */
.gop-ring { fill: none; stroke: #FCD34D; stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; transition: opacity .3s; }
.gop-ring.is-on { opacity: 1; animation: gop-ring-on .8s ease-in-out infinite alternate; }
@keyframes gop-ring-on { to { stroke-opacity: .3; } }
.gop-outlet { fill: #94A3B8; }
.is-stuck .gop-outlet { fill: #EF4444; animation: gop-on .5s steps(2) infinite; }
.is-relief .gop-relief { fill: #EF4444; animation: gop-on .5s steps(2) infinite; }
@keyframes gop-on { 50% { opacity: .35; } }
.gop-flare { fill: #F97316; transform-box: fill-box; transform-origin: 50% 100%; animation: gpt-flick .7s ease-in-out infinite; }
.is-relief .gop-flare, .is-tripped .gop-flare { fill: #FBBF24; animation: gop-big .45s ease-in-out infinite alternate; }
@keyframes gop-big { from { transform: scale(1.8, 2.3); } to { transform: scale(2.2, 2.9); } }
.gop-det { fill: #334155; stroke: #64748B; stroke-width: 1.5; }
.gop-det__ring { opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-gas .gop-det { fill: #EF4444; }
.is-gas .gop-det__ring { animation: gop-ring 1s ease-out infinite; }
@keyframes gop-ring { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }
.gop-trip { fill: #1E293B; stroke: #334155; stroke-width: 1.5; }
.gop-trip__txt { fill: #64748B; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.is-tripped .gop-trip { fill: #DC2626; stroke: #FCA5A5; animation: gop-on .5s steps(2) infinite; }
.is-tripped .gop-trip__txt { fill: #fff; }
.is-tripped .gop-line { stroke: #334155; }

/* The booth screen's welcome over Amwal Tower in 3D: the tower turns on the right, the words sit on the left */
.booth__intro--3d { position: relative; isolation: isolate; align-self: stretch; min-height: 38vh; overflow: hidden; border-radius: 28px; box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9); }
.booth__view { position: absolute; inset: 0; z-index: -2; }
.booth__view .t3d { height: 100%; aspect-ratio: auto; max-height: none; border: 0; border-radius: 0; background: #0B1630; }
.booth__intro--3d::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22, 10, 15, 0.92) 0%, rgba(22, 10, 15, 0.78) 38%, rgba(22, 10, 15, 0.1) 70%, rgba(22, 10, 15, 0) 100%); pointer-events: none; }
[dir="rtl"] .booth__intro--3d::before { background: linear-gradient(270deg, rgba(22, 10, 15, 0.92) 0%, rgba(22, 10, 15, 0.78) 38%, rgba(22, 10, 15, 0.1) 70%, rgba(22, 10, 15, 0) 100%); }
.booth__intro--3d .booth__words { position: relative; max-width: 64%; padding: 3vh 2.6vw; pointer-events: none; }
.booth__intro--3d .booth__words > * { pointer-events: auto; }
.booth__intro--3d .booth__titles { flex-direction: column; align-items: flex-start; gap: 0; }
.booth__explore { position: absolute; z-index: 1; bottom: 2vh; inset-inline-end: 1.6vw; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .8vh .6vw; max-width: 36%; }
.booth__explore-btn { min-height: 5.4vh; padding-inline: 1.1vw; background: rgba(22, 10, 15, 0.62); font-size: clamp(.85rem, 1.8vh, 1.35rem); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.booth__intro--3d .booth__count { margin-top: 1.6vh; padding: .4em .9em; font-size: clamp(.78rem, min(1vw, 1.9vh), 1.3rem); }
.booth__grid--play .booth__intro--3d .booth__credit { font-size: clamp(.72rem, min(.85vw, 1.55vh), 1.05rem); }
.booth__grid--play .booth__intro--3d .booth__sign { font-size: clamp(1rem, min(1.4vw, 2.5vh), 1.7rem); opacity: .9; }
.booth__credit-line { grid-column: 1; }
.booth__credit .booth__sign { grid-column: 2; grid-row: 1 / span 2; }
.booth__intro--3d .booth__tagline { margin-top: 1vh; }
@media (max-height: 820px) { .booth__intro--3d .booth__tagline { display: none; } }
.booth__grid--play .booth__intro--3d .booth__credit { display: grid; margin: 1.4vh 0 0; }
.booth__grid--play .booth__intro--3d ~ .booth__fact { padding-block: 1.1vh; }
.booth__grid--play .booth__intro--3d { align-self: stretch; }

/* Today's board: each game in turn, the names players chose, who played them all */
.booth__top-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6vw; }
.booth__top-clear { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); opacity: .55; cursor: pointer; }
.booth__top-clear .icon { width: 16px; height: 16px; }
.booth__top-game { display: flex; align-items: center; gap: .5em; margin-top: 1vh; color: var(--text-2); font-size: clamp(.8rem, 1.7vh, 1.25rem); font-weight: 700; }
.booth__top-game > span { display: flex; flex-wrap: wrap; gap: 0 .8em; }
.booth__top-game .icon { flex: none; width: 1.2em; height: 1.2em; color: var(--gold); }
.booth__top-list li { justify-content: space-between; }
.booth__top-name { flex: 1; min-width: 0; overflow: hidden; color: var(--text); font-size: 1em !important; text-overflow: ellipsis; white-space: nowrap; }
.booth__champs-k { display: flex; align-items: center; gap: .5em; margin-top: 1.4vh; color: var(--gold); font-size: clamp(.78rem, 1.6vh, 1.2rem); font-weight: 700; }
.booth__champs-k > span { display: flex; flex-wrap: wrap; gap: 0 .8em; }
.booth__champs { display: flex; flex-wrap: wrap; gap: .6vh .5vw; max-height: calc(1.9em + 1.2vh); margin: .8vh 0 0; padding: 0; overflow: hidden; list-style: none; }
.booth__grid--play .qr-card__code { width: min(12vw, 16.5vh); }
.booth--play .booth__top { padding: 1.1vh 1vw; }
.booth--play .booth__top-list li { font-size: clamp(.78rem, 1.75vh, 1.45rem); line-height: 1.3; }
@media (max-height: 820px) { .booth--play .booth__top-list li:nth-child(n+4) { display: none; } }
.booth__champs li { padding: .25em .7em; border-radius: 999px; background: rgba(217, 179, 108, 0.16); color: var(--gold-2); font-size: clamp(.78rem, 1.6vh, 1.2rem); font-weight: 700; }
.booth__top-pin { display: grid; justify-items: center; gap: 1vh; }
.booth__top-pin .pin__keys { grid-template-columns: repeat(3, 64px); gap: 8px; }
.booth__top-pin .pin__key { height: 54px; font-size: 22px; }
.booth__top-pin .pin__lead { font-size: clamp(.8rem, 1.6vh, 1.1rem); text-align: center; }
.booth__top-cancel { display: flex; flex-wrap: wrap; gap: 0 .6em; min-height: 44px; }

/* With the tower in 3D, the welcome takes the room above the tiles; its words are a little smaller */
.booth__grid--play { grid-template-rows: minmax(0, 1fr) auto auto; }
.booth__grid--play .booth__intro--3d { align-self: stretch; min-height: 0; }
.booth__intro--3d .booth__sub { display: none; }
.booth__grid--play .booth__intro--3d .booth__title { font-size: clamp(1.8rem, min(3.6vw, 5.8vh), 4.6rem); }
.booth__grid--play .booth__intro--3d .booth__title--ar { font-size: clamp(1.5rem, min(2.7vw, 4.6vh), 3.6rem); }
/* six games: one row of compact tiles, their names and buttons */
.booth--play .booth__tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .9vw; }
.booth--play .bp-tile { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: center; gap: .8vh .6vw; padding: 1.2vh .6vw; }
.booth--play .bp-tile__icon { grid-row: 1; grid-column: 1; }
.booth--play .bp-tile__title { grid-row: 1; grid-column: 2; }
.booth--play .bp-tile__go { grid-row: 2; grid-column: 1 / -1; }
.booth--play .bp-tile__sub { display: none; }
.booth--play .bp-tile__icon { width: 4.2vh; height: 4.2vh; border-radius: 1.2vh; }
.booth--play .bp-tile__icon .icon { width: 2.6vh; height: 2.6vh; }
.booth--play .bp-tile__title { font-size: clamp(.82rem, min(1.08vw, 2vh), 1.55rem); line-height: 1.2; }
.booth--play .bp-tile__go { grid-template-columns: 1fr 1fr; gap: .4vw; font-size: clamp(.8rem, min(1vw, 1.8vh), 1.35rem); }
.booth--play .bp-tile__btn { min-height: 5.6vh; gap: .25em; padding: 0 .2vw; }
.booth--play .bp-tile__go--one { grid-template-columns: 1fr; }
.booth--play .bp-tile__btn .icon { width: .9em; height: .9em; }
.bp-tile--desk { --accent: #F472B6; } .bp-tile--heat { --accent: #F59E0B; } .bp-tile--layers { --accent: #A3E635; } .bp-tile--operator { --accent: #22D3EE; }

/* One or two players: two big buttons */
.bp-players__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vw; }
.bp-players__opt { display: grid; justify-items: center; align-content: start; gap: 1vh; width: clamp(220px, 24vw, 440px); padding: 3vh 2vw; border: 2px solid var(--line-2); border-radius: 26px; background: var(--surface); color: var(--text); font: inherit; text-align: center; cursor: pointer; transition: border-color .2s, transform .1s; }
.bp-players__opt:active { transform: scale(0.97); }
.bp-players__opt:focus-visible { border-color: var(--gold); }
.bp-players__icon { display: grid; place-items: center; width: clamp(64px, 11vh, 120px); height: clamp(64px, 11vh, 120px); border-radius: 50%; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.bp-players__icon .icon { width: 50%; height: 50%; }
.bp-players__opt b { color: var(--gold-2); font-family: var(--font-display); font-size: clamp(1.4rem, 4vh, 3rem); }
.bp-players__opt > span:last-child { color: var(--text-2); font-size: clamp(.95rem, 2.2vh, 1.5rem); line-height: 1.4; }
.bp-desk.bp-desk--solo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.bp-desk--solo .bp-desk__side { width: min(100%, 62vw); }

/* Names that start like the one being typed: tap one instead of typing the rest */
.bp-name__hints { display: flex; flex-wrap: nowrap; justify-content: center; gap: .7vw; min-height: max(44px, 6vh); max-width: 100%; overflow: hidden; }
.bp-name__hint { flex: none; min-height: 44px; height: 6vh; padding: 0 1.3vw; border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold-2); font: inherit; font-size: clamp(1rem, 2.6vh, 1.9rem); font-weight: 800; cursor: pointer; animation: bp-hint-in .32s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.bp-name__hint:active { transform: scale(0.95); }
.bp__body.is-naming .bp-scan { display: none; }
@keyframes bp-hint-in { from { opacity: 0; transform: translateY(1.2vh) scale(0.9); } }

/* The phone's games on the TV, wide: the picture on one side, the alarms or buttons on the other */
.bp-game.bp-game--wide { width: 980px; }
.bp-game--wide .gop, .bp-game--wide .glay, .bp-game--wide .gheat { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-content: start; align-items: start; column-gap: 22px; }
.bp-game--wide .gm-hud { grid-column: 1 / -1; }
.bp-game--wide .gop { grid-template-areas: "hud hud" "pic alarm" "pic fb" "pic opts"; }
.bp-game--wide .gop__alarm { grid-area: alarm; } .bp-game--wide .gop__pic { grid-area: pic; } .bp-game--wide .gop__fb { grid-area: fb; } .bp-game--wide .gop__opts { grid-area: opts; }
.bp-game--wide .glay { grid-template-areas: "hud hud" "scene goal" "scene layers" "scene fb"; }
.bp-game--wide .glay > .gm-goal { grid-area: goal; } .bp-game--wide .glay__scene { grid-area: scene; } .bp-game--wide .glay__fb { grid-area: fb; }
.bp-game--wide .glay__layers { grid-area: layers; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.bp-game--wide .glay__layer { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-auto-flow: column; justify-items: start; align-items: center; gap: 10px; min-height: 58px; padding: 6px 14px; }
.bp-game--wide .glay__num { position: static; }
.bp-game--wide .glay__name { font-size: 15px; white-space: normal; }
.bp-game--wide .glay__n { position: static; }
.bp-game--wide .gheat { grid-template-areas: "hud hud" "scene goal" "scene demo" "scene crew" "scene call" "scene fb"; }
.bp-game--wide .gheat > .gm-goal { grid-area: goal; } .bp-game--wide .gheat__scene { grid-area: scene; } .bp-game--wide .gheat__demo { grid-area: demo; } .bp-game--wide .gheat__crew { grid-area: crew; grid-template-columns: repeat(2, minmax(0, 1fr)); } .bp-game--wide .gheat__call { grid-area: call; } .bp-game--wide .gheat__fb { grid-area: fb; }
.bp-game--wide .gop__pic, .bp-game--wide .glay__scene, .bp-game--wide .gheat__scene { max-width: 100%; min-width: 0; }

/* A name for the board, typed on the screen's own keys */
.bp-result { position: relative; }
.bp-result__name { margin-top: 1vh; }
.bp-result__named { min-height: 1.4em; margin: 0; color: var(--gold-2); font-size: clamp(1rem, 2.4vh, 1.8rem); font-weight: 700; text-align: center; }
.bp-result__named:empty { display: none; }
.bp-result__sub { color: var(--text-3); font-size: clamp(.8rem, 1.7vh, 1.2rem); }
.bp-name { position: absolute; inset: -2vh -2vw; z-index: 6; display: grid; align-content: center; justify-items: center; gap: 1.6vh; padding: 3vh 3vw; border-radius: 28px; background: var(--bg); box-shadow: 0 0 0 100vmax rgba(10, 4, 7, 0.6); }
.bp-name__title { margin: 0; color: var(--gold-2); font-family: var(--font-display); font-size: clamp(1.4rem, 4vh, 3rem); text-align: center; }
.bp-name__note { max-width: 60ch; margin: 0; color: var(--text-2); font-size: clamp(.9rem, 2vh, 1.4rem); text-align: center; }
.bp-name__who { margin: 0; color: var(--gold); font-size: clamp(1rem, 2.4vh, 1.7rem); font-weight: 800; }
.bp-name__value { min-width: min(60vw, 24ch); margin: 0; padding: .4em 1em; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); color: var(--text); font-size: clamp(1.4rem, 4.4vh, 3.2rem); font-weight: 800; text-align: center; unicode-bidi: plaintext; }
.bp-name__value.is-empty { color: var(--text-3); font-weight: 600; }
.bp-keys { display: grid; gap: 1vh; }
.bp-keys__row { display: flex; justify-content: center; gap: .6vw; }
.bp-key { display: grid; place-items: center; min-width: clamp(44px, 5.4vw, 92px); height: clamp(48px, 7.4vh, 84px); padding: 0 .4em; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--text); font: inherit; font-size: clamp(1.1rem, 3vh, 2rem); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.bp-key:active { background: var(--surface-3); transform: scale(0.95); }
.bp-key .icon { width: 1.1em; height: 1.1em; }
.bp-key--wide { min-width: clamp(80px, 9vw, 150px); font-size: clamp(.95rem, 2.4vh, 1.6rem); }
.bp-key--space { min-width: clamp(200px, 30vw, 520px); color: var(--text-3); font-size: clamp(.9rem, 2.2vh, 1.4rem); }
.bp-name__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vw; }
.bp-name__save:disabled { opacity: .45; }

/* The phone's games on the TV, zoomed to fill it */
.bp-game__wrap { display: grid; justify-items: center; align-content: start; height: 100%; overflow: auto; }
.bp-game { width: 420px; max-width: 100%; }
.bp-game .gheat__scene, .bp-game .glay__scene, .bp-game .gop__pic, .bp-desk__stage .gdesk__scene { max-width: 100%; }
/* Control room opens before its first alarm: room kept for the three choices, so the game is zoomed to its full height */
.bp-game .gop__opts { min-height: 190px; align-content: start; }

/* Heat watch: pick the crew and the heat */
.bp-setup { display: grid; justify-items: center; align-content: center; gap: 2.2vh; height: 100%; text-align: center; }
.bp-setup__icon { display: grid; place-items: center; width: clamp(56px, 9vh, 96px); height: clamp(56px, 9vh, 96px); border-radius: 26%; background: radial-gradient(circle at 35% 30%, #FFF3D6, #F59E0B 60%, #B45309); color: #3A1608; }
.bp-setup__icon .icon { width: 55%; height: 55%; }
.bp-setup__title { margin: 0; color: var(--gold-2); font-family: var(--font-display); font-size: clamp(1.5rem, 4.4vh, 3.4rem); }
.bp-setup__lead { max-width: 60ch; margin: 0; color: var(--text-2); font-size: clamp(1rem, 2.3vh, 1.6rem); }
.bp-setup__group { display: grid; justify-items: center; gap: 1vh; }
.bp-setup__k { margin: 0; color: var(--gold); font-size: clamp(.95rem, 2.2vh, 1.5rem); font-weight: 800; }
.bp-setup__opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vw; }
.bp-setup__opt { min-width: clamp(110px, 11vw, 200px); min-height: clamp(52px, 7.6vh, 84px); padding: 0 1.2vw; border: 2px solid var(--line-2); border-radius: 18px; background: var(--surface); color: var(--text); font: inherit; font-size: clamp(1rem, 2.5vh, 1.7rem); font-weight: 700; cursor: pointer; }
.bp-setup__opt[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 18%, var(--surface)); color: var(--gold-2); }
.bp-setup__note { display: flex; align-items: center; gap: .5em; margin: 0; color: var(--text-2); font-size: clamp(.9rem, 2vh, 1.4rem); }
.bp-setup__note .icon { color: var(--gold); }
.bp-setup__go { min-width: min(40vw, 520px); min-height: 7.4vh; font-size: clamp(1.05rem, 2.6vh, 1.9rem); }

/* Desk duel: two desks side by side */
.bp-desk__wrap { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.4vh; height: 100%; }
.bp-desk__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.4vw; }
.bp-desk { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; min-height: 0; }
.bp-desk__side { display: grid; grid-template-rows: auto minmax(0, 1fr); justify-items: center; gap: .8vh; min-height: 0; padding: 1vh 1vw; border-radius: 24px; border: 2px solid var(--line); background: rgba(34, 17, 23, 0.6); }
.bp-desk__side.bp-side--p1 { border-color: rgba(56, 189, 248, 0.45); }
.bp-desk__side.bp-side--p2 { border-color: rgba(244, 114, 182, 0.45); }
.bp-desk__side.is-done { opacity: .6; }
.bp-desk__stage { width: 400px; max-width: 100%; overflow: hidden; }

/* ---------- Playing a mini game: the game takes the whole screen ----------
   html.is-gaming (arcade.js) hides the top bar and the game's heading and narrows the
   side margins; a slim bar takes their place: quit, the game's name, sound. */
.gm-top { display: none; }
html.is-gaming { --appbar-h: 0px; --gutter: 10px; }
html.is-gaming .appbar { display: none; }
html.is-gaming .view--game { padding-top: max(6px, env(safe-area-inset-top, 0px)); }
html.is-gaming .view--game .play-head { margin-bottom: 8px; }
html.is-gaming .view--game .play-head__kicker { display: none; }
html.is-gaming .gm-top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.gm-top .sharebtn { width: 44px; height: 44px; }
.gm-top__quit { color: var(--text-2); }
.gm-top__title { display: inline-flex; flex: 1; min-width: 0; align-items: center; justify-content: center; gap: 7px; margin: 0; color: var(--ink, var(--accent)); font-size: 14px; font-weight: 700; }
.gm-top__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-top__title .icon { flex: none; width: 18px; height: 18px; }
html.is-gaming .app { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
/* the games with the most under their picture, so they fit a phone screen without scrolling */
html.is-gaming .esc__board { min-width: 224px; }
html.is-gaming .esc__pad { grid-template-columns: repeat(3, 60px); gap: 5px; }
html.is-gaming .esc__btn { min-height: 44px; }
html.is-gaming .gp__board { gap: 10px; padding: 10px; }
html.is-gaming .gp__tray { gap: 6px; }
html.is-gaming .gp-dev { padding: 4px 10px 4px 5px; font-size: 13px; }
html.is-gaming .mm__board { min-width: 240px; }

/* ---------- Light mode (html.theme-light): touches on single parts ----------
   (here at the end so they win over the parts' own rules above) */
:where(html.theme-light) .mf__actions .btn--primary, :where(html.theme-light) .game-card--myths { --accent: #C99A45; }
:where(html.theme-light) .modal__scrim { background: rgba(35, 18, 26, 0.42); }
/* the 3D first screen sits on the page as a card */
:where(html.theme-light) .stage { margin-bottom: 14px; border-end-start-radius: 28px; border-end-end-radius: 28px; box-shadow: 0 22px 44px -26px rgba(40, 12, 22, 0.55); }
:where(html.theme-light) .hero__map:not(.hero *) { border-color: rgba(15, 138, 95, 0.35); background: rgba(15, 138, 95, 0.08); color: #0B6B4A; }
:where(html.theme-light) .contact__num, :where(html.theme-light) .control__label output { color: #0A63A8; }
:where(html.theme-light) .pill--pending { background: rgba(245, 165, 36, 0.16); color: #8F5000; }
:where(html.theme-light) .insight__extra, :where(html.theme-light) .feedback--no .feedback__verdict, :where(html.theme-light) .btn--myth .icon, :where(html.theme-light) .mf-card__hint-myth, :where(html.theme-light) .mf-card__back--no .mf-card__verdict { color: var(--bad-text); }
:where(html.theme-light) .stamp-slot { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink); }
:where(html.theme-light) .topic__stamp .stamp-slot, :where(html.theme-light) .world__stamp .stamp-slot, :where(html.theme-light) .world__stamp > span { background: var(--surface); }
/* Myth or Fact: a white card */
:where(html.theme-light) .mf-card__face { background: linear-gradient(160deg, #FFFFFF, #FAF4EC); }
:where(html.theme-light) .mf-card__answer { background: var(--tint-2); }
:where(html.theme-light) .btn--choice { background: var(--surface); }
@media (max-width: 699px) and (min-height: 600px) { :where(html.theme-light) .lab__screen { box-shadow: 0 12px 16px -14px rgba(60, 20, 32, 0.4); } }


/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}

/* ---------- Print ---------- */
@media print {
  .appbar, .toast, .modal, .ceremony { display: none !important; }
  body { background: #fff; color: #000; }
}
