/* Olive Festival game. Look: Eng. Amer's brown, gold and green, drawn like a festival in a mall. */
:root {
  --brown-900: #2A2118;
  --brown-800: #3B2F23;
  --green: #0E7043;
  --green-2: #10964A;      /* non-text accents only */
  --tan: #D3BD90;
  --cream: #FBF5E6;
  --cream-2: #F5E6BE;
  --sand: #E9DDC2;
  --gold: #E2C98A;
  --gold-dark: #8C6B2E;
  --gold-grad: linear-gradient(135deg, #F5E6BE 0%, #F3DFAE 45%, #D3BD90 100%);
  --wood: #8A5A2B;
  --wood-dark: #4F3014;
  --ink: #1E1E16;
  --muted: #4A4A3C;        /* 8.4:1 on cream */
  --ok: #1F6B2E;
  --ok-bg: #E3F1DA;
  --warn: #8A3B12;
  --warn-bg: #F8E4DA;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: #D9CFB3;
  font-family: "Almarai", system-ui, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  display: flex; justify-content: center;
}
.app {
  position: relative;
  width: 100%; max-width: 440px;
  height: 100dvh; min-height: 560px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 40px rgba(0, 0, 0, .18);
}
.desk-note { display: none; }
@media (min-width: 760px) {
  .desk-note {
    display: block; position: fixed; top: 20px; right: 20px; max-width: 240px;
    background: var(--cream); border: 2px solid var(--brown-800); border-radius: 14px;
    padding: 12px 14px; font-size: 15px;
  }
}
.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; }

/* ── Buttons: chunky, pressed into the page ── */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 12px 20px; border-radius: 16px;
  font: inherit; font-weight: 800; font-size: 19px; text-decoration: none;
  background: var(--brown-800); color: #fff;
  box-shadow: 0 5px 0 var(--brown-900);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brown-900); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-dark); }
.btn.gold:active { box-shadow: 0 1px 0 var(--gold-dark); }
.btn.ghost { background: #fff; color: var(--brown-900); border: 2px solid var(--brown-800); box-shadow: none; }
.btn-link {
  min-height: 48px; padding: 8px 4px; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--green); text-decoration: underline; cursor: pointer;
}
.btn-link[disabled] { color: var(--muted); text-decoration: none; cursor: default; }

/* ── Intro screens: brown band, cream card ── */
.screen-intro {
  background:
    radial-gradient(circle at 85% 8%, rgba(226, 201, 138, .22) 0 90px, transparent 91px),
    linear-gradient(180deg, var(--brown-800) 0 300px, var(--cream) 300px);
  padding: calc(24px + var(--safe-top)) 18px calc(24px + var(--safe-b));
}
.screen-intro .hero-small + .card { margin-top: 4px; }
.screen-intro:has(.hero-small) {
  background:
    radial-gradient(circle at 85% 8%, rgba(226, 201, 138, .22) 0 70px, transparent 71px),
    linear-gradient(180deg, var(--brown-800) 0 170px, var(--cream) 170px);
}
.hero { color: #fff; text-align: center; margin-bottom: 18px; }
.badge {
  display: inline-block; background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: 15px; padding: 4px 14px; border-radius: 999px; margin-bottom: 12px;
}
.hero h1 { font-size: 30px; line-height: 1.3; font-weight: 800; }
.logo-badge {
  width: 124px; height: 124px; border-radius: 50%; background: var(--gold-grad);
  display: grid; place-items: center; margin: 0 auto 12px;
  box-shadow: 0 0 0 4px var(--brown-900), 0 0 0 7px var(--gold);
}
.logo-badge img { width: 78%; height: auto; display: block; }
/* Olive branches around the logo, like a wreath */
.logo-wrap { position: relative; width: 124px; margin: 0 auto 12px; }
.logo-wrap .logo-badge { position: relative; z-index: 1; margin: 0; }
.logo-wrap .branch { position: absolute; width: 178px; height: auto; bottom: -14px; pointer-events: none; }
/* each branch starts under the logo and curves up its side */
.logo-wrap .branch-r { left: 50%; transform-origin: 0 50%; transform: rotate(-20deg); }
.logo-wrap .branch-l { left: 50%; transform-origin: 0 50%; transform: scaleX(-1) rotate(-20deg); }
@media (max-width: 360px) { .logo-wrap .branch { width: 150px; } }
.card {
  background: #fff; border-radius: var(--radius); padding: 22px 18px;
  box-shadow: 0 10px 30px rgba(42, 33, 24, .15);
}
.lead { color: var(--muted); font-size: 17px; margin-bottom: 16px; }
.lead-strong { font-size: 19px; font-weight: 700; text-align: center; margin-bottom: 20px; }

/* ── Forms ── */
.field { margin-bottom: 16px; }
.field label, .choice legend { display: block; font-weight: 700; font-size: 17px; margin-bottom: 6px; }
input[type=text], input[type=tel] {
  width: 100%; min-height: 54px; padding: 10px 14px;
  font: inherit; font-size: 18px; color: var(--ink);
  border: 2px solid #8C8C78; border-radius: 14px; background: var(--cream);
}
input:focus-visible { outline: none; border-color: var(--brown-800); box-shadow: 0 0 0 3px rgba(140, 107, 46, .45); }
input[aria-invalid="true"] { border-color: var(--warn); }
.hint { font-size: 15px; color: var(--muted); margin-top: 4px; }
.err { font-size: 15px; color: var(--warn); font-weight: 700; margin-top: 4px; }
.form-error { color: var(--warn); background: var(--warn-bg); font-weight: 700; font-size: 16px; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.consent { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.turnstile:empty { display: none; }
.turnstile { margin-bottom: 14px; }

/* phone: country code then number, read left to right */
.phone-row { display: flex; gap: 8px; direction: ltr; }
.phone-row input { flex: 1; min-width: 0; text-align: left; }
.cc { position: relative; flex: 0 0 104px; }
.cc-show {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 100%; min-height: 54px; padding: 0 10px;
  background: var(--cream-2); border: 2px solid #8C8C78; border-radius: 14px;
  font-weight: 800; font-size: 18px; color: var(--brown-900);
}
.cc select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  font-size: 16px; /* stops iOS zoom */
}
.cc:has(select:focus-visible) .cc-show { border-color: var(--brown-800); box-shadow: 0 0 0 3px rgba(140, 107, 46, .45); outline: 3px solid var(--gold-dark); outline-offset: 2px; }

.choice { border: 0; margin: 4px 0 16px; }
.choice .opts { display: grid; gap: 10px; }
.choice label {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; margin: 0;
  border: 2px solid #8C8C78; border-radius: 14px; background: var(--cream);
  font-weight: 700; font-size: 17px; cursor: pointer;
}
.choice input { width: 22px; height: 22px; accent-color: var(--brown-800); flex: 0 0 22px; }
.choice label:has(input:checked) { border-color: var(--brown-800); background: var(--ok-bg); }
.choice label:has(input:focus-visible) { outline: 3px solid var(--gold-dark); outline-offset: 2px; }

/* OTP: one real input over six drawn boxes */
.otp-boxes { position: relative; direction: ltr; }
.otp-boxes input {
  position: relative; z-index: 1; background: transparent; border-color: transparent;
  color: transparent; caret-color: transparent; font-size: 26px;
}
.otp-boxes input:focus-visible { box-shadow: none; }
.otp-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.otp-cells span {
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #8C8C78; border-radius: 12px; background: var(--cream);
  font-size: 26px; font-weight: 800;
}
.otp-boxes:focus-within .otp-cells span.is-active { border-color: var(--brown-800); box-shadow: 0 0 0 3px rgba(140, 107, 46, .45); }
.otp-boxes:focus-within .otp-cells { outline: 3px solid var(--gold-dark); outline-offset: 4px; border-radius: 14px; }
.otp-boxes input[aria-invalid="true"] ~ .otp-cells span { border-color: var(--warn); }
.otp-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ── Game ── */
.screen-game { overflow: hidden; background: #EDE6D6; }
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  padding: calc(10px + var(--safe-top)) 14px 18px;
  background: linear-gradient(180deg, rgba(42, 33, 24, .94) 60%, rgba(42, 33, 24, 0));
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar .who { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.progress { display: flex; gap: 6px; list-style: none; }
.progress .dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, .12); color: #fff;
}
.progress .dot.is-done { background: #fff; color: var(--brown-900); }
.progress .dot.is-current { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.viewport { position: absolute; inset: 0; overflow: hidden; direction: ltr; }
.world {
  position: absolute; left: 0; right: 0; top: 0;
  will-change: transform;
  transition-property: transform; transition-timing-function: cubic-bezier(.45, .05, .35, 1);
  /* shiny mall tiles */
  background:
    radial-gradient(ellipse 60% 120px at 40% 50%, rgba(255, 255, 255, .55), transparent 70%) 0 0 / 100% 320px,
    linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(0deg, rgba(0, 0, 0, .05) 1px, transparent 1px) 0 0 / 48px 48px,
    #EDE6D6;
}
/* the path: gold carpet */
.road {
  position: absolute; top: 0; bottom: 0; left: 22%; width: 30%;
  background: linear-gradient(90deg, #D3BD90, #E2CFA2 50%, #D3BD90);
  border-left: 4px solid #B89F6C; border-right: 4px solid #B89F6C;
}
.road::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 8px; right: 8px;
  border-left: 2px dashed rgba(255, 255, 255, .7); border-right: 2px dashed rgba(255, 255, 255, .7);
}
.light {
  position: absolute; left: 12%; width: 76%; height: 90px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 247, 220, .75), transparent 70%);
}
/* mall shops on the left */
.shops { position: absolute; top: 0; bottom: 0; left: 0; width: 19%; background: var(--brown-800); border-right: 5px solid var(--gold-dark); }
.shop { position: absolute; left: 0; width: 100%; height: 150px; border-top: 5px solid var(--gold-dark); }
.shop .glass {
  position: absolute; top: 10px; bottom: 10px; left: 6px; right: 8px; border-radius: 4px; opacity: .9;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08) 55%), var(--c);
}
.shop .door { position: absolute; right: 8px; top: 50px; width: 6px; height: 50px; background: var(--cream-2); border-radius: 2px; }
.pillar {
  position: absolute; left: 19%; width: 16px; height: 16px; margin-left: -3px;
  background: var(--gold-dark); border-radius: 3px; box-shadow: 0 0 0 3px var(--cream-2);
}
.planter { position: absolute; right: 4%; width: 11%; }
.arch { position: absolute; left: 18%; width: 38%; }
.arch .sign {
  direction: rtl; background: var(--brown-900); color: #fff; font-weight: 800; font-size: 15px;
  padding: 6px 8px; border-radius: 10px; border: 3px solid var(--gold); text-align: center; line-height: 1.3;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .15);
}

/* booths on the right */
.booth { position: absolute; right: 3%; width: 42%; height: 190px; }
.booth.amer { height: 210px; }
.booth .awning {
  position: relative; height: 46px; border-radius: 12px 12px 4px 4px;
  background: repeating-linear-gradient(90deg, var(--green) 0 18px, #fff 18px 36px);
  border: 3px solid var(--brown-900);
}
.booth .awning::after { /* scalloped edge */
  content: ""; position: absolute; left: -3px; right: -3px; bottom: -14px; height: 14px;
  background: radial-gradient(circle at 9px 0, var(--green) 9px, transparent 10px) 0 0 / 18px 14px;
}
.booth .body {
  position: absolute; top: 46px; left: 6px; right: 6px; bottom: 0; overflow: hidden;
  background: var(--wood); border: 3px solid var(--wood-dark); border-top: 0; border-radius: 0 0 8px 8px;
}
.booth .back { position: absolute; inset: 0 0 54px 0; background: #F3E3BC; }
.booth .goods { position: absolute; left: 8px; right: 8px; top: 10px; display: flex; justify-content: space-between; }
.booth .merchant { position: absolute; left: 50%; bottom: 46px; width: 56px; margin-left: -28px; transform-origin: bottom center; }
.booth .counter {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: #A9702F; border-top: 4px solid var(--wood-dark);
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.booth .label {
  direction: rtl; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 14px; line-height: 1.2;
  padding: 4px 8px; border-radius: 8px; border: 2px solid var(--wood-dark); text-align: center; max-width: 100%;
}
.booth.amer .awning { background: repeating-linear-gradient(90deg, var(--gold) 0 18px, var(--brown-900) 18px 36px); }
.booth.amer .awning::after { background: radial-gradient(circle at 9px 0, var(--gold) 9px, transparent 10px) 0 0 / 18px 14px; }
.booth.amer .body { background: var(--brown-900); border-color: #0F0B07; }
.booth.amer .back { background: var(--cream); }
.booth.amer .counter { background: var(--brown-800); border-top-color: var(--gold); }
.booth.amer .label { background: var(--gold); border-color: var(--brown-900); }
.booth .logo {
  position: absolute; left: 6px; top: 6px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-grad); border: 3px solid var(--brown-900); display: grid; place-items: center; overflow: hidden;
}
.booth .logo img { width: 82%; }
.booth.amer .goods { left: auto; right: 8px; width: 48%; }
.booth.is-waving .merchant { animation: wave .9s ease-in-out 2; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 60% { transform: rotate(6deg); } }

/* the player */
.player {
  position: absolute; left: 37%; width: 54px; margin-left: -27px; z-index: 10;
  transition: transform .55s ease, top .35s ease;
  pointer-events: none;
}
.player svg { display: block; overflow: visible; }
.player .pose-side { display: none; }
.player.is-facing .pose-front { display: none; }
.player.is-facing .pose-side { display: block; }
/* steps to the kiosk counter; the distance is measured per screen in app.js (faceKiosk) */
.player.is-facing { transform: translateX(var(--face-x, 0px)); }
.player .leg, .player .arm { transform-box: fill-box; transform-origin: 50% 0; }
.player.is-walking .torso { animation: bob .36s ease-in-out infinite; }
.player.is-walking .leg-l, .player.is-walking .arm-r { animation: step .36s ease-in-out infinite alternate; }
.player.is-walking .leg-r, .player.is-walking .arm-l { animation: step .36s ease-in-out infinite alternate-reverse; }
.player .shadow { width: 40px; height: 10px; margin: -4px auto 0; background: rgba(0, 0, 0, .25); border-radius: 50%; }
.player.is-walking .shadow { animation: shadow .36s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes step { from { transform: scaleY(1); } to { transform: scaleY(.72); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.85); } }

.walkbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 18px 16px calc(16px + var(--safe-b));
  background: linear-gradient(0deg, rgba(42, 33, 24, .92) 50%, rgba(42, 33, 24, 0));
}
.walkbar .tip { color: #fff; text-align: center; font-weight: 700; font-size: 17px; min-height: 27px; }

/* ── Question sheet ── */
.scrim { position: absolute; inset: 0; z-index: 30; background: rgba(15, 12, 8, .45); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 31;
  background: var(--cream); border-radius: 24px 24px 0 0;
  padding: 14px 18px calc(20px + var(--safe-b));
  max-height: 88%; overflow-y: auto;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
  animation: sheet-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheet-in { from { transform: translateY(105%); } to { transform: translateY(0); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: #B9B39A; margin: 0 auto 12px; }
.speaker { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.speaker .av {
  flex: 0 0 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--cream-2); border: 3px solid var(--brown-800); display: grid; place-items: center;
}
.speaker .av.is-amer { background: var(--gold-grad); }
.speaker .av img { width: 82%; }
.speaker .av svg { width: 100%; margin-top: 10px; }
.speaker .name { font-weight: 800; font-size: 18px; line-height: 1.3; }
.speaker .place { font-size: 15px; color: var(--muted); }
.bubble { background: #fff; border: 2px solid var(--tan); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.bubble .greet { display: block; color: var(--muted); font-size: 16px; margin-bottom: 4px; }
.bubble .q { font-weight: 800; font-size: 20px; line-height: 1.45; }
.options { display: grid; gap: 10px; }
.opt {
  appearance: none; font: inherit; text-align: right; cursor: pointer;
  min-height: 56px; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--brown-800); background: #fff; color: var(--ink);
  font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.opt .k {
  flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--cream-2); color: var(--brown-900);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.opt .mark { margin-inline-start: auto; font-size: 15px; font-weight: 800; }
.opt[disabled] { cursor: default; }
.opt.is-right { background: var(--ok-bg); border-color: var(--ok); }
.opt.is-right .k { background: var(--ok); color: #fff; }
.opt.is-right .mark { color: var(--ok); }
.opt.is-wrong { background: var(--warn-bg); border-color: var(--warn); }
.opt.is-wrong .k { background: var(--warn); color: #fff; }
.opt.is-wrong .mark { color: var(--warn); }
.opt.is-dim { opacity: .6; }
.feedback:empty { display: none; }
.feedback { margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 17px; }
.feedback.is-right { background: var(--ok-bg); }
.feedback.is-wrong { background: var(--warn-bg); }
.feedback .verdict { font-weight: 800; }
.feedback.is-right .verdict { color: var(--ok); }
.feedback.is-wrong .verdict { color: var(--warn); }
.feedback .fact { display: block; margin-top: 4px; font-size: 16px; color: var(--ink); }
.sheet-actions { display: grid; gap: 12px; margin-top: 14px; }
.notify-done { padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 700; text-align: center; }
.auto-bar { height: 4px; border-radius: 2px; background: var(--sand); overflow: hidden; }
.auto-bar span { display: block; height: 100%; width: 100%; background: var(--gold-dark); transform-origin: right; }
.auto-bar.is-running span { animation: drain linear forwards; animation-duration: var(--d, 5s); }
.auto-bar.is-paused { visibility: hidden; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Result screens ── */
.screen-dark {
  background:
    radial-gradient(circle at 50% 0%, rgba(226, 201, 138, .35) 0 160px, transparent 161px),
    var(--brown-800);
  color: #fff; text-align: center;
  padding: calc(26px + var(--safe-top)) 20px calc(24px + var(--safe-b));
}
.result-art { display: flex; justify-content: center; margin-bottom: 6px; }
.screen-dark h1 { font-size: 30px; line-height: 1.3; margin: 6px 0 4px; }
.screen-dark .sub { color: #F3EFD9; font-size: 19px; }
.screen-dark .score { color: #F3EFD9; font-size: 18px; margin: 4px 0 18px; }
.screen-dark .form-error { text-align: start; }
.coupon-wrap { margin-top: 8px; }
.coupon {
  position: relative; background: var(--cream); color: var(--ink); border-radius: 20px;
  padding: 18px 18px 18px; text-align: center; margin-bottom: 16px;
  -webkit-mask:
    radial-gradient(circle 14px at 0 62%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 62%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle 14px at 0 62%, transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 14px at 100% 62%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.coupon-logo {
  width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%;
  background: var(--gold-grad); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--brown-900);
}
.coupon-logo img { width: 80%; height: auto; }
.coupon .type { font-size: 16px; font-weight: 700; color: var(--muted); }
.coupon .big { font-size: 38px; font-weight: 800; color: var(--brown-900); line-height: 1.2; margin: 2px 0 8px; }
.coupon .cut { border-top: 3px dashed #B9B39A; margin: 12px 6px; }
.coupon .code-l { font-size: 15px; color: var(--muted); }
.coupon .code {
  direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 800; letter-spacing: 2px;
  background: #fff; border: 2px dashed var(--brown-800); border-radius: 12px; padding: 8px; margin: 6px auto 6px;
  display: inline-block; min-width: 80%; user-select: all; word-break: break-all;
}
.coupon .for { font-size: 16px; color: var(--muted); font-weight: 700; }
.coupon .note { font-size: 15px; margin-top: 8px; }
.actions { display: grid; gap: 12px; }

/* ── Reduced motion: no walking, instant moves ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═════════════════════════════════════════════════════════════
   Liquid Glass layer (macOS 27 kit look) in Eng. Amer's colours.
   Translucent panels with a lit top edge, capsule controls,
   a segmented switch, floating glass bars in the game.
   ═════════════════════════════════════════════════════════════ */
:root {
  --night: #15110C;
  --glass-light: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 252, 244, .74));
  --glass-dark: rgba(30, 24, 17, .48);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 -1px 0 rgba(255, 255, 255, .25) inset, 0 24px 60px rgba(8, 6, 3, .42);
  --capsule: 999px;
  --ease-spring: cubic-bezier(.2, .9, .25, 1.15);
}
body { background: #0E0B07; }
.app { background: var(--night); }

/* ambient scene behind the intro screens */
.ambient { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, #2B4A2A 0%, rgba(43, 74, 42, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, #3B2A18 0%, rgba(59, 42, 24, 0) 70%),
    linear-gradient(180deg, #1A2A1A 0%, #17120C 55%, #120E09 100%);
}
.ambient .glow { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .7; }
.ambient .g1 { width: 280px; height: 280px; top: -80px; right: -60px; background: radial-gradient(circle, rgba(226, 201, 138, .55), transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.ambient .g2 { width: 320px; height: 320px; bottom: 8%; left: -120px; background: radial-gradient(circle, rgba(16, 150, 74, .45), transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; }
.ambient .g3 { width: 220px; height: 220px; top: 38%; right: -90px; background: radial-gradient(circle, rgba(211, 189, 144, .35), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
.ambient .amb-branch { position: absolute; width: 300px; opacity: .16; }
.ambient .b1 { top: 54%; left: -110px; transform: rotate(-24deg); }
.ambient .b2 { top: 70%; right: -120px; transform: rotate(150deg); opacity: .12; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(20px, 30px) scale(1.12); } }
.screen { z-index: 1; }
.screen-game, .screen-dark { z-index: 2; }

/* intro screens sit on the ambient scene */
.screen-intro, .screen-intro:has(.hero-small) {
  background: transparent;
  padding: calc(28px + var(--safe-top)) 16px calc(22px + var(--safe-b));
}
#screen-welcome { justify-content: space-between; }
.hero { margin-bottom: 20px; }
.hero h1 { font-size: 32px; letter-spacing: -.3px; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-small h1 { font-size: 28px; }

/* glass chips */
.badge {
  background: rgba(255, 255, 255, .14); color: #FFF7E2; border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset; padding: 5px 14px; font-weight: 700;
}
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 0; padding: 0; }
.chips li {
  font-size: 14px; font-weight: 700; color: #FFF7E2; padding: 6px 12px; border-radius: var(--capsule);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.logo-badge { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 0 0 6px rgba(226, 201, 138, .22), 0 18px 40px rgba(0, 0, 0, .45); }

/* the Liquid Glass card */
.card {
  position: relative; background: var(--glass-light); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--glass-shadow); border-radius: 30px; padding: 22px 18px 18px;
  animation: rise .6s var(--ease-spring) both;
}
.card::before { /* specular sheen along the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 22%);
}
.card > * { position: relative; }
.card-welcome { margin-top: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.lead-strong { font-size: 18px; line-height: 1.7; }

.step { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.step-dot { width: 22px; height: 6px; border-radius: 3px; background: rgba(42, 33, 24, .16); }
.step-dot.is-on { background: var(--green); }
.step .step-dot:last-of-type { margin-inline-end: 4px; }

/* capsule buttons */
.btn { border-radius: var(--capsule); min-height: 56px; font-size: 18px;
  transition: transform .18s var(--ease-spring), box-shadow .18s ease; }
.btn:active { transform: scale(.97); }
.btn.gold {
  background: linear-gradient(180deg, #F6E3B4 0%, #E2C98A 55%, #CDAE6C 100%); color: #1E1E16;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 -2px 0 rgba(140, 107, 46, .35) inset, 0 10px 24px rgba(140, 107, 46, .42);
}
.btn.gold:active { box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 4px 10px rgba(140, 107, 46, .4); }
.btn.green, .sheet .btn:not(.gold) {
  background: linear-gradient(180deg, #14915A 0%, #0E7043 60%, #0A5A35 100%); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 24px rgba(14, 112, 67, .38);
}
.btn.ghost { background: rgba(255, 255, 255, .7); border: 1px solid rgba(42, 33, 24, .2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* glass fields */
input[type=text], input[type=tel] {
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(42, 33, 24, .2); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05) inset; min-height: 54px;
}
input:focus-visible { border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(226, 201, 138, .55); }
.cc-show { border-radius: 16px; background: rgba(245, 230, 190, .75); border: 1px solid rgba(42, 33, 24, .2); }

/* macOS segmented control for the tried-before question */
.choice.segmented .opts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px;
  background: rgba(118, 118, 128, .16); border-radius: 16px;
}
.choice.segmented label {
  position: relative; justify-content: center; text-align: center; min-height: 52px; padding: 8px 10px;
  border: 0; border-radius: 13px; background: transparent; font-size: 15.5px; line-height: 1.35;
  transition: background .2s ease, box-shadow .2s ease;
}
.choice.segmented input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice.segmented label:has(input:checked) {
  background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06); color: var(--green);
}
.choice.segmented label:has(input:checked)::after { content: "\2713"; margin-inline-start: 6px; font-weight: 800; }
.choice.segmented label:has(input:focus-visible) { outline: 3px solid var(--gold-dark); outline-offset: 2px; }

/* OTP cells as glass tiles */
.otp-cells span { border-radius: 14px; background: rgba(255, 255, 255, .8); border: 1px solid rgba(42, 33, 24, .2); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.otp-boxes:focus-within .otp-cells span.is-active { border-color: var(--gold-dark); box-shadow: 0 0 0 4px rgba(226, 201, 138, .55); }
.otp-boxes:focus-within .otp-cells { outline: none; }
.form-error { border-radius: 14px; }

/* Game: floating glass bars */
.topbar {
  top: calc(8px + var(--safe-top)); left: 10px; right: 10px; padding: 8px 10px 8px 14px; border-radius: var(--capsule);
  background: var(--glass-dark); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 30px rgba(0, 0, 0, .3);
}
.walkbar { background: none; padding: 0 14px calc(14px + var(--safe-b)); }
.walkbar .tip {
  display: table; margin: 0 auto; padding: 10px 18px; border-radius: var(--capsule);
  background: var(--glass-dark); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 30px rgba(0, 0, 0, .3);
}
.walkbar .tip:empty { display: none; }

/* glass question sheet */
.scrim { background: rgba(10, 8, 5, .38); }
.sheet {
  left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); border-radius: 32px;
  background: var(--glass-light); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--glass-shadow); padding: 12px 16px 16px;
  animation: sheet-in .45s var(--ease-spring);
}
.sheet .grab { background: rgba(42, 33, 24, .25); }
.speaker .av { border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.bubble { background: rgba(255, 255, 255, .8); border: 1px solid rgba(211, 189, 144, .7); border-radius: 20px; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.opt {
  border-radius: 18px; border: 1px solid rgba(42, 33, 24, .22); background: rgba(255, 255, 255, .78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05); transition: transform .15s var(--ease-spring), background .15s ease;
}
.opt:not([disabled]):active { transform: scale(.98); }
.opt.is-right { border-color: var(--ok); }
.opt.is-wrong { border-color: var(--warn); }
.feedback, .notify-done { border-radius: 18px; }

/* Results: dark glass */
.screen-dark {
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(226, 201, 138, .35), transparent 70%),
    radial-gradient(80% 50% at 0% 100%, rgba(16, 150, 74, .3), transparent 70%),
    linear-gradient(180deg, #1D2A1B, #15100B);
}
.coupon-wrap { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); border-radius: 30px; padding: 12px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: rise .6s var(--ease-spring) both; }
.coupon { border-radius: 22px; }
.result-art svg { filter: drop-shadow(0 10px 24px rgba(226, 201, 138, .45)); animation: pop .7s var(--ease-spring) both; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* phones: tidy spacing on short screens */
@media (max-height: 700px) {
  .hero h1 { font-size: 27px; }
  .logo-badge { width: 104px; height: 104px; }
  .logo-wrap { width: 104px; }
  .chips { margin-top: 10px; }
  .card { padding: 18px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient .glow, .card, .coupon-wrap, .result-art svg { animation: none !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .sheet { background: #FFFDF7; }
  .topbar, .walkbar .tip { background: rgba(30, 24, 17, .9); }
}

/* welcome: logo area centred above the card */
#screen-welcome .hero { margin-top: auto; margin-bottom: auto; padding-bottom: 12px; }
#screen-welcome .card-welcome { margin-top: 0; }
#otp-phone { white-space: nowrap; }
