.lobby { --accent: #ff6555; position: relative; isolation: isolate; overflow: hidden; padding: 34px max(30px, calc((100vw - 1280px) / 2)) 26px; }
.lobby .arena-background { opacity: .55; background-position: center 35%; }
.lobby-shade { position: absolute; inset: 0; background: linear-gradient(90deg,#09182222,#08151cdd),linear-gradient(0deg,#08151c 1%,transparent 85%); z-index: -1; }
.lobby #snow { z-index: -1; }
.lobby-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lobby h1 { font: 900 clamp(30px,4vw,52px)/1 var(--display); letter-spacing: -1px; margin: 10px 0 0; }
.lobby h1 em { color: var(--red); font-style: italic; }
.roster-count { font-size: 9px; letter-spacing: 2px; color: #a1b4be; }
.roster-count b { color: var(--red); margin: 0 10px; }
.selection-showcase { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 450px; margin: 12px 0 20px; }
.selection-art { position: relative; min-width: 0; height: 450px; }
#selection-stage { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 18px #0008); }
#selection-watermark { position: absolute; inset: 80px 0 auto; font: 900 clamp(60px,10vw,145px)/.9 var(--display); text-align: center; color: transparent; -webkit-text-stroke: 1px #d0eced20; overflow-wrap: anywhere; opacity: .8; }
.stage-tag { position: absolute; left: 10px; top: 16px; font-size: 8px; letter-spacing: 2px; color: #a7c2cb; }
.selection-caption { position: absolute; z-index: 3; left: 12%; right: 12%; bottom: 0; display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 2px; color: var(--accent); }
.selection-caption i { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.selection-caption b { margin-left: auto; color: #b6c8cf; font-size: 8px; }
.fighter-profile { align-self: center; padding: 15px 0 0 30px; max-width: 540px; }
.fighter-profile h2 { font: italic 900 clamp(38px,4.5vw,65px)/.95 var(--display); text-transform: uppercase; margin: 10px 0 14px; color: #fff3df; }
.fighter-profile > p { color: #adc0c8; font-size: 12px; line-height: 1.8; max-width: 430px; margin: 0 0 18px; }
.fighter-profile .section-kicker { color: var(--accent); font-size: 9px; }
.fighter-stats { display: flex; gap: 24px; margin: 18px 0; }
.fighter-stat { display: grid; gap: 7px; font-size: 8px; letter-spacing: 1.5px; color: #8da9b4; }
.fighter-stat div { display: flex; gap: 3px; }
.fighter-stat i { width: 15px; height: 4px; background: #314650; transform: skewX(-20deg); }
.fighter-stat i.on { background: var(--accent); }
.profile-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid #829aa329; padding-top: 16px; }
.profile-move { display: flex; gap: 9px; align-items: start; }
.profile-move kbd { min-width: 22px; height: 23px; display: grid; place-items: center; color: var(--accent); }
.profile-move strong { display: block; font: 700 14px var(--display); }
.profile-move small { display: block; margin-top: 3px; font-size: 8px; color: #97afb9; line-height: 1.6; }
.finisher-preview { margin-top: 18px; border-left: 2px solid var(--accent); background: #142734aa; padding: 10px 14px; }
.finisher-preview > span { display: block; color: var(--accent); font-size: 8px; letter-spacing: 1.6px; }
.finisher-preview small { color: #a1b4bd; font-size: 7px; margin-left: 9px; }
.finisher-preview strong { display: block; font: italic 700 20px var(--display); margin-top: 5px; }
.finisher-preview p { font-size: 10px; line-height: 1.7; color: #a8bdc7; margin: 4px 0 0; }
.roster-heading { display: flex; justify-content: space-between; margin: 24px 0 12px; gap: 12px; }
.roster-heading > span:last-child { font-size: 8px; letter-spacing: 1.2px; color: #7897a5; }
.roster-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 9px; }
.roster-card { position: relative; overflow: hidden; min-width: 0; padding: 0; height: 104px; background: linear-gradient(145deg,#284552a6,#0c1b26); border: 1px solid #53717f66; border-radius: 4px; cursor: pointer; transition: transform .18s, border-color .18s; text-align: left; color: #e5edef; }
.roster-card:hover { transform: translateY(-4px); border-color: #cddce0; }
.roster-card.selected { border: 2px solid var(--card-accent); background: linear-gradient(145deg,#52666d88,#132936); box-shadow: 0 0 20px #0005; }
.roster-card canvas { width: 100%; height: 100px; object-fit: cover; transition: transform .2s; }
.roster-card.selected canvas { transform: scale(1.06); }
.roster-card::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent,#06121bf2); pointer-events: none; }
.roster-card strong { position: absolute; z-index: 1; bottom: 9px; left: 9px; right: 2px; font: 700 clamp(10px,1.15vw,16px)/1 var(--display); text-transform: uppercase; }
.roster-card .card-number { position: absolute; top: 7px; left: 8px; font: 600 9px var(--body); color: #c1d6df88; }
.roster-card .pick-mark { display: none; position: absolute; top: 5px; right: 6px; background: var(--card-accent); color: #0a1921; font: 800 8px var(--body); padding: 3px 4px; border-radius: 2px; }
.roster-card.selected .pick-mark { display: block; }
/* Keep the primary action in reach while fighter details remain scrollable. */
body:not(.playing) { padding-bottom: var(--menu-actions-height, 100px); }
.selection-actions {
  position: fixed; z-index: 8; inset: auto 0 0; margin: 0;
  display: flex; justify-content: center; align-items: center; gap: 28px;
  padding: 12px max(20px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #0b1c25f5; border-top: 1px solid #607b8866;
  box-shadow: 0 -12px 28px #06101866;
}
.lobby-scroll-hint {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 6px 15px; border: 1px solid #e8bd6f66; border-radius: 24px;
  background: #091820f2; color: var(--gold); font: 700 9px var(--body); letter-spacing: 1.5px;
  box-shadow: 0 3px 16px #0005;
}
.lobby-scroll-hint svg { width: 20px; height: 20px; animation: scroll-cue 1.5s ease-in-out infinite; }
@keyframes scroll-cue { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .lobby-scroll-hint svg { animation: none; } }
.opponent-label { display: grid; gap: 8px; font-size: 8px; letter-spacing: 1.5px; color: #9db6c0; }
.opponent-label select {
  width: 200px; appearance: none; -webkit-appearance: none; color-scheme: dark;
  background-color: #152a35; color: #e4eff2;
  background-image: linear-gradient(45deg, transparent 50%, #e4eff2 50%), linear-gradient(135deg, #e4eff2 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  border: 1px solid #4c6877; border-radius: 3px; padding: 12px 30px 12px 12px;
  min-height: 44px; font: 600 16px var(--display);
}
.start-wrap { text-align: center; }
.start-wrap .start-button { width: 320px; margin: 0; height: 54px; }
.start-wrap .match-note { font-size: 8px; margin-top: 9px; }
.selection-actions .how-link { margin: 0; }
.lobby .load-status { text-align: center; }
.profile-enter { animation: profile-in .3s ease-out; }
@keyframes profile-in { from { opacity: .25; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.move-columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.guide-finisher { color: #efd49e; border-top: 1px solid #ffffff22; padding-top: 10px; font-size: 11px; line-height: 1.6; }
.result-actions { grid-column: 3; grid-row: 1 / 4; display: flex; align-items: center; gap: 12px; }
.result-actions .start-button { margin: 0; width: 150px; min-height: 48px; height: 48px; font-size: 17px; }
.result-actions .outline-button { min-height: 48px; padding: 12px 18px; background: #203843; border-color: #8ba4b3; font-size: 16px; }
.result-actions .outline-button span { margin: 0 7px 0 0; }
.game-screen.round-ended .touch-controls, .game-screen.round-ended .game-hint, .game-screen.round-ended .game-controls { display: none; }
.game-screen.round-ending .touch-controls { visibility: hidden; }
.fighter-hud .name-line strong { font-size: clamp(12px,2.2vw,29px); white-space: nowrap; }
.finisher-call { position: absolute; bottom: 3%; left: 0; right: 0; text-align: center; pointer-events: none; font: italic 700 clamp(12px,2.2vw,28px) var(--display); color: #ffe6b1; text-shadow: 0 2px 8px #000; letter-spacing: 1px; }
@media (max-width: 900px) { .lobby { padding: 25px 22px; } .selection-showcase { grid-template-columns: 1fr 1fr; } .fighter-profile { padding-left: 15px; } .roster-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; } .roster-card { height: 84px; } .roster-card canvas { height: 82px; } .roster-count { display: none; } .result-actions { grid-column: 2; } }
@media (max-width: 600px) {
  .lobby { padding: 23px 16px 20px; } .lobby-heading .section-kicker { font-size: 8px; letter-spacing: 1.8px; } .lobby h1 { font-size: 34px; }
  .selection-showcase { grid-template-columns: minmax(0,1fr); min-width: 0; margin: 5px 0 16px; min-height: 0; } .selection-art { height: 285px; } .stage-tag { font-size: 7px; top: 14px; left: 0; } #selection-watermark { top: 70px; font-size: 80px; }
  .selection-caption { left: 7%; right: 7%; font-size: 8px; } .fighter-profile { padding: 24px 0 0; max-width: none; } .fighter-profile h2 { font-size: 38px; margin: 8px 0; } .fighter-profile > p { font-size: 11px; margin-bottom: 12px; } .fighter-stats { margin: 12px 0; gap: 12px; } .profile-moves { gap: 11px; padding-top: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); } .profile-move { min-width: 0; } .profile-move strong { overflow-wrap: anywhere; } .finisher-preview { margin-top: 13px; } .roster-heading { margin-top: 20px; } .roster-heading > span:last-child { display: none; }
  .roster-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; } .roster-card { height: 72px; } .roster-card strong { font-size: 11px; left: 6px; bottom: 7px; } .roster-card canvas { height: 70px; }
  .selection-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 12px; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); align-items: end; } .opponent-label { min-width: 0; gap: 6px; } .opponent-label select { width: 100%; padding: 12px 30px 12px 8px; } .start-wrap { min-width: 0; padding-bottom: 4px; } .start-wrap .start-button { width: 100%; height: 48px; font-size: clamp(16px,4.5vw,21px); letter-spacing: .8px; gap: 6px; } .start-wrap .button-arrow { margin-left: 0; font-size: 18px; } .start-wrap .match-note, .selection-actions .how-link { display: none; } .move-columns { grid-template-columns: 1fr; }
  .result-actions { grid-column: 1; grid-row: auto; gap: 12px; } .result-actions > button { flex: 1; }
}
@media (orientation: landscape) and (any-pointer: coarse), (orientation: landscape) and (max-height: 600px) and (max-width: 1100px), (orientation: landscape) and (max-width: 760px) {
  body.playing .round-ended .game-toolbar { display: none !important; }
  .result-actions { grid-column: 2; grid-row: 1 / 4; gap: 10px; } .result-actions .start-button { width: 136px; } .result-actions > button { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .profile-enter { animation: none; } .roster-card, .roster-card canvas { transition: none; } }

@media (max-width: 600px) {
  .lobby { display: flex; flex-direction: column; }
  .lobby-heading { order: 0; } .roster-heading { order: 1; } .roster-grid { order: 2; }
  .selection-showcase { order: 3; margin-top: 12px; } .selection-actions { order: 4; } .lobby > .load-status { order: 5; }
}
/* HUD typography follows the arena at every viewport size. */
.game-stage { container-type: inline-size; }
@supports (font-size: 1cqw) {
  .fighter-hud .name-line strong { font-size: clamp(9px, 2.25cqw, 29px); }
  .name-line > span { font-size: clamp(4px, .65cqw, 8px); letter-spacing: .1cqw; }
  .name-line i { padding: clamp(2px, .3cqw, 4px); margin-left: .4cqw; }
  .health-track { height: clamp(9px, 1.875cqw, 24px); }
  .timer { min-width: 4.7cqw; }
  .timer > strong { font-size: clamp(20px, 4.8cqw, 62px); }
  .timer > span { font-size: clamp(4px, .55cqw, 7px); }
  .meter-line { margin-top: .6cqw; }
  .meter-line > span { font-size: clamp(7px, 1.1cqw, 14px); }
  .energy-track { height: clamp(3px, .55cqw, 7px); }
  .round-call.finish-call { font-size: clamp(24px, 6cqw, 80px); }
}

.roster-card.locked.selected .pick-mark { display:none; }
.fighter-profile #fighter-availability { color:#ffe3a9; border-left:2px solid #e8bd6f; padding-left:10px; }
.roster-card.locked .portrait { filter:grayscale(.7) brightness(.55); }
.roster-card .lock-label { position:absolute; top:5px; right:5px; padding:2px 4px; border-radius:3px; background:#121b2ee8; color:#e0e4ef; font-size:8px; font-weight:800; letter-spacing:.08em; }
.rival-hint { font-size:11px; color:#bfc9db; line-height:1.4; }

.portrait-lock { position:absolute; left:50%; top:43%; transform:translate(-50%,-50%); display:grid; place-items:center; width:32px; height:36px; color:#fff3ce; filter:drop-shadow(0 2px 4px #000); pointer-events:none; }
.portrait-lock svg { width:28px; height:28px; }
.hit-streak { display:flex; align-items:center; gap:3px; margin-top:4px; color:#d9caa1; font:700 clamp(5px,.65cqw,9px) var(--body); letter-spacing:.1em; }
.hit-streak b { margin-right:3px; }
.hit-streak i { width:clamp(4px,.75cqw,10px); height:3px; border:1px solid #d6bb7355; background:#443f3c; border-radius:1px; }
.hit-streak i.on { background:#f3cb75; }
.hit-streak.ready { color:#fff1c6; }
.hit-streak.ready i.on { border-color:#fff1c6; }
