@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/bricolage.woff2?v=a97804dc9fbe") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Black";
  src: url("/archivo-black.woff2?v=25f33e61cf99") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #213c37;
  --soft-ink: #4b5e54;
  --paper: #fff4d9;
  --card: #fff9e9;
  --edge: #d7caac;
  --coral: #ff7957;
  --sea: #42a99c;
  --lobby-ocean: #079adf;
  --butter: #ffda78;
  --lime: #baff50;
  --body-font: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --display-font: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  font-family: var(--body-font);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; }
body {
  display: grid; grid-template-rows: minmax(0, 1fr); height: 100dvh;
  overflow: hidden; background: #12adee; color: var(--ink);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid #00675f; outline-offset: 3px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.topbar {
  position: absolute; z-index: 4; right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom));
}
body:not([data-state=playing]) :is(.topbar,.control-strip) { display: none; }
.header-actions { display: flex; gap: 9px; }
.icon-button {
  display: grid; place-items: center; width: 41px; height: 41px; padding: 0; border: 2px solid #233675; border-radius: 50%;
  background: linear-gradient(155deg,#fff 10%,#c1f7ff 52%,#7bdaff 78%,#86adff);
  color: #17448e; box-shadow: inset 0 2px 0 white,inset 0 -3px 0 #5bb2e3,0 2px 0 #2b4890;
}
.icon-button .icon { width: 19px; height: 19px; stroke-width: 2.6; }
.icon-button:active { transform: translateY(1px); }

.arena-shell { position: relative; isolation: isolate; min-width: 0; min-height: 0; overflow: hidden; background: #d8f6e6; }
.arena-frame, #arena { position: absolute; inset: 0; width: 100%; height: 100%; }
#arena { display: block; outline: none; touch-action: none; }
.join-status { margin: 10px 0 0; font-size: 13px; color: #9d392a; font-weight: 650; }

.arena-shell {
  --hud-top: max(env(safe-area-inset-top), clamp(34px, 10.9dvh, 104px));
  --hud-gap: clamp(48px, 12vw, 64px);
  --score-height: clamp(19px, 5.2vw, 28px);
  --hud-ink: #26295c;
}
.player-hud, .standings, .map-panel, .cut-banner { pointer-events: none; position: absolute; }
.player-hud, .standings { z-index: 2; }
.player-hud { inset: var(--hud-top) 0 auto; }
.territory-stat {
  --area: 0%; position: relative; width: min(82%, 540px); height: var(--score-height);
  margin-inline: auto; color: white; font: 400 clamp(13px,3.7vw,19px)/1 var(--display-font);
}
.progress-track {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden;
  background: linear-gradient(#493bb5d9, #22187de8); border: 1.6px solid #24215c;
  box-shadow: 0 0 0 1px #f8ffffb3, inset 0 2px 0 #afa4ea7a, inset 0 -2px 0 #24136699;
}
.progress-track i { display: block; width: var(--area); height: 100%; background: linear-gradient(#ffe963,#ffcf27);
  border-right: 1.5px solid white; transition: width .18s ease-out; }
.score-marks { position: absolute; inset: 0; }
.score-mark {
  position: absolute; top: 0; bottom: 0; left: 6%; width: 1.5px; background: #fff9;
  font-size: 0; color: #693512;
}
.score-mark:nth-child(2) { left: 20%; } .score-mark:nth-child(3) { left: 33%; }
.score-mark [data-menu-art] {
  position: absolute; left: 50%; top: 0; transform: translate(-50%,-77%); width: clamp(16px,5.2vw,26px);
  aspect-ratio: 1; background: #fffced; border-radius: 50%; box-shadow: 0 0 0 1px #fffefa,0 2px 3px #41366770;
}
#score {
  position: absolute; top: 50%; transform: translateY(-50%); left: clamp(5px,calc(var(--area) + 5px),calc(100% - 48px));
  font: inherit; letter-spacing: -.055em; paint-order: stroke fill; -webkit-text-stroke: 2px var(--hud-ink);
  text-shadow: 0 2px 1px var(--hud-ink); transition: left .18s ease-out;
}
.best-pointer {
  position: absolute; left: 0; top: 100%; transform: translateX(-50%); padding-top: 5px;
  color: #fff46f; font: 400 clamp(9px,2.6vw,13px)/1 var(--display-font); text-transform: uppercase;
  paint-order: stroke fill; -webkit-text-stroke: 2.5px var(--hud-ink); text-shadow: 0 1.5px var(--hud-ink); transition: left .2s ease;
}
.best-pointer::before { content: ''; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 7px;
  background: #ffe257; clip-path: polygon(50% 0,100% 100%,0 100%); }
.finish-badge { position: absolute; right: 0; top: 0; transform: translate(50%,-52%); width: clamp(23px,7.6vw,36px); aspect-ratio: 1; }
.run-stats {
  position: absolute; top: calc(var(--hud-gap) + 5px); left: max(4.5%,env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 0;
  min-width: clamp(69px,20vw,96px); height: clamp(28px,7.9vw,39px); border-radius: 22px;
  background: #ffffff80; border: 1px solid #ffffffe0; box-shadow: 0 1.5px 2px #485a824d;
}
.run-stats svg { height: calc(100% + 4px); width: clamp(28px,8.3vw,40px); flex: none; margin-left: -2px; }
.run-stats strong { font: 400 clamp(15px,3.6vw,21px)/1 var(--display-font); color: #fffdf8;
  paint-order: stroke fill; -webkit-text-stroke: 2.6px var(--hud-ink); text-shadow: 0 1.5px 0 var(--hud-ink); }
.standings {
  --badge: clamp(32px, 9.3vw, 47px); top: calc(var(--hud-top) + var(--hud-gap)); right: env(safe-area-inset-right);
  width: clamp(150px,42vw,210px);
}
#leaderboard { display: grid; gap: clamp(6px,1.7vw,9px); list-style: none; padding: 0; margin: 0; }
#leaderboard li {
  position: relative; isolation: isolate; display: grid;
  grid-template-columns: var(--badge) minmax(0,1fr); column-gap: 6px; align-items: center;
  min-height: var(--badge); padding-right: 6px; color: white; font: 400 clamp(16px,4.4vw,23px)/1 var(--display-font);
}
#leaderboard li::before { content: ''; position: absolute; z-index: -1; inset: 6% -2px 5% 9%;
  background: var(--seat); opacity: .91; border: 2px solid #fff8fb; border-inline-end: 0;
  border-radius: 5px 0 0 5px; box-shadow: inset 0 -3px #25265926, 0 2px 1px #22294763; }
#leaderboard .off-podium { margin-top: .26em; }
.board-face { position: relative; grid-column: 1; grid-row: 1 / 3; width: var(--badge); height: var(--badge);
  border-radius: 24%; border: 2px solid #fffefc; background: color-mix(in srgb,var(--seat) 68%,white);
  box-shadow: 0 0 0 1.4px var(--hud-ink), inset 0 -2px 0 #3936683d, 0 2px 2px #31306293; }
.board-face > .toy, .board-face canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.board-face .leader-crown { position:absolute; width: 64%; height: 48%; top: -40%; left: 19%; display: none; }
#leaderboard li:first-child .leader-crown { display: block; }
.place, .board-score { color: #fff; paint-order: stroke fill; -webkit-text-stroke: 2.6px var(--hud-ink); text-shadow: 0 2px 0 var(--hud-ink); }
.place { position: absolute; left: -.23em; bottom: -.24em; font: 400 .73em/1 var(--display-font); }
#leaderboard li:first-child .place { color: #fff07a; }
.board-score { grid-column: 2; grid-row: 2; align-self: start; white-space: nowrap; letter-spacing: -.055em; }
.board-score strong { font-weight: 400; } .board-score small { font-size: .69em; }
.board-name { grid-column: 2; grid-row: 1; align-self: end; padding-top: 2px; min-width: 0;
  overflow-wrap: anywhere; color: white; font: 800 clamp(12px,3.1vw,14px)/1.1 var(--body-font);
  paint-order: stroke fill; -webkit-text-stroke: 1.8px var(--hud-ink); text-shadow: 0 1px 1px var(--hud-ink); }
.online-count { position: absolute; top: calc(100% + 10px); right: 7px; border-radius: 7px; padding: 2px 5px;
  font: 750 10px/1.2 var(--body-font); color: #283b63; background: #ffffffbd; white-space: nowrap; }
.map-panel { left: max(3%,env(safe-area-inset-left)); bottom: max(11.8dvh,env(safe-area-inset-bottom));
  width: clamp(108px,37vw,192px); aspect-ratio: 1; }
#minimap { display: block; width: 100%; height: 100%; }
.cut-banner {
  z-index: 1; top: calc(var(--hud-top) + var(--hud-gap) - 3px); left: 0; right: 0;
  display: grid; place-items: center; min-height: 52px; text-align: center;
  background: linear-gradient(0deg,transparent 2%,#fff29aa6 23%,#ffffe9e8 42%,#fffef6ed 55%,#fff19899 75%,transparent 96%);
}
.cut-banner strong {
  max-width: 5.4em; color: #ffcc71; font: 400 clamp(25px,6.8vw,41px)/.93 var(--display-font);
  text-transform: uppercase; letter-spacing: -.045em; transform: rotate(-2deg); padding-block: .05em;
  text-shadow: 0 2.5px 0 #492958; -webkit-text-stroke: 3.8px #2e275c; paint-order: stroke fill;
  filter: drop-shadow(0 -1px 0 white) drop-shadow(0 1px 0 white);
}
.control-strip {
  position: absolute; z-index: 1; left: 50%; bottom: max(15px,env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 5px 12px; border-radius: 18px; color: #193e71; background: #effbffd9; box-shadow: 0 2px 0 #5a96bd88;
  font: 700 11px/1.15 var(--body-font); pointer-events: none; white-space: nowrap;
}
.desktop-controls, .key-cluster { display: flex; align-items: center; gap: 5px; }
.key-cluster { gap: 2px; }
kbd { padding: 2px 3px; background: #fff; border: 1px solid #7fb0ce; border-bottom-width: 2px; border-radius: 4px; font: 10px/1 var(--mono); }
.control-divider { height: 12px; border-left: 1px solid #83a7c3; margin-inline: 3px; }
@media (pointer:coarse), (max-width:620px), (max-height:479px) { .control-strip { display:none; } }
@media (min-width:760px), (max-height:479px) {
  .standings { width: clamp(178px,31vw,264px); }
  #leaderboard li { grid-template-columns: var(--badge) minmax(0,1fr) auto; }
  .board-face, .board-name, .board-score { grid-row: 1; align-self: center; }
  .board-name { padding-top: 0; }
  .board-score { grid-column: 3; }
}
@media (min-width: 760px) {
  .arena-shell { --hud-top: clamp(32px,5.8dvh,65px); --hud-gap: 68px; }
  .map-panel { left: 2.1%; bottom: 3%; width: clamp(134px,21dvh,190px); }
}
@media (max-height: 479px) {
  body:is([data-state=playing], [data-state=paused]) .control-strip { display: none; }
  .arena-shell { --hud-top: max(15px,env(safe-area-inset-top)); --hud-gap: 36px; --score-height: 16px; }
  .territory-stat { width: min(46%,340px); }
  .score-mark::before { width: 12px; } .score-mark::after { font-size: 7px; }
  .finish-badge { width: 21px; } #score { font-size: 12px; }
  .standings { --badge: 25px; } #leaderboard { gap: 4px; }
  #leaderboard li { font-size: 15px; } .board-name { font-size: 12px; }
  .map-panel { width: 82px; left: 2%; bottom: 3%; }
  .run-stats { min-width: 62px; height: 25px; left: 3%; }
  .cut-banner { min-height: 36px; } .cut-banner strong { font-size: 22px; }
}
/* The finish and pause boards sit over the same full-bleed arena as the HUD. */
.round-layer {
  position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; overflow: auto;
  padding: max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 43%,#196ac154 0%,#10408096 64%,#092665c7);
}
body[data-state=paused] :is(.player-hud,.standings,.map-panel,.cut-banner) { visibility: hidden; }
.round-board {
  --rim: #162e76; --shade:#163991;
  position: relative; isolation: isolate; flex: none; width: min(366px, calc(100% - 12px));
  margin: auto; padding: 15px clamp(13px,4.4vw,22px) 20px; text-align: center; color: white;
  border: 3px solid var(--rim); border-radius: 32px 32px 29px 29px;
  background:
    radial-gradient(ellipse at 50% 4%,#53dfff92,transparent 66%),
    linear-gradient(145deg,#26b3ff 0%,#1c88ff 33%,#1767ef 72%,#1652d2);
  box-shadow: inset 0 3px 0 #90eaff,inset 0 -6px 0 #0f47c4,inset 4px 0 0 #64caff66,inset -4px 0 0 #3652c366,
    0 5px 0 var(--shade),0 8px 0 var(--rim),0 14px 21px #0821585c;
}
.round-board::before {
  content:''; pointer-events:none; position:absolute; z-index:-1; inset:4px; border-radius:inherit;
  background: radial-gradient(circle,#d1efff 1.35px,transparent 1.65px); background-size:9px 9px; opacity:.3;
  mask-image:linear-gradient(117deg,#000,transparent 27%,transparent 68%,#000);
}
.round-emblem {
  position: relative; width: min(70%,218px); aspect-ratio:240/128; margin: -38px auto -11px;
  filter:drop-shadow(0 3px 0 #14327277);
}
.round-emblem-frame { width:100%; height:100%; display:block; overflow:visible; }
.round-emblem canvas, .round-pause-symbol { position:absolute; width:30%; height:auto; aspect-ratio:1; top:15%; left:35%; }
.round-banner {
  position: relative; z-index: 1; width: calc(100% + 38px); margin:0 -19px; padding:6px 5px 9px;
  border: 2px solid #14327b; border-radius: 12px 14px 13px 12px / 13px 15px 13px 15px;
  background: linear-gradient(#387be8 3%,#2855ca 49%,#2146b4 50%,#2d59ce);
  box-shadow: inset 0 2px 0 #71acff,inset 0 -2px 0 #1a41a4,0 3px 0 #173987;
  color:white; font: 400 clamp(24px,6.8vw,33px)/1.08 var(--display-font); letter-spacing:-.065em;
  -webkit-text-stroke: 2.5px #102962; paint-order: stroke fill; text-shadow: 0 2px 0 #102962;
}
.round-banner::before, .round-banner::after {
  content:''; position:absolute; z-index:-1; bottom:-8px; border-top:6px solid #122e73;
}
.round-banner::before { left:0; border-left:8px solid transparent; }
.round-banner::after { right:0; border-right:8px solid transparent; }
.round-caption {
  margin:13px auto 12px; font:800 clamp(14px,3.7vw,16px)/1.24 var(--body-font);
  color:#f6fcff; text-wrap:balance; text-shadow:0 1.5px 0 #1b51a9;
}
.round-scores {
  position:relative; display:grid; grid-template-columns:1fr 1fr; margin: 0; border:2px solid #113e95;
  border-radius:17px; background:linear-gradient(#f5ffff,#ccf5ff 55%,#a1ddff);
  box-shadow:inset 0 3px 0 #fff,inset 0 -3px 0 #88c7ef,0 3px 0 #1858c0; color:#143e8d;
}
.round-scores::after { content:''; position:absolute; width:2px; inset:12px auto 11px 50%; background:linear-gradient(transparent,#80bee4 22%,#80bee4 78%,transparent); }
.round-scores > div { min-width:0; padding:10px 2px 12px; }
.round-scores dt { display:flex; align-items:center; justify-content:center; gap:4px; font:800 clamp(12px,3.3vw,15px)/1 var(--body-font); }
.round-scores dt :is(span,svg) { width:20px; height:20px; }
.round-scores dd { margin:2px 0 0; color:#193d91; font:400 clamp(23px,6.8vw,33px)/1 var(--display-font); letter-spacing:-.065em; text-shadow:0 2px white; font-variant-numeric:tabular-nums; }
.round-best { display:flex; align-items:center; justify-content:center; gap:5px; margin:9px auto 12px; color:#e3f7ff; font:800 13px/1.2 var(--body-font); text-shadow:0 1px #13439b; }
.round-best [data-menu-art] { width:20px; height:20px; }
.round-best strong { color:#fff18b; font-variant-numeric:tabular-nums; }
.round-actions { display:grid; gap:10px; }
.round-actions button, .round-sound {
  position:relative; display:flex; align-items:center; justify-content:center; isolation:isolate;
  width:100%; min-height:46px; padding:5px 12px; gap:7px; border:2px solid #163172; border-radius:15px;
  color:white; font:400 clamp(17px,4.7vw,22px)/1.04 var(--display-font); letter-spacing:-.05em; paint-order:stroke fill;
  -webkit-text-stroke:2.3px #18336b; text-shadow:0 1.8px 0 #18336b;
  transition:transform .12s,filter .12s;
}
.round-actions button::after {
  content:''; pointer-events:none; position:absolute; top:5px; left:9px; width:14px; height:4px; transform:rotate(-18deg);
  border-radius:100%; background:#ffffffaa;
}
.round-actions button:active, .round-sound:active { transform:translateY(2px); }
.round-actions button:hover, .round-sound:hover { filter:brightness(1.06); }
.round-primary {
  background:linear-gradient(170deg,#fff364 2%,#ffdb22 42%,#ffca0d 67%,#ffb119);
  box-shadow:inset 0 3px 0 #fff2a0,inset 0 -4px 0 #f99718,0 3px 0 #ae6417,0 5px 0 #172f70;
}
.round-secondary {
  background:linear-gradient(165deg,#8ee2ff 0%,#4db5ff 45%,#3692f5 75%,#3686ed);
  box-shadow:inset 0 3px 0 #bceeff,inset 0 -3px 0 #277ad9,0 3px 0 #1a58ba,0 5px 0 #172f70;
}
.round-actions button [data-menu-art] { width:27px; height:27px; flex:none; }
.round-board button:focus-visible,.topbar button:focus-visible { outline:3px solid white; outline-offset:3px; }
.round-pause .round-caption { max-width:29ch; margin:14px auto 12px; }
.round-sound {
  width:auto; min-height:38px; gap:7px; margin:0 auto 16px; padding:4px 10px; border-radius:20px; color:white;
  background:#1045ad; box-shadow:inset 0 2px 2px #123d95,0 1px 0 #6ab8ff;
  font:800 15px/1 var(--body-font); -webkit-text-stroke:0; text-shadow:none; letter-spacing:0;
}
.round-sound .icon { width:17px; height:17px; }
.round-sound strong { display:grid; place-items:center; min-width:33px; padding:3px 5px; border:1px solid #233773; border-radius:12px; color:#15396e; background:#adf66e; box-shadow:inset 0 1px #f1ffbf; }
.round-sound[aria-pressed=false] strong { background:#bed9ee; box-shadow:inset 0 1px white; }
.round-board { animation:round-arrive .28s cubic-bezier(.25,.9,.36,1.15) both; }
@keyframes round-arrive { from { transform:translateY(9px) scale(.94); opacity:0; } to { transform:none; opacity:1; } }
@media (min-width:510px) and (max-height:510px) {
  .round-board { width:min(540px,95%); display:grid; grid-template-columns:.82fr 1.18fr; column-gap:22px; align-items:center; padding:15px 18px 21px; }
  .round-emblem { grid-column:1; grid-row:1 / 4; width:100%; align-self:center; margin:0; }
  .round-banner,.round-caption,.round-scores,.round-best,.round-sound,.round-actions { grid-column:2; }
  .round-banner { width:calc(100% + 24px); margin:0 -6px; font-size:23px; }
  .round-caption { margin:10px 0 6px; font-size:13px; }
  .round-scores > div { padding:6px 1px; }
  .round-scores dd { font-size:22px; }
  .round-best { grid-column:1; grid-row:4; margin:0; }
  .round-actions { grid-row:4 / 6; margin-top:7px; gap:8px; }
  .round-actions button { min-height:34px; font-size:15px; }
  .round-actions button [data-menu-art] { width:22px; height:22px; }
  .round-pause .round-caption { margin:9px auto; }
  .round-sound { margin:0 auto 6px; min-height:33px; }
}
@media (max-height:555px) and (max-width:509px) {
  .round-layer { padding-top:max(24px,env(safe-area-inset-top)); }
  .round-board { padding-bottom:15px; }
  .round-emblem { width:138px; margin:-28px auto -12px; }
  .round-caption { margin:9px auto; }
  .round-scores > div { padding:6px 1px; }
  .round-actions button { min-height:36px; font-size:16px; }
}
.no-js { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: var(--paper); }

/* A full-bleed arcade menu. Each panel shares its wallet and bottom controls. */
html:has(body[data-state=menu]), body[data-state=menu] {
  --lobby-ocean: #049fff;
  background: var(--lobby-ocean);
}
body[data-state=menu] { grid-template-rows: minmax(0,1fr); }
body[data-state=menu], body[data-state=menu] .arena-shell { overflow: clip; }
body[data-state=menu] :is(.topbar,.control-strip,.arena-frame,.vignette) { display: none; }
.toy { display: inline-block; width: 48px; height: 48px; overflow: visible; flex: none; }
#menu, .menu-frame, #home-screen, #heroes-screen, #missions-screen { position: absolute; inset: 0; overflow: hidden; }
#menu {
  --menu-ink: #11225f;
  --menu-nav-height: calc(clamp(64px, 10.1dvh, 106px) + env(safe-area-inset-bottom));
  --dock-toy: clamp(50px, min(17vw, 8.6dvh), 85px);
  --sticker-font: var(--display-font);
  color: var(--menu-ink);
  isolation: isolate;
}
.menu-frame { isolation: isolate; }
#home-screen {
  background:
    radial-gradient(ellipse 57% 49% at 51% 48%, #8bf0e6 0%, #56e8e6 28%, #2ed6f5 70%, #14bdf9c2 88%, transparent),
    linear-gradient(110deg,#009bfa,#0ebaff 53%,#0a9fff);
}
#lobby-water { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#lobby-island {
  position: absolute; display: block; left: 50%; top: 47.5%;
  transform: translate(-50%,-50%);
  width: min(79vw,54dvh,700px); height: min(37.8dvh,78vw,560px);
}
#menu button:focus-visible, #menu input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #2346bd; }
#menu [data-menu-art] { display: block; pointer-events: none; }
.menu-topbar {
  --wallet-height: clamp(24px,6.35vw,35px);
  --wallet-art: calc(var(--wallet-height) * 1.67);
  position: absolute; z-index: 5; top: max(calc(11.2% - var(--wallet-art)/2),env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%); width: min(92%,800px); height: var(--wallet-art);
  display: flex; justify-content: center; align-items: center; pointer-events: none;
}
.menu-topbar button { padding: 0; border: 0; background: transparent; pointer-events: auto; }
.menu-profile,.menu-settings { position: absolute; top: 50%; transform: translateY(-50%); aspect-ratio: 1; }
.menu-profile { width: calc(var(--wallet-art) * 1.22); left: 0; }
.menu-settings { width: calc(var(--wallet-art) * .93); right: .5%; }
.menu-profile [data-menu-art],.menu-settings [data-menu-art] { width: 100%; height: 100%; }
.menu-frame:not([data-screen=home]) :is(.menu-profile,.menu-settings) { display: none; }
.menu-wallet { width: min(62.5%,365px); display: grid; grid-template-columns: 1fr 1fr; gap: 5.4%; }
.menu-balance {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: var(--wallet-height); padding-left: calc(var(--wallet-art)*.65); padding-right: 4px;
  border-radius: 999px; background: linear-gradient(#1e418c, #2c47aa 54%, #25388b);
  box-shadow: inset 0 2px 3px #18286f, inset 0 -1px 0 #739de6, 0 1px 1px #74d7ff;
}
.menu-balance [data-menu-art] { width: var(--wallet-art); height: var(--wallet-art); position: absolute; top: 50%; left: -10%; transform: translateY(-50%); }
.menu-balance strong { overflow: hidden; text-overflow: ellipsis; color: #fff; font: 400 clamp(14px,3.65vw,22px)/1 var(--sticker-font); letter-spacing: -.045em; text-shadow: 0 2px 0 #111c62,0 0 2px #122571; }
.mode-banners {
  position: absolute; z-index: 1; inset: auto 0 calc(var(--menu-nav-height) + 2dvh) 0;
  margin-inline: auto; max-width: 1160px; height: clamp(70px,12.4dvh,148px); display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none;
}
.mode-banner {
  position: relative; isolation: isolate; pointer-events: auto; border: 0; background: none;
  padding: 0; width: min(37%,275px); height: 100%; color: #fff;
}
.mode-banner .banner-shape { position: absolute; bottom: 0; width: 99%; height: 75%; border: clamp(2px,.45vw,3px) solid #172155; }
.public-banner .banner-shape {
  left: -4%; transform: skewX(-15deg); border-radius: 0 48% 8% 0 / 0 45% 21% 0;
  background:
    radial-gradient(circle at 70% 40%,#a5ecff8c 0 2px,transparent 2.9px) center /9px 9px,
    linear-gradient(160deg,#a8f1ff 1%,#6ad3ff 46%,#3badf3 95%);
  box-shadow: inset 0 3px 0 #d8fbff,inset 0 -5px 0 #1d93d8,0 2px 0 #147eb5;
}
.practice-banner .banner-shape {
  right: -4%; transform: skewX(15deg); border-radius: 47% 0 0 8% / 44% 0 0 21%;
  background: radial-gradient(ellipse at 32% 20%,#ffc575 0 15%,transparent 16%), linear-gradient(145deg,#ffb35a,#ffc975 66%,#ffc780);
  box-shadow: inset 0 3px 0 #ffe6a7,inset 0 -5px 0 #f2963e,0 2px 0 #147eb5;
}
.mode-banner .banner-art { position: absolute; top: -2%; left: 48%; transform: translateX(-50%); width: 78%; height: 68%; filter: drop-shadow(0 2px 0 #16488b5c); }
.practice-banner .banner-art { top: -6%; left: 54%; width: 62%; height: 68%; }
.banner-copy { position: absolute; bottom: 9.5%; left: 0; width: 92%; display: grid; justify-items: center; gap: 3px; line-height: 1; }
.practice-banner .banner-copy { left: auto; right: 0; }
.banner-copy strong,.nav-side strong,.banner-copy small {
  font: 400 clamp(12px,3.3vw,22px)/1 var(--sticker-font); letter-spacing: -.036em; text-transform: uppercase;
  paint-order: stroke fill; -webkit-text-stroke: max(2.5px,.14em) #192358; color: #fff; text-shadow: 0 .12em #222765;
}
.banner-copy small {
  display: inline-flex; align-items: center; justify-content: center; gap: .24em;
  min-width: 48%; padding: .13em .55em .18em; border: 1px solid #15275d; border-radius: 5px;
  background: #2944a4; font: 800 clamp(9px,2.4vw,14px)/1 var(--body-font); text-transform: none; -webkit-text-stroke: 0; letter-spacing: .005em;
}
.public-banner small i { width: .52em; height: .52em; border-radius: 50%; background: #99fb78; }
.mode-banner:active .banner-art { top: 1%; }
.join-status { position: absolute; left: 50%; top: 67%; transform: translateX(-50%); margin: 0; width: max-content; max-width: 85%; padding: 7px 12px; text-align: center; border: 2px solid #264f92; border-radius: 12px; background: #f6fdff; color: #222b6d; font-weight: 750; z-index: 2; }
.menu-nav {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: var(--menu-nav-height);
  background: linear-gradient(#8ec8f8 0 2px,#f4fcff 3px,#d5edff 15%,#b9dafa 80%,#a5caf2);
  border-top: clamp(2px,.48vw,3px) solid #24386d; box-shadow: inset 0 -2px #7ea2d0,0 -2px 3px #006abd55;
}
.nav-inner { height: 100%; width: min(100%,750px); margin: auto; position: relative; }
.nav-side, .nav-medal { position: absolute; border: 0; padding: 0; background: none; }
.nav-side {
  top: -2px; bottom: 0; width: 23%; transform: translateX(-50%); display: flex;
  flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding: 0 0 env(safe-area-inset-bottom); color: #182d73;
}
.nav-heroes { left: 22%; } .nav-missions { left: 78%; }
.nav-side > [data-menu-art], .nav-emblem {
  position: relative; flex: none; width: var(--dock-toy); height: var(--dock-toy);
  margin-top: calc(var(--dock-toy) * -.10); filter: drop-shadow(0 3px 1px #18428c44);
  transition: transform .15s ease-out;
}
.nav-side:active > [data-menu-art], .nav-side:active > .nav-emblem { transform: translateY(2px) scale(.96); }
.nav-emblem > [data-menu-art] { width: 100%; height: 100%; }
#quest-badge {
  position: absolute; top: -5%; right: -3%; width: 33%; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 50%; color: white; background: radial-gradient(ellipse at 31% 20%,#ffb595,#ff4b36 26%,#e42628 69%,#9c1f36);
  border: 1.7px solid #272253; box-shadow: inset 0 1px 0 #ffb791,0 1px 0 #79224a;
  font: 400 clamp(12px,3.6vw,23px)/1 var(--display-font); transform: rotate(7deg);
}
.nav-side strong { display: block; font: 800 clamp(12px,3.3vw,19px)/1 var(--body-font); text-transform: none;
  color: #173677; letter-spacing: -.025em; -webkit-text-stroke: 0; text-shadow: 0 1px #fff; }
.nav-side[aria-current=page] {
  border-radius: 15% 15% 0 0 / 22% 22% 0 0;
  background: linear-gradient(#2b60d0, #4c97ff 8%, #2875e8 90%, #2469d1);
  box-shadow: inset 0 2px #95cdff,inset 2px 0 #779ad433,inset -2px 0 #3862bd88;
}
.nav-side[aria-current=page] strong { color: white; text-shadow: 0 2px #183f92; }
.nav-side[aria-current=page] > [data-menu-art], .nav-side[aria-current=page] > .nav-emblem {
  margin-top: calc(var(--dock-toy) * -.21); transform: scale(1.08);
}
.nav-medal {
  z-index: 2; width: min(30.8vw,15.1dvh,180px); aspect-ratio: 1; left: 50%; top: 5%;
  transform: translate(-50%,-50%); transition: width .15s ease-out;
}
.menu-frame:not([data-screen=home]) .nav-medal { width: min(22.4vw,11.4dvh,132px); top: 21%; }
.gold-disc {
  position: absolute; inset: 0; display: grid; place-items: center; border: clamp(2.5px,.51vw,3.5px) solid #151e5b; border-radius: 50%;
  background: radial-gradient(ellipse at 77% 73%,#ffe447 0 5%,transparent 6%), radial-gradient(ellipse at 37% 16%,#fff9af 0%,#fff057 24%,#ffdc11 65%,#ffbd08 91%);
  box-shadow: inset 0 3px 1px #ffffbd,inset 0 -7px 1px #ef9206,inset 0 -11px 3px #ffc513,0 3px 0 #8d4f25,0 7px 7px #1a3f7a25;
}
.gold-disc::before { content: ''; position: absolute; top: 13%; left: 13%; width: 19%; height: 10%; border-radius: 50%; transform: rotate(-44deg); background: #ffffe4; box-shadow: 0 -1px 3px #fffaca; }
.gold-disc [data-menu-art] { width: 57%; height: 60%; }
.menu-frame[data-screen=home] .gold-disc [data-menu-art=home],.menu-frame:not([data-screen=home]) .gold-disc [data-menu-art=play] { display: none !important; }
.menu-frame:not([data-screen=home]) .gold-disc { background: linear-gradient(155deg,#fff397,#ffe353 33%,#ffcf23 76%); box-shadow: inset 0 3px #fff9bb,inset 0 -6px #ffac0c,inset 0 -8px #ffe321,0 2px 0 #eaaa18; }
.nav-medal:active .gold-disc { transform: scale(.96); }
.nav-medal:disabled { cursor: progress; }
.menu-dialog { color: #182466; border: 3px solid #162059; border-radius: 22px; padding: 0; width: min(90vw,360px); max-height: 88dvh; overflow-y: auto; background: linear-gradient(150deg,#f2fdff,#d2edff); box-shadow: inset 0 3px white,0 5px 0 #234ea2,0 12px 40px #003b7b4d; }
.menu-dialog::backdrop { background: #12307696; }
.menu-dialog header { padding: 11px 15px; display: flex; align-items: center; gap: 8px; color: white; border-bottom: 2px solid #233487; background: linear-gradient(#57caff,#2294fa); }
.menu-dialog header [data-menu-art] { width: 37px; height: 37px; }
.menu-dialog h2 { font: 400 21px/1 var(--sticker-font); margin: 0; letter-spacing: -.04em; paint-order: stroke fill; -webkit-text-stroke: 2.5px #203477; }
.menu-dialog header button { border: 2px solid #263b7a; border-radius: 50%; background: #f2faff; color: #203477; font: 800 24px/1 var(--body-font); width: 31px; height: 31px; padding: 0; margin-left: auto; }
.menu-dialog form,.settings-content { display: grid; gap: 11px; padding: 18px 19px 22px; }
.menu-dialog label,.sound-setting,.confirm-button { font: 800 17px/1.1 var(--body-font); }
.menu-dialog input { color: #132466; background: #fff; border: 2px solid #71a2d2; padding: 10px 12px; border-radius: 12px; }
.confirm-button,.sound-setting { padding: 10px 14px; background: #ffe838; border: 2px solid #243f86; color: #19376c; border-radius: 12px; box-shadow: inset 0 2px #fff797,0 2px #3456a3; }
.sound-setting { display: flex; align-items: center; gap: 9px; background: #f1faff; box-shadow: inset 0 2px white,0 2px #80b6d5; }
.sound-setting strong { margin-left: auto; border-radius: 20px; padding: 3px 10px; background: #a8deff; }
.settings-content p { font-size: 14px; font-weight: 650; line-height: 1.45; margin: 0; color: #375480; }
@media(min-width: 800px) {
  #lobby-island { width: min(51vw,63dvh,760px); height: min(45.5dvh,580px); }
  #home-screen { background: radial-gradient(ellipse 40% 65% at 50% 47%,#8bf0e6,#51e5eb 40%,#19bcfa 74%,transparent),linear-gradient(120deg,#058fee,#16c4fb 51%,#0098f7); }
  .menu-topbar { width: min(88%,960px); }
  .mode-banner .banner-shape { border-radius: 24px 52% 24px 20px / 20px 54% 30% 20px; }
  .practice-banner .banner-shape { border-radius: 52% 24px 20px 22px / 54% 20px 20px 30%; }
}
@media(max-height: 580px) and (orientation: landscape) {
  #menu { --menu-nav-height: calc(clamp(45px,12dvh,65px) + env(safe-area-inset-bottom)); --dock-toy: clamp(36px,10dvh,52px); }
  .menu-topbar { --wallet-height: 21px; width: 87%; top: max(4%,env(safe-area-inset-top)); }
  .menu-wallet { max-width: 235px; }
  .menu-balance strong { font-size: 14px; }
  #lobby-island { top: 47%; width: 64dvh; height: 54dvh; }
  .nav-inner { max-width: 480px; }
  .nav-medal { width: min(18dvh,68px); }
  .menu-frame:not([data-screen=home]) .nav-medal { width: min(14.5dvh,58px); }
  .nav-side[aria-current=page] > [data-menu-art],.nav-side[aria-current=page] > .nav-emblem { margin-top: -8px; }
  .nav-side strong { font-size: 12px; }
  .mode-banners { bottom: calc(var(--menu-nav-height) + 6px); height: min(22dvh,92px); max-width: min(90%,850px); }
  .mode-banner { width: 24%; }
  .banner-copy { gap: 1px; bottom: 5%; }
  .banner-copy strong {font-size: 13px;}
  .banner-copy small {font-size: 9px;}
}
