
        :root {
            --primary-color: #2c3e50; --accent-green: #27ae60; --accent-red: #c0392b;
            --text-color: #ecf0f1; --bg-color: #1a1a2e; --panel-bg: #16213e; --border-color: #0f3460;
        }

        body {
            margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg-color); color: var(--text-color);
            display: flex; flex-direction: column; align-items: center; min-height: 100vh;
            overflow-x: hidden; /* <--- Ta linijka usuwa dolny pasek przewijania */
        }

        header {
            width: 100%; background-color: var(--primary-color); padding: 15px 30px;
            display: flex; justify-content: space-between; align-items: center;
            box-sizing: border-box; border-bottom: 4px solid var(--accent-red);
        }

        .logo-container { display: flex; align-items: center; gap: 15px; }
        #game-logo { max-height: 85px; object-fit: contain; }
        #game-title { margin: 0; color: var(--accent-green); text-transform: uppercase; letter-spacing: 2px; font-size: 26px; text-shadow: 1px 1px 4px rgba(0,0,0,0.6); }

        .language-selector button {
            background-color: #34495e; color: white; border: 1px solid var(--text-color);
            padding: 5px 10px; margin-left: 5px; cursor: pointer; border-radius: 3px; transition: 0.3s;
        }
        .language-selector button:hover { background-color: var(--accent-green); }

        .screen {
            display: none; width: 100%; max-width: 900px; background: var(--panel-bg);
            margin-top: 40px; padding: 30px; border-radius: 10px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.5); border: 1px solid var(--border-color); box-sizing: border-box;
        }
        .screen.active { display: block; }

        .panel-top-back {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto;
            min-height: 38px;
            margin: 0 0 14px;
            padding: 8px 14px;
            border: 1px solid #55708c;
            border-radius: 7px;
            background: #263a50;
            color: #ecf0f1;
            font: inherit;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: background-color .2s, border-color .2s, transform .2s;
        }
        .panel-top-back:hover { background: #344f6b; border-color: #7fa1c4; transform: translateX(-2px); }
        .panel-top-back:focus-visible { outline: 3px solid #f1c40f; outline-offset: 3px; }

        h2, h3 { text-align: center; color: var(--accent-green); border-bottom: 2px solid var(--accent-red); padding-bottom: 10px; }

        .form-group { margin-bottom: 20px; display: flex; flex-direction: column; }
        .form-group label { margin-bottom: 8px; font-weight: bold; }
        .form-group input, .form-group select { padding: 10px; border: none; border-radius: 5px; background-color: var(--border-color); color: white; font-size: 16px; }
        /* Stylowanie rozwiniętej listy państw */
        .form-group select option { 
            background-color: var(--panel-bg); 
            color: white; 
            padding: 5px; 
        }
        .form-group select optgroup { 
            background-color: var(--bg-color); 
            color: var(--accent-green); 
            font-weight: bold; 
            font-style: normal; 
        }
        
        .action-btn { width: 100%; padding: 15px; background-color: var(--accent-red); color: white; border: none; border-radius: 5px; font-size: 18px; font-weight: bold; cursor: pointer; text-transform: uppercase; transition: 0.3s; margin-top: 10px; box-sizing: border-box; }
        .action-btn:hover { background-color: #e74c3c; transform: scale(1.02); }
        .action-btn.green { background-color: var(--accent-green); }
        .action-btn.green:hover { background-color: #2ecc71; }
        .action-btn:disabled { background-color: #7f8c8d; cursor: not-allowed; transform: none; }

        /* Hub Gracza */
        .hub-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; background: #0f3460; padding: 20px; border-radius: 10px; }
        .player-photo { width: 100px; height: 140px; border-radius: 8px; border: 3px solid var(--accent-green); object-fit: contain; background: #16213e; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
        .player-info { flex-grow: 1; }
        .player-name { font-size: 24px; font-weight: bold; margin: 0 0 10px 0; display: flex; align-items: center; gap: 10px; }
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
        .stat-box { background: rgba(0,0,0,0.3); padding: 10px; border-radius: 5px; text-align: center; font-size: 14px; }
        .stat-value { font-size: 18px; font-weight: bold; color: var(--accent-green); display: block; margin-top: 5px;}

        /* Kafelki Menu */
        .menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
        .menu-tile { background-color: var(--primary-color); padding: 20px; border-radius: 10px; text-align: center; cursor: pointer; transition: 0.3s; border: 2px solid transparent; }
        .menu-tile:hover { transform: translateY(-5px); border-color: var(--accent-green); background-color: #34495e; }
        .menu-tile h3 { border: none; margin: 0 0 10px 0; color: white; font-size: 18px;}
        .menu-tile p { margin: 0; color: #bdc3c7; font-size: 13px; }
        .career-difficulty-field small {
            margin-top: 7px;
            color: #bdc3c7;
            font-size: 12px;
            line-height: 1.4;
        }
        .career-difficulty-tile { cursor: default; border-color: #8e67c7; background-color: #3b2c63; }
        .career-difficulty-tile select {
            width: 100%;
            box-sizing: border-box;
            margin: 13px 0 9px;
            padding: 10px;
            border: 1px solid #a98bd3;
            border-radius: 6px;
            background: #17142b;
            color: #fff;
            font: inherit;
            font-weight: 700;
        }
        .career-difficulty-tile small {
            display: block;
            min-height: 34px;
            color: #dfd3ef;
            font-size: 12px;
            line-height: 1.4;
        }
        .career-difficulty-tile select:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
        .career-work-field small { display: block; margin-top: 7px; color: #bdc3c7; font-size: 12px; line-height: 1.4; }
        .career-work-tile { cursor: default; border-color: #4bb890; background-color: #174c46; }
        .career-work-tile label { display: block; color: #d5f2e6; font-size: 13px; }
        .career-work-tile select {
            width: 100%; box-sizing: border-box; margin: 10px 0; padding: 10px;
            border: 1px solid #69d4ac; border-radius: 6px; background: #102d2b;
            color: #fff; font: inherit; font-weight: 700;
        }
        .career-work-tile small { display: block; color: #d5f2e6; font-size: 12px; line-height: 1.4; }
        .career-work-tile select:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
        .walkon-settings-tile { cursor: default; border-color: #2aa7a1; background-color: #164b59; }
        .walkon-settings-tile select {
            width: 100%;
            box-sizing: border-box;
            margin: 13px 0 9px;
            padding: 10px;
            border: 1px solid #54c7c1;
            border-radius: 6px;
            background: #102d38;
            color: #fff;
            font: inherit;
            font-weight: 700;
        }
        .walkon-settings-tile small {
            display: block;
            min-height: 34px;
            color: #c7f2ef;
            font-size: 12px;
            line-height: 1.4;
        }
        .walkon-settings-tile select:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
        .match-report-settings-tile { cursor: default; border-color: #4ea6d8; background-color: #173d58; }
        .match-report-settings-tile select {
            width: 100%; box-sizing: border-box; margin: 13px 0 9px; padding: 10px;
            border: 1px solid #6cb8de; border-radius: 6px; background: #102b40;
            color: #fff; font: inherit; font-weight: 700;
        }
        .match-report-settings-tile small { display: block; min-height: 34px; color: #cce9f8; font-size: 12px; line-height: 1.4; }
        .match-report-settings-tile select:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
        .tiktok-tile { display: block; min-width: 0; background-color: #101010; border-color: #25f4ee; color: white; text-decoration: none; }
        .tiktok-tile p { color: #ecf0f1; overflow-wrap: anywhere; }
        .tiktok-tile:hover { background-color: #161616; border-color: #fe2c55; }
        .tiktok-tile:focus-visible { outline: 3px solid #25f4ee; outline-offset: 3px; }

        /* Career sections keep their colour when hovered or translated. */
        #screen-hub .menu-tile {
            background-image: linear-gradient(145deg, rgba(255,255,255,.07), rgba(0,0,0,.08));
            transition: transform .2s, box-shadow .2s, filter .2s;
        }
        #screen-hub .hub-feature-tile {
            background-color: var(--tile-bg);
            border-color: var(--tile-accent);
            color: #fff;
            font: inherit;
        }
        #screen-hub .hub-feature-tile p { color: #e0e9f5; line-height: 1.4; }
        #screen-hub .menu-tile h3 { line-height: 1.35; }
        #screen-hub .menu-tile:hover {
            filter: brightness(1.12);
            box-shadow: 0 6px 16px rgba(0,0,0,.2);
        }
        #screen-hub .menu-tile:focus-visible {
            outline: 3px solid #f1c40f;
            outline-offset: 4px;
        }
        #screen-hub .hub-tile-training { --tile-bg: #14554c; --tile-accent: #249989; }
        #screen-hub .player-staff-tile { --tile-bg: #32467c; --tile-accent: #5d79bd; }
        #screen-hub .career-infrastructure-tile { --tile-bg: #175779; --tile-accent: #3b91bd; }
        #screen-hub .career-lifestyle-tile { --tile-bg: #794c2d; --tile-accent: #bd864f; }
        #screen-hub .hub-tile-match { --tile-bg: #713543; --tile-accent: #bf647d; }
        #screen-hub .hub-tile-mail { --tile-bg: #235f69; --tile-accent: #46a0ad; }
        #screen-hub .world-news-tile { --tile-bg: #355278; --tile-accent: #638bbc; }
        #screen-hub .season-archive-tile { --tile-bg: #55517c; --tile-accent: #928ac1; }
        #screen-hub .hub-tile-calendar { --tile-bg: #356342; --tile-accent: #68a975; }
        #screen-hub .hub-tile-players { --tile-bg: #314582; --tile-accent: #667ed0; }
        #screen-hub .planning-menu-tile { --tile-bg: #4b5979; --tile-accent: #8399c5; }
        #screen-hub .hub-tile-shop { --tile-bg: #794566; --tile-accent: #b6739d; }

        @media (prefers-reduced-motion: reduce) {
            #screen-hub .menu-tile { transition: none; }
            #screen-hub .menu-tile:hover { transform: none; }
        }

        /* Kronika kariery */
        .career-timeline { max-width: 820px; margin: 25px auto 0; }
        .career-entry { position: relative; margin-left: 14px; padding: 0 0 22px 28px; border-left: 2px solid #2c3e50; }
        .career-entry:last-child { padding-bottom: 0; }
        .career-dot { position: absolute; left: -11px; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; background: #16213e; border: 2px solid var(--accent-green); }
        .career-card { background: #0f3460; border: 1px solid #34495e; border-radius: 8px; padding: 13px 15px; }
        .career-date { display: block; color: #95a5a6; font-size: 12px; margin-bottom: 5px; }
        .career-title { color: white; font-weight: bold; }
        .career-detail { color: #bdc3c7; font-size: 13px; margin-top: 4px; }

        /* Mecz UI */
        body:has(#screen-match.active) { overflow-x: clip; }
        #screen-match { width: calc(100% - 24px); max-width: 1280px; margin-top: 14px; padding: 16px; }
        #match-title { margin-top: 4px; font-size: 20px; }
        .match-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: 14px; margin-top: 12px; }
        .match-board, .match-stats { background: #0f3460; padding: 12px; border-radius: 10px; min-width: 0; }
        .match-board {
            display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(250px, 1fr);
            grid-template-areas: "board controls" "dots controls";
            grid-template-rows: auto auto; align-content: start; gap: 10px 14px;
        }
        .match-board .dartboard-container { grid-area: board; align-self: center; margin: 0; min-width: 0; }
        .match-board canvas { display: block; width: min(100%, 380px); height: auto; box-sizing: border-box; margin: auto; }
        .match-board .dart-info { grid-area: dots; align-self: center; margin: 0; }
        .match-board .dart-dot { width: 14px; height: 14px; }
        .match-control-column { grid-area: controls; display: flex; flex-direction: column; align-self: start; gap: 10px; min-width: 0; }
        .match-board .aim-controls { align-self: stretch; gap: 8px; margin-bottom: 0; }
        .match-actions { display: flex; align-self: stretch; gap: 8px; height: auto; }
        #t-btn-match-back { align-self: stretch; }
        .match-board .action-btn { margin-top: 0; min-height: 44px; padding: 10px 8px; font-size: 14px; }
        .match-board #throw-btn { font-size: 16px; }
        .match-board button { scroll-margin-top: 200px; }
        .match-stats { display: flex; flex-direction: column; min-height: 0; }
        .match-stats > .match-stats-grid { flex-shrink: 0; }
        #match-log { flex: 1 1 0; height: 0; min-height: 120px; box-sizing: border-box; overflow-wrap: anywhere; }

        .spectator-speed-controls {
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 12px;
            margin: 0 auto 15px;
            padding: 10px 14px;
            width: fit-content;
            max-width: 100%;
            box-sizing: border-box;
            border: 1px solid var(--border-color);
            border-radius: 9px;
            background: #1a1a2e;
        }
        .spectator-speed-label { color: #bdc3c7; font-size: 13px; font-weight: bold; }
        .spectator-speed-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
        .spectator-pause-btn,
        .spectator-speed-btn,
        .spectator-exit-btn {
            min-width: 44px;
            padding: 7px 10px;
            border: 1px solid #34495e;
            border-radius: 6px;
            background: #0f3460;
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: 0.2s;
        }
        .spectator-pause-btn { min-width: 94px; border-color: #f39c12; background: #7d4d08; }
        .spectator-pause-btn:hover { border-color: #f1c40f; transform: translateY(-1px); }
        .spectator-pause-btn.paused { border-color: #2ecc71; background: var(--accent-green); }
        .spectator-speed-btn:hover { border-color: var(--accent-green); transform: translateY(-1px); }
        .spectator-speed-btn.active { background: var(--accent-green); border-color: #2ecc71; box-shadow: 0 0 8px rgba(39, 174, 96, 0.45); }
        .spectator-exit-btn { border-color: #e57373; background: #7b2530; }
        .spectator-exit-btn:hover { border-color: #ffabab; transform: translateY(-1px); }
        
        .score-board { position: sticky; top: 0; z-index: 30; display: flex; margin-bottom: 12px; background: #1a1a2e; padding: 6px; border-radius: 12px; gap: 10px; box-shadow: 0 6px 12px rgba(0,0,0,.3); }
        .score-col { display: flex; align-items: center; flex: 1; min-width: 0; gap: 14px; background: #0f3460; border-radius: 10px; padding: 10px 14px; box-sizing: border-box; transition: border-color .2s, box-shadow .2s; border: 2px solid transparent; }
        .score-col.active-turn { border-color: var(--accent-green); box-shadow: 0 0 15px rgba(39, 174, 96, 0.4); }
        .score-photo { flex: 0 0 auto; width: 104px; height: 140px; box-sizing: border-box; object-fit: contain; background: #16213e; border-radius: 8px; border: 2px solid var(--accent-red); margin: 0; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
        .score-info { flex: 1; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 3px; text-align: center; }
        .score-info h4 { margin: 0; min-height: 2.4em; font-size: 18px; line-height: 1.2; color: white; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
        .score-info h4 img { vertical-align: middle; margin-right: 4px; }
        .score-status-row { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; max-width: 100%; }
        .match-score-badges { display: flex; align-items: center; justify-content: center; gap: 6px; }
        .badge-box {
            display: inline-flex; align-items: center; justify-content: center; gap: 7px;
            min-width: 82px; height: 34px; box-sizing: border-box; padding: 4px 10px;
            border: 2px solid #f1c40f; border-radius: 7px; background: #0b1222;
            box-shadow: 0 3px 8px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .05);
            text-align: center;
        }
        .badge-box .badge-label { display: block; font-size: 10px; line-height: 1; color: #d7dee8; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
        .badge-box .badge-value { display: block; min-width: 1ch; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; font-weight: 900; text-shadow: 0 1px 2px #000; }
        .score-display { min-width: 3ch; font-size: 54px; font-weight: bold; font-variant-numeric: tabular-nums; color: white; line-height: 1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
        .match-momentum { font-size: 10px; line-height: 1.2; font-weight: bold; min-height: 12px; transition: .3s; white-space: nowrap; }
        .checkout-hint { color: #f1c40f; font-weight: bold; min-height: 16px; font-size: 13px; line-height: 1.2; }
        
        .dartboard-container { text-align: center; margin: 20px 0; }
        canvas { max-width: 100%; background: #111; border-radius: 50%; box-shadow: 0 0 15px rgba(0,0,0,0.8); border: 10px solid #2c3e50; }

        .aim-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 20px; }
        .aim-sector-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
        .aim-sector-picker legend { padding: 0; margin-bottom: 8px; color: #bdc3c7; font-size: 13px; font-weight: bold; }
        .aim-sector-numbers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
        .aim-bull-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
        .aim-multiplier-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
        .aim-sector-btn,
        .aim-multiplier-btn {
            min-width: 0; min-height: 44px; padding: 10px 4px;
            border: 1px solid #56708c; border-radius: 5px;
            background: var(--bg-color); color: white;
            font: inherit; font-size: 14px; font-weight: bold; cursor: pointer;
            touch-action: manipulation;
            transition: background-color .2s, border-color .2s, box-shadow .2s;
        }
        .aim-sector-btn { min-height: 44px; font-size: 16px; }
        .aim-bull-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
        .aim-bull-btn span { font-size: 12px; }
        .aim-sector-btn:hover:not(:disabled),
        .aim-multiplier-btn:hover:not(:disabled) { border-color: #2ecc71; }
        .aim-sector-btn.active,
        .aim-multiplier-btn.active { background: var(--accent-green); color: #071e11; border-color: #2ecc71; box-shadow: 0 0 8px rgba(39, 174, 96, .45); }
        .aim-sector-btn:focus-visible,
        .aim-multiplier-btn:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }
        .aim-multiplier-btn:disabled { opacity: .45; cursor: not-allowed; }
        
        .log-box { background: #1a1a2e; height: 350px; overflow-y: auto; padding: 10px; border-radius: 5px; font-family: monospace; font-size: 14px; color: #bdc3c7; }
        .log-entry { border-bottom: 1px solid #2c3e50; padding: 5px 0; }
        .log-entry.hit { color: var(--accent-green); }
        .log-entry.miss { color: var(--accent-red); }
        .log-entry.ai { color: #f39c12; }

        .story-text { font-size: 20px; text-align: center; line-height: 1.6; padding: 40px 20px; font-style: italic; }
        
        .dart-info { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; }
        .dart-dot { width: 15px; height: 15px; background: #555; border-radius: 50%; }
        .dart-dot.active { background: var(--accent-red); }

        /* Style Poczty i Kalendarza */
        .time-bar {
            background: #0f3460; padding: 10px 20px; border-radius: 5px; margin-bottom: 20px;
            display: flex; justify-content: space-between; align-items: center; font-weight: bold;
        }
        .badge { background: var(--accent-red); color: white; border-radius: 50%; padding: 2px 7px; font-size: 12px; margin-left: 5px; }

        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8);
            display: none; justify-content: center; align-items: center; z-index: 1000;
        }
        .modal-content {
            background: var(--panel-bg); border: 2px solid var(--accent-green); padding: 25px;
            border-radius: 10px; max-width: 500px; width: 90%; text-align: center;
        }
        #tournament-simulation-dialog {
            box-sizing: border-box; width: min(480px, 90vw); padding: 24px;
            border: 2px solid var(--accent-green); border-radius: 10px;
            background: var(--panel-bg); color: #ecf0f1; text-align: center;
            position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 10000;
        }
        #tournament-simulation-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
        #tournament-simulation-progress { width: 100%; height: 20px; accent-color: var(--accent-green); }
        #t-simulation-note { margin-bottom: 0; color: #bdc3c7; font-size: 14px; line-height: 1.5; }
        .choice-btn {
            width: 100%; padding: 12px; margin-top: 10px; background: var(--primary-color);
            color: white; border: 1px solid var(--accent-green); border-radius: 5px; cursor: pointer; text-align: left;
        }
        .choice-btn:hover { background: #34495e; }
        .choice-effect { font-size: 12px; color: #3498db; display: block; margin-top: 3px; }

        /* Dodatkowe style statystyk i legów */
        .leg-box { display: inline-block; width: 18px; height: 18px; background: #1a1a2e; border: 2px solid var(--border-color); margin: 0 3px; border-radius: 3px; }
        .leg-box.won { background: var(--accent-green); border-color: var(--accent-green); box-shadow: 0 0 5px var(--accent-green); }
        .set-score { min-height: 20px; color: #f1c40f; font-weight: bold; font-size: 14px; }
        
        .match-stats-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; background: #0f3460; padding: 6px; border-radius: 10px; margin-bottom: 12px; align-items: center; }
        .m-stat-label { font-size: 12px; color: #bdc3c7; border-left: 3px solid var(--accent-red); padding-left: 8px; font-weight: bold; }
        .m-stat-value { background: #1a1a2e; padding: 6px; border-radius: 5px; text-align: center; font-size: 14px; color: #f1c40f; font-weight: bold; }
        .m-stat-title { text-align: center; font-size: 14px; color: white; font-weight: bold; margin-bottom: 5px; border-bottom: 2px solid var(--accent-green); padding-bottom: 5px;}

        /* Style drabinki turniejowej */
        .bracket-modal {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9);
            display: none; justify-content: center; align-items: center; z-index: 2000;
        }
        .bracket-content {
            background: var(--panel-bg); border: 2px solid var(--accent-green); padding: 25px;
            border-radius: 10px; max-width: 820px; width: 90%; max-height: 80vh; overflow-y: auto;
        }
        .bracket-match {
            display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0f3460; padding: 12px; margin-bottom: 8px; border-radius: 5px; font-size: 15px;
        }
        .bracket-match.player-match { border: 2px solid var(--accent-green); background: #1a1a2e; box-shadow: 0 0 10px var(--accent-green); }
        .bracket-vs { color: var(--accent-red); font-weight: bold; font-size: 12px; margin: 0 15px; }
        .bracket-seed {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            box-sizing: border-box;
            margin-right: 4px;
            padding: 0 5px;
            border: 1px solid #f1c40f;
            border-radius: 5px;
            background: #19243b;
            color: #f1c40f;
            font-size: 11px;
            font-weight: 900;
            line-height: 1;
            vertical-align: middle;
        }
        /* Statystyki pod sterowaniem na mniejszych ekranach. */
@media (max-width: 1100px) {
    .match-layout { grid-template-columns: minmax(0, 1fr); }
    #match-log { flex: none; height: clamp(240px, 45vh, 380px); }
}
@media (max-width: 600px) {
    .match-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "board" "dots" "controls"; grid-template-rows: auto; }
    .match-board canvas { width: min(100%, 280px); }
    /* Na telefonie wynik przewija się normalnie, a tarcza przejmuje górę
       ekranu podczas wybierania celu. Dzięki temu panel wyniku jej nie zasłania. */
    #screen-match .score-board { position: relative; top: auto; z-index: 1; }
    #screen-match .match-board { overflow: visible; padding-bottom: 84px; }
    #screen-match .match-board .dartboard-container {
        position: sticky;
        top: 8px;
        z-index: 20;
        width: 100%;
        margin: 0;
        padding: 6px 0;
        border-radius: 10px;
        background: #0f3460;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
    }
    /* Najważniejsze akcje są zawsze pod kciukiem — rzut nie wymaga
       przewinięcia poniżej całego selektora sektorów. */
    #screen-match.active .match-actions {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 80;
        gap: 6px;
        padding: 8px;
        border: 1px solid rgba(52, 152, 219, 0.55);
        border-radius: 12px;
        background: rgba(10, 35, 67, 0.96);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(6px);
    }
    #screen-match .match-actions .action-btn { min-height: 52px; }
    .score-board .score-photo { width: clamp(44px, 14vw, 64px); height: clamp(62px, 19vw, 86px); }
    .score-info { gap: 3px; }
    .score-info h4 { font-size: 12px; }
    .score-info .score-display { font-size: 32px; }
    .score-status-row { min-height: 39px; gap: 3px; flex-direction: column; }
    .match-score-badges { gap: 3px; flex-wrap: wrap; }
    .score-info .badge-box { min-width: 54px; height: 28px; padding: 3px 6px; gap: 4px; border-width: 1px; border-radius: 5px; }
    .badge-box .badge-label { font-size: 7px; letter-spacing: .2px; }
    .badge-box .badge-value { font-size: 15px; }
    .match-momentum { font-size: 8px; min-height: 10px; }
    .checkout-hint { font-size: 10px; min-height: 12px; }
}
        /* Poprawki widoku meczu dla urządzeń mobilnych */
@media (max-width: 768px) {
    #screen-match { width: calc(100% - 12px); padding: 8px; margin-top: 10px; }
    .match-board, .match-stats { padding: 10px; }
    .match-board canvas { box-sizing: border-box; height: auto; }
    .bracket-match {
        flex-wrap: wrap;
    }
    .bracket-match > :last-child:not(:nth-child(3)) {
        width: 100%;
        margin-top: 6px;
    }
    /* Oba wyniki pozostają obok siebie również na telefonie. */
    .score-board {
        flex-direction: row;
        gap: 6px;
        padding: 6px;
    }
    .score-col {
        padding: 8px 6px;
        gap: 6px;
    }
    /* Minimalnie pomniejsza zdjęcia, aby dać więcej "oddechu" tekstom */
    .score-photo {
        width: 72px;
        height: 96px;
        margin: 0;
    }
    .score-display { font-size: 42px; }
    .badge-box { min-width: 64px; height: 30px; padding: 3px 7px; }
    /* BEZWZGLĘDNIE blokuje przewijanie strony na boki */
    body {
        overflow-x: hidden;
    }

    /* Zmienia układ górnego paska na pionowy */
    header {
        flex-direction: column;
        align-items: center;
        gap: 15px; 
        padding: 15px 10px;
        height: auto;
    }

    /* Jeśli logo i przyciski wewnątrz headera nadal wystają, też je centrujemy */
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    /* Styl układu dwukolumnowego dla ekranu startowego */
        #screen-create-player.screen {
            max-width: 1200px !important; /* Poszerzamy główny kontener startowy */
            display: none;
        }
        #screen-create-player.screen.active {
            display: flex !important;
            gap: 30px;
            flex-wrap: wrap;
        }
     
    } /* <--- TO JEST KLAMRA ZAMYKAJĄCA BLOK MOBILNY (Twoja obecna linijka 302) */

        /* Style dla Osiągnięć - Wersja Minimalistyczna */
        .achievements-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 15px;
        }
        .achiev-card {
            background: #1a1a2e; border: 1px solid #2c3e50; border-radius: 4px; padding: 12px;
            display: flex; align-items: center; gap: 12px;
        }
        .achiev-card.locked { opacity: 0.6; }
        .achiev-card.unlocked {
            border-left: 4px solid #f1c40f; /* Subtelny, złoty pasek z lewej strony */
            background: #16213e;
        }
        .achiev-icon { font-size: 22px; min-width: 30px; text-align: center; opacity: 0.8; }
        .achiev-info { flex-grow: 1; }
        .achiev-title { font-weight: bold; color: #ecf0f1; font-size: 13px; margin: 0 0 2px 0; }
        .achiev-desc { color: #7f8c8d; font-size: 11px; margin: 0 0 6px 0; line-height: 1.3; }
        .achiev-reward { font-size: 10px; color: #bdc3c7; font-weight: bold; letter-spacing: 0.5px; }
        .achiev-card.unlocked .achiev-reward { color: #f1c40f; } /* Złoty tekst jeśli zdobyte */
        
        .achiev-progress-bg { background: #0f3460; height: 3px; border-radius: 2px; width: 100%; margin-top: 4px; }
        .achiev-progress-fill { background: #3498db; height: 100%; width: 0%; transition: 0.3s; }

        /* --- CHANGELOG STYLES --- */
.changelog-box {
    flex: 1;
    min-width: 320px;
    background: #16213e;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    max-height: 600px;
    overflow-y: auto;
    box-sizing: border-box;
}
.changelog-box h3 {
    color: var(--accent-green);
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 8px;
    margin: 0 0 12px 0;
    font-size: 18px;
    text-align: left;
}
.changelog-version-badge {
    display: inline-block;
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.35);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 12px;
}
.changelog-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cl-item {
    background: #0f3460;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid #3498db;
    border-radius: 5px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cl-tag {
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    padding: 1px 5px;
    border-radius: 3px;
}
.cl-tag.feature { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.cl-tag.system  { background: rgba(52, 152, 219, 0.2); color: #3498db; }
.cl-tag.fix     { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.cl-tag.tweak   { background: rgba(155, 89, 182, 0.2); color: #9b59b6; }
.cl-title {
    font-weight: bold;
    color: #ecf0f1;
    font-size: 13px;
}
.cl-desc {
    color: #bdc3c7;
    font-size: 11px;
    margin: 0;
    line-height: 1.3;
}

/* Ekran startowy: wybór istniejącego zawodnika nie może nachodzić na changelog. */
#screen-create-player.screen {
    max-width: 1200px;
}

#screen-create-player.screen.active {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "existing existing"
        "changelog form";
    align-items: start;
    gap: 24px;
}

.career-start-existing-card {
    grid-area: existing;
    width: min(100%, 540px);
    justify-self: center;
    box-sizing: border-box;
    padding: 14px 16px;
    background: #0f3460;
    border: 1px solid #3498db;
    border-radius: 10px;
}

.career-start-existing-card h2 {
    margin: 0 0 8px;
    padding-bottom: 7px;
    font-size: 18px;
}

.career-start-existing-card #career-start-existing-desc {
    color: #bdc3c7;
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.35;
}

.career-start-existing-card .form-group {
    margin-bottom: 8px;
}

.career-start-existing-card .form-group label {
    margin-bottom: 5px;
    font-size: 13px;
}

.career-start-existing-card .form-group select {
    padding: 8px 10px;
    font-size: 14px;
}

.career-start-existing-card #existing-player-preview {
    min-height: 16px;
    margin: 0 0 8px;
    color: var(--accent-green);
    font-size: 12px;
}

.career-start-existing-card .action-btn {
    margin-top: 0;
    padding: 10px;
    font-size: 14px;
}

.changelog-box {
    grid-area: changelog;
    min-width: 0;
    max-height: 600px;
    align-self: start;
}

.create-form-wrapper {
    grid-area: form;
    min-width: 0;
    align-self: start;
    box-sizing: border-box;
    padding: 20px;
    background: #16213e;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.create-form-wrapper #t-create-title {
    margin: 0;
    padding-bottom: 8px;
    font-size: 18px;
    line-height: 21px;
}

#career-start-custom-divider {
    margin: 6px 0 14px;
    color: #bdc3c7;
    font-size: 11px;
    text-align: center;
    letter-spacing: 0.3px;
}

@media (max-width: 900px) {
    #screen-create-player.screen.active {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "existing"
            "changelog"
            "form";
        gap: 20px;
    }

    .career-start-existing-card {
        width: 100%;
    }

    .changelog-box {
        max-height: 600px;
        align-self: start;
    }
}

    

        .sponsor-card { background: #1a1a2e; padding: 10px; border-radius: 5px; margin-bottom: 10px; display: flex; align-items: center; gap: 15px; border: 1px solid #2c3e50; }
        .sponsor-logo { width: 50px; height: 50px; background: #2c3e50; border-radius: 5px; object-fit: contain; display: flex; justify-content: center; align-items: center; font-size: 10px; color: #fff; font-weight: bold; text-align: center;}
        .sponsor-info { flex-grow: 1; }
        .sponsor-name { font-weight: bold; font-size: 16px; margin: 0 0 3px 0; color: white; }
        .sponsor-details { font-size: 12px; color: #f1c40f; margin: 0; }
        .btn-sign { background: var(--accent-green); color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-weight: bold; font-size: 12px;}
        .btn-sign:hover { background: #2ecc71; }

        .sponsor-sort-controls {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 10px;
            margin: 0 0 18px;
            padding: 12px 14px;
            border: 1px solid #466781;
            border-radius: 8px;
            background: #0f2949;
        }
        .sponsor-sort-controls label { color: #d9e6f2; font-size: 13px; font-weight: 700; }
        .sponsor-sort-controls select {
            min-width: min(280px, 100%);
            padding: 9px 11px;
            border: 1px solid #6c8dab;
            border-radius: 6px;
            background: #17263e;
            color: #fff;
            font: inherit;
            font-weight: 700;
        }
        .sponsor-sort-controls select:focus-visible { outline: 3px solid #f1c40f; outline-offset: 2px; }

        #sponsor-season-goals { background: #0f3460; border: 1px solid #466781; border-radius: 10px; padding: 20px; margin-bottom: 22px; }
        .sponsor-goal-heading, .sponsor-goal-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
        .sponsor-goal-heading h3 { margin: 0; color: #f1c40f; border: 0; }
        .sponsor-goal-heading > strong { color: #ecf0f1; font-size: 13px; }
        .sponsor-goals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
        .sponsor-goal-card { background: #1a1a2e; border: 1px solid #52657b; border-radius: 8px; padding: 14px; min-width: 0; overflow-wrap: anywhere; }
        .sponsor-goal-card p { font-size: 13px; line-height: 1.5; margin: 10px 0; }
        .sponsor-goal-card.goal-completed { border-color: #2ecc71; }
        .sponsor-goal-card-head { color: #fff; }
        .sponsor-goal-card-head span { color: #bdc3c7; font-size: 12px; }
        .sponsor-goal-reward { color: #f1c40f; font-size: 13px; line-height: 1.5; }
        .sponsor-goal-note { color: #c2cedb; font-size: 12px; line-height: 1.5; }
        .sponsor-goal-status { color: #d9e6f2; font-weight: bold; }
        .sponsor-goal-card progress { display: block; width: 100%; height: 9px; accent-color: #2ecc71; }
        .sponsor-goal-clause { margin-top: 10px; border-top: 1px solid #52657b; padding-top: 9px; font-size: 12px; line-height: 1.5; }
        .sponsor-goal-clause > strong { color: #b4dbc7; }
        .sponsor-goal-clause p { margin: 5px 0; }
        .sponsor-goal-clause .btn-sign { margin-top: 6px; min-height: 36px; }
        .sponsor-goal-history { margin-top: 18px; }
        .sponsor-goal-history summary { cursor: pointer; color: #ecf0f1; padding: 8px 0; }
        #screen-sponsors .sponsor-column { flex-basis: 320px !important; }
        #screen-sponsors .sponsor-card { flex-wrap: wrap; gap: 10px; }
        #screen-sponsors .sponsor-logo { flex-shrink: 0; }
        #screen-sponsors .sponsor-info { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
        #screen-sponsors .sponsor-card > .btn-sign { min-height: 36px; margin-left: auto; }
        @media (max-width: 600px) {
            #sponsor-season-goals { padding: 14px; }
            #screen-sponsors .sponsor-column { padding: 14px !important; }
            .sponsor-sort-controls { justify-content: stretch; }
            .sponsor-sort-controls label, .sponsor-sort-controls select { width: 100%; }
        }
    

        @keyframes pulse {
            0% { transform: scale(1); }
            100% { transform: scale(1.1); }
        }

        .ranking-points-guide {
            margin: 0 0 10px;
            padding: 10px 12px;
            border: 1px solid rgba(241, 196, 15, 0.45);
            border-radius: 7px;
            background: rgba(241, 196, 15, 0.09);
            color: #ecf0f1;
            font-size: 12px;
            line-height: 1.5;
            text-align: center;
            overflow-wrap: anywhere;
        }

        .ranking-navigation-groups {
            display: grid;
            gap: 12px;
            margin-bottom: 15px;
        }
        .ranking-navigation-group {
            padding: 10px;
            border: 1px solid rgba(149, 165, 166, .28);
            border-radius: 9px;
            background: rgba(15, 52, 96, .24);
        }
        .ranking-navigation-group h3 {
            margin: 0 0 8px;
            color: #bdc3c7;
            font-size: 11px;
            line-height: 1.3;
            letter-spacing: .08em;
            text-align: left;
            text-transform: uppercase;
        }
        .ranking-navigation-group-secondary {
            border-color: rgba(230, 126, 34, .55);
            background: rgba(211, 84, 0, .08);
        }
        .ranking-navigation-group-secondary h3 { color: #f0b27a; }
        .ranking-navigation-group-records {
            border-color: rgba(52, 152, 219, .55);
            background: rgba(36, 113, 163, .1);
        }
        .ranking-navigation-group-records h3 { color: #85c1e9; }
        .ranking-navigation-buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
        }
        @media (min-width: 760px) {
            .ranking-navigation-groups {
                grid-template-columns: minmax(0, 3fr) minmax(230px, 1fr);
                align-items: stretch;
            }
            .ranking-navigation-group-secondary .ranking-navigation-buttons {
                display: grid;
                grid-template-columns: 1fr;
            }
            .ranking-navigation-group-records { grid-column: 1 / -1; }
        }

        .ranking-search { margin: 0 0 12px; text-align: left; }
        .ranking-search label {
            display: block;
            margin-bottom: 6px;
            color: #bdc3c7;
            font-size: 13px;
        }
        .ranking-search-controls { display: flex; gap: 8px; }
        .ranking-search-controls input {
            flex: 1;
            min-width: 0;
            margin: 0;
            padding: 11px 12px;
            border: 1px solid var(--border-color);
            border-radius: 7px;
            background: #0f3460;
            color: #ecf0f1;
            font: inherit;
            font-size: 16px;
        }
        .ranking-search-controls input::placeholder { color: #bdc3c7; }
        .ranking-search-controls input:focus-visible {
            outline: 2px solid var(--accent-green);
            outline-offset: 2px;
        }
        .ranking-search-controls button {
            margin: 0;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 7px;
            background: #34495e;
            color: #ecf0f1;
            font: inherit;
            font-size: 13px;
            cursor: pointer;
        }
        .ranking-search-status { margin: 8px 0 0; color: #bdc3c7; font-size: 12px; }
        .ranking-search-empty { color: #bdc3c7; text-align: center; }
        .ranking-player-row[hidden],
        .ranking-search [hidden],
        .ranking-search-empty[hidden] { display: none; }

        .ranking-player-row {
            width: 100%;
            padding: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            border: 0;
            color: inherit;
            background: transparent;
            font: inherit;
            text-align: left;
            cursor: pointer;
        }
        .ranking-player-row:hover,
        .ranking-player-row:focus-visible {
            background: rgba(52, 152, 219, 0.18) !important;
            outline: 1px solid rgba(52, 152, 219, 0.6);
            outline-offset: -1px;
        }
        .average-records-intro {
            padding: 12px;
            border-bottom: 1px solid var(--border-color);
            background: rgba(15, 52, 96, .55);
            text-align: center;
        }
        .average-records-intro h3 {
            margin: 0 0 6px;
            color: #85c1e9;
            font-size: 17px;
        }
        .average-records-intro p {
            margin: 0 auto 10px;
            max-width: 760px;
            color: #bdc3c7;
            font-size: 12px;
            line-height: 1.45;
        }
        .average-records-switch {
            display: flex;
            justify-content: center;
            gap: 8px;
        }
        .average-records-switch button {
            padding: 7px 12px;
            border: 1px solid #3498db;
            border-radius: 6px;
            color: #ecf0f1;
            background: #16213e;
            font: inherit;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }
        .average-records-switch button.active {
            color: #fff;
            background: #2471a3;
            box-shadow: 0 0 0 1px rgba(133, 193, 233, .35) inset;
        }
        .average-records-header,
        .average-record-row {
            display: grid;
            grid-template-columns: minmax(0, 3fr) minmax(90px, 1fr) minmax(90px, 1fr);
            align-items: center;
            gap: 10px;
        }
        .average-records-header {
            padding: 8px 10px;
            border-bottom: 2px solid #3498db;
            color: #bdc3c7;
            background: #0f3460;
            font-size: 11px;
            font-weight: 700;
        }
        .average-records-header span:not(:first-child) { text-align: right; }
        .average-record-row { border-bottom: 1px solid var(--border-color); }
        .average-record-player {
            min-width: 0;
            overflow-wrap: anywhere;
        }
        .average-record-player b {
            color: var(--accent-green);
            font-size: 11px;
        }
        .average-record-value {
            color: #bdc3c7;
            text-align: right;
            font-variant-numeric: tabular-nums;
            font-weight: 700;
        }
        .average-record-value.sorted {
            color: #f1c40f;
            font-size: 17px;
        }
        .average-record-value small {
            display: block;
            margin-top: 2px;
            color: #7f8c8d;
            font-size: 10px;
            font-weight: 400;
        }
        .average-records-empty {
            margin: 45px 15px;
            color: #bdc3c7;
            text-align: center;
        }
        @media (max-width: 520px) {
            .average-records-header,
            .average-record-row {
                grid-template-columns: minmax(0, 2fr) minmax(68px, .75fr) minmax(68px, .75fr);
                gap: 6px;
            }
            .average-records-header { font-size: 9px; }
            .average-record-row { padding: 9px 6px; font-size: 12px; }
            .average-record-value.sorted { font-size: 14px; }
        }
        .player-profile-hero {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 18px;
            padding: 20px;
            background: #16213e;
            border: 1px solid var(--border-color);
            border-radius: 10px;
        }
        .player-profile-photo {
            flex: 0 0 144px;
            width: 144px;
            height: 200px;
            object-fit: cover;
            object-position: center top;
            border-radius: 8px;
            border: 3px solid var(--accent-green);
            background: #0f3460;
            outline: 1px solid rgba(46, 204, 113, 0.5);
            outline-offset: 3px;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
        }
        .profile-eyebrow {
            margin: 0 0 5px;
            color: var(--accent-green);
            font-size: 11px;
            font-weight: bold;
            letter-spacing: 1px;
        }
        .player-profile-hero h2 {
            margin: 0;
            border: 0;
            text-align: left;
        }
        .profile-subtitle { margin: 8px 0 0; color: #bdc3c7; }
        .player-profile-identity { flex: 1 1 235px; min-width: 0; }
        .profile-career-titles {
            flex: 1 1 280px;
            align-self: stretch;
            min-width: 240px;
            max-height: 200px;
            padding: 13px 14px;
            box-sizing: border-box;
            overflow: hidden;
            background: rgba(15, 52, 96, 0.72);
            border: 1px solid rgba(241, 196, 15, 0.35);
            border-radius: 8px;
        }
        .profile-career-titles h3 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin: 0 0 8px;
            padding-bottom: 7px;
            border-bottom: 1px solid rgba(241, 196, 15, 0.25);
            color: #f1c40f;
            font-size: 14px;
            text-align: left;
        }
        .profile-career-titles h3 > strong {
            min-width: 25px;
            padding: 2px 7px;
            border-radius: 12px;
            color: #111a33;
            background: #f1c40f;
            font-size: 12px;
            text-align: center;
        }
        .profile-career-titles ul {
            max-height: 143px;
            margin: 0;
            padding: 0 4px 0 0;
            overflow-y: auto;
            list-style: none;
        }
        .profile-career-titles li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            padding: 6px 1px;
            border-bottom: 1px solid rgba(189, 195, 199, 0.13);
            color: #ecf0f1;
            font-size: 12px;
        }
        .profile-career-titles li:last-child { border-bottom: 0; }
        .profile-career-titles li > span { min-width: 0; overflow-wrap: anywhere; }
        .profile-career-titles li > strong { flex: 0 0 auto; color: var(--accent-green); font-size: 13px; }
        .profile-career-titles time { color: var(--accent-green); font-weight: bold; white-space: nowrap; }
        .profile-career-title-unknown { color: #bdc3c7; font-size: 11px; }
        .profile-career-titles .profile-career-titles-empty {
            justify-content: center;
            padding: 25px 5px;
            color: #95a5a6;
            font-style: italic;
            text-align: center;
        }
        .profile-stat-grid {
            display: grid;
            grid-template-columns: repeat(5, minmax(120px, 1fr));
            gap: 10px;
            margin-bottom: 16px;
        }
        .profile-ranking-card {
            min-height: 68px;
            padding: 12px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background: #0f3460;
            border: 1px solid var(--border-color);
            border-radius: 7px;
        }
        .profile-ranking-card span { color: #bdc3c7; font-size: 11px; }
        .profile-ranking-card strong { color: #f1c40f; font-size: 21px; }
        .profile-average-card strong { color: var(--accent-green); }
        .profile-panel {
            margin-bottom: 16px;
            padding: 16px;
            background: #16213e;
            border: 1px solid var(--border-color);
            border-radius: 8px;
        }
        .profile-panel h3 {
            margin: 0 0 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            color: #ecf0f1;
            font-size: 16px;
            text-align: left;
        }
        .profile-list { margin: 0; padding: 0; list-style: none; }
        .profile-list-item {
            padding: 9px 0;
            border-bottom: 1px solid rgba(189, 195, 199, 0.16);
        }
        .profile-list-item:last-child { border-bottom: 0; }
        .profile-list-item div { display: flex; justify-content: space-between; gap: 12px; }
        .profile-list-item span { color: var(--accent-green); font-size: 13px; white-space: nowrap; }
        .profile-list-item small { display: block; margin-top: 3px; color: #bdc3c7; }
        .profile-empty { margin: 0; color: #bdc3c7; font-style: italic; }
        .profile-match-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; }
        .profile-match-stat-grid small, .profile-stats-note { color: #bdc3c7; font-size: 12px; line-height: 1.6; }
        .profile-stats-note { margin: 8px 0; }
        .profile-recent-balance { color: #fff; font-weight: bold; }
        .profile-recent-match { display: grid; grid-template-columns: 85px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
        .profile-recent-match:last-child { border-bottom: 0; }
        .profile-recent-match > div { min-width: 0; overflow-wrap: anywhere; }
        .profile-recent-match small { display: block; color: #bdc3c7; font-size: 11px; line-height: 1.6; }
        .profile-match-result { padding: 6px 8px; border-radius: 5px; text-align: center; font-size: 11px; font-weight: bold; }
        .profile-match-win { color: #8ee6b2; background: #173c32; }
        .profile-match-loss { color: #ffc2be; background: #492b32; }
        .profile-match-score { text-align: right; }
        .profile-match-score > strong { color: #f1c40f; font-size: 20px; }
        @media (max-width: 600px) {
            .profile-match-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .profile-recent-match { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
            .profile-match-result { grid-column: 1 / -1; justify-self: start; }
        }
        .supporter-entry {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
            min-height: 44px;
            padding: 6px 0;
        }
        .supporter-tiktok-link,
        .supporter-x-link,
        .supporter-youtube-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-sizing: border-box;
            min-height: 44px;
            padding: 8px 12px;
            border-radius: 8px;
            background: #c00;
            color: #fff;
            font-size: 14px;
            line-height: 1;
            letter-spacing: 0;
            text-decoration: none;
        }
        .supporter-youtube-link:hover { background: #a80000; }
        .supporter-x-link { background: #0f1419; }
        .supporter-x-link:hover { background: #273340; }
        .supporter-tiktok-link { background: #101010; box-shadow: inset 0 0 0 1px #25f4ee; }
        .supporter-tiktok-link:hover { background: #161616; box-shadow: inset 0 0 0 1px #fe2c55; }
        .supporter-tiktok-link:focus-visible,
        .supporter-x-link:focus-visible,
        .supporter-youtube-link:focus-visible {
            outline: 3px solid #f1c40f;
            outline-offset: 4px;
        }
        .world-cup-intro { margin: 0 0 14px; color: #bdc3c7; text-align: center; font-size: 13px; }
        .world-cup-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
        .world-cup-group { padding: 10px; background: #16213e; border: 1px solid var(--border-color); border-radius: 7px; }
        .world-cup-group h4 { margin: 0 0 7px; color: var(--accent-green); font-size: 14px; }
        .world-cup-group-row { display: flex; justify-content: space-between; gap: 6px; padding: 4px 0; color: #bdc3c7; font-size: 12px; }
        .world-cup-player-team { color: #f1c40f; font-weight: bold; }
        .world-cup-mini-matches { margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(189, 195, 199, 0.18); }
        .world-cup-mini-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 8px; font-size: 11px; color: #7f8c8d; }
        .world-cup-mini-home { text-align: right; }
        .world-cup-mini-away { text-align: left; }
        .world-cup-mini-match strong { color: #ecf0f1; }
        .world-cup-mini-match-watchable { row-gap: 4px; padding: 3px 0; }
        .world-cup-mini-match .world-cup-watch-btn { grid-column: 1 / -1; justify-self: end; background: #8e44ad; font-size: 11px; }
        .world-cup-mini-match .world-cup-watch-btn:hover { background: #a569bd; }
        .bracket-match .world-cup-watch-btn { background: #8e44ad; }
        .bracket-match .world-cup-watch-btn:hover { background: #a569bd; }
        .grand-slam-group-match { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 0; font-size: 11px; color: #bdc3c7; }
        .grand-slam-group-match .grand-slam-watch-btn { margin-left: auto; background: #8e44ad; font-size: 11px; }
        .grand-slam-group-match .grand-slam-watch-btn:hover { background: #a569bd; }
        .score-photo.world-cup-flag-photo { object-fit: contain; padding: 14px; box-sizing: border-box; border-color: var(--accent-green); background: #16213e; }
        .world-cup-qualifications { margin: 0 0 16px; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(22, 33, 62, 0.65); }
        .world-cup-qualifications h3 { margin: 0 0 5px; color: var(--accent-green); font-size: 16px; }
        .world-cup-qualifications > p { margin: 0 0 10px; color: #bdc3c7; font-size: 12px; }
        .world-cup-qualifier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
        .world-cup-qualifier-event { padding: 8px; border-radius: 6px; background: #111a33; }
        .world-cup-qualifier-event h4 { margin: 0 0 5px; color: #ecf0f1; font-size: 12px; }
        .world-cup-qualifier-event h4 small { color: #7f8c8d; font-size: 10px; font-weight: normal; }
        .world-cup-qualifier-event ol { margin: 0; padding: 0; list-style: none; }
        .world-cup-qualifier-event li { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; color: #9da9bb; font-size: 11px; }
        .world-cup-qualifier-event li strong { color: #7f8c8d; font-size: 10px; }
        .world-cup-qualifier-event li.world-cup-qualified { color: #f1c40f; font-weight: bold; }
        .world-cup-qualifier-event li.world-cup-qualified strong { color: var(--accent-green); }
        @media (max-width: 700px) {
            .player-profile-hero { align-items: flex-start; gap: 12px; padding: 14px; }
            .player-profile-photo { flex-basis: 92px; width: 92px; height: 128px; }
            .profile-career-titles { flex-basis: 100%; min-width: 100%; max-height: 220px; }
            .profile-career-titles ul { max-height: 163px; }
            .profile-stat-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
            .profile-list-item div { flex-direction: column; gap: 3px; }
            .world-cup-groups { grid-template-columns: 1fr; }
            .world-cup-qualifier-grid { grid-template-columns: 1fr; }
        }
    
