@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&family=Silkscreen:wght@400;700&display=swap');

:root {
  color-scheme: dark;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  color: #f6f3ff;
  background: #0d0a15;
  font-synthesis: none;
  --ink: #f6f3ff;
  --muted: #a7a0b8;
  --panel: rgba(29, 24, 43, .88);
  --line: rgba(255,255,255,.12);
  --purple: #8b5cf6;
  --violet: #a675ff;
  --lime: #c8ff50;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #0d0a15; }
button, input { font: inherit; }
button { cursor: pointer; }

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 76% 20%, rgba(139,92,246,.18), transparent 30%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(to bottom, black 65%, transparent);
}

.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(330px,440px); grid-template-rows: auto 1fr auto; gap: 0 8vw; padding: 30px clamp(24px,6vw,96px); position: relative; overflow: hidden; }
.shell::after { content:""; position:absolute; width:460px; height:460px; border:1px solid rgba(200,255,80,.12); transform:rotate(45deg); right:-260px; bottom:-220px; }
.brandbar { grid-column: 1/-1; display:flex; justify-content:space-between; align-items:center; }
.brand { display:flex; align-items:center; width:clamp(170px,18vw,270px); text-decoration:none; }
.brand img { display:block; width:100%; height:auto; filter:drop-shadow(0 9px 18px rgba(0,0,0,.34)); transition:transform .18s ease, filter .18s ease; }
.brand:hover img { transform:translateY(-1px) scale(1.015); filter:drop-shadow(0 11px 22px rgba(139,92,246,.28)); }
.status-pill { font:500 10px Silkscreen; color:var(--muted); letter-spacing:.08em; border:1px solid var(--line); padding:9px 12px; border-radius:999px; background:rgba(13,10,21,.7); }
.status-pill i { display:inline-block; width:6px; height:6px; margin-right:7px; border-radius:50%; background:#58f59a; box-shadow:0 0 10px #58f59a; }

.hero { align-self:center; padding:70px 0; position:relative; z-index:1; }
.eyebrow { color:var(--lime); font:500 11px Silkscreen; letter-spacing:.18em; margin-bottom:22px; }
.eyebrow span { font-size:8px; margin-right:8px; }
h1 { font:400 clamp(64px,8vw,126px)/.83 Silkscreen, Impact, sans-serif; letter-spacing:-.07em; margin:0; }
h1 em { color:transparent; -webkit-text-stroke:2px var(--violet); font-style:normal; filter:drop-shadow(0 0 20px rgba(139,92,246,.2)); }
.hero p { color:var(--muted); line-height:1.65; margin:28px 0 0; font-size:clamp(14px,1.4vw,17px); }

.play-card { align-self:center; background:linear-gradient(150deg, rgba(35,28,52,.96), rgba(20,16,31,.97)); border:1px solid rgba(166,117,255,.24); border-radius:8px; padding:32px; box-shadow:0 28px 80px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.04); position:relative; z-index:2; }
.play-card::before { content:""; position:absolute; left:22px; right:22px; top:0; height:1px; background:linear-gradient(90deg,transparent,var(--violet),transparent); }
.card-kicker { font:500 11px Silkscreen; color:var(--violet); letter-spacing:.18em; margin-bottom:28px; }
label { display:block; font:500 10px Silkscreen; color:#b6afc4; letter-spacing:.14em; margin:0 0 9px; }
input { width:100%; min-width:0; background:#110e1b; border:1px solid var(--line); color:var(--ink); border-radius:5px; padding:14px 15px; outline:none; transition:.2s; }
input:focus { border-color:var(--violet); box-shadow:0 0 0 3px rgba(139,92,246,.12); }
.primary { width:100%; margin-top:13px; padding:15px; border:0; border-radius:5px; color:#0d0916; background:linear-gradient(100deg,var(--violet),#c99bff); font-weight:800; letter-spacing:.04em; box-shadow:0 10px 26px rgba(139,92,246,.24); }
.primary span { float:right; }
.primary:hover { filter:brightness(1.1); transform:translateY(-1px); }
.or { display:flex; align-items:center; gap:12px; color:#706b7d; font:500 9px Silkscreen; letter-spacing:.15em; margin:24px 0 17px; }
.or span { height:1px; flex:1; background:var(--line); }
.join-row { display:grid; grid-template-columns:1fr auto; gap:9px; }
.join-row input { font:500 14px Silkscreen; letter-spacing:.16em; text-transform:uppercase; }
.secondary { border:1px solid rgba(200,255,80,.5); border-radius:5px; background:rgba(200,255,80,.06); color:var(--lime); font-weight:800; padding:0 22px; }
.secondary:hover { background:var(--lime); color:#10140a; }

footer { grid-column:1/-1; align-self:end; display:flex; align-items:center; gap:24px; color:#746e82; font:500 10px Silkscreen; letter-spacing:.08em; padding-top:20px; }
footer span { white-space:nowrap; }
footer b { color:var(--violet); font-weight:500; margin-right:7px; }
footer i { width:32px; height:1px; background:var(--line); }

@media (max-width: 860px) {
  .shell { grid-template-columns:1fr; grid-template-rows:auto auto auto auto; gap:0; }
  .brandbar, footer { grid-column:1; }
  .hero { padding:70px 0 45px; }
  h1 { font-size:clamp(58px,17vw,96px); }
  .play-card { width:100%; max-width:520px; justify-self:center; }
  footer { justify-content:center; flex-wrap:wrap; padding:55px 0 8px; }
}

@media (max-width: 520px) {
  .shell { padding:22px 18px; }
  .hero { padding-top:56px; }
  h1 { font-size:16vw; }
  .hero p br { display:none; }
  .play-card { padding:24px 20px; }
  footer i { display:none; }
  footer { gap:13px; justify-content:flex-start; }
  .brand { width:160px; }
}

/* Main arcade menu */
.menu-home { min-height:100vh; position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-rows:auto 1fr auto; padding:24px clamp(22px,5vw,78px) 18px; background:radial-gradient(circle at 72% 44%,rgba(77,197,228,.2),transparent 31%), radial-gradient(circle at 20% 72%,rgba(139,92,246,.16),transparent 34%), linear-gradient(135deg,#17243a 0%,#101726 52%,#0a0e19 100%); }
.menu-home::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(120deg,transparent 0 47%,rgba(255,255,255,.025) 47% 48%,transparent 48% 100%), linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size:auto,48px 48px,48px 48px; mask-image:linear-gradient(to bottom,#000,transparent 90%); }
.menu-home::after { content:""; position:absolute; z-index:-1; width:520px; height:520px; right:-120px; top:12%; border:80px solid rgba(255,255,255,.018); border-radius:50%; box-shadow:0 0 0 42px rgba(255,255,255,.012),0 0 0 100px rgba(255,255,255,.009); }
.menu-header { width:min(1320px,100%); margin:0 auto; display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:18px; position:relative; z-index:5; }
.menu-header .brand { width:clamp(210px,19vw,290px); }
.player-profile { margin:0; min-width:235px; display:flex; align-items:center; gap:10px; padding:7px 14px 7px 8px; border:2px solid rgba(255,255,255,.13); background:rgba(8,12,23,.72); box-shadow:5px 5px 0 rgba(0,0,0,.28); cursor:text; transform:skew(-4deg); }
.profile-avatar { display:grid; place-items:center; width:48px; height:48px; flex:0 0 auto; color:#11131c; background:linear-gradient(#d8ff74,#8dd52e); border:3px solid #11131d; box-shadow:inset 0 0 0 3px #b7f34d; font:500 24px Silkscreen; transform:skew(4deg); }
.profile-copy { display:grid; gap:1px; flex:1; transform:skew(4deg); }
.profile-copy small { color:#807a91; font:500 8px Silkscreen; letter-spacing:.18em; }
.profile-copy input { width:150px; padding:2px 0; color:#fff; background:transparent; border:0; box-shadow:none; border-radius:0; font:800 16px "Pixelify Sans"; }
.profile-copy input:focus { box-shadow:none; }
.menu-stage { width:min(1280px,100%); margin:0 auto; display:grid; grid-template-columns:minmax(430px,.92fr) minmax(430px,1.08fr); align-items:center; min-height:0; position:relative; }
.menu-options { position:relative; z-index:3; padding:35px 0 32px; }
.menu-kicker { margin-bottom:15px; color:var(--lime); font:500 10px Silkscreen; letter-spacing:.2em; }
.menu-kicker span { margin-right:8px; }
.battle-logo { width:min(500px,100%); margin:-2px 0 38px; position:relative; display:grid; justify-items:center; transform:rotate(-2deg); filter:drop-shadow(8px 10px 0 rgba(0,0,0,.38)); animation:battleLogoFloat 2.8s ease-in-out infinite; }
.battle-logo::before,.battle-logo::after { content:"◆"; position:absolute; top:45%; color:var(--lime); font:700 17px Silkscreen; text-shadow:3px 3px 0 #11131d; animation:battleSpark 1.35s ease-in-out infinite; }
.battle-logo::before { left:-4px; transform:rotate(-12deg); }
.battle-logo::after { right:-4px; transform:rotate(12deg); }
.battle-logo > span { position:relative; z-index:2; margin-bottom:-8px; padding:5px 21px 4px; color:#f8f5ff; border:3px solid #0b0d17; background:linear-gradient(#8d73d5,#513b91); box-shadow:inset 0 3px 0 rgba(255,255,255,.25),4px 5px 0 #090b11; font:700 clamp(14px,2vw,22px)/1 Silkscreen; letter-spacing:.08em; transform:skew(-8deg); }
.battle-logo > strong { position:relative; z-index:1; color:#ffb13b; font:700 clamp(48px,6.3vw,83px)/.9 Silkscreen; letter-spacing:-.08em; -webkit-text-stroke:5px #17101c; paint-order:stroke fill; text-shadow:0 5px 0 #c74d2c,0 10px 0 #651f2b,6px 14px 0 #090b11; animation:battleGlow 1.8s ease-in-out infinite; }
.battle-logo > em { position:relative; z-index:3; margin-top:3px; width:78%; padding:7px 13px; color:#17200e; border:3px solid #11151c; background:linear-gradient(180deg,#dfff73,#8dcc32); box-shadow:inset 0 3px 0 rgba(255,255,255,.34),4px 5px 0 #090b11; font:700 clamp(8px,1.3vw,12px)/1 Silkscreen; font-style:normal; letter-spacing:.08em; text-align:center; transform:skew(-7deg); }
@keyframes battleLogoFloat { 0%,100% { transform:rotate(-2deg) translateY(0) scale(1); } 48% { transform:rotate(-.5deg) translateY(-7px) scale(1.018); } 56% { transform:rotate(-1deg) translateY(-6px) scale(1.012); } }
@keyframes battleGlow { 0%,100% { filter:brightness(1); text-shadow:0 5px 0 #c74d2c,0 10px 0 #651f2b,6px 14px 0 #090b11; } 50% { filter:brightness(1.18); text-shadow:0 5px 0 #e05c2f,0 10px 0 #762331,6px 14px 0 #090b11,0 0 12px rgba(255,194,61,.72),0 0 24px rgba(255,115,43,.38); } }
@keyframes battleSpark { 0%,100% { opacity:.4; filter:brightness(.85); } 50% { opacity:1; filter:brightness(1.65) drop-shadow(0 0 7px rgba(200,255,80,.7)); } }
.arcade-menu-form { width:min(480px,100%); display:grid; gap:20px; }
.arcade-action { width:95%; min-height:88px; margin-left:12px; padding:0 22px 0 28px; display:flex; justify-content:space-between; align-items:center; color:#17101a; border:4px solid #251321; border-radius:15px; background:linear-gradient(180deg,#ffc44f 0%,#ff942c 48%,#f36a2d 100%); box-shadow:inset 0 5px 0 rgba(255,255,255,.45),inset 0 -7px 0 rgba(138,42,28,.35),8px 10px 0 rgba(0,0,0,.34); transform:rotate(-2deg) skew(-4deg); transition:transform .15s ease,filter .15s ease; }
.arcade-action:hover { filter:brightness(1.08); transform:rotate(-1deg) skew(-4deg) translateY(-3px); }
.arcade-action > span { display:grid; text-align:left; font:400 clamp(22px,3vw,33px)/1 Silkscreen; letter-spacing:-.04em; transform:skew(4deg); }
.arcade-action small { margin-bottom:5px; color:#8a351f; font:700 9px Silkscreen; letter-spacing:.13em; }
.arcade-action b { display:grid; place-items:center; width:43px; height:43px; border:3px solid #251321; background:#fff0a3; font-size:20px; transform:skew(4deg); }
.join-room-action { width:92%; margin-left:38px; padding:13px 14px 16px; border:4px solid #10200b; border-radius:13px; background:linear-gradient(180deg,#9be34a,#4fae27); box-shadow:inset 0 4px 0 rgba(255,255,255,.3),inset 0 -6px 0 rgba(27,91,23,.35),7px 9px 0 rgba(0,0,0,.32); transform:rotate(1.5deg) skew(-3deg); }
.join-room-action > label { margin:0 0 8px 5px; color:#18300f; font:800 9px Silkscreen; letter-spacing:.13em; transform:skew(3deg); }
.menu-code-row { display:grid; grid-template-columns:1fr auto; gap:8px; transform:skew(3deg); }
.menu-code-row input { padding:13px 14px; border:3px solid #172016; background:#0c1511; color:#f7fff1; font:500 13px Silkscreen; letter-spacing:.13em; text-transform:uppercase; }
.menu-code-row button { min-width:120px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 13px; border:3px solid #10200b; background:#d9ff75; color:#14200d; font:900 12px "Pixelify Sans"; }
.menu-code-row button b { font-size:11px; }
.how-to-play-action { width:84%; min-height:52px; margin:-4px 0 0 48px; padding:8px 13px 8px 18px; display:flex; align-items:center; justify-content:space-between; color:#e8ddff; border:3px solid #251d38; border-radius:9px; background:linear-gradient(180deg,#553c83,#30234e); box-shadow:inset 0 3px 0 rgba(255,255,255,.13),5px 7px 0 rgba(0,0,0,.28); transform:rotate(-1deg); transition:transform .15s ease,filter .15s ease,border-color .15s ease; }
.how-to-play-action:hover,.how-to-play-action:focus-visible { filter:brightness(1.14); border-color:#a675ff; transform:rotate(0) translateY(-2px); }
.how-to-play-action > span { display:grid; gap:3px; text-align:left; font:500 14px Silkscreen; }
.how-to-play-action small { color:#b5a1da; font:500 7px Silkscreen; letter-spacing:.13em; }
.how-to-play-action b { width:30px; height:30px; display:grid; place-items:center; color:#14200d; border:2px solid #14101e; background:var(--lime); box-shadow:inset 0 -3px 0 rgba(71,99,16,.25); font:700 16px Silkscreen; }
.menu-error { margin:0 0 -18px 30px; }
.menu-hero-art { min-height:570px; position:relative; display:grid; place-items:center; align-self:end; }
.menu-hero-art canvas { width:min(100%,500px); height:auto; position:relative; z-index:2; image-rendering:pixelated; filter:drop-shadow(0 25px 22px rgba(0,0,0,.35)); }
.hero-burst { position:absolute; z-index:0; width:min(39vw,510px); aspect-ratio:1; border-radius:50%; background:repeating-conic-gradient(from -12deg,rgba(166,117,255,.18) 0 9deg,transparent 9deg 20deg); mask-image:radial-gradient(circle,#000 0 55%,transparent 72%); animation:menuBurstSpin 35s linear infinite; }
.arena-rank { position:absolute; z-index:3; right:2%; top:12%; display:grid; grid-template-columns:auto 1fr; column-gap:10px; min-width:170px; padding:10px 15px; border:3px solid #10131f; background:rgba(27,37,57,.92); box-shadow:6px 6px 0 rgba(0,0,0,.3); transform:rotate(2deg); }
.arena-rank > span { grid-row:1/3; display:grid; place-items:center; width:42px; color:#11131d; background:var(--lime); font-size:22px; }
.arena-rank small { color:#8992a7; font:500 8px Silkscreen; letter-spacing:.16em; }
.arena-rank b { font:400 17px Silkscreen; }
.player-count { position:absolute; z-index:3; right:3%; bottom:8%; display:flex; align-items:center; gap:10px; padding:9px 15px; border-left:5px solid var(--lime); background:rgba(8,12,22,.88); box-shadow:5px 5px 0 rgba(0,0,0,.3); }
.player-count > b { color:var(--lime); font:400 38px Silkscreen; }
.player-count > span { color:#fff; font:800 12px/1.1 "Pixelify Sans"; }
.player-count small { color:#798296; font:500 7px Silkscreen; letter-spacing:.08em; }
.menu-footer { width:min(1280px,100%); margin:0 auto; display:flex; justify-content:center; align-items:center; gap:24px; padding:12px 20px; border-top:3px solid #506f32; background:rgba(6,9,17,.62); color:#81899c; font:500 9px Silkscreen; letter-spacing:.09em; }
.menu-footer b { color:#d9ff75; }
.menu-footer i { width:4px; height:4px; background:#4b5364; transform:rotate(45deg); }

/* O guia usa <dialog>: foco, Esc e leitura assistiva ficam por conta do navegador. */
.gameplay-guide-dialog { width:min(1320px,calc(100vw - 32px)); max-width:none; max-height:92vh; margin:auto; padding:0; overflow:visible; color:inherit; border:0; background:transparent; }
.gameplay-guide-dialog::backdrop { background:rgba(4,5,11,.83); backdrop-filter:blur(7px); }
.gameplay-guide-dialog[open] { animation:guideDialogIn .24s cubic-bezier(.16,1,.3,1) both; }
.gameplay-guide { width:100%; max-height:92vh; margin:0; padding:clamp(25px,4vw,50px); position:relative; overflow-x:hidden; overflow-y:auto; border:1px solid rgba(166,117,255,.38); border-radius:12px; background:linear-gradient(145deg,rgba(27,22,42,.99),rgba(11,14,25,.995)); box-shadow:0 28px 80px rgba(0,0,0,.58),inset 0 1px rgba(255,255,255,.04); }
.gameplay-guide::before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(135deg,#000,transparent 75%); }
.guide-close { position:absolute; z-index:3; top:18px; right:18px; width:42px; height:42px; display:grid; place-items:center; padding:0; color:#e8ddff; border:2px solid #5a496e; border-radius:5px; background:#21182f; font:400 24px/1 Silkscreen; transition:color .15s ease,border-color .15s ease,background .15s ease,transform .15s ease; }
.guide-close:hover,.guide-close:focus-visible { color:#17200f; border-color:var(--lime); background:var(--lime); transform:scale(1.06); outline:none; }
@keyframes guideDialogIn { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:none; } }
.guide-heading,.guide-basics,.powerup-heading,.powerup-grid { position:relative; z-index:1; }
.guide-heading { max-width:760px; }
.guide-heading > span,.powerup-heading > div > span { color:var(--lime); font:500 9px Silkscreen; letter-spacing:.17em; }
.guide-heading h2 { margin:10px 0 14px; color:#fff; font:400 clamp(34px,5vw,62px)/.95 Silkscreen; letter-spacing:-.06em; text-shadow:5px 6px 0 rgba(0,0,0,.34); }
.guide-heading p,.powerup-heading > p { margin:0; color:#aaa3b8; font-size:15px; line-height:1.55; }
.guide-basics { margin:32px 0 44px; display:grid; grid-template-columns:minmax(260px,.8fr) minmax(450px,1.2fr); gap:20px; }
.guide-goal { display:flex; gap:16px; align-items:center; padding:19px; border-left:4px solid var(--lime); background:rgba(200,255,80,.07); }
.guide-goal > span { width:46px; height:46px; flex:0 0 auto; display:grid; place-items:center; color:#15200b; background:var(--lime); font-size:22px; box-shadow:4px 4px 0 #080b10; }
.guide-goal h3 { margin:0 0 7px; color:#e9ffb5; font:500 12px Silkscreen; }
.guide-goal p { margin:0; color:#a6ad9a; font-size:13px; line-height:1.45; }
.control-list { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.control-list li { min-width:0; display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid rgba(255,255,255,.1); background:rgba(7,9,17,.62); color:#b9b3c5; font-size:13px; }
.control-keys { min-width:126px; display:flex; align-items:center; gap:5px; }
.key-separator { color:#696276; font:500 7px Silkscreen; }
.powerup-heading { display:flex; align-items:end; justify-content:space-between; gap:30px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid rgba(255,255,255,.1); }
.powerup-heading h3 { margin:8px 0 0; font:400 clamp(20px,2.5vw,30px) Silkscreen; }
.powerup-heading > p { max-width:570px; font-size:13px; text-align:right; }
.powerup-grid { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.powerup-card { min-width:0; display:grid; grid-template-columns:44px minmax(0,1fr); align-content:start; gap:10px; padding:14px 12px; border:1px solid rgba(166,117,255,.17); background:linear-gradient(145deg,rgba(44,34,65,.72),rgba(15,13,24,.72)); transition:transform .16s ease,border-color .16s ease,background .16s ease; }
.powerup-card:hover { transform:translateY(-3px); border-color:rgba(200,255,80,.48); background:linear-gradient(145deg,rgba(55,43,78,.82),rgba(18,16,27,.82)); }
.powerup-icon { width:40px; height:40px; image-rendering:pixelated; image-rendering:crisp-edges; }
.powerup-card strong { display:block; min-height:25px; color:#f0ebf7; font:500 9px/1.4 Silkscreen; }
.powerup-card p { min-height:58px; margin:7px 0 12px; color:#938c9f; font-size:11px; line-height:1.45; }
.powerup-use { display:block; color:#cfe6a1; font-size:10px; line-height:1.4; }
.powerup-use kbd { margin-right:5px; color:#15110b; border-color:#e7ffaf; background:var(--lime); }
@keyframes menuBurstSpin { to { transform:rotate(360deg); } }

.menu-intro { position:fixed; inset:0; z-index:100; display:grid; place-content:center; justify-items:center; gap:30px; overflow:hidden; background:radial-gradient(circle at 50% 45%,#30264f 0,#171126 38%,#090811 72%); transform:translateZ(0); will-change:opacity,transform; isolation:isolate; }
.menu-intro::before { content:""; position:absolute; inset:-12%; z-index:-2; background:linear-gradient(rgba(255,255,255,.026) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.026) 1px,transparent 1px); background-size:38px 38px; mask-image:radial-gradient(circle,#000 10%,transparent 70%); animation:introGrid 7s linear infinite; }
.menu-intro::after { content:""; position:absolute; z-index:-1; width:min(760px,90vw); aspect-ratio:1; border:1px solid rgba(166,117,255,.18); border-radius:50%; box-shadow:0 0 0 46px rgba(166,117,255,.05),0 0 0 102px rgba(200,255,80,.025); animation:introHalo 4s ease-in-out infinite; }
.intro-actions { position:relative; z-index:5; display:grid; justify-items:center; gap:16px; }
.intro-skip { display:flex; align-items:center; justify-content:center; gap:9px; min-height:34px; padding:7px 12px; border:0; color:#a9a1b8; background:transparent; font:400 8px Silkscreen,monospace; letter-spacing:.18em; cursor:pointer; opacity:.82; transition:color .18s ease,opacity .18s ease,transform .18s ease,text-shadow .18s ease; }
.intro-skip::before,.intro-skip::after { content:""; width:18px; height:1px; background:currentColor; opacity:.42; transition:width .18s ease,opacity .18s ease; }
.intro-skip::after { display:none; }
.intro-skip > b { color:var(--lime); font:700 13px "Pixelify Sans",sans-serif; transition:transform .18s ease; }
.intro-skip:hover { color:#f5fcff; opacity:1; transform:translateY(-1px); text-shadow:0 0 12px rgba(110,246,255,.4); }
.intro-skip:hover::before { width:27px; opacity:.8; }
.intro-skip:hover > b { transform:translateX(3px); }
.intro-skip:focus-visible { color:#fff; opacity:1; outline:2px solid var(--lime); outline-offset:3px; }
.intro-skip:active { transform:translateY(1px); }
.intro-logo-wrap { position:relative; z-index:2; width:min(620px,78vw); display:grid; place-items:center; transition:transform .68s cubic-bezier(.16,1,.3,1),filter .45s ease; will-change:transform; }
.intro-logo-wrap > i { position:absolute; width:72%; height:55%; border-radius:50%; background:rgba(166,117,255,.32); filter:blur(44px); animation:introGlow 1.6s ease-in-out infinite; }
.intro-logo-wrap > img { width:100%; position:relative; filter:drop-shadow(0 22px 32px rgba(0,0,0,.48)); animation:introLogoIn .72s cubic-bezier(.16,1,.3,1) both; backface-visibility:hidden; will-change:transform,opacity,filter; }
.intro-loader { width:min(390px,68vw); position:relative; z-index:2; display:grid; gap:13px; animation:introCopyIn .5s ease-out .28s both; transition:opacity .32s ease,transform .32s ease; }
.intro-track { height:10px; padding:2px; overflow:hidden; border:2px solid #51436d; background:#08070e; box-shadow:0 0 0 1px #0a0810,0 8px 18px rgba(0,0,0,.28); }
.intro-track i { display:block; width:100%; height:100%; background:linear-gradient(90deg,var(--violet),#6edff3 55%,var(--lime)); transform:scaleX(0); transform-origin:left; animation:introLoad 1.18s cubic-bezier(.4,0,.2,1) .12s forwards; will-change:transform; }
.intro-loader span { display:flex; justify-content:space-between; align-items:center; gap:18px; color:#8c849c; font:500 8px Silkscreen; letter-spacing:.15em; }
.intro-loader b { color:#d9d3e7; font-weight:500; }
.intro-loader em { color:#6f687c; font-style:normal; font-size:7px; }
.intro-start { position:relative; z-index:3; min-width:min(330px,76vw); min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:12px 18px 12px 25px; border:3px solid #0b0910; border-radius:4px; color:#17101e; background:linear-gradient(#d7ff5c,#99df27); box-shadow:inset 0 0 0 2px #eaff9b,inset 0 -8px 0 rgba(60,92,10,.2),0 7px 0 #52740f,0 12px 28px rgba(0,0,0,.42); font:400 24px Silkscreen,monospace; text-align:left; cursor:pointer; opacity:0; transform:translateY(18px) scale(.92); pointer-events:none; transition:opacity .35s ease,transform .48s cubic-bezier(.16,1,.3,1),filter .2s ease; }
.intro-start::before { content:""; position:absolute; inset:5px; border:1px dashed rgba(31,44,11,.32); pointer-events:none; }
.intro-start span,.intro-start b { position:relative; z-index:1; }
.intro-start span { display:grid; gap:6px; }
.intro-start small { font:400 7px Silkscreen; letter-spacing:.18em; opacity:.65; }
.intro-start b { width:42px; height:42px; display:grid; place-items:center; border:2px solid #29410d; background:#151020; color:var(--lime); box-shadow:inset 0 -4px 0 #08070d; font-size:18px; }
.menu-intro.ready .intro-start { opacity:1; transform:translateY(0) scale(1); pointer-events:auto; animation:introButtonPulse 1.8s ease-in-out infinite; }
.intro-start:hover,.intro-start:focus-visible { filter:brightness(1.12); transform:translateY(-3px) scale(1.02); outline:2px solid #fff; outline-offset:5px; }
.intro-start:active { transform:translateY(3px) scale(.99); }
.intro-start:disabled { cursor:default; }
.intro-story { position:absolute; z-index:4; top:55%; left:50%; width:min(920px,91vw); display:grid; justify-items:center; gap:24px; text-align:center; opacity:0; transform:translate(-50%,58vh) scale(.94); pointer-events:none; transition:opacity .8s ease,transform 1.35s cubic-bezier(.16,1,.3,1); will-change:transform,opacity; }
.intro-story-kicker { padding:9px 16px; border:1px solid rgba(200,255,80,.4); color:var(--lime); background:rgba(13,11,21,.76); box-shadow:0 0 28px rgba(200,255,80,.12); font:400 clamp(9px,1vw,12px) Silkscreen; letter-spacing:.28em; }
.intro-story h1 { max-width:900px; margin:0; color:#f7f3ff; font:400 clamp(38px,5.5vw,72px)/1.08 Silkscreen,monospace; letter-spacing:-.055em; text-shadow:0 6px 0 #14101d,0 0 34px rgba(166,117,255,.28); }
.intro-story h1 strong { color:var(--lime); font-weight:400; }
.intro-story p { max-width:780px; margin:0; color:#c2bacf; font:400 clamp(11px,1.35vw,15px)/1.9 Silkscreen,monospace; text-wrap:balance; }
.intro-studio { position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center; gap:24px; min-width:min(530px,84vw); margin-top:16px; padding:17px 28px; overflow:hidden; border:2px solid rgba(166,117,255,.55); border-radius:4px; color:#aaa0ba; background:linear-gradient(115deg,rgba(15,11,27,.94),rgba(52,29,84,.9),rgba(17,13,28,.94)); background-size:220% 100%; box-shadow:inset 0 0 0 2px rgba(255,255,255,.035),0 0 0 1px #08070e,0 12px 42px rgba(0,0,0,.46); }
.intro-studio::before { content:""; position:absolute; z-index:-1; top:-90%; bottom:-90%; left:-35%; width:22%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent); transform:rotate(18deg) translateX(-220%); filter:blur(1px); }
.intro-studio::after { content:""; position:absolute; z-index:-1; inset:5px; border:1px dashed rgba(200,255,80,.28); box-shadow:inset 0 0 24px rgba(166,117,255,.18); pointer-events:none; }
.intro-studio i { color:var(--lime); font-style:normal; font-size:17px; text-shadow:0 0 12px rgba(200,255,80,.8); }
.intro-studio span { display:grid; gap:8px; font:400 clamp(9px,1vw,11px) Silkscreen; letter-spacing:.16em; }
.intro-studio strong { color:#fff; font:400 clamp(18px,1.65vw,23px) Silkscreen; letter-spacing:.08em; text-shadow:0 0 8px rgba(166,117,255,.7),0 0 20px rgba(200,255,80,.25); }
.menu-intro.starting .intro-loader { opacity:0; transform:translateY(-18px); visibility:hidden; transition:opacity .32s ease,transform .32s ease,visibility 0s linear .4s; }
.menu-intro.starting .intro-start { opacity:0; transform:translateY(22px) scale(.9); visibility:hidden; pointer-events:none; animation:none; transition:opacity .32s ease,transform .32s ease,visibility 0s linear .4s; }
.menu-intro.starting .intro-actions { position:absolute; left:50%; bottom:clamp(16px,4vh,34px); transform:translateX(-50%); }
.menu-intro.starting .intro-skip { color:#bdb5ca; }
.menu-intro.starting .intro-logo-wrap { transform:scale(1.1); filter:brightness(1.3); }
.menu-intro.starting .intro-logo-wrap > i { background:rgba(200,255,80,.4); }
.menu-intro.story-mode .intro-logo-wrap { transform:translateY(-235px) scale(.52); filter:brightness(1.08); }
.menu-intro.story-mode .intro-story { opacity:1; transform:translate(-50%,-50%) scale(1); }
.menu-intro.story-mode .intro-story-kicker { animation:storyLineIn .7s cubic-bezier(.16,1,.3,1) 1.25s both; }
.menu-intro.story-mode .intro-story h1 { animation:storyLineIn .78s cubic-bezier(.16,1,.3,1) 3.15s both; }
.menu-intro.story-mode .intro-story p { animation:storyLineIn .76s cubic-bezier(.16,1,.3,1) 6s both; }
.menu-intro.story-mode .intro-studio { animation:storyLineIn .82s cubic-bezier(.16,1,.3,1) 9.6s both,studioPulse 1.7s ease-in-out 10.35s infinite; }
.menu-intro.story-mode .intro-studio::before { animation:studioShine 1.65s cubic-bezier(.4,0,.2,1) 10.25s infinite; }
.menu-intro.story-mode .intro-studio i { animation:studioStar .85s ease-in-out 10.3s infinite alternate; }
.menu-intro.story-mode .intro-studio strong { animation:studioTextGlow 1.4s ease-in-out 10.3s infinite alternate; }
.menu-intro.leaving { animation:introLeave .46s cubic-bezier(.4,0,.2,1) forwards; pointer-events:none; }
.menu-home.has-intro .menu-header,.menu-home.has-intro .menu-options,.menu-home.has-intro .menu-hero-art,.menu-home.has-intro .menu-footer { opacity:0; }
.menu-home.has-intro.intro-complete .menu-header { animation:menuLayerIn .58s cubic-bezier(.16,1,.3,1) both; }
.menu-home.has-intro.intro-complete .menu-options { animation:menuLayerIn .64s cubic-bezier(.16,1,.3,1) .08s both; }
.menu-home.has-intro.intro-complete .menu-hero-art { animation:menuArtIn .7s cubic-bezier(.16,1,.3,1) .12s both; }
.menu-home.has-intro.intro-complete .menu-footer { animation:menuLayerIn .5s ease-out .18s both; }
@keyframes introLogoIn { from { opacity:0; transform:translateY(18px) scale(.78); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes introCopyIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes introLoad { to { transform:scaleX(1); } }
@keyframes introButtonPulse { 0%,100% { box-shadow:inset 0 0 0 2px #eaff9b,inset 0 -8px 0 rgba(60,92,10,.2),0 7px 0 #52740f,0 12px 28px rgba(0,0,0,.42); } 50% { box-shadow:inset 0 0 0 2px #fff,inset 0 -8px 0 rgba(60,92,10,.16),0 7px 0 #52740f,0 14px 38px rgba(200,255,80,.22); } }
@keyframes storyLineIn { from { opacity:0; transform:translateY(38px); filter:blur(3px); } to { opacity:1; transform:translateY(0); filter:blur(0); } }
@keyframes studioPulse { 0%,100% { border-color:rgba(166,117,255,.55); background-position:0 50%; box-shadow:inset 0 0 0 2px rgba(255,255,255,.035),0 0 0 1px #08070e,0 12px 42px rgba(0,0,0,.46),0 0 18px rgba(166,117,255,.14); } 50% { border-color:rgba(200,255,80,.9); background-position:100% 50%; box-shadow:inset 0 0 0 2px rgba(255,255,255,.08),0 0 0 1px #08070e,0 14px 48px rgba(0,0,0,.5),0 0 34px rgba(200,255,80,.36),0 0 68px rgba(166,117,255,.2); } }
@keyframes studioShine { 0% { transform:rotate(18deg) translateX(-240%); opacity:0; } 18% { opacity:.9; } 55%,100% { transform:rotate(18deg) translateX(760%); opacity:0; } }
@keyframes studioStar { from { transform:scale(.86) rotate(-10deg); color:var(--violet); } to { transform:scale(1.22) rotate(10deg); color:var(--lime); } }
@keyframes studioTextGlow { from { text-shadow:0 0 7px rgba(166,117,255,.65),0 0 16px rgba(200,255,80,.15); } to { text-shadow:0 0 10px rgba(255,255,255,.85),0 0 24px rgba(200,255,80,.52),0 0 42px rgba(166,117,255,.34); } }
@keyframes introLeave { to { opacity:0; transform:scale(1.035); } }
@keyframes introGrid { to { transform:translate3d(38px,38px,0); } }
@keyframes introHalo { 0%,100% { opacity:.45; transform:scale(.96); } 50% { opacity:.8; transform:scale(1.02); } }
@keyframes introGlow { 0%,100% { opacity:.45; transform:scale(.9); } 50% { opacity:.85; transform:scale(1.08); } }
@keyframes menuLayerIn { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:translateY(0); } }
@keyframes menuArtIn { from { opacity:0; transform:translateX(28px) scale(.96); } to { opacity:1; transform:translateX(0) scale(1); } }

@media (max-width: 620px) {
  .menu-intro { gap:23px; }
  .intro-actions { gap:11px; }
  .intro-skip { min-height:32px; padding:5px 9px; font-size:7px; }
  .intro-logo-wrap { width:min(560px,88vw); }
  .intro-loader { width:min(330px,78vw); }
  .intro-loader em { display:none; }
  .intro-start { min-height:70px; min-width:78vw; font-size:20px; }
  .menu-intro.story-mode .intro-logo-wrap { transform:translateY(-190px) scale(.58); }
  .intro-story { top:57%; width:92vw; gap:17px; }
  .intro-story h1 { font-size:clamp(31px,9vw,46px); line-height:1.12; }
  .intro-story p { max-width:89vw; font-size:clamp(9px,2.7vw,12px); line-height:1.85; }
  .intro-studio { min-width:88vw; gap:13px; padding:14px 12px; }
  .intro-studio strong { font-size:clamp(15px,4vw,19px); }
}
@media (prefers-reduced-motion: reduce) {
  .battle-logo,.battle-logo > strong,.battle-logo::before,.battle-logo::after,.menu-intro::before,.menu-intro::after,.intro-skip,.intro-logo-wrap > i,.intro-logo-wrap > img,.intro-loader,.intro-track i,.intro-start,.intro-story-kicker,.intro-story h1,.intro-story p,.intro-studio,.intro-studio::before,.intro-studio::after,.intro-studio i,.intro-studio strong,.menu-home.has-intro .menu-header,.menu-home.has-intro .menu-options,.menu-home.has-intro .menu-hero-art,.menu-home.has-intro .menu-footer,.transition-grid,.transition-radar,.transition-kicker,.transition-logo,.transition-logo > i,.transition-copy,.transition-track,.transition-track i,.transition-tip,.return-roster,.lobby-entering .lobby-nav,.lobby-entering .lobby-heading-copy,.lobby-entering .lobby-squad-card,.lobby-entering .players-panel,.lobby-entering .invite-panel,.lobby-entering .lobby-actions,.room-chip > i,.host-wait i,.start-button.starting,.match-intro-grid,.match-intro-burst,.match-intro-kicker,.match-intro-logo,.match-intro-logo > i,.countdown-stage,.countdown-stage > b.count-pop,.match-intro-roster,.match-intro.launching::after,.match-intro.leaving,.match-live .game-header,.match-live .arena-wrap,.match-live .match-sidebar,.match-live .touch-controls { animation:none; transition:none; }
  .menu-home.has-intro .menu-header,.menu-home.has-intro .menu-options,.menu-home.has-intro .menu-hero-art,.menu-home.has-intro .menu-footer { opacity:1; transform:none; }
  .menu-intro.ready .intro-start { opacity:1; transform:none; }
  .menu-intro.story-mode .intro-story { opacity:1; transform:translate(-50%,-50%); }
  .lobby-shell.match-starting,.match-loading-transition,.match-loading-grid,.match-loading-beam,.match-loading-content,.match-loading-content > div i { animation:none; }
  .gameplay-guide-dialog[open] { animation:none; }
}

@media (max-width: 980px) {
  .menu-header { grid-template-columns:1fr auto; }
  .menu-header .status-pill { display:none; }
  .menu-stage { grid-template-columns:1fr; }
  .menu-options { width:min(540px,100%); margin:0 auto; }
  .menu-hero-art { position:absolute; inset:0 -20% 0 35%; min-height:0; opacity:.18; pointer-events:none; }
  .menu-hero-art canvas { width:min(100%,560px); }
  .arena-rank,.player-count { display:none; }
  .guide-basics { grid-template-columns:1fr; }
  .powerup-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .powerup-card p { min-height:0; }
}

@media (max-width: 620px) {
  .menu-home { padding:18px 15px 12px; }
  .menu-header .brand { width:165px; }
  .player-profile { min-width:0; padding:5px 8px; }
  .profile-avatar { width:38px; height:38px; font-size:18px; }
  .profile-copy input { width:105px; font-size:13px; }
  .menu-options { padding-top:55px; }
  .battle-logo { margin-bottom:34px; }
  .battle-logo > strong { font-size:12vw; -webkit-text-stroke-width:3px; text-shadow:0 4px 0 #c74d2c,0 8px 0 #651f2b,4px 11px 0 #090b11; }
  .arcade-action { width:94%; min-height:76px; margin-left:4px; padding:0 15px 0 20px; }
  .arcade-action > span { font-size:21px; }
  .join-room-action { width:94%; margin-left:13px; }
  .how-to-play-action { width:90%; margin-left:24px; }
  .menu-code-row { grid-template-columns:1fr 95px; }
  .menu-code-row button { min-width:0; }
  .menu-footer { gap:10px; padding:10px 5px; font-size:7px; }
  .menu-footer i { display:none; }
  .gameplay-guide-dialog { width:calc(100vw - 18px); max-height:94vh; }
  .gameplay-guide { max-height:94vh; padding:54px 15px 24px; }
  .guide-close { position:absolute; top:10px; right:10px; width:36px; height:36px; }
  .guide-heading p { font-size:13px; }
  .guide-basics { margin:25px 0 36px; }
  .control-list { grid-template-columns:1fr; }
  .control-list li { align-items:flex-start; flex-direction:column; gap:8px; }
  .control-keys { min-width:0; }
  .powerup-heading { align-items:start; flex-direction:column; gap:12px; }
  .powerup-heading > p { text-align:left; }
  .powerup-grid { grid-template-columns:1fr; }
  .powerup-card { grid-template-columns:48px minmax(0,1fr); padding:13px; }
  .powerup-card strong { min-height:0; }
  .powerup-card p { margin-bottom:9px; }
}

/* Shared interior screens */
.center-shell, .lobby-shell, .game-shell { min-height:100vh; position:relative; z-index:1; }
.center-shell { display:grid; grid-template-rows:auto 1fr; padding:30px clamp(20px,6vw,90px); }
.center-shell nav { display:flex; }
.compact-card { width:min(440px,100%); align-self:center; justify-self:center; padding:36px; background:linear-gradient(145deg,#211a30,#14101e); border:1px solid rgba(166,117,255,.24); border-radius:8px; box-shadow:0 28px 80px rgba(0,0,0,.4); }
.compact-card h2, .lobby-heading h2, .result-card h2 { font:400 clamp(34px,5vw,58px)/.94 Silkscreen,Impact,sans-serif; letter-spacing:-.05em; margin:12px 0; }
.compact-card p, .lobby-heading p, .result-card p { color:var(--muted); line-height:1.6; }
.compact-card label { margin-top:28px; }
.text-link { display:block; text-align:center; color:#918a9f; font:500 11px Silkscreen; text-transform:uppercase; text-decoration:none; letter-spacing:.08em; margin-top:20px; }
.text-link:hover { color:var(--lime); }
.connecting { text-align:center; position:relative; overflow:hidden; }
.connecting .loader { display:block; width:70px; height:70px; border-radius:50%; border:2px solid rgba(166,117,255,.2); border-top-color:var(--lime); margin:0 auto 28px; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.form-error { min-height:18px; margin:10px 0 -10px; color:#ff8099; font:500 11px Silkscreen; }
button:disabled { opacity:.55; cursor:wait; }

/* Room opening transition */
.room-transition { min-height:100vh; position:relative; isolation:isolate; overflow:hidden; display:grid; place-items:center; padding:30px; background:radial-gradient(circle at 50% 44%,#332653 0,#171224 35%,#090811 72%); }
.transition-grid { position:absolute; inset:-60px; z-index:-2; background:linear-gradient(rgba(255,255,255,.026) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.026) 1px,transparent 1px); background-size:42px 42px; transform:perspective(520px) rotateX(58deg) translateY(26%); transform-origin:center bottom; mask-image:linear-gradient(to bottom,transparent,#000 38%,transparent 95%); animation:transitionGrid 2.8s linear infinite; }
.transition-radar { position:absolute; z-index:-1; display:grid; place-items:center; width:min(680px,90vw); aspect-ratio:1; border-radius:50%; border:1px solid rgba(166,117,255,.16); animation:transitionRadar 3.4s linear infinite; }
.transition-radar i { position:absolute; width:72%; aspect-ratio:1; border:1px solid rgba(200,255,80,.08); border-radius:50%; }
.transition-radar i:nth-child(2) { width:46%; }
.transition-radar i:nth-child(3) { width:18%; background:rgba(166,117,255,.08); }
.transition-content { width:min(650px,90vw); display:grid; justify-items:center; position:relative; z-index:2; text-align:center; }
.transition-kicker { margin-bottom:23px; padding:8px 14px; color:var(--lime); border:1px solid rgba(200,255,80,.28); background:rgba(9,8,17,.68); font:500 8px Silkscreen; letter-spacing:.2em; animation:transitionKicker .45s ease-out both; }
.transition-logo { width:min(560px,82vw); position:relative; display:grid; place-items:center; animation:transitionLogo .72s cubic-bezier(.16,1,.3,1) .08s both; }
.transition-logo > i { position:absolute; width:70%; height:55%; border-radius:50%; background:rgba(166,117,255,.34); filter:blur(42px); animation:transitionGlow 1.1s ease-in-out infinite; }
.transition-logo img { width:100%; position:relative; filter:drop-shadow(0 24px 34px rgba(0,0,0,.52)); }
.transition-copy { display:grid; gap:7px; margin-top:18px; animation:transitionCopy .48s ease-out .38s both; }
.transition-copy b { color:#f7f3ff; font:500 clamp(17px,3vw,26px) Silkscreen; letter-spacing:.08em; }
.transition-copy span { color:#81798f; font-size:14px; }
.transition-track { width:min(390px,68vw); height:9px; margin-top:24px; padding:2px; overflow:hidden; border:1px solid #55446e; background:#07060d; animation:transitionCopy .45s ease-out .5s both; }
.transition-track i { display:block; width:100%; height:100%; background:linear-gradient(90deg,var(--violet),#58d9f2 58%,var(--lime)); transform:scaleX(0); transform-origin:left; animation:transitionLoad 1.05s cubic-bezier(.4,0,.2,1) .15s forwards; }
.transition-tip { position:absolute; bottom:38px; color:#6f687c; font:500 8px Silkscreen; letter-spacing:.16em; animation:transitionCopy .45s ease-out .62s both; }
.transition-tip span { color:var(--lime); margin-right:8px; }
.return-transition .transition-radar { animation-direction:reverse; }
.return-transition .transition-logo { width:min(500px,78vw); }
.return-transition .transition-track i { background:linear-gradient(90deg,var(--lime),#58d9f2 48%,var(--violet)); }
.return-transition .transition-tip span { color:var(--violet); }
.return-roster { display:flex; align-items:center; justify-content:center; margin:18px 0 -6px; animation:transitionCopy .46s ease-out .46s both; }
.return-roster > span { width:46px; height:46px; margin-left:-5px; display:grid; place-items:center; border:2px solid #14101d; border-bottom-color:var(--return-color); border-radius:50%; background:#0d0a14; box-shadow:0 7px 16px rgba(0,0,0,.25),0 0 11px color-mix(in srgb,var(--return-color),transparent 68%); }
.return-roster > span:first-child { margin-left:0; }
.return-roster img { width:39px; height:39px; object-fit:contain; image-rendering:pixelated; }
@keyframes transitionLogo { from { opacity:0; transform:translateY(20px) scale(.72); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes transitionKicker { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@keyframes transitionCopy { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes transitionLoad { to { transform:scaleX(1); } }
@keyframes transitionGlow { 0%,100% { opacity:.38; transform:scale(.9); } 50% { opacity:.8; transform:scale(1.08); } }
@keyframes transitionRadar { to { transform:rotate(360deg); } }
@keyframes transitionGrid { to { background-position:0 42px,42px 0; } }

/* Lobby */
.lobby-shell { width:100%; min-height:100vh; margin:0 auto; padding:26px clamp(20px,5vw,72px) 46px; overflow:hidden; isolation:isolate; background:radial-gradient(circle at 80% 8%,rgba(166,117,255,.14),transparent 34%),linear-gradient(135deg,rgba(15,12,24,.35),rgba(9,8,15,.04)); }
.lobby-backdrop { position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.lobby-backdrop::before { content:""; position:absolute; inset:0; background:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size:52px 52px; mask-image:linear-gradient(to bottom,#000,transparent 88%); }
.lobby-backdrop i { position:absolute; border:1px solid rgba(166,117,255,.1); border-radius:50%; }
.lobby-backdrop i:first-child { width:540px; height:540px; right:-180px; top:-150px; box-shadow:0 0 0 54px rgba(166,117,255,.025),0 0 0 112px rgba(200,255,80,.012); }
.lobby-backdrop i:nth-child(2) { width:260px; height:260px; left:-120px; bottom:5%; border-color:rgba(200,255,80,.08); }
.lobby-backdrop i:nth-child(3) { width:9px; height:9px; right:18%; top:32%; border:0; border-radius:0; background:var(--lime); box-shadow:36px -72px 0 var(--violet),-48px 105px 0 #55dff7; transform:rotate(45deg); opacity:.6; }
.lobby-nav { width:min(1240px,100%); margin:0 auto; display:flex; justify-content:space-between; align-items:center; position:relative; z-index:3; }
.lobby-nav .brand { width:clamp(180px,18vw,250px); }
.room-chip { display:grid; grid-template-columns:auto auto; align-items:center; column-gap:9px; padding:8px 14px 9px; border:1px solid rgba(255,255,255,.13); border-radius:999px; background:rgba(14,11,22,.82); box-shadow:0 8px 24px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.04); font:500 8px Silkscreen; }
.room-chip > i { grid-row:1/3; width:8px; height:8px; border-radius:50%; background:var(--lime); box-shadow:0 0 12px rgba(200,255,80,.8); animation:roomLive 1.5s ease-in-out infinite; }
.room-chip span { color:#746d80; letter-spacing:.12em; }
.room-chip b { color:var(--lime); font-size:11px; letter-spacing:.2em; }
.lobby-heading { width:min(1240px,100%); margin:58px auto 30px; display:grid; grid-template-columns:minmax(0,1fr) 250px; align-items:end; gap:50px; }
.lobby-heading h2 { margin:12px 0 16px; color:#fff; font-size:clamp(44px,6vw,76px); line-height:.92; letter-spacing:-.075em; }
.lobby-heading h2 strong { color:var(--lime); font-weight:400; text-shadow:0 0 28px rgba(200,255,80,.17); }
.lobby-heading p { max-width:670px; margin:0; color:#9d95ad; font-size:16px; line-height:1.55; }
.lobby-player-name { width:min(100%,560px); display:grid; gap:8px; margin-top:20px; padding:15px; border:1px solid rgba(200,255,80,.36); border-left:4px solid var(--lime); border-radius:6px; background:linear-gradient(110deg,rgba(200,255,80,.09),rgba(20,16,29,.94) 42%); box-shadow:0 10px 28px rgba(0,0,0,.22); }
.lobby-player-name > span { color:var(--lime); font:500 8px Silkscreen; letter-spacing:.13em; }
.lobby-player-name input { width:100%; min-height:46px; padding:10px 13px; border:1px solid #665c72; border-radius:4px; outline:none; color:#fff; background:#100d18; font:600 16px Inter,system-ui,sans-serif; }
.lobby-player-name input:focus { border-color:var(--lime); box-shadow:0 0 0 3px rgba(200,255,80,.16); }
.lobby-player-name small { color:#aaa2b4; font-size:11px; line-height:1.4; }
.lobby-squad-card { min-height:160px; position:relative; display:grid; grid-template-columns:1fr auto; align-content:center; padding:22px; overflow:hidden; border:1px solid rgba(166,117,255,.25); border-left:4px solid var(--violet); background:linear-gradient(135deg,rgba(34,27,49,.95),rgba(17,14,26,.94)); box-shadow:9px 9px 0 rgba(0,0,0,.18); }
.lobby-squad-card::after { content:""; position:absolute; width:130px; height:130px; right:-60px; top:-65px; border:22px solid rgba(166,117,255,.06); border-radius:50%; }
.lobby-squad-card > span { color:#837b91; font:500 8px Silkscreen; letter-spacing:.15em; }
.lobby-squad-card > b { grid-row:1/3; grid-column:2; color:#fff; font:400 46px/.8 Silkscreen; }
.lobby-squad-card > b small { color:#716982; font-size:17px; }
.lobby-squad-card > em { color:var(--lime); font:500 7px Silkscreen; font-style:normal; letter-spacing:.12em; }
.squad-preview { grid-column:1/-1; display:flex; align-items:center; margin-top:18px; padding-left:5px; }
.squad-preview img,.squad-preview i { width:38px; height:38px; margin-left:-5px; object-fit:contain; border:2px solid #17121f; border-radius:50%; background:#100d18; image-rendering:pixelated; }
.squad-preview img { padding:2px; }
.squad-preview i { display:grid; place-items:center; color:#696174; border-style:dashed; font:400 14px Silkscreen; font-style:normal; }
.lobby-grid { width:min(1240px,100%); margin:0 auto; display:grid; grid-template-columns:minmax(0,1.55fr) minmax(330px,.78fr); gap:20px; }
.mode-panel { width:min(1240px,100%); margin:0 auto 20px; padding:18px; display:grid; grid-template-columns:260px 1fr; align-items:center; gap:20px; border:1px solid rgba(255,255,255,.11); border-radius:8px; background:linear-gradient(135deg,rgba(24,19,35,.96),rgba(12,10,19,.96)); box-shadow:0 18px 45px rgba(0,0,0,.2); }
.mode-panel header { display:grid; gap:6px; }
.mode-panel header span { color:var(--lime); font:500 7px Silkscreen; letter-spacing:.14em; }
.mode-panel header b { color:#fff; font:500 15px Silkscreen; }
.mode-panel header small { color:#777080; font-size:11px; line-height:1.4; }
.mode-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.mode-card { min-width:0; min-height:92px; display:grid; grid-template-columns:50px 1fr auto; align-items:center; gap:13px; padding:12px 14px; border:1px solid #44394f; border-bottom:5px solid #211927; border-radius:5px; color:#9a91a5; background:linear-gradient(145deg,#241d30,#15111d); text-align:left; cursor:pointer; transition:transform .16s ease,filter .16s ease,border-color .16s ease; }
.mode-card:hover:not(:disabled) { transform:translateY(-2px); filter:brightness(1.12); }
.mode-card:disabled { cursor:default; }
.mode-card .mode-icon { width:48px; height:52px; display:grid; place-items:center; border:3px solid #0b0910; background:#332a45; box-shadow:inset 0 0 0 2px #6e5d85,4px 4px 0 rgba(0,0,0,.28); color:#d7cbed; font:500 19px Silkscreen; font-style:normal; }
.mode-card > span { min-width:0; display:grid; gap:5px; }
.mode-card strong { color:#f4eff9; font:500 11px Silkscreen; }
.mode-card small { color:#8e849a; font:500 7px Silkscreen; }
.mode-card em { color:#6e6677; font-size:11px; font-style:normal; }
.mode-card > b { align-self:start; padding:5px 7px; color:#8a8195; border:1px solid #494052; font:500 6px Silkscreen; }
.mode-card.active.classic { border-color:#c8ff50; border-bottom-color:#547e20; background:linear-gradient(145deg,rgba(89,119,37,.42),#171d12); box-shadow:0 0 22px rgba(200,255,80,.1); }
.mode-card.active.classic .mode-icon { color:#17200e; background:#c8ff50; box-shadow:inset 0 0 0 2px #edffba,4px 4px 0 #334b19; }
.mode-card.active.super { border-color:#ff4769; border-bottom-color:#861c35; background:linear-gradient(145deg,rgba(153,31,57,.52),#241017); box-shadow:0 0 25px rgba(255,54,95,.18); }
.mode-card.active.super .mode-icon { color:#fff; background:#e52f55; box-shadow:inset 0 0 0 2px #ff91a7,4px 4px 0 #70152c; }
.mode-card.active > b { color:#f7f0ff; border-color:currentColor; }
.lobby-shell.super-lobby { --violet:#ff1748; --lime:#ff9f1c; --ink:#fff1ea; background:radial-gradient(circle at 78% 4%,rgba(255,23,72,.25),transparent 31%),radial-gradient(circle at 18% 92%,rgba(184,20,47,.15),transparent 38%),linear-gradient(145deg,rgba(29,3,10,.8),rgba(6,5,8,.2)); box-shadow:inset 0 0 180px rgba(102,0,24,.22); }
.super-lobby .lobby-backdrop::before { background:linear-gradient(rgba(255,91,62,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,91,62,.03) 1px,transparent 1px); }
.super-lobby .lobby-backdrop i { border-color:rgba(255,23,72,.17); }
.super-lobby .lobby-backdrop i:first-child { box-shadow:0 0 0 54px rgba(255,23,72,.045),0 0 0 112px rgba(255,124,32,.022); }
.super-lobby .lobby-backdrop i:nth-child(2) { border-color:rgba(255,124,32,.13); }
.super-lobby .lobby-backdrop i:nth-child(3) { background:#ff9f1c; box-shadow:36px -72px 0 #ff1748,-48px 105px 0 #ff512f; }
.super-lobby .room-chip { border-color:rgba(255,77,94,.28); background:rgba(25,5,11,.9); box-shadow:0 8px 28px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,93,79,.09); }
.super-lobby .room-chip > i { box-shadow:0 0 13px rgba(255,159,28,.9); }
.super-lobby .lobby-heading h2 strong { color:#ff9f1c; text-shadow:3px 3px 0 #651027,0 0 32px rgba(255,23,72,.3); }
.super-lobby .eyebrow { color:#ff9f1c; }
.super-lobby .lobby-squad-card { border-color:rgba(255,44,78,.48); border-left-color:#ff1748; background:linear-gradient(135deg,rgba(64,10,24,.98),rgba(17,7,12,.97)); box-shadow:9px 9px 0 rgba(68,0,17,.42),0 0 28px rgba(255,23,72,.1); }
.super-lobby .lobby-squad-card::after { border-color:rgba(255,23,72,.1); }
.super-lobby .mode-panel { border-color:rgba(255,49,79,.38); background:linear-gradient(135deg,rgba(36,6,15,.98),rgba(10,7,10,.98)); box-shadow:0 18px 55px rgba(73,0,18,.38),inset 0 0 0 1px rgba(255,116,66,.035); }
.super-lobby .mode-card:not(.active) { border-color:#422631; border-bottom-color:#170a0f; color:#79676e; background:linear-gradient(145deg,#211319,#0e0a0c); }
.super-lobby .mode-card:not(.active) .mode-icon { color:#9a707a; background:#2b151d; box-shadow:inset 0 0 0 2px #57303a,4px 4px 0 rgba(0,0,0,.4); }
.super-lobby .mode-card.active.super { border-color:#ff315c; border-bottom-color:#8b0b2d; background:linear-gradient(145deg,#9d1436,#300812 62%,#17080d); box-shadow:0 0 0 1px rgba(255,145,102,.12),0 0 35px rgba(255,23,72,.28),8px 8px 0 rgba(61,0,14,.5); }
.super-lobby .mode-card.active.super .mode-icon { background:linear-gradient(145deg,#ff355f,#b90c35); box-shadow:inset 0 0 0 2px #ff9b83,4px 4px 0 #5b061e,0 0 18px rgba(255,23,72,.4); }
.super-lobby .mode-card.active.super > b { color:#ffb084; border-color:#ff734f; background:#310710; }
.super-lobby .players-panel,.super-lobby .invite-panel { border-color:rgba(255,64,89,.24); background:linear-gradient(145deg,rgba(31,9,16,.97),rgba(11,8,11,.97)); box-shadow:0 20px 58px rgba(54,0,14,.34); }
.super-lobby .players-panel::before { background:linear-gradient(90deg,#ff1748,#ff6b35 52%,transparent 82%); }
.super-lobby .invite-panel::before { background:linear-gradient(90deg,#ff9f1c,#ff315c 58%,transparent 86%); }
.super-lobby .panel-title { background:rgba(58,4,17,.18); }
.super-lobby .panel-title span i { background:#ff1748; box-shadow:0 0 12px #ff1748; }
.super-lobby .player-slot { border-bottom-color:rgba(255,75,82,.08); }
.super-lobby .player-slot.occupied:hover { background:rgba(255,45,76,.045); }
.super-lobby .player-slot.empty > i { color:#92505e; border-color:#6f3140; background:rgba(55,7,18,.28); }
.super-lobby .invite-panel-heading > i { color:#2a0708; background:linear-gradient(145deg,#ffb02e,#ff5b2f); box-shadow:4px 4px 0 #5e0d1c; }
.super-lobby .copy-row input { border-color:#542432; background:#10070a; }
.super-lobby .copy-row button { color:#ffab45; border-color:rgba(255,124,43,.58); background:rgba(255,79,37,.1); }
.super-lobby .copy-row button:hover { color:#260609; background:#ff8a27; }
.super-lobby .room-pass { border-color:rgba(255,68,85,.2); background:linear-gradient(135deg,#120609,#280912); }
.super-lobby .pass-pixels { outline-color:#ff6b35; background:repeating-conic-gradient(#ff9f1c 0 25%,transparent 0 50%) 0 0/14px 14px; }
.super-lobby .bot-difficulty-options button { border-color:#4f2632; border-bottom-color:#1e090f; background:linear-gradient(#261218,#100a0c); }
.super-lobby .bot-difficulty-options button.active { color:#2a0609; border-color:#ffac37; border-bottom-color:#8a2710; background:linear-gradient(#ffba3e,#f06024); box-shadow:0 0 20px rgba(255,73,43,.22); }
.super-lobby .bot-difficulty-options button.active i { color:#ffb13d; border-color:#5e180d; background:#330b0a; }
.super-lobby .bot-difficulty-options button.active small { color:#68200e; }
.super-lobby .lobby-actions { border-color:rgba(255,57,82,.24); background:rgba(25,7,12,.92); box-shadow:0 16px 42px rgba(58,0,15,.3); }
.super-lobby .ready-button { border-color:#64303d; background:#291119; color:#b88d96; }
.super-lobby .ready-button.active { color:#ffab36; border-color:#ff8a2c; background:rgba(255,94,32,.12); }
.super-lobby .start-button { color:#2b0508; border-color:#50101b; background:linear-gradient(180deg,#ffb037,#f05025); box-shadow:inset 0 3px 0 rgba(255,239,184,.38),5px 6px 0 rgba(73,0,16,.48),0 0 22px rgba(255,44,72,.15); }
.super-lobby .start-button small { color:#6d160e; }
.super-lobby .start-button > b { border-color:#5f1018; background:#ffd17c; }

/* Impact transition between the two lobby identities. */
.lobby-shell.mode-switching { --switch-flash:#a675ff; --switch-shadow:rgba(91,52,150,.36); animation:modeShellImpact .72s cubic-bezier(.16,1,.3,1) both; }
.lobby-shell.mode-switching.switch-to-super { --switch-flash:#ff1748; --switch-shadow:rgba(120,0,28,.5); }
.lobby-shell.mode-switching::after { content:""; position:fixed; inset:-20%; z-index:20; pointer-events:none; opacity:0; background:linear-gradient(112deg,transparent 34%,color-mix(in srgb,var(--switch-flash),transparent 5%) 45%,#fff4e6 49%,var(--switch-flash) 52%,transparent 65%); mix-blend-mode:screen; transform:translateX(-85%) skewX(-8deg); animation:modeColorSlash .7s cubic-bezier(.6,0,.2,1) both; }
.mode-switching .lobby-backdrop { animation:modeBackdropHit .9s ease-out both; }
.mode-switching .lobby-nav { animation:modeElementDrop .5s cubic-bezier(.16,1,.3,1) .05s both; }
.mode-switching .lobby-heading-copy { animation:modeElementLeft .54s cubic-bezier(.16,1,.3,1) .08s both; }
.mode-switching .lobby-squad-card { animation:modeElementRight .54s cubic-bezier(.16,1,.3,1) .12s both; }
.mode-switching .mode-panel { animation:modePanelSlam .58s cubic-bezier(.16,1,.3,1) .16s both; }
.mode-switching .mode-panel header { animation:modeTextGlitch .48s steps(4,end) .2s both; }
.mode-switching .mode-card { animation:modeCardRack .5s cubic-bezier(.16,1,.3,1) .22s both; }
.mode-switching .mode-card:nth-child(2) { animation-delay:.28s; }
.mode-switching .players-panel { animation:modeElementLeft .55s cubic-bezier(.16,1,.3,1) .26s both; }
.mode-switching .invite-panel { animation:modeElementRight .55s cubic-bezier(.16,1,.3,1) .31s both; }
.mode-switching .player-slot { animation:modeRowStrike .42s cubic-bezier(.16,1,.3,1) both; }
.mode-switching .player-slot:nth-child(1) { animation-delay:.34s; }
.mode-switching .player-slot:nth-child(2) { animation-delay:.38s; }
.mode-switching .player-slot:nth-child(3) { animation-delay:.42s; }
.mode-switching .player-slot:nth-child(4) { animation-delay:.46s; }
.mode-switching .invite-panel > * { animation:modeInnerPop .38s cubic-bezier(.16,1,.3,1) .4s both; }
.mode-switching .lobby-actions { animation:modeElementDrop .5s cubic-bezier(.16,1,.3,1) .4s both; }
.mode-switching .lobby-actions > * { animation:modeInnerPop .38s cubic-bezier(.16,1,.3,1) .48s both; }
.mode-switching .mode-card.active { animation-name:modeActiveImpact; }
@keyframes modeShellImpact { 0% { filter:brightness(.35) saturate(1.8); transform:translateX(-5px); } 18% { filter:brightness(1.65) saturate(1.5); transform:translateX(5px); } 36% { transform:translateX(-3px); } 55% { filter:brightness(.92) saturate(1.2); transform:translateX(2px); } 100% { filter:none; transform:none; } }
@keyframes modeColorSlash { 0% { opacity:0; transform:translateX(-85%) skewX(-8deg); } 18% { opacity:.9; } 58% { opacity:.42; } 100% { opacity:0; transform:translateX(85%) skewX(-8deg); } }
@keyframes modeBackdropHit { 0% { opacity:.15; transform:scale(1.12) rotate(-2deg); } 45% { opacity:1; } 100% { opacity:1; transform:none; } }
@keyframes modeElementDrop { 0% { opacity:0; transform:translateY(-24px); } 65% { opacity:1; transform:translateY(3px); } 100% { opacity:1; transform:none; } }
@keyframes modeElementLeft { 0% { opacity:0; transform:translateX(-34px) skewX(3deg); } 68% { opacity:1; transform:translateX(4px); } 100% { opacity:1; transform:none; } }
@keyframes modeElementRight { 0% { opacity:0; transform:translateX(34px) skewX(-3deg); } 68% { opacity:1; transform:translateX(-4px); } 100% { opacity:1; transform:none; } }
@keyframes modePanelSlam { 0% { opacity:.15; transform:scaleY(.28) scaleX(1.04); filter:brightness(2); } 58% { opacity:1; transform:scaleY(1.035) scaleX(.99); } 100% { opacity:1; transform:none; filter:none; } }
@keyframes modeTextGlitch { 0% { opacity:0; transform:translateX(-12px); text-shadow:8px 0 var(--switch-flash); } 35% { opacity:1; transform:translateX(7px); } 70% { transform:translateX(-3px); text-shadow:-5px 0 var(--switch-flash); } 100% { transform:none; text-shadow:none; } }
@keyframes modeCardRack { 0% { opacity:0; transform:translateY(18px) rotateX(18deg); } 70% { opacity:1; transform:translateY(-3px); } 100% { opacity:1; transform:none; } }
@keyframes modeActiveImpact { 0% { opacity:.2; transform:scale(.82); filter:brightness(2.2); } 55% { opacity:1; transform:scale(1.045); } 72% { transform:scale(.98); } 100% { opacity:1; transform:none; filter:none; } }
@keyframes modeRowStrike { 0% { opacity:0; transform:translateX(-22px); clip-path:inset(0 100% 0 0); } 100% { opacity:1; transform:none; clip-path:inset(0); } }
@keyframes modeInnerPop { 0% { opacity:0; transform:translateY(9px) scale(.97); } 100% { opacity:1; transform:none; } }
.players-panel,.invite-panel,.match-sidebar { position:relative; overflow:hidden; border:1px solid rgba(255,255,255,.12); border-radius:8px; background:linear-gradient(145deg,rgba(29,23,42,.94),rgba(18,15,28,.94)); box-shadow:0 20px 55px rgba(0,0,0,.2); }
.players-panel::before,.invite-panel::before { content:""; position:absolute; left:0; right:0; top:0; height:3px; background:linear-gradient(90deg,var(--violet),transparent 68%); }
.invite-panel::before { background:linear-gradient(90deg,var(--lime),transparent 68%); }
.panel-title { min-height:56px; display:flex; justify-content:space-between; align-items:center; padding:17px 20px; border-bottom:1px solid rgba(255,255,255,.09); background:rgba(7,6,12,.16); font:500 9px Silkscreen; letter-spacing:.13em; }
.panel-title span { color:#d8d3e2; }
.panel-title span i { display:inline-block; width:6px; height:6px; margin-right:8px; border-radius:50%; background:var(--violet); box-shadow:0 0 9px var(--violet); }
.panel-title b { color:var(--lime); font-weight:500; }
.player-slot { min-height:76px; position:relative; display:grid; grid-template-columns:34px 44px 1fr auto; align-items:center; gap:13px; padding:10px 20px; border-bottom:1px solid rgba(255,255,255,.07); transition:background .2s ease,transform .2s ease; }
.player-slot:last-child { border-bottom:0; }
.player-slot.occupied::before { content:""; position:absolute; left:0; top:18px; bottom:18px; width:3px; background:var(--slot-color); box-shadow:0 0 12px color-mix(in srgb,var(--slot-color),transparent 25%); }
.player-slot.occupied:hover { background:rgba(255,255,255,.025); transform:translateX(3px); }
.slot-number { color:#5f586c; font:500 8px Silkscreen; }
.player-slot > i { width:38px; height:38px; display:grid; place-items:center; border:1px dashed #675f72; border-radius:50%; color:#6d6579; font:400 14px Silkscreen; font-style:normal; }
.player-slot > img { width:42px; height:42px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 8px color-mix(in srgb,var(--slot-color),transparent 50%)); }
.player-slot b { color:#f3eff8; font-size:14px; }
.player-slot small { display:block; margin-top:4px; color:#777080; font:400 8px Silkscreen; letter-spacing:.06em; }
.player-slot mark { color:#11140d; background:var(--lime); font:700 7px Silkscreen; padding:3px 5px; border-radius:2px; margin-left:6px; }
.player-slot em { color:#6d6679; font:500 8px Silkscreen; font-style:normal; letter-spacing:.08em; }
.player-slot em.is-ready { color:var(--lime); text-shadow:0 0 10px rgba(200,255,80,.28); }
.player-slot.empty { opacity:.54; }
.invite-panel { padding:24px; }
.invite-panel-heading { display:flex; justify-content:space-between; align-items:center; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,.08); }
.invite-panel-heading > div { display:grid; gap:5px; }
.invite-panel-heading span { color:#7f788b; font:500 7px Silkscreen; letter-spacing:.14em; }
.invite-panel-heading b { color:#eee9f5; font:500 13px Silkscreen; }
.invite-panel-heading > i { display:grid; place-items:center; width:38px; height:38px; color:#15200e; background:var(--lime); box-shadow:4px 4px 0 #0b0d09; font-style:normal; }
.invite-panel label { margin-top:22px; color:#898191; }
.copy-row { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.copy-row input { min-width:0; border-radius:5px 0 0 5px; color:#958da0; border-color:#3a3247; background:#100d18; font:400 9px Silkscreen; }
.copy-row button { border:1px solid rgba(200,255,80,.45); background:rgba(200,255,80,.09); color:var(--lime); border-radius:0 5px 5px 0; padding:0 14px; font:700 8px Silkscreen; transition:background .18s ease,color .18s ease; }
.copy-row button:hover { background:var(--lime); color:#12170c; }
.room-pass { margin:20px 0 15px; padding:16px; display:grid; grid-template-columns:56px 1fr; align-items:center; gap:16px; border:1px solid rgba(255,255,255,.09); background:linear-gradient(135deg,#100d18,#151021); }
.pass-pixels { width:54px; height:54px; background:repeating-conic-gradient(var(--lime) 0 25%,transparent 0 50%) 0 0/14px 14px; border:5px solid #17121f; outline:1px solid rgba(200,255,80,.7); }
.room-pass > span { display:grid; gap:4px; }
.room-pass small,.room-pass em { color:#6c6476; font:500 7px Silkscreen; font-style:normal; letter-spacing:.12em; }
.room-pass strong { color:#fff; font:500 clamp(17px,2vw,22px) Silkscreen; letter-spacing:.18em; }
.invite-panel > p { margin:0; color:#746d7f; font-size:11px; line-height:1.5; }
.lobby-actions { width:min(1240px,100%); min-height:82px; margin:20px auto 0; padding:13px 14px 13px 20px; display:flex; justify-content:flex-end; align-items:center; gap:12px; border:1px solid rgba(255,255,255,.1); border-radius:8px; background:rgba(20,16,29,.82); box-shadow:0 16px 38px rgba(0,0,0,.18); }
.lobby-action-copy { margin-right:auto; display:grid; gap:5px; }
.lobby-action-copy span { color:#6e6779; font:500 7px Silkscreen; letter-spacing:.14em; }
.lobby-action-copy b { color:#dcd6e6; font:500 10px Silkscreen; }
.ready-button { height:50px; min-width:170px; padding:0 20px; border:1px solid #4c4357; border-radius:5px; background:#211a2d; color:#aaa2b5; font:700 9px Silkscreen; letter-spacing:.08em; transition:transform .18s ease,border-color .18s ease,color .18s ease,background .18s ease; }
.ready-button:hover { transform:translateY(-2px); border-color:#8875aa; color:#fff; }
.ready-button.active { border-color:var(--lime); background:rgba(200,255,80,.1); color:var(--lime); box-shadow:inset 0 0 0 1px rgba(200,255,80,.08); }
.start-button { width:270px; min-height:54px; margin:0; padding:0 14px 0 18px; display:flex; align-items:center; justify-content:space-between; border:3px solid #17200f; border-radius:6px; background:linear-gradient(180deg,#d9ff75,#91cf36); color:#14200d; box-shadow:inset 0 3px 0 rgba(255,255,255,.35),5px 6px 0 rgba(0,0,0,.28); transition:transform .16s ease,filter .16s ease; }
.start-button:hover { filter:brightness(1.07); transform:translateY(-2px); }
.start-button.starting { filter:saturate(.72); animation:startButtonPulse .7s ease-in-out infinite; }
.start-button > span { display:grid; text-align:left; font:700 13px "Pixelify Sans"; }
.start-button small { color:#496123; font:700 7px Silkscreen; letter-spacing:.12em; }
.start-button > b { display:grid; place-items:center; width:34px; height:34px; border:2px solid #1c2a11; background:#eefeb8; font-size:12px; }
.host-wait { color:#827b8e; font:500 9px Silkscreen; letter-spacing:.1em; }
.host-wait i { display:inline-block; width:7px; height:7px; border-radius:50%; background:#f9c65e; margin-right:8px; box-shadow:0 0 10px #f9c65e; animation:roomLive 1.5s ease-in-out infinite; }
.lobby-entering .lobby-nav { animation:lobbyReveal .48s ease-out both; }
.lobby-entering .lobby-heading-copy { animation:lobbyReveal .58s cubic-bezier(.16,1,.3,1) .08s both; }
.lobby-entering .lobby-squad-card { animation:lobbyCardReveal .58s cubic-bezier(.16,1,.3,1) .16s both; }
.lobby-entering .players-panel { animation:lobbyReveal .6s cubic-bezier(.16,1,.3,1) .22s both; }
.lobby-entering .invite-panel { animation:lobbyCardReveal .6s cubic-bezier(.16,1,.3,1) .3s both; }
.lobby-entering .lobby-actions { animation:lobbyReveal .52s cubic-bezier(.16,1,.3,1) .38s both; }
@keyframes roomLive { 0%,100% { opacity:.55; transform:scale(.88); } 50% { opacity:1; transform:scale(1.08); } }
@keyframes lobbyReveal { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes lobbyCardReveal { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
@keyframes startButtonPulse { 0%,100% { box-shadow:inset 0 3px 0 rgba(255,255,255,.35),5px 6px 0 rgba(0,0,0,.28),0 0 0 rgba(200,255,80,0); } 50% { box-shadow:inset 0 3px 0 rgba(255,255,255,.35),5px 6px 0 rgba(0,0,0,.28),0 0 22px rgba(200,255,80,.3); } }

/* Lobby-to-countdown transition */
.lobby-shell.match-starting { pointer-events:none; animation:lobbyToMatch .68s cubic-bezier(.55,.02,.2,1) both; }
.match-loading-transition { position:fixed; inset:0; z-index:45; display:grid; place-items:center; overflow:hidden; background:#090711; animation:matchLoadingReveal .68s cubic-bezier(.16,1,.3,1) both; }
.match-loading-grid { position:absolute; inset:-60px; opacity:.42; background:linear-gradient(rgba(200,255,80,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(166,117,255,.07) 1px,transparent 1px); background-size:38px 38px; transform:perspective(480px) rotateX(62deg) translateY(25%); transform-origin:center bottom; animation:matchLoadingGrid .68s linear both; }
.match-loading-beam { position:absolute; left:-10%; right:-10%; top:50%; height:3px; background:linear-gradient(90deg,transparent,var(--violet),#fff,var(--lime),transparent); box-shadow:0 0 28px var(--violet),0 0 55px rgba(200,255,80,.45); animation:matchLoadingBeam .68s ease-in-out both; }
.match-loading-content { position:relative; z-index:2; width:min(540px,82vw); display:grid; justify-items:center; gap:9px; text-align:center; animation:matchLoadingContent .68s steps(8,end) both; }
.match-loading-content img { width:min(420px,78vw); filter:drop-shadow(0 18px 25px rgba(0,0,0,.5)); }
.match-loading-content span,.match-loading-content b { font:500 8px Silkscreen; letter-spacing:.2em; }
.match-loading-content span { color:var(--lime); }
.match-loading-content b { color:#e9e2f5; }
.match-loading-content > div { width:min(300px,65vw); height:7px; margin-top:7px; padding:2px; border:1px solid #514268; background:#08060e; }
.match-loading-content > div i { display:block; width:100%; height:100%; background:linear-gradient(90deg,var(--violet),#6ee6ff,var(--lime)); transform-origin:left; animation:matchLoadingBar .58s ease-out both; }
@keyframes lobbyToMatch { 45% { opacity:.65; transform:scale(.985); filter:saturate(.5); } 100% { opacity:0; transform:scale(.92); filter:blur(5px) brightness(.35); } }
@keyframes matchLoadingReveal { 0% { opacity:0; clip-path:inset(49% 0); } 35% { opacity:1; clip-path:inset(0); } 82% { opacity:1; } 100% { opacity:0; transform:scale(1.035); } }
@keyframes matchLoadingGrid { from { background-position:0 0,0 0; } to { background-position:0 38px,38px 0; } }
@keyframes matchLoadingBeam { 0% { opacity:0; transform:translateY(-38vh) scaleX(.2); } 45% { opacity:1; transform:translateY(0) scaleX(1); } 100% { opacity:0; transform:translateY(38vh) scaleX(.35); } }
@keyframes matchLoadingContent { 0%,20% { opacity:0; transform:scale(.78); } 38%,82% { opacity:1; transform:scale(1); } 100% { opacity:0; transform:scale(1.08); } }
@keyframes matchLoadingBar { from { transform:scaleX(0); } to { transform:scaleX(1); } }

/* Arena */
.game-shell { height:100svh; min-height:0; padding:18px clamp(14px,2.5vw,38px) 26px; display:flex; flex-direction:column; overflow:hidden; }
.game-header { width:min(1180px,100%); margin:0 auto; display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:18px; padding-bottom:16px; }
.match-label { text-align:center; font:500 9px Silkscreen; letter-spacing:.12em; }
.match-label span { color:var(--violet); margin-right:12px; }
.match-label b { color:#817a8e; font-weight:500; }
.match-timer { min-width:92px; display:grid; grid-template-columns:auto auto; align-items:center; gap:9px; padding:7px 10px; border:1px solid rgba(200,255,80,.28); border-bottom:3px solid #506c25; background:#100d19; box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 5px 0 rgba(0,0,0,.25); }
.match-timer small { color:#777080; font:500 6px Silkscreen; letter-spacing:.12em; }
.match-timer b { min-width:42px; color:var(--lime); font:500 15px/1 Silkscreen; text-align:right; text-shadow:0 0 12px rgba(200,255,80,.34); }
.match-timer.warning { border-color:#ffc45d; border-bottom-color:#8a5419; }
.match-timer.warning b { color:#ffc45d; text-shadow:0 0 14px rgba(255,177,66,.42); }
.match-timer.critical { border-color:#ff627a; border-bottom-color:#8d1e36; animation:matchTimerCritical .55s steps(2,end) infinite; }
.match-timer.critical b { color:#ff7890; text-shadow:0 0 16px rgba(255,71,104,.62); }
.match-timer.sudden { border-color:#ff365f; border-bottom-color:#8d1837; background:#2d0b18; animation:matchTimerCritical .55s steps(2,end) infinite; }
.match-timer.sudden small,.match-timer.sudden b { color:#ff7890; }
.super-mode .arena-wrap { border-color:#51398b; box-shadow:0 0 0 3px #0a0711,0 0 0 5px #a675ff,0 22px 58px rgba(68,31,121,.38),inset 0 0 0 2px #141f31; }
@keyframes matchTimerCritical { 50% { background:#31101c; transform:scale(1.045); } }
.game-layout { width:min(1180px,100%); min-height:0; flex:1; display:grid; grid-template-columns:minmax(0,860px) minmax(260px,280px); justify-content:center; align-items:center; gap:30px; margin:auto; }
.arena-wrap { width:min(100%,820px); position:relative; padding:10px; background:#080f1a; border:4px solid #352c52; box-shadow:0 0 0 3px #0a0711, 0 0 0 5px #7761b4, 0 22px 55px rgba(0,0,0,.42), inset 0 0 0 2px #141f31; justify-self:end; }
.arena-wrap::before { content:""; position:absolute; left:8px; right:8px; top:5px; height:3px; background:linear-gradient(90deg,#c8ff50 0 8%,#5c4a8d 8% 92%,#ff6b70 92%); opacity:.85; }
.arena-wrap canvas { display:block; width:100%; height:auto; image-rendering:pixelated; image-rendering:crisp-edges; transform:translateZ(0); will-change:contents; }
.corner-mark { position:absolute; width:22px; height:22px; border-color:var(--lime); filter:drop-shadow(0 0 5px rgba(200,255,80,.35)); }
.corner-mark.top-left { left:-7px; top:-7px; border-left:4px solid; border-top:4px solid; }
.corner-mark.bottom-right { right:-7px; bottom:-7px; border-right:4px solid; border-bottom:4px solid; }
.match-sidebar { width:100%; max-height:100%; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#635078 transparent; }
.hud-player { display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:10px; padding:11px 14px; border-bottom:1px solid rgba(255,255,255,.06); }
.hud-player > img { width:36px; height:36px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 7px rgba(166,117,255,.32)); }
.hud-player b { font-size:11px; }
.hud-player small { display:block; color:#6d6678; font:500 8px Silkscreen; margin-top:3px; }
.hud-stats { display:flex; flex-wrap:wrap; gap:3px; margin-top:5px; }
.hud-stats i { padding:2px 3px; color:#a49aaa; border:1px solid #3c3447; background:#0d0a13; font:500 5px Silkscreen; font-style:normal; }
.hud-abilities { display:flex; flex-wrap:wrap; gap:3px; margin-top:4px; }
.hud-abilities i { min-width:17px; height:15px; display:grid; place-items:center; padding:0 3px; color:#15110b; background:#c8ff50; border:1px solid #e7ffaf; font:500 5px Silkscreen; font-style:normal; }
.hud-abilities i.full-fire { color:#fff; background:#ef365d; border-color:#ff8da4; }
.hud-abilities i.suit { color:#062232; background:#70edff; border-color:#eaffff; animation:protectionHud .5s steps(2,end) infinite alternate; }
@keyframes protectionHud { to { filter:brightness(1.35); box-shadow:0 0 8px #70edff; } }
.hud-player em { color:#8ca25c; font:500 8px Silkscreen; font-style:normal; }
.hud-player.dead { opacity:.35; }
.hud-player.edge-active { border-color:rgba(85,223,247,.55); box-shadow:inset 3px 0 #55dff7; }
.hud-player.edge-active > em { color:#55dff7; }
.edge-rescue { padding:11px 13px; border:1px solid rgba(85,223,247,.48); border-left:4px solid #55dff7; border-radius:5px; color:#c7f8ff; background:rgba(18,45,54,.74); font-size:12px; line-height:1.5; }
.hud-player.dead b { text-decoration:line-through; }
.controls-card { padding:18px 16px; background:#110e19; }
.controls-card > span { color:#70697d; font:500 8px Silkscreen; letter-spacing:.12em; }
.controls-card p { font:400 9px Silkscreen; color:#8d8699; }
kbd { display:inline-block; min-width:24px; text-align:center; padding:4px 5px; border:1px solid #4b4357; border-bottom-width:2px; background:#211a2d; border-radius:3px; color:#dcd6e6; font:500 8px Silkscreen; }
.sidebar-powerups { border-top:1px solid rgba(255,255,255,.08); background:#0d0b14; }
.sidebar-powerups summary { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; color:#90889d; font:500 8px Silkscreen; letter-spacing:.1em; cursor:pointer; }
.sidebar-powerups summary::marker { color:var(--lime); }
.sidebar-powerups summary span { display:grid; place-items:center; min-width:22px; height:20px; color:#15200b; background:var(--lime); }
.sidebar-powerups ul { list-style:none; margin:0; padding:0 12px 13px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.sidebar-powerups li { min-width:0; display:flex; align-items:center; gap:4px; color:#a49cac; font:500 6px/1.25 Silkscreen; }
.sidebar-powerups .powerup-icon { width:28px; height:28px; flex:0 0 auto; }
.touch-controls { display:none; }
.local-player-out .touch-controls { opacity:.35; filter:grayscale(1); pointer-events:none; }

/* Match opening countdown */
.match-pending .game-header { opacity:.25; transform:translateY(-12px); }
.match-pending .game-layout { opacity:.18; transform:scale(.92); filter:saturate(.45) blur(2px); }
.match-pending .touch-controls { opacity:0; }
.match-live .game-header { animation:matchHeaderIn .5s cubic-bezier(.16,1,.3,1) both; }
.match-live .arena-wrap { animation:arenaLaunchIn .62s cubic-bezier(.16,1,.3,1) both; }
.match-live .match-sidebar { animation:sidebarLaunchIn .58s cubic-bezier(.16,1,.3,1) .12s both; }
.match-live .touch-controls { animation:matchHeaderIn .45s ease-out .18s both; }
.match-intro { position:fixed; inset:0; z-index:40; display:grid; place-items:center; overflow:hidden; background:radial-gradient(circle at 50% 45%,rgba(48,35,80,.97),rgba(13,10,22,.985) 58%,#07060c 100%); transform:translateZ(0); will-change:opacity,transform; }
.match-intro-grid { position:absolute; inset:-50px; background:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size:42px 42px; mask-image:radial-gradient(circle,#000,transparent 72%); animation:matchGridDrift 5s linear infinite; }
.match-intro-burst { position:absolute; width:min(760px,92vw); aspect-ratio:1; border-radius:50%; background:repeating-conic-gradient(from -10deg,rgba(166,117,255,.14) 0 8deg,transparent 8deg 20deg); mask-image:radial-gradient(circle,transparent 0 22%,#000 35%,transparent 69%); animation:matchBurstSpin 18s linear infinite; }
.match-intro-content { width:min(720px,92vw); position:relative; z-index:2; display:grid; justify-items:center; text-align:center; }
.match-intro-kicker { margin-bottom:14px; padding:7px 13px; color:var(--lime); border:1px solid rgba(200,255,80,.25); background:rgba(7,6,12,.56); font:500 8px Silkscreen; letter-spacing:.17em; animation:matchIntroCopyIn .42s ease-out both; }
.match-intro-logo { width:min(440px,72vw); position:relative; display:grid; place-items:center; animation:matchLogoIn .62s cubic-bezier(.16,1,.3,1) .06s both; }
.match-intro-logo > i { position:absolute; width:68%; height:50%; border-radius:50%; background:rgba(166,117,255,.38); filter:blur(38px); animation:matchLogoGlow 1.1s ease-in-out infinite; }
.match-intro-logo img { width:100%; position:relative; filter:drop-shadow(0 20px 28px rgba(0,0,0,.48)); }
.countdown-stage { min-height:158px; position:relative; display:grid; justify-items:center; align-content:center; margin-top:8px; animation:matchIntroCopyIn .18s ease-out both; }
.countdown-stage > span { color:#938b9f; font:500 8px Silkscreen; letter-spacing:.2em; }
.countdown-stage > b { min-width:190px; margin:6px 0 0; color:#fff; font:400 clamp(72px,11vw,118px)/.9 Silkscreen; letter-spacing:-.1em; text-indent:-.1em; text-shadow:7px 8px 0 #17101f,0 0 32px rgba(166,117,255,.48); }
.countdown-stage > b.count-pop { animation:countPop .34s cubic-bezier(.16,1,.3,1); }
.go-signal { position:absolute; z-index:7; left:50%; top:52%; opacity:0; color:var(--lime); font:400 clamp(72px,11vw,118px)/.9 Silkscreen; letter-spacing:-.08em; text-shadow:7px 8px 0 #17200e,0 0 42px rgba(200,255,80,.68); transform:translate(-50%,-50%) scale(.35); pointer-events:none; }
.match-intro.launching .go-signal { animation:goReveal .42s cubic-bezier(.16,1,.3,1) both,goHold .72s ease-in-out .42s infinite alternate; }
.countdown-stage > em { color:var(--lime); font:500 8px Silkscreen; font-style:normal; letter-spacing:.18em; }
.match-intro-roster { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:9px; animation:matchIntroCopyIn .5s ease-out .34s both; }
.match-intro-roster > span { width:58px; height:58px; position:relative; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--intro-color),transparent 48%); border-bottom:3px solid var(--intro-color); background:rgba(12,9,19,.76); box-shadow:0 8px 20px rgba(0,0,0,.24); }
.match-intro-roster img { width:46px; height:46px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 7px color-mix(in srgb,var(--intro-color),transparent 35%)); }
.match-intro-roster b { position:absolute; right:3px; bottom:2px; color:#7f778c; font:500 6px Silkscreen; }
.match-intro.launching .match-intro-burst { animation-duration:1.2s; }
.match-intro.launching .countdown-stage > b { min-width:300px; color:var(--lime); font-size:clamp(62px,10vw,104px); text-shadow:7px 8px 0 #17200e,0 0 42px rgba(200,255,80,.58); }
.match-intro.launching::after { content:""; position:absolute; inset:0; background:#f5ffda; opacity:0; animation:matchFlash .44s ease-out; pointer-events:none; }
.match-intro.leaving { animation:matchIntroLeave .42s cubic-bezier(.4,0,.2,1) .45s forwards; pointer-events:none; }
@keyframes matchLogoIn { from { opacity:0; transform:translateY(18px) scale(.74); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes matchIntroCopyIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes countPop { 0% { opacity:.25; transform:scale(.58) translateY(10px); } 72% { opacity:1; transform:scale(1.12) translateY(0); } 100% { transform:scale(1); } }
@keyframes goReveal { 0% { opacity:0; transform:translate(-50%,-50%) scale(.35) rotate(-5deg); } 68% { opacity:1; transform:translate(-50%,-50%) scale(1.16) rotate(2deg); } 100% { opacity:1; transform:translate(-50%,-50%) scale(1); } }
@keyframes goHold { from { filter:brightness(1); } to { filter:brightness(1.35) drop-shadow(0 0 20px rgba(200,255,80,.58)); } }
@media (prefers-reduced-motion: reduce) { .match-intro.launching .go-signal { opacity:1; transform:translate(-50%,-50%); animation:none; } }
@keyframes matchLogoGlow { 0%,100% { opacity:.38; transform:scale(.9); } 50% { opacity:.82; transform:scale(1.08); } }
@keyframes matchGridDrift { to { transform:translate3d(42px,42px,0); } }
@keyframes matchBurstSpin { to { transform:rotate(360deg); } }
@keyframes matchFlash { 0% { opacity:0; } 28% { opacity:.3; } 100% { opacity:0; } }
@keyframes matchIntroLeave { to { opacity:0; transform:scale(1.04); } }
@keyframes matchHeaderIn { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:translateY(0); } }
@keyframes arenaLaunchIn { from { opacity:.2; transform:scale(.88) translateY(22px); filter:saturate(.45) blur(2px); } to { opacity:1; transform:scale(1) translateY(0); filter:none; } }
@keyframes sidebarLaunchIn { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:translateX(0); } }

/* Result and error states */
.result-overlay { position:fixed; inset:0; z-index:20; display:grid; place-items:center; padding:20px; background:rgba(8,6,13,.85); backdrop-filter:blur(10px); }
.result-card { width:min(500px,100%); text-align:center; padding:34px; border:1px solid rgba(166,117,255,.35); background:linear-gradient(145deg,#221a31,#110d1a); border-radius:8px; box-shadow:0 30px 100px #000; }
.retro-result { border:4px solid #0a0711; outline:3px solid #7962b3; border-radius:0; background:#11101f; box-shadow:8px 8px 0 #08060d, 0 30px 100px #000; overflow:hidden; }
.retro-result .card-kicker { margin-bottom:8px; color:var(--lime); }
.victory-stage { height:132px; display:grid; place-items:center; margin:0 auto 4px; background:radial-gradient(circle,rgba(139,92,246,.18),transparent 65%); }
.victory-stage canvas { width:140px; height:130px; image-rendering:pixelated; image-rendering:crisp-edges; }
.retro-result-message { position:relative; display:flex; justify-content:center; flex-wrap:wrap; gap:.25em; margin:0; padding:15px 13px 13px; color:#fff; border:4px solid #f3f1ff; outline:3px solid #30264a; background:#070914; box-shadow:5px 5px 0 #725ab0; font:500 clamp(18px,5vw,30px)/1.15 Silkscreen,monospace; letter-spacing:-.05em; text-transform:uppercase; opacity:0; transform:scale(.75); animation:retroMessageIn .45s steps(5,end) .72s forwards; }
.retro-result-message::after { content:""; width:8px; height:15px; margin-left:3px; align-self:center; background:var(--lime); animation:retroCursor .7s steps(1,end) 1.2s infinite; }
.retro-result-message span { color:#fff; }
.retro-result-message b { color:var(--lime); font-weight:500; }
.retro-result-message.immediate { animation-delay:.1s; }
.draw-burst { width:90px; height:90px; margin:18px auto; display:grid; place-items:center; border:4px solid #ff6b8b; color:#ff6b8b; font:500 68px/.8 Silkscreen; transform:rotate(45deg); }
.draw-burst::first-letter { transform:rotate(-45deg); }
.result-subtitle { margin:22px 0 4px; }
.result-actions { opacity:0; animation:resultActionsIn .35s ease 1.3s forwards; }
.result-card .primary { margin-top:18px; }
@keyframes retroMessageIn { 0% { opacity:0; transform:scale(.75); } 60% { opacity:1; transform:scale(1.06); } 100% { opacity:1; transform:scale(1); } }
@keyframes retroCursor { 0%,45% { opacity:1; } 46%,100% { opacity:0; } }
@keyframes resultActionsIn { to { opacity:1; } }
.error-code { color:#ff6b8b; font:500 10px Silkscreen; letter-spacing:.14em; }
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:50; padding:13px 18px; border:1px solid var(--line); border-radius:5px; background:#1e182a; font:500 11px Silkscreen; }
.toast.danger { border-color:#ff6b8b; color:#ff9cae; }

@media (max-width: 900px) {
  .lobby-grid { grid-template-columns:1fr; }
  .lobby-heading { grid-template-columns:1fr; margin-top:48px; gap:26px; }
  .lobby-squad-card { width:min(100%,430px); grid-template-columns:1fr auto; }
  .lobby-actions { flex-wrap:wrap; }
  .lobby-action-copy { flex:1 0 100%; padding:3px 2px 6px; }
  .game-shell { height:auto; min-height:100svh; overflow-x:hidden; overflow-y:auto; }
  .game-layout { grid-template-columns:1fr; width:100%; }
  .arena-wrap { justify-self:center; width:min(100%,760px); }
  .match-sidebar { width:min(100%,760px); justify-self:center; }
  .game-header { grid-template-columns:1fr auto; }
  .match-label { display:none; }
}

@media (hover:none), (max-width:680px), (orientation:landscape) and (max-height:560px) and (max-width:1000px) {
  .game-shell { min-height:100svh; padding:10px 8px 126px; }
  .game-header { padding:0 3px 10px; }
  .game-header .brand { width:138px; }
  .game-layout { display:block; }
  .match-sidebar { margin-top:12px; }
  .controls-card { display:none; }
  .touch-controls { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; justify-content:space-between; align-items:end; width:100%; margin:0; padding:9px max(14px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); border-top:1px solid rgba(166,117,255,.2); background:linear-gradient(180deg,rgba(9,7,15,.25),rgba(9,7,15,.94) 28%); backdrop-filter:blur(8px); }
  .dpad { width:148px; display:grid; grid-template-columns:repeat(3,46px); grid-template-rows:repeat(2,46px); gap:4px; }
  .dpad button, .bomb-button { touch-action:none; user-select:none; -webkit-user-select:none; border:1px solid #635674; background:linear-gradient(#292035,#181320); color:var(--ink); border-radius:8px; font-size:19px; font-weight:800; box-shadow:inset 0 -3px 0 rgba(0,0,0,.35); }
  .dpad button[data-action="up"] { grid-column:2; grid-row:1; }
  .dpad button[data-action="left"] { grid-column:1; grid-row:2; }
  .dpad button[data-action="down"] { grid-column:2; grid-row:2; }
  .dpad button[data-action="right"] { grid-column:3; grid-row:2; }
  .dpad button:active,.bomb-button:active,.power-buttons button:active { filter:brightness(1.4); transform:translateY(2px) scale(.96); }
  .bomb-button { width:86px; height:86px; border-radius:50%; border:2px solid #ff6b8b; color:#ff9bad; box-shadow:inset 0 -5px 0 rgba(80,10,30,.45),0 0 24px rgba(255,107,139,.22); font:500 9px Silkscreen; }
  .power-buttons { display:grid; gap:6px; align-self:center; }
  .power-buttons button { width:66px; min-height:38px; touch-action:none; border:1px solid #8a65c5; border-bottom:3px solid #3d285f; border-radius:6px; color:#d9c8ff; background:#241735; font:500 6px Silkscreen; }
}

@media (orientation:landscape) and (max-height:560px) and (max-width:1000px) {
  .game-shell { padding:6px 108px; overflow:hidden; }
  .game-header { position:fixed; top:8px; right:10px; z-index:24; width:auto; padding:0; }
  .game-header .brand,.match-label { display:none; }
  .game-layout { min-height:calc(100svh - 12px); display:grid; place-items:center; }
  .arena-wrap { width:min(calc(118svh - 36px),calc(100vw - 230px)); }
  .match-sidebar { display:none; }
  .touch-controls { inset:0; align-items:center; padding:8px 14px; border:0; background:none; backdrop-filter:none; pointer-events:none; }
  .touch-controls button { pointer-events:auto; }
}

@media (max-width: 600px) {
  .lobby-shell { padding:22px 16px 35px; }
  .lobby-nav .brand { width:155px; }
  .room-chip { padding:7px 10px; }
  .room-chip span { display:none; }
  .lobby-heading { margin-top:42px; }
  .lobby-heading h2 { font-size:12vw; }
  .lobby-heading p { font-size:14px; }
  .lobby-squad-card { min-height:142px; padding:18px; }
  .mode-panel { grid-template-columns:1fr; padding:14px; }
  .mode-options { grid-template-columns:1fr; }
  .mode-card { min-height:78px; grid-template-columns:44px 1fr auto; }
  .mode-card .mode-icon { width:42px; height:44px; }
  .player-slot { grid-template-columns:24px 36px 1fr; padding:9px 10px; gap:8px; }
  .player-slot > img { width:35px; height:35px; }
  .player-slot > i { width:32px; height:32px; }
  .player-slot em { grid-column:3; font-size:7px; margin-top:-12px; }
  .player-slot mark { display:block; width:max-content; margin:4px 0 0; }
  .lobby-actions { justify-content:stretch; }
  .lobby-actions button { flex:1; }
  .start-button { width:auto; }
  .invite-panel { padding:19px; }
  .room-pass { grid-template-columns:48px 1fr; gap:13px; padding:13px; }
  .pass-pixels { width:46px; height:46px; }
  .transition-tip { bottom:25px; font-size:6px; }
  .match-intro-logo { width:min(360px,78vw); }
  .countdown-stage { min-height:142px; }
  .countdown-stage > b { min-width:150px; }
  .match-intro.launching .countdown-stage > b { min-width:220px; }
  .match-intro-roster > span { width:50px; height:50px; }
  .match-intro-roster img { width:40px; height:40px; }
}

/* Battle results and persistent room trophies */
.player-slot { grid-template-columns:34px 44px 1fr auto auto; }
.slot-trophies { min-width:52px; display:flex; align-items:center; justify-content:center; gap:5px; padding:6px 8px; border:1px solid rgba(255,210,70,.24); background:rgba(255,190,35,.06); color:#ffe06b; box-shadow:inset 0 -2px 0 rgba(0,0,0,.2); }
.slot-trophies img { width:21px; height:23px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 2px 0 #4b2600); }
.slot-trophies b { color:#ffe06b; font:500 10px Silkscreen; }

.battle-result-overlay { z-index:60; place-items:start center; overflow:auto; padding:clamp(18px,4vh,44px) 18px; background:radial-gradient(circle at 50% 12%,rgba(89,55,165,.62),transparent 36%),linear-gradient(180deg,rgba(6,5,20,.97),rgba(12,7,35,.99) 64%,#05040d); backdrop-filter:blur(8px); }
.battle-result-overlay::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.3; background:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:32px 32px; mask-image:linear-gradient(#000,transparent 92%); }
.battle-result-board { width:min(860px,100%); position:relative; z-index:2; margin:auto; padding:24px; border:4px solid #080611; outline:3px solid #7359b0; background:linear-gradient(180deg,#15112c 0 106px,#0b0918 106px); box-shadow:8px 8px 0 #030208,0 34px 110px #000; overflow:visible; animation:battleBoardIn .65s cubic-bezier(.16,1,.3,1) both; }
.battle-result-board::after { content:""; position:absolute; inset:8px; z-index:-1; pointer-events:none; border:1px solid rgba(190,158,255,.13); }
.battle-result-header { position:relative; text-align:center; padding:3px 12px 22px; animation:battleHeaderIn .55s steps(7,end) .18s both; }
.battle-result-header > span { display:inline-block; color:var(--lime); font:500 8px Silkscreen; letter-spacing:.18em; text-shadow:0 0 14px rgba(200,255,80,.45); }
.battle-result-header h2 { margin:8px 0 7px; color:#fff; font:500 clamp(34px,6vw,64px)/.92 Silkscreen; letter-spacing:-.08em; text-shadow:6px 7px 0 #3a255e,0 0 28px rgba(170,116,255,.34); }
.battle-result-header p { margin:0; color:#aaa2b8; font:400 clamp(9px,1.8vw,13px)/1.5 Silkscreen; }
.battle-ranking { display:grid; gap:8px; }
.battle-rank-row { min-height:82px; position:relative; display:grid; grid-template-columns:64px 96px minmax(0,1fr) 150px; align-items:center; padding:8px 18px 8px 8px; border:1px solid rgba(255,255,255,.09); border-left:5px solid var(--rank-color); background:linear-gradient(90deg,color-mix(in srgb,var(--rank-color),transparent 88%),rgba(255,255,255,.025)); box-shadow:inset 0 -3px 0 rgba(0,0,0,.26); opacity:0; animation:battleRankIn .48s steps(7,end) var(--rank-delay) forwards; }
.battle-rank-row.champion { min-height:106px; border-color:rgba(255,221,86,.35); border-left-color:#ffd94d; background:linear-gradient(90deg,rgba(255,197,48,.2),rgba(255,255,255,.055) 62%,rgba(255,197,48,.08)); box-shadow:inset 0 -4px 0 rgba(0,0,0,.3),0 0 28px rgba(255,196,45,.1); }
.battle-position { color:#8d849d; text-align:center; font:500 20px Silkscreen; text-shadow:3px 3px 0 #05040a; }
.champion .battle-position { color:#ffe468; font-size:27px; }
.battle-character { width:90px; height:76px; position:relative; display:grid; place-items:center; overflow:visible; }
.battle-avatar { width:68px; height:68px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 5px 0 rgba(0,0,0,.4)); }
.champion .battle-avatar { width:78px; height:78px; animation:championCelebrate .82s steps(4,end) 2.15s infinite; }
.crying .battle-avatar { animation:loserSob .72s steps(3,end) 1.2s infinite; filter:saturate(.72) drop-shadow(0 5px 0 rgba(0,0,0,.45)); }
.tear { width:5px; height:11px; position:absolute; top:39px; z-index:3; background:#5ce3ff; box-shadow:0 3px 0 #2379c7; opacity:0; animation:tearDrop .9s steps(4,end) calc(var(--rank-delay) + .55s) infinite; }
.tear-left { left:29px; }
.tear-right { right:29px; animation-delay:calc(var(--rank-delay) + .72s); }
.trophy-flight { width:66px; height:72px; position:absolute; left:44px; top:-3px; z-index:5; opacity:0; pointer-events:none; animation:trophyTravel 1.45s steps(12,end) .72s forwards; }
.trophy-flight img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 5px 0 #673600) drop-shadow(0 0 10px rgba(255,222,77,.55)); animation:trophyIdle .68s steps(3,end) 2.17s infinite alternate; }
.battle-player-copy { min-width:0; padding-left:5px; }
.battle-player-copy strong { display:block; overflow:hidden; color:#f8f5ff; font:500 clamp(12px,2.2vw,18px) Silkscreen; text-overflow:ellipsis; white-space:nowrap; text-shadow:3px 3px 0 rgba(0,0,0,.65); }
.battle-player-copy small { display:block; margin-top:7px; color:#766e82; font:500 7px Silkscreen; letter-spacing:.13em; }
.champion .battle-player-copy small { color:#ffe05a; }
.battle-trophy-total { display:flex; align-items:center; justify-content:flex-end; gap:9px; padding:8px 10px; border-left:1px solid rgba(255,255,255,.08); }
.battle-trophy-total > img { width:38px; height:42px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 3px 0 #553000); }
.battle-trophy-total span { min-width:50px; }
.battle-trophy-total b { display:block; color:#ffe162; font:500 21px/1 Silkscreen; }
.battle-trophy-total small { display:block; margin-top:5px; color:#777080; font:500 6px Silkscreen; }
.battle-result-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:20px; opacity:0; animation:battleActionsIn .42s ease 2.3s forwards; }
.battle-result-actions button { min-height:68px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 16px; border:3px solid #08060d; outline:2px solid currentColor; color:#fff; font-family:Silkscreen; text-align:left; cursor:pointer; transition:filter .15s ease,transform .15s ease; }
.battle-result-actions button span { font:500 12px/1.25 Silkscreen; }
.battle-result-actions button small { display:block; margin-bottom:4px; color:rgba(255,255,255,.66); font:500 6px Silkscreen; letter-spacing:.12em; }
.battle-result-actions button > b { font:500 28px Silkscreen; }
.battle-result-actions button:hover { filter:brightness(1.16); transform:translateY(-3px); }
.battle-result-actions button:active { transform:translateY(2px); }
.battle-result-actions button:disabled { cursor:wait; filter:saturate(.3); transform:none; }
.result-rematch-button { outline-color:#c8ff50 !important; background:linear-gradient(#9edb30,#4f9718); box-shadow:0 6px 0 #224a0e,0 0 24px rgba(200,255,80,.12); }
.result-exit-button { outline-color:#ff7681 !important; background:linear-gradient(#ff6674,#be243d); box-shadow:0 6px 0 #661323,0 0 24px rgba(255,74,92,.12); }
.battle-result-actions .host-wait { min-height:68px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(200,255,80,.18); background:rgba(200,255,80,.035); }
.result-pixel-rain { position:fixed; inset:0; overflow:hidden; pointer-events:none; }
.result-pixel-rain i { width:9px; height:9px; position:absolute; top:-20px; left:var(--rain-x); background:var(--rain-color); box-shadow:12px 12px 0 color-mix(in srgb,var(--rain-color),transparent 35%); animation:resultPixelRain var(--rain-speed) steps(16,end) var(--rain-delay) infinite; }
.result-pixel-rain i:nth-child(1) { --rain-x:10%; --rain-color:#c8ff50; --rain-speed:4.4s; --rain-delay:.2s; }
.result-pixel-rain i:nth-child(2) { --rain-x:28%; --rain-color:#ffda54; --rain-speed:5.2s; --rain-delay:1.1s; }
.result-pixel-rain i:nth-child(3) { --rain-x:53%; --rain-color:#a675ff; --rain-speed:4.8s; --rain-delay:.6s; }
.result-pixel-rain i:nth-child(4) { --rain-x:76%; --rain-color:#4bdff2; --rain-speed:5.6s; --rain-delay:1.8s; }
.result-pixel-rain i:nth-child(5) { --rain-x:91%; --rain-color:#ff6c82; --rain-speed:4.2s; --rain-delay:1.3s; }

@keyframes battleBoardIn { 0% { opacity:0; transform:translateY(44px) scale(.86); } 68% { opacity:1; transform:translateY(-7px) scale(1.015); } 100% { opacity:1; transform:none; } }
@keyframes battleHeaderIn { from { opacity:0; transform:translateY(-18px); } to { opacity:1; transform:none; } }
@keyframes battleRankIn { 0% { opacity:0; transform:translateX(-46px); } 75% { opacity:1; transform:translateX(7px); } 100% { opacity:1; transform:none; } }
@keyframes championCelebrate { 0%,100% { transform:translateY(0) rotate(0); } 25% { transform:translateY(-9px) rotate(-3deg); } 50% { transform:translateY(-2px) rotate(3deg); } 75% { transform:translateY(-11px) rotate(0); } }
@keyframes loserSob { 0%,100% { transform:translateX(0) translateY(1px); } 33% { transform:translateX(-2px) translateY(4px); } 66% { transform:translateX(2px) translateY(3px); } }
@keyframes tearDrop { 0% { opacity:0; transform:translateY(-4px) scaleY(.5); } 18%,70% { opacity:1; } 100% { opacity:0; transform:translateY(27px) scaleY(1.35); } }
@keyframes trophyTravel { 0% { opacity:0; transform:translate(560px,-84px) scale(.42) rotate(10deg); } 10% { opacity:1; } 25% { transform:translate(420px,7px) scale(.58) rotate(-8deg); } 42% { transform:translate(300px,-48px) scale(.72) rotate(7deg); } 59% { transform:translate(205px,6px) scale(.84) rotate(-5deg); } 76% { transform:translate(118px,-28px) scale(.93) rotate(3deg); } 90% { transform:translate(63px,3px) scale(1.02); } 100% { opacity:1; transform:translate(38px,-4px) scale(1); } }
@keyframes trophyIdle { from { transform:translateY(0) rotate(-2deg); } to { transform:translateY(-7px) rotate(2deg); } }
@keyframes battleActionsIn { from { opacity:0; transform:translateY(15px); } to { opacity:1; transform:none; } }
@keyframes resultPixelRain { to { transform:translateY(110vh) rotate(720deg); } }

@media (max-width: 680px) {
  .battle-result-overlay { padding:12px 9px; }
  .battle-result-board { padding:15px 10px; }
  .battle-result-header { padding-bottom:15px; }
  .battle-rank-row { grid-template-columns:38px 63px minmax(0,1fr) 76px; min-height:70px; padding:6px 7px 6px 3px; }
  .battle-rank-row.champion { min-height:88px; }
  .battle-character { width:61px; height:60px; }
  .battle-avatar { width:54px; height:54px; }
  .champion .battle-avatar { width:62px; height:62px; }
  .battle-position { font-size:13px; }
  .champion .battle-position { font-size:17px; }
  .battle-player-copy strong { font-size:10px; }
  .battle-player-copy small { font-size:5px; letter-spacing:.05em; }
  .battle-trophy-total { gap:4px; padding:5px; }
  .battle-trophy-total > img { width:26px; height:30px; }
  .battle-trophy-total b { font-size:14px; }
  .battle-trophy-total small { font-size:5px; }
  .trophy-flight { width:52px; height:58px; left:22px; }
  .tear-left { left:18px; }
  .tear-right { right:18px; }
  .battle-result-actions { grid-template-columns:1fr; }
  .battle-result-actions button { min-height:58px; }
  .player-slot { grid-template-columns:24px 36px minmax(0,1fr) auto; }
  .slot-trophies { grid-column:4; grid-row:1; min-width:45px; padding:5px 6px; }
  .player-slot em { grid-column:3; }
}

@media (prefers-reduced-motion: reduce) {
  .battle-result-board,.battle-result-header,.battle-rank-row,.battle-result-actions { opacity:1; transform:none; animation:none; }
  .champion .battle-avatar,.crying .battle-avatar,.tear,.trophy-flight,.trophy-flight img,.result-pixel-rain i { animation:none; }
  .trophy-flight { opacity:1; transform:translate(38px,-4px); }
}



/* Synchronized winner presentation */
.winner-celebration { position:fixed; inset:0; z-index:70; display:grid; place-items:center; align-content:center; overflow:hidden; text-align:center; background:radial-gradient(circle at 50% 46%,rgba(104,65,196,.72),transparent 28%),linear-gradient(180deg,rgba(5,4,18,.98),rgba(12,7,34,.99)); animation:winnerStageIn .4s steps(6,end) both; }
.winner-celebration::before { content:""; position:absolute; inset:-20%; background:repeating-conic-gradient(from -8deg,rgba(200,255,80,.1) 0 5deg,transparent 5deg 14deg); mask-image:radial-gradient(circle,#000 0 31%,transparent 66%); animation:winnerStageSpin 12s linear infinite; }
.winner-celebration-burst { width:min(460px,92vw); aspect-ratio:1; position:absolute; border:3px solid rgba(200,255,80,.14); border-radius:50%; box-shadow:0 0 0 18px rgba(166,117,255,.06),0 0 80px rgba(166,117,255,.25); animation:winnerBurst 1.05s steps(6,end) infinite alternate; }
.winner-celebration > span { position:relative; z-index:2; margin-bottom:8px; padding:7px 11px; color:var(--lime); border:1px solid rgba(200,255,80,.24); background:rgba(5,4,15,.64); font:500 8px Silkscreen; letter-spacing:.18em; }
.winner-celebration canvas { width:min(336px,76vw); height:auto; position:relative; z-index:2; image-rendering:pixelated; filter:drop-shadow(0 18px 0 rgba(0,0,0,.24)) drop-shadow(0 0 28px rgba(200,255,80,.18)); }
.winner-celebration h2 { position:relative; z-index:2; margin:4px 0 5px; color:#fff; font:500 clamp(25px,5vw,52px)/1 Silkscreen; letter-spacing:-.07em; text-shadow:6px 7px 0 #3a245d; }
.winner-celebration h2 b { color:var(--lime); font-weight:500; }
.winner-celebration p { position:relative; z-index:2; margin:0; color:#9b93aa; font:400 clamp(8px,1.6vw,11px)/1.5 Silkscreen; }
.winner-celebration.leaving { pointer-events:none; animation:winnerStageOut .48s cubic-bezier(.4,0,.2,1) forwards; }

/* Time-up draw presentation */
.draw-celebration { position:fixed; inset:0; z-index:70; display:grid; place-items:center; overflow:hidden; color:#fff; text-align:center; background:radial-gradient(circle at 50% 48%,rgba(83,62,157,.52),transparent 33%),linear-gradient(115deg,#090716 0 49.6%,#15102d 49.7% 50.3%,#070e19 50.4% 100%); animation:drawStageIn .38s steps(6,end) both; }
.draw-celebration::before,.draw-celebration::after { content:""; position:absolute; inset:-12%; pointer-events:none; }
.draw-celebration::before { background:repeating-linear-gradient(0deg,transparent 0 5px,rgba(255,255,255,.025) 5px 6px); animation:drawScan .45s linear infinite; }
.draw-celebration::after { background:linear-gradient(90deg,transparent 0 46%,rgba(166,117,255,.11) 48%,rgba(85,223,247,.12) 52%,transparent 54%); animation:drawFlash .8s steps(2,end) infinite; }
.draw-grid { position:absolute; inset:-48px; opacity:.38; background:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px); background-size:36px 36px; transform:perspective(500px) rotateX(58deg) translateY(30%); animation:drawGridRush 1.3s linear infinite; }
.draw-divider { position:absolute; top:-10%; bottom:-10%; left:50%; width:5px; background:linear-gradient(transparent,#a675ff 18%,#fff 50%,#55dff7 82%,transparent); box-shadow:0 0 22px #a675ff,0 0 46px rgba(85,223,247,.58); transform:rotate(8deg) scaleY(0); animation:drawDividerIn .55s steps(6,end) .15s forwards; }
.draw-content { width:min(880px,94vw); position:relative; z-index:2; display:grid; justify-items:center; }
.draw-kicker { padding:8px 13px; color:#ffd35a; border:1px solid rgba(255,211,90,.38); background:rgba(7,6,16,.78); font:500 8px Silkscreen; letter-spacing:.22em; opacity:0; animation:drawCopyIn .32s steps(5,end) .18s forwards; }
.draw-clock { min-width:220px; margin:15px 0 10px; padding:10px 22px 8px; display:grid; gap:4px; border:4px solid #080610; outline:2px solid #8c6cd5; background:#0a0813; box-shadow:7px 7px 0 rgba(0,0,0,.55),0 0 35px rgba(166,117,255,.2); opacity:0; animation:drawClockDrop .52s steps(7,end) .34s forwards,drawClockAlarm .44s steps(2,end) 1.05s 3; }
.draw-clock small { color:#81788f; font:500 7px Silkscreen; letter-spacing:.18em; }
.draw-clock b { color:#fff; font:500 clamp(38px,7vw,68px)/.9 Silkscreen; letter-spacing:-.08em; text-shadow:5px 5px 0 #3b285f,0 0 22px rgba(85,223,247,.3); }
.draw-contenders { min-height:104px; display:flex; justify-content:center; align-items:end; gap:clamp(6px,2vw,18px); margin:3px 0 6px; }
.draw-contenders article { width:clamp(78px,14vw,126px); position:relative; display:grid; justify-items:center; padding:9px 7px 8px; border:1px solid color-mix(in srgb,var(--draw-color),transparent 36%); border-bottom:4px solid var(--draw-color); background:rgba(10,8,20,.86); box-shadow:0 10px 24px rgba(0,0,0,.35),0 0 18px color-mix(in srgb,var(--draw-color),transparent 80%); opacity:0; animation:drawContenderLeft .48s steps(7,end) calc(.72s + var(--draw-delay)) forwards,drawContenderFloat .7s steps(3,end) 1.55s infinite alternate; }
.draw-contenders article:nth-child(even) { animation-name:drawContenderRight,drawContenderFloat; }
.draw-contenders article > i { position:absolute; inset:5px; border:1px dashed color-mix(in srgb,var(--draw-color),transparent 66%); }
.draw-contenders img { width:clamp(54px,9vw,82px); height:clamp(54px,9vw,82px); object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 10px color-mix(in srgb,var(--draw-color),transparent 34%)); }
.draw-contenders b { max-width:100%; overflow:hidden; margin-top:4px; color:#f6f2ff; font:500 clamp(6px,1.2vw,9px) Silkscreen; text-overflow:ellipsis; white-space:nowrap; }
.draw-content h2 { position:relative; margin:5px 0 3px; font:500 clamp(54px,11vw,112px)/.82 Silkscreen; letter-spacing:-.12em; text-shadow:8px 9px 0 #090611; opacity:0; animation:drawTitleSmash .5s steps(7,end) 1.18s forwards,drawTitleGlitch .75s steps(2,end) 1.82s infinite; }
.draw-content h2 span { color:#a675ff; }
.draw-content h2 b { color:#55dff7; font-weight:500; }
.draw-content p { margin:9px 0 0; color:#a79fb2; font:400 clamp(7px,1.5vw,10px)/1.5 Silkscreen; opacity:0; animation:drawCopyIn .35s ease 1.48s forwards; }
.draw-celebration.leaving { pointer-events:none; animation:drawStageOut .48s steps(6,end) forwards; }

@keyframes drawStageIn { from { opacity:0; filter:brightness(2); } to { opacity:1; filter:none; } }
@keyframes drawStageOut { to { opacity:0; transform:scale(1.06); filter:brightness(1.7) saturate(.2); } }
@keyframes drawScan { to { transform:translateY(6px); } }
@keyframes drawFlash { 50% { opacity:.38; transform:translateX(1.5%); } }
@keyframes drawGridRush { to { background-position:0 36px,36px 0; } }
@keyframes drawDividerIn { to { transform:rotate(8deg) scaleY(1); } }
@keyframes drawCopyIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes drawClockDrop { 0% { opacity:0; transform:translateY(-45px) scale(.72); } 70% { opacity:1; transform:translateY(7px) scale(1.04); } 100% { opacity:1; transform:none; } }
@keyframes drawClockAlarm { 25% { transform:translateX(-5px) rotate(-1deg); } 75% { transform:translateX(5px) rotate(1deg); } }
@keyframes drawContenderLeft { from { opacity:0; transform:translateX(-90px) rotate(-5deg); } to { opacity:1; transform:none; } }
@keyframes drawContenderRight { from { opacity:0; transform:translateX(90px) rotate(5deg); } to { opacity:1; transform:none; } }
@keyframes drawContenderFloat { from { translate:0 0; } to { translate:0 -7px; } }
@keyframes drawTitleSmash { 0% { opacity:0; transform:scale(2.2); filter:blur(5px); } 72% { opacity:1; transform:scale(.92); filter:none; } 100% { opacity:1; transform:none; } }
@keyframes drawTitleGlitch { 50% { transform:translateX(3px); text-shadow:-5px 0 #ff6380,5px 0 #55dff7,8px 9px 0 #090611; } }

.battle-result-overlay { z-index:65; overflow-x:hidden; }
.battle-result-board { margin:8px auto 24px; }
.battle-character { width:96px; height:82px; }
.battle-avatar.result-character-canvas { width:96px; height:82px; object-fit:initial; image-rendering:pixelated; filter:none; }
.champion .battle-avatar.result-character-canvas,
.crying .battle-avatar.result-character-canvas { animation:none; filter:none; }
.battle-rank-row.tied { border-left-color:var(--rank-color); background:linear-gradient(90deg,color-mix(in srgb,var(--rank-color),transparent 82%),rgba(85,223,247,.035)); }
.tied .battle-position { color:#55dff7; }
.tied .battle-player-copy small { color:#9b86d8; }
.draw-result-avatar { width:68px; height:68px; object-fit:contain; animation:drawResultIdle .72s steps(3,end) infinite alternate; filter:drop-shadow(0 5px 0 rgba(0,0,0,.42)) drop-shadow(0 0 9px color-mix(in srgb,var(--rank-color),transparent 52%)); }
@keyframes drawResultIdle { to { transform:translateY(-6px); } }
.trophy-flight { width:34px; height:39px; left:59px; top:19px; opacity:0; animation:trophyFlightSynced var(--trophy-duration,2380ms) steps(15,end) var(--trophy-delay,520ms) forwards,trophyAwardFade .28s steps(3,end) calc(var(--trophy-delay,520ms) + var(--trophy-duration,2380ms) + 720ms) forwards; }
.trophy-flight img { width:100%; height:100%; animation:trophyLandingPulse .56s steps(3,end) calc(var(--trophy-delay,520ms) + var(--trophy-duration,2380ms)) 2 alternate; filter:drop-shadow(0 4px 0 #673600) drop-shadow(0 0 10px rgba(255,222,77,.65)); }
.champion .battle-trophy-total > img { opacity:0; animation:counterTrophyIn .38s steps(5,end) calc(var(--trophy-delay,520ms) + var(--trophy-duration,2380ms)) forwards; }
.battle-result-actions { animation-delay:3.15s; }

@keyframes winnerStageIn { 0% { opacity:0; transform:scale(.82); } 70% { opacity:1; transform:scale(1.035); } 100% { opacity:1; transform:none; } }
@keyframes winnerStageOut { to { opacity:0; transform:scale(1.08); filter:brightness(1.6); } }
@keyframes winnerStageSpin { to { transform:rotate(360deg); } }
@keyframes winnerBurst { from { opacity:.36; transform:scale(.88); } to { opacity:.76; transform:scale(1.05); } }
@keyframes trophyFlightSynced {
  0% { opacity:0; transform:translate(540px,-95px) scale(.42) rotate(12deg); }
  7% { opacity:1; }
  20% { transform:translate(425px,-7px) scale(.55) rotate(-9deg); }
  34% { transform:translate(330px,-55px) scale(.67) rotate(8deg); }
  48% { transform:translate(242px,-4px) scale(.78) rotate(-6deg); }
  62% { transform:translate(165px,-39px) scale(.86) rotate(5deg); }
  76% { transform:translate(99px,-5px) scale(.93) rotate(-3deg); }
  88% { transform:translate(47px,-24px) scale(.98) rotate(2deg); }
  96% { transform:translate(13px,-7px) scale(1.04) rotate(-1deg); }
  100% { opacity:1; transform:translate(0,-12px) scale(1) rotate(0); }
}
@keyframes trophyLandingPulse { from { transform:translateY(0) scale(1); filter:drop-shadow(0 4px 0 #673600) brightness(1); } to { transform:translateY(-6px) scale(1.12); filter:drop-shadow(0 4px 0 #673600) brightness(1.45) drop-shadow(0 0 13px #ffe262); } }
@keyframes trophyAwardFade { from { opacity:1; } to { opacity:0; } }
@keyframes counterTrophyIn { 0% { opacity:0; transform:scale(.35) rotate(-12deg); } 70% { opacity:1; transform:scale(1.18) rotate(3deg); } 100% { opacity:1; transform:none; } }

@media (max-width: 680px) {
  .winner-celebration canvas { width:min(286px,82vw); }
  .winner-celebration h2 { padding:0 14px; }
  .draw-clock { min-width:170px; }
  .draw-contenders { min-height:82px; }
  .draw-content h2 { letter-spacing:-.14em; }
  .battle-character { width:67px; height:62px; }
  .battle-avatar.result-character-canvas { width:67px; height:62px; }
  .trophy-flight { width:27px; height:31px; left:42px; top:14px; }
}

@media (prefers-reduced-motion: reduce) {
  .winner-celebration,.winner-celebration::before,.winner-celebration-burst,.draw-celebration,.draw-celebration::before,.draw-celebration::after,.draw-grid,.draw-divider,.draw-kicker,.draw-clock,.draw-contenders article,.draw-content h2,.draw-content p,.draw-result-avatar { animation:none; opacity:1; transform:none; translate:none; }
  .winner-celebration.leaving { opacity:0; }
  .trophy-flight { display:none; }
  .champion .battle-trophy-total > img { opacity:1; animation:none; }
}

/* Solo bot difficulty selector */
.bot-difficulty-panel { margin-top:20px; padding-top:18px; border-top:1px solid rgba(255,255,255,.09); }
.bot-difficulty-panel header { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:12px; }
.bot-difficulty-panel header span { color:var(--lime); font:500 7px Silkscreen; letter-spacing:.13em; }
.bot-difficulty-panel header b { color:#f2edfa; font:500 9px Silkscreen; text-align:right; }
.bot-difficulty-options { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.bot-difficulty-options button { min-width:0; min-height:68px; display:grid; grid-template-columns:25px minmax(0,1fr); align-items:center; gap:7px; padding:9px 7px; border:1px solid #40374e; border-bottom:4px solid #211a2a; color:#8c8498; background:linear-gradient(#211a2c,#15111e); text-align:left; cursor:pointer; transition:transform .14s ease,filter .14s ease,border-color .14s ease,color .14s ease; }
.bot-difficulty-options button:hover { color:#f4effa; border-color:#79658f; filter:brightness(1.13); transform:translateY(-2px); }
.bot-difficulty-options button:active { transform:translateY(2px); border-bottom-width:1px; }
.bot-difficulty-options button i { width:25px; height:32px; display:grid; place-items:center; color:#716779; border:1px solid currentColor; background:#0c0912; font:500 12px Silkscreen; font-style:normal; }
.bot-difficulty-options button span { min-width:0; display:block; font:500 8px Silkscreen; }
.bot-difficulty-options button small { display:block; overflow:hidden; margin-top:5px; color:#625b6c; font:500 5px Silkscreen; line-height:1.35; text-overflow:ellipsis; }
.bot-difficulty-options button.active { color:#11160c; border-color:#d4ff73; border-bottom-color:#568d19; background:linear-gradient(#d8ff7d,#8dcf32); box-shadow:0 0 18px rgba(200,255,80,.19); animation:difficultySelected 1.4s steps(2,end) infinite alternate; }
.bot-difficulty-options button.active i { color:#d9ff83; border-color:#263c12; background:#17250d; }
.bot-difficulty-options button.active small { color:#375510; }
.bot-difficulty-panel > p { margin:11px 0 0; color:#655e70; font:400 7px/1.55 Silkscreen; }
@keyframes difficultySelected { from { filter:brightness(.96); } to { filter:brightness(1.1); } }

@media (max-width: 480px) {
  .bot-difficulty-panel header { align-items:start; flex-direction:column; }
  .bot-difficulty-panel header b { text-align:left; }
  .bot-difficulty-options { grid-template-columns:1fr; }
  .bot-difficulty-options button { min-height:53px; grid-template-columns:30px 1fr; }
  .bot-difficulty-options button i { width:28px; height:28px; }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-shell.mode-switching,
  .mode-switching .lobby-backdrop,
  .mode-switching .lobby-nav,
  .mode-switching .lobby-heading-copy,
  .mode-switching .lobby-squad-card,
  .mode-switching .mode-panel,
  .mode-switching .mode-panel header,
  .mode-switching .mode-card,
  .mode-switching .players-panel,
  .mode-switching .invite-panel,
  .mode-switching .player-slot,
  .mode-switching .invite-panel > *,
  .mode-switching .lobby-actions,
  .mode-switching .lobby-actions > * { animation:none; opacity:1; transform:none; filter:none; }
  .lobby-shell.mode-switching::after { display:none; }
}

/* Controles de bots e limite de participantes do lobby. */
.bot-control-panel { margin-top:20px; padding-top:18px; border-top:1px solid rgba(255,255,255,.09); }
.bot-control-panel header { display:grid; gap:6px; margin-bottom:12px; }
.bot-control-panel header span { color:var(--lime); font:500 7px Silkscreen; letter-spacing:.13em; }
.bot-control-panel header b { color:#f2edfa; font:500 9px Silkscreen; }
.bot-control-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.bot-control-buttons button { min-height:44px; padding:10px 7px; border:1px solid #79658f; color:#f2edfa; background:#211a2c; font:500 8px/1.5 Silkscreen; cursor:pointer; }
.bot-control-buttons button:hover:not(:disabled) { border-color:var(--lime); }
.bot-control-buttons button:disabled, .mode-card:disabled { cursor:not-allowed; }
.bot-control-panel > p, .mode-capacity-hint { color:#aaa1b5; font:400 8px/1.6 Silkscreen; }
.bot-control-buttons button:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
/* Aparência do painel de poderes, que fica na barra lateral, fora da arena. */
.power-legend { margin:12px 0; border:1px solid #635078; border-radius:8px; background:#110e19; color:#eee8f5; }
.power-legend[hidden] { display:none; }
.power-legend summary { min-height:44px; padding:12px; cursor:pointer; font:500 11px Silkscreen; }
.power-legend summary:focus-visible { outline:2px solid var(--lime); outline-offset:2px; }
#power-count { float:right; color:var(--lime); }
/* Se houver muitos poderes, a lista ganha rolagem para não ocupar toda a tela. */
#power-list { max-height:300px; overflow-y:auto; overscroll-behavior:contain; padding:0 12px 12px; }
#power-list ul { list-style:none; padding:0; margin:0; }
#power-list li { display:grid; grid-template-columns:28px minmax(0,1fr); gap:8px; padding:10px 0; border-top:1px solid #342a43; }
.power-icon { font-size:22px; }
#power-list b { font-size:13px; }
#power-list p { margin:5px 0; font:400 13px/1.45 sans-serif; color:#c6bdd2; }
.power-key { display:block; font:400 12px/1.5 sans-serif; color:#d9c8ff; }
/* Em telas pequenas ou de toque, a lista ocupa menos altura. */
@media (max-width:980px), (hover:none) {
  #power-list { max-height:240px; }
}
/* No celular deitado, mantém a legenda disponível abaixo da arena. */
@media (orientation:landscape) and (max-height:560px) and (max-width:1000px) {
  .game-shell { overflow:visible; }
  .game-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
  .match-sidebar { display:block; margin:0; }
  .match-sidebar > .panel-title, .match-sidebar > #hud-players { display:none; }
  .power-legend { margin:0; }
}

/* RAIVOLT — electric arena identity */
:root { --lime:#6ef6ff; --purple:#7460ee; --violet:#b69aff; }
body { background:#090e20; }
.menu-home { background:radial-gradient(ellipse at 78% 48%,#292367 0,transparent 48%),radial-gradient(ellipse at 12% 15%,#102d43 0,transparent 45%),#090e20; }
.menu-header .brand { width:clamp(210px,24vw,360px); }
.brand img { filter:drop-shadow(0 0 14px #4968cb55); }
.battle-logo { width:min(550px,100%); }
.battle-logo > strong { font-size:clamp(35px,4.9vw,65px); color:#d7fbff; text-shadow:0 4px 0 #3088c4,0 9px 0 #403a8c,5px 13px 0 #090b20; animation:none; }
.battle-logo > em { color:#071a32; background:linear-gradient(120deg,#b5fdff,#5fdff7 55%,#a19bff); }
.battle-logo > span { background:linear-gradient(#6562b8,#292255); }
.menu-kicker { color:#93ecff; }
.hero-burst { background:radial-gradient(ellipse,#6af4ff33 0,#8375ff33 32%,transparent 68%); filter:drop-shadow(0 0 22px #5061ff); }
.menu-hero-art::before { content:""; position:absolute; width:82%; aspect-ratio:1; left:9%; top:7%; border:2px solid #74e7ff66; border-radius:50%; box-shadow:0 0 35px #5e6eff44,inset 0 0 40px #62bfff22; transform:rotateX(25deg); pointer-events:none; }
.menu-hero-art::after { content:"ϟ"; position:absolute; top:6%; right:5%; color:#a9faff; font:bold 110px/1 system-ui; text-shadow:0 0 14px #53dfff,0 0 45px #8c59ff; transform:rotate(15deg); pointer-events:none; }
#menu-mascot-canvas { filter:drop-shadow(0 0 12px #6be8ff66); }
.profile-avatar { color:#e4fcff; background:linear-gradient(#467ea7,#292b64); border-color:#14233c; box-shadow:inset 0 0 0 2px #72edff; }
.arena-rank { border-color:#75eaff; }
.arena-wrap { box-shadow:0 0 35px #4c8cff22,0 18px 60px #0008; }
.mode-card strong { overflow-wrap:anywhere; }
@media(max-width:600px) { .battle-logo > strong { font-size:10vw; } .menu-header .brand { width:190px; } }
@media(prefers-reduced-motion:reduce) { .battle-logo { animation:none; } }

/* ST-03 — escala de leitura e contraste acessível.
   Textos funcionais partem de 12px; metadados compactos do HUD usam 10–11px
   apenas quando o espaço da arena é limitado. A identidade pixel art permanece
   nos títulos, enquanto textos auxiliares ganham altura de linha e contraste. */
:root {
  --font-readable-min: 12px;
  --font-readable-meta: 11px;
  --text-muted-readable: #bdb5ca;
  --text-subtle-readable: #a59daf;
  --muted: var(--text-muted-readable);
}

:where(button, input, summary, a):focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* Menu e introdução */
.profile-copy small,
.menu-kicker,
.arcade-action small,
.join-room-action > label,
.how-to-play-action small,
.arena-rank small,
.player-count small,
.menu-footer,
.intro-skip,
.intro-loader span,
.intro-start small,
.intro-story-kicker,
.intro-story p,
.intro-studio span {
  font-size: var(--font-readable-min);
  line-height: 1.45;
}

.profile-copy small,
.how-to-play-action small,
.arena-rank small,
.player-count small,
.menu-footer,
.intro-skip,
.intro-loader span,
.intro-studio span {
  color: var(--text-muted-readable);
}

.intro-loader em {
  color: var(--text-subtle-readable);
  font-size: var(--font-readable-meta);
}

.intro-skip {
  min-height: 44px;
  opacity: 1;
}

.battle-logo > em {
  font-size: clamp(11px,1.3vw,13px);
  line-height: 1.3;
}

/* Telas de transição */
.transition-kicker,
.transition-tip,
.match-loading-content span,
.match-loading-content b {
  font-size: var(--font-readable-min);
  line-height: 1.45;
}

.transition-copy span,
.transition-tip {
  color: var(--text-muted-readable);
}

/* Lobby: labels, regras, estados e ajudas continuam legíveis sem zoom. */
.room-chip,
.lobby-player-name > span,
.lobby-squad-card > span,
.lobby-squad-card > em,
.mode-panel header span,
.mode-card small,
.panel-title,
.slot-number,
.player-slot small,
.player-slot em,
.invite-panel-heading span,
.copy-row input,
.copy-row button,
.room-pass small,
.room-pass em,
.lobby-action-copy span,
.ready-button,
.host-wait,
.bot-difficulty-panel header span,
.bot-difficulty-panel header b,
.bot-difficulty-options button span,
.bot-control-panel header span,
.bot-control-panel header b,
.bot-control-buttons button,
.bot-control-panel > p,
.mode-capacity-hint {
  font-size: var(--font-readable-min);
  line-height: 1.45;
}

.room-chip b,
.mode-card strong,
.player-slot b,
.invite-panel-heading b,
.lobby-action-copy b,
.start-button > span {
  font-size: 13px;
  line-height: 1.35;
}

.lobby-player-name small,
.mode-panel header small,
.mode-card em,
.invite-panel > p,
.bot-difficulty-options button small,
.bot-difficulty-panel > p {
  color: var(--text-muted-readable);
  font-size: var(--font-readable-meta);
  line-height: 1.55;
}

.player-slot small,
.player-slot em,
.mode-card small,
.panel-title,
.invite-panel-heading span,
.copy-row input,
.room-pass small,
.room-pass em,
.lobby-action-copy span,
.host-wait {
  color: var(--text-subtle-readable);
}

.player-slot mark,
.mode-card > b,
.start-button small {
  font-size: 10px;
  line-height: 1.35;
}

.mode-card,
.bot-difficulty-options button {
  min-height: 96px;
}

.bot-difficulty-options button {
  grid-template-columns: 30px minmax(0,1fr);
}

.bot-difficulty-options button small {
  overflow: visible;
  text-overflow: clip;
}

.bot-control-buttons button {
  min-height: 48px;
}

/* HUD e partida: nomes/estados em 11–12px; números compactos nunca abaixo de 10px. */
.match-label,
.match-timer small,
.hud-player b,
.hud-player small,
.hud-player em,
.controls-card > span,
.controls-card p,
kbd,
.sidebar-powerups summary,
.match-intro-kicker,
.countdown-stage > span,
.countdown-stage > em {
  font-size: var(--font-readable-meta);
  line-height: 1.4;
}

.hud-player b,
.power-legend summary {
  font-size: var(--font-readable-min);
}

.match-label b,
.match-timer small,
.hud-player small,
.controls-card > span,
.controls-card p,
.sidebar-powerups summary,
.countdown-stage > span {
  color: var(--text-muted-readable);
}

.hud-stats i,
.hud-abilities i,
.sidebar-powerups li,
.match-intro-roster b {
  font-size: 10px;
  line-height: 1.3;
}

.bomb-button,
.power-buttons button {
  font-size: var(--font-readable-meta);
  line-height: 1.25;
}

.hud-stats,
.hud-abilities {
  gap: 5px;
  flex-wrap: wrap;
}

.hud-stats i,
.hud-abilities i {
  min-height: 20px;
  padding: 3px 5px;
}

/* Resultados e mensagens de retorno */
.battle-result-header > span,
.battle-result-header p,
.battle-player-copy small,
.battle-trophy-total small,
.battle-result-actions button small,
.winner-celebration > span,
.winner-celebration p,
.draw-kicker,
.draw-clock small,
.draw-contenders b,
.draw-content p,
.error-code,
.toast {
  font-size: var(--font-readable-meta);
  line-height: 1.45;
}

.battle-result-header p,
.battle-player-copy small,
.battle-trophy-total small,
.winner-celebration p,
.draw-clock small,
.draw-content p {
  color: var(--text-muted-readable);
}

@media (max-width: 620px) {
  .menu-footer {
    font-size: var(--font-readable-meta);
  }

  .menu-header {
    gap: 10px;
  }

  .player-profile {
    min-width: 148px;
  }

  .profile-copy small {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .profile-copy input {
    width: min(30vw,120px);
  }

  .menu-footer {
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.6;
  }

  .transition-tip {
    bottom: 24px;
    max-width: calc(100vw - 32px);
    font-size: var(--font-readable-meta);
    line-height: 1.5;
    text-align: center;
  }

  .mode-card {
    grid-template-columns: 44px minmax(0,1fr);
  }

  .mode-card > b {
    grid-column: 2;
    justify-self: start;
  }

  .player-slot {
    grid-template-columns: 28px 38px minmax(0,1fr);
    row-gap: 7px;
  }

  .player-slot em,
  .slot-trophies {
    grid-column: 3;
    justify-self: start;
    margin-top: 0;
  }

  .lobby-actions button {
    min-width: min(100%,170px);
  }
}

@media (max-width: 420px) {
  .menu-header .brand {
    width: 132px;
  }

  .profile-avatar {
    display: none;
  }

  .player-profile {
    min-width: 132px;
  }

  .lobby-nav {
    align-items: flex-start;
    gap: 9px;
  }

  .lobby-nav .brand {
    width: 132px;
  }

  .room-chip {
    max-width: 150px;
  }

  .battle-result-actions {
    grid-template-columns: 1fr;
  }
}
