@import url('/play-fonts/fonts.css');

/* Restore the arena viewport from checkpoint 9129034 (before Home V2).
   Home's sidebar and header must not set the size of the match-selection UI. */
body.site-shell:is([data-route="/tceam"], [data-route="/play"]) {
    background: #0e0e0e; height: 100dvh; min-height: 0; overflow: hidden;
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr);
    grid-template-areas: 'play-header' 'workspace';
}
body.site-shell[data-route="/play"] .workspace {
    min-height: 0; overflow-y: auto; overflow-x: clip;
    overscroll-behavior-y: contain; scroll-padding-block: 24px;
}
body.site-shell[data-route="/play"] .page { max-width: none; }
.play-header {
    grid-area: play-header; display: flex; align-items: center; gap: clamp(14px,2.2vw,32px);
    height: 70px; min-height: 70px; padding: 6px clamp(16px,3vw,48px);
    background: #101010; border-bottom: 1px solid #282828; position: relative; z-index: 40;
}
.play-header [data-play-brand] { width: clamp(110px,10vw,145px); flex-shrink: 0; }
.play-header .app-brand { min-height: 0; height: 50px; padding: 0; justify-content: flex-start; }
.play-header .app-brand img { height: 74px; max-height: 74px; max-width: 100%; width: auto; margin: 0; }
.play-nav { display: flex; align-items: center; gap: clamp(12px,2vw,30px); margin: 0 auto 0 8px; min-width: 0; flex-shrink: 0; }
.play-nav a, .play-menu a {
    position: relative; color: #dfdfdf; font-size: 13px; font-weight: 700;
    min-height: 40px; display: flex; align-items: center; white-space: nowrap;
}
.play-nav a:hover, .play-nav a.active { color: #ffd16b; }
.play-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.play-header .app-header-actions { gap: 12px; }
.play-header #header-coins, .play-header #account-signup { display: none; }
.play-header .app-account-button { min-height: 36px; padding: 6px 12px; font-size: 12px; border-radius: 4px; }
.play-header .app-account-button.is-authenticated { width: auto; min-height: 36px; padding: 2px 8px 2px 4px; gap: 5px; border-radius: 999px; }
.play-header .app-account-avatar { width: 28px; height: 28px; }
.play-header .app-account-avatar svg { width: 18px; height: 18px; }
.play-header .app-account-arrow { width: 14px; height: 14px; }
.play-header .app-language select { min-width: 56px; min-height: 36px; padding: 6px; font-size: 12px; border-radius: 4px; }
.play-header-launch { display: flex; align-items: center; flex-shrink: 0; }
.play-header-launch img { display: block; height: 56px; width: auto; object-fit: contain; }
.play-header svg { width: 18px; height: 18px; flex-shrink: 0; }
.play-more { position: relative; }
.play-more summary, .play-menu summary { display: flex; align-items: center; gap: 7px; min-height: 40px; color: #eee; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.play-more summary::-webkit-details-marker, .play-menu summary::-webkit-details-marker { display: none; }
.play-more nav { position: absolute; top: calc(100% + 12px); right: -16px; min-width: 226px; padding: 10px; background: #181818; border: 1px solid #3f3f3f; }
.play-more nav a { padding: 10px 14px; }
.play-more nav a:hover, .play-menu nav a:hover { background: #262626; color: #ffd16b; }
.play-menu { display: none; }
@media (max-width: 1100px) and (min-width: 851px) {
    .play-header { gap: 14px; padding-inline: 24px; }
    .play-nav { gap: 12px; }
    .play-header-actions, .play-header .app-header-actions { gap: 8px; }
    .play-header-launch { display: none; }
}
@media (max-width: 850px) {
    .play-header { height: 66px; min-height: 66px; gap: 16px; padding: 7px 24px; }
    .play-nav { display: none; }
    .play-menu { display: block; }
    .play-menu summary { padding: 0 10px; font-size: 12px; }
    .play-menu nav { position: absolute; top: 100%; left: 0; right: 0; padding: 16px 24px; background: #181818; border-bottom: 1px solid #444; max-height: calc(100dvh - 66px); overflow-y: auto; }
    .play-menu nav a { padding: 4px 12px; }
}
@media (max-width: 580px) {
    .play-header { height: 62px; min-height: 62px; padding: 7px 16px; gap: 8px; }
    .play-header [data-play-brand] { width: 92px; }
    .play-header .app-brand img { height: 62px; }
    .play-header-launch img { height: 46px; }
    .play-header-actions, .play-header .app-header-actions { gap: 8px; }
}
@media (max-width: 420px) {
    .play-header-launch { display: none; }
    .play-header { padding-inline: 12px; }
    .play-menu summary { padding-inline: 4px; }
    .play-menu summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
body.site-shell:is([data-route="/tceam"], [data-route="/play"]) :is(.workspace, #main, .match-lobby) { min-width: 0; }
body.site-shell:is([data-route="/tceam"], [data-route="/play"]) main { max-width: 1900px; margin-inline: auto; padding: 24px 28px 32px; }
body:is([data-route="/tceam"], [data-route="/play"]) .page-heading,
body:is([data-route="/tceam"], [data-route="/play"]) .play-layout { display: none; }
body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
body.site-shell:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] main { padding-top: 12px; }
.match-lobby[data-screen="game"] > .match-status { display: none; }
body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-surface { max-width: calc(max(200px, 100dvh - 390px) * 16 / 9); }
.match-lobby { --match-gold: #ff9f43; --match-violet: #53dff1; color: #f4f5fa; }
.match-lobby [hidden] { display: none !important; }
.match-lobby *, .match-lobby *::before, .match-lobby *::after { box-sizing: border-box; }
.match-lobby button, .match-lobby input, .match-lobby select { font: inherit; }
.match-lobby button { cursor: pointer; border: 1px solid #3a3a3a; background: #202020; color: #e8e8e8; padding: 9px 12px; border-radius: 3px; transition: background .15s, border-color .15s, color .15s; }
.match-lobby button:hover:not(:disabled) { border-color: var(--match-violet); background: #2a2a2a; color: #fff; }
.match-lobby button:disabled { opacity: .42; cursor: not-allowed; }
.match-lobby select, .match-lobby input { width: 100%; min-width: 0; background: #101010; border: 1px solid #3a3a3a; border-radius: 3px; color: #f4f5fa; padding: 9px; }
.match-lobby select { min-height: 0; }
.match-lobby label { display: grid; gap: 6px; font-size: 12px; color: #bdbdbd; }
.match-lobby fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.match-lobby h2, .match-lobby h3, .match-lobby p { margin-top: 0; }
.match-lobby .match-primary { background: var(--match-gold); color: #17110a; border-color: var(--match-gold); font-weight: 800; }
.match-lobby .match-primary:hover:not(:disabled) { background: #ffb66e; border-color: #ffb66e; color: #17110a; }
.match-lobby .match-secondary { border-color: #3d6f78; background: #19272a; color: var(--match-violet); }
.match-kicker { color: #a5a5a5; font: 700 10px/1.4 monospace; letter-spacing: .14em; margin-bottom: 8px; }
.match-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; }
.match-hero h1 { font-size: clamp(30px, 3.6vw, 62px); line-height: 1; letter-spacing: -.045em; font-weight: 950; margin: 0 0 12px; }
.match-hero h1 span { color: var(--match-gold); }
.match-hero p:last-child { color: #ababab; font-size: 12px; margin: 0; }
.match-collection { border-left: 1px solid #383838; padding-left: 28px; display: grid; text-align: right; gap: 4px; flex-shrink: 0; }
.match-collection strong { font-size: 44px; line-height: 1; }
.match-collection span { font: 700 10px monospace; letter-spacing: .08em; }
.match-collection small { color: #9a9a9a; font-size: 10px; }
.match-steps { display: flex; gap: 8px; border-bottom: 1px solid #343434; padding-bottom: 12px; }
.match-steps button, .match-final-step { font-size: 11px; }
.match-steps button[aria-current] { color: var(--match-gold); border-color: var(--match-gold); background: #261e17; }
.match-steps span span, .match-steps button span { color: #9e9e9e; margin-right: 8px; font-family: monospace; }
.match-final-step { padding: 10px; color: #969696; }
.match-status { font-size: 11px; color: #b5b5b5; margin: 10px 0 14px; min-height: 16px; }
.match-draft { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 16px; margin-bottom: 18px; }
.match-format { display: grid; gap: 10px; align-content: start; }
.match-teams { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.match-team { min-width: 0; border: 1px solid #383838; border-top: 2px solid var(--match-gold); background: #161616; padding: 10px; }
.match-team.p2 { border-top-color: var(--match-violet); }
.match-team h3 { font: 700 10px monospace; letter-spacing: .1em; margin-bottom: 8px; }
.match-team-slots { display: flex; gap: 6px; }
.match-lobby .match-team-slot { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; text-align: left; padding: 4px; }
.match-team-slot[aria-pressed="true"] { border-color: var(--match-gold); background: #2c2420; }
.match-sprite { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.match-pick-name { display: grid; gap: 4px; min-width: 0; }
.match-pick-name small { color: #aaaaaa; font: 9px monospace; }
.match-pick-name > span { font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.match-assist-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.match-assist-row label { display: flex; align-items: center; flex: 1; min-width: 0; }
.match-assist-row select { padding: 4px 7px; font-size: 11px; }
.match-assist-row .match-sprite { width: 30px; height: 30px; }
.match-selection { display: grid; grid-template-columns: 190px minmax(0,1fr) 290px; gap: 14px; align-items: start; }
.match-sidebar, .match-browser, .match-dossier { border: 1px solid #373737; border-top: 2px solid var(--match-gold); background: linear-gradient(145deg,#1b1b1b,#121212); min-width: 0; }
.match-sidebar { padding: 14px 10px; }
.match-sidebar h2 { font-size: 16px; margin-bottom: 14px; }
.match-sidebar > select { display: none; }
.match-series-list { display: grid; gap: 3px; max-height: 345px; overflow: auto; scrollbar-width: thin; }
.match-lobby .match-series-button { text-align: left; display: flex; justify-content: space-between; gap: 5px; border: 0; padding: 9px 8px; font-size: 11px; border-radius: 0; }
.match-series-button small { color: #b2aaa2; }
.match-series-button[aria-pressed="true"] { background: linear-gradient(90deg,rgba(255,159,67,.2),rgba(40,40,40,.5)); box-shadow: inset 2px 0 var(--match-gold); color: #fff; }
.match-browser { padding: 14px; }
.match-browser-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.match-browser-heading h2 { font-size: 22px; margin-bottom: 0; }
.match-browser-heading button { font-size: 10px; }
.match-search-row { display: flex; align-items: center; gap: 8px; }
.match-search { position: relative; flex: 1; }
.match-search svg { width: 16px; height: 16px; position: absolute; left: 10px; top: 11px; color: #aaaaaa; }
.match-search input { padding-left: 34px; font-size: 11px; }
.match-edition-label { padding: 11px; border: 1px solid #4c4034; color: #ffcc86; font: 700 10px monospace; }
.match-browser-meta { display: flex; justify-content: space-between; gap: 8px; color: #a5a5a5; font-size: 9px; margin: 12px 0 8px; }
.match-fighters { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 6px; }
.match-lobby .match-fighter-card { padding: 0; min-width: 0; background: linear-gradient(150deg,#232323,#151515); border: 1px solid #3a3a3a; border-radius: 0; overflow: hidden; }
.match-fighter-card[aria-pressed="true"] { border-color: var(--match-gold); box-shadow: 0 0 0 1px var(--match-gold); }
.match-card-visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: linear-gradient(135deg,#252525,#141414); overflow: hidden; }
.match-card-visual .match-sprite { width: 100%; height: 100%; max-height: 116px; object-fit: contain; padding: 7px; }
.match-card-edition { position: absolute; top: 0; right: 0; font: 700 8px monospace; padding: 2px 3px; background: #333; color: #f0f0f0; }
.match-card-picked { position: absolute; top: 0; left: 0; font: 700 8px monospace; background: var(--match-gold); color: #17110a; padding: 2px 3px; }
.match-card-name { display: block; border-top: 1px solid #333; padding: 5px 3px; min-height: 31px; font-size: 8px; line-height: 1.25; overflow-wrap: anywhere; }
.match-lobby .match-buy-link { display:inline-flex; align-items:center; justify-content:center; gap:5px; box-sizing:border-box; min-height:28px; padding:4px 7px; border:1px solid #805125; border-radius:3px; background:#382618; color:#ffc37a; font-size:11px; font-weight:700; line-height:1.2; text-align:center; text-decoration:none; }
.match-lobby .match-buy-link:hover { background:#56351f; color:#ffe0b2; }
.match-lobby .match-buy-link:focus-visible { outline:2px solid #ffc37a; outline-offset:2px; }
.match-card-lock { width:13px; height:13px; flex-shrink:0; }
.match-lobby[data-ui-shell] .match-fighter-tile.is-locked { display:flex; flex-direction:column; }
.match-lobby[data-ui-shell] .match-fighter-tile.is-locked .match-fighter-card { flex:1; height:auto; border-bottom-left-radius:0; border-bottom-right-radius:0; }
.match-lobby[data-ui-shell] .match-fighter-tile>.match-buy-link { flex:0 0 26px; width:100%; min-height:26px; border-top:0; border-top-left-radius:0; border-top-right-radius:0; }
.match-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; }
.match-pagination button, .match-pagination span { font-size: 10px; }
.match-pagination span { font-family: monospace; color: #b5b5b5; }
.match-dossier-top { padding: 13px 12px; display: flex; justify-content: space-between; gap: 5px; font: 9px monospace; color: #bbbbbb; border-bottom: 1px solid #353535; }
.match-render { height: 240px; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 38%,rgba(255,159,67,.16),rgba(120,120,120,.08) 55%,transparent 75%),linear-gradient(160deg,#1f1f1f,#101010); border-bottom: 1px solid #353535; }
.match-render .match-character-render { width: 100%; height: 100%; object-fit: contain; }
.match-render:not(.has-render) .match-sprite { width: 90px; height: 90px; }
.match-render p { color: #b0b0b0; font-size: 10px; text-align: center; padding: 10px; }
.match-dossier-copy { padding: 15px; }
.match-series-tag { display: inline-block; padding: 4px 7px; background: rgba(255,159,67,.12); border: 1px solid rgba(255,159,67,.3); color: #ffcc86; font: 9px monospace; }
.match-dossier h2 { font-size: 23px; line-height: 1.1; margin: 12px 0 8px; text-transform: uppercase; overflow-wrap: anywhere; }
.match-dossier-copy > p { font-size: 11px; color: #d0b28c; }
.match-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #383838; padding-top: 12px; gap: 8px; font-size: 10px; }
.match-facts dt { color: #a8a8a8; }
.match-facts dd { margin: 0; text-align: right; }
.match-assign { display: grid; gap: 8px; margin-top: 16px; }
.match-assign button { font-size: 11px; }
.match-assign p { color: #a8a8a8; font-size: 10px; line-height: 1.5; margin-bottom: 0; }
.match-form-details { border-top: 1px solid #383838; margin-top: 14px; padding-top: 12px; font-size: 10px; }
.match-form-details summary { cursor: pointer; color: #ffcc86; }
.match-related-forms { display: grid; gap: 4px; margin-top: 8px; }
.match-related-forms button { font-size: 10px; text-align: left; }
.match-related-forms button[aria-pressed="true"] { border-color: var(--match-gold); }
.match-flow-footer, .match-launch { position: sticky; bottom: 0; z-index: 2; background: linear-gradient(180deg,#1a1a1a,#111111); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid #383838; border-top: 2px solid var(--match-gold); border-radius: 4px; margin-top: 18px; box-shadow: 0 -8px 24px rgba(0,0,0,.45); }
.match-flow-footer p, .match-launch p { color: #c4c4c4; font-size: 11px; margin: 0; }
.match-flow-footer button, .match-launch button { flex-shrink: 0; }
.match-map-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 22px; }
.match-stage-preview { position: relative; aspect-ratio: 2.3; overflow: hidden; border: 1px solid #3a3a3a; border-top: 2px solid var(--match-gold); border-radius: 4px; background: #141414; box-shadow: 0 9px 28px rgba(0,0,0,.45); }
.match-stage-preview > img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.match-stage-nav { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 52px; height: 72px; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: rgba(8,8,8,.72); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.match-stage-nav svg { width: 30px; height: 30px; fill: currentColor; }
.match-stage-nav.is-prev { left: 16px; }
.match-stage-nav.is-next { right: 16px; }
.match-stage-nav:hover:not(:disabled) { background: var(--match-gold); border-color: var(--match-gold); color: #151515; }
.match-stage-nav:disabled { opacity: .35; cursor: not-allowed; }
.match-stage-caption { position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 70px 24px 18px; background: linear-gradient(transparent,rgba(14,14,14,.96)); }
.match-stage-caption-main { min-width: 0; }
.match-stage-caption-meta { display: grid; justify-items: end; gap: 3px; flex-shrink: 0; }
.match-stage-caption .match-stage-counter, .match-stage-caption .match-stage-total { margin: 0; color: #d6d6d6; font: 700 11px/1.2 monospace; letter-spacing: .08em; }
.match-stage-caption .match-stage-total { color: var(--match-gold); text-transform: uppercase; }
.match-stage-preview > div { position: absolute; bottom: 0; left: 0; right: 0; padding: 45px 24px 16px; background: linear-gradient(transparent,rgba(14,14,14,.95)); }
.match-stage-preview h2 { font-size: 32px; margin-bottom: 6px; color: #fff; }
.match-stage-preview p:last-child { font-size: 10px; color: #c8c8c8; margin-bottom: 0; }
.match-stage-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.match-stage-heading h2 { font-size: 18px; }
.match-stage-heading span { color: #b5b5b5; font-size: 11px; }
.match-map-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.match-lobby .match-map-card { padding: 0; overflow: hidden; border-radius: 3px; border: 1px solid #3a3a3a; background: linear-gradient(150deg,#232323,#151515); }
.match-lobby .match-map-card:hover:not(:disabled) { border-color: var(--match-violet); box-shadow: 0 0 14px rgba(83,223,241,.45); }
.match-map-card img { width: 100%; aspect-ratio: 1.9; object-fit: cover; display: block; }
.match-map-card span { display: block; padding: 8px 4px; font-size: 10px; background: #111; border-top: 1px solid #2e2e2e; color: #eaeaea; }
.match-map-card[aria-pressed="true"] { border-color: var(--match-gold); box-shadow: 0 0 0 1px var(--match-gold), 0 0 16px rgba(255,159,67,.55); }
.match-map-card[aria-pressed="true"] span { background: linear-gradient(90deg,#ff9f43,#ff7700); color: #141414; font-weight: 800; }
.match-rules-panel { border: 1px solid #383838; border-top: 2px solid var(--match-gold); border-radius: 4px; padding: 20px; background: linear-gradient(145deg,#1b1b1b,#121212); box-shadow: 0 9px 28px rgba(0,0,0,.45); }
.match-rules-panel h2 { font-size: 23px; }
.match-rule-mode { color: #ffcc86; font-size: 12px; font-weight: 600; }
.match-rules { display: grid; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #343434; margin-bottom: 20px; }
.match-rules small, .match-rule-note { font-size: 10px; color: #a8a8a8; line-height: 1.5; }
.match-rules-panel h3 { font-size: 14px; color: #fff; }
[data-match-confirm] { display: grid; gap: 6px; margin-bottom: 10px; }
[data-match-confirm] p { font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; margin: 0; padding: 7px 10px; border: 1px solid #333; border-left: 3px solid var(--match-gold); border-radius: 3px; background: #181818; color: #e4e4e4; }
[data-match-confirm] p:nth-child(2) { border-left-color: var(--match-violet); }
.match-image-unavailable { position: absolute; top: 20%; left: 20%; color: #bdbdbd; }
.match-game-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; padding: 10px 14px; border: 1px solid #383838; border-left: 3px solid var(--match-gold); border-radius: 4px; background: linear-gradient(145deg,#1b1b1b,#121212); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.match-game-bar > div { display: grid; gap: 4px; }
.match-game-bar > .match-result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.match-game-bar strong { font-size: 16px; color: #fff; letter-spacing: .03em; text-transform: uppercase; font-family: 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif; }
.match-game-bar span { color: #b8b8b8; font-size: 11px; }
.match-outcome { padding: 18px 16px; border: 1px solid #3a3a3a; border-top: 3px solid var(--match-gold); border-radius: 6px; background: radial-gradient(ellipse at 50% 0%,rgba(255,159,67,.16),transparent 68%),linear-gradient(160deg,#1d1d1d,#121212); box-shadow: 0 18px 48px rgba(0,0,0,.55); text-align: center; }
.match-outcome .match-kicker { color: var(--match-gold); font-size: 11px; letter-spacing: .18em; }
.match-outcome h2 { font-size: clamp(22px,2.5vw,32px); line-height: 1.1; color: #fff; margin: 6px 0 12px; text-transform: uppercase; }
.match-outcome p { color: #d0d0d0; font-size: 12px; }
body.site-shell:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="result"] .workspace {
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}
body.site-shell:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="result"] main {
    flex: 1 0 auto;
    padding: clamp(12px, 2vw, 32px) clamp(12px, 3vw, 48px) 32px !important;
}
.match-lobby[data-screen="result"] .match-outcome {
    display: grid;
    gap: clamp(16px, 2.3vw, 28px);
    padding: clamp(14px, 3.4vw, 48px);
    max-width: 1680px;
    margin-inline: auto;
    border: 1px solid #363636;
    border-radius: 12px;
    background: radial-gradient(ellipse at 50% 0%, #292929 0%, transparent 54%), #151515;
}
.match-lobby[data-screen="result"] .match-outcome-heading .match-kicker {
    margin: 0 0 5px;
    color: var(--match-gold);
    font-size: 12px;
}
.match-lobby[data-screen="result"] .match-outcome-heading h2 {
    margin: 0;
    font: 900 clamp(34px, 6vw, 82px)/.96 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.match-outcome-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1px;
    min-width: 0;
    border: 1px solid #353535;
    border-radius: 8px;
    background: #353535;
    overflow: hidden;
}
.match-outcome-summary > div {
    display: grid;
    flex: 1 1 150px;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 70px;
    padding: 10px 12px;
    background: #1c1c1c;
    overflow-wrap: anywhere;
}
.match-outcome-summary .match-stats-note { flex: 1 0 100%; margin: 0; padding: 8px 12px; background: #181818; font-size: 12px; line-height: 1.4; }
.match-outcome-summary span, .match-outcome-summary small { color: #b6b6b6; font: 700 11px/1.3 'Barlow', 'Segoe UI', sans-serif; }
.match-outcome-summary strong { color: #fff; font: 800 clamp(20px, 2.7vw, 34px)/1 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif; }
.match-outcome-score strong { color: var(--match-gold); }
.match-outcome-context span { text-transform: uppercase; }
.match-outcome .match-result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: min(100%, 680px);
    margin-inline: auto;
}
.match-outcome .match-result-actions > button {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.match-outcome .match-result-actions > button:focus-visible { outline-offset: 3px; }
.match-outcome-teams { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; text-align: left; }
.match-outcome-team { min-width: 0; padding: 12px; border: 1px solid #383838; border-top: 2px solid var(--match-gold); border-radius: 4px; background: linear-gradient(145deg,#1b1b1b,#131313); }
.match-outcome-team.p2 { border-top-color: var(--match-violet); }
.match-outcome-team-heading { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.match-outcome-team-heading > div:first-child { display: grid; gap: 3px; min-width: 0; }
.match-outcome-team-heading strong { color: #f5f5f5; font: 800 15px/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif; }
.match-outcome-team-heading span, .match-outcome-team-total { color: #999; font: 700 9px/1.2 monospace; letter-spacing: .04em; }
.match-outcome-team-total { text-align: right; overflow-wrap: anywhere; }
.match-outcome-fighters { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.match-outcome-fighter { display: grid; grid-template-columns: 84px minmax(0,1fr); min-width: 0; overflow: hidden; border: 1px solid #3d3d3d; background: #202020; }
.match-outcome-fighter.is-eliminated { border-color: #494949; background: #161616; }
.match-outcome-visual { position: relative; display: grid; place-items: center; min-height: 74px; overflow: hidden; background: #141414; }
.match-outcome-visual .match-sprite { width: 100%; height: 100%; padding: 4px; }
.match-outcome-fighter.is-eliminated .match-outcome-visual .match-sprite { filter: grayscale(1) brightness(.38) contrast(.9); }
.match-outcome-ko { position: absolute; inset: 0; display: grid; place-items: center; color: #ef6c68; font: 900 62px/.8 Arial,sans-serif; text-shadow: 0 2px 8px #000; opacity: .9; }
.match-outcome-copy { min-width: 0; padding: 7px 8px; }
.match-outcome-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.match-outcome-name > strong { display: block; color: #f5f5f5; font: 800 16px/1.15 'Barlow Condensed','Barlow','Segoe UI',sans-serif; overflow-wrap: anywhere; }
.match-outcome-mvp-badge { padding: 2px 5px; border: 1px solid #805022; border-radius: 4px; background: #302114; color: var(--match-gold); font: 800 10px/1.2 'Barlow','Segoe UI',sans-serif; }
.match-outcome-state { display: block; margin-top: 3px; color: #9bdba9; font: 700 8px/1 monospace; letter-spacing: .09em; }
.match-outcome-fighter.is-eliminated .match-outcome-state { color: #b7b7b7; }
.match-outcome-legacy { padding: 12px 16px; margin: 0; border: 1px solid #383838; border-left: 3px solid var(--match-gold); background: #181818; color: #e8e8e8; font-size: 12px; line-height: 1.55; }
.match-outcome-metrics { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 0; font: 700 11px/1.25 monospace; }
.match-outcome-metrics dd { font-size: 14px; }
.match-outcome-hp { display: block; width: 100%; height: 10px; margin-top: 5px; accent-color: #9bdba9; }
.match-outcome-hp::-webkit-meter-optimum-value { background: #9bdba9; }
.match-outcome-metrics dt { color: #777; }
.match-outcome-metrics dd { margin: 0; color: #ddd; text-align: right; }
.match-outcome-missing { color: #777; font: 900 28px/1 monospace; }
@media (max-width: 680px) {
    .match-game-bar { flex-wrap: wrap; }
    .match-outcome-teams { grid-template-columns: minmax(0,1fr); }
    .match-outcome-summary > div { flex-basis: 125px; min-height: 58px; padding: 8px; }
}
@media (max-width: 510px) {
    .match-outcome .match-result-actions { flex-direction: column; }
    .match-outcome .match-result-actions > button { flex: 0 0 auto; min-height: 44px; }
}
.match-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.match-empty { grid-column: 1 / -1; padding: 30px 10px; color: #b5b5b5; font-size: 13px; }
@media (max-width: 1450px) { .match-selection { grid-template-columns: 155px minmax(0,1fr) 250px; gap: 10px; } .match-browser { padding: 10px; } .match-fighters { grid-template-columns: repeat(6,minmax(0,1fr)); } .match-render { height: 215px; } }
@media (max-width: 1100px) { body.site-shell:is([data-route="/tceam"], [data-route="/play"]) main { padding: 20px 16px; } .match-selection { grid-template-columns: 140px minmax(0,1fr) 225px; } .match-fighters { grid-template-columns: repeat(4,minmax(0,1fr)); } .match-map-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } .match-draft { grid-template-columns: 1fr; } .match-format { display: flex; } .match-format label { flex: 1; } .match-pick-name > span { font-size: 9px; } }
@media (max-width: 800px) { .match-selection { grid-template-columns: minmax(0,1fr) 225px; } .match-sidebar { grid-column: 1 / -1; padding: 10px; } .match-sidebar h2, .match-sidebar .match-kicker, .match-series-list { display: none; } .match-sidebar > select { display: block; }   .match-map-layout { grid-template-columns: minmax(0,1fr); } .match-rules { grid-template-columns: repeat(3,minmax(0,1fr)); } .match-rules-panel { padding: 16px; } .match-collection { padding-left: 12px; } .match-collection small { display: none; } }
@media (max-width: 560px) { body.site-shell:is([data-route="/tceam"], [data-route="/play"]) main { padding: 16px 12px; } .match-hero { gap: 10px; } .match-hero h1 { font-size: 29px; } .match-hero p:last-child { font-size: 10px; } .match-collection strong { font-size: 30px; } .match-collection span { font-size: 7px; } .match-steps { gap: 4px; } .match-steps button, .match-final-step { font-size: 9px; padding: 8px 5px; } .match-steps button span { margin-right: 4px; } .match-selection { grid-template-columns: minmax(0,1fr); } .match-dossier { display: grid; grid-template-columns: 110px minmax(0,1fr); } .match-dossier-top { grid-column: 1/-1; } .match-render { height: 200px; border-bottom: 0; } .match-dossier-copy { padding: 12px; } .match-dossier h2 { font-size: 20px; } .match-facts { font-size: 9px; } .match-browser-meta { font-size: 8px; } .match-teams { gap: 7px; } .match-team { padding: 7px; } .match-team-slots { flex-direction: column; } .match-team-slot .match-sprite { width: 30px; height: 30px; } .match-team-slot { min-height: 38px; } .match-assist-row label { display: grid; font-size: 10px; } .match-assist-row .match-sprite { display: none; } .match-flow-footer, .match-launch { flex-wrap: wrap; gap: 12px; } .match-flow-footer > button { width: 100%; } .match-launch p { order: -1; width: 100%; } .match-map-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .match-stage-preview { aspect-ratio: 1.7; } .match-stage-preview > div { padding: 30px 14px 10px; } .match-stage-preview h2 { font-size: 25px; } .match-game-bar { align-items: start; } .match-game-bar span { font-size: 9px; } .match-game-bar button { font-size: 10px; flex-shrink: 0; } }
/* Fitted desktop layout. Mobile owns its viewport layout in match-mobile.css. */
@media (min-width: 900px) and (min-height: 620px) {
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"]) .site-footer { padding-block: 6px; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"]) .workspace { overflow: hidden; }
    :where(html:not([data-ui-mode="mobile"])) body.site-shell:is([data-route="/tceam"], [data-route="/play"]) main { min-height: 0; padding: 10px 18px; display: flex; flex-direction: column; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"]) [data-page="/play"] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby:is([data-screen="fighters"], [data-screen="maps"]) { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby fieldset { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby [data-match-panel="fighters"] { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-hero { margin: 0; flex-shrink: 0; min-height: 33px; padding-right: 365px; }
    :where(html:not([data-ui-mode="mobile"])) .match-hero h1 { font-size: clamp(25px,2.2vw,39px); margin-bottom: 4px; }
    :where(html:not([data-ui-mode="mobile"])) .match-hero .match-kicker, :where(html:not([data-ui-mode="mobile"])) .match-collection small { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-hero p:last-child, :where(html:not([data-ui-mode="mobile"])) .match-collection { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-collection { padding-left: 16px; }
    :where(html:not([data-ui-mode="mobile"])) .match-collection strong { font-size: 29px; }
    :where(html:not([data-ui-mode="mobile"])) .match-collection span { font-size: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-steps { position: absolute; right: 0; top: 0; padding-bottom: 0; border: 0; flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-steps button, :where(html:not([data-ui-mode="mobile"])) .match-final-step { padding: 6px 10px; font-size: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-status { margin: 0; min-height: 12px; font-size: 10px; flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-draft { grid-template-columns: 128px minmax(0,1fr); gap: 10px; margin: 0; flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-format { display: grid; gap: 5px; }
    :where(html:not([data-ui-mode="mobile"])) .match-format label { font-size: 10px; gap: 2px; }
    :where(html:not([data-ui-mode="mobile"])) .match-format select { padding: 4px 6px; height: 27px; font-size: 11px; }
    :where(html:not([data-ui-mode="mobile"])) .match-teams { gap: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-team { padding: 6px 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-team h3 { margin-bottom: 4px; font-size: 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-team-slots { flex-direction: row; }
    :where(html:not([data-ui-mode="mobile"])) .match-team-slot { min-height: 30px; }
    :where(html:not([data-ui-mode="mobile"])) .match-team-slot .match-sprite { width: 24px; height: 24px; }
    :where(html:not([data-ui-mode="mobile"])) .match-pick-name { gap: 2px; }
    :where(html:not([data-ui-mode="mobile"])) .match-pick-name > span { font-size: 9px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    :where(html:not([data-ui-mode="mobile"])) .match-assist-row { margin-top: 4px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assist-row label { font-size: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assist-row select { padding-block: 3px; font-size: 10px; height: 24px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assist-row .match-sprite { width: 24px; height: 24px; }
    :where(html:not([data-ui-mode="mobile"])) .match-selection { flex: 1; min-height: 0; grid-template-columns: 160px minmax(0,1fr) 255px; align-items: stretch; }
    :where(html:not([data-ui-mode="mobile"])) .match-sidebar { display: flex; flex-direction: column; min-height: 0; padding: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-sidebar > .match-kicker { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-sidebar h2 { font-size: 14px; margin-bottom: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-series-list { min-height: 60px; max-height: none; flex: 1; align-content: start; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby .match-series-button { padding: 7px 6px; }
    
    
    :where(html:not([data-ui-mode="mobile"])) .match-browser { display: flex; flex-direction: column; min-height: 0; padding: 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-browser-heading { margin-bottom: 6px; }
    :where(html:not([data-ui-mode="mobile"])) .match-browser-heading .match-kicker { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-browser-heading h2 { font-size: 19px; }
    :where(html:not([data-ui-mode="mobile"])) .match-browser-heading button { padding: 6px 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-search input { padding-block: 7px; }
    :where(html:not([data-ui-mode="mobile"])) .match-search svg { top: 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-edition-label { padding: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-browser-meta { margin: 6px 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-fighters { flex: 1; min-height: 0; grid-template-columns: repeat(var(--match-columns,8),minmax(0,1fr)); grid-template-rows: repeat(var(--match-rows,4),minmax(0,1fr)); }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby .match-fighter-card { min-height: 0; display: flex; flex-direction: column; }
    :where(html:not([data-ui-mode="mobile"])) .match-card-visual { flex: 1; min-height: 0; aspect-ratio: auto; }
    :where(html:not([data-ui-mode="mobile"])) .match-card-visual .match-sprite { position: absolute; inset: 0; max-height: none; padding: 3px; }
    :where(html:not([data-ui-mode="mobile"])) .match-card-name { flex-shrink: 0; height: 25px; min-height: 0; overflow: hidden; padding: 3px; font-size: 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-pagination { flex-shrink: 0; margin-top: 6px; gap: 12px; }
    :where(html:not([data-ui-mode="mobile"])) .match-pagination button { padding: 5px 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-dossier { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
    :where(html:not([data-ui-mode="mobile"])) .match-dossier-top { flex-shrink: 0; padding: 7px 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-render { display: block; flex: 1; height: 0; min-height: 65px; }
    :where(html:not([data-ui-mode="mobile"])) .match-dossier-copy { flex-shrink: 0; min-height: 0; max-height: 40%; overflow-y: auto; padding: 10px; scrollbar-width: thin; }
    :where(html:not([data-ui-mode="mobile"])) .match-series-tag { padding: 3px 5px; }
    :where(html:not([data-ui-mode="mobile"])) .match-dossier h2 { font-size: 19px; margin: 7px 0 5px; }
    :where(html:not([data-ui-mode="mobile"])) .match-dossier-copy > p { margin-bottom: 6px; font-size: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assign { flex-shrink: 0; gap: 5px; margin: 0; padding: 8px 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assign button { padding: 7px; font-size: 11px; }
    :where(html:not([data-ui-mode="mobile"])) .match-assign p { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-form-details { padding-top: 7px; margin-top: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-related-forms { max-height: 80px; overflow: auto; }
    :where(html:not([data-ui-mode="mobile"])) .match-facts { margin-bottom: 8px; font-size: 9px; gap: 4px; }
    :where(html:not([data-ui-mode="mobile"])) .match-flow-footer, :where(html:not([data-ui-mode="mobile"])) .match-launch { position: static; flex-shrink: 0; padding: 8px 12px; margin-top: 0; gap: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-flow-footer button, :where(html:not([data-ui-mode="mobile"])) .match-launch button { padding: 8px 12px; font-size: 11px; }
    :where(html:not([data-ui-mode="mobile"])) .match-flow-footer p, :where(html:not([data-ui-mode="mobile"])) .match-launch p { font-size: 10px; }
    :where(html:not([data-ui-mode="mobile"])) [data-match-panel="maps"] { flex: 1; min-height: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-map-layout { height: 100%; min-height: 0; grid-template-columns: minmax(0,1fr) 255px; gap: 14px; padding-bottom: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-map-layout > div { display: flex; flex-direction: column; min-height: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-preview { flex: 1; min-height: 75px; aspect-ratio: auto; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-preview > img { position: absolute; inset: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-preview > div { padding: 30px 16px 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-preview h2 { font-size: 25px; margin-bottom: 3px; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-heading { flex-shrink: 0; margin: 9px 0 6px; }
    :where(html:not([data-ui-mode="mobile"])) .match-stage-heading h2 { margin: 0; font-size: 15px; }
    :where(html:not([data-ui-mode="mobile"])) .match-map-grid { flex: 1; min-height: 0; grid-template-columns: repeat(6,minmax(0,1fr)); grid-template-rows: repeat(3,minmax(0,1fr)); gap: 6px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby .match-map-card { display: flex; flex-direction: column; min-height: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-map-card img { flex: 1; height: 0; min-height: 0; aspect-ratio: auto; object-fit: cover; }
    :where(html:not([data-ui-mode="mobile"])) .match-map-card span { font-size: 10px; padding: 4px; flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules-panel { min-height: 0; padding: 12px; overflow-y: auto; scrollbar-width: thin; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules-panel > .match-kicker { display: none; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules-panel h2 { font-size: 20px; margin-bottom: 7px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rule-mode { font-size: 10px; margin-bottom: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules { gap: 9px; padding-bottom: 10px; margin-bottom: 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules label { font-size: 11px; gap: 4px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules select { padding: 5px 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules small { font-size: 9px; }
    :where(html:not([data-ui-mode="mobile"])) .match-rules-panel h3 { margin-bottom: 5px; }
    :where(html:not([data-ui-mode="mobile"])) [data-match-confirm] p { margin-bottom: 0; padding: 5px 8px; font-size: 10px; line-height: 1.45; }
    :where(html:not([data-ui-mode="mobile"])) .match-rule-note { font-size: 9px; margin-bottom: 0; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-layout { flex: 1; min-height: 0; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-column { height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-surface { width: 100%; max-width: calc((100dvh - 185px) * 1066 / 600); flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; margin: 0 auto; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] #arena { flex: 1; min-height: 0; aspect-ratio: auto; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] #input-hud { flex-shrink: 0; margin: 0; position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; max-height: 30px; overflow: hidden; opacity: .9; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] #input-hud:hover,
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] #input-hud:focus-within { max-height: 180px; opacity: 1; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .hud-body { padding-block: 5px; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-toolbar { flex-shrink: 0; height: 28px; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .under-game { margin-block: 0; flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .input-hud { padding: 6px 12px; }
    :where(html:not([data-ui-mode="mobile"])) body.site-shell:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] main { max-width: 1920px; width: 100%; margin: 0 auto; padding: 8px 16px; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-statusbar { padding: 3px 12px; font-size: 10px; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .under-game .game-action-btn { padding-block: 5px; min-height: 32px; font-size: 11.5px; }
}
@media (max-width: 899px), (max-height: 619px) {
    body.site-shell:is([data-route="/tceam"], [data-route="/play"]) main { padding: 12px; }
    .match-hero { margin-bottom: 10px; }
    .match-hero h1 { font-size: 28px; margin-bottom: 6px; }
    .match-hero .match-kicker, .match-collection small { display: none; }
    .match-draft { gap: 8px; margin-bottom: 10px; }
    .match-team { padding: 6px; }
    .match-team-slot .match-sprite { width: 28px; height: 28px; }
    .match-team-slots { flex-direction: row; }
    .match-team-slot .match-pick-name > span { display: none; }
    .match-team-slot { min-height: 32px; justify-content: center; }
    .match-pick-name small { font-size: 8px; }
    .match-format { gap: 8px; }
    .match-format label { font-size: 10px; }
    .match-format select { padding: 5px; }
    .match-browser { padding: 9px; }
    .match-browser-heading h2 { font-size: 18px; }
    .match-browser-heading .match-kicker, .match-browser-meta > span:last-child { display: none; }
    .match-card-visual { max-height: 75px; }
    .match-card-name { font-size: 9px; min-height: 27px; }
    
    .match-dossier-copy { padding: 10px; }
    .match-dossier > .match-assign { grid-column: 1 / -1; margin: 8px; }
    .match-assign p { display: none; }
    .match-form-details { margin-top: 8px; padding-top: 8px; }
    .match-flow-footer p { display: none; }
    .match-flow-footer, .match-launch { padding-top: 8px; margin-top: 10px; }
    .match-stage-preview { max-height: 220px; }
}


/* Choose_Fighter_UI_Shell v1.10: charcoal panels, adaptive cards and bottom team dock.
   Adapted from the supplied styles.css. Keep these rules scoped to the TCEAM lobby. */
.match-lobby[data-ui-shell="choose-fighter"] {
    --match-gold: #ff9f43;
    --match-violet: #53dff1;
    font-family: 'Barlow', 'Segoe UI', sans-serif;
    color: #f4f5fa;
}
.match-lobby[data-ui-shell] :is(h1,h2,h3) { font-family: 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif; letter-spacing: .035em; }
.match-lobby[data-ui-shell] :is(button,input,select) { border-color: #3a3a3a; background-color: #202020; color: #e8e8e8; }
.match-lobby[data-ui-shell] button:hover:not(:disabled) { background: #2a2a2a; border-color: var(--match-violet); }
.match-lobby[data-ui-shell] .match-primary { background: var(--match-gold); border-color: var(--match-gold); color: #17110a; }
.match-lobby[data-ui-shell] .match-primary:hover:not(:disabled) { background: #ffb66e; border-color: #ffb66e; }
.match-lobby[data-ui-shell] .match-secondary { color: var(--match-violet); border-color: #3d6f78; background: #19272a; }
.match-lobby[data-ui-shell] .match-kicker { color: #a5a5a5; font-size: 9px; }
.match-lobby[data-ui-shell] :is(.match-sidebar,.match-browser,.match-dossier) {
    background: linear-gradient(145deg,#1b1b1b,#121212); border: 1px solid #373737; border-top: 2px solid #ff9f43;
    box-shadow: 0 9px 30px #0004;
}
.match-lobby[data-ui-shell] .match-sidebar h2 { font-size: 21px; }
.match-lobby[data-ui-shell] .match-series-button { background: #ffffff08; color: #c4c4c4; }
.match-lobby[data-ui-shell] .match-series-button[aria-pressed="true"] { color: #fff; background: linear-gradient(90deg,#ff9f4330,#28282880); box-shadow: inset 2px 0 var(--match-gold); }
.match-lobby[data-ui-shell] .match-series-button small { color: #b2aaa2; }

.match-lobby[data-ui-shell] .match-browser-heading h2 { font-size: 25px; }
.match-lobby[data-ui-shell] .match-browser-meta { color: #aaa; }
.match-lobby[data-ui-shell] .match-search input { background: #101010; padding-right: 30px; }
.match-lobby[data-ui-shell] .match-search svg { color: #aaa; }
.match-lobby[data-ui-shell] .match-search kbd { position: absolute; right: 9px; top: 8px; padding: 1px 5px; background: #242424; border: 1px solid #444; color: #bbb; font-size: 10px; }
.match-lobby[data-ui-shell] .match-edition-label { border-color: #4c4034; color: #ffcc86; }
.match-lobby[data-ui-shell] .match-fighters { gap: 9px; padding: 10px 8px; overflow: visible; }
.match-lobby[data-ui-shell] .match-fighter-tile {
    position: relative; min-height: 0; min-width: 0; transition: transform .18s cubic-bezier(.2,.8,.2,1); transform-origin: center;
}
.match-lobby[data-ui-shell] .match-fighter-tile:is(:hover,:focus-within) { transform: scale(1.12); z-index: 20; }
.match-lobby[data-ui-shell] .match-fighter-tile:has([aria-pressed="true"]) { transform: scale(1.14); z-index: 25; }
.match-lobby[data-ui-shell] .match-fighter-card {
    display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; padding: 0;
    border: 1px solid #3a3a3a; border-radius: 3px; background: linear-gradient(150deg,#232323,#151515); overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}
.match-lobby[data-ui-shell] .match-fighter-card:hover { border-color: #53dff1; box-shadow: 0 0 16px rgba(83,223,241,.65), 0 10px 24px rgba(0,0,0,.75); }
.match-lobby[data-ui-shell] .match-fighter-card[aria-pressed="true"] { border: 2.5px solid #ff9f43; box-shadow: 0 0 20px rgba(255,159,67,.85), 0 12px 28px rgba(0,0,0,.8); }
.match-lobby[data-ui-shell] .match-card-visual { position: relative; flex: 1; min-height: 0; background: none; }
.match-lobby[data-ui-shell] .match-card-visual .match-sprite { padding: 4px; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.match-lobby[data-ui-shell] .match-card-name {
    flex: 0 0 23px; height: 23px; min-height: 0; padding: 2px 4px; color: #eee; background: #0e0e0ef5;
    font: 700 12px/18px 'Barlow Condensed', sans-serif; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; text-align: center;
}
.match-lobby[data-ui-shell] .match-fighter-card[aria-pressed="true"] .match-card-name { background: linear-gradient(90deg,#ff9f43,#ff7700); color: #141414; }
.match-lobby[data-ui-shell] .match-card-picked {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 0; border: 0; background: #10101050; color: #fff; pointer-events: none;
    font: 800 11px 'Barlow', sans-serif; text-shadow: 0 1px 3px #000;
}
.match-lobby[data-ui-shell] .match-card-picked svg { width: 46%; max-width: 62px; flex-shrink: 0; overflow: visible; }
.match-lobby[data-ui-shell] .stamp-frame { fill: #161616e6; stroke: #eee; stroke-width: 2.5; }
.match-lobby[data-ui-shell] .stamp-inset { fill: none; stroke: var(--match-gold); stroke-width: 1.6; stroke-dasharray: 3 2.4; }
.match-lobby[data-ui-shell] .stamp-check { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.match-lobby[data-ui-shell] .in-team .match-sprite { filter: saturate(.6) brightness(.8); }
.match-lobby[data-ui-shell] .match-dossier-top { color: #bbb; border-color: #353535; }
.match-lobby[data-ui-shell] .match-render {
    background: radial-gradient(ellipse at 50% 38%,#ff9f4329,#78787814 55%,transparent 75%),linear-gradient(160deg,#1f1f1f,#101010);
}
.match-lobby[data-ui-shell] .match-character-render { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.match-lobby[data-ui-shell] .match-series-tag { background: #ff9f431a; border-color: #ff9f434d; color: #ffcc86; }
.match-lobby[data-ui-shell] .match-dossier-copy { background: #101010e6; }
.match-lobby[data-ui-shell] .match-dossier h2 { font-size: 27px; }
.match-lobby[data-ui-shell] .match-form-details { border-color: #393939; }
.match-lobby[data-ui-shell] .match-assign { border-color: #393939; background: #141414; }
.match-lobby[data-ui-shell] .match-draft {
    background: linear-gradient(180deg,#1a1a1a,#111); border: 1px solid #383838; padding: 9px 12px; gap: 7px 14px;
}
.match-lobby[data-ui-shell] .match-dock-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.match-lobby[data-ui-shell] .match-dock-heading > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.match-lobby[data-ui-shell] .match-dock-heading .match-kicker { margin: 0; }
.match-lobby[data-ui-shell] .match-dock-heading h2 { margin: 0; font-size: 15px; }
.match-lobby[data-ui-shell] .match-dock-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.match-lobby[data-ui-shell] .match-dock-tools button { padding: 4px 8px; font-size: 10px; }
.match-lobby[data-ui-shell] .match-team { background: none; border: 0; padding: 0; }
.match-lobby[data-ui-shell] .match-team h3 { color: #ffb570; }
.match-lobby[data-ui-shell] .match-team.p2 h3 { color: #70dfed; }
.match-lobby[data-ui-shell] .match-team-cell { position: relative; flex: 1; min-width: 0; }
.match-lobby[data-ui-shell] .match-team-slot { width: 100%; min-height: 43px; height: 100%; padding-right: 19px; border-color: #6b5240; background: linear-gradient(125deg,#2c2420,#1b1b1b); }
.match-lobby[data-ui-shell] .p2 .match-team-slot { border-color: #3d6f78; background: linear-gradient(125deg,#1b2a2c,#1b1b1b); }
.match-lobby[data-ui-shell] .match-team-slot.is-empty { border-style: dashed; border-color: #4b4b4b; background: #161616cc; color: #bbb; }
.match-lobby[data-ui-shell] .match-team-slot[aria-pressed="true"] { border-color: #ff9f43; box-shadow: 0 0 0 1px #ff9f43; }
.match-lobby[data-ui-shell] .match-slot-empty-mark { flex-shrink: 0; width: 24px; text-align: center; font-size: 22px; color: #999; }
.match-lobby[data-ui-shell] .match-slot-remove { position: absolute; right: 2px; top: 2px; padding: 0; width: 22px; height: 22px; line-height: 20px; background: #151515e6; color: #ddd; z-index: 1; }
.match-lobby[data-ui-shell] .match-slot-remove:hover, .match-lobby[data-ui-shell] .match-assist-remove:hover { background: #e54545; border-color: #ff7777; color: #fff; box-shadow: 0 0 0 2px rgba(229,69,69,.25); }
.match-lobby[data-ui-shell] .match-slot-remove:focus-visible, .match-lobby[data-ui-shell] .match-assist-remove:focus-visible { background: #e54545; border-color: #ff7777; color: #fff; }
.match-lobby[data-ui-shell] .match-fighter-card:disabled, .match-lobby[data-ui-shell] .match-random-card:disabled { filter: grayscale(1) brightness(.42); opacity: .58; cursor: not-allowed; }
.match-lobby[data-ui-shell] .match-fighter-tile.roster-locked .match-card-name { background: #242424; color: #8a8a8a; }
.match-lobby[data-ui-shell] .match-pick-name small { color: #b6aaa0; }
.match-lobby[data-ui-shell] .match-flow-footer { background: #111; border-color: #393939; padding-inline: 10px; }
@media (min-width: 900px) and (min-height: 620px) {
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell][data-screen="fighters"] .match-selection { grid-template-columns: clamp(145px,15vw,245px) minmax(0,1fr) clamp(235px,24vw,355px); }
    :where(html:not([data-ui-mode="mobile"])) body.site-shell:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="fighters"] { background: #0e0e0e; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="fighters"] .site-footer { display: none; }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="fighters"] .site-header { background: #101010; border-color: #333; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-hero { min-height: 31px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-hero h1 { font-size: 28px; margin: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-browser-heading { flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-browser-heading h2 { font-size: 22px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-draft { grid-template-columns: 130px minmax(0,1fr); flex-shrink: 0; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dossier-copy { max-height: 36%; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-render { min-height: 45px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dossier h2 { font-size: 22px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-assign { padding: 7px 10px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-assign button { min-height: 30px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-card-visual .match-sprite { position: absolute; inset: 0; }
}
@media (max-width: 899px), (max-height: 619px) {
    .match-lobby[data-ui-shell] .match-selection { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 10px; }
    .match-lobby[data-ui-shell] .match-dossier { grid-column: 1 / -1; display: grid; grid-template-columns: 180px minmax(0,1fr); }
    .match-lobby[data-ui-shell] .match-dossier-top { grid-column: 1 / -1; }
    .match-lobby[data-ui-shell] .match-assign { grid-column: 1 / -1; margin: 0; }
    .match-lobby[data-ui-shell] .match-render { min-height: 180px; height: auto; }
    .match-lobby[data-ui-shell] .match-fighters { grid-template-columns: repeat(var(--match-columns,3),minmax(0,1fr)); grid-auto-rows: 125px; }
    .match-lobby[data-ui-shell] .match-card-visual { aspect-ratio: auto; }
    .match-lobby[data-ui-shell] .match-card-visual .match-sprite { position: absolute; inset: 0; }
    .match-lobby[data-ui-shell] .match-draft { margin: 10px 0 0; grid-template-columns: 1fr; }
    .match-lobby[data-ui-shell] .match-format { grid-template-columns: 1fr 1fr; }
    .match-lobby[data-ui-shell] .match-team-slot .match-pick-name > span { display: block; font-size: 10px; }
}
@media (max-width: 580px) {
    .match-lobby[data-ui-shell] .match-selection { grid-template-columns: minmax(0,1fr); }
    .match-lobby[data-ui-shell] .match-sidebar { padding: 10px; }
    .match-lobby[data-ui-shell] .match-sidebar > select { display: block; }
    .match-lobby[data-ui-shell] .match-series-list { display: none; }
    .match-lobby[data-ui-shell] .match-dossier { grid-template-columns: 120px minmax(0,1fr); }
    .match-lobby[data-ui-shell] .match-dossier h2 { font-size: 23px; }
    .match-lobby[data-ui-shell] .match-teams { grid-template-columns: 1fr; }
    .match-lobby[data-ui-shell] .match-dock-heading { align-items: start; flex-direction: column; }
    .match-lobby[data-ui-shell] .match-dock-tools { width: 100%; justify-content: flex-start; }
    .match-lobby[data-ui-shell] .match-dock-heading > div:first-child { display: block; }
    .match-lobby[data-ui-shell] .match-collection { padding-left: 10px; }
    .match-lobby[data-ui-shell] .match-hero h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .match-lobby[data-ui-shell] .match-fighter-tile { transition: none; transform: none !important; }
}

/* Compact match settings and reference-style team strip, scoped to this lobby. */
.match-lobby[data-ui-shell] .match-top-controls {
    flex-shrink: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,1fr);
    justify-content: start; gap: 14px; margin: 0 0 8px; padding: 10px 12px;
    border: 1px solid #383838; border-radius: 4px; background: #181818;
}
.match-lobby[data-ui-shell] .match-top-controls label { font-size: 11px; font-weight: 600; color: #bdbdbd; gap: 5px; }
.match-lobby[data-ui-shell] .match-top-controls select {
    appearance: none; height: 34px; padding: 5px 30px 5px 10px; font-size: 13px; font-weight: 600;
    border-color: #525252; border-radius: 3px; background-color: #242424;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23bbb' stroke-width='1.5'/%3E%3C/svg%3E");
    background-position: right 10px center; background-repeat: no-repeat;
}
.match-lobby[data-ui-shell] .match-top-controls select:hover { border-color: #aaa; }
.match-lobby[data-ui-shell] .match-roster-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.match-lobby[data-ui-shell] .match-kind-switch { display: flex; border: 1px solid #444; border-radius: 3px; padding: 2px; gap: 2px; }
.match-lobby[data-ui-shell] .match-kind-switch button { border-color: transparent; padding: 5px 8px; font-size: 11px; }
.match-lobby[data-ui-shell] .match-kind-switch button[aria-pressed="true"] { background: var(--match-gold); color: #17110a; border-color: var(--match-gold); }
.match-lobby[data-ui-shell] .match-browser-heading { flex-wrap: wrap; }
.match-lobby[data-ui-shell] .match-browser-meta { align-items: center; flex-wrap: wrap; }
.match-lobby[data-ui-shell] [data-match-assist-none] { font-size: 11px; padding: 4px 8px; color: #ffcc86; }
.match-lobby[data-ui-shell] .match-draft { grid-template-columns: 1fr; gap: 10px; padding: 12px; border-radius: 4px; }
.match-lobby[data-ui-shell] .match-dock-heading h2 { font-size: 16px; }
.match-lobby[data-ui-shell] .match-dock-tools button { min-height: 30px; font-size: 11px; padding: 5px 10px; }
.match-lobby[data-ui-shell] .match-teams { position: relative; gap: 42px; }
.match-lobby[data-ui-shell] .match-teams::before { content: 'VS'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-10%); color: #eee; font: italic 900 20px 'Barlow Condensed',sans-serif; }
.match-lobby[data-ui-shell] .match-team { --team-accent: var(--match-gold); }
.match-lobby[data-ui-shell] .match-team.p2 { --team-accent: var(--match-violet); }
.match-lobby[data-ui-shell] .match-team h3 { color: var(--team-accent); font: 700 11px 'Barlow Condensed',sans-serif; margin-bottom: 6px; }
.match-lobby[data-ui-shell] .match-team-lineup { display: flex; align-items: stretch; gap: 7px; }
.match-lobby[data-ui-shell] .match-team-slots { flex: 1; min-width: 0; }
.match-lobby[data-ui-shell] .match-team-slot {
    min-height: 62px; gap: 8px; padding: 6px 21px 6px 6px; justify-content: flex-start;
    border: 1px solid color-mix(in srgb,var(--team-accent) 32%,#333); background: #222; box-shadow: none;
}
.match-lobby[data-ui-shell] .match-team-slot .match-sprite { width: 44px; height: 44px; flex-shrink: 0; padding: 3px; background: #141414; border: 1px solid #444; border-radius: 2px; }
.match-lobby[data-ui-shell] .match-team-slot .match-pick-name { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.match-lobby[data-ui-shell] .match-team-slot .match-pick-name > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 13px 'Barlow Condensed',sans-serif; }
.match-lobby[data-ui-shell] .match-pick-name small { font: 500 10px 'Barlow',sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #aaa; }
.match-lobby[data-ui-shell] .match-team-slot.is-empty { border-style: dashed; background: #191919; }
.match-lobby[data-ui-shell] .match-team-slot:is(:hover,[aria-pressed="true"]) { border-color: var(--team-accent); box-shadow: inset 0 0 0 1px var(--team-accent); }
.match-lobby[data-ui-shell] .match-team-slot:focus-visible { outline-color: var(--team-accent); }
.match-lobby[data-ui-shell] .match-assist-row { position: relative; flex: 0 0 78px; margin: 0; }
.match-lobby[data-ui-shell] .match-assist-slot { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: 100%; height: 100%; padding: 4px; border-color: #454545; background: #191919; text-align: center; }
.match-lobby[data-ui-shell] .match-assist-slot .match-sprite { width: 30px; height: 30px; }
.match-lobby[data-ui-shell] .match-assist-slot .match-slot-empty-mark { font-size: 20px; }
.match-lobby[data-ui-shell] .match-assist-copy { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.match-lobby[data-ui-shell] .match-assist-copy small { color: #bdbdbd; font-size: 9px; }
.match-lobby[data-ui-shell] .match-assist-copy > span { display: none; }
.match-lobby[data-ui-shell] .match-assist-slot:is(:hover,[aria-pressed="true"]) { border-color: var(--team-accent); box-shadow: inset 0 0 0 1px var(--team-accent); }
.match-lobby[data-ui-shell] .match-assist-slot:focus-visible { outline-color: var(--team-accent); }
.match-lobby[data-ui-shell] .match-assist-remove { position: absolute; top: 1px; right: 1px; width: 19px; height: 19px; padding: 0; font-size: 12px; background: #151515; }
.match-lobby[data-ui-shell] .match-render:not(.has-render) { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.match-lobby[data-ui-shell] .match-render:not(.has-render) > :not(.match-wide-background) { position: relative; z-index: 1; }
.match-lobby[data-ui-shell] .match-render.is-assist-preview:not(.has-render) { display: grid; place-items: center; }
.match-lobby[data-ui-shell] .match-render.is-assist-preview:not(.has-render) .match-sprite { width: min(70%,180px); height: min(70%,180px); object-fit: contain; image-rendering: pixelated; }
@media (min-width: 1500px) and (min-height: 620px) {
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-draft { grid-template-columns: 145px minmax(0,1fr); align-items: center; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dock-heading { display: contents; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dock-heading > div:first-child { display: block; grid-column: 1; grid-row: 1; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dock-heading h2 { margin-top: 4px; font-size: 20px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dock-tools { grid-column: 1 / -1; grid-row: 2; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-teams { grid-column: 2; grid-row: 1; }
}
@media (min-width: 900px) and (max-width: 1150px) {
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-team-slot .match-sprite { width: 30px; height: 36px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-team-slot { gap: 4px; padding-left: 4px; padding-right: 15px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-team-slot .match-pick-name > span { font-size: 11px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-teams { gap: 28px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-assist-row { flex-basis: 50px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-slot-remove { width: 17px; height: 17px; }
}
@media (max-width: 899px), (max-height: 619px) {
    .match-lobby[data-ui-shell] .match-top-controls { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
}
@media (max-width: 580px) {
    .match-lobby[data-ui-shell] .match-top-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .match-lobby[data-ui-shell] .match-teams { grid-template-columns: 1fr; gap: 14px; }
    .match-lobby[data-ui-shell] .match-teams::before { display: none; }
    .match-lobby[data-ui-shell] .match-team-slots { flex-direction: column; }
    .match-lobby[data-ui-shell] .match-assist-row { flex-basis: 72px; }
}

.match-lobby[data-ui-shell] .match-dock-heading > div:first-child { align-items: center; }
.match-lobby[data-ui-shell] .match-draft-summary { color: #bbb; font-size: 11px; margin: 0; }
@media (min-width: 1100px) and (min-height: 620px) {
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-top-controls { padding-block: 8px; }
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-top-controls label { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; }
}
@media (min-width: 1500px) and (min-height: 620px) {
    :where(html:not([data-ui-mode="mobile"])) .match-lobby[data-ui-shell] .match-dock-heading h2 { font-size: 23px; margin-block: 4px; }
}


/* Direct visual port of Choose_Fighter_UI_Shell/styles.css. */
.match-lobby[data-ui-shell="choose-fighter"] {
    --shell-bg: #0e0e0e; --shell-line: rgba(255,255,255,.13); --shell-line-strong: rgba(255,255,255,.22);
    --shell-amber: #ff9f43; --shell-cyan: #53dff1; color: #f4f5fa;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-sidebar,
.match-lobby[data-ui-shell="choose-fighter"] .match-browser,
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier {
    border: 1px solid var(--shell-line);
    background: linear-gradient(145deg,#1b1b1b,#121212);
    box-shadow: 0 9px 30px rgba(0,0,0,.4); position: relative;
}
.match-lobby[data-ui-shell="choose-fighter"] :is(.match-sidebar,.match-browser,.match-dossier)::before {
    content: ''; position: absolute; top: -1px; left: 0; height: 2px; width: 56px; background: var(--shell-amber); pointer-events: none;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-sidebar { padding: 10px 8px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button {
    min-height: 31px; padding: 6px 8px; border-left: 2px solid transparent; background: rgba(255,255,255,.035);
    color: #c4c4c4; transition: background .12s,color .12s,border-color .12s;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button:hover { background: #2a2a2a; color: #fff; }
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button[aria-pressed="true"] {
    border-left-color: var(--shell-amber); background: linear-gradient(90deg,rgba(255,159,67,.2),rgba(40,40,40,.5)); color: #fff;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-browser { padding: 10px 14px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-search input { height: 34px; background: #101010; border-color: #3a3a3a; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighters { gap: 9px; padding: 10px 8px; margin: -6px -4px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card {
    border: 1.5px solid #3a3a3a; border-radius: 4px; background: linear-gradient(150deg,#232323 0%,#151515 100%);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-card-visual .match-sprite { padding: 4px 4px 2px; filter: saturate(1.04) drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.match-lobby[data-ui-shell="choose-fighter"] .match-card-name {
    flex-basis: 21px; height: 21px; background: rgba(14,14,14,.96); border-top-color: rgba(255,255,255,.1);
    font: 700 11.5px/20px 'Barlow Condensed','Barlow','Segoe UI',sans-serif; color: #e8e8e8;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier { overflow: hidden; }
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier-top { color: #bbbbbb; border-bottom-color: var(--shell-line); }
.match-lobby[data-ui-shell="choose-fighter"] .match-render { background: radial-gradient(ellipse at 50% 38%,rgba(255,159,67,.16),rgba(120,120,120,.08) 55%,transparent 75%),linear-gradient(160deg,#1f1f1f,#101010); }
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier-copy { background: rgba(16,16,16,.9); }
.match-lobby[data-ui-shell="choose-fighter"] .match-draft {
    border: 1px solid var(--shell-line-strong); background: linear-gradient(180deg,#1a1a1a,#111); box-shadow: 0 -8px 28px rgba(0,0,0,.55); position: relative;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-draft::before { content:''; height:3px; width:100%; position:absolute; left:0; top:-1px; background:linear-gradient(90deg,var(--shell-amber),transparent 46%,var(--shell-cyan)); }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot { min-height:70px; border:1.5px solid #6b5240; border-radius:4px; background:linear-gradient(125deg,#2c2420,#1b1b1b); }
.match-lobby[data-ui-shell="choose-fighter"] .p2 .match-team-slot { border-color:#3d6f78; background:linear-gradient(125deg,#1b2a2c,#1b1b1b); }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot:not(.is-empty):hover { filter:brightness(1.12); transform:translateY(-1px); }
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-slot { border-color:var(--shell-line-strong); background:rgba(22,22,22,.8); border-radius:4px; }

.match-lobby[data-ui-shell="choose-fighter"] .match-wide-background {
    position: absolute; inset: 0; background-size: cover; background-position: center 15%;
    filter: blur(18px) saturate(1.1) brightness(.32); transform: scale(1.15); opacity: .8; pointer-events: none;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-wide-background::after {
    content: ''; position: absolute; inset: 0; opacity: .28;
    background: repeating-linear-gradient(125deg, transparent 0 55px, rgba(255,255,255,.04) 56px 57px);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-character-render { position: relative; z-index: 1; }


/* Reference file's final dark override: the shell is charcoal, not navy. */
.match-lobby[data-ui-shell="choose-fighter"] .match-sidebar,
.match-lobby[data-ui-shell="choose-fighter"] .match-browser,
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier { background: linear-gradient(145deg,#1b1b1b,#121212); box-shadow: 0 9px 30px rgba(0,0,0,.4); }
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button { background: rgba(255,255,255,.035); color: #c4c4c4; }
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button:hover { background: #2a2a2a; }
.match-lobby[data-ui-shell="choose-fighter"] .match-series-button[aria-pressed="true"] { background: linear-gradient(90deg,rgba(255,159,67,.2),rgba(40,40,40,.5)); }
.match-lobby[data-ui-shell="choose-fighter"] .match-search input { background:#101010; border-color:#3a3a3a; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card { background: linear-gradient(150deg,#232323 0%,#151515 100%); border-color:#3a3a3a; }
.match-lobby[data-ui-shell="choose-fighter"] .match-card-name { background: rgba(14,14,14,.96); border-top-color: rgba(255,255,255,.1); }
.match-lobby[data-ui-shell="choose-fighter"] .match-render { background: radial-gradient(ellipse at 50% 38%,rgba(255,159,67,.16),rgba(120,120,120,.08) 55%,transparent 75%),linear-gradient(160deg,#1f1f1f,#101010); }
.match-lobby[data-ui-shell="choose-fighter"] .match-wide-background { filter: blur(18px) saturate(1.1) brightness(.32); opacity:.8; }
.match-lobby[data-ui-shell="choose-fighter"] .match-dossier-copy { background: rgba(16,16,16,.9); }
.match-lobby[data-ui-shell="choose-fighter"] .match-draft { background: linear-gradient(180deg,#1a1a1a,#111); }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot { border-color:#6b5240; background:linear-gradient(125deg,#2c2420,#1b1b1b); }
.match-lobby[data-ui-shell="choose-fighter"] .p2 .match-team-slot { border-color:#3d6f78; background:linear-gradient(125deg,#1b2a2c,#1b1b1b); }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot.is-empty { background:rgba(22,22,22,.8); color:#7c7c7c; }
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-slot { background:rgba(22,22,22,.8); }


/* Exact charcoal reference tokens from Choose_Fighter_UI_Shell dark override. */
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card:hover {
    border: 1.5px solid #d9d9d9;
    box-shadow: 0 0 14px rgba(255,255,255,.18), 0 10px 24px rgba(0,0,0,.8);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card[aria-pressed="true"] {
    border: 2.5px solid #ff9f43;
    box-shadow: 0 0 20px rgba(255,159,67,.85), 0 12px 28px rgba(0,0,0,.8);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-card-name { background: rgba(14,14,14,.96); color:#e8e8e8; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card[aria-pressed="true"] .match-card-name {
    background: linear-gradient(90deg,#ff9f43,#ff7700); color:#0b101b; font-weight:800;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot { min-height:70px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot .match-sprite { width:54px; height:54px; }


/* Compact roster controls and the reference random tile. */
.match-lobby[data-ui-shell="choose-fighter"] .match-search input:focus-visible { outline: none; box-shadow: none; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card:focus-visible { outline: none; outline-offset: 0; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-card { text-align: center; }
.match-lobby[data-ui-shell="choose-fighter"] .match-card-name { display:flex; align-items:center; justify-content:center; text-align:center; }
.match-lobby .match-card-name.has-variant-number { display:flex; align-items:center; justify-content:center; gap:0.25em; }
.match-lobby[data-ui-shell="choose-fighter"] .match-search-row { margin-bottom: 2px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-search input { min-height: 32px; padding-block: 6px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-browser-meta { margin-block: 4px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-random-card { border-color:#3a3a3a; background:linear-gradient(150deg,#232323,#151515); }
.match-lobby[data-ui-shell="choose-fighter"] .match-random-card:hover { border-color:#d9d9d9; box-shadow:0 0 14px rgba(255,255,255,.18),0 10px 24px rgba(0,0,0,.8); }
.match-lobby[data-ui-shell="choose-fighter"] .match-random-card .match-dice { position:relative; display:block; width:clamp(42px,5vw,76px); aspect-ratio:1; margin:auto; border:3px solid #d9d9d9; border-radius:12px; background:radial-gradient(circle at 25% 25%,#2a2a2a 0 7%,transparent 8%),radial-gradient(circle at 75% 75%,#2a2a2a 0 7%,transparent 8%),#d9d9d9; box-shadow:0 3px 10px #000; transform:rotate(-8deg); }
.match-lobby[data-ui-shell="choose-fighter"] .match-random-card .match-card-name { background:#0e0e0e; color:#ffcc86; }

/* Hover states stay neutral; the violet token is reserved for deliberate team accents. */
.match-lobby[data-ui-shell] button:hover:not(:disabled),
.match-lobby[data-ui-shell] .match-fighter-card:hover:not(:disabled),
.match-lobby[data-ui-shell] .match-random-card:hover:not(:disabled) {
    border-color: #666;
}
.match-lobby[data-ui-shell] .match-slot-remove:hover:not(:disabled),
.match-lobby[data-ui-shell] .match-assist-remove:hover:not(:disabled) {
    border-color: #fff !important;
    background: #e54545;
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229,69,69,.25);
}
.match-lobby[data-ui-shell] .match-slot-remove:focus,
.match-lobby[data-ui-shell] .match-assist-remove:focus,
.match-lobby[data-ui-shell] .match-slot-remove:focus-visible,
.match-lobby[data-ui-shell] .match-assist-remove:focus-visible {
    outline: 0 !important;
    outline-offset: 0;
    border-color: #fff !important;
}


/* Gacha-style random draw, adapted from react-cards-opening-main without importing React/GSAP. */
.match-random-reveal { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(0,0,0,.78); backdrop-filter:blur(4px); }
.match-random-panel { width:min(760px,calc(100vw - 40px)); max-width:100%; min-width:0; margin:auto; padding:24px; border:1px solid #555; border-top:3px solid #ff9f43; border-radius:6px; background:linear-gradient(145deg,#1b1b1b,#101010); box-shadow:0 24px 90px #000; text-align:center; }
.match-random-panel h2 { margin:4px 0 16px; font:900 clamp(24px,4vw,42px)/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif; text-transform:uppercase; color:#ffcc86; }
.match-random-window { position:relative; width:100%; max-width:100%; min-width:0; height:220px; overflow:hidden; border:1px solid #444; background:radial-gradient(ellipse at center,#292929,#111); }
.match-random-window::before,.match-random-window::after { content:''; position:absolute; top:0; bottom:0; width:22%; z-index:2; pointer-events:none; }
.match-random-window::before { left:0; background:linear-gradient(90deg,#111,transparent); }
.match-random-window::after { right:0; background:linear-gradient(-90deg,#111,transparent); }
.match-random-track { height:100%; display:flex; align-items:stretch; gap:10px; width:max-content; transform:translateX(0); }
.match-random-card-face { width:150px; flex:0 0 150px; display:flex; flex-direction:column; align-items:center; justify-content:space-between; padding:10px 8px 8px; border:1px solid #3a3a3a; border-radius:4px; background:linear-gradient(150deg,#232323,#151515); color:#eee; }
.match-random-card-face .match-sprite { width:135px; height:170px; object-fit:contain; image-rendering:pixelated; }
.match-random-card-face strong { width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font:800 12px 'Barlow Condensed',sans-serif; text-align:center; }
.match-random-status { margin:14px 0 0; color:#aaa; font-size:12px; }
.match-random-reveal.is-revealed .match-random-panel { border-color:#ff9f43; box-shadow:0 0 32px rgba(255,159,67,.45),0 24px 90px #000; }
.match-random-reveal.is-revealed .match-random-window { border-color:#ff9f43; box-shadow:0 0 28px rgba(255,159,67,.5); }
@media (max-width:580px) { .match-random-panel { padding:16px; } .match-random-window { height:180px; } .match-random-card-face { width:120px; flex-basis:120px; } .match-random-card-face .match-sprite { width:105px; height:135px; } }

.match-random-panel.has-result .match-random-window { opacity:.35; filter:blur(1px); }
.match-random-result { position:absolute; left:50%; top:52%; z-index:4; display:flex; width:190px; height:230px; transform:translate(-50%,-50%); flex-direction:column; align-items:center; justify-content:space-between; padding:12px 10px; border:2px solid #ff9f43; border-radius:6px; background:linear-gradient(150deg,#2b2b2b,#141414); box-shadow:0 0 34px rgba(255,159,67,.75),0 20px 50px #000; animation:match-random-flip .55s cubic-bezier(.2,.8,.2,1) both; }
.match-random-result .match-sprite { width:170px; height:185px; object-fit:contain; image-rendering:pixelated; }
.match-random-result strong { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#0b101b; background:linear-gradient(90deg,#ff9f43,#ff7700); padding:4px; font:800 13px 'Barlow Condensed',sans-serif; text-align:center; }
.match-random-flyer { position:fixed; z-index:120; display:grid; place-items:center; pointer-events:none; border:2px solid #ff9f43; border-radius:5px; background:#1b1b1b; box-shadow:0 0 26px rgba(255,159,67,.8); transition:transform .65s cubic-bezier(.2,.8,.2,1),opacity .65s ease; }
.match-random-flyer .match-sprite { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
@keyframes match-random-flip { 0% { opacity:0; transform:translate(-50%,-50%) rotateY(180deg) scale(.65); } 100% { opacity:1; transform:translate(-50%,-50%) rotateY(0) scale(1); } }
@media (prefers-reduced-motion:reduce) { .match-random-result { animation:none; } .match-random-flyer { transition:none; } }

.match-random-window::before { left:0; background:linear-gradient(90deg,#111,transparent); }
.match-random-window::after { right:0; background:linear-gradient(-90deg,#111,transparent); }
.match-random-window { isolation:isolate; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-tile.in-team .match-sprite { filter:grayscale(1) brightness(.52) contrast(.95); }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-tile.in-team .match-card-name { background:#242424; color:#8a8a8a; }
.match-lobby[data-ui-shell="choose-fighter"] .match-fighter-tile.in-team .match-card-picked { background-color:rgba(48,48,48,.62); }

.match-random-pointer { position:absolute; z-index:8; top:0; bottom:0; left:50%; width:4px; transform:translateX(-50%); background:#ff9f43; box-shadow:0 0 12px rgba(255,159,67,.9); pointer-events:none; }
.match-random-pointer::before,.match-random-pointer::after { content:''; position:absolute; left:50%; width:0; height:0; transform:translateX(-50%); border-left:13px solid transparent; border-right:13px solid transparent; filter:drop-shadow(0 2px 4px #000); }
.match-random-pointer::before { top:0; border-top:20px solid #ff9f43; }
.match-random-pointer::after { bottom:0; border-bottom:20px solid #ff9f43; }

/* The draw uses measured Web Animations; no hard-coded reel offsets or reveal timers. */
.match-random-reveal { position:fixed; inset:0; margin:0; width:100vw; max-width:none; height:100dvh; max-height:none; padding:20px; box-sizing:border-box; border:0; color:#eee; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.match-random-reveal::backdrop { background:transparent; }
.match-random-panel { position:relative; box-sizing:border-box; width:min(760px,calc(100vw - 40px)); max-width:100%; min-width:0; margin:auto; }
.match-random-reveal.is-flying { background:transparent; backdrop-filter:none; }
.match-random-reveal .match-random-result { box-sizing:border-box; animation:none; margin:0; }
.match-random-card-face.is-winner { border-color:#ff9f43; box-shadow:inset 0 0 0 1px #ff9f43; }

/* Stage and rules are equal decision panels: the map remains visual, while
   the rules read as a compact control deck beside it. */
.match-lobby[data-ui-shell="choose-fighter"] .match-map-layout {
    grid-template-columns: minmax(0, .46fr) minmax(0, .54fr);
    gap: 16px;
    align-items: stretch;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-column,
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid #3a3a3a;
    border-top: 3px solid var(--match-gold);
    border-radius: 6px;
    background: linear-gradient(145deg,#1d1d1d,#101010);
    box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-column {
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    gap: 12px;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-heading {
    order: -1;
    margin: 0;
    padding: 0 2px;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-heading h2,
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel h2 {
    margin: 0;
    font: 900 clamp(20px,2.4vw,30px)/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-preview {
    aspect-ratio: 1.72;
    min-height: 0;
    border: 1px solid #454545;
    border-top: 0;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 10px 24px rgba(0,0,0,.4);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-preview > img { object-fit: cover; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav { width: 36px; height: 52px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav svg { width: 22px; height: 22px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav.is-prev { left: 10px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav.is-next { right: 10px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-caption { padding: 58px 16px 13px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-caption h2 { font-size: clamp(24px,3vw,38px); }
.match-lobby[data-ui-shell="choose-fighter"] .match-map-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
    grid-template-rows: none;
    gap: 8px;
    max-height: 118px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-map-card img { aspect-ratio: 1.8; }
.match-lobby[data-ui-shell="choose-fighter"] .match-map-card span { padding: 6px 5px; font-size: 9px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel { display: flex; flex-direction: column; gap: 8px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-header { padding-bottom: 12px; border-bottom: 1px solid #343434; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-header .match-kicker { margin-bottom: 7px; color: var(--match-gold); }
.match-lobby[data-ui-shell="choose-fighter"] .match-rule-mode { margin: 7px 0 0; color: #c8c8c8; font-size: 11px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 0; margin: 0; border: 0; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid #343434;
    border-radius: 4px;
    background: #171717;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label:focus-within,
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label:hover { border-color: #666; background: #1b1b1b; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rule-label { display: grid; gap: 3px; min-width: 0; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rule-label strong { color: #f5f5f5; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rule-label small { color: #999; font-size: 9px; line-height: 1.35; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules select { min-height: 34px; padding: 7px 9px; border-color: #4a4a4a; background: #0f0f0f; font-weight: 700; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-section { margin-top: auto; padding-top: 12px; border-top: 1px solid #343434; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-section h3 { margin-bottom: 8px; font: 800 13px/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif; text-transform: uppercase; color: var(--match-gold); }

.match-lobby[data-online-slot] .match-team-slot:disabled {
    opacity: 1;
    cursor: default;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-map-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
    gap: 16px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-rules-panel {
    gap: 14px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-rules-header {
    padding-bottom: 14px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-rule-mode {
    margin: 10px 0 0;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot="p2"] .match-rules > label:has(select:disabled) {
    opacity: 1;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot="p2"] .match-rules select:disabled {
    color: var(--text, #f2f2f2);
    cursor: default;
}
.match-online-vote {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid #2e313a;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(0,0,0,.18));
}
.match-online-vote-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.match-online-vote h3 {
    margin: 0;
    color: #fff;
    font: 800 15px/1 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.match-online-vote-outcome {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: #b7beca;
    font: 700 11px/1.15 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .03em;
}
.match-online-vote-outcome[data-outcome-state="agreed"] {
    border-color: rgba(32,201,151,.5);
    background: rgba(32,201,151,.14);
    color: #6ef0c5;
}
.match-online-vote-outcome[data-outcome-state="split"] {
    border-color: rgba(255,159,67,.5);
    background: rgba(255,159,67,.14);
    color: #ffc585;
}
.match-online-vote-outcome[data-outcome-state="random"] {
    border-color: rgba(83,223,241,.46);
    background: rgba(83,223,241,.13);
    color: #8cebf8;
}
.match-online-vote-rule {
    margin: 0;
    color: #a6adb9;
    font-size: 12px;
    line-height: 1.45;
}
.match-online-votes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.match-online-vote-card {
    --vote-accent: var(--match-gold);
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #30333c;
    border-top: 2px solid var(--vote-accent);
    border-radius: 5px;
    background: #141519;
    overflow-wrap: anywhere;
}
.match-online-vote-card.p2 {
    --vote-accent: var(--match-violet);
}
.match-online-vote-card[data-local="true"] {
    border-color: color-mix(in srgb, var(--vote-accent) 44%, #30333c);
    background: linear-gradient(180deg, color-mix(in srgb, var(--vote-accent) 7%, #141519), #121317);
}
.match-vote-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}
.match-vote-card-role {
    color: var(--vote-accent);
    font: 800 12px/1 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}
.match-vote-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: #b8bfcb;
    font: 700 10px/1.2 'Barlow', 'Segoe UI', sans-serif;
    white-space: nowrap;
}
.match-online-vote-card[data-vote-state="stage"] .match-vote-card-tag {
    border-color: color-mix(in srgb, var(--vote-accent) 40%, transparent);
    background: color-mix(in srgb, var(--vote-accent) 12%, transparent);
    color: color-mix(in srgb, var(--vote-accent) 82%, #fff);
}
.match-online-vote-card[data-vote-state="random"] .match-vote-card-tag {
    border-color: rgba(83,223,241,.36);
    background: rgba(83,223,241,.1);
    color: #93ecfa;
}
.match-online-vote-card[data-ready="true"] .match-vote-card-tag {
    border-color: rgba(32,201,151,.48);
    background: rgba(32,201,151,.15);
    color: #6ef0c5;
}
.match-vote-card-body {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.match-vote-card-thumb {
    display: grid;
    place-items: center;
    width: 56px;
    height: 38px;
    flex: 0 0 56px;
    overflow: hidden;
    border: 1px solid #3c3f49;
    border-radius: 4px;
    background: #0d0e11;
    color: #8f96a3;
}
.match-vote-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.match-vote-card-thumb .match-vote-icon {
    width: 18px;
    height: 18px;
}
.match-online-vote-card[data-vote-state="random"] .match-vote-card-thumb {
    border-color: rgba(83,223,241,.38);
    background: rgba(83,223,241,.08);
    color: #84e9f7;
}
.match-online-vote-card[data-vote-state="missing"] .match-vote-card-thumb {
    border-style: dashed;
    border-color: #494d59;
}
.match-vote-card-placeholder {
    font: 800 15px/1 'Barlow Condensed', sans-serif;
}
.match-vote-card-copy {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
}
.match-vote-card-stage {
    overflow: hidden;
    color: #f6f7fb;
    font: 800 16px/1.15 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.match-online-vote-card[data-vote-state="missing"] .match-vote-card-stage {
    color: #8d94a1;
    font-weight: 600;
}
.match-online-vote-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.match-online-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #444753;
    border-radius: 5px;
    background: #1c1d22;
    color: #f2f4f8;
    font: 700 13px/1.15 'Barlow', 'Segoe UI', sans-serif;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.match-online-vote-btn .match-vote-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
.match-online-vote-btn:hover:not(:disabled) {
    border-color: var(--match-gold);
    background: #27221b;
    color: #fff;
}
.match-online-vote-btn.is-current[aria-pressed="true"] {
    border-color: var(--match-gold);
    background: linear-gradient(135deg, rgba(255,159,67,.24), rgba(255,120,0,.15));
    color: #ffd39e;
    box-shadow: inset 0 0 0 1px rgba(255,159,67,.42);
}
.match-online-vote-btn.is-random[aria-pressed="true"] {
    border-color: var(--match-violet);
    background: linear-gradient(135deg, rgba(83,223,241,.22), rgba(50,175,205,.13));
    color: #adf2fc;
    box-shadow: inset 0 0 0 1px rgba(83,223,241,.4);
}
.match-online-vote-btn:disabled {
    opacity: .52;
    cursor: not-allowed;
}
.match-stage-vote-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}
.match-stage-vote-badges[hidden] {
    display: none;
}
.match-stage-vote-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid rgba(255,159,67,.65);
    border-radius: 4px;
    background: rgba(14,15,18,.84);
    backdrop-filter: blur(6px);
    color: #ffd29c;
    font: 800 11px/1 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.match-stage-vote-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--match-gold);
}
.match-stage-vote-badge.p2 {
    border-color: rgba(83,223,241,.62);
    color: #a4f0fb;
}
.match-stage-vote-badge.p2::before {
    background: var(--match-violet);
}
.match-online-result-state { align-self: center; margin: 0; }
.match-online-random-fighter {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 6px;
    padding: 8px 12px;
    border: 1px solid var(--line, #2e2e2e);
    border-radius: 6px;
    background: var(--panel, #181818);
}
.match-online-random-fighter strong { font-size: .875rem; }
.match-online-random-fighter p { margin: 2px 0 0; color: var(--muted, #a3a3a3); font-size: .75rem; }
.match-lobby[data-ui-shell="choose-fighter"] [data-match-confirm] { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; margin: 0; }
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] [data-match-confirm] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-team { min-width: 0; padding: 9px; border: 1px solid #383838; border-left: 2px solid var(--match-gold); border-radius: 4px; background: #151515; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-team:nth-child(2) { border-left-color: var(--match-violet); }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-team h4 { margin: 0 0 7px; color: #f4f4f4; font: 800 11px/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif; letter-spacing: .08em; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-team h4.match-confirm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 8px;
}
.match-confirm-role {
    color: var(--match-gold);
    font: 800 12px/1 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.match-confirm-team.p2 .match-confirm-role { color: var(--match-violet); }
.match-confirm-state {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    color: #b7becb;
    font: 700 10px/1.2 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: .02em;
    white-space: nowrap;
}
.match-confirm-team[data-ready="true"] .match-confirm-state {
    border-color: rgba(32,201,151,.5);
    background: rgba(32,201,151,.15);
    color: #6ef0c5;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-team {
    padding: 10px 11px;
    border-color: #31343d;
    background: #141519;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-team[data-ready="true"] {
    border-color: rgba(32,201,151,.36);
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-fighter {
    padding: 6px 8px;
    border-radius: 4px;
    background: #1a1c22;
    border-color: #2f323b;
    gap: 9px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-fighter .match-sprite {
    width: 40px;
    height: 44px;
    flex: 0 0 40px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-fighter-copy strong {
    font-size: 13px;
}
.match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-confirm-fighter-copy small {
    font-size: 10px;
    color: #a0a6b3;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighters { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 5px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighter { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px; border: 1px solid #303030; background: #1b1b1b; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighter .match-sprite { width: 34px; height: 38px; flex: 0 0 34px; object-fit: contain; image-rendering: pixelated; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighter-copy { display: grid; min-width: 0; gap: 2px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighter-copy strong { overflow: hidden; color: #eee; font: 700 11px/1.1 'Barlow Condensed',sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-fighter-copy small { overflow: hidden; color: #999; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-empty { display: grid; width: 34px; height: 38px; flex: 0 0 34px; place-items: center; border: 1px dashed #666; color: #999; }
.match-lobby[data-ui-shell="choose-fighter"] .match-confirm-assist { margin: 7px 0 0; color: #aaa; font: 800 8px/1.2 monospace; letter-spacing: .04em; }
.match-lobby[data-ui-shell="choose-fighter"] .match-bestof-note { display: block; grid-column: 1/-1; margin-top: 4px; color: #e66a6a; font-size: 9px; line-height: 1.3; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label:has(select:disabled) { opacity: .62; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules select:disabled { cursor: not-allowed; color: #888; border-color: #333; background: #111; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label[data-match-cpu-control] { grid-column: 1/-1; grid-template-columns: minmax(0,1fr); gap: 7px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label[data-match-cpu-control] > select { display: none; }
.match-lobby[data-ui-shell="choose-fighter"] .match-cpu-picker { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-cpu-choice {
    position: relative;
    min-height: 32px;
    padding: 5px 4px;
    border: 1px solid #454545;
    border-radius: 3px;
    background: #111;
    color: #e7e7e7;
    font: 800 12px/1 'Barlow Condensed',sans-serif;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-cpu-choice:hover:not(:disabled) { border-color: var(--match-gold); background: #272018; }
.match-lobby[data-ui-shell="choose-fighter"] .match-cpu-choice[aria-pressed="true"] { border-color: var(--match-gold); background: var(--match-gold); color: #16110b; box-shadow: 0 0 0 1px var(--match-gold); }
.match-lobby[data-ui-shell="choose-fighter"] .match-cpu-choice[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 2px; right: 3px; font: 900 8px/1 sans-serif; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label:not([data-match-cpu-control]) .match-rule-label strong { font-weight: 900; color: #fff; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label:not([data-match-cpu-control]) .match-rule-label small { color: #bdbdbd; }
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label[data-match-cpu-control] { font-weight: 800; color: #fff; }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-cell { position: relative; }
.match-lobby[data-ui-shell="choose-fighter"] .match-order-badge { position: absolute; top: 5px; left: 5px; z-index: 2; padding: 3px 5px; color: #ff7676; font: 900 13px/1 'Barlow Condensed',sans-serif; letter-spacing: .05em; text-shadow: 0 1px 0 #000; pointer-events: none; }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot.is-order-active .match-sprite { filter: grayscale(1) brightness(.68); }
.match-lobby[data-ui-shell="choose-fighter"] .match-team-slot.is-order-active .match-pick-name > span { color: #ff7e7e; }

/* Keep the site chrome visible while the workspace scrolls, with a quiet custom rail. */
.site-shell .workspace, .match-lobby .match-rules-panel, .match-lobby .match-series-list, .match-lobby .match-map-grid { scrollbar-width: thin; scrollbar-color: #555 #151515; }
.site-shell .workspace::-webkit-scrollbar, .match-lobby *::-webkit-scrollbar { width: 8px; height: 8px; }
.site-shell .workspace::-webkit-scrollbar-track, .match-lobby *::-webkit-scrollbar-track { background: #151515; }
.site-shell .workspace::-webkit-scrollbar-thumb, .match-lobby *::-webkit-scrollbar-thumb { border: 2px solid #151515; border-radius: 8px; background: linear-gradient(180deg,#777,#444); }
.site-shell .workspace::-webkit-scrollbar-thumb:hover, .match-lobby *::-webkit-scrollbar-thumb:hover { background: var(--accent,#ff9f43); }

/* Completely hide internal SWF loading/menu screens until battle phase is active */
#arena:has([data-match-engine-loading]) ruffle-player,
body[data-match-screen="game"] #match-lobby:not([data-phase="fighting"]) ~ .play-layout #arena ruffle-player {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.match-engine-loading { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, #1c1c1c 0%, #0b0b0b 75%); }
body > .match-engine-loading { position: fixed; z-index: 500; }
.match-engine-loading-card { display: grid; justify-items: center; gap: 10px; min-width: min(360px,calc(100vw - 32px)); padding: 30px 34px; border: 1px solid #484848; border-top: 3px solid var(--match-gold,#ff9f43); border-radius: 6px; background: linear-gradient(145deg,#202020,#111); box-shadow: 0 20px 70px #000; text-align: center; }
.match-engine-loading-card strong { color: #fff; font: 900 24px/1 'Barlow Condensed','Barlow','Segoe UI',sans-serif; text-transform: uppercase; }
.match-engine-loading-card small { color: #bdbdbd; font-size: 11px; }
.match-engine-loading-timer { margin-top: 2px; padding: 4px 12px; border: 1px solid rgba(255,159,67,.35); border-radius: 999px; background: rgba(255,159,67,.1); color: var(--match-gold,#ff9f43); font: 800 13px/1.2 'JetBrains Mono',Consolas,monospace; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.match-engine-loading-progress { min-height: 1.2em; color: var(--muted, #b9b9c6); font: 600 12px/1.2 'JetBrains Mono',Consolas,monospace; font-variant-numeric: tabular-nums; }
.match-engine-cancel-btn { margin-top: 6px; min-height: 36px; padding: 8px 18px; border: 1px solid #5a5a5a; border-radius: 4px; background: #232323; color: #f1f1f1; font: 800 12px/1 'Barlow Condensed',sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.match-engine-cancel-btn:hover { border-color: #ff6b6b; background: rgba(255,107,107,.16); color: #ffd4d4; }
.match-engine-spinner { width: 34px; height: 34px; border: 3px solid #444; border-top-color: var(--match-gold,#ff9f43); border-radius: 50%; animation: match-engine-spin .8s linear infinite; }
@keyframes match-engine-spin { to { transform: rotate(360deg); } }

/* 3-Column Arena Wing Layout on Battle Screen (Left: Match Status & Teams, Center: Arena, Right: Audio/Settings & Controls) */
.match-lobby:not([data-screen="game"]) .match-game-teams { display: none; }
.match-lobby[data-screen="game"] .match-game-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid #383838;
    border-left: 3px solid var(--match-gold);
    border-radius: 6px;
    background: linear-gradient(145deg,#1b1b1b,#121212);
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.match-lobby[data-screen="game"] .match-game-header {
    display: grid;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid #303030;
}
.match-lobby[data-screen="game"] .match-game-header strong {
    font-size: 18px;
    line-height: 1.1;
    color: var(--match-gold);
}
.match-lobby[data-screen="game"] .match-game-header span {
    font-size: 11.5px;
    line-height: 1.45;
    color: #d0d0d0;
}
.match-lobby[data-screen="game"] .match-game-teams {
    display: grid;
    gap: 10px;
}
.match-lobby[data-screen="game"] .match-confirm-team {
    padding: 10px;
    border: 1px solid #343434;
    border-top: 2px solid var(--match-gold);
    border-radius: 4px;
    background: #141414;
}
.match-lobby[data-screen="game"] .match-confirm-team.p2 {
    border-top-color: var(--match-violet);
}
.match-lobby[data-screen="game"] .match-confirm-team h4 {
    margin: 0 0 8px;
    font: 800 12px/1 'Barlow Condensed',sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--match-gold);
}
.match-lobby[data-screen="game"] .match-confirm-team.p2 h4 {
    color: var(--match-violet);
}
.match-lobby[data-screen="game"] .match-confirm-fighters {
    display: grid;
    gap: 6px;
}
.match-lobby[data-screen="game"] .match-confirm-fighter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border: 1px solid #2c2c2c;
    border-radius: 3px;
    background: #1b1b1b;
}
.match-lobby[data-screen="game"] .match-confirm-fighter .match-sprite {
    width: 34px;
    height: 34px;
    padding: 2px;
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    background: #101010;
}
.match-lobby[data-screen="game"] .match-confirm-fighter-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.match-lobby[data-screen="game"] .match-confirm-fighter-copy strong {
    font: 700 12.5px/1.15 'Barlow Condensed',sans-serif;
    color: #f3f3f3;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-lobby[data-screen="game"] .match-confirm-fighter-copy small {
    font-size: 9.5px;
    color: #9e9e9e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-lobby[data-screen="game"] .match-confirm-assist {
    margin: 7px 0 0;
    padding-top: 6px;
    border-top: 1px dashed #333;
    font: 700 10.5px/1.3 'Barlow Condensed',sans-serif;
    letter-spacing: .04em;
    color: #ffcc86;
}
.match-lobby[data-screen="game"] .match-result-actions,
.match-lobby[data-screen="game"] [data-match-return] {
    width: 100%;
}
.match-lobby[data-screen="game"] [data-match-return] {
    min-height: 36px;
    font: 800 13px/1 'Barlow Condensed',sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-color: var(--match-gold);
    background: rgba(255,159,67,.14);
    color: #ffd39b;
}
.match-lobby[data-screen="game"] [data-match-return]:hover {
    background: var(--match-gold);
    color: #14100a;
}

.arena-audio-card {
    display: grid;
    gap: 12px;
}
.arena-sfx-row {
    display: grid;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2e2e2e;
}
.arena-sfx-copy label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #f2f2f2;
    margin-bottom: 3px;
}
.arena-sfx-copy p {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #9e9e9e;
}
.arena-range-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.arena-range-control input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: var(--accent, #ff9f43);
    cursor: pointer;
}
.arena-range-control output {
    min-width: 38px;
    text-align: right;
    font: 700 12px/1 'JetBrains Mono',Consolas,monospace;
    color: var(--accent, #ff9f43);
}
.arena-audio-card .under-game {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}
.arena-audio-card .under-game .game-action-btn {
    width: 100%;
    justify-content: center;
    padding: 7px 8px;
    font-size: 11.5px;
}

@media (min-width: 1180px) {
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] [data-page="/play"] {
        display: grid !important;
        grid-template-columns: minmax(245px, 295px) minmax(0, 1fr) minmax(245px, 295px);
        gap: 16px;
        align-items: stretch;
    }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-layout {
        display: contents !important;
    }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] #match-lobby {
        grid-column: 1;
        align-self: start;
        max-height: calc(100dvh - 125px);
        overflow-y: auto;
    }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .game-column {
        grid-column: 2;
        min-width: 0;
    }
    :where(html:not([data-ui-mode="mobile"])) body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-aside {
        grid-column: 3;
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        align-self: start;
        max-height: calc(100dvh - 125px);
        overflow-y: auto;
    }
}
@media (max-width: 1179px) {
    body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] [data-page="/play"] {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    body:is([data-route="/tceam"], [data-route="/play"])[data-match-screen="game"] .play-aside {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 960px) {
    .match-lobby[data-ui-shell="choose-fighter"][data-online-slot] .match-map-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .match-lobby[data-ui-shell="choose-fighter"] .match-map-layout { grid-template-columns: minmax(0,1fr); }
    .match-lobby[data-ui-shell="choose-fighter"] .match-stage-column { display: flex; flex-direction: column; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-stage-preview { aspect-ratio: 1.72; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel { display: block; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel > * + * { margin-top: 12px; }
    .match-lobby[data-ui-shell="choose-fighter"] [data-match-confirm] { grid-template-columns: 1fr; }
    .match-lobby[data-ui-shell="choose-fighter"][data-online-slot] [data-match-confirm] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .match-online-votes,
    .match-online-vote-actions,
    .match-lobby[data-ui-shell="choose-fighter"][data-online-slot] [data-match-confirm] {
        grid-template-columns: minmax(0, 1fr);
    }
    .match-stage-vote-badges { top: 8px; left: 8px; }
}
@media (max-width: 430px) {
    .match-lobby[data-ui-shell="choose-fighter"] .match-stage-column,
    .match-lobby[data-ui-shell="choose-fighter"] .match-rules-panel { padding: 12px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-rules { grid-template-columns: minmax(0,1fr); }
    .match-lobby[data-ui-shell="choose-fighter"] .match-rules > label { grid-template-columns: minmax(0,1fr) 104px; gap: 8px; padding: 9px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-map-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav {
    width: 34px;
    height: 46px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav:hover:not(:disabled) {
    background: transparent;
    border-color: transparent;
    color: var(--match-gold);
    transform: translateY(-50%) scale(1.15);
}
.match-lobby[data-ui-shell="choose-fighter"] :is(.match-top-controls, [data-online-format-control]) {
    --match-toolbar-height: 36px;
    --match-toolbar-font: 700 14px/20px 'Barlow', 'Segoe UI', sans-serif;
    --match-toolbar-label-font: 700 12px/16px 'Barlow', 'Segoe UI', sans-serif;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px 16px;
    padding: 8px 12px;
}
.match-lobby[data-ui-shell="choose-fighter"] :is(.match-top-controls > label, .match-rules-header > [data-online-format-control]) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    flex: 0 0 auto;
    width: fit-content;
    color: #ccc;
    font: var(--match-toolbar-label-font);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-rules-header > [data-online-format-control] {
    margin-top: 12px;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-roster-control-group,
.match-lobby[data-ui-shell="choose-fighter"] .match-ownership-control-group { display:flex; flex:0 1 auto; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; max-width:100%; }
.match-lobby[data-ui-shell="choose-fighter"] .match-roster-control-group { border-left:1px solid #3a3a3a; padding-left:16px; }
.match-lobby[data-ui-shell="choose-fighter"] .match-control-label { color:#ccc; font:var(--match-toolbar-label-font); text-align:left; text-transform:uppercase; letter-spacing:.04em; }
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls .match-roster-tools { max-width:100%; gap:8px; align-items:stretch; }
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls [data-match-random] {
    display:inline-flex; align-items:center; justify-content:center;
    height:var(--match-toolbar-height); min-height:var(--match-toolbar-height);
    padding:0 10px; font:var(--match-toolbar-font); letter-spacing:.02em;
    text-transform:none; white-space:nowrap; border-radius:4px;
}
@media(max-width:700px) {
    .match-lobby[data-ui-shell="choose-fighter"] .match-roster-control-group { flex-basis:100%; border-left:0; border-top:1px solid #333; padding:10px 0 0; }
}
.match-lobby[data-ui-shell="choose-fighter"] .match-native-control {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-segmented,
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-toggle,
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls .match-kind-switch {
    display: inline-flex;
    align-items: stretch;
    height: var(--match-toolbar-height);
    width: fit-content;
    background: #141414;
    border-radius: 4px;
    padding: 2px;
    gap: 2px;
    border: 1px solid #3c3c3c;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
}
.match-lobby[data-ui-shell="choose-fighter"] :is(.match-top-controls, [data-online-format-control]) :is(.match-segmented,.match-assist-toggle,.match-kind-switch) button {
    flex: 0 0 auto;
    min-width: 0;
    height: calc(var(--match-toolbar-height) - 6px);
    min-height: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #c8c8c8;
    font: var(--match-toolbar-font);
    text-transform: none;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .12s, color .12s, box-shadow .12s;
    white-space: nowrap;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-segmented button:hover:not([aria-pressed="true"]),
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-toggle button:hover:not([aria-pressed="true"]),
.match-lobby[data-ui-shell="choose-fighter"] .match-kind-switch button:hover:not([aria-pressed="true"]) {
    background: #252525;
    color: #fff;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-segmented button[aria-pressed="true"],
.match-lobby[data-ui-shell="choose-fighter"] .match-kind-switch button[aria-pressed="true"] {
    background: var(--match-gold);
    color: #12100d;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-toggle button[data-assist-choice="on"][aria-pressed="true"] {
    background: #238653;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-toggle button[data-assist-choice="off"][aria-pressed="true"] {
    background: #b83a42;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.match-lobby[data-ui-shell="choose-fighter"] .match-assist-toggle button:focus-visible,
.match-lobby[data-ui-shell="choose-fighter"] .match-segmented button:focus-visible,
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls .match-kind-switch button:focus-visible {
    z-index: 1;
    outline: 2px solid var(--match-gold);
    outline-offset: -1px;
}
.match-lobby[data-ui-shell="choose-fighter"] .match-top-controls label[data-match-cpu-control] select {
    width: 64px;
    height: var(--match-toolbar-height);
    padding: 0 20px 0 10px;
    font: var(--match-toolbar-font);
}
@media (max-width: 700px) {
    .match-lobby[data-ui-shell="choose-fighter"] .match-top-controls {
        gap: 10px 14px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] .match-top-controls > label {
        flex: 0 1 auto;
    }
}
.match-lobby[data-ui-shell="choose-fighter"] .match-rules > label[data-match-cpu-control] { display: grid; }

/* Keep the Online roster usable when the setup controls exceed the available height. */
@media (min-width: 900px) and (min-height: 620px) {
    html:not([data-ui-mode="mobile"]) body[data-route="/play"][data-match-screen="fighters"]:has(#match-lobby[data-online-slot]) .workspace {
        overflow-y: auto;
    }
    html:not([data-ui-mode="mobile"]) .match-lobby[data-online-slot][data-screen="fighters"] .match-selection {
        min-height: 290px;
    }
    html:not([data-ui-mode="mobile"]) .match-lobby[data-online-slot][data-screen="fighters"] .match-fighters {
        min-height: 180px;
    }
}
@media (min-width: 900px) and (620px <= height < 780px) {
    html:not([data-ui-mode="mobile"]) .match-lobby[data-online-slot][data-screen="fighters"] {
        height: auto;
    }
    html:not([data-ui-mode="mobile"]) .match-lobby[data-online-slot][data-screen="fighters"] :is(fieldset, [data-match-panel="fighters"], .match-selection) {
        flex: 0 0 auto;
    }
}

/* Phone setup stays in the normal scroll flow in either orientation. */
@media (max-width: 600px) and (pointer: coarse) {
    .match-lobby[data-ui-shell="choose-fighter"] .match-top-controls {
        --match-toolbar-height: 50px;
        gap: 8px 12px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] .match-roster-tools { flex-wrap: wrap; }
    .match-lobby[data-ui-shell="choose-fighter"] :is(.match-sidebar > select, .match-search input, .match-rules select) {
        min-height: 44px;
        font-size: 16px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] :is(.match-steps, .match-pagination, .match-assign, .match-dock-tools, .match-launch) button {
        min-height: 44px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] .match-fighters { grid-auto-rows: 105px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-card-name { font-size: 11px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-card-visual .match-sprite { filter: none; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-search kbd { display: none; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-dossier { grid-template-columns: minmax(80px, .38fr) minmax(0, 1fr); }
    .match-lobby[data-ui-shell="choose-fighter"] .match-render { min-height: 125px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-assign {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        gap: 8px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-slots { flex-direction: row; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-lineup { flex-wrap: wrap; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-slots { flex-basis: 100%; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-slot {
        min-height: 88px;
        flex-direction: column;
        align-items: center;
        padding: 8px 4px 5px;
    }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-slot .match-sprite { width: 32px; height: 32px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-team-slot .match-pick-name { width: 100%; text-align: center; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-slot-remove { width: 30px; height: 30px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-dock-tools { width: 100%; }
    .match-lobby[data-ui-shell="choose-fighter"] [data-match-next-step] { flex-basis: 100%; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-stage-nav { width: 44px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-stage-caption { padding: 14px 10px 10px; }
    .match-lobby[data-ui-shell="choose-fighter"] .match-launch [data-match-start] { flex-basis: 100%; }
}


/* Match Lobby Clean Loading State (zero progress bars, pure responsive spinner) */
.match-lobby-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    height: 100%;
    width: 100%;
    padding: 40px 20px 80px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 38%, rgba(255, 175, 0, 0.07) 0%, rgba(14, 14, 14, 0.98) 72%, #080808 100%);
    box-sizing: border-box;
}
.match-lobby-spinner {
    width: 52px;
    height: 52px;
    border: 3.5px solid rgba(255, 180, 0, 0.2);
    border-top-color: #ffd16b;
    border-radius: 50%;
    animation: match-lobby-spin 0.8s linear infinite;
    margin-bottom: 22px;
    filter: drop-shadow(0 0 16px rgba(255, 180, 0, 0.55));
}
.match-lobby-loading-text {
    font: 700 15px/1.4 'Montserrat', 'Barlow', 'Segoe UI', sans-serif;
    letter-spacing: 2px;
    color: #e6e6e6;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
@keyframes match-lobby-spin {
    to { transform: rotate(360deg); }
}

[data-lobby-ready="false"] .match-lobby-loading {
    display: flex !important;
}
[data-lobby-ready="false"] > :not(.match-lobby-loading) {
    display: none !important;
}
[data-lobby-ready="true"] .match-lobby-loading {
    display: none !important;
}

body:is([data-route="/tceam"], [data-route="/play"]):has([data-lobby-ready="false"]) .site-footer {
    display: none !important;
}
.match-card-heavy { position: absolute; left: 4px; bottom: 4px; z-index: 2; padding: 1px 5px; border-radius: 6px; background: rgba(20,14,6,.82); border: 1px solid rgba(255,159,67,.55); color: #ffcf8a; font: 800 10px/1.3 'JetBrains Mono',Consolas,monospace; pointer-events: auto; }
.match-card-visual .match-evolution-badge { position: absolute; top: 4px; right: 4px; z-index: 2; pointer-events: none; }
.match-dossier .match-evolution-view { margin-top: 6px; padding: 4px 8px; min-height: 24px; max-width: 100%; font-size: 10px; }
