/* fighter.css — P2P fighter overlay, controls, invite prompt. Dark glass identity. */

.fg-hidden { display: none !important; }

.fg-overlay {
    position: fixed;
    inset: 0;
    z-index: 10005;
    background: #000;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
    /* reserved height for the top chip row — the stage (and its baked HUD) start
       below it so the health bars never render under the ?/mode/✕ chips */
    --fg-topbar-h: calc(44px + env(safe-area-inset-top, 0px));
}

/* the canvas fills the whole overlay (no top inset — that shrank the landscape
   game). fighter-render instead pushes the baked HUD down below the chip row. */
.fg-stage { position: absolute; inset: 0; }
.fg-canvas { width: 100%; height: 100%; display: block; }

/* top bar */
.fg-topbar {
    position: absolute;
    top: calc(6px + env(safe-area-inset-top, 0px));
    left: 10px;
    right: calc(10px + env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 4;
}
.fg-status {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}
.fg-mark { width: 20px; height: 20px; display: block; flex: none; }
.fg-wordmark {
    font: 700 14px var(--font-mono, monospace);
    color: #fff;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fg-wordmark-accent { color: #9579ff; }
.fg-conn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 10px;
    background: rgba(0, 230, 118, 0.14);
    color: #00e676;
    font: 600 9px var(--font-mono, monospace);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.fg-conn::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.8);
}
.fg-conn-idle { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.55); }
.fg-diag { flex: none; display: flex; align-items: center; gap: 6px; }
/* portrait headers are full: the diagnostics row drops below the chips, into the letterbox */
@media (orientation: portrait) { .fg-diag { position: absolute; top: calc(100% + 6px); right: 0; } }
.fg-ping {
    flex: none;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(17, 17, 17, 0.6);
    color: #fff;
    font: 600 10px var(--font-mono, monospace);
    white-space: nowrap;
}
.fg-ping-label { color: rgba(255, 255, 255, 0.55); }
.fg-ping-value, .fg-fps-value { font-variant-numeric: tabular-nums; }
.fg-chip-mark { width: 32px; padding: 0; flex: none; }
.fg-conn-idle::before { background: rgba(255, 255, 255, 0.5); box-shadow: none; }
.fg-chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    /* emoji fallbacks: the audio chip shows 🔊/🔈/🔇 — bare monospace has no emoji on iOS */
    font: 600 11px var(--font-mono, monospace), "Apple Color Emoji", "Segoe UI Emoji";
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.fg-chip:active { background: rgba(255, 255, 255, 0.18); }
.fg-chip-close { width: 32px; padding: 0; border-color: rgba(255, 23, 68, 0.4); }
.fg-chip-menu { border-color: rgba(149, 121, 255, 0.45); }
/* the match header floats over the scene: a dark fill keeps its chips legible over light skies and concrete */
.fg-overlay:not(.fg-picker) .fg-topbar .fg-chip:not(:active) { background: rgba(17, 17, 17, 0.6); }
/* a phone-width or short landscape match header fits every chip, clear of the in-game HUD, once the wordmark and status pill yield */
@media (max-width: 520px), (max-height: 450px) { .fg-overlay:not(.fg-picker) .fg-topbar .fg-wordmark, .fg-overlay:not(.fg-picker) .fg-topbar .fg-conn { display: none; } }
@media (max-width: 420px) {
    .fg-chip-render { width: 32px; padding: 0; }
    .fg-chip-render .fg-chip-text {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* the pad toggle keeps its ARROWS / STICK word until the header truly runs out of room */
@media (max-width: 350px) {
    .fg-overlay:not(.fg-picker) .fg-topbar .fg-mark { display: none; } .fg-overlay:not(.fg-picker) .fg-topbar { gap: 6px; }
    .fg-chip-mode { width: 32px; padding: 0; }
    .fg-chip-mode .fg-chip-text {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- touch controls ---- */
.fg-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}
.fg-touch-hidden { display: none; }

/* end-of-match card */
.fg-endcard {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 240px;
    padding: 22px 26px;
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    z-index: 6;
}
.fg-end-title { font: 700 26px var(--font-mono, monospace); letter-spacing: 2px; margin-bottom: 6px; }
.fg-end-title.fg-win { color: #00e676; text-shadow: 0 0 18px rgba(0, 230, 118, 0.5); }
.fg-end-title.fg-lose { color: #ff1744; text-shadow: 0 0 18px rgba(255, 23, 68, 0.4); }
.fg-end-detail { color: rgba(255, 255, 255, 0.5); font: 400 11px var(--font-mono, monospace); margin-bottom: 16px; }
.fg-end-btns { display: flex; gap: 10px; justify-content: center; }
.fg-end-btn {
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font: 600 12px var(--font-mono, monospace);
    cursor: pointer;
}
.fg-end-rematch { background: #7c4dff; border-color: #7c4dff; }
.fg-end-btn:disabled { opacity: 0.6; }

/* stream chat lines over the match */
.fg-chatlog {
    position: absolute;
    left: calc(12px + env(safe-area-inset-left, 0px));
    bottom: 34%;
    max-width: 46%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 3;
    pointer-events: none;
}
.fg-chatline {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #e0e0e0;
    font: 500 11px var(--font-sans, sans-serif);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* camera PiP windows inside the match overlay */
.fg-pip {
    position: absolute;
    --fg-pip-w: 132px;
    --fg-pip-gap: 10px;
    width: var(--fg-pip-w);
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: #000;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    z-index: 2;
    pointer-events: none;
}
.fg-pip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fg-pip-label {
    position: absolute;
    left: 4px;
    bottom: 3px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font: 600 9px var(--font-mono, monospace);
}
/* portrait — vertically centred in the letterbox gap between chips and game;
   fighter-render publishes the game-block rect as CSS vars each layout change */
@media (orientation: portrait) {
    .fg-pip {
        top: calc((var(--fg-topbar-h) + var(--fg-game-top, 200px)) / 2 - var(--fg-pip-w) * 3 / 8);
    }
    .fg-pip-left { left: calc(var(--fg-game-left, 0px) + var(--fg-pip-gap)); }
    .fg-pip-right { right: calc(var(--fg-game-right, 0px) + var(--fg-pip-gap)); }
}
/* landscape — just under the baked HUD, inside the pillarbox toward centre */
@media (orientation: landscape) {
    .fg-pip { top: calc(var(--fg-hud-bottom, 96px) + var(--fg-pip-gap)); }
    /* tuck the camera into a wide pillarbox margin (portrait games) instead of over the
       play area; a wide game has ~no margin so max() clamps it to the screen edge */
    .fg-pip-left { left: max(var(--fg-pip-gap), calc(var(--fg-game-left, 0px) - var(--fg-pip-w) - var(--fg-pip-gap))); }
    .fg-pip-right { right: max(var(--fg-pip-gap), calc(var(--fg-game-right, 0px) - var(--fg-pip-w) - var(--fg-pip-gap))); }
}
@media (max-width: 700px) {
    .fg-pip { --fg-pip-w: 96px; }
}

/* how-to-play panel */
.fg-help {
    position: absolute;
    inset: 0;
    z-index: 8;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(46px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
}
.fg-help-inner {
    max-width: 560px;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: #e0e0e0;
    font: 400 13px var(--font-sans, sans-serif);
    line-height: 1.55;
}
.fg-help-inner h2 {
    margin: 0 0 10px;
    font: 700 18px var(--font-mono, monospace);
    color: #fff;
    letter-spacing: 1px;
}
.fg-help-inner h3 {
    margin: 14px 0 4px;
    font: 700 12px var(--font-mono, monospace);
    color: #9579ff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.fg-help-inner p { margin: 5px 0; }
.fg-help-inner b { color: #fff; }
.fg-help-close { margin-top: 12px; flex-shrink: 0; background: #7c4dff; border-color: #7c4dff; }

/* START menu (§2.8): the house glass panel over the game; play goes on underneath it */
.fg-menu {
    position: absolute;
    left: 50%;
    top: calc(50% + var(--fg-topbar-h) / 2);
    transform: translate(-50%, -50%);
    z-index: 5;
    width: max-content;
    min-width: 200px;
    max-width: calc(100vw - 24px);
    max-height: calc(100% - var(--fg-topbar-h) - 16px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 6px;
    border-radius: 16px;
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* the overlay blocks panning; a menu taller than a short landscape screen must still scroll by touch */
    touch-action: pan-y;
    overscroll-behavior: contain;
}
.fg-menu-title {
    padding: 6px 10px;
    font: 700 9px/1 var(--font-mono, monospace);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
.fg-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #fff;
    font: 600 11px var(--font-mono, monospace);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.fg-menu-item:active { background: rgba(124, 77, 255, 0.35); }
@media (max-height: 450px) { .fg-menu-item { min-height: 30px; } }
/* the controller focus ring; physical-pad.js injects the same rule once its first surface opens */
.sgp-pad-focus { outline: 2px solid #9579ff; outline-offset: 2px; box-shadow: 0 0 12px rgba(124, 77, 255, 0.5); }

/* in-overlay toast */
.fg-toast {
    position: absolute;
    left: 50%;
    bottom: calc(24% + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 18px;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffd600;
    font: 600 11px var(--font-mono, monospace);
    z-index: 7;
    white-space: nowrap;
}

/* ---- page-level: floating game button, invite prompt, page toast ---- */
#sols-games-fab {
    position: fixed;
    right: calc(10px + env(safe-area-inset-right, 0px));
    top: 50%;
    margin-top: -23px;   /* mid-right edge — clear of PiP corners and bottom controls */
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 20px;
    z-index: 5000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
#sols-games-fab:active { background: rgba(124, 77, 255, 0.4); }

#fighter-fab-toast {
    position: fixed;
    right: 10px;
    top: calc(50% + 34px);
    max-width: 240px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e0e0e0;
    font: 500 11px var(--font-sans, sans-serif);
    z-index: 5001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
#fighter-fab-toast.fg-show { opacity: 1; }

#fighter-prompt {
    position: fixed;
    left: 50%;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(124, 77, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 77, 255, 0.25);
    z-index: 10004;
    max-width: calc(100vw - 24px);
}
.fg-prompt-text { color: #fff; font: 600 13px var(--font-sans, sans-serif); }
.fg-prompt-btns { display: flex; gap: 8px; }
.fg-prompt-accept {
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #7c4dff;
    border: none;
    color: #fff;
    font: 700 12px var(--font-sans, sans-serif);
    cursor: pointer;
    white-space: nowrap;
}
.fg-prompt-decline {
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font: 600 12px var(--font-sans, sans-serif);
    cursor: pointer;
}

/* ---- game picker (GameOverlay.openPicker): full-screen card grid ---- */
.fg-picker { background: radial-gradient(120% 90% at 50% 0%, #14121f 0%, #050508 70%); }
.fg-picker-body {
    position: absolute;
    inset: calc(52px + env(safe-area-inset-top, 0px)) 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.fg-picker-title {
    margin: 6px 0 18px;
    font: 700 12px var(--font-mono, monospace);
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}
.fg-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 720px;
}
.fg-picker-section {
    grid-column: 1 / -1;
    margin: 10px 0 -4px;
    font: 700 11px var(--font-mono, monospace);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}
.fg-picker-section:first-child { margin-top: 0; }
/* Original library: the grid owns scrolling; preview and commands stay fixed. */
.fg-library { background: #08090c; }
.fg-library-body {
    position: absolute;
    inset: calc(52px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    width: auto;
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 16px 24px;
    color: #fff;
    font-family: var(--font-sans, sans-serif);
    letter-spacing: 0;
}
.fg-library-heading { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.fg-library-heading h1 { margin: 0; font-size: 24px; }
.fg-library-count { color: #aaaeb8; font-size: 12px; }
.fg-library-filters { grid-column: 1 / -1; display: flex; gap: 8px; }
.fg-library-filter { min-width: 48px; height: 36px; border-radius: 8px; letter-spacing: 0; }
.fg-library-filter[aria-pressed="true"] { background: #352957; border-color: #9579ff; }
.fg-library-preview { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.fg-library-media { position: relative; min-height: 0; aspect-ratio: 16 / 9; background: #12161c; overflow: hidden; border-radius: 8px; }
.fg-library-media img, .fg-library-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fg-library-copy { flex: none; overflow-wrap: anywhere; }
.fg-library-copy h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.fg-library-copy p { margin: 6px 0; color: #c8cbd2; font-size: 13px; }
.fg-library-copy small { color: #aaaeb8; font-size: 11px; }
.fg-library-play { grid-column: 1; grid-row: 4; min-height: 44px; padding: 8px 16px; border: 1px solid #559e82; border-radius: 8px; background: #226448; color: #fff; font: 700 15px var(--font-sans, sans-serif); cursor: pointer; overflow-wrap: anywhere; }
.fg-library-play:disabled { opacity: 0.5; cursor: default; }
.fg-library-grid { grid-column: 2; grid-row: 3 / 5; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 3px; scrollbar-gutter: stable; }
.fg-library-tile { min-width: 0; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: transparent; color: #c8cbd2; cursor: pointer; }
.fg-library-tile[aria-pressed="true"] { border-color: #9579ff; background: #201b2d; color: #fff; }
.fg-library-thumb { aspect-ratio: 16 / 9; background: #12161c; overflow: hidden; border-radius: 4px; }
.fg-library-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fg-library img[hidden] { display: none; }
.fg-library-tile .fg-gamecard-name { display: block; min-height: 32px; margin-top: 6px; font: 500 12px/16px var(--font-sans, sans-serif); letter-spacing: 0; overflow-wrap: anywhere; text-shadow: none; }
.fg-library button:focus-visible, .fg-library-grid:focus-visible { outline: 2px solid #73d6bd; outline-offset: 2px; }
@media (max-width: 600px) and (min-height: 501px) {
    .fg-library-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr); gap: 12px; }
    .fg-library-preview { gap: 8px; }
    .fg-library-media { width: 100%; max-height: 23dvh; }
    .fg-library-copy h2 { font-size: 20px; }
    .fg-library-grid { grid-column: 1; grid-row: 5; }
}
@media (max-height: 500px) {
    .fg-library-body { grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px 16px; }
    .fg-library-heading { grid-column: 1; grid-row: 1; }
    .fg-library-heading h1 { font-size: 20px; }
    .fg-library-filters { grid-column: 2; grid-row: 1; }
    .fg-library-preview { grid-column: 1; grid-row: 2; gap: 4px; }
    .fg-library-copy h2 { font-size: 16px; }
    .fg-library-copy p { display: none; }
    .fg-library-play { grid-row: 3; }
    .fg-library-grid { grid-row: 2 / 4; }
}
.fg-gamecard {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 150px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background-color: #1a1526;
    background-size: cover;
    color: #fff;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.12s, border-color 0.12s;
}
.fg-gamecard:active { transform: scale(0.97); border-color: rgba(255, 255, 255, 0.4); }
.fg-gamecard-emoji { font-size: 34px; line-height: 1; margin-bottom: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.fg-gamecard-name { font: 700 16px var(--font-mono, monospace); letter-spacing: 0.3px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.fg-gamecard-tag { font: 500 11px var(--font-sans, sans-serif); color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.fg-gamecard-mode {
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    font: 600 9px var(--font-mono, monospace);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

/* Setup cards use the same bottom-sheet surface as Play and Online hosts. */
.fg-setup-sheet { touch-action:pan-y; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; background:#080a12a8; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); padding:32px 0 0; }
.fg-setup-panel { position:relative; display:flex; flex-direction:column; width:min(100%,580px); max-height:min(740px,86dvh); box-sizing:border-box; padding:10px 20px max(24px,env(safe-area-inset-bottom)); border:1px solid var(--ui-border,#514655); border-bottom:0; border-radius:28px 28px 0 0; background:var(--ui-card,#1f1a25); color:var(--ui-text,#f0e7f4); box-shadow:0 20px 80px #0005; animation:fg-setup-rise 220ms cubic-bezier(.2,.8,.2,1); }
.fg-setup-grip { width:36px; height:4px; border-radius:4px; background:var(--ui-muted,#bcb3c6); opacity:.4; margin:0 auto 18px; flex:none; }
.fg-setup-sheet .fg-topbar { position:absolute; top:26px; right:20px; left:auto; padding:0; min-height:0; background:none; z-index:1; }
.fg-setup-sheet .fg-status { display:none; }
.fg-setup-sheet .fg-chip-close { width:40px; height:40px; border-radius:50%; border:1px solid var(--ui-border,#514655); color:inherit; background:var(--ui-control,#302936); }
.fg-setup-sheet .fg-picker-body { position:relative; inset:auto; flex:1 1 auto; touch-action:pan-y; padding:0; width:100%; max-width:none; margin:0; overflow-y:auto; min-height:0; overscroll-behavior:contain; }
.fg-setup-sheet .fg-picker-title { align-self:stretch; box-sizing:border-box; width:100%; padding:4px 50px 18px 0; margin:0; min-height:44px; text-align:left; font:600 22px/1.3 var(--font-sans,system-ui,sans-serif); letter-spacing:-.5px; text-transform:none; color:inherit; }
.fg-setup-sheet .fg-picker-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0; }
.fg-setup-sheet .fg-gamecard { min-width:0; min-height:156px; border-radius:20px; border:1px solid var(--ui-border,#514655); padding:16px; text-align:left; background-color:var(--ui-control,#302936); }
.fg-setup-sheet .fg-gamecard-name { font:600 16px/1.3 var(--font-sans,system-ui,sans-serif); letter-spacing:0; }
.fg-setup-sheet .fg-gamecard-tag { font:400 12px/1.4 var(--font-sans,system-ui,sans-serif); }
.fg-setup-sheet .fg-gamecard-emoji { font-size:36px; margin-bottom:18px; }
@keyframes fg-setup-rise { from { opacity:0; transform:translateY(32px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:359px) { .fg-setup-panel { padding-left:12px; padding-right:12px; } .fg-setup-sheet .fg-gamecard { padding:12px; } }
@media (prefers-reduced-motion:reduce) { .fg-setup-panel { animation:none; } }

/* table-seat lobby: the shared fighter select and the joiner's connection chip */
.fg-picker-status { align-self: stretch; margin: -8px 0 16px; font: 600 14px/1.4 var(--font-sans, system-ui, sans-serif); color: rgba(255, 255, 255, 0.85); }
.fg-setup-sheet .fg-gamecard.fg-picked { outline: 3px solid #7c4dff; outline-offset: -3px; }
.fg-setup-sheet .fg-gamecard:disabled:not(.fg-picked) { opacity: 0.4; }
#fighter-join-status {
    position: fixed;
    left: 50%;
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e0e0e0;
    font: 600 11px var(--font-sans, sans-serif);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10006;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
#fighter-join-status.fg-show { opacity: 1; }
