@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #11151a;
  --muted: #697077;
  --paper: #f3f0e8;
  --card: #fffdf8;
  --line: #d8d4ca;
  --lime: #2d64bd;
  --lime-deep: #1f4f9a;
  --coral: #2d64bd;
  --blue: #5e78ff;
  --purple: #9659e8;
  --yellow: #f9c94c;
  --shadow: 0 22px 55px rgba(28, 31, 35, .12);
  --radius: 24px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef1f3;
  --muted: #a3aab1;
  --paper: #0e1116;
  --card: #171b21;
  --line: #343a42;
  --shadow: 0 24px 60px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: color .2s ease, background-color .2s ease;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.noise {
  position: fixed;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: auto;
  padding: 0 28px;
  border-bottom: 1px solid rgba(17, 21, 26, .12);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 800 15px/1 Manrope, sans-serif; letter-spacing: .13em; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; background: var(--ink); color: var(--lime); border-radius: 8px; transform: rotate(-3deg); font-size: 18px; letter-spacing: 0; }
.top-actions { display: flex; gap: 9px; }
.ghost-button, .icon-button {
  border: 1px solid rgba(17, 21, 26, .15);
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  padding: 9px 14px;
  cursor: pointer;
  transition: .2s ease;
}
.ghost-button:hover { background: #fff; transform: translateY(-1px); }
.count-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; background: var(--ink); color: white; border-radius: 20px; font-size: 11px; }

main { max-width: 1280px; margin: auto; padding: 0 28px 70px; }
.hero { padding: 72px 12px 58px; }
.section-kicker { margin: 0 0 15px; font: 700 11px/1.2 Manrope, sans-serif; letter-spacing: .17em; color: #565d63; }
.hero h1 { margin: 0; max-width: 830px; font: 800 clamp(50px, 7vw, 92px)/.94 Manrope, sans-serif; letter-spacing: -.065em; }
.hero h1 em { color: var(--coral); -webkit-text-stroke: 0; font-style: normal; }
.hero-lead { max-width: 660px; margin: 25px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }

.game-shell { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.game-tabs { display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px; border-bottom: 1px solid var(--line); background: #eae7df; gap: 6px; }
.game-tab { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 53px; border: 0; border-radius: 16px; background: transparent; color: #70757a; cursor: pointer; font-weight: 700; transition: .2s ease; }
.game-tab span { font: 800 13px Manrope, sans-serif; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(17,21,26,.08); }
.game-tab:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.game-tab.active { background: var(--ink); color: white; box-shadow: 0 8px 20px rgba(17,21,26,.18); }
.game-tab.active span { color: var(--ink); background: var(--lime); }
.game-tab.food-tab.active span { background: var(--coral); color: white; }
.panels { min-height: 650px; }
.game-panel { min-height: 650px; animation: panelIn .28s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }
.panel-grid { display: grid; grid-template-columns: 390px 1fr; min-height: 650px; }
.control-card { padding: 46px; border-right: 1px solid var(--line); }
.control-card.compact { padding: 38px; }
.control-card h2, .race-head h2, .balloon-head h2, .food-heading h2, .drawer-head h2 { margin: 0 0 12px; font: 800 clamp(28px, 3vw, 40px)/1.05 Manrope, sans-serif; letter-spacing: -.045em; }
.muted { color: var(--muted); line-height: 1.55; }
.muted.tiny { font-size: 13px; }
label { display: block; margin: 22px 0 0; font-weight: 700; font-size: 13px; }
input, textarea { width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(45,100,189,.28); }
textarea { resize: vertical; line-height: 1.55; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label-note { float: right; color: #989b9d; font-weight: 500; }
.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; margin-top: 26px; padding: 15px 20px; border: 1px solid var(--ink); border-radius: 13px; background: var(--lime); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); font: 800 13px Manrope, sans-serif; letter-spacing: .06em; cursor: pointer; transition: .15s ease; }
.primary-button:hover, .secondary-button:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.primary-button:active, .secondary-button:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.primary-button:disabled, .secondary-button:disabled { cursor:wait; opacity:.62; transform:none; box-shadow:3px 3px 0 var(--ink); }
.secondary-button { background: white; }
.compact-button { width: auto; margin: 0; padding-inline: 24px; }
.inline-error { min-height: 18px; margin: 14px 0 0; color: #d63b2c; font-size: 13px; }
.text-button { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
.text-button.danger { color: #c33f34; margin-top: auto; }

.number-stage { position: relative; display: grid; place-content: center; text-align: center; overflow: hidden; min-height: 650px; background: #171b20; color: white; }
.number-stage::before { content:""; position:absolute; width: 420px; height: 420px; left: 50%; top: 50%; transform: translate(-50%,-50%); border-radius: 50%; background: var(--lime); filter: blur(130px); opacity: .13; }
.number-stage p { position: relative; margin: 0; color: var(--lime); letter-spacing: .2em; font-size: 10px; font-weight: 800; }
.number-result { position: relative; max-width: 700px; padding: 10px 35px; font: 800 clamp(90px, 15vw, 190px)/1 Manrope, sans-serif; letter-spacing: -.08em; overflow-wrap: anywhere; text-shadow: 7px 7px 0 rgba(45,100,189,.18); }
.number-result.multi { font-size: clamp(45px, 7vw, 90px); letter-spacing: -.04em; }
.number-result.rolling { animation: numberPulse .11s infinite alternate; }
@keyframes numberPulse { to { transform: scale(1.035); opacity: .75; } }
.number-stage small { position: relative; color: #8f969c; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit::before { content:""; position:absolute; width:9px; height:9px; background:var(--coral); border-radius:50%; top:25%; left:0; box-shadow: 0 0 14px var(--coral); }
.orbit-one { width: 460px; height: 460px; animation: orbit 18s linear infinite; }
.orbit-two { width: 610px; height: 610px; animation: orbit 28s linear infinite reverse; }
.orbit-two::before { background:var(--lime); box-shadow:0 0 14px var(--lime); }
@keyframes orbit { to { transform:translate(-50%,-50%) rotate(1turn); } }

.wheel-layout { grid-template-columns: minmax(500px, 1.25fr) minmax(360px, .85fr); background:#fff; }
.wheel-stage { position: relative; display: grid; place-items: center; min-height: 650px; overflow: hidden; border-right:1px solid var(--line); background:#fbfbfd; }
.wheel-stage::before { content:""; position:absolute; width:555px; height:555px; border-radius:50%; background:#fff; box-shadow:0 12px 50px rgba(38,48,66,.08); }
.wheel-frame { position:relative; z-index:1; width: min(520px, 75vw); height: min(520px, 75vw); transition: transform 10s cubic-bezier(.08,.64,.06,1); filter: drop-shadow(0 15px 20px rgba(27,36,52,.17)); }
#wheelCanvas { display:block; width:100%; height:100%; }
.wheel-pointer { position:absolute; z-index:4; top:43px; left:50%; width:4px; height:42px; transform:translateX(-50%); border-radius:4px; background:#ec2637; filter:drop-shadow(0 3px 5px rgba(220,25,45,.25)); }
.wheel-pointer::after { content:""; position:absolute; left:50%; bottom:-3px; width:0; height:0; transform:translateX(-50%); border-left:9px solid transparent; border-right:9px solid transparent; border-top:13px solid #ec2637; }
.wheel-center { position:absolute; z-index:3; width:74px; height:74px; border-radius:50%; border:7px solid white; background:#ed1b2f; box-shadow:0 0 0 2px #d8dce2, 0 8px 18px rgba(45,53,70,.2); cursor:pointer; transition:.18s ease; }
.wheel-center span { display:block; width:16px; height:16px; margin:auto; border-radius:50%; background:#fff; }
.wheel-center:hover { transform:scale(1.08); background:#d80e24; }
.list-meta { display:flex; justify-content:space-between; align-items:center; margin-top:10px; color:var(--muted); font-size:12px; }
.list-shuffle-button { display:inline-flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid #cfd2d4; border-radius:999px; background:#fff; color:var(--ink); font:800 10px Manrope,sans-serif; letter-spacing:.07em; cursor:pointer; transition:.16s ease; }
.list-shuffle-button span { font-size:18px; line-height:0; transform:rotate(-18deg); }
.list-shuffle-button:hover { border-color:var(--ink); transform:translateY(-1px); box-shadow:0 4px 12px rgba(16,21,25,.1); }
.list-shuffle-button:disabled { opacity:.45; cursor:wait; transform:none; box-shadow:none; }
#wheelItems:disabled { opacity:.72; cursor:not-allowed; }
.winner-strip { display:flex; align-items:center; gap:12px; margin-top:25px; padding:14px; border:1px solid var(--line); border-radius:14px; background:#f5f2eb; }
.winner-strip > span { display:grid; place-items:center; width:37px; height:37px; flex:0 0 37px; background:var(--lime); border-radius:10px; }
.winner-strip small, .winner-strip strong { display:block; }
.winner-strip small { font-size:9px; letter-spacing:.12em; color:var(--muted); }
.winner-strip strong { margin-top:3px; }
.duration-note { margin:10px 0 0; color:var(--muted); font-size:11px; text-align:center; }

.race-head, .balloon-head, .food-heading { display:flex; justify-content:space-between; align-items:center; gap:30px; padding:38px 42px 28px; border-bottom:1px solid var(--line); }
.race-head h2, .balloon-head h2, .food-heading h2 { margin-bottom:0; }
.race-grid, .balloon-layout { display:grid; grid-template-columns:330px 1fr; min-height:510px; }
.race-editor, .balloon-editor { border-right:1px solid var(--line); }
.race-game { position:relative; min-width:0; min-height:510px; overflow:hidden; background:#79c8ee; }
#raceCanvas { display:block; width:100%; height:100%; min-height:510px; object-fit:cover; }
.race-countdown { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; color:#fff; font:900 clamp(70px,12vw,150px)/1 Manrope,sans-serif; text-shadow:0 8px 0 rgba(20,34,46,.25), 0 0 35px rgba(255,255,255,.5); opacity:0; transform:scale(.6); }
.race-countdown.show { animation:countPop .7s cubic-bezier(.15,1.25,.2,1); }
@keyframes countPop { 0%{opacity:0;transform:scale(.5)} 30%{opacity:1;transform:scale(1)} 75%{opacity:1} 100%{opacity:0;transform:scale(1.35)} }
.race-hud { position:absolute; left:18px; right:18px; top:16px; display:flex; justify-content:space-between; align-items:center; color:white; text-shadow:0 2px 4px rgba(0,0,0,.35); font:800 11px Manrope,sans-serif; letter-spacing:.14em; pointer-events:none; }
.race-hud span { padding:8px 11px; border-radius:8px; background:rgba(12,25,31,.72); }
.race-hud b { padding:8px 11px; border-radius:8px; background:#ec2637; }

.balloon-head .muted { margin:8px 0 0; }
.bubble-stage { position:relative; min-width:0; min-height:510px; overflow:hidden; padding:16px 18px 38px; background:#dfe2ff; background-image:linear-gradient(rgba(255,255,255,.34) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.34) 1px,transparent 1px); background-size:28px 28px; }
#bubbleCanvas { display:block; width:100%; height:auto; max-height:520px; margin:auto; border:2px solid rgba(255,255,255,.85); border-radius:18px; background:#c8caf7; box-shadow:inset 0 0 35px rgba(61,62,155,.11); cursor:crosshair; touch-action:none; }
.bubble-score { display:flex; justify-content:space-between; align-items:center; min-height:34px; color:#4a4a87; font:800 10px Manrope,sans-serif; letter-spacing:.12em; }
.bubble-score span { display:flex; align-items:center; gap:7px; }
.bubble-score b { color:#ed1b2f; font-size:14px; }
.bubble-score i { display:inline-block; width:16px; height:16px; border-radius:50%; background:var(--next,#ed1b2f); box-shadow:inset -3px -3px 0 rgba(0,0,0,.14), inset 3px 3px 0 rgba(255,255,255,.35); }
.bubble-help { position:absolute; left:0; right:0; bottom:6px; margin:0; text-align:center; color:#66689b; font-size:10px; }

.food-panel { background:#fbf4e9; }
.food-layout { display:grid; grid-template-columns:390px 1fr; min-height:560px; }
.food-controls { border-right:1px solid var(--line); }
.filter-block { margin-top:20px; }
.filter-label { display:block; margin-bottom:9px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.16em; }
.chip-row { display:flex; flex-wrap:wrap; gap:7px; }
.filter-chip { padding:8px 11px; border:1px solid var(--line); border-radius:999px; background:white; cursor:pointer; font-size:11px; }
.filter-chip.active { border-color:var(--ink); background:var(--ink); color:white; }
.budget-range { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.48); }
.budget-range-head, .range-values { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:10px; }
.budget-range-head { color:var(--muted); }.budget-range-head strong { color:var(--ink); }
.range-shell { --range-left:0%; --range-right:0%; position:relative; height:30px; margin-top:9px; }
.range-shell::before, .range-fill { content:""; position:absolute; left:0; right:0; top:13px; height:4px; border-radius:99px; background:#d9d6cf; }
.range-fill { left:var(--range-left); right:var(--range-right); background:var(--coral); }
.range-shell input[type="range"] { position:absolute; inset:0; width:100%; height:30px; margin:0; padding:0; border:0; background:transparent; box-shadow:none; appearance:none; pointer-events:none; }
.range-shell input[type="range"]::-webkit-slider-runnable-track { height:4px; background:transparent; }
.range-shell input[type="range"]::-webkit-slider-thumb { width:18px; height:18px; margin-top:-7px; border:3px solid var(--coral); border-radius:50%; background:var(--card); appearance:none; pointer-events:auto; cursor:grab; box-shadow:0 2px 7px rgba(0,0,0,.18); }
.range-shell input[type="range"]::-moz-range-track { height:4px; background:transparent; }
.range-shell input[type="range"]::-moz-range-thumb { width:13px; height:13px; border:3px solid var(--coral); border-radius:50%; background:var(--card); pointer-events:auto; cursor:grab; }
.range-values output { min-width:90px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--ink); text-align:center; font-size:11px; }
.toggle-row { display:flex; align-items:center; gap:10px; cursor:pointer; }
.toggle-row input { position:absolute; opacity:0; width:1px; }
.toggle-ui { width:38px; height:22px; padding:3px; border-radius:99px; background:#ccc; transition:.2s; }
.toggle-ui::after { content:""; display:block; width:16px; height:16px; border-radius:50%; background:white; transition:.2s; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.toggle-row input:checked + .toggle-ui { background:var(--coral); }
.toggle-row input:checked + .toggle-ui::after { transform:translateX(16px); }
.shopee-region { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.shopee-region-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.shopee-region select { min-width:0; width:100%; padding:11px 34px 11px 12px; border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--ink); outline:none; cursor:pointer; }
.shopee-region select:focus { border-color:var(--coral); box-shadow:0 0 0 3px rgba(45,100,189,.2); }
.shopee-region button { padding:10px 12px; border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--ink); cursor:pointer; font-size:10px; font-weight:700; }
.shopee-region button:disabled { cursor:wait; opacity:.6; }
.shopee-region small { display:block; min-height:28px; margin-top:7px; color:var(--muted); font-size:9px; line-height:1.45; }
.food-eligible { display:flex; justify-content:space-between; margin-top:22px; padding:11px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.food-eligible strong { color:var(--ink); }
.food-button { background:var(--coral); color:white; }
.custom-food { margin-top:20px; font-size:12px; }
.custom-food summary { cursor:pointer; font-weight:700; }
.custom-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:7px; margin-top:8px; }
.custom-row input { min-width:0; }
.custom-row button { align-self:end; padding:13px 15px; border:0; border-radius:11px; background:var(--ink); color:white; cursor:pointer; }
.custom-image-input { align-self:end; margin:8px 0 0; padding:12px 13px; border:1px solid var(--line); border-radius:11px; background:var(--card); cursor:pointer; white-space:nowrap; font-size:11px; }
.custom-image-input input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.custom-image-name { display:block; margin-top:7px; color:var(--muted); font-size:10px; }
.custom-list { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.custom-pill { border:1px solid var(--line); background:white; border-radius:99px; padding:5px 9px; font-size:10px; cursor:pointer; }
.food-stage { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:44px; text-align:center; overflow:hidden; position:relative; }
.food-stage::before { content:""; position:absolute; width:500px; height:500px; border-radius:50%; border:1px dashed rgba(17,21,26,.11); }
.plate { position:relative; z-index:1; display:grid; place-items:center; width:218px; height:218px; border:20px solid white; border-radius:50%; background:#f2eee4; box-shadow:inset 0 0 0 3px #ded9cf, 0 24px 40px rgba(56,45,31,.18); transition:.4s ease; }
.plate.spin { animation:plateSpin .8s cubic-bezier(.2,.8,.2,1); }
.plate.selecting { animation:plateSpin 1.15s linear infinite; }
@keyframes plateSpin { 50% { transform:rotate(180deg) scale(.85); } to { transform:rotate(360deg); } }
.plate span { font-size:100px; filter:drop-shadow(0 12px 8px rgba(0,0,0,.15)); }
.plate img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.food-overline { position:relative; margin:28px 0 7px; color:#2d64bd; font-size:10px; letter-spacing:.16em; font-weight:800; }
.food-stage h3 { position:relative; margin:0; font:800 clamp(35px,5vw,62px)/1 Manrope,sans-serif; letter-spacing:-.055em; }
.food-stage > p:not(.food-overline) { position:relative; max-width:520px; color:var(--muted); }
.food-stage .food-price-note { max-width:560px; margin:9px 0 6px; color:#30363b; font-size:11.5px; font-weight:500; line-height:1.5; }
.food-result-tags { position:relative; display:flex; gap:7px; justify-content:center; flex-wrap:wrap; }
.result-tag { padding:4px 9px; border-radius:99px; background:#e7e1d5; font-size:9.5px; font-weight:600; }
.platform-links { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; width:min(620px,100%); margin-top:22px; }
.platform-button { display:flex; align-items:center; justify-content:center; min-width:0; height:50px; padding:11px 14px; border:1px solid rgba(255,255,255,.28); border-radius:12px; background:var(--coral); color:white; text-decoration:none; transition:.2s; box-shadow:0 6px 16px rgba(86,39,30,.13); }
.platform-button img { display:block; width:auto; max-width:100%; height:auto; max-height:24px; object-fit:contain; }
.platform-button:hover { transform:translateY(-2px); }
.platform-button[aria-disabled="true"] { opacity:.38; filter:grayscale(1); cursor:not-allowed; transform:none; }


.history-drawer { position:fixed; z-index:101; right:0; top:0; width:min(440px,100vw); height:100vh; display:flex; flex-direction:column; padding:32px; background:var(--card); box-shadow:-20px 0 50px rgba(0,0,0,.2); transform:translateX(105%); transition:.28s ease; }
.history-drawer.open { transform:none; }
.drawer-head { display:flex; justify-content:space-between; border-bottom:1px solid var(--line); padding-bottom:20px; }
.drawer-head h2 { font-size:28px; }
.icon-button { width:40px; height:40px; padding:0; font-size:23px; }
.history-list { flex:1; overflow:auto; padding:12px 0; }
.history-empty { padding:60px 20px; text-align:center; color:var(--muted); }
.history-item { display:grid; grid-template-columns:40px 1fr auto; gap:12px; align-items:center; padding:13px 0; border-bottom:1px solid var(--line); }
.history-kind { display:grid; place-items:center; width:38px; height:38px; border-radius:10px; background:#eeeae0; }
.history-item strong, .history-item small { display:block; }.history-item small { color:var(--muted); margin-top:3px; }.history-time { color:#969a9d; font-size:10px; }
.drawer-backdrop { position:fixed; z-index:100; inset:0; background:rgba(12,15,17,.5); opacity:0; visibility:hidden; transition:.25s; backdrop-filter:blur(3px); }
.drawer-backdrop.open { opacity:1; visibility:visible; }

.result-modal { position:fixed; z-index:110; inset:0; display:grid; place-items:center; padding:20px; background:rgba(10,12,14,.72); backdrop-filter:blur(7px); opacity:0; visibility:hidden; transition:.2s; }
.result-modal.open { opacity:1; visibility:visible; }
.modal-card { position:relative; width:min(500px,100%); padding:58px 40px 38px; text-align:center; border:1px solid #50565b; border-radius:28px; background:#171b20; color:white; box-shadow:0 25px 80px rgba(0,0,0,.45); transform:scale(.8) rotate(-2deg); transition:.3s cubic-bezier(.2,1.2,.3,1); }
.result-modal.open .modal-card { transform:scale(1) rotate(0); }
.modal-close { position:absolute; right:16px; top:14px; border:0; background:none; color:#aaa; font-size:28px; cursor:pointer; }
.modal-burst { display:grid; place-items:center; width:74px; height:74px; margin:0 auto 20px; border-radius:50%; background:var(--lime); color:var(--ink); font-size:32px; box-shadow:0 0 0 12px rgba(45,100,189,.13); }
.modal-card p { color:var(--lime); font-size:10px; font-weight:800; letter-spacing:.18em; }
.modal-card h2 { margin:14px 0 30px; font:800 clamp(35px,7vw,58px)/1 Manrope,sans-serif; letter-spacing:-.05em; }
.modal-card .primary-button { max-width:250px; margin-inline:auto; }
.modal-actions { display:flex; align-items:center; justify-content:center; gap:12px; }
.modal-actions .primary-button { width:auto; min-width:180px; margin:0; }
.modal-action-secondary { padding:14px 18px; border:1px solid #555d63; border-radius:12px; background:transparent; color:#f5f5f2; font:800 12px Manrope,sans-serif; letter-spacing:.06em; cursor:pointer; }
.modal-action-secondary:hover { border-color:#fff; background:rgba(255,255,255,.07); }
.wheel-result { background:rgba(9,12,15,.62); backdrop-filter:blur(2px); }
.wheel-result .modal-card { width:min(620px,100%); padding:52px 42px 38px; border-radius:18px; }
.wheel-result .modal-burst { width:60px; height:60px; margin-bottom:18px; }
.wheel-result .modal-remove { background:var(--lime); }
.toast { position:fixed; z-index:120; left:50%; bottom:24px; max-width:min(440px,calc(100vw - 30px)); padding:12px 18px; border:1px solid rgba(255,255,255,.16); border-radius:999px; background:#11151a; color:#fff; font-size:12px; font-weight:700; line-height:1.4; text-align:center; box-shadow:0 12px 34px rgba(0,0,0,.38); transform:translate(-50%,30px); opacity:0; pointer-events:none; transition:.25s; }
.toast.show { transform:translate(-50%,0); opacity:1; }
.confetti-canvas { position:fixed; z-index:115; inset:0; width:100%; height:100%; pointer-events:none; }

html[data-theme="dark"] .topbar { border-color:var(--line); }
html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .game-tab.active,
html[data-theme="dark"] .filter-chip.active,
html[data-theme="dark"] .custom-row button { background:#080b0f; color:#fff; }
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button { border-color:var(--line); background:rgba(255,255,255,.04); }
html[data-theme="dark"] .ghost-button:hover { background:rgba(255,255,255,.1); }
html[data-theme="dark"] .count-badge { background:#07090c; color:#fff; }
html[data-theme="dark"] .section-kicker { color:#aeb5bb; }
html[data-theme="dark"] .game-tabs { background:#11151a; }
html[data-theme="dark"] .game-tab { color:#9ea5ab; }
html[data-theme="dark"] .game-tab:hover { color:#fff; background:rgba(255,255,255,.08); }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .list-shuffle-button,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .custom-pill { background:#20252c; color:var(--ink); }
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .secondary-button { border-color:#06080b; box-shadow:4px 4px 0 #06080b; }
html[data-theme="dark"] .primary-button { color:#101318; }
html[data-theme="dark"] .food-button { color:#fff; }
html[data-theme="dark"] .wheel-layout,
html[data-theme="dark"] .wheel-stage { background:#12161c; }
html[data-theme="dark"] .wheel-stage::before { background:#1c222a; box-shadow:0 12px 50px rgba(0,0,0,.34); }
html[data-theme="dark"] .winner-strip { background:#20252c; }
html[data-theme="dark"] .food-panel { background:#181712; }
html[data-theme="dark"] .food-stage::before { border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .food-stage .food-price-note { color:#d5d9dc; }
html[data-theme="dark"] .result-tag { background:#2c3034; }
html[data-theme="dark"] .history-kind { background:#292e35; }
html[data-theme="dark"] .bubble-stage { background-color:#20233c; background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); }
html[data-theme="dark"] #bubbleCanvas { background:#303360; border-color:rgba(255,255,255,.18); }
html[data-theme="dark"] .bubble-score,
html[data-theme="dark"] .bubble-help { color:#c5c7ee; }
html[data-theme="dark"] .brand-mark { color:var(--coral); }
html[data-theme="dark"] .budget-range { background:rgba(255,255,255,.035); }
html[data-theme="dark"] .shopee-region select,
html[data-theme="dark"] .shopee-region button { background:#20252c; }

@media (max-width: 900px) {
  .hero { padding-top:50px; }
  .game-tabs { overflow:visible; grid-template-columns:repeat(5,minmax(0,1fr)); }
  .panel-grid, .wheel-layout, .race-grid, .balloon-layout, .food-layout { grid-template-columns:1fr; }
  .control-card, .control-card.compact, .race-editor, .balloon-editor, .food-controls { border-right:0; border-bottom:1px solid var(--line); }
  .number-stage, .wheel-stage { min-height:520px; }.panels, .game-panel { min-height:0; }
  .wheel-layout .wheel-stage { order:2; border-right:0; }
  .race-game, #raceCanvas { min-height:500px; }
  .food-stage { min-height:580px; }
}
@media (max-width: 620px) {
  .topbar, main { padding-left:15px; padding-right:15px; }
  .desktop-label { display:none; }
  .hero { padding:42px 2px 38px; }
  .hero h1 { font-size:49px; }
  .hero-lead { font-size:15px; }
  .modal-actions { flex-direction:column-reverse; }
  .modal-actions .primary-button, .modal-action-secondary { width:100%; }
  .game-shell { border-radius:20px; }
  .game-tabs { width:100%; min-width:0; grid-template-columns:repeat(3,minmax(0,1fr)); border-radius:20px 20px 0 0; padding:7px; gap:5px; }
  .game-tab { min-width:0; min-height:46px; padding:5px 3px; gap:5px; overflow:hidden; white-space:nowrap; font-size:10px; }
  .game-tab span { width:24px; height:24px; border-radius:7px; font-size:11px; }
  .control-card, .control-card.compact { padding:30px 24px; }
  .number-stage, .wheel-stage { min-height:450px; }
  .number-result { font-size:100px; }.number-result.multi { font-size:48px; }
  .orbit-one { width:330px;height:330px }.orbit-two { width:430px;height:430px }
  .wheel-pointer { top:34px; }
  .race-head, .balloon-head, .food-heading { align-items:flex-start; padding:30px 24px 23px; flex-direction:column; }
  .compact-button { width:100%; }
  .race-game, #raceCanvas { min-height:420px; }
  .bubble-stage { padding:12px 8px 36px; }
  .food-stage { padding:45px 20px; }.plate { width:180px;height:180px }.plate span { font-size:80px; }
  .platform-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .shopee-region-row { grid-template-columns:1fr; }
  .custom-row { grid-template-columns:1fr 1fr; }
  .custom-row > input { grid-column:1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* --------------------------------------------------------------------------
   LIQUID GLASS UI
   Glass is reserved for navigation and controls; game content stays legible.
   -------------------------------------------------------------------------- */
:root {
  --glass: rgba(255, 255, 255, .50);
  --glass-soft: rgba(255, 255, 255, .34);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-content: rgba(255, 253, 248, .78);
  --glass-edge: rgba(255, 255, 255, .76);
  --glass-edge-soft: rgba(255, 255, 255, .46);
  --glass-shadow: 0 24px 70px rgba(45, 42, 38, .14), 0 4px 16px rgba(45, 42, 38, .07);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .82), inset 0 -1px 0 rgba(255, 255, 255, .18);
  --glass-blur: 24px;
  --orange-glass: rgba(45, 100, 189, .90);
  --orange-edge: rgba(154, 190, 241, .88);
}

html[data-theme="dark"] {
  --glass: rgba(28, 33, 41, .58);
  --glass-soft: rgba(26, 31, 38, .42);
  --glass-strong: rgba(27, 32, 39, .80);
  --glass-content: rgba(20, 24, 30, .78);
  --glass-edge: rgba(255, 255, 255, .16);
  --glass-edge-soft: rgba(255, 255, 255, .09);
  --glass-shadow: 0 26px 80px rgba(0, 0, 0, .42), 0 4px 18px rgba(0, 0, 0, .22);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .13), inset 0 -1px 0 rgba(255, 255, 255, .035);
  --orange-glass: rgba(45, 100, 189, .88);
  --orange-edge: rgba(128, 169, 229, .56);
}

body {
  isolation: isolate;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 2%, rgba(45, 100, 189, .20), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(84, 133, 207, .15), transparent 27rem),
    radial-gradient(circle at 70% 96%, rgba(120, 151, 255, .13), transparent 32rem),
    linear-gradient(145deg, rgba(45, 100, 189, .035), transparent 42%);
  background-attachment: fixed;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 7% 3%, rgba(45, 100, 189, .18), transparent 31rem),
    radial-gradient(circle at 92% 20%, rgba(169, 95, 255, .105), transparent 30rem),
    radial-gradient(circle at 67% 100%, rgba(70, 112, 214, .12), transparent 35rem),
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 45%);
}

.noise {
  opacity: .024;
  z-index: 1000;
  mix-blend-mode: soft-light;
}

.topbar,
.game-shell,
.history-drawer,
.modal-card,
.toast {
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.45);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.45);
}

.topbar {
  position: sticky;
  z-index: 80;
  top: 12px;
  width: min(1248px, calc(100% - 32px));
  height: 64px;
  margin: 12px auto 0;
  padding: 0 14px 0 18px;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 1px 14px auto;
  height: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .78), transparent);
  pointer-events: none;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  background: linear-gradient(145deg, #4378ca, #2354a4);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.40), 0 7px 16px rgba(31, 79, 154, .24);
}

.ghost-button,
.icon-button,
.list-shuffle-button,
.filter-chip,
.shopee-region button,
.modal-action-secondary {
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  border-color: var(--glass-edge);
  background: linear-gradient(145deg, rgba(255,255,255,.42), rgba(255,255,255,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 5px 14px rgba(37,38,40,.06);
}

.ghost-button:hover,
.icon-button:hover,
.list-shuffle-button:hover,
.shopee-region button:hover {
  border-color: rgba(45, 100, 189, .52);
  background: linear-gradient(145deg, rgba(255,255,255,.66), rgba(255,255,255,.26));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 8px 20px rgba(47,44,42,.10);
}

.count-badge {
  background: var(--orange-glass);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 3px 9px rgba(31,79,154,.24);
}

main { padding-top: 8px; }
.hero { position: relative; padding-top: 76px; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -5%;
  top: 18%;
  width: min(580px, 70vw);
  height: 180px;
  border-radius: 50%;
  background: rgba(45, 100, 189, .12);
  filter: blur(75px);
  pointer-events: none;
}

.hero h1 em {
  background: linear-gradient(105deg, #5b8bd5 5%, #2d64bd 55%, #79a3e2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.game-shell {
  position: relative;
  overflow: clip;
  border-color: var(--glass-edge);
  background: var(--glass-content);
  box-shadow: var(--glass-shadow), var(--glass-inset);
}

.game-shell::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  pointer-events: none;
}

.game-tabs {
  position: relative;
  z-index: 5;
  border-color: var(--glass-edge-soft);
  background: rgba(255, 255, 255, .20);
  -webkit-backdrop-filter: blur(20px) saturate(1.45);
  backdrop-filter: blur(20px) saturate(1.45);
}

.game-tab {
  border: 1px solid transparent;
}

.game-tab:hover {
  border-color: var(--glass-edge);
  background: rgba(255,255,255,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48);
}

.game-tab.active,
html[data-theme="dark"] .game-tab.active {
  border-color: var(--orange-edge);
  background: var(--orange-glass);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(20,57,117,.18), 0 10px 24px rgba(31,79,154,.24);
}

.game-tab.active span,
.game-tab.food-tab.active span {
  background: rgba(255,255,255,.88);
  color: #2455a1;
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(20,57,117,.13);
}

.control-card,
.race-head,
.balloon-head,
.food-heading,
.race-editor,
.balloon-editor,
.food-controls {
  border-color: var(--glass-edge-soft);
  background: rgba(255,255,255,.055);
}

input,
textarea,
.shopee-region select,
.budget-range,
.range-values output,
.custom-image-input {
  border-color: var(--glass-edge);
  background: rgba(255,255,255,.48);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  backdrop-filter: blur(12px) saturate(1.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 5px 15px rgba(46,44,41,.045);
}

input:focus,
textarea:focus,
.shopee-region select:focus {
  border-color: rgba(45, 100, 189, .74);
  box-shadow: 0 0 0 4px rgba(45,100,189,.16), inset 0 1px 0 rgba(255,255,255,.74), 0 8px 24px rgba(31,79,154,.12);
}

.primary-button,
.food-button,
.secondary-button {
  position: relative;
  overflow: hidden;
  border-color: var(--orange-edge);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(67,120,202,.97), rgba(35,84,164,.96));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(20,57,117,.22), 0 10px 25px rgba(31,79,154,.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
}

.secondary-button {
  border-color: var(--glass-edge);
  background: linear-gradient(145deg, rgba(255,255,255,.64), rgba(255,255,255,.25));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 22px rgba(37,38,40,.08);
}

.primary-button::before,
.secondary-button::before {
  content: "";
  position: absolute;
  inset: 1px 10% auto;
  height: 1px;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  pointer-events: none;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px) scale(1.006);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52), inset 0 -1px 0 rgba(20,57,117,.18), 0 14px 32px rgba(31,79,154,.28);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(.985);
  box-shadow: inset 0 2px 5px rgba(17,49,99,.20), 0 5px 14px rgba(31,79,154,.20);
}

.primary-button:disabled,
.secondary-button:disabled {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 5px 14px rgba(0,0,0,.08);
}

.winner-strip,
.budget-range,
.result-tag,
.platform-button,
.race-hud span,
.race-hud b {
  -webkit-backdrop-filter: blur(15px) saturate(1.35);
  backdrop-filter: blur(15px) saturate(1.35);
}

.winner-strip {
  border-color: var(--glass-edge);
  background: linear-gradient(145deg, rgba(255,255,255,.45), rgba(255,255,255,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 7px 18px rgba(36,37,39,.06);
}

.filter-chip.active,
html[data-theme="dark"] .filter-chip.active {
  border-color: var(--orange-edge);
  background: var(--orange-glass);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 5px 15px rgba(31,79,154,.22);
}

.toggle-ui {
  border: 1px solid var(--glass-edge);
  background: rgba(102,107,113,.32);
  box-shadow: inset 0 1px 4px rgba(25,28,32,.14), 0 1px 0 rgba(255,255,255,.65);
}

.toggle-row input:checked + .toggle-ui {
  background: linear-gradient(110deg, #4378ca, #2d64bd);
  box-shadow: inset 0 1px 4px rgba(20,57,117,.20), 0 3px 12px rgba(31,79,154,.24);
}

.number-stage {
  background:
    radial-gradient(circle at 52% 45%, rgba(45,100,189,.24), transparent 37%),
    radial-gradient(circle at 78% 85%, rgba(102,128,255,.14), transparent 36%),
    linear-gradient(145deg, #1b2028, #0e1116 66%);
}

.number-stage::after,
.race-game::after,
.bubble-stage::after,
.wheel-stage::after,
.food-stage::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
  pointer-events: none;
}

.wheel-layout,
.wheel-stage {
  background: rgba(250,250,252,.68);
}

.wheel-stage::before {
  background: rgba(255,255,255,.47);
  border: 1px solid rgba(255,255,255,.60);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 20px 60px rgba(45,53,68,.11);
}

.wheel-center {
  border-color: rgba(255,255,255,.86);
  background: linear-gradient(145deg, #ff745f, #de1730);
  box-shadow: inset 0 2px 1px rgba(255,255,255,.35), 0 0 0 2px rgba(211,216,224,.74), 0 10px 24px rgba(191,31,48,.28);
}

.race-hud span,
.race-hud b {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(14,25,31,.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 17px rgba(5,12,16,.13);
}

.race-hud b { background: rgba(236,38,55,.72); }

.bubble-stage {
  background-color: rgba(218, 224, 255, .74);
  background-image:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,.70), transparent 15rem),
    linear-gradient(rgba(255,255,255,.25) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.25) 1px,transparent 1px);
}

#bubbleCanvas {
  border-color: rgba(255,255,255,.64);
  background: rgba(178,183,243,.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 40px rgba(61,62,155,.12), 0 15px 38px rgba(63,67,130,.12);
}

.food-panel { background: transparent; }
.food-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.45), transparent 23rem),
    linear-gradient(145deg, rgba(255,245,225,.42), rgba(255,255,255,.10));
}

.plate {
  border-color: rgba(255,255,255,.88);
  background: rgba(242,238,228,.68);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 3px rgba(220,215,205,.64), 0 25px 54px rgba(56,45,31,.18);
}

.result-tag {
  border: 1px solid var(--glass-edge-soft);
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52);
}

.platform-button {
  border-color: var(--orange-edge);
  background: var(--orange-glass);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 9px 23px rgba(31,79,154,.19);
}

.platform-button:hover {
  border-color: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 13px 29px rgba(31,79,154,.24);
}

.history-drawer {
  border-left: 1px solid var(--glass-edge);
  background: var(--glass-strong);
  box-shadow: -24px 0 70px rgba(0,0,0,.22), var(--glass-inset);
}

.drawer-backdrop {
  background: rgba(10, 14, 20, .32);
  -webkit-backdrop-filter: blur(12px) saturate(.82);
  backdrop-filter: blur(12px) saturate(.82);
}

.result-modal,
.wheel-result {
  background: rgba(10, 14, 20, .40);
  -webkit-backdrop-filter: blur(18px) saturate(.78);
  backdrop-filter: blur(18px) saturate(.78);
}

.modal-card,
.wheel-result .modal-card {
  border-color: rgba(255,255,255,.18);
  background: rgba(23,27,32,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 30px 90px rgba(0,0,0,.48);
}

.modal-burst {
  border: 1px solid rgba(255,255,255,.36);
  background: linear-gradient(145deg, #5b8bd5, #2759aa);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.46), 0 0 0 12px rgba(45,100,189,.11), 0 12px 30px rgba(31,79,154,.26);
}

.toast {
  border-color: rgba(255,255,255,.22);
  background: rgba(22,27,34,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 16px 45px rgba(0,0,0,.38);
}

html[data-theme="dark"] .topbar {
  border-color: var(--glass-edge);
  background: var(--glass);
}

html[data-theme="dark"] .brand-mark { background: linear-gradient(145deg, #4d81d1, #2759aa); color:#fff; }
html[data-theme="dark"] .game-tabs { background: rgba(11,15,20,.34); }
html[data-theme="dark"] .game-tab:hover { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .list-shuffle-button,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .shopee-region button,
html[data-theme="dark"] .modal-action-secondary {
  border-color: var(--glass-edge);
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 17px rgba(0,0,0,.13);
}

html[data-theme="dark"] .ghost-button:hover,
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .list-shuffle-button:hover,
html[data-theme="dark"] .shopee-region button:hover { background: rgba(255,255,255,.115); }

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .shopee-region select,
html[data-theme="dark"] .budget-range,
html[data-theme="dark"] .range-values output,
html[data-theme="dark"] .custom-image-input,
html[data-theme="dark"] .custom-pill {
  border-color: var(--glass-edge);
  background: rgba(255,255,255,.065);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 6px 18px rgba(0,0,0,.14);
}

html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .food-button {
  border-color: var(--orange-edge);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 -1px 0 rgba(14,43,91,.26), 0 11px 27px rgba(31,79,154,.27);
}

html[data-theme="dark"] .secondary-button {
  border-color: var(--glass-edge);
  background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 22px rgba(0,0,0,.17);
}

html[data-theme="dark"] .winner-strip {
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
}

html[data-theme="dark"] .wheel-layout,
html[data-theme="dark"] .wheel-stage { background: rgba(12,16,21,.47); }
html[data-theme="dark"] .wheel-stage::before { background: rgba(35,41,50,.54); border-color:rgba(255,255,255,.10); }
html[data-theme="dark"] .food-panel { background: transparent; }
html[data-theme="dark"] .food-stage { background: radial-gradient(circle at 50% 42%, rgba(45,100,189,.09), transparent 24rem), rgba(255,255,255,.012); }
html[data-theme="dark"] .result-tag { background: rgba(255,255,255,.07); }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar, .game-shell, .history-drawer { background: var(--card); }
  .ghost-button, .icon-button, .list-shuffle-button, .filter-chip, input, textarea, .shopee-region select, .shopee-region button { background: var(--card); }
  .modal-card, .toast { background: #171b20; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar, .game-shell, .history-drawer { background: var(--card); -webkit-backdrop-filter:none; backdrop-filter:none; }
  .ghost-button, .icon-button, .list-shuffle-button, .filter-chip, input, textarea, .shopee-region select, .shopee-region button { background: var(--card); -webkit-backdrop-filter:none; backdrop-filter:none; }
  .modal-card, .toast { background:#171b20; -webkit-backdrop-filter:none; backdrop-filter:none; }
}

@media (max-width: 900px) {
  .topbar { top: 8px; width:calc(100% - 20px); margin-top:8px; }
  .game-shell { border-radius:26px; }
}

@media (max-width: 620px) {
  .topbar {
    height: 58px;
    width: calc(100% - 16px);
    padding: 0 9px 0 12px;
    border-radius: 19px;
  }
  .brand { gap:8px; font-size:12px; letter-spacing:.10em; }
  .brand-mark { width:30px; height:30px; border-radius:10px; }
  .top-actions { gap:5px; }
  .top-actions .ghost-button { display:grid; place-items:center; min-width:34px; height:34px; padding:6px 8px; }
  .top-actions .count-badge { position:absolute; transform:translate(10px,-10px); margin:0; min-width:16px; height:16px; font-size:9px; }
  main { padding-top:0; }
  .hero { padding-top:52px; }
  .game-tabs { border-radius:19px 19px 0 0; background:rgba(255,255,255,.17); }
  .game-tab.active { box-shadow:inset 0 1px 0 rgba(255,255,255,.38), 0 7px 17px rgba(31,79,154,.22); }
  .game-shell { border-radius:22px; }
  .control-card, .control-card.compact { padding:30px 22px; }
  .modal-card, .wheel-result .modal-card { padding:50px 24px 30px; border-radius:24px; }
}

/* Number game — slot machine */
.number-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 40px 34px;
}

.slot-machine {
  --reel-size: clamp(76px, 7.4vw, 104px);
  position: relative;
  width: min(690px, calc(100% - 38px));
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(126, 169, 232, .30);
  border-radius: 34px;
  background: rgba(14, 22, 35, .82);
  box-shadow: inset 0 1px 0 rgba(151, 188, 240, .20), inset 0 -1px 0 rgba(0, 0, 0, .34), 0 28px 68px rgba(0,0,0,.35), 0 0 48px rgba(45,100,189,.10);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.slot-machine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 14px;
  color: #a9c6ef;
  font: 800 11px/1 Manrope, sans-serif;
  letter-spacing: .18em;
}

.slot-lights { display:flex; gap:7px; }
.slot-lights i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(147,181,234,.38);
  border-radius: 50%;
  background: #24436f;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.38);
}

.slot-display {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(131, 171, 229, .32);
  border-radius: 24px;
  background: #09101b;
  box-shadow: inset 0 8px 24px rgba(0,0,0,.56), inset 0 0 0 1px rgba(255,255,255,.025), 0 1px 0 rgba(255,255,255,.08);
}

.slot-display::before,
.slot-display::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  height: 24%;
  pointer-events: none;
}
.slot-display::before { top:0; background:linear-gradient(#09101b, transparent); }
.slot-display::after { bottom:0; background:linear-gradient(transparent, #09101b); }

.slot-reels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, .8vw, 10px);
  min-height: var(--reel-size);
}

.slot-reels.dense { --reel-size: clamp(52px, 5vw, 72px); gap:4px; }
.slot-reels.ultra-dense { --reel-size: clamp(35px, 3.6vw, 52px); gap:3px; }

.slot-reel,
.slot-sign {
  position: relative;
  flex: 0 1 calc(var(--reel-size) * .72);
  width: calc(var(--reel-size) * .72);
  height: var(--reel-size);
  overflow: hidden;
  border: 1px solid rgba(196, 216, 244, .68);
  border-radius: clamp(10px, 1.2vw, 17px);
  background: #eef4fc;
  color: #12213a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), inset 0 -10px 22px rgba(71,105,156,.12), 0 8px 18px rgba(0,0,0,.22);
}

.slot-track {
  will-change: transform;
  transform: translate3d(0,0,0);
  transition-property: transform;
  transition-timing-function: cubic-bezier(.10, .72, .055, 1);
}

.slot-track span,
.slot-reel-placeholder span,
.slot-sign {
  display: grid;
  place-items: center;
  height: var(--reel-size);
  font: 800 calc(var(--reel-size) * .68)/1 Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.06em;
}

.slot-sign {
  flex-basis: calc(var(--reel-size) * .48);
  width: calc(var(--reel-size) * .48);
  border-color: transparent;
  background: transparent;
  color: #d9e7fa;
  box-shadow: none;
}

.slot-reels.is-idle .slot-reel { opacity:.76; }
.slot-reel.locked { animation:slotLock .28s ease-out both; }
@keyframes slotLock {
  35% { transform:translateY(4px) scale(.97); border-color:#74a0df; }
  70% { transform:translateY(-2px) scale(1.015); box-shadow:inset 0 0 0 1px #fff, 0 0 22px rgba(45,100,189,.46); }
}

.slot-result-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 14px 8px 0;
  text-align: left;
}

.slot-result-row > span {
  flex: 0 0 auto;
  color: #7598c9;
  font: 800 9px/1 Manrope, sans-serif;
  letter-spacing: .16em;
}

.slot-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 80px;
  overflow: auto;
  color: #eaf2fd;
  font: 800 16px/1.2 Manrope, sans-serif;
}

.slot-summary > span {
  padding: 6px 9px;
  border: 1px solid rgba(127,169,229,.24);
  border-radius: 9px;
  background: rgba(45,100,189,.17);
  color: #eaf2fd;
  font-variant-numeric: tabular-nums;
}

.slot-lever {
  position: absolute;
  right: -43px;
  top: 42%;
  width: 43px;
  height: 112px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 88%;
}
.slot-lever::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 18px;
  width: 7px;
  height: 82px;
  border-radius: 99px;
  background: #7494bf;
  box-shadow: inset 2px 0 1px rgba(255,255,255,.32), 3px 4px 8px rgba(0,0,0,.34);
}
.slot-lever span {
  position: absolute;
  z-index: 2;
  left: 5px;
  top: 0;
  width: 35px;
  height: 35px;
  border: 1px solid #8eb2e5;
  border-radius: 50%;
  background: #2d64bd;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.30), inset 0 -4px 7px rgba(16,50,103,.34), 0 7px 15px rgba(0,0,0,.30);
}
.slot-lever:hover { transform:rotate(5deg); }
.slot-lever:active,
.slot-machine.spinning .slot-lever { animation:pullLever .55s cubic-bezier(.2,.8,.2,1); }
.slot-lever:disabled { cursor:wait; }
@keyframes pullLever { 45% { transform:rotate(30deg); } }

.slot-machine.spinning {
  border-color: rgba(103,153,226,.58);
  box-shadow: inset 0 1px 0 rgba(151,188,240,.20), 0 28px 68px rgba(0,0,0,.35), 0 0 55px rgba(45,100,189,.20);
}
.slot-machine.spinning .slot-lights i { animation:slotLight .54s ease-in-out infinite alternate; }
.slot-machine.spinning .slot-lights i:nth-child(2) { animation-delay:.16s; }
.slot-machine.spinning .slot-lights i:nth-child(3) { animation-delay:.32s; }
@keyframes slotLight { to { background:#78a4e4; box-shadow:0 0 13px rgba(91,139,213,.92); } }

.slot-machine.won {
  animation:slotWin .8s ease-out both;
}
@keyframes slotWin {
  35% { transform:scale(1.018); border-color:#8bb2e9; box-shadow:0 0 70px rgba(45,100,189,.42); }
}

.number-stage > small {
  display: block;
  margin-top: 20px;
  color: #8693a6;
}

@media (max-width: 900px) {
  .number-stage { min-height:600px; padding:46px 32px 32px; }
  .slot-machine { width:min(680px, calc(100% - 28px)); }
}

@media (max-width: 620px) {
  .number-stage { min-height:500px; padding:34px 15px 28px; }
  .slot-machine { --reel-size:72px; width:calc(100% - 18px); padding:12px; border-radius:26px; }
  .slot-machine-head { padding:3px 5px 11px; font-size:9px; }
  .slot-display { padding:12px 8px; border-radius:18px; }
  .slot-reels { gap:4px; }
  .slot-reels.dense { --reel-size:42px; gap:2px; }
  .slot-reels.ultra-dense { --reel-size:27px; gap:1px; }
  .slot-reel, .slot-sign { border-radius:10px; }
  .slot-result-row { align-items:flex-start; flex-direction:column; gap:7px; padding:12px 5px 2px; }
  .slot-summary { justify-content:flex-start; width:100%; max-height:70px; font-size:14px; }
  .slot-lever { right:-20px; transform:scale(.78); }
  .number-stage > small { max-width:280px; margin:16px auto 0; line-height:1.45; }
}

/* In-game action controls */
.slot-spin-button {
  width: 100%;
  margin: 5px 0 0;
  min-height: 48px;
  border-radius: 16px;
}

.race-start-dock {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 20px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  background: rgba(8, 18, 28, .55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 28px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  transform: translateX(-50%);
  transition: opacity .2s ease, transform .2s ease;
}

.race-start-dock .race-start-button,
.race-start-dock .primary-button {
  width: 190px;
  min-height: 46px;
  margin: 0;
  border-radius: 12px;
}

.race-start-dock .primary-button:disabled {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.94);
}

.race-start-dock:has(.primary-button:disabled) {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(.96);
}

/* Bubble cannon arena */
.bubble-stage {
  background:
    radial-gradient(circle at 50% 0, rgba(65,127,221,.24), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(45,100,189,.18), transparent 28%),
    #07101f;
  box-shadow: inset 0 1px 0 rgba(151,188,240,.15), inset 0 0 80px rgba(0,0,0,.32);
}

#bubbleCanvas {
  border: 1px solid rgba(115,165,235,.34);
  border-radius: 24px;
  background: #07101f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 22px 48px rgba(0,0,0,.32), 0 0 35px rgba(45,100,189,.10);
}

.bubble-score {
  position: relative;
  z-index: 8;
  margin: 0 5px 8px;
  padding: 0 4px;
  color: #a9c6ef;
}

.bubble-score span {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(126,169,232,.18);
  border-radius: 999px;
  background: rgba(8,18,32,.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.bubble-score b { color:#7faeea; }
.bubble-score i { box-shadow:inset -3px -3px 0 rgba(0,0,0,.18), inset 3px 3px 0 rgba(255,255,255,.38), 0 0 12px var(--next,#2d64bd); }

.bubble-help {
  z-index: 8;
  left: 50%;
  right: auto;
  bottom: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 13px;
  border: 1px solid rgba(126,169,232,.18);
  border-radius: 999px;
  background: rgba(5,12,25,.64);
  color: #9eb9df;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 7px 20px rgba(0,0,0,.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

@media (max-width: 620px) {
  .slot-spin-button { min-height:46px; }
  .race-start-dock { bottom:13px; padding:5px; }
  .race-start-dock .primary-button { width:170px; min-height:43px; }
  .bubble-stage { padding:10px 7px 40px; }
  #bubbleCanvas { border-radius:18px; }
  .bubble-score { margin-inline:0; }
  .bubble-score span { padding:4px 8px; }
  .bubble-help { bottom:8px; padding:6px 9px; font-size:9px; }
}

/* Rounded navigation cards and project footer */
.game-tab,
.game-tab:hover,
.game-tab.active {
  border-radius: 999px;
}

.game-tab span { border-radius:999px; }

.site-footer {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: -38px auto 30px;
  padding: 0 28px;
  text-align: center;
}

.site-footer p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--glass-edge-soft);
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 22px rgba(0,0,0,.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  font-size: 12px;
}

.site-footer a {
  color: #4f82d0;
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 3px;
}

.site-footer a:hover { text-decoration:underline; }

@media (max-width: 620px) {
  .topbar { padding-inline:10px; }
  .top-actions .ghost-button { position:relative; }
  main { padding-left:10px; padding-right:10px; padding-bottom:54px; }
  .hero { padding:42px 6px 34px; }
  .hero h1 { font-size:44px; line-height:.97; letter-spacing:-.058em; }
  .hero-lead { margin-top:20px; font-size:14px; line-height:1.58; }
  .game-shell { border-radius:20px; }
  .game-tabs {
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:6px;
    padding:8px;
    border-radius:19px 19px 0 0;
  }
  .game-tab {
    grid-column:span 2;
    min-height:45px;
    padding:5px 7px;
    font-size:10px;
  }
  .game-tab:nth-child(4),
  .game-tab:nth-child(5) { grid-column:span 3; }
  .game-tab span { flex:0 0 24px; }
  .control-card,
  .control-card.compact { padding:27px 20px; }
  html[data-theme="dark"] .control-card,
  html[data-theme="dark"] .control-card.compact { background:rgba(255,255,255,.075); }
  html[data-theme="dark"] .control-card .muted { color:#b5c0cf; }
  .field-row { gap:8px; }
  .race-head,
  .balloon-head,
  .food-heading { padding:27px 20px 21px; }
  .site-footer { margin:-28px auto 22px; padding:0 10px; }
  .site-footer p { width:100%; padding:11px 14px; }
}

@media (max-width: 420px) {
  .topbar { width:calc(100% - 12px); }
  .brand > span:last-child { display:none; }
  .top-actions { margin-left:auto; }
  .hero h1 { font-size:40px; }
  .game-tabs { gap:5px; padding:7px; }
  .game-tab { min-height:43px; padding-inline:4px; font-size:9.5px; }
  .game-tab span { width:22px; height:22px; flex-basis:22px; font-size:10px; }
  .control-card,
  .control-card.compact { padding:25px 17px; }
  .field-row { grid-template-columns:1fr 1fr; }
  .race-head,
  .balloon-head,
  .food-heading { padding-inline:17px; }
  .platform-button { height:46px; padding-inline:10px; }
}

/* Reduce nested frames: keep structure through spacing and surface contrast. */
.game-shell { border-color:transparent; }
.game-shell::before { display:none; }
.game-tabs { border-bottom:0; }
.game-tab.active,
html[data-theme="dark"] .game-tab.active { border-color:transparent; }

.control-card,
.control-card.compact,
.race-editor,
.balloon-editor,
.food-controls,
.race-head,
.balloon-head,
.food-heading { border:0; }

.winner-strip {
  border:0;
  box-shadow:none;
}

.budget-range,
.result-tag { border-color:transparent; }
.shopee-region { border-top:0; padding-top:8px; }
.food-eligible { border:0; border-radius:12px; padding:11px 12px; background:rgba(255,255,255,.08); }
.drawer-head { border-bottom:0; }

.number-stage::after,
.race-game::after,
.bubble-stage::after,
.wheel-stage::after,
.food-stage::after { display:none; }

.race-start-dock {
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}

#bubbleCanvas { border:0; }
.bubble-score span,
.bubble-help { border:0; }

.site-footer p {
  border:0;
  background:transparent;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}

/* Pointer aura — desktop mouse only, native cursor remains usable. */
.pointer-aura {
  position:fixed;
  z-index:10000;
  left:0;
  top:0;
  width:30px;
  height:30px;
  border:1px solid rgba(108,158,230,.72);
  border-radius:50%;
  background:rgba(45,100,189,.07);
  box-shadow:0 0 18px rgba(45,100,189,.24), inset 0 0 12px rgba(104,157,232,.12);
  opacity:0;
  pointer-events:none;
  will-change:transform,width,height,opacity;
  transition:width .18s ease,height .18s ease,opacity .18s ease,background-color .18s ease,border-color .18s ease;
}

.pointer-aura::after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#76a5e8;
  box-shadow:0 0 9px rgba(118,165,232,.85);
  transform:translate(-50%,-50%);
}

.pointer-aura.visible { opacity:1; }
.pointer-aura.interactive {
  width:48px;
  height:48px;
  border-color:rgba(127,174,238,.88);
  background:rgba(45,100,189,.14);
  box-shadow:0 0 27px rgba(45,100,189,.34), inset 0 0 18px rgba(104,157,232,.16);
}
.pointer-aura.pressed { width:22px; height:22px; background:rgba(91,139,213,.28); }

.pointer-ripple {
  position:fixed;
  z-index:9999;
  width:12px;
  height:12px;
  border:1px solid rgba(116,164,230,.82);
  border-radius:50%;
  pointer-events:none;
  transform:translate(-50%,-50%);
  animation:pointerRipple .58s ease-out forwards;
}

@keyframes pointerRipple {
  to { width:72px; height:72px; opacity:0; border-width:0; }
}

@media (pointer:coarse), (prefers-reduced-motion:reduce) {
  .pointer-aura,
  .pointer-ripple { display:none !important; }
}

/* Layout polish: keep the intro connected to the game and tighten number inputs. */
@media (min-width: 621px) {
  .hero { padding-bottom:30px; }
}

.number-layout .control-card > .muted { margin-bottom:0; }
.number-layout .control-card .field-row label,
.number-layout .control-card > label { margin-top:13px; }

/* Food artwork must stay centred even when source images use odd dimensions. */
.food-stage { min-width:0; width:100%; }
.plate {
  flex:0 0 auto;
  aspect-ratio:1;
  overflow:hidden;
  transform-origin:center;
}
.plate img {
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  object-position:center;
}
.food-stage h3 {
  width:min(100%, 760px);
  max-width:100%;
  overflow-wrap:break-word;
  text-wrap:balance;
}

/* Windows/Chromium paints native option menus separately from the select. */
.shopee-region select { color-scheme:light; }
.shopee-region select option {
  color:#111820;
  background:#f5f7fb;
}
.shopee-region select option:checked {
  color:#fff;
  background:#2d64bd;
}
html[data-theme="dark"] .shopee-region select { color-scheme:dark; }
html[data-theme="dark"] .shopee-region select option {
  color:#eef3fb;
  background:#151c26;
}
html[data-theme="dark"] .shopee-region select option:checked {
  color:#fff;
  background:#2d64bd;
}

@media (max-width: 620px) {
  .race-start-dock {
    top:58px;
    bottom:auto;
    padding:0;
  }
  .race-start-dock .primary-button {
    width:156px;
    min-height:40px;
  }
  #raceCanvas { object-fit:fill; }
  .food-stage { padding:38px 17px 42px; }
  .plate {
    width:min(176px, 52vw);
    height:min(176px, 52vw);
    border-width:15px;
  }
  .food-stage h3 {
    font-size:clamp(30px, 10vw, 43px);
    line-height:1.04;
    letter-spacing:-.045em;
  }
  .shopee-region select,
  .shopee-region button { min-height:44px; }
}
