/* Palette taken from the perfume: ivory paper, peach glass, rose gold, gold label, ink. */
@font-face { font-family: "lav-taj"; src: url("assets/fonts/lav-taj.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  --ivory: #fbf6ef;
  --cream: #f4ebe0;
  --peach-1: #fbd9c7;
  --peach-2: #f3b79c;
  --rose: #e09478;
  --rose-deep: #b8644c;
  --gold: #d6a85a;
  --gold-hi: #f3dcaa;
  --ink: #241d19;
  --ink-soft: #6f625a;
  --line: rgba(36, 29, 25, 0.1);
  --shadow: 0 18px 50px rgba(36, 22, 14, 0.28), 0 2px 8px rgba(36, 22, 14, 0.12);
  --font: "lav-taj", "Tajawal", "Noto Sans Arabic", system-ui, sans-serif;
  --font-num: "lav-taj", "Helvetica Neue", Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #171310; color: var(--ink);
  font-family: var(--font); overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
canvas#bg, canvas#gl, canvas#fx { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
canvas#fx { pointer-events: none; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ---------- screens & cards */
.screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  z-index: 20; text-align: center;
}
.screen.dim { background: rgba(23, 19, 16, 0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card {
  background: linear-gradient(180deg, #fffdf9, var(--ivory) 55%, var(--cream));
  border-radius: 32px; box-shadow: var(--shadow);
  border: 1px solid rgba(214, 168, 90, 0.35);
  padding: 26px 26px 22px;
  animation: cardIn 0.45s cubic-bezier(.2, .8, .2, 1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.wordmark {
  font-family: var(--font-num); font-weight: 700; letter-spacing: 0.5em; padding-left: 0.5em;
  font-size: 13px; color: var(--rose-deep);
}

#scrLoading { background: radial-gradient(circle at 50% 40%, #2a221d, #120f0d 70%); }
.load-card { width: min(300px, 80vw); display: flex; flex-direction: column; gap: 16px; align-items: center; }
.loader { width: 100%; height: 8px; border-radius: 999px; background: rgba(36, 29, 25, 0.08); overflow: hidden; }
.loader i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--peach-2), var(--rose)); transition: width 0.2s; }

/* ---------- start */
#scrStart { background: radial-gradient(ellipse at 50% 50%, rgba(23, 19, 16, 0.1), rgba(23, 19, 16, 0.5)); }
.start-card { width: min(420px, 92vw); display: flex; flex-direction: column; align-items: center; }
.start-left, .start-right { display: flex; flex-direction: column; align-items: center; width: 100%; }
.start-cheetah { width: min(250px, 62vw); height: auto; margin: 10px 0 2px; filter: drop-shadow(0 8px 10px rgba(36, 22, 14, 0.12)); pointer-events: none; }
.headline { margin: 4px 0 16px; font-size: clamp(34px, 7vmin, 46px); font-weight: 800; color: var(--ink); line-height: 1.1; }
.btn-primary {
  min-width: 230px; padding: 16px 36px; border-radius: 999px; border: 0;
  font-size: 20px; font-weight: 800; color: #3a1c10;
  background: linear-gradient(180deg, var(--peach-1), var(--peach-2) 55%, var(--rose));
  box-shadow: 0 10px 24px rgba(224, 148, 120, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(184, 100, 76, 0.25);
  transition: transform 0.12s ease, box-shadow 0.2s;
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(224, 148, 120, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(184, 100, 76, 0.25); }
.btn-primary:active { transform: scale(0.96); }
#btnStart { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.035); } }
.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; min-width: 200px; padding: 13px 28px; border-radius: 999px;
  font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(36, 22, 14, 0.06);
}
.btn-soft:active { transform: scale(0.96); }
.best-pill {
  margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 7px 16px; border-radius: 999px;
  background: rgba(214, 168, 90, 0.14); color: var(--ink-soft); font-size: 14px; font-weight: 500;
}
.best-pill b { font-family: var(--font-num); font-size: 19px; color: var(--rose-deep); font-weight: 800; }
.best-pill .en { font-family: var(--font-num); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }
.how { display: flex; justify-content: center; gap: 10px; margin-top: 18px; width: 100%; }
.how-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 18px;
  background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35;
}
.how-item small { font-weight: 500; color: var(--ink-soft); font-size: 11.5px; }
.how-ic { display: flex; gap: 3px; align-items: center; justify-content: center; height: 24px; }
.how-ic i { display: block; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(180deg, var(--peach-2), var(--rose)); }
.how-ic.hold i { width: 34px; border-radius: 999px; }
.how-ic.dbl i { width: 14px; height: 14px; }
.how-note { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.challenge-invite {
  margin: -4px 0 14px; padding: 10px 16px; border-radius: 18px; font-size: 14.5px; font-weight: 500;
  background: linear-gradient(180deg, #fff3ec, #fde6da); color: var(--ink); border: 1px solid rgba(224, 148, 120, 0.4);
}
.challenge-invite b { color: var(--rose-deep); }

/* ---------- HUD */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; pointer-events: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; direction: ltr;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
}
.hud-left { display: flex; gap: 8px; pointer-events: auto; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.6); padding: 0;
  background: rgba(251, 246, 239, 0.86); display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.round-btn:active { transform: scale(0.92); }
.round-btn svg { width: 22px; height: 22px; fill: var(--ink); }
.round-btn .st { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.round-btn .off { display: none; }
body.muted .round-btn .on { display: none; }
body.muted .round-btn .off { display: block; }
.chip {
  border-radius: 999px; background: rgba(251, 246, 239, 0.88); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.6);
}
.hud-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hud-label { display: block; font-family: var(--font-num); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; color: var(--ink-soft); line-height: 1; }
.score-chip { padding: 6px 22px 4px; min-width: 120px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; }
#score { font-family: var(--font-num); font-weight: 800; font-size: clamp(24px, 4.6vmin, 36px); line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.hud-row { display: flex; gap: 6px; align-items: center; }
.mult-chip { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; }
.mult-chip .ring { width: 26px; height: 26px; display: block; }
.mult-chip svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mult-chip .track { fill: none; stroke: rgba(36, 29, 25, 0.12); stroke-width: 5; }
.mult-chip .arc { fill: none; stroke: var(--rose); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.25s; }
#multText { font-family: var(--font-num); font-size: 15px; font-weight: 800; color: var(--rose-deep); font-variant-numeric: tabular-nums; }
.lives-chip { display: flex; gap: 4px; align-items: center; padding: 4px 10px; height: 34px; }
.lives-chip img { height: 24px; width: auto; transition: filter 0.3s, opacity 0.3s, transform 0.3s; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25)); }
.lives-chip img.empty { filter: grayscale(1) brightness(1.15); opacity: 0.28; transform: scale(0.85); }
.lives-chip.shake { animation: livesShake 0.45s ease; }
@keyframes livesShake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
#hud.rush .score-chip { background: linear-gradient(180deg, var(--peach-1), var(--peach-2)); }
.hud-right { justify-self: end; }
.best-chip { display: flex; flex-direction: column; align-items: center; padding: 6px 16px 5px; border-radius: 20px; }
#best { font-family: var(--font-num); font-weight: 800; font-size: 19px; color: var(--rose-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }

#banner {
  position: fixed; left: 50%; top: calc(24% + var(--safe-t)); transform: translateX(-50%); z-index: 12; pointer-events: none;
  font-weight: 800; font-size: clamp(18px, 3.6vmin, 28px); white-space: nowrap; color: var(--ink);
  padding: 10px 26px; border-radius: 999px; background: linear-gradient(180deg, #fffaf5, var(--peach-1));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); border: 1px solid rgba(224, 148, 120, 0.5);
}
#banner.pop { animation: pop 1.9s ease forwards; }
@keyframes pop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.8); }
  12% { opacity: 1; transform: translateX(-50%) scale(1.05); }
  20% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
#hint {
  position: fixed; left: 50%; bottom: calc(12% + var(--safe-b)); transform: translateX(-50%); z-index: 12; pointer-events: none;
  display: flex; align-items: center; gap: 12px; font-size: clamp(17px, 3.2vmin, 24px); font-weight: 800;
  color: var(--ink); background: rgba(251, 246, 239, 0.95); padding: 12px 24px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); animation: hintPulse 1.1s ease-in-out infinite; white-space: nowrap;
}
.tap-icon { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(180deg, var(--peach-2), var(--rose)); box-shadow: 0 0 0 6px rgba(224, 148, 120, 0.25); }
@keyframes hintPulse { 50% { transform: translateX(-50%) scale(1.06); } }
#challengeBar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 11; pointer-events: none;
  font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px; background: rgba(251, 246, 239, 0.9); color: var(--ink); white-space: nowrap;
}
#countdown {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 25; pointer-events: none;
  font-family: var(--font-num); font-weight: 800; font-size: 140px; color: var(--ivory); text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- pause */
.pause-card { display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: 280px; }
.card-title { font-size: 30px; font-weight: 800; margin-bottom: 6px; }

/* ---------- game over */
.over-card { display: flex; align-items: center; gap: 24px; padding: 18px; max-height: 100%; }
#cardImg {
  height: min(74vh, 820px); aspect-ratio: 9 / 16; object-fit: contain; border-radius: 22px;
  box-shadow: 0 8px 24px rgba(36, 22, 14, 0.18); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto;
}
.over-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; max-width: 300px; padding: 0 6px; }
.record-pill { padding: 8px 18px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); font-weight: 800; color: #3d2a0c; }
.share-note { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; line-height: 1.6; }
.share-note b { color: var(--rose-deep); }
@media (orientation: portrait) {
  .over-card { flex-direction: column; gap: 12px; padding: 14px; }
  #cardImg { height: auto; width: min(58vw, 34vh); }
  .over-actions { gap: 8px; }
  .btn-primary { padding: 14px 30px; }
}

/* ---------- full-screen card */
#scrCard { z-index: 30; }
.save-card { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 16px; }
#cardFull { max-height: 70vh; max-width: 84vw; border-radius: 20px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; pointer-events: auto; }
.save-hint { margin: 0; font-size: 15px; font-weight: 700; color: var(--rose-deep); }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.row .btn-soft { min-width: 140px; }

/* short landscape phones: two columns */
@media (max-height: 600px) and (orientation: landscape) {
  .start-line { margin: 8px 0 0; font-size: 13.5px; }
  .code-box { padding: 8px 12px; }
  .start-card { flex-direction: row; width: min(760px, 94vw); padding: 18px 22px; gap: 22px; align-items: center; }
  .start-left { width: 44%; }
  .start-right { width: 56%; }
  .start-cheetah { width: min(230px, 30vw); margin: 6px 0 0; }
  .headline { margin: 0; font-size: 32px; }
  .how { margin-top: 12px; }
  .how-note { margin-top: 10px; font-size: 12px; }
  .over-card #cardImg { height: min(80vh, 820px); }
}
.btn-primary:disabled { opacity: 0.55; animation: none; cursor: progress; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,0.34) 100%); opacity: 0.55; }

/* brand logo (from laverne.com) */
.logo { display: block; height: 22px; width: auto; margin: 0 auto; pointer-events: none; }
.load-card .logo { height: 26px; }
.start-card .logo { height: 24px; margin-bottom: 2px; }
/* the brand font ships in one weight: keep text crisp instead of faux-bold */
body, button, .headline, .btn-primary, .btn-soft, #score, #best, .hud-label, #banner, #hint, .how-item, .card-title, .record-pill { font-synthesis: none; }
.headline { font-weight: 400; letter-spacing: 0; }
.btn-primary { font-weight: 400; font-size: 21px; }
.btn-soft { font-weight: 400; }
#score { font-weight: 400; font-size: clamp(26px, 5vmin, 38px); }
#best { font-weight: 400; font-size: 20px; }
.hud-label { font-weight: 400; font-size: 10.5px; letter-spacing: 0.14em; }
#banner, #hint, .how-item, .card-title, .record-pill { font-weight: 400; }

/* ---------- final polish */
#banner { background: #fbf6ef; color: #241d19; border: 1.5px solid #d6a85a; box-shadow: 0 10px 30px rgba(0,0,0,0.35); font-size: clamp(20px, 4vmin, 30px); }
#hint { bottom: calc(24% + var(--safe-b)); }
#countdown { place-items: center; }
#countdown { color: #241d19; text-shadow: none; }
#countdown:not(.hidden)::before { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(251,246,239,0.94); box-shadow: 0 10px 40px rgba(0,0,0,0.35); z-index: -1; }
#countdown { isolation: isolate; }
#rushBar { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 11; width: min(260px, 60vw); height: 10px; border-radius: 999px; background: rgba(251,246,239,0.35); overflow: hidden; pointer-events: none; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
#rushBar i { display: block; height: 100%; width: 100%; transform-origin: left center; border-radius: 999px; background: linear-gradient(90deg, #fbd9c7, #e09478); transition: transform 0.1s linear; }
#rushBar.ending i { animation: rushEnd 0.4s ease-in-out infinite; }
@keyframes rushEnd { 50% { opacity: 0.35; } }
.over-score { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
#overScore { font-family: var(--font-num); font-weight: 400; font-size: 44px; color: #b8644c; line-height: 1.1; }
.btn-primary.btn-alt { background: linear-gradient(180deg, #fffaf5, #fbe6da); color: #3a1c10; box-shadow: 0 8px 20px rgba(224,148,120,0.25), inset 0 0 0 1.5px rgba(224,148,120,0.6); animation: none; }
.lives-chip.shake { animation: livesShake 0.45s ease, livesPop 0.45s ease; }
@keyframes livesPop { 30% { transform: scale(1.18); } }

/* ---------- attraction stages, moon flash, discount code */
#flash { position: fixed; inset: 0; z-index: 15; pointer-events: none; background: #fffbf5; opacity: 0; }
.start-line { margin: 10px 0 0; font-size: 15px; color: var(--ink); text-align: center; line-height: 1.5; }
.level-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 14px 6px; border-radius: 999px; background: rgba(251, 246, 239, 0.9); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); font-size: 13px; color: var(--ink); white-space: nowrap; }
.level-track { display: block; width: 92px; height: 4px; border-radius: 999px; background: rgba(36, 29, 25, 0.12); overflow: hidden; direction: ltr; }
.level-track i { display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0); border-radius: 999px; background: linear-gradient(90deg, #fbd9c7, #d6a85a); transition: transform 0.2s linear; }
.code-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 22px; background: #fff; border: 1.5px dashed rgba(214, 168, 90, 0.7); }
.code-head { font-size: 17px; color: var(--ink); }
.code-head b { font-family: var(--font-num); font-weight: 400; font-size: 24px; color: #b8644c; }
.code-level { font-size: 13px; color: var(--ink-soft); }
.code-pill { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 2px; padding: 7px 18px; border-radius: 16px; border: 0; cursor: pointer; background: linear-gradient(180deg, #fffaf5, #fbe6da); box-shadow: inset 0 0 0 1.5px rgba(224, 148, 120, 0.6); color: #3a1c10; -webkit-user-select: all; user-select: all; }
.code-pill b { font-family: var(--font-num); font-weight: 400; font-size: 19px; letter-spacing: 0.12em; }
.code-pill small { font-size: 11.5px; color: var(--ink-soft); -webkit-user-select: none; user-select: none; }
.code-pill:active { transform: scale(0.97); }
.code-next { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); text-align: center; }
@media (orientation: portrait) {
  #cardImg { width: min(44vw, 26vh); }
  .over-card { gap: 10px; }
  .over-actions { gap: 7px; }
  .over-score { margin-bottom: 0; }
  #overScore { font-size: 36px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  #scrOver { overflow-y: auto; }
  .over-card { gap: 16px; padding: 12px 16px; }
  .over-card #cardImg { height: min(86vh, 820px); }
  .over-actions { gap: 6px; }
  .over-score { display: none; }   /* the score is already on the card beside it */
  .record-pill { padding: 5px 14px; font-size: 14px; }
  .code-box { gap: 2px; padding: 6px 12px; }
  .code-head { font-size: 15px; }
  .code-head b { font-size: 20px; }
  .code-pill { padding: 5px 16px; }
  .code-pill b { font-size: 17px; }
  .over-actions .btn-primary { padding: 10px 26px; font-size: 18px; min-width: 200px; }
  .share-note { font-size: 12px; margin-top: 0; line-height: 1.4; }
}

/* ---- sign-up + leaderboard */
.btn-link { background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 14px; color: var(--rose-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-board { margin-top: 10px; padding: 9px 22px; font-size: 16px; }
.btn-board .cup { color: var(--gold); }
.player-line { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
.player-line b { color: var(--ink); }
.player-line .btn-link { font-size: 13px; padding: 0 4px; }
.reg-card { width: min(400px, 92vw); display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; max-height: 94vh; overflow-y: auto; }
.reg-card .logo { height: 22px; align-self: center; }
.reg-card .card-title { font-size: 26px; margin: 0; }
.reg-sub { margin: -4px 0 4px; font-size: 14px; color: var(--ink-soft); }
.field { display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: 14px; color: var(--ink); }
.field input { font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line, rgba(36,29,25,0.15)); background: #fff; color: var(--ink); outline: none; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 168, 90, 0.2); }
.field input[dir="ltr"] { text-align: left; font-family: var(--font-num); letter-spacing: 0.04em; }
.consent { display: flex; gap: 10px; align-items: flex-start; text-align: right; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; cursor: pointer; }
.consent input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--rose-deep); }
.reg-err { min-height: 18px; margin: 0; font-size: 13px; color: #b3412e; }
.board-card { width: min(440px, 94vw); max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.board-card .card-title { margin: 0; }
.board-sub { margin: -4px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.board-me { width: 100%; padding: 8px 12px; border-radius: 14px; background: rgba(214, 168, 90, 0.16); font-size: 14px; color: var(--ink); text-align: center; }
.board-me b { font-family: var(--font-num); color: var(--rose-deep); }
.board-list { list-style: none; margin: 0; padding: 0; width: 100%; overflow-y: auto; flex: 1 1 auto; min-height: 60px; }
.board-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid rgba(36, 29, 25, 0.08); font-size: 15px; }
.board-list li .rk { font-family: var(--font-num); font-weight: 800; color: var(--ink-soft); text-align: center; }
.board-list li:nth-child(1) .rk, .board-list li:nth-child(2) .rk, .board-list li:nth-child(3) .rk { color: var(--gold); }
.board-list li .nm { display: flex; flex-direction: column; min-width: 0; text-align: right; }
.board-list li .nm b { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-list li .nm small { font-family: var(--font-num); font-size: 11.5px; color: var(--ink-soft); direction: ltr; text-align: right; }
.board-list li .sc { font-family: var(--font-num); font-weight: 800; color: var(--ink); }
.board-list li.me { background: rgba(224, 148, 120, 0.14); border-radius: 12px; }
.board-msg { margin: 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
.board-msg:empty { display: none; }
.save-status { margin: 0; font-size: 13.5px; color: var(--ink); text-align: center; }
.save-status b { font-family: var(--font-num); color: var(--rose-deep); }
.save-status .btn-link { font-size: 13px; }
@media (max-height: 600px) and (orientation: landscape) {
  .reg-card { gap: 6px; padding-top: 14px; padding-bottom: 14px; }
  .reg-card .logo, .reg-sub { display: none; }
  .field input { padding: 8px 12px; }
  .board-list li { padding: 6px 10px; }
}
.code-own { margin: 0; font-size: 11.5px; color: var(--rose-deep); text-align: center; }

/* ---- game over on phones: wider, centred, everything visible without scrolling */
@media (orientation: portrait) {
  #scrOver { overflow-y: auto; }
  .over-card { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: center; width: min(94vw, 440px); max-height: none; margin: auto; padding: 16px 16px 14px; }
  .over-actions { display: contents; }
  #cardImg { grid-column: 1; grid-row: 1 / span 3; justify-self: end; width: min(27vw, 112px); height: auto; border-radius: 14px; }
  #newRecord, .over-score, #saveStatus { grid-column: 2; justify-self: start; text-align: right; }
  #newRecord { grid-row: 1; font-size: 13px; padding: 5px 12px; }
  .over-score { grid-row: 2; align-items: flex-start; }
  #saveStatus { grid-row: 3; font-size: 12.5px; line-height: 1.5; }
  .code-box, #btnBoard2, .share-note { grid-column: 1 / -1; }
  .code-box { gap: 2px; padding: 8px 12px; }
  #btnShare { grid-column: 1; }
  #btnAgain { grid-column: 2; }
  #btnShare, #btnAgain { width: 100%; min-width: 0; padding: 13px 8px; font-size: 17px; }
  #btnBoard2 { justify-self: center; }
  .share-note { margin: 0; font-size: 12px; line-height: 1.5; }
}
.code-next:empty { display: none; }
/* phone: country code picker (native list on phones) + number */
.phone-row { display: flex; gap: 8px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
.cc-pick { position: relative; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--line, rgba(36,29,25,0.15)); background: #fff; font-family: var(--font-num); font-size: 16px; color: var(--ink); white-space: nowrap; }
.cc-pick i { font-style: normal; font-size: 11px; color: var(--ink-soft); }
.cc-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
.cc-pick:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 168, 90, 0.2); }
