[hidden]{ display:none !important; }
:root{ --ground:#1A1140; --main:#039CDA; --cyan:#33C0FF; --ai:#8A5CF6; --warn:#FF9F3D; --white:#fff; color-scheme:dark; }
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; min-height:100%; background:var(--ground); color:var(--white); font-family:"Lato", system-ui, -apple-system, sans-serif; }
body{ padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.view{ max-width:480px; margin:0 auto; padding:20px 16px 32px; }
.view[hidden]{ display:none; }
.logo{ display:block; margin:4px 0 18px; }
h1{ font-weight:900; font-size:28px; line-height:1.15; margin:0 0 8px; }
.dot{ color:var(--cyan); }
.lede{ color:rgba(255,255,255,.75); font-size:17px; line-height:1.45; margin:0 0 18px; }
label{ display:block; font-weight:700; font-size:15px; margin:0 0 14px; }
.hint{ font-weight:400; color:rgba(255,255,255,.6); font-size:13px; }
input[type=text], input:not([type]), input[type=email]{ display:block; width:100%; margin-top:6px; padding:13px 14px; font:inherit; font-weight:400; font-size:17px; color:var(--ground); background:#fff; border:2px solid transparent; border-radius:12px; }
input:focus{ outline:none; border-color:var(--cyan); }
.check{ display:flex; gap:10px; align-items:flex-start; font-weight:400; font-size:14px; line-height:1.4; color:rgba(255,255,255,.85); }
.check input{ width:22px; height:22px; flex:none; margin:0; accent-color:var(--main); }
.check.small{ font-size:13px; margin-top:18px; color:rgba(255,255,255,.6); }
.prize{ font-size:14px; color:var(--cyan); margin:-4px 0 14px; }
.privacy{ margin:-6px 0 14px 32px; font-size:13px; } .privacy a{ color:var(--cyan); }
fieldset{ border:0; padding:0; margin:6px 0 16px; } legend{ font-weight:700; font-size:15px; margin-bottom:8px; }
.colours{ display:flex; gap:10px; flex-wrap:wrap; }
.colours button{ width:44px; height:44px; border-radius:50%; border:3px solid transparent; cursor:pointer; }
.colours button[aria-pressed=true]{ border-color:#fff; box-shadow:0 0 0 3px var(--ground) inset; }
.primary{ display:block; width:100%; padding:16px; font:inherit; font-weight:900; font-size:19px; color:#fff; background:var(--main); border:0; border-radius:999px; cursor:pointer; }
.primary:disabled{ opacity:.5; }
.link{ display:block; margin:18px auto 0; background:none; border:0; color:rgba(255,255,255,.6); font:inherit; font-size:14px; text-decoration:underline; }
.error{ color:var(--warn); min-height:1.2em; font-size:15px; margin:0 0 10px; }
.small{ font-size:14px; color:rgba(255,255,255,.65); }
.chat{ text-align:center; text-decoration:none; margin-top:18px; background:var(--ai); }
.tip{ margin:4px 0 20px; min-height:84px; }
.lobby-closed .tilt-test{ display:none; }
.tip-k{ font-size:12px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; color:var(--cyan); }
#tip{ margin:4px 0 0; font-size:20px; line-height:1.3; font-weight:700; }
.secondary{ display:inline-block; padding:10px 18px; font:inherit; font-weight:900; font-size:15px; color:var(--cyan); background:none; border:2px solid var(--cyan); border-radius:999px; cursor:pointer; margin:0 0 6px; }
#tip{ transition:opacity .35s; }
.rescan{ font-weight:900; font-size:19px; line-height:1.35; margin:22px 0 0; padding:16px; border-radius:16px; background:rgba(51,192,255,.12); border:1px solid rgba(51,192,255,.4); }
.place{ font-size:96px; font-weight:900; line-height:1; margin:2px 0 6px; } .place.first{ color:var(--cyan); }
.done-name{ font-size:22px; font-weight:900; margin:0; color:rgba(255,255,255,.85); }
.done-sub{ margin:0 0 16px; color:var(--cyan); font-weight:900; font-size:17px; }
.stats{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.stat{ background:rgba(255,255,255,.07); border-radius:14px; padding:10px 14px; }
.stat b{ display:block; font-size:28px; font-weight:900; line-height:1.1; }
.stat span{ font-size:13px; color:rgba(255,255,255,.65); }
.more{ display:block; margin-top:14px; padding:14px 18px; border-radius:999px; background:var(--main); color:#fff; font-weight:900; font-size:17px; text-align:center; text-decoration:none; }
@media (orientation:landscape){
  .view.done{ max-width:860px; padding-top:10px; }
  .done .logo{ margin-bottom:8px; }
  .done-grid{ display:grid; grid-template-columns:1fr 1.2fr; gap:28px; align-items:center; }
  .place{ font-size:min(96px, 24vh); }
  .more{ padding:12px 16px; font-size:16px; }
}
.car-chip{ display:inline-flex; align-items:center; gap:10px; background:rgba(255,255,255,.08); padding:8px 14px; border-radius:999px; font-weight:900; margin-bottom:14px; }
.swatch{ width:16px; height:16px; border-radius:50%; display:inline-block; }
.tilt-test{ margin:6px 0 18px; text-align:center; } .tilt-test p{ margin:8px 0 0; font-size:13px; color:rgba(255,255,255,.6); }
.tilt-test .track{ position:relative; height:12px; border-radius:6px; background:rgba(255,255,255,.15); margin:0 22px; }
.dot-ind{ position:absolute; top:50%; left:50%; width:28px; height:28px; margin:-14px 0 0 -14px; border-radius:50%; background:var(--main); box-shadow:0 0 0 4px rgba(3,156,218,.3); }
.offline{ position:fixed; left:50%; top:calc(10px + env(safe-area-inset-top)); transform:translateX(-50%); background:var(--warn); color:var(--ground); font-weight:900; padding:6px 14px; border-radius:999px; z-index:10; }
.race{ position:fixed; inset:0; max-width:none; padding:0; touch-action:none; user-select:none; -webkit-user-select:none; }
.race canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.touch{ position:absolute; top:0; bottom:0; width:50%; }
.touch.left{ left:0; } .touch.right{ right:0; }
.use{ position:absolute; right:4px; top:calc(50% - 56px); width:124px; height:124px; z-index:2; border-radius:50%; }
@media (orientation:landscape){ .view:not(.race){ max-width:640px; } }
/* Portrait lock: the game is played sideways, so portrait shows only this. */
.rotate{ position:fixed; inset:0; z-index:20; background:var(--ground); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px; text-align:center; }
.rotate img{ position:absolute; top:calc(20px + env(safe-area-inset-top)); left:20px; }
.rotate h2{ font-size:26px; font-weight:900; line-height:1.2; margin:18px 0 0; max-width:300px; }
.rotate p{ margin:0; color:rgba(255,255,255,.7); font-size:17px; }
.phone-turn{ width:120px; height:120px; display:flex; align-items:center; justify-content:center; }
.phone{ width:54px; height:96px; border:5px solid #fff; border-radius:12px; position:relative; animation:turn 2.4s ease-in-out infinite; }
.phone::after{ content:""; position:absolute; left:50%; bottom:5px; width:12px; height:4px; margin-left:-6px; border-radius:2px; background:var(--cyan); }
@keyframes turn{ 0%,20%{ transform:rotate(0); } 50%,80%{ transform:rotate(-90deg); border-color:var(--cyan); } 100%{ transform:rotate(0); } }

/* ---------- game-style pages (join, waiting) ---------- */
.join, .wait{ position:relative; }
body{ background:
  radial-gradient(120% 90% at 85% 0%, rgba(3,156,218,.28), transparent 60%),
  radial-gradient(80% 70% at 0% 100%, rgba(138,92,246,.22), transparent 60%),
  var(--ground); background-attachment:fixed; }
body::before{ content:""; position:fixed; inset:0; pointer-events:none; opacity:.5;
  background:repeating-linear-gradient(-62deg, transparent 0 46px, rgba(51,192,255,.05) 46px 50px);
  animation:lines 6s linear infinite; }
@keyframes lines{ to{ background-position:200px 0; } }
.kicker{ margin:0 0 4px; font-size:12px; font-weight:900; letter-spacing:.16em; text-transform:uppercase; color:var(--cyan); }
.chev{ display:inline-block; width:10px; height:10px; margin-left:6px; border:solid currentColor; border-width:3px 3px 0 0; transform:rotate(45deg) translate(-1px,1px); }

/* join */
.view.join{ max-width:none; height:100svh; min-height:320px; padding:12px 18px 10px; display:flex; flex-direction:column; overflow:hidden; }
.topbar{ display:flex; align-items:center; gap:14px; flex:none; margin-bottom:8px; }
.topbar .logo{ margin:0; }
.topbar .event{ font-weight:900; font-size:15px; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.steps{ display:flex; gap:6px; list-style:none; margin:0 0 0 auto; padding:0; }
.steps li{ width:34px; height:7px; transform:skewX(-24deg); background:rgba(255,255,255,.18); transition:background .3s; }
.steps li.on{ background:var(--cyan); box-shadow:0 0 10px rgba(51,192,255,.6); }
#form{ flex:1; min-height:0; overflow:clip; }
.slides{ display:flex; height:100%; transition:transform .5s cubic-bezier(.2,.8,.2,1); }
.slide{ flex:0 0 100%; height:100%; overflow-x:hidden; overflow-y:auto; padding:6px 4px 12px; display:grid; gap:12px 26px; align-content:start; }
.slide > *{ transition:opacity .4s .12s, transform .45s .12s cubic-bezier(.2,.8,.2,1); }
.slide:not(.active) > *{ opacity:0; transform:translateX(40px); }
.slide h1{ font-size:30px; margin:0 0 6px; }
.slide .lede{ font-size:15px; margin:0; }
.slide label{ margin-bottom:10px; }
input[type=text], input:not([type]), input[type=email]{ border-radius:10px; clip-path:polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); border-radius:0; padding:12px 14px; }
input.bad{ border-color:var(--warn); animation:shake .35s; }
@keyframes shake{ 25%{ transform:translateX(-6px); } 75%{ transform:translateX(6px); } }
.primary{ position:relative; border-radius:0; clip-path:polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); padding:14px 28px; letter-spacing:.02em; background:linear-gradient(90deg, var(--main), var(--cyan)); text-transform:uppercase; font-size:17px; overflow:hidden; }
.primary::after{ content:""; position:absolute; top:0; bottom:0; width:60px; left:-80px; background:linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform:skewX(-20deg); animation:sheen 2.8s ease-in-out infinite; }
@keyframes sheen{ 0%,55%{ left:-80px; } 100%{ left:110%; } }
.primary.go{ background:linear-gradient(90deg, var(--ai), var(--main) 60%, var(--cyan)); }
.ghost{ font:inherit; font-weight:900; font-size:15px; text-transform:uppercase; letter-spacing:.06em; color:rgba(255,255,255,.75); background:rgba(255,255,255,.08); border:0; padding:14px 20px; clip-path:polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); cursor:pointer; }
.row{ display:flex; gap:10px; align-items:center; }
.row .primary{ flex:1; }
.next{ margin-top:4px; }
.prize{ margin:0; font-size:15px; line-height:1.4; color:rgba(255,255,255,.85); }
.check{ font-size:13px; }
.error{ margin:0 0 6px; min-height:0; }
.error:empty{ display:none; }

/* garage */
.colours{ display:grid; grid-template-columns:repeat(4, 46px); gap:10px; margin-top:10px; }
.colours button{ width:46px; height:46px; border-radius:0; border:0; background:var(--c); clip-path:polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); opacity:.75; transition:transform .2s, opacity .2s; }
.colours button[aria-checked=true]{ opacity:1; transform:scale(1.12); box-shadow:none; outline:3px solid #fff; outline-offset:-3px; }
.kart-stage{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; min-height:150px; }
.kart-stage .spot, .wait-kart .spot{ position:absolute; left:10%; right:10%; bottom:18px; height:46px; border-radius:50%; background:radial-gradient(closest-side, rgba(51,192,255,.55), transparent); filter:blur(4px); }
.kart{ position:relative; width:min(260px, 100%); height:auto; animation:idle 1.6s ease-in-out infinite; }
.kart .wheel{ animation:spin .8s linear infinite; }
.kart.pop{ animation:pop .45s cubic-bezier(.2,1.6,.4,1), idle 1.6s ease-in-out .45s infinite; }
@keyframes idle{ 50%{ transform:translateY(-2px); } }
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes pop{ 0%{ transform:scale(.85) translateX(-30px); opacity:.3; } 100%{ transform:none; opacity:1; } }
.plate{ position:relative; margin-top:4px; padding:4px 18px; font-weight:900; font-size:16px; background:var(--white); color:var(--ground); clip-path:polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }

@media (orientation:landscape){
  .slide{ grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); }
  .garage{ display:flex; flex-direction:column; gap:8px; }
}

/* waiting */
.view.wait{ max-width:860px; }
.wait-kart{ position:relative; width:220px; margin:6px 0 4px; }
.wait-kart .kart{ width:220px; }
.wait h1{ font-size:28px; }
@media (orientation:landscape){
  .view.wait{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-areas:"logo logo" "kart tip" "kicker tip" "title tilt" "text engine" "invert ." "leave ."; column-gap:30px; align-items:start; padding-top:12px; }
  .wait .logo{ grid-area:logo; margin-bottom:6px; }
  .wait-kart{ grid-area:kart; } #waitKicker{ grid-area:kicker; } #waitTitle{ grid-area:title; } #waitText{ grid-area:text; }
  .wait .tip{ grid-area:tip; padding:16px 18px; background:rgba(255,255,255,.06); clip-path:polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); margin:0 0 12px; }
  .wait .tilt-test{ grid-area:tilt; } .wait #engine{ grid-area:engine; justify-self:start; } .wait .check.small{ grid-area:invert; margin-top:8px; } .wait #leave{ grid-area:leave; margin:4px 0 0; justify-self:start; }
}
.spot{ z-index:0; } .kart{ z-index:1; }

/* results */
.view.done{ position:relative; max-width:900px; padding-top:22px; overflow:hidden; }
@keyframes flag{ to{ background-position:24px 0; } }
.done-top{ display:flex; align-items:center; gap:14px; margin-bottom:6px; }
.done-top .logo{ margin:0; }
.done-top .kicker{ margin:0 0 0 auto; padding:5px 14px; background:rgba(51,192,255,.14); clip-path:polygon(8px 0,100% 0,calc(100% - 8px) 100%,0 100%); }
.done-main{ position:relative; }
.win-badge{ display:inline-block; padding:5px 18px; font-weight:900; font-size:14px; letter-spacing:.16em; text-transform:uppercase; color:var(--ground); background:var(--cyan); clip-path:polygon(9px 0,100% 0,calc(100% - 9px) 100%,0 100%); box-shadow:0 0 18px rgba(51,192,255,.6); animation:dropIn .5s .2s cubic-bezier(.2,1.5,.4,1) both; }
.place{ display:inline-block; font-size:min(150px, 30vh); font-weight:900; font-style:italic; line-height:.95; margin:2px 0 0; transform:skewX(-8deg); color:#fff; text-shadow:0 8px 30px rgba(51,192,255,.35); animation:placeIn .7s cubic-bezier(.2,1.4,.4,1) both; }
.place small{ font-size:.36em; margin-left:2px; vertical-align:.95em; }
.place.first{ color:var(--cyan); text-shadow:0 0 34px rgba(51,192,255,.7); }
@keyframes placeIn{ from{ opacity:0; transform:skewX(-8deg) scale(.4); } to{ opacity:1; transform:skewX(-8deg); } }
@keyframes dropIn{ from{ opacity:0; transform:translateY(-14px); } }
@keyframes rise{ from{ opacity:0; transform:translateY(16px); } }
.done-kart{ position:relative; width:190px; margin:-6px 0 0; animation:driveIn .9s .25s cubic-bezier(.2,.8,.2,1) both; }
.done-kart .kart{ width:190px; }
.done-kart .spot{ position:absolute; left:10%; right:10%; bottom:14px; height:36px; border-radius:50%; background:radial-gradient(closest-side, rgba(51,192,255,.5), transparent); filter:blur(4px); }
@keyframes driveIn{ from{ opacity:0; transform:translateX(-120px); } }
.done-name{ font-size:24px; font-weight:900; margin:0; color:#fff; animation:rise .5s .4s both; }
.done-sub{ margin:2px 0 12px; color:var(--cyan); font-weight:900; font-size:16px; animation:rise .5s .5s both; }
.stats{ gap:10px; }
.stat{ position:relative; padding:12px 16px 12px 18px; border-radius:0; background:rgba(17,10,46,.82); clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px); animation:rise .45s both; }
.stat::before{ content:""; position:absolute; left:0; top:12px; bottom:0; width:4px; background:var(--cyan); }
.stat:nth-child(1){ animation-delay:.55s } .stat:nth-child(2){ animation-delay:.65s } .stat:nth-child(3){ animation-delay:.75s } .stat:nth-child(4){ animation-delay:.85s }
.stat b{ font-size:30px; font-style:italic; }
.stat:first-child b{ color:var(--cyan); }
.stat span{ font-size:11px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; color:rgba(255,255,255,.6); }
.more{ position:relative; overflow:hidden; border-radius:0; clip-path:polygon(14px 0,100% 0,calc(100% - 14px) 100%,0 100%); background:linear-gradient(90deg, var(--main), var(--cyan)); text-transform:uppercase; letter-spacing:.03em; font-size:15px; animation:rise .45s .95s both; }
.more::after{ content:""; position:absolute; top:0; bottom:0; width:60px; left:-80px; background:linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform:skewX(-20deg); animation:sheen 2.8s ease-in-out infinite; }
.chat{ border-radius:0; }
@media (orientation:landscape){
  .done-grid{ grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:30px; }
  .place{ font-size:min(150px, 28vh); }
  .done-kart{ width:min(190px, 34vh); } .done-kart .kart{ width:100%; }
}
@media (prefers-reduced-motion:reduce){ .done *, .view.done::before{ animation:none !important; } }

/* waiting: your kart in 3D from behind, steering with the phone */
.garage3d{ display:none; }
.has3d .garage3d{ display:block; width:100%; height:min(150px, 34vh); }
.has3d .wait-kart{ width:100%; margin:4px 0 6px; clip-path:polygon(16px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 16px); background:linear-gradient(180deg, rgba(3,156,218,.25), rgba(17,10,46,.6)); }
.has3d .wait-kart .kart, .has3d .wait-kart .spot, .has3d .tilt-test{ display:none; }

/* results: thank-you header and a framed panel for the stats and link */
.done-side{ position:relative; padding:18px 20px 20px; background:linear-gradient(135deg, rgba(3,156,218,.22), rgba(17,10,46,.85) 55%); clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px); box-shadow:0 14px 34px rgba(0,0,0,.35); animation:rise .5s .3s both; }
.done-side::before{ content:""; position:absolute; left:0; top:0; width:120px; height:56px; pointer-events:none; background:linear-gradient(135deg, transparent 12px, var(--cyan) 12px 15px, transparent 15px) no-repeat; }
.thanks{ margin:0 0 4px; font-size:clamp(22px, 6.5vh, 30px); line-height:1.05; font-weight:900; font-style:italic; }
.thanks-k{ display:block; margin:0; font-size:12px; font-weight:900; font-style:normal; letter-spacing:.16em; text-transform:uppercase; color:var(--cyan); margin-bottom:4px; }
.thanks-line{ margin:0 0 12px; font-size:14px; color:rgba(255,255,255,.75); }
.done-side .stats{ margin-bottom:2px; }
.done-side .stat{ background:rgba(255,255,255,.07); }
@media (orientation:landscape){
  .done-side{ padding:14px 18px 16px; }
  .done-side .stats{ grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
  .done-side .stat{ padding:8px 10px 8px 12px; }
  .done-side .stat b{ font-size:clamp(18px, 6vh, 24px); }
  .done-side .stat span{ font-size:9px; letter-spacing:.1em; }
  .done-side .more{ margin-top:12px; }
  .thanks-line{ margin-bottom:10px; }
}

/* results: game title top left; the logo lives in the "find out more" button */
.view.done{ padding-top:14px; }
.game-title{ display:flex; flex-direction:column; line-height:.9; font-weight:900; font-style:italic; transform:skewX(-8deg); transform-origin:left bottom; }
.game-title span{ font-size:14px; letter-spacing:.02em; }
.game-title b{ font-size:30px; background:linear-gradient(#fff, #bfe9ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.game-title i{ font-style:normal; color:var(--cyan); -webkit-text-fill-color:var(--cyan); }
.more{ display:flex; align-items:center; justify-content:center; gap:10px; }
.more img{ height:22px; width:auto; display:block; }
/* waiting screen: tighter so nothing runs off the bottom of a sideways phone */
@media (orientation:landscape){
  .view.wait{ padding-top:6px; padding-bottom:10px; row-gap:0; }
  .wait .logo{ margin-bottom:2px; }
  .has3d .garage3d{ height:min(112px, 27vh); }
  .has3d .wait-kart{ margin:2px 0 4px; }
  .wait h1{ font-size:24px; margin:0 0 2px; }
  .wait .lede{ font-size:15px; margin:0 0 4px; }
  .wait .tip{ padding:12px 16px; margin:0 0 8px; min-height:0; }
  #tip{ font-size:18px; }
  .wait .check.small{ margin-top:4px; }
}

.colours button.taken{ opacity:.18; cursor:not-allowed; transform:none; background:repeating-linear-gradient(45deg, var(--c) 0 6px, rgba(255,255,255,.25) 6px 9px); }
#driverError{ margin:0; }

.rot-hint{ position:absolute; left:24px; right:24px; bottom:calc(24px + env(safe-area-inset-bottom)); font-size:14px !important; color:rgba(255,255,255,.55) !important; }
.rotate.locked .phone{ animation:none; border-color:var(--warn); }
.rotate.locked .phone::before{ content:""; position:absolute; left:50%; top:50%; width:16px; height:12px; margin:-2px 0 0 -8px; border-radius:3px; background:var(--warn); }
.rotate.locked .phone::after{ background:var(--warn); }

.topbar .game-title{ white-space:nowrap; overflow:visible; opacity:1; }
.topbar .game-title span{ font-size:11px; }
.topbar .game-title b{ font-size:22px; }

.tip-line{ margin:4px 0 0; font-size:14px; line-height:1.35; color:rgba(255,255,255,.72); transition:opacity .3s; }

/* waiting screen: the how-to-play card fills the right-hand column */
.wait .tip{ position:relative; display:flex; flex-direction:column; gap:6px; padding:16px 18px 14px; margin:0 0 10px;
  background:linear-gradient(135deg, rgba(3,156,218,.28), rgba(17,10,46,.9) 60%); box-shadow:0 12px 30px rgba(0,0,0,.35); overflow:hidden; }
.wait .tip::before{ content:""; position:absolute; left:0; top:0; width:110px; height:52px; pointer-events:none; background:linear-gradient(135deg, transparent 12px, var(--cyan) 12px 15px, transparent 15px) no-repeat; }
.wait .tip::after{ content:""; position:absolute; right:-30px; bottom:-30px; width:140px; height:140px; opacity:.08; pointer-events:none;
  background:repeating-linear-gradient(-62deg, transparent 0 10px, #fff 10px 13px); }
.tip-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tip-k{ padding:4px 12px; background:var(--cyan); color:var(--ground) !important; clip-path:polygon(7px 0,100% 0,calc(100% - 7px) 100%,0 100%); font-size:11px !important; }
.tip-n{ font-weight:900; font-style:italic; font-size:15px; color:rgba(255,255,255,.55); }
#tip{ font-size:clamp(20px, 6vh, 26px) !important; line-height:1.15 !important; font-weight:900 !important; font-style:italic; margin:2px 0 0 !important; }
.tip-line{ font-size:15px !important; margin:0 !important; }
.tip-bar{ height:5px; margin-top:auto; background:rgba(255,255,255,.12); transform:skewX(-20deg); }
.tip-bar i{ display:block; height:100%; width:0; background:linear-gradient(90deg, var(--main), var(--cyan)); box-shadow:0 0 10px rgba(51,192,255,.6); transition:width .1s linear; }
.tip-dots{ display:flex; gap:5px; margin-top:auto; }
.tip-dots i{ flex:1; height:4px; background:rgba(255,255,255,.14); transform:skewX(-20deg); }
.tip-dots i.done{ background:rgba(51,192,255,.45); } .tip-dots i.on{ background:var(--cyan); }
@media (orientation:landscape){
  /* the how-to-play card runs the full height of the right-hand column */
  .view.wait{ grid-template-areas:"logo logo" "kart tip" "kicker tip" "title tip" "text tip" "engine tip" "invert tip" "leave tip" !important; }
  .wait .tip{ align-self:stretch; margin-bottom:0; }
  .wait #engine{ justify-self:start; margin:4px 0 2px; }
}

.tip-body{ display:flex; align-items:center; gap:14px; flex:1; min-height:0; }
.tip-art{ flex:none; width:min(108px, 26vh); height:min(108px, 26vh); }
.tip-text{ min-width:0; }
#prize{ white-space:pre-line; }

/* Header bars: the game title on one line (the results page keeps the stacked logo). */
.topbar .game-title{ flex-direction:row; align-items:baseline; gap:.28em; line-height:1; }
.topbar .game-title span, .topbar .game-title b{ font-size:20px; letter-spacing:0; }

/* "No email, no prize" confirmation on the join form's prize step. */
dialog.confirm{ max-width:460px; width:calc(100% - 32px); max-height:calc(100% - 24px); overflow:auto; background:var(--ground, #1A1140); color:#fff; border:1px solid var(--warn, #FF9F3D); padding:18px 20px; clip-path:polygon(14px 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%,0 14px); }
dialog.confirm::backdrop{ background:rgba(8,4,26,.78); }
dialog.confirm h2{ margin:0 0 6px; font-size:22px; font-weight:900; font-style:italic; }
dialog.confirm p{ margin:0 0 14px; font-size:15px; line-height:1.4; color:rgba(255,255,255,.85); }
dialog.confirm .row{ justify-content:flex-end; flex-wrap:wrap; }
