/* ==========================================================================
   Fuzzbol Pro v8.0 — "Stadium Gold" theme
   Navy + gold sports-broadcast identity. No emoji: functional icons are
   inline SVG (see #fuzzbol-icons in index.html); decorative art areas are
   dashed image slots reserved for generated artwork.
   ========================================================================== */

:root {
    --navy-1: #071426;
    --navy-2: #0b1f38;
    --navy-3: #0f2a4a;
    --navy-4: #133455;
    --ground: #050d1a;

    --edge: rgba(255, 255, 255, 0.14);
    --edge-strong: rgba(255, 255, 255, 0.3);

    --ink-1: #ffffff;
    --ink-2: rgba(255, 255, 255, 0.68);
    --ink-3: rgba(255, 255, 255, 0.44);

    --gold-1: #f7dc82;
    --gold-2: #c8942e;
    --gold-text: #eec453;
    --gold-glow: rgba(238, 196, 83, 0.35);

    --blue-1: #4a95ec;
    --blue-2: #1f5fc4;
    --blue-glow: rgba(31, 95, 196, 0.35);

    --silver-1: #eef2f6;
    --silver-2: #9aa6b4;

    --red: #e0483f;
    --red-glow: rgba(224, 72, 63, 0.35);
    --emerald: #2fbf75;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;

    --font-display: 'Big Shoulders Display', 'Archivo Black', sans-serif;
    --font-body: 'Work Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    background: var(--navy-1);
    background-image:
        radial-gradient(ellipse 900px 500px at 12% -10%, rgba(238, 196, 83, 0.07), transparent 55%),
        radial-gradient(ellipse 700px 500px at 100% 0%, rgba(74, 149, 236, 0.08), transparent 55%);
    color: var(--ink-1);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.match-view { overflow: hidden; }

/* Icon defs holder (must stay invisible but present in layout flow) */
#fuzzbol-icons { position: absolute; width: 0; height: 0; overflow: hidden; }

svg.icon { display: inline-block; vertical-align: middle; stroke: currentColor; fill: none; }

/* Star rating (challenges) */
.star-ic { color: rgba(255, 255, 255, 0.28); fill: none; stroke: currentColor; stroke-width: 1.6px; }
.star-ic.filled { color: var(--gold-text); fill: var(--gold-text); stroke: var(--gold-text); }

/* App Container */
#app-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 16px 24px 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.app-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    background: #081a30;
    border: 1px solid var(--edge);
    border-top: 0;
    border-left: 3px solid var(--gold-text);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-crest {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(238, 196, 83, 0.16));
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    line-height: 1;
    color: var(--gold-text);
}

.logo-placeholder {
    width: 180px;
    min-height: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--edge);
    color: var(--ink-1);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.86rem;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-icon svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--edge-strong);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .app-header { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
    .header-actions { width: 100%; justify-content: space-between; }
    .btn-icon .btn-text { display: none; }
}

/* Career workspace rebuild */
#screen-career-hub.active {
    align-items: stretch;
    justify-content: center;
    padding: 18px;
}

.career-app-shell {
    width: min(1440px, 100%);
    min-height: calc(100vh - 112px);
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(7, 19, 37, 0.98), rgba(4, 11, 23, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

/* On desktop the sidebar/workspace two-column layout is meant to scroll
   independently (nav always visible, only the panel content scrolls) — that
   needs a real height, not just min-height, so overflow: hidden actually
   clips the grid row and .career-workspace's own overflow-y: auto takes
   over. Mobile keeps min-height below (980px breakpoint): there the sidebar
   collapses into a sticky top bar and the whole page is meant to scroll. */
@media (min-width: 981px) {
    .career-app-shell { height: calc(100vh - 112px); }
}

.career-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 12px;
    background: rgba(1, 8, 18, 0.72);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    overflow-y: auto;
}

.career-player-card.compact { margin: 0 4px 16px; padding: 12px; gap: 10px; }
.career-player-card.compact .career-avatar { width: 46px; height: 46px; font-size: 1.35rem; }
.career-player-card.compact .career-player-name { font-size: 1rem; }
.career-player-card.compact .career-player-title { font-size: 0.66rem; margin-bottom: 5px; }
.career-player-card.compact .career-xp-text { font-size: 0.61rem; }
.career-player-card.compact .xp-bar-track { height: 5px; }

.career-nav { display: flex; flex-direction: column; gap: 4px; }
.career-nav-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    color: var(--ink-3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: left;
    font: 750 0.78rem var(--font-body);
    cursor: pointer;
}
.career-nav-item span { color: var(--ink-3); font: 900 0.9rem var(--font-mono); text-align: center; }
.career-nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }
.career-nav-item.active { color: #fff; background: rgba(238, 196, 83, 0.12); border-color: rgba(238, 196, 83, 0.32); }
.career-nav-item.active span { color: var(--gold-text); }
.career-exit { flex: 0 0 auto; margin: auto 4px 0; padding: 11px 10px; font-size: 0.72rem; }

.career-workspace { min-width: 0; min-height: 0; padding: 22px 24px 26px; overflow-y: auto; }
.career-workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--edge); }
.career-workspace-header h2 { margin: 3px 0 2px; color: #fff; font: 900 clamp(1.65rem, 3vw, 2.45rem) var(--font-display); text-transform: uppercase; }
.career-workspace-header p { margin: 0; color: var(--ink-3); font-size: 0.78rem; }
.career-header-actions { display: flex; align-items: center; gap: 10px; }

.career-view { display: none; padding-top: 18px; animation: careerViewIn 0.25s ease both; }
.career-view.active { display: block; }
@keyframes careerViewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.career-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.career-section-heading > div > span { color: var(--gold-text); font: 800 0.62rem var(--font-mono); letter-spacing: 0.12em; }
.career-section-heading h3 { margin: 3px 0 0; color: #fff; font: 850 1.35rem var(--font-display); text-transform: uppercase; }
.career-section-heading > strong { color: var(--gold-text); font: 800 0.75rem var(--font-mono); }
.career-section-heading .career-season-info { padding: 0; background: transparent; border: 0; min-width: min(480px, 58%); }

.career-table-wrap { max-height: 520px; border: 1px solid var(--edge); background: rgba(0, 0, 0, 0.18); }
.career-table-wrap .league-table { margin: 0; }
.career-table-wrap .career-club-row { background: rgba(238, 196, 83, 0.12); box-shadow: inset 3px 0 var(--gold-text); }

.career-team-performance, .career-contract-grid, .career-history-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.career-team-card, .career-contract-card, .career-history-card {
    min-height: 92px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--edge);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.career-team-card span, .career-contract-card span, .career-history-card span { color: var(--ink-3); font: 700 0.63rem var(--font-mono); text-transform: uppercase; }
.career-team-card strong, .career-contract-card strong, .career-history-card strong { color: #fff; font: 850 1.12rem var(--font-mono); }
.career-team-card.gold, .career-contract-card.gold { border-top: 2px solid var(--gold-text); }

.career-squad-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.career-squad-player { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 11px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--edge); }
.career-squad-role { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold-text); background: rgba(238, 196, 83, 0.1); border: 1px solid rgba(238, 196, 83, 0.28); font: 800 0.65rem var(--font-mono); }
.career-squad-player strong { display: block; color: #fff; font-size: 0.78rem; }
.career-squad-player small { color: var(--ink-3); font-size: 0.62rem; }
.career-squad-overall { color: var(--gold-text); font: 900 1rem var(--font-mono); }

.career-agent-message { margin-bottom: 12px; padding: 14px 16px; color: var(--ink-2); background: rgba(74, 149, 236, 0.08); border-left: 3px solid var(--blue-1); font-size: 0.8rem; line-height: 1.5; }
.career-contract-grid { margin-bottom: 14px; }
.career-transfer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.career-development-note { margin-bottom: 14px; padding: 11px 13px; color: var(--ink-3); background: rgba(238, 196, 83, 0.06); border: 1px solid rgba(238, 196, 83, 0.18); font-size: 0.74rem; }
.career-training-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.career-training-card { min-height: 180px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.22)); border: 1px solid var(--edge); border-top: 3px solid var(--training-tone, var(--gold-text)); }
.career-training-card.tone-blue { --training-tone: var(--blue-1); }
.career-training-card.tone-emerald { --training-tone: var(--emerald); }
.career-training-card.tone-red { --training-tone: var(--red); }
.career-training-card > span { color: var(--training-tone, var(--gold-text)); font: 800 0.62rem var(--font-mono); letter-spacing: 0.12em; }
.career-training-card h4 { margin: 7px 0; color: #fff; font: 850 1.05rem var(--font-display); text-transform: uppercase; }
.career-training-card p { margin: 0 0 18px; color: var(--ink-3); font-size: 0.75rem; line-height: 1.45; }
.career-training-card button { margin-top: auto; width: 100%; padding: 10px; font-size: 0.74rem; }
.career-training-card button:disabled { opacity: 0.42; cursor: not-allowed; }
.training-toolbar { margin-top: 14px; padding: 13px 0 0; }
.training-toolbar > span { color: var(--ink-3); font-size: 0.72rem; }

.career-history-list { display: flex; flex-direction: column; gap: 7px; }
.career-history-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 11px 13px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--edge); color: var(--ink-3); font-size: 0.72rem; }
.career-history-row strong { color: #fff; }

@media (max-width: 980px) {
    #screen-career-hub.active { padding: 10px; }
    .career-app-shell { grid-template-columns: 1fr; min-height: calc(100vh - 88px); }
    .career-sidebar { position: sticky; top: 0; z-index: 5; padding: 10px; border-right: 0; border-bottom: 1px solid var(--edge); }
    .career-player-card.compact, .career-exit { display: none; }
    .career-nav { flex-direction: row; overflow-x: auto; padding-bottom: 3px; }
    .career-nav-item { width: auto; grid-template-columns: 18px auto; white-space: nowrap; }
    .career-workspace { padding: 16px; }
    .career-team-performance, .career-contract-grid, .career-history-summary { grid-template-columns: repeat(2, 1fr); }
    .career-section-heading { align-items: flex-start; flex-direction: column; }
    .career-section-heading .career-season-info { width: 100%; min-width: 0; }
}

@media (max-width: 620px) {
    .career-workspace-header { flex-direction: column; }
    .career-header-actions { width: 100%; justify-content: space-between; }
    .career-training-grid, .career-team-performance, .career-contract-grid, .career-history-summary { grid-template-columns: 1fr; }
    .career-match-actions { grid-template-columns: 1fr; }
    .career-history-row { grid-template-columns: 72px 1fr; }
    .career-history-row span:last-child { grid-column: 2; }
}

/* Career season structure: league first, cups earned by finishing top two. */
#screen-career-hub .career-competition-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 14px 0 18px;
}

#screen-career-hub .career-competition-card {
    min-width: 0;
    min-height: 104px;
    padding: 14px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 48px;
    gap: 10px;
    align-items: start;
    border: 1px solid #dfe6e9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 15px rgba(16, 45, 67, .05);
}

#screen-career-hub .career-competition-card.active { border-color: #b9d6e7; background: linear-gradient(135deg, #f8fcff, #eef7fb); }
#screen-career-hub .career-competition-card.qualified { border-color: #f4c6b8; background: linear-gradient(135deg, #fffaf7, #fff1eb); }
#screen-career-hub .career-competition-card.locked { background: #f5f7f8; opacity: .78; }
#screen-career-hub .career-competition-card-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--fuzzbol-navy);
    font: 900 1rem/1 var(--font-mono);
}
#screen-career-hub .career-competition-card.qualified .career-competition-card-icon { background: var(--fuzzbol-orange); }
#screen-career-hub .career-competition-card.locked .career-competition-card-icon { background: #aeb9bf; }
#screen-career-hub .career-competition-card-status {
    display: block;
    margin-bottom: 5px;
    color: var(--fuzzbol-orange);
    font: 900 .58rem/1 var(--font-mono);
    letter-spacing: .08em;
}
#screen-career-hub .career-competition-card.active .career-competition-card-status { color: #1d78b5; }
#screen-career-hub .career-competition-card.locked .career-competition-card-status { color: #7f8d95; }
#screen-career-hub .career-competition-card strong { display: block; color: var(--fuzzbol-navy); font: 900 1.03rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-competition-card small { display: block; margin-top: 6px; color: var(--fuzzbol-muted); font-size: .68rem; line-height: 1.4; }
#screen-career-hub .career-competition-trophy { width: 48px; height: 70px; align-self: center; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(18, 45, 64, .18)); }
#screen-career-hub .career-competition-card.locked .career-competition-trophy { filter: grayscale(1); opacity: .4; }
#screen-career-hub .career-cup-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
#screen-career-hub .career-cup-action { border: 0; border-radius: 6px; padding: 7px 9px; color: #fff; background: var(--fuzzbol-orange); font: 800 .61rem var(--font-mono); cursor: pointer; }
#screen-career-hub .career-cup-action.secondary { color: var(--fuzzbol-navy); background: #fff; border: 1px solid #d7e0e5; }
#screen-career-hub .career-cup-bracket { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
#screen-career-hub .career-cup-bracket[hidden] { display: none; }
#screen-career-hub .career-cup-bracket-card { padding: 12px; border: 1px solid #dfe6e9; border-radius: 10px; background: #fbfcfd; }
#screen-career-hub .career-cup-bracket-card header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 9px; }
#screen-career-hub .career-cup-bracket-card header span { color: var(--fuzzbol-muted); font: 900 .65rem var(--font-mono); text-transform: uppercase; }
#screen-career-hub .career-cup-bracket-card header strong { color: var(--fuzzbol-navy); font: 900 .62rem var(--font-mono); }
#screen-career-hub .career-cup-rounds { display: grid; gap: 7px; }
#screen-career-hub .career-cup-round { display: grid; gap: 4px; }
#screen-career-hub .career-cup-round > span { color: var(--fuzzbol-orange); font: 800 .58rem var(--font-mono); text-transform: uppercase; }
#screen-career-hub .career-cup-fixture { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; padding: 5px 7px; border-radius: 6px; background: #fff; border: 1px solid #e8edf0; font-size: .62rem; }
#screen-career-hub .career-cup-fixture strong:last-child { text-align: right; }
#screen-career-hub .career-cup-fixture b { color: var(--fuzzbol-navy); font: 900 .62rem var(--font-mono); white-space: nowrap; }

#screen-career-hub .career-relegation-notice {
    margin: 14px 0;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    border: 1px solid #f1b49e;
    border-radius: 10px;
    color: #6b2b1b;
    background: linear-gradient(135deg, #fff8f4, #ffece4);
}
#screen-career-hub .career-relegation-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--fuzzbol-orange);
    font: 900 1.25rem/1 var(--font-mono);
}
#screen-career-hub .career-relegation-notice span:not(.career-relegation-mark) { display: block; color: var(--fuzzbol-orange); font: 900 .6rem/1 var(--font-mono); letter-spacing: .08em; }
#screen-career-hub .career-relegation-notice strong { display: block; margin-top: 5px; color: #6b2b1b; font: 900 1.2rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-relegation-notice p { margin: 5px 0 0; color: #865346; font-size: .72rem; line-height: 1.45; }

@media (max-width: 760px) {
    #screen-career-hub .career-competition-cards { grid-template-columns: 1fr; }
    #screen-career-hub .career-cup-bracket { grid-template-columns: 1fr; }
}

/* Screen Controller */
.screen {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.active { display: flex; }

.screen:not(.active) { opacity: 0; transform: translateY(10px); }
.screen.active { opacity: 1; transform: translateY(0); }

/* Reusable image slot (with support for generated art & placeholder fallback) */
.art-slot {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.art-slot:not(.has-image) {
    border: 1.5px dashed var(--edge-strong);
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 10px, transparent 10px 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ink-3);
}

.art-slot:not(.has-image) svg { opacity: 0.55; }

.art-slot:not(.has-image) .art-caption {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.art-slot.has-image {
    border: none;
    background: transparent;
    display: block;
}

.art-slot.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   START SCREEN — HERO
   ========================================================================== */

#screen-start {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: calc(100vh - 112px);
    padding: 32px max(24px, calc((100vw - 1260px) / 2)) 52px;
}

#screen-start::before {
    content: '';
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image: url('assets/menu_background.webp');
    background-position: center top;
    background-size: cover;
    opacity: 0.9;
}

#screen-start::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(4, 13, 27, 0.98) 0%, rgba(4, 13, 27, 0.82) 34%, rgba(4, 13, 27, 0.24) 68%, rgba(4, 13, 27, 0.66) 100%),
        linear-gradient(180deg, rgba(4, 13, 27, 0.08) 0%, rgba(4, 13, 27, 0.86) 92%);
}

#screen-start > * { position: relative; z-index: 1; }

.hero {
    width: 100%;
    max-width: 1260px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 22px;
    margin: 8px 0 30px;
    min-height: 500px;
    padding: 20px 8px 28px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.hero::after {
    display: none;
}

.hero-copy, .hero-art { position: relative; z-index: 1; }
.hero-copy { padding-top: 76px; }

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-text);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 14px;
}

.hero-kicker span {
    width: 24px;
    height: 2px;
    background: var(--gold-text);
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(4.4rem, 7.2vw, 6.75rem);
    letter-spacing: 0.005em;
    line-height: 0.88;
    text-transform: uppercase;
    color: var(--ink-1);
    margin-bottom: 14px;
}

.hero-title .accent {
    background: linear-gradient(180deg, var(--gold-1) 15%, var(--gold-2) 95%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--ink-2);
    font-size: 1rem;
    max-width: 46ch;
}

.hero-art {
    height: 560px;
    aspect-ratio: auto;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
    filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.44));
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.9) 68%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.9) 68%, transparent 100%);
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-art:hover img {
    transform: scale(1.03);
}

.hero-art::after {
    content: '';
    position: absolute;
    left: -12px;
    right: -12px;
    bottom: -12px;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, rgba(4, 13, 27, 0.18) 42%, rgba(4, 13, 27, 0.95) 100%);
}

.hero-art svg { width: 40px; height: 40px; }

/* ==========================================================================
   DASHBOARD — TRIO / SECONDARY / UTILITY CARDS
   ========================================================================== */

.trio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 1200px;
    margin-top: -74px;
    margin-bottom: 16px;
    position: relative;
    z-index: 3;
}

.mode-card {
    position: relative;
    background: var(--navy-2);
    border: 1px solid var(--edge);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(105deg, rgba(5, 18, 36, 0.98) 0%, rgba(5, 18, 36, 0.91) 40%, rgba(5, 18, 36, 0.2) 72%, rgba(5, 18, 36, 0.05) 100%);
    clip-path: polygon(0 0, 62% 0, 46% 100%, 0 100%);
}

.mode-card:hover {
    transform: translateY(-4px);
    border-color: var(--edge-strong);
}

.mode-card .art-slot {
    position: absolute;
    inset: 0;
    z-index: 0;
    height: 100%;
    border-radius: 0;
    border: 0;
    overflow: hidden;
}

.mode-card .art-slot img {
    width: 82%;
    height: 100%;
    margin-left: auto;
    object-fit: contain;
    object-position: right bottom;
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.4));
}

.mode-card .art-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 18, 36, 0.4), transparent 55%, rgba(5, 18, 36, 0.12));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mode-card:hover .art-slot::after {
    opacity: 0.35;
}

.mode-card:hover .art-slot img {
    transform: scale(1.07);
}

.mode-crest {
    position: absolute;
    top: auto;
    bottom: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--navy-2);
    border: 2px solid var(--rail, var(--gold-text));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.mode-crest svg { width: 18px; height: 18px; color: var(--rail, var(--gold-text)); }

.mode-body {
    position: relative;
    z-index: 2;
    width: 74%;
    min-height: 330px;
    padding: 34px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mode-body h3 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    line-height: 1.02;
    color: var(--ink-1);
    letter-spacing: 0.005em;
}

.mode-underline {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: var(--rail, var(--gold-text));
    margin: 10px 0;
}

.mode-body p {
    font-size: 0.85rem;
    color: var(--ink-2);
    line-height: 1.5;
    flex: 1;
    max-width: 22ch;
}

.mode-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    pointer-events: none;
}

.mode-cta.blue { background: var(--blue-2); color: #fff; box-shadow: none; }
.mode-cta.gold { background: var(--gold-2); color: #231805; box-shadow: none; }
.mode-cta.silver { background: var(--silver-2); color: #1c2733; box-shadow: none; }

.mode-card.tone-blue { --rail: var(--blue-1); }
.mode-card.tone-gold { --rail: var(--gold-text); }
.mode-card.tone-silver { --rail: var(--silver-1); }

.secondary-grid,
.utility-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 14px;
}

.mini-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--edge-strong);
    transform: translateY(-2px);
}

.mini-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rail-dim, rgba(238, 196, 83, 0.12));
    border: 1px solid var(--edge);
}

.mini-icon svg { width: 19px; height: 19px; color: var(--rail, var(--gold-text)); }

.mini-text b { display: block; font-size: 0.95rem; font-weight: 800; color: var(--ink-1); }
.mini-text span { display: block; font-size: 0.78rem; color: var(--ink-3); margin-top: 2px; }

.mini-card.tone-red { --rail: var(--red); --rail-dim: rgba(224, 72, 63, 0.14); }
.mini-card.tone-violet { --rail: #8b7cf6; --rail-dim: rgba(139, 124, 246, 0.14); }
.mini-card.tone-gold { --rail: var(--gold-text); --rail-dim: rgba(238, 196, 83, 0.14); }
.mini-card.tone-slate { --rail: var(--ink-2); --rail-dim: rgba(255, 255, 255, 0.08); }

@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr 0.8fr; }
    .hero-copy { padding-top: 46px; }
    .hero-art { height: 460px; }
    .trio-grid { grid-template-columns: 1fr; margin-top: -42px; }
}

@media (max-width: 640px) {
    #screen-start { padding-left: 14px; padding-right: 14px; }
    .hero { grid-template-columns: 1fr; padding: 20px 8px 10px; }
    .hero-copy { padding-top: 0; }
    .hero-art { height: 330px; margin: 0; }
    .logo-crest { width: 32px; height: 32px; }
    .logo-text { font-size: 1.3rem; }
    .hero-kicker { font-size: 0.7rem; }
    .hero-title { font-size: clamp(3.7rem, 16vw, 5rem); }
    .mode-card { min-height: 300px; }
    .mode-body { width: 82%; min-height: 300px; padding: 30px 18px 20px; }
    .mode-card .art-slot img { width: 72%; }
    .trio-grid { margin-top: 0; }
    .secondary-grid, .utility-grid { grid-template-columns: 1fr; }
    .career-toolbar { align-items: flex-start; flex-direction: column; }
    .career-toolbar-actions { width: 100%; justify-content: stretch; }
    .career-toolbar-actions button { flex: 1; }
    .career-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .career-objective { align-items: flex-start; }
    .career-log-row { grid-template-columns: 28px 1fr auto; }
    .career-log-row span:last-child { display: none; }
    .team-mark { width: 18px; height: 18px; flex-basis: 18px; font-size: 0.52rem; }
}

/* ==========================================================================
   GEOMETRIC CARDS & FORMS (settings / setup / tournament / career / league)
   ========================================================================== */

.glass-card {
    background: var(--navy-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.center-card {
    width: 100%;
    max-width: 680px;
    margin-top: 10px;
}

.form-header {
    border-bottom: 1px solid var(--edge);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    color: var(--ink-1);
}

.form-desc {
    font-size: 0.88rem;
    color: var(--ink-3);
    margin-top: 6px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1120px;
}

@media (max-width: 900px) {
    .menu-grid { grid-template-columns: 1fr; }
}

/* Segmented Control Bar (format picker — JS-bound, keep structure) */
.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
}

.segmented-control .btn-mode {
    flex: 1;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--ink-3);
    padding: 10px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segmented-control .btn-mode.active {
    background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
    color: #3a2705;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.segmented-control .btn-mode:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Form Controls */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-field label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Secondary controls that yield space to a larger stadium preview above them */
.form-field-compact {
    gap: 4px;
    margin-bottom: 10px;
}

.form-field-compact label {
    font-size: 0.7rem;
}

.form-field-compact .geometric-select {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.geometric-select {
    width: 100%;
    background: rgba(5, 13, 26, 0.85);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.geometric-select:focus {
    border-color: var(--gold-text);
    box-shadow: 0 0 0 3px rgba(238, 196, 83, 0.15);
}

.stadium-preview-box {
    background: rgba(0, 0, 0, 0.22);
    border: 1px dashed var(--edge);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.86rem;
    color: var(--ink-2);
    line-height: 1.5;
}

/* Settings Row with Toggle */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
}

.setting-meta { display: flex; flex-direction: column; gap: 3px; }
.setting-name { font-size: 0.94rem; font-weight: 700; color: #fff; }
.setting-help { font-size: 0.79rem; color: var(--ink-3); }
.setting-row select { width: auto; min-width: 220px; }

/* Groups a cluster of .setting-row / .lobby-field items under a labeled,
   iconed heading so long option lists (Settings, LAN) read as distinct
   topics instead of one continuous list. */
.settings-section { margin-bottom: 22px; }
.settings-section:last-of-type { margin-bottom: 0; }

.settings-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--fuzzbol-orange-soft);
    color: var(--fuzzbol-orange);
}

.settings-section-head h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--fuzzbol-navy);
}

.settings-section-head p {
    font-size: 0.8rem;
    color: var(--fuzzbol-muted);
    margin-top: 2px;
}

#btn-join-room.btn-online-secondary {
    background: #fff !important;
    color: var(--fuzzbol-navy) !important;
    border: 1.5px solid var(--fuzzbol-line);
}

#btn-join-room.btn-online-secondary:hover { background: var(--fuzzbol-orange-soft) !important; border-color: rgba(255, 75, 24, .38); }

.settings-section-icon-danger { background: rgba(197, 45, 33, .1); color: #c52d21; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 50px; height: 27px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.14);
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    border: 1px solid var(--edge);
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .slider { background-color: var(--gold-2); border-color: var(--gold-text); }
input:checked + .slider:before { transform: translateX(23px); background: var(--gold-1); }

/* Action Buttons */
.dual-actions { display: flex; gap: 12px; width: 100%; }
.form-actions { margin-top: 24px; }

/* Local release diagnostics */
.settings-diagnostics {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--edge);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, .14);
}

.diagnostics-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.settings-section-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--gold-text);
    font: 800 .66rem/1 var(--font-mono);
    letter-spacing: .12em;
}

.diagnostics-heading h3 { margin-bottom: 3px; font-size: 1.08rem; }
.diagnostics-heading p, .diagnostics-actions span, .diagnostic-feedback {
    color: var(--ink-3);
    font-size: .76rem;
}

.diagnostic-release-badge {
    flex-shrink: 0;
    padding: 6px 8px;
    border: 1px solid var(--edge);
    border-radius: var(--radius-pill);
    color: var(--gold-text);
    font: 800 .64rem/1 var(--font-mono);
    letter-spacing: .05em;
}

.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.diagnostic-card, .diagnostics-summary > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
}

.diagnostic-card span, .diagnostics-summary span {
    color: var(--ink-3);
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.diagnostic-card strong, .diagnostics-summary strong {
    overflow: hidden;
    color: var(--ink-1);
    font: 800 .82rem/1.2 var(--font-mono);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diagnostic-card strong[data-status="ok"] { color: var(--emerald); }
.diagnostic-card strong[data-status="warning"] { color: var(--gold-text); }
.diagnostic-card strong[data-status="error"] { color: var(--red); }

.diagnostics-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.diagnostics-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.diagnostics-actions .btn-secondary { flex: 0 0 auto; }
.diagnostic-feedback { min-height: 18px; margin-top: 8px; color: var(--emerald); }

.btn-primary-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--blue-2);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    flex: 2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-primary-start:hover { transform: translateY(-1px); background: var(--blue-1); box-shadow: none; }

.btn-primary-start.btn-gold {
    background: var(--gold-2);
    color: #3a2705;
    box-shadow: none;
}
.btn-primary-start.btn-gold:hover { background: var(--gold-1); box-shadow: none; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--edge);
    color: var(--ink-1);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    flex: 1;
    font-family: inherit;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--edge-strong); }

/* ==========================================================================
   ONLINE LOBBY
   ========================================================================== */

.lobby-field { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.lobby-field input.geometric-select { text-align: center; }
.lobby-field.code input { font-family: var(--font-mono); letter-spacing: 0.3em; font-size: 1.4rem; text-transform: uppercase; }

.room-code-box { text-align: center; padding: 22px; margin-top: 22px; }
.room-code-label { font-size: 0.8rem; color: var(--ink-3); margin-bottom: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.room-code-value { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 900; letter-spacing: 0.4em; color: var(--gold-text); }
.room-code-hint { font-size: 0.8rem; color: var(--ink-3); margin-top: 10px; }

.online-players-block { margin-top: 18px; }
.online-players-block .setting-meta { margin-bottom: 8px; }
#online-player-list { display: flex; flex-direction: column; gap: 8px; }

.online-status-text { text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--ink-3); }

.online-room-list { display: flex; flex-direction: column; gap: 10px; }

.online-room-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    background: #f8fafb;
    border: 1px solid var(--fuzzbol-line);
    border-radius: var(--fuzzbol-radius);
}

.online-room-row-full { opacity: 0.6; }

.online-room-row-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.online-room-row-info strong { font-size: 0.94rem; color: var(--fuzzbol-navy); }
.online-room-row-info small { font-size: 0.78rem; color: var(--fuzzbol-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.online-room-row .btn-secondary { flex: 0 0 auto; padding: 9px 16px; font-size: 0.85rem; }
.online-room-row .btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.online-room-list-empty {
    text-align: center;
    padding: 18px;
    color: var(--fuzzbol-muted);
    font-size: 0.85rem;
    background: #f8fafb;
    border: 1px dashed var(--fuzzbol-line);
    border-radius: var(--fuzzbol-radius);
}

.challenges-banner-slot {
    width: 100%;
    height: 170px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid var(--edge-strong);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.challenges-banner-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    transition: transform 0.5s ease;
}

.challenges-banner-slot:hover img {
    transform: scale(1.03);
}

.challenges-banner-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(13, 20, 36, 0.8) 100%);
    pointer-events: none;
}

.challenges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 700px) { .challenges-grid { grid-template-columns: 1fr; } }

.btn-challenge-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: left;
    color: var(--ink-1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: inherit;
}

.btn-challenge-card.active {
    background: rgba(238, 196, 83, 0.10);
    border-color: var(--gold-text);
    box-shadow: 0 0 0 1px var(--gold-text) inset;
}

.btn-challenge-card:hover:not(.active) {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--edge-strong);
}

.challenge-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.challenge-badge { font-size: 0.7rem; font-weight: 800; color: var(--gold-text); letter-spacing: 0.06em; text-transform: uppercase; }
.challenge-stars { display: flex; gap: 3px; }
.btn-challenge-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.005em; color: #fff; }
.btn-challenge-card p { font-size: 0.83rem; color: var(--ink-2); line-height: 1.45; }

/* ==========================================================================
   TOURNAMENT & LEAGUE SCREENS
   ========================================================================== */

.bracket-display { display: flex; justify-content: center; margin: 24px 0; }

.matchup-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.35);
    padding: 18px 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--edge);
    width: 100%;
}

.team-slot { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.01em; text-transform: uppercase; }

.vs {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ink-3);
    background: rgba(255, 255, 255, 0.07);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.league-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--edge);
    padding-bottom: 14px;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.round-badge { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid rgba(238, 196, 83, 0.35); border-radius: var(--radius-sm); background: rgba(238, 196, 83, 0.10); color: var(--gold-text); font-size: 0.85rem; font-family: var(--font-mono); }

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--edge);
    background: rgba(0, 0, 0, 0.22);
}

.league-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }

.league-table th {
    background: rgba(255, 255, 255, 0.045);
    padding: 10px 12px;
    text-align: center;
    color: var(--ink-3);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--edge);
}

.league-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.league-table th:nth-child(2), .league-table td:nth-child(2) { text-align: left; font-weight: 800; }
.league-table tr.leader-row td { color: var(--gold-text); font-weight: 800; }
.league-table tr.user-row { background: rgba(74, 149, 236, 0.13) !important; border-left: 3px solid var(--blue-1); }

/* ==========================================================================
   IN-GAME HUD (BROADCAST STYLE) & CANVAS
   ========================================================================== */

#game-wrapper { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }

/* Match view: the playfield owns the viewport and the broadcast HUD is the
   only persistent chrome left above it. */
#screen-game.active {
    position: fixed;
    inset: 0;
    z-index: 90;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
    background: #050d1a;
    align-items: stretch;
}

#screen-game.active #game-wrapper {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: block;
}

#screen-game.active .btn-pause {
    top: 12px;
    left: auto;
    right: 18px;
}

.btn-pause {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px;
    font-size: 0;
    font-family: inherit;
    background: rgba(5, 13, 26, 0.82);
    color: var(--ink-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius-pill);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.btn-pause svg { width: 16px; height: 16px; }
.btn-pause:hover { background: rgba(255, 75, 24, 0.16); color: #fff; border-color: var(--fuzzbol-orange, #ff4b18); }

/* Compact floating scoreboard pill — no permanent bar, sits over the canvas */
.scoreboard-hud {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--navy-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius-pill);
    padding: 6px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#screen-game.active .scoreboard-hud {
    position: absolute;
    top: 12px;
    left: 18px;
    z-index: 50;
    width: auto;
    max-width: calc(100vw - 90px);
    flex-wrap: wrap;
    row-gap: 4px;
}

.team-score { display: flex; align-items: center; gap: 8px; }
.team-score.blue { flex-direction: row-reverse; }

/* Reserved slot for the team's logo/crest — TeamArt.hydrate() upgrades it to an
   image when one is available; otherwise it just shows the mark text below. */
.team-mark {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: color-mix(in srgb, var(--team-color, var(--fuzzbol-orange, #ff4b18)) 24%, transparent);
    border: 1px solid color-mix(in srgb, var(--team-color, var(--fuzzbol-orange, #ff4b18)) 68%, transparent);
    color: #fff;
    font: 900 0.62rem var(--font-mono);
}

.team-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--team-color, var(--red));
}
.team-score.blue .team-name { color: var(--team-color, var(--blue-1)); }

.score-digit {
    font-size: 1.05rem;
    font-weight: 900;
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--edge);
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.timer-clock {
    font-size: 0.95rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--fuzzbol-orange, #ff4b18);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    padding: 0 2px;
}

.hud-penalties-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--edge);
}

.penalty-dots { display: flex; gap: 4px; }
.penalty-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); border: 1px solid var(--edge-strong); }
.penalty-dot.goal { background: var(--emerald); border-color: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.penalty-dot.miss { background: var(--red); border-color: var(--red); box-shadow: 0 0 6px var(--red); }
.penalty-label { font-size: 0.65rem; font-weight: 800; color: var(--ink-3); letter-spacing: 0.05em; }

.hud-objective-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--gold-text);
    background: rgba(238, 196, 83, 0.12);
    border: 1px solid rgba(238, 196, 83, 0.32);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

canvas {
    background: #000;
    border: 1px solid var(--edge);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    max-width: 100%;
    height: auto;
    display: block;
}

#screen-game.active #gameCanvas {
    width: 100% !important;
    max-width: none;
    height: 100% !important;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Goal Overlay */
.overlay-goal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(5, 13, 26, 0.94);
    backdrop-filter: blur(20px);
    border: 2px solid var(--gold-text);
    border-radius: var(--radius-md);
    padding: 28px 56px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 60px var(--gold-glow);
    z-index: 30;
}

.overlay-goal.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.overlay-goal h2 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2.7rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 20px var(--gold-glow);
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}

.overlay-goal p { font-size: 1.05rem; color: var(--ink-2); }

.prepared-countdown {
    position: absolute;
    inset: 0;
    z-index: 29;
    display: none;
    place-items: center;
    pointer-events: none;
    font-family: var(--font-display);
    font-size: clamp(5rem, 13vw, 9rem);
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.48), 0 0 20px #25d9ff, 0 0 55px rgba(37, 217, 255, 0.8);
}

.prepared-countdown.active {
    display: grid;
    animation: preparedCountPop 0.55s ease-out both;
}

@keyframes preparedCountPop {
    0% { opacity: 0; transform: scale(1.8); }
    25% { opacity: 1; }
    100% { opacity: 0.88; transform: scale(1); }
}

.overlay-goal.active #goal-title { animation: goalTextPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes goalTextPop {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.pause-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 8, 18, 0.72);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pause-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pause-card {
    width: min(440px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255, 75, 24, 0.38);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(13, 39, 72, 0.98), rgba(5, 16, 31, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 36px rgba(255, 75, 24, 0.14);
}

.pause-kicker {
    color: var(--fuzzbol-orange, #ff4b18);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.pause-card h2 {
    margin: 8px 0 6px;
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1;
    text-transform: uppercase;
}

.pause-card p { color: var(--ink-2); font-size: 0.94rem; }

.pause-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.pause-actions button { min-height: 48px; }

.pause-actions .btn-primary-start.btn-gold {
    background: var(--fuzzbol-orange, #ff4b18);
    box-shadow: 0 7px 15px rgba(244, 81, 32, 0.24);
}
.pause-actions .btn-primary-start.btn-gold:hover { background: #e94313; box-shadow: none; }

@media (max-width: 520px) {
    .pause-actions { flex-direction: column; }
}

.pause-settings {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--edge);
    text-align: left;
}

.pause-settings-kicker {
    color: var(--ink-3);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin-bottom: 12px;
}

.pause-settings .setting-row { padding: 12px 14px; gap: 12px; }
.pause-settings .setting-row + .setting-row { margin-top: 8px; }
.pause-settings .setting-name { font-size: 0.86rem; }
.pause-settings .setting-help { font-size: 0.73rem; }

.pause-volume-slider {
    width: 120px;
    accent-color: var(--fuzzbol-orange, #ff4b18);
    flex-shrink: 0;
}

.pause-fullscreen-btn {
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.reconnect-overlay { z-index: 65; }

.reconnect-spinner {
    width: 34px;
    height: 34px;
    margin: 4px auto 0;
    border-radius: 50%;
    border: 3px solid rgba(238, 196, 83, 0.25);
    border-top-color: var(--gold-text);
    animation: reconnectSpin 0.8s linear infinite;
}

@keyframes reconnectSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
    #screen-game.active .scoreboard-hud {
        top: 8px;
        left: 8px;
        max-width: calc(100vw - 66px);
        padding: 5px 8px;
        gap: 6px;
    }

    .team-score { gap: 5px; }
    .team-name { font-size: 0.68rem; }
    .score-digit { min-width: 22px; padding: 1px 6px; font-size: 0.9rem; }
    .timer-clock { font-size: 0.8rem; }

    #screen-game.active .btn-pause {
        top: 8px;
        right: 8px;
        padding: 8px;
    }
}

/* ==========================================================================
   FUZZBOL HOME — Orange / Navy product dashboard
   The home screen follows the supplied Fuzzbol identity reference while the
   underlying match, career, tournament and LAN logic remains unchanged.
   ========================================================================== */

.app-header .brand-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.legacy-ui-hooks { display: none !important; }

body.home-view {
    background: #f5f7f8;
    color: #172536;
    overflow-x: hidden;
    overflow-y: auto;
}

body.home-view .app-header { display: none; }
body.home-view #app-container {
    width: 100%;
    max-width: none;
    padding: 0;
    display: block;
}

#screen-start.fuzzbol-home.active {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #f5f7f8;
}

.home-sidebar {
    width: 272px;
    min-height: 100vh;
    flex: 0 0 272px;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    background: #fff;
    border-right: 1px solid #e3e7ea;
}

.home-brand {
    height: 126px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-bottom: 1px solid #e5e8eb;
}

.home-brand img {
    width: 208px;
    height: 142px;
    margin-top: -17px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.home-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 24px;
}

.home-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px 8px 16px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #253548;
    text-align: left;
    cursor: pointer;
    font: 800 0.86rem/1.15 var(--font-body);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.home-nav-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 3px 3px 0;
    background: transparent;
}

.home-nav-item svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-nav-item:hover { color: #ff4b18; background: #fff4ef; transform: translateX(2px); }
.home-nav-item.active { color: #f45120; background: #fff3ee; }
.home-nav-item.active::before { background: #f45120; }

.sidebar-spacer { flex: 1 1 24px; min-height: 24px; }

.sidebar-promo {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    padding: 19px 16px 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background:
        radial-gradient(circle at 76% 22%, rgba(255, 75, 24, .9) 0 2px, transparent 3px),
        radial-gradient(circle at 80% 25%, rgba(255, 75, 24, .3) 0 26px, transparent 27px),
        linear-gradient(145deg, #17293a, #071827 68%);
    box-shadow: 0 10px 22px rgba(20, 40, 55, .14);
    text-align: left;
    cursor: pointer;
}

.sidebar-promo::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 2px;
    right: -34px;
    top: 49px;
    background: linear-gradient(90deg, transparent, #ff4b18);
    transform: rotate(-25deg);
    box-shadow: 0 13px 0 rgba(255, 75, 24, .42), 0 26px 0 rgba(255, 75, 24, .22);
}

.promo-orbit {
    position: absolute;
    right: 16px;
    top: 13px;
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.promo-orbit img { width: 31px; height: 31px; object-fit: contain; filter: brightness(1.15); }
.promo-kicker { position: relative; z-index: 1; font: 800 .6rem var(--font-mono); letter-spacing: .08em; }
.sidebar-promo strong { position: relative; z-index: 1; margin-top: 4px; color: #ff5a25; font: 900 1.35rem/1 var(--font-display); letter-spacing: .02em; font-style: italic; }
.promo-button { position: relative; z-index: 1; margin-top: auto; padding: 6px 10px; color: #ff5a25; border: 1px solid #ff5a25; border-radius: 5px; font: 800 .58rem var(--font-body); }
.sidebar-promo:hover { transform: translateY(-2px); }

.sidebar-profile {
    display: grid;
    grid-template-columns: 38px 1fr 8px;
    gap: 10px;
    align-items: center;
    margin-top: 17px;
    padding: 10px 8px;
    border: 1px solid #e4e7e9;
    border-radius: 10px;
    background: #fff;
}

.profile-shield, .profile-action-mark {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #091523;
    border-radius: 50%;
}
.profile-shield { width: 38px; height: 38px; }
.profile-shield img { width: 34px; height: 34px; }
.sidebar-profile strong { display: block; color: #142638; font-size: .74rem; }
.sidebar-profile span { display: block; margin-top: 2px; color: #82909c; font: 700 .54rem var(--font-mono); letter-spacing: .04em; }
.sidebar-profile span b { color: #1b2b3c; }
.sidebar-profile i { width: 8px; height: 8px; align-self: start; margin-top: 3px; border-radius: 50%; background: #21c36a; }

.home-content {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0 28px;
    background: #f5f7f8;
}

.home-topbar {
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #e1e5e8;
}

.home-welcome span { display: block; color: #73808c; font: 700 .66rem var(--font-mono); letter-spacing: .11em; }
.home-welcome h1 { margin-top: 1px; color: #172638; font: 900 1.3rem/1 var(--font-display); letter-spacing: .02em; }
.division-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 28px; padding: 7px 10px; border: 1px solid #ccd3d8; border-radius: 5px; color: #364657; font: 800 .63rem var(--font-mono); letter-spacing: .04em; }
.division-pill svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.home-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-action, .profile-action { position: relative; display: grid; place-items: center; padding: 5px; border: 0; background: transparent; color: #223548; cursor: pointer; }
.header-action svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.header-action.has-badge b { position: absolute; right: -3px; top: -4px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #f45120; font: 800 .63rem var(--font-body); }
.action-divider { height: 25px; width: 1px; background: #dfe3e6; }
.profile-action { display: flex; gap: 8px; }
.profile-action-mark { width: 38px; height: 38px; }
.profile-action-mark img { width: 34px; height: 34px; }
.profile-action > svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-match-grid { display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 16px; margin-top: 20px; }
.match-preview-card, .match-setup-card { min-width: 0; overflow: hidden; border: 1px solid #e0e4e7; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px rgba(25, 43, 58, .07); }
.match-setup-card { align-self: start; }
.preview-scorebar { height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); align-items: stretch; overflow: hidden; color: #fff; background: #0d1d31; }
.preview-team { display: flex; align-items: center; gap: 10px; padding: 0 17px; font: 900 .85rem var(--font-body); }
.preview-team.orange { justify-content: flex-start; background: linear-gradient(100deg, #ff4c16 0 74%, #f15a1e 74% 100%); }
.preview-team.navy { justify-content: flex-end; background: linear-gradient(260deg, #0b284d 0 74%, #123962 74% 100%); }
.preview-team strong { flex: 1; letter-spacing: .02em; }
.preview-team b { font: 900 1.6rem/1 var(--font-display); }
.preview-team-mark { width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; color: #fff; font-size: .85rem; }
.preview-clock { display: grid; place-items: center; font: 900 1.02rem var(--font-mono); background: #102c50; }
.mini-pitch { position: relative; min-height: 430px; overflow: hidden; background: linear-gradient(90deg, rgba(24, 96, 37, .12) 0 8%, rgba(255,255,255,.03) 8% 16%, rgba(24,96,37,.12) 16% 24%, rgba(255,255,255,.03) 24% 32%, rgba(24,96,37,.12) 32% 40%, rgba(255,255,255,.03) 40% 48%, rgba(24,96,37,.12) 48% 56%, rgba(255,255,255,.03) 56% 64%, rgba(24,96,37,.12) 64% 72%, rgba(255,255,255,.03) 72% 80%, rgba(24,96,37,.12) 80% 88%, rgba(255,255,255,.03) 88% 96%, rgba(24,96,37,.12) 96% 100%), url('assets/grass_turf.webp'); background-size: auto, cover; background-position: center; }
.mini-pitch::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 44%, transparent 0 16%, rgba(11,80,30,.12) 58%, rgba(7,50,19,.3) 100%); pointer-events: none; }
.pitch-half-line { position: absolute; z-index: 1; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.82); }
.pitch-circle { position: absolute; z-index: 1; left: 50%; top: 50%; width: 160px; height: 160px; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.76); border-radius: 50%; }
.pitch-center-dot { position: absolute; z-index: 2; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(255,255,255,.9); }
.pitch-box { position: absolute; z-index: 1; top: 32%; width: 12%; height: 36%; border: 2px solid rgba(255,255,255,.72); }
.pitch-box.left { left: 0; border-left: 0; }.pitch-box.right { right: 0; border-right: 0; }
.pitch-goal { position: absolute; z-index: 1; top: 41%; width: 3.5%; height: 18%; border: 2px solid rgba(255,255,255,.86); background: repeating-linear-gradient(0deg, rgba(255,255,255,.4) 0 1px, transparent 1px 4px); }
.pitch-goal.left { left: 0; transform: translateX(-1px); }.pitch-goal.right { right: 0; transform: translateX(1px); }
.pitch-player { position: absolute; z-index: 4; width: 38px; height: 38px; display: grid; place-items: center; transform: translate(-50%,-50%); border: 3px solid #fff; border-radius: 50%; color: #fff; font: 900 .85rem var(--font-mono); box-shadow: 0 3px 5px rgba(0,0,0,.35); }
.orange-player { background: #f2571f; }.navy-player { background: #0d2a4e; }
.p1{left:28%;top:22%}.p2{left:43%;top:29%}.p3{left:28%;top:50%}.p4{left:39%;top:65%}.p5{left:31%;top:82%}.p6{left:66%;top:23%}.p7{left:79%;top:31%}.p8{left:62%;top:53%}.p9{left:76%;top:63%}.p10{left:66%;top:83%}
.pitch-ball { position: absolute; z-index: 5; left: 53%; top: 49%; width: 34px; height: 34px; display: grid; place-items: center; padding: 2px; transform: translate(-50%,-50%); border: 1px solid rgba(19,40,60,.24); border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 3px 6px rgba(0,0,0,.3); }
.pitch-ball img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.pitch-tag { position: absolute; z-index: 6; bottom: 16px; min-width: 132px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.54); border-radius: 9px; color: #fff; background: rgba(28,73,36,.76); backdrop-filter: blur(4px); }
.pitch-tag small { display: block; color: rgba(255,255,255,.76); font: 700 .52rem var(--font-mono); }.pitch-tag strong { display: block; margin-top: 4px; font: 800 .76rem var(--font-body); }.pitch-tag strong span { margin-left: 5px; font-size: 1.35rem; line-height: 0; vertical-align: -2px; }
.wind-tag { left: 17px; }.surface-tag { right: 17px; text-align: right; }.pitch-objective { position: absolute; z-index: 6; bottom: 15px; left: 50%; transform: translateX(-50%); padding: 8px 18px; border-radius: 9px; color: #fff; background: rgba(12,33,20,.9); font: 800 .7rem var(--font-mono); white-space: nowrap; }

.setup-card-header { padding: 11px 16px; color: #fff; background: #13283c; font: 900 .75rem var(--font-mono); letter-spacing: .06em; }
.setup-card-body { padding: 17px 16px 14px; }
.setup-label { margin-top: 15px; margin-bottom: 8px; color: #1c2c3e; font: 900 .64rem var(--font-mono); letter-spacing: .05em; }.setup-label:first-child { margin-top: 0; }
.setup-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.setup-option { min-height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid #d9dee2; border-radius: 9px; background: #fff; color: #253547; cursor: pointer; }
.setup-option svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }.setup-option strong { font: 900 .71rem var(--font-body); }.setup-option span { color: #72808c; font: 700 .55rem var(--font-mono); }.setup-option.active { border-color: #ff6333; color: #f45120; box-shadow: inset 0 0 0 1px #ff6333; }.setup-option.active span { color: #c5502e; }
.fun-mode-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 11px 12px; border: 1px solid #e0e5e8; border-radius: 9px; background: linear-gradient(135deg, #fff8f4, #fff); }
.fun-mode-entry label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.fun-mode-entry input { width: 18px; height: 18px; accent-color: #ff4b18; }
.fun-mode-entry strong { display: block; color: #24384d; font: 900 .72rem var(--font-body); letter-spacing: .03em; }
.fun-mode-entry small { display: block; margin-top: 2px; color: #7a8790; font: 600 .6rem var(--font-body); }
.fun-mode-editor { margin-top: 12px; padding: 14px; border: 1px solid rgba(255, 75, 24, .28); border-radius: 10px; background: linear-gradient(135deg, #fff8f3, #fff); }
.fun-mode-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0d9cf; }
.fun-mode-editor-head h2 { margin-top: 3px; color: #1d344a; font: 900 .95rem var(--font-body); }
.fun-mode-editor-head p { max-width: 32ch; margin-top: 4px; color: #72808c; font: 600 .6rem/1.35 var(--font-body); }
.fun-mode-attributes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; padding-top: 13px; }
.fun-attribute { display: grid; gap: 6px; color: #263b4e; font: 800 .62rem var(--font-mono); }
.fun-attribute span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fun-attribute output { min-width: 20px; padding: 2px 5px; border-radius: 5px; color: #fff; background: #ff4b18; text-align: center; font: 900 .62rem var(--font-mono); }
.fun-attribute input[type="range"] { width: 100%; accent-color: #ff4b18; cursor: pointer; }
.team-size-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }.team-size-options button { min-height: 34px; border: 1px solid #d4dbe0; border-radius: 7px; background: #fff; color: #26384a; font: 800 .7rem var(--font-body); cursor: pointer; }.team-size-options button.active { color: #fff; border-color: #ff4b18; background: #ff4b18; }
.setup-carousel { display: grid; grid-template-columns: 22px 82px 1fr 22px; gap: 8px; align-items: center; }.setup-carousel > button, .weather-row > button { border: 0; background: transparent; color: #1a2f45; font-size: 1.8rem; cursor: pointer; }.setup-carousel img { width: 82px; height: 56px; object-fit: cover; border-radius: 7px; }.setup-carousel strong, .weather-row strong { display: block; color: #21354a; font: 900 .69rem var(--font-body); }.setup-carousel span { display: block; margin-top: 4px; color: #76838e; font: 700 .55rem var(--font-mono); }.setup-stadium-players { display: block; margin-top: 5px; color: var(--fuzzbol-orange); font: 800 .49rem var(--font-mono); letter-spacing: .03em; }.setup-carousel i, .weather-row i { display: flex; gap: 4px; margin-top: 8px; }.setup-carousel i b, .weather-row i b { width: 7px; height: 7px; border-radius: 50%; background: #ccd2d6; }.setup-carousel i b:first-child, .weather-row i b:first-child { background: #ff4b18; }
.weather-row { display: grid; grid-template-columns: 22px 45px 1fr 22px; gap: 8px; align-items: center; }.weather-sun { color: #ffac12; font-size: 2.5rem; line-height: 1; text-align: center; }.weather-row small { display: block; margin-top: 3px; color: #7a8791; font: 500 .58rem/1.3 var(--font-body); }.weather-row i b:first-child { background: #d8dde0; }.weather-row i b:nth-child(2) { background: #ffb31a; }
.home-primary-action { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 17px; border: 0; border-radius: 9px; color: #fff; background: linear-gradient(100deg, #ff4b18, #ff5f24); box-shadow: 0 7px 15px rgba(244, 81, 32, .24); cursor: pointer; font: 900 .86rem var(--font-body); }.home-primary-action span { font-size: 1.3rem; line-height: 0; }.home-primary-action:hover { background: #e94313; transform: translateY(-1px); }
.setup-live-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #e6eaed; }
.setup-live-readout > div { min-width: 0; padding: 7px 8px; border: 1px solid #e3e8eb; border-radius: 7px; background: #f8fafb; }
.setup-live-readout small { display: block; color: #7b8992; font: 800 .48rem var(--font-mono); letter-spacing: .06em; }
.setup-live-readout strong { display: block; overflow: hidden; margin-top: 4px; color: var(--fuzzbol-navy); font: 900 .58rem var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.setup-map-formats { display: block; margin-top: 5px; color: var(--fuzzbol-orange); font: 800 .58rem var(--font-mono); }
.setup-live-insights { display: none; margin-top: 10px; padding: 11px 12px; border: 1px solid #e1e6e9; border-radius: 9px; background: linear-gradient(135deg, #f8fafb, #fff); }
.setup-live-insights-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #e7ebed; }
.setup-live-insights-head small { display: block; color: var(--fuzzbol-orange); font: 900 .48rem var(--font-mono); letter-spacing: .08em; }
.setup-live-insights-head strong { display: block; margin-top: 3px; color: var(--fuzzbol-navy); font: 900 .7rem var(--font-body); }
.setup-live-insights-head > span { display: inline-flex; align-items: center; gap: 5px; color: #268b5c; font: 900 .49rem var(--font-mono); white-space: nowrap; }
.setup-live-insights-head i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #29bd72; box-shadow: 0 0 0 3px rgba(41,189,114,.13); }
.setup-live-insights-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 10px 0 8px; }
.setup-live-insights-grid > div { min-width: 0; padding-right: 7px; border-right: 1px solid #e4e9eb; }
.setup-live-insights-grid > div:last-child { border-right: 0; padding-right: 0; }
.setup-live-insights-grid small { display: block; color: #84919a; font: 800 .45rem var(--font-mono); letter-spacing: .06em; }
.setup-live-insights-grid strong { display: block; overflow: hidden; margin-top: 3px; color: var(--fuzzbol-navy); font: 900 .56rem var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.setup-live-insights-grid span { display: block; overflow: hidden; margin-top: 3px; color: #76858f; font: 600 .49rem var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.setup-sim-meter { display: grid; grid-template-columns: auto auto; gap: 5px 8px; align-items: center; }
.setup-sim-meter > span { color: #7d8a93; font: 800 .47rem var(--font-mono); letter-spacing: .06em; }
.setup-sim-meter > strong { justify-self: end; color: var(--fuzzbol-orange); font: 900 .5rem var(--font-mono); }
.setup-sim-meter > div { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 99px; background: #e1e8eb; }
.setup-sim-meter b { display: block; width: 64%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--fuzzbol-orange), #ff9b27); transition: width .25s ease; }
.setup-live-insights > p { margin: 8px 0 0; color: #71808a; font: 600 .54rem/1.35 var(--font-body); }

.home-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 17px; }.feature-card { position: relative; min-height: 174px; overflow: hidden; display: flex; align-items: stretch; border: 1px solid #e2e5e8; border-radius: 12px; background: #fff; cursor: pointer; }.feature-card > div { position: relative; z-index: 2; width: 63%; padding: 18px 14px; }.feature-card img { position: absolute; z-index: 1; right: -3px; bottom: 0; width: 60%; height: 100%; object-fit: cover; object-position: center; opacity: .62; mask-image: linear-gradient(90deg, transparent 0%, #000 36%, #000 100%); }.feature-card:nth-child(1) img, .feature-card:nth-child(2) img { object-fit: contain; object-position: right bottom; opacity: .82; }.feature-card:nth-child(2) img { width: 54%; }.feature-card .feature-kicker { display: block; max-width: 18ch; color: #1e344a; font: 900 .66rem/1.05 var(--font-mono); letter-spacing: .04em; }.feature-card h2 { margin-top: 12px; color: #25374a; font: 900 1rem/1.08 var(--font-body); }.feature-card p { margin-top: 8px; color: #657480; font: 500 .66rem/1.35 var(--font-body); }.feature-card button { position: absolute; z-index: 3; left: 14px; bottom: 12px; padding: 7px 10px; border: 1px solid #d7dde1; border-radius: 6px; background: rgba(255,255,255,.9); color: #2b3c4d; font: 900 .58rem var(--font-body); cursor: pointer; }.feature-card button span { margin-left: 12px; font-size: 1rem; vertical-align: -1px; }.feature-card.dark { color: #fff; background: linear-gradient(135deg, #13283c, #2e3d4c); border-color: #253c50; }.feature-card.dark .feature-kicker, .feature-card.dark h2 { color: #fff; }.feature-card.dark p { color: rgba(255,255,255,.72); }.feature-card.dark img { width: 70%; opacity: .52; mix-blend-mode: screen; }.feature-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(25,43,58,.1); }

.home-footer { min-height: 58px; display: flex; align-items: center; gap: 18px; margin-top: 19px; border-top: 1px solid #dfe4e7; color: #6b7985; font-size: .66rem; }.home-footer i { width: 1px; height: 15px; background: #cfd6db; }.news-pill { padding: 7px 18px; border-radius: 999px; color: #fff; background: #ff4b18; font: 900 .61rem var(--font-mono); }.social-icons { display: flex; gap: 14px; margin-left: auto; color: #314457; font-weight: 800; font-size: .82rem; }

@media (max-width: 1180px) {
    .home-sidebar { width: 230px; flex-basis: 230px; padding-left: 18px; padding-right: 18px; }.home-nav-item::before { left: -18px; }.home-content { padding: 0 20px; }.home-match-grid { grid-template-columns: minmax(0,1fr) 340px; }.home-feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.feature-card { min-height: 162px; }
}

@media (max-width: 900px) {
    #screen-start.fuzzbol-home.active { flex-direction: column; }.home-sidebar { width: 100%; min-height: auto; flex-basis: auto; padding: 10px 15px; border-right: 0; border-bottom: 1px solid #e3e7ea; }.home-brand { height: 54px; justify-content: flex-start; border-bottom: 0; }.home-brand img { width: 102px; height: 72px; margin-top: -10px; }.home-nav { flex-direction: row; overflow-x: auto; gap: 4px; margin-top: 3px; padding-bottom: 3px; }.home-nav-item { flex: 0 0 auto; min-height: 38px; gap: 7px; padding: 7px 11px; font-size: .66rem; }.home-nav-item br { display: none; }.home-nav-item svg { width: 17px; height: 17px; flex-basis: 17px; }.home-nav-item::before { display: none; }.sidebar-spacer, .sidebar-promo, .sidebar-profile { display: none; }.home-content { padding: 0 15px; }.home-topbar { min-height: 80px; }.home-match-grid { grid-template-columns: 1fr; }.match-setup-card { order: -1; }.home-feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
    .home-topbar { gap: 10px; }.division-pill { display: none; }.header-action:first-child, .action-divider { display: none; }.home-welcome h1 { font-size: 1.08rem; }.home-actions { gap: 4px; }.preview-scorebar { grid-template-columns: minmax(0,1fr) 63px minmax(0,1fr); }.preview-team { gap: 5px; padding: 0 8px; font-size: .68rem; }.preview-team-mark { width: 21px; height: 21px; }.preview-team b { font-size: 1.35rem; }.mini-pitch { min-height: 350px; }.pitch-circle { width: 118px; height: 118px; }.pitch-player { width: 31px; height: 31px; font-size: .67rem; }.pitch-tag { min-width: 0; padding: 7px 8px; }.wind-tag { left: 8px; }.surface-tag { right: 8px; }.pitch-tag strong { font-size: .61rem; }.pitch-objective { bottom: 12px; padding: 7px 10px; font-size: .6rem; }.setup-live-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }.setup-live-readout > div:last-child { grid-column: 1 / -1; }.home-feature-grid { grid-template-columns: 1fr; }.feature-card { min-height: 155px; }.home-footer { flex-wrap: wrap; gap: 8px 13px; padding: 12px 0; }.home-footer span:not(.news-pill), .home-footer i { display: none; }.social-icons { margin-left: auto; }
}

/* ==========================================================================
   MODALS (GAMEOVER)
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 14, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--navy-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius-md);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.modal-victory-badge {
    width: 100%;
    height: 140px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid rgba(238, 196, 83, 0.35);
    box-shadow: 0 8px 24px rgba(238, 196, 83, 0.2);
    position: relative;
}

.modal-victory-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.modal-victory-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(18, 25, 44, 0.75) 100%);
    pointer-events: none;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-header h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; }
.career-action-button {
    background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
    color: #3a2705;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.career-action-button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--gold-glow); }
.career-action-button:disabled { background: rgba(255, 255, 255, 0.08); color: var(--ink-3); cursor: not-allowed; box-shadow: none; transform: none; }

.winner-title { font-family: var(--font-display); font-weight: 900; font-size: 2.1rem; text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.01em; }

.match-stats-table { width: 100%; margin: 20px 0; border-collapse: collapse; }
.match-stats-table td { padding: 10px 14px; border-bottom: 1px solid var(--edge); font-size: 0.95rem; }

/* The end-of-match modal keeps its own light Fuzzbol card regardless of
   body.match-view's --ink-1 swap: that swap targets the in-match HUD (which
   sits on a light background), but this modal's card is always the dark
   .modal-card base, so inheriting --ink-1 there turned title/labels navy-on-navy
   and made them unreadable right when a player finishes a match. */
#modal-gameover .modal-card {
    background: var(--fuzzbol-panel);
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
    box-shadow: 0 24px 60px rgba(19, 40, 60, .28);
}

#modal-gameover .winner-title { color: var(--fuzzbol-navy); }
#modal-gameover #modal-subtitle { color: var(--fuzzbol-muted); }

#modal-gameover .match-stats-table td {
    border-bottom-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

#modal-gameover .match-stats-table td:first-child { color: var(--fuzzbol-muted); }

#modal-gameover .btn-primary-start {
    background: var(--fuzzbol-orange);
    color: #fff;
}

#modal-gameover .btn-primary-start:hover { background: #e94313; }

#modal-gameover .btn-secondary {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

#modal-gameover .btn-secondary:hover {
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .42);
}
.match-stats-table td:last-child { text-align: right; font-family: var(--font-mono); }

/* Post-match reveal: card pops in, then its contents stagger in behind it
   instead of the whole modal just snapping into view. */
#modal-gameover.active .modal-card { animation: gameoverCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
#modal-gameover.active .modal-victory-badge { animation: careerViewIn 0.4s ease both; animation-delay: 0.05s; }
#modal-gameover.active .winner-title { animation: gameoverTitlePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: 0.1s; }
#modal-gameover.active #modal-subtitle { animation: careerViewIn 0.4s ease both; animation-delay: 0.16s; }
#modal-gameover.active .career-postmatch-card { animation: careerViewIn 0.45s ease both; animation-delay: 0.2s; }
#modal-gameover.active .career-pm-rating-badge { animation: gameoverTitlePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: 0.32s; }
#modal-gameover.active .match-stats-table { animation: careerViewIn 0.4s ease both; animation-delay: 0.3s; }
#modal-gameover.active .dual-actions { animation: careerViewIn 0.4s ease both; animation-delay: 0.38s; }

@keyframes gameoverCardIn {
    0% { opacity: 0; transform: scale(0.92) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes gameoverTitlePop {
    0% { opacity: 0; transform: scale(0.7); }
    60% { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   TOUCH CONTROLS (VIRTUAL JOYSTICK & CHUTE)
   ========================================================================== */

.touch-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 40; display: flex; justify-content: space-between; }
.touch-overlay.hidden { display: none; }
.touch-joystick-zone { width: 50%; height: 100%; position: relative; pointer-events: auto; }

.joystick-base {
    position: absolute;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    display: none;
    pointer-events: none;
}

.joystick-knob {
    position: absolute; top: 50%; left: 50%;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
    border: 2px solid #fff;
    box-shadow: 0 0 12px var(--blue-glow);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.touch-kick-zone { width: 50%; height: 100%; position: relative; display: flex; justify-content: flex-end; align-items: flex-end; padding: 24px 32px; pointer-events: none; }

.touch-kick-btn {
    pointer-events: auto;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--red), #b9312a);
    border: 3px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    font-family: var(--font-body);
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    box-shadow: 0 0 25px var(--red-glow);
    transition: transform 0.1s, box-shadow 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.touch-kick-btn:active, .touch-kick-btn.pressed {
    transform: scale(0.92);
    box-shadow: 0 0 35px var(--red-glow);
    background: linear-gradient(180deg, #f0685f, var(--red));
}

/* ==========================================================================
   MATCH INTRO CINEMATIC OVERLAY
   ========================================================================== */

.match-intro-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(255, 75, 24, .16), transparent 32%),
        radial-gradient(ellipse at 92% 100%, rgba(19, 40, 60, .16), transparent 36%),
        linear-gradient(135deg, #f5f7f8 0%, #ffffff 60%, #edf3f5 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.match-intro-overlay.active { opacity: 1; pointer-events: auto; }

.match-intro-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .7;
    background: repeating-linear-gradient(124deg, transparent 0 68px, rgba(19, 40, 60, .035) 69px 70px, transparent 71px 136px);
    pointer-events: none;
}

.intro-topline,
.intro-stadium-card,
.intro-vs-container,
.intro-bottomline { position: relative; z-index: 1; }

.intro-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(880px, calc(100% - 44px));
    margin-bottom: 18px;
    color: var(--fuzzbol-navy);
    font: 900 .62rem var(--font-mono);
    letter-spacing: .1em;
}

.intro-topline b {
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--fuzzbol-orange);
    font-size: .56rem;
}

.intro-stadium-card {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 30px;
    padding: 12px 22px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 8px 18px rgba(19, 40, 60, .06);
}

.intro-stadium-kicker,
.intro-team-side {
    color: var(--fuzzbol-orange);
    font: 900 .56rem var(--font-mono);
    letter-spacing: .1em;
}

.intro-stadium-card strong {
    color: var(--fuzzbol-navy);
    font: 900 1.2rem/1 var(--font-display);
    letter-spacing: .03em;
    text-transform: uppercase;
}

.intro-stadium-card small {
    color: var(--fuzzbol-muted);
    font: 600 .68rem var(--font-body);
}

.intro-vs-container { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }

.intro-team {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    min-width: min(290px, 34vw);
    padding: 18px 22px;
    border: 1px solid var(--fuzzbol-line);
    border-left: 4px solid var(--team-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 22px rgba(19, 40, 60, .1);
}

.intro-team-left { animation: introSlideFromLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; transform: translateX(-100px); opacity: 0; }
.intro-team-right { animation: introSlideFromRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards; transform: translateX(100px); opacity: 0; }
@keyframes slideFromLeft { to { transform: translateX(0); opacity: 1; } }
@keyframes slideFromRight { to { transform: translateX(0); opacity: 1; } }

@keyframes introSlideFromLeft { to { transform: translateX(0); opacity: 1; } }
@keyframes introSlideFromRight { to { transform: translateX(0); opacity: 1; } }

.intro-team-side { grid-column: 1 / -1; }

.intro-team-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #fff;
    background: var(--team-color);
    font: 900 1.15rem/1 var(--font-display);
}

.intro-team-name {
    color: var(--fuzzbol-navy);
    font: 900 clamp(1.05rem, 2.2vw, 1.55rem)/1 var(--font-display);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.intro-vs-badge {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--fuzzbol-orange);
    font: 900 1.8rem/1 var(--font-mono);
    animation: introVsBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
    transform: scale(0);
}

.intro-vs-badge i { width: 32px; height: 3px; border-radius: 999px; background: var(--fuzzbol-orange); }
@keyframes introVsBounce { to { transform: scale(1); } }

.intro-bottomline {
    margin-top: 28px;
    color: var(--fuzzbol-muted);
    font: 700 .62rem var(--font-mono);
    letter-spacing: .05em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .intro-topline { width: calc(100% - 28px); font-size: .52rem; }
    .intro-topline b { font-size: .48rem; }
    .intro-stadium-card { margin-bottom: 18px; }
    .intro-vs-container { gap: 7px; width: calc(100% - 20px); }
    .intro-team { min-width: 0; flex: 1; padding: 13px 10px; }
    .intro-team-name { font-size: .82rem; }
    .intro-team-mark { width: 25px; height: 25px; font-size: .9rem; }
    .intro-vs-badge { font-size: 1.1rem; }
    .intro-vs-badge i { width: 20px; }
    .intro-bottomline { width: calc(100% - 28px); text-align: center; font-size: .5rem; }
}

/* ==========================================================================
   CAREER MODE
   ========================================================================== */

.color-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.color-swatch {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--gold-text); }

.career-player-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 20px;
}

.career-avatar {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    border: 2px solid var(--edge);
}

.career-player-info { flex: 1; min-width: 0; }
.career-player-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; color: #fff; }
.career-player-title { font-size: 0.84rem; color: var(--gold-text); font-weight: 700; margin-bottom: 8px; }
.career-player-age { color: var(--ink-3); font: 700 .62rem var(--font-mono); margin-bottom: 5px; }

.career-club-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 15px 16px;
    background: linear-gradient(100deg, rgba(238, 196, 83, 0.1), rgba(0, 0, 0, 0.24));
    border: 1px solid rgba(238, 196, 83, 0.35);
    border-left: 3px solid var(--gold-text);
}
.career-club-panel-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.career-panel-kicker { color: var(--gold-text); font: 800 0.6rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.career-club-panel-copy strong { color: #fff; font: 900 1.05rem var(--font-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.career-club-panel-copy > span:last-child { color: var(--ink-2); font-size: 0.76rem; }
.career-club-rating, .career-market-value { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.career-club-rating strong { color: var(--gold-text); font: 900 1.6rem var(--font-mono); }
.career-market-value strong { color: var(--emerald); font: 900 1rem var(--font-mono); }
.career-club-rating span, .career-market-value span { color: var(--ink-3); font: 700 0.58rem var(--font-mono); letter-spacing: 0.06em; white-space: nowrap; }

.career-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--edge);
    padding: 0 0 14px;
}

.career-toolbar-status { display: flex; flex-direction: column; gap: 4px; }
.career-prep-status { color: var(--gold-text); font: 800 0.7rem var(--font-mono); }
.career-prep-status.used { color: var(--ink-3); }
.career-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.career-save-status { color: var(--ink-3); font: 700 0.7rem var(--font-mono); }
.career-save-status[data-status="success"] { color: var(--emerald); }
.career-save-status[data-status="error"] { color: var(--red); }

.career-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.career-metric {
    min-height: 66px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--edge-strong);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.career-metric span { color: var(--ink-3); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.career-metric strong { color: #fff; font: 800 1.22rem var(--font-mono); }
.career-metric.gold { border-left-color: var(--gold-text); }
.career-metric.gold strong { color: var(--gold-text); }
.career-metric.blue { border-left-color: var(--blue-1); }
.career-metric.blue strong { color: var(--blue-1); }
.career-metric.warning { border-left-color: var(--red); }
.career-metric.warning strong { color: #ff887f; }

.career-objective {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(238, 196, 83, 0.07);
    border: 1px solid rgba(238, 196, 83, 0.28);
}

.career-objective > div { display: flex; flex-direction: column; gap: 4px; }
.career-objective-kicker { color: var(--gold-text); font: 800 0.62rem var(--font-mono); letter-spacing: 0.1em; }
.career-objective strong { color: var(--ink-1); font-size: 0.88rem; }
.career-objective-progress { color: var(--gold-text); font: 800 1rem var(--font-mono); white-space: nowrap; }

.career-transfer-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 15px;
    background: rgba(74, 149, 236, 0.08);
    border: 1px solid rgba(74, 149, 236, 0.3);
}
.career-transfer-panel > div { min-width: 0; }
.career-transfer-panel p { margin: 4px 0 0; color: var(--ink-2); font-size: 0.78rem; }
.career-transfer-panel button { white-space: nowrap; }
.career-transfer-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.career-transfer-offer { padding: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--edge); }
.career-transfer-offer strong { display: block; color: #fff; font: 800 0.82rem var(--font-display); }
.career-transfer-offer span { display: block; color: var(--ink-3); font-size: 0.68rem; margin-top: 4px; }
.career-transfer-offer .offer-meta { color: var(--gold-text); font: 700 0.64rem var(--font-mono); }
.career-transfer-offer button { width: 100%; margin-top: 10px; }

.career-next-match {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--edge);
}
.career-next-match-copy { display: flex; flex-direction: column; gap: 4px; }
.career-next-match-copy strong { color: #fff; font: 900 1.08rem var(--font-display); text-transform: uppercase; }
.career-next-match-copy > span:last-child { color: var(--ink-2); font-size: 0.76rem; }
.career-match-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.career-match-action {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding: 12px;
    text-align: left;
    color: var(--ink-1);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.career-match-action:hover { transform: translateY(-2px); border-color: var(--gold-text); background: rgba(238, 196, 83, 0.09); }
.career-match-action.featured { background: rgba(238, 196, 83, 0.12); border-color: rgba(238, 196, 83, 0.56); }
.career-match-action:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.career-match-action-icon { color: var(--gold-text); font: 900 1rem var(--font-mono); }
.career-match-action strong { color: #fff; font: 800 0.82rem var(--font-body); }
.career-match-action small { color: var(--ink-3); font-size: 0.68rem; line-height: 1.3; }
.career-prepared-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    padding: 13px 15px;
    background: rgba(238, 196, 83, 0.06);
    border: 1px solid rgba(238, 196, 83, 0.25);
}
.career-prepared-panel p { margin: 4px 0 0; color: var(--ink-2); font-size: 0.76rem; }
.career-prepared-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.career-prepared-actions button { white-space: nowrap; }
[hidden] { display: none !important; }

.xp-bar-track { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: var(--gold-text); border-radius: 4px; transition: width 0.3s ease; }
.career-xp-text { font-size: 0.74rem; color: var(--ink-3); margin-top: 4px; font-family: var(--font-mono); }

.career-section-label {
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 18px 0 10px;
}

.career-attr-level { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 900; color: var(--gold-text); }

.career-attributes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.career-attribute-card { min-height: 172px; min-width: 0; display: grid; grid-template-rows: 1fr auto; gap: 12px; padding: 18px; overflow: hidden; border: 1px solid var(--fuzzbol-line, var(--edge)); border-radius: 10px; background: var(--fuzzbol-surface, #fff); }
.career-attribute-title { color: var(--fuzzbol-navy, var(--ink-1)); font: 900 .92rem var(--font-body); }
.career-attribute-desc { margin-top: 5px; color: var(--fuzzbol-muted, var(--ink-3)); font-size: .68rem; line-height: 1.4; }
.career-attr-content { display: flex; flex-direction: column; gap: 4px; }
.career-attr-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.career-attr-heading strong { color: var(--gold-text); font: 800 0.86rem var(--font-mono); }
.career-meter { height: 5px; margin: 9px 0 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.career-meter span { display: block; height: 100%; background: var(--gold-text); transition: width 0.25s ease; }
.career-attr-effect { color: var(--ink-3); font: 600 0.67rem var(--font-mono); }
.career-attr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

@media (max-width: 760px) {
    .career-attributes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 500px) {
    .career-attributes-grid { grid-template-columns: 1fr; }
}

.career-view[data-career-panel="development"] .career-attr-actions {
    grid-template-columns: 1fr;
}

.btn-training {
    background: rgba(74, 149, 236, 0.12);
    color: var(--blue-1);
    border: 1px solid rgba(74, 149, 236, 0.42);
    border-radius: var(--radius-sm);
    padding: 10px;
    font: 800 0.78rem var(--font-body);
    cursor: pointer;
}

.btn-training:hover { background: rgba(74, 149, 236, 0.2); border-color: var(--blue-1); }
.btn-training:disabled { opacity: 0.45; cursor: not-allowed; }

.career-match-log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 210px;
    overflow-y: auto;
}

.career-log-row {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--ink-3);
    font: 600 0.72rem var(--font-mono);
}

.career-log-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 900;
}

.career-log-result.win { background: rgba(47, 191, 117, 0.16); color: var(--emerald); }
.career-log-result.draw { background: rgba(238, 196, 83, 0.16); color: var(--gold-text); }
.career-log-result.loss { background: rgba(224, 72, 63, 0.16); color: #ff887f; }
.career-log-opponent { color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.career-log-row strong { color: var(--ink-1); }
.career-log-empty { padding: 16px; background: rgba(0, 0, 0, 0.2); color: var(--ink-3); font-size: 0.8rem; }

.career-season-info, .career-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--edge);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.career-stat-item { text-align: center; }
.career-stat-value { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 800; color: #fff; }
.career-stat-label { font-size: 0.68rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }

@media (max-width: 640px) {
    .career-club-panel { grid-template-columns: 1fr 1fr; gap: 12px; }
    .career-club-panel-copy { grid-column: 1 / -1; }
    .career-club-rating, .career-market-value { align-items: flex-start; text-align: left; }
    .career-transfer-panel { align-items: flex-start; flex-direction: column; }
    .career-transfer-panel button { width: 100%; }
    .career-transfer-offers { grid-template-columns: 1fr; }
    .career-match-actions { grid-template-columns: 1fr; }
    .career-match-action { min-height: 78px; }
    .career-prepared-panel { align-items: flex-start; flex-direction: column; }
    .career-prepared-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
    .career-prepared-actions button { width: 100%; }
}

/* Shared secondary buttons grow inside toolbars; the sidebar exit must remain compact. */
.career-sidebar .career-exit {
    flex: 0 0 auto;
    min-height: 42px;
    height: auto;
    align-self: stretch;
}

/* ==========================================================================
   FUZZBOL UI FOUNDATION — reusable tokens and primitives for every mode
   ========================================================================== */

:root {
    --fuzzbol-orange: #ff4b18;
    --fuzzbol-orange-soft: #fff3ee;
    --fuzzbol-navy: #13283c;
    --fuzzbol-navy-deep: #0b1f38;
    --fuzzbol-page: #f5f7f8;
    --fuzzbol-panel: #ffffff;
    --fuzzbol-line: #dfe4e7;
    --fuzzbol-muted: #71808c;
    --fuzzbol-radius: 12px;
    --fuzzbol-shadow: 0 8px 18px rgba(25, 43, 58, .07);
}

.fuzzbol-screen {
    --screen-page: var(--fuzzbol-page);
    --screen-panel: var(--fuzzbol-panel);
    --screen-line: var(--fuzzbol-line);
    --screen-accent: var(--fuzzbol-orange);
}

.fuzzbol-panel {
    overflow: hidden;
    border: 1px solid var(--screen-line, var(--fuzzbol-line));
    border-radius: var(--fuzzbol-radius);
    background: var(--screen-panel, var(--fuzzbol-panel));
    box-shadow: var(--fuzzbol-shadow);
}

.fuzzbol-panel-header {
    padding: 11px 16px;
    color: #fff;
    background: var(--fuzzbol-navy);
    font: 900 .75rem var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fuzzbol-primary,
.fuzzbol-screen .fuzzbol-primary {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--fuzzbol-orange);
    box-shadow: 0 7px 15px rgba(244, 81, 32, .2);
    cursor: pointer;
    font: 900 .78rem var(--font-body);
    letter-spacing: .02em;
    text-transform: uppercase;
}

.fuzzbol-primary:hover,
.fuzzbol-screen .fuzzbol-primary:hover { background: #e94313; }

.fuzzbol-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 999px;
    color: var(--fuzzbol-navy);
    background: #fff;
    font: 800 .6rem var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fuzzbol-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.fuzzbol-section-heading > span {
    color: var(--fuzzbol-orange);
    font: 800 .62rem var(--font-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.fuzzbol-section-heading h2 {
    margin-top: 4px;
    color: var(--fuzzbol-navy);
    font: 900 1.7rem/1 var(--font-display);
    text-transform: uppercase;
}

.home-feedback {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 22px;
    max-width: min(440px, calc(100vw - 30px));
    padding: 11px 16px;
    border: 1px solid rgba(255, 75, 24, .36);
    border-radius: 9px;
    color: #fff;
    background: rgba(19, 40, 60, .96);
    box-shadow: 0 12px 28px rgba(12, 28, 42, .22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .2s ease;
    font: 700 .7rem/1.35 var(--font-body);
}

.home-feedback.active { opacity: 1; transform: translate(-50%, 0); }

#screen-start.fuzzbol-home.active { padding: 0; }

@media (min-width: 901px) and (min-height: 650px) {
    body.home-view {
        height: 100dvh;
        overflow: hidden;
    }

    #screen-start.fuzzbol-home.active {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .home-sidebar {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .home-content {
        height: 100dvh;
        min-height: 0;
        display: grid;
        grid-template-rows: 82px minmax(0, 1fr) 138px 42px;
        gap: 14px;
        overflow: hidden;
    }

    .home-topbar { min-height: 0; height: 100%; }
    .home-match-grid { min-height: 0; height: 100%; margin-top: 0; }
    .match-preview-card, .match-setup-card { height: 100%; min-height: 0; }
    .match-preview-card { display: flex; flex-direction: column; }
    .mini-pitch { min-height: 0; height: 100%; }
    .setup-card-body { min-height: 0; overflow-y: auto; padding: 9px 14px 10px; }
    .setup-label { margin-top: 6px; margin-bottom: 4px; }
    .setup-label:first-child { margin-top: 0; }
    .setup-option { min-height: 58px; }
    .setup-option svg { width: 21px; height: 21px; }
    .team-size-options button { min-height: 30px; }
    .setup-carousel { grid-template-columns: 20px 74px 1fr 20px; gap: 6px; }
    .setup-carousel img { width: 74px; height: 48px; }
    .setup-carousel i, .weather-row i { margin-top: 4px; }
    .weather-row { grid-template-columns: 20px 40px 1fr 20px; gap: 6px; }
    .home-primary-action { min-height: 38px; margin-top: 7px; }
    .setup-live-readout { margin-top: 3px; padding-top: 5px; }
    .setup-live-readout > div { padding: 5px 7px; }
    .home-feature-grid { height: 100%; min-height: 0; margin-top: 0; }
    .feature-card { height: 100%; min-height: 0; }
    .feature-card > div { padding: 14px; }
    .feature-card h2 { margin-top: 8px; font-size: .9rem; }
    .feature-card button { bottom: 10px; }
    .home-footer { height: 100%; min-height: 0; margin-top: 0; }
}

@media (min-width: 901px) and (max-height: 649px) {
    body.home-view { overflow: hidden; }
    .home-sidebar { min-height: 100dvh; overflow-y: auto; }
    .home-content { height: 100dvh; overflow-y: auto; }
}

@media (min-width: 901px) and (min-height: 850px) {
    .setup-option { min-height: 84px; gap: 7px; padding: 9px 6px; }
    .setup-option svg { width: 28px; height: 28px; }
    .setup-option strong { font-size: .78rem; }
    .setup-option span { font-size: .58rem; }
    .setup-live-insights { display: block; }
}

.setup-carousel i b.active,
.weather-row i b.active { background: var(--fuzzbol-orange); }

@media (max-width: 900px) {
    .home-content { overflow: visible; }
    #screen-start.fuzzbol-home.active { overflow: visible; }
}

/* ========================================================================== 
   FUZZBOL BRAND SURFACES — shared visual language for the rest of the game
   ========================================================================== */

.setup-stadium-thumb {
    display: block;
    width: 100%;
    height: 116px;
    margin-bottom: 12px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--fuzzbol-line);
    background: var(--fuzzbol-navy-deep);
}

body:not(.home-view):not(.match-view) {
    background: var(--fuzzbol-page);
    background-image:
        radial-gradient(ellipse 760px 420px at 0% 0%, rgba(255, 75, 24, .08), transparent 58%),
        radial-gradient(ellipse 820px 520px at 100% 0%, rgba(19, 40, 60, .08), transparent 60%);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) #app-container {
    max-width: 1440px;
    padding: 16px 24px 32px;
}

body:not(.home-view):not(.match-view) .app-header {
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--fuzzbol-line);
    border-left: 3px solid var(--fuzzbol-orange);
    color: var(--fuzzbol-navy);
    box-shadow: var(--fuzzbol-shadow);
}

body:not(.home-view):not(.match-view) .btn-icon {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .btn-icon:hover {
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .45);
}

body:not(.home-view):not(.match-view) .fuzzbol-screen.active:not(#screen-game) {
    color: var(--fuzzbol-navy);
    padding-bottom: 28px;
}

body:not(.home-view):not(.match-view) .glass-card,
body:not(.home-view):not(.match-view) .fuzzbol-panel {
    background: rgba(255, 255, 255, .96);
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
    box-shadow: var(--fuzzbol-shadow);
}

body:not(.home-view):not(.match-view) .card-title,
body:not(.home-view):not(.match-view) .fuzzbol-section-heading h2 {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .form-header,
body:not(.home-view):not(.match-view) .league-header-bar,
body:not(.home-view):not(.match-view) .career-workspace-header {
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) .form-desc,
body:not(.home-view):not(.match-view) .setting-help,
body:not(.home-view):not(.match-view) .form-field label,
body:not(.home-view):not(.match-view) .online-status-text {
    color: var(--fuzzbol-muted);
}

body:not(.home-view):not(.match-view) .setting-name,
body:not(.home-view):not(.match-view) .team-slot,
body:not(.home-view):not(.match-view) .vs,
body:not(.home-view):not(.match-view) .bracket-display,
body:not(.home-view):not(.match-view) .fuzzbol-screen h3,
body:not(.home-view):not(.match-view) .fuzzbol-screen h4 {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .geometric-select {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .geometric-select:focus {
    border-color: var(--fuzzbol-orange);
    box-shadow: 0 0 0 3px rgba(255, 75, 24, .13);
}

body:not(.home-view):not(.match-view) .stadium-preview-box,
body:not(.home-view):not(.match-view) .setting-row,
body:not(.home-view):not(.match-view) .matchup-box,
body:not(.home-view):not(.match-view) .table-responsive {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .settings-diagnostics {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) .diagnostic-card,
body:not(.home-view):not(.match-view) .diagnostics-summary > div,
body:not(.home-view):not(.match-view) .diagnostic-release-badge {
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) .diagnostic-card span,
body:not(.home-view):not(.match-view) .diagnostics-summary span,
body:not(.home-view):not(.match-view) .diagnostics-heading p,
body:not(.home-view):not(.match-view) .diagnostics-actions span {
    color: var(--fuzzbol-muted);
}

body:not(.home-view):not(.match-view) .diagnostic-card strong,
body:not(.home-view):not(.match-view) .diagnostics-summary strong {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .diagnostic-release-badge,
body:not(.home-view):not(.match-view) .settings-section-kicker {
    color: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) .diagnostic-card strong[data-status="ok"] { color: #14834b; }
body:not(.home-view):not(.match-view) .diagnostic-card strong[data-status="warning"] { color: #9a6a00; }
body:not(.home-view):not(.match-view) .diagnostic-card strong[data-status="error"] { color: #b52c21; }

body:not(.home-view):not(.match-view) .btn-primary-start,
body:not(.home-view):not(.match-view) .btn-primary-start.btn-gold {
    background: var(--fuzzbol-orange) !important;
    color: #fff !important;
    box-shadow: 0 7px 15px rgba(244, 81, 32, .16);
}

body:not(.home-view):not(.match-view) .btn-primary-start:hover,
body:not(.home-view):not(.match-view) .btn-primary-start.btn-gold:hover {
    background: #e94313 !important;
}

body:not(.home-view):not(.match-view) .btn-secondary {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .btn-secondary:hover {
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .42);
}

body:not(.home-view):not(.match-view) .segmented-control {
    background: #f1f4f5;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) .segmented-control .btn-mode { color: var(--fuzzbol-muted); }

body:not(.home-view):not(.match-view) .segmented-control .btn-mode.active {
    background: var(--fuzzbol-orange);
    color: #fff;
    box-shadow: none;
}

body:not(.home-view):not(.match-view) .segmented-control .btn-mode:hover:not(.active) {
    color: var(--fuzzbol-navy);
    background: var(--fuzzbol-orange-soft);
}

body:not(.home-view):not(.match-view) .league-table th {
    background: var(--fuzzbol-navy);
    color: #fff;
}

body:not(.home-view):not(.match-view) .league-table td {
    color: var(--fuzzbol-navy);
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) .league-table tr.leader-row td { color: var(--fuzzbol-orange); }
body:not(.home-view):not(.match-view) .league-table tr.user-row { background: var(--fuzzbol-orange-soft) !important; border-left-color: var(--fuzzbol-orange); }

/* Career keeps its information architecture, now on the same white / orange / navy canvas. */
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-app-shell {
    background: #fff;
    border-color: var(--fuzzbol-line);
    box-shadow: var(--fuzzbol-shadow);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-sidebar {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-workspace { background: #fff; }
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-workspace-header h2,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-player-name,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel-copy strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-next-match-copy strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-match-action strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-transfer-offer strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-metric strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-stat-value {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-workspace-header p,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-section-label,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-metric span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-stat-label,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-next-match-copy > span:last-child {
    color: var(--fuzzbol-muted);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-nav-item {
    color: var(--fuzzbol-muted);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-nav-item:hover,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-nav-item.active {
    color: var(--fuzzbol-orange);
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .28);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-nav-item span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-nav-item.active span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-panel-kicker,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-player-title,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-objective-kicker {
    color: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-player-card.compact,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-next-match,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-metric,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-season-info,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-stats-row,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-log-row,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-transfer-offer,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-match-action {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-objective {
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .28);
    border-left-color: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-objective strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel-copy > span:last-child,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-transfer-panel p {
    color: var(--fuzzbol-navy);
}

/* Dashboard modals follow the same light visual system as the rest of the app. */
body:not(.match-view) .modal-overlay { background: rgba(19, 40, 60, .22); }
body:not(.match-view) .modal-card {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
    box-shadow: 0 24px 60px rgba(19, 40, 60, .18);
}
body:not(.match-view) .modal-header h2 { color: var(--fuzzbol-navy); }
body:not(.match-view) .career-action-button { background: var(--fuzzbol-orange); color: #fff; }

.setting-row-danger {
    border-color: rgba(210, 61, 48, .28) !important;
    background: #fff8f7 !important;
}

.btn-danger-outline {
    flex-shrink: 0;
    padding: 10px 14px;
    border: 1px solid rgba(210, 61, 48, .45);
    border-radius: 8px;
    color: #b3372d;
    background: #fff;
    cursor: pointer;
    font: 800 .74rem var(--font-body);
    text-transform: uppercase;
}

.btn-danger-outline:hover { background: #fff0ee; border-color: #d23d30; }

@media (max-width: 620px) {
    .setting-row-danger { align-items: flex-start; flex-direction: column; }
    .btn-danger-outline { width: 100%; }
    .diagnostics-heading, .diagnostics-actions { align-items: stretch; flex-direction: column; }
    .diagnostics-grid, .diagnostics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .diagnostics-actions .btn-secondary { width: 100%; }
}

/* Stadium photography + tactical map pairing */
.setup-stadium-photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 9px;
    object-fit: contain;
    object-position: center;
    background: var(--fuzzbol-navy-deep);
}

.setup-stadium-mapline {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.setup-stadium-mapline .setup-stadium-thumb {
    width: 84px;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0;
    object-fit: contain;
}

.stadium-preview-box[data-weather="night"] .setup-stadium-photo {
    filter: brightness(.55) saturate(1.18) hue-rotate(4deg);
    box-shadow: inset 0 0 28px rgba(255, 180, 72, .22), 0 0 0 1px rgba(255, 75, 24, .12);
}

.stadium-preview-box[data-weather="rain"] .setup-stadium-photo {
    filter: saturate(.82) brightness(.82);
}

.mini-pitch[data-home-weather="night"]::before {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 8% 2%, rgba(255, 229, 160, .28), transparent 29%),
        radial-gradient(ellipse at 92% 2%, rgba(255, 229, 160, .28), transparent 29%),
        linear-gradient(180deg, rgba(2, 9, 32, .6), rgba(2, 9, 32, .2) 58%, rgba(1, 5, 20, .58));
    mix-blend-mode: screen;
}

.mini-pitch[data-home-weather="night"]::after {
    background: radial-gradient(circle at 50% 45%, transparent 0 13%, rgba(7, 31, 69, .1) 45%, rgba(1, 7, 25, .56) 100%);
}

/* Career notifications use the same orange / navy language as the landing. */
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-section-heading h3 {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-section-heading > div > span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-notifications-caption {
    color: var(--fuzzbol-orange);
}

.career-header-actions .career-notifications-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.career-notifications-button b {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--fuzzbol-orange);
    font: 800 .62rem var(--font-mono);
}

.career-notifications-button b[hidden] { display: none; }

.career-notifications-panel {
    margin: 18px 0 19px;
    padding: 16px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(19, 40, 60, .06);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.career-notifications-panel .career-section-heading { margin-bottom: 11px; }
.career-notifications-caption { font: 700 .62rem var(--font-mono); }
.career-notifications-list { display: grid; gap: 8px; }

.career-notification-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--fuzzbol-line);
    border-left: 3px solid var(--fuzzbol-orange);
    border-radius: 8px;
    background: #f8fafb;
}

.career-notification-item.tone-blue { border-left-color: #2272a9; }
.career-notification-item.tone-gold { border-left-color: #d89516; }
.career-notification-item.tone-green { border-left-color: #198754; }
.career-notification-item.tone-muted { border-left-color: #98a5ad; }

.career-notification-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--fuzzbol-orange);
    background: var(--fuzzbol-orange-soft);
    font: 900 .64rem var(--font-mono);
}

.tone-blue .career-notification-icon { color: #2272a9; background: #edf6fb; }
.tone-gold .career-notification-icon { color: #b87600; background: #fff6df; }
.tone-green .career-notification-icon { color: #198754; background: #edf9f2; }
.tone-muted .career-notification-icon { color: #66757f; background: #eef1f3; }

.career-notification-copy { min-width: 0; }
.career-notification-copy strong { display: block; color: var(--fuzzbol-navy); font: 800 .76rem var(--font-body); }
.career-notification-copy p { margin: 3px 0 0; color: var(--fuzzbol-muted); font-size: .68rem; line-height: 1.4; }
.career-notification-action { border: 0; background: transparent; color: var(--fuzzbol-orange); cursor: pointer; font: 800 .62rem var(--font-body); white-space: nowrap; }
.career-notification-action:hover { text-decoration: underline; }
.career-notifications-panel.is-highlighted { border-color: rgba(255, 75, 24, .7); box-shadow: 0 0 0 4px rgba(255, 75, 24, .1), 0 12px 28px rgba(19, 40, 60, .1); transform: translateY(-2px); }

/* The preview communicates motion and the underlying physics at a glance. */
.mini-pitch .pitch-player {
    animation: homePlayerPulse 2.8s ease-in-out infinite;
}

.mini-pitch .pitch-player:nth-of-type(3n + 1) { animation-delay: -.35s; }
.mini-pitch .pitch-player:nth-of-type(3n + 2) { animation-delay: -.95s; }
.mini-pitch .pitch-player:nth-of-type(3n) { animation-delay: -1.55s; }

.mini-pitch .pitch-ball {
    animation: homeBallDrive 3.2s cubic-bezier(.42, 0, .25, 1) infinite;
}

.mini-pitch .pitch-objective {
    animation: homeObjectivePulse 2.7s ease-in-out infinite;
}

@keyframes homePlayerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 3px 5px rgba(0,0,0,.35); }
    50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 5px rgba(255,255,255,.13), 0 5px 10px rgba(0,0,0,.36); }
}

@keyframes homeBallDrive {
    0%, 100% { left: 53%; top: 49%; }
    34% { left: 58%; top: 44%; }
    66% { left: 47%; top: 55%; }
}

@keyframes homeObjectivePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 75, 24, 0); }
    50% { box-shadow: 0 0 0 5px rgba(255, 75, 24, .12); }
}

@media (max-width: 620px) {
    .career-notification-item { grid-template-columns: 30px minmax(0, 1fr); }
    .career-notification-action { grid-column: 2; justify-self: start; margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .mini-pitch .pitch-player,
    .mini-pitch .pitch-ball,
    .mini-pitch .pitch-objective { animation: none; }
    .career-notifications-panel { transition: none; }
}

/* Live match preview: the landing uses the same generated surface materials
   as the playable arenas while keeping the pitch visually uncluttered. */
.mini-pitch {
    background-image:
        linear-gradient(90deg, rgba(24, 96, 37, .12) 0 8%, rgba(255,255,255,.03) 8% 16%, rgba(24,96,37,.12) 16% 24%, rgba(255,255,255,.03) 24% 32%, rgba(24,96,37,.12) 32% 40%, rgba(255,255,255,.03) 40% 48%, rgba(24,96,37,.12) 48% 56%, rgba(255,255,255,.03) 56% 64%, rgba(24,96,37,.12) 64% 72%, rgba(255,255,255,.03) 72% 80%, rgba(24,96,37,.12) 80% 88%, rgba(255,255,255,.03) 88% 96%, rgba(24,96,37,.12) 96% 100%),
        var(--preview-texture, url('assets/texture-classic-checkered.webp'));
    background-size: 100% 100%, 420px 420px;
    background-repeat: no-repeat, repeat;
}

.mini-pitch[data-home-stadium="cyber"] {
    background-image: linear-gradient(180deg, rgba(5, 8, 25, .12), rgba(3, 10, 24, .2)), var(--preview-texture, url('assets/texture-cyber-neon.webp'));
}

.mini-pitch[data-home-stadium="ice"] {
    background-image: linear-gradient(180deg, rgba(255,255,255,.06), rgba(13,55,110,.12)), var(--preview-texture, url('assets/texture-ice-glacial.webp'));
}

.mini-pitch[data-home-stadium="cage"] {
    background-image: linear-gradient(180deg, rgba(8, 12, 19, .1), rgba(8, 12, 19, .28)), var(--preview-texture, url('assets/texture-cage-asphalt.webp'));
}

.mini-pitch.is-live-simulated .pitch-player,
.mini-pitch.is-live-simulated .pitch-ball {
    animation: none;
    transition: left .14s linear, top .14s linear, opacity .14s ease, box-shadow .14s ease;
}

.pitch-live-badge {
    position: absolute;
    z-index: 8;
    top: 14px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 7px;
    color: #fff;
    background: rgba(7, 23, 34, .76);
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    backdrop-filter: blur(5px);
    font: 900 .58rem var(--font-mono);
    letter-spacing: .04em;
}

.pitch-live-badge i {
    width: 7px;
    height: 7px;
    display: block;
    border-radius: 50%;
    background: #ff4b18;
    box-shadow: 0 0 0 4px rgba(255,75,24,.18);
    animation: liveDotPulse 1.4s ease-in-out infinite;
}

.pitch-live-badge span {
    padding-left: 5px;
    border-left: 1px solid rgba(255,255,255,.24);
    color: #ffb29a;
    font-size: .52rem;
}

.pitch-ball.is-live-kick {
    box-shadow: 0 0 0 7px rgba(255,255,255,.14), 0 0 20px rgba(255,255,255,.58), 0 3px 7px rgba(0,0,0,.36);
}

.mini-pitch.is-live-simulated .pitch-ball.is-live-kick img {
    animation: liveBallSpin .42s linear infinite;
}

@keyframes liveBallSpin {
    to { transform: rotate(360deg); }
}

@keyframes liveDotPulse {
    0%, 100% { opacity: .55; transform: scale(.86); }
    50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 560px) {
    .pitch-live-badge { top: 9px; left: 9px; padding: 6px 7px; }
    .pitch-live-badge span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pitch-live-badge i { animation: none; }
}

/* Reserved art system: every future crest, portrait or item illustration has
   a stable slot before the final asset is generated. */
.team-logo-slot {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    gap: 3px;
}

.team-logo-slot:not(.has-image),
.club-logo-slot:not(.has-image),
.agent-logo-slot:not(.has-image),
.career-squad-avatar-slot:not(.has-image),
.table-logo-slot:not(.has-image) {
    background: #fff;
    border: 1px dashed #c8d2d8;
    color: #9aa8b1;
}

.team-logo-slot:not(.has-image) svg,
.club-logo-slot:not(.has-image) svg,
.agent-logo-slot:not(.has-image) svg,
.career-squad-avatar-slot:not(.has-image) svg,
.table-logo-slot:not(.has-image) svg {
    color: #9aa8b1;
    opacity: 1;
}

.team-logo-slot .art-caption,
.club-logo-slot .art-caption,
.agent-logo-slot .art-caption,
.career-squad-avatar-slot .art-caption {
    color: #87959e;
    font: 900 .5rem var(--font-mono);
    letter-spacing: .08em;
}

.team-logo-slot small,
.club-logo-slot small,
.agent-logo-slot small {
    color: #a2adb3;
    font-size: .5rem;
}

.matchup-team {
    min-width: 126px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.matchup-team .team-slot {
    text-align: center;
    line-height: 1.05;
}

.club-logo-slot {
    width: 58px;
    height: 58px;
    display: flex;
    flex: 0 0 58px;
    gap: 2px;
}

.club-logo-slot svg { width: 20px; height: 20px; }
.club-logo-slot .art-caption { font-size: .48rem; }
.club-logo-slot small { font-size: .47rem; }

.table-team-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 148px;
}

.table-team-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fuzzbol-navy);
}

.table-team-accent {
    width: 7px;
    height: 7px;
    display: inline-block;
    flex: 0 0 7px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(19, 40, 60, .12);
}

.table-logo-slot {
    width: 24px;
    height: 24px;
    display: inline-flex;
    flex: 0 0 24px;
    border-radius: 6px;
}

.table-logo-slot svg { width: 15px; height: 15px; }

/* Career light screens use navy text consistently, including cards whose
   legacy dark theme originally supplied white copy. */
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-agent-message {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--fuzzbol-navy);
    background: #f4f8fb;
    border: 1px solid var(--fuzzbol-line);
    border-left: 3px solid var(--fuzzbol-orange);
}

.agent-logo-slot {
    width: 68px;
    height: 68px;
    display: flex;
    gap: 2px;
}

.agent-logo-slot svg { width: 24px; height: 24px; }
.agent-logo-slot .art-caption { font-size: .48rem; }
.agent-logo-slot small { font-size: .48rem; }
.agent-logo-slot.has-image img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.agent-message-copy { color: var(--fuzzbol-navy); font-size: .8rem; line-height: 1.5; }

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-contract-card,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-team-card,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-history-card {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-contract-card span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-team-card span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-history-card span,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-squad-player small,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-development-note,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-training-card p {
    color: var(--fuzzbol-muted);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-contract-card strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-team-card strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-history-card strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-squad-player strong,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-training-card h4,
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-training-card > span {
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-training-card {
    background: #fff;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-squad-player {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

.career-squad-avatar-slot {
    width: 42px;
    height: 42px;
    display: flex;
    gap: 1px;
    border-radius: 8px;
}

.career-squad-avatar-slot svg { width: 15px; height: 15px; }
.career-squad-avatar-slot .art-caption { font-size: .43rem; }
.career-squad-player > div { min-width: 0; }
.career-squad-role { display: inline-flex; margin-bottom: 3px; }

body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel {
    grid-template-columns: 58px minmax(0, 1fr) auto auto;
}

@media (max-width: 640px) {
    body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel {
        grid-template-columns: 58px minmax(0, 1fr);
    }
    body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-panel-copy {
        grid-column: auto;
    }
    body:not(.home-view):not(.match-view) #screen-career-hub.active .career-club-rating,
    body:not(.home-view):not(.match-view) #screen-career-hub.active .career-market-value {
        grid-row: 2;
    }
    .matchup-box { gap: 10px; padding-inline: 12px; }
    .matchup-team { min-width: 0; flex: 1; }
    .team-logo-slot { width: 62px; height: 62px; flex-basis: 62px; }
}

/* League identity: give each fictional competition a stronger home inside
   the shared landing/game visual system. */
.league-identity-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    margin: 0 0 18px;
    padding: 18px 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--fuzzbol-radius);
    color: #fff;
    background:
        radial-gradient(circle at 86% 20%, rgba(255, 75, 24, .32), transparent 25%),
        linear-gradient(112deg, #102b43 0%, #13283c 56%, #1d4054 100%);
    box-shadow: 0 12px 24px rgba(19, 40, 60, .16);
}

.league-identity-card::after {
    content: '';
    position: absolute;
    width: 190px;
    height: 190px;
    right: 12%;
    bottom: -142px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 20px rgba(255, 255, 255, .025), 0 0 0 40px rgba(255, 255, 255, .018);
    transform: rotate(-18deg);
    pointer-events: none;
}

.league-identity-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 14px;
    color: #fff0b0;
    background: linear-gradient(145deg, var(--fuzzbol-orange), #db3211);
    box-shadow: 0 8px 16px rgba(255, 75, 24, .24);
    font: 900 1.7rem/1 var(--font-display);
}

.league-identity-mark img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

.league-identity-copy,
.league-identity-stats { position: relative; z-index: 1; }

.league-identity-kicker {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .64);
    font: 800 .58rem var(--font-mono);
    letter-spacing: .12em;
}

.league-identity-copy h3 {
    margin: 0;
    color: #fff !important;
    font: 900 clamp(1.35rem, 2.2vw, 2rem)/1 var(--font-display);
    letter-spacing: .015em;
    text-transform: uppercase;
}

.league-identity-copy p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .72);
    font: 600 .76rem/1.35 var(--font-body);
}

.league-identity-stats {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.league-identity-stats span {
    display: grid;
    justify-items: center;
    min-width: 70px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
}

.league-identity-stats strong {
    color: #fff;
    font: 900 1.05rem/1 var(--font-mono);
}

.league-identity-stats small {
    margin-top: 4px;
    color: rgba(255, 255, 255, .6);
    font: 700 .55rem var(--font-body);
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .league-identity-card { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 14px; }
    .league-identity-mark { width: 44px; height: 44px; font-size: 1.4rem; }
    .league-identity-stats { grid-column: 1 / -1; width: 100%; }
    .league-identity-stats span { flex: 1; min-width: 0; }
}

/* ========================================================================== 
   PHASE 5 — PERFORMANCE, ACCESSIBILITY & BROWSER COMPATIBILITY
   ========================================================================== */

.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;
}

input,
textarea {
    user-select: text;
    -webkit-user-select: text;
}

#screen-game.active,
#screen-game.active #gameCanvas {
    touch-action: none;
}

#gameCanvas:focus-visible {
    /* The canvas needs focus to receive keyboard input, but movement/kick keys
       (WASD, arrows, Space) held during play kept re-triggering :focus-visible
       on it — flashing this outline on and off in sync with gameplay input,
       which read as a random, buggy yellow frame around the match. There's
       nothing to keyboard-navigate inside the canvas, so no ring is needed. */
    outline: none;
}

@supports not (backdrop-filter: blur(1px)) {
    .btn-pause,
    .pause-overlay,
    .overlay-goal {
        backdrop-filter: none;
    }
}

/* ========================================================================== 
   PHASE 4 — MATCH FEEDBACK, AUDIO STATE & ACCESSIBLE MOTION
   ========================================================================== */

button:focus-visible,
select:focus-visible,
input:focus-visible {
    /* Same issue as #gameCanvas above: whatever menu button was last clicked
       (e.g. Play Match) stays focused into the match, and held gameplay keys
       kept re-triggering this gold outline on it mid-game. */
    outline: none;
}

.scoreboard-hud[data-time-urgency="high"] .timer-clock {
    color: #ff766a;
    animation: timerUrgency 0.9s ease-in-out infinite;
}

@keyframes timerUrgency {
    0%, 100% { opacity: 0.72; }
    50% { opacity: 1; }
}

.score-digit.score-flash {
    animation: scoreFlash 0.58s cubic-bezier(0.2, 0.9, 0.25, 1.3) both;
}

.team-score.goal-scored {
    animation: teamScoreImpact 0.78s ease-out both;
}

@keyframes scoreFlash {
    0% { transform: scale(1); color: #fff; }
    35% { transform: scale(1.32); color: #fff7c2; text-shadow: 0 0 18px var(--competition-accent, #f7dc82); }
    100% { transform: scale(1); color: #fff; }
}

@keyframes teamScoreImpact {
    0% { filter: brightness(1); }
    35% { filter: brightness(1.65); }
    100% { filter: brightness(1); }
}

.overlay-goal .goal-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--gold-text);
    font: 800 0.58rem/1 var(--font-mono);
    letter-spacing: 0.18em;
}

.overlay-goal .goal-scoreline {
    display: block;
    margin-top: 12px;
    color: #fff;
    font: 900 1.15rem/1 var(--font-mono);
    letter-spacing: 0.08em;
}

@media (max-width: 700px) {
    .overlay-goal { padding: 22px 28px; }
    .overlay-goal h2 { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ========================================================================== 
   BRAND ALIGNMENT — landing palette, logo and larger stadium/weather setup
   ========================================================================== */

/* Team identity art ------------------------------------------------------- */
.team-logo-slot.has-image,
.club-logo-slot.has-image,
.table-logo-slot.has-image,
.career-squad-avatar-slot.has-image {
    border: 0;
    background: transparent;
}

.team-art-image,
.team-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-logo-slot.has-image .team-art-image,
.club-logo-slot.has-image .team-art-image {
    padding: 3px;
}

.table-logo-slot.has-image {
    border-radius: 6px;
    overflow: hidden;
}

.table-logo-slot.has-image .team-art-image {
    padding: 1px;
}

.career-squad-avatar-slot.has-image {
    overflow: hidden;
}

.career-squad-avatar-slot.has-image .team-avatar-image {
    object-fit: cover;
}

.team-mark.has-image {
    padding: 0;
    overflow: hidden;
    border: none;
    background: transparent;
}

.team-mark-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-team-mark.has-image {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.intro-team-mark.has-image .team-mark-image {
    object-fit: contain;
}

body:not(.home-view):not(.match-view) {
    --ink-1: var(--fuzzbol-navy);
    --ink-2: #4f6575;
    --ink-3: var(--fuzzbol-muted);
    --edge: var(--fuzzbol-line);
    --edge-strong: #b9c5cb;
    --gold-1: #ff9e78;
    --gold-2: var(--fuzzbol-orange);
    --gold-text: var(--fuzzbol-orange);
    --gold-glow: rgba(255, 75, 24, .24);
    --blue-1: #ff7449;
    --blue-2: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) .app-header {
    min-height: 72px;
    background: rgba(255, 255, 255, .96);
    border-color: var(--fuzzbol-line);
    border-left: 4px solid var(--fuzzbol-orange);
    color: var(--fuzzbol-navy);
    box-shadow: 0 8px 20px rgba(25, 43, 58, .08);
}

body:not(.home-view):not(.match-view) .app-header .brand-logo-img {
    width: 164px;
    height: 58px;
    object-fit: contain;
    object-position: left center;
}

body:not(.home-view):not(.match-view) .logo-placeholder {
    width: 200px;
    min-height: 58px;
}

body:not(.home-view):not(.match-view) .profile-shield,
body:not(.home-view):not(.match-view) .profile-action-mark {
    background: var(--fuzzbol-orange-soft);
    border: 1px solid rgba(255, 75, 24, .24);
}

body:not(.home-view):not(.match-view) .profile-shield img,
body:not(.home-view):not(.match-view) .profile-action-mark img,
body.home-view .home-brand img {
    mix-blend-mode: normal;
}

body:not(.home-view):not(.match-view) .room-code-value,
body:not(.home-view):not(.match-view) .settings-section-kicker,
body:not(.home-view):not(.match-view) .settings-section-kicker,
body:not(.home-view):not(.match-view) .challenge-badge,
body:not(.home-view):not(.match-view) .challenge-stars {
    color: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) .slider {
    background-color: #e9edef;
    border-color: var(--fuzzbol-line);
}

body:not(.home-view):not(.match-view) input:checked + .slider {
    background-color: var(--fuzzbol-orange);
    border-color: var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) input:checked + .slider:before {
    background: #fff;
}

body:not(.home-view):not(.match-view) .color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--fuzzbol-orange);
}

body:not(.home-view):not(.match-view) .btn-challenge-card {
    background: #fff;
    border-color: var(--fuzzbol-line);
    color: var(--fuzzbol-navy);
}

body:not(.home-view):not(.match-view) .btn-challenge-card:hover,
body:not(.home-view):not(.match-view) .btn-challenge-card.active {
    border-color: var(--fuzzbol-orange);
    background: var(--fuzzbol-orange-soft);
}

body.home-view .home-brand img {
    width: 208px;
    height: 142px;
    object-fit: contain;
}

/* The setup card has unused vertical room on desktop. Give the stadium and
   weather controls more visual weight so they become a real preview instead
   of compact form rows. */
@media (min-width: 901px) and (min-height: 650px) {
    .home-match-grid { grid-template-columns: minmax(0, 1fr) 420px; }
    .setup-card-body { padding: 11px 18px 14px; }
    .setup-option { min-height: 66px; }
    .setup-option svg { width: 24px; height: 24px; }
    .setup-carousel {
        grid-template-columns: 26px minmax(122px, .92fr) minmax(0, 1.08fr) 26px;
        gap: 10px;
        min-height: 98px;
    }
    .setup-carousel img { width: 100%; height: 82px; border-radius: 9px; }
    .setup-carousel strong,
    .weather-row strong { font-size: .78rem; }
    .setup-carousel span { font-size: .59rem; }
    .setup-stadium-players { font-size: .52rem; }
    .weather-row {
        grid-template-columns: 26px 58px minmax(0, 1fr) 26px;
        gap: 10px;
        min-height: 82px;
    }
    .weather-sun { font-size: 3.2rem; }
    .weather-row small { font-size: .63rem; }
    .setup-carousel i,
    .weather-row i { margin-top: 7px; }
}

@media (max-width: 900px) {
    .setup-carousel { grid-template-columns: 24px 104px minmax(0, 1fr) 24px; }
    .setup-carousel img { width: 104px; height: 70px; }
    .weather-row { grid-template-columns: 24px 54px minmax(0, 1fr) 24px; }
    .weather-sun { font-size: 3rem; }
}

.feature-card[data-nav-target="stadiums"] > div { width: 52%; }
.feature-card[data-nav-target="stadiums"] img {
    width: 80%;
    opacity: .92;
    object-fit: cover;
    object-position: center;
}

/* ========================================================================== 
   MATCH + STADIUM POLISH — shared white/orange presentation
   ========================================================================== */

body.match-view {
    --ink-1: var(--fuzzbol-navy);
    --ink-2: #506574;
    --ink-3: var(--fuzzbol-muted);
    --edge: var(--fuzzbol-line);
    --edge-strong: #b9c5cb;
    --gold-1: #ff9e78;
    --gold-2: var(--fuzzbol-orange);
    --gold-text: var(--fuzzbol-orange);
    --gold-glow: rgba(255, 75, 24, .24);
    --blue-1: var(--fuzzbol-navy);
    --blue-2: var(--fuzzbol-navy);
    background: #edf1f3;
    color: var(--fuzzbol-navy);
}

body.match-view .app-header {
    background: #fff;
    border-color: var(--fuzzbol-line);
    border-left-color: var(--fuzzbol-orange);
    color: var(--fuzzbol-navy);
}

body.match-view #screen-game.active {
    background: #edf1f3;
}

body.match-view #screen-game.active .scoreboard-hud {
    --competition-accent: var(--fuzzbol-orange) !important;
    color: var(--fuzzbol-navy);
    background: #fff;
    border-color: var(--fuzzbol-orange);
    box-shadow: 0 8px 24px rgba(25, 43, 58, .12);
}

body.match-view #screen-game.active .team-name,
body.match-view #screen-game.active .team-score.red .team-name,
body.match-view #screen-game.active .team-score.blue .team-name {
    color: var(--fuzzbol-navy);
}

body.match-view #screen-game.active .score-digit {
    color: #fff;
    background: var(--fuzzbol-orange);
    border-color: var(--fuzzbol-orange);
}

body.match-view #screen-game.active .timer-clock {
    color: var(--fuzzbol-orange);
}

body.match-view #screen-game.active .scoreboard-hud[data-time-urgency="high"] .timer-clock {
    color: #e94313;
}

body.match-view #screen-game.active .hud-penalties-container {
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
}

body.match-view #screen-game.active .penalty-label {
    color: var(--fuzzbol-muted);
}

body.match-view #screen-game.active .hud-objective-badge {
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .32);
}

body.match-view #screen-game.active .btn-pause {
    color: var(--fuzzbol-navy);
    background: rgba(255, 255, 255, .96);
    border-color: var(--fuzzbol-orange);
    box-shadow: 0 8px 20px rgba(25, 43, 58, .16);
}

body.match-view #screen-game.active .btn-pause:hover {
    color: #fff;
    background: var(--fuzzbol-orange);
}

body.match-view #screen-game.active .overlay-goal {
    background: rgba(255, 255, 255, .96);
    border-color: var(--fuzzbol-orange);
    box-shadow: 0 0 60px rgba(255, 75, 24, .24);
}

body.match-view #screen-game.active .overlay-goal h2 {
    color: var(--fuzzbol-navy);
    text-shadow: none;
}

body.match-view #screen-game.active .overlay-goal p {
    color: var(--fuzzbol-muted);
}

body.match-view #screen-game.active .overlay-goal .goal-scoreline {
    color: var(--fuzzbol-navy);
}

body.match-view #screen-game.active .pause-overlay {
    background: rgba(19, 40, 60, .38);
}

body.match-view #screen-game.active .pause-card {
    color: var(--fuzzbol-navy);
    background: #fff;
    border-color: rgba(255, 75, 24, .34);
    box-shadow: 0 24px 70px rgba(25, 43, 58, .24);
}

body.match-view #screen-game.active .pause-card h2 {
    color: var(--fuzzbol-navy);
}

body.match-view #screen-game.active .pause-actions .btn-primary-start.btn-gold {
    color: #fff;
    background: var(--fuzzbol-orange);
}

body.match-view #screen-game.active .pause-actions .btn-secondary,
body.match-view #screen-game.active .pause-fullscreen-btn {
    color: var(--fuzzbol-navy);
    background: #f8fafb;
    border-color: var(--fuzzbol-line);
}

body.match-view #screen-game.active .pause-actions .btn-secondary:hover,
body.match-view #screen-game.active .pause-fullscreen-btn:hover {
    color: var(--fuzzbol-orange);
    background: var(--fuzzbol-orange-soft);
    border-color: rgba(255, 75, 24, .38);
}

body.match-view #screen-game.active .pause-card p,
body.match-view #screen-game.active .pause-settings-kicker,
body.match-view #screen-game.active .pause-settings .setting-help {
    color: var(--fuzzbol-muted);
}

body.match-view #screen-game.active .pause-settings {
    border-top-color: var(--fuzzbol-line);
}

/* The stadium card is now an edge-to-edge photo. The title is a real caption
   at the bottom of the image, so no empty white strip remains below it. */
.home-feature-grid {
    grid-template-columns: minmax(0, .95fr) minmax(0, .95fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
}

.stadium-feature-card {
    background: #13283c;
}

.stadium-feature-card > img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1 !important;
    mask-image: none;
}

.stadium-feature-card::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 35% 0 0;
    background: linear-gradient(180deg, transparent, rgba(10, 24, 38, .94));
    pointer-events: none;
}

.stadium-feature-card .stadium-feature-copy {
    position: absolute;
    z-index: 2;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 42px 112px 13px 14px;
}

.stadium-feature-card .feature-kicker {
    color: #ffb39a;
    font-size: .58rem;
}

.stadium-feature-card h2 {
    margin-top: 4px;
    color: #fff;
    font-size: 1.12rem;
}

.stadium-feature-card p {
    margin-top: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: .61rem;
}

.stadium-feature-card > button {
    right: 12px;
    bottom: 13px;
    left: auto;
    color: #fff;
    background: var(--fuzzbol-orange);
    border-color: var(--fuzzbol-orange);
}

@media (max-width: 1180px) {
    .home-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .stadium-feature-card .stadium-feature-copy { padding-right: 14px; }
    .stadium-feature-card > button { display: none; }
}

/* ==========================================================================
   FRIENDLY MATCH SETUP — match center presentation
   ========================================================================== */

body:has(#screen-setup.active) {
    background-color: #edf2f4;
    background-image:
        linear-gradient(90deg, rgba(237, 242, 244, .84), rgba(237, 242, 244, .6) 50%, rgba(237, 242, 244, .82)),
        url('assets/menu_background.webp');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

body:has(#screen-setup.active) #app-container {
    max-width: 1810px;
    padding: 18px 28px 26px;
}

body:has(#screen-setup.active) .app-header {
    position: relative;
    min-height: 64px;
    margin-bottom: 24px;
    padding: 8px 20px;
    border-left: 4px solid var(--fuzzbol-orange);
    border-radius: 9px;
    background: rgba(255, 255, 255, .96);
}

body:has(#screen-setup.active) .logo {
    width: 228px;
    min-height: 48px;
    gap: 9px;
}

.setup-wordmark { display: none; }
body:has(#screen-setup.active) .setup-wordmark { display: block; }

body:has(#screen-setup.active) .brand-logo-mark {
    width: 53px;
    height: 28px;
    display: block;
    flex: 0 0 53px;
    overflow: hidden;
}

body:has(#screen-setup.active) .brand-logo-mark .brand-logo-img {
    width: 53px;
    height: auto;
    min-height: 0;
    display: block;
    object-fit: contain;
    object-position: center top;
}

body:has(#screen-setup.active) .setup-wordmark {
    color: var(--fuzzbol-navy);
    font: 900 1.42rem/1 var(--font-display);
    letter-spacing: .015em;
}

body:has(#screen-setup.active) .match-nav {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
    margin-left: 8px;
}

.match-nav-item {
    position: relative;
    padding: 0 13px;
    border: 0;
    background: transparent;
    color: #627487;
    cursor: pointer;
    font: 800 .7rem var(--font-body);
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color .2s ease;
}

.match-nav-item:hover,
.match-nav-item.active { color: var(--fuzzbol-orange); }

.match-nav-item.active::after {
    content: '';
    position: absolute;
    right: 13px;
    bottom: -1px;
    left: 13px;
    height: 2px;
    border-radius: 2px;
    background: var(--fuzzbol-orange);
}

body:has(#screen-setup.active) .header-actions { gap: 9px; }
body:has(#screen-setup.active) .btn-icon {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: .73rem;
}

#screen-setup.match-setup-screen {
    position: relative;
    width: 100%;
    max-width: 1660px;
    padding: 0;
    align-items: stretch;
}

#screen-setup.match-setup-screen::before,
#screen-setup.match-setup-screen::after { pointer-events: none; }

.match-setup-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: 16px;
    width: 100%;
    min-height: 0;
    align-items: start;
}

.match-setup-shell > .glass-card {
    min-width: 0;
    min-height: 0;
    padding: 24px 26px 22px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .97);
    color: var(--fuzzbol-navy);
    box-shadow: 0 12px 28px rgba(25, 43, 58, .09);
}

.match-config-card,
.stadium-config-card { display: flex; flex-direction: column; }

.setup-title-block { margin-bottom: 12px; }
.setup-title-block .card-title {
    color: var(--fuzzbol-navy);
    font: 900 clamp(2rem, 2.8vw, 2.5rem)/.92 var(--font-display);
    letter-spacing: .01em;
}

.setup-eyebrow {
    display: block;
    margin-top: 4px;
    color: var(--fuzzbol-muted);
    font: 800 .75rem/1.2 var(--font-body);
    letter-spacing: .07em;
    text-transform: uppercase;
}

.setup-format-control {
    margin: 0 0 18px;
    padding: 4px;
    gap: 3px;
    border: 1px solid #d9e0e4;
    border-radius: 7px;
    background: #eef2f4;
}

.setup-format-control .btn-mode {
    min-height: 39px;
    padding: 7px 0;
    border-radius: 6px;
    color: #687989;
    font-size: .82rem;
}

.setup-format-control .btn-mode.active {
    background: var(--fuzzbol-orange);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 75, 24, .2);
}

.teams-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.teams-heading span,
.setup-field-block > label,
.competition-field > label,
.stadium-select-field > label {
    display: block;
    color: var(--fuzzbol-navy);
    font: 900 .72rem/1.2 var(--font-body);
    letter-spacing: .07em;
    text-transform: uppercase;
}

.teams-heading small {
    color: var(--fuzzbol-muted);
    font-size: .66rem;
}

.team-duel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
}

.setup-team-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--team-color) 28%, #dfe5e8);
    border-radius: 8px;
    background: #fbfcfc;
    text-align: center;
}

.setup-team-band {
    padding: 7px 10px;
    color: #fff;
    background: var(--team-color);
    font: 900 .69rem/1 var(--font-body);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.setup-team-away { --team-color: #2179b6; }
.setup-team-home { --team-color: var(--fuzzbol-orange); }
.setup-team-picker {
    display: grid;
    grid-template-columns: 25px minmax(76px, 1fr) 25px;
    align-items: center;
    gap: 2px;
    min-height: 112px;
    padding: 6px 8px 0;
}

.team-step {
    border: 0;
    background: transparent;
    color: var(--fuzzbol-navy);
    cursor: pointer;
    font: 400 2rem/1 Arial, sans-serif;
    transition: color .18s ease, transform .18s ease;
}

.team-step:hover { color: var(--fuzzbol-orange); transform: scale(1.12); }

.setup-team-card .team-logo-slot {
    width: 92px;
    height: 102px;
    justify-self: center;
    border: 0;
    background: transparent;
}

.setup-team-card .team-logo-slot.has-image .team-art-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.setup-team-name {
    display: block;
    padding: 0 8px;
    overflow: hidden;
    color: var(--fuzzbol-navy);
    font: 900 1.12rem/1 var(--font-display);
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.setup-team-country {
    display: block;
    margin-top: 4px;
    color: #5f7383;
    font-size: .67rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.setup-team-stars {
    display: inline-flex;
    gap: 2px;
    margin-top: 7px;
    color: #c5ced3;
    font-size: 1rem;
    letter-spacing: .03em;
}

.setup-team-stars .filled { color: var(--fuzzbol-orange); }

.setup-team-stats {
    display: flex;
    justify-content: space-around;
    gap: 5px;
    margin: 9px 9px 10px;
    padding: 8px 5px;
    border: 1px solid #e1e6e8;
    border-radius: 6px;
    background: #fff;
    color: var(--fuzzbol-navy);
    font: 800 .61rem var(--font-body);
}

.setup-team-stats span { white-space: nowrap; }
.setup-team-stats b { margin-left: 2px; font-size: .73rem; }

.setup-team-change {
    width: calc(100% - 18px);
    margin: 0 9px 10px;
    min-height: 35px;
    border: 1px solid #d9e0e4;
    border-radius: 6px;
    color: var(--fuzzbol-navy);
    background: #fff;
    cursor: pointer;
    font: 800 .7rem var(--font-body);
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.setup-team-change:hover {
    border-color: rgba(255, 75, 24, .4);
    color: var(--fuzzbol-orange);
    background: var(--fuzzbol-orange-soft);
}

.setup-vs {
    color: #97a5af;
    font: 900 2.2rem/.9 var(--font-display);
    text-align: center;
}

.setup-field-block { min-width: 0; }
.setup-field-block > label,
.competition-field > label { margin-bottom: 6px; color: var(--fuzzbol-muted); }

.competition-field {
    padding-top: 2px;
    margin-bottom: 16px;
}

.setup-team-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.setup-team-select-field { min-width: 0; }
.setup-team-select-field > span {
    display: block;
    margin: 0 0 5px 2px;
    color: var(--fuzzbol-navy);
    font: 800 .62rem/1.1 var(--font-body);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.setup-team-select-field .geometric-select {
    min-height: 40px;
    font-size: .73rem;
}

.competition-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.competition-icon {
    position: absolute;
    left: 10px;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--fuzzbol-navy);
}

.competition-icon svg { width: 25px; height: 25px; fill: currentColor; }
.competition-select-wrap .geometric-select { padding-left: 49px; }
.competition-field > small {
    display: block;
    margin-top: 5px;
    color: var(--fuzzbol-muted);
    font-size: .65rem;
}

.setup-select-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.setup-select-icon {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 5px;
    color: var(--fuzzbol-navy);
}

.setup-select-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.setup-select-icon span { display: none; }

.match-setup-screen .geometric-select {
    min-height: 38px;
    padding: 8px 12px;
    border-color: #d6dfe3;
    border-radius: 6px;
    color: var(--fuzzbol-navy);
    background: #fff;
    font-size: .8rem;
}

.match-setup-screen .geometric-select:focus { border-color: var(--fuzzbol-orange); }
.setup-legacy-select { display: none; }

.stadium-config-card .setup-title-block { margin-bottom: 10px; }
.stadium-select-field { margin-bottom: 14px; }
.stadium-select-field > label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.stadium-select-field .geometric-select { font-size: .84rem; }

.stadium-preview-box {
    padding: 0;
    border: 1px dashed #d5dfe3;
    border-radius: 7px;
    overflow: hidden;
    background: #f8fafb;
    color: var(--fuzzbol-navy);
}

.setup-stadium-photo-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0b1f38;
}

.setup-stadium-photo-frame .setup-stadium-photo {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}

.setup-stadium-photo-frame::after {
    content: '';
    position: absolute;
    inset: 48% 0 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(7, 24, 39, .36));
}

.setup-stadium-arrow {
    position: absolute;
    z-index: 1;
    top: 50%;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    color: #fff;
    background: rgba(8, 28, 45, .58);
    cursor: pointer;
    font: 400 2.25rem/1 Arial, sans-serif;
    transform: translateY(-50%);
    transition: background .18s ease, transform .18s ease;
}

.setup-stadium-arrow.left { left: 14px; }
.setup-stadium-arrow.right { right: 14px; }
.setup-stadium-arrow:hover { background: var(--fuzzbol-orange); transform: translateY(-50%) scale(1.05); }

.setup-stadium-page {
    position: absolute;
    z-index: 1;
    right: 14px;
    bottom: 12px;
    padding: 5px 8px;
    border-radius: 4px;
    color: #fff;
    background: rgba(8, 28, 45, .76);
    font: 800 .68rem var(--font-mono);
}

.setup-stadium-mapline {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 14px 13px;
}

.setup-stadium-mapline .setup-stadium-thumb {
    width: 142px;
    height: 82px;
    margin: 0;
    border: 1px solid #cbd6da;
    border-radius: 7px;
    object-fit: cover;
}

.setup-stadium-mapline strong {
    display: block;
    color: var(--fuzzbol-navy);
    font: 900 .96rem/1.1 var(--font-body);
}

.setup-stadium-mapline p {
    margin: 5px 0 0;
    color: #4f6575;
    font-size: .72rem;
    line-height: 1.45;
}

.setup-stadium-mapline p b { color: var(--fuzzbol-navy); }

.setup-stadium-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.setup-stadium-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #506575;
    background: #e9eef1;
    font: 700 .57rem var(--font-body);
}

.setup-stadium-tags span:first-child { color: #28734c; background: #e2f1e6; }
.stadium-options-grid { grid-template-columns: 1fr; margin-top: 13px; }
.stadium-options-grid .setup-field-block > label { font-size: .63rem; }

.setup-actions {
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
}

.setup-actions .btn-secondary,
.setup-actions .btn-primary-start {
    min-height: 48px;
    border-radius: 7px;
    font-size: .85rem;
}

.setup-actions .btn-secondary { flex: .8; }
.setup-actions .btn-primary-start { flex: 1.25; background: var(--fuzzbol-orange); box-shadow: 0 9px 18px rgba(255, 75, 24, .17); }
.setup-actions .btn-primary-start:hover { background: #e94313; }

@media (max-width: 1120px) {
    body:has(#screen-setup.active) .app-header { flex-wrap: wrap; gap: 8px; }
    body:has(#screen-setup.active) .match-nav { order: 3; width: 100%; min-height: 33px; justify-content: center; margin: 0; border-top: 1px solid #e7ecee; }
    .match-nav-item { min-height: 32px; }
    .match-setup-shell { grid-template-columns: 1fr 1fr; }
    .setup-team-picker { grid-template-columns: 21px minmax(62px, 1fr) 21px; }
    .setup-team-card .team-logo-slot { width: 76px; height: 88px; }
    .setup-team-name { font-size: .96rem; }
    .setup-stadium-mapline { grid-template-columns: 104px minmax(0, 1fr); }
    .setup-stadium-mapline .setup-stadium-thumb { width: 104px; height: 66px; }
}

@media (max-width: 760px) {
    body:has(#screen-setup.active) #app-container { padding: 10px 14px 22px; }
    body:has(#screen-setup.active) .app-header { margin-bottom: 14px; padding: 8px 12px; }
    body:has(#screen-setup.active) .logo { width: auto; margin-right: auto; }
    body:has(#screen-setup.active) .header-actions { gap: 4px; }
    body:has(#screen-setup.active) .btn-icon { min-width: 38px; padding: 7px 9px; }
    body:has(#screen-setup.active) .btn-text { display: none; }
    .match-setup-shell { grid-template-columns: 1fr; min-height: 0; }
    .match-setup-shell > .glass-card { padding: 20px 16px; }
    .stadium-config-card { min-height: 0; }
    .setup-stadium-mapline { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 11px; }
    .setup-stadium-mapline .setup-stadium-thumb { width: 92px; height: 58px; }
    .setup-team-select-row { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 460px) {
    .team-duel-grid { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 4px; }
    .setup-vs { font-size: 1.45rem; }
    .setup-team-picker { grid-template-columns: 16px minmax(52px, 1fr) 16px; padding-inline: 3px; }
    .setup-team-card .team-logo-slot { width: 64px; height: 78px; }
    .team-step { font-size: 1.45rem; }
    .setup-team-name { font-size: .8rem; }
    .setup-team-country { font-size: .57rem; }
    .setup-team-stats { margin-inline: 4px; gap: 2px; font-size: .53rem; }
    .setup-team-change { width: calc(100% - 8px); margin-inline: 4px; font-size: .6rem; }
    .setup-select-grid { grid-template-columns: 1fr; gap: 10px; }
    .setup-actions { flex-direction: column; }
    .setup-actions .btn-secondary,
    .setup-actions .btn-primary-start { width: 100%; flex: 1; }
}

/* ============================================================================
   COMPETITION SETUP — official tournament presentation
   ============================================================================ */

body:has(#screen-tournament-setup.active) {
    background-color: #edf2f4;
    background-image:
        linear-gradient(90deg, rgba(237, 242, 244, .84), rgba(237, 242, 244, .6) 50%, rgba(237, 242, 244, .82)),
        url('assets/menu_background.webp');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

body:has(#screen-tournament-setup.active) #app-container {
    max-width: 1810px;
    padding: 18px 28px 26px;
}

body:has(#screen-tournament-setup.active) .app-header {
    position: relative;
    min-height: 64px;
    margin-bottom: 24px;
    padding: 8px 20px;
    border-left: 4px solid var(--fuzzbol-orange);
    border-radius: 9px;
    background: rgba(255, 255, 255, .96);
}

body:has(#screen-tournament-setup.active) .logo {
    width: 228px;
    min-height: 48px;
    gap: 9px;
}

body:has(#screen-tournament-setup.active) .brand-logo-mark {
    width: 53px;
    height: 28px;
    display: block;
    flex: 0 0 53px;
    overflow: hidden;
}

body:has(#screen-tournament-setup.active) .brand-logo-mark .brand-logo-img {
    width: 53px;
    height: auto;
    min-height: 0;
    display: block;
    object-fit: contain;
    object-position: center top;
}

body:has(#screen-tournament-setup.active) .setup-wordmark {
    display: block;
    color: var(--fuzzbol-navy);
    font: 900 1.42rem/1 var(--font-display);
    letter-spacing: .015em;
}

body:has(#screen-tournament-setup.active) .match-nav {
    display: flex !important;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
    margin-left: 8px;
}

body:has(#screen-tournament-setup.active) .header-actions { gap: 9px; }
body:has(#screen-tournament-setup.active) .btn-icon {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: .73rem;
}

#screen-tournament-setup.tournament-setup-screen {
    width: 100%;
    max-width: 1660px;
    padding: 0;
    align-items: stretch;
}

.competition-setup-shell {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
    gap: 15px;
    width: 100%;
    min-height: calc(100vh - 173px);
    align-items: stretch;
}

.competition-setup-shell > .glass-card {
    min-width: 0;
    min-height: 0;
    padding: 23px 23px 20px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .97);
    color: var(--fuzzbol-navy);
    box-shadow: 0 12px 28px rgba(25, 43, 58, .09);
}

.competition-config-card,
.competition-summary-card { display: flex; flex-direction: column; }
.competition-setup-shell > .competition-config-card { padding-inline: 24px; }

.competition-title-block {
    padding-bottom: 15px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--fuzzbol-line);
}

.competition-title-block .card-title,
.competition-summary-heading .card-title {
    color: var(--fuzzbol-navy);
    font: 900 clamp(2rem, 2.8vw, 2.48rem)/.94 var(--font-display);
    letter-spacing: .01em;
}

.competition-title-block .form-desc {
    max-width: none;
    color: #65798a;
    font-size: .82rem;
}

.competition-section-block { margin-bottom: 18px; }

.competition-section-label,
.competition-field > label {
    display: block;
    margin-bottom: 8px;
    color: var(--fuzzbol-muted);
    font: 900 .68rem/1.2 var(--font-body);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.competition-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.competition-mode-card {
    min-width: 0;
    min-height: 92px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid #dce3e6;
    border-radius: 7px;
    color: var(--fuzzbol-navy);
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.competition-mode-card:hover:not(.competition-mode-card-disabled) {
    border-color: rgba(255, 75, 24, .48);
    background: var(--fuzzbol-orange-soft);
    transform: translateY(-1px);
}

.competition-mode-card.active {
    border-color: var(--fuzzbol-orange);
    background: #fffaf7;
    box-shadow: 0 0 0 1px var(--fuzzbol-orange) inset;
}

.competition-mode-card-disabled {
    cursor: not-allowed;
    opacity: 1;
}

.competition-mode-card > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competition-mode-card strong {
    color: var(--fuzzbol-navy);
    font: 900 .72rem/1.1 var(--font-body);
}

.competition-mode-card small {
    color: #697d8c;
    font-size: .61rem;
    line-height: 1.15;
}

.competition-mode-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
}

.competition-mode-icon svg { width: 28px; height: 28px; fill: currentColor; }
.competition-mode-icon.tone-orange { color: var(--fuzzbol-orange); }
.competition-mode-icon.tone-navy { color: #65798a; }
.competition-mode-icon.tone-slate { color: #708292; }

.competition-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.tournament-league-field { margin-bottom: 14px; }
.competition-team-field { margin-bottom: 8px; }
.competition-team-field .setting-help { display: none; }
.competition-field .geometric-select {
    min-height: 39px;
    padding: 9px 12px;
    border-color: #d6dfe3;
    border-radius: 6px;
    color: var(--fuzzbol-navy);
    background: #fff;
    font-size: .8rem;
}

.competition-field .geometric-select:focus {
    border-color: var(--fuzzbol-orange);
    box-shadow: 0 0 0 3px rgba(255, 75, 24, .13);
}

.competition-select-wrap { position: relative; display: flex; align-items: center; }
.competition-select-wrap .geometric-select { padding-left: 47px; }
.competition-icon {
    position: absolute;
    left: 11px;
    z-index: 1;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: var(--fuzzbol-navy);
    pointer-events: none;
}

.competition-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.competition-bars-icon svg { fill: none; stroke-width: 1.8; }
.competition-field .setting-help { margin-top: 5px; font-size: .65rem; }

.competition-team-preview {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(250px, 1.1fr);
    align-items: center;
    gap: 14px;
    min-height: 144px;
    margin-bottom: 13px;
    padding: 10px 13px;
    border: 1px solid #dce3e6;
    border-radius: 7px;
    background: #fbfcfc;
}

.competition-team-preview .team-logo-slot {
    width: 118px;
    height: 118px;
    justify-self: center;
    border: 0;
    background: transparent;
}

.competition-team-preview .team-logo-slot.has-image .team-art-image {
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}

.competition-team-copy { min-width: 0; }
.competition-team-copy > strong {
    display: block;
    overflow: hidden;
    color: var(--fuzzbol-navy);
    font: 900 1.42rem/1 var(--font-display);
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.competition-team-copy > span:not(.competition-team-stars) {
    display: block;
    margin-top: 7px;
    color: #65798a;
    font-size: .7rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.competition-team-stars {
    display: inline-flex;
    gap: 2px;
    margin-top: 7px;
    color: #c5ced3;
    font-size: 1rem;
    letter-spacing: .03em;
}

.competition-team-stars .filled { color: var(--fuzzbol-orange); }
.competition-team-copy > small {
    display: block;
    margin-top: 5px;
    color: #8a99a3;
    font-size: .56rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.competition-team-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-self: center;
    border-left: 1px solid #dbe3e6;
}

.competition-team-stats span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.competition-team-stats span + span { border-left: 1px solid #dbe3e6; }
.competition-team-stats small { color: #718391; font: 800 .58rem var(--font-body); }
.competition-team-stats b { color: var(--fuzzbol-navy); font: 900 1.28rem/1 var(--font-body); }
.competition-ai-field { margin-bottom: 0; }

.competition-actions {
    gap: 12px;
    margin-top: auto;
    padding-top: 15px;
}

.competition-actions .btn-secondary,
.competition-actions .btn-primary-start {
    min-height: 48px;
    border-radius: 7px;
    font-size: .84rem;
}

.competition-actions .btn-secondary { flex: .78; }
.competition-actions .btn-primary-start {
    flex: 1.22;
    background: var(--fuzzbol-orange);
    box-shadow: 0 9px 18px rgba(255, 75, 24, .17);
}

.competition-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-height: 84px;
    padding-bottom: 10px;
}

.competition-summary-heading .setup-eyebrow { margin-top: 5px; }
.competition-summary-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.competition-summary-brand img { width: 72px; height: 72px; object-fit: contain; }
.competition-summary-brand span {
    padding-left: 12px;
    border-left: 1px solid #ccd7dc;
    color: #80909d;
    font: 700 .58rem/1.55 var(--font-body);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.competition-summary-brand span::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    margin-top: 8px;
    background: var(--fuzzbol-orange);
}

.competition-bracket-preview {
    min-height: 342px;
    padding: 10px 15px 13px;
    border: 1px solid #dce3e6;
    border-radius: 7px;
    background: #f8fafb;
}

.bracket-heading-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    align-items: center;
    min-height: 27px;
    margin: -10px -15px 9px;
    padding: 0 10px;
    border-bottom: 1px solid #e4eaed;
    color: #71818e;
    font: 800 .61rem var(--font-body);
    text-align: center;
    text-transform: uppercase;
}

.bracket-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 44px;
    min-height: 285px;
    align-items: stretch;
}

.bracket-column { min-width: 0; position: relative; }
.bracket-quarters { display: flex; flex-direction: column; justify-content: space-between; gap: 7px; }
.bracket-pair { position: relative; display: grid; gap: 4px; }
.bracket-pair::after {
    content: '';
    position: absolute;
    top: 25%;
    right: -18px;
    width: 18px;
    height: 50%;
    border-top: 1px solid #91a4b0;
    border-right: 1px solid #91a4b0;
    border-bottom: 1px solid #91a4b0;
}

.bracket-team {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 44px;
    padding: 5px 7px;
    border: 1px solid #e0e6e9;
    border-radius: 5px;
    color: var(--fuzzbol-navy);
    background: #f4f7f8;
}

.bracket-team strong {
    overflow: hidden;
    color: var(--fuzzbol-navy);
    font: 900 .65rem/1 var(--font-display);
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.bracket-team small { color: #65798a; font: 800 .62rem var(--font-mono); }
.bracket-team-player { background: #fff7f3; border-color: rgba(255, 75, 24, .25); }
.bracket-logo-slot { width: 23px; height: 25px; border: 0; background: transparent; }
.bracket-logo-slot.has-image .team-art-image { width: 100%; height: 100%; object-fit: contain; }

.bracket-semis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    padding: 62px 0 89px;
}

.bracket-semis .bracket-team::before,
.bracket-semis .bracket-team::after {
    content: '';
    position: absolute;
    width: 18px;
    border-top: 1px solid #91a4b0;
}

.bracket-semis .bracket-team::before { left: -19px; }
.bracket-semis .bracket-team::after { right: -35px; }
.bracket-final { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.bracket-final::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 50%;
    width: 35px;
    border-top: 1px solid #91a4b0;
}

.bracket-final-trophy { color: #697b88; }
.bracket-final-trophy svg { width: 57px; height: 57px; fill: currentColor; }
.bracket-champion-card {
    width: min(210px, 100%);
    padding: 10px 8px;
    border: 1px solid #dce3e6;
    border-radius: 6px;
    background: #f4f7f8;
    text-align: center;
}

.bracket-champion-card span { display: block; color: #65798a; font: 800 .65rem var(--font-body); text-transform: uppercase; }
.bracket-champion-card strong { display: block; margin-top: 4px; color: var(--fuzzbol-navy); font: 900 .82rem var(--font-display); }

.competition-summary-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 13px;
    border: 1px solid #dce3e6;
    border-radius: 7px;
    background: #fff;
}

.competition-summary-meta > div {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    min-width: 0;
    padding: 10px 9px;
}

.competition-summary-meta > div + div { border-left: 1px solid #dce3e6; }
.summary-meta-icon { color: var(--fuzzbol-navy); font: 900 1.3rem/1 Arial, sans-serif; text-align: center; }
.competition-summary-meta > div > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.competition-summary-meta small { color: #85939d; font: 800 .51rem var(--font-body); text-transform: uppercase; }
.competition-summary-meta strong { overflow: hidden; color: var(--fuzzbol-navy); font: 900 .65rem/1.1 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.competition-summary-meta em { overflow: hidden; color: #687b8a; font: normal .54rem/1.1 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }

.competition-banner {
    position: relative;
    overflow: hidden;
    min-height: 89px;
    margin-top: 13px;
    border-radius: 6px;
    background: var(--fuzzbol-navy-deep);
}

.competition-banner img { width: 100%; height: 100%; min-height: 89px; display: block; object-fit: cover; object-position: center 43%; }
.competition-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 24, 39, .9), rgba(7, 24, 39, .12) 75%); }
.competition-banner > div { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 12px 16px; color: #fff; }
.competition-banner strong { font: 900 1.26rem/.92 var(--font-display); letter-spacing: .02em; }
.competition-banner span { margin-top: 7px; color: rgba(255, 255, 255, .82); font: 700 .56rem var(--font-body); letter-spacing: .08em; }

.competition-summary-card .competition-bracket-preview { flex: 1 1 auto; }
.competition-banner-image-only { min-height: 148px; flex: 0 0 148px; }
.competition-banner-image-only img { min-height: 148px; object-position: center 50%; }
.competition-banner-image-only::after { background: linear-gradient(90deg, rgba(7, 24, 39, .18), rgba(7, 24, 39, 0)); }
.competition-banner-image-only > div { display: none; }

@media (max-width: 1120px) {
    body:has(#screen-tournament-setup.active) .app-header { flex-wrap: wrap; gap: 8px; }
    body:has(#screen-tournament-setup.active) .match-nav { order: 3; width: 100%; min-height: 33px; justify-content: center; margin: 0; border-top: 1px solid #e7ecee; }
    .competition-setup-shell { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
    .competition-setup-shell > .glass-card { padding-inline: 18px; }
    .competition-team-preview { grid-template-columns: 92px minmax(0, 1fr) minmax(135px, .82fr); gap: 9px; padding-inline: 9px; }
    .competition-team-preview .team-logo-slot { width: 84px; height: 100px; }
    .competition-team-copy > strong { font-size: 1.08rem; }
    .competition-mode-grid { gap: 6px; }
    .competition-mode-card { grid-template-columns: 26px minmax(0, 1fr); gap: 6px; padding-inline: 7px; }
    .competition-mode-icon { width: 25px; height: 25px; }
    .competition-mode-icon svg { width: 23px; height: 23px; }
    .competition-mode-card strong { font-size: .62rem; }
    .competition-mode-card small { font-size: .55rem; }
    .competition-bracket-preview { padding-inline: 7px; }
    .bracket-grid { gap: 22px; }
}

@media (max-width: 760px) {
    body:has(#screen-tournament-setup.active) #app-container { padding: 10px 14px 22px; }
    body:has(#screen-tournament-setup.active) .app-header { margin-bottom: 14px; padding: 8px 12px; }
    body:has(#screen-tournament-setup.active) .logo { width: auto; margin-right: auto; }
    body:has(#screen-tournament-setup.active) .header-actions { gap: 4px; }
    body:has(#screen-tournament-setup.active) .btn-icon { min-width: 38px; padding: 7px 9px; }
    body:has(#screen-tournament-setup.active) .btn-text { display: none; }
    .competition-setup-shell { grid-template-columns: 1fr; min-height: 0; }
    .competition-setup-shell > .glass-card { padding: 20px 16px; }
    .competition-mode-grid { grid-template-columns: 1fr; }
    .competition-mode-card { min-height: 62px; }
    .competition-team-preview { grid-template-columns: 84px minmax(0, 1fr); }
    .competition-team-stats { grid-column: 1 / -1; border-top: 1px solid #dbe3e6; border-left: 0; padding-top: 9px; }
    .competition-summary-heading { min-height: 70px; }
    .competition-summary-brand img { width: 54px; height: 54px; }
    .competition-summary-brand span { display: none; }
    .bracket-grid { gap: 12px; }
    .bracket-team { grid-template-columns: 21px minmax(0, 1fr) auto; padding-inline: 4px; }
    .bracket-team strong { font-size: .56rem; }
    .competition-summary-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .competition-summary-meta > div:nth-child(3) { border-left: 0; border-top: 1px solid #dce3e6; }
    .competition-summary-meta > div:nth-child(4) { border-top: 1px solid #dce3e6; }
}

@media (max-width: 460px) {
    .competition-title-block .card-title,
    .competition-summary-heading .card-title { font-size: 1.85rem; }
    .competition-summary-heading { gap: 6px; }
    .competition-summary-brand { display: none; }
    .competition-bracket-preview { overflow-x: auto; }
    .bracket-grid, .bracket-heading-row { min-width: 470px; }
    .competition-actions { flex-direction: column; }
    .competition-actions .btn-secondary,
    .competition-actions .btn-primary-start { width: 100%; flex: 1; }
}

/* Career: editorial matchday dashboard, scoped to protect other game modes. */
#screen-career-hub .career-story-hero,
#screen-career-setup .career-setup-intro {
    position: relative; isolation: isolate; overflow: hidden; border-radius: 12px;
    background: #102d43; color: #fff; padding: 26px 30px; margin-bottom: 20px;
}
#screen-career-hub .career-story-hero { min-height: 216px; display: flex; align-items: center; }
#screen-career-hub .career-story-hero > div { position: relative; z-index: 2; width: 72%; }
#screen-career-hub .career-story-hero h3,
#screen-career-setup .career-setup-intro h3 { color: #fff; font: 900 clamp(2rem, 3.4vw, 3.5rem)/1.05 var(--font-display); text-transform: uppercase; margin: 10px 0; letter-spacing: -.01em; }
#screen-career-hub .career-story-hero p,
#screen-career-setup .career-setup-intro p { color: #d1e0e9; font-size: .8rem; line-height: 1.65; max-width: 420px; margin: 0; }
.career-eyebrow { font: 800 .6rem var(--font-mono); letter-spacing: .14em; color: #ff865f; }
#screen-career-hub .career-hero-art { position: absolute; right: 0; top: 0; height: 100%; width: 54%; object-fit: cover; opacity: .55; mask-image: linear-gradient(to right, transparent, #000 55%); }
.career-hero-wordmark { position: absolute; right: 18px; bottom: 16px; color: #fff; opacity: .75; font: 800 .6rem var(--font-mono); letter-spacing: .13em; }
.career-journey { display: flex; gap: 18px; margin-top: 21px; flex-wrap: wrap; }
.career-journey > span { color: #a4b6c3; font: 700 .63rem var(--font-body); display: flex; align-items: center; gap: 6px; }
.career-journey b { border-top: 2px solid #5a6e7f; padding-top: 5px; font: 700 .65rem var(--font-mono); }
.career-journey .reached { color: #fff; }
.career-journey .reached b { color: #ff865f; border-color: #ff7547; }
#screen-career-setup .career-setup-intro { background: linear-gradient(100deg, #102d43 25%, #102d4380), url('assets/career-matchday-discs.webp') center 55% / cover; }
#screen-career-setup .career-setup-intro h3 { font-size: 2.5rem; }
.career-setup-stamp { position: absolute; right: 20px; bottom: 18px; font: 800 .55rem var(--font-mono); color: #d1e0e9; letter-spacing: .1em; }
#screen-career-setup .career-setup-note { color: #5d7181; font-size: .77rem; line-height: 1.6; margin-top: 24px; }
#screen-career-hub .career-workspace-header { flex-wrap: wrap; gap: 12px; }
#screen-career-hub .career-header-actions { flex-wrap: wrap; margin-left: auto; }
#screen-career-hub .career-save-status { max-width: 230px; color: #397149; line-height: 1.5; font-size: .65rem; }
#screen-career-hub .career-save-status[data-status="error"] { color: #b53725; }
#screen-career-hub .career-nav-item { min-height: 44px; }
#screen-career-hub .career-view { animation-duration: .15s; }
#screen-career-hub .career-club-panel { border-radius: 10px; padding: 14px 18px; }
#screen-career-hub .career-objective { position: relative; overflow: hidden; border-radius: 8px; padding-bottom: 17px; }
#screen-career-hub .career-objective::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--objective-progress, 0%); background: var(--fuzzbol-orange); transition: width .25s; }
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-next-match {
    display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 16px; padding: 22px; border-radius: 12px; background: #f4f7f9; border: 1px solid #d7e1e7;
}
#screen-career-hub .career-rival-crest { width: 68px; height: 76px; background: transparent; border: 0; }
#screen-career-hub .career-rival-crest img { width: 100%; height: 100%; object-fit: contain; }
#screen-career-hub .career-next-match-copy { min-width: 0; }
#screen-career-hub .career-next-match-copy strong { font-size: clamp(1.4rem, 2.4vw, 2rem); }
#screen-career-hub .career-match-actions { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
#screen-career-hub .career-match-action { border-radius: 8px; min-height: 102px; padding: 15px 12px; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-match-action:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px #13283c12; }
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-match-action.featured { color: #fff; background: #ef4515; border-color: #ef4515; }
body:not(.home-view):not(.match-view) #screen-career-hub.active .career-match-action.featured strong,
#screen-career-hub .career-match-action.featured small,
#screen-career-hub .career-match-action.featured .career-match-action-icon { color: #fff; }
#screen-career-hub .career-match-action small { color: #5c6f7f; }
#screen-career-hub .career-match-action:disabled { opacity: .45; cursor: not-allowed; transform: none; }
#screen-career-hub .career-howto { margin: 12px 0 22px; color: #526b7d; font-size: .75rem; line-height: 1.65; }
#screen-career-hub .career-howto summary { cursor: pointer; padding: 8px 0; color: #15354c; font-weight: 750; }
#screen-career-hub .career-howto > div { padding: 12px 18px; border: 1px solid #dce5eb; border-radius: 8px; }
#screen-career-hub kbd { font-family: inherit; background: #e9eff3; padding: 3px 5px; border-radius: 3px; }
.career-decision { margin: 20px 0; padding: 22px; background: #f8f5ef; border: 1px solid #e9dfcf; border-radius: 10px; }
.career-decision:empty { display: none; }
.career-decision-heading { display: flex; gap: 10px; justify-content: space-between; }
.career-decision-heading > span:last-child { color: #7a6c59; font: 700 .65rem var(--font-body); }
.career-decision .career-eyebrow { color: #95631c; }
#screen-career-hub .career-decision h3 { color: #163449; font: 900 1.7rem var(--font-display); text-transform: uppercase; margin: 12px 0 6px; }
.career-decision p { font-size: .78rem; line-height: 1.6; margin: 0 0 16px; color: #66727a; }
.career-decision-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.career-decision-choices button { text-align: left; background: #fff; border: 1px solid #dcd4c6; border-radius: 7px; padding: 14px; color: #19394f; cursor: pointer; }
.career-decision-choices button:hover { border-color: #ec591f; background: #fffaf6; }
.career-decision-choices button:disabled { opacity: .5; cursor: not-allowed; }
.career-decision-choices strong { display: flex; justify-content: space-between; font: 800 .78rem var(--font-body); }
.career-decision-choices small { display: block; color: #78705f; margin-top: 7px; font-size: .69rem; }
.career-decision-resolved { padding: 12px; border-radius: 6px; color: #366447; background: #e9f0e6; font-size: .8rem; font-weight: 750; }
.career-decision-resolved span { display: block; margin-top: 5px; font-weight: 500; }
#screen-career-hub .career-reward-recap { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; padding: 18px; border: 1px solid #d9e6df; background: #f8fbf9; border-radius: 10px; }
#screen-career-hub .career-reward-recap[hidden], #screen-career-hub .career-season-finale[hidden] { display: none; }
.career-result-score { min-width: 88px; padding-right: 18px; border-right: 1px solid #d9e6df; text-align: center; color: #237247; }
.career-result-score.loss { color: #b33b32; }
.career-result-score.draw { color: #6f612e; }
.career-result-score span { display: block; font: 800 .55rem var(--font-mono); letter-spacing: .08em; }
.career-result-score strong { font: 900 2.3rem var(--font-display); }
.career-result-copy > span { font: 750 .56rem var(--font-mono); color: #617b6c; letter-spacing: .06em; }
.career-result-copy > strong { display: block; color: #15374c; font: 850 1.1rem var(--font-display); margin: 4px 0; }
.career-result-copy p { color: #667d70; font-size: .69rem; line-height: 1.5; margin: 0; }
.career-reward-values { display: flex; flex-direction: column; gap: 4px; color: #207046; text-align: right; }
.career-reward-values b { font: 900 1.2rem var(--font-mono); }
.career-reward-values > span { font-size: .7rem; }
.career-inline-action { cursor: pointer; border: 0; padding: 6px 0; background: transparent; color: #c33e13; font: 750 .69rem var(--font-body); }
#screen-career-hub .career-season-finale { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 22px; background: #fff4dd; border: 1px solid #e6c78a; border-radius: 10px; margin-bottom: 20px; color: #19344a; }
.career-season-finale > svg { height: 48px; width: 48px; color: #b77717; }
.career-season-finale > div { flex: 1; }
.career-season-finale span { color: #926525; font: 800 .6rem var(--font-mono); }
#screen-career-hub .career-season-finale h3 { color: #19344a; font: 900 1.8rem var(--font-display); margin: 5px 0; }
.career-season-finale p { color: #806a4c; font-size: .73rem; line-height: 1.5; margin: 0; }
.career-season-finale button { font-size: .75rem; min-height: 44px; }
.career-calendar { margin-bottom: 26px; }
.career-calendar-caption { color: #63798a; font-size: .68rem; }
.career-calendar-grid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.career-calendar-match { flex: 0 0 120px; background: #f6f8fa; border: 1px solid #dfe7ec; border-radius: 8px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #17344a; text-align: center; }
.career-calendar-match.current { background: #fff4ee; border-color: #ff865f; }
.career-calendar-match > span:first-child { font: 700 .55rem var(--font-mono); color: #667989; }
.career-calendar-match > strong { font: 800 .8rem var(--font-display); min-height: 28px; }
.career-calendar-match > b { font: 900 1.1rem var(--font-mono); }
#screen-career-hub .career-calendar-logo { width: 40px; height: 44px; border: 0; background: transparent; }
.career-achievements { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.career-achievement { display: flex; gap: 14px; align-items: center; background: #f8fafb; border: 1px solid #e1e7ec; border-radius: 8px; padding: 16px; }
.career-achievement.unlocked { background: #fff9ed; border-color: #e7cd96; }
.career-achievement-mark { color: #8798a3; }
.career-achievement-mark svg { width: 30px; height: 30px; }
.career-achievement.unlocked .career-achievement-mark { color: #bc811f; }
.career-achievement strong { color: #1b3a50; font-size: .82rem; }
.career-achievement p { color: #617788; font-size: .71rem; line-height: 1.45; margin: 5px 0; }
.career-achievement small { color: #83662d; font: 750 .58rem var(--font-mono); }
#screen-career-hub .career-offer-crest { width: 56px; height: 62px; border: 0; background: transparent; }
#screen-career-hub .career-attribute-card { grid-template-rows: 1fr auto; padding: 18px; gap: 12px; }
#screen-career-hub .career-attr-content { padding: 0; }
#screen-career-hub .career-attr-actions button { min-height: 42px; }
#screen-career-hub .career-notifications-panel { margin-top: 22px; box-shadow: none; }
#screen-career-hub :is(button, summary):focus-visible,
#screen-career-setup :is(button, input, select):focus-visible { outline: 3px solid #ff6e34; outline-offset: 3px; }
@media (max-width: 980px) {
    #screen-career-hub .career-story-hero > div { width: 85%; }
    #screen-career-hub .career-sidebar { position: static; }
    #screen-career-hub .career-exit { display: block; margin: 6px 0 0 auto; width: auto; min-height: 38px; }
    #screen-career-hub .career-player-card.compact { display: flex; margin: 0 0 10px; }
    #screen-career-hub .career-header-actions { margin-left: 0; }
}
@media (max-width: 620px) {
    #screen-career-hub .career-story-hero { padding: 22px 18px; }
    #screen-career-hub .career-story-hero > div { width: 100%; }
    #screen-career-hub .career-story-hero h3 { font-size: 2.2rem; }
    #screen-career-hub .career-hero-art { width: 90%; opacity: .22; }
    #screen-career-hub .career-hero-wordmark { display: none; }
    .career-journey { gap: 10px; }
    .career-journey > span { font-size: .57rem; }
    body:not(.home-view):not(.match-view) #screen-career-hub.active .career-next-match { padding: 16px; gap: 10px; grid-template-columns: 52px minmax(0, 1fr); }
    #screen-career-hub .career-rival-crest { width: 52px; height: 62px; }
    #screen-career-hub .career-match-actions { grid-template-columns: 1fr 1fr; }
    #screen-career-hub .career-match-action.featured { grid-column: 1 / -1; grid-row: 1; min-height: 92px; }
    .career-decision { padding: 18px; }
    .career-decision-choices, .career-achievements { grid-template-columns: 1fr; }
    #screen-career-hub .career-reward-recap { grid-template-columns: auto 1fr; gap: 12px; }
    .career-reward-values { grid-column: 1 / -1; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid #e0e9e3; padding-top: 10px; }
    #screen-career-hub .career-save-status { max-width: none; flex-basis: 100%; }
    #screen-career-hub .career-season-finale { padding: 18px; gap: 12px; }
    #screen-career-hub .career-season-finale button { width: 100%; }
    #screen-career-hub .career-club-rating, #screen-career-hub .career-market-value { text-align: left; }
    .career-setup-stamp { display: none; }
    #screen-career-setup .career-setup-intro { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    #screen-career-hub .career-view { animation: none; }
    #screen-career-hub .career-match-action, #screen-career-hub .career-objective::after { transition: none; }
}
#screen-career-hub .career-notifications-panel > summary { cursor: pointer; margin-bottom: 0; }
#screen-career-hub .career-notifications-panel[open] > summary { margin-bottom: 16px; }
#screen-career-hub .career-calendar-logo, #screen-career-hub .career-rival-crest, #screen-career-hub .career-offer-crest { flex: none; }
#screen-career-hub .career-metrics-grid { margin-top: 18px; }
#screen-career-hub .career-notifications-panel > summary::after { content: '+'; color: #cf421b; font-size: 1.2rem; }
#screen-career-hub .career-notifications-panel[open] > summary::after { content: '−'; }

/* ==========================================================================
   CAREER VISUAL SYSTEM — club identity, trophies and richer hub views
   ========================================================================== */

#screen-career-hub .career-view > .career-section-heading { margin-top: 4px; }
#screen-career-hub .career-view > .career-section-heading h3 { letter-spacing: -.015em; }
#screen-career-hub .career-panel-kicker { letter-spacing: .12em; }

#screen-career-hub .career-honor-shelf {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .82fr); gap: 18px;
    min-height: 176px; margin: 18px 0 22px; overflow: hidden; border-radius: 12px;
    color: #fff; background: #112f45; border: 1px solid #274b62; position: relative;
}
#screen-career-hub .career-honor-shelf::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 15% 15%, #ff784b35, transparent 37%), linear-gradient(100deg, #102d43 25%, transparent 70%);
}
#screen-career-hub .career-honor-copy { position: relative; z-index: 1; padding: 24px 24px 20px; }
#screen-career-hub .career-honor-copy h3 { margin: 8px 0 6px; color: #fff; font: 900 1.65rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-honor-copy p { max-width: 520px; margin: 0; color: #bfd1db; font-size: .75rem; line-height: 1.55; }
#screen-career-hub .career-honor-counts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
#screen-career-hub .career-honor-counts span { display: flex; align-items: baseline; gap: 7px; }
#screen-career-hub .career-honor-counts strong { color: #ff8152; font: 900 1.3rem var(--font-mono); }
#screen-career-hub .career-honor-counts small { color: #d8e3e8; font: 800 .52rem var(--font-mono); letter-spacing: .08em; }
#screen-career-hub .career-trophy-wall { min-height: 176px; position: relative; overflow: hidden; background: #081b2a; }
#screen-career-hub .career-trophy-wall::after,
#screen-career-hub .career-history-trophy-wall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #112f45 0%, transparent 37%, #07152333); pointer-events: none; }
#screen-career-hub .career-trophy-wall img { display: block; width: 100%; height: 100%; min-height: 176px; object-fit: cover; object-position: center 45%; opacity: .77; mix-blend-mode: screen; }
#screen-career-hub .career-trophy-wall span { position: absolute; z-index: 2; right: 17px; bottom: 14px; color: #fff; font: 800 .54rem var(--font-mono); letter-spacing: .12em; }

#screen-career-hub .career-competition-banner {
    display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 18px; align-items: center;
    margin-bottom: 22px; padding: 18px 22px; overflow: hidden; position: relative; border-radius: 12px;
    color: #fff; background: linear-gradient(110deg, #142d4b, #1c1a44 66%, #3c1d4c); border: 1px solid #445174;
    box-shadow: 0 8px 24px #17203a1b;
}
#screen-career-hub .career-competition-banner::after { content: '01'; position: absolute; right: 126px; bottom: -26px; color: #ffffff0b; font: 900 8.5rem var(--font-display); }
#screen-career-hub .career-competition-banner img { width: 66px; height: 66px; object-fit: contain; filter: drop-shadow(0 5px 8px #0008); position: relative; z-index: 1; }
#screen-career-hub .career-competition-banner h3 { position: relative; z-index: 1; margin: 4px 0 4px; color: #fff; font: 900 1.8rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-competition-banner p { position: relative; z-index: 1; max-width: 570px; margin: 0; color: #c4cfdf; font-size: .75rem; line-height: 1.5; }
#screen-career-hub .career-competition-season { position: relative; z-index: 1; min-width: 66px; padding-left: 18px; border-left: 1px solid #ffffff35; text-align: center; }
#screen-career-hub .career-competition-season strong { display: block; color: #ff8152; font: 900 1.8rem var(--font-mono); }
#screen-career-hub .career-competition-season span { color: #cfdae5; font: 800 .51rem var(--font-mono); letter-spacing: .1em; }
#screen-career-hub .career-calendar-match { min-height: 152px; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-calendar-match:hover { transform: translateY(-3px); box-shadow: 0 7px 16px #1d415321; }
#screen-career-hub .career-calendar-match.current { box-shadow: inset 0 3px 0 #ef541f, 0 7px 16px #ef541f18; }
#screen-career-hub .career-calendar-match.current::after { content: 'AHORA'; color: #d74819; font: 900 .49rem var(--font-mono); letter-spacing: .1em; }

#screen-career-hub .career-player-spotlight {
    display: grid; grid-template-columns: 86px minmax(0, 1fr) auto 118px; gap: 18px; align-items: center;
    min-height: 192px; margin: 2px 0 20px; padding: 22px 24px; overflow: hidden; position: relative;
    color: #fff; border-radius: 13px; background: linear-gradient(112deg, #321f4b, #152743 69%, #10334d); border: 1px solid #4f4a6b;
}
#screen-career-hub .career-player-spotlight::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 46%, #ff6c3925 46.3%, transparent 47%); pointer-events: none; }
#screen-career-hub .career-player-portrait,
#screen-career-hub .career-development-avatar {
    display: grid; place-items: center; position: relative; z-index: 1; width: 78px; height: 92px;
    border: 2px solid var(--player-color, #ff7545); border-radius: 10px 10px 28px 28px;
    color: #fff; background: linear-gradient(160deg, var(--player-color, #ff7545)66, #14233a 67%); font-size: 2.8rem;
    box-shadow: 0 10px 20px #050d1a55;
}
#screen-career-hub .career-player-spotlight-copy { position: relative; z-index: 1; min-width: 0; }
#screen-career-hub .career-player-spotlight-copy h3 { margin: 6px 0 4px; color: #fff; font: 900 clamp(1.8rem, 3.2vw, 2.75rem)/.95 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-player-spotlight-copy p { margin: 0; color: #cfdae5; font-size: .75rem; }
#screen-career-hub .career-player-xp { max-width: 360px; display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 9px; border-top: 1px solid #ffffff2b; color: #aebfd1; font: 800 .52rem var(--font-mono); letter-spacing: .08em; }
#screen-career-hub .career-player-xp b { color: #ff895f; white-space: nowrap; }
#screen-career-hub .career-overall-badge { position: relative; z-index: 1; min-width: 62px; padding: 10px 8px; border: 1px solid #ff855d85; border-radius: 8px; background: #ff6d3024; text-align: center; }
#screen-career-hub .career-overall-badge strong { display: block; color: #ff9a73; font: 900 2rem var(--font-mono); line-height: 1; }
#screen-career-hub .career-overall-badge span { color: #d7e0e7; font: 800 .53rem var(--font-mono); letter-spacing: .1em; }
#screen-career-hub .career-radar { position: relative; width: 112px; height: 112px; border: 1px solid #ffffff2e; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 18px, #ffffff16 19px 20px), conic-gradient(from -30deg, #ff784c 0 18%, transparent 18% 30%, #ff784c 30% 44%, transparent 44% 53%, #ff784c 53% 68%, transparent 68% 76%, #ff784c 76% 88%, transparent 88%); opacity: .9; clip-path: polygon(50% 0, 93% 25%, 95% 75%, 50% 100%, 6% 75%, 7% 25%); }
#screen-career-hub .career-radar i { position: absolute; color: #d5e1e9; font: 700 .42rem var(--font-mono); font-style: normal; }
#screen-career-hub .career-radar i:nth-child(1) { top: -7px; left: 41px; } #screen-career-hub .career-radar i:nth-child(2) { top: 25px; right: -9px; }
#screen-career-hub .career-radar i:nth-child(3) { bottom: 14px; right: -10px; } #screen-career-hub .career-radar i:nth-child(4) { bottom: -8px; left: 40px; }
#screen-career-hub .career-radar i:nth-child(5) { bottom: 14px; left: -10px; } #screen-career-hub .career-radar i:nth-child(6) { top: 25px; left: -9px; }

#screen-career-hub .career-team-showcase {
    display: grid; grid-template-columns: 74px minmax(0, 1fr) 184px auto; gap: 18px; align-items: center;
    min-height: 154px; margin: 2px 0 20px; padding: 20px 22px; overflow: hidden; position: relative;
    border-radius: 12px; color: #fff; background: linear-gradient(110deg, #112d43, #1b4154 60%, #2b5d62); border: 1px solid #3d6973;
}
#screen-career-hub .career-team-showcase::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 78% 0, #ffffff16, transparent 35%); pointer-events: none; }
#screen-career-hub .career-team-showcase-crest { position: relative; z-index: 1; width: 70px; height: 76px; border: 0; background: transparent; }
#screen-career-hub .career-team-showcase-crest img { width: 100%; height: 100%; object-fit: contain; }
#screen-career-hub .career-team-showcase h3 { position: relative; z-index: 1; margin: 6px 0 5px; color: #fff; font: 900 1.8rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-team-showcase p { position: relative; z-index: 1; margin: 0; color: #c7d9dd; font-size: .75rem; }
#screen-career-hub .career-tactics-board { position: relative; width: 184px; height: 112px; border: 1px solid #a5d2ca66; border-radius: 7px; background: linear-gradient(90deg, transparent 49.5%, #c3e1d866 50% 50.5%, transparent 51%), linear-gradient(0deg, #65a88833 49.5%, #c3e1d866 50% 50.5%, transparent 51%), #33785a; box-shadow: inset 0 0 0 8px #ffffff0c; }
#screen-career-hub .career-tactics-board > span { position: absolute; inset: 23px 0; border-top: 1px solid #c3e1d866; border-bottom: 1px solid #c3e1d866; }
#screen-career-hub .career-tactics-board i { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #ff7047; border: 2px solid #fff; box-shadow: 0 2px 4px #07382788; }
#screen-career-hub .career-tactics-board i:nth-of-type(1) { left: 24px; top: 48px; } #screen-career-hub .career-tactics-board i:nth-of-type(2) { left: 72px; top: 25px; }
#screen-career-hub .career-tactics-board i:nth-of-type(3) { left: 92px; top: 72px; } #screen-career-hub .career-tactics-board i:nth-of-type(4) { right: 24px; top: 48px; }
#screen-career-hub .career-tactics-board b { position: absolute; right: 8px; bottom: 5px; color: #dff2e7; font: 800 .48rem var(--font-mono); }
#screen-career-hub .career-team-honors { position: relative; z-index: 1; align-self: end; text-align: right; }
#screen-career-hub .career-team-honors span { display: block; color: #b4d1d2; font: 800 .49rem var(--font-mono); letter-spacing: .1em; }
#screen-career-hub .career-team-honors strong { color: #ffc76c; font: 900 1.1rem var(--font-mono); letter-spacing: .12em; }

#screen-career-hub .career-agent-hero {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) 150px; gap: 18px; align-items: center;
    margin: 2px 0 20px; padding: 18px 22px; border-radius: 12px; overflow: hidden; position: relative;
    color: #fff; background: linear-gradient(110deg, #132c47, #222452 68%, #362b5c); border: 1px solid #4e5681;
}
#screen-career-hub .career-agent-hero::after { content: 'REP'; position: absolute; right: 15px; top: -20px; color: #ffffff0a; font: 900 7rem var(--font-display); }
#screen-career-hub .career-agent-hero img { width: 70px; height: 76px; object-fit: contain; border-radius: 10px; position: relative; z-index: 1; }
#screen-career-hub .career-agent-hero h3 { position: relative; z-index: 1; margin: 5px 0; color: #fff; font: 900 1.8rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-agent-hero p { position: relative; z-index: 1; margin: 0; max-width: 500px; color: #c9d5e2; font-size: .75rem; line-height: 1.45; }
#screen-career-hub .career-agent-trust { position: relative; z-index: 1; }
#screen-career-hub .career-agent-trust span { color: #c0cedd; font: 800 .52rem var(--font-mono); letter-spacing: .1em; }
#screen-career-hub .career-agent-trust strong { display: block; color: #ff9a73; font: 900 1.2rem var(--font-mono); margin: 4px 0 7px; }
#screen-career-hub .career-agent-trust i, #screen-career-hub .career-training-energy i { display: block; height: 6px; border-radius: 99px; background: #ffffff2b; overflow: hidden; }
#screen-career-hub .career-agent-trust i b { display: block; width: 82%; height: 100%; background: #ff744b; }
#screen-career-hub .career-contract-card { border-radius: 10px; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-contract-card:hover { transform: translateY(-2px); box-shadow: 0 7px 15px #1d41531b; }

#screen-career-hub .career-development-hero {
    display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 18px; align-items: center;
    margin: 2px 0 18px; padding: 20px 22px; border-radius: 12px; overflow: hidden; position: relative;
    color: #fff; background: linear-gradient(110deg, #162e4a, #173c4c 68%, #194f4a); border: 1px solid #416f74;
}
#screen-career-hub .career-development-hero::before { content: ''; position: absolute; width: 270px; height: 270px; right: 82px; top: -115px; border: 1px solid #ffffff1b; border-radius: 50%; box-shadow: 0 0 0 32px #ffffff08, 0 0 0 64px #ffffff05; }
#screen-career-hub .career-development-avatar { width: 70px; height: 80px; font-size: 2.2rem; }
#screen-career-hub .career-development-hero > div:nth-child(2) { position: relative; z-index: 1; }
#screen-career-hub .career-development-hero h3 { margin: 5px 0; color: #fff; font: 900 1.8rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-development-hero p { margin: 0; color: #c8dadf; font-size: .74rem; }
#screen-career-hub .career-development-overall, #screen-career-hub .career-skillpoints-badge { position: relative; z-index: 1; text-align: center; }
#screen-career-hub .career-development-overall strong, #screen-career-hub .career-skillpoints-badge b { display: block; color: #ff9b73; font: 900 1.65rem var(--font-mono); line-height: 1; }
#screen-career-hub .career-development-overall span, #screen-career-hub .career-skillpoints-badge span { display: block; margin-top: 5px; color: #c7d9dd; font: 800 .49rem var(--font-mono); letter-spacing: .09em; }
#screen-career-hub .career-skillpoints-badge { min-width: 62px; padding: 10px 8px; border: 1px solid #ff9a7366; border-radius: 8px; background: #ff81521c; }
#screen-career-hub .career-development-note { position: relative; margin-bottom: 18px; padding-left: 14px; border-left: 3px solid #ef5b25; color: #5d7181; font-size: .74rem; line-height: 1.55; }
#screen-career-hub .career-attribute-card { position: relative; overflow: hidden; border-radius: 10px; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-attribute-card::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: linear-gradient(#ff6d3e, #ffa45d); }
#screen-career-hub .career-attribute-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px #163b5016; }

#screen-career-hub .career-training-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 160px minmax(170px, .68fr); gap: 20px; align-items: center;
    min-height: 130px; margin: 2px 0 22px; padding: 22px 24px; border-radius: 12px; overflow: hidden; position: relative;
    color: #fff; background: linear-gradient(90deg, #13344aD9, #173b48C9), url('assets/grass_turf.webp') center / cover; border: 1px solid #4a7d79;
}
#screen-career-hub .career-training-hero::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(120deg, #fff0 0 40px, #ffffff08 41px 42px); pointer-events: none; }
#screen-career-hub .career-training-hero > div { position: relative; z-index: 1; }
#screen-career-hub .career-training-hero h3 { margin: 5px 0; color: #fff; font: 900 1.85rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-training-hero p { margin: 0; color: #cfdee0; font-size: .74rem; }
#screen-career-hub .career-training-energy span, #screen-career-hub .career-training-coach span { color: #c6d9dd; font: 800 .5rem var(--font-mono); letter-spacing: .09em; }
#screen-career-hub .career-training-energy strong { display: block; margin: 5px 0 7px; color: #ffb071; font: 900 1.25rem var(--font-mono); }
#screen-career-hub .career-training-energy i b { display: block; width: 72%; height: 100%; background: #ff9d55; }
#screen-career-hub .career-training-coach { padding-left: 16px; border-left: 1px solid #ffffff42; color: #ffb071; font-size: 1.35rem; }
#screen-career-hub .career-training-coach span, #screen-career-hub .career-training-coach strong { display: block; }
#screen-career-hub .career-training-coach strong { margin-top: 5px; color: #fff; font-size: .75rem; line-height: 1.3; }
#screen-career-hub .career-training-card { min-height: 194px; display: flex; flex-direction: column; border-radius: 11px; overflow: hidden; position: relative; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-training-card::before { content: ''; position: absolute; right: -24px; top: 14px; width: 112px; height: 112px; border: 1px solid currentColor; border-radius: 50%; opacity: .17; box-shadow: 0 0 0 17px currentColor, 0 0 0 34px transparent; }
#screen-career-hub .career-training-card:hover { transform: translateY(-4px); box-shadow: 0 9px 18px #183b5018; }
#screen-career-hub .career-training-card h4, #screen-career-hub .career-training-card p, #screen-career-hub .career-training-card button { position: relative; z-index: 1; }
#screen-career-hub .career-training-card h4 { margin-top: 8px; }
#screen-career-hub .career-training-card p { flex: 1; }
#screen-career-hub .career-training-card button { align-self: flex-start; }
#screen-career-hub .training-toolbar { margin-top: 18px; padding: 14px 16px; border-radius: 9px; background: #f2f7f5; border: 1px solid #d8e7e0; }

#screen-career-hub .career-history-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); align-items: stretch; min-height: 174px;
    margin: 2px 0 20px; overflow: hidden; border-radius: 12px; color: #fff; background: #121e2c; border: 1px solid #2d4555;
}
#screen-career-hub .career-history-hero > div:first-child { padding: 24px; position: relative; z-index: 1; background: linear-gradient(90deg, #12263a, #12263add 70%, transparent); }
#screen-career-hub .career-history-hero h3 { margin: 7px 0; color: #fff; font: 900 1.85rem/1 var(--font-display); text-transform: uppercase; }
#screen-career-hub .career-history-hero p { max-width: 420px; margin: 0; color: #bdcbd5; font-size: .75rem; line-height: 1.5; }
#screen-career-hub .career-history-trophy-wall { min-height: 174px; position: relative; overflow: hidden; margin-left: -24px; }
#screen-career-hub .career-history-trophy-wall img { display: block; width: 100%; height: 100%; min-height: 174px; object-fit: cover; object-position: center 43%; opacity: .86; }
#screen-career-hub .career-history-trophy-wall span { position: absolute; z-index: 2; right: 15px; bottom: 13px; color: #fff; font: 800 .52rem var(--font-mono); letter-spacing: .1em; }
#screen-career-hub .career-trophy-cabinet { display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)); gap: 8px; height: 100%; min-height: 174px; padding: 13px 18px 25px; align-items: end; background: linear-gradient(180deg, #10283b, #081522); }
#screen-career-hub .career-trophy-item { min-width: 0; display: grid; grid-template-rows: 82px auto; gap: 4px; align-items: end; text-align: center; }
#screen-career-hub .career-trophy-item img { width: 100%; height: 82px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .3)); }
#screen-career-hub .career-trophy-item.locked img { filter: grayscale(1); opacity: .32; }
#screen-career-hub .career-trophy-item div { min-width: 0; }
#screen-career-hub .career-trophy-item strong, #screen-career-hub .career-trophy-item span { display: block; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
#screen-career-hub .career-trophy-item strong { font: 800 .55rem var(--font-mono); }
#screen-career-hub .career-trophy-item span { margin-top: 2px; color: #aebfcb; font-size: .5rem; }
#screen-career-hub .career-history-summary { margin-bottom: 22px; }
#screen-career-hub .career-history-card { position: relative; overflow: hidden; border-radius: 9px; }
#screen-career-hub .career-history-card::after { content: '✦'; position: absolute; right: 10px; bottom: -8px; color: #ef5b2526; font-size: 3rem; }
#screen-career-hub .career-achievement { min-height: 102px; transition: transform .16s, box-shadow .16s; }
#screen-career-hub .career-achievement:hover { transform: translateY(-2px); box-shadow: 0 6px 15px #21415512; }
#screen-career-hub .career-achievement-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #e8eef1; }
#screen-career-hub .career-achievement.unlocked .career-achievement-mark { background: #ffedc8; }

@media (max-width: 820px) {
    #screen-career-hub .career-player-spotlight { grid-template-columns: 76px minmax(0, 1fr) auto; }
    #screen-career-hub .career-radar { display: none; }
    #screen-career-hub .career-team-showcase { grid-template-columns: 70px minmax(0, 1fr) auto; }
    #screen-career-hub .career-tactics-board { display: none; }
    #screen-career-hub .career-team-honors { grid-column: 2 / -1; text-align: left; }
    #screen-career-hub .career-training-hero { grid-template-columns: 1fr 145px; }
    #screen-career-hub .career-training-coach { display: none; }
}
@media (max-width: 620px) {
    #screen-career-hub .career-honor-shelf,
    #screen-career-hub .career-history-hero { grid-template-columns: 1fr; }
    #screen-career-hub .career-trophy-wall, #screen-career-hub .career-history-trophy-wall { min-height: 132px; }
    #screen-career-hub .career-trophy-wall img, #screen-career-hub .career-history-trophy-wall img { min-height: 132px; }
    #screen-career-hub .career-competition-banner { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 15px; }
    #screen-career-hub .career-competition-banner img { width: 52px; height: 52px; }
    #screen-career-hub .career-competition-season { grid-column: 2; justify-self: start; padding: 7px 0 0; border-left: 0; border-top: 1px solid #ffffff35; }
    #screen-career-hub .career-player-spotlight { grid-template-columns: 62px minmax(0, 1fr); padding: 17px; gap: 12px; }
    #screen-career-hub .career-player-portrait { width: 60px; height: 74px; font-size: 2rem; }
    #screen-career-hub .career-overall-badge { grid-column: 2; justify-self: start; }
    #screen-career-hub .career-team-showcase { grid-template-columns: 62px minmax(0, 1fr); padding: 17px; }
    #screen-career-hub .career-team-showcase-crest { width: 58px; height: 64px; }
    #screen-career-hub .career-team-honors { grid-column: 1 / -1; }
    #screen-career-hub .career-agent-hero { grid-template-columns: 60px minmax(0, 1fr); padding: 15px; }
    #screen-career-hub .career-agent-hero img { width: 56px; height: 62px; }
    #screen-career-hub .career-agent-trust { grid-column: 2; }
    #screen-career-hub .career-development-hero { grid-template-columns: 60px minmax(0, 1fr) auto; padding: 16px; }
    #screen-career-hub .career-development-avatar { width: 56px; height: 66px; font-size: 1.8rem; }
    #screen-career-hub .career-skillpoints-badge { grid-column: 2; justify-self: start; }
    #screen-career-hub .career-training-hero { grid-template-columns: 1fr; min-height: 0; padding: 18px; }
    #screen-career-hub .career-training-energy { max-width: 180px; }
    #screen-career-hub .career-history-hero > div:first-child { padding: 20px 18px 16px; }
    #screen-career-hub .career-history-trophy-wall { margin-left: 0; }
    #screen-career-hub .career-trophy-cabinet { grid-template-columns: repeat(3, minmax(70px, 1fr)); min-height: 210px; }
}

/* ==========================================================================
   CAREER ART PASS — generated disc-world scenes and interaction affordances
   ========================================================================== */

#screen-career-hub .career-story-hero { min-height: 292px; padding: 32px 34px; }
#screen-career-hub .career-story-hero > div { width: 59%; }
#screen-career-hub .career-hero-art { width: 78%; opacity: .88; object-position: 66% center; mask-image: linear-gradient(to right, transparent 0%, #000 28%, #000 100%); }
#screen-career-hub .career-story-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #102d43 0%, #102d43e8 30%, transparent 70%); }
#screen-career-hub .career-story-hero > div, #screen-career-hub .career-hero-wordmark { z-index: 3; }
#screen-career-hub .career-hero-action,
#screen-career-hub .career-spotlight-action {
    appearance: none; border: 1px solid #ff865f88; border-radius: 7px; cursor: pointer; color: #fff;
    background: #ff6a35; font: 800 .63rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase;
    padding: 10px 13px; margin-top: 19px; box-shadow: 0 7px 15px #091b2c35; transition: transform .16s, background .16s, box-shadow .16s;
}
#screen-career-hub .career-hero-action:hover,
#screen-career-hub .career-spotlight-action:hover { transform: translateY(-2px); background: #ff8457; box-shadow: 0 10px 20px #091b2c4d; }
#screen-career-hub .career-hero-action span,
#screen-career-hub .career-spotlight-action span { margin-left: 8px; font-size: .9rem; }
#screen-career-hub .career-honor-shelf { min-height: 244px; }
#screen-career-hub .career-trophy-wall, #screen-career-hub .career-trophy-wall img { min-height: 244px; }
#screen-career-hub .career-honor-copy { padding: 30px; }

#screen-career-hub .career-competition-banner { min-height: 210px; grid-template-columns: 74px minmax(0, 1fr) auto; }
#screen-career-hub .career-competition-banner > *:not(.career-competition-art) { position: relative; z-index: 2; }
#screen-career-hub .career-competition-banner .career-competition-art {
    display: block; position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 58%; opacity: .78; filter: saturate(.95);
}
#screen-career-hub .career-competition-banner::before { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #122a4ce8 0%, #17254ccc 38%, #171b3c50 72%, #171b3c99); pointer-events: none; }
#screen-career-hub .career-competition-banner > img:not(.career-competition-art) { width: 66px; height: 66px; object-fit: contain; }

#screen-career-hub .career-player-spotlight { min-height: 246px; grid-template-columns: 86px minmax(0, 1fr) auto; }
#screen-career-hub .career-player-spotlight::before { z-index: 1; background: linear-gradient(110deg, #24153fdd, #162746bf 62%, #102e4b99); }
#screen-career-hub .career-player-art { display: block; position: absolute; z-index: 0; right: 0; top: 0; width: 56%; height: 100%; overflow: hidden; }
#screen-career-hub .career-player-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #251740 0%, transparent 45%, #10274633); }
#screen-career-hub .career-player-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 75% center; opacity: .92; }
#screen-career-hub .career-player-spotlight > :not(.career-player-art) { position: relative; z-index: 2; }
#screen-career-hub .career-player-spotlight .career-radar { position: absolute; z-index: 3; right: 28px; top: 42px; width: 122px; height: 122px; }
#screen-career-hub .career-player-spotlight .career-spotlight-action { position: absolute; z-index: 4; right: 27px; bottom: 23px; margin: 0; background: #152944df; }
#screen-career-hub .career-player-spotlight .career-spotlight-action:hover { background: #ff6a35; }

#screen-career-hub .career-team-showcase { min-height: 238px; grid-template-columns: 74px minmax(0, 1fr) 184px auto; }
#screen-career-hub .career-team-showcase > :not(.career-team-showcase-art) { position: relative; z-index: 2; }
#screen-career-hub .career-team-showcase-art,
#screen-career-hub .career-agent-art,
#screen-career-hub .career-development-art,
#screen-career-hub .career-training-art,
#screen-career-hub .career-history-art { display: block; position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#screen-career-hub .career-team-showcase-art { object-position: center 52%; opacity: .76; }
#screen-career-hub .career-team-showcase::after { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #102d43ef 0%, #133549dd 48%, #173a47a8 75%, #173a4740); pointer-events: none; }

#screen-career-hub .career-agent-hero { min-height: 216px; }
#screen-career-hub .career-agent-hero > :not(.career-agent-art) { position: relative; z-index: 2; }
#screen-career-hub .career-agent-art { object-position: center 60%; opacity: .67; }
#screen-career-hub .career-agent-hero > img.career-agent-art { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; object-position: center 60%; border-radius: 0; z-index: 0; }
#screen-career-hub .career-agent-hero::before { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #122b48ef 0%, #1d2452dc 48%, #29245982 100%); }

#screen-career-hub .career-development-hero { min-height: 208px; }
#screen-career-hub .career-development-hero > :not(.career-development-art) { position: relative; z-index: 2; }
#screen-career-hub .career-development-art { object-position: 73% center; opacity: .62; }
#screen-career-hub .career-development-hero::after { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #142e4beb 0%, #173f4bcc 48%, #194d4a67 100%); pointer-events: none; }

#screen-career-hub .career-training-hero { min-height: 228px; }
#screen-career-hub .career-training-hero > :not(.career-training-art) { position: relative; z-index: 2; }
#screen-career-hub .career-training-art { object-position: center 62%; opacity: .62; }
#screen-career-hub .career-training-hero::before { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #13344af2 0%, #173b48dc 47%, #173b4875 100%); pointer-events: none; }
#screen-career-hub .career-training-card { min-height: 224px; background-image: linear-gradient(110deg, #ffffffef, #ffffffcf); }
#screen-career-hub .career-training-card:hover { background-image: linear-gradient(110deg, #fffaf4, #ffffffda); }

#screen-career-hub .career-history-hero { min-height: 246px; position: relative; }
#screen-career-hub .career-history-hero > :not(.career-history-art) { position: relative; z-index: 2; }
#screen-career-hub .career-history-hero > div:first-child { width: 54%; min-height: 246px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(90deg, #12263af5 0%, #12263add 65%, transparent); }
#screen-career-hub .career-history-art { object-position: center 48%; opacity: .88; }
#screen-career-hub .career-history-hero::after { content: ''; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, transparent 20%, #12263a36 58%, #12263a08 100%); pointer-events: none; }

@media (max-width: 820px) {
    #screen-career-hub .career-story-hero { min-height: 300px; }
    #screen-career-hub .career-story-hero > div { width: 78%; }
    #screen-career-hub .career-player-art { width: 72%; }
    #screen-career-hub .career-team-showcase { min-height: 230px; }
}
@media (max-width: 620px) {
    #screen-career-hub .career-story-hero { min-height: 330px; padding: 24px 18px; }
    #screen-career-hub .career-story-hero > div { width: 100%; }
    #screen-career-hub .career-hero-art { width: 100%; opacity: .5; mask-image: linear-gradient(to right, transparent, #000 38%); }
    #screen-career-hub .career-honor-shelf { min-height: 0; }
    #screen-career-hub .career-trophy-wall, #screen-career-hub .career-trophy-wall img { min-height: 160px; }
    #screen-career-hub .career-competition-banner { min-height: 260px; }
    #screen-career-hub .career-player-spotlight { min-height: 310px; }
    #screen-career-hub .career-player-art { width: 100%; opacity: .4; }
    #screen-career-hub .career-player-spotlight .career-radar { right: 18px; top: 24px; }
    #screen-career-hub .career-player-spotlight .career-spotlight-action { right: 18px; bottom: 18px; }
    #screen-career-hub .career-team-showcase { min-height: 280px; }
    #screen-career-hub .career-history-hero > div:first-child { width: 100%; min-height: 220px; background: linear-gradient(90deg, #12263af7, #12263abf); }
}

/* ============================================================================
   MENU POLISH — shared header logo + refreshed career setup
   ========================================================================== */

.app-header .js-home-logo,
.home-brand {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.app-header .js-home-logo {
    color: inherit;
    text-align: left;
    background: transparent;
}

.app-header .js-home-logo:focus-visible,
.home-brand:focus-visible {
    outline: 3px solid #ff6e34;
    outline-offset: 3px;
}

/* The top logo uses one locked box on setup, tournaments, settings and
   career screens so the navigation never shifts between tabs. */
body:not(.home-view) .app-header .js-home-logo {
    width: 214px;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
}

body:not(.home-view) .app-header .brand-logo-mark {
    width: 54px;
    height: 34px;
    display: block;
    flex: 0 0 54px;
    overflow: hidden;
}

body:not(.home-view) .app-header .brand-logo-mark .brand-logo-img {
    display: block;
    width: 58px;
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: center top;
    transform: translate(-2px, -1px);
    clip-path: inset(0 0 20% 0);
}

body:not(.home-view) .app-header .setup-wordmark {
    display: block;
    color: var(--fuzzbol-navy);
    font: 900 1.42rem/1 var(--font-display);
    letter-spacing: .015em;
}

body:has(#screen-career-setup.active) {
    background-color: #edf2f4;
    background-image:
        linear-gradient(90deg, rgba(237, 242, 244, .84), rgba(237, 242, 244, .6) 50%, rgba(237, 242, 244, .82)),
        url('assets/menu_background.webp');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

body:has(#screen-career-setup.active) #app-container {
    max-width: 1810px;
    padding: 18px 28px 26px;
}

body:has(#screen-career-setup.active) .app-header {
    position: relative;
    min-height: 64px;
    margin-bottom: 24px;
    padding: 8px 20px;
    border-left: 4px solid var(--fuzzbol-orange);
    border-radius: 9px;
    background: rgba(255, 255, 255, .96);
}

#screen-career-setup.active {
    width: 100%;
    max-width: 1660px;
    padding: 0;
    align-items: stretch;
}

#screen-career-setup .career-setup-card {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 142px);
    margin: 0;
    padding: 28px 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(410px, .92fr);
    gap: 26px;
    align-items: stretch;
    border-radius: 10px;
    background: rgba(255, 255, 255, .97);
    color: var(--fuzzbol-navy);
    box-shadow: 0 12px 28px rgba(25, 43, 58, .09);
}

#screen-career-setup .career-setup-story,
#screen-career-setup .career-setup-form { min-width: 0; }

#screen-career-setup .career-setup-story {
    display: flex;
    flex-direction: column;
}

#screen-career-setup .career-setup-header {
    padding: 0;
    margin: 0 0 18px;
    border: 0;
}

.career-setup-kicker {
    display: block;
    color: var(--fuzzbol-orange);
    font: 900 .68rem/1.1 var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
}

#screen-career-setup .career-setup-header .card-title {
    margin-top: 6px;
    color: var(--fuzzbol-navy);
    font-size: clamp(2.2rem, 3.4vw, 3.35rem);
    line-height: .92;
}

#screen-career-setup .career-setup-header .form-desc {
    max-width: 660px;
    margin-top: 10px;
    color: var(--fuzzbol-muted);
    font-size: .9rem;
    line-height: 1.55;
}

#screen-career-setup .career-setup-intro {
    flex: 1 1 auto;
    min-height: 340px;
    margin: 0;
    padding: 34px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(100deg, rgba(16, 45, 67, .97) 20%, rgba(16, 45, 67, .58)), url('assets/stadium-photo-monumental.webp') center / cover;
}

#screen-career-setup .career-setup-intro h3 {
    max-width: 620px;
    margin: 12px 0;
    color: #fff;
    font-size: clamp(2.55rem, 4.4vw, 4.4rem);
    line-height: .92;
}

#screen-career-setup .career-setup-intro p {
    max-width: 520px;
    color: #d1e0e9;
    font-size: .9rem;
    line-height: 1.55;
}

#screen-career-setup .career-setup-journey {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #dfe6e9;
    border-radius: 9px;
    background: #fff;
}

#screen-career-setup .career-setup-journey > div {
    min-width: 0;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 9px;
    align-items: center;
}

#screen-career-setup .career-setup-journey > div + div { border-left: 1px solid #dfe6e9; }
.journey-icon { grid-row: 1 / span 2; color: var(--fuzzbol-orange); font-size: 1.4rem; line-height: 1; }
#screen-career-setup .career-setup-journey strong {
    color: var(--fuzzbol-navy);
    font: 900 .66rem/1.2 var(--font-mono);
    letter-spacing: .03em;
}
#screen-career-setup .career-setup-journey small { color: var(--fuzzbol-muted); font-size: .64rem; line-height: 1.35; }

#screen-career-setup .career-setup-form {
    padding-left: 26px;
    border-left: 1px solid #e0e6e9;
    display: flex;
    flex-direction: column;
}

.career-setup-form-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.career-form-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--fuzzbol-navy);
    font-size: .75rem;
}

.career-setup-form-heading h3 {
    margin-top: 3px;
    color: var(--fuzzbol-navy);
    font: 900 1.55rem/1 var(--font-display);
    text-transform: uppercase;
}

#screen-career-setup .career-setup-fields { gap: 15px; }
#screen-career-setup .career-setup-fields .form-field { gap: 7px; margin: 0; }
#screen-career-setup .career-setup-fields .form-field label { color: var(--fuzzbol-navy); font-size: .7rem; }
#screen-career-setup .career-setup-fields .geometric-select {
    min-height: 46px;
    padding: 10px 14px;
    border-color: #cfd9de;
    border-radius: 7px;
    color: var(--fuzzbol-navy);
    background: #fff;
    font-size: .88rem;
}

#screen-career-setup .career-setup-fields input.geometric-select::placeholder { color: #99a7b0; opacity: 1; }
#screen-career-setup #career-emoji-picker { margin: 0; padding: 3px; background: #eef2f4; border-color: #d9e0e4; }
#screen-career-setup #career-emoji-picker .btn-mode { min-height: 37px; color: var(--fuzzbol-muted); }
#screen-career-setup #career-emoji-picker .btn-mode.active { background: var(--fuzzbol-orange); color: #fff; box-shadow: 0 4px 10px rgba(255, 75, 24, .2); }

#screen-career-setup .career-setup-note {
    margin: auto 0 0;
    padding-top: 20px;
    color: var(--fuzzbol-muted);
    font-size: .72rem;
    line-height: 1.55;
}

#screen-career-setup .career-setup-actions {
    gap: 12px;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid #e0e6e9;
}

#screen-career-setup .career-setup-actions .btn-secondary,
#screen-career-setup .career-setup-actions .btn-primary-start { min-height: 50px; border-radius: 7px; font-size: .82rem; }
#screen-career-setup .career-setup-actions .btn-primary-start { background: var(--fuzzbol-orange); color: #fff; box-shadow: 0 9px 18px rgba(255, 75, 24, .17); }
#screen-career-setup .career-setup-actions .btn-primary-start:hover { background: #e94313; }

@media (max-width: 980px) {
    #screen-career-setup .career-setup-card { grid-template-columns: 1fr; min-height: 0; }
    #screen-career-setup .career-setup-form { padding: 24px 0 0; border-top: 1px solid #e0e6e9; border-left: 0; }
}

@media (max-width: 620px) {
    body:has(#screen-career-setup.active) #app-container { padding: 10px 14px 22px; }
    body:has(#screen-career-setup.active) .app-header { margin-bottom: 14px; padding: 8px 12px; }
    body:not(.home-view) .app-header .js-home-logo { width: auto; margin-right: auto; }
    body:not(.home-view) .app-header .setup-wordmark { font-size: 1.22rem; }
    #screen-career-setup .career-setup-card { padding: 20px 16px; gap: 20px; }
    #screen-career-setup .career-setup-intro { min-height: 310px; padding: 24px 20px; }
    #screen-career-setup .career-setup-intro h3 { font-size: 2.55rem; }
    #screen-career-setup .career-setup-journey { grid-template-columns: 1fr; }
    #screen-career-setup .career-setup-journey > div + div { border-top: 1px solid #dfe6e9; border-left: 0; }
    #screen-career-setup .career-setup-actions { flex-direction: column; }
    #screen-career-setup .career-setup-actions .btn-secondary,
    #screen-career-setup .career-setup-actions .btn-primary-start { width: 100%; flex: 1; }
}

/* FINAL POLISH: editorial type, quicker career access and disc-first player art */
:root {
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

#screen-career-hub .career-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

#screen-career-hub .career-hero-action { margin-top: 0; }

#screen-career-hub .career-player-portrait,
#screen-career-hub .career-development-avatar {
    width: 94px;
    height: 94px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    font-size: 0;
}

#screen-career-hub .career-player-portrait img,
#screen-career-hub .career-development-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(5, 13, 26, .34));
}

#screen-career-hub .career-squad-avatar-slot.has-image .team-avatar-image {
    object-fit: contain;
    padding: 2px;
    filter: drop-shadow(0 6px 8px rgba(5, 13, 26, .22));
}

#screen-career-hub .career-squad-avatar-slot { border-radius: 50%; }
#screen-career-hub .career-squad-avatar-slot.has-image { background: #edf4f7; }

.brand-logo-img,
.profile-shield,
.profile-action-mark { background: transparent !important; }

#screen-career-hub .career-workspace,
#screen-career-hub button,
#screen-career-hub input,
#screen-career-hub select { font-family: var(--font-body); }

#screen-career-hub .career-workspace-header h2,
#screen-career-hub .career-section-heading h3,
#screen-career-hub .career-competition-banner h3,
#screen-career-hub .career-team-showcase h3,
#screen-career-hub .career-agent-hero h3,
#screen-career-hub .career-development-hero h3,
#screen-career-hub .career-training-hero h3,
#screen-career-hub .career-history-hero h3 {
    letter-spacing: .015em;
}

@media (max-width: 620px) {
    #screen-career-hub .career-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    #screen-career-hub .career-hero-action {
        width: 100%;
        justify-content: center;
    }

    #screen-career-hub .career-player-portrait,
    #screen-career-hub .career-development-avatar {
        width: 74px;
        height: 74px;
    }
}

/* SETTINGS REFRESH — compact two-column layout inspired by the generated
   settings concept. Keep every control live while eliminating the oversized
   empty card area on desktop. */
#screen-settings.active {
    width: 100%;
    max-width: 1240px;
    min-height: 0;
    align-items: stretch;
    padding-bottom: 0;
}

#screen-settings.active .settings-page-card {
    width: 100%;
    max-width: 1240px;
    min-height: 0;
    margin-top: 0;
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-areas:
        "header header"
        "rules diagnostics"
        "ball diagnostics"
        "controls diagnostics"
        "danger diagnostics"
        "footer footer";
    gap: 16px 18px;
    align-items: start;
}

#screen-settings.active .form-header {
    grid-area: header;
    margin-bottom: 0;
    padding: 0 0 14px;
    border-color: var(--fuzzbol-line);
}

#screen-settings.active .settings-section {
    margin-bottom: 0;
    padding: 15px;
    border: 1px solid var(--fuzzbol-line);
    border-radius: 12px;
    background: #fff;
}

#screen-settings.active .settings-section-rules { grid-area: rules; }
#screen-settings.active .settings-section-ball { grid-area: ball; }
#screen-settings.active .settings-section-controls { grid-area: controls; }
#screen-settings.active .settings-section-danger { grid-area: danger; }

#screen-settings.active .settings-section-head {
    margin-bottom: 10px;
}

#screen-settings.active .settings-section-head h3 {
    font-size: .94rem;
}

#screen-settings.active .settings-section-head p {
    font-size: .72rem;
}

#screen-settings.active .settings-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

#screen-settings.active .settings-grid {
    gap: 8px;
}

#screen-settings.active .setting-row {
    min-height: 52px;
    padding: 10px 12px;
    gap: 12px;
}

#screen-settings.active .setting-name { font-size: .78rem; }
#screen-settings.active .setting-help { font-size: .67rem; line-height: 1.35; }
#screen-settings.active .setting-row select { min-width: 165px; padding: 8px 10px; font-size: .73rem; }

#screen-settings.active .settings-diagnostics {
    grid-area: diagnostics;
    align-self: stretch;
    margin-top: 0;
    padding: 15px;
    background: #f7f9fa;
}

#screen-settings.active .diagnostics-heading {
    margin-bottom: 11px;
}

#screen-settings.active .diagnostics-heading p {
    font-size: .7rem;
    line-height: 1.4;
}

#screen-settings.active .diagnostics-grid,
#screen-settings.active .diagnostics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#screen-settings.active .diagnostics-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
}

#screen-settings.active .diagnostics-actions .btn-secondary {
    width: 100%;
}

#screen-settings.active .form-actions {
    grid-area: footer;
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px solid var(--fuzzbol-line);
}

#screen-settings.active .form-actions .btn-secondary {
    min-height: 42px;
}

/* The logo is a transparent asset; no wrapper should paint a gray disc or
   blend it against the page. Keep the same dimensions across every tab. */
.app-header .js-home-logo,
.app-header .brand-logo-mark,
.app-header .brand-logo-img,
.home-brand,
.home-brand img,
.profile-shield,
.profile-action-mark,
.profile-shield img,
.profile-action-mark img {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    mix-blend-mode: normal !important;
}

.app-header .brand-logo-mark,
.app-header .brand-logo-img {
    border: 0 !important;
}

/* One locked logo box for setup, tournaments, career, LAN and settings. */
body:not(.home-view) .app-header .js-home-logo {
    width: 214px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 0 !important;
}

body:not(.home-view) .app-header .brand-logo-mark {
    width: 54px !important;
    height: 34px !important;
    flex: 0 0 54px !important;
    overflow: hidden !important;
}

body:not(.home-view) .app-header .brand-logo-mark .brand-logo-img {
    width: 58px !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center top !important;
    transform: translate(-2px, -1px) !important;
    clip-path: inset(0 0 20% 0) !important;
}

@media (max-width: 900px) {
    #screen-settings.active .settings-page-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "rules"
            "ball"
            "controls"
            "danger"
            "diagnostics"
            "footer";
    }
}

@media (max-width: 620px) {
    #screen-settings.active .settings-page-card {
        padding: 14px;
        gap: 12px;
    }

    #screen-settings.active .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

    #screen-settings.active .setting-row select,
    #screen-settings.active .toggle-switch,
    #screen-settings.active .setting-row-danger button {
        width: 100%;
    }
}

/* GLOBAL PRE-MATCH NAV — the same route bar stays available on career,
   settings, LAN and tournament screens, not only on the setup screen. */
body:not(.home-view):not(.match-view) .match-nav {
    display: flex !important;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
    margin-left: 8px;
}

#screen-tournament-setup .competition-mode-grid {
    grid-template-columns: minmax(0, 1fr);
}

/* Let the setup cards end after their real content instead of stretching to
   the viewport height and producing a white dead zone below the CTA. */
#screen-setup.match-setup-screen .match-setup-shell {
    min-height: 0;
    align-items: start;
}

#screen-setup.match-setup-screen .match-setup-shell > .glass-card {
    height: auto;
}

#screen-setup.match-setup-screen .setup-actions {
    margin-top: 18px;
}

@media (max-width: 1120px) {
    body:not(.home-view):not(.match-view) .app-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    body:not(.home-view):not(.match-view) .match-nav {
        order: 3;
        width: 100%;
        min-height: 33px;
        justify-content: center;
        margin: 0;
        border-top: 1px solid #e7ecee;
    }
}

@media (max-width: 760px) {
    body:not(.home-view):not(.match-view) #app-container {
        padding: 10px 14px 22px;
    }

    body:not(.home-view):not(.match-view) .app-header {
        margin-bottom: 14px;
        padding: 8px 12px;
    }

    body:not(.home-view):not(.match-view) .header-actions {
        gap: 4px;
    }

    body:not(.home-view):not(.match-view) .btn-icon {
        min-width: 38px;
        padding: 7px 9px;
    }

    body:not(.home-view):not(.match-view) .btn-text {
        display: none;
    }

    .match-nav-item {
        padding-inline: 9px;
        font-size: .62rem;
    }
}

/* ==========================================================================
   CAREER BROADCAST BAR & POST-MATCH SUMMARY
   ========================================================================== */

.career-broadcast-bar {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translate(-50%, calc(100% + 40px));
    max-width: 680px;
    width: min(680px, calc(100% - 28px));
    background: rgba(10, 16, 28, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(238, 196, 83, 0.45) !important;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 24px rgba(238, 196, 83, 0.16);
    padding: 11px 18px;
    pointer-events: none;
    z-index: 60;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    box-sizing: border-box;
    color: #ffffff !important;
}

.career-broadcast-bar.active {
    transform: translate(-50%, 0);
    opacity: 1;
}

.career-broadcast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-family: var(--font-mono, monospace);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
}

.career-broadcast-badge {
    color: #facc15 !important;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.career-broadcast-badge::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
}

.career-broadcast-comp,
#career-broadcast-comp {
    color: #cbd5e1 !important;
    font-weight: 700;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.career-broadcast-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 9px;
}

.career-broadcast-teams {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.career-broadcast-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.career-broadcast-team strong,
#career-broadcast-home-name,
#career-broadcast-away-name {
    color: #ffffff !important;
    font-size: 0.92rem;
    font-weight: 850;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.career-broadcast-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.career-broadcast-logo svg,
.career-broadcast-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.career-broadcast-vs {
    color: #facc15 !important;
    font-family: var(--font-mono, monospace);
    font-weight: 900;
    font-size: 0.72rem;
    padding: 2px 6px;
    background: rgba(250, 204, 21, 0.12);
    border-radius: 4px;
    border: 1px solid rgba(250, 204, 21, 0.25);
    flex-shrink: 0;
}

.career-broadcast-player {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
    gap: 2px;
}

.career-broadcast-star {
    color: #facc15 !important;
    font-size: 0.62rem;
    font-family: var(--font-mono, monospace);
    font-weight: 900;
    letter-spacing: 0.1em;
}

.career-broadcast-player strong,
#career-broadcast-player-name {
    color: #ffffff !important;
    font-size: 0.86rem;
    font-weight: 850;
    white-space: nowrap;
}

.career-broadcast-player-meta,
#career-broadcast-player-meta {
    color: #cbd5e1 !important;
    font-size: 0.70rem;
    font-family: var(--font-mono, monospace);
    font-weight: 600;
    white-space: nowrap;
}

/* Career Post-Match Card */
.career-postmatch-card {
    margin: 14px 0 16px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.045);
    border: 1px solid var(--fuzzbol-line, rgba(19, 40, 60, 0.15));
    border-radius: 8px;
    text-align: left;
}

.career-pm-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.career-pm-rating-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.05);
    border: 2px solid var(--rating-accent, var(--accent-gold));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.career-pm-rating-num {
    color: var(--fuzzbol-navy, #0f172a);
    font-family: var(--font-mono, monospace);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.career-pm-rating-label {
    color: var(--fuzzbol-muted, #64748b);
    font-family: var(--font-mono, monospace);
    font-size: 0.52rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    margin-top: 3px;
    text-align: center;
    white-space: nowrap;
}

.career-pm-meta {
    min-width: 0;
    flex: 1;
}

.career-pm-player {
    display: block;
    color: var(--fuzzbol-muted, #64748b);
    font-family: var(--font-mono, monospace);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.career-pm-headline {
    margin: 3px 0 0;
    color: var(--fuzzbol-navy, #0f172a);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.38;
    font-style: italic;
}

.career-pm-progress-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--fuzzbol-line, rgba(19, 40, 60, 0.12));
}

.career-pm-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono, monospace);
    font-size: 0.68rem;
    color: var(--fuzzbol-muted, #64748b);
    font-weight: 700;
    margin-bottom: 5px;
}

.career-pm-xp-gained {
    color: #b48312;
    font-weight: 900;
    font-size: 0.74rem;
}

.career-pm-levelup {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 6px;
    color: #854d0e;
    font-size: 0.74rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.career-pm-levelup span {
    font-weight: 900;
    letter-spacing: 0.06em;
}

.career-pm-levelup strong {
    font-weight: 700;
}

/* Slower, easier fill than the hub's live XP bar — this one is a reveal
   moment, not a constantly-updating readout. */
.career-postmatch-card .xp-bar-fill { transition: width 0.9s cubic-bezier(0.16, 0.84, 0.44, 1); }

#modal-gameover.active .career-pm-levelup {
    animation: careerLevelUpPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.6s;
}

@keyframes careerLevelUpPop {
    0% { opacity: 0; transform: scale(0.85) translateY(6px); }
    60% { opacity: 1; transform: scale(1.03) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 600px) {
    .career-broadcast-bar {
        bottom: 12px;
        padding: 8px 12px;
    }
    .career-broadcast-player {
        display: none;
    }
    .career-pm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* --------------------------------------------------------------------------
   MATCH PREVIEW POLISH — full stadium art, stronger CTA, and readable rain
   -------------------------------------------------------------------------- */

@media (min-width: 901px) {
    .match-setup-card .setup-card-body {
        display: flex;
        flex-direction: column;
    }

    .match-setup-card .setup-carousel {
        position: relative;
        display: block;
        min-height: 214px;
        padding: 0;
        overflow: hidden;
        border-radius: 11px;
        background: #102d43;
    }

    .match-setup-card .setup-carousel img {
        display: block;
        width: 100%;
        height: 214px;
        border-radius: 0;
        object-fit: cover;
        object-position: center;
    }

    .match-setup-card .setup-carousel > div {
        position: absolute;
        z-index: 2;
        right: 0;
        bottom: 0;
        left: 0;
        padding: 34px 18px 14px;
        color: #fff;
        background: linear-gradient(180deg, transparent, rgba(6, 20, 34, .9));
    }

    .match-setup-card .setup-carousel strong { color: #fff; font-size: .9rem; }
    .match-setup-card .setup-carousel span { color: rgba(255, 255, 255, .72); font-size: .58rem; }
    .match-setup-card .setup-carousel .setup-stadium-players { color: #ff8b68; }
    .match-setup-card .setup-carousel i { margin-top: 7px; }
    .match-setup-card .setup-carousel i b { background: rgba(255, 255, 255, .38); }
    .match-setup-card .setup-carousel i b:first-child { background: var(--fuzzbol-orange); }
    .match-setup-card .setup-carousel > button {
        position: absolute;
        z-index: 3;
        top: 50%;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(255, 255, 255, .62);
        border-radius: 50%;
        color: #fff;
        background: rgba(6, 22, 36, .55);
        transform: translateY(-50%);
    }
    .match-setup-card .setup-carousel > button:first-child { left: 10px; }
    .match-setup-card .setup-carousel > button:last-child { right: 10px; }
    .match-setup-card .setup-carousel > button:hover { background: var(--fuzzbol-orange); }

    .match-setup-card #home-play-match {
        min-height: 104px;
        margin-top: auto;
        border-radius: 13px;
        font-size: 1.08rem;
        letter-spacing: .04em;
        box-shadow: 0 14px 28px rgba(244, 81, 32, .26);
    }
    .match-setup-card #home-play-match span { font-size: 1.65rem; }
}

/* The tactical map is a real visual panel, not a thumbnail squeezed beside
   copy. The stadium photo above it remains the hero image. */
.match-setup-screen .setup-stadium-mapline {
    grid-template-columns: 1fr;
    gap: 11px;
}
.match-setup-screen .setup-stadium-mapline .setup-stadium-thumb {
    width: 100%;
    height: 118px;
    object-fit: cover;
}

/* Rain in the setup card: dark wet material plus animated diagonal drops. */
.setup-stadium-photo-frame.is-rainy .setup-stadium-photo {
    filter: saturate(.72) brightness(.76) contrast(1.08);
}
.setup-stadium-photo-frame.is-rainy::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(108deg, transparent 0 22px, rgba(219, 241, 255, .45) 23px 24px, transparent 25px 43px),
        linear-gradient(180deg, rgba(18, 49, 69, .16), rgba(3, 22, 35, .42));
    background-size: 46px 70px, 100% 100%;
    animation: fuzzbol-setup-rain .58s linear infinite;
}
.setup-stadium-photo-frame.is-rainy .stadium-wet-gloss {
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(210, 242, 255, .22), transparent 26%, transparent 66%, rgba(105, 187, 218, .18));
    mix-blend-mode: screen;
}

/* Rain in the landing simulation preview. */
.mini-pitch[data-home-weather="rain"] {
    background-image:
        linear-gradient(135deg, rgba(210, 242, 255, .15), transparent 18%, transparent 54%, rgba(95, 172, 202, .18)),
        linear-gradient(180deg, rgba(22, 61, 80, .2), rgba(3, 27, 39, .34)),
        var(--preview-texture, url('assets/texture-classic-checkered.webp'));
    background-size: 100% 100%, 100% 100%, 420px 420px;
}
.mini-pitch[data-home-weather="rain"]::before {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(108deg, transparent 0 18px, rgba(218, 242, 255, .48) 19px 20px, transparent 21px 36px),
        linear-gradient(180deg, rgba(22, 62, 83, .14), rgba(4, 25, 38, .18));
    background-size: 42px 66px, 100% 100%;
    animation: fuzzbol-preview-rain .52s linear infinite;
}
.mini-pitch[data-home-weather="rain"]::after {
    background: radial-gradient(circle at 50% 44%, transparent 0 11%, rgba(20, 64, 79, .12) 45%, rgba(3, 25, 38, .48) 100%);
}

@keyframes fuzzbol-setup-rain {
    to { background-position: 46px 70px, 0 0; }
}
@keyframes fuzzbol-preview-rain {
    to { background-position: 42px 66px, 0 0; }
}

@media (max-width: 900px) {
    .match-setup-card .setup-carousel {
        position: relative;
        display: block;
        min-height: 174px;
        padding: 0;
        overflow: hidden;
        border-radius: 10px;
    }
    .match-setup-card .setup-carousel img { width: 100%; height: 174px; border-radius: 0; }
    .match-setup-card .setup-carousel > div {
        position: absolute;
        z-index: 2;
        right: 0;
        bottom: 0;
        left: 0;
        padding: 28px 14px 12px;
        color: #fff;
        background: linear-gradient(180deg, transparent, rgba(6, 20, 34, .92));
    }
    .match-setup-card .setup-carousel strong { color: #fff; }
    .match-setup-card .setup-carousel span { color: rgba(255, 255, 255, .72); }
    .match-setup-card .setup-carousel .setup-stadium-players { color: #ff8b68; }
    .match-setup-card .setup-carousel > button {
        position: absolute;
        z-index: 3;
        top: 50%;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        color: #fff;
        background: rgba(6, 22, 36, .55);
        transform: translateY(-50%);
    }
    .match-setup-card .setup-carousel > button:first-child { left: 8px; }
    .match-setup-card .setup-carousel > button:last-child { right: 8px; }
    .match-setup-card #home-play-match { min-height: 82px; margin-top: auto; font-size: .98rem; }
}

/* Keep the enlarged CTA in the first viewport on desktop while the stadium
   photo remains full-width. The values scale with the available viewport. */
@media (min-width: 901px) and (min-height: 650px) {
    .home-content { grid-template-rows: 82px minmax(0, 1fr) 112px 42px; }
    .match-setup-card .setup-carousel,
    .match-setup-card .setup-carousel img {
        min-height: clamp(144px, 19vh, 160px);
        height: clamp(144px, 19vh, 160px);
    }
    .match-setup-card .weather-row { min-height: clamp(56px, 7.5vh, 66px); }
    .match-setup-card #home-play-match {
        min-height: clamp(74px, 9.5vh, 84px);
    }
}
