/* ==========================================================================
   NEXTBALL — "BROADCAST" design system  (v4)
   Loaded LAST. Quiet, tile-based, image-led — the way EA FC and Rocket
   League lay a menu out: a big live hero, a grid of art tiles with a caption
   band, one accent, no chrome effects. Every tile image is rendered by the
   game itself (menu-demos.js thumbnails / pitch diagrams), not stock art.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --bg-0: #0F1115; --bg-1: #15181D; --bg-2: #1B1F26; --bg-3: #242932; --bg-4: #2F3641;
    --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .14);
    --fg-0: #FFFFFF; --fg-1: #DDE0E6; --fg-2: #9BA1AC; --fg-3: #666D79;

    --orange: #FF6A13; --orange-hi: #FF8A45; --orange-lo: #C24E08; --orange-ink: #1A0900;
    --red: #E0322E; --blue: #2E7BE0; --ok: #38D66B; --bad: #E0322E; --gold: #E4B13A;
    --pitch: #718C5A; --pitch-dark: #3D5C3D; --pitch-line: #D4D4AA;

    --cyan: var(--orange); --cyan-hi: var(--orange-hi); --cyan-ink: var(--orange-ink);
    --magenta: var(--orange); --magenta-hi: var(--orange-hi);
    --lime: var(--ok); --lime-ink: #062A14; --gold-hi: #F2CB6A; --gold-ink: #2A1A00; --violet: var(--fg-2);

    --f-display: 'Chakra Petch', 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --f-body: 'Exo 2', 'Barlow', system-ui, sans-serif;

    --skew: 0deg; --unskew: 0deg; --chamfer: 0px;
    --r: 4px; --r-lg: 6px;
    --t-fast: 120ms ease-out; --t: 220ms ease-out; --t-slow: 360ms ease-out;
    --gutter: clamp(16px, 3vw, 56px); --max: 1360px;
    --glow-orange: none; --glow-cyan: none;

    --ink-0: var(--bg-0); --ink-1: var(--bg-1); --ink-2: var(--bg-2); --ink-3: var(--bg-3); --ink-4: var(--bg-4);
    --lamp: var(--orange); --lamp-ink: var(--orange-ink); --lamp-hi: var(--orange-hi);
    --ember: var(--gold); --ember-ink: var(--gold-ink);

    --bg-primary: var(--bg-0); --bg-secondary: var(--bg-1); --bg-card: var(--bg-2);
    --bg-glass: var(--bg-2); --bg-surface: var(--bg-1); --bg-tertiary: var(--bg-3);
    --text-primary: var(--fg-0); --text-secondary: var(--fg-1); --text-muted: var(--fg-2);
    --accent-primary: var(--orange); --accent-primary-dark: var(--orange-lo); --accent-primary-glow: transparent;
    --accent-gold: var(--gold); --accent-gold-light: var(--gold-hi); --accent-gold-glow: transparent;
    --primary: var(--orange); --accent: var(--orange); --secondary: var(--fg-2);
    --red-team: var(--red); --red-team-dark: #9E1F1C; --blue-team: var(--blue); --blue-team-dark: #1D55A3;
    --success: var(--ok); --warning: var(--gold); --error: var(--bad);
    --blur-glass: 0px;
    --border-subtle: 1px solid var(--line); --border-accent: 1px solid var(--line-strong);
    --shadow-glow: none; --shadow-gold: none;
    --font-display: var(--f-display); --font-body: var(--f-body);
    --radius-sm: 3px; --radius-md: 4px; --radius-lg: 6px; --radius-xl: 6px;
    --transition-fast: var(--t-fast); --transition-normal: var(--t); --transition-slow: var(--t-slow);
}

/* --------------------------------------------------------------------------
   2. Base + backdrop
   -------------------------------------------------------------------------- */
html { background: var(--bg-0); }
body { background: var(--bg-0) !important; color: var(--fg-0); font: 500 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--orange); color: var(--orange-ink); }
:focus-visible { outline: 2px solid var(--fg-0); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border: 2px solid var(--bg-0); border-radius: 6px; }

.auth-bg, .auth-orb, .video-background-wrapper, .video-overlay,
.logo-glow::before, .logo-glow::after, .season-zone::before, .season-zone::after,
.mini-server-stats, .tagline, .menu-bg-beam, .menu-bg-grid, .menu-bg-dust, .menu-bg-art, .menu-bg-tint, .menu-bg-pitch { display: none !important; }

.glass-panel, .modal-content, .play-btn, .action-btn, .stat-item, .leaderboard-preview, .stats-preview-section,
.season-zone, .season-card, .updates-preview-section, .update-item, .lobby-header, .team-column, .player-item,
.lobby-controls, .stadium-item, .room-item, .mode-card, .stat-box, .stats-rank-card, .leaderboard-row,
.friend-item, .banner-card, .title-card, .reward-card, .auth-card, .btn, .tab-btn, .input-glass, .form-input,
#game-canvas, .game-chat-panel, .bot-setup-sheet, .bot-opt, .match-result-content, .quick-chat-menu, .qc-item,
.rank-card, .coin-card, .tip-card, .mmr-box, .key, .step, .season-reward-row, .shop-item-preview,
#settings-modal .modal, .keybind-row, .keybind-key, .party-invite-content, .context-menu, .user-profile-bar {
    box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    text-shadow: none !important; background-image: none !important;
}
.logo, .menu-header .logo, .goal-text, .pause-text, .match-result-title, .season-zone-title, .play-title,
.auth-logo :is(h1,.nb-h1), .stat-value, .countdown-value, h1, .nb-h1, h2, h3 { text-shadow: none !important; animation: none !important; }
.logo, .auth-logo :is(h1,.nb-h1), .season-zone-title, .match-result-title { background: none !important; -webkit-background-clip: initial !important; -webkit-text-fill-color: initial !important; color: var(--fg-0) !important; }

/* Backdrop: flat, with one soft warm light from the top — that's all */
.menu-bg { display: block !important; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 40% at 50% -5%, rgba(255, 106, 19, .10), transparent 70%), var(--bg-0); }
.menu-bg-vignette { display: none; }

/* Type helpers */
.ar-eyebrow { font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.ar-h { font: 700 15px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--fg-0); }

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn, .auth-submit, .btn-tutorial, .btn-about, .bot-opt, .btn-join-team, .guest-btn, .btn-xs {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 14px; border-radius: var(--r);
    font: 700 13px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em;
    background: var(--bg-3); color: var(--fg-0); border: 1px solid transparent;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    cursor: pointer; user-select: none; white-space: nowrap; text-decoration: none; transform: none; box-shadow: none !important;
}
.btn > *, .auth-submit > *, .btn-tutorial > *, .btn-about > *, .bot-opt > *, .btn-join-team > * { transform: none; }
.btn:hover, .btn-tutorial:hover, .btn-about:hover, .bot-opt:hover, .guest-btn:hover, .btn-join-team:hover { background: var(--bg-4); color: var(--fg-0); transform: none; }
.btn:active, .auth-submit:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary, .auth-submit, .btn-success, .btn-real-match, .btn-power-match, .banner-actions .btn-buy, .btn-equip { background: var(--orange) !important; color: var(--orange-ink) !important; border-color: var(--orange) !important; }
.btn-primary:hover, .auth-submit:hover, .btn-success:hover, .btn-real-match:hover, .btn-power-match:hover, .banner-actions .btn-buy:hover, .btn-equip:hover { background: var(--orange-hi) !important; border-color: var(--orange-hi) !important; }
.btn-primary::after, .auth-submit::after, .play-badge::after { content: none; }
.btn-secondary, .btn-ghost, .btn-tutorial, .btn-about { background: transparent; color: var(--fg-1); }
.btn-secondary:hover, .btn-ghost:hover, .btn-tutorial:hover, .btn-about:hover { background: var(--bg-3); color: var(--fg-0); }
.btn-danger { background: transparent !important; color: var(--fg-1) !important; border-color: transparent !important; }
.btn-danger:hover { background: var(--red) !important; color: #fff !important; }
.btn-equipped { background: transparent !important; color: var(--fg-1) !important; border-color: var(--line-strong) !important; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 11px; }
.btn-full { width: 100%; height: 46px; font-size: 15px; }
.btn-close, .auth-close-btn { width: 34px; height: 34px; padding: 0; border-radius: var(--r); background: transparent; border: 1px solid transparent; color: var(--fg-2); font: 500 22px/1 var(--f-body); display: inline-flex; align-items: center; justify-content: center; position: static; transform: none; }
.btn-close:hover, .auth-close-btn:hover { color: var(--fg-0); background: var(--bg-3); transform: none; }

.tab-btn, .auth-tab, .room-tab { position: relative; height: 38px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--fg-2); font: 700 13px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; transition: color var(--t-fast); cursor: pointer; transform: none; box-shadow: none !important; }
.tab-btn::after, .auth-tab::after, .room-tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--fg-0); transform: scaleX(0); transform-origin: left; transition: transform var(--t); }
.tab-btn:hover, .auth-tab:hover, .room-tab:hover { color: var(--fg-0); background: transparent; }
.tab-btn.active, .auth-tab.active, .room-tab.active { color: var(--fg-0); background: transparent !important; }
.tab-btn.active::after, .auth-tab.active::after, .room-tab.active::after { transform: scaleX(1); }
.leaderboard-tabs, .shop-tabs, .inventory-tabs, .friends-tabs, .tutorial-tabs, .auth-tabs, .season-tabs, .room-browser-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-strong); margin-bottom: 18px; padding: 0; background: none; border-radius: 0; }

/* --------------------------------------------------------------------------
   4. Inputs
   -------------------------------------------------------------------------- */
.input-glass, .form-input, .form-control, .friends-add-row input, select, input[type="text"], input[type="password"], input[type="email"], input[type="number"] {
    height: 42px; padding: 0 12px; background: var(--bg-0) !important; color: var(--fg-0);
    border: 1px solid var(--line-strong) !important; border-radius: var(--r) !important; transition: border-color var(--t-fast); width: 100%; box-shadow: none !important; font: 500 15px var(--f-body);
}
input[type="checkbox"] { width: auto; height: auto; accent-color: var(--orange); }
.input-glass:hover, .form-input:hover { border-color: var(--fg-3) !important; }
.input-glass:focus, .form-input:focus, .friends-add-row input:focus, select:focus { border-color: var(--fg-1) !important; outline: none; }
.input-glass::placeholder, .form-input::placeholder { color: var(--fg-3); }
.input-glass.xs { width: 64px; text-align: center; font: 700 16px var(--f-display); padding: 0; }
select option { background: var(--bg-1); }
.form-group { margin-bottom: 14px; }
.form-group label, .setting-item label, .bot-setup-group label { display: block; margin-bottom: 6px; font: 700 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }

/* --------------------------------------------------------------------------
   5. Modals / tags
   -------------------------------------------------------------------------- */
.modal, #settings-modal, #moderation-modal, .modal-overlay, .party-invite-modal, #queue-overlay, .bot-setup { background: rgba(8, 9, 12, .82) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.modal-content.glass-panel, .glass-panel, #settings-modal .modal, #moderation-modal .modal, .modal-overlay .modal, .party-invite-content {
    background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; padding: 20px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9) !important; animation: ar-pop var(--t) both;
}
@keyframes ar-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.modal-content { max-height: calc(100dvh - 48px); }
.modal-header, #settings-modal .modal-header, #moderation-modal .modal-header, .modal-overlay .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -20px -20px 20px; padding: 16px 14px 14px 20px; border-bottom: 1px solid var(--line) !important; background: var(--bg-1); position: relative; overflow: hidden; }
.modal-header::before { content: none; }
#settings-modal .modal-header, #moderation-modal .modal-header, .modal-overlay .modal-header { margin: 0; }
#settings-modal .modal, #moderation-modal .modal, .modal-overlay .modal { padding: 0; }
.modal-header h2 { font: 700 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--fg-0); flex: 1; margin: 0; }
.modal-footer, #settings-modal .modal-footer, #moderation-modal .modal-footer, .modal-overlay .modal-footer, .tutorial-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 20px -20px -20px; padding: 12px 20px; border-top: 1px solid var(--line) !important; background: var(--bg-1); }
#settings-modal .modal-footer, #moderation-modal .modal-footer, .modal-overlay .modal-footer { margin: 0; }
.modal-description { color: var(--fg-1); margin: -6px 0 18px; }

.new-badge-inline, .new-badge-floating, .coming-badge, .update-badge, .room-mode-tag, .staff-badge, .friends-request-badge, .beta-tag, .tag {
    display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 2px;
    font: 700 10px/1 var(--f-body) !important; letter-spacing: .12em; text-transform: uppercase; font-style: normal !important;
    background: var(--orange) !important; color: var(--orange-ink) !important; border: 0 !important;
    animation: none !important; position: static !important; box-shadow: none !important; transform: none !important;
}
.coming-badge, .update-badge, .beta-tag, .room-mode-tag, .friends-request-badge { background: var(--bg-3) !important; color: var(--fg-2) !important; }
.staff-badge.admin-badge { background: var(--orange) !important; color: var(--orange-ink) !important; }
.staff-badge.mod-badge { background: var(--ok) !important; color: #062A14 !important; }
.staff-badge.bot-badge { background: var(--bg-4) !important; color: var(--fg-1) !important; }
.loading-spinner, .spinner { border: 3px solid var(--bg-4); border-top-color: var(--orange); width: 28px; height: 28px; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6. Main menu
   -------------------------------------------------------------------------- */
#main-menu { padding: 0; background: transparent; align-items: flex-start; }
#main-menu .menu-container { position: relative; z-index: 1; max-width: none; width: 100%; margin: 0; padding: 0 0 72px; display: grid; gap: 28px; }
#main-menu .menu-container > * { width: min(100% - 2 * var(--gutter), var(--max)); margin-left: auto; margin-right: auto; }
#main-menu .menu-container > * { animation: ar-rise var(--t-slow) both; }
#main-menu .menu-container > :nth-child(2) { animation-delay: 40ms; }
#main-menu .menu-container > :nth-child(3) { animation-delay: 80ms; }
#main-menu .menu-container > :nth-child(4) { animation-delay: 120ms; }
#main-menu .menu-container > :nth-child(5) { animation-delay: 160ms; }
#main-menu .menu-container > :nth-child(6) { animation-delay: 200ms; }
@keyframes ar-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Top bar ---- */
.menu-header { text-align: left; margin: 0; width: 100% !important; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; padding: 0 var(--gutter); background: var(--bg-0); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: none; }
.header-top::after { content: none; }
.menu-header .logo { font: 700 20px/1 var(--f-display) !important; letter-spacing: .02em; margin: 0; display: inline-flex; align-items: center; gap: 9px; color: var(--fg-0) !important; font-style: normal !important; }
.menu-header .logo::before { content: none; }
.logo-mark { display: inline-flex; width: 24px; height: 24px; color: var(--fg-0); filter: none; }
.logo-mark svg { width: 100%; height: 100%; animation: none; }
.logo span:not(.beta-tag):not(.logo-mark) { color: var(--orange) !important; }
.menu-header .logo .beta-tag { margin-left: 6px; }
.header-buttons { display: flex; gap: 2px; align-items: center; }
.btn-tutorial, .btn-about { height: 34px; padding: 0 12px; font-size: 12px; background: transparent; color: var(--fg-2); }
.btn-tutorial:hover, .btn-about:hover { color: var(--fg-0); background: var(--bg-2); }

/* ---- Player strip: no box, one line ---- */
.user-profile-bar { width: min(100% - 2 * var(--gutter), var(--max)); margin: 14px auto -8px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: none !important; border: 0 !important; padding: 0 !important; }
.user-info { display: inline-flex; align-items: center; gap: 12px; height: 36px; padding: 0; background: none; border: 0; transform: none; box-shadow: none; }
.user-info > * { transform: none; }
.user-rank-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; line-height: 0; filter: none; }
.user-name { font: 700 16px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.user-mmr, .user-coins { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px !important; border-radius: 3px; font: 700 12px/1 var(--f-display); letter-spacing: .06em; background: var(--bg-2) !important; border: 0 !important; }
.user-mmr { color: var(--fg-1) !important; }
.user-coins { color: var(--gold) !important; }
.user-coins::before, .tier-coins::before, #shop-balance::before, .btn-price::before { content: ''; width: 13px; height: 13px; flex: none; background: var(--nb-coin, var(--gold)) center / contain no-repeat; }
.user-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.user-actions .btn { height: 34px; padding: 0 12px; font-size: 12px; background: transparent; border-color: transparent; color: var(--fg-2); }
.user-actions .btn:hover { background: var(--bg-2); color: var(--fg-0); }
.user-actions .btn svg { width: 15px; height: 15px; flex: none; color: currentColor; }
.user-actions .btn-primary { background: var(--orange) !important; color: var(--orange-ink) !important; }
.btn-shop, .btn-friends, .btn-inventory, .btn-settings { background: transparent !important; color: var(--fg-2) !important; }
.btn-shop:hover, .btn-friends:hover, .btn-inventory:hover, .btn-settings:hover { background: var(--bg-2) !important; color: var(--fg-0) !important; box-shadow: none !important; }

/* ---- Tile grid: hero + utility column + game modes row ---- */
.main-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: auto; gap: 14px; margin: 0; align-items: stretch; align-content: start; }
/* align-content: start: rows never share out spare height. iPhone Safari could keep a tall height for the
   menu after a match (the game turns the page for landscape) and then stretched every card row to ~3x. */
.play-section, .secondary-actions { display: contents !important; }
#btn-quickplay { grid-column: 1 / 5; grid-row: 1 / 4; }
#btn-play-bots { grid-column: 5 / 7; grid-row: 1; }
#btn-create { grid-column: 5 / 7; grid-row: 2; }
#btn-browse { grid-column: 5 / 7; grid-row: 3; }
.main-actions::before { content: 'Game modes'; grid-column: 1 / -1; grid-row: 4; align-self: end; margin-top: 12px; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
#btn-real-match { grid-column: 1; grid-row: 5; }
#btn-power-match { grid-column: 2; grid-row: 5; }
.secondary-actions .fm-grid-card { grid-row: auto; }
@media (max-width: 1100px) {
    .main-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #btn-quickplay { grid-column: 1 / 5; grid-row: 1; min-height: 380px; }
    #btn-play-bots { grid-column: 1 / 3; grid-row: 2; } #btn-create { grid-column: 3 / 5; grid-row: 2; } #btn-browse { grid-column: 1 / 3; grid-row: 3; }
    .main-actions::before { grid-row: 4; }
    #btn-real-match, #btn-power-match { grid-row: 5; }
}
@media (max-width: 640px) {
    .main-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #btn-quickplay { grid-column: 1 / 3; }
    #btn-play-bots { grid-column: 1 / 3; } #btn-create { grid-column: 1; grid-row: 3; } #btn-browse { grid-column: 2; grid-row: 3; }
    #btn-real-match { grid-column: 1; } #btn-power-match { grid-column: 2; }
}

/* Shared tile */
.play-btn, .action-btn {
    position: relative; overflow: hidden; isolation: isolate; width: 100%; max-width: none !important; min-width: 0 !important; margin: 0; padding: 0;
    background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; clip-path: none;
    text-align: left; cursor: pointer; color: var(--fg-0); display: block; box-shadow: none !important;
    transition: transform var(--t), outline-color var(--t); outline: 2px solid transparent; outline-offset: -2px;
}
.play-btn:hover, .action-btn:hover:not(:disabled) { transform: none !important; outline-color: rgba(255, 255, 255, .85); background: var(--bg-1) !important; border-color: transparent !important; }
.play-btn::before, .play-btn::after, .action-btn::before, .action-btn::after { display: none !important; }
.play-icon, .action-icon, .action-bar, .hero-ticks { display: none !important; }

/* Art layer + caption band */
.action-art, .play-btn-row .play-art {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: var(--art) center / cover no-repeat var(--bg-2); filter: none; opacity: 1; transform: scale(1.001); transition: transform var(--t-slow);
    -webkit-mask: none; mask: none; border: 0;
}
.action-btn:hover .action-art, .play-btn-row:hover .play-art { transform: scale(1.04); filter: none; }
.action-art::after, .play-btn-row .play-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 17, 21, 0) 40%, rgba(15, 17, 21, .55) 75%, rgba(15, 17, 21, .92) 100%); }
.action-text, .play-btn-row .play-content {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 14px 12px; margin: 0; border: 0; text-align: left !important; display: block !important;
}
.action-text h3, .play-btn-row .play-title { font: 700 15px/1.1 var(--f-display) !important; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-0) !important; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .6) !important; transform: none; text-align: left !important; font-style: normal !important; }
.action-text p, .play-btn-row .play-subtitle { font: 500 11.5px/1.3 var(--f-body); color: var(--fg-1); margin: 3px 0 0; opacity: .85; text-align: left !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.action-btn .new-badge-floating, .action-btn .coming-badge { position: absolute !important; top: 10px; left: 10px; right: auto; z-index: 2; }
.action-btn-coming { display: none !important; }
.action-btn { aspect-ratio: 16 / 9; min-height: 0 !important; }
.secondary-actions .action-btn { min-height: 0; padding: 0; }
#btn-create, #btn-browse, #btn-play-bots { aspect-ratio: auto; min-height: 132px; }
.play-btn-row { display: block; grid-template-columns: none; min-height: 132px; padding: 0; background: var(--bg-1) !important; }
.play-btn-row .play-badge { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; background: rgba(15, 17, 21, .7) !important; border: 1px solid rgba(255, 255, 255, .25); color: var(--fg-0) !important; border-radius: var(--r); font: 700 11px var(--f-display); text-transform: uppercase; letter-spacing: .1em; animation: none !important; transform: none; transition: background var(--t-fast), border-color var(--t-fast); font-style: normal !important; }
.play-btn-row .play-badge::after { content: none; }
.play-btn-row:hover .play-badge { background: var(--orange) !important; border-color: var(--orange); color: var(--orange-ink) !important; box-shadow: none; }
.play-btn-row .play-content { padding-right: 120px; }

/* Hero: the live demo */
.play-btn-hero { min-height: 460px; display: block; padding: 0; justify-items: initial; align-items: initial; grid-template-rows: none; }
.play-btn-hero .play-content { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 200px 24px 26px; }
#menu-pitch { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; filter: none; transform: none; transition: none; opacity: 1; }
.play-btn-hero::before { display: block !important; content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 1 !important; background: linear-gradient(180deg, rgba(15, 17, 21, .35) 0%, rgba(15, 17, 21, 0) 22%, rgba(15, 17, 21, 0) 48%, rgba(15, 17, 21, .78) 82%, rgba(15, 17, 21, .95) 100%); }
.play-btn-hero::after { display: none !important; }
.hero-tag { position: absolute; top: 16px; left: 18px; z-index: 1; pointer-events: none; clip-path: none; height: auto; padding: 0; background: none; border: 0; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-1); display: inline-flex; gap: 6px; }
.hero-tag b { color: var(--orange); font-weight: 700; }
.play-btn-hero .play-subtitle { order: 0; position: static; display: block; margin: 0 0 8px; height: auto; padding: 0; background: none; border: 0; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-1); transform: none; text-shadow: none !important; justify-self: auto; }
.play-btn-hero .play-subtitle::before { content: none; }
.play-btn-hero .play-title { font: italic 700 clamp(64px, 7.5vw, 104px)/0.85 var(--f-display) !important; text-transform: uppercase; letter-spacing: -.035em; margin: 0 0 0 -.03em; color: var(--fg-0); text-shadow: none !important; width: auto; align-self: auto; transition: none; }
.play-btn-hero:hover .play-title { transform: none; }
.play-btn-hero .play-badge { position: absolute; right: 22px; bottom: 26px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; background: var(--orange) !important; color: var(--orange-ink) !important; border: 0; border-radius: var(--r); font: 700 16px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; transform: none; animation: none !important; box-shadow: none !important; text-shadow: none !important; transition: background var(--t-fast); font-style: normal !important; }
.play-btn-hero .play-badge::before { content: none; }
.play-btn-hero:hover .play-badge { background: var(--orange-hi) !important; transform: none; }
.play-btn-hero:active .play-badge { transform: translateY(1px); }
/* live-demo caption (menu-pitch.js) — small, top right */
.hero-demo { right: 18px; top: 14px; bottom: auto; align-items: flex-end; gap: 6px; }
.hero-demo-name { height: auto; padding: 0; background: none; border: 0; clip-path: none; font: 700 11px/1 var(--f-body); letter-spacing: .16em; color: var(--fg-1); font-style: normal; }
.hero-demo-name i { color: var(--fg-2); font-style: normal; }
.hero-demo-name i::before { background: var(--red); box-shadow: none; }
.hero-demo-dots i { width: 5px; height: 3px; background: rgba(255, 255, 255, .3); transform: none; }
.hero-demo-dots i.on { width: 14px; background: var(--fg-0); box-shadow: none; }

/* Offline build: bot match takes the hero slot */
body.is-offline .main-actions { display: block; }
body.is-offline #btn-play-bots .play-art { display: none; }
body.is-offline #btn-play-bots .play-content { padding: 0 200px 24px 26px; }
body.is-offline #btn-play-bots .play-title { font: italic 700 clamp(64px, 7.5vw, 104px)/0.85 var(--f-display) !important; }
body.is-offline #btn-play-bots .play-badge { right: 22px; bottom: 26px; height: 50px; padding: 0 26px; background: var(--orange) !important; color: var(--orange-ink) !important; border: 0; font-size: 16px; }
body.is-offline .bottom-row { grid-template-columns: 1fr; }
body.is-offline .stats-bar, body.is-offline .leaderboard-preview { display: none !important; }

/* ---- Live strip: one quiet line ---- */
.stats-bar { display: flex !important; align-items: center; gap: 22px; margin: -10px 0 0; padding: 0 !important; background: none !important; border: 0 !important; clip-path: none; box-shadow: none !important; justify-content: flex-start !important; overflow: visible; }
.stats-bar::before, .stats-bar::after { content: none; }
.stat-item { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; background: none !important; border: 0 !important; border-radius: 0 !important; }
.stat-item:hover { transform: none; background: none !important; }
.stat-icon { display: none !important; }
.stat-info { display: flex; align-items: baseline; gap: 6px; }
.stat-label { order: 1; font: 700 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.stat-value { font: 700 14px/1 var(--f-display) !important; font-variant-numeric: tabular-nums; color: var(--fg-0) !important; text-shadow: none !important; font-style: normal !important; }
#stat-online, #stat-rooms { color: var(--fg-0) !important; text-shadow: none !important; }
.stat-item:first-of-type .stat-value::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }

/* ---- Panels ---- */
.bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
@media (max-width: 900px) { .bottom-row { grid-template-columns: 1fr; } }
.leaderboard-preview, .stats-preview-section, .updates-preview-section, .season-zone { background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; padding: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; clip-path: none; box-shadow: none !important; }
.leaderboard-preview::after, .stats-preview-section::after, .updates-preview-section::after, .season-zone::after { display: none !important; }
.leaderboard-preview { cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color var(--t); }
.leaderboard-preview:hover { outline-color: rgba(255, 255, 255, .5); }
.leaderboard-header, .stats-preview-header, .updates-preview-header, .season-zone-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px !important; margin: 0 !important; border-bottom: 0; background: none; position: relative; }
.leaderboard-header::before, .stats-preview-header::before, .updates-preview-header::before, .season-zone-header::before { content: none; }
.leaderboard-header h3, .stats-preview-header h3, .updates-preview-header h3, .season-card-header h3 { font: 700 12px/1 var(--f-body) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2) !important; margin: 0; font-style: normal !important; }
.view-all { font: 700 11px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2) !important; cursor: pointer; text-decoration: none; transition: color var(--t-fast); }
.view-all:hover { color: var(--fg-0) !important; }
.top-players { padding: 0 6px 6px; }
.top-player { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); background: none !important; border-radius: 0 !important; margin: 0 !important; }
.top-player:first-child { border-top: 0; }
.top-player-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 22px; font: 700 12px var(--f-display); color: var(--fg-1) !important; background: var(--bg-3) !important; border-radius: 3px; transform: none; box-shadow: none; font-style: normal !important; }
.top-player-rank.gold { background: var(--gold) !important; color: var(--gold-ink) !important; }
.top-player-rank.silver { background: #C9CED9 !important; color: #1B2240 !important; }
.top-player-rank.bronze { background: #B8763F !important; color: #2A1300 !important; }
.top-player-name { font: 600 14px var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.top-player-mmr { font: 700 13px var(--f-display); font-variant-numeric: tabular-nums; color: var(--fg-1) !important; font-style: normal !important; }
.top-player.loading .top-player-name { color: var(--fg-3); }
.stats-preview-content { padding: 6px 18px 18px; display: grid; gap: 14px; }
.stats-preview-rank { display: flex; align-items: center; gap: 14px; }
.preview-rank-icon { width: 44px; height: 44px; font-size: 0 !important; filter: none; }
.preview-rank-name { font: 700 24px/1 var(--f-display); text-transform: uppercase; display: block; letter-spacing: .01em; font-style: normal; }
.preview-mmr { font: 700 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); display: block; margin-top: 5px; }
.stats-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; border-radius: 0; overflow: visible; }
.preview-stat { padding: 10px 12px; border: 0 !important; background: var(--bg-2) !important; border-radius: var(--r); display: grid; gap: 5px; text-align: left; }
.preview-stat-value { font: 700 22px/1 var(--f-display) !important; color: var(--fg-0) !important; font-style: normal !important; }
.preview-stat-label { order: -1; font: 700 10px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }

/* ---- Season ---- */
.season-zone { animation: ar-rise var(--t-slow) both !important; overflow: hidden; }
.season-zone-header { min-height: 0; padding: 18px 18px 16px !important; background: none; border-bottom: 1px solid var(--line); }
.season-title-group { display: flex; align-items: center; gap: 14px; }
.season-trophy { display: none !important; }
.season-zone-title { font: 700 28px/0.9 var(--f-display) !important; text-transform: uppercase; letter-spacing: .01em; margin: 0; color: var(--fg-0) !important; text-shadow: none !important; font-style: normal !important; }
.season-zone-subtitle { font: 700 11px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); margin: 6px 0 0; }
.season-countdown-box { display: grid; gap: 6px; min-width: 200px; padding: 0; background: none; border: 0; transform: none; box-shadow: none; }
.season-countdown-box > * { transform: none; }
.countdown-timer { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; }
.countdown-value { font: 700 26px/1 var(--f-display) !important; color: var(--fg-0) !important; font-style: normal !important; }
.countdown-label { font: 700 10px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.season-progress-bar { height: 3px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.season-progress-fill { background: var(--orange) !important; height: 100%; box-shadow: none; }
.season-zone-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; }
@media (max-width: 900px) { .season-zone-content { grid-template-columns: 1fr; } }
.season-card { background: none !important; border: 0 !important; border-left: 1px solid var(--line) !important; border-radius: 0 !important; padding: 14px 18px 16px !important; display: grid; gap: 12px; align-content: start; cursor: pointer; transition: background var(--t-fast); }
.season-card:first-child { border-left: 0 !important; }
.season-card:hover { background: var(--bg-2) !important; transform: none !important; }
.season-card-header { display: flex; align-items: center; gap: 10px; }
.season-card-icon { display: none; }
.season-card-link { font: 700 11px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); transition: color var(--t-fast); }
.season-card:hover .season-card-link { color: var(--fg-0); }
.season-rank-item, .reward-tier { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); background: none !important; border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important; }
.season-rank-item:first-child, .reward-tier:first-child { border-top: 0; }
.rank-medal, .tier-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 3px; font: 700 10px/1 var(--f-display); color: #1B1408; background: var(--fg-3); filter: none; font-size: 0 !important; line-height: 0; }
.rank-medal::before, .tier-icon::before { font-size: 10px; line-height: 1; }
.season-rank-item.gold .rank-medal, .reward-tier.gold .tier-icon { background: var(--gold); } .season-rank-item.gold .rank-medal::before, .reward-tier.gold .tier-icon::before { content: '1'; }
.season-rank-item.silver .rank-medal, .reward-tier.silver .tier-icon { background: #C9CED9; } .season-rank-item.silver .rank-medal::before, .reward-tier.silver .tier-icon::before { content: '2'; }
.season-rank-item.bronze .rank-medal, .reward-tier.bronze .tier-icon { background: #B8763F; } .season-rank-item.bronze .rank-medal::before, .reward-tier.bronze .tier-icon::before { content: '3'; }
.rank-name { font-weight: 600; font-size: 14px; }
.rank-mmr, .tier-coins { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--f-display); color: var(--fg-1); font-style: normal; }
.tier-items { font-size: 12px; color: var(--fg-2); display: block; }
.my-season-rank { display: flex; align-items: center; gap: 14px; }
.my-season-position { display: flex; align-items: baseline; }
.position-hash { color: var(--fg-3); font: 700 20px var(--f-display); }
.position-number { font: 700 36px/1 var(--f-display); color: var(--fg-0); }
.my-season-mmr { font: 700 13px var(--f-display); text-transform: uppercase; color: var(--orange); display: block; font-style: normal; }
.my-season-record { font-size: 13px; color: var(--fg-2); display: block; }

/* ---- Updates ---- */
.updates-preview-list { padding: 0 6px 6px; display: grid; gap: 0; }
.update-item { padding: 12px 12px; border: 0 !important; border-top: 1px solid var(--line) !important; background: none !important; border-radius: 0 !important; margin: 0 !important; display: grid; gap: 5px; position: relative; }
.update-item:first-child { border-top: 0 !important; }
.update-item::before { content: none; }
.update-item:hover { transform: none; }
.update-header { display: flex; align-items: center; justify-content: space-between; }
.update-date { font: 700 10.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.update-title { font: 700 15px/1.1 var(--f-display); text-transform: uppercase; margin: 0; color: var(--fg-0); font-style: normal; letter-spacing: .02em; }
.update-description { font: 500 13px/1.45 var(--f-body); color: var(--fg-2); margin: 0; }
.update-badge.badge-feature { background: var(--orange) !important; color: var(--orange-ink) !important; border: 0 !important; }
.update-badge.badge-ui { background: var(--bg-3) !important; color: var(--fg-2) !important; }

/* Loading screen */
.loading-screen { background: var(--bg-0) !important; }
.loading-bar { background: var(--bg-3) !important; border-radius: 0 !important; height: 3px !important; }
.loading-progress { background: var(--orange) !important; box-shadow: none; }
.loading-text { font: 700 11px var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.loading-screen .logo { font: 700 40px/1 var(--f-display) !important; }

/* Reduced motion (e.g. Windows "Animation effects" off) calms the interface, but never the cosmetics players own:
   animated banners, card backgrounds, frames, avatars, name colours and titles keep moving. */
@media (prefers-reduced-motion: reduce) {
    *:not([class*="cos-"], [class*="cos-"] *, [class*="banner"], [class*="banner"] *, [class*="title-neon"], [class*="title-neon"] *, .pc-card *),
    *:not([class*="cos-"], [class*="cos-"] *, [class*="banner"], [class*="banner"] *, [class*="title-neon"], [class*="title-neon"] *, .pc-card *)::before,
    *:not([class*="cos-"], [class*="cos-"] *, [class*="banner"], [class*="banner"] *, [class*="title-neon"], [class*="title-neon"] *, .pc-card *)::after { animation: none !important; transition: none !important; }
}
@media (max-width: 700px) {
    .header-top { height: auto; padding: 10px var(--gutter); flex-wrap: wrap; }
    .play-btn-hero { min-height: 340px; }
    .play-btn-hero .play-content { padding: 0 20px 90px 18px; }
    .play-btn-hero .play-badge { right: 18px; bottom: 20px; left: 18px; }
    .hero-tag { display: none; }
    .season-zone-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .countdown-timer { justify-content: flex-start; }
    .goal-text { font-size: 56px !important; }
}

/* --------------------------------------------------------------------------
   0. Fonts (self-hosted — no third-party request at boot)
   -------------------------------------------------------------------------- */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-ext-500-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-500-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-ext-600-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-600-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/chakra-petch-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/chakra-petch-latin-ext-700-italic.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/chakra-petch-latin-700-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/exo-2-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/exo-2-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/exo-2-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/exo-2-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/exo-2-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/exo-2-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/exo-2-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/exo-2-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/exo-2-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/exo-2-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/exo-2-latin-700-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Exo 2'; font-style: italic; font-weight: 800; font-display: swap; src: url('fonts/exo-2-latin-800-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


/* --------------------------------------------------------------------------
   7. Auth
   -------------------------------------------------------------------------- */
.auth-screen { background: rgba(8, 9, 12, .86) !important; }
.auth-container { max-width: 480px; width: 100%; }
.auth-card { position: relative; overflow: hidden; background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; padding: 26px 24px 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9) !important; animation: ar-pop var(--t) both; }
.auth-card::before { content: none !important; }
.auth-logo { text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: start; margin-bottom: 20px; padding-top: 0; }
.auth-logo :is(h1,.nb-h1) { font: 700 28px/1 var(--f-display) !important; letter-spacing: .02em; font-style: normal; text-shadow: none !important; }
.auth-logo :is(h1,.nb-h1) span { color: var(--orange) !important; }
.auth-logo p { grid-column: 1; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); margin: 8px 0 0; }
.auth-close-btn { grid-column: 2; grid-row: 1 / span 2; position: static !important; margin: -6px -6px 0 0; }
.auth-tabs { margin-bottom: 18px; }
.auth-tab { flex: 0 0 auto; }
.auth-submit { width: 100%; height: 46px; font-size: 14px; margin-top: 6px; }
.auth-error { color: var(--bad); font-size: 13px; min-height: 0; }
.auth-guest-hint { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.auth-guest-hint p { font-size: 13px; color: var(--fg-2); }
.remember-label { font-size: 13px; color: var(--fg-1); display: flex; align-items: center; gap: 8px; }
.strength-bar { height: 3px; background: var(--bg-4); border-radius: 0; }
.strength-bar.weak { background: var(--bad); } .strength-bar.medium { background: var(--gold); } .strength-bar.strong { background: var(--ok); }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .register-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   8. Lobby (room) — also the in-game ESC menu
   -------------------------------------------------------------------------- */
#lobby-screen { background: linear-gradient(180deg, rgba(15, 17, 21, .78), rgba(15, 17, 21, .94) 55%, var(--bg-0)), url('art/bg-arena.jpg') center 30% / cover no-repeat fixed var(--bg-0) !important; }
.lobby-container { max-width: 1040px; gap: 14px; }
.lobby-header { position: relative; overflow: hidden; padding: 14px 16px 14px 20px !important; background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; }
.lobby-header::before { content: none !important; }
.lobby-header h2 { font: 700 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; margin: 0; font-style: normal; min-width: 0; max-width: 46vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lobby-header h2::before { content: none !important; }
.lobby-actions { display: flex; gap: 4px; align-items: center; }

.teams-container { gap: 14px; height: 400px; }
.team-column { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-1) !important; border: 0 !important; border-top: 3px solid var(--team) !important; border-radius: var(--r-lg) !important; clip-path: none !important; }
#col-red { --team: var(--red); } #col-blue { --team: var(--blue); } #col-spec { --team: var(--bg-4); }
.team-column::after { content: none !important; }
.team-header, .team-header.red, .team-header.blue { padding: 12px 12px 10px 14px; background: none !important; border-bottom: 1px solid var(--line) !important; display: flex; align-items: center; justify-content: space-between; gap: 8px; box-shadow: none !important; }
.team-header h3 { font: 700 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-0) !important; margin: 0; text-shadow: none !important; font-style: normal; }
#col-red .team-header h3 { color: #FF8B87 !important; } #col-blue .team-header h3 { color: #7FB2F5 !important; }
.btn-join-team { height: 28px; padding: 0 10px; font-size: 12px; background: var(--bg-3); color: var(--fg-0); border: 0; }
.btn-join-team:hover { background: var(--team); color: #fff; }
.player-list { padding: 8px; flex: 1; overflow-y: auto; }
.player-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 4px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; transition: background var(--t-fast); }
.player-item:hover { background: var(--bg-3) !important; transform: none !important; }
.player-item.self { background: var(--bg-3) !important; box-shadow: inset 3px 0 0 var(--orange) !important; }
.player-item.admin .player-name { color: var(--fg-0); }
.player-item .player-name { font: 600 14px var(--f-body); display: inline-flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.player-rank { filter: none !important; }
.player-ping { font: 700 11px var(--f-display); letter-spacing: .04em; }
.player-item.is-bot { opacity: .85; }

.lobby-controls { padding: 14px 16px !important; background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; gap: 14px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.control-group, .settings-group, .start-group { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.setting-item { display: flex; align-items: center; gap: 8px; }
.setting-item label { margin: 0; }
#stadium-name { font: 700 14px var(--f-display); text-transform: uppercase; color: var(--fg-0) !important; font-style: normal; }
#btn-start-game { height: 46px; padding: 0 26px; font-size: 15px; }
#btn-start-game::before { content: none; }
.stadium-list { display: grid; gap: 6px; }
.stadium-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; padding: 12px 14px; cursor: pointer; transition: background var(--t-fast); }
.stadium-item:hover { background: var(--bg-3) !important; transform: none !important; }
.stadium-item.selected { box-shadow: inset 3px 0 0 var(--orange) !important; background: var(--bg-3) !important; }
.stadium-item .stadium-name { font: 700 16px var(--f-display); text-transform: uppercase; color: var(--fg-0) !important; font-style: normal; }
.stadium-item .stadium-desc { font: 500 12.5px var(--f-body); color: var(--fg-2); }
.stadium-item .stadium-size { font: 700 12px var(--f-display); color: var(--fg-2) !important; letter-spacing: .06em; }
.stadium-icon { display: none; }
#global-chat-panel { width: 1040px; bottom: 12px; }

#lobby-screen[style*="fixed"] { justify-content: center; align-items: center; background: rgba(8, 9, 12, .72) !important; padding: 24px; }
#lobby-screen[style*="fixed"]::before { display: none; }
#lobby-screen[style*="fixed"] .lobby-container { position: relative; width: min(960px, 100%); height: auto; max-height: calc(100dvh - 210px); margin: 0; padding: 16px; background: var(--bg-0); border: 0; border-radius: var(--r-lg); overflow-y: auto; gap: 12px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .95); }
#lobby-screen[style*="fixed"] .teams-container { height: 320px; }
#lobby-screen[style*="fixed"] ~ #global-chat-panel { width: min(960px, calc(100% - 48px)); bottom: 20px; }

.add-bot-btn { display: flex; align-items: center; justify-content: center; height: 34px; margin: 4px; border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--fg-2); font: 700 11px var(--f-display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.add-bot-btn:hover { color: var(--fg-0); border-color: var(--fg-3); background: var(--bg-2); }
.fl-dialog { background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9) !important; }
.fl-dialog h3 { font: 700 18px/1 var(--f-display) !important; text-transform: uppercase; font-style: normal; }
.bot-diff-btn { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; color: var(--fg-0) !important; padding: 12px 14px !important; font: 700 13px var(--f-display) !important; text-transform: uppercase; letter-spacing: .06em; }
.bot-diff-btn:hover { background: var(--bg-3) !important; box-shadow: inset 3px 0 0 var(--orange) !important; }

/* --------------------------------------------------------------------------
   9. Game screen (HUD only — the canvas is untouched)
   -------------------------------------------------------------------------- */
#game-screen { background: var(--bg-0); }
.game-topbar { height: auto; padding: 12px 0 8px; gap: 0; background: transparent; border: 0; align-items: stretch; }
.team-score, .game-timer { height: 42px; display: flex; align-items: center; margin: 0; background: var(--bg-1) !important; border: 0 !important; transform: none !important; }
.team-score { gap: 0; padding: 0; position: relative; }
.team-score > *, .game-timer > * { transform: none !important; }
.team-score.red { border-radius: var(--r) 0 0 var(--r); box-shadow: inset 4px 0 0 var(--red) !important; }
.team-score.blue { border-radius: 0 var(--r) var(--r) 0; box-shadow: inset -4px 0 0 var(--blue) !important; }
.team-score.red::before, .team-score.blue::before { content: none !important; }
/* team colour strip drawn above the score box (an inset shadow was hidden under BLUE's score box) */
.team-score.red::after, .team-score.blue::after { content: ''; position: absolute; top: 0; bottom: 0; width: 4px; z-index: 2; pointer-events: none; }
.team-score.red::after { left: 0; background: var(--red); border-radius: var(--r) 0 0 var(--r); }
.team-score.blue::after { right: 0; background: var(--blue); border-radius: 0 var(--r) var(--r) 0; }
.team-name { font: 700 13px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; opacity: 1; padding: 0 18px; font-style: normal; color: var(--fg-1) !important; }
.team-score .score { font: 700 24px/1 var(--f-display) !important; color: var(--fg-0) !important; min-width: 50px; text-align: center; background: var(--bg-2) !important; height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 12px; font-variant-numeric: tabular-nums; font-style: normal !important; }
.team-score.red .score, .team-score.blue .score { color: var(--fg-0) !important; }
.game-timer { font: 700 17px/1 var(--f-display) !important; color: var(--fg-0) !important; padding: 0 18px; letter-spacing: .08em; background: var(--bg-0) !important; font-variant-numeric: tabular-nums; text-shadow: none !important; font-style: normal !important; }
#game-canvas { border-radius: var(--r) !important; border: 0; box-shadow: none !important; }
.game-area-wrapper { padding: 6px; gap: 8px; }
.game-chat-panel { background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r) !important; }
.game-chat-panel .chat-message, .chat-message { font: 500 13px/1.4 var(--f-body); }
.chat-sender { font-weight: 700; }
.game-chat-panel .chat-input-container { border-top: 1px solid var(--line); padding: 6px; }
.game-chat-panel .chat-input-container .input-glass { height: 34px; font-size: 13px; }
.controls-info { gap: 4px; align-items: center; }
.controls-info span { background: var(--bg-1) !important; border: 0 !important; border-radius: 3px; font: 700 10px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); padding: 6px 8px; text-shadow: none !important; }
.btn-help-ingame { width: 24px; height: 24px; border-radius: 3px; background: var(--bg-2) !important; border: 0 !important; color: var(--fg-1); font: 700 12px var(--f-display); }

.goal-celebration { inset: auto 0 !important; top: 50% !important; transform: translateY(-50%) !important; height: auto; padding: 22px 0; background: rgba(15, 17, 21, .92) !important; border-top: 3px solid var(--orange); border-bottom: 3px solid var(--orange); box-shadow: none !important; flex-direction: row; gap: 20px; align-items: baseline; justify-content: center; animation: ar-goal-sweep 420ms ease-out both !important; }
.goal-celebration::before { content: none !important; }
@keyframes ar-goal-sweep { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
.goal-text { font: italic 700 clamp(64px, 10vw, 104px)/0.9 var(--f-display) !important; letter-spacing: -.03em; color: var(--fg-0) !important; text-shadow: none !important; animation: none !important; }
.goal-style { align-self: center; background: var(--orange) !important; color: #0f1115 !important; font: italic 700 clamp(16px, 2.2vw, 24px)/1 var(--f-display); letter-spacing: .08em; padding: 8px 14px; border-radius: 3px; }
.goal-scorer { font: 700 16px/1 var(--f-display); text-transform: uppercase; letter-spacing: .1em; color: var(--orange) !important; opacity: 1; margin: 0; font-style: normal; }
.pause-overlay { background: rgba(8, 9, 12, .72); }
.pause-text { font: 700 64px/0.9 var(--f-display) !important; letter-spacing: 0; text-transform: uppercase; text-shadow: none !important; font-style: normal; }
.resume-bar { background: var(--orange); box-shadow: none; }
.replay-badge { background: var(--red) !important; color: #fff !important; font: 700 11px var(--f-body); letter-spacing: .16em; padding: 5px 8px; border-radius: 2px; animation: none !important; transform: none !important; }
.replay-progress-bar { background: var(--fg-0) !important; }

.match-result-overlay { background: rgba(8, 9, 12, .86) !important; backdrop-filter: none !important; }
.match-result-content { position: relative; overflow: hidden; background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; padding: 30px 28px 24px !important; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95) !important; animation: ar-pop var(--t-slow) both; }
.match-result-content::before { content: '' !important; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--orange) !important; }
.match-result-title { font: italic 700 72px/0.9 var(--f-display) !important; text-transform: uppercase; letter-spacing: -.03em; text-shadow: none !important; }
.match-result-title.victory { color: var(--fg-0) !important; text-shadow: none !important; }
.match-result-title.defeat { color: var(--fg-2) !important; }
.match-result-score { font: 700 32px/1 var(--f-display) !important; color: var(--fg-1) !important; margin: 10px 0 20px; letter-spacing: .04em; font-style: normal; }
.match-result-player { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.match-result-player.is-me { box-shadow: inset 3px 0 0 var(--orange) !important; background: var(--bg-3) !important; }
.player-result-name { font-weight: 600; }
.mmr-change { font: 700 14px var(--f-display); font-style: normal; }
.mmr-change.positive { color: var(--ok) !important; } .mmr-change.negative { color: var(--bad) !important; }
.match-result-content .btn-primary { margin-top: 16px; height: 46px; padding: 0 30px; font-size: 14px; }

.quick-chat-overlay { background: rgba(8, 9, 12, .55) !important; backdrop-filter: none !important; }
.qc-item { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; transition: background var(--t-fast); }
.qc-item:hover, .qc-item.active { background: var(--bg-3) !important; box-shadow: inset 0 -2px 0 var(--orange) !important; transform: none; }
.qc-key { font: 700 15px var(--f-display); color: var(--orange) !important; }
.qc-text { font: 600 13px var(--f-body); }
.qc-title { font: 700 13px var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-1) !important; }
.qc-hint { font-size: 11px; color: var(--fg-3) !important; }

.bot-setup-sheet { background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) var(--r-lg) 0 0 !important; box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, .9) !important; }
.bot-setup-grab { background: var(--bg-4); }
.bot-setup-title { font: 700 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; text-align: left; font-style: normal; }
.bot-opt { min-height: 40px; border-radius: var(--r) !important; background: var(--bg-2) !important; border: 0 !important; color: var(--fg-2) !important; }
.bot-opt:hover { background: var(--bg-3) !important; color: var(--fg-0) !important; }
.bot-opt.active { background: var(--fg-0) !important; color: var(--bg-0) !important; box-shadow: none !important; }
.bot-setup-actions .btn { min-height: 46px; }

/* --------------------------------------------------------------------------
   10. Modals: stats, leaderboard, shop, inventory, friends, tutorial, settings, mode select, browser
   -------------------------------------------------------------------------- */
.shop-panel { max-width: 1180px; }
.inventory-panel { max-width: 1040px; }
.leaderboard-panel { max-width: 760px; }
.stats-panel { max-width: 520px; }
.season-panel { max-width: 900px; }
.stats-performance h3, .rewards-title, .ranks-intro h3, .shop-intro h3, .season-intro h3, .key-group h3, .rarity-title {
    font: 700 12px/1 var(--f-body) !important; text-transform: uppercase; letter-spacing: .16em; color: var(--fg-2) !important; margin: 20px 0 10px; font-style: normal;
}

/* Stats */
.stats-rank-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.stats-rank-icon { width: 56px; height: 56px; filter: none; }
.stats-rank-name { font: 700 26px/1 var(--f-display) !important; text-transform: uppercase; font-style: normal; }
.stats-mmr-value { color: var(--fg-1) !important; font: 700 12px var(--f-display) !important; letter-spacing: .12em; text-transform: uppercase; }
.stats-peak { color: var(--fg-2); font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border: 0; border-radius: 0; overflow: visible; margin-top: 12px; }
.stat-box { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; padding: 12px; display: grid; gap: 6px; }
.stat-box-value { font: 700 24px/1 var(--f-display) !important; color: var(--fg-0) !important; font-style: normal; }
.stat-box.win .stat-box-value { color: var(--ok) !important; } .stat-box.loss .stat-box-value { color: var(--bad) !important; }
.stat-box-label { order: -1; font: 700 10px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }

/* Leaderboard */
.leaderboard-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; background: none !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; margin: 0 !important; padding: 10px 12px; transition: background var(--t-fast); }
/* Leaderboard modal (ui.js): one line per player — position | level + name / W-L | MMR | tier */
#leaderboard-list .lbm-row { grid-template-columns: 28px minmax(0, 1fr) auto 150px; gap: 14px; min-height: 52px; padding: 7px 12px; cursor: pointer; }
.lbm-pos { margin: 0 !important; }
.lbm-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lbm-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lbm-name { font: 600 14px/1.2 var(--f-body); color: var(--fg-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lbm-lv { flex: none; }
.lbm-you { flex: none; font: 700 9px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); padding: 3px 5px; border-radius: 3px; }
.lbm-sub { font: 500 12px/1 var(--f-body); color: var(--fg-2); white-space: nowrap; }
.lbm-mmr { justify-self: end; display: inline-flex; align-items: baseline; gap: 4px; font: 700 15px/1 var(--f-display); color: var(--fg-0); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lbm-mmr small { font: 700 10px/1 var(--f-display); letter-spacing: .1em; color: var(--fg-2); }
.lbm-tier { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--tier-c); font: 600 13px/1.2 var(--f-body); }
.lbm-tier .rank-badge-icon { flex: none; display: inline-flex; }
.lbm-tier-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 560px) {
    #leaderboard-list .lbm-row { grid-template-columns: 24px minmax(0, 1fr) auto 22px; gap: 10px; padding: 7px 8px; }
    .lbm-tier-name { display: none; }
    .lbm-mmr { font-size: 14px; }
}
.leaderboard-row:hover { background: var(--bg-2) !important; transform: none !important; }
.leaderboard-row.top-1, .leaderboard-row.top-2, .leaderboard-row.top-3 { background: none !important; }
.leaderboard-row.is-me { background: var(--bg-2) !important; box-shadow: inset 3px 0 0 var(--orange) !important; }
.rank-position { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; background: var(--bg-3) !important; font: 700 12px var(--f-display); color: var(--fg-1) !important; border-radius: 3px; transform: none !important; box-shadow: none !important; }
.rank-position.gold { background: var(--gold) !important; color: var(--gold-ink) !important; }
.rank-position.silver { background: #C9CED9 !important; color: #1B2240 !important; }
.rank-position.bronze { background: #B8763F !important; color: #2A1300 !important; }
.player-mmr, .lb-mmr { font: 700 14px var(--f-display); color: var(--fg-1) !important; font-style: normal; }
.my-rank-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.my-rank-position { font: 700 30px var(--f-display); color: var(--fg-0); background: transparent !important; }
.my-rank-name { font: 700 16px var(--f-display); text-transform: uppercase; display: block; }
.my-rank-details { font-size: 12.5px; color: var(--fg-2); }

/* Shop */
.shop-panel .modal-header { background: var(--bg-1) !important; }
.shop-panel .modal-header::before, .season-panel .modal-header::before { content: none !important; }
.shop-panel .modal-header h2 { color: var(--fg-0); }
.shop-panel .modal-header h2::after { content: none !important; }
.shop-balance { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r); transform: none !important; box-shadow: none !important; }
.shop-balance > * { transform: none !important; }
.balance-label { font: 700 10px var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.balance-amount { display: inline-flex; align-items: center; gap: 6px; font: 700 15px var(--f-display); color: var(--gold) !important; font-style: normal; }
.shop-hint { font-size: 12px; color: var(--fg-2); margin: 0; flex: 1; text-align: left; }
.shop-content { padding: 4px 2px; }
.shop-tabs { display: none !important; }
.shop-section { --rar: #9BA1AC; margin-bottom: 26px; }
.shop-section[data-rarity="rare"] { --rar: #4C8FE8; }
.shop-section[data-rarity="epic"] { --rar: #A77BE8; }
.shop-section[data-rarity="legendary"] { --rar: var(--gold); }
.rarity-title { display: flex !important; align-items: center; gap: 8px; height: auto; padding: 0 !important; margin: 0 0 12px !important; background: none !important; border: 0 !important; clip-path: none !important; color: var(--fg-2) !important; text-shadow: none !important; }
.rarity-title::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--rar); }
.rarity-icon { display: none; }
.shop-section::after { content: none !important; }

.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.banner-card { --rar: #9BA1AC; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r-lg) !important; clip-path: none !important; transition: background var(--t-fast); outline: 2px solid transparent; outline-offset: -2px; }
.banner-card[data-rarity="rare"] { --rar: #4C8FE8; }
.banner-card[data-rarity="epic"] { --rar: #A77BE8; }
.banner-card[data-rarity="legendary"] { --rar: var(--gold); }
.banner-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rar); box-shadow: none !important; }
.banner-card::after { content: none !important; }
.banner-card:hover { transform: none !important; outline-color: rgba(255, 255, 255, .6); }
.banner-card.equipped { outline-color: var(--fg-0); }
.banner-preview-container { padding: 24px 16px; min-height: 90px; display: flex; align-items: center; justify-content: center; background: var(--bg-1) !important; background-image: none !important; border-bottom: 0; }
.banner-info { padding: 12px 14px 4px; display: grid; gap: 4px; }
.banner-name, .title-name { font: 700 15px/1.1 var(--f-display) !important; text-transform: uppercase; letter-spacing: .02em; margin: 0; font-style: normal; }
.banner-desc { font: 500 12px/1.35 var(--f-body); color: var(--fg-2); margin: 0; min-height: 2.7em; }
.banner-rarity { display: inline-block; font: 700 10px var(--f-body) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--rar) !important; text-shadow: none !important; }
.banner-actions { padding: 10px 14px 14px; margin-top: auto; }
.banner-actions .btn { width: 100%; height: 38px; }
.banner-actions .btn-buy.disabled, .banner-actions .btn-buy:disabled { opacity: .45; cursor: not-allowed; }
.btn-price { display: inline-flex; align-items: center; gap: 7px; font: 700 14px var(--f-display); font-style: normal; }
.btn-equip { background: var(--fg-0) !important; color: var(--bg-0) !important; border: 0 !important; }
.btn-equip:hover { background: var(--fg-1) !important; }
.btn-equipped { background: transparent !important; color: var(--fg-1) !important; border: 1px solid var(--line-strong) !important; }

/* Inventory: prestige titles */
.titles-container { display: flex; flex-direction: column; gap: 16px; }
.title-tier { background: var(--bg-2) !important; border: 0; border-radius: var(--r-lg); overflow: hidden; }
.tier-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: none !important; border-bottom: 1px solid var(--line); border-left: 0 !important; }
.tier-icon { font-size: 12px; }
.tier-name { font: 700 12px var(--f-body); letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
.title-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 10px; }
.title-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r) !important; transition: background var(--t-fast); }
.title-card:hover { background: var(--bg-3) !important; transform: none !important; }
.title-card.locked { opacity: .7; }
.title-card.unlocked { box-shadow: inset 3px 0 0 var(--orange) !important; border-left: 0 !important; }
.title-card.equipped { box-shadow: inset 3px 0 0 var(--fg-0) !important; background: var(--bg-3) !important; }
.title-content { display: flex; align-items: flex-start; gap: 10px; }
.title-icon { width: 24px; text-align: center; font-size: 15px; flex: none; margin-top: 2px; }
.title-info { display: grid; gap: 3px; min-width: 0; }
.title-desc { font: 500 12px/1.35 var(--f-body); color: var(--fg-2); }
.title-progress { display: grid; gap: 5px; }
.progress-bar, .placement-bar { background: var(--bg-0) !important; border-radius: 2px !important; height: 4px !important; overflow: hidden; }
.progress-fill, .placement-fill { border-radius: 0 !important; box-shadow: none !important; }
.progress-text { font: 700 11px var(--f-body); letter-spacing: .04em; color: var(--fg-2); }
.title-actions .btn { width: 100%; }
.badge-preview-panel .preview-badge-container { background: var(--bg-2); border: 0; border-radius: var(--r); }
.preview-rarity, .preview-price { font: 700 14px var(--f-display); text-transform: uppercase; letter-spacing: .06em; font-style: normal; }
.preview-price { color: var(--gold); }

/* Friends modal */
.friends-add-section { padding: 0 0 14px; }
.friends-add-row { display: flex; gap: 8px; }
.friends-add-row input { flex: 1; height: 38px; }
.friends-section-title { font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); padding: 12px 0 6px; }
.friend-item { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; transition: background var(--t-fast); }
.friend-item:hover { background: var(--bg-3) !important; transform: none !important; }
.online-dot { background: var(--ok) !important; box-shadow: none !important; }
.offline-dot { background: var(--fg-3) !important; }
.friend-name { font-weight: 600; }
.friend-ingame-tag { background: var(--bg-4) !important; color: var(--fg-1) !important; border-radius: 2px !important; font: 700 10px var(--f-body); letter-spacing: .12em; }
.friends-empty, .inventory-empty, .shop-empty, .season-empty, .room-empty, .leaderboard-empty { color: var(--fg-2); }
.empty-icon { filter: grayscale(1); opacity: .5; }

/* Room browser */
.room-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; padding: 12px 14px; transition: background var(--t-fast); }
.room-item:hover { background: var(--bg-3) !important; transform: none !important; }
.room-info h3 { font: 700 15px/1.1 var(--f-display); text-transform: uppercase; font-style: normal; }
.room-players { font: 700 14px var(--f-display); color: var(--fg-1) !important; }
.room-stadium { font-size: 12px; color: var(--fg-2); }

/* Mode select (ranked) */
.mode-cards-container { gap: 10px; }
.mode-card { position: relative; overflow: hidden; background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r-lg) !important; padding: 20px; clip-path: none !important; transition: background var(--t-fast); outline: 2px solid transparent; outline-offset: -2px; }
.mode-card::before { content: none !important; }
.mode-card:hover { background: var(--bg-3) !important; transform: none !important; outline-color: rgba(255, 255, 255, .6); }
.mode-card-icon { display: none !important; }
.mode-card-title { font: 700 26px/1 var(--f-display) !important; text-transform: uppercase; color: var(--fg-0) !important; text-shadow: none !important; font-style: normal; }
.mode-card-desc { color: var(--fg-2); font-size: 13px; }
.mode-card-queue { background: var(--bg-1) !important; border: 0 !important; border-radius: 3px; font: 700 10px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-1) !important; padding: 5px 8px; }
.mode-card-features li { color: var(--fg-1); font-size: 13px; }
.mode-card-features li::before { color: var(--orange); }

/* Settings / keybinds / tutorial */
.keybind-row { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.keybind-key { background: var(--bg-3) !important; border: 1px solid var(--line-strong) !important; border-bottom-width: 2px !important; border-radius: 3px !important; font: 700 12px var(--f-display) !important; letter-spacing: .06em; color: var(--fg-0) !important; }
.keybind-key.capturing { border-color: var(--orange) !important; color: var(--orange) !important; animation: none !important; box-shadow: none !important; }
.keybind-action { font-weight: 600; }
.key { background: var(--bg-3) !important; border: 1px solid var(--line-strong) !important; border-bottom-width: 2px !important; border-radius: 3px !important; font: 700 13px var(--f-display) !important; color: var(--fg-0) !important; }
.rank-card, .coin-card, .tip-card, .mmr-box, .step, .season-reward-row, .shop-item-preview, .curve-tip, .tutorial-tab-content .demo-field { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.rank-card:hover, .coin-card:hover, .tip-card:hover, .shop-item-preview:hover { transform: none !important; background: var(--bg-3) !important; }
.step-num { background: var(--orange) !important; color: var(--orange-ink) !important; border-radius: 3px !important; font: 700 12px var(--f-display) !important; transform: none !important; }
.key-inline, .tip-card .tip-content code { background: var(--bg-3); border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 6px; font: 700 12px var(--f-display); color: var(--fg-0); }
.dont-show-again { font-size: 13px; color: var(--fg-1); display: flex; align-items: center; gap: 8px; flex: 1; }
.context-menu { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; padding: 4px !important; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9) !important; }
.context-menu-item { border-radius: 3px; font-size: 13px; }
.context-menu-item:hover { background: var(--bg-3) !important; }

/* Toasts */
.shop-notification, .inventory-notification, .friend-toast, .coin-reward-popup { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; color: var(--fg-0) !important; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9) !important; font: 600 13px var(--f-body); }
.notification-success { box-shadow: inset 3px 0 0 var(--ok), 0 20px 50px -20px rgba(0, 0, 0, .9) !important; } .notification-error { box-shadow: inset 3px 0 0 var(--bad), 0 20px 50px -20px rgba(0, 0, 0, .9) !important; }
.coin-reward-popup .coin-amount { font: 700 26px var(--f-display); color: var(--gold); }
/* the label sat in dark grey on the dark popup (old gold-popup colours) */
.coin-reward-popup .coin-label { color: var(--fg-1) !important; font: 700 12px/1.3 var(--f-display); letter-spacing: .1em; text-transform: uppercase; }

/* Season modal */
.season-info-banner { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.timer-value { font: 700 26px/1 var(--f-display) !important; color: var(--fg-0) !important; font-style: normal; }
.timer-label { font: 700 10px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.season-rank-card { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.reward-card { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.reward-card:hover { background: var(--bg-3) !important; transform: none !important; }
.season-panel .modal-header { background: var(--bg-1) !important; }

.party-invite-content { text-align: center; }
.party-invite-buttons { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
#queue-overlay .modal-content, #queue-overlay .queue-box { background: var(--bg-1) !important; border: 0 !important; border-radius: var(--r-lg) !important; }
.queue-timer, .queue-time { font: 700 40px/1 var(--f-display) !important; color: var(--fg-0) !important; font-variant-numeric: tabular-nums; font-style: normal; }
.queue-status, .queue-title { font: 700 16px var(--f-display); text-transform: uppercase; letter-spacing: .08em; }

/* ==========================================================================
   RANKS & TITLES (ranks.js / titles.js)
   SVG tier badges, rank labels, prestige title pills.
   The neon title classes below are the one place glow is allowed.
   ========================================================================== */
.nb-rank-badge { display: inline-block; vertical-align: middle; flex: none; overflow: visible; }
.nb-rank-badge--legend { filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 0 6px rgba(255,255,255,.45)); }

.nb-rank-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nb-rank-label .nb-rank-name { font: 700 14px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.nb-rank-label.nb-rank-tier-legend .nb-rank-name { color: #FFFFFF; text-shadow: 0 0 6px rgba(255,255,255,.55); }

/* Badge containers across menu, stats, leaderboard, lobby, match result */
.user-rank-icon, .preview-rank-icon, .stats-rank-icon, .player-rank, .player-result-rank,
.rank-badge-icon, .my-rank-position, .rank-card .rank-icon, .preview-rank {
    display: inline-flex; align-items: center; justify-content: center; line-height: 0;
}
.user-rank-icon { width: 18px; height: 18px; }
.preview-rank-icon { width: 32px; height: 32px; font-size: 0 !important; }
.stats-rank-icon { width: 48px; height: 48px; font-size: 0 !important; }
.player-rank { min-width: 18px; filter: none !important; }
.player-rank .nb-rank-badge--legend { filter: drop-shadow(0 0 2px rgba(255,255,255,.9)); }
.player-rank-badge { display: inline-flex; align-items: center; gap: 6px; }
.my-rank-position { background: transparent !important; width: 48px; height: 48px; }
.top-player-name .nb-rank-badge, .lb-player .nb-rank-badge, .season-rank-item .rank-name .nb-rank-badge { margin-right: 6px; vertical-align: -3px; }
.rank-card .rank-icon { width: 40px; height: 40px; font-size: 0; }
.rank-card.legend { border-color: rgba(255,255,255,.35) !important; }
.season-rank-card .nb-rank-label { margin-bottom: 4px; }

/* Title pills */
.nb-title { display: inline-block; font: 700 12px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: var(--r); white-space: nowrap; }
.title-card .nb-title { padding: 0; background: none; border: 0; }
.title-card.rank-title .title-icon { font-size: 0; line-height: 0; }

/* Grand Champion — red, soft red glow */
.title-neon-red {
    color: #FF4E5B !important;
    background: rgba(255,78,91,.10);
    border: 1px solid rgba(255,78,91,.45);
    text-shadow: 0 0 4px rgba(255,78,91,.75), 0 0 12px rgba(255,78,91,.45);
    box-shadow: 0 0 10px -2px rgba(255,78,91,.45);
}

/* Legend — white neon with a subtle animated shimmer */
.title-neon-white {
    position: relative;
    color: #FFFFFF !important;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.55);
    text-shadow: 0 0 3px #FFFFFF, 0 0 8px rgba(255,255,255,.8), 0 0 16px rgba(200,230,255,.55);
    box-shadow: 0 0 12px -2px rgba(255,255,255,.55), inset 0 0 6px rgba(255,255,255,.12);
    animation: nb-title-neon-flicker 4.5s ease-in-out infinite;
    overflow: hidden;
}
.title-neon-white::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: nb-title-shimmer 3.2s ease-in-out infinite;
}
.title-card .title-neon-white, .title-card .title-neon-red { background: none; border: 0; box-shadow: none; }
@keyframes nb-title-shimmer {
    0%, 55% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
@keyframes nb-title-neon-flicker {
    0%, 100% { text-shadow: 0 0 3px #FFFFFF, 0 0 8px rgba(255,255,255,.8), 0 0 16px rgba(200,230,255,.55); }
    50% { text-shadow: 0 0 2px #FFFFFF, 0 0 5px rgba(255,255,255,.6), 0 0 11px rgba(200,230,255,.4); }
}
/* (reduced motion: titles are cosmetics, they keep their glow) */
/* ======================= end RANKS & TITLES ======================= */

/* Controls hint row under the chat (outside the pitch) */
.game-area-wrapper .controls-info { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; margin-top: 2px; }

/* ==========================================================================
   SOCIAL SIDEBAR (social.js) + DEVELOPER label
   Right-docked panel on the menu and lobby screens, hidden over the live game.
   Flat ink surfaces, ruled rows, condensed uppercase labels, lime for alerts,
   developer green = var(--ok).
   ========================================================================== */

/* Developer name + pill (outside the pitch only — never drawn on the canvas) */
.nb-dev-name, .player-name.nb-dev-name, .player-result-name.nb-dev-name, .chat-sender.nb-dev-name { color: var(--ok) !important; }
.nb-dev-pill {
    display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px;
    border: 1px solid var(--ok); border-radius: 1px; background: transparent; color: var(--ok);
    font: 700 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase;
    vertical-align: 1px; white-space: nowrap; flex: none;
}
.chat-message .nb-dev-pill { margin: 0 2px 0 5px; height: 15px; }

/* Staff role pills: moderator blue, admin red (developer stays green) */
.nb-mod-name, .player-name.nb-mod-name, .chat-sender.nb-mod-name { color: #5AA9FF !important; }
.nb-adm-name, .player-name.nb-adm-name, .chat-sender.nb-adm-name { color: #FF5A5F !important; }
.nb-mod-pill, .nb-adm-pill {
    display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px;
    border: 1px solid #5AA9FF; border-radius: 1px; background: transparent; color: #5AA9FF;
    font: 700 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase;
    vertical-align: 1px; white-space: nowrap; flex: none;
}
.nb-adm-pill { border-color: #FF5A5F; color: #FF5A5F; }
/* Community partner (src/partners): violet, no staff powers */
.nb-partner-pill {
    display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px;
    border: 1px solid #B48CFF; border-radius: 1px; background: rgba(180, 140, 255, .08); color: #C7A8FF;
    font: 700 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase;
    vertical-align: 1px; white-space: nowrap; flex: none;
}
.sp-sec--partners .sp-sec-label { color: #C7A8FF !important; }
.sp-partner-of { color: #C7A8FF; font-weight: 600; }
.player-item.developer .player-name { display: inline-flex; align-items: center; gap: 0; }

/* Toggle buttons (menu header + lobby header) */
.btn-social {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 12px; border-radius: var(--r);
    background: transparent; border: 1px solid var(--line); color: var(--fg-1);
    font: 700 13px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
    cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn-social:hover { background: var(--ink-2); color: var(--fg-0); border-color: var(--line-strong); }
.btn-social.is-active { background: var(--ink-3); color: var(--fg-0); border-color: var(--line-strong); }
.btn-social svg { flex: none; }
.btn-social-count { color: var(--ok); font: 700 13px/1 var(--f-display); min-width: 8px; }
.btn-social-count[hidden] { display: none; }
.btn-social .btn-social-badge { position: absolute; top: -7px; right: -7px; }
.btn-social--lobby { height: 34px; padding: 0 10px; }

/* Lime count badge with dark text (unread DMs, requests, invites) */
.sp-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--lamp); color: var(--lamp-ink);
    font: 700 11px/1 var(--f-body); letter-spacing: 0;
}
.sp-badge[hidden] { display: none; }

/* Panel shell */
.social-panel {
    position: fixed; top: 64px; right: 0; bottom: 0; z-index: 60; /* above lobby chat (50), below modals (100+) */
    width: 320px; max-width: 100vw;
    display: flex; flex-direction: column;
    background: var(--ink-1); border-left: 1px solid var(--line-strong);
    color: var(--fg-0); font: 500 14px/1.35 var(--f-body);
    transform: translateX(100%); visibility: hidden;
    transition: transform var(--t), visibility 0s linear 180ms;
}
.social-panel.is-visible { transform: none; visibility: visible; transition: transform var(--t), visibility 0s; }
body.social-on-lobby .social-panel { top: 0; }
.social-panel :focus-visible { outline: 2px solid var(--lamp); outline-offset: -2px; }
.sp-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sp-head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.sp-title { margin: 0; font: 800 18px/1 var(--f-display) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-0); }
.sp-head-actions { display: flex; gap: 2px; }

.sp-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border-radius: var(--r);
    background: transparent; border: 1px solid transparent; color: var(--fg-2); cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.sp-icon-btn:hover { background: var(--ink-3); color: var(--fg-0); }
.sp-icon-btn[aria-expanded="true"] { background: var(--ink-3); color: var(--lamp); border-color: var(--line); }
.sp-icon-btn[hidden] { display: none; }
.sp-icon-btn--sm { width: 26px; height: 26px; }
.sp-icon-btn--lamp { background: var(--lamp); color: var(--lamp-ink); }
.sp-icon-btn--lamp:hover { background: var(--lamp-hi); color: var(--lamp-ink); }

.sp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: var(--r);
    background: var(--ink-3); border: 1px solid var(--line); color: var(--fg-0); cursor: pointer;
    font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.sp-btn:hover { background: var(--ink-4); border-color: var(--line-strong); }
.sp-btn--xs { height: 24px; padding: 0 8px; font-size: 11px; }
.sp-more-btn { display: flex; align-items: center; justify-content: center; width: calc(100% - 24px); margin: 8px 12px 10px; }
.sp-btn--lamp { background: var(--lamp); border-color: var(--lamp); color: var(--lamp-ink); }
.sp-btn--lamp:hover { background: var(--lamp-hi); border-color: var(--lamp-hi); }
.sp-btn--ghost { background: transparent; color: var(--fg-1); }
.sp-btn--ghost:hover { background: var(--ink-2); color: var(--fg-0); }
.sp-btn--danger:hover { background: var(--red); border-color: var(--red); color: #fff; }

.sp-input {
    flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: var(--r);
    background: var(--ink-0); border: 1px solid var(--line); color: var(--fg-0);
    font: 500 14px/1 var(--f-body); transition: border-color var(--t-fast);
}
.sp-input::placeholder { color: var(--fg-3); }
.sp-input:focus { outline: none; border-color: var(--lamp); }

/* Add friend inline form */
.sp-add { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--ink-2); flex: none; }
.sp-add[hidden] { display: none; }
.sp-add-status { flex-basis: 100%; min-height: 0; font: 500 12px/1.3 var(--f-body); color: var(--fg-2); }
.sp-add-status:empty { display: none; }
.sp-add-status.is-ok { color: var(--ok); }
.sp-add-status.is-error { color: var(--red); }

/* Views */
.sp-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sp-view[hidden] { display: none; }
.sp-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 16px; }

/* Sections */
.sp-sec { border-bottom: 1px solid var(--line); }
.sp-sec-h { margin: 0; }
.sp-sec-head {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 12px 0 10px;
    background: transparent; border: 0; color: var(--fg-2); cursor: pointer; text-align: left;
    font: 700 12px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase;
    transition: color var(--t-fast), background var(--t-fast);
}
.sp-sec-head:hover { color: var(--fg-0); background: var(--ink-2); }
.sp-chev { display: inline-flex; color: var(--fg-3); transition: transform var(--t-fast); }
.sp-sec.is-collapsed .sp-chev { transform: rotate(-90deg); }
.sp-sec-label { flex: 1; }
.sp-sec-count { font: 700 12px/1 var(--f-display); color: var(--fg-3); letter-spacing: .04em; }
.sp-sec-count.sp-badge { color: var(--lamp-ink); }
.sp-sec-body { padding: 0 0 6px; }
.sp-sec-body[hidden] { display: none; }
.sp-sec--developers .sp-sec-label { color: var(--ok); }
.sp-sec--players .sp-sec-label { color: var(--lamp); }
.sp-row--guest .sp-row-name { color: var(--fg-2); }

.sp-hint { margin: 2px 16px 8px; font: 500 13px/1.4 var(--f-body); color: var(--fg-3); }

/* Rows */
.sp-row {
    position: relative; display: flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 4px 8px 4px 12px;
    border-top: 1px solid transparent; border-bottom: 1px solid rgba(30, 74, 55, .45);
    transition: background var(--t-fast);
}
.sp-sec-body > .sp-row:last-of-type { border-bottom-color: transparent; }
.sp-row:hover, .sp-row.is-menu-open, .sp-row:focus-within { background: var(--ink-2); }
.sp-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.sp-row-hit:focus-visible { outline-offset: 3px; }
.sp-row-hit { padding: 4px 0; margin: 0; background: transparent; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; border-radius: var(--r); }
.sp-row-name { display: flex; align-items: center; min-width: 0; font: 600 14px/1.2 var(--f-body); color: var(--fg-0); }
.sp-row-name .sp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-row-sub { display: flex; align-items: center; gap: 6px; font: 500 12px/1.2 var(--f-body); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row.is-offline .sp-row-name, .sp-row.is-offline .sp-rank { opacity: .55; }
.sp-row.is-offline .sp-row-sub { color: var(--fg-3); }
.sp-row.is-ingame .sp-row-sub, .sp-row.is-queue .sp-row-sub { color: var(--ember); }
.sp-row.is-lobby .sp-row-sub { color: var(--fg-1); }
.sp-rank { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; line-height: 0; }
.sp-rank--empty { visibility: hidden; }
.sp-flag img { width: 18px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.sp-you { margin-left: 6px; font: 700 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.sp-crown { display: inline-flex; margin-left: 5px; color: var(--lamp); }

.sp-row-actions { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity var(--t-fast); }
.sp-row:hover .sp-row-actions, .sp-row:focus-within .sp-row-actions, .sp-row.is-menu-open .sp-row-actions, .sp-row-actions--always { opacity: 1; }
.sp-row-actions--always { gap: 4px; }
.sp-row-unread { flex: none; }

/* Presence dots */
.sp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--fg-3); }
.sp-dot--online { background: var(--ok); }
.sp-dot--online.sp-dot--busy { background: var(--ember); }
.sp-dot--offline { background: transparent; border: 1.5px solid var(--fg-3); }
.sp-row--friend .sp-dot { margin-left: -2px; }

/* Party */
.sp-invite-dot { width: 8px; height: 8px; border-radius: 1px; background: var(--lamp); flex: none; }
.sp-row--invite { background: rgba(200, 255, 61, .05); }
.sp-party-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 4px; }
.sp-queue-line { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--lamp); }
.sp-queue-line[hidden] { display: none; }
.sp-queue-clock { font-variant-numeric: tabular-nums; }
.sp-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); animation: sp-pulse 1.4s ease-in-out infinite; }
@keyframes sp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Requests */
.sp-req-dir { width: 34px; flex: none; font: 700 10px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--lamp); }
.sp-row--req.is-sent .sp-req-dir { color: var(--fg-3); }

/* Guests */
.sp-guest { padding: 20px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sp-guest .sp-hint { margin: 0 0 4px; }
.sp-guest-title { margin: 0; font: 800 20px/1.1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; color: var(--fg-0); }

/* Action menu (friend row) */
.sp-menu {
    position: absolute; right: 8px; z-index: 5; width: 210px; padding: 4px;
    background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
}
.sp-menu[hidden] { display: none; }
.sp-menu-title { display: flex; align-items: center; padding: 6px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font: 600 13px/1.2 var(--f-body); }
.sp-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px;
    background: transparent; border: 0; border-radius: 1px; color: var(--fg-1); cursor: pointer; text-align: left;
    font: 600 13px/1 var(--f-body); transition: background var(--t-fast), color var(--t-fast);
}
.sp-menu-item:hover, .sp-menu-item:focus-visible { background: var(--ink-3); color: var(--fg-0); outline-offset: -2px; }
.sp-menu-item svg { color: var(--fg-2); flex: none; }
.sp-menu-item--danger:hover, .sp-menu-item--danger.is-armed { color: var(--red); }
.sp-menu-item--danger.is-armed { background: rgba(255, 90, 78, .12); }
.sp-menu-item--danger:hover svg, .sp-menu-item--danger.is-armed svg { color: var(--red); }

/* DM thread */
.sp-dm-head { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 12px 0 6px; border-bottom: 1px solid var(--line); flex: none; }
.sp-dm-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-dm-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sp-dm-log:focus-visible { outline-offset: -2px; }
.sp-dm-older { align-self: center; margin-bottom: 8px; }
.sp-dm-empty { margin: auto 8px; text-align: center; }
.sp-msg { max-width: 86%; align-self: flex-start; margin-top: 8px; }
.sp-msg.is-grouped { margin-top: 2px; }
.sp-msg.is-mine { align-self: flex-end; }
.sp-msg-meta { display: flex; align-items: center; gap: 6px; margin: 0 2px 3px; font: 600 12px/1.2 var(--f-body); color: var(--fg-1); }
.sp-msg.is-mine .sp-msg-meta { justify-content: flex-end; color: var(--fg-2); }
.sp-msg-meta time { font: 500 11px/1 var(--f-body); color: var(--fg-3); }
.sp-msg-meta .nb-dev-pill { margin-left: 0; }
.sp-msg-body {
    padding: 7px 10px; border-radius: var(--r-lg); background: var(--ink-2); border: 1px solid var(--line);
    font: 400 14px/1.4 var(--f-body); color: var(--fg-0); white-space: pre-wrap; overflow-wrap: anywhere;
}
.sp-msg.is-mine .sp-msg-body { background: var(--ink-3); border-color: var(--line-strong); }
.sp-dm-form { display: flex; gap: 6px; padding: 10px 12px 6px; border-top: 1px solid var(--line); flex: none; }
.sp-dm-form .sp-input { height: 36px; }
.sp-dm-form .sp-icon-btn { width: 36px; height: 36px; }
.sp-dm-meta { min-height: 18px; padding: 0 12px 8px; font: 500 11px/1.4 var(--f-body); color: var(--fg-3); flex: none; }
.sp-dm-meta.is-warn { color: var(--ember); }

/* Toasts (bottom-right, 4s, non-blocking) */
.sp-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 10001; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; transition: right var(--t); }
body.social-open .sp-toasts { right: 336px; }
.sp-toasts.is-hidden-ingame { bottom: 96px; }
.sp-toast {
    pointer-events: auto; display: flex; flex-direction: column; gap: 3px; max-width: 300px; min-width: 200px;
    padding: 10px 12px; text-align: left; cursor: default;
    background: var(--ink-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--fg-2); border-radius: var(--r);
    color: var(--fg-0); font: 500 13px/1.35 var(--f-body);
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9);
    opacity: 0; transform: translateY(8px); transition: opacity var(--t), transform var(--t);
}
button.sp-toast { cursor: pointer; }
button.sp-toast:hover { border-color: var(--lamp); }
.sp-toast.is-in { opacity: 1; transform: none; }
.sp-toast.is-ok { border-left-color: var(--ok); }
.sp-toast.is-error { border-left-color: var(--red); }
.sp-toast.is-invite, .sp-toast.is-dm { border-left-color: var(--lamp); }
.sp-toast strong { font-weight: 700; }
.sp-toast-from { display: flex; align-items: center; font-weight: 700; }
.sp-toast-body { color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Docked layout: keep menu / lobby content clear of the panel */
body.social-open #main-menu .menu-container { padding-right: 320px; box-sizing: border-box; }
body.social-open #main-menu .header-top { margin-right: -320px; }
body.social-open #lobby-screen:not([style*="fixed"]) { padding-right: 320px; box-sizing: border-box; }
body.social-open #lobby-screen:not(.hidden):not([style*="fixed"]) ~ #global-chat-panel { left: calc(50% - 160px); max-width: calc(100% - 2rem - 320px); }

/* Below 1100px the panel overlays the content instead of pushing it */
@media (max-width: 1099px) {
    body.social-open #main-menu .menu-container { padding-right: 0; }
    body.social-open #main-menu .header-top { margin-right: 0; }
    body.social-open #main-menu .menu-container { padding-right: var(--gutter); }
    body.social-open #lobby-screen:not([style*="fixed"]) { padding-right: 0; }
    body.social-open #lobby-screen:not(.hidden):not([style*="fixed"]) ~ #global-chat-panel { left: 50%; max-width: calc(100% - 2rem); }
    .social-panel { box-shadow: -24px 0 48px -24px rgba(0, 0, 0, .85); }
}
@media (max-width: 700px) {
    body.social-open .sp-toasts { right: 16px; bottom: 16px; }
    .social-panel { width: 100vw; border-left: 0; }
    .btn-social-label { display: none; }
}
/* ======================= end SOCIAL SIDEBAR ======================= */

/* --------------------------------------------------------------------------
   12b. Social sidebar — arena accents on top of the carried-over block
   -------------------------------------------------------------------------- */
.social-panel { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); border-left: 1px solid var(--line-strong); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .9); }
.sp-head { height: 52px; background: linear-gradient(90deg, rgba(255, 122, 26, .14), transparent 60%); border-bottom: 1px solid var(--line-strong); position: relative; }
.sp-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.sp-title { font: italic 800 20px/1 var(--f-display) !important; letter-spacing: 0; }
.sp-sec-head { font: italic 800 12px/1 var(--f-display); letter-spacing: .16em; }
.sp-sec--developers .sp-sec-label { color: var(--ok); }
.sp-sec--players .sp-sec-label { color: var(--cyan); }
.sp-guest-title { font: italic 800 22px/1.1 var(--f-display); }
.sp-badge { background: var(--orange); color: var(--orange-ink); }
.sp-btn, .sp-btn--lamp { transform: skewX(var(--skew)); font-style: italic; }
.sp-btn > * { transform: skewX(var(--unskew)); }
.sp-btn--lamp { background: linear-gradient(180deg, var(--orange-hi), var(--orange)); border-color: var(--orange-hi); color: var(--orange-ink); box-shadow: 0 2px 0 #7A2E00; }
.sp-btn--lamp:hover { background: linear-gradient(180deg, #FFB86B, var(--orange-hi)); border-color: #FFD9B0; }
.sp-icon-btn--lamp { background: var(--orange); color: var(--orange-ink); }
.sp-icon-btn--lamp:hover { background: var(--orange-hi); color: var(--orange-ink); }
.sp-row:hover, .sp-row.is-menu-open, .sp-row:focus-within { background: rgba(255, 255, 255, .04); }
.sp-row { border-bottom: 1px solid var(--line); }
.sp-row.is-ingame .sp-row-sub, .sp-row.is-queue .sp-row-sub { color: var(--orange-hi); }
.sp-queue-line, .sp-live-dot, .sp-invite-dot, .sp-req-dir, .sp-crown { color: var(--orange); background-color: transparent; }
.sp-live-dot, .sp-invite-dot { background: var(--orange); }
.sp-row--invite { background: rgba(255, 122, 26, .06); }
.sp-input:focus { border-color: var(--cyan); }
.btn-social {
    height: 36px; padding: 0 14px; border-radius: var(--r);
    background: linear-gradient(180deg, var(--bg-4), var(--bg-3)); border: 1px solid var(--line-strong); color: var(--fg-0);
    font: italic 700 13px/1 var(--f-display); letter-spacing: .04em;
    transform: skewX(var(--skew)); box-shadow: 0 3px 0 rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .10);
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-social > * { transform: skewX(var(--unskew)); }
.btn-social:hover { background: linear-gradient(180deg, #2A3475, var(--bg-4)); border-color: var(--cyan); transform: skewX(var(--skew)) translateY(-1px); box-shadow: 0 4px 0 rgba(0, 0, 0, .55), 0 0 18px rgba(34, 229, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-social.is-active { background: linear-gradient(180deg, var(--cyan), #14B8D0); color: var(--cyan-ink); border-color: var(--cyan-hi); }
.btn-social.is-active .btn-social-count { color: var(--cyan-ink); }
.btn-social-count { color: var(--lime); }
.btn-social .btn-social-badge { transform: skewX(var(--unskew)); }
.btn-social--lobby { height: 36px; padding: 0 12px; }
body.social-open #main-menu .menu-container { padding-right: 320px; }
body.social-open #main-menu .header-top { margin-right: -320px; }
@media (max-width: 1099px) { body.social-open #main-menu .menu-container { padding-right: 0; } body.social-open #main-menu .header-top { margin-right: 0; } }

/* --------------------------------------------------------------------------
   13. Fan modes — the menu mode grid + hero slider caption, mode picker in
       the create-room modal, the modes modal and mode badges (see modes.js).
       Every mode element takes its accent from --mode (set inline).
   -------------------------------------------------------------------------- */
/* Mode grid: 8 art cards in 2 columns (4 fixed + fan modes from modes.js),
   compact so the column lines up with the hero + BOT MATCH row. */
.secondary-actions { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: minmax(0, 1fr); gap: 12px; }
.secondary-actions .action-btn { min-height: 128px; padding: 14px 14px 14px 18px; }
.secondary-actions .action-text h3 { font-size: 21px !important; }
.secondary-actions .action-text p { font-size: 12px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.secondary-actions .action-btn .new-badge-floating { top: 10px; right: 10px; }
.fm-grid-card .action-art { background-color: #0B0E14; background-position: center 45%; }
.fm-grid-card .new-badge-floating { color: #04050D !important; }
@media (max-width: 900px) {
    .secondary-actions { grid-template-columns: 1fr; }
    .secondary-actions .action-btn { min-height: 104px; }
}

/* Hero slider caption: LIVE · mode name + one dot per demo (menu-pitch.js) */
.hero-demo {
    position: absolute; right: 34px; bottom: 24px; z-index: 1; pointer-events: none;
    display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
}
.hero-demo-name {
    display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px 0 10px;
    background: rgba(4, 5, 13, .66); border-right: 3px solid var(--cyan);
    font: italic 800 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-0);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}
.hero-demo-name i { font-style: inherit; color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; }
.hero-demo-name i::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #FF4655; box-shadow: 0 0 8px #FF4655; animation: ar-pulse 1.6s ease-in-out infinite; }
.hero-demo.swap .hero-demo-name b { animation: hero-demo-in 420ms cubic-bezier(.2, .8, .2, 1); }
@keyframes hero-demo-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.hero-demo-dots { display: flex; gap: 5px; }
.hero-demo-dots i { width: 6px; height: 4px; background: rgba(255, 255, 255, .35); transform: skewX(var(--skew)); transition: width var(--t), background var(--t); }
.hero-demo-dots i.on { width: 18px; background: var(--cyan); box-shadow: 0 0 8px rgba(34, 229, 255, .6); }
@media (max-width: 700px) { .hero-demo { right: 18px; top: 68px; bottom: auto; } }

/* Mode picker (create room) */
.fm-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .fm-picker { grid-template-columns: 1fr; } }
.fm-card {
    --mode: var(--cyan);
    position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px;
    padding: 10px 12px 10px 16px; margin: 0; text-align: left; cursor: pointer; color: var(--fg-0);
    background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r);
    transition: border-color var(--t-fast), background var(--t-fast);
}
.fm-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mode); border-radius: var(--r) 0 0 var(--r); }
.fm-card:hover { border-color: var(--line-strong); background: var(--bg-3); }
.fm-card.is-selected { border-color: var(--mode); background: linear-gradient(90deg, color-mix(in srgb, var(--mode) 18%, transparent), var(--bg-2) 70%); box-shadow: 0 0 0 1px var(--mode) inset; }
.fm-card-name { font: italic 800 15px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.fm-card-team { font: 700 11px/1 var(--f-display); letter-spacing: .08em; color: var(--fg-2); align-self: center; }
.fm-card-desc { grid-column: 1 / -1; font: 500 12px/1.3 var(--f-body); color: var(--fg-2); }

/* Modes modal */
#modes-modal .modal-content { width: min(640px, calc(100vw - 32px)); max-width: none; overflow-y: auto; }
.fm-list { display: flex; flex-direction: column; gap: 10px; }
.fm-row { --mode: var(--cyan); position: relative; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px 18px; }
.fm-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mode); box-shadow: 0 0 12px var(--mode); border-radius: var(--r) 0 0 var(--r); }
.fm-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fm-row-text h3 { font: italic 800 19px/1 var(--f-display); text-transform: uppercase; margin: 0; display: flex; align-items: baseline; gap: 10px; }
.fm-row-text p { font: 500 12.5px/1.35 var(--f-body); color: var(--fg-2); margin: 5px 0 0; }
.fm-rooms { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.fm-room { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; background: var(--bg-2); border-radius: var(--r); }
.fm-room-name { font: 700 13px/1.2 var(--f-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-room-count { font: 700 12px var(--f-display); color: var(--fg-1); }
.fm-room-empty { display: block; font: 500 12px var(--f-body); color: var(--fg-3); background: none; padding: 2px 0; }

/* Mode badge: room browser + lobby header (ESC menu) */
.fm-badge {
    --mode: var(--cyan);
    display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 2px;
    font: italic 800 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase;
    background: rgba(14, 18, 48, .85); color: var(--fg-0); border: 1px solid var(--mode);
    box-shadow: inset 3px 0 0 var(--mode), 0 2px 0 rgba(0, 0, 0, .45);
    transform: skewX(var(--skew));
}
.lobby-header #lobby-mode-badge { margin: 0 auto 0 14px; }


/* --------------------------------------------------------------------------
   13b. Pool (8-ball) — HUD replacing the football scoreboard, event banner
        (game.js updatePoolHud / showPoolBanner; #game-screen.is-pool)
   -------------------------------------------------------------------------- */
.pool-hud { display: none; }
#game-screen.is-pool .game-topbar { display: none; }
#game-screen.is-pool .pool-hud {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px;
    width: min(1100px, calc(100% - 24px)); margin: 10px auto 6px; padding: 0;
}
.pool-side {
    --team: var(--red);
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px;
    min-width: 0; padding: 7px 14px 8px 18px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--team) 16%, transparent), var(--ink-2) 65%);
    border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: inset 4px 0 0 var(--team);
    transition: box-shadow var(--t), border-color var(--t), opacity var(--t);
    opacity: .72;
}
.pool-side.blue {
    --team: var(--blue); align-items: flex-end; padding: 7px 18px 8px 14px;
    background: linear-gradient(270deg, color-mix(in srgb, var(--team) 16%, transparent), var(--ink-2) 65%);
    box-shadow: inset -4px 0 0 var(--team);
}
.pool-side.is-turn { opacity: 1; border-color: var(--team); box-shadow: inset 4px 0 0 var(--team), 0 0 22px -4px color-mix(in srgb, var(--team) 70%, transparent); }
.pool-side.blue.is-turn { box-shadow: inset -4px 0 0 var(--team), 0 0 22px -4px color-mix(in srgb, var(--team) 70%, transparent); }
.pool-team { display: flex; align-items: baseline; gap: 10px; }
.pool-team-name { font: italic 800 18px/1 var(--f-display); letter-spacing: .04em; color: var(--fg-0); }
.pool-group { font: 700 11px/1 var(--f-display); letter-spacing: .14em; color: var(--team); padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--team) 55%, transparent); border-radius: 2px; background: rgba(0, 0, 0, .25); }
.pool-rack { display: flex; align-items: center; gap: 4px; min-height: 20px; flex-wrap: wrap; }
.pool-side.blue .pool-rack { justify-content: flex-end; }
.pb-none { font: 500 11.5px/1 var(--f-body); color: var(--fg-3); }
.pb-arrow { color: var(--fg-2); font-size: 12px; margin: 0 1px; }

/* mini balls (solids / stripes / 8) */
.pb {
    --c: #888; position: relative; display: inline-grid; place-items: center; flex: none;
    width: 19px; height: 19px; border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35)), var(--c);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    transition: opacity var(--t), transform var(--t), filter var(--t);
}
.pb.pb-stripe { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35)), linear-gradient(#F4F1E6 0 24%, var(--c) 24% 76%, #F4F1E6 76%); }
.pb i { font: normal 800 8.5px/1 var(--f-display); color: #111; width: 11px; height: 11px; display: grid; place-items: center; border-radius: 50%; background: #FBFAF4; }
.pb.is-potted { opacity: .22; filter: grayscale(.6); transform: scale(.82); }

/* centre: whose turn + shot clock */
.pool-center {
    --team: var(--fg-2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-width: 260px; padding: 8px 18px;
    background: var(--ink-0); border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: inset 0 -3px 0 var(--team);
}
.pool-center.red { --team: var(--red); }
.pool-center.blue { --team: var(--blue); }
.pool-turn-row { display: flex; align-items: center; gap: 12px; }
.pool-turn { font: italic 800 20px/1 var(--f-display); letter-spacing: .06em; color: var(--team); text-shadow: 0 0 14px color-mix(in srgb, var(--team) 60%, transparent); animation: pool-pulse 1.6s ease-in-out infinite; }
.pool-center.is-rolling .pool-turn { animation: none; opacity: .85; }
@keyframes pool-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.pool-clock {
    --pct: 1;
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    font: 800 13px/1 var(--f-display); color: var(--fg-0);
    background: radial-gradient(closest-side, var(--ink-0) 76%, transparent 78% 100%), conic-gradient(var(--lamp) calc(var(--pct) * 360deg), rgba(255, 255, 255, .08) 0);
}
.pool-clock.is-low { color: var(--bad); background: radial-gradient(closest-side, var(--ink-0) 76%, transparent 78% 100%), conic-gradient(var(--bad) calc(var(--pct) * 360deg), rgba(255, 255, 255, .08) 0); animation: pool-pulse .8s ease-in-out infinite; }
.pool-sub { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 18px; flex-wrap: wrap; }
.pool-shooter { font: 600 12.5px/1 var(--f-body); color: var(--fg-1); margin-right: 2px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-chip { font: 700 10.5px/1 var(--f-display); letter-spacing: .12em; padding: 4px 7px; border-radius: 2px; color: var(--fg-1); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); }
.pool-chip.is-hand { color: var(--gold-ink); background: var(--gold); border-color: var(--gold-hi); }
.pool-chip.is-roll { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }

/* event banner over the table */
.pool-banner {
    --team: var(--fg-2);
    position: absolute; left: 50%; top: 18%; z-index: 30; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 28px 14px; min-width: 280px; text-align: center;
    background: linear-gradient(180deg, rgba(8, 11, 28, .92), rgba(4, 5, 13, .92));
    border: 1px solid var(--line-strong); border-top: 3px solid var(--team); border-radius: var(--r);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 30px -8px color-mix(in srgb, var(--team) 60%, transparent);
    transform: translate(-50%, -10px) scale(.96); opacity: 0;
    transition: opacity var(--t), transform var(--t);
}
.pool-banner.is-in { transform: translate(-50%, 0) scale(1); opacity: 1; }
.pool-banner.team-red { --team: var(--red); }
.pool-banner.team-blue { --team: var(--blue); }
.pool-banner.kind-foul { --team: var(--gold); }
.pool-banner-kind { font: italic 800 26px/1 var(--f-display); letter-spacing: .08em; color: var(--team); }
.pool-banner.kind-foul .pool-banner-kind { color: var(--gold); }
.pool-banner.kind-win .pool-banner-kind { font-size: 34px; }
.pool-banner-text { font: 600 14px/1.3 var(--f-body); color: var(--fg-0); max-width: 520px; }
@media (max-width: 760px) {
    #game-screen.is-pool .pool-hud { grid-template-columns: 1fr 1fr; gap: 6px; width: calc(100% - 16px); }
    .pool-center { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
    .pool-team-name { font-size: 15px; }
    .pb { width: 15px; height: 15px; } .pb i { width: 9px; height: 9px; font-size: 7px; }
}

/* ==========================================================================
   13c. Headball (side-view head soccer) — the room swaps the top-down key
        hints for its own (A/D move, W jump, S fast-fall, X kick, E power).
        (game.js setRoomMode toggles #game-screen.is-headball + the hint)
   ========================================================================== */
#game-screen.is-headball .controls-info > span:not(#controls-headball):not(#controls-xtra) { display: none !important; }
/* soft touch + lob don't exist in Pool / Headball */
#game-screen.is-pool #controls-soft, #game-screen.is-pool #controls-lob,
#game-screen.is-pool .touch-btn-soft, #game-screen.is-pool .touch-btn-lob,
#game-screen.is-headball .touch-btn-soft, #game-screen.is-headball .touch-btn-lob { display: none !important; }
/* sprint (stamina) doesn't exist in Pool / Headball either */
#game-screen.is-pool #controls-sprint, #game-screen.is-pool .touch-btn-sprint,
#game-screen.is-headball .touch-btn-sprint { display: none !important; }
#controls-headball { color: #FFB27A; border-color: color-mix(in srgb, #FF7A1A 45%, transparent); }

/* ==========================================================================
   13d. Power HUD (Chaos + Headball): a compact bar in the top HUD row next to
        the scoreboard — never over the pitch (powerMatchRenderer.updateHud).
        The topbar becomes a 5-column grid so the scoreboard stays centred.
   ========================================================================== */
#game-screen .game-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); justify-items: stretch; }
#game-screen .game-topbar > .team-score.red { grid-column: 2; }
#game-screen .game-topbar > .game-timer { grid-column: 3; }
#game-screen .game-topbar > .team-score.blue { grid-column: 4; }
#game-screen.is-pool .game-topbar { display: none; }
/* REC pill (client-side replays): armed = dim, recording = red pulse; click stops & downloads */
.game-rec {
    grid-column: 1; justify-self: end; align-self: center; margin-right: 12px;
    height: 30px; padding: 0 12px; border-radius: var(--r); cursor: pointer;
    background: var(--ink-2); border: 1px solid var(--line-strong); color: var(--fg-2);
    font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.game-rec.hidden { display: none; }
/* Own match fitness (sprint system): small muted pill at the right end of the HUD row */
/* (left end of the column: the Lobby / settings buttons sit over the right end) */
#game-screen .game-topbar > .game-fit { grid-column: 5; grid-row: 1; justify-self: start; margin-left: 12px; }
.game-fit {
    align-self: center; height: 26px; padding: 0 9px; display: flex; align-items: center; gap: 5px;
    border-radius: var(--r); background: var(--ink-2); border: 1px solid var(--line);
    font: 700 10.5px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2);
    font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
}
.game-fit b { font-weight: 700; color: var(--fg-1); }
.game-fit.low b { color: #F5B942; }
.game-fit.hidden { display: none; }
.game-rec:hover { border-color: var(--fg-1); color: var(--fg-0); }
.game-rec.rec-live { color: #FF4655; border-color: rgba(255, 70, 85, .55); animation: nb-rec-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .game-rec.rec-live { animation: none; } }
.power-hud {
    --pw: #64C8FF;
    grid-column: 5; grid-row: 1; justify-self: start; align-self: center;
    display: grid; grid-template-columns: auto auto; grid-template-rows: auto 4px; align-items: center; column-gap: 7px; row-gap: 3px;
    height: 36px; min-width: 132px; max-width: 200px; margin-left: 12px; padding: 4px 10px 4px 8px; box-sizing: border-box;
    background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: inset 3px 0 0 var(--pw); pointer-events: none;
}
.power-hud.hidden { display: none; }
.power-hud .ph-icon { grid-row: 1 / 3; font-size: 18px; line-height: 1; }
.power-hud .ph-text { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.power-hud .ph-name { font: 700 12px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-0); overflow: hidden; text-overflow: ellipsis; }
.power-hud .ph-sub { font: 600 10.5px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.power-hud .ph-bar { grid-column: 2; height: 4px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.power-hud .ph-fill { display: block; height: 100%; width: 0; background: var(--pw); opacity: .75; transition: width .12s linear; }
.power-hud[data-state="ready"] { border-color: var(--pw); box-shadow: inset 3px 0 0 var(--pw), 0 0 10px color-mix(in srgb, var(--pw) 45%, transparent); }
.power-hud[data-state="ready"] .ph-name { color: var(--pw); }
.power-hud[data-state="ready"] .ph-sub { color: var(--fg-0); }
.power-hud[data-state="active"] .ph-name { color: var(--pw); }
.power-hud[data-state="cooldown"] .ph-name { color: var(--fg-2); }
body.is-mobile #game-screen .game-topbar { display: flex; }
body.is-mobile .power-hud { height: 26px; min-width: 0; margin-left: 4px; padding: 2px 8px 2px 6px; background: transparent; border: 0; }
body.is-mobile .power-hud .ph-sub { display: none; }

/* ==========================================================================
   13e. Mode options (create dialog + lobby: Futsal "Court size"...) and the
        admin "Mode" selector in the lobby (in-room mode switch).
   ========================================================================== */
.fm-options { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.fm-options.hidden { display: none; }
.fm-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-opt-label { font: 700 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.fm-opt-values { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.fm-opt-btn {
    margin: 0; padding: 7px 12px; border: 0; border-right: 1px solid var(--line); background: var(--bg-1); color: var(--fg-1);
    font: 700 12px/1 var(--f-display); letter-spacing: .04em; cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.fm-opt-btn:last-child { border-right: 0; }
.fm-opt-btn:hover:not(:disabled) { background: var(--bg-3); color: var(--fg-0); }
.fm-opt-btn.is-on { background: color-mix(in srgb, var(--orange) 22%, var(--bg-2)); color: var(--fg-0); box-shadow: inset 0 -2px 0 var(--orange); }
.fm-opt-btn:disabled { cursor: default; opacity: .6; }
.fm-opt-btn.is-on:disabled { opacity: .9; }
#setting-mode-opts .fm-opt-label { display: none; }
#setting-mode-opts .fm-opt-btn { padding: 6px 9px; font-size: 11px; }
.setting-item.hidden { display: none !important; }
.sel-room-mode { width: auto; min-width: 116px; height: 34px; padding: 0 28px 0 10px; font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: .03em; }

/* Chat: staff nick colour only (developer green is .nb-dev-name) */
.chat-sender.nb-staff-name { color: var(--orange-hi) !important; }
.chat-sender.nb-player-name { color: var(--fg-1); }
.chat-sender.nb-system-name { color: var(--fg-2); }

/* --------------------------------------------------------------------------
   Social sidebar: REPORTS (developers) + invisible mode (developers / admins)
   -------------------------------------------------------------------------- */
.sp-invisible-note {
    margin: 0 auto 0 10px; padding: 3px 7px; border-radius: 3px; white-space: nowrap;
    font: 700 10px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase;
    color: var(--fg-1); border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, .03);
}
.sp-invisible-note[hidden], .sp-eye-btn[hidden] { display: none; }
.sp-eye-btn.is-on { color: var(--cyan); background: rgba(34, 229, 255, .10); }
.social-panel.is-invisible .sp-head::before { background: var(--fg-3); box-shadow: none; }

.sp-sec--reports .sp-sec-label { color: var(--orange-hi); }
.sp-rep { border-bottom: 1px solid var(--line); }
.sp-rep.is-open { background: rgba(255, 255, 255, .03); }
.sp-rep-head {
    display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0; padding: 9px 14px 9px 16px;
    background: none; border: 0; color: inherit; text-align: left; cursor: pointer;
}
.sp-rep-head:hover { background: rgba(255, 255, 255, .04); }
.sp-rep-head:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.sp-rep-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sp-rep-type {
    flex: none; padding: 3px 5px; border-radius: 3px; border: 1px solid currentColor;
    font: 700 9px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase;
}
.sp-rep-type--bug { color: var(--red); }
.sp-rep-type--feedback { color: var(--cyan); }
.sp-rep-type--cheater { color: var(--gold); }
.sp-rep-user { font: 700 13px/1.2 var(--f-body); color: var(--fg-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-rep-mode { font: 500 12px/1.2 var(--f-body); color: var(--fg-2); white-space: nowrap; }
.sp-rep-time { margin-left: auto; padding-left: 6px; flex: none; font: 500 11px/1 var(--f-body); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.sp-rep-first { font: 500 12px/1.4 var(--f-body); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-rep.is-open .sp-rep-first { display: none; }
.sp-rep-detail { padding: 0 14px 12px 16px; }
.sp-rep-msg { margin: 0 0 8px; font: 500 13px/1.45 var(--f-body); color: var(--fg-0); white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-rep-mail { margin: 0 0 8px; font: 500 12px/1.4 var(--f-body); color: var(--fg-2); }
.sp-rep-mail a { color: var(--cyan); }
.sp-rep-ctx { margin: 0 0 10px; display: grid; gap: 3px; font: 500 11px/1.35 var(--f-body); }
.sp-rep-ctx > div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.sp-rep-ctx dt { color: var(--fg-3); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; padding-top: 1px; }
.sp-rep-ctx dd { margin: 0; color: var(--fg-1); overflow-wrap: anywhere; }
.sp-rep-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-rep-id { font: 600 11px/1 var(--f-body); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.sp-toast.is-report { border-left-color: var(--red); }
.sp-toast.is-report .sp-toast-from { font-weight: 500; gap: 4px; }

/* --------------------------------------------------------------------------
   Report a bug / Feedback modal (feedback.js)
   -------------------------------------------------------------------------- */
#report-modal { z-index: 10002; }
.report-modal { width: min(520px, calc(100vw - 32px)); max-width: none; overflow-y: auto; }
.report-types { display: flex; flex-wrap: wrap; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.report-types legend.report-label {
    float: left; width: 100%; margin: 0 0 8px; padding: 0;
    font: 700 11px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2);
}
.report-type { position: relative; margin: 0; cursor: pointer; }
.report-type input { position: absolute; opacity: 0; pointer-events: none; }
.report-type span {
    display: block; padding: 9px 14px; border: 1px solid var(--line-strong); margin-right: -1px; background: var(--bg-1); color: var(--fg-1);
    font: 700 13px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; transition: background var(--t-fast), color var(--t-fast);
}
.report-type:first-of-type span { border-radius: var(--r) 0 0 var(--r); }
.report-type:last-of-type span { border-radius: 0 var(--r) var(--r) 0; }
.report-type:hover span { background: var(--bg-3); color: var(--fg-0); }
.report-type input:checked + span { background: color-mix(in srgb, var(--orange) 22%, var(--bg-2)); color: var(--fg-0); box-shadow: inset 0 -2px 0 var(--orange); }
.report-type input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: -2px; }
.report-message { width: 100%; min-height: 96px; resize: vertical; padding: 10px 12px; line-height: 1.45; box-sizing: border-box; }
.report-count { margin-top: 4px; text-align: right; font: 500 11px/1 var(--f-body); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.report-count.is-full { color: var(--gold); }
#report-email { width: 100%; box-sizing: border-box; }
.report-context { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0, 0, 0, .18); }
.report-context summary { padding: 8px 12px; cursor: pointer; font: 700 11px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.report-context dl { margin: 0; padding: 0 12px 10px; display: grid; gap: 2px; font: 500 12px/1.35 var(--f-body); }
.report-ctx-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.report-ctx-row dt { color: var(--fg-3); }
.report-ctx-row dd { margin: 0; color: var(--fg-1); overflow-wrap: anywhere; }
.report-status:empty { display: none; }
.report-status { margin: 0 0 10px; font: 600 13px/1.4 var(--f-body); color: var(--fg-2); }
.report-status.is-ok { color: var(--ok); }
.report-status.is-error { color: var(--red); }
@media (max-width: 480px) {
    .report-type span { padding: 8px 10px; font-size: 12px; }
    .report-ctx-row { grid-template-columns: 72px 1fr; }
}

/* --------------------------------------------------------------------------
   Social sidebar — room invites (Invite to room, INVITE picker, Room invites, toast)
   -------------------------------------------------------------------------- */
.sp-sec-h.has-extra { display: flex; align-items: center; padding-right: 10px; }
.sp-sec-h.has-extra .sp-sec-head { flex: 1; min-width: 0; }
.sp-sec-extra { flex: none; height: 22px; padding: 0 8px; gap: 4px; }
.sp-sec-extra svg { width: 13px; height: 13px; }
.sp-sec-extra.is-on { border-color: var(--orange); color: var(--orange-hi); }
.sp-invite-btn { flex: none; gap: 4px; padding: 0 7px; }
.sp-invite-btn svg { width: 13px; height: 13px; }
.sp-invite-btn.is-disabled, .sp-invite-btn.is-disabled:hover { opacity: .45; cursor: not-allowed; background: var(--ink-3); border-color: var(--line); }
.sp-join-btn { flex: none; padding: 0 8px; border-color: var(--cyan); color: var(--cyan); }
.sp-join-btn:hover { background: rgba(0, 229, 255, .12); border-color: var(--cyan); }
.sp-menu-item.is-disabled { opacity: .5; cursor: not-allowed; }
.sp-menu-item.is-disabled:hover { background: transparent; color: inherit; }
.sp-menu-note { margin-left: auto; font: 500 10px/1 var(--f-body); color: var(--fg-3); white-space: nowrap; }
.sp-subhead { padding: 8px 12px 4px; font: italic 800 10px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.sp-picker { margin: 2px 8px 8px; padding: 4px 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--ink-2); }
.sp-picker-title { padding: 6px 10px 6px; font: 500 12px/1.3 var(--f-body); color: var(--fg-2); border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-picker-title strong { color: var(--fg-0); }
.sp-picker .sp-hint { margin: 8px 10px; }
.sp-pick-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 10px; min-height: 38px; }
.sp-pick-row + .sp-pick-row { border-top: 1px solid var(--line); }
.sp-pick-row .sp-row-name { font-size: 13px; }
.sp-row--roominv .sp-row-sub { font-variant-numeric: tabular-nums; }
.sp-toast--roominv { gap: 8px; }
.sp-toast--roominv .sp-toast-body { color: var(--fg-0); -webkit-line-clamp: 3; }
.sp-toast--roominv em { font-style: italic; color: var(--orange-hi); }
.sp-toast-actions { display: flex; gap: 6px; }

/* ==========================================================================
   Hero: RANKED / MATCH (two lines, same condensed italic as the old PLAY)
   ========================================================================== */
.play-btn-hero .play-title.play-title-ranked {
    display: flex; flex-direction: column; align-items: flex-start;
    font-size: clamp(64px, 8.4vw, 132px) !important; line-height: .84 !important;
}
.play-btn-hero .play-title-ranked span { display: block; white-space: nowrap; }
@media (max-width: 700px) {
    .play-btn-hero .play-title.play-title-ranked { font-size: clamp(52px, 17vw, 92px) !important; }
}

/* ==========================================================================
   Guest sign-up nudge (bottom-left card) + user bar hint + welcome toast
   ========================================================================== */
.user-name-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.user-guest-hint {
    all: unset; cursor: pointer;
    font: 700 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--orange, #FF7A1A);
    white-space: nowrap;
}
.user-guest-hint:hover, .user-guest-hint:focus-visible { color: #FFD0A0; text-decoration: underline; }
.user-guest-hint.hidden { display: none !important; }

.signup-nudge {
    position: fixed; left: 16px; bottom: 16px; z-index: 40; width: 300px; max-width: calc(100vw - 32px);
    padding: 14px 16px 14px 18px;
    background: linear-gradient(135deg, rgba(22, 28, 69, .97), rgba(10, 13, 34, .97));
    border: 1px solid var(--line-strong, rgba(255, 255, 255, .18)); border-left: 3px solid var(--orange, #FF7A1A); border-radius: 3px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .45), 0 0 28px rgba(255, 122, 26, .18);
    display: grid; gap: 8px; justify-items: start;
    animation: nb-nudge-in 380ms cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes nb-nudge-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.signup-nudge-kicker { font: 700 10px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan, #22E5FF); }
.signup-nudge-text { margin: 0; padding-right: 14px; font: 500 13px/1.4 var(--f-body); color: var(--fg-1, #C9CEE8); }
.signup-nudge-text b { color: var(--fg-0, #fff); }
.signup-nudge-title { color: #FFE2C2 !important; text-shadow: 0 0 6px rgba(255, 138, 42, .9); letter-spacing: .04em; }
.signup-nudge-btn { margin-top: 2px; }
.signup-nudge-x {
    all: unset; position: absolute; top: 6px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; cursor: pointer;
    font: 400 18px/1 var(--f-body); color: var(--fg-2, #8C93B8); border-radius: 2px;
}
.signup-nudge-x:hover, .signup-nudge-x:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); }
.signup-nudge.hidden { display: none !important; }
#main-menu .menu-container > .signup-nudge { width: 300px; margin: 0; }
@media (max-width: 700px) {
    #main-menu .menu-container > .signup-nudge { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 10px 12px 12px 14px; gap: 6px; }
    .signup-nudge-kicker { display: none; }
    .signup-nudge-text { font-size: 12px; }
}

.nb-welcome-toast {
    position: fixed; left: 50%; top: 18px; z-index: 10050; transform: translate(-50%, -20px); opacity: 0;
    display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
    padding: 12px 18px; border-radius: 3px;
    background: linear-gradient(90deg, rgba(34, 22, 12, .97), rgba(22, 28, 69, .97));
    border: 1px solid rgba(255, 138, 42, .65); box-shadow: 0 0 28px rgba(255, 122, 26, .35);
    font: 700 14px/1.3 var(--f-body); color: #FFF4E8;
    transition: opacity 300ms, transform 300ms cubic-bezier(.2, .8, .2, 1);
}
.nb-welcome-toast.show { opacity: 1; transform: translate(-50%, 0); }
.nb-welcome-toast-icon { font-size: 20px; }

/* FIRST WHISTLE (beta) — white-orange neon */
.title-neon-beta {
    color: #FFF4E8 !important;
    background: rgba(255, 138, 42, .10);
    border-color: rgba(255, 138, 42, .75) !important;
    text-shadow: 0 0 3px #FFFFFF, 0 0 8px rgba(255, 170, 90, .95), 0 0 16px rgba(255, 122, 26, .75);
    box-shadow: 0 0 12px -2px rgba(255, 122, 26, .65), inset 0 0 6px rgba(255, 200, 150, .15);
    animation: nb-title-beta-flicker 4.5s ease-in-out infinite;
}
.title-card .title-neon-beta { background: none; border: 0; box-shadow: none; }
@keyframes nb-title-beta-flicker {
    0%, 100% { text-shadow: 0 0 3px #FFFFFF, 0 0 8px rgba(255, 170, 90, .95), 0 0 16px rgba(255, 122, 26, .75); }
    50% { text-shadow: 0 0 2px #FFFFFF, 0 0 5px rgba(255, 170, 90, .7), 0 0 11px rgba(255, 122, 26, .5); }
}
@media (prefers-reduced-motion: reduce) { .title-neon-beta { animation: none; } }

/* ---- Bot match dialog: centred modal on desktop, bottom sheet only on phones ---- */
@media (min-width: 701px) {
    .bot-setup { align-items: center; padding: 24px; }
    .bot-setup-sheet {
        border-bottom: 1px solid var(--line-strong) !important;
        border-radius: var(--r-lg) !important;
        padding: 6px 24px 22px !important;
        max-height: min(88vh, 720px);
        transform: translateY(16px) scale(.98);
        opacity: 0;
        transition: transform .22s cubic-bezier(.2, .85, .25, 1), opacity .18s;
        box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    }
    .bot-setup.open .bot-setup-sheet { transform: none; opacity: 1; }
    .bot-setup-grab { display: none; }
}


/* ==========================================================================
   14. BROADCAST (v4) — final layer over the carried-over sections above
       (social sidebar, fan modes, pool / headball / power HUDs, nudges,
       ads). Loaded last in this file; prestige-title neon is left alone
       on purpose — those are cosmetics players earn/buy.
   ========================================================================== */

/* ---- Backdrop: the arena, pushed far back ---- */
.menu-bg { background: var(--bg-0) !important; }
.menu-bg .menu-bg-art { display: block !important; position: absolute; inset: 0; background: url('art/bg-arena.jpg') center 30% / cover no-repeat; opacity: .55; filter: saturate(.9); animation: none; transform: none; }
.menu-bg .menu-bg-tint { display: block !important; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 17, 21, .55) 0%, rgba(15, 17, 21, .78) 45%, rgba(15, 17, 21, .96) 80%, #0F1115 100%); }
.header-top { background: rgba(15, 17, 21, .88) !important; }

/* ---- Hero: RANKED / MATCH ---- */
.play-btn-hero .play-content { padding: 0 260px 24px 26px !important; }
.play-btn-hero .play-title.play-title-ranked { display: flex; flex-direction: column; align-items: flex-start; font: italic 700 clamp(52px, 6vw, 92px)/.84 var(--f-display) !important; letter-spacing: -.035em; text-shadow: none !important; }
.play-btn-hero .play-title-ranked span { display: block; white-space: nowrap; }
.play-btn-hero .play-title-ranked span + span { color: var(--orange); }
.play-btn-hero .play-subtitle { margin-bottom: 10px !important; }
@media (max-width: 700px) {
    .play-btn-hero .play-content { padding: 0 18px 88px 18px !important; }
    .play-btn-hero .play-title.play-title-ranked { font-size: clamp(44px, 14vw, 72px) !important; }
}

/* ---- Buttons carrying legacy gradients ---- */
.btn-primary, .auth-submit, .btn-success, .btn-real-match, .btn-power-match, .banner-actions .btn-buy, .title-actions .btn-equip, .user-actions .btn-primary, .sp-btn--lamp {
    background: var(--orange) !important; color: var(--orange-ink) !important; border: 0 !important; box-shadow: none !important; transform: none !important; font-style: normal !important;
}
.btn-primary:hover, .auth-submit:hover, .banner-actions .btn-buy:hover, .sp-btn--lamp:hover { background: var(--orange-hi) !important; }
.title-actions .btn-equip { background: var(--fg-0) !important; color: var(--bg-0) !important; }
.title-actions .btn-equipped { background: transparent !important; color: var(--fg-1) !important; border: 1px solid var(--line-strong) !important; }
.btn:hover, .sp-btn:hover { box-shadow: none !important; transform: none !important; }

/* ---- Top-bar social toggle ---- */
.btn-social { height: 34px; padding: 0 12px; background: transparent !important; border: 0 !important; color: var(--fg-2) !important; font: 700 12px/1 var(--f-display) !important; letter-spacing: .06em; transform: none !important; box-shadow: none !important; border-radius: var(--r); }
.btn-social > * { transform: none !important; }
.btn-social:hover { background: var(--bg-2) !important; color: var(--fg-0) !important; }
.btn-social.is-active { background: var(--bg-3) !important; color: var(--fg-0) !important; }
.btn-social-count, .btn-social.is-active .btn-social-count { color: var(--ok) !important; }
.btn-social .btn-social-badge { transform: none !important; }

/* ---- Social sidebar ---- */
.social-panel { top: 56px; background: var(--bg-1) !important; border-left: 1px solid var(--line) !important; box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .9) !important; }
body.social-on-lobby .social-panel { top: 0; }
.sp-head { height: 50px; background: var(--bg-1) !important; border-bottom: 1px solid var(--line) !important; }
.sp-head::before { content: none !important; }
.sp-title { font: 700 16px/1 var(--f-display) !important; letter-spacing: .08em !important; font-style: normal !important; }
.sp-sec-head { font: 700 11px/1 var(--f-body) !important; letter-spacing: .14em !important; font-style: normal !important; }
.sp-sec-head:hover { background: var(--bg-2) !important; }
.sp-sec--developers .sp-sec-label { color: var(--ok) !important; }
.sp-sec--players .sp-sec-label { color: var(--fg-1) !important; }
.sp-guest-title { font: 700 18px/1.1 var(--f-display) !important; font-style: normal !important; }
.sp-btn { transform: none !important; font-style: normal !important; border-radius: var(--r) !important; background: var(--bg-3) !important; border: 0 !important; }
.sp-btn > * { transform: none !important; }
.sp-btn--ghost { background: transparent !important; }
.sp-btn--ghost:hover, .sp-btn:hover { background: var(--bg-4) !important; }
/* primary actions (Join / Accept): the orange lamp, not the flat grey above */
.sp-btn.sp-btn--lamp { background: var(--orange) !important; color: var(--orange-ink) !important; font-weight: 800; }
.sp-btn.sp-btn--lamp:hover { background: var(--orange-hi) !important; }
.sp-btn.sp-btn--lamp:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 2px; }
.sp-badge { background: var(--orange) !important; color: var(--orange-ink) !important; }
.sp-row { border-bottom: 1px solid var(--line) !important; }
.sp-row:hover, .sp-row.is-menu-open, .sp-row:focus-within { background: var(--bg-2) !important; }
.sp-row--invite { background: rgba(255, 106, 19, .06) !important; }
.sp-row.is-ingame .sp-row-sub, .sp-row.is-queue .sp-row-sub { color: var(--orange-hi) !important; }
.sp-menu { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.sp-msg-body { background: var(--bg-2) !important; border: 0 !important; }
.sp-msg.is-mine .sp-msg-body { background: var(--bg-3) !important; }
.sp-toast { background: var(--bg-2) !important; border: 0 !important; border-left: 3px solid var(--fg-3) !important; border-radius: var(--r) !important; }
.sp-toast.is-ok { border-left-color: var(--ok) !important; } .sp-toast.is-error { border-left-color: var(--bad) !important; }
.sp-toast.is-invite, .sp-toast.is-dm { border-left-color: var(--orange) !important; }
.sp-eye-btn.is-on { color: var(--orange) !important; background: rgba(255, 106, 19, .1) !important; }
.sp-join-btn { border-color: var(--line-strong) !important; color: var(--fg-0) !important; }
.sp-join-btn:hover { background: var(--bg-3) !important; }
.sp-rep-type--feedback, .sp-rep-mail a { color: var(--fg-1) !important; }
.nb-dev-pill { border-radius: 2px; }

/* ---- Hero slider caption (menu-pitch.js) — keep the slider, quiet the chrome ---- */
.hero-demo { right: 18px !important; top: 14px !important; bottom: auto !important; gap: 6px !important; }
.hero-demo-name { height: auto !important; padding: 0 !important; background: none !important; border: 0 !important; clip-path: none !important; font: 700 11px/1 var(--f-body) !important; letter-spacing: .16em !important; color: var(--fg-0) !important; font-style: normal !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.hero-demo-name i { color: var(--fg-1) !important; font-style: normal !important; }
.hero-demo-name i::before { background: var(--red) !important; box-shadow: none !important; }
.hero-demo-dots i { width: 5px !important; height: 3px !important; background: rgba(255, 255, 255, .35) !important; transform: none !important; box-shadow: none !important; }
.hero-demo-dots i.on { width: 14px !important; background: var(--fg-0) !important; }

/* ---- Fan-mode tiles (modes.js) ---- */
.fm-grid-card .action-art { background-color: var(--bg-2) !important; background-position: center !important; }
.secondary-actions .action-btn { padding: 0 !important; min-height: 0 !important; }
.secondary-actions .action-text h3 { font-size: 15px !important; }
.secondary-actions .action-text p { font-size: 11.5px !important; margin-top: 3px !important; }
.secondary-actions .action-btn .new-badge-floating { top: 10px !important; left: 10px !important; right: auto !important; }
.fm-grid-card .new-badge-floating { color: var(--orange-ink) !important; }
@media (max-width: 900px) { .secondary-actions .action-btn { min-height: 0 !important; } }

/* Mode picker / modes modal / badges */
.fm-card { background: var(--bg-2) !important; border: 0 !important; border-radius: var(--r) !important; }
.fm-card::before { box-shadow: none !important; }
.fm-card:hover { background: var(--bg-3) !important; }
.fm-card.is-selected { background: var(--bg-3) !important; box-shadow: inset 0 0 0 1px var(--fg-0) !important; }
.fm-card-name { font: 700 14px/1.1 var(--f-display) !important; font-style: normal !important; }
.fm-row { background: var(--bg-2) !important; border: 0 !important; }
.fm-row::before { box-shadow: none !important; }
.fm-row-text h3 { font: 700 16px/1 var(--f-display) !important; font-style: normal !important; }
.fm-room { background: var(--bg-1) !important; }
[class*="fm-badge"], .mode-badge, .room-mode-badge { transform: none !important; box-shadow: none !important; font-style: normal !important; }

/* ---- Pool / power HUD panels ---- */
.pool-side { background: var(--bg-1) !important; border: 0 !important; box-shadow: inset 3px 0 0 var(--team) !important; }
.power-hud { box-shadow: none !important; background: var(--bg-1) !important; border: 0 !important; }
.pool-banner-kind { font-style: normal !important; }
.pool-banner { background: rgba(15, 17, 21, .92) !important; border: 0 !important; border-top: 3px solid var(--orange) !important; border-bottom: 3px solid var(--orange) !important; }

/* ---- Staff tag in the lobby ---- */
.lobby-staff-tag { transform: none !important; box-shadow: none !important; font-style: normal !important; border-radius: 3px !important; }

/* ---- Guest sign-up nudge + welcome toast ---- */
.signup-nudge { background: var(--bg-1) !important; border: 0 !important; border-left: 3px solid var(--orange) !important; border-radius: var(--r-lg) !important; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9) !important; }
.signup-nudge-kicker { color: var(--fg-2) !important; }
.signup-nudge-title { color: var(--orange) !important; text-shadow: none !important; }
.user-guest-hint { color: var(--orange) !important; }
.nb-welcome-toast { background: var(--bg-2) !important; border: 0 !important; border-left: 3px solid var(--orange) !important; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9) !important; color: var(--fg-0) !important; }

/* ---- Report / feedback modal ---- */
.report-type span { border-radius: var(--r) !important; }

/* ---- Bot match dialog ---- */
@media (min-width: 701px) { .bot-setup-sheet { border: 0 !important; border-radius: var(--r-lg) !important; } }

/* ---- Ads, daily reward, consent, ad break (ads.css loads after this file) ---- */
body .nb-ad { clip-path: none !important; border-radius: var(--r-lg) !important; background: rgba(21, 24, 29, .92) !important; border: 0 !important; }
body .nb-ad-ph { font-style: normal !important; border-color: var(--line-strong) !important; background: var(--bg-2) !important; color: var(--fg-3) !important; }
body .shop-ad-offer { background: var(--bg-2) !important; border: 0 !important; clip-path: none !important; box-shadow: none !important; }
body .btn-daily-reward { background: var(--bg-2) !important; color: var(--gold) !important; border: 0 !important; box-shadow: none !important; transform: none !important; font-style: normal !important; border-radius: var(--r) !important; }
body .btn-daily-reward:hover:not(:disabled) { background: var(--bg-3) !important; filter: none !important; box-shadow: none !important; }
body .nb-consent-btn { transform: none !important; font-style: normal !important; border-radius: var(--r) !important; box-shadow: none !important; }
body .nb-consent-btn > span { transform: none !important; }
body .nb-consent-btn--accept { background: var(--orange) !important; color: var(--orange-ink) !important; border-color: var(--orange) !important; }
body .nb-adbreak-box b { font-style: normal !important; }
body .nb-adbreak-bar i { background: var(--orange) !important; }

/* ---- Last guards: no slants, no chamfers anywhere in the menus ---- */
.btn, .tab-btn, .new-badge-inline, .new-badge-floating, .update-badge, .beta-tag, .tag, .staff-badge, .shop-balance, .user-info, .play-badge, .rank-position, .top-player-rank { transform: none !important; }
.btn > *, .play-badge > * { transform: none !important; }
.play-btn-hero .play-badge, .play-btn-row .play-badge { top: auto !important; left: auto !important; }
.play-btn-hero .play-title.play-title-ranked { font-size: clamp(48px, 5.4vw, 84px) !important; }
.play-btn-row .play-content { display: block !important; padding: 0 120px 12px 14px !important; }
.play-btn-hero .play-content, .play-btn-row .play-content, .play-btn-hero .play-title, .play-btn-hero .play-subtitle { text-align: left !important; }
.user-actions .btn, .btn-friends, .btn-shop, .btn-inventory, .btn-settings { border: 0 !important; }
.inventory-tabs .tab-btn, .inventory-tabs .tab-btn.active { flex: 0 0 auto !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; height: 38px; padding: 0 14px !important; }
.inventory-tabs .tab-btn { color: var(--fg-2) !important; } .inventory-tabs .tab-btn.active { color: var(--fg-0) !important; }

/* ---- Bot level picker (Bot Match dialog + in-room "Add bot" chooser) ---- */
.bot-opt.bot-level { flex-direction: column; gap: 5px; height: auto; min-height: 56px; padding: 9px 6px; }
.bot-level-sub { font: 600 10px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.bot-opt.bot-level.active .bot-level-sub { color: var(--fg-3); }
.bot-level[data-value="hard"] .bot-level-sub { color: var(--orange); }
.bot-opt.bot-level[data-value="hard"].active .bot-level-sub { color: var(--orange-lo); }
.bot-add { z-index: 10000; }
.bot-add .bot-add-sheet { max-width: 420px; }
.bot-add-team { margin-left: 6px; }
.bot-add-team-red { color: var(--red); }
.bot-add-team-blue { color: var(--blue); }
.bot-style { margin-left: 6px; padding: 1px 5px; border-radius: 3px; background: var(--bg-3); color: var(--fg-2); font: 700 9.5px/1.4 var(--f-body); letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }
.bot-count { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bot-count-btn { width: 40px; height: 40px; border: 0; border-radius: var(--r); background: var(--bg-2); color: var(--fg-0); font: 700 20px/1 var(--f-body); cursor: pointer; }
.bot-count-btn:hover { background: var(--bg-3); }
.bot-count-input { width: 64px !important; height: 40px; text-align: center; font: 700 18px/1 var(--f-body); -moz-appearance: textfield; }
.bot-count-input::-webkit-outer-spin-button, .bot-count-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bot-count-quick { display: flex; gap: 4px; margin-left: auto; }
.bot-count-q { min-width: 40px; height: 32px; border: 0; border-radius: var(--r); background: var(--bg-2); color: var(--fg-2); font: 700 13px/1 var(--f-body); cursor: pointer; }
.bot-count-q:hover { background: var(--bg-3); color: var(--fg-0); }
.bot-add .bot-setup-actions { margin-top: 6px; }

/* ==========================================================================
   BRAND v1 — KICK mark + single-colour wordmark (overrides earlier logo rules)
   ========================================================================== */
.logo, .auth-logo :is(h1,.nb-h1) { display: inline-flex !important; align-items: center; gap: .36em !important; color: var(--fg-0) !important; font-style: normal !important; letter-spacing: .01em !important; }
.logo .logo-word, .auth-logo :is(h1,.nb-h1) .logo-word { color: var(--fg-0) !important; font-family: var(--f-display); font-weight: 700; }
.logo-mark { display: inline-flex; flex: none; width: 1.2em !important; height: 1.2em !important; color: var(--fg-0) !important; filter: none !important; }
.logo-mark svg { width: 100%; height: 100%; animation: none !important; }
.menu-header .logo .beta-tag { margin-left: .1em; }
.loading-content .logo { font: 700 44px/1 var(--f-display) !important; }
.loading-content .logo-glow { filter: none !important; }
.auth-logo :is(h1,.nb-h1) { gap: .32em !important; }
:is(h1,div).logo span.logo-word:not(.beta-tag):not(.logo-mark), .auth-logo :is(h1,.nb-h1) span.logo-word:not(.logo-mark) { color: var(--fg-0) !important; }

/* Settings: curve mode (tap to arm / hold) */
.curve-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 4px; }
.curve-mode-opts { display: inline-flex; gap: 6px; }
.curve-mode-opt { background: var(--bg-3, #1c212b) !important; color: var(--fg-2, #9aa3b2) !important; border: 1px solid var(--line, rgba(255,255,255,.1)) !important; }
.curve-mode-opt.on { background: var(--orange, #ff7a1a) !important; color: #fff !important; border-color: transparent !important; }
.curve-mode-help { margin: 2px 0 12px; font-size: 12px; color: var(--fg-2, #9aa3b2); }

/* Sprint / stamina exists only in Real Match: hide its key hint and mobile button elsewhere */
#game-screen:not(.has-stamina) #controls-sprint, #game-screen:not(.has-stamina) .touch-btn-sprint { display: none !important; }

/* Home tiles: Browse + Create Room lead the right column, Bot Match is a compact row below */
body:not(.is-offline) .main-actions { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; }
#btn-browse { grid-column: 5 / 7; grid-row: 1; min-height: 150px !important; }
#btn-create { grid-column: 5 / 7; grid-row: 2; min-height: 150px !important; }
body:not(.is-offline) #btn-play-bots { grid-column: 5 / 7; grid-row: 3; min-height: 76px !important; }
body:not(.is-offline) #btn-play-bots .play-subtitle { -webkit-line-clamp: 1; }
body:not(.is-offline) #btn-play-bots .play-title { font-size: 13px !important; }
body:not(.is-offline) #btn-play-bots .play-badge { height: 26px; bottom: 50%; transform: translateY(50%); }
body:not(.is-offline) #btn-play-bots .play-content { padding: 0 110px 14px 16px; }
.main-actions::before { grid-row: 4; }
#btn-real-match, #btn-power-match { grid-row: 5; }
@media (max-width: 1100px) {
    body:not(.is-offline) .main-actions { grid-template-rows: none; }
    #btn-browse { grid-column: 1 / 3; grid-row: 2; } #btn-create { grid-column: 3 / 5; grid-row: 2; }
    body:not(.is-offline) #btn-play-bots { grid-column: 1 / 5; grid-row: 3; }
}
@media (max-width: 640px) {
    #btn-browse { grid-column: 1; grid-row: 2; } #btn-create { grid-column: 2; grid-row: 2; }
    body:not(.is-offline) #btn-play-bots { grid-column: 1 / 3; grid-row: 3; }
}
body:not(.is-offline) #btn-play-bots .play-art { opacity: .35; }
@media (max-width: 640px) { #btn-browse, #btn-create { min-height: 120px !important; } }

/* Developer status in the social panel: "Developing..." with animated dots */
/* Presence: busy (red dot) + my status picker in the social header */
.sp-dot--online.sp-dot--dnd { background: var(--red); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .28); }
.sp-status { position: relative; display: flex; align-items: center; margin-right: 2px; }
.sp-status[hidden] { display: none; }
.sp-status-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: var(--r);
    background: transparent; border: 1px solid var(--line); color: var(--fg-1); cursor: pointer;
    font: 600 12px/1 var(--f-body); transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.sp-status-btn:hover, .sp-status-btn[aria-expanded="true"] { background: var(--ink-3); color: var(--fg-0); }
.sp-status-btn svg { color: var(--fg-3); flex: none; }
.sp-status-btn.is-busy { border-color: rgba(224, 50, 46, .45); }
.sp-status-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; width: 232px; padding: 4px;
    background: var(--bg-2, var(--ink-2)); border: 1px solid var(--line-strong); border-radius: var(--r);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
}
.sp-status-menu[hidden], .sp-status-opt[hidden] { display: none; }
.sp-status-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 1px;
    background: transparent; color: var(--fg-1); cursor: pointer; text-align: left;
    transition: background var(--t-fast), color var(--t-fast);
}
.sp-status-opt:hover, .sp-status-opt:focus-visible { background: var(--ink-3); color: var(--fg-0); outline-offset: -2px; }
.sp-status-opt.is-on { background: rgba(255, 255, 255, .04); color: var(--fg-0); }
.sp-status-opt.is-on b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: middle; border-radius: 50%; background: var(--lamp, var(--ok)); }
.sp-status-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-status-opt-txt b { font: 700 13px/1 var(--f-body); }
.sp-status-opt-txt small { font: 500 11px/1.2 var(--f-body); color: var(--fg-3); }
.sp-status-opt .sp-dot { width: 10px; height: 10px; }

/* Developers / admins: invisible watching bar (game.js renderGhostBar) */
.nb-ghost-bar {
    /* first item of the room tools row (top right): clear of the scoreboard */
    position: static; height: 40px; box-sizing: border-box;
    display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px;
    background: var(--bg-1); border: 1px solid transparent; border-radius: var(--r, 4px);
    color: var(--fg-1); font: 600 12px/1 var(--f-body); box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.nb-ghost-bar[hidden] { display: none; }
/* phones: the top left holds the chat / zoom buttons -> bottom middle, between the joystick and the buttons */
@media (max-width: 1200px) { .nb-ghost-bar:not(.in-lobby) .nb-ghost-text { display: none; } }
.nb-ghost-bar.in-lobby { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 9000; }
body.is-mobile .nb-ghost-bar { position: fixed; z-index: 9000; height: auto; top: auto; bottom: calc(var(--safe-bottom, 0px) + 8px); left: 50%; transform: translateX(-50%); gap: 8px; padding: 4px 4px 4px 10px; font-size: 11px; opacity: .9; }
body.is-mobile .nb-ghost-bar .nb-ghost-btn { height: 24px; padding: 0 10px; font-size: 10px; }
.nb-ghost-bar.is-ghost { border-color: rgba(255, 106, 19, .55); }
.nb-ghost-eye { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.nb-ghost-bar.is-ghost .nb-ghost-eye { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 19, .2); }
.nb-ghost-btn {
    height: 28px; padding: 0 10px; border: 0; border-radius: var(--r, 4px); cursor: pointer;
    background: var(--bg-3); color: var(--fg-0); font: 700 11px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
}
.nb-ghost-btn:hover { background: var(--bg-4); }
.nb-ghost-bar.is-ghost .nb-ghost-btn { background: var(--orange); color: var(--orange-ink); }
.btn-watch { margin-right: 6px; }

/* Chat command suggestions (chatcmds.js) */
.cc-box {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 60;
    max-height: 260px; overflow-y: auto; padding: 4px;
    background: var(--bg-1, #15181D); border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r, 4px);
    box-shadow: 0 16px 40px -16px rgba(0,0,0,.8);
    font: 500 13px/1.3 var(--f-body, 'Exo 2', system-ui, sans-serif); color: var(--fg-1, #DDE0E6);
}
.cc-box[hidden] { display: none; }
.cc-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 3px; cursor: pointer; }
.cc-row.is-sel, .cc-row:not(.is-hint):hover { background: var(--bg-3, #242932); }
.cc-row.is-hint { cursor: default; }
.cc-cmd { color: var(--orange, #FF6A13); font: 700 13px/1.3 var(--f-display, 'Chakra Petch', sans-serif); letter-spacing: .02em; white-space: nowrap; }
.cc-args { color: var(--fg-0, #fff); font-weight: 600; white-space: nowrap; }
.cc-desc { margin-left: auto; color: var(--fg-3, #666D79); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-foot { padding: 6px 8px 4px; border-top: 1px solid var(--line, rgba(255,255,255,.07)); margin-top: 4px; color: var(--fg-3, #666D79); font-size: 12px; }
.cc-foot kbd { padding: 0 4px; border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: 3px; color: var(--fg-1, #DDE0E6); font: 700 11px/1.5 var(--f-display, sans-serif); }
@media (max-width: 560px) { .cc-desc { display: none; } }

/* Training balls panel (game screen, alone in a casual room) */
.training-keys {
    position: absolute; left: 12px; top: 12px; z-index: 20;
    width: 180px; padding: 8px 10px; pointer-events: none; opacity: .92;
    background: rgba(15, 17, 21, .78); border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r, 4px);
    color: var(--fg-1, #DDE0E6); font: 500 13px/1.35 var(--f-body, 'Exo 2', system-ui, sans-serif);
}
.training-keys[hidden] { display: none; }
.tk-title { margin-bottom: 6px; color: var(--orange, #FF6A13); font: 700 12px/1 var(--f-display, 'Chakra Petch', sans-serif); letter-spacing: .12em; text-transform: uppercase; }
.tk-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tk-row kbd { display: inline-block; min-width: 22px; text-align: center; padding: 1px 0; border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-bottom-width: 2px; border-radius: 3px; background: var(--bg-3, #242932); color: var(--fg-0, #fff); font: 700 12px/1.4 var(--f-display, sans-serif); }
.tk-foot { margin-top: 6px; color: var(--fg-3, #666D79); font-size: 11.5px; }
.tk-row--auto { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
.tk-row--auto.is-on span { color: var(--orange, #FF6A13); font-weight: 700; }
/* social toasts: staff message to a guest */
.sp-toast .sp-toast-cta { display: block; margin-top: 4px; color: var(--orange, #FF6A13); font-weight: 700; }

/* Discord: header link + home banner */
.btn-discord { display: inline-flex; align-items: center; gap: 6px; }
.btn-discord .dc-ico { color: #5865F2; transition: color 150ms; }
.btn-discord:hover .dc-ico { color: #fff; }
.btn-discord:hover { background: #5865F2 !important; color: #fff !important; }
/* X (Twitter) account: icon-only header link */
.btn-x { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }
.btn-x .x-ico { display: block; }
.btn-x:hover { background: #000 !important; color: #fff !important; }
.btn-ig { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }
.btn-ig .ig-ico { display: block; }
.btn-ig:hover { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF) !important; color: #fff !important; border-color: transparent !important; }
.discord-cta {
    display: flex; align-items: center; gap: 14px; margin: 16px 0 8px; padding: 12px 16px;
    background: linear-gradient(90deg, rgba(88,101,242,.18), rgba(88,101,242,.06));
    border: 1px solid rgba(88,101,242,.45); border-radius: var(--r, 4px);
    color: var(--fg-1, #DDE0E6); text-decoration: none; transition: border-color 150ms, background 150ms;
}
.discord-cta:hover { border-color: #5865F2; background: linear-gradient(90deg, rgba(88,101,242,.28), rgba(88,101,242,.10)); }
.discord-cta:focus-visible { outline: 2px solid #5865F2; outline-offset: 2px; }
.discord-cta-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #5865F2; color: #fff; }
.discord-cta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.discord-cta-text b { color: var(--fg-0, #fff); font: 800 16px/1.2 var(--f-display, 'Chakra Petch', sans-serif); letter-spacing: .04em; text-transform: uppercase; }
.discord-cta-text small { color: var(--fg-2, #9BA1AC); font-size: 13px; }
.discord-cta-btn { margin-left: auto; flex: none; padding: 9px 16px; border-radius: var(--r, 4px); background: #5865F2; color: #fff; font: 800 13px/1 var(--f-display, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.discord-cta:hover .discord-cta-btn { background: #4752C4; }
@media (max-width: 560px) {
    .discord-cta { flex-wrap: wrap; }
    .discord-cta-btn { margin-left: 0; width: 100%; text-align: center; }
}

/* Discord reward: top-right button + dialog (discord-reward.js) */
.btn-discord-reward { position: relative; display: inline-flex; align-items: center; gap: 6px; background: #5865F2 !important; color: #fff !important; border-color: transparent !important; }
.btn-discord-reward svg { width: 16px; height: 16px; }
.btn-discord-reward:hover { background: #4752C4 !important; }

/* Invite friends (index.html #btn-invite, invite.js) */
.btn-invite { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--orange, #FF6A13) !important; color: var(--orange-ink, #1A0900) !important; border-color: transparent !important; }
.btn-invite svg { width: 16px; height: 16px; }
.btn-invite:hover { filter: brightness(1.1); }
.btn-invite .inv-chip { margin-left: 2px; padding: 2px 6px; border-radius: 999px; background: #1A0900; color: #FFC53D; font: 800 11px/1.2 var(--f-display, sans-serif); letter-spacing: .02em; white-space: nowrap; }
.inv-dialog { border-color: rgba(255,106,19,.55); }
.inv-dialog .dc-coin { background: #FFC53D; }
.inv-loading { padding: 14px 0; color: var(--fg-2, #9BA1AC); font-size: 14px; }
.inv-label { display: block; margin: 4px 0 6px; color: var(--fg-2, #9BA1AC); font: 700 11px/1 var(--f-display, sans-serif); letter-spacing: .1em; text-transform: uppercase; }
.inv-row { display: flex; gap: 8px; }
.inv-link { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: var(--r, 4px); background: var(--bg-0, #0F1115); color: #fff; font: 600 13px/1.2 ui-monospace, Menlo, Consolas, monospace; }
.inv-link:focus { outline: 2px solid var(--orange, #FF6A13); outline-offset: 1px; }
.inv-share { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.inv-share-btn { padding: 7px 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: var(--r, 4px); background: var(--bg-2, #1C2027); color: var(--fg-1, #DDE0E6); font: 700 12px/1 var(--f-display, sans-serif); letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.inv-share-btn:hover { border-color: var(--orange, #FF6A13); color: #fff; }
.inv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-goal { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; }
.inv-goal-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.inv-goal-bar { height: 6px; margin: 8px 0 4px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.inv-goal-bar i { display: block; height: 100%; background: #fbbf24; border-radius: 3px; }
.inv-goal small { color: var(--fg-3, #5B6497); font-size: 12px; }
.inv-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 4px); background: var(--bg-0, #0F1115); }
.inv-stats b { color: #fff; font: 800 22px/1 var(--f-display, sans-serif); }
.inv-stats b.inv-gold { color: #FFC53D; }
.inv-stats small { color: var(--fg-3, #666D79); font-size: 12px; }
.inv-fine { margin: 12px 0 0; color: var(--fg-3, #666D79); font-size: 12px; }
.inv-partner-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-bottom: 8px; border-radius: 3px; border: 1px solid #B48CFF; background: rgba(180,140,255,.1); color: #C7A8FF; font: 700 10px/1 var(--f-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; }
.inv-dialog .dc-sub b { color: #fff; }
.inv-stats--partner { margin-top: 12px; }
.inv-stats--partner b { font-size: 20px; }
.inv-chart { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 4px); background: var(--bg-0, #0F1115); }
.inv-chart-h { display: flex; justify-content: space-between; color: var(--fg-3, #666D79); font-size: 12px; margin-bottom: 8px; }
.inv-bars { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.inv-bars i { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; background: #B48CFF; }
.inv-bars i.is-zero { background: rgba(255,255,255,.08); }
.inv-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(255,197,61,.5); border-radius: var(--r, 4px); background: linear-gradient(90deg, rgba(255,197,61,.16), rgba(255,197,61,.04)); color: var(--fg-1, #DDE0E6); font-size: 13px; line-height: 1.4; }
.inv-banner b { color: #FFC53D; }
.inv-banner-ico { font-size: 18px; line-height: 1; }
@media (max-width: 1000px) { .menu-header, .user-profile-bar { min-width: 0; max-width: 100%; } .btn-invite > span { display: none; } }
.btn-discord-reward .dc-chip { margin-left: 2px; padding: 2px 6px; border-radius: 999px; background: #FFC53D; color: #2A1A00; font: 800 11px/1.2 var(--f-display, sans-serif); letter-spacing: .02em; animation: dc-pulse 2.4s ease-in-out infinite; }
.btn-discord-reward.is-done .dc-chip { display: none; }
@keyframes dc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,197,61,.55); } 50% { box-shadow: 0 0 0 5px rgba(255,197,61,0); } }
@media (prefers-reduced-motion: reduce) { .btn-discord-reward .dc-chip { animation: none; } }
.dc-inline-reward { color: #FFC53D; font-weight: 700; }
.dc-overlay { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,7,10,.78); }
.dc-dialog { position: relative; width: min(460px, 100%); padding: 24px 22px 20px; background: var(--bg-1, #15181D); border: 1px solid rgba(88,101,242,.5); border-radius: var(--r-lg, 6px); color: var(--fg-1, #DDE0E6); box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); text-align: left; }
.dc-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--fg-2, #9BA1AC); font-size: 22px; cursor: pointer; border-radius: 4px; }
.dc-x:hover { background: var(--bg-3, #242932); color: #fff; }
.dc-coin { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #FFC53D; color: #2A1A00; font: 800 14px/1 var(--f-display, sans-serif); }
.dc-dialog h3 { margin: 10px 0 4px; color: #fff; font: 800 22px/1.15 var(--f-display, 'Chakra Petch', sans-serif); text-transform: uppercase; letter-spacing: .02em; }
.dc-dialog h3 span { color: #FFC53D; }
.dc-sub { margin: 0 0 14px; color: var(--fg-2, #9BA1AC); font-size: 14px; }
.dc-steps { margin: 0; padding: 0; list-style: none; counter-reset: dc; display: grid; gap: 10px; }
.dc-steps li { counter-increment: dc; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 4px); background: var(--bg-0, #0F1115); }
.dc-steps li::before { content: counter(dc); flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-3, #242932); color: #fff; font: 800 13px/1 var(--f-display, sans-serif); }
.dc-steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dc-steps b { color: #fff; font-size: 14px; }
.dc-steps small { color: var(--fg-3, #666D79); font-size: 12px; }
.dc-btn { flex: none; padding: 9px 14px; border: 0; border-radius: var(--r, 4px); background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); font: 800 12px/1 var(--f-display, sans-serif); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.dc-btn:hover { filter: brightness(1.08); }
.dc-btn:disabled { opacity: .5; cursor: default; }
.dc-btn--discord { background: #5865F2; color: #fff; }
.dc-btn--wide { display: block; width: 100%; padding: 12px 14px; text-align: center; }
.dc-coin--ok { background: #3BA55D; color: #fff; }
.dc-btn:focus-visible, .dc-x:focus-visible { outline: 2px solid #5865F2; outline-offset: 2px; }

/* Home: NextBall Cups banner (index.html #cups-cta, cups-banner.js) */
.btn-cups:hover { background: #FFD24A !important; color: #2A1A00 !important; }
.cups-cta {
    display: flex; align-items: center; gap: 14px; margin: 16px 0 0; padding: 12px 16px;
    background: linear-gradient(90deg, rgba(255,210,74,.16), rgba(255,210,74,.04));
    border: 1px solid rgba(255,210,74,.45); border-radius: var(--r, 4px);
    color: var(--fg-1, #DDE0E6); text-decoration: none; transition: border-color 150ms, background 150ms;
}
.cups-cta:hover { border-color: #FFD24A; background: linear-gradient(90deg, rgba(255,210,74,.26), rgba(255,210,74,.08)); }
.cups-cta:focus-visible { outline: 2px solid #FFD24A; outline-offset: 2px; }
.cups-cta-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,210,74,.18); font-size: 24px; }
.cups-cta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cups-cta-text > b { color: var(--fg-0, #fff); font: 800 16px/1.2 var(--f-display, 'Chakra Petch', sans-serif); letter-spacing: .04em; text-transform: uppercase; }
.cups-cta-text small { color: var(--fg-2, #9BA1AC); font-size: 13px; }
.cups-cta-text small b { color: #FFD24A; }
.cups-cta-btn { margin-left: auto; flex: none; padding: 9px 16px; border-radius: var(--r, 4px); background: #FFD24A; color: #2A1A00; font: 800 13px/1 var(--f-display, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.cups-cta.is-live .cups-cta-ico { animation: cups-pulse 2.4s ease-in-out infinite; }
@keyframes cups-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,210,74,.5); } 50% { box-shadow: 0 0 0 8px rgba(255,210,74,0); } }
@media (prefers-reduced-motion: reduce) { .cups-cta.is-live .cups-cta-ico { animation: none; } }
@media (max-width: 640px) {
    .cups-cta { flex-wrap: wrap; }
    .cups-cta-btn { margin-left: 0; width: 100%; text-align: center; }
}

/* ==========================================================================
   FIT EVERY SCREEN (laptops): no page scrolling to reach Create Room / Start game
   ========================================================================== */
/* Lobby: the teams area shrinks so header + teams + controls always fit above the chat */
@media (min-width: 900px) and (min-height: 480px) {
    #lobby-screen:not([style*="fixed"]) { padding: 12px 16px 154px; box-sizing: border-box; }
    #lobby-screen:not([style*="fixed"]) .lobby-container { margin: 0 auto; max-height: 100%; min-height: 0; padding-top: 0; padding-bottom: 0; }
    .teams-container { height: auto; flex: 0 1 400px; min-height: 132px; }
    #lobby-screen[style*="fixed"] .teams-container { height: auto; flex: 0 1 320px; min-height: 120px; }
    #lobby-screen[style*="fixed"] { padding: 16px 24px 162px; box-sizing: border-box; }
    #lobby-screen[style*="fixed"] .lobby-container { display: flex; flex-direction: column; max-height: 100%; }
    .lobby-header, .lobby-controls { flex: 0 0 auto; }
    /* Start game: its own row, centred */
    .start-group { width: 100%; justify-content: center; margin-left: 0; }
    @media (max-height: 760px) {
        #lobby-screen:not([style*="fixed"]) { padding-top: 8px; }
        .lobby-container { gap: 10px !important; }
        .lobby-header { padding: 10px 14px 10px 16px !important; }
        .lobby-controls { padding: 10px 14px !important; gap: 10px; }
        .team-header { padding-top: 8px; padding-bottom: 8px; }
    }
}

/* Create Room: wider, cards in three columns, the fields share rows -> Create Room is always visible */
#create-room-modal .modal-content { max-width: 720px; width: min(720px, calc(100vw - 32px)); }
#create-room-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; align-items: end; }
#create-room-form > .form-group:first-child { grid-column: 1 / -1; }
#create-room-form > button[type="submit"] { margin-bottom: 14px; }
#create-room-modal .fm-picker { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
    #create-room-form { grid-template-columns: 1fr; }
    #create-room-modal .fm-picker { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { #create-room-modal .fm-picker { grid-template-columns: 1fr; } }
/* very short windows: the button stays pinned at the bottom of the dialog */
#create-room-form > button[type="submit"] { position: sticky; bottom: 0; z-index: 2; }
@media (max-height: 700px) { .modal-content .modal-header { padding-top: 12px; padding-bottom: 12px; } }
@media (max-height: 600px) {
    #create-room-modal .fm-card-desc { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Season / How to play dialogs on short laptop screens: tighter spacing so they fit without scrolling */
@media (max-height: 820px) {
    .season-info-banner { padding: 10px 14px !important; margin-bottom: 12px !important; }
    .season-info-banner .timer-value { font-size: 22px !important; }
    .season-tabs { margin-bottom: 12px !important; }
    .reward-card { padding: 12px 12px !important; }
    .reward-cards { gap: 10px !important; }
    .reward-icon { font-size: 26px !important; margin-bottom: 4px !important; }
    .tutorial-panel .modal-header, .season-panel .modal-header { padding-top: 12px !important; padding-bottom: 12px !important; }
}

/* FPS counter under the pitch (game.js) */
.controls-info .controls-fps { font-variant-numeric: tabular-nums; }

/* In-room settings gear (lobby + match, top right, outside the pitch) */
.room-tools { position: fixed; top: 12px; right: 12px; z-index: 60; display: flex; gap: 8px; align-items: center; }
.room-lobby { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: var(--r, 4px); background: var(--bg-1); color: var(--fg-1); font: 700 12px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.room-lobby kbd { font: 700 10px/1 var(--f-body); padding: 3px 5px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--fg-2); letter-spacing: 0; }
@media (hover: hover) { .room-lobby:hover { color: var(--orange, #FF6A13); background: var(--bg-2); } }
.room-lobby[aria-pressed="true"] { color: var(--orange-ink, #1A0900); background: var(--orange, #FF6A13); }
.room-lobby[aria-pressed="true"] kbd { color: inherit; border-color: currentColor; }
.room-lobby:focus-visible { outline: 2px solid var(--orange, #FF6A13); outline-offset: 2px; }
.room-lobby.hidden { display: none; }
.room-gear { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--r, 4px); background: var(--bg-1); color: var(--fg-1); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
@media (hover: hover) { .room-gear:hover { color: var(--orange, #FF6A13); background: var(--bg-2); } }
.room-gear:focus-visible { outline: 2px solid var(--orange, #FF6A13); outline-offset: 2px; }
.room-gear.hidden { display: none; }
body.social-open .room-tools { right: 332px; }
@media (max-width: 1100px) { body.social-open .room-tools { right: 12px; } }
body.is-mobile .room-tools { top: 8px; right: 8px; }
body.is-mobile .room-gear { width: 36px; height: 36px; }
body.is-mobile .room-lobby { display: none; }
/* Desktop chat button: closes the chat + keys row, the pitch gets the space (game.js setChatHidden) */
.room-chat .rc-off { display: none; }
.room-chat[aria-pressed="true"] { color: var(--orange-ink, #1A0900); background: var(--orange, #FF6A13); }
.room-chat[aria-pressed="true"] .rc-on { display: none; }
.room-chat[aria-pressed="true"] .rc-off { display: block; }
body.is-mobile .room-chat { display: none !important; }
body.chat-hidden:not(.is-mobile) #game-chat-panel, body.chat-hidden:not(.is-mobile) .controls-info { display: none !important; }
/* Enter while closed: the chat floats over the bottom of the pitch until you send / leave it */
body.chat-hidden.chat-typing:not(.is-mobile) #game-chat-panel { display: flex !important; flex-direction: column; position: fixed !important; left: 50% !important; bottom: 18px !important; top: auto !important; transform: translateX(-50%) !important; width: min(640px, 90vw) !important; max-height: 40vh; z-index: 80; box-shadow: 0 -18px 40px rgba(0, 0, 0, .55) !important; }
/* Mobile only: hide every HUD item over the pitch (eye button next to the gear) */
.room-hud, .room-hud.hidden { display: none; }
body.is-mobile .room-hud:not(.hidden) { display: grid; }
.room-hud .rh-off { display: none; }
.room-hud[aria-pressed="true"] { color: var(--orange-ink, #1A0900); background: var(--orange, #FF6A13); }
.room-hud[aria-pressed="true"] .rh-eye { display: none; }
.room-hud[aria-pressed="true"] .rh-off { display: block; }
body.hud-hidden .game-topbar, body.hud-hidden #touch-controls, body.hud-hidden #nb-ghost-bar,
body.hud-hidden .training-keys, body.hud-hidden #game-chat-panel, body.hud-hidden .controls-info,
body.hud-hidden .power-hud, body.hud-hidden .pool-hud, body.hud-hidden .game-fit,
body.hud-hidden .touch-chat-float, body.hud-hidden #touch-toast, body.hud-hidden #btn-room-settings,
body.hud-hidden #btn-room-lobby { visibility: hidden !important; pointer-events: none !important; }
body.hud-hidden .room-tools { opacity: .55; }
/* settings: sections + extrapolation input */
#settings-modal .st-h { font: 700 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); margin: 4px 0 10px; }
#settings-modal .st-h ~ .st-h { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
#settings-modal .st-xtra { align-items: center; gap: 6px; }
#settings-modal .st-num { width: 70px; height: 30px; padding: 0 8px; border-radius: var(--r, 4px); border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-0); font: 700 13px/1 var(--f-body); font-variant-numeric: tabular-nums; }
#settings-modal .st-num:focus { outline: 2px solid var(--orange, #FF6A13); outline-offset: 1px; }
#settings-modal .st-unit { font: 700 11px/1 var(--f-body); color: var(--fg-2); }

/* Add to home screen card (pwa.js) */
.pwa-card { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg, 8px); background: var(--bg-1); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); border-top: 3px solid var(--orange, #FF6A13); max-width: 520px; margin: 0 auto; }
.pwa-card img { border-radius: 10px; flex: none; }
.pwa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font: 500 13px/1.35 var(--f-body); color: var(--fg-2); }
.pwa-txt > b { font: 700 15px/1.2 var(--f-display); color: var(--fg-0); text-transform: uppercase; letter-spacing: .03em; }
.pwa-txt span b { color: var(--fg-0); }
.pwa-go { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: var(--r, 4px); background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); font: 800 13px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.pwa-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: var(--r, 4px); background: transparent; color: var(--fg-2); font-size: 22px; line-height: 1; cursor: pointer; }
.pwa-go:focus-visible, .pwa-x:focus-visible { outline: 2px solid var(--orange, #FF6A13); outline-offset: 2px; }

/* "Play with bots?" (alone in a room) */
#solo-bots-modal .solo-bots-text { margin: -4px 0 14px; font: 500 13.5px/1.45 var(--f-body); color: var(--fg-2); }
#solo-bots-modal .solo-bots-never { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font: 600 12.5px/1 var(--f-body); color: var(--fg-2); cursor: pointer; }


/* --------------------------------------------------------------------------
   13c. Sports modes (Basketball, Ice Hockey, Volleyball, Tennis, Mini Golf):
        HUD strip over the top of the field, event banner, control hints
        (sports.js; #game-screen.is-sport / .sport-<art>)
   -------------------------------------------------------------------------- */
.sport-hud {
    position: absolute; left: 50%; top: 8px; z-index: 25; transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px; pointer-events: none;
    padding: 5px 10px; border-radius: 999px;
    background: linear-gradient(180deg, rgba(8, 11, 28, .86), rgba(4, 5, 13, .86));
    border: 1px solid var(--line-strong); box-shadow: 0 8px 26px rgba(0, 0, 0, .45);
    font: 800 12px/1 var(--f-display); color: var(--fg-0);
}
.sport-hud.hidden, .sport-hud:empty { display: none; }
/* basketball: possession arrows around the shot clock */
.sport-hud .sh-poss { font-size: 15px; width: 22px; text-align: center; opacity: .18; transition: opacity var(--t), transform var(--t), text-shadow var(--t); }
.sport-hud .sh-red { color: var(--red); }
.sport-hud .sh-blue { color: var(--blue); order: -1; }
.sport-hud .sh-poss.on { opacity: 1; transform: scale(1.15); text-shadow: 0 0 10px currentColor; }
.sport-hud .sh-clock {
    --pct: 1;
    position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: radial-gradient(closest-side, #120605 74%, transparent 76% 100%), conic-gradient(#FF8A2A calc(var(--pct) * 360deg), rgba(255, 255, 255, .08) 0);
}
.sport-hud .sh-clock b { font: 800 16px/1 'Courier New', ui-monospace, monospace; color: #FF8A2A; text-shadow: 0 0 8px rgba(255, 120, 30, .7); margin-top: -3px; }
.sport-hud .sh-clock i { position: absolute; bottom: 6px; font: 700 6.5px/1 var(--f-body); letter-spacing: .12em; color: var(--fg-2); font-style: normal; }
.sport-hud .sh-clock.is-off b { color: #b98a63; text-shadow: none; }
.sport-hud .sh-clock.is-low { background: radial-gradient(closest-side, #1a0505 74%, transparent 76% 100%), conic-gradient(var(--bad) calc(var(--pct) * 360deg), rgba(255, 255, 255, .08) 0); animation: pool-pulse .6s ease-in-out infinite; }
.sport-hud .sh-clock.is-low b { color: #ff4a3a; }
.sport-hud .sh-chip { order: 5; display: none; font: 700 10px/1 var(--f-display); letter-spacing: .12em; color: var(--gold); padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); border-radius: 2px; }
.sport-hud .sh-chip.on { display: inline-block; }
/* generic score chips (volleyball / tennis / golf) */
.sport-hud .sh-group { display: flex; align-items: center; gap: 6px; }
.sport-hud .sh-label { font: 700 9px/1 var(--f-body); letter-spacing: .14em; color: var(--fg-2); text-transform: uppercase; }
.sport-hud .sh-val { font: 800 14px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.sport-hud .sh-val.red { color: var(--red); }
.sport-hud .sh-val.blue { color: var(--blue); }
.sport-hud .sh-val small { font-size: 10px; color: var(--fg-2); margin-left: 1px; }
.sport-hud .sh-sep { width: 1px; height: 18px; background: var(--line-strong); }
.sport-hud .sh-serve { color: var(--gold); font-size: 13px; }
.sport-hud .sh-serve.red { color: var(--red); }
.sport-hud .sh-serve.blue { color: var(--blue); }
.sport-hud .sh-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.sport-hud .sh-touch.red .sh-dot.on { background: var(--red); box-shadow: 0 0 6px var(--red); }
.sport-hud .sh-touch.blue .sh-dot.on { background: var(--blue); box-shadow: 0 0 6px var(--blue); }

/* event banner */
.sport-banner {
    --team: var(--fg-1);
    position: absolute; left: 50%; top: 22%; z-index: 30; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 26px 12px; min-width: 220px; text-align: center;
    background: linear-gradient(180deg, rgba(8, 11, 28, .9), rgba(4, 5, 13, .9));
    border: 1px solid var(--line-strong); border-top: 3px solid var(--team); border-radius: var(--r);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 30px -8px color-mix(in srgb, var(--team) 60%, transparent);
    transform: translate(-50%, -8px) scale(.9); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.sport-banner.is-in { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition: opacity .14s ease, transform .22s cubic-bezier(.2, 1.6, .4, 1); }
.sport-banner.team-red { --team: var(--red); }
.sport-banner.team-blue { --team: var(--blue); }
.sport-banner.k-warn { --team: var(--gold); }
.sport-banner .sb-title { font: italic 800 26px/1 var(--f-display); letter-spacing: .06em; color: var(--team); text-shadow: 0 0 18px color-mix(in srgb, var(--team) 55%, transparent); }
.sport-banner.k-big .sb-title { font-size: 34px; }
.sport-banner.k-huge .sb-title { font-size: 40px; }
.sport-banner.k-warn .sb-title { font-size: 22px; }
.sport-banner .sb-text { font: 600 13.5px/1.3 var(--f-body); color: var(--fg-0); max-width: 460px; }
.sport-banner .sb-text:empty { display: none; }

/* control hints: the sport's own line replaces the football keys */
.controls-sport { display: none; font-weight: 700; color: var(--fg-1); }
#game-screen.is-sport .controls-info > span { display: none; }
#game-screen.is-sport .controls-info > #controls-sport,
#game-screen.is-sport .controls-info > #controls-xtra,
#game-screen.is-sport .controls-info > #controls-fps { display: inline; }
.touch-btn-word { font: 800 13px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
body.hud-hidden .sport-hud { visibility: hidden !important; }
#game-screen.sport-minigolf .sport-hud { top: auto; bottom: 8px; }   /* the park's signs are along the top */
#game-screen.is-sport .training-keys { display: none !important; }
@media (max-width: 760px) {
    .sport-hud { top: 4px; padding: 4px 8px; gap: 6px; }
    .sport-hud .sh-clock { width: 34px; height: 34px; }
    .sport-hud .sh-clock b { font-size: 14px; }
    .sport-banner { top: 16%; min-width: 0; padding: 8px 16px 10px; }
    .sport-banner .sb-title { font-size: 22px; }
    .sport-banner.k-big .sb-title { font-size: 26px; }
}

/* ============================================
   RATED ROOMS (rated.js): create switch, lobby bar, result card, room list pill, ticker
   ============================================ */
.rated-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rated-seg.hidden { display: none; }
.rated-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r, 4px); background: var(--bg-1); color: var(--fg-1); cursor: pointer; text-align: left; font: inherit; }
.rated-opt b { font: 700 13px/1.1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.rated-opt small { font-size: 11px; color: var(--fg-2); }
.rated-opt.is-on { border-color: var(--orange, #FF6A13); box-shadow: inset 0 0 0 1px var(--orange, #FF6A13); color: var(--fg-0, #fff); }
.rated-opt.is-on b { color: var(--orange, #FF6A13); }
.rated-note { margin: 4px 0 0; font-size: 12px; color: var(--fg-2); }
.rated-note.hidden { display: none; }

.lobby-rated { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; padding: 8px 12px; background: var(--bg-1); border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 4px); font-size: 13px; }
.lobby-rated.hidden { display: none; }
.lr-badge { padding: 3px 8px; border-radius: 3px; font: 700 11px/1 var(--f-display); letter-spacing: .1em; border: 1px solid var(--fg-3, #666); color: var(--fg-2); }
.lr-badge.is-on { border-color: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); background: var(--orange, #FF6A13); }
.lr-mode { font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-1); }
.lr-status { color: var(--fg-2); }
.lr-status.is-ok { color: #38D66B; }
.lr-status.is-warn { color: #E4B13A; }
.lr-gap { flex: 1; }

.room-rated-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 3px; background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); font: 700 10px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; margin-right: 6px; white-space: nowrap; }

#match-result-rated:empty { display: none; }
.rr-card { margin: 12px auto 4px; max-width: 380px; padding: 12px 14px; background: rgba(0,0,0,.35); border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r-lg, 6px); text-align: left; }
.rr-card.is-up { border-color: #38D66B; }
.rr-card.is-off { opacity: .85; }
.rr-signup { display: grid; gap: 8px; margin: 10px 0 4px; }
.rr-signup input { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.35); color: #fff; font: inherit; font-size: 14px; }
.rr-signup input:focus { outline: 2px solid #38D66B; outline-offset: 0; }
.rr-signup .btn { width: 100%; }
.rr-signup-msg { margin: 0; min-height: 1em; font-size: 12.5px; color: var(--fg-2, #8E97C9); }
.rr-signup-msg.is-err { color: #f87171; }
.rr-fine { margin: 4px 0 0; font-size: 12px; color: var(--fg-3, #5B6497); }
.rr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rr-tag { font: 700 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--orange, #FF6A13); }
.rr-up { margin-left: auto; color: #38D66B; font: 700 13px/1 var(--f-display); letter-spacing: .08em; animation: rrPop .5s ease-out; }
.rr-down { margin-left: auto; color: #E0647A; font: 700 12px/1 var(--f-display); letter-spacing: .06em; }
.rr-main { display: flex; align-items: center; gap: 12px; }
.rr-badge { display: inline-flex; width: 44px; height: 44px; }
.rr-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rr-rank { font: 700 18px/1.1 var(--f-display); letter-spacing: .03em; }
.rr-mmr { font-size: 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rr-delta { margin-left: auto; font: 700 26px/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--fg-1); }
.rr-delta.pos { color: #38D66B; }
.rr-delta.neg { color: #E0647A; }
.rr-bar { height: 6px; margin-top: 10px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.rr-bar > i { display: block; height: 100%; background: var(--orange, #FF6A13); transition: width .8s ease-out; }
.rr-next, .rr-place, .rr-note, .rr-why { margin: 6px 0 0; font-size: 12px; color: var(--fg-2); }
.rr-note { color: #E4B13A; }
.rr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.rr-list .pos { color: #38D66B; } .rr-list .neg { color: #E0647A; }
@keyframes rrPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

.nb-ticker { position: fixed; top: 12px; left: 50%; transform: translate(-50%, -140%); z-index: 9000; max-width: calc(100vw - 32px); padding: 9px 16px; background: var(--bg-1, #15181D); border: 1px solid var(--orange, #FF6A13); border-radius: var(--r, 4px); color: var(--fg-0, #fff); font: 700 13px/1.2 var(--f-display); letter-spacing: .04em; box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .35s ease-out; pointer-events: none; }
.nb-ticker.on { transform: translate(-50%, 0); }
.lb-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.lb-modes::-webkit-scrollbar { display: none; }
.lb-mode { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r, 4px); background: var(--bg-1); color: var(--fg-2); font: 700 11px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.lb-mode.is-on { background: var(--orange, #FF6A13); border-color: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); }
@media (hover: hover) { .lb-mode:not(.is-on):hover { color: var(--fg-0, #fff); } }
#match-result-players:empty { display: none; }
.rr-hint { margin: 0 0 8px; font-size: 13px; color: var(--fg-1); line-height: 1.45; }
.rr-hint .pos { color: #38D66B; }
.rr-card.is-hint .btn { margin-top: 2px; }
.mode-top { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 4px; border-radius: 3px; font: 700 10px/1 var(--f-display); letter-spacing: .04em; vertical-align: 1px; background: #E4B13A; color: #1A1200; }
.mode-top-2 { background: #C9D1DB; color: #12161C; }
.mode-top-3 { background: #C9824A; color: #1A0E04; }
.rr-season { margin: 6px 0 0; font-size: 12px; color: var(--fg-1); } .rr-season b { color: #E4B13A; }
.rr-ok { font-size: 11px; color: #38D66B; }
.season-tier-pay { display: grid; gap: 4px; margin: 0 0 18px; padding: 10px 12px; background: var(--bg-1); border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 4px); }
.stp-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-1); }
.stp-row b { font-variant-numeric: tabular-nums; color: #E4B13A; }
.stp-top { border-top: 1px solid var(--line, rgba(255,255,255,.07)); padding-top: 6px; margin-top: 2px; }
.leaderboard-row.is-placing { opacity: .8; }
.lbm-pos.lbm-placing { color: var(--fg-3, #666); }
.leaderboard-row.is-placing .lbm-tier-name { color: var(--fg-2); font-size: 11px; }

/* --------------------------------------------------------------------------
   Goal explosions: shop / inventory tab (goalfx-shop.js). Videos are real
   renders of the in-game effect over an in-game shot of the goal.
   -------------------------------------------------------------------------- */
.tab-new { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 3px; background: var(--orange); color: var(--orange-ink); font: 800 9.5px var(--f-body); letter-spacing: .08em; vertical-align: 2px; }
.gx-panel { display: flex; flex-direction: column; gap: 14px; }
.gx-panel [data-rar], .gx-feature, .gx-tile { --rar: #9BA1AC; }
.gx-feature[data-rar="rare"], .gx-tile[data-rar="rare"] { --rar: #4C8FE8; }
.gx-feature[data-rar="epic"], .gx-tile[data-rar="epic"] { --rar: #A77BE8; }
.gx-feature[data-rar="legendary"], .gx-tile[data-rar="legendary"] { --rar: var(--gold); }
.gx-feature[data-rar="exclusive"], .gx-tile[data-rar="exclusive"] { --rar: var(--orange); }
/* Mythic: the top tier, a moving prismatic edge */
.gx-feature[data-rar="mythic"], .gx-tile[data-rar="mythic"] { --rar: #FF4FB0; }
.gx-feature[data-rar="mythic"]::before, .gx-tile[data-rar="mythic"]::before { background: linear-gradient(90deg, #FF4FB0, #8B5CFF, #2EC5FF, #FFD24A, #FF4FB0); background-size: 300% 100%; animation: gx-myth 4s linear infinite; }
@keyframes gx-myth { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .gx-feature[data-rar="mythic"]::before, .gx-tile[data-rar="mythic"]::before { animation: none; } }

.gx-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(240px, 1fr); background: var(--bg-2); border-radius: var(--r-lg); overflow: hidden; }
.gx-feature::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rar); z-index: 1; }
.gx-feature-vid { position: relative; aspect-ratio: 16 / 9; background: #1d2b1c; max-height: 46vh; }
.gx-feature-vid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gx-snd { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; background: rgba(8,10,14,.72); color: var(--fg-0); font: 700 12px var(--f-body); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(4px); }
.gx-snd:hover { border-color: rgba(255,255,255,.5); }
.gx-snd.is-on { background: var(--orange); border-color: var(--orange); color: #111; }
.gx-snd:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.gx-feature-info { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 18px; min-width: 0; }
.gx-rar { font: 700 10.5px var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--rar); }
.gx-feature-info h3 { margin: 0; font: 700 clamp(22px, 2.4vw, 30px)/1.05 var(--f-display); letter-spacing: .02em; text-transform: uppercase; color: var(--fg-0); }
.gx-feature-info p { margin: 0; color: var(--fg-1); font-size: 14px; }
.gx-feature-act { margin-top: auto; padding-top: 10px; }
.gx-feature-act .cos-btn, .gx-feature-act .cos-lock { height: 42px; font-size: 14px; }
.gx-note { color: var(--fg-3) !important; font-size: 12px !important; }
.gx-note b { color: var(--fg-2); }

.gx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.gx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-bar-title { font: 700 13px var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-0); }
.gx-quality { display: flex; align-items: center; gap: 6px; }
.gx-quality > span { font: 700 10.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); margin-right: 4px; }

.gx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; }
.gx-tile { position: relative; display: flex; flex-direction: column; background: var(--bg-2); border-radius: var(--r-lg); overflow: hidden; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color var(--t-fast), background var(--t-fast); }
.gx-tile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rar); z-index: 1; }
.gx-tile:hover { background: var(--bg-3); }
.gx-tile.is-on { outline-color: var(--fg-0); }
.gx-tile-vid { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #1d2b1c; cursor: pointer; overflow: hidden; }
.gx-tile-vid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gx-tile-vid--off { display: flex; align-items: center; justify-content: center; cursor: default; background: var(--bg-1); color: var(--fg-3); font: 700 12px var(--f-display); letter-spacing: .12em; text-transform: uppercase; }
.gx-badge { position: absolute; left: 8px; top: 8px; padding: 3px 7px; border-radius: 3px; background: var(--fg-0); color: var(--bg-0); font: 800 9.5px var(--f-body); letter-spacing: .12em; text-transform: uppercase; }
.gx-tile-band { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.gx-tile-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gx-tile-txt b { font: 700 13px/1.15 var(--f-display); letter-spacing: .03em; text-transform: uppercase; color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-tile-txt small { font: 700 10px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--rar); }
.gx-tile-act { flex: 0 0 auto; }
.gx-tile-act .cos-btn, .gx-tile-act .cos-lock { width: auto; min-width: 88px; padding: 0 12px; height: 30px; }
.gx-tile-act .cos-lock { font-size: 9.5px; }
@media (max-width: 760px) {
    .gx-feature { grid-template-columns: 1fr; }
    .gx-feature-info { padding: 14px; }
    .gx-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .gx-tile-band { flex-direction: column; align-items: stretch; }
    .gx-tile-act .cos-btn, .gx-tile-act .cos-lock { width: 100%; }
}
/* the GOAL banner goes see-through while an explosion plays */
.goal-celebration.with-fx { background: rgba(15, 17, 21, .5) !important; }
.goalfx-overlay { border-radius: var(--r); }
@media (max-height: 560px) {
    .gx-feature { grid-template-columns: minmax(0, 1.4fr) minmax(200px, 1fr); }
    .gx-feature-info { padding: 10px 14px; gap: 4px; }
    .gx-feature-info h3 { font-size: 18px; }
    .gx-feature-info p { font-size: 12.5px; }
    .gx-feature-act { padding-top: 4px; }
    .gx-feature-act .cos-btn, .gx-feature-act .cos-lock { height: 34px; font-size: 12.5px; }
    .gx-note { display: none; }
}

/* country flags (lobby players, room browser) */
.cc-flag { display: inline-block; width: 18px; height: 13.5px; margin-right: 7px; vertical-align: -1px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.14); object-fit: cover; flex: none; }

/* Register: country select — fixed 44px box, so no vertical padding (it clipped the text) */
.country-select select#register-country { height: 44px !important; min-height: 44px; padding: 0 40px 0 14px !important; line-height: 1.2 !important; font-size: 15px !important; }
.country-select::after { pointer-events: none; }

/* YouTube header link (next to X / Instagram) */
.btn-yt { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }
.btn-yt .yt-ico { display: block; }
.btn-yt:hover { background: #FF0000 !important; color: #fff !important; border-color: transparent !important; }

/* ==========================================================================
   DEV LAB (devlab.js, developers only): every shop item, one click, in the room
   ========================================================================== */
.devlab { position: fixed; left: 12px; top: 12px; bottom: 12px; width: 252px; z-index: 60; display: flex; font-family: var(--f-body); color: var(--fg-1); pointer-events: none; }
.devlab[hidden] { display: none; }
.devlab .dl-body { pointer-events: auto; display: flex; flex-direction: column; width: 100%; min-height: 0; background: rgba(21, 24, 29, .96); border: 1px solid var(--line-strong); border-top: 2px solid var(--ok); border-radius: var(--r-lg); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); overflow: hidden; }
.devlab.is-closed .dl-body { display: none; }
.devlab .dl-tab-btn { pointer-events: auto; display: none; align-self: flex-start; writing-mode: vertical-rl; transform: rotate(180deg); padding: 12px 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-2); color: var(--ok); font: 800 11px/1 var(--f-display); letter-spacing: .14em; cursor: pointer; }
.devlab.is-closed .dl-tab-btn { display: block; }
.devlab .dl-tab-btn:hover { background: var(--bg-3); }
.dl-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 10px 8px 12px; border-bottom: 1px solid var(--line); }
.dl-head b { font: 800 13px/1 var(--f-display); letter-spacing: .12em; color: var(--ok); }
.dl-sub { flex: 1; font-size: 11px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-x { width: 24px; height: 22px; border: 0; border-radius: 3px; background: var(--bg-3); color: var(--fg-1); font-weight: 800; cursor: pointer; }
.dl-x:hover { background: var(--bg-4); }
.dl-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px 4px; }
.dl-tabs button { flex: 1 1 auto; padding: 5px 7px; border: 0; border-radius: 3px; background: var(--bg-3); color: var(--fg-2); font: 700 10.5px/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.dl-tabs button:hover { color: var(--fg-0); }
.dl-tabs button.is-on { background: var(--ok); color: #062A14; }
.dl-tools { display: flex; gap: 6px; padding: 6px 10px; }
.dl-q { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--bg-0); color: var(--fg-0); font: 500 12px var(--f-body); }
.dl-q:focus-visible { outline: 2px solid var(--ok); outline-offset: 1px; }
.dl-team { display: flex; }
.dl-team[hidden] { display: none; }
.dl-team button { height: 28px; padding: 0 8px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-2); font: 700 11px var(--f-body); cursor: pointer; }
.dl-team button:first-child { border-radius: 3px 0 0 3px; } .dl-team button:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.dl-team button[data-team="red"].is-on { background: var(--red); color: #fff; } .dl-team button[data-team="blue"].is-on { background: var(--blue); color: #fff; }
.dl-stage { position: relative; margin: 4px 10px 0; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.dl-stage[hidden] { display: none; }
.dl-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
.dl-play { position: absolute; left: 6px; bottom: 6px; padding: 4px 8px; border: 0; border-radius: 3px; background: var(--orange); color: var(--orange-ink); font: 800 10.5px var(--f-body); cursor: pointer; }
.dl-play:disabled { background: rgba(0, 0, 0, .6); color: var(--fg-2); cursor: default; }
.dl-msg { min-height: 16px; padding: 4px 12px 0; font-size: 11px; color: var(--ok); }
.dl-msg.is-err { color: #FF7A72; }
.dl-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 10px 12px; align-content: start; scrollbar-width: thin; }
.dl-empty { grid-column: 1 / -1; color: var(--fg-3); font-size: 12px; }
.dl-item { --rar: #9BA1AC; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px 4px 6px; border: 1px solid var(--line); border-top: 2px solid var(--rar); border-radius: 4px; background: var(--bg-2); color: var(--fg-1); text-align: left; cursor: pointer; min-width: 0; }
.dl-item:hover { background: var(--bg-3); border-color: var(--line-strong); }
.dl-item:focus-visible { outline: 2px solid var(--ok); outline-offset: 1px; }
.dl-item.is-eq { box-shadow: inset 0 0 0 2px var(--ok); }
.dl-item.is-busy { opacity: .6; }
.dl-item[data-rar="rare"] { --rar: #4C8FE8; } .dl-item[data-rar="epic"] { --rar: #A77BE8; } .dl-item[data-rar="legendary"] { --rar: var(--gold); }
.dl-item[data-rar="mythic"] { --rar: #FF4FB0; } .dl-item[data-rar="exclusive"] { --rar: var(--orange); }
.dl-item--none { --rar: var(--fg-3); }
.dl-thumb { display: grid; place-items: center; height: 58px; border-radius: 3px; overflow: hidden; background: var(--bg-0); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-thumb--none { font: 700 11px var(--f-body); color: var(--fg-3); }
.dl-art { display: grid; place-items: center; width: 100%; height: 100%; }
.dl-art--bg > * { width: 100%; height: 100%; }
.dl-art--av .cos-av-wrap, .dl-art--av > * { transform: scale(.8); }
.dl-art--nc { font: 800 13px var(--f-display); }
.dl-art--badge { transform: scale(.75); transform-origin: center; }
.dl-name { font: 700 11.5px/1.15 var(--f-body); color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-rar { font-size: 10px; color: var(--rar); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .devlab { width: 220px; } }

/* Dev Lab open: the lobby and the pitch make room for it on wide screens */
body.devlab-reserve #lobby-screen { padding-left: var(--devlab-reserve, 0px); }
body.devlab-reserve .game-area-wrapper { margin-left: var(--devlab-reserve, 0px); width: calc(100% - var(--devlab-reserve, 0px)); }
.devlab.is-closed { width: auto !important; }
.dl-share { display: flex; align-items: center; gap: 7px; margin: 0 10px 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; font-weight: 600; color: var(--fg-2); cursor: pointer; user-select: none; }
.dl-share[hidden] { display: none; }
.dl-share input { width: 15px; height: 15px; margin: 0; accent-color: var(--orange); cursor: pointer; }
.devlab.is-sharing .dl-share { border-color: var(--orange); color: var(--fg-0); background: rgba(255, 107, 26, .12); }

/* Real Match restart call (THROW-IN / CORNER / GOAL KICK / OFFSIDE): a pill in the HUD row left of the
   scoreboard, never over the pitch. Mobile: a small pill under the score. */
#game-screen .game-topbar > .real-match-indicator.in-hud {
    position: static; transform: none; grid-column: 1; grid-row: 1; justify-self: end; align-self: center; z-index: auto;
    flex-direction: row; gap: 8px; margin-right: 12px; padding: 0 6px 0 12px; height: 32px; box-sizing: border-box;
    background: var(--ink-2); border: 1px solid var(--accent-gold, #F5B942); border-radius: var(--r); box-shadow: none;
    animation: rmHudIn .25s ease-out; pointer-events: none; white-space: nowrap;
}
#game-screen .game-topbar > .game-rec:not(.hidden) ~ .real-match-indicator.in-hud { margin-right: 96px; }
#game-screen .game-topbar > .real-match-indicator.in-hud .rm-type { font-size: 1.15rem; line-height: 1; letter-spacing: 1.5px; }
#game-screen .game-topbar > .real-match-indicator.in-hud .rm-team { font-size: .8rem; padding: 3px 8px; line-height: 1; }
@keyframes rmHudIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
body.is-mobile .real-match-indicator { top: 46px; padding: 4px 10px; flex-direction: row; gap: 6px; border-width: 1px; box-shadow: none; }
body.is-mobile .real-match-indicator .rm-type { font-size: 1rem; }
body.is-mobile .real-match-indicator .rm-team { font-size: .7rem; padding: 2px 6px; }
@media (prefers-reduced-motion: reduce) { #game-screen .game-topbar > .real-match-indicator.in-hud { animation: none; } }

/* Room player rows: the name never gets squeezed out by a long title (FIRST WHISTLE ...).
   The name keeps one line with "…" at the end; flag / crown / pills keep their size; the title
   becomes its icon alone when the list is narrow, and on very narrow lists it goes. */
.player-list { container-type: inline-size; }
.player-item .player-name { flex: 1 1 auto; min-width: 64px; white-space: nowrap; }
.player-item .player-name > * { flex-shrink: 0; }
.player-item .player-name > .pn-text { flex: 0 1 auto; min-width: 2.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* name still cut after the title went to its icon: drop the title and #N, staff pills to one short tag */
.player-item.row-tight .player-title-slot, .player-item.row-tight .mode-top { display: none !important; }
.player-item.row-tight .player-name .staff-badge[data-short], .player-item.row-tight .player-name .nb-dev-pill[data-short] { font-size: 0 !important; padding: 0 4px !important; }
.player-item.row-tight .player-name .staff-badge[data-short]::after, .player-item.row-tight .player-name .nb-dev-pill[data-short]::after { content: attr(data-short); font-size: 9px; letter-spacing: .04em; }
.player-item.row-tight .player-name { gap: 3px; }
.player-item .pn-crown { margin-left: 2px; }
.player-item .player-title-slot { flex: 0 0 auto; display: inline-flex; align-items: center; min-width: 0; }
.player-item .player-title-slot .player-title { margin-left: 0; }
.player-item .player-title-mini { display: none; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: var(--r); font-size: 13px; line-height: 1;
    background: color-mix(in srgb, var(--title-color) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--title-color) 45%, transparent); }
.player-item .player-ping { flex-shrink: 0; }
/* (set per row by game.js fitPlayerTitles: only when the full title would cut the name) */
.player-item.title-compact .player-title-slot .player-title { display: none; }
.player-item.title-compact .player-title-mini { display: inline-flex; }
@container (max-width: 210px) {
    .player-item .player-title-slot { display: none; }
}

/* Shop: coupon code box (footer, right) */
.shop-coupon { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.shop-coupon-in { width: 168px; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-0); color: var(--fg-0);
    font: 700 13px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.shop-coupon-in::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--fg-3); }
.shop-coupon-in:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.shop-coupon-btn { height: 32px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--orange); color: #1A0900; font: 700 12px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.shop-coupon-btn:hover { filter: brightness(1.08); }
.shop-coupon-btn:disabled { opacity: .55; cursor: default; }
.shop-coupon-msg { flex-basis: 100%; text-align: right; font-size: 12px; min-height: 0; color: var(--fg-2); }
.shop-coupon-msg:empty { display: none; }
.shop-coupon-msg.is-ok { color: var(--ok); font-weight: 600; }
.shop-coupon-msg.is-err { color: #FF8A8A; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .shop-panel .modal-footer { flex-wrap: wrap; } .shop-coupon { width: 100%; justify-content: stretch; } .shop-coupon-in { flex: 1; width: auto; } .shop-coupon-msg { text-align: left; } }
#shop-coupon .shop-coupon-in { width: 180px; flex: 0 0 180px; margin: 0; }
#shop-coupon .shop-coupon-btn { flex: 0 0 auto; margin: 0; }
#shop-coupon { flex: 0 0 auto; max-width: 100%; }
@media (max-width: 640px) { #shop-coupon { flex: 1 1 100%; } #shop-coupon .shop-coupon-in { flex: 1 1 auto; width: auto; } }

/* Settings -> Quick chat: four slots laid out like the in-game cross, each opens the list of lines */
#settings-modal .st-h-sub { margin-left: 8px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--fg-3); }
.qcs { position: relative; display: grid; grid-template-columns: 1fr minmax(84px, .6fr) 1fr; grid-template-areas: ". up ." "left mid right" ". down ."; gap: 8px; align-items: center; margin: 4px 0 8px; }
.qcs-up { grid-area: up; } .qcs-left { grid-area: left; } .qcs-right { grid-area: right; } .qcs-down { grid-area: down; }
.qcs-up, .qcs-down { justify-self: center; min-width: 180px; }
.qcs-slot { display: flex; align-items: center; gap: 8px; min-width: 0; height: 38px; padding: 0 10px 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-2); color: var(--fg-0); font: 600 13px/1 var(--f-body); cursor: pointer; text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.qcs-slot kbd { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 3px; background: var(--bg-4); color: var(--fg-1); font: 700 13px/1 var(--f-display); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }
.qcs-slot .qcs-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcs-slot i { flex: none; font-style: normal; color: var(--fg-3); font-size: 11px; transition: transform var(--t-fast); }
.qcs-slot:hover { border-color: var(--fg-3); background: var(--bg-3); }
.qcs-slot:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.qcs-slot.open { border-color: var(--orange); background: var(--bg-3); }
.qcs-slot.open i { transform: rotate(180deg); color: var(--orange); }
.qcs-slot.saved { border-color: var(--ok); }
.qcs-mid { grid-area: mid; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--fg-3); font: 600 10px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
.qcs-mid b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--orange); font: 800 14px/1 var(--f-display); }
.qcs-pop { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; max-height: 260px; overflow-y: auto; padding: 8px;
    background: var(--bg-1); border: 1px solid var(--orange); border-radius: var(--r-lg); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.qcs-pop[hidden] { display: none; }
.qcs-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 3px; background: var(--bg-2); color: var(--fg-1); font: 600 12.5px/1 var(--f-body); cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcs-opt:hover, .qcs-opt:focus-visible { background: var(--bg-3); color: var(--fg-0); outline: none; border-color: var(--line-strong); }
.qcs-opt.on { background: var(--orange); color: #1A0900; }
.qcs-used { flex: none; font: 700 11px/1 var(--f-display); color: var(--fg-3); }
.qcs-opt.on .qcs-used { color: #1A0900; }
.qcs-reset { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--orange); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 560px) {
    .qcs { grid-template-columns: 1fr 1fr; grid-template-areas: "up up" "left right" "down down"; }
    .qcs-mid { display: none; }
    .qcs-up, .qcs-down { min-width: 0; width: 100%; }
    .qcs-pop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .qcs-slot, .qcs-slot i { transition: none; } }

/* Social open over the ESC lobby during a match: the lobby makes room for it on wide screens */
@media (min-width: 1100px) {
    body.social-open #lobby-screen[style*="fixed"] { padding-right: 344px; }
    body.social-open #lobby-screen[style*="fixed"] ~ #global-chat-panel { left: calc(50% - 160px); width: min(960px, calc(100% - 48px - 320px)); }
}

/* Register form: Referral code next to Country (invite.js checks it while typing) */
.register-grid .country-select { grid-column: auto; }
.ref-field { position: relative; min-width: 0; }
.ref-msg { min-height: 16px; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--fg-3, #8A909B); }
.ref-msg:empty { min-height: 0; margin: 0; }
.ref-msg b { color: #fff; }
.ref-msg.is-ok { color: var(--ok, #38D66B); }
.ref-msg.is-bad { color: #FF6B6B; }
#register-ref.is-ok { border-color: var(--ok, #38D66B) !important; }
#register-ref.is-bad { border-color: #FF6B6B !important; }

/* GOAL banner: a compact broadcast card at the top of the pitch instead of a full-width
   strip across the middle, so the goal explosion and the players stay visible. */
.goal-celebration { inset: auto !important; top: 14px !important; left: 50% !important; right: auto !important; bottom: auto !important; transform: translateX(-50%) !important; width: auto !important; max-width: calc(100% - 24px); height: auto; padding: 8px 18px 8px 22px !important; border: 0 !important; border-radius: 6px; background: rgba(12, 14, 19, .78) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .45) !important; backdrop-filter: blur(4px); flex-direction: row; flex-wrap: nowrap; gap: 14px; align-items: center; justify-content: center; white-space: nowrap; pointer-events: none; animation: ar-goal-drop 360ms cubic-bezier(.2, .9, .3, 1.2) !important; }
.goal-celebration::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 6px 0 0 6px; background: var(--red); }
.goal-celebration[data-team="blue"]::after { background: var(--blue); }
.goal-celebration.with-fx { background: rgba(12, 14, 19, .62) !important; }
@keyframes ar-goal-drop { from { opacity: 0; transform: translate(-50%, -24px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.goal-celebration .goal-text { font: italic 700 clamp(30px, 3.6vw, 46px)/1 var(--f-display) !important; letter-spacing: -.02em; }
.goal-celebration .goal-style { font-size: clamp(12px, 1.3vw, 16px) !important; padding: 5px 10px; }
.goal-celebration .goal-scorer { font-size: clamp(12px, 1.2vw, 15px); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.goal-celebration .goal-scorer:empty { display: none; }
html.is-mobile .goal-celebration { top: 8px !important; gap: 10px; padding: 6px 12px 6px 16px !important; }
html.is-mobile .goal-celebration .goal-text { font-size: clamp(24px, 7vw, 36px) !important; }

/* Real Match penalty shootout */
.pen-hud { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 22; min-width: 300px; max-width: calc(100% - 24px); padding: 10px 14px 10px; border-radius: 8px; background: rgba(12, 14, 19, .82); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(4px); color: var(--fg-0); pointer-events: none; font-family: var(--f-display); }
.pen-hud.hidden, .pen-flash.hidden, .pen-hud .hidden { display: none !important; }
.pen-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.pen-title { font: italic 700 15px/1 var(--f-display); letter-spacing: .14em; color: var(--orange); }
.pen-sd { font: 700 11px/1 var(--f-display); letter-spacing: .12em; background: #ef4444; color: #fff; padding: 3px 6px; border-radius: 3px; }
.pen-rows { display: flex; flex-direction: column; gap: 5px; }
.pen-row { display: grid; grid-template-columns: 44px 1fr 22px; align-items: center; gap: 8px; }
.pen-team { font: 700 12px/1 var(--f-display); letter-spacing: .12em; }
.pen-row.red .pen-team { color: #f87171; } .pen-row.blue .pen-team { color: #60a5fa; }
.pen-row.turn .pen-team::before { content: '▶ '; }
.pen-dots { display: flex; gap: 5px; flex-wrap: nowrap; }
.pen-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); box-sizing: border-box; flex: 0 0 auto; }
.pen-dot.goal { background: #22c55e; border-color: #22c55e; }
.pen-dot.miss { background: transparent; border-color: #ef4444; position: relative; }
.pen-dot.miss::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #ef4444; font: 700 10px/1 var(--f-body); }
.pen-goals { font: 700 18px/1 var(--f-display); text-align: right; }
.pen-duel { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font: 700 13px/1.2 var(--f-body); white-space: nowrap; }
.pen-kicker, .pen-keeper { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.pen-kicker::before { content: 'KICK '; font-size: .8em; letter-spacing: .08em; opacity: .7; } .pen-keeper::before { content: 'GK '; font-size: .8em; letter-spacing: .08em; opacity: .7; }
.pen-vs { color: var(--fg-2); font-size: 11px; text-transform: uppercase; }
.pen-clock { min-width: 22px; text-align: center; padding: 2px 6px; border-radius: 3px; background: var(--orange); color: #0f1115; font: 700 13px/1 var(--f-display); }
.pen-clock:empty { display: none; }
.pen-role { margin-top: 8px; text-align: center; font: 700 12px/1.3 var(--f-body); color: #fde68a; }
.pen-flash { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); z-index: 22; padding: 8px 22px; border-radius: 6px; font: italic 700 clamp(28px, 4vw, 48px)/1 var(--f-display); letter-spacing: -.01em; color: #fff; background: rgba(12, 14, 19, .8); pointer-events: none; animation: ar-goal-drop 300ms cubic-bezier(.2, .9, .3, 1.2) both; }
.pen-flash.goal { box-shadow: inset 0 -4px 0 #22c55e; } .pen-flash.saved { box-shadow: inset 0 -4px 0 #60a5fa; } .pen-flash.missed { box-shadow: inset 0 -4px 0 #ef4444; }
html.is-mobile .pen-hud { top: 6px; min-width: 0; padding: 8px 10px; }
html.is-mobile .pen-dot { width: 12px; height: 12px; }

/* Chat peek grip (chat-grip.js): hold + drag up to read older messages, let go to shrink back (desktop) */
.chat-grip { flex: none; height: 12px; margin-bottom: -4px; display: flex; align-items: center; justify-content: center; cursor: ns-resize; touch-action: none; user-select: none; position: relative; z-index: 2; }
.chat-grip span { width: 44px; height: 4px; border-radius: 2px; background: var(--fg-3, rgba(255, 255, 255, .28)); opacity: .55; transition: opacity .15s, background .15s, width .15s; }
.chat-grip:hover span, .chat-peek .chat-grip span { opacity: 1; width: 56px; background: var(--fg-2, rgba(255, 255, 255, .6)); }
.game-chat-panel.chat-peek { z-index: 80; box-shadow: 0 -18px 40px rgba(0, 0, 0, .55), 0 0 0 1px var(--line, rgba(255, 255, 255, .1)) !important; }
body.is-mobile .chat-grip, html.is-mobile .chat-grip { display: none; }
.game-chat-panel.chat-peek .chat-messages { max-height: none !important; }

/* Developer moderation menu (devmod.js) */
.devmod-menu { position: fixed; z-index: 10050; display: none; min-width: 230px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 6px; background: var(--bg-1, #15181D); border: 1px solid var(--line-2, rgba(255, 255, 255, .14)); border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); font: 500 13px/1.2 var(--f-body, system-ui); color: var(--fg-1, #e8e8e8); }
.devmod-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line, rgba(255, 255, 255, .08)); margin-bottom: 4px; }
.devmod-head b { font: 700 14px/1.2 var(--f-display, system-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devmod-tag { flex: none; padding: 2px 6px; border-radius: 4px; background: #16a34a; color: #fff; font: 800 10px/1.3 var(--f-display, system-ui); letter-spacing: .08em; }
.devmod-group { padding: 8px 10px 4px; font: 700 10px/1 var(--f-display, system-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3, #8a8f98); }
.devmod-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.devmod-item:hover, .devmod-item:focus-visible { background: var(--bg-3, rgba(255, 255, 255, .07)); outline: none; }
.devmod-item.is-danger { color: #f87171; }
.devmod-item.is-armed { background: #dc2626; color: #fff; }
.devmod-ico { width: 18px; text-align: center; flex: none; }
.devmod-toast { position: fixed; left: 50%; bottom: 24px; z-index: 10060; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 8px; background: #14532d; color: #fff; font: 600 13px/1.3 var(--f-body, system-ui); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .18s, transform .18s; }
.devmod-toast.is-err { background: #7f1d1d; }
.devmod-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   KIT MAKER (kit-maker.js, kits.js): menu tile + designer
   ========================================================================== */
/* the Bot Match row is split: Bot Match | Kit Maker */
body:not(.is-offline) #btn-play-bots { grid-column: 5 / 6; grid-row: 3; min-height: 92px !important; }
#btn-kit-maker { grid-column: 6 / 7; grid-row: 3; min-height: 92px !important; }
body:not(.is-offline) #btn-play-bots .play-badge, #btn-kit-maker .play-badge { display: none; }
body:not(.is-offline) #btn-play-bots .play-content, #btn-kit-maker .play-content { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 12px 11px !important; }
body:not(.is-offline) #btn-play-bots .play-subtitle, #btn-kit-maker .play-subtitle { -webkit-line-clamp: 1; font-size: 11px; }
#btn-kit-maker .play-title { font-size: 13px !important; }
.play-btn-kit { background: radial-gradient(110% 120% at 85% 20%, #33404f 0%, #1b2129 55%, var(--bg-1) 100%) !important; }
.play-btn-kit .kit-tile-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: transform var(--t-slow); transform-origin: right center; }
.play-btn-kit:hover .kit-tile-art { transform: scale(1.05); }
.play-btn-kit::after { content: '' !important; display: block !important; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(15, 17, 21, .85) 0%, rgba(15, 17, 21, .35) 55%, rgba(15, 17, 21, 0) 100%), linear-gradient(180deg, rgba(15, 17, 21, 0) 50%, rgba(15, 17, 21, .7) 100%); pointer-events: none; }
.play-btn-kit .new-badge-floating { z-index: 2; }
@media (max-width: 1100px) {
    body:not(.is-offline) #btn-play-bots { grid-column: 1 / 3; grid-row: 3; } #btn-kit-maker { grid-column: 3 / 5; grid-row: 3; }
}
@media (max-width: 640px) {
    body:not(.is-offline) #btn-play-bots { grid-column: 1; grid-row: 3; } #btn-kit-maker { grid-column: 2; grid-row: 3; }
}
body.is-offline #btn-kit-maker { display: none; }
body.is-offline #btn-play-bots { grid-column: 5 / 7; }

.km { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 6, 9, .78); }
.km.hidden { display: none; }
body.km-open { overflow: hidden; }
.km-box { width: min(1180px, 100%); max-height: min(860px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.km-head { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.km-title { margin-right: auto; }
.km-kicker { font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.km-title h2 { margin: 4px 0 0; font: 700 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; color: var(--fg-0); }
.km-target, .km-views { display: inline-flex; background: var(--bg-2); border-radius: var(--r); padding: 3px; gap: 2px; }
.km-target button, .km-views button { height: 32px; padding: 0 14px; border: 0; border-radius: 3px; background: none; color: var(--fg-2); font: 700 12px var(--f-display); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.km-target button.on, .km-views button.on { background: var(--orange); color: var(--orange-ink); }
.km-target button:disabled { opacity: .45; cursor: not-allowed; }
.km-tag { opacity: .8; }
.km-x { width: 36px; height: 36px; border: 0; border-radius: var(--r); background: var(--bg-2); color: var(--fg-1); font-size: 22px; line-height: 1; cursor: pointer; }
.km-x:hover { background: var(--bg-3); color: var(--fg-0); }
.km-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.km-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: radial-gradient(90% 70% at 50% 35%, #2b313c 0%, #161a20 60%, #0f1115 100%); border-right: 1px solid var(--line); min-height: 0; }
.km-views { position: absolute; top: 14px; left: 14px; z-index: 1; }
.km-shirt { width: min(100%, 420px); height: auto; aspect-ratio: 760 / 800; flex: 0 1 auto; min-height: 0; }
.km-pitch-wrap { width: min(100%, 460px); }
.km-cap { display: block; margin-bottom: 6px; font: 700 10px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.km-pitch { width: 100%; height: auto; border-radius: var(--r); display: block; }
.km-side { overflow-y: auto; padding: 6px 18px 18px; }
.km-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.km-sec:last-child { border-bottom: 0; }
.km-sec h3 { margin: 0 0 10px; font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.km-presets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.km-preset { flex: none; width: 78px; padding: 4px 2px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); color: var(--fg-1); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 10.5px var(--f-body); }
.km-preset canvas { width: 64px; height: auto; }
.km-preset:hover { border-color: var(--fg-2); }
.km-patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.km-pat { position: relative; padding: 0 0 4px; border: 2px solid transparent; border-radius: var(--r); background: var(--bg-2); cursor: pointer; color: var(--fg-2); font: 600 10.5px var(--f-body); display: flex; flex-direction: column; align-items: center; gap: 4px; overflow: hidden; }
.km-pat canvas { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.km-pat:hover { color: var(--fg-0); }
.km-pat.on { border-color: var(--orange); color: var(--fg-0); }
.km-density { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.km-density.hidden { display: none; }
.km-density label { font: 700 11px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.km-density input { flex: 1; accent-color: var(--orange); }
.km-dv { width: 26px; font: 700 12px var(--f-display); color: var(--fg-0); text-align: right; }
.km-crow { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 10px; padding: 5px 0; }
.km-clabel { font: 600 12.5px var(--f-body); color: var(--fg-1); }
.km-sw { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.km-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12); background: var(--c); cursor: pointer; padding: 0; }
.km-swatch:hover { transform: scale(1.12); }
.km-swatch.on { border-color: var(--fg-0); box-shadow: 0 0 0 2px var(--orange); }
.km-custom { position: relative; width: 24px; height: 24px; cursor: pointer; margin-left: 2px; }
.km-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.km-custom span { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle, var(--c) 0 38%, var(--bg-1) 40% 50%, transparent 52%), conic-gradient(#f33, #fd3, #3d5, #3de, #36f, #c3f, #f33); }
.km-necks { display: flex; gap: 6px; }
.km-neck { height: 34px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-2); color: var(--fg-1); font: 700 12px var(--f-display); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.km-neck.on { border-color: var(--orange); color: var(--fg-0); box-shadow: inset 0 0 0 1px var(--orange); }
.km-pat:disabled, .km-swatch:disabled, .km-neck:disabled { cursor: default; opacity: .55; }
.km-foot { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-0); }
.km-note { flex: 1; font: 500 12.5px/1.4 var(--f-body); color: var(--fg-2); }
.km-actions { display: flex; align-items: center; gap: 10px; }
.km-wear { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px var(--f-body); color: var(--fg-1); cursor: pointer; }
.km-wear input { accent-color: var(--orange); width: 16px; height: 16px; }
.km-btn { height: 38px; padding: 0 18px; border-radius: var(--r); font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; border: 1px solid transparent; }
.km-btn.primary { background: var(--orange); color: var(--orange-ink); }
.km-btn.primary:hover:not(:disabled) { background: var(--orange-hi); }
.km-btn.ghost { background: none; border-color: var(--line-strong); color: var(--fg-1); }
.km-btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 860px) and (orientation: portrait) {
    .km { padding: 0; }
    .km-box { max-height: 100vh; height: 100%; border-radius: 0; }
    .km-head { flex-wrap: wrap; gap: 10px; }
    .km-body { grid-template-columns: 1fr; overflow-y: auto; }
    .km-stage { border-right: 0; border-bottom: 1px solid var(--line); }
    .km-shirt { width: min(70vw, 300px); }
    .km-side { overflow: visible; }
    .km-foot { flex-wrap: wrap; }
}

/* lobby: team kit switch on a side's header */
/* phones in landscape / short windows: keep the two columns, size the shirt by height */
@media (max-height: 600px) {
    .km { padding: 0; }
    .km-box { max-height: 100vh; height: 100%; border-radius: 0; }
    .km-head { padding: 8px 14px; }
    .km-title h2 { font-size: 16px; }
    .km-kicker { display: none; }
    .km-target button, .km-views button { height: 28px; padding: 0 10px; }
    .km-stage { padding: 8px; gap: 6px; }
    .km-shirt { width: auto; height: calc(100vh - 230px); max-height: 420px; }
    .km-pitch-wrap { width: min(100%, 300px); }
    .km-cap { display: none; }
    .km-views { top: 8px; left: 8px; }
    .km-foot { padding: 8px 14px; }
    .km-note { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .km-btn { height: 32px; padding: 0 12px; }
}
.team-kit-btn { margin-left: 8px; height: 26px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-2); color: var(--fg-1); font: 700 10.5px var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.team-kit-btn.on { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.team-kit-btn canvas { width: 16px; height: 16px; }
#btn-kit-maker .new-badge-floating { top: 8px !important; left: 8px !important; right: auto !important; bottom: auto !important; }
.km-code { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px dashed var(--orange); border-radius: var(--r); font: 600 12px var(--f-body); color: var(--fg-2); }
.km-code b { font: 700 16px var(--f-display); letter-spacing: .14em; color: var(--fg-0); }
.km-copy { height: 28px; padding: 0 10px; border: 0; border-radius: 3px; background: var(--bg-3); color: var(--fg-0); font: 700 11px var(--f-display); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.km-copy:hover { background: var(--orange); color: var(--orange-ink); }

/* ================= EVENTS (events.js): home banner, modals, in-room panel ================= */
.ev-banner { position: relative; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; padding: 14px 18px; border: 1px solid rgba(228, 177, 58, .38); border-radius: var(--r-lg); background: linear-gradient(100deg, rgba(228, 177, 58, .16), rgba(228, 177, 58, .04) 38%, var(--bg-1) 70%); cursor: pointer; overflow: hidden; }
.ev-banner.hidden { display: none !important; }
.ev-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .05) 45%, transparent 60%); background-size: 260% 100%; animation: ev-sheen 6s linear infinite; pointer-events: none; }
@keyframes ev-sheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.ev-banner.ev-live { border-color: rgba(255, 106, 19, .55); background: linear-gradient(100deg, rgba(255, 106, 19, .2), rgba(255, 106, 19, .05) 38%, var(--bg-1) 70%); }
.ev-trophy { width: 52px; height: 52px; display: grid; place-items: center; font-size: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(228, 177, 58, .35), rgba(228, 177, 58, .06) 70%); box-shadow: inset 0 0 0 1px rgba(228, 177, 58, .45); }
.ev-main { min-width: 0; }
.ev-kicker { font: 700 11px/1.2 var(--f-display); letter-spacing: .14em; color: var(--gold-hi); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.ev-live .ev-kicker { color: var(--orange-hi); }
.ev-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 106, 19, .7); animation: ev-pulse 1.4s infinite; }
@keyframes ev-pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 106, 19, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 106, 19, 0); } }
.ev-title { font: 700 22px/1.15 var(--f-display); color: var(--fg-0); margin: 3px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { font: 500 13px/1.3 var(--f-body); color: var(--fg-2); }
.ev-sub b, .ev-count b, .evp-clock b { color: var(--fg-0); font-variant-numeric: tabular-nums; font-weight: 700; }
.ev-top-prize { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-left: 16px; border-left: 1px solid var(--line-strong); max-width: 260px; }
.ev-tp-l { font: 700 10px/1 var(--f-display); letter-spacing: .12em; color: var(--fg-2); text-transform: uppercase; }
.ev-top-prize .ev-coin, .ev-top-prize .ev-item { margin-right: 4px; }
.ev-acts, .ev-macts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.ev-btn { appearance: none; border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--fg-0); font: 700 13px/1 var(--f-display); letter-spacing: .04em; padding: 10px 14px; border-radius: var(--r); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background var(--t-fast), transform var(--t-fast); }
.ev-btn:hover { background: var(--bg-4); }
.ev-btn:active { transform: translateY(1px); }
.ev-btn:disabled { opacity: .45; cursor: default; }
.ev-btn-go { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.ev-btn-go:hover { background: var(--gold-hi); }
.ev-live .ev-btn-go { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.ev-btn-team { border-color: rgba(228, 177, 58, .5); }
.ev-btn-ghost { background: transparent; }
.ev-closed, .ev-hint { font: 600 12px/1.2 var(--f-body); color: var(--fg-2); padding: 0 4px; }
.ev-coin { display: inline-flex; align-items: center; gap: 4px; font: 700 13px/1 var(--f-display); color: var(--gold-hi); padding: 4px 7px; border-radius: 3px; background: rgba(228, 177, 58, .12); }
.ev-item { display: inline-block; font: 600 12px/1.2 var(--f-body); color: var(--fg-1); padding: 4px 7px; border-radius: 3px; background: var(--bg-3); border-left: 2px solid #8a93a3; margin: 2px 4px 2px 0; }
.ev-item.r-rare { border-left-color: #3d8bff; } .ev-item.r-epic { border-left-color: #a35bff; } .ev-item.r-legendary { border-left-color: #ffb020; } .ev-item.r-mythic { border-left-color: #ff4d6d; } .ev-item.r-exclusive { border-left-color: #2fe0c0; }
.ev-none { color: var(--fg-3); font-size: 13px; }

/* modal */
.ev-modal { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 9, .72); animation: ev-fade var(--t) both; }
@keyframes ev-fade { from { opacity: 0; } }
.ev-modal-card { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--bg-1); border: 1px solid rgba(228, 177, 58, .35); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); animation: ar-rise var(--t-slow) both; }
.ev-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--fg-2); font-size: 24px; cursor: pointer; border-radius: var(--r); }
.ev-x:hover { color: var(--fg-0); background: var(--bg-3); }
.ev-mh { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 30px; }
.ev-mh-icon { font-size: 34px; width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(228, 177, 58, .3), rgba(228, 177, 58, .05) 70%); box-shadow: inset 0 0 0 1px rgba(228, 177, 58, .4); }
.ev-mh h2 { margin: 3px 0 0; font: 700 24px/1.15 var(--f-display); color: var(--fg-0); }
.ev-desc { color: var(--fg-1); font: 400 14px/1.5 var(--f-body); margin: 0 0 14px; }
.ev-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.ev-facts > div { background: var(--bg-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ev-facts span { font: 700 10px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.ev-facts b { font: 600 13px/1.3 var(--f-body); color: var(--fg-0); }
.ev-how { display: grid; gap: 6px; font: 400 13px/1.45 var(--f-body); color: var(--fg-1); margin-bottom: 16px; }
.ev-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 18px; align-items: end; }
.ev-step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ev-step-1 { order: 2; border-color: rgba(228, 177, 58, .55); background: linear-gradient(180deg, rgba(228, 177, 58, .14), var(--bg-2)); padding-top: 20px; }
.ev-step-2 { order: 1; } .ev-step-3 { order: 3; }
.ev-medal { font-size: 28px; line-height: 1; }
.ev-place { font: 700 12px/1 var(--f-display); letter-spacing: .1em; color: var(--fg-2); text-transform: uppercase; }
.ev-prize { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.ev-prize .ev-item { margin: 0; }
.ev-count { font: 500 13px/1 var(--f-body); color: var(--fg-2); margin-right: auto; }
.ev-macts { justify-content: flex-end; }
.ev-mates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 10px; }
.ev-mate { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font: 600 13px/1.2 var(--f-body); color: var(--fg-0); }
.ev-mate:has(input:checked) { border-color: var(--gold); background: rgba(228, 177, 58, .1); }
.ev-mate:has(input:disabled) { opacity: .5; cursor: default; }
.ev-mate input { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; }
.ev-mate i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--fg-3); }
.ev-pick-count { font: 600 12px/1 var(--f-body); color: var(--fg-2); margin-bottom: 14px; }
.ev-err { color: #ff7b72; font: 600 13px/1.3 var(--f-body); margin-bottom: 10px; }
.ev-loading { color: var(--fg-2); padding: 18px 0; }
.ev-won { padding: 12px 14px; border-radius: var(--r); background: rgba(228, 177, 58, .12); border: 1px solid rgba(228, 177, 58, .4); color: var(--fg-0); font: 500 14px/1.6 var(--f-body); margin-bottom: 14px; }
.ev-winners { display: grid; gap: 6px; margin-bottom: 14px; }
.ev-wrow { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-2); border-radius: var(--r); }
.ev-wn { font: 700 15px/1.2 var(--f-display); color: var(--fg-0); }
.ev-ww { font: 500 12px/1 var(--f-body); color: var(--fg-2); }
.ev-table { width: 100%; border-collapse: collapse; font: 500 13px/1.3 var(--f-body); margin-bottom: 16px; }
.ev-table th { text-align: left; font: 700 10px/1 var(--f-display); letter-spacing: .1em; color: var(--fg-3); text-transform: uppercase; padding: 6px; border-bottom: 1px solid var(--line); }
.ev-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); color: var(--fg-1); font-variant-numeric: tabular-nums; }
.ev-table tr.me td { color: var(--fg-0); background: rgba(228, 177, 58, .08); }

/* in-room panel */
.ev-panel { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 850; width: min(760px, calc(100% - 24px)); background: rgba(15, 17, 21, .92); border: 1px solid rgba(228, 177, 58, .4); border-radius: var(--r-lg); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8); font-family: var(--f-body); color: var(--fg-1); }
.ev-panel[hidden] { display: none; }
.evp-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; min-height: 36px; flex-wrap: nowrap; overflow: hidden; }
.evp-trophy { font-size: 16px; }
.evp-title { font: 700 14px/1 var(--f-display); color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.evp-phase { font: 700 10px/1 var(--f-display); letter-spacing: .12em; padding: 4px 6px; border-radius: 3px; background: rgba(228, 177, 58, .18); color: var(--gold-hi); white-space: nowrap; }
.evp-phase.evp-live, .evp-phase.evp-finishing { background: rgba(255, 106, 19, .2); color: var(--orange-hi); }
.evp-clock, .evp-me, .evp-champ { font-size: 12px; white-space: nowrap; color: var(--fg-2); }
.evp-me { color: var(--fg-0); font-weight: 600; }
.evp-champ { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.evp-toggle { margin-left: auto; color: var(--fg-2); }
.evp-body { display: none; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.ev-panel.open .evp-body { display: grid; }
.evp-h { font: 700 10px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); margin: 10px 0 6px; }
.evp-h small { color: var(--fg-2); font-size: 10px; margin-left: 4px; }
.evp-lb, .evp-q { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; counter-reset: q; }
.evp-lb li, .evp-q li { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 3px 6px; border-radius: 3px; background: var(--bg-2); counter-increment: q; }
.evp-lb li::before, .evp-q li::before { content: counter(q); color: var(--fg-3); font-size: 11px; width: 14px; }
.evp-lb li.p1 { background: rgba(228, 177, 58, .14); } .evp-lb li.p2 { background: rgba(200, 205, 215, .1); } .evp-lb li.p3 { background: rgba(205, 127, 50, .12); }
.evp-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-0); }
.evp-w { font-weight: 700; color: var(--fg-0); font-variant-numeric: tabular-nums; }
.evp-s { font-size: 11px; color: var(--fg-2); }
.evp-q li.evp-more { background: transparent; color: var(--fg-3); }
.evp-q li.evp-more::before { content: none; }
.evp-pr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.evp-rule { margin-top: 8px; font-size: 11px; color: var(--fg-3); }
.evp-empty { font-size: 12px; color: var(--fg-3); }
/* System Host in the player list / chat */
.player-item.system-host { background: linear-gradient(90deg, rgba(228, 177, 58, .14), transparent); border-left: 2px solid var(--gold); cursor: default; }
.player-item.system-host .sh-name .pn-text { color: var(--gold-hi); font-family: var(--f-display); letter-spacing: .04em; }
.chat-sender.nb-syshost-name { color: var(--gold-hi); font-weight: 700; }
/* room browser */
.room-item.room-event { border-color: rgba(228, 177, 58, .45) !important; background: linear-gradient(90deg, rgba(228, 177, 58, .12), transparent 60%); }
.room-event-pill { font: 700 10px/1 var(--f-display); letter-spacing: .12em; padding: 5px 7px; border-radius: 3px; background: var(--gold); color: var(--gold-ink); }

@media (max-width: 900px) {
    .ev-banner { grid-template-columns: auto 1fr; gap: 10px 14px; }
    .ev-top-prize { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; border-left: 0; padding-left: 0; max-width: none; }
    .ev-acts { grid-column: 1 / -1; }
    .ev-acts .ev-btn { flex: 1; justify-content: center; }
}
@media (max-width: 560px) {
    .ev-banner { padding: 12px; }
    .ev-trophy { width: 40px; height: 40px; font-size: 22px; }
    .ev-title { font-size: 18px; }
    .ev-facts { grid-template-columns: 1fr 1fr; }
    .ev-modal-card { padding: 18px 16px; }
    .ev-mh h2 { font-size: 20px; }
    .ev-podium { gap: 6px; }
    .evp-champ, .evp-clock { display: none; }
    .evp-body { grid-template-columns: 1fr; gap: 0; max-height: 50vh; overflow: auto; }
    .ev-panel { top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .ev-banner::after, .ev-live-dot { animation: none; } }
.ev-tp-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ev-tp-row .ev-item { margin: 0; }
.ev-panel.in-lobby { position: relative; top: auto; left: auto; transform: none; width: auto; z-index: 1; margin: 0 0 12px; box-shadow: none; background: linear-gradient(100deg, rgba(228, 177, 58, .1), var(--bg-1) 50%); }
.ev-panel.in-game { left: 12px; transform: none; width: auto; max-width: min(520px, calc(50% - 150px)); }
.ev-panel.in-game:not(.open) .evp-champ { display: none; }
.ev-panel.in-game.open { width: min(620px, calc(100% - 24px)); max-width: none; }
@media (max-height: 500px) {
    .ev-panel.in-game { top: 44px; left: 50%; transform: translateX(-50%); max-width: 60vw; opacity: .92; }
    .ev-panel.in-game.open { width: min(560px, calc(100% - 24px)); }
    .ev-panel.in-game .evp-bar { min-height: 28px; padding: 4px 8px; gap: 6px; }
    .ev-panel.in-game .evp-title, .ev-panel.in-game .evp-clock { display: none; }
    .ev-panel.in-game .evp-body { max-height: 60vh; overflow: auto; }
}

/* ================= PROMO (promo.js): live challenges, deals of the day ================= */
.banner-preview-container { position: relative; }
.px-old { color: var(--fg-3); font-weight: 500; margin-right: 5px; text-decoration-thickness: 1.5px; }
.px-off { position: absolute; top: 6px; left: 6px; z-index: 2; font: 800 11px/1 var(--f-display); letter-spacing: .04em; padding: 4px 6px; border-radius: 3px; background: #E0322E; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.pm-th { position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 4px; background: #13161b; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pm-th--sm { width: 52px; height: 30px; } .pm-th--md { width: 96px; height: 54px; } .pm-th--lg { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.pm-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-th .banner-preview { transform: scale(.55); white-space: nowrap; }
.pm-th--lg .banner-preview { transform: scale(.85); }
.pm-th--cos .cos-art { width: 100%; height: 100%; display: grid; place-items: center; }
.pm-th--cos .cos-art--bg .cos-bg { width: 100%; height: 100%; }
.pm-th--sm .cos-av-wrap, .pm-th--sm .cos-art--av > * { transform: scale(.5); }
.pm-th--coins { font-size: 20px; }
.pm-flame { margin-right: 6px; }
.pm-end { color: var(--fg-2); font-weight: 500; }
.pm-end b { color: var(--fg-0); font-variant-numeric: tabular-nums; }
.pm-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pm-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold)); border-radius: 3px; transition: width .4s; }
/* home */
.pm-home { display: grid; gap: 10px; }
.pm-h { font: 700 12px/1 var(--f-display); letter-spacing: .14em; color: var(--orange-hi); display: flex; align-items: center; }
.pm-login { margin-left: 10px; color: var(--fg-3); letter-spacing: .04em; text-transform: none; font: 500 12px/1 var(--f-body); }
.pm-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.pm-card { position: relative; overflow: hidden; display: flex; gap: 12px; align-items: center; min-width: 0; min-height: 78px; padding: 10px 12px 10px 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%), var(--bg-1); border: 1px solid var(--line-strong); border-radius: var(--r-lg); transition: border-color .15s; }
.pm-card:hover { border-color: rgba(255, 106, 19, .55); }
.pm-card::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 2px 2px 0; background: var(--orange); }
.pm-card--title::before { background: var(--tc); }
.pm-card.is-done { border-color: rgba(56, 214, 107, .5); }
.pm-card.is-done::before { background: var(--ok); }
.pm-vis { flex: none; width: 76px; height: 50px; display: grid; }
.pm-vis > * { width: 100% !important; height: 100% !important; min-width: 0 !important; }
.pm-ct { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pm-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pm-title { flex: 1; min-width: 0; font: 700 14px/1.2 var(--f-display); color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-clock { flex: none; font: 600 11px/1 var(--f-body); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.pm-clock { display: inline-flex; align-items: center; gap: 4px; }
.pm-clock .nbi { font-size: 11px; opacity: .7; }
.pm-clock b { font-weight: 700; color: var(--fg-1); }
.pm-scope, .pm-desc { font: 500 12px/1.3 var(--f-body); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 600 12px/1.2 var(--f-body); min-width: 0; }
.pm-row--boost { color: var(--orange-hi); }
.pm-row--boost span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-count { flex: none; color: var(--fg-0); font-variant-numeric: tabular-nums; }
.pm-rew { min-width: 0; color: var(--gold-hi); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-ct .pm-bar { height: 4px; margin-top: 2px; }
.pm-boost { flex: none; display: grid; place-items: center; min-width: 76px; height: 50px; padding: 0 6px; border-radius: 6px; background: linear-gradient(135deg, var(--orange), #ffb020); color: var(--orange-ink); font: 800 16px/1 var(--f-display); letter-spacing: .02em; text-align: center; }
.pm-vis .pm-th--md { border-radius: 6px; }
/* one row always: more challenges, smaller cards */
.pm-cards[data-n="4"] .pm-vis { width: 60px; height: 44px; }
.pm-cards[data-n="4"] .pm-boost { font-size: 13px; }
.pm-cards[data-n="4"] .pm-card { gap: 10px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) { gap: 8px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-card { flex-direction: column; align-items: stretch; gap: 7px; padding: 9px 10px 9px 12px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-vis { width: 100%; height: 32px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-tbadge { grid-auto-flow: column; justify-content: center; gap: 6px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-boost { font-size: 13px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-title { font-size: 12px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) :is(.pm-scope, .pm-row--boost) { display: none; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-top { flex-direction: column; gap: 3px; }
.pm-cards:not([data-n="1"]):not([data-n="2"]):not([data-n="3"]):not([data-n="4"]) .pm-row { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; }
/* custom goal title: the title itself as the picture */
.pm-tbadge { display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); background: radial-gradient(110% 110% at 50% 30%, color-mix(in srgb, var(--tc) 22%, transparent), #0c0f13 75%); color: var(--tc); }
.pm-tbadge .nbi { font-size: 18px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tc) 60%, transparent)); }
.pm-tbadge small { font: 700 8px/1 var(--f-display); letter-spacing: .18em; color: var(--fg-2); }
.pm-card--title .pm-title { display: flex; align-items: center; overflow: visible; }
.pm-card--title .pm-title .nb-title { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pm-tname { font: 800 12px/1.05 var(--f-display); color: var(--tc); text-transform: uppercase; }
.pm-card--title .pm-bar i { background: var(--tc); }
.pm-boost--sm { min-width: 64px; height: 36px; font-size: 13px; }
/* room chips */
.pm-room { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--f-body); }
.pm-room.in-lobby { margin: 0 0 12px; padding: 8px 12px; border: 1px solid rgba(255, 106, 19, .35); border-radius: var(--r-lg); background: linear-gradient(100deg, rgba(255, 106, 19, .1), var(--bg-1) 55%); }
.pm-room.in-game { position: fixed; top: 64px; right: 12px; z-index: 840; flex-direction: column; align-items: stretch; width: 230px; }
.pm-room.in-game .pm-room-l { display: none; }
.pm-room-l { font: 700 11px/1 var(--f-display); letter-spacing: .12em; color: var(--orange-hi); text-transform: uppercase; }
.pm-chip { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; background: rgba(15, 17, 21, .9); border: 1px solid rgba(255, 106, 19, .45); position: relative; min-width: 0; }
.pm-chip.is-off { opacity: .55; }
.pm-chip.is-done { border-color: rgba(56, 214, 107, .6); }
.pm-chip--boost b { font: 800 13px/1 var(--f-display); color: var(--orange-hi); letter-spacing: .03em; }
.pm-chip--boost small { color: var(--fg-2); font-size: 11px; }
.pm-chip-t { display: grid; gap: 2px; min-width: 0; }
.pm-chip-n { font: 700 12px/1.1 var(--f-display); color: var(--fg-0); font-variant-numeric: tabular-nums; }
.pm-chip-r { font-size: 11px; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.pm-chip-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .06); border-radius: 0 0 4px 4px; overflow: hidden; }
.pm-chip-bar i { display: block; height: 100%; background: var(--gold); }
@media (max-height: 500px) {
    .pm-room.in-game { top: 52px; right: 6px; width: 180px; gap: 4px; }
    .pm-room.in-game .pm-chip { padding: 3px 6px; }
    .pm-room.in-game .pm-th--sm { width: 40px; height: 24px; }
}
/* deals */
.pm-deals-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font: 700 13px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); }
.pm-deals-h .pm-end { margin-left: auto; letter-spacing: 0; text-transform: none; font: 500 12px/1 var(--f-body); }
.pm-deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pm-deals--big { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pm-deal { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line-strong); border-top: 2px solid var(--rc); border-radius: var(--r-lg); min-width: 0; }
.pm-deal.is-owned { opacity: .7; }
.pm-off { position: absolute; top: 14px; left: 14px; z-index: 2; font: 800 12px/1 var(--f-display); padding: 5px 7px; border-radius: 3px; background: #E0322E; color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.pm-off--free { background: var(--ok); color: #062A14; }
.pm-dn { font: 700 14px/1.2 var(--f-display); color: var(--fg-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-dr { font: 700 10px/1 var(--f-display); letter-spacing: .12em; }
.pm-dp { min-height: 14px; font-size: 12px; color: var(--fg-3); }
.pm-da { margin-top: auto; }
.pm-buy { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 0; border-radius: 4px; background: var(--gold); color: var(--gold-ink); font: 800 14px/1 var(--f-display); cursor: pointer; }
.pm-buy:hover { background: var(--gold-hi); }
.pm-owned { display: block; text-align: center; color: var(--ok); font: 700 13px/1 var(--f-display); padding: 9px 0; }
.pm-dtask { display: grid; gap: 5px; }
.pm-dtask-t { font: 600 12px/1.3 var(--f-body); color: var(--fg-1); }
.pm-shop { padding: 12px 16px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(228, 177, 58, .08), transparent); }
.pm-shop .pm-deals { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pm-shop .pm-th--lg { aspect-ratio: 16 / 8; }
.pm-modal { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 9, .75); animation: ev-fade var(--t) both; }
.pm-modal-card { position: relative; width: min(980px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: radial-gradient(120% 80% at 50% 0%, rgba(228, 177, 58, .18), var(--bg-1) 55%), var(--bg-1); border: 1px solid rgba(228, 177, 58, .5); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .9); animation: pm-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pm-pop { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.pm-modal-card .pm-deals-h { font-size: 20px; margin-bottom: 16px; padding-right: 36px; }
.pm-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pm-modal-foot button { padding: 10px 16px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--bg-3); color: var(--fg-0); font: 700 13px/1 var(--f-display); cursor: pointer; }
.pm-modal-foot .pm-shopbtn { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.pm-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--fg-2); font-size: 24px; cursor: pointer; border-radius: 4px; }
.pm-x:hover { color: var(--fg-0); background: var(--bg-3); }
/* "new challenge" banner */
.pm-toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 9500; display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.pm-toast { pointer-events: auto; position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 40px 12px 12px; border-radius: var(--r-lg); background: rgba(15, 17, 21, .96); border: 1px solid var(--orange); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8), 0 0 0 4px rgba(255, 106, 19, .15); animation: pm-in .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.pm-toast.out { opacity: 0; transform: translateY(-10px); transition: .35s; }
.pm-toast .pm-x { top: 6px; right: 6px; }
.pm-kick { font: 700 10px/1 var(--f-display); letter-spacing: .12em; color: var(--orange-hi); }
@keyframes pm-in { from { opacity: 0; transform: translateY(-24px); } }
@media (max-width: 560px) {
    .pm-cards { gap: 6px; }
    .pm-cards:not([data-n="1"]) .pm-card { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 8px 8px 10px; min-height: 0; }
    .pm-cards:not([data-n="1"]) .pm-vis { width: 100%; height: 30px; }
    .pm-cards:not([data-n="1"]) .pm-tbadge { grid-auto-flow: column; justify-content: center; gap: 6px; }
    .pm-cards:not([data-n="1"]) .pm-boost { font-size: 12px; }
    .pm-cards:not([data-n="1"]) .pm-title { font-size: 12px; }
    .pm-cards:not([data-n="1"]) :is(.pm-scope, .pm-row--boost) { display: none; }
    .pm-cards:not([data-n="1"]) .pm-top { flex-direction: column; gap: 3px; }
    .pm-cards:not([data-n="1"]) .pm-row { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11px; }
    .pm-deals, .pm-deals--big { grid-template-columns: 1fr 1fr; }
    .pm-modal-card { padding: 16px 12px; }
    .pm-modal-card .pm-deals-h { font-size: 15px; flex-wrap: wrap; }
}
.pm-th--cos .cos-art--av, .pm-th--cos .cos-art--fr { transform: scale(.7); }
.pm-th--md.pm-th--cos .cos-art--av, .pm-th--md.pm-th--cos .cos-art--fr { transform: scale(.45); }
.pm-th--sm.pm-th--cos .cos-art--av, .pm-th--sm.pm-th--cos .cos-art--fr { transform: scale(.28); }
.pm-th--sm .cos-av-wrap, .pm-th--sm .cos-art--av > * { transform: none; }
.ev-comm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 12px; font: 500 13px/1.3 var(--f-body); color: var(--fg-2); }
.ev-comm b { color: var(--fg-0); }
.ev-comm-pill, .evp-comm { font: 700 11px/1 var(--f-display); letter-spacing: .06em; padding: 4px 7px; border-radius: 3px; background: rgba(46, 123, 224, .2); color: #8fbaff; }
.evp-comm { white-space: nowrap; }
.pn-captain { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 3px; background: var(--gold); color: var(--gold-ink); font: 800 10px/1 var(--f-display); flex: none; vertical-align: middle; }

/* Settings: phone-only rows (joystick, touch layout) and desktop-only rows (chat) */
.st-mobile-only { display: none; }
body.is-mobile .st-mobile-only { display: block; }
body.is-mobile .st-desktop-only { display: none !important; }

/* Hosted rooms: host connection (game.js renderHostQuality) - lobby header, keys row, room list */
.host-q { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin-left: 10px; border-radius: var(--r, 4px); background: var(--bg-2); color: var(--fg-1); font: 600 12px/1 var(--f-body); white-space: nowrap; cursor: help; }
.host-q.hidden { display: none !important; }
.host-q .hq-k { font: 700 10px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.host-q .cc-flag { width: 16px; height: auto; border-radius: 2px; }
.host-q.hq-is-poor { background: rgba(229, 72, 77, .14); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .45); }
.host-q.hq-is-poor .hq-v { color: #ff8a8d; }
.host-q.hq-is-fair .hq-v { color: #F5B942; }
.host-q--mini { height: auto; padding: 0; margin: 0; background: none !important; box-shadow: none !important; font: inherit; gap: 4px; }
.hq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.hq-bars i { width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .18); }
.hq-bars i:nth-child(1) { height: 5px; } .hq-bars i:nth-child(2) { height: 8px; } .hq-bars i:nth-child(3) { height: 12px; }
.hq-good i { background: var(--ok, #2ecc71); }
.hq-fair i:nth-child(-n+2) { background: #F5B942; }
.hq-poor i:nth-child(1) { background: #E5484D; }
.hq-unknown i { background: rgba(255, 255, 255, .18); }
.room-hq { display: inline-flex; margin-right: 6px; vertical-align: -1px; cursor: help; }
/* host on a strict network (p2p.js probeNat): some players can't connect */
.room-hn { display: inline-block; margin-right: 6px; padding: 1px 5px; border-radius: 3px; font: 700 10px/1.5 var(--f-display, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: #FFB86B; background: rgba(255, 138, 42, .12); border: 1px solid rgba(255, 138, 42, .35); cursor: help; vertical-align: 1px; }
body.is-mobile .host-q .hq-v { display: none; }

/* Phone icon after a name / a room's name (plays on a phone) */
.mob-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin: 0 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); color: var(--fg-2); vertical-align: -3px; flex: none; }
.mob-ico svg { width: 11px; height: 11px; }
.host-q.hq-is-server .hq-v { color: var(--fg-2); }

/* ---- Home: team rankings (team-rank.js) ---- */
.tr-home { background: var(--bg-1); border-radius: var(--r-lg); }
.tr-home.hidden { display: none !important; }
body.is-offline .tr-home { display: none !important; }
.tr-head, .tr-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 44px 44px 44px 56px; align-items: center; gap: 10px; padding: 0 18px; }
.tr-head { padding-bottom: 6px; font: 700 10px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.tr-head span:nth-child(n+3) { text-align: right; }
.tr-list { list-style: none; margin: 0; padding: 0 0 6px; }
.tr-row { padding-top: 9px; padding-bottom: 9px; border-top: 1px solid var(--line); }
.tr-team { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tr-tag { font: 800 14px/1 var(--f-display); letter-spacing: .04em; color: var(--orange); flex: none; }
.tr-name { font: 600 14px/1.2 var(--f-body); color: var(--fg-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-n { text-align: right; font: 700 13px var(--f-display); font-variant-numeric: tabular-nums; color: var(--fg-1); }
.tr-row .tr-w { color: var(--fg-0); }
.tr-row .tr-l { color: var(--fg-2); }
.tr-empty { margin: 0; padding: 4px 18px 16px; font: 500 13px/1.45 var(--f-body); color: var(--fg-2); }
@media (max-width: 600px) {
    .tr-head, .tr-row { grid-template-columns: 26px minmax(0, 1fr) 40px 52px; gap: 8px; padding-left: 12px; padding-right: 12px; }
    .tr-head .tr-d, .tr-head .tr-l, .tr-row .tr-d, .tr-row .tr-l { display: none; }
}

/* ---- Lobby settings: room for every control; 3 DEF switch (beta) ---- */
.lobby-controls .settings-group { gap: 10px 22px; }
.setting-threedef { padding: 5px 6px 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, .03); gap: 10px; }
.setting-threedef label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.td-beta { display: inline-block; padding: 3px 5px 2px; border-radius: 3px; font: 800 8.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink); background: var(--gold); }
.td-switch { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-3); color: var(--fg-2); cursor: pointer; font: 700 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; transition: background var(--t-fast, 120ms), border-color var(--t-fast, 120ms), color var(--t-fast, 120ms); }
.td-switch i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--bg-4); flex: none; transition: background var(--t-fast, 120ms); }
.td-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-2); transition: transform 160ms ease-out, background 160ms; }
.td-switch.is-on { color: var(--fg-0); border-color: rgba(255, 106, 19, .55); background: rgba(255, 106, 19, .12); }
.td-switch.is-on i { background: var(--orange); }
.td-switch.is-on i::after { transform: translateX(14px); background: #fff; }
.td-switch:hover:not(:disabled) { border-color: rgba(255, 255, 255, .35); }
.td-switch:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.td-switch:disabled { cursor: default; opacity: .75; }
@media (prefers-reduced-motion: reduce) { .td-switch, .td-switch i, .td-switch i::after { transition: none; } }

/* Shop: the deals of the day never squeeze the item list (the window scrolls when they need the room) */
#shop-modal .shop-panel { overflow-y: auto; }
#shop-modal #shop-content { flex-shrink: 0; min-height: min(480px, 60vh); }
#shop-modal .shop-panel > .modal-header { position: sticky; top: -20px; z-index: 6; }
/* the window scrolls, so nothing in it shrinks (the header used to collapse to 1px on phones: no title, no close button) */
#shop-modal .shop-panel > * { flex-shrink: 0; }
.pm-modal-foot { align-items: center; }
.pm-nomore { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font: 600 13px/1.2 var(--f-body); color: var(--fg-2); cursor: pointer; user-select: none; }
.pm-nomore input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
@media (max-width: 520px) { .pm-modal-foot { flex-wrap: wrap; } .pm-nomore { width: 100%; margin-bottom: 4px; } }

/* Home: the Shop tile shares Create Room's cell (shop.js plays the Mythic explosions in it, deals on the flag) */
.shop-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: var(--r-lg); background: #07080b; color: var(--fg-0); text-decoration: none; min-height: 150px; isolation: isolate; box-shadow: inset 0 0 0 1px rgba(255, 106, 19, .55); transition: box-shadow var(--t), transform var(--t); }
.shop-tile:hover { box-shadow: inset 0 0 0 2px var(--orange); }
.shop-tile:active { transform: translateY(1px); }
.shop-tile:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.shop-tile-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; z-index: -2; transition: opacity .3s; }
.shop-tile-vid.is-swap { opacity: 0; }
.shop-tile-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 8, 11, .1) 0%, rgba(7, 8, 11, .2) 45%, rgba(7, 8, 11, .92) 100%); }
.shop-tile-flag { position: absolute; top: 10px; left: 10px; height: 20px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; background: var(--orange); color: var(--orange-ink); font: 700 10.5px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; }
.shop-tile-flag.is-deal { background: var(--gold); color: var(--gold-ink); }
.shop-tile-flag b { font-variant-numeric: tabular-nums; }
.shop-tile-text { display: flex; flex-direction: column; padding: 0 12px 6px; }
.shop-tile-title { font: italic 700 24px/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.shop-tile-sub { margin-top: 3px; font: 500 11.5px/1.25 var(--f-body); color: var(--fg-1); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.shop-tile-ticker { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 26px; padding: 0 12px; border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .55); font: 700 10.5px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.shop-tile-ticker b[data-rar="legendary"] { color: var(--gold-hi); } .shop-tile-ticker b[data-rar="epic"] { color: #B89AF0; }
.shop-tile-ticker b { color: #FF7BC2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-tile-ticker span { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
body.is-offline .shop-tile { display: none; }
body:not(.is-offline) #btn-create { grid-column: 5; }
.shop-tile { grid-column: 6; grid-row: 2; }
@media (max-width: 1100px) {
    body:not(.is-offline) #btn-create { grid-column: 3; }
    .shop-tile { grid-column: 4; grid-row: 2; }
}
@media (max-width: 640px) {
    body:not(.is-offline) #btn-create { grid-column: 2; }
    .shop-tile { grid-column: 1 / 3; grid-row: 3; min-height: 120px; }
    body:not(.is-offline) #btn-play-bots { grid-row: 4; }
    .main-actions::before { grid-row: 5; }
    #btn-real-match, #btn-power-match { grid-row: 6; }
}

/* BETA PLAYER title (id founding_100: the first 100 players, owners of the Founding 100 banner) — gold foil plate with a glint */
.title-founding {
    position: relative; overflow: hidden;
    color: #F6ECD2 !important;
    background: linear-gradient(180deg, rgba(233, 199, 123, .22), rgba(233, 199, 123, .06)) !important;
    border: 1px solid rgba(233, 199, 123, .85) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .8), 0 0 8px rgba(233, 199, 123, .55);
    box-shadow: 0 0 10px -2px rgba(233, 199, 123, .55), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.title-founding::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 246, 220, .5) 50%, transparent 65%);
    transform: translateX(-120%); animation: nb-title-founding-glint 3.8s ease-in-out infinite;
}
.title-card .title-founding { background: none !important; border: 0 !important; box-shadow: none; }
@keyframes nb-title-founding-glint { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Custom titles (admin panel › Titles): neon / foil looks in the title's own colour (--title-color) */
.title-c-neon {
    color: color-mix(in srgb, var(--title-color) 30%, #fff) !important;
    background: color-mix(in srgb, var(--title-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--title-color) 75%, transparent);
    text-shadow: 0 0 3px color-mix(in srgb, var(--title-color) 40%, #fff), 0 0 8px var(--title-color), 0 0 16px color-mix(in srgb, var(--title-color) 70%, transparent);
    box-shadow: 0 0 12px -2px color-mix(in srgb, var(--title-color) 65%, transparent), inset 0 0 6px color-mix(in srgb, var(--title-color) 15%, transparent);
    animation: nb-title-c-flicker 4.5s ease-in-out infinite;
}
@keyframes nb-title-c-flicker { 0%, 100% { filter: none; } 50% { filter: brightness(.85); } }
.title-c-foil {
    position: relative; overflow: hidden;
    color: color-mix(in srgb, var(--title-color) 25%, #fff) !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--title-color) 24%, transparent), color-mix(in srgb, var(--title-color) 7%, transparent)) !important;
    border: 1px solid color-mix(in srgb, var(--title-color) 85%, transparent) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .8), 0 0 8px color-mix(in srgb, var(--title-color) 55%, transparent);
    box-shadow: 0 0 10px -2px color-mix(in srgb, var(--title-color) 55%, transparent), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.title-c-foil::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
    transform: translateX(-120%); animation: nb-title-c-glint 3.8s ease-in-out infinite;
}
@keyframes nb-title-c-glint { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.title-card .title-c-neon, .title-card .title-c-foil { background: none !important; border: 0 !important; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .title-c-neon, .title-c-foil::after { animation: none; } }

/* Esc / Lobby over a running match: only the lobby's chat shows (the match chat behind used to show through,
   two chats on screen) */
body.lobby-over-game #game-chat-panel { visibility: hidden !important; }

/* Social header: the buttons on the right always keep their place (a long status / note shrinks instead) */
.sp-head { gap: 6px; min-width: 0; }
.sp-head .sp-title { flex: none; }
.sp-head .sp-head-actions { flex: none; margin-left: auto; }
.sp-head .sp-invisible-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Create Room (9 Oct 2026): everything fits the window without scrolling - short mode cards in five columns,
   the picked mode's description in one line under them, the fields in one row, the button at the end (no longer
   sticky: it covered the fields) */
#create-room-modal .modal-content { max-width: 1040px; width: min(1040px, calc(100vw - 32px)); }
#create-room-modal .modal-header { padding-top: 14px; padding-bottom: 14px; }
#create-room-modal .form-group { margin-bottom: 12px; }
#create-room-modal .fm-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#create-room-modal .fm-card { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 3px; padding: 8px 10px 8px 14px; align-content: center; min-height: 52px; }
#create-room-modal .fm-card-name { font-size: 13px !important; line-height: 1.15; overflow-wrap: anywhere; }
#create-room-modal .fm-card-team { align-self: start; font-size: 10.5px; }
#create-room-modal .fm-card-desc { display: none; }
#create-room-modal .fm-picked-desc { margin: 8px 0 0; font: 500 13px/1.35 var(--f-body); color: var(--fg-2); min-height: 18px; }
#create-room-modal .fm-picked-desc b { color: var(--fg-0); font: 700 12px/1 var(--f-display); text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
#create-room-modal .fm-options:not(.hidden) { margin-top: 8px; }
#create-room-form { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1.3fr); column-gap: 12px; }
#create-room-form > .form-group:first-child { grid-column: 1 / -1; }
#create-room-form > button[type="submit"] { grid-column: 1 / -1; position: static; margin: 4px 0 4px; }
#create-room-form .rated-pick { margin-bottom: 12px; }
#create-room-form .rated-opt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1000px) {
    #create-room-modal .fm-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #create-room-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    #create-room-form { grid-template-columns: 1fr; }
    #create-room-modal .fm-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#create-room-form { align-items: start; }

/* custom map (lobby): name + Load / Unload + editor link (public/nbmap.js) */
.setting-map { gap: 8px; }
.setting-map .custom-map-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-0); font-weight: 600; }
.setting-map .map-editor-link { font: 600 12px/1 var(--f-body); color: var(--orange-hi); text-decoration: none; }
.setting-map .map-editor-link:hover { text-decoration: underline; }

/* hosted room: no game picture for a while (game.js watchdog) */
.host-stall { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(8, 10, 14, .55); pointer-events: auto; }
.host-stall .hs-card { display: grid; justify-items: center; gap: 8px; max-width: 360px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--bg-1); border: 1px solid var(--line-strong); text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.host-stall .hs-title { font: 700 16px/1.2 var(--f-display); color: var(--fg-0); }
.host-stall .hs-text { margin: 0; font: 500 13px/1.45 var(--f-body); color: var(--fg-2); }
.host-stall .hs-actions { display: flex; gap: 8px; margin-top: 6px; }
.host-stall .hs-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--orange); animation: hs-spin .8s linear infinite; }
@keyframes hs-spin { to { transform: rotate(360deg); } }

/* Live Challenges on phones: two cards per view, swipe or tap the arrow for the rest (promo.js setupSwipe) */
.pm-track { position: relative; min-width: 0; }
.pm-nav { display: none; }
.pm-home.is-swipe .pm-cards { grid-auto-flow: column; grid-auto-columns: calc((100% - 8px) / 2); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pm-home.is-swipe .pm-cards::-webkit-scrollbar { display: none; }
.pm-home.is-swipe .pm-card { scroll-snap-align: start; }
.pm-home.is-swipe .pm-nav { display: grid; place-items: center; position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; border: 1px solid rgba(255, 106, 19, .7); background: rgba(15, 17, 21, .92); color: var(--orange-hi); font: 700 20px/1 var(--f-display); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .6); padding: 0 0 2px; }
.pm-home.is-swipe .pm-nav[hidden] { display: none; }
.pm-home.is-swipe .pm-nav--next { right: -6px; animation: pm-nudge 1.6s ease-in-out infinite; }
.pm-home.is-swipe .pm-nav--prev { left: -6px; }
@keyframes pm-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

/* top menu: Map Editor (new) */
.btn-mapeditor { position: relative; border: 1px solid rgba(255, 106, 19, .6) !important; background: linear-gradient(135deg, rgba(255, 106, 19, .16), rgba(255, 106, 19, .04)) !important; color: var(--fg-0) !important; }
.btn-mapeditor:hover { background: linear-gradient(135deg, rgba(255, 106, 19, .28), rgba(255, 106, 19, .08)) !important; }
.btn-mapeditor .nbi { color: var(--orange-hi); }
/* Watch Replay: a film / REC look (the map editor's sibling, in the replay red) */
.btn-watch-replay { position: relative; border: 1px solid rgba(232, 72, 66, .55) !important; background: linear-gradient(135deg, rgba(232, 72, 66, .15), rgba(232, 72, 66, .03)) !important; color: var(--fg-0) !important; overflow: visible; }
.btn-watch-replay::before { content: ''; position: absolute; inset: 3px 0; pointer-events: none; opacity: .35;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 4px, transparent 4px 9px) top / 100% 2px no-repeat,
                repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 4px, transparent 4px 9px) bottom / 100% 2px no-repeat; }
.btn-watch-replay:hover { background: linear-gradient(135deg, rgba(232, 72, 66, .27), rgba(232, 72, 66, .07)) !important; }
.btn-watch-replay .nbi { color: #ff6b61; }
.btn-rec-tag { position: absolute; top: -8px; right: -8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border-radius: 3px; background: #14161c; border: 1px solid rgba(232, 72, 66, .7); color: #ff6b61; font: 800 9px/1 var(--f-display); letter-spacing: .08em; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); pointer-events: none; }
.btn-rec-tag i { width: 6px; height: 6px; border-radius: 50%; background: #ff3b30; animation: nbRecBlink 1.4s steps(1, end) infinite; }
@keyframes nbRecBlink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .btn-rec-tag i { animation: none; } }
.btn-new-tag { position: absolute; top: -8px; right: -8px; padding: 2px 5px; border-radius: 3px; background: var(--orange); color: var(--orange-ink); font: 800 9px/1 var(--f-display); letter-spacing: .08em; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); pointer-events: none; }

/* Stored custom maps (/store, localStorage only) in the stadium picker */
.stored-maps { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.stored-maps-h { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #FF8A3D; }
.stored-maps-h small { font-weight: 500; text-transform: none; letter-spacing: 0; color: #8b93a3; margin-left: 6px; }
.stadium-item.stored-map { position: relative; padding-right: 40px; }
.stored-map-del { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #c3c9d4; font-size: 16px; line-height: 1; cursor: pointer; }
.stored-map-del:hover { background: rgba(255,80,80,.2); color: #fff; }
#stadium-modal.maps-only #stadium-list { display: none; }
#stadium-modal.maps-only .stored-maps { margin-top: 0; }
.stored-maps-empty { margin: 0; font-size: 13px; color: #8b93a3; line-height: 1.45; }
/* keeper training (T): only the T line, so the box does not cover the left goal */
.training-keys.is-compact .tk-title, .training-keys.is-compact .tk-foot, .training-keys.is-compact .tk-row:not(.is-on) { display: none; }
/* touch: Training button + menu (R / T without a keyboard) */
.room-train.is-on { background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); }
.train-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 230px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--bg-1, #15181e); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.train-menu.hidden { display: none; }
.train-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; min-height: 48px; border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 6px; background: var(--bg-2, #1d2129); color: var(--fg-1, #e6e9ef); text-align: left; cursor: pointer; }
.train-menu button b { font: 700 13px/1.1 var(--f-display, inherit); letter-spacing: .06em; text-transform: uppercase; }
.train-menu button span { font-size: 12px; color: var(--fg-2, #9aa3b2); }
.train-menu button[aria-checked="true"] { border-color: var(--orange, #FF6A13); box-shadow: inset 3px 0 0 var(--orange, #FF6A13); }
.train-menu button[aria-checked="true"] b::after { content: ' · ON'; color: var(--orange, #FF6A13); }
body.hud-hidden #btn-room-train { visibility: hidden !important; pointer-events: none !important; }

/* Highlights on the match result (highlights.js): the best goals as 9:16 / 16:9 videos */
.match-result-hl { margin: 14px 0 4px; text-align: left; }
.match-result-hl.hidden { display: none; }
.hl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.hl-head b { font: 700 13px/1 var(--f-display, inherit); letter-spacing: .14em; text-transform: uppercase; color: var(--orange, #FF6A13); }
.hl-head span { font-size: 12px; color: var(--fg-2, #9aa3b2); }
.hl-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hl-card { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: var(--bg-2, #1d2129); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.hl-card.is-mine { border-color: var(--orange, #FF6A13); }
.hl-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; background: #0b0e14; }
.hl-info { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-info b { font: 700 13px/1.2 var(--f-display, inherit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-info b.hl-team-red { color: #FF5A67; } .hl-info b.hl-team-blue { color: #5AA2FF; }
.hl-info span { font-size: 11px; color: var(--fg-2, #9aa3b2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-btns { display: flex; gap: 6px; padding: 6px 10px 10px; }
.hl-btn { flex: 1; min-height: 34px; border: 0; border-radius: 6px; background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900); font: 700 13px/1 var(--f-display, inherit); letter-spacing: .06em; cursor: pointer; }
.hl-btn + .hl-btn { background: var(--bg-3, #2a2f3a); color: var(--fg-1, #e6e9ef); }
.hl-note { font-size: 12px; color: var(--orange, #FF6A13); margin-top: 6px; min-height: 0; }
@media (max-width: 700px) { .hl-list { grid-template-columns: 1fr; } .hl-card { flex-direction: row; align-items: center; } .hl-card canvas { width: 96px; flex: none; } .hl-btns { padding: 6px 8px; } }

/* Highlights of the last match, reopened from the lobby */
.hl-modal { position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hl-modal-card { position: relative; width: min(760px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--bg-1, #15181e); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; box-sizing: border-box; }
.hl-modal-card .match-result-hl { margin: 0; }
.hl-modal-x { position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; color: #aab; font-size: 28px; line-height: 1; cursor: pointer; }
.btn-hl-lobby { color: var(--orange, #FF6A13) !important; }
.hl-maker { z-index: 9600; }
.hl-maker-card { width: min(1000px, 100%); height: min(88dvh, 900px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.hl-maker-top { display: flex; align-items: center; gap: 10px; padding: 10px 52px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #9aa3b2; }
.hl-maker-top b { color: #fff; font-size: 14px; }
.hl-maker-card iframe { flex: 1; width: 100%; border: 0; background: #0b0d12; }
/* room chips: a title challenge */
.pm-chip--title { border-color: color-mix(in srgb, var(--tc, #FF8A2A) 70%, transparent); }
.pm-chip-crown { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; background: color-mix(in srgb, var(--tc, #FF8A2A) 22%, transparent); color: var(--tc, #FF8A2A); flex: none; }
.pm-chip--title .pm-chip-r { display: flex; align-items: center; }
.pm-chip--title .pm-chip-bar i { background: var(--tc, #FF8A2A); }
/* Dev Lab on phones: its list scrolls with a finger */
.devlab .dl-list { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }

.btn-join-team.nb-nojoin, html.is-mobile #lobby-screen .team-header .btn-join-team.nb-nojoin { display: none !important; }

/* Room browser on phones: name + players on top, badges and Watch / Join below (Join used to run off the right edge) */
@media (max-width: 640px) {
    .room-item { flex-wrap: wrap; align-items: flex-start; }
    .room-item .room-info { flex: 1 1 100%; min-width: 0; }
    .room-item .room-info h3 { overflow-wrap: anywhere; }
    .room-item .room-right { flex: 1 1 100%; flex-wrap: wrap; flex-shrink: 1; gap: 6px; }
    .room-item .room-right .btn-join { margin-left: auto; }
}

/* Gamepad (gamepad.js): connect toast, settings rows */
.nb-pad-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); z-index: 10060; padding: 9px 14px; border-radius: 6px; background: rgba(12, 14, 20, .94); border: 1px solid var(--line-strong, rgba(255,255,255,.16)); color: var(--fg-0, #fff); font: 600 13px/1.2 var(--f-body, sans-serif); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.nb-pad-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pad-bind { cursor: pointer; min-width: 64px; }
.pad-bind.waiting { border-color: var(--orange) !important; color: var(--orange) !important; }
.pad-fixed { opacity: .7; }
.pad-dead { display: inline-flex; align-items: center; gap: 8px; }
.pad-dead input { width: 120px; accent-color: var(--orange, #ff7a1a); }
.pad-dead b { min-width: 34px; font: 700 12px var(--f-display, sans-serif); color: var(--fg-1); }
@media (prefers-reduced-motion: reduce) { .nb-pad-toast { transition: none; } }
#touch-lob.lob-off { display: none !important; }

/* Rocket mode: boost dial (bottom right of the field), no lunge button */
#game-screen.sport-rocket .touch-btn-lunge { display: none !important; }
.sport-hud.sport-rocket {
    left: auto; right: 14px; top: auto; bottom: 14px; transform: none;
    padding: 0; background: none; border: 0; box-shadow: none;
}
.rk-dial { position: relative; width: 86px; height: 86px; display: grid; place-items: center; }
.rk-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rk-dial .rk-bg { fill: rgba(6, 9, 24, .78); stroke: rgba(255, 255, 255, .12); stroke-width: 9; }
.rk-dial .rk-fg { fill: none; stroke: #FF9A2E; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .12s linear; filter: drop-shadow(0 0 4px rgba(255, 140, 40, .7)); }
.rk-dial .rk-num { font: 900 26px/1 var(--f-display); color: #fff; margin-top: -8px; font-variant-numeric: tabular-nums; }
.rk-dial .rk-lbl { position: absolute; bottom: 20px; font: 800 9px/1 var(--f-display); letter-spacing: .12em; color: rgba(255, 210, 150, .85); }
.rk-dial.is-boost .rk-fg { stroke: #FFD24A; }
.rk-dial.is-boost .rk-num { color: #FFE9A8; }
.rk-dial.is-empty .rk-num { color: rgba(255, 255, 255, .45); }
.rk-dial.is-empty .rk-fg { opacity: 0; }
@media (max-width: 760px) { .sport-hud.sport-rocket { bottom: auto; top: 8px; right: 8px; } .rk-dial { width: 64px; height: 64px; } .rk-dial .rk-num { font-size: 19px; } .rk-dial .rk-lbl { bottom: 14px; font-size: 7px; } }
.rk-cam {
    position: absolute; right: 14px; bottom: 108px; z-index: 26;
    padding: 6px 10px; border-radius: 999px; cursor: pointer;
    background: rgba(6, 9, 24, .78); border: 1px solid rgba(255, 255, 255, .16);
    font: 800 10px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: #E6EEFF;
}
.rk-cam:hover { border-color: rgba(255, 170, 80, .7); }
@media (max-width: 760px) { .rk-cam { bottom: auto; top: 80px; right: 8px; } }

/* ---- Main menu: left-aligned content + leaderboard rail (menurail.js) ----
   >= 1280 px: two columns, the menu on the left, the rail beside it (narrower on smaller screens)
   <  1280 px: one column, the rail as a full-width row under the game modes */
.menu-rail { display: flex; flex-wrap: wrap; gap: 16px; order: 1; }
#main-menu .menu-container > .main-actions ~ :not(.menu-rail) { order: 2; }
.menu-rail > .mr-card { flex: 1 1 360px; min-width: 0; }
@media (min-width: 1280px) {
    body #main-menu .menu-container {
        grid-template-columns: minmax(0, 1fr) clamp(290px, 22vw, 440px); column-gap: clamp(16px, 1.6vw, 28px);
        max-width: 1920px; margin-left: auto; margin-right: auto;
        padding-left: var(--gutter); padding-right: var(--gutter); box-sizing: border-box;
    }
    body #main-menu .menu-container > * { grid-column: 1; width: auto; margin-left: 0; margin-right: 0; order: 0 !important; }
    body #main-menu .menu-container > .menu-header { grid-column: 1 / -1; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); width: auto !important; }
    body #main-menu .menu-header > :not(.header-top) { margin-left: var(--gutter) !important; margin-right: auto !important; }
    /* the Social panel opens over the page here (no room made for it) */
    body.social-open #main-menu .header-top { margin-right: 0; }
    body.social-open #main-menu .menu-container { padding-right: var(--gutter); }
    body #main-menu .menu-container > .menu-rail {
        flex-direction: column; flex-wrap: nowrap; grid-column: 2; grid-row: 2 / span 8; align-self: start;
        position: sticky; top: 72px;
    }
    .menu-rail > .mr-card { flex: none; }
}
@media (max-width: 1279px) {
    .mr-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .mr-week { grid-template-columns: 1fr 1fr; }
}
.mr-card { background: linear-gradient(180deg, rgba(20, 24, 36, .92), rgba(12, 14, 22, .92)); border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 14px; padding: 14px 14px 12px; }
.mr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mr-head h2 { margin: 0; font: 800 13px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-0, #fff); }
.mr-reset { font: 600 11px/1 var(--f-body, system-ui); color: var(--fg-2, rgba(255,255,255,.55)); }
.mr-more { background: none; border: 0; padding: 0; cursor: pointer; font: 700 11px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent, #FF6A13); }
.mr-more:hover { text-decoration: underline; }
.mr-week { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mr-wk { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); border-radius: 10px; padding: 10px; min-width: 0; }
.mr-wk-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 800 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-1, rgba(255,255,255,.8)); }
.mr-wk-h .nbi { color: var(--accent, #FF6A13); }
.mr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mr-row { display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; font: 600 12.5px/1.2 var(--f-body, system-ui); color: var(--fg-0, #fff); }
.mr-week .mr-row { grid-template-columns: 16px 1fr auto; }
.mr-row.is-me { background: rgba(255, 213, 74, .12); }
.mr-pos { font: 800 11px/1 var(--f-display); color: var(--fg-2, rgba(255,255,255,.5)); font-variant-numeric: tabular-nums; }
.mr-row:nth-child(1) .mr-pos { color: #FFD54A; } .mr-row:nth-child(2) .mr-pos { color: #D9DEE8; } .mr-row:nth-child(3) .mr-pos { color: #E0A36B; }
.mr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mr-val { font: 800 12px/1 var(--f-display); color: var(--accent, #FF6A13); font-variant-numeric: tabular-nums; }
.mr-badge { display: inline-flex; width: 16px; }
.mr-empty { padding: 6px; font: 500 12px/1.3 var(--f-body, system-ui); color: var(--fg-2, rgba(255,255,255,.5)); }
.mr-note { margin: 8px 0 0; font: 500 11px/1.3 var(--f-body, system-ui); color: var(--fg-2, rgba(255,255,255,.45)); }
.mr-modes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.mr-mode { padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); color: var(--fg-1, rgba(255,255,255,.75)); font: 700 11px/1 var(--f-display); letter-spacing: .04em; cursor: pointer; }
.mr-mode:hover { border-color: rgba(255, 255, 255, .25); }
.mr-mode.is-on { background: var(--accent, #FF6A13); border-color: var(--accent, #FF6A13); color: #fff; }
.mr-rated .mr-row { padding: 6px; }

/* Top bar: room between the buttons (REC / NEW tags sit above Watch Replay / Map Editor) */
@media (min-width: 1200px) {
    .header-buttons { gap: 6px; }
    .header-buttons .btn-watch-replay, .header-buttons .btn-mapeditor { margin: 0 6px; }
}
/* the leaderboard rail stays when the Social panel opens (the panel lies over it) */
@media (min-width: 1700px) {
    body.social-open #main-menu .menu-container { padding-right: var(--gutter); }
    body.social-open #main-menu .header-top { margin-right: 0; }
}

/* top bar: more room between the links, the boxed Watch Replay / Map Editor apart, Discord as an icon like X / Instagram / YouTube */
.header-buttons { gap: 6px; }
.header-buttons .btn-watch-replay, .header-buttons .btn-mapeditor { margin: 0 6px; }
.header-buttons .btn-discord > span { display: none; }
.header-buttons .btn-discord { padding-left: 10px; padding-right: 10px; }
/* the two corner tags the same box (REC has a 1px border): their tops and bottoms line up */
.btn-new-tag { display: inline-flex; align-items: center; border: 1px solid var(--orange); }
/* one column (< 1280 px): the column never grows past the screen; the top bar scrolls instead of widening the page */
#main-menu .menu-container { grid-template-columns: minmax(0, 1fr); }
#main-menu .menu-header { min-width: 0; }
.header-buttons { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.header-buttons::-webkit-scrollbar { display: none; }
@media (max-width: 1440px) { .header-buttons { gap: 2px; } .header-buttons .btn-watch-replay, .header-buttons .btn-mapeditor { margin: 0 3px; } }
/* game modes: their own grid row under the top block (modes.js puts them in order: Japon, Futsal, Real Match,
   Sniper, Chaos, ...): 6 cards on the first line, 7 smaller ones on the second (42 columns: 6 x 7 / 7 x 6) */
#mode-grid > #btn-real-match, #mode-grid > #btn-power-match { grid-column: auto !important; grid-row: auto !important; }
@media (min-width: 1101px) {
    #main-menu .secondary-actions#mode-grid { display: grid !important; grid-column: 1 / -1; grid-row: 5; grid-template-columns: repeat(42, minmax(0, 1fr)); grid-auto-rows: auto; gap: 14px; }
    #mode-grid > .action-btn, #mode-grid > #btn-real-match, #mode-grid > #btn-power-match { grid-column: span 7 !important; grid-row: auto !important; }
    #mode-grid > .action-btn:nth-child(n+7), #mode-grid > #btn-real-match:nth-child(n+7), #mode-grid > #btn-power-match:nth-child(n+7) { grid-column: span 6 !important; }
}

/* Japon mode HUD: one chip per player still in (goal colour, goals let in / limit) */
.sport-hud.sport-japon { flex-wrap: wrap; justify-content: center; max-width: min(92%, 900px); border-radius: 14px; gap: 6px; }
.sport-hud .jp-left { font: 800 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); margin-right: 4px; }
.sport-hud .jp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); font: 700 11px/1 var(--f-body, system-ui); color: var(--fg-0); white-space: nowrap; }
.sport-hud .jp-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.sport-hud .jp-chip b { font: 800 11px/1 var(--f-display); color: var(--c); }
.sport-hud .jp-chip.me { box-shadow: 0 0 0 1px var(--c) inset; }
/* header badges (REC / NEW) sit above the buttons: room inside the scroll box */
.header-buttons { padding: 10px 10px 2px 2px; margin-top: -10px; }
/* Japon: the standings run down the left edge, off the pitch */
.sport-hud.sport-japon { left: 10px; top: 50%; transform: translateY(-50%); flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; border-radius: 12px; max-height: 80vh; overflow: hidden; }
.sport-hud.sport-japon .jp-left { margin: 0 0 2px 2px; }
.sport-hud.sport-japon .jp-chip { justify-content: space-between; }
.sport-hud.sport-japon .jp-chip b { margin-left: 6px; }
.sport-hud .jp-chip.champ { background: rgba(242, 193, 78, .16); color: #F2C14E; }
/* Japan lobby: two columns (Players | Spectators) filling the row */
.teams-container.is-ffa { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
.teams-container.is-ffa > .team-column { width: auto !important; max-width: none !important; flex: none !important; min-width: 0; }
.teams-container.is-ffa > .team-column.hidden { display: none !important; }
/* home intro text: across the whole menu width (not only the left column) */
.menu-seo { grid-column: 1 / -1 !important; max-width: 1180px !important; width: 100%; justify-self: center; box-sizing: border-box; }
/* rated: guest sign-up card on the result screen (big, can't be missed) + lobby lock note */
.rr-card.rr-guest { border: 2px solid #38D66B !important; background: linear-gradient(180deg, rgba(56,214,107,.14), rgba(56,214,107,.04)) !important; box-shadow: 0 0 0 4px rgba(56,214,107,.08); }
.rr-guest-big { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; }
.rr-guest-big b { font: 800 40px/1 var(--f-display); color: #38D66B; letter-spacing: -.01em; }
.rr-guest-big span { font: 700 13px/1.2 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-1, #C9CFF0); }
.rr-guest-big.is-plain b { font-size: 26px; }
.rr-guest .rr-signup .btn { font-size: 15px; padding: 12px; }
.lobby-rated .lr-lock { font: 700 11px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2, #8E97C9); padding: 6px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; }
/* Dev Lab views: Me / Players (give) / Room */
.dl-views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 10px 0; }
.dl-views button { height: 28px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--bg-2); color: var(--fg-2); font: 800 11px var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.dl-views button:hover { color: var(--fg-0); }
.dl-views button.is-on { background: var(--ok); border-color: var(--ok); color: #062A14; }
.devlab [hidden] { display: none !important; }
.dl-players { padding: 8px 10px 0; }
.dl-ph { display: flex; justify-content: space-between; font: 700 10.5px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.dl-pl { display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow-y: auto; scrollbar-width: thin; }
.dl-pc { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2); color: var(--fg-1); text-align: left; cursor: pointer; font: 600 12px var(--f-body); }
.dl-pc:hover { background: var(--bg-3); }
.dl-pc.is-on { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); color: var(--fg-0); }
.dl-pc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: none; }
.t-red > .dl-pc-dot { background: var(--red); } .t-blue > .dl-pc-dot { background: var(--blue); }
.dl-pc-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-pc-tag { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .05em; }
.dl-art--title { font: 800 10px/1.1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--tc, var(--gold)); padding: 0 4px; text-align: center; }
.dl-givebar { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line); background: rgba(0,0,0,.25); }
.dl-gb-to, .dl-gb-item { font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-gb-to b, .dl-gb-item b { color: var(--fg-0); }
.dl-gb-g { color: var(--orange); font-size: 10.5px; }
.dl-gb-mode { display: grid; grid-template-columns: 1fr 1fr; }
.dl-gb-mode button { height: 28px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-2); font: 700 11px var(--f-body); cursor: pointer; }
.dl-gb-mode button:first-child { border-radius: 3px 0 0 3px; } .dl-gb-mode button:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.dl-gb-mode button.is-on { background: var(--bg-4, #2b313b); color: var(--fg-0); box-shadow: inset 0 -2px 0 var(--ok); }
.dl-gb-mode button:disabled { opacity: .4; cursor: not-allowed; }
.dl-gb-eq { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-1); }
.dl-gb-go { height: 34px; border: 0; border-radius: 3px; background: var(--ok); color: #062A14; font: 800 12px var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.dl-gb-go:disabled { background: var(--bg-3); color: var(--fg-3); cursor: default; }
.dl-gb-back { height: 26px; border: 1px solid var(--line-strong); border-radius: 3px; background: transparent; color: var(--fg-2); font: 700 11px var(--f-body); cursor: pointer; }
.dl-gb-coins { display: flex; flex-direction: column; gap: 5px; }
.dl-gb-coins input, .dl-score input { height: 28px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--bg-0); color: var(--fg-0); font: 700 13px var(--f-body); min-width: 0; }
.dl-gb-quick { display: flex; gap: 3px; flex-wrap: wrap; }
.dl-gb-quick button { flex: 1; height: 24px; border: 0; border-radius: 3px; background: var(--bg-3); color: var(--fg-1); font: 700 11px var(--f-body); cursor: pointer; }
.dl-roomv { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: thin; }
.dl-sec { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dl-sec h4 { display: flex; justify-content: space-between; margin: 0 0 6px; font: 800 11px var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-1); }
.dl-sec h4 span { color: var(--fg-3); font-weight: 700; }
.dl-row { display: flex; gap: 4px; margin-bottom: 5px; align-items: center; }
.dl-row > button, .dl-row > select { flex: 1; height: 28px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--bg-2); color: var(--fg-1); font: 700 11px var(--f-body); cursor: pointer; min-width: 0; }
.dl-row > button:hover { background: var(--bg-3); color: var(--fg-0); }
.dl-row > button:disabled { opacity: .4; cursor: default; }
.dl-row > button.is-on { border-color: var(--ok); color: var(--ok); }
.dl-score input { width: 44px; flex: none; }
.dl-score .dl-red, .dl-score .dl-blue { font: 800 11px var(--f-display); } .dl-red { color: var(--red); } .dl-blue { color: var(--blue); }
.dl-fine { margin: 2px 0 0; font-size: 10.5px; color: var(--fg-3); }
.dl-plist { display: flex; flex-direction: column; gap: 4px; }
.dl-prow { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; grid-template-areas: "d n t" "a a a"; gap: 4px 6px; align-items: center; padding: 5px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2); }
.dl-prow .dl-pc-dot { grid-area: d; }
.dl-prow-n { grid-area: n; font: 600 12px var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-prow-n i { font-style: normal; font-size: 10px; color: var(--orange); }
.dl-prow-t { grid-area: t; display: flex; }
.dl-prow-t button { width: 22px; height: 20px; border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg-2); font: 800 10px var(--f-body); cursor: pointer; }
.dl-prow-t button + button { border-left: 0; }
.dl-prow-t button.is-on[data-t="1"] { background: var(--red); color: #fff; } .dl-prow-t button.is-on[data-t="2"] { background: var(--blue); color: #fff; } .dl-prow-t button.is-on[data-t="0"] { background: var(--bg-4, #2b313b); color: var(--fg-0); }
.dl-prow-a { grid-area: a; display: flex; gap: 3px; }
.dl-prow-a button { flex: 1; height: 22px; border: 0; border-radius: 3px; background: var(--bg-3); color: var(--fg-1); font: 700 10.5px var(--f-body); cursor: pointer; }
.dl-prow-a button.is-bad { color: #FF7A72; }

/* ============================================
   SOCIAL LOOKS (social.js decorateLooks): Discord-style rows - avatar + frame,
   name colour and the equipped banner behind the row
   ============================================ */
.sp-row.sp-row--look { gap: 10px; min-height: 48px; isolation: isolate; }
.sp-look-av { position: relative; flex: none; width: 32px; height: 32px; }
.sp-look-av > .cos-av-wrap { position: absolute; left: 0; top: 0; width: 76px; height: 76px; transform: scale(.421); transform-origin: 0 0; }
.sp-look-av > .cos-av-wrap::before { display: none; }
.sp-look-av > .sp-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; z-index: 3; box-shadow: 0 0 0 2.5px var(--ink-1, #0f1216); }
.sp-row--look > .sp-flag, .sp-row--look > [class*="flag"] { order: 0; }
.sp-row--look .sp-look-av { order: -1; }
/* banner: fills the row and fades into the panel on the left, like Discord's member list */
.sp-look-bg.player-banner {
    position: absolute !important; inset: 3px 4px !important; z-index: -1; display: block !important;
    padding: 0 !important; margin: 0 !important; min-width: 0 !important; border-radius: 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent 10%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.95) 100%);
    mask-image: linear-gradient(90deg, transparent 10%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.95) 100%);
    pointer-events: none;
}
.sp-row--banner .sp-row-sub { color: rgba(255, 255, 255, .78); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.sp-row--banner .sp-name { text-shadow: 0 1px 2px rgba(0, 0, 0, .85); }
.sp-row--banner:hover .sp-look-bg { filter: brightness(1.12); }
.sp-row--banner.is-offline .sp-look-bg { opacity: .55; }
.sp-row--look.is-offline .sp-look-av { opacity: .6; }/* developer banner: shown as is (no fade); dark text on the light plate */
.sp-look-bg.player-banner.banner-developer { -webkit-mask-image: none; mask-image: none; }
.sp-row--banner:has(.banner-developer) .sp-name { color: #231A4A !important; text-shadow: none; }
.sp-row--banner:has(.banner-developer) .sp-row-sub { color: #4A3F78; text-shadow: none; }
.sp-row--banner:has(.banner-developer) .sp-you { color: #4A3F78; }
.sp-row--banner.is-offline .sp-look-bg.banner-developer { opacity: 1; }
/* Profile bar avatar (avatar-upload.js paintBar): uploaded picture, or a pencil to upload one */
.user-av { position: relative; flex: none; width: 30px; height: 30px; padding: 0; margin-right: 2px; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; background: #1B2027; color: #C9D1DB; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); transition: box-shadow .15s, color .15s; }
.user-av[hidden] { display: none; }
.user-av:hover, .user-av:focus-visible { box-shadow: 0 0 0 2px #FF6A13; color: #fff; outline: none; }
.user-av.is-empty { border: 1.5px dashed rgba(255, 255, 255, .35); box-shadow: none; }
.user-av.is-empty:hover { border-color: #FF6A13; }
.user-av .cos-av { position: absolute; inset: 0; border-radius: 50%; }