@import url("assets/halo-menu/fonts/native.css");

/* Super 64 cube UI. On its own page: OLED black, the cube room (glass cubes at depth that react to touch) behind
   everything, the menu cube in the upper third whose faces are the five menus, and the selected menu's page below.
   Inside a game: a glass panel that hinges in over the dimmed game, whose pages turn like cube faces. Ink surfaces and
   clear glass; the cube's cyan-to-violet light is the only color and appears on edges and focus. The SteamiiSU boot
   and launch cubes below are unchanged. */
:root{color-scheme:dark;
  --ink:#08080f;--panel:rgba(12,14,25,.97);--text:#edeff8;--soft:#c9cce0;--text-2:var(--soft);--muted:#9096b2;--faint:#666b8e;
  --line:rgba(255,255,255,.1);--edge:rgba(255,255,255,.22);--glass:rgba(255,255,255,.06);--glass-edge:rgba(255,255,255,.13);
  --cyan:#6eecff;--violet:#8b6cff;--online:#3ddc97;--away:#f2b544;--danger:#ff8296;
  --display:"Unbounded","Arial Black",system-ui,-apple-system,sans-serif;
  --body:"Sora",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --roll:cubic-bezier(.65,0,.35,1);--snap:cubic-bezier(.2,0,0,1);--ease:var(--snap);
  font-family:var(--body);color:var(--text);background:var(--ink)}
html.embedded,html.embedded body{background:transparent}
*{box-sizing:border-box}
body{margin:0;min-height:100svh;background:var(--ink);overflow-x:hidden;font-size:15px;line-height:1.45;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;border:0;cursor:pointer;min-height:44px;background:none;padding:0}
button:disabled{opacity:.45;cursor:default}
button:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* One glass cube, the same face material as the SteamiiSU launch cube. Faces: front, back, right, left, top, bottom. */
.gcube{--e:112px;position:relative;width:var(--e);height:var(--e);transform-style:preserve-3d}
.gcube>i{position:absolute;inset:0;display:grid;place-items:center;border-radius:calc(var(--e) * .08);border:1px solid rgba(255,255,255,.28);background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(110,236,255,.12) 40%,rgba(103,79,221,.42));box-shadow:inset 0 0 calc(var(--e) * .25) rgba(255,255,255,.1)}
.gcube>i:nth-child(1){transform:translateZ(calc(var(--e) / 2))}
.gcube>i:nth-child(2){transform:rotateY(180deg) translateZ(calc(var(--e) / 2))}
.gcube>i:nth-child(3){transform:rotateY(90deg) translateZ(calc(var(--e) / 2))}
.gcube>i:nth-child(4){transform:rotateY(-90deg) translateZ(calc(var(--e) / 2))}
.gcube>i:nth-child(5){transform:rotateX(90deg) translateZ(calc(var(--e) / 2))}
.gcube>i:nth-child(6){transform:rotateX(-90deg) translateZ(calc(var(--e) / 2))}
.gcube.pose{transform:rotateX(-18deg) rotateY(28deg)}

/* The cube room: glass cubes hang at different depths; the view shifts with the pointer or a finger and nudges when
   the menu cube turns. They drift only while someone is using the page. */
#room{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;--room-scale:1;perspective:560px;perspective-origin:var(--px,50%) var(--py,35%)}@media (prefers-reduced-motion:no-preference){#room{transition:perspective-origin .45s var(--snap)}}
#room .view{position:absolute;inset:0;transform-style:preserve-3d}
#room .slot{position:absolute;transform-style:preserve-3d}@media (prefers-reduced-motion:no-preference){#room .slot{transition:left .9s var(--roll),top .9s var(--roll),transform .9s var(--roll),opacity .7s var(--snap)}}
#room .slot .gcube{animation:drift 32s linear infinite}
@keyframes drift{from{transform:rotateX(-18deg) rotateY(0) rotateZ(0)}to{transform:rotateX(342deg) rotateY(360deg) rotateZ(90deg)}}
.still #room .slot .gcube,.covered #room .slot .gcube{animation-play-state:paused}
.no-motion #room .slot .gcube{animation:none;transform:rotateX(-18deg) rotateY(28deg)}
@media (prefers-reduced-motion:no-preference){.no-motion #room{transition:none}}

#app{position:relative;z-index:1;min-height:100svh;max-width:600px;margin:0 auto;display:flex;flex-direction:column;padding-bottom:max(24px,env(safe-area-inset-bottom))}
header{position:sticky;top:0;z-index:5;flex:none;display:flex;align-items:center;gap:10px;height:calc(54px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0 18px;background:linear-gradient(rgba(8,8,15,.92),rgba(8,8,15,0))}
.brand{display:flex;align-items:center;gap:14px;min-height:44px;color:var(--text);text-decoration:none;font:700 13px var(--display);letter-spacing:.02em}
.brand img{width:22px;height:22px}
.brand-cube{--e:22px;flex:none}
#shell-close{display:flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:44px;height:44px;min-height:44px;margin-left:auto;padding:0 12px}
/* Banked coins, the currency every game shares. The coin is flat, like the rest of the cube kit. */
.coins{margin-left:auto;display:flex;align-items:center;gap:7px;height:30px;padding:0 12px 0 9px;border-radius:999px;background:var(--glass);color:var(--text);font:700 13px/1 var(--display);font-variant-numeric:tabular-nums}
.coins:not([hidden])+#shell-close{margin-left:0}
.coin{position:relative;flex:none;width:14px;height:14px;border-radius:50%;background:#f6c945;box-shadow:inset 0 0 0 1.5px #c58f17}
.coin::after{content:"";position:absolute;left:calc(50% - 1px);top:3px;bottom:3px;width:2px;border-radius:1px;background:#c58f17}

/* The menu cube: one face per menu, in the upper third. It turns firmly and stops; it never wobbles. */
#stage{--cube:clamp(84px,23vw,110px);position:relative;flex:none;height:clamp(140px,21svh,190px);display:grid;place-items:center;perspective:900px;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
#stage::after{content:"";position:absolute;bottom:5%;left:50%;width:calc(var(--cube) * 1.4);height:calc(var(--cube) * .24);transform:translateX(-50%);background:radial-gradient(closest-side,rgba(139,108,255,.3),transparent);pointer-events:none}
.float{transform-style:preserve-3d;animation:bob 5s ease-in-out infinite alternate}
@keyframes bob{from{transform:translateY(-5px)}to{transform:translateY(5px)}}
.still .float,.covered .float{animation-play-state:paused}
.no-motion .float{animation:none}
.menu-cube{--e:var(--cube);transform:rotateX(-16deg) rotateY(24deg)}@media (prefers-reduced-motion:no-preference){.menu-cube{transition:transform .65s var(--roll)}}
.menu-cube>i img{width:42%;height:42%;opacity:0;will-change:opacity;pointer-events:none;-webkit-user-drag:none}@media (prefers-reduced-motion:no-preference){.menu-cube>i img{transition:opacity .35s var(--snap)}}
.menu-cube>i.on img{opacity:1}
@media (prefers-reduced-motion:no-preference){.no-motion .menu-cube,.no-motion .menu-cube>i img{transition:none}}

/* Menu names; the current one carries the cube's light. */
#menus{flex:none;display:flex;justify-content:center;gap:clamp(8px,4vw,20px);padding:0 10px 4px}
#menus button{position:relative;padding:12px 2px;font:600 11px/1 var(--body);color:var(--faint);text-shadow:0 0 8px var(--ink),0 0 2px var(--ink)}
#menus button[aria-current=page]{color:var(--text)}
#menus button[aria-current=page]::after{content:"";position:absolute;left:0;right:0;bottom:6px;height:2px;border-radius:2px;background:linear-gradient(90deg,var(--cyan),var(--violet))}
#shell-status{margin:4px 18px 0;color:var(--soft);font-size:14px}
#shell-status:empty{display:none}

/* The selected menu's page. In a game, pages turn like cube faces; on the landing page they rise into place. */
#page{position:relative;flex:1 1 auto;perspective:1200px;padding:10px 16px 24px}
.face{display:grid;align-content:start;gap:10px;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.face.leaving{position:absolute;top:10px;left:16px;right:16px;pointer-events:none}
#page .face[data-page=play]{grid-template-columns:1fr 1fr}
.glass{background:var(--glass);border:1px solid var(--glass-edge);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.low .glass,.embedded .glass{-webkit-backdrop-filter:none;backdrop-filter:none}
.embedded .glass{background:rgba(255,255,255,.035)}
.low .glass{background:rgba(22,22,44,.9)}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;min-height:44px;padding:0 18px;border-radius:999px;font:600 14px var(--body);flex:none;text-decoration:none}@media (prefers-reduced-motion:no-preference){.primary,.secondary{transition:transform .18s var(--snap)}}
.primary{background:var(--cyan);color:#071016}
.secondary{background:rgba(255,255,255,.08);color:var(--text);border:1px solid rgba(255,255,255,.18)}
.primary:active:not(:disabled),.secondary:active:not(:disabled){transform:scale(.96)}

/* Each game is one panel of the intro cube's glass; the panel itself plays the game. */
.game{display:grid;place-items:center;align-content:center;gap:6px;min-width:0;aspect-ratio:1.8;padding:12px;border-radius:14px;text-align:center;background:linear-gradient(135deg,rgba(255,255,255,.11),rgba(110,236,255,.06) 42%,rgba(103,79,221,.16));border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 18px rgba(255,255,255,.05)}@media (prefers-reduced-motion:no-preference){.game{transition:transform .18s var(--snap)}}
.game:active:not(:disabled){transform:scale(.96)}
.game:disabled{opacity:.5}
/* On the landing page the room hangs behind the panels, so they keep an ink backing and dim without turning see-through. */
html:not(.embedded) .game{background-color:rgba(8,8,15,.86)}
html:not(.embedded) .game:disabled{opacity:1;filter:brightness(.5)}
.game img{max-width:86%;max-height:52px;object-fit:contain;filter:drop-shadow(0 3px 8px rgba(0,0,0,.45))}
.wordmark{font:700 12.5px/1.18 var(--display);color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.45);overflow-wrap:anywhere}
.availability{font:600 10px var(--body);color:var(--soft)}

.card{display:grid;gap:6px;padding:18px;border-radius:16px;grid-column:1/-1;background:rgba(17,17,42,.86)}
.card time{font:600 11px var(--body);color:var(--cyan)}
.card h2{margin:0;font:700 16px/1.25 var(--display)}
.card p{margin:0;color:var(--soft);font-size:14px}
.account{gap:12px}
.account label{display:grid;gap:6px;color:var(--soft);font-size:14px}
.account input{width:100%;min-height:44px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:#0d0d1c;color:var(--text);padding:10px 12px;font:inherit}
.account input:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}

.prow{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:9px 10px 9px 9px;border-radius:14px}
.av{position:relative;flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font:700 13px var(--display);background:rgba(255,255,255,.1)}
.av::after{content:"";position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:var(--online);box-shadow:0 0 0 2px var(--ink)}
.av.away::after{background:var(--away)}
.av.off::after{background:var(--faint)}
.who{min-width:0;display:grid}
.who b{font-weight:600;font-size:14px}
.who small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.state{font:600 11px var(--body);color:var(--muted)}

.me{display:grid;justify-items:center;gap:14px;padding:24px 18px;border-radius:22px;text-align:center}
.ring{width:112px;height:112px;border-radius:50%;display:grid;place-items:center;padding:30px;background:linear-gradient(135deg,rgba(255,255,255,.2),rgba(110,236,255,.1) 42%,rgba(103,79,221,.36));border:1px solid rgba(255,255,255,.26)}
.ring img{width:100%;height:100%}
.me h2{margin:0;font:700 18px var(--display)}

.setting{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:54px;padding:0 10px 0 18px;border-radius:14px;font-weight:600;text-align:left}
.setting span{padding:7px 12px;border-radius:999px;font:600 11px var(--body);color:var(--cyan);background:rgba(110,236,255,.12)}
.setting.off span{color:var(--muted);background:rgba(255,255,255,.07)}
.setting.danger span{color:var(--danger);background:rgba(255,90,115,.12)}

/* Activity: a small cube tumbles in and unfolds into the banner, then folds back and rolls away. */
#activity{position:fixed;z-index:12;top:calc(10px + env(safe-area-inset-top));left:50%;width:min(420px,calc(100% - 24px));height:56px;transform:translateX(-50%);pointer-events:none}
#activity .mini{position:absolute;left:17px;top:17px;perspective:400px;opacity:0}
#activity .mini .gcube{--e:22px}
#activity .mini.in,#activity .mini.out{opacity:1}
#activity .mini.in .gcube{animation:tumble-in .9s var(--roll) both}
#activity .mini.out .gcube{animation:tumble-out .7s var(--roll) both}
@keyframes tumble-in{0%{transform:translate3d(260px,-26px,0) rotateX(0) rotateY(0);opacity:0}18%{opacity:1}100%{transform:translate3d(0,0,0) rotateX(-378deg) rotateY(-332deg);opacity:1}}
@keyframes tumble-out{0%{transform:translate3d(0,0,0) rotateX(-18deg) rotateY(28deg);opacity:1}100%{transform:translate3d(-80px,-60px,0) rotateX(-378deg) rotateY(-332deg);opacity:0}}
.banner{position:absolute;inset:0;display:flex;align-items:center;gap:10px;padding:0 8px 0 10px;border-radius:18px;background:#11112a;border:1px solid var(--edge);box-shadow:0 18px 40px -20px #000;transform-origin:28px 50%;transform:scaleX(.14);opacity:0}@media (prefers-reduced-motion:no-preference){.banner{transition:transform .5s var(--roll),opacity .18s var(--snap)}}
.banner.show{transform:none;opacity:1;pointer-events:auto}
.banner>*{opacity:0}@media (prefers-reduced-motion:no-preference){.banner>*{transition:opacity .18s var(--snap)}}
.banner.show>*{opacity:1}@media (prefers-reduced-motion:no-preference){.banner.show>*{transition-delay:.28s}}
@media (prefers-reduced-motion:no-preference){.banner.show>.slot{transition-delay:0s}}
.banner .slot{flex:none;width:36px;height:36px;display:grid;place-items:center;perspective:300px}
.banner .slot .gcube{--e:22px}
.banner .av{width:34px;height:34px;font-size:12px}
.banner .msg{flex:1;min-width:0;font-size:13px;line-height:1.3}
.banner .msg b{font-weight:600}
.banner .primary{height:44px;min-height:44px;padding:0 14px;font-size:13px}

/* In a game: the panel hinges in from its left edge over the dimmed game, and back out when it closes. */
.embedded #room,.embedded #stage,.embedded #activity{display:none}
.embedded #app{position:fixed;top:max(12px,env(safe-area-inset-top));bottom:max(12px,env(safe-area-inset-bottom));left:12px;right:12px;width:auto;max-width:560px;min-height:0;margin:0;padding:0 0 12px;border-radius:24px;background:var(--panel);border:1px solid var(--edge);box-shadow:0 30px 80px -30px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.08);overflow:hidden;overscroll-behavior:contain;transform-origin:0 50%}
.embedded header{position:relative;height:58px;padding:0 10px 0 16px;background:none}
.embedded #menus{justify-content:flex-start;padding:0 16px 2px;gap:16px;overflow-x:auto;scrollbar-width:none}
.embedded #menus::-webkit-scrollbar{display:none}
/* Inside a game the cube carries the game's own menu: six faces, named in a 3x2 grid, over the dimmed game. */
html.in-game #stage{display:grid;--cube:56px;height:88px}
.in-game .menu-cube>i svg{width:42%;height:42%;opacity:.3;will-change:opacity}@media (prefers-reduced-motion:no-preference){.in-game .menu-cube>i svg{transition:opacity .35s var(--snap)}}
.in-game .menu-cube>i.on svg{opacity:1}
.in-game header .brand{display:none}
html.in-game #menus{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 8px;padding:0 14px 4px;overflow:visible}
.in-game #menus button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;font-size:13px}
.in-game #menus button:not([aria-current=page]){color:var(--muted)}
.pip{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--cyan);color:#071016;font:700 10px/18px var(--display);letter-spacing:0;text-align:center;text-shadow:none}
.close{display:grid;place-items:center;width:44px;height:44px;margin-left:auto;padding:0;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:var(--text)}
.close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.embedded #page{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
.in-game #page{display:flex;flex-direction:column}
.in-game #page>.face{flex:1 0 auto}
.in-game #page .face[data-page=pause]{display:flex;flex-direction:column}
.here{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 10px 0 16px;border-radius:14px}
.here h2{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 13px var(--body)}
.here .primary{margin-left:auto}
.faces{display:flex;flex:none;align-items:center}
.faces>span[aria-hidden]{display:grid;place-items:center;width:28px;height:28px;margin-left:-8px;overflow:hidden;border-radius:50%;background:#2c2c4a;box-shadow:0 0 0 2px #1c1c35;font:700 10px var(--display)}
.faces>span[aria-hidden]:first-child{margin-left:0}
.av img,.faces img{width:66%;height:66%;image-rendering:pixelated}
.pause-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:auto;padding-top:6px}
.pause-actions .secondary{height:52px;min-height:52px;border-radius:14px}
.pause-actions .secondary:only-child{grid-column:1/-1}
.match-votes{display:grid;gap:14px}
.match-votes h2,.match-votes p{margin:0}
.match-votes p,.match-vote small{color:var(--muted);font-weight:400;line-height:1.5}
.match-vote{gap:12px;padding:12px 14px;min-height:64px}
.match-vote div{min-width:0;overflow-wrap:anywhere}
.match-vote small{display:block;font-size:12px;margin-top:4px}
.match-vote span{white-space:nowrap;flex:none}
.match-vote[aria-pressed=true]{outline:2px solid var(--cyan)}
/* Character select: one data page per character, laid out like the Smash 64 Data screen in the cube's glass. */
.in-game #page .face[data-page=characters]{display:block}
.codex{--cyan:#f2c70d;container:codex/inline-size;display:grid;gap:14px}
.codex-banner{display:flex;align-items:center;justify-content:flex-end;aspect-ratio:272/21;background:url("assets/smash-data/header.png") center/contain no-repeat;padding-right:6%;overflow:hidden}
.codex-banner img{width:44.1%;height:auto;image-rendering:pixelated}
.codex button:focus-visible,.codex a:focus-visible{outline:2px solid #ffe270;outline-offset:2px}
.codex-pick,.codex-pager button,.codex-use{transition:transform 120ms cubic-bezier(.2,.8,.2,1)}
.codex-pick:active,.codex-pager button:active,.codex-use:active{transform:scale(.96)}
@media(hover:hover) and (pointer:fine){.codex-pick:hover,.codex-pager button:hover{background-color:#f2c70d18}}
@media(prefers-reduced-motion:reduce){.codex-pick,.codex-pager button,.codex-use{transition:none}.codex-pick:active,.codex-pager button:active,.codex-use:active{transform:none}}
.codex-bar{display:flex;align-items:flex-end;justify-content:space-between;gap:8px}
.codex-group{position:relative;display:grid;grid-template-columns:minmax(0,1fr);flex:1 1 0;gap:4px;min-width:0;font:600 11px var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.codex-device{position:relative;display:flex;align-items:center;gap:8px;min-width:0;font:600 11px var(--body);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.codex-group select,.codex-device select{-webkit-appearance:none;appearance:none;min-height:44px;width:100%;min-width:0;padding:0 34px 0 14px;border:1px solid var(--glass-edge);border-radius:12px;background:var(--panel);color:var(--text);font:600 14px var(--body);letter-spacing:0;text-transform:none}
.codex-group select:focus-visible,.codex-device select:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.codex-group::after,.codex-device::after{content:"";position:absolute;right:15px;bottom:18px;width:7px;height:7px;border-right:2px solid var(--soft);border-bottom:2px solid var(--soft);transform:rotate(45deg);pointer-events:none}
.codex-pager{display:flex;flex:none;align-items:center;gap:4px;font:600 13px var(--body);color:var(--soft);font-variant-numeric:tabular-nums}
.codex-pager button{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--glass-edge);background:var(--glass)}
.codex-pager svg{visibility:hidden;width:20px;height:20px}
.codex-pager button{background: url("assets/smash-data/previous.png") center/28px 14px no-repeat}
.codex-pager button[data-codex-step="1"]{background-image:url("assets/smash-data/next.png")}
.codex-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:none;scroll-snap-type:x proximity}
.codex-strip::-webkit-scrollbar{display:none}
.codex-pick{flex:none;display:grid;place-items:center;width:76px;min-height:76px;padding:6px 4px;border-radius:10px;border:1px solid var(--glass-edge);background:var(--glass);scroll-snap-align:center}
.codex-pick span{display:grid;place-items:center;width:100%;height:100%;font:700 13px var(--display)}
.codex-pick small{display:block;max-width:100%;font:600 10px/1.2 var(--body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.codex-pick img{width:32px;height:32px;image-rendering:pixelated}
.codex-pick.on{border-color:var(--cyan);box-shadow:inset 0 0 0 1px var(--cyan)}
.codex-pick.locked{color:var(--muted)}
.codex-pick.locked span{opacity:.55}
.codex-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:12px;align-items:stretch}
.codex-stage{container:stage/inline-size;position:relative;display:grid;place-items:center;height:clamp(176px,36dvh,340px);overflow:hidden;border-radius:20px;border:1px solid var(--glass-edge);background:radial-gradient(120% 90% at 50% 105%,#c18b2329,transparent 62%),linear-gradient(160deg,#38342c,#111116)}
.codex-ghost{position:absolute;inset:8% 2% auto;text-align:center;text-wrap:balance;text-transform:uppercase;font:800 clamp(14px,13cqi,72px)/1 var(--display);color:rgba(255,255,255,.075);pointer-events:none;overflow:hidden;max-height:2.1em}
/* A long name (Smash Donkey Kong) keeps its watermark to two lines. */
.codex-ghost.long{font-size:clamp(10px,9cqi,52px)}
.codex-still{position:relative;height:92%;width:auto;max-width:92%;object-fit:contain;filter:drop-shadow(0 16px 14px rgba(0,0,0,.55))}
.codex-spin{position:relative;height:92%;width:auto;max-width:92%;aspect-ratio:384/480;object-fit:contain;filter:drop-shadow(0 16px 14px rgba(0,0,0,.55));cursor:grab;outline-offset:-4px;border-radius:12px}
.codex-stage{touch-action:pan-y;-webkit-user-select:none;user-select:none}
.codex-stage.dragging,.codex-stage.dragging .codex-spin{cursor:grabbing}
.codex-still.pixel{height:52%;aspect-ratio:1;image-rendering:pixelated}
.codex-stage.locked .codex-spin,.codex-stage.locked .codex-still{filter:brightness(.55) saturate(.65) drop-shadow(0 16px 14px rgba(0,0,0,.55))}
.codex-title{display:grid;gap:2px;align-content:center;min-width:0}
.codex-title h2{margin:0;padding:20px 8px;min-height:78px;display:grid;align-items:center;background:url("assets/smash-data/nameplate.png") center/contain no-repeat;color:#ffe5ac;text-shadow:0 2px 3px #000;font:700 clamp(19px,4cqi,32px)/1.15 var(--display);overflow-wrap:anywhere}
.codex-title p{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:4px 0 10px;color:var(--muted);font:600 13px var(--body)}
.codex-status{padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.08);color:var(--soft);font:600 11px var(--body)}
.codex-status.on{background:rgba(110,236,255,.14);color:var(--cyan)}
.codex-costumes{display:flex;gap:6px;margin:0 0 10px;overflow-x:auto;scrollbar-width:none}
.codex-costumes::-webkit-scrollbar{display:none}
.codex-costumes button{flex:none;padding:0 14px;border-radius:999px;border:1px solid var(--glass-edge);background:var(--glass);font:600 13px var(--body);white-space:nowrap}
.codex-costumes button[aria-pressed=true]{border-color:var(--cyan);color:var(--cyan)}
.codex-use{width:100%}
.codex+.collection-achievements{margin-top:14px}
.codex-use .coin{width:10px;height:10px;box-shadow:none}
.codex-use .coin::after{display:none}
.codex-use.confirm{background:var(--violet);color:#fff}
.codex-unlock{justify-self:start;margin-top:4px;color:var(--cyan);font-weight:600}
.codex-section{padding:14px;border-radius:18px;border:1px solid var(--glass-edge);background:var(--glass)}
.codex-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px}
.codex-heading h3{margin:0;font:700 12px var(--body);letter-spacing:.12em;text-transform:uppercase;color:var(--cyan)}
.codex-moves,.codex-sources{display:grid;margin:0;padding:0;list-style:none}
.codex-moves li{display:grid;gap:8px;padding:10px 0;border-top:1px solid var(--line)}
.codex-moves li:first-child,.codex-sources li:first-child{border-top:0}
.codex-keys{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.codex-keys.unavailable{color:var(--muted);font:500 12px var(--body)}
.codex-move{display:grid;gap:1px;min-width:0}
.codex-move b{font:600 14px var(--body)}
.codex-move small{color:var(--cyan);font:600 11px var(--body)}
.codex-move span{color:var(--soft);font-size:13px}
.codex-note{margin:0;color:var(--soft);font-size:13px}
.codex-traits{margin-top:8px;color:var(--muted);font-size:13px}
.codex-traits summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:var(--soft);font-weight:600}
.codex-traits ul{margin:0 0 8px;padding-left:18px;display:grid;gap:4px}
.codex-sources li{display:grid;grid-template-columns:minmax(72px,30%) 1fr;gap:10px;align-items:center;padding:4px 0;border-top:1px solid var(--line)}
.codex-role{color:var(--muted);font:600 12px var(--body)}
.codex-who{min-width:0;overflow-wrap:anywhere}
.codex-who a{display:flex;flex-direction:column;justify-content:center;min-height:44px;color:var(--cyan);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.codex-who a small{color:var(--muted);font:500 11px var(--body);text-decoration:none}
.codex-who>span{display:block;padding:10px 0}
.codex-gap{color:var(--muted);font-style:italic}
.pad,.cap,.touch-gesture,.codex-label{display:inline-grid;grid-auto-flow:column;place-items:center;height:30px;font:700 12px var(--body);line-height:1}
.pad{min-width:30px;padding:0 8px;border-radius:8px;border:1.5px solid var(--glass-edge);background:rgba(255,255,255,.08);color:var(--text)}
.pad.face{width:30px;padding:0;border-radius:50%;border-color:currentColor;background:rgba(255,255,255,.04)}
.pad .shape{width:20px;height:20px}
.pad .arrow{width:16px;height:16px}
.pad.face.xbox.bottom{color:#7ed957}.pad.face.xbox.right{color:#ff6b6b}.pad.face.xbox.left{color:#5aa9ff}.pad.face.xbox.top{color:#ffd23f}
.pad.face.playstation.bottom{color:#7cb7ff}.pad.face.playstation.right{color:#ff6b7a}.pad.face.playstation.left{color:#ff9ad5}.pad.face.playstation.top{color:#5fe0b0}
.pad.face.nintendo{color:var(--soft)}
.cap{min-width:30px;padding:0 9px;border-radius:7px;border:1px solid var(--edge);border-bottom-width:3px;background:rgba(255,255,255,.08);color:var(--text);font:600 12px var(--mono)}
.codex-label{padding:0 11px;border-radius:999px;background:rgba(255,255,255,.07);color:var(--soft);font-weight:600}
.touch-gesture{gap:6px;padding:0 11px 0 7px;border-radius:999px;background:rgba(255,255,255,.07);color:var(--soft);font-weight:600}
.touch-gesture svg{width:20px;height:20px;color:var(--cyan)}
.codex .plus,.codex .times{color:var(--muted);font:700 12px var(--body);font-style:normal}
@container codex (min-width:460px){
  .codex-title h2{font-size:24px}
  .codex-moves li{grid-template-columns:minmax(120px,max-content) 1fr;align-items:center;gap:14px}
}
.hub-fields.character-category{grid-column:1/-1;grid-template-columns:1fr}
.character-category label{position:relative}
.character-category label select{-webkit-appearance:none;appearance:none;padding-right:36px}
.character-category label::after{content:"";position:absolute;right:16px;bottom:21px;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);pointer-events:none}
.collection-achievements{grid-column:1/-1}
.achievement-title{margin:0;font:700 22px/1.2 var(--display)}
.face[data-page=achievements] .page-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;width:fit-content;padding:0 8px;color:var(--muted);font-weight:600}
.face[data-page=achievements] .page-back svg{width:20px;height:20px}
.achievement-tabs{display:flex;gap:8px;border-bottom:1px solid var(--glass-edge)}
.achievement-tabs button{min-height:44px;padding:10px 12px;color:var(--muted);border-bottom:2px solid transparent;font-weight:600}
.achievement-tabs button[aria-selected=true]{color:var(--cyan);border-bottom-color:var(--cyan)}
.unlock-list{display:grid;gap:10px;min-width:0}
.unlock-reward{display:grid;grid-template-columns:minmax(0,1fr) 72px;align-items:center;gap:14px;padding:16px;border-radius:16px}
.unlock-progress{display:grid;gap:7px;min-width:0}
.unlock-progress h3{margin:0;font:700 18px/1.2 var(--display)}
.unlock-progress p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.unlock-progress progress{display:block;width:100%;height:8px;border:0;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.12);color:var(--cyan);accent-color:var(--cyan)}
.unlock-progress progress::-webkit-progress-bar{border-radius:999px;background:rgba(255,255,255,.12)}
.unlock-progress progress::-webkit-progress-value{border-radius:999px;background:var(--cyan)}
.unlock-progress progress::-moz-progress-bar{border-radius:999px;background:var(--cyan)}
.unlock-count{font:600 11px var(--body);color:var(--soft)}
.unlock-portrait{position:relative;display:grid;place-items:center;width:72px;height:80px}
.unlock-portrait img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated}
.unlock-portrait svg{width:48px;height:64px;fill:var(--muted)}
.unlock-portrait.locked img{filter:brightness(0) invert(.3)}
.unlock-portrait.locked b{position:absolute;font:700 30px var(--display);color:var(--text);text-shadow:0 2px 6px #000}
.unlock-reward.unlocked{border-color:rgba(110,236,255,.35)}
.unlock-empty{margin:0;padding:20px 0;color:var(--muted);font-size:14px}
.setting .price{display:flex;align-items:center;gap:6px;color:#f6c945;background:rgba(246,201,69,.14);font:700 12px var(--display);letter-spacing:0;text-transform:none}
.setting.confirm .price{background:var(--cyan);color:#071016}
.setting .price .coin{width:10px;height:10px;box-shadow:none}
.setting .price .coin::after{display:none}
/* The panel grows out of the game's home cube and shrinks back into it (its transform origin is set from the cube). */
.hinge-in{animation:hinge-in .4s cubic-bezier(.2,.9,.3,1.08) both}
.hinge-out{animation:hinge-out .24s cubic-bezier(.45,0,.9,.55) both}
@keyframes hinge-in{from{transform:perspective(900px) rotateX(-22deg) rotateY(30deg) scale(.06);opacity:0}45%{opacity:1}to{transform:none;opacity:1}}
@keyframes hinge-out{to{transform:perspective(900px) rotateX(-22deg) rotateY(30deg) scale(.06);opacity:0}}

#rest{position:fixed;z-index:20;inset:0;background:#000;display:flex;flex-direction:column;gap:40px;align-items:center;justify-content:center}
#rest img{width:72px;height:72px;opacity:.9}
.hidden-page *{animation-play-state:paused!important}

@media(min-width:900px){
  #app{max-width:780px}
  #room{--room-scale:1.6}
  #stage{--cube:110px;height:190px}
  #page .face[data-page=play]{grid-template-columns:repeat(3,1fr)}
  .embedded #app{left:24px;top:24px;bottom:24px;right:auto;width:min(560px,calc(100% - 48px))}
  .embedded #page .face[data-page=play]{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}#room .slot .gcube,.float,#activity .mini .gcube{animation:none!important}}

/* ---------- the cube: six translucent glass faces, ported from SteamiiSU ---------- */
.bigcube .c i,.mini i{position:absolute;inset:0;display:block}

/* launch: whatever is loading rides inside a rolling cube */
#launch{position:fixed;inset:0;z-index:25;display:grid;place-items:center;text-align:center;background:#03050ba3;backdrop-filter:blur(24px);animation:ov-in .6s var(--ease) both}
#launch.leaving{animation:ov-out .4s var(--ease) both}
.launch-body{display:grid;justify-items:center;gap:12px;padding:24px}
.bigcube{--cs:min(220px,52vw);width:var(--cs);height:var(--cs);perspective:1100px;margin-bottom:calc(var(--cs) * .14)}
.bigcube .c{width:100%;height:100%;position:relative;transform-style:preserve-3d;animation:roll 2.6s cubic-bezier(.65,0,.35,1) infinite}
.bigcube .c i{border-radius:10px;border:1px solid #ffffff47;background:linear-gradient(135deg,#ffffff38,#6eecff1f 40%,#674fdd6b);box-shadow:inset 0 0 30px #ffffff1a}
.bigcube .c i:nth-child(1){transform:translateZ(calc(var(--cs) / 2))}
.bigcube .c i:nth-child(2){transform:rotateY(180deg) translateZ(calc(var(--cs) / 2))}
.bigcube .c i:nth-child(3){transform:rotateY(90deg) translateZ(calc(var(--cs) / 2))}
.bigcube .c i:nth-child(4){transform:rotateY(-90deg) translateZ(calc(var(--cs) / 2))}
.bigcube .c i:nth-child(5){transform:rotateX(90deg) translateZ(calc(var(--cs) / 2))}
.bigcube .c i:nth-child(6){transform:rotateX(-90deg) translateZ(calc(var(--cs) / 2))}
.bigcube .payload{position:absolute;left:50%;top:50%;width:calc(var(--cs) * .58);height:calc(var(--cs) * .58);margin:calc(var(--cs) * -.29) 0 0 calc(var(--cs) * -.29);transform-style:preserve-3d;animation:payload-spin 5s linear infinite;display:grid;place-items:center}
.bigcube .payload img{position:absolute;max-width:100%;max-height:100%;object-fit:contain;border-radius:12%;filter:drop-shadow(0 6px 14px #0008);opacity:0}@media (prefers-reduced-motion:no-preference){.bigcube .payload img{transition:opacity .4s var(--ease)}}
.bigcube .payload img.on{opacity:1}
#launch h1{font-family:var(--display);font-weight:400;font-size:max(30px,5vw);margin:6px 0 0;text-shadow:0 3px 16px #0008}
#launch .phase{margin:0 0 14px;color:var(--text-2);font-weight:600;letter-spacing:.06em}
@keyframes payload-spin{to{transform:rotateY(360deg)}}
@keyframes roll{0%{transform:rotateX(-20deg) rotateY(0)}50%{transform:rotateX(-20deg) rotateY(180deg) translateY(-14px)}100%{transform:rotateX(-20deg) rotateY(360deg)}}
@keyframes ov-in{from{opacity:0}}
@keyframes ov-out{to{opacity:0}}
.no-motion .bigcube .c,.no-motion .bigcube .payload{animation:none}
.no-motion .bigcube .c{transform:rotateX(-20deg) rotateY(28deg)}

/* boot: four cubes roll together, then the mark and name settle in */
#boot{position:fixed;inset:0;z-index:30;background:#05070d;display:grid;place-items:center}@media (prefers-reduced-motion:no-preference){#boot{transition:opacity .7s var(--ease)}}
#boot.hide{opacity:0;pointer-events:none}
#boot .wrap{display:grid;place-items:center;gap:26px}
#boot .cubes4{position:relative;width:140px;height:140px;perspective:900px}
#boot .mini{position:absolute;width:60px;height:60px;transform-style:preserve-3d;animation:boot-roll 1.3s var(--ease) both}
#boot .mini i{border-radius:8px;border:1px solid #ffffff4d;background:linear-gradient(135deg,#ffffff47,#6eecff24 40%,#674fdd80)}
#boot .mini i:nth-child(1){transform:translateZ(30px)}#boot .mini i:nth-child(2){transform:rotateY(180deg) translateZ(30px)}#boot .mini i:nth-child(3){transform:rotateY(90deg) translateZ(30px)}#boot .mini i:nth-child(4){transform:rotateY(-90deg) translateZ(30px)}#boot .mini i:nth-child(5){transform:rotateX(90deg) translateZ(30px)}#boot .mini i:nth-child(6){transform:rotateX(-90deg) translateZ(30px)}
#boot .mini:nth-child(1){left:6px;top:6px;--fx:-220px;--fy:-160px;animation-delay:0s}
#boot .mini:nth-child(2){right:6px;top:6px;--fx:240px;--fy:-140px;animation-delay:.08s}
#boot .mini:nth-child(3){left:6px;bottom:6px;--fx:-200px;--fy:200px;animation-delay:.16s}
#boot .mini:nth-child(4){right:6px;bottom:6px;--fx:220px;--fy:180px;animation-delay:.24s}
@keyframes boot-roll{from{transform:translate(var(--fx),var(--fy)) rotateX(-160deg) rotateY(200deg);opacity:0}30%{opacity:1}to{transform:translate(0,0) rotateX(-18deg) rotateY(28deg);opacity:1}}
#boot .mark{position:absolute;left:50%;top:50%;width:96px;height:96px;transform:translate(-50%,-50%) scale(.6);opacity:0;animation:mark-in .6s cubic-bezier(.34,1.56,.64,1) 1.25s both;filter:drop-shadow(0 20px 40px #674fdd80)}
#boot .word{font-family:var(--display);font-size:44px;letter-spacing:.04em;opacity:0;animation:word-in .6s var(--ease) 1.5s both}
#boot .word b{font-weight:400;background:linear-gradient(100deg,#fff 0%,#BFE9FF 42%,#8FB4FF 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
@keyframes mark-in{to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes word-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#boot.fast .mini{animation-duration:.01s}#boot.fast .mark,#boot.fast .word{animation-delay:0s;animation-duration:.01s}
@media(prefers-reduced-motion:reduce){.bigcube .c,.bigcube .payload{animation:none}}

/* The game switch: the four boot cubes roll together before the launch cube carries the game. */
.four{position:relative;width:112px;height:112px;perspective:900px;margin-bottom:14px}
.four .gcube{position:absolute;--e:46px;opacity:0}
.four.go .gcube{animation:boot-roll 1.3s var(--ease) both}
.four .gcube:nth-child(1){left:6px;top:6px;--fx:-150px;--fy:-180px}
.four .gcube:nth-child(2){right:6px;top:6px;--fx:160px;--fy:-160px;animation-delay:.08s}
.four .gcube:nth-child(3){left:6px;bottom:6px;--fx:-140px;--fy:190px;animation-delay:.16s}
.four .gcube:nth-child(4){right:6px;bottom:6px;--fx:150px;--fy:170px;animation-delay:.24s}
/* Landscape phones: the cube and its six names sit beside the page, so the page keeps the full panel height. */
@media (orientation:landscape) and (max-height:520px){
  html.in-game #app{display:grid;grid-template-columns:minmax(240px,40%) minmax(0,1fr);grid-template-rows:58px minmax(0,1fr) auto;grid-template-areas:"stage head" "stage page" "menus page";max-width:820px;overflow:hidden}
  html.in-game header{grid-area:head}
  html.in-game #stage{grid-area:stage;height:auto;min-height:0;align-self:center}
  html.in-game #menus{grid-area:menus;padding-bottom:0}
  html.in-game #page{grid-area:page;padding-bottom:4px}
  html.in-game #shell-status{grid-area:page;align-self:end;z-index:1}
  html.in-game body.hub-open #app{display:flex;flex-direction:column;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none;max-width:820px;overflow:hidden}
  html.in-game body.hub-open header,html.in-game body.hub-open #page,html.in-game body.hub-open #shell-status{grid-area:auto}
  html.in-game body.hub-open #page{width:100%;max-width:720px;margin-left:auto;margin-right:auto}
}
/* Until the script knows whether it runs over a game, nothing paints: no black flash over the game behind it. */
html.loading,html.loading body{background:transparent}
html.loading #app{visibility:hidden}
.in-game #page .rule{width:100%;margin:6px 0;border:0;border-top:1px solid var(--line)}
/* Players inside a game: Online or this game's leaderboard. Plain rows and hairlines; your row is marked in cyan. */
.segment{display:flex;gap:4px;padding:4px;margin:0 0 10px;border-radius:999px;background:var(--glass);border:1px solid var(--glass-edge)}
.segment button{flex:1;min-height:44px;border-radius:999px;font:600 13px var(--body);color:var(--muted)}
.segment button[aria-pressed=true]{background:rgba(255,255,255,.1);color:var(--text)}
.board{list-style:none;margin:0;padding:0}
.board li{display:grid;grid-template-columns:28px minmax(0,1fr) repeat(var(--n,1),minmax(48px,auto));align-items:center;gap:10px;min-height:42px;padding:0 6px;border-bottom:1px solid var(--line);font:500 14px var(--body)}
.board.columns-2 li{--n:2}.board.columns-3 li{--n:3}
.board li.head{min-height:28px;font:600 12px var(--body);color:var(--muted)}
.board li.gap{min-height:10px;border-bottom:0}
.board .rank{color:var(--muted);font-variant-numeric:tabular-nums}
.board .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board .score{text-align:right;font-variant-numeric:tabular-nums}
.board li.you{color:var(--cyan)}.board li.you .rank{color:var(--cyan)}
/* The profile button at the top left, in a glass circle. Its page: your name, then stats per game. */
.profile{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;overflow:hidden;background:var(--glass);border:1px solid var(--glass-edge);color:var(--text);font:600 15px var(--body)}
.profile svg{width:26px;height:26px}
.profile[aria-pressed=true]{border-color:var(--cyan)}
.in-game #page .face[data-page=profile]{display:block}
.in-game #page .profile-head{display:flex;align-items:center;gap:14px;margin:0 0 12px}
.in-game #page .profile-head h2{margin:0;font:600 20px var(--body)}
.in-game #page .stats h3{margin:14px 0 4px;font:600 13px var(--body);color:var(--muted)}
.in-game #page .stats dl{margin:0}
.in-game #page .stats dl div{display:flex;justify-content:space-between;align-items:center;min-height:40px;border-bottom:1px solid var(--line);font:500 15px var(--body)}
.in-game #page .stats dd{margin:0;font-variant-numeric:tabular-nums}
.in-game #page .stats+.secondary{margin-top:16px;width:100%}
/* The home screen's five menus: equal, full-width and readable on phones, on a dark bar the room's cubes pass
   behind. The in-game menu keeps its own compact names. */
html:not(.embedded) #menus{position:relative;z-index:2;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;width:min(calc(100% - 32px),560px);margin:0 auto 8px;padding:4px;border-radius:18px;background:rgba(8,8,15,.8);border:1px solid var(--line);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
html:not(.embedded) #menus button{min-height:50px;padding:0 2px;border-radius:14px;font:600 clamp(13px,3.9vw,15px)/1.1 var(--body);color:var(--soft);white-space:nowrap;text-shadow:none}
html:not(.embedded) #menus button[aria-current=page]{color:var(--text);background:rgba(255,255,255,.09)}
html:not(.embedded) #menus button[aria-current=page]::after{left:30%;right:30%;bottom:7px}
/* Performance: the loading cubes can be grabbed; the room is lighter on phones, where nothing blurs over moving cubes
   and the floating cubes drop their inner glow. */
.bigcube .cube-grab{width:100%;height:100%}
#room .gcube>i{box-shadow:none}
html:not(.embedded) #menus{position:sticky;top:calc(54px + env(safe-area-inset-top));z-index:4;-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(8,8,15,.9)}
#page .face{contain:layout style}
@media (pointer:coarse){
  .glass{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(20,21,40,.86)}
  #launch{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(3,5,11,.92)}
}
/* Over a game (and the start-up picker) the menu draws its own dim, so it fades in and out with the panel instead of snapping. The menu cube
   rolls into place as the panel unfolds out of the home cube, and faces turn with the cube on one quick curve. */
html.embedded body::before{content:"";position:fixed;inset:0;background:rgba(5,6,14,.34);animation:dim-in .32s ease-out both}
html.embedded body.closing::before{animation:dim-out .24s ease-in both}
@keyframes dim-in{from{opacity:0}}
@keyframes dim-out{to{opacity:0}}
html.in-game .float{animation:cube-arrive .55s cubic-bezier(.2,.9,.3,1.1) both}
@keyframes cube-arrive{from{transform:rotateX(70deg) rotateY(-120deg) scale(.4)}}
@media (prefers-reduced-motion:no-preference){.menu-cube{transition:transform .46s cubic-bezier(.22,.85,.25,1)}}
.no-motion.in-game .float,.no-motion body::before{animation:none!important}
html.awaiting #app{visibility:hidden}
html.awaiting body::before,html.awaiting .float{animation:none;opacity:0}
/* A game hub takes over the landing layout. Keep only the game task and its own links. */
.hub-open #stage,.hub-open #menus{display:none!important}
.hub-open:not([data-hub-game="halo"]) #room,.embedded .hub-open #room{display:none!important}
.hub-open #page{width:100%;max-width:720px;margin:0 auto;padding:20px 16px 32px;flex:1 0 auto}
.embedded .hub-open #page{flex:1 1 auto}
.hub-open .face{gap:16px}
.hub-top{display:flex;align-items:center;gap:20px;min-width:0;padding-bottom:16px;border-bottom:1px solid var(--line)}
.hub-back{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;flex:none;min-width:64px;min-height:44px;padding:0;color:var(--soft);font:600 14px var(--body);text-align:left}
.hub-back svg,.hub-link svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (hover:hover) and (pointer:fine){.hub-back:hover,.hub-link:hover{color:var(--text)}}
.hub-heading{display:flex;align-items:center;gap:12px;min-width:0}
.hub-heading>div{min-width:0;flex:1}
.hub-heading h2{margin:0 0 3px;font:700 28px/1.2 var(--display);overflow-wrap:anywhere}
.hub-heading p{margin:0;color:var(--muted);font-size:13px}
.hub-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.42fr);align-items:start;gap:24px;margin-top:20px}
.hub-play{display:grid;gap:14px;padding:20px;border:1px solid var(--glass-edge);border-radius:16px;background:var(--glass)}
.hub-play h3{margin:0;color:var(--soft);font:600 14px var(--body)}
.hub-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:4px}
.hub-fields label{display:grid;gap:6px;min-width:0;color:var(--soft);font-size:13px}
.hub-fields select{width:100%;min-width:0;min-height:48px;padding:10px 12px;border:1px solid var(--glass-edge);border-radius:12px;background:var(--panel);color:var(--text);font:400 16px var(--body)}
.hub-fields select:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.hub-note{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.hub-actions{display:flex;gap:10px;padding-top:2px}
.hub-actions button{width:100%;min-height:48px}
.hub-secondary{display:grid;gap:0;padding:8px 0}
.hub-link{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:52px;padding:0 2px;color:var(--soft);border-bottom:1px solid var(--line);font:600 14px var(--body);text-align:left}
.hub-link svg{color:var(--muted)}
@media(max-width:700px){.hub-layout{grid-template-columns:1fr;gap:12px}.hub-play{padding:16px}.hub-secondary{padding:0}}
@media(max-width:420px){.hub-fields{grid-template-columns:1fr}.hub-open #page{padding-top:12px}.hub-heading h2{font-size:24px}}
/* The Halo screen uses source UI art and proportions from the original 640x480 multiplayer menu. */
body.hub-open[data-hub-game="halo"]{overflow:hidden;background:#02050a url("assets/halo-menu/ui/menu-background.png") center/cover no-repeat;color:#d7eaff}
body.hub-open[data-hub-game="halo"] #room,body.hub-open[data-hub-game="halo"] #app>header{display:none!important}
body.hub-open[data-hub-game="halo"] #app{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;min-height:0;margin:0;padding:0;display:grid;place-items:center;overflow:hidden;background:transparent}
body.hub-open[data-hub-game="halo"] #page{width:100%;height:100%;max-width:none;min-height:0;margin:0;padding:0;overflow:hidden;flex:none}
body.hub-open[data-hub-game="halo"] #page>.face{display:block;position:relative;width:100%;height:100%;inset:auto;transform:none;animation:none;perspective:none}
body.hub-open[data-hub-game="halo"] .halo-screen{--halo-font-scale:1.5;container-type:inline-size;position:relative;display:grid;grid-template-rows:14.5833% minmax(0,70.625%) 14.7917%;gap:0;width:min(960px,100vw,calc(100dvh * 4 / 3));aspect-ratio:4/3;margin:auto;padding:0;overflow:hidden;color:#d7eaff;background:url("assets/halo-menu/ui/gradient.png") center/100% 100% no-repeat,url("assets/halo-menu/ui/menu-background.png") center/cover no-repeat}
body.hub-open[data-hub-game="halo"] .halo-heading{position:relative;display:flex;align-items:flex-start;min-width:0;margin:0;padding:1.71875cqw 0 0 5.46875cqw;border:0}
body.hub-open[data-hub-game="halo"] .halo-heading::after{content:"";position:absolute;right:0;bottom:0;left:0;border-bottom:1px solid #2784c3}
body.hub-open[data-hub-game="halo"] .halo-header-art{position:relative;display:block;flex:none;width:41.09375cqw;height:9.21875cqw;overflow:hidden}
body.hub-open[data-hub-game="halo"] .halo-header-gametype{width:57.96875cqw}
body.hub-open[data-hub-game="halo"] .halo-header-map{width:47.8125cqw}
body.hub-open[data-hub-game="halo"] .halo-header-art img{position:absolute;left:0;top:0;display:block;width:80cqw;height:10cqw;max-width:none;object-fit:fill}
body.hub-open[data-hub-game="halo"] .halo-body{display:grid;grid-template-columns:36.25cqw 50cqw;align-items:start;gap:0;min-width:0;min-height:0;padding:1.25cqw 7.03125cqw 1.25cqw 7.96875cqw}
body.hub-open[data-hub-game="halo"] .halo-options{position:relative;z-index:1;display:grid;align-content:start;gap:0;min-width:0;padding-top:0}
body.hub-open[data-hub-game="halo"] .halo-option{position:relative;display:flex;align-items:center;width:36.25cqw;min-width:0;min-height:max(44px,5cqw);padding:0 2cqw;border:0;border-radius:0;background:transparent url("assets/halo-menu/ui/row.png") left top/110.3448% 100% no-repeat;color:#2896ff;text-align:left;cursor:pointer}
body.hub-open[data-hub-game="halo"] .halo-option:focus,body.hub-open[data-hub-game="halo"] .halo-option:focus-visible,body.hub-open[data-hub-game="halo"] .halo-option[aria-current="page"],body.hub-open[data-hub-game="halo"] .halo-option[aria-pressed="true"]{background-image:url("assets/halo-menu/ui/row-selected.png");color:#fff}
body.hub-open[data-hub-game="halo"] .halo-options>.halo-option:first-child:focus,body.hub-open[data-hub-game="halo"] .halo-options>.halo-option:first-child:focus-visible{background-image:url("assets/halo-menu/ui/row-top-selected.png");color:#fff}
body.hub-open[data-hub-game="halo"] .halo-option:disabled{opacity:.55;cursor:default}
body.hub-open[data-hub-game="halo"] .halo-text{display:block;max-width:100%;color:inherit;line-height:1.1;text-shadow:none}
body.hub-open[data-hub-game="halo"] .halo-community-links{display:contents}
body.hub-open[data-hub-game="halo"] .halo-details{align-self:start;justify-self:start;display:grid;grid-template-rows:auto minmax(0,1fr);align-content:start;gap:1cqw;width:50cqw;height:50.3125cqw;min-width:0;min-height:0;margin-left:-1.25cqw;padding:.6cqw 2cqw;background:url("assets/halo-menu/ui/list-field.png") left top/160% 159.0062% no-repeat}
body.hub-open[data-hub-game="halo"] .halo-match-preview{display:grid;grid-template-columns:82px minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-content:start;align-items:center;gap:2px 8px;min-width:0;min-height:0}
body.hub-open[data-hub-game="halo"] .halo-map-art{position:relative;width:85%;max-width:268px;aspect-ratio:140/114;margin:0;overflow:hidden;border:1px solid rgba(60,150,226,.7)}
body.hub-open[data-hub-game="halo"] .halo-match-preview>.halo-map-art{grid-column:1;grid-row:1;position:relative;width:82px;max-width:none;aspect-ratio:140/114;margin:0;overflow:hidden}
body.hub-open[data-hub-game="halo"] .halo-match-preview .halo-context-art{aspect-ratio:307/244}
body.hub-open[data-hub-game="halo"] .halo-match-preview .halo-context-art img{width:166.77524%}
body.hub-open[data-hub-game="halo"] .halo-map-art img{position:absolute;left:0;top:0;width:182.857142857%;height:auto;max-width:none;object-fit:initial}
body.hub-open[data-hub-game="halo"] .halo-match-copy{grid-column:2;grid-row:1;display:grid;grid-template-rows:auto auto 1fr;align-content:center;gap:2px;min-width:0;min-height:0}
body.hub-open[data-hub-game="halo"] .halo-match-copy h3,body.hub-open[data-hub-game="halo"] .halo-match-copy p{max-width:100%;min-width:0;margin:0;color:#2896ff;overflow-wrap:anywhere}
body.hub-open[data-hub-game="halo"] .halo-match-copy .halo-mode-name{color:#2896ff}
body.hub-open[data-hub-game="halo"] .halo-match-copy .halo-description{align-self:start;line-height:1.15}
body.hub-open[data-hub-game="halo"] .halo-roster{display:grid;grid-template-rows:auto minmax(0,1fr);gap:2px;min-width:0;min-height:0}
body.hub-open[data-hub-game="halo"] .halo-roster h3{margin:0;color:#2896ff}
body.hub-open[data-hub-game="halo"] .halo-roster-list{display:grid;align-content:start;gap:0;min-width:0;min-height:0;overflow-y:auto}
body.hub-open[data-hub-game="halo"] .halo-roster-list>.halo-player{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1cqw;min-width:0;padding:.75cqw 0;border-bottom:1px solid rgba(40,150,255,.55)}
body.hub-open[data-hub-game="halo"] .halo-roster-list .halo-player h4,body.hub-open[data-hub-game="halo"] .halo-roster-list .halo-player p{margin:0;color:#2896ff;overflow-wrap:anywhere}
body.hub-open[data-hub-game="halo"] .halo-roster-list .halo-player h4{color:#fff}
body.hub-open[data-hub-game="halo"] .halo-roster-list .halo-player .halo-option{width:auto;min-width:64px;min-height:44px;padding:0 8px}
body.hub-open[data-hub-game="halo"] .halo-roster-list>p{margin:0;color:#2896ff}
body.hub-open[data-hub-game="halo"] .halo-footer{position:relative;display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:44px;padding:0 9.8% 0 8%;border:0}
body.hub-open[data-hub-game="halo"] .halo-footer::before{content:"";position:absolute;top:0;right:0;left:0;border-top:1px solid #2784c3}
body.hub-open[data-hub-game="halo"] .halo-back{display:inline-flex;align-items:center;gap:4px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;color:#2797ed;cursor:pointer}
body.hub-open[data-hub-game="halo"] .halo-button-art{display:block;flex:none;width:32px;height:32px;overflow:hidden}
body.hub-open[data-hub-game="halo"] .halo-button-art img{display:block;width:32px;height:32px;max-width:none}
body.hub-open[data-hub-game="halo"] .halo-back:focus-visible{color:#f4f9ff}@media (hover:hover) and (pointer:fine){body.hub-open[data-hub-game="halo"] .halo-back:hover{color:#f4f9ff}}
body.hub-open[data-hub-game="halo"] .halo-back:focus-visible{outline:2px solid #7fc6ff;outline-offset:1px}
body.hub-open[data-hub-game="halo"] .halo-identity{display:flex;align-items:center;gap:8px;min-height:44px;color:#d7eaff}
body.hub-open[data-hub-game="halo"] .halo-carousel{--halo-card-width:25.46875cqw;display:flex;align-items:center;gap:.625cqw;width:100%;height:100%;max-width:100%;max-height:100%;min-width:0;min-height:0;overflow-x:auto;overflow-y:hidden;padding:0 calc((100% - var(--halo-card-width))/2);scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:#347dc0 transparent}
body.hub-open[data-hub-game="halo"] .halo-map-card{position:relative;display:block;flex:0 0 var(--halo-card-width);width:var(--halo-card-width);min-height:0;aspect-ratio:163/326;padding:0;overflow:hidden;scroll-snap-align:center;border:0;border-radius:0;background:transparent url("assets/halo-menu/ui/card.png") left top/157.0552% 157.0552% no-repeat;color:#2896ff;text-align:left;cursor:pointer}
body.hub-open[data-hub-game="halo"] .halo-map-card[aria-selected="true"],body.hub-open[data-hub-game="halo"] .halo-map-card[aria-pressed="true"],body.hub-open[data-hub-game="halo"] .halo-map-card:focus-visible{background-image:url("assets/halo-menu/ui/card-selected.png");color:#fff}@media (hover:hover) and (pointer:fine){body.hub-open[data-hub-game="halo"] .halo-map-card:hover{background-image:url("assets/halo-menu/ui/card-selected.png");color:#fff}}
body.hub-open[data-hub-game="halo"] .halo-map-card .halo-map-art{position:absolute;left:7.97546%;top:3.68098%;width:85.88957%;max-width:none;aspect-ratio:140/114}
body.hub-open[data-hub-game="halo"] .halo-map-card h3,body.hub-open[data-hub-game="halo"] .halo-map-card p{position:absolute;left:6.74847%;width:88.34356%;margin:0;overflow:hidden;color:inherit;text-align:left;line-height:1.1}
body.hub-open[data-hub-game="halo"] .halo-map-card h3{top:39.57055%;height:13.19018%}
body.hub-open[data-hub-game="halo"] .halo-map-card p{top:56.13497%;height:41.71779%;line-height:1.05}
body.hub-open[data-hub-game="halo"] .halo-community{align-self:start;display:grid;align-content:start;gap:0;min-width:0;min-height:0;max-height:100%;overflow-y:auto;padding:1.3% 8%;color:#d7eaff}
body.hub-open[data-hub-game="halo"] .halo-community h3{margin:0 0 4%;color:#2896ff}
body.hub-open[data-hub-game="halo"] .halo-player{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1cqw;min-width:0;padding:.75cqw 0;border-bottom:1px solid rgba(39,151,237,.55)}
body.hub-open[data-hub-game="halo"] .halo-player h4,body.hub-open[data-hub-game="halo"] .halo-player p{margin:0;color:#d7eaff;overflow-wrap:anywhere}
body.hub-open[data-hub-game="halo"] .halo-player p{color:#2896ff}
body.hub-open[data-hub-game="halo"] .halo-player .halo-option{width:min(36.25cqw,100%)}
body.hub-open[data-hub-game="halo"] .halo-scores{display:block;max-width:100%;overflow:auto;border-collapse:collapse;color:#d7eaff}
body.hub-open[data-hub-game="halo"] .halo-scores th,body.hub-open[data-hub-game="halo"] .halo-scores td{padding:.75cqw 1cqw;border-bottom:1px solid rgba(39,151,237,.55);color:inherit;text-align:left;white-space:nowrap}
body.hub-open[data-hub-game="halo"] .halo-scores th{color:#2896ff}
@media(max-width:700px) and (orientation:portrait){
  body.hub-open[data-hub-game="halo"] .halo-screen{--halo-font-scale:1.35;width:100vw;height:100dvh;min-height:100svh;aspect-ratio:auto;grid-template-rows:12% minmax(0,1fr) 10%;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  body.hub-open[data-hub-game="halo"] .halo-heading{padding:2cqw 0 0 3cqw}
  body.hub-open[data-hub-game="halo"] .halo-header-art{width:65.75cqw;height:14.75cqw}
  body.hub-open[data-hub-game="halo"] .halo-header-gametype{width:92.75cqw}
  body.hub-open[data-hub-game="halo"] .halo-header-map{width:76.5cqw}
  body.hub-open[data-hub-game="halo"] .halo-header-art img{width:128cqw;height:16cqw}
  body.hub-open[data-hub-game="halo"] .halo-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);align-content:start;align-items:start;gap:12px;padding:12px 20px}
  body.hub-open[data-hub-game="halo"] .halo-options{width:100%}
  body.hub-open[data-hub-game="halo"] .halo-option{width:100%;min-height:48px;padding:0 4px;white-space:nowrap}
  body.hub-open[data-hub-game="halo"] .halo-details{grid-template-rows:auto minmax(0,1fr);gap:8px;width:100%;height:100%;min-height:0;margin:0;padding:8px 12px;background-size:160% 159.0062%}
  body.hub-open[data-hub-game="halo"] .halo-match-preview{grid-template-columns:82px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:2px 8px}
  body.hub-open[data-hub-game="halo"] .halo-match-preview>.halo-map-art{grid-column:1;grid-row:1;width:82px;max-width:none;align-self:center}
  body.hub-open[data-hub-game="halo"] .halo-match-copy{grid-template-rows:auto auto 1fr;align-content:center;gap:2px}
  body.hub-open[data-hub-game="halo"] .halo-roster{gap:4px}
  body.hub-open[data-hub-game="halo"] .halo-roster-list{max-height:100%}
  body.hub-open[data-hub-game="halo"] .halo-roster-list .halo-player .halo-option{width:auto;min-width:64px;min-height:48px}
  body.hub-open[data-hub-game="halo"] .halo-footer{padding:0 5%}
  body.hub-open[data-hub-game="halo"] .halo-carousel{--halo-card-width:clamp(164px,54cqw,220px);align-items:center;padding:0 calc((100% - var(--halo-card-width))/2)}
  body.hub-open[data-hub-game="halo"] .halo-community{padding:3cqw 6cqw}
}
@media(max-width:380px) and (orientation:portrait){
  body.hub-open[data-hub-game="halo"] .halo-screen{--halo-font-scale:1.25}
  body.hub-open[data-hub-game="halo"] .halo-body{grid-template-columns:minmax(0,1fr);padding-right:12px;padding-left:12px}
}

/* Wrapping: balanced titles and tidy last lines in the platform shell. */
:is(h1,h2,h3,h4,.hub-heading,.codex-heading,.codex-title,.halo-heading,.achievement-title){text-wrap:balance}
:is(p,.hub-note,.codex-note,.halo-description,.halo-match-copy){text-wrap:pretty}
