:root {
    --hud-border: rgba(150, 205, 255, 0.54);
    --hud-border-soft: rgba(150, 205, 255, 0.32);
    --hud-bg-top: rgba(10, 19, 34, 0.9);
    --hud-bg-bottom: rgba(7, 13, 24, 0.9);
    --hud-text: rgba(226, 242, 255, 0.98);
    --hud-text-dim: rgba(183, 214, 241, 0.9);
    --hud-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    --hud-radius: 13px;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #050b13;
}

* {
    box-sizing: border-box;
}

/* Global body styles */
body {
    position: relative;
    min-height: 100%;
    font-family: 'Sora', sans-serif;
    background: linear-gradient(180deg, #09111f 0%, #0d1a2e 55%, #12253f 100%);
    color: white;
}

html.fullscreen-idle-cursor-hidden,
html.fullscreen-idle-cursor-hidden * {
    cursor: none !important;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 78%, rgba(121, 189, 255, 0.18), rgba(121, 189, 255, 0) 44%),
        radial-gradient(circle at 18% 16%, rgba(88, 161, 255, 0.11), rgba(88, 161, 255, 0) 36%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(1, 3, 6, 0.5) 78%);
}

/* Game canvas styles */
canvas#gameCanvas {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #050b13;
    background: linear-gradient(180deg, rgba(6, 12, 22, 0.48), rgba(9, 14, 24, 0.66));
    box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.62);
}

#scorePopupLayer {
    position: fixed;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    overflow: hidden;
}

.scorePopup {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 84px;
    padding: 7px 10px 6px;
    border-radius: 11px;
    border: 1px solid rgba(183, 225, 255, 0.56);
    background: linear-gradient(168deg, rgba(9, 23, 40, 0.84), rgba(6, 16, 30, 0.72));
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.36),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: rgba(242, 250, 255, 0.98);
    transform: translate3d(-9999px, -9999px, 0);
    transform-origin: center center;
    text-align: center;
    will-change: transform, opacity;
}

.scorePopupPrimary {
    font-family: 'Orbitron', sans-serif;
    font-size: 19px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-shadow: 0 0 18px rgba(147, 211, 255, 0.45);
}

.scorePopupMeta {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.45px;
    color: rgba(210, 230, 248, 0.9);
    text-transform: uppercase;
    white-space: nowrap;
}

.scorePopupCombo {
    border-color: rgba(255, 222, 148, 0.72);
    background: linear-gradient(168deg, rgba(36, 27, 10, 0.88), rgba(19, 15, 8, 0.74));
}

.scorePopupCombo .scorePopupPrimary {
    color: #ffe2a2;
    text-shadow: 0 0 16px rgba(255, 193, 90, 0.54);
}

.scorePopupRisk {
    border-color: rgba(255, 170, 121, 0.76);
}

.scorePopupEndgame {
    border-color: rgba(255, 122, 122, 0.84);
    box-shadow:
        0 14px 28px rgba(31, 0, 0, 0.32),
        inset 0 0 0 1px rgba(255, 154, 154, 0.14);
}

#raceIntroOverlay {
    position: fixed;
    inset: 0;
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease;
}

#raceIntroOverlay[hidden] {
    display: none;
}

#raceIntroOverlay.active {
    opacity: 1;
}

#raceIntroOverlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(4, 8, 15, 0.62),
            rgba(4, 8, 15, 0.2) 28%,
            rgba(4, 8, 15, 0.16) 72%,
            rgba(4, 8, 15, 0.62)
        ),
        radial-gradient(circle at 50% 48%, rgba(102, 182, 255, 0.18), rgba(8, 14, 23, 0) 48%);
}

#raceIntroCount,
#raceIntroCaption {
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    text-align: center;
}

#raceIntroCount {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: clamp(2px, 1.2vw, 7px);
    line-height: 0.9;
    font-size: clamp(72px, 19vw, 240px);
    color: #e8f8ff;
    text-shadow:
        0 0 16px rgba(191, 241, 255, 0.75),
        0 0 52px rgba(80, 174, 255, 0.54);
}

#raceIntroCaption {
    margin-top: 3px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: clamp(1.6px, 0.4vw, 3.4px);
    font-size: clamp(11px, 1.6vw, 20px);
    color: rgba(216, 238, 255, 0.95);
}

#raceIntroOverlay.pulse #raceIntroCount {
    animation: raceIntroPulse 760ms cubic-bezier(0.17, 0.89, 0.32, 1.18) both;
}

#raceIntroOverlay.go #raceIntroCount {
    background: linear-gradient(108deg, #ffffff 0%, #d2fbff 38%, #9dfca8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: raceIntroGo 920ms cubic-bezier(0.16, 0.88, 0.26, 1.15) both;
}

#raceIntroOverlay.go #raceIntroCaption {
    color: rgba(194, 255, 214, 0.98);
}

@keyframes raceIntroPulse {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.5);
        filter: blur(9px);
    }
    22% {
        opacity: 1;
        transform: translateY(0) scale(1.16);
        filter: blur(0);
    }
    68% {
        opacity: 1;
        transform: translateY(0) scale(0.98);
    }
    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.82);
    }
}

@keyframes raceIntroGo {
    0% {
        opacity: 0;
        transform: translateY(26px) scale(0.6);
        filter: blur(11px);
    }
    30% {
        opacity: 1;
        transform: translateY(0) scale(1.22);
        filter: blur(0);
    }
    72% {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }
    100% {
        opacity: 0;
        transform: translateY(-12px) scale(0.94);
    }
}

.controlsPanelCard {
    border: 1px solid rgba(154, 205, 243, 0.45);
    border-radius: 12px;
    padding: 10px;
    background: linear-gradient(165deg, rgba(10, 22, 36, 0.86), rgba(7, 15, 24, 0.86));
    box-shadow: inset 0 0 0 1px rgba(220, 241, 255, 0.04);
}

.controlsPanelHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.controlsPanelTitle {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(208, 234, 251, 0.96);
}

.controlsPanelKicker {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(166, 206, 233, 0.9);
}

.controlsPanelBody {
    margin-top: 9px;
    display: grid;
    gap: 8px;
}

.controlsPanelGroup {
    display: grid;
    gap: 6px;
}

.controlsPanelGroupTitle {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(166, 206, 233, 0.92);
}

.controlsPanelRows {
    display: grid;
    gap: 5px;
}

.controlsPanelRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 9px;
    border: 1px solid rgba(140, 192, 233, 0.3);
    background: rgba(11, 25, 40, 0.58);
}

.controlsPanelRow[data-available='false'] {
    opacity: 0.62;
}

.controlsPanelMeta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.controlsPanelAction {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: rgba(225, 242, 255, 0.97);
}

.controlsPanelHint {
    font-size: 10px;
    line-height: 1.25;
    color: rgba(170, 207, 232, 0.88);
}

.controlsPanelKeys {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.controlsPanelKey {
    border: 1px solid rgba(167, 211, 241, 0.62);
    border-radius: 7px;
    min-width: 26px;
    height: 24px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: rgba(231, 246, 255, 0.98);
    background: linear-gradient(180deg, rgba(21, 46, 72, 0.84), rgba(14, 31, 49, 0.84));
    letter-spacing: 0.45px;
    white-space: nowrap;
}

.controlsPanelAvailability {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: -2px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(255, 192, 139, 0.95);
}

#welcomeControlsPanel {
    margin-top: 2px;
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 6;
}

.welcomeControlsToggleBtn {
    border: 1px solid rgba(151, 199, 232, 0.46);
    border-radius: 10px;
    min-height: 40px;
    padding: 0 11px;
    background: linear-gradient(170deg, rgba(14, 31, 48, 0.74), rgba(8, 18, 31, 0.74));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(220, 241, 255, 0.97);
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.95px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.welcomeControlsToggleBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    border-color: rgba(189, 222, 245, 0.74);
}

.welcomeControlsToggleBtn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.welcomeControlsToggleBtn:focus-visible {
    outline: 2px solid rgba(186, 221, 246, 0.84);
    outline-offset: 2px;
}

.welcomeControlsToggleTitle {
    white-space: nowrap;
}

.welcomeControlsToggleHint {
    color: rgba(167, 206, 232, 0.94);
    font-size: 9px;
    letter-spacing: 0.85px;
}

#welcomeControlsPanel[data-open='true'] .welcomeControlsToggleBtn {
    border-color: rgba(175, 220, 248, 0.7);
    background: linear-gradient(170deg, rgba(17, 38, 60, 0.8), rgba(10, 23, 38, 0.8));
}

.welcomeControlsDisclosurePanel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 7;
}

.welcomeControlsDisclosurePanel[hidden] {
    display: none;
}

#welcomeControlsPanel .controlsPanelBody {
    max-height: min(30vh, 250px);
    overflow: auto;
    padding-right: 2px;
}

#pauseControlsPanel {
    margin-bottom: 12px;
}

#pauseControlsPanel .controlsPanelBody {
    max-height: min(36vh, 320px);
    overflow: auto;
    padding-right: 2px;
}

@media (max-width: 900px) {
    .controlsPanelAction {
        font-size: 10px;
    }

    .controlsPanelKey {
        min-width: 24px;
        height: 22px;
        font-size: 9px;
        padding: 0 6px;
    }
}

@media (max-width: 720px) {
    #pauseControlsPanel .controlsPanelBody,
    #welcomeControlsPanel .controlsPanelBody {
        max-height: min(28vh, 220px);
    }
}

#botPanel {
    position: fixed;
    left: 18px;
    top: 18px;
    width: 260px;
}

#botList {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

#miniMapHud {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 6;
    width: min(258px, calc(100vw - 34px));
    border: 1px solid rgba(157, 210, 255, 0.52);
    border-radius: 14px;
    padding: 9px;
    background: linear-gradient(166deg, rgba(9, 20, 36, 0.94), rgba(6, 13, 24, 0.92));
    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(220, 240, 255, 0.06);
    backdrop-filter: blur(6px);
}

#miniMapCanvas {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(145, 198, 239, 0.44);
    background: radial-gradient(circle at 50% 50%, rgba(30, 48, 70, 0.34), rgba(10, 17, 29, 0.9));
}

.miniMapMeta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(192, 224, 247, 0.92);
    font-weight: 700;
}

#miniMapModeLabel {
    color: rgba(226, 245, 255, 0.98);
}

#miniMapRangeLabel {
    color: rgba(173, 222, 255, 0.94);
}

#worldMapOverlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.8vw, 24px);
    background:
        radial-gradient(circle at 22% 20%, rgba(98, 166, 234, 0.16), rgba(4, 8, 14, 0) 34%),
        radial-gradient(circle at 78% 80%, rgba(112, 218, 196, 0.12), rgba(4, 8, 14, 0) 36%),
        rgba(3, 7, 13, 0.82);
    backdrop-filter: blur(4px);
}

#worldMapOverlay[hidden] {
    display: none;
}

.worldMapShell {
    --world-map-shell-side: min(1320px, calc(100vw - 22px), calc(100vh - 22px));
    width: var(--world-map-shell-side);
    height: var(--world-map-shell-side);
    border: 1px solid rgba(164, 216, 255, 0.48);
    border-radius: 16px;
    background: linear-gradient(164deg, rgba(8, 17, 30, 0.95), rgba(5, 12, 22, 0.95));
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.56),
        inset 0 0 0 1px rgba(224, 243, 255, 0.06);
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.worldMapHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(142, 196, 240, 0.26);
    background: linear-gradient(180deg, rgba(14, 29, 49, 0.84), rgba(9, 18, 31, 0.7));
}

.worldMapTitleWrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.worldMapKicker {
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(165, 207, 239, 0.9);
    font-weight: 700;
}

.worldMapTitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 800;
    color: rgba(231, 247, 255, 0.98);
}

.worldMapHeaderActions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.worldMapBtn {
    border: 1px solid rgba(150, 206, 251, 0.56);
    border-radius: 9px;
    padding: 8px 10px;
    background: rgba(18, 40, 66, 0.74);
    color: rgba(232, 247, 255, 0.97);
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    letter-spacing: 0.7px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease;
}

.worldMapBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.worldMapBtn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.worldMapBtn.close {
    border-color: rgba(255, 169, 169, 0.64);
    background: rgba(88, 35, 43, 0.72);
    color: rgba(255, 232, 232, 0.97);
}

.worldMapBody {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 272px;
}

#worldMapCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    background:
        radial-gradient(circle at 50% 50%, rgba(16, 33, 53, 0.6), rgba(9, 17, 30, 0.92)),
        linear-gradient(180deg, rgba(9, 19, 33, 0.98), rgba(5, 12, 21, 0.98));
}

.worldMapSidebar {
    border-left: 1px solid rgba(142, 196, 240, 0.22);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: auto;
    background: linear-gradient(180deg, rgba(11, 23, 39, 0.92), rgba(7, 14, 25, 0.92));
}

.worldMapSectionTitle {
    margin-top: 4px;
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(167, 208, 237, 0.94);
    font-weight: 700;
}

.worldMapSectionTitle.compact {
    margin-top: 10px;
}

.worldMapFilterRow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(224, 243, 255, 0.94);
    font-weight: 600;
    user-select: none;
}

.worldMapFilterRow input {
    margin: 0;
}

.worldMapLegend {
    min-height: 58px;
    border: 1px solid rgba(133, 187, 231, 0.28);
    border-radius: 9px;
    padding: 8px;
    background: rgba(10, 24, 40, 0.62);
    color: rgba(206, 233, 251, 0.94);
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-line;
}

.worldMapCoordReadout {
    border: 1px solid rgba(133, 187, 231, 0.28);
    border-radius: 9px;
    padding: 7px 8px;
    background: rgba(10, 24, 40, 0.62);
    color: rgba(183, 223, 249, 0.92);
    font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.6px;
}

.worldMapHint {
    margin-top: 2px;
    border: 1px solid rgba(133, 187, 231, 0.24);
    border-radius: 9px;
    padding: 8px;
    background: rgba(10, 24, 40, 0.52);
    color: rgba(173, 214, 243, 0.9);
    font-size: 11px;
    line-height: 1.4;
}

body.world-map-open #botPanel,
body.world-map-open #multiplayerPanel,
body.world-map-open #miniMapHud {
    opacity: 0;
    pointer-events: none;
}

body.edit-mode-active #miniMapHud,
body.race-intro-active #miniMapHud {
    opacity: 0;
    pointer-events: none;
}

.botRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        'name stats'
        'target stats'
        'lives stats';
    align-items: center;
    column-gap: 10px;
    row-gap: 3px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(19, 35, 58, 0.5);
    border: 1px solid rgba(137, 186, 238, 0.16);
}

.botRespawning {
    opacity: 0.78;
}

.botRowPlayer {
    background: rgba(48, 38, 16, 0.58);
    border-color: rgba(255, 208, 117, 0.36);
}

.botRowPlayer .botName {
    color: rgba(255, 236, 176, 0.98);
}

.botName {
    grid-area: name;
    min-width: 0;
    color: rgba(221, 240, 255, 0.96);
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.botTarget {
    grid-area: target;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(236, 246, 255, 0.96);
}

.botTargetLabel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.botSwatch {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(230, 242, 255, 0.72);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.19);
    flex: 0 0 auto;
}

.botLivesWrap {
    grid-area: lives;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.botLivesPips {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.botLifePip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(228, 243, 255, 0.5);
}

.botLifePip.active {
    background: rgba(255, 97, 97, 0.98);
    box-shadow: 0 0 8px rgba(255, 90, 90, 0.46);
}

.botLifePip.empty {
    background: rgba(177, 202, 232, 0.2);
    border-color: rgba(191, 213, 238, 0.28);
}

.botLivesLabel {
    color: rgba(221, 237, 255, 0.9);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.24px;
    min-width: 0;
    white-space: nowrap;
}

.botStats {
    grid-area: stats;
    min-width: 46px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.botScore {
    color: #ffffff;
    font-weight: 800;
    min-width: 0;
    text-align: right;
    line-height: 1;
}

.botCollected {
    color: rgba(188, 215, 239, 0.92);
    font-weight: 700;
    min-width: 0;
    text-align: right;
    letter-spacing: 0.2px;
    line-height: 1;
}

#botPanel {
    z-index: 4;
    padding: 11px 12px 10px;
    border: 1px solid var(--hud-border);
    border-radius: var(--hud-radius);
    background: linear-gradient(170deg, var(--hud-bg-top), var(--hud-bg-bottom));
    color: var(--hud-text);
    font-family: 'Sora', sans-serif;
    letter-spacing: 0.4px;
    box-shadow:
        var(--hud-shadow),
        inset 0 0 0 1px rgba(218, 240, 255, 0.05);
}

#botPanel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid var(--hud-border-soft);
}

#finalLeaderboard {
    position: fixed;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 2.8vw, 34px);
    background:
        radial-gradient(circle at 50% 18%, rgba(143, 208, 255, 0.16), rgba(7, 11, 18, 0) 44%),
        rgba(4, 8, 15, 0.76);
    backdrop-filter: blur(6px) saturate(1.08);
}

#finalLeaderboard[hidden] {
    display: none;
}

.leaderboardCard {
    width: min(900px, 100%);
    max-height: calc(100vh - clamp(24px, 4.2vh, 48px));
    border: 1px solid rgba(255, 229, 152, 0.5);
    border-radius: 20px;
    padding: clamp(16px, 2.4vw, 28px);
    background: linear-gradient(170deg, rgba(18, 26, 46, 0.95), rgba(7, 13, 26, 0.95));
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(250, 240, 199, 0.08);
    color: #e8f3ff;
    font-family: 'Sora', sans-serif;
    overflow: auto;
}

.leaderboardHero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.leaderboardHeroCopy {
    min-width: 0;
}

#leaderboardTitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(28px, 4.2vw, 48px);
    font-weight: 800;
    letter-spacing: 1.4px;
    line-height: 0.95;
    color: #ffe7a4;
    text-transform: uppercase;
}

#leaderboardSummary {
    margin-top: 7px;
    font-size: clamp(13px, 1.4vw, 19px);
    color: rgba(220, 237, 255, 0.94);
    line-height: 1.35;
}

.leaderboardDetailsToggle {
    border: 1px solid rgba(168, 211, 255, 0.64);
    border-radius: 10px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(28, 63, 106, 0.74), rgba(18, 43, 76, 0.74));
    color: rgba(234, 247, 255, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease;
}

.leaderboardDetailsToggle:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.leaderboardDetailsToggle:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.leaderboardKpiGrid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.leaderboardKpi {
    min-height: 84px;
    border: 1px solid rgba(152, 198, 249, 0.34);
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(170deg, rgba(15, 34, 61, 0.76), rgba(8, 19, 37, 0.76));
    box-shadow: inset 0 0 0 1px rgba(229, 241, 255, 0.05);
}

.leaderboardKpiLabel {
    color: rgba(186, 217, 246, 0.92);
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

.leaderboardKpiValue {
    margin-top: 5px;
    color: rgba(242, 249, 255, 0.99);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(20px, 2.4vw, 34px);
    line-height: 1.02;
    letter-spacing: 0.4px;
    font-weight: 800;
}

.leaderboardSectionHeader {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.leaderboardSectionTitle {
    font-size: 12px;
    letter-spacing: 1.2px;
    color: rgba(206, 232, 255, 0.94);
    font-weight: 800;
    text-transform: uppercase;
}

.leaderboardTableHead {
    margin-top: 6px;
    padding: 0 14px 7px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 170px 96px;
    gap: 10px;
    color: rgba(185, 214, 240, 0.88);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#leaderboardList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboardRow {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 170px 96px;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(128, 181, 238, 0.24);
    background: linear-gradient(160deg, rgba(16, 34, 60, 0.7), rgba(10, 22, 40, 0.7));
    box-shadow: inset 0 0 0 1px rgba(223, 240, 255, 0.03);
}

.leaderboardRow.winner {
    border-color: rgba(255, 218, 112, 0.68);
    background: linear-gradient(160deg, rgba(87, 71, 34, 0.58), rgba(35, 29, 14, 0.58));
}

.leaderboardRow.is-player {
    border-color: rgba(148, 224, 255, 0.64);
    box-shadow:
        inset 0 0 0 1px rgba(175, 230, 255, 0.3),
        0 0 24px rgba(83, 170, 246, 0.18);
}

.leaderboardRank {
    min-width: 52px;
    color: rgba(215, 233, 251, 0.95);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(22px, 2.6vw, 36px);
    font-weight: 800;
    text-align: right;
    letter-spacing: 0.5px;
}

.leaderboardName {
    min-width: 0;
    color: #f1f8ff;
    font-size: clamp(22px, 2.5vw, 34px);
    font-weight: 800;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboardNameTag {
    border: 1px solid rgba(139, 218, 255, 0.54);
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(34, 82, 128, 0.55);
    color: rgba(214, 239, 255, 0.96);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1;
    flex: 0 0 auto;
}

.leaderboardNameTag.winner {
    border-color: rgba(255, 215, 116, 0.62);
    background: rgba(102, 76, 26, 0.56);
    color: #ffe4a5;
}

.leaderboardScore {
    color: #ffefc2;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(24px, 2.7vw, 39px);
    font-weight: 800;
    min-width: 104px;
    text-align: right;
    line-height: 1.02;
}

.leaderboardCollected {
    color: rgba(219, 238, 255, 0.96);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(20px, 2vw, 31px);
    font-weight: 700;
    min-width: 64px;
    text-align: right;
    line-height: 1.02;
}

#leaderboardDetailsPanel {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid rgba(136, 188, 240, 0.34);
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(11, 25, 45, 0.72), rgba(7, 16, 31, 0.72));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#leaderboardDetailsPanel[hidden] {
    display: none;
}

.leaderboardDetailsBlock {
    border: 1px solid rgba(150, 198, 246, 0.24);
    border-radius: 10px;
    padding: 9px 10px;
    background: rgba(10, 23, 40, 0.62);
}

.leaderboardDetailsLabel {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(188, 219, 246, 0.9);
    text-transform: uppercase;
}

#leaderboardScoringModel {
    margin-top: 6px;
    color: rgba(214, 236, 255, 0.94);
    font-size: 13px;
    line-height: 1.4;
}

#leaderboardBreakdownList {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.leaderboardBreakdownRow {
    border: 1px solid rgba(142, 190, 240, 0.2);
    border-radius: 9px;
    padding: 8px 9px;
    background: rgba(12, 27, 48, 0.54);
}

.leaderboardBreakdownHead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.leaderboardBreakdownName {
    color: rgba(233, 244, 255, 0.98);
    font-size: 13px;
    font-weight: 700;
}

.leaderboardBreakdownScore {
    color: #ffe8af;
    font-size: 13px;
    font-weight: 700;
}

.leaderboardBreakdownMeta {
    margin-top: 4px;
    color: rgba(191, 220, 247, 0.94);
    font-size: 12px;
    line-height: 1.35;
}

.leaderboardActions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.leaderboardBtn {
    border: 1px solid rgba(184, 219, 255, 0.68);
    border-radius: 11px;
    padding: 14px 14px;
    text-transform: uppercase;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        background 120ms ease;
}

.leaderboardBtn.restart {
    border-color: rgba(255, 219, 124, 0.82);
    background: linear-gradient(180deg, rgba(255, 211, 105, 0.42), rgba(255, 181, 65, 0.28));
    color: #fff8e1;
    box-shadow:
        0 8px 22px rgba(126, 77, 5, 0.34),
        inset 0 0 0 1px rgba(255, 240, 194, 0.25);
}

.leaderboardBtn.download {
    border-color: rgba(132, 205, 255, 0.82);
    background: linear-gradient(180deg, rgba(69, 156, 222, 0.42), rgba(47, 112, 175, 0.28));
    color: #eaf6ff;
    box-shadow:
        0 8px 22px rgba(5, 48, 89, 0.32),
        inset 0 0 0 1px rgba(198, 233, 255, 0.18);
}

.leaderboardBtn.exit {
    border-color: rgba(255, 176, 176, 0.68);
    background: linear-gradient(180deg, rgba(124, 49, 59, 0.66), rgba(88, 36, 44, 0.66));
    color: #ffe6e6;
}

.leaderboardBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.leaderboardBtn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.leaderboardBtn:focus-visible,
.leaderboardDetailsToggle:focus-visible {
    outline: 2px solid rgba(203, 234, 255, 0.88);
    outline-offset: 2px;
}

#pauseModal {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 7, 13, 0.62);
    backdrop-filter: blur(4px);
}

#pauseModal[hidden] {
    display: none;
}

.pauseCard {
    width: min(560px, calc(100vw - 28px));
    border: 1px solid rgba(157, 198, 255, 0.56);
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(170deg, rgba(18, 28, 47, 0.95), rgba(9, 15, 29, 0.95));
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.48);
    color: #e9f5ff;
    font-family: 'Sora', sans-serif;
}

#pauseTitle {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.9px;
    margin-bottom: 12px;
    color: #dff0ff;
}

.pauseGraphicsPanel {
    border: 1px solid rgba(157, 198, 255, 0.35);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    background: linear-gradient(165deg, rgba(17, 31, 53, 0.64), rgba(11, 20, 36, 0.74));
    box-shadow: inset 0 0 0 1px rgba(215, 236, 255, 0.05);
}

.pauseGraphicsHeader {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pauseGraphicsLabel {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(191, 222, 250, 0.92);
}

.pauseGraphicsActions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 7px;
}

.pauseActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pauseSupportActions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
}

.pauseBtn {
    border: 1px solid rgba(183, 217, 255, 0.65);
    border-radius: 9px;
    padding: 10px 12px;
    background: rgba(25, 47, 79, 0.74);
    color: #f4fbff;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        background 120ms ease;
}

.pauseBtn.exit {
    border-color: rgba(255, 160, 160, 0.72);
    background: rgba(103, 39, 47, 0.62);
    color: #ffe5e5;
}

.pauseBtn.resume {
    border-color: rgba(164, 238, 188, 0.72);
    background: rgba(35, 88, 56, 0.62);
    color: #e9ffef;
}

.pauseBtn.quality {
    border-color: rgba(186, 220, 255, 0.72);
    background: rgba(33, 63, 104, 0.68);
    color: #eef8ff;
}

.pauseBtn.donate {
    border-color: rgba(146, 213, 255, 0.72);
    background: linear-gradient(180deg, rgba(33, 86, 128, 0.74), rgba(21, 54, 83, 0.74));
    color: rgba(234, 247, 255, 0.99);
}

.pauseBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.pauseBtn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.donateInlineHost {
    display: grid;
    gap: 10px;
}

.donateInlineHost:empty {
    display: none;
}

.donateInlinePanel {
    width: 100%;
    border: 1px solid rgba(162, 205, 239, 0.36);
    border-radius: 16px;
    padding: 13px;
    background: linear-gradient(170deg, rgba(11, 24, 39, 0.95), rgba(8, 17, 28, 0.95));
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(221, 239, 255, 0.05);
    color: rgba(244, 248, 255, 0.98);
    font-family: 'Sora', sans-serif;
    display: grid;
    gap: 12px;
    animation: donateInlineReveal 180ms ease both;
}

.donateInlinePanel[hidden] {
    display: none;
}

#welcomeDonatePanelHost {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 7;
    display: block;
    pointer-events: none;
}

#welcomeDonatePanelHost .donateInlinePanel {
    pointer-events: auto;
    max-height: min(56vh, 520px);
    overflow: auto;
}

.donateInlineHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#donateTitle {
    margin: 0;
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: 1.2px;
    color: rgba(201, 228, 245, 0.98);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
}

.donateDescription {
    margin: 0;
    color: rgba(209, 225, 240, 0.9);
    font-size: 14px;
    line-height: 1.35;
}

.donateAmountPanel {
    border: 1px solid rgba(145, 194, 227, 0.3);
    border-radius: 12px;
    padding: 10px;
    background: rgba(11, 25, 40, 0.66);
    display: grid;
    gap: 10px;
}

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

.donatePresetBtn {
    border: 1px solid rgba(156, 198, 229, 0.42);
    border-radius: 12px;
    min-height: 46px;
    padding: 0 10px;
    background: linear-gradient(180deg, rgba(24, 47, 74, 0.72), rgba(15, 31, 50, 0.75));
    color: rgba(236, 246, 255, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.donatePresetBtn[data-selected='true'] {
    border-color: rgba(154, 233, 222, 0.92);
    background: linear-gradient(180deg, rgba(21, 104, 102, 0.9), rgba(14, 69, 69, 0.92));
    color: rgba(234, 255, 253, 0.99);
}

.donatePresetBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.donateField {
    display: grid;
    gap: 4px;
}

.donateFieldLabel {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: none;
    color: rgba(184, 212, 234, 0.9);
}

.donateInput {
    border: 1px solid rgba(152, 190, 219, 0.46);
    border-radius: 12px;
    background: rgba(5, 16, 30, 0.9);
    color: rgba(236, 246, 255, 0.99);
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 600;
    padding: 9px 11px;
    line-height: 1.1;
}

.donateInput:focus-visible {
    outline: none;
    border-color: rgba(182, 221, 249, 0.92);
    box-shadow: 0 0 0 2px rgba(109, 183, 237, 0.22);
}

#donateCustomAmountInput {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.1px;
    padding-top: 11px;
    padding-bottom: 11px;
    appearance: textfield;
    -moz-appearance: textfield;
}

#donateCustomAmountInput::-webkit-outer-spin-button,
#donateCustomAmountInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.donateStatus {
    min-height: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15px;
    color: rgba(186, 218, 243, 0.9);
}

.donateStatus:empty {
    display: none;
}

.donateStatus[data-tone='muted'] {
    color: rgba(176, 207, 232, 0.9);
}

.donateStatus[data-tone='info'] {
    color: rgba(195, 228, 249, 0.98);
}

.donateStatus[data-tone='error'] {
    color: rgba(255, 195, 195, 0.97);
}

.donateGlobalNoticeLayer {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    z-index: 26;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.donateGlobalNoticeLayer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.donateGlobalNoticeLayer[hidden] {
    display: none;
}

.donateGlobalNotice {
    max-width: min(620px, calc(100vw - 24px));
    border: 1px solid rgba(167, 207, 238, 0.6);
    border-radius: 12px;
    padding: 10px 14px;
    background: linear-gradient(165deg, rgba(10, 24, 42, 0.95), rgba(6, 15, 28, 0.95));
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(212, 236, 255, 0.08);
    color: rgba(222, 241, 255, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    line-height: 1.4;
    text-align: center;
    backdrop-filter: blur(4px);
}

.donateGlobalNotice[data-tone='info'] {
    border-color: rgba(167, 207, 238, 0.6);
    color: rgba(222, 241, 255, 0.98);
}

.donateGlobalNotice[data-tone='muted'] {
    border-color: rgba(150, 175, 201, 0.54);
    color: rgba(204, 222, 238, 0.97);
}

.donateGlobalNotice[data-tone='error'] {
    border-color: rgba(243, 159, 159, 0.62);
    color: rgba(255, 219, 219, 0.99);
    background: linear-gradient(165deg, rgba(45, 15, 19, 0.95), rgba(23, 8, 12, 0.95));
}

.donateGratitudeOverlay {
    position: fixed;
    inset: 0;
    z-index: 34;
    display: grid;
    place-items: center;
    padding: clamp(14px, 4vw, 28px);
    background:
        radial-gradient(circle at 28% 18%, rgba(90, 186, 255, 0.2), rgba(90, 186, 255, 0) 40%),
        radial-gradient(circle at 78% 84%, rgba(255, 170, 82, 0.18), rgba(255, 170, 82, 0) 46%),
        rgba(3, 8, 16, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 210ms ease;
}

.donateGratitudeOverlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.donateGratitudeOverlay[hidden] {
    display: none;
}

.donateGratitudeCard {
    position: relative;
    width: min(620px, calc(100vw - 32px));
    border: 1px solid rgba(187, 223, 250, 0.62);
    border-radius: 18px;
    padding: clamp(18px, 3.2vw, 30px);
    background: linear-gradient(166deg, rgba(8, 24, 42, 0.97), rgba(4, 13, 24, 0.97));
    box-shadow:
        0 22px 54px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(224, 243, 255, 0.08);
    color: rgba(236, 247, 255, 0.99);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    transition: transform 220ms ease;
}

.donateGratitudeOverlay.is-visible .donateGratitudeCard {
    transform: translateY(0) scale(1);
}

.donateGratitudeCard[data-preview='true'] {
    outline: 1px dashed rgba(255, 206, 138, 0.78);
    outline-offset: -8px;
}

.donateGratitudeKicker {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 211, 152, 0.96);
}

.donateGratitudeTitle {
    margin: 9px 0 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(28px, 4.6vw, 42px);
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1.03;
    color: rgba(242, 251, 255, 0.99);
    text-shadow: 0 0 20px rgba(110, 193, 255, 0.3);
}

.donateGratitudeSubtitle {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(13px, 2vw, 16px);
    font-weight: 600;
    line-height: 1.45;
    color: rgba(208, 230, 248, 0.96);
}

.donateGratitudeAmount {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 208, 136, 0.72);
    background: linear-gradient(180deg, rgba(58, 40, 12, 0.82), rgba(31, 22, 7, 0.84));
    color: rgba(255, 233, 190, 0.99);
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.donateGratitudeMessage {
    margin: 16px 0 0;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: rgba(220, 238, 252, 0.96);
}

.donateGratitudeActions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
}

.donateGratitudeContinueBtn {
    border: 1px solid rgba(168, 225, 180, 0.7);
    border-radius: 11px;
    min-height: 42px;
    padding: 0 14px;
    background: linear-gradient(180deg, rgba(75, 196, 126, 0.96), rgba(34, 124, 83, 0.96));
    color: rgba(5, 25, 14, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.donateGratitudeContinueBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.donateGratitudeContinueBtn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.donateGratitudeContinueBtn:focus-visible {
    outline: none;
    border-color: rgba(212, 246, 220, 0.94);
    box-shadow: 0 0 0 2px rgba(132, 219, 155, 0.28);
}

.donateGratitudeCloseBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(171, 210, 241, 0.5);
    border-radius: 9px;
    background: rgba(10, 28, 46, 0.88);
    color: rgba(224, 241, 254, 0.96);
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease;
}

.donateGratitudeCloseBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.donateGratitudeCloseBtn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(141, 194, 231, 0.24);
}

.donateGratitudeGlow {
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(22px);
}

.donateGratitudeGlowA {
    width: 180px;
    height: 180px;
    top: -56px;
    left: -28px;
    background: rgba(90, 182, 255, 0.24);
}

.donateGratitudeGlowB {
    width: 190px;
    height: 190px;
    right: -56px;
    bottom: -74px;
    background: rgba(255, 178, 92, 0.24);
}

.donateActions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.donateSecurityNote {
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24px;
    color: rgba(255, 221, 168, 0.92);
}

.donatePaymentBadges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.donatePaymentBadge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(60, 87, 119, 0.9);
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(19, 29, 45, 0.98), rgba(11, 18, 30, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 1px 0 rgba(0, 0, 0, 0.42);
    overflow: hidden;
    color: rgba(224, 238, 252, 0.96);
    font-family: 'Sora', sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.14px;
    line-height: 1;
}

.donatePaymentBadgeVisa {
    color: rgba(123, 177, 255, 0.98);
    font-size: 9px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 0 rgba(4, 12, 24, 0.85);
}

.donatePaymentBadgeAmex {
    border-color: rgba(68, 134, 180, 0.9);
    background: linear-gradient(180deg, rgba(16, 46, 73, 0.98), rgba(9, 28, 47, 0.98));
}

.donateAmexMark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 14px;
    padding: 0 4px;
    border-radius: 3px;
    border: 1px solid rgba(220, 245, 255, 0.54);
    background: linear-gradient(180deg, rgba(36, 149, 219, 0.98), rgba(8, 105, 168, 0.98));
    color: rgba(235, 247, 255, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 6px;
    font-weight: 900;
    letter-spacing: 0.3px;
    line-height: 1;
}

.donateMastercardMark {
    position: relative;
    width: 21px;
    height: 12px;
    display: inline-block;
}

.donateMastercardCircle {
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.donateMastercardCircleLeft {
    left: 0;
    background: rgba(235, 70, 68, 0.95);
}

.donateMastercardCircleRight {
    right: 0;
    background: rgba(244, 159, 48, 0.94);
}

.donatePaymentBadgeMastercard {
    border-color: rgba(90, 108, 137, 0.9);
    background: linear-gradient(180deg, rgba(21, 34, 56, 0.98), rgba(9, 16, 30, 0.98));
}

.donatePaymentBadgeDiscover {
    border-color: rgba(94, 111, 140, 0.9);
    background: linear-gradient(180deg, rgba(20, 31, 48, 0.98), rgba(11, 20, 33, 0.98));
}

.donateDiscoverMark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 12px;
    padding-right: 8px;
    color: rgba(232, 241, 251, 0.96);
    font-family: 'Sora', sans-serif;
    font-size: 5px;
    font-weight: 900;
    letter-spacing: 0.22px;
}

.donateDiscoverMark::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 8px;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(247, 182, 92, 0.98), rgba(233, 117, 19, 0.96));
}

.donatePaymentBadgeJcb {
    border-color: rgba(94, 111, 140, 0.9);
    background: linear-gradient(180deg, rgba(20, 31, 48, 0.98), rgba(11, 20, 33, 0.98));
}

.donateJcbMark {
    display: grid;
    grid-auto-flow: column;
    gap: 1px;
    width: 23px;
    height: 12px;
}

.donateJcbPill {
    width: 7px;
    height: 12px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.98);
    font-family: 'Sora', sans-serif;
    font-size: 5.2px;
    font-weight: 900;
    line-height: 1;
}

.donateJcbPillBlue {
    background: linear-gradient(180deg, rgba(41, 131, 234, 0.95), rgba(23, 74, 164, 0.95));
}

.donateJcbPillRed {
    background: linear-gradient(180deg, rgba(236, 84, 85, 0.94), rgba(184, 43, 43, 0.94));
}

.donateJcbPillGreen {
    background: linear-gradient(180deg, rgba(102, 200, 109, 0.94), rgba(52, 140, 64, 0.94));
}

.donateBtn {
    border: 1px solid rgba(170, 208, 236, 0.48);
    border-radius: 12px;
    min-height: 48px;
    padding: 0 12px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.donateBtnCheckout {
    border: 1px solid rgba(250, 194, 121, 0.82);
    min-height: 54px;
    background: linear-gradient(180deg, rgba(255, 179, 88, 0.98), rgba(221, 123, 38, 0.97));
    color: rgba(33, 15, 2, 0.98);
    box-shadow:
        0 6px 14px rgba(250, 141, 48, 0.2),
        inset 0 1px 0 rgba(255, 241, 214, 0.62);
    text-transform: none;
    letter-spacing: 0.22px;
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    appearance: none;
}

.donateBtnCheckout:hover {
    border-color: rgba(255, 226, 176, 0.96);
    box-shadow:
        0 8px 16px rgba(250, 141, 48, 0.26),
        inset 0 1px 0 rgba(255, 245, 222, 0.76);
}

.donateBtnCheckout:focus-visible {
    outline: none;
    border-color: rgba(255, 232, 194, 0.98);
    box-shadow:
        0 0 0 2px rgba(255, 196, 109, 0.28),
        0 8px 16px rgba(250, 141, 48, 0.24),
        inset 0 1px 0 rgba(255, 247, 229, 0.76);
}

.donateBtnCheckout:active {
    box-shadow:
        0 4px 8px rgba(250, 141, 48, 0.2),
        inset 0 1px 0 rgba(255, 239, 208, 0.64);
}

.donateBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.donateBtn:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

.donateBtn:disabled {
    opacity: 0.56;
    cursor: wait;
    transform: none;
    filter: none;
}

.pauseSupportActions .donateInlinePanel {
    margin-top: 2px;
}

@keyframes donateInlineReveal {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#multiplayerPanel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 11;
    width: min(320px, calc(100vw - 22px));
    border: 1px solid rgba(164, 214, 255, 0.54);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(165deg, rgba(10, 20, 37, 0.94), rgba(6, 12, 23, 0.94));
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(221, 241, 255, 0.06);
    color: rgba(233, 246, 255, 0.98);
    font-family: 'Sora', sans-serif;
    backdrop-filter: blur(6px);
}

#multiplayerTitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 7px;
    color: rgba(223, 241, 255, 0.98);
}

.mpActionRow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 8px;
}

.mpButton {
    border: 1px solid rgba(168, 217, 255, 0.62);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(25, 47, 78, 0.76);
    color: #eff9ff;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.75px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease;
}

.mpButton:hover:enabled {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.mpButton:disabled {
    opacity: 0.46;
    cursor: not-allowed;
}

.mpButton.leave {
    border-color: rgba(255, 167, 167, 0.72);
    background: rgba(92, 35, 44, 0.72);
    color: rgba(255, 231, 231, 0.97);
}

.mpRoomMeta {
    position: relative;
    margin-top: 8px;
    border: 1px solid rgba(139, 201, 255, 0.42);
    border-radius: 11px;
    padding: 9px 10px;
    background:
        linear-gradient(135deg, rgba(15, 44, 78, 0.52), rgba(8, 25, 46, 0.72)),
        radial-gradient(circle at 16% 12%, rgba(113, 205, 255, 0.16), transparent 58%);
    overflow: hidden;
}

.mpRoomMeta::after {
    content: '';
    position: absolute;
    top: -55%;
    right: -22%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(92, 183, 255, 0.2), transparent 70%);
    pointer-events: none;
}

.mpRoomMetaHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mpRoomMetaLabel {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.05px;
    color: rgba(169, 213, 248, 0.94);
}

.mpRoomMetaBadge {
    border: 1px solid rgba(132, 224, 174, 0.58);
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(28, 94, 62, 0.58);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.9px;
    color: rgba(216, 255, 229, 0.95);
}

.mpRoomMetaValues {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mpRoomCodeValue {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: rgba(226, 245, 255, 0.98);
    text-shadow: 0 0 18px rgba(124, 208, 255, 0.34);
}

.mpPlayerCountValue {
    border: 1px solid rgba(156, 208, 252, 0.58);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(22, 56, 90, 0.68);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.75px;
    color: rgba(210, 237, 255, 0.96);
    white-space: nowrap;
}

.mpRoomMeta[data-state='offline'] .mpRoomMetaBadge {
    border-color: rgba(172, 190, 210, 0.45);
    background: rgba(51, 69, 88, 0.56);
    color: rgba(222, 232, 243, 0.9);
}

.mpRoomMeta[data-state='offline'] .mpRoomCodeValue {
    color: rgba(178, 206, 229, 0.86);
    text-shadow: none;
}

.mpRoomMeta[data-state='active'] .mpRoomCodeValue {
    animation: mpRoomCodePulse 3.2s ease-in-out infinite;
}

@keyframes mpRoomCodePulse {
    0%,
    100% {
        text-shadow: 0 0 18px rgba(124, 208, 255, 0.34);
    }
    50% {
        text-shadow:
            0 0 10px rgba(124, 208, 255, 0.34),
            0 0 26px rgba(124, 208, 255, 0.46);
    }
}

#multiplayerPlayerList {
    margin-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 140px;
    overflow: auto;
    padding-right: 2px;
}

.mpPlayerRow {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border-radius: 8px;
    border: 1px solid rgba(138, 189, 236, 0.2);
    background: rgba(17, 33, 53, 0.56);
}

.mpPlayerName {
    font-size: 11px;
    font-weight: 700;
    color: rgba(233, 246, 255, 0.97);
}

.mpPlayerRole {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.75px;
    color: rgba(161, 208, 241, 0.9);
}

.mpPlayerEmpty {
    font-size: 11px;
    color: rgba(173, 204, 233, 0.9);
}

body.edit-mode-active #botPanel {
    opacity: 0;
    pointer-events: none;
}

body.race-intro-active #botPanel {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

#editModePanel {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 10;
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    border: 1px solid rgba(170, 222, 255, 0.54);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(165deg, rgba(10, 18, 33, 0.94), rgba(7, 12, 24, 0.92));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    color: rgba(226, 242, 255, 0.98);
    font-family: 'Sora', sans-serif;
}

#editModePanel[hidden] {
    display: none;
}

.editModeHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.editModeTitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #edf8ff;
}

.editModeHint {
    margin-top: 2px;
    font-size: 11px;
    color: rgba(177, 213, 240, 0.88);
}

.editModeCloseBtn {
    border: 1px solid rgba(255, 173, 173, 0.66);
    border-radius: 8px;
    padding: 7px 10px;
    background: rgba(102, 38, 49, 0.62);
    color: #ffe8e8;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.editModeBlock {
    border: 1px solid rgba(144, 195, 255, 0.34);
    border-radius: 10px;
    padding: 9px;
    margin-top: 8px;
    background: rgba(10, 20, 36, 0.55);
}

.editModeBlockTitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(178, 215, 244, 0.9);
    margin-bottom: 8px;
}

.editModeViewGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.editModeViewGrid button,
.editModeTools button,
.editModeTuneTools button {
    border: 1px solid rgba(160, 210, 255, 0.4);
    border-radius: 8px;
    padding: 7px 8px;
    background: rgba(24, 47, 78, 0.72);
    color: #e6f5ff;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.editModeViewGrid button:hover,
.editModeTools button:hover,
.editModeTuneTools button:hover,
.editModeCloseBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.editModeViewGrid button.active {
    border-color: rgba(205, 241, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(184, 235, 255, 0.42);
}

.editModeTools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 7px;
}

.editModeTuneTools {
    margin-bottom: 8px;
}

.editModeTuneTools button {
    width: 100%;
}

.editModeSearch {
    width: 100%;
    border: 1px solid rgba(149, 201, 255, 0.46);
    border-radius: 8px;
    padding: 8px 9px;
    background: rgba(11, 23, 40, 0.82);
    color: #ecf7ff;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    margin-bottom: 7px;
}

.editModeSearch::placeholder {
    color: rgba(170, 198, 224, 0.78);
}

.editModePartList {
    max-height: min(48vh, 420px);
    overflow: auto;
    padding-right: 4px;
}

.editModeTuneList {
    max-height: min(42vh, 360px);
    overflow: auto;
    padding-right: 4px;
}

.editModeTuneGroup + .editModeTuneGroup {
    margin-top: 10px;
}

.editModeTuneGroupTitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(168, 208, 239, 0.9);
    margin-bottom: 6px;
}

.editModeTuneRow {
    display: block;
    padding: 6px 0;
}

.editModeTuneRow + .editModeTuneRow {
    border-top: 1px solid rgba(143, 191, 234, 0.16);
}

.editModeTuneRowHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.editModeTuneLabel {
    font-size: 11px;
    color: rgba(227, 243, 255, 0.95);
}

.editModeTuneValue {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: rgba(191, 236, 255, 0.95);
}

.editModeTuneRowInputs {
    display: grid;
    grid-template-columns: 1fr 76px;
    gap: 8px;
}

.editModeTuneRowInputs input[type='range'] {
    width: 100%;
}

.editModeTuneRowInputs input[type='number'] {
    width: 100%;
    border: 1px solid rgba(149, 201, 255, 0.46);
    border-radius: 7px;
    padding: 6px 7px;
    background: rgba(11, 23, 40, 0.82);
    color: #ecf7ff;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
}

.editModePartSection + .editModePartSection {
    margin-top: 8px;
}

.editModeCategoryTitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(168, 208, 239, 0.9);
    margin-bottom: 4px;
}

.editModePartRow {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 2px;
    font-size: 12px;
    color: rgba(227, 243, 255, 0.95);
}

.editModePartRow input {
    margin: 0;
}

.editModeEmpty {
    font-size: 12px;
    color: rgba(170, 203, 230, 0.9);
    padding: 6px 2px;
}

@media (max-width: 720px) {
    #botPanel,
    #miniMapHud {
        display: none;
    }

    #editModePanel {
        left: 10px;
        right: 10px;
        top: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
        padding: 10px;
    }

    .editModeViewGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .editModePartList {
        max-height: min(42vh, 300px);
    }

    .editModeTuneList {
        max-height: min(34vh, 220px);
    }

    #multiplayerPanel {
        right: 10px;
        bottom: 10px;
        width: min(320px, calc(100vw - 20px));
        padding: 10px;
    }

    #multiplayerPlayerList {
        max-height: 106px;
    }
}

@media (max-width: 860px) {
    #botPanel {
        left: 10px;
        top: 10px;
        transform: scale(0.88);
        transform-origin: top left;
    }

    .leaderboardCard {
        width: min(100%, 760px);
        padding: 14px;
    }

    .leaderboardHero {
        flex-direction: column;
        align-items: stretch;
    }

    .leaderboardDetailsToggle {
        align-self: flex-start;
    }

    .leaderboardKpiGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leaderboardTableHead {
        grid-template-columns: 70px minmax(0, 1fr) 138px 82px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .leaderboardRow {
        grid-template-columns: 70px minmax(0, 1fr) 138px 82px;
        gap: 8px;
        padding: 10px;
    }

    #miniMapHud {
        left: 10px;
        bottom: 10px;
        width: min(220px, calc(100vw - 20px));
        padding: 8px;
    }
}

@media (max-width: 620px) {
    .leaderboardCard {
        border-radius: 15px;
        padding: 12px;
    }

    .leaderboardTableHead {
        display: none;
    }

    .leaderboardRow {
        grid-template-columns: 62px minmax(0, 1fr) auto;
        grid-template-areas:
            'rank name score'
            'rank collected collected';
        row-gap: 5px;
    }

    .leaderboardRank {
        grid-area: rank;
    }

    .leaderboardName {
        grid-area: name;
        font-size: clamp(20px, 6vw, 28px);
    }

    .leaderboardScore {
        grid-area: score;
        justify-self: end;
        font-size: clamp(20px, 6vw, 30px);
    }

    .leaderboardCollected {
        grid-area: collected;
        justify-self: start;
        font-size: clamp(16px, 4.8vw, 22px);
    }

    .leaderboardActions {
        grid-template-columns: 1fr;
    }

    .leaderboardBtn {
        font-size: 16px;
    }
}

@media (max-width: 980px) {
    .worldMapShell {
        --world-map-shell-side: min(calc(100vw - 14px), calc(100vh - 14px));
        width: var(--world-map-shell-side);
        height: var(--world-map-shell-side);
        border-radius: 12px;
    }

    .worldMapBody {
        grid-template-columns: 1fr 242px;
    }
}

@media (max-width: 720px) {
    .worldMapShell {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .worldMapHeader {
        padding: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .worldMapHeaderActions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .worldMapBtn {
        padding: 8px 6px;
        font-size: 10px;
    }

    .worldMapBody {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }

    #worldMapCanvas {
        min-height: 46vh;
    }

    .worldMapSidebar {
        border-left: 0;
        border-top: 1px solid rgba(142, 196, 240, 0.22);
        max-height: 42vh;
        padding: 10px;
    }

    .worldMapHint {
        font-size: 10px;
    }
}

/* Welcome Modal - Modern AAA Rebuild */
#welcomeModal {
    position: fixed;
    inset: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 28px);
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 24% 18%, rgba(118, 180, 226, 0.08), rgba(4, 8, 13, 0) 40%),
        radial-gradient(circle at 78% 84%, rgba(238, 166, 108, 0.06), rgba(4, 8, 13, 0) 38%),
        linear-gradient(160deg, rgba(2, 5, 9, 0.965), rgba(3, 7, 12, 0.985));
    backdrop-filter: blur(8px) saturate(1.12);
}

#welcomeModal::before {
    content: '';
    position: absolute;
    inset: -20% -12%;
    background:
        radial-gradient(circle at 58% 10%, rgba(165, 225, 255, 0.14), rgba(165, 225, 255, 0) 36%),
        radial-gradient(circle at 38% 90%, rgba(255, 221, 176, 0.1), rgba(255, 221, 176, 0) 34%);
    filter: blur(28px);
    animation: welcomeAtmosphereShift 14s ease-in-out infinite;
    pointer-events: none;
}

#welcomeModal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0), rgba(2, 5, 9, 0.6) 80%);
    pointer-events: none;
}

#welcomeModal[hidden] {
    display: none;
}

.welcomeNebula {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        140deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(157, 222, 255, 0.07) 40%,
        rgba(255, 255, 255, 0) 72%
    );
    pointer-events: none;
}

.welcomeScanlines {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.6px, rgba(0, 0, 0, 0) 0.6px);
    background-size: 4px 4px;
    opacity: 0.035;
    pointer-events: none;
}

.welcomeShell {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100vw - 24px));
    min-height: min(760px, calc(100vh - 36px));
    display: grid;
    grid-template-columns: minmax(320px, 0.84fr) minmax(0, 1.46fr);
    gap: clamp(10px, 1.8vw, 22px);
    animation: welcomeShellReveal 520ms cubic-bezier(0.18, 0.84, 0.24, 1) both;
}

.welcomeCommandDeck {
    position: relative;
    border: 1px solid rgba(181, 207, 225, 0.46);
    border-radius: 24px;
    padding: clamp(16px, 2vw, 28px);
    background:
        linear-gradient(180deg, rgba(11, 20, 31, 0.92), rgba(7, 13, 21, 0.95)),
        linear-gradient(120deg, rgba(145, 190, 218, 0.06), rgba(145, 190, 218, 0));
    box-shadow:
        0 28px 62px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow: hidden;
}

.welcomeCommandDeck::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(211, 233, 247, 0.85),
        rgba(255, 255, 255, 0)
    );
    pointer-events: none;
}

.welcomeSerial {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(186, 210, 226, 0.95);
}

#welcomeGameName {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(34px, 4.5vw, 60px);
    line-height: 0.95;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    font-weight: 800;
    max-width: 100%;
    overflow-wrap: break-word;
    color: transparent;
    background: linear-gradient(108deg, #f7fbff 0%, #deeffb 34%, #ffffff 54%, #ffdcb2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 30px rgba(178, 216, 242, 0.16);
}

#welcomeTagline {
    margin: 0;
    max-width: 440px;
    font-family: 'Sora', sans-serif;
    font-size: clamp(13px, 1.45vw, 15px);
    line-height: 1.5;
    letter-spacing: 0.2px;
    color: rgba(205, 224, 237, 0.9);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        filter 180ms ease;
    will-change: opacity, transform, filter;
}

.welcomeTaglineFrame {
    height: 72px;
    max-width: 440px;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

#welcomeTagline.tagline-transition-out {
    opacity: 0;
    transform: translateY(7px);
    filter: blur(2px);
}

#welcomeTagline.tagline-transition-in {
    animation: welcomeTaglineFadeIn 280ms cubic-bezier(0.2, 0.84, 0.24, 1) both;
}

.welcomeSpecs {
    display: grid;
    gap: 8px;
}

.welcomeSpecItem {
    border: 1px solid rgba(161, 196, 219, 0.34);
    border-radius: 10px;
    padding: 8px 10px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    color: rgba(216, 233, 244, 0.96);
    text-transform: uppercase;
    background: linear-gradient(96deg, rgba(17, 30, 43, 0.8), rgba(9, 18, 29, 0.82));
}

.welcomeVehicleInfo {
    border: 1px solid rgba(165, 198, 219, 0.32);
    border-radius: 12px;
    padding: 10px 11px;
    background: rgba(11, 21, 33, 0.72);
}

.welcomeVehicleInfoLabel {
    display: block;
    margin-bottom: 5px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(173, 202, 220, 0.9);
}

#welcomeSelectedColorName {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: rgba(243, 249, 255, 0.98);
    text-transform: uppercase;
}

.welcomeStartActions {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

#welcomeStartBtn,
#welcomeStartOnlineBtn,
#welcomeDonateBtn {
    position: relative;
    border: 1px solid rgba(175, 207, 225, 0.54);
    border-radius: 14px;
    min-height: 62px;
    padding: 0 18px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition:
        transform 140ms ease,
        filter 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

#welcomeStartBtn::before,
#welcomeStartOnlineBtn::before,
#welcomeDonateBtn::before {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    top: 1px;
    height: 34%;
    border-radius: 10px 10px 8px 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
    pointer-events: none;
}

#welcomeStartBtn {
    color: #e8fff0;
    border-color: rgba(142, 236, 184, 0.72);
    background: linear-gradient(180deg, rgba(28, 106, 71, 0.9), rgba(13, 48, 31, 0.94));
    box-shadow:
        0 8px 16px rgba(34, 133, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#welcomeStartOnlineBtn {
    color: #eaf7ff;
    border-color: rgba(131, 212, 255, 0.72);
    background: linear-gradient(180deg, rgba(30, 93, 146, 0.88), rgba(14, 41, 67, 0.94));
    box-shadow:
        0 8px 16px rgba(35, 112, 174, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#welcomeDonateBtn {
    color: rgba(230, 246, 255, 0.99);
    border-color: rgba(124, 200, 242, 0.82);
    background: linear-gradient(180deg, rgba(25, 103, 137, 0.91), rgba(13, 56, 82, 0.95));
    box-shadow:
        0 8px 16px rgba(22, 84, 115, 0.22),
        inset 0 1px 0 rgba(219, 241, 255, 0.2);
}

#welcomeStartBtn span,
#welcomeStartOnlineBtn span,
#welcomeDonateBtn span {
    font-size: 18px;
    transform: translateY(-1px);
}

#welcomeStartBtn:hover,
#welcomeStartOnlineBtn:hover,
#welcomeDonateBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    border-color: rgba(214, 232, 246, 0.88);
}

#welcomeStartBtn:active,
#welcomeStartOnlineBtn:active,
#welcomeDonateBtn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

#welcomeDonateBtn:hover {
    border-color: rgba(182, 225, 249, 0.96);
    box-shadow:
        0 10px 18px rgba(22, 84, 115, 0.28),
        inset 0 1px 0 rgba(226, 245, 255, 0.26);
}

#welcomeDonateBtn:focus-visible {
    outline: none;
    border-color: rgba(196, 232, 251, 0.98);
    box-shadow:
        0 0 0 2px rgba(130, 196, 236, 0.24),
        0 10px 18px rgba(22, 84, 115, 0.28),
        inset 0 1px 0 rgba(226, 245, 255, 0.26);
}

#welcomeStartBtn:disabled,
#welcomeStartOnlineBtn:disabled,
#welcomeDonateBtn:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
    filter: none;
    box-shadow: none;
}

#welcomeDonateBtn span {
    color: rgba(202, 232, 251, 0.98);
}

#welcomeModal[data-launching='true'] .welcomeShell {
    pointer-events: none;
}

#welcomeModal[data-online-flow-open='true'] #welcomeDonateBtn,
#welcomeModal[data-online-flow-open='true'] #welcomeDonatePanelHost {
    display: none !important;
}

.welcomeLaunchOverlay {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: grid;
    place-items: center;
    padding: clamp(18px, 2.8vw, 42px);
    background:
        radial-gradient(circle at 50% 34%, rgba(132, 208, 255, 0.16), rgba(8, 15, 24, 0) 36%),
        linear-gradient(160deg, rgba(4, 9, 14, 0.74), rgba(4, 9, 14, 0.88));
    backdrop-filter: blur(7px) saturate(1.16);
    animation: welcomeLaunchOverlayIn 220ms ease both;
}

.welcomeLaunchOverlay[hidden] {
    display: none;
}

.welcomeLaunchCard {
    width: min(520px, calc(100vw - 42px));
    border: 1px solid rgba(176, 212, 232, 0.58);
    border-radius: 20px;
    padding: clamp(16px, 2.1vw, 24px);
    display: grid;
    gap: 10px;
    background:
        linear-gradient(170deg, rgba(13, 26, 40, 0.95), rgba(8, 16, 26, 0.96)),
        linear-gradient(120deg, rgba(146, 208, 242, 0.08), rgba(146, 208, 242, 0));
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.welcomeLaunchTitle {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(182, 214, 233, 0.96);
}

.welcomeLaunchStatus {
    min-height: 19px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.35px;
    color: rgba(231, 242, 250, 0.96);
}

.welcomeLaunchProgress {
    border: 1px solid rgba(152, 202, 229, 0.5);
    border-radius: 999px;
    height: 14px;
    padding: 2px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 18, 29, 0.92), rgba(7, 13, 21, 0.95));
}

.welcomeLaunchProgressFill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(129, 217, 170, 0.96), rgba(108, 186, 238, 0.98));
    box-shadow: 0 0 16px rgba(113, 194, 238, 0.46);
    transition: width 90ms linear;
}

.welcomeLaunchPercent {
    justify-self: end;
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: rgba(182, 214, 233, 0.96);
}

.welcomeOnlineModeFlow {
    border: 1px solid rgba(152, 194, 219, 0.42);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
    background: linear-gradient(170deg, rgba(12, 27, 40, 0.86), rgba(7, 16, 27, 0.88));
    transition:
        opacity 140ms ease,
        filter 140ms ease;
}

.welcomeOnlineModeFlow[hidden] {
    display: grid !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    filter: saturate(0.9);
}

.welcomeOnlineModeTitle {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(188, 215, 231, 0.96);
    text-transform: uppercase;
}

.welcomeOnlineModeChoiceRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.welcomeOnlineModeChoiceBtn {
    border: 1px solid rgba(157, 199, 224, 0.48);
    border-radius: 11px;
    min-height: 44px;
    padding: 0 10px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(223, 236, 246, 0.96);
    text-transform: uppercase;
    background: linear-gradient(180deg, rgba(22, 51, 77, 0.9), rgba(11, 28, 45, 0.92));
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease;
}

.welcomeOnlineModeChoiceBtn[data-selected='true'] {
    color: #ecfff7;
    border-color: rgba(141, 236, 194, 0.88);
    background: linear-gradient(180deg, rgba(30, 99, 70, 0.92), rgba(13, 46, 33, 0.95));
    box-shadow: 0 10px 20px rgba(31, 119, 84, 0.24);
}

.welcomeOnlineModeChoiceBtn:hover,
.welcomeOnlineModeChoiceBtn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    border-color: rgba(210, 232, 246, 0.88);
}

.welcomeOnlineModeLabel {
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.1px;
    color: rgba(173, 204, 221, 0.94);
    text-transform: uppercase;
}

.welcomeOnlineModeInput {
    border: 1px solid rgba(149, 190, 214, 0.46);
    border-radius: 10px;
    min-height: 44px;
    padding: 0 11px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.45px;
    color: rgba(232, 242, 250, 0.98);
    background: rgba(8, 19, 30, 0.82);
}

.welcomeOnlineModeNameInput {
    text-transform: none;
}

.welcomeOnlineModeRoomInput {
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.welcomeOnlineModeInput:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.welcomeOnlineModeInput:focus-visible {
    outline: none;
    border-color: rgba(192, 223, 242, 0.92);
    box-shadow: 0 0 0 2px rgba(124, 182, 219, 0.26);
}

.welcomeOnlineCodeStatus {
    min-height: 18px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(176, 207, 224, 0.92);
}

.welcomeOnlineCodeStatus[data-tone='muted'] {
    color: rgba(166, 198, 216, 0.9);
}

.welcomeOnlineCodeStatus[data-tone='info'] {
    color: rgba(190, 224, 244, 0.96);
}

.welcomeOnlineCodeStatus[data-tone='success'] {
    color: rgba(161, 244, 199, 0.97);
}

.welcomeOnlineCodeStatus[data-tone='error'] {
    color: rgba(255, 178, 178, 0.96);
}

.welcomeOnlineModeActions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.welcomeMetaFooter {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(152, 196, 226, 0.26);
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18px;
    color: rgba(170, 204, 228, 0.86);
}

.welcomeMetaBullet {
    opacity: 0.6;
}

.welcomeMetaLink {
    color: rgba(188, 220, 244, 0.88);
    text-decoration: none;
    border-bottom: 1px solid rgba(188, 220, 244, 0.22);
    transition:
        color 120ms ease,
        border-color 120ms ease,
        filter 120ms ease;
}

.welcomeMetaLink:hover {
    color: rgba(228, 243, 255, 0.98);
    border-color: rgba(228, 243, 255, 0.68);
    filter: brightness(1.04);
}

.welcomeMetaLink:focus-visible {
    outline: none;
    border-color: rgba(228, 243, 255, 0.78);
    box-shadow: 0 0 0 2px rgba(154, 210, 246, 0.22);
    border-radius: 4px;
}

.welcomeOnlineModeContinueBtn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(157, 198, 220, 0.5);
    border-radius: 11px;
    min-height: 56px;
    padding: 0 16px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.welcomeOnlineModeContinueBtn {
    color: #ecfff7;
    border-color: rgba(140, 236, 192, 0.84);
    background: linear-gradient(180deg, rgba(31, 102, 72, 0.92), rgba(14, 47, 34, 0.95));
}

.welcomeOnlineModeContinueBtn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.welcomeOnlineModeContinueBtn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.welcomeOnlineModeContinueBtn::after {
    content: '';
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: -52%;
    width: 44%;
    transform: skewX(-18deg);
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(244, 255, 255, 0.88) 50%,
        rgba(255, 255, 255, 0)
    );
}

.welcomeOnlineModeContinueBtn.attention-glint::after {
    animation: welcomeOnlineContinueGlint 760ms ease-out 1;
}

.welcomeShowroomBay {
    position: relative;
    border: 1px solid rgba(166, 200, 221, 0.52);
    border-radius: 26px;
    min-height: min(760px, calc(100vh - 36px));
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 76%, rgba(138, 201, 244, 0.18), rgba(9, 15, 23, 0) 45%),
        radial-gradient(circle at 52% 18%, rgba(112, 171, 222, 0.08), rgba(9, 15, 23, 0) 52%),
        linear-gradient(
            180deg,
            rgba(5, 8, 13, 0.96),
            rgba(7, 12, 19, 0.98) 56%,
            rgba(11, 18, 27, 0.995)
        );
    box-shadow:
        0 34px 74px rgba(0, 0, 0, 0.56),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.welcomeShowroomBay::before {
    content: '';
    position: absolute;
    inset: 11px;
    z-index: 1;
    border-radius: 18px;
    border: 1px solid rgba(148, 194, 219, 0.24);
    pointer-events: none;
}

.welcomeShowroomBay::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.22;
    pointer-events: none;
    mix-blend-mode: normal;
    background:
        radial-gradient(circle at 50% 60%, rgba(126, 196, 246, 0.18), rgba(126, 196, 246, 0) 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(2, 5, 8, 0.54) 88%);
}

.welcomePreviewLoading {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    padding: clamp(20px, 4vw, 38px);
    background:
        radial-gradient(circle at 50% 44%, rgba(143, 211, 255, 0.18), rgba(9, 15, 23, 0) 38%),
        linear-gradient(164deg, rgba(5, 11, 18, 0.8), rgba(4, 9, 14, 0.9));
    backdrop-filter: blur(6px) saturate(1.16);
    transition:
        opacity 420ms ease,
        transform 420ms ease;
    animation: welcomePreviewLoadingIn 240ms ease both;
}

.welcomePreviewLoading[hidden] {
    display: none;
}

.welcomePreviewLoading.is-hiding {
    opacity: 0;
    transform: translateY(8px) scale(1.01);
    pointer-events: none;
}

.welcomePreviewLoadingKicker {
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(185, 220, 242, 0.9);
}

.welcomePreviewLoadingStatus {
    min-height: 18px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(232, 244, 252, 0.98);
    text-align: center;
}

.welcomePreviewLoadingProgress {
    width: min(100%, 360px);
    border: 1px solid rgba(156, 206, 236, 0.54);
    border-radius: 999px;
    padding: 2px;
    height: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(6, 14, 22, 0.9), rgba(4, 9, 15, 0.95));
}

.welcomePreviewLoadingFill {
    position: relative;
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(124, 236, 194, 0.95), rgba(108, 185, 248, 0.98));
    box-shadow:
        0 0 18px rgba(106, 201, 250, 0.48),
        0 0 28px rgba(118, 235, 198, 0.22);
    transition: width 120ms linear;
    overflow: hidden;
}

.welcomePreviewLoadingFill::after {
    content: '';
    position: absolute;
    top: -60%;
    bottom: -60%;
    left: -26%;
    width: 34%;
    opacity: 0.82;
    transform: skewX(-18deg);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(248, 254, 255, 0.84) 48%,
        rgba(255, 255, 255, 0)
    );
    animation: welcomePreviewLoadingShimmer 1200ms linear infinite;
}

.welcomePreviewLoadingPercent {
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: rgba(185, 220, 242, 0.96);
}

.welcomeShowroomBay[data-preview-loading='true'] #welcomeCarCanvas {
    opacity: 0.2;
    filter: blur(1.5px) saturate(0.54) brightness(0.66);
}

.welcomeShowroomBay[data-preview-loading='true'] .welcomeVehicleNav {
    opacity: 0 !important;
    pointer-events: none !important;
}

.welcomePreviewLabel {
    position: absolute;
    z-index: 4;
    left: 14px;
    top: 14px;
    border: 1px solid rgba(166, 210, 234, 0.56);
    border-radius: 999px;
    padding: 6px 10px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(219, 236, 247, 0.96);
    background: rgba(13, 27, 41, 0.6);
    backdrop-filter: blur(3px);
}

#welcomeCarCanvas {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    transition:
        opacity 220ms ease,
        filter 220ms ease;
}

.welcomeBayRings {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 13%;
    width: min(74%, 640px);
    height: clamp(108px, 20vh, 176px);
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, rgba(152, 212, 252, 0.24), rgba(152, 212, 252, 0) 65%),
        radial-gradient(ellipse at center, rgba(255, 196, 148, 0.08), rgba(255, 196, 148, 0) 76%);
    filter: blur(0.5px);
    animation: welcomeFloorBreath 7.8s ease-in-out infinite;
    pointer-events: none;
}

.welcomePreviewSweep {
    position: absolute;
    z-index: 3;
    inset: -18% -26%;
    background: linear-gradient(
        108deg,
        rgba(255, 255, 255, 0) 41%,
        rgba(205, 239, 255, 0.07) 51%,
        rgba(255, 255, 255, 0) 63%
    );
    transform: translateX(-44%);
    animation: welcomePreviewSweepModern 11.5s ease-in-out infinite;
    pointer-events: none;
}

.welcomeVehicleNav {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(205, 226, 240, 0.34);
    border-radius: 50%;
    padding: 0;
    display: grid;
    place-items: center;
    color: rgba(236, 245, 252, 0.96);
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    background: rgba(12, 24, 36, 0.58);
    backdrop-filter: blur(8px) saturate(1.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.94);
    transition:
        transform 140ms ease,
        opacity 140ms ease,
        background-color 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

.welcomeVehicleNav::before {
    content: none;
}

.welcomeVehicleNav::after {
    content: none;
}

.welcomeVehicleNav span {
    transform: translateY(-1px);
    text-shadow: none;
}

.welcomeVehicleNavPrev {
    left: 14px;
}

.welcomeVehicleNavNext {
    right: 14px;
}

#welcomePreviewShell:hover .welcomeVehicleNav,
#welcomePreviewShell:focus-within .welcomeVehicleNav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.welcomeVehicleNav:hover {
    transform: translateY(-50%) scale(1.03);
    background: rgba(18, 33, 48, 0.78);
    border-color: rgba(218, 236, 248, 0.52);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.welcomeVehicleNav:active {
    transform: translateY(-50%) scale(0.97);
}

.welcomeVehicleNav:focus-visible {
    outline: none;
    border-color: rgba(225, 243, 255, 0.74);
    box-shadow:
        0 0 0 2px rgba(151, 213, 248, 0.28),
        0 8px 20px rgba(0, 0, 0, 0.28);
}

@media (hover: none), (pointer: coarse) {
    .welcomeVehicleNav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }
}

@media (max-width: 1040px) {
    .welcomeShell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .welcomeShowroomBay {
        order: 1;
        min-height: clamp(330px, 52vh, 540px);
    }

    .welcomeCommandDeck {
        order: 2;
    }
}

@media (max-width: 720px) {
    #welcomeModal {
        padding: 8px;
    }

    .welcomeShell {
        width: calc(100vw - 12px);
        gap: 8px;
    }

    .welcomeCommandDeck {
        border-radius: 16px;
        padding: 12px;
        gap: 8px;
    }

    #welcomeGameName {
        font-size: clamp(34px, 10.8vw, 54px);
        letter-spacing: 0.8px;
    }

    #welcomeTagline {
        font-size: 12px;
    }

    .welcomeTaglineFrame {
        height: 62px;
    }

    .welcomeSpecItem {
        padding: 7px 8px;
        font-size: 9px;
    }

    .welcomeStartActions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #welcomeStartBtn,
    #welcomeStartOnlineBtn,
    #welcomeDonateBtn {
        min-height: 54px;
        padding: 0 14px;
        font-size: 11px;
    }

    #welcomeStartBtn span,
    #welcomeStartOnlineBtn span,
    #welcomeDonateBtn span {
        font-size: 16px;
    }

    .welcomeOnlineModeChoiceRow,
    .welcomeOnlineModeActions {
        grid-template-columns: 1fr;
    }

    .welcomeMetaFooter {
        gap: 6px;
        padding-top: 8px;
        font-size: 10px;
        letter-spacing: 0.12px;
        justify-content: center;
    }

    .welcomeMetaBullet {
        display: none;
    }

    .welcomeShowroomBay {
        border-radius: 16px;
        min-height: clamp(260px, 42vh, 360px);
    }

    .welcomePreviewLoading {
        gap: 8px;
        padding: 16px;
    }

    .welcomePreviewLoadingKicker {
        font-size: 9px;
        letter-spacing: 1.25px;
    }

    .welcomePreviewLoadingStatus {
        font-size: 11px;
    }

    .welcomePreviewLoadingProgress {
        width: min(100%, 300px);
        height: 13px;
    }

    .welcomePreviewLoadingPercent {
        font-size: 10px;
    }

    .welcomePreviewLabel {
        left: 9px;
        top: 9px;
        font-size: 9px;
        padding: 5px 8px;
    }

    .welcomeVehicleNav {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 22px;
    }

    .welcomeVehicleNavPrev {
        left: 8px;
    }

    .welcomeVehicleNavNext {
        right: 8px;
    }

    #welcomeSelectedColorName {
        font-size: 12px;
    }

    .welcomeLaunchCard {
        width: calc(100vw - 24px);
        border-radius: 16px;
        padding: 14px;
    }

    .welcomeLaunchStatus {
        font-size: 12px;
    }

    .welcomeLaunchPercent {
        font-size: 10px;
    }

    .donateInlineHost {
        gap: 8px;
    }

    .donateInlinePanel {
        border-radius: 12px;
        padding: 10px;
    }

    #welcomeDonatePanelHost .donateInlinePanel {
        max-height: min(60vh, 480px);
    }

    #donateTitle {
        font-size: 10px;
        letter-spacing: 1.1px;
    }

    .donateDescription {
        font-size: 12px;
    }

    .donatePresetGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .donateActions {
        grid-template-columns: 1fr;
    }

    .donatePaymentBadge {
        min-height: 20px;
        padding: 0 8px;
        font-size: 9px;
    }

    .donateBtn,
    .donatePresetBtn {
        min-height: 42px;
    }

    .donateBtnCheckout {
        min-height: 48px;
        font-size: 16px;
    }

    .donateInput {
        font-size: 13px;
        padding: 10px 11px;
    }

    #donateCustomAmountInput {
        font-size: 22px;
    }

    .donateGratitudeOverlay {
        padding: 10px;
    }

    .donateGratitudeCard {
        width: calc(100vw - 20px);
        border-radius: 14px;
        padding: 14px;
    }

    .donateGratitudeTitle {
        font-size: clamp(24px, 9.5vw, 34px);
    }

    .donateGratitudeSubtitle {
        font-size: 13px;
    }

    .donateGratitudeMessage {
        font-size: 13px;
    }

    .donateGratitudeActions {
        justify-content: stretch;
    }

    .donateGratitudeContinueBtn {
        width: 100%;
    }
}

@keyframes welcomeShellReveal {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes welcomePreviewLoadingIn {
    0% {
        opacity: 0;
        transform: scale(1.01);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes welcomePreviewLoadingShimmer {
    0% {
        left: -28%;
    }
    100% {
        left: 122%;
    }
}

@keyframes welcomeOnlineContinueGlint {
    0% {
        left: -52%;
        opacity: 0;
    }
    26% {
        opacity: 0.95;
    }
    100% {
        left: 124%;
        opacity: 0;
    }
}

@keyframes welcomeAtmosphereShift {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.04) rotate(8deg);
        opacity: 0.76;
    }
}

@keyframes welcomePreviewSweepModern {
    0%,
    18% {
        opacity: 0;
        transform: translateX(-44%);
    }
    40% {
        opacity: 0.24;
    }
    62% {
        opacity: 0;
        transform: translateX(44%);
    }
    100% {
        opacity: 0;
        transform: translateX(44%);
    }
}

@keyframes welcomeFloorBreath {
    0%,
    100% {
        opacity: 0.34;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1.02);
    }
}

@keyframes welcomeTaglineFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-6px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes welcomeLaunchOverlayIn {
    0% {
        opacity: 0;
        transform: scale(1.012);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.audioControlPanel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 24px));
    padding: 12px 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(138, 198, 237, 0.34);
    background: linear-gradient(145deg, rgba(9, 22, 38, 0.94), rgba(8, 18, 31, 0.92));
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    z-index: 60;
    display: grid;
    gap: 8px;
    color: rgba(221, 242, 255, 0.95);
    font-family: 'Orbitron', 'Trebuchet MS', sans-serif;
}

body.edit-mode-active .audioControlPanel {
    left: 18px;
    right: auto;
}

.audioControlPanel[hidden] {
    display: none;
}

.audioControlPanel[data-tone='ready'] {
    border-color: rgba(124, 235, 184, 0.42);
}

.audioControlPanelHeading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(192, 230, 255, 0.88);
}

.audioControlPanelStatus {
    font-size: 10px;
    line-height: 1.35;
    color: rgba(169, 207, 235, 0.88);
    min-height: 15px;
}

.audioControlPanelControls {
    display: flex;
    gap: 8px;
}

.audioControlButton {
    border: 1px solid rgba(143, 205, 244, 0.36);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(26, 54, 82, 0.88), rgba(18, 40, 64, 0.9));
    color: rgba(227, 245, 255, 0.96);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    cursor: pointer;
    text-transform: uppercase;
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.audioControlButton:hover {
    transform: translateY(-1px);
    border-color: rgba(162, 228, 255, 0.62);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
}

.audioControlPanelSliders {
    display: grid;
    gap: 5px;
}

.audioControlSliderRow {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
}

.audioControlSliderLabel {
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(179, 221, 250, 0.9);
}

.audioControlSliderInput {
    width: 100%;
    accent-color: #8ad4ff;
}

.audioControlSliderValue {
    text-align: right;
    font-size: 10px;
    color: rgba(216, 241, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
    .audioControlPanel {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    body.edit-mode-active .audioControlPanel {
        left: 12px;
        right: 12px;
    }
}

.cookieConsentBanner {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 120;
    display: grid;
    justify-items: center;
    pointer-events: none;
}

.cookieConsentBanner[hidden] {
    display: none;
}

.cookieConsentCard {
    width: min(760px, 100%);
    pointer-events: auto;
    border: 1px solid rgba(136, 198, 235, 0.66);
    border-radius: 14px;
    padding: 14px 15px 13px;
    background: linear-gradient(170deg, rgba(10, 22, 38, 0.96), rgba(7, 15, 28, 0.96));
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.44),
        inset 0 0 0 1px rgba(226, 243, 255, 0.08);
    color: rgba(229, 244, 255, 0.98);
}

.cookieConsentTitle {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    letter-spacing: 1.1px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(210, 234, 252, 0.98);
}

.cookieConsentText {
    margin: 8px 0 0;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(186, 214, 238, 0.96);
}

.cookieConsentActions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cookieConsentBtn {
    border: 1px solid rgba(159, 206, 236, 0.58);
    border-radius: 10px;
    min-height: 38px;
    padding: 0 13px;
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    letter-spacing: 0.95px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        transform 120ms ease,
        filter 120ms ease,
        border-color 120ms ease;
}

.cookieConsentBtn.accept {
    color: rgba(232, 255, 245, 0.98);
    border-color: rgba(147, 233, 193, 0.75);
    background: linear-gradient(180deg, rgba(33, 108, 76, 0.9), rgba(16, 54, 38, 0.94));
}

.cookieConsentBtn.decline {
    color: rgba(235, 246, 255, 0.98);
    background: linear-gradient(180deg, rgba(31, 76, 114, 0.84), rgba(14, 37, 58, 0.9));
}

.cookieConsentBtn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
    border-color: rgba(215, 235, 248, 0.88);
}

.cookieConsentBtn:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.95);
}

.cookieConsentBtn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.cookieConsentLink {
    margin-left: auto;
    color: rgba(196, 229, 252, 0.94);
    font-family: 'Sora', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(196, 229, 252, 0.34);
    transition:
        color 120ms ease,
        border-color 120ms ease;
}

.cookieConsentLink:hover {
    color: rgba(234, 247, 255, 0.99);
    border-color: rgba(234, 247, 255, 0.72);
}

@media (max-width: 720px) {
    .cookieConsentCard {
        border-radius: 12px;
        padding: 12px;
    }

    .cookieConsentText {
        font-size: 11px;
    }

    .cookieConsentActions {
        margin-top: 10px;
        gap: 7px;
    }

    .cookieConsentBtn {
        min-height: 36px;
        padding: 0 11px;
        font-size: 10px;
    }

    .cookieConsentLink {
        width: 100%;
        margin-left: 0;
    }
}
