/* Arcade shared styling. Each customer's look (fonts, colours) comes from /brand/brand.css. */
/* Brand fonts (@font-face) and colours come from /brand/brand.css (clients/<id>/web/brand/). */

:root {
  --black: #0d0b0b;
  --ink: #141111;
  --charcoal: #221e1e;
  /* brand colours (overridden in /brand/brand.css) */
  --accent: #e11f27;
  --accent-d: #a8131a;
  --accent-rgb: 225 31 39;
  --on-accent: #ffffff;
  --white: #ffffff;
  --concrete: #ebebe9;
  --line: #dcdcda;
  --muted: #6f6767;
  --gold: #ffc83d;
  --green: #2c9b55;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --display: Impact, 'Arial Narrow', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --concrete-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#app { position: fixed; inset: 0; overflow: hidden; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.noscript { color: #fff; padding: 24px; font-family: sans-serif; }
.ico { display: inline-flex; line-height: 0; }

/* ---------- Screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: calc(var(--sat) + 14px) 16px calc(var(--sab) + 18px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  animation: screen-in 0.35s cubic-bezier(.2,1.2,.4,1) both;
}
#ui > .screen.passthrough { pointer-events: none; }
#ui > .screen.passthrough > * { pointer-events: auto; }
.screen.dim { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.screen.solid { background: var(--concrete-tex), var(--concrete); padding-top: 0; }
.screen > .wrap { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.spacer { flex: 1 1 auto; min-height: 8px; }
.screen::-webkit-scrollbar { display: none; }
@keyframes screen-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Brand header (like pizzaboyz.co.za) ---------- */
.logo-band { display: flex; justify-content: center; padding: 4px 0 0; }
.logo-band img { height: 46px; width: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }

.title { font-family: var(--display); font-weight: 400; color: #fff; text-align: center; line-height: .88; margin: 0; letter-spacing: 1px; text-shadow: 0 4px 18px rgba(0,0,0,.5); }
.title.lg { font-size: clamp(54px, 16vw, 72px); }
.title.md { font-size: 34px; letter-spacing: 1px; }

/* Game title lockup: DON'T CUT / [CORNERS] in a red slanted tag */
.lockup { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; }
.lockup .l1 { font-family: var(--display); color: #fff; font-size: clamp(52px, 16vw, 80px); line-height: .85; letter-spacing: 2px; text-shadow: 0 5px 22px rgba(0,0,0,.6); }
.lockup .l2 { position: relative; display: inline-block; font-family: var(--display); color: var(--on-accent); font-size: clamp(58px, 18vw, 88px); line-height: .9; letter-spacing: 2px; padding: 2px 22px 0; }
.lockup .l2::before { content: ''; position: absolute; inset: 0; background: var(--accent); transform: skewX(-12deg); box-shadow: 0 10px 28px rgba(0,0,0,.5); z-index: -1; }
.lockup .l2 { z-index: 0; }
.lockup .char { display: inline-block; animation: char-drop .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes char-drop { from { opacity: 0; transform: translateY(-60px) rotate(-12deg) scale(1.4); } to { opacity: 1; transform: none; } }
.lockup .l2.stamp::before { animation: stamp .55s .55s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stamp { from { transform: skewX(-12deg) scaleX(0); } to { transform: skewX(-12deg) scaleX(1); } }
.lockup .shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; transform: skewX(-12deg); }
.lockup .shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.6s 1.6s ease-in-out infinite; }
@keyframes shine { 0% { left: -60%; } 30%, 100% { left: 130%; } }

.hashtag { font-family: var(--body); font-weight: 900; color: #fff; letter-spacing: 2px; font-size: 13px; text-transform: uppercase; opacity: .9; }
.hashtag b { color: var(--accent); }
.subtitle { text-align: center; color: #fff; font-weight: 700; margin: -4px 0 0; letter-spacing: .3px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 1.5px;
  line-height: 1;
  padding: 13px 20px 11px;
  box-shadow: 0 5px 0 var(--accent-d), 0 10px 22px rgba(0,0,0,.28);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, filter .15s;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  touch-action: manipulation;
  position: relative;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-d), 0 4px 10px rgba(0,0,0,.25); }
.btn:disabled { filter: grayscale(.8) opacity(.6); pointer-events: none; }
.btn.big { font-size: 40px; min-height: 70px; padding: 16px 28px 12px; transform: skewX(-8deg); box-shadow: 0 7px 0 var(--accent-d), 0 16px 34px rgb(var(--accent-rgb) / .35); overflow: hidden; }
.btn.big > * , .btn.big .t { transform: skewX(8deg); display: inline-flex; align-items: center; gap: 10px; }
.btn.big:active { transform: skewX(-8deg) translateY(5px); box-shadow: 0 2px 0 var(--accent-d); }
.btn.big::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; left: -50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3s 1.2s ease-in-out infinite; pointer-events: none; }
.btn.white { background: #fff; color: var(--black); box-shadow: 0 5px 0 #c9c9c7, 0 10px 22px rgba(0,0,0,.18); }
.btn.white:active { box-shadow: 0 1px 0 #c9c9c7; }
.btn.dark { background: var(--black); color: #fff; box-shadow: 0 5px 0 #000, 0 10px 22px rgba(0,0,0,.3); }
.btn.dark:active { box-shadow: 0 1px 0 #000; }
.btn.gold { background: var(--gold); color: var(--black); box-shadow: 0 5px 0 #c79415, 0 10px 22px rgba(0,0,0,.2); }
.btn.small { font-size: 21px; min-height: 44px; padding: 10px 14px 8px; box-shadow: 0 4px 0 var(--accent-d); }
.btn.small.white { box-shadow: 0 4px 0 #c9c9c7; }
.btn.small.dark { box-shadow: 0 4px 0 #000; }
.btn.small:active { transform: translateY(3px); }
.btn.wide { width: 100%; }
.btn-row { display: flex; gap: 10px; width: 100%; }
.btn-row > * { flex: 1 1 0; }

.icon-btn {
  appearance: none;
  width: 56px; height: 56px;
  border-radius: 4px;
  border: 0;
  background: #fff;
  box-shadow: 0 5px 0 #b9b9b7, 0 10px 20px rgba(0,0,0,.35);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: transform .08s, box-shadow .08s;
  color: var(--black);
  touch-action: manipulation;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #b9b9b7; }
.icon-row { display: flex; justify-content: center; gap: 14px; }
.icon-label { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #fff; font-family: var(--display); font-size: 16px; letter-spacing: 1px; }

/* ---------- Pop-in choreography for the menu ---------- */
.pop { animation: pop-up .6s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop-up { from { opacity: 0; transform: translateY(26px) scale(.85); } to { opacity: 1; transform: none; } }
.fade { animation: fade-in .8s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Cards ---------- */
.card { background: #fff; border-radius: 4px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 16px; border-top: 5px solid var(--accent); }
.card h2, .card h3 { font-family: var(--display); font-weight: 400; margin: 0 0 6px; letter-spacing: 1px; line-height: 1; }
.card h2 { font-size: 34px; }
.card h3 { font-size: 26px; }
.card p { margin: 6px 0; line-height: 1.4; font-weight: 700; }
.muted { color: var(--muted); font-weight: 700; }

/* Campaign: a red slanted deal banner */
.deal { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px; color: var(--on-accent); z-index: 0; }
.deal::before { content: ''; position: absolute; inset: 0; background: var(--accent); transform: skewX(-8deg); box-shadow: 0 10px 26px rgba(0,0,0,.45); z-index: -1; }
.deal .ico { animation: bob 2s ease-in-out infinite; }
.deal p { margin: 0; font-family: var(--display); font-size: 21px; letter-spacing: 1px; line-height: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-4px) rotate(6deg); } }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--black); color: #fff; padding: 4px 10px 3px; font-family: var(--display); font-size: 17px; letter-spacing: 1px; transform: skewX(-8deg); }
.chip > * { transform: skewX(8deg); }
.chip.red { background: var(--accent); }
.chip.green { background: var(--green); }
.chip.gold { background: var(--gold); color: var(--black); }

.player-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); color: #fff; padding: 7px 12px; border-radius: 3px; font-family: var(--body); font-weight: 900; font-size: 14px; border: 1px solid rgba(255,255,255,.18); cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.best-line { text-align: center; color: #fff; font-family: var(--display); font-size: 20px; letter-spacing: 1px; }
.best-line b { font-weight: 400; font-size: 30px; color: #fff; background: var(--black); padding: 0 10px; display: inline-block; transform: skewX(-8deg); margin-left: 6px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.footer-links a, .footer-links span { color: #fff; opacity: .85; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.footer-links a, .footer-links button { text-decoration: underline; text-underline-offset: 3px; }
.footer-links button { background: none; border: 0; padding: 0; color: #fff; font: inherit; font-weight: 900; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }

/* ---------- Top bar for sub screens (black, like the website header) ---------- */
.topbar { display: flex; align-items: center; gap: 12px; width: calc(100% + 32px); margin: 0 -16px 4px; padding: calc(var(--sat) + 10px) 16px 12px; background: var(--black); position: sticky; top: 0; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.topbar .title { flex: 1; text-align: left; font-size: 32px; }
.topbar .mini-logo { height: 22px; opacity: .9; }
.back-btn { width: 44px; height: 44px; background: var(--accent); color: var(--on-accent); box-shadow: none; }
.back-btn:active { transform: translateY(2px); box-shadow: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 900; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; }
.field input, .field select {
  font: inherit; font-size: 18px; font-weight: 700;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  outline: none;
  width: 100%;
  -webkit-user-select: text; user-select: text;
}
.field input:focus, .field select:focus { border-color: var(--black); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 700; }
.field.error input, .field.error select { border-color: var(--accent); background: #fff4f4; }
.field .err { color: var(--accent); font-size: 13px; font-weight: 900; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 10px 0; cursor: pointer; font-weight: 700; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--accent); margin: 1px 0 0; }
.check a { color: var(--accent); }
.check.error { color: var(--accent); }
.form-error { background: #fff0f0; border-left: 4px solid var(--accent); color: var(--accent-d); padding: 10px 12px; font-weight: 900; font-size: 14px; }

/* ---------- Results ---------- */
.score-label { text-align: center; font-family: var(--body); font-weight: 900; font-size: 12px; letter-spacing: 3px; color: var(--accent); }
.score-big { font-family: var(--display); font-size: clamp(84px, 27vw, 124px); color: var(--black); text-align: center; line-height: .9; margin: 2px 0 6px; letter-spacing: 2px; }
.new-best { align-self: center; animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: skewX(-8deg) rotate(-3deg); } 50% { transform: skewX(-8deg) rotate(3deg) scale(1.06); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.stat { background: var(--concrete); padding: 8px 4px 6px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.stat span { font-size: 10px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.verify { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; text-align: center; flex-wrap: wrap; font-size: 15px; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(0,0,0,.12); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 14px; background: var(--concrete); overflow: hidden; margin: 10px 0 6px; transform: skewX(-8deg); }
.progress > div { height: 100%; background: var(--accent); transition: width 1.1s cubic-bezier(.2,1,.3,1); }

/* ---------- Voucher (white ticket with the red CRAFTED-style flag) ---------- */
.ticket {
  position: relative;
  background: #fff;
  padding: 18px 64px 16px 18px;
  text-align: left;
  box-shadow: 0 14px 34px rgba(0,0,0,.3);
  overflow: hidden;
}
.ticket::after { /* red flag on the right, like the logo's CRAFTED tab */
  content: '';
  position: absolute;
  top: 0; right: 14px;
  width: 34px; height: 100%;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 14px));
}
.ticket .flag-text { position: absolute; right: 14px; top: 50%; width: 34px; transform: translateY(-50%); writing-mode: vertical-rl; color: #fff; font-family: var(--display); font-size: 22px; letter-spacing: 3px; z-index: 1; display: flex; align-items: center; justify-content: center; }
.ticket.unlock { animation: ticket-in .7s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes ticket-in { from { transform: scale(.5) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket.locked::after { background: #c9c9c7; }
.ticket .tier { font-family: var(--display); font-size: 36px; line-height: .95; margin: 8px 0 4px; letter-spacing: 1px; }
.ticket .code {
  font-family: var(--display);
  font-size: clamp(34px, 11vw, 44px);
  letter-spacing: 3px;
  background: var(--black);
  color: #fff;
  padding: 10px 12px 6px;
  margin: 12px 0 10px;
  text-align: center;
  -webkit-user-select: all; user-select: all;
  word-break: break-all;
}
.ticket .code.long { font-size: clamp(26px, 8.4vw, 36px); letter-spacing: 1.5px; white-space: nowrap; }
.ticket .meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.ticket.redeemed, .ticket.expired { opacity: .6; filter: grayscale(1); }

/* ---------- Leaderboard ---------- */
.tabs { display: flex; gap: 6px; }
.tabs button { flex: 1; border: 0; background: #fff; color: var(--black); font-family: var(--display); font-size: 21px; letter-spacing: 1px; padding: 10px 6px 7px; cursor: pointer; box-shadow: 0 3px 0 #c9c9c7; }
.tabs button.on { background: var(--black); color: #fff; box-shadow: 0 3px 0 var(--accent); }
.lb { display: flex; flex-direction: column; }
.lb-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.lb-row:nth-child(-n+3) .rank { color: var(--accent); }
.lb-row.me { background: #fff1f1; box-shadow: inset 4px 0 0 var(--accent); }
.lb-row .rank { font-family: var(--display); font-size: 28px; text-align: center; line-height: 1; }
.lb-row .who b { display: block; font-weight: 900; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .who small { color: var(--muted); font-weight: 700; font-size: 12px; }
.lb-row .pts { font-family: var(--display); font-size: 28px; letter-spacing: 1px; }
.lb-empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: #fff; }
.bar-row { display: grid; gap: 4px; }
.bar-row .lbl { display: flex; justify-content: space-between; font-family: var(--display); font-size: 20px; letter-spacing: 1px; }
.bar-row .track { height: 16px; background: var(--concrete); transform: skewX(-8deg); overflow: hidden; }
.bar-row .fill { height: 100%; width: 0; background: var(--black); transition: width 1.1s cubic-bezier(.2,1,.3,1); }
.bar-row:first-child .fill, .bar-row.mine .fill { background: var(--accent); }
.bar-row.mine .lbl span:first-child::after { content: '  ★ YOUR BRANCH'; color: var(--accent); font-size: 15px; }
.note { font-size: 13px; color: var(--muted); text-align: center; font-weight: 700; }

/* ---------- Tutorial ---------- */
.tut { text-align: center; }
.tut .art { height: 150px; display: flex; align-items: center; justify-content: center; }
.tut .dots { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.tut .dots i { width: 22px; height: 5px; background: var(--line); transform: skewX(-12deg); }
.tut .dots i.on { background: var(--accent); }
.tut-pizza { width: 120px; height: 120px; border-radius: 10px; background: radial-gradient(circle at 30% 35%, #c0392b 0 9px, transparent 10px), radial-gradient(circle at 70% 30%, #c0392b 0 9px, transparent 10px), radial-gradient(circle at 55% 70%, #c0392b 0 9px, transparent 10px), radial-gradient(circle at 25% 75%, #2b2b2b 0 5px, transparent 6px), #ffcf4a; box-shadow: inset 0 0 0 10px #e3a040, 0 0 0 8px #0d0b0b, 0 12px 24px rgba(0,0,0,.35); position: relative; }
.tut-pizza .swipe { position: absolute; left: -24px; right: -24px; top: 50%; height: 6px; background: #fff; border-radius: 3px; box-shadow: 0 0 12px #fff; transform-origin: left; animation: swipe 1.6s ease-in-out infinite; }
@keyframes swipe { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.tut .order { display: inline-flex; align-items: center; gap: 10px; background: #fff; padding: 10px 16px; transform: rotate(-3deg); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.tut .order .num { background: var(--accent); color: var(--on-accent); font-family: var(--display); font-size: 44px; padding: 2px 14px 0; transform: skewX(-8deg); line-height: 1.05; }
.tut .order .txt { text-align: left; font-family: var(--display); font-size: 28px; line-height: 1; }
.tut .order small { display: block; font-family: var(--body); font-weight: 900; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.tut .grades { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- In-game overlay ---------- */
.hud-btn { position: absolute; top: calc(var(--sat) + 12px); left: 50%; transform: translateX(-50%); width: 42px; height: 42px; opacity: .95; }
.hud-btn:active { transform: translateX(-50%) translateY(3px); }
.practice-badge { position: absolute; bottom: calc(var(--sab) + 12px); left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 6px 14px; font-size: 13px; font-weight: 900; white-space: nowrap; pointer-events: none; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Toast ---------- */
#toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sab) + 24px);
  transform: translate(-50%, 30px);
  opacity: 0;
  visibility: hidden;
  background: var(--black);
  color: #fff;
  padding: 12px 18px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 4px 0 0 var(--accent);
  transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s, visibility .25s;
  z-index: 50;
  max-width: calc(100% - 32px);
  text-align: center;
  pointer-events: auto;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast button { margin-left: 10px; background: var(--accent); color: var(--on-accent); border: 0; font-family: var(--display); font-size: 18px; letter-spacing: 1px; padding: 5px 12px 3px; cursor: pointer; }

/* ---------- Test mode ---------- */
.test-ribbon { align-self: center; background: var(--gold); color: var(--black); font-family: var(--display); letter-spacing: 1.5px; font-size: 15px; padding: 4px 12px 2px; transform: skewX(-8deg); box-shadow: 0 6px 16px rgba(0,0,0,.35); }

/* ---------- Misc ---------- */
.install-hint { font-size: 13px; text-align: center; color: #fff; background: rgba(0,0,0,.5); padding: 8px 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; justify-content: center; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.hidden { display: none !important; }
@media (max-height: 700px) {
  .screen { gap: 10px; }
  .lockup .l1 { font-size: 48px; }
  .lockup .l2 { font-size: 52px; }
  .btn.big { min-height: 60px; font-size: 34px; }
  .icon-btn { width: 50px; height: 50px; }
  .deal p { font-size: 18px; }
  .logo-band img { height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .ticket.unlock, .new-best, .lockup .char, .pop, .btn.big::after, .lockup .shine::after { animation: none !important; }
}

/* ---------- Dark cards on overlay screens (results, pause, tutorial): black with white + red, like pizzaboyz.co.za ---------- */
.screen.dim .card { background: var(--black); color: #fff; border-top-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06); }
.screen.dim .card h2, .screen.dim .card h3 { color: #fff; }
.screen.dim .muted, .screen.dim .card .muted { color: #b3abab; }
.screen.dim .score-big { color: #fff; text-shadow: 0 6px 24px rgb(var(--accent-rgb) / .35); }
.screen.dim .stat { background: #1d1919; border-bottom: 3px solid var(--accent); }
.screen.dim .stat b { color: #fff; }
.screen.dim .stat span { color: #a9a1a1; }
.screen.dim .verify { color: #fff; }
.screen.dim .ticket { background: var(--black); color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.08); }
.screen.dim .ticket .meta { color: #b3abab; }
.screen.dim .ticket.locked::after { background: #3a3434; }
.screen.dim .ticket .tier { color: #fff; }
.screen.dim .ticket .ico svg { stroke: #fff; }
.screen.dim .progress { background: #2a2525; }
.screen.dim .tut .dots i { background: #3a3434; }
.screen.dim .tut .dots i.on { background: var(--accent); }
.screen.dim .btn.white { background: #fff; }
.screen.dim .spinner { border-color: rgba(255,255,255,.15); border-top-color: var(--accent); }

/* ---------- Menu: fits short phone screens (e.g. Galaxy S25 with browser bars ≈ 360×700) ---------- */
.screen.menu { gap: 12px; }
.screen.menu .spot { min-height: 150px; }
@media (max-height: 900px) {
  .screen.menu { gap: 8px; padding-top: calc(var(--sat) + 10px); }
  .screen.menu .wrap { gap: 8px; }
  .screen.menu .spot { min-height: 96px; }
  .screen.menu .logo-band img { height: 34px; }
  .screen.menu .lockup .l1 { font-size: clamp(40px, 13vw, 60px); }
  .screen.menu .lockup .l2 { font-size: clamp(44px, 14vw, 66px); }
  .screen.menu .deal { padding: 7px 14px 5px; }
  .screen.menu .deal p { font-size: 18px; }
  .screen.menu .deal .ico svg { width: 26px; height: 26px; }
  .screen.menu .best-line { font-size: 17px; }
  .screen.menu .best-line b { font-size: 24px; }
  .screen.menu .btn.big { min-height: 58px; font-size: 34px; }
  .screen.menu .icon-btn { width: 50px; height: 50px; }
  .screen.menu .icon-btn svg { width: 28px; height: 28px; }
  .screen.menu .icon-label { font-size: 14px; gap: 5px; }
  .screen.menu .player-pill { padding: 5px 10px; font-size: 13px; }
  .screen.menu .footer-links { font-size: 12px; gap: 4px 12px; }
  .screen.menu .test-ribbon { font-size: 13px; }
}
@media (max-height: 680px) {
  .screen.menu .spot { min-height: 70px; }
  .screen.menu .logo-band { display: none; }
  .screen.menu .lockup .l1 { font-size: 40px; }
  .screen.menu .lockup .l2 { font-size: 44px; }
  .screen.menu .hashtag { display: none; }
}

/* ---------- Install popup ---------- */
.install-sheet { position: absolute; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade-in .25s ease both; }
.install-sheet .card { width: 100%; max-width: 480px; background: var(--black); color: #fff; border-top: 5px solid var(--accent); border-radius: 14px 14px 0 0; padding: 18px 18px calc(var(--sab) + 18px); display: flex; flex-direction: column; gap: 12px; animation: sheet-up .35s cubic-bezier(.2,1.2,.4,1) both; box-shadow: 0 -12px 40px rgba(0,0,0,.5); }
.install-sheet.out { animation: fade-out .25s ease both; }
.install-sheet.out .card { animation: sheet-down .25s ease both; }
.install-sheet .head { display: flex; gap: 12px; align-items: center; }
.install-sheet .head img { width: 56px; height: 56px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.install-sheet .head small { font-weight: 900; letter-spacing: 2px; font-size: 11px; color: var(--accent); }
.install-sheet h2 { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 1px; margin: 0; line-height: 1; }
.install-sheet p { margin: 0; line-height: 1.45; color: #e7e1e1; }
.install-sheet .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.install-sheet .steps li { display: flex; align-items: center; gap: 12px; background: #1d1919; padding: 10px 12px; border-radius: 8px; }
.install-sheet .steps .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; }
.install-sheet .steps .t { flex: 1; line-height: 1.35; }
.install-sheet .steps .i { line-height: 0; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-out { to { opacity: 0; } }

/* ======================= Topping Frenzy ======================= */
/* Menu: two mode buttons side by side */
.mode-row { display: flex; gap: 12px; width: 100%; }
.mode-row .btn { flex: 1 1 0; flex-direction: column; gap: 4px; min-height: 78px; padding: 12px 8px 10px; transform: skewX(-8deg); }
.mode-row .btn > * { transform: skewX(8deg); }
.mode-row .btn:active { transform: skewX(-8deg) translateY(4px); }
.mode-row .big-l { font-size: 30px; display: inline-flex; align-items: center; gap: 6px; line-height: .95; }
.mode-row small { display: inline-flex; align-items: center; gap: 5px; font-family: var(--body); font-weight: 900; font-size: 11.5px; letter-spacing: .8px; opacity: .92; }
.rush-btn { box-shadow: 0 6px 0 var(--accent-d), 0 14px 30px rgb(var(--accent-rgb) / .35); overflow: hidden; }
.rush-btn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3s 1.2s ease-in-out infinite; pointer-events: none; }
.tour-btn { background: #fff; color: var(--black); box-shadow: 0 6px 0 #c9c9c7, 0 14px 30px rgba(0,0,0,.3); }
.tour-btn small { color: var(--accent); }
.gift-pill { appearance: none; border: 0; cursor: pointer; background: var(--gold); color: var(--black); font-family: var(--display); font-size: 21px; letter-spacing: 1px; padding: 7px 14px 5px; display: inline-flex; gap: 10px; align-items: center; transform: skewX(-8deg); box-shadow: 0 4px 0 #c79415, 0 8px 20px rgba(255,200,61,.35); animation: gift-wiggle 2.4s ease-in-out infinite; }
.gift-pill b { font-weight: 400; background: var(--black); color: #fff; padding: 0 6px; display: inline-flex; align-items: center; gap: 3px; }
.gift-pill > *, .tour-sum .streak > * { transform: skewX(8deg); }
.tour-sum .streak { display: inline-flex; align-items: center; gap: 6px; }
@keyframes gift-wiggle { 0%, 70%, 100% { transform: skewX(-8deg) rotate(0); } 75% { transform: skewX(-8deg) rotate(-4deg) scale(1.06); } 85% { transform: skewX(-8deg) rotate(4deg) scale(1.06); } 92% { transform: skewX(-8deg) rotate(-2deg); } }

/* Branch Tour map */
.screen.tour { background: var(--black); padding-top: 0; }
.screen.tour .wrap { gap: 12px; padding-bottom: 20px; }
.tour-sum { display: flex; justify-content: space-between; align-items: center; color: #fff; font-family: var(--display); font-size: 22px; letter-spacing: 1px; }
.tour-sum b { font-weight: 400; color: var(--gold); font-size: 30px; }
.tour-sum .streak { background: #221e1e; padding: 4px 10px 2px; transform: skewX(-8deg); }
.tour-intro { color: #bdb5b5; margin: 0; font-size: 14px; line-height: 1.4; }
.stop { background: #191515; border-left: 5px solid var(--accent); padding: 12px 12px 14px; position: relative; }
.stop + .stop::before { content: ''; position: absolute; left: 50%; top: -14px; height: 14px; border-left: 3px dashed #4a4242; }
.stop.locked { border-left-color: #3a3333; opacity: .7; }
.stop-head { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 12px; }
.stop-head b { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 1px; flex: 1; line-height: 1; }
.stop-head small { font-family: var(--display); font-size: 18px; color: var(--gold); letter-spacing: 1px; }
.nodes { display: flex; justify-content: space-around; position: relative; }
.nodes::before { content: ''; position: absolute; left: 16%; right: 16%; top: 32px; border-top: 3px dashed #4a4242; }
.node { appearance: none; border: 0; cursor: pointer; position: relative; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--black); font-family: var(--display); font-size: 30px; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 0 #b9b9b7, 0 10px 20px rgba(0,0,0,.4); padding: 0; touch-action: manipulation; }
.node:active { transform: translateY(3px); box-shadow: 0 2px 0 #b9b9b7; }
.node .num { line-height: 1; margin-top: 3px; }
.node .stars { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.node.open { background: var(--accent); color: var(--on-accent); box-shadow: 0 5px 0 var(--accent-d), 0 10px 20px rgb(var(--accent-rgb) / .35); }
.node.here { animation: node-pulse 1.4s ease-in-out infinite; }
.node.locked { background: #2b2626; box-shadow: 0 5px 0 #1a1616; cursor: default; }
.node .you { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); animation: hop 0.9s ease-in-out infinite; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
@keyframes node-pulse { 0%, 100% { box-shadow: 0 5px 0 var(--accent-d), 0 0 0 0 rgb(var(--accent-rgb) / .7); } 50% { box-shadow: 0 5px 0 var(--accent-d), 0 0 0 12px rgb(var(--accent-rgb) / 0); } }
@keyframes hop { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -7px); } }
.stop .nodes { margin-bottom: 16px; }
.stars { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; font-style: normal; }
.stars i { font-style: normal; color: #4a4242; }
.stars i.on { color: var(--gold); text-shadow: 0 1px 0 #8a6500; }
.stars.sm { font-size: 13px; }
.stop.finale { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border-left-color: var(--gold); color: #fff; }
.stop.finale b { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: 1px; }

/* Level intro / result */
.level-card .lvl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.level-card .lvl-head .muted { font-family: var(--display); font-size: 19px; letter-spacing: 1px; }
.goals { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.goals li { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 900; }
.goals li canvas, .goal-ico { flex: 0 0 auto; }
.goal-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.goals.compact li { justify-content: space-between; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 6px; }
.goals.compact li b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--accent); }
.goals.compact li.ok b { color: #58d68d; }
.lvl-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lvl-meta .muted { display: inline-flex; gap: 6px; align-items: center; }
.moves-pill { background: var(--accent); color: var(--on-accent); font-family: var(--display); font-size: 20px; letter-spacing: 1px; padding: 4px 12px 2px; transform: skewX(-8deg); display: inline-block; }
.moves-pill b { font-weight: 400; font-size: 26px; }
.star-targets { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); font-family: var(--display); font-size: 18px; letter-spacing: .5px; }
.star-targets > span { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.boosters { margin-top: 12px; }
.booster-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.booster { appearance: none; border: 2px solid #3a3333; background: #1d1919; color: #fff; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 4px; font-family: var(--display); font-size: 16px; letter-spacing: .5px; cursor: pointer; }
.booster small { margin-left: 4px; color: var(--gold); }
.booster.on { border-color: var(--gold); background: #3a2f10; box-shadow: 0 0 0 3px rgba(255,200,61,.25); }
.plus-moves { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--display); border: 2px solid #fff; box-sizing: border-box; }
.big-stars { display: flex; justify-content: center; gap: 10px; font-size: 58px; line-height: 1; margin: 6px 0 2px; }
.big-stars i { font-style: normal; color: #3a3333; transition: transform .3s cubic-bezier(.2,1.8,.4,1), color .15s; transform: scale(.8); }
.big-stars i:nth-child(2) { transform: scale(.8) translateY(-10px); }
.big-stars i.on { color: var(--gold); transform: scale(1.12); text-shadow: 0 0 22px rgba(255,200,61,.6), 0 3px 0 #8a6500; }
.big-stars i.on:nth-child(2) { transform: scale(1.25) translateY(-10px); }

/* Daily gift */
.screen.gift .wrap { align-items: center; }
.week { display: flex; gap: 6px; justify-content: center; }
.week i { font-style: normal; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: #221e1e; color: #8d8585; font-family: var(--display); font-size: 19px; border-radius: 3px; }
.week i.past { background: var(--accent); color: var(--on-accent); }
.week i.today { background: var(--gold); color: var(--black); transform: scale(1.12); box-shadow: 0 0 0 3px rgba(255,200,61,.3); }
.week i.big { font-size: 18px; }
.box-stage { position: relative; height: 210px; width: 100%; display: flex; align-items: center; justify-content: center; }
.gift-box { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; position: relative; width: 150px; height: 150px; animation: box-shake 1.6s ease-in-out infinite; }
.gift-box .base { position: absolute; left: 8px; right: 8px; bottom: 0; height: 104px; background: linear-gradient(#1d1919, #0d0b0b); border: 3px solid #fff; border-radius: 4px; }
.gift-box .ribbon { position: absolute; left: 50%; bottom: 0; width: 22px; height: 104px; transform: translateX(-50%); background: var(--accent); }
.gift-box .lid { position: absolute; left: 0; right: 0; top: 14px; height: 40px; background: #0d0b0b; border: 3px solid #fff; border-radius: 4px; z-index: 2; display: flex; align-items: center; justify-content: center; transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .5s; }
.gift-box .lid img { height: 20px; }
.gift-box .lid::before, .gift-box .lid::after { content: ''; position: absolute; top: -22px; width: 30px; height: 22px; border: 6px solid var(--accent); border-radius: 50% 50% 0 50%; }
.gift-box .lid::before { right: 50%; transform: rotate(-10deg); }
.gift-box .lid::after { left: 50%; border-radius: 50% 50% 50% 0; transform: rotate(10deg); }
.gift-box.open { animation: none; }
.gift-box.open .lid { transform: translateY(-120px) rotate(-25deg); opacity: 0; }
.gift-box.open .base, .gift-box.open .ribbon { transition: opacity .4s .3s; opacity: 0; }
@keyframes box-shake { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-6deg) scale(1.04); } 72% { transform: rotate(6deg) scale(1.06); } 79% { transform: rotate(-4deg); } 86% { transform: rotate(3deg); } }
.reveal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.prize { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; text-align: center; max-width: 120px; animation: prize-pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.prize b { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: 1px; color: var(--gold); }
.prize small { font-size: 12px; color: #cfc7c7; }
.prize canvas, .prize .plus-moves { filter: drop-shadow(0 0 16px rgba(255,200,61,.8)); }
@keyframes prize-pop { from { opacity: 0; transform: scale(.2) translateY(40px); } to { opacity: 1; transform: none; } }
.gift-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }

/* Tutorial art */
.tut-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.tut-arrow { font-size: 30px; color: var(--accent); margin: 0 4px; animation: bob 1.4s ease-in-out infinite; }
.tut-sp { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--display); font-size: 20px; color: inherit; margin: 0 6px; }

@media (max-height: 760px) {
  .mode-row .btn { min-height: 66px; }
  .mode-row .big-l { font-size: 26px; }
}

/* Back to the arcade hub (only shown when the player arrived from /arcade/) */
.arcade-back { position: absolute; top: calc(var(--sat) + 12px); left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; background: rgba(13,11,11,.85); color: #fff; text-decoration: none; font-family: var(--display); font-size: 17px; letter-spacing: 1px; padding: 6px 11px 4px 7px; border: 1px solid rgba(255,255,255,.2); transform: skewX(-8deg); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.arcade-back > * { transform: skewX(8deg); }
.arcade-back:active { transform: skewX(-8deg) translateY(2px); }
.arcade-back + .test-ribbon { align-self: flex-end; }
.lockup .mark { color: var(--accent); }
