button { font: inherit; margin: 0; } img { max-width: 100%; display: block; }




:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  background: #080808;
  color: #f7f4ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.06), transparent 28%),
    #080808;
  color: #f7f4ee;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

#game-root {
  min-height: 100vh;
}

.shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}

.start-shell {
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 16px;
}

.hero {
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 8px 0 0;
}

.black-logo {
  width: min(72vw, 300px);
  aspect-ratio: 5 / 3;
  object-fit: contain;
  margin: 0 auto;
  padding: 7px 10px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #ddd7cd;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.kicker {
  color: #b9b2a7;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 520px;
  margin: 0 auto;
  color: #e4ded4;
  font-size: 17px;
  line-height: 1.75;
}

.intro-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.intro-chips span,
.step-pill {
  padding: 7px 11px;
  border-radius: 999px;
  background: #151515;
  border: 1px solid #292929;
  color: #c9c2b8;
  font-size: 12px;
  font-weight: 800;
}

.panel,
.tutorial-card {
  background: #111;
  border: 1px solid #292929;
  border-radius: 22px;
  padding: 16px;
}

.start-panel {
  margin-top: 2px;
}

.primary,
.secondary,
.choice {
  border: 0;
  border-radius: 16px;
  min-height: 52px;
  transition: transform 0.12s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.primary {
  width: 100%;
  background: #f3eee5;
  color: #0b0b0b;
  font-weight: 950;
  padding: 13px 16px;
}

.primary:disabled {
  opacity: 0.5;
}

.secondary {
  width: 100%;
  background: #171717;
  color: #fff;
  border: 1px solid #343434;
  font-weight: 900;
  padding: 13px 16px;
}

.primary:active,
.secondary:active,
.choice:active {
  transform: scale(0.98);
}

.microcopy {
  margin-top: 10px;
  text-align: center;
  color: #9f988e;
  font-size: 12px;
  line-height: 1.7;
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #c9c2b8;
  font-size: 13px;
  font-weight: 800;
}

.mini-brand img {
  width: 96px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 3px 5px;
}

.tutorial-card {
  text-align: center;
}

.step-pill {
  display: inline-flex;
  margin-bottom: 12px;
}

.order-box {
  text-align: center;
}

.order-box .label {
  color: #9d968c;
  font-size: 12px;
  margin-bottom: 5px;
}

.order-box h2 {
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.1;
  font-weight: 950;
}

.instruction {
  margin-top: 8px;
  color: #ddd6cc;
  line-height: 1.7;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.training-choices {
  margin-top: 16px;
}

.choice {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 5px;
  background: #151515;
  border: 1px solid #2f2f2f;
  color: #fff;
}

.product-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-size: 118%;
  background-repeat: no-repeat;
  background-color: #eee;
}

.training-name {
  padding: 8px 3px 4px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
}

.choice.correct {
  border-color: #efe9df;
  box-shadow: inset 0 0 0 2px #efe9df;
}

.choice.wrong {
  border-color: #b35d5d;
  opacity: 0.55;
}

.tutorial-feedback {
  min-height: 28px;
  margin: 12px 0;
  color: #c7c0b6;
  font-size: 13px;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.play-shell {
  padding-top: calc(8px + env(safe-area-inset-top));
}

.game-top {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 6px 0 10px;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(12px);
}

.play-header {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr 0.95fr;
  gap: 8px;
}

.play-brand,
.stat {
  min-height: 66px;
  border-radius: 15px;
  background: #151515;
  border: 1px solid #292929;
}

.play-brand {
  display: grid;
  place-items: center;
  padding: 5px;
}

.play-brand img {
  width: 100%;
  max-width: 110px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 2px 4px;
}

.stat {
  display: grid;
  place-content: center;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.stat small {
  display: block;
  margin-top: 6px;
  color: #9e978d;
  font-size: 10px;
}

.timer.rush {
  color: #ffcf6e;
  animation: pulse 0.55s infinite alternate;
}

.branch-strip {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 82px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 16px;
  background: #111;
  border: 1px solid #292929;
}

.branch-thumb {
  height: 66px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: #1b1b1b;
  filter: saturate(0.95) brightness(1.1);
}

.branch-thumb.no-photo {
  display: grid;
  place-items: center;
  background: #f2ede4;
  color: #111;
  filter: none;
}

.branch-thumb.no-photo span {
  font-size: 12px;
  font-weight: 950;
}

.branch-info {
  min-width: 0;
  text-align: right;
}

.branch-info small,
.branch-info span {
  display: block;
  color: #9e978d;
  font-size: 11px;
}

.branch-info b {
  display: block;
  margin: 3px 0;
  font-size: 18px;
}

.phase-banner {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 13px;
  background: linear-gradient(90deg, #f3eee5, #d8cfc2);
  color: #111;
  text-align: center;
  font-size: 12px;
  font-weight: 950;
}

.phase-banner.rush-phase {
  background: #f1c36d;
}

.challenge {
  padding-top: 10px;
}

.live-order {
  padding: 10px 0 14px;
}

.live-order h2 {
  font-size: clamp(34px, 10vw, 48px);
}

.bonus-badge {
  display: inline-flex;
  margin-top: 9px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1c36d;
  color: #111;
  font-size: 12px;
  font-weight: 950;
}

.live-choices {
  margin-top: 2px;
}

.live-choices .choice {
  min-height: 0;
}

.live-choices .product-photo {
  min-height: 0;
}

.play-hint {
  margin-top: 10px;
  text-align: center;
  color: #8f887f;
  font-size: 11px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 88px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100% - 34px);
  padding: 10px 15px;
  border-radius: 999px;
  background: #f3eee5;
  color: #111;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.toast.show {
  opacity: 1;
}

.result-shell {
  display: grid;
  gap: 14px;
}

.result-card {
  padding: 20px 16px;
  text-align: center;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(145deg, #171717, #090909 72%);
  border: 1px solid #303030;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.result-logo {
  width: min(62vw, 260px);
  aspect-ratio: 5 / 3;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 6px 9px;
  margin-bottom: 12px;
}

.rank {
  display: inline-flex;
  margin: 12px auto 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f2ede4;
  color: #111;
  font-weight: 950;
}

.result-number {
  margin-top: 6px;
  font-size: clamp(58px, 16vw, 82px);
  line-height: 0.95;
  font-weight: 950;
}

.result-label {
  margin-top: 6px;
  color: #d8d1c7;
  font-weight: 900;
}

.rank-hint {
  margin-top: 10px;
  color: #aaa39a;
  font-size: 12px;
}

.result-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.result-mini-grid div {
  padding: 11px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2b2b2b;
}

.result-mini-grid strong,
.result-mini-grid span {
  display: block;
}

.result-mini-grid strong {
  font-size: 18px;
}

.result-mini-grid span {
  margin-top: 4px;
  color: #9f988e;
  font-size: 10px;
}

.result-actions-panel {
  display: grid;
  gap: 9px;
}

.share-note {
  text-align: center;
  color: #9f988e;
  font-size: 11px;
  line-height: 1.7;
}

.lamna {
  text-align: center;
  background: #f5f0e8;
  color: #111;
  border-radius: 20px;
  padding: 14px;
}

.lamna-credit {
  color: #625d56;
  font-size: 11px;
  font-weight: 800;
}

.lamna-logo {
  display: block;
  width: min(46%, 190px);
  max-height: 74px;
  object-fit: contain;
  margin: 6px auto;
}

.lamna p {
  color: #514c46;
  font-size: 12px;
  line-height: 1.6;
}

.store-link {
  display: inline-flex;
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@media (max-width: 390px) {
  .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .play-header {
    grid-template-columns: 1fr 0.76fr 0.9fr;
  }

  .play-brand img {
    max-width: 96px;
  }

  .stat b {
    font-size: 21px;
  }

  .branch-strip {
    grid-template-columns: 76px 1fr;
  }

  .branch-thumb {
    height: 60px;
  }

  .choices {
    gap: 7px;
  }

  .training-name {
    font-size: 11px;
  }
}

@media (min-width: 620px) {
  .shell {
    padding-top: 24px;
  }

  .live-choices .product-photo {
    max-height: 190px;
  }
}


.live-choices .training-name {
  min-height: 38px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}



/* Original PNG retained. Show only its logo, excluding phone UI and social handle.
   Source viewport: x=60 y=970 width=1170 height=620 of 1290x2796. */
.logo-window {
  display: block;
  flex: none;
  width: 96px;
  height: auto;
  aspect-ratio: 1170 / 620;
  background-color: #fff;
  background-image: url('./black-logo-exact.png');
  background-repeat: no-repeat;
  background-size: 110.2564102564% auto;
  background-position: 50% 44.5772058824%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}
.black-logo.logo-window {
  width: min(66vw, 260px);
  height: auto;
  margin: 0 auto 4px;
  border-radius: 16px;
  box-shadow: none;
}
.result-logo.logo-window {
  width: min(58vw, 230px);
  height: auto;
  margin: 0 auto 12px;
}
.play-brand .logo-window { width: min(100%, 96px); border-radius: 8px; }
.mini-brand .logo-window { width: 88px; border-radius: 8px; }

/* Compact mobile layout and explicit game rules. */
.shell { max-width: 560px; }
.start-shell { gap: 12px; min-height: 100svh; }
.hero { gap: 10px; }
.black-logo.logo-window { width: min(54vw, 210px); }
h1 { font-size: clamp(29px, 7.8vw, 42px); line-height: 1.2; }
.lead { font-size: 15px; line-height: 1.65; max-width: 430px; }
.quick-rules { display:flex; flex-wrap:wrap; justify-content:center; gap: 6px 12px; color:#d5cec3; font-size:12px; }
.rules { padding: 12px 14px; background:#131313; border:1px solid #303030; border-radius:14px; font-size:13px; line-height:1.7; }
.rules summary { cursor:pointer; font-weight:800; min-height:28px; }
.rules p { margin-top:10px; color:#ccc5bb; }
.rank-table { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; margin-top:12px; }
.rank-table > span { color:#c6bfb3; }
.rank-table > b { text-align:left; }
.catalogue { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 8px; margin-top:14px; }
.catalogue b { display:block; text-align:center; font-size:11px; line-height:1.5; margin-top:5px; }
.route-note { font-size:11px; line-height:1.9; text-align:center; color:#aaa398; }
.start-panel { padding:12px; }
.play-header { grid-template-columns:1fr .8fr .8fr; }
.play-brand,.stat { min-height:56px; }
.game-top { position:static; padding-bottom:4px; }
.goal { margin-top:10px; font-size:12px; text-align:center; color:#e0d5c5; }
.goal-track { height:5px; background:#35312a; border-radius:5px; margin-top:7px; overflow:hidden; }
#goal-fill { width:0; height:100%; background:#e8c88d; transition:width .2s ease; }
.branch-strip { min-height:64px; grid-template-columns:62px 1fr; margin-top:9px; }
.branch-thumb { height:50px; }
.branch-thumb.no-photo { padding:3px; }
.branch-thumb .logo-window { width:100%; border-radius:5px; }
.branch-info b { font-size:16px; }
.phase-banner { font-size:12px; line-height:1.5; padding:8px; }
.live-order { padding:12px 0; }
.live-order h2 { font-size:clamp(25px,7.5vw,38px); line-height:1.25; }
.bonus-badge { font-size:11px; padding:5px 10px; margin-top:6px; background:#28241d; color:#f3d69e; }
.product-photo { background-size:contain; background-color:#eee9e2; }
.live-choices .training-name { font-size:12px; min-height:39px; line-height:1.45; padding:6px 1px 2px; }
.choice.correct { border-color:#83d0a0; box-shadow:inset 0 0 0 2px #83d0a0; }
.choice.wrong { border-color:#ed9292; opacity:.65; }
.toast { position:static; transform:none; margin:10px auto 0; max-width:100%; min-height:40px; border-radius:12px; box-shadow:none; line-height:1.5; }
.result-logo.logo-window { width:180px; }
.result-mini-grid { grid-template-columns:repeat(3,1fr); }
.text-button { background:transparent; color:#ccc5bb; border:0; min-height:44px; text-decoration:underline; }
button:focus-visible,summary:focus-visible,a:focus-visible { outline:3px solid #f1c36d; outline-offset:3px; }
@media(max-height:700px) {
 .shell { padding-top:10px; }
 .black-logo.logo-window { width:170px; }
 .hero { gap:8px; }
 .play-shell .live-order { padding:8px 0; }
 .branch-strip { margin-top:6px; }
 .play-shell .product-photo { max-height:140px; }
}

.live-choices .product-photo, .play-shell .product-photo { max-height:none; }


.sound-row { display:flex; justify-content:flex-start; min-height:32px; margin-bottom:4px; }
.sound-row.play-sound { justify-content:flex-end; }
.sound-toggle { border:1px solid #343434; border-radius:999px; min-height:32px; padding:5px 11px; background:#171717; color:#e6dfd5; font-size:11px; font-weight:800; cursor:pointer; }
.sound-toggle:active { transform:scale(.97); }
.name-label { display:block; margin-bottom:7px; text-align:right; color:#e7dfd4; font-size:13px; font-weight:900; }
.name-input { width:100%; min-height:52px; border:1px solid #3b3833; border-radius:14px; padding:10px 14px; margin-bottom:10px; background:#0c0c0c; color:#fff; font:inherit; text-align:right; outline:none; }
.name-input::placeholder { color:#77716a; }
.name-input:focus { border-color:#f1c36d; box-shadow:0 0 0 3px rgba(241,195,109,.16); }
.player-badge { display:block; max-width:110px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#cfc7bb; font-size:10px; }
.play-brand { gap:1px; }

/* Expert mode: image-only choices. Product names remain in the pre-game catalogue. */
.training-choices .training-name, .live-choices .training-name { display:none; }
.training-choices .choice, .live-choices .choice { padding-bottom:5px; }

/* V6: persistent, readable special order; score has no target meter. */
.score-hint { margin-top:10px; text-align:center; font-size:12px; color:#e0d5c5; line-height:1.6; }
.phase-banner.waleed-order { font-size:clamp(20px,5.8vw,26px); line-height:1.5; padding:12px; background:#f1c36d; color:#111; border:2px solid #ffe0a4; }
