/* =====================================================================
   Jelly Rush 3D hub: Home, Play and Customize screens (reference mockups)
   Loaded after party-ui.css and reuses its tokens (--ink, --party-font).
   ===================================================================== */
:root{--hub-blue-1:#4fb6ff;--hub-blue-2:#1f6fe5;--hub-blue-3:#1546b8;--hub-navy:#14286b}
.hub{position:fixed;inset:0;z-index:12;pointer-events:none;font-family:var(--party-font)}
.hub.hidden{display:none}
.hub .hub-screen{position:absolute;inset:0;pointer-events:none}
.hub .hub-screen>*{pointer-events:auto}
.hub .hub-screen.hidden{display:none}
body.hub-on .topbar .brand,body.hub-on .topbar .connection,body.hub-on #fullscreenBtn,body.hub-on #musicBtn,body.hub-on #soundBtn{display:none!important}
body.hub-on .topbar{z-index:14}
/* Top bar */
.hub-top{position:absolute;left:0;right:0;top:0;z-index:2;display:flex;align-items:center;gap:14px;padding:12px 92px 0 clamp(12px,2vw,24px);pointer-events:none}
.hub-top>*{pointer-events:auto}
.hub-logo{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:start;column-gap:4px;line-height:1;transform:rotate(-6deg);filter:drop-shadow(0 4px 0 var(--ink))}
.hub-logo.hidden{display:none}
.hub-logo span{font:900 34px/1 var(--party-font);-webkit-text-stroke:7px var(--ink);paint-order:stroke fill}
.hub-logo-a{grid-column:1/-1;color:#ffe14a}
/* Rush sits a little lower and indented so the y's tail clears it. */
.hub-logo-b{grid-column:1;margin:.26em 0 0 .5em;color:#ff6fc0}
.hub-logo .hub-logo-3d{grid-column:2;display:grid;place-items:center;width:34px;height:34px;margin:.26em 0 0 2px;border:3px solid var(--ink);border-radius:50%;background:radial-gradient(circle at 35% 30%,#8fd8ff,#2a7cf0 70%);color:#fff;font-size:15px;-webkit-text-stroke:3px var(--ink)}
.hub-back{display:grid;place-items:center;width:52px;height:46px;border:3px solid var(--ink);border-radius:14px;background:linear-gradient(#ff7a7a,#e83a4a);color:#fff;font:900 20px/1 var(--party-font);box-shadow:0 4px 0 var(--ink);cursor:pointer}
.hub-back.hidden{display:none}
.hub-title{flex:1;margin:0;text-align:center;color:#fff;font:900 34px/1 var(--party-font);-webkit-text-stroke:7px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink)}
.hub-title.hidden{display:none}
.hub-profile{display:flex;align-items:center;gap:10px;padding:5px 14px 5px 5px;border:3px solid var(--ink);border-radius:16px;background:linear-gradient(var(--hub-blue-2),var(--hub-blue-3));box-shadow:0 4px 0 var(--ink);cursor:pointer;color:#fff}
.hub-profile.hidden{display:none}
.hub-avatar{display:grid;place-items:center;width:46px;height:46px;border:3px solid var(--ink);border-radius:12px;background:radial-gradient(circle at 40% 35%,#ffffff88,var(--jelly,#ff639c) 60%);font-size:24px}
.hub-who{display:flex;flex-direction:column;gap:5px;min-width:130px;text-align:left}
.hub-who b{font:900 16px/1 var(--party-font);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-level{display:flex;align-items:center;gap:6px}
.hub-level i{display:grid;place-items:center;min-width:24px;height:24px;padding:0 4px;border:2px solid var(--ink);border-radius:8px;background:linear-gradient(#7ff2ff,#25b4f7);color:var(--ink);font:900 12px/1 var(--party-font);font-style:normal}
.hub-xp{position:relative;flex:1;height:16px;border:2px solid var(--ink);border-radius:999px;background:#0b1a4a;overflow:hidden}
.hub-xp em{position:absolute;inset:0 auto 0 0;background:linear-gradient(#9dff7a,#38c94a)}
.hub-xp small{position:relative;display:block;text-align:center;color:#fff;font:900 9px/12px var(--party-font);-webkit-text-stroke:2px var(--ink);paint-order:stroke fill}
.hub-wallet{display:flex;gap:10px;margin-left:auto}
.hub-pill{display:flex;align-items:center;gap:7px;padding:4px 4px 4px 8px;border:3px solid var(--ink);border-radius:999px;background:linear-gradient(var(--hub-navy),#0b1a4a);box-shadow:0 3px 0 var(--ink);color:#fff}
.hub-pill i{font-style:normal;font-size:20px}
.hub-pill b{min-width:48px;font:900 16px/1 var(--party-font);-webkit-text-stroke:3px var(--ink);paint-order:stroke fill}
.hub-plus{display:grid;place-items:center;width:28px;height:28px;border:2px solid var(--ink);border-radius:50%;background:linear-gradient(#8dff6a,#2fbf3a);color:#fff;font:900 18px/1 var(--party-font);-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;cursor:pointer;box-shadow:0 2px 0 var(--ink)}
/* Home */
.hub-side{position:absolute;left:clamp(12px,2vw,24px);top:clamp(96px,17vh,130px);display:flex;flex-direction:column;gap:12px}
.hub-side button{position:relative;display:flex;align-items:center;gap:10px;min-width:190px;padding:11px 16px 11px 12px;border:3px solid var(--ink);border-radius:14px;cursor:pointer;background:linear-gradient(var(--hub-blue-1),var(--hub-blue-2) 60%,var(--hub-blue-3));box-shadow:0 5px 0 var(--ink);color:#fff;font:900 18px/1 var(--party-font);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;transition:transform .08s}
.hub-side button i{display:grid;place-items:center;width:34px;height:34px;border:2px solid var(--ink);border-radius:10px;background:#fff;font-style:normal;font-size:19px;-webkit-text-stroke:0}
.hub-side button:hover{transform:translateX(4px)}
.hub-side button:active,.hub-daily:active,.hub-play:active,.hub-mode:active{transform:translateY(3px);box-shadow:0 2px 0 var(--ink)}
.hub-dot{position:absolute;right:-6px;top:-6px;width:16px;height:16px;border:2px solid var(--ink);border-radius:50%;background:#ff3b3b}
.hub-dot.hidden{display:none}
.hub-daily{position:absolute;right:clamp(12px,2vw,24px);top:clamp(96px,17vh,130px);display:flex;flex-direction:column;align-items:center;gap:4px;width:108px;padding:10px 6px;border:3px solid var(--ink);border-radius:16px;cursor:pointer;background:linear-gradient(var(--hub-blue-1),var(--hub-blue-2) 60%,var(--hub-blue-3));box-shadow:0 5px 0 var(--ink);color:#fff;font:900 13px/1.1 var(--party-font);-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;text-align:center}
.hub-daily i{font-style:normal;font-size:36px;-webkit-text-stroke:0}
.hub-play-wrap{position:absolute;right:clamp(14px,2.4vw,30px);bottom:clamp(14px,3.5vh,30px);display:flex;flex-direction:column;align-items:stretch;gap:10px;width:min(310px,34vw)}
.hub-mode{display:flex;align-items:center;gap:8px;padding:8px 12px;border:3px solid var(--ink);border-radius:12px;background:#fff;color:var(--ink);font:900 14px/1 var(--party-font);box-shadow:0 4px 0 var(--ink);cursor:pointer}
.hub-mode i{font-style:normal}
.hub-mode b{margin-left:auto}
.hub-play{display:flex;align-items:center;justify-content:center;gap:14px;min-height:clamp(62px,11vh,84px);border:4px solid var(--ink);border-radius:20px;cursor:pointer;background:linear-gradient(#fff36b,#ffc81f 50%,#ff9d0a);color:var(--ink);font:900 clamp(30px,3.6vw,44px)/1 var(--party-font);letter-spacing:.03em;box-shadow:0 7px 0 var(--ink),inset 0 4px 0 #fffbe0;animation:party-pulse 1.8s ease-in-out infinite}
.hub-play span{font-size:.75em}
/* Shared tab column for Play and Customize */
.hub .hub-modes{background:linear-gradient(160deg,#3f9cff,#1f5fd8 55%,#173fa8);pointer-events:auto}
.hub-tabs{position:absolute;left:clamp(12px,2vw,24px);top:84px;display:flex;flex-direction:column;gap:10px;width:clamp(150px,17vw,200px)}
.hub-tabs button{display:flex;align-items:center;gap:10px;padding:11px 12px;border:3px solid var(--ink);border-radius:14px;background:linear-gradient(var(--hub-blue-2),var(--hub-blue-3));color:#fff;font:900 16px/1 var(--party-font);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;box-shadow:0 4px 0 var(--ink);cursor:pointer;text-align:left;transition:transform .1s}
.hub-tabs button i{display:grid;place-items:center;width:30px;height:30px;border:2px solid var(--ink);border-radius:9px;background:#fff;font-style:normal;font-size:16px;-webkit-text-stroke:0}
.hub-tabs button[aria-current="page"]{background:linear-gradient(#fff36b,#ffc81f 55%,#ff9d0a);color:var(--ink);-webkit-text-stroke:0;transform:translateX(6px)}
.hub-grid{display:grid;gap:14px}
.hub-modes .hub-grid{position:absolute;left:calc(clamp(12px,2vw,24px) + clamp(150px,17vw,200px) + 18px);right:clamp(12px,2vw,24px);top:84px;bottom:16px;overflow:auto;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));align-content:start;padding:4px 6px 12px;scrollbar-width:thin}
.hub-course{display:flex;flex-direction:column;padding:0;border:3px solid var(--ink);border-radius:16px;overflow:hidden;background:var(--hub-navy);box-shadow:0 5px 0 var(--ink);cursor:pointer;transition:transform .1s;text-align:center}
.hub-course:hover:not(:disabled){transform:translateY(-4px) rotate(-.6deg)}
.hub-course-art{position:relative;display:grid;place-items:center;height:110px;background:linear-gradient(150deg,var(--card-a),var(--card-b));overflow:hidden}
.hub-course-art canvas{width:92%!important;height:auto!important;max-height:96px;filter:drop-shadow(0 4px 0 #0004)}
.hub-course-icon{font-size:56px;filter:drop-shadow(0 4px 0 #0004)}
.hub-course-badge{position:absolute;left:8px;top:8px;padding:4px 8px;border:2px solid var(--ink);border-radius:8px;background:#fff;color:var(--ink);font:900 10px/1 var(--party-font);letter-spacing:.06em}
.hub-course>b{display:block;padding:8px 8px 2px;color:#fff;font:900 16px/1.1 var(--party-font);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill}
.hub-course>small{display:block;padding:0 8px 9px;color:#cfe0ff;font:800 11px/1.25 'Trebuchet MS',sans-serif}
.hub-course.locked{opacity:.7;cursor:default;filter:saturate(.6)}
.hub-modes .hub-grid[data-mode="elimination"],.hub-modes .hub-grid[data-mode="team"],.hub-modes .hub-grid[data-mode="event"]{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.hub-modes .hub-grid[data-mode="elimination"] .hub-course-art{height:140px}
/* Customize */
.hub-cust-panel{position:absolute;right:clamp(12px,2vw,24px);top:84px;bottom:16px;width:min(470px,44vw);display:flex;flex-direction:column;gap:12px;padding:14px;border:3px solid var(--ink);border-radius:20px;background:linear-gradient(160deg,#3f9cffee,#173fa8ee);box-shadow:0 6px 0 var(--ink)}
.hub-chips{display:flex;gap:8px;flex-wrap:wrap}
.hub-chips.hidden{display:none}
.hub-chips button{padding:7px 14px;border:3px solid var(--ink);border-radius:999px;background:#fff;color:var(--ink);font:900 13px/1 var(--party-font);cursor:pointer;box-shadow:0 3px 0 var(--ink)}
.hub-chips button[data-rarity="rare"]{background:#5fb8ff}
.hub-chips button[data-rarity="epic"]{background:#b07bff}
.hub-chips button[data-rarity="legendary"]{background:#ffb02e}
.hub-chips button[aria-pressed="true"]{outline:3px solid #fff;outline-offset:2px;transform:translateY(-2px)}
.hub-skin-grid{flex:1;overflow:auto;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));align-content:start;padding:8px 6px;scrollbar-width:thin}
.hub-skin{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px 8px;border:3px solid var(--ink);border-radius:14px;cursor:pointer;box-shadow:0 4px 0 var(--ink);color:#fff;background:linear-gradient(#e9f1ff,#b9c9e8)}
.hub-skin.rarity-rare{background:linear-gradient(#8fd2ff,#2f8fe0)}
.hub-skin.rarity-epic{background:linear-gradient(#cfa6ff,#7a3fe0)}
.hub-skin.rarity-legendary{background:linear-gradient(#ffd77a,#ff8a1f)}
.hub-skin-icon{font-size:40px}
.hub-skin b{font:900 11px/1.1 var(--party-font);text-align:center;-webkit-text-stroke:3px var(--ink);paint-order:stroke fill}
.hub-skin small{padding:2px 7px;border:2px solid var(--ink);border-radius:999px;background:#fff;color:var(--ink);font:900 10px/1.2 var(--party-font)}
.hub-skin em{position:absolute;right:-7px;top:-7px;display:grid;place-items:center;width:26px;height:26px;border:2px solid var(--ink);border-radius:50%;background:#3fd16a;color:#fff;font:900 15px/1 var(--party-font);font-style:normal}
.hub-skin[aria-pressed="true"]{outline:4px solid #fff;outline-offset:1px;transform:translateY(-3px)}
.hub-swatch{aspect-ratio:1;border:4px solid var(--ink);border-radius:18px;cursor:pointer;box-shadow:0 4px 0 var(--ink)}
.hub-swatch[aria-pressed="true"]{outline:4px solid #fff;outline-offset:2px}
.hub-soon{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;align-items:center;padding:28px 16px;border:3px dashed #ffffff88;border-radius:16px;text-align:center;color:#fff}
.hub-soon b{font:900 22px/1 var(--party-font);-webkit-text-stroke:5px var(--ink);paint-order:stroke fill}
.hub-soon span{font:800 13px/1.35 'Trebuchet MS',sans-serif;color:#e1ebff}
.hub-action{min-height:54px;border:4px solid var(--ink);border-radius:16px;background:linear-gradient(#fff36b,#ffc81f 55%,#ff9d0a);color:var(--ink);font:900 20px/1 var(--party-font);box-shadow:0 5px 0 var(--ink);cursor:pointer}
.hub-action.hidden{display:none}
.hub-action[data-kind="done"]{background:linear-gradient(#a6ffb0,#3fd16a);cursor:default}
.hub-action[data-kind="short"]{background:linear-gradient(#e2e6f0,#aab3c8)}
/* Popups */
.hub-modal{position:fixed;inset:0;z-index:150;display:grid;place-items:center;padding:16px;background:#0b1a4aa6;backdrop-filter:blur(3px)}
.hub-modal.hidden{display:none}
.hub-card{width:min(640px,100%);max-height:calc(100dvh - 32px);overflow:auto;display:flex;flex-direction:column;gap:12px;padding:20px 22px 22px;border:4px solid var(--ink);border-radius:24px;background:linear-gradient(160deg,#4fb6ff,#1f5fd8 60%,#173fa8);box-shadow:0 8px 0 var(--ink);animation:name-pop .22s cubic-bezier(.2,1.6,.4,1)}
.hub-card h2{margin:0;text-align:center;color:#fff;font:900 30px/1 var(--party-font);-webkit-text-stroke:7px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink)}
.hub-card>p{margin:0;text-align:center;color:#e9f1ff;font:800 13px/1.35 'Trebuchet MS',sans-serif}
.hub-card-actions{display:flex;justify-content:center;gap:12px}
html body .hub-card-actions .button{min-width:150px;padding:13px!important}
.daily-track{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.daily-tile{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 4px;border:3px solid var(--ink);border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 3px 0 var(--ink);text-align:center}
.daily-tile small{font:900 10px/1 var(--party-font)}
.daily-icon{font-size:24px}
.daily-tile b{font:900 11px/1.15 var(--party-font)}
.daily-tile.done{background:#c9f7d2;opacity:.75}
.daily-tile.done::after{content:'✓';font:900 14px/1 var(--party-font);color:#1d8f3a}
.daily-tile.today{background:linear-gradient(#fff36b,#ffc81f);transform:translateY(-4px) scale(1.04)}
.hub-shop .hub-skin-grid{max-height:340px}
/* Phones in landscape */
@media(max-height:500px){
  .hub-top{padding-top:6px;gap:8px}
  .hub-logo{width:110px}
  .hub-logo span{font-size:24px;-webkit-text-stroke:5px var(--ink)}
  .hub-logo .hub-logo-3d{width:26px;height:26px}
  .hub-profile{padding:3px 10px 3px 3px}
  .hub-avatar{width:36px;height:36px;font-size:18px}
  .hub-who{min-width:100px}
  .hub-who b{font-size:13px}
  .hub-pill b{font-size:13px;min-width:36px}
  .hub-plus{width:24px;height:24px}
  .hub-side{top:80px;gap:7px}
  .hub-side button{min-width:150px;padding:7px 12px 7px 8px;font-size:14px}
  .hub-side button i{width:26px;height:26px;font-size:14px}
  .hub-daily{top:80px;width:84px;padding:6px 4px;font-size:11px}
  .hub-daily i{font-size:26px}
  .hub-play{min-height:54px;font-size:28px}
  .hub-mode{padding:6px 10px;font-size:12px}
  .hub-title{font-size:24px}
  .hub-back{width:44px;height:38px}
  .hub-tabs{top:58px;gap:6px}
  .hub-tabs button{padding:7px 9px;font-size:13px}
  .hub-tabs button i{width:24px;height:24px;font-size:13px}
  .hub-modes .hub-grid{top:58px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .hub-course-art{height:72px}
  .hub-course>b{font-size:13px}
  .hub-course>small{display:none}
  .hub-cust-panel{top:58px;bottom:8px;padding:10px;gap:8px}
  .hub-skin-grid{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}
  .hub-skin-icon{font-size:28px}
  .hub-action{min-height:42px;font-size:16px}
  .daily-track{gap:5px}
  .daily-tile{padding:6px 2px}
  .hub-card h2{font-size:22px}
}

/* =====================================================================
   Gameplay HUD: Objective top-left, Qualified top-right, clear centre
   ===================================================================== */
.hud-objective{display:none}
html body .race-hud:not(.hidden) .hud-objective{position:fixed;left:clamp(12px,2vw,24px);top:14px;display:flex;flex-direction:column;align-items:flex-start;pointer-events:none}
.hud-objective small,html body .race-hud .hud-stats>div:nth-child(3) small{position:relative;z-index:1;margin:0 0 -6px 10px!important;padding:4px 12px!important;border:3px solid var(--ink)!important;border-radius:10px!important;background:linear-gradient(var(--hub-blue-1),var(--hub-blue-2))!important;color:#fff!important;font:900 12px/1 var(--party-font)!important;-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;letter-spacing:.02em!important;text-transform:none!important}
.hud-objective b{padding:10px 18px 9px;border:3px solid var(--ink);border-radius:14px;background:#fff;color:var(--ink);font:900 clamp(16px,1.6vw,22px)/1 var(--party-font);box-shadow:0 4px 0 var(--ink)}
html body .race-hud .race-title,html body .race-hud .race-center,html body .race-hud .hud-stats>div:nth-child(1),html body .standings,html body .stage-guide{display:none!important}
body[data-phase="racing"] .topbar .brand,body[data-phase="countdown"] .topbar .brand,body[data-phase="racing"] .topbar .connection,body[data-phase="countdown"] .topbar .connection,body[data-phase="racing"] #fullscreenBtn,body[data-phase="racing"] #musicBtn,body[data-phase="racing"] #soundBtn,body[data-phase="countdown"] #fullscreenBtn,body[data-phase="countdown"] #musicBtn,body[data-phase="countdown"] #soundBtn{display:none!important}
html body .race-hud .hud-stats>div:nth-child(3){position:fixed!important;right:96px!important;left:auto!important;top:14px!important;transform:none!important;flex-direction:column!important;align-items:flex-end!important;gap:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:none!important}
html body .race-hud .hud-stats>div:nth-child(3) small{margin:0 10px -6px 0!important}
html body .race-hud .hud-stats>div:nth-child(3) strong{padding:8px 20px 7px!important;border:3px solid var(--ink)!important;border-radius:14px!important;background:#fff!important;color:var(--ink)!important;-webkit-text-stroke:0!important;font:900 clamp(24px,2.4vw,32px)/1 var(--party-font)!important;box-shadow:0 4px 0 var(--ink);filter:none!important}
html body .race-hud .hud-stats>div:nth-child(3) em{color:var(--ink)!important;-webkit-text-stroke:0!important}
html body .race-hud .hud-stats>div:nth-child(2){position:fixed!important;right:96px!important;left:auto!important;top:92px!important;transform:none!important;padding:4px 12px!important;border-radius:999px!important;background:#14286bcc!important;border:2px solid var(--ink)!important;box-shadow:0 3px 0 var(--ink)!important}
html body .race-hud .hud-stats>div:nth-child(2) small{color:#fff!important;font-size:9px!important}
html body .race-hud .hud-stats>div:nth-child(2) strong{font-size:16px!important;-webkit-text-stroke:3px var(--ink)!important}
html body .joystick{border:4px solid #ffffffb3!important;background:#ffffff26!important}
html body #joystickKnob{border:3px solid #ffffffcc!important;background:radial-gradient(circle at 40% 30%,#ffffffee,#d8e6ff 70%)!important;box-shadow:0 3px 0 #0003!important}
html body #jumpTouch{position:relative;border:4px solid #ffffffd9!important;background:#14286b80!important;color:transparent!important;text-shadow:none!important;box-shadow:0 4px 0 #0004!important}
html body #jumpTouch::after{content:'';position:absolute;inset:0;margin:auto;width:42%;height:46%;background:#fff;clip-path:polygon(50% 0,100% 52%,68% 52%,68% 100%,32% 100%,32% 52%,0 52%)}
html body #diveTouch{border:4px solid #ffffffd9!important;background:#14286b80!important;color:#fff!important}
@media(max-height:500px){
  html body .race-hud:not(.hidden) .hud-objective{top:8px}
  .hud-objective b{padding:7px 12px 6px;font-size:14px}
  html body .race-hud .hud-stats>div:nth-child(3){top:8px!important;right:60px!important}
  html body .race-hud .hud-stats>div:nth-child(3) strong{font-size:20px!important;padding:6px 14px 5px!important}
  html body .race-hud .hud-stats>div:nth-child(2){top:70px!important;right:60px!important}
}

/* =====================================================================
   Round splash: Qualified / Place / Crown / Eliminated
   ===================================================================== */
.round-splash{position:fixed;inset:0;z-index:40;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;pointer-events:none;background:radial-gradient(ellipse at 50% 55%,#4fb6ff66,#1f5fd800 65%)}
.round-splash.hidden{display:none}
.round-splash[data-tone="red"]{background:radial-gradient(ellipse at 50% 55%,#ff4d6d66,#ff4d6d00 65%)}
.round-splash[data-tone="gold"]{background:radial-gradient(ellipse at 50% 55%,#ffd23f77,#ffd23f00 65%)}
.splash-ribbon{display:flex;align-items:center;gap:18px;padding:16px 44px;border:5px solid var(--ink);border-radius:24px;background:linear-gradient(#5fc2ff,#1f6fe5 60%,#1546b8);box-shadow:0 9px 0 var(--ink),0 20px 40px #0005;transform:rotate(-3deg)}
.round-splash[data-tone="red"] .splash-ribbon{background:linear-gradient(#ff8a8a,#e8364a 60%,#a81d34)}
.round-splash[data-tone="gold"] .splash-ribbon{background:linear-gradient(#fff36b,#ffc81f 55%,#ff9d0a)}
.splash-ribbon b{color:#fff;font:900 clamp(40px,7vw,86px)/1 var(--party-font);-webkit-text-stroke:10px var(--ink);paint-order:stroke fill;text-shadow:0 6px 0 var(--ink)}
.splash-star{color:#ffd23f;font:900 clamp(34px,5vw,64px)/1 var(--party-font);-webkit-text-stroke:6px var(--ink);paint-order:stroke fill}
.round-splash p{margin:0;color:#fff;font:900 clamp(14px,1.6vw,20px)/1 var(--party-font);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill}
.round-splash.play .splash-ribbon{animation:splash-in .55s cubic-bezier(.2,1.7,.4,1) both,splash-out .35s ease-in 2.25s forwards}
.round-splash.play .splash-star{animation:splash-spin 1.2s ease-in-out infinite}
.round-splash.play p{animation:splash-in .5s .15s cubic-bezier(.2,1.7,.4,1) both,splash-out .35s ease-in 2.25s forwards}
.splash-confetti{position:absolute;inset:0;overflow:hidden}
.round-splash.play:not([data-tone="red"]) .splash-confetti{background:radial-gradient(circle,#ff5fa8 0 5px,transparent 6px) 10% 20%/120px 140px,radial-gradient(circle,#ffd23f 0 5px,transparent 6px) 60% 10%/150px 120px,radial-gradient(circle,#5fd0ff 0 4px,transparent 5px) 30% 70%/110px 160px,radial-gradient(circle,#7ee06a 0 4px,transparent 5px) 80% 40%/130px 110px;animation:splash-confetti 2.6s linear both}
@keyframes splash-in{from{transform:scale(.3) rotate(-12deg);opacity:0}to{transform:scale(1) rotate(-3deg);opacity:1}}
@keyframes splash-out{to{transform:scale(1.15) rotate(-3deg);opacity:0}}
@keyframes splash-spin{50%{transform:rotate(18deg) scale(1.15)}}
@keyframes splash-confetti{from{background-position-y:-200px,-160px,-220px,-180px}85%{opacity:1}to{background-position-y:500px,560px,520px,540px;opacity:0}}
@media(prefers-reduced-motion:reduce){.round-splash.play .splash-ribbon,.round-splash.play p,.round-splash.play .splash-star,.round-splash .splash-confetti{animation:none!important}}

/* Drawn coin (the coin emoji is missing on many systems) */
.coin-ico{display:inline-block;width:1.05em;height:1.05em;border:2px solid var(--ink);border-radius:50%;vertical-align:-.18em;background:radial-gradient(circle at 35% 30%,#fff6b0 0 18%,#ffd23f 38%,#e89a12 100%);box-shadow:inset 0 0 0 2px #ffe680aa}
.hub-pill .coin-ico{width:22px;height:22px}
.coin-tag{display:inline-flex;align-items:center;gap:4px}
.daily-icon .coin-ico{width:26px;height:26px}
body.hub-on .topbar{justify-content:flex-end}
body.hub-on .topbar .top-right{margin-left:auto}
body[data-phase="racing"] .topbar,body[data-phase="countdown"] .topbar{justify-content:flex-end}
body[data-phase="racing"] .topbar .top-right,body[data-phase="countdown"] .topbar .top-right{margin-left:auto}

.hub-course-art{flex:0 0 auto}
.hub-grid{grid-auto-rows:max-content}
@media(max-height:500px){
  .hub-cust-panel{width:min(400px,52vw)}
  .hub-chips{gap:5px;flex-wrap:nowrap}
  .hub-chips button{padding:4px 9px;font-size:11px;border-width:2px}
  .hub-course-art canvas{max-height:64px}
}

/* =====================================================================
   Quick Match waiting card: compact, two-column stats, countdown ring
   ===================================================================== */
html body .lobby-panel.quick-match-lobby:not(.hidden){top:calc(50% + 20px)!important;transform:translate(-50%,-50%)!important;width:min(500px,calc(100vw - 32px))!important;max-height:calc(100dvh - 80px)!important;padding:18px 20px 20px!important;border-radius:24px!important}
html body .mm{gap:12px!important}
html body .mm .mm-title{margin:2px 0 0!important;font-size:clamp(24px,3vw,30px)!important;-webkit-text-stroke:6px var(--ink)}
html body .mm .mm-summary{margin:-6px 0 2px!important;font-size:13px!important}
html body .mm .mm-stats{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:stretch}
html body .mm .mm-count{gap:6px;padding:12px 10px 14px;border-radius:18px}
html body .mm .mm-count small{font-size:12px}
html body .mm .mm-count b{font-size:clamp(48px,6vw,60px)}
html body .mm .mm-count strong span{font-size:clamp(22px,3vw,28px)}
.mm-pips{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;width:100%;max-width:230px}
.mm-pips i{aspect-ratio:1;border:2px solid var(--ink);border-radius:50%;background:#ffffff40}
.mm-pips i.on{background:radial-gradient(circle at 35% 30%,#fff7a0,#ffc81f 60%,#ff9d0a)}
html body .mm .mm-timer{width:128px!important;min-height:0!important;height:128px!important;padding:9px!important;border:4px solid var(--ink)!important;border-radius:50%!important;box-shadow:0 6px 0 var(--ink)!important;aspect-ratio:1;
  background:conic-gradient(#ffd23f calc(var(--mm-left,1) * 1turn),#1d0d4a 0)!important;transition:background .25s linear}
.mm-ring{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;border:3px solid var(--ink);border-radius:50%;background:radial-gradient(circle at 40% 30%,var(--pop-1),var(--pop-2) 60%,var(--pop-3))}
html body .mm .mm-timer span{font-size:44px!important;-webkit-text-stroke:7px var(--ink)}
html body .mm .mm-timer small{margin-top:2px;font-size:10px!important}
.mm-hint{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 10px;margin:0;color:#e9e1ff;font:800 12px/1.3 'Trebuchet MS',sans-serif;text-align:center;text-shadow:0 2px 0 var(--ink)}
.mm-hint b{color:#fff;font:900 12px/1.3 var(--party-font);letter-spacing:.06em;-webkit-text-stroke:3px var(--ink);paint-order:stroke fill}
html body .mm .mm-course{padding:8px 12px 8px 8px;border-radius:14px;gap:12px}
html body .mm .mm-course .matchmaking-course-art{flex-basis:84px;width:84px;height:48px}
html body .mm .mm-course strong{font-size:17px}
html body .mm .mm-leave{align-self:center;min-width:0!important;width:auto;padding:11px 34px!important;font-size:15px!important;border-radius:999px!important}
@media(max-height:500px){
  html body .lobby-panel.quick-match-lobby:not(.hidden){top:calc(50% + 18px)!important;width:min(620px,calc(100vw - 24px))!important;max-height:calc(100dvh - 48px)!important;padding:10px 14px 12px!important}
  html body .mm{gap:7px!important}
  html body .mm .mm-title{font-size:20px!important;-webkit-text-stroke:5px var(--ink)}
  html body .mm .mm-count{flex-direction:column;padding:6px 10px 8px}
  html body .mm .mm-count b{font-size:36px}
  html body .mm .mm-timer{width:88px!important;height:88px!important;padding:6px!important}
  html body .mm .mm-timer span{font-size:28px!important;-webkit-text-stroke:5px var(--ink)}
  .mm-hint{font-size:11px}
  html body .mm .mm-leave{padding:8px 26px!important;font-size:13px!important}
}

/* Quick Match card polish: jelly-bean spots, tips, lighter leave button, candy-stripe texture */
html body .lobby-panel.quick-match-lobby:not(.hidden){background:repeating-linear-gradient(135deg,#ffffff08 0 14px,#ffffff00 14px 28px),linear-gradient(160deg,var(--grape-1),var(--grape-3) 70%)!important}
.mm-pips{gap:5px;max-width:260px}
.mm-pips i{aspect-ratio:auto;width:100%;height:20px;border-radius:50% 50% 42% 42%/58% 58% 42% 42%;background:#ffffff1f;border:2px dashed #ffffff66;position:relative}
.mm-pips i.on{border:2px solid var(--ink);background:var(--bean,#ff6fb8);box-shadow:0 2px 0 var(--ink)}
.mm-pips i.on::after{content:'';position:absolute;left:22%;right:22%;top:34%;height:22%;background:radial-gradient(circle,#1d1440 0 35%,transparent 40%) left/50% 100% no-repeat,radial-gradient(circle,#1d1440 0 35%,transparent 40%) right/50% 100% no-repeat}
.mm-pips i:nth-child(12n+1){--bean:#ff6fb8}.mm-pips i:nth-child(12n+2){--bean:#5fc8ff}.mm-pips i:nth-child(12n+3){--bean:#ffd23f}.mm-pips i:nth-child(12n+4){--bean:#7ee06a}.mm-pips i:nth-child(12n+5){--bean:#b07bff}.mm-pips i:nth-child(12n+6){--bean:#ff9142}.mm-pips i:nth-child(12n+7){--bean:#4fd8c8}.mm-pips i:nth-child(12n+8){--bean:#ff5f7a}.mm-pips i:nth-child(12n+9){--bean:#9dff7a}.mm-pips i:nth-child(12n+10){--bean:#ffb3df}.mm-pips i:nth-child(12n+11){--bean:#6f8fff}.mm-pips i:nth-child(12n+12){--bean:#ffe680}
html body .mm .mm-course{background:linear-gradient(120deg,#7fd3ff33,#ff9ad633)!important;border:2px solid #ffffff33!important}
.mm-tip{display:flex;align-items:center;gap:8px;margin:0;padding:7px 12px;border-radius:12px;background:#0b1a4a55;color:#e9e1ff;font:800 12px/1.3 'Trebuchet MS',sans-serif;min-height:34px}
.mm-tip b{flex:0 0 auto;padding:3px 7px;border:2px solid var(--ink);border-radius:7px;background:var(--sun-2);color:var(--ink);font:900 10px/1 var(--party-font)}
.mm-tip-in{}
@keyframes mm-tip-in{from{opacity:0;transform:translateY(6px)}}
html body .mm .mm-leave{background:#ffffff!important;color:#e8364a!important;text-shadow:none!important;border-color:var(--ink)!important}
html body .mm .mm-leave:hover{background:#ffe8ee!important}
@media(max-height:500px){.mm-tip{display:none}.mm-pips i{height:14px}}
@media(prefers-reduced-motion:reduce){.mm-tip-in{animation:none}}

/* Quick Match card, compact pass: no per-player spots, smaller counter and ring */
.mm-pips{display:none!important}
html body .lobby-panel.quick-match-lobby:not(.hidden){width:min(440px,calc(100vw - 32px))!important;padding:16px 18px 18px!important}
html body .mm{gap:10px!important}
html body .mm .mm-title{font-size:clamp(22px,2.6vw,26px)!important;-webkit-text-stroke:5px var(--ink)}
html body .mm .mm-summary{font-size:12px!important}
html body .mm .mm-stats{gap:12px;align-items:center}
html body .mm .mm-count{flex-direction:row!important;justify-content:space-between;align-items:center;gap:10px;padding:10px 16px!important;border-width:3px!important;border-radius:16px!important;box-shadow:0 4px 0 var(--ink)!important}
html body .mm .mm-count small{font-size:11px;line-height:1.15;text-align:left}
html body .mm .mm-count strong{gap:4px;filter:drop-shadow(0 3px 0 var(--ink));-webkit-text-stroke:6px var(--ink)}
html body .mm .mm-count b{font-size:38px!important}
html body .mm .mm-count strong span{font-size:20px!important}
html body .mm .mm-timer{width:84px!important;height:84px!important;padding:6px!important;border-width:3px!important;box-shadow:0 4px 0 var(--ink)!important}
html body .mm .mm-timer span{font-size:28px!important;-webkit-text-stroke:5px var(--ink)}
html body .mm .mm-timer small{font-size:8px!important}
html body .mm .mm-course{padding:6px 10px 6px 6px!important}
html body .mm .mm-course .matchmaking-course-art{flex-basis:72px;width:72px;height:42px}
html body .mm .mm-course strong{font-size:15px}
.mm-tip{min-height:0;padding:6px 10px;font-size:11px}
html body .mm .mm-leave{padding:9px 28px!important;font-size:14px!important}
@media(max-height:500px){
  html body .lobby-panel.quick-match-lobby:not(.hidden){width:min(520px,calc(100vw - 24px))!important}
  html body .mm .mm-count b{font-size:30px!important}
  html body .mm .mm-timer{width:68px!important;height:68px!important}
  html body .mm .mm-timer span{font-size:22px!important}
}

/* Quick Match card, minimal: title, one big countdown ring, player count, one quiet line, leave. */
html body .lobby-panel.quick-match-lobby:not(.hidden){width:min(340px,calc(100vw - 32px))!important;padding:20px 22px 18px!important;background:linear-gradient(160deg,var(--grape-1),var(--grape-3) 75%)!important}
html body .mm{align-items:center!important;gap:12px!important;text-align:center}
html body .mm .mm-head,html body .mm .mm-summary,html body .mm .mm-course,html body .mm .mm-tip,html body .mm .mm-hint b{display:none!important}
html body .mm .mm-title{font-size:24px!important}
html body .mm .mm-stats{display:flex!important;flex-direction:column;align-items:center;gap:10px}
html body .mm .mm-timer{order:-1;width:116px!important;height:116px!important;padding:8px!important}
html body .mm .mm-timer span{font-size:40px!important;-webkit-text-stroke:6px var(--ink)}
html body .mm .mm-timer small{font-size:10px!important}
html body .mm .mm-count{flex-direction:row!important;gap:8px;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
html body .mm .mm-count small{order:2;color:#e9e1ff;font:900 13px/1 var(--party-font);-webkit-text-stroke:3px var(--ink)}
html body .mm .mm-count b{font-size:30px!important}
html body .mm .mm-count strong span{font-size:18px!important}
html body .mm .mm-hint{margin:-4px 0 0}
html body .mm .mm-hint span{color:#cfc3f7;font-size:12px}
html body .mm .mm-leave{margin-top:2px;padding:8px 26px!important;font-size:13px!important}
@media(max-height:500px){
  html body .lobby-panel.quick-match-lobby:not(.hidden){width:min(320px,calc(100vw - 24px))!important;padding:12px 16px 12px!important}
  html body .mm{gap:7px!important}
  html body .mm .mm-title{font-size:19px!important}
  html body .mm .mm-timer{width:78px!important;height:78px!important}
  html body .mm .mm-timer span{font-size:26px!important}
  html body .mm .mm-count b{font-size:22px!important}
}
