* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 1s ease-out;
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#splash-content {
    text-align: center;
    position: relative;
}

#splash-logo {
    font-size: 72px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2);
    animation: logoAppear 2s ease-out, logoGlow 3s ease-in-out 2s infinite;
    transform: scale(0);
    opacity: 0;
}

#splash-tagline {
    font-size: 18px;
    font-weight: 300;
    color: #888;
    letter-spacing: 4px;
    margin-top: 20px;
    opacity: 0;
    animation: taglineAppear 1s ease-out 1.5s forwards;
}

@keyframes logoAppear {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(2deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes logoGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.5),
            0 0 40px rgba(255, 255, 255, 0.3),
            0 0 60px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 60px rgba(255, 255, 255, 0.5),
            0 0 90px rgba(255, 255, 255, 0.3);
    }
}

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

/* Hide game content during splash */
body.splash-active #game-container {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

body.splash-active #game-canvas {
    opacity: 0;
    visibility: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#instructions {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}

#instructions h2 {
    margin-bottom: 10px;
    color: #4CAF50;
}

#instructions p {
    margin: 5px 0;
}

#mode-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #4CAF50;
    z-index: 15;
    pointer-events: none;
}

/* Health Bar */
#health-bar, #nitro-bar, #stamina-bar {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 10px;
    z-index: 15;
    pointer-events: none;
    min-width: 200px;
    display: none;
}

#health-bar {
    border: 2px solid #ff4444;
    bottom: 20px; /* Above stamina bar */
    left: 260px;
}

#nitro-bar {
    border: 2px solid #00ffff;
    bottom: 20px;
}

#stamina-bar {
    border: 2px solid #00ff00;
    bottom: 20px; /* Bottom position */
}

/* Ammo Display */
#ammo-display {
    position: absolute;
    bottom: 140px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ffaa00;
    z-index: 15;
    pointer-events: none;
    display: none;
    min-width: 150px;
    text-align: center;
}

#ammo-display.active {
    display: block;
}

#health-bar.active, #nitro-bar.active, #stamina-bar.active {
    display: block;
}

.health-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    text-align: center;
}

.health-container {
    width: 180px;
    height: 20px;
    background: rgba(100, 0, 0, 0.5);
    border: 1px solid #666;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444);
    width: 100%;
    transition: width 0.2s;
}

.health-text {
    font-size: 14px;
    color: white;
    text-align: center;
    font-weight: bold;
}

/* City Map */
#city-map {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 125px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    z-index: 20;
    pointer-events: none;
}

#map-canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

#speedometer {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #4CAF50;
}

#speed {
    font-size: 48px;
    font-weight: bold;
    color: #4CAF50;
    line-height: 1;
}

#speed-unit {
    font-size: 18px;
    margin-top: 5px;
    opacity: 0.8;
}

/* Hit Counter */
#hit-counter {
    position: absolute;
    top: 20px;
    right: 80px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid #ff4444;
    min-width: 180px;
}

.counter-item {
    margin-bottom: 10px;
}

.counter-item:last-child {
    margin-bottom: 0;
}

.counter-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.counter-value {
    font-size: 32px;
    font-weight: bold;
    color: #ff4444;
    line-height: 1;
}

/* Music Control Button */
.music-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #4CAF50;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: auto;
    transition: all 0.2s;
}

.music-btn:hover {
    background: rgba(76, 175, 80, 0.5);
    transform: scale(1.1);
}

.music-btn.muted {
    opacity: 0.5;
    border-color: #666;
}

.music-btn.muted #music-icon {
    opacity: 0.5;
}

/* ===================== Touch controls (phones / tablets) ===================== */
/* Shown only when src/input/touchControls.js detects a touch screen (body.touch) */
#mobile-controls, .touch-only { display: none; }

body.touch {
    touch-action: none;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
body.touch #game-container { height: 100dvh; }

#mobile-controls.active {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;   /* only the joystick and the buttons take touches */
    z-index: 20;
}

/* Joystick: bottom left */
#joystick {
    position: absolute;
    left: calc(18px + env(safe-area-inset-left));
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0 55%, rgba(255, 255, 255, 0.04) 56%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    pointer-events: auto;
    touch-action: none;
}
#joystick.pressed { border-color: rgba(79, 195, 247, 0.9); }
#joystick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Action buttons: bottom right, wrapping into a cluster */
#touch-buttons {
    position: absolute;
    right: calc(14px + env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 214px;
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}
.tbtn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font: 700 22px/1 system-ui, -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.tbtn.pressed { background: rgba(79, 195, 247, 0.55); transform: scale(0.94); }
.tbtn-big { width: 76px; height: 76px; font-size: 30px; }
.tbtn-small { width: 46px; height: 46px; font-size: 17px; }
.tbtn-fire { border-color: rgba(255, 90, 90, 0.8); }
.tbtn-brake { border-color: rgba(255, 90, 90, 0.8); }
.tbtn-nitro { border-color: rgba(0, 255, 255, 0.8); font-size: 15px; }
.tbtn-e { font-size: 24px; opacity: 0.45; }
.tbtn-e.ready { opacity: 1; background: rgba(79, 195, 247, 0.75); color: #0b1a24; border-color: #fff; }
/* Only the buttons for what you are doing right now */
body[data-touch-mode="walk"] .tbtn[data-for]:not([data-for~="walk"]),
body[data-touch-mode="car"] .tbtn[data-for]:not([data-for~="car"]),
body[data-touch-mode="ride"] .tbtn[data-for]:not([data-for~="ride"]) { display: none; }

body.touch .touch-only { display: block; }
#btn-fullscreen {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top));
    left: calc(8px + env(safe-area-inset-left));
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    pointer-events: auto;
    z-index: 30;
}
#rotate-hint { display: none !important; }
@media (orientation: portrait) {
    body.touch #rotate-hint {
        display: block !important;
        position: fixed;
        top: calc(54px + env(safe-area-inset-top));
        left: 50%;
        transform: translateX(-50%);
        padding: 6px 14px;
        border-radius: 14px;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font: 600 13px system-ui, -apple-system, sans-serif;
        white-space: nowrap;
        pointer-events: none;
        z-index: 30;
    }
}

/* ---- Compact HUD on touch screens ---- */
body.touch #instructions,
body.touch #multiplayer-btn { display: none; }
body.touch #mode-display {
    top: calc(8px + env(safe-area-inset-top));
    padding: 4px 12px;
    font-size: 13px;
    border-width: 1px;
}
body.touch #mission-hud {
    top: calc(40px + env(safe-area-inset-top));
    min-width: 0;
    max-width: min(360px, 60vw);
    padding: 4px 10px 5px;
}
body.touch .mh-objective { font-size: 13px; }
body.touch #flight-hud, body.touch #cruise-hud { top: calc(40px + env(safe-area-inset-top)); }
/* Bars: top left, under the fullscreen button */
body.touch #health-bar, body.touch #nitro-bar, body.touch #stamina-bar {
    left: calc(8px + env(safe-area-inset-left));
    bottom: auto;
    min-width: 0;
    padding: 4px 8px;
    border-width: 1px;
}
body.touch #stamina-bar, body.touch #nitro-bar { top: calc(52px + env(safe-area-inset-top)); }
body.touch #health-bar { top: calc(92px + env(safe-area-inset-top)); }
body.touch .health-label { display: none; }
body.touch .health-container { width: 110px; height: 9px; margin-bottom: 2px; }
body.touch .health-text { font-size: 10px; }
body.touch #ammo-display {
    left: calc(8px + env(safe-area-inset-left));
    top: calc(132px + env(safe-area-inset-top));
    bottom: auto;
    min-width: 0;
    padding: 3px 8px;
    font-size: 12px;
    border-width: 1px;
}
/* Minimap and speed: bottom centre, between the joystick and the buttons */
body.touch #city-map {
    width: 168px;
    height: 84px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    border-width: 1px;
}
body.touch #speedometer {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(98px + env(safe-area-inset-bottom));
    padding: 2px 10px;
    border-width: 1px;
    border-radius: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
body.touch #speed { font-size: 20px; }
body.touch #speed-unit { font-size: 10px; margin: 0; }
/* Status pills and music button: top right */
body.touch .music-btn {
    top: calc(8px + env(safe-area-inset-top));
    right: calc(8px + env(safe-area-inset-right));
    width: 38px;
    height: 38px;
    font-size: 18px;
}
body.touch #hud-status { top: calc(8px + env(safe-area-inset-top)); right: calc(54px + env(safe-area-inset-right)); gap: 3px; }
body.touch .hud-pill { font-size: 12px; padding: 2px 8px; }
body.touch #wanted-stars { font-size: 17px; }
/* Prompts sit above the minimap */
body.touch #interact-prompt, body.touch #cruise-prompt, body.touch #car-prompt,
body.touch #tram-prompt, body.touch #taxi-hint {
    bottom: calc(128px + env(safe-area-inset-bottom));
    font-size: 13px;
    padding: 6px 12px;
    max-width: calc(100vw - 420px);
    min-width: 160px;
    text-align: center;
    white-space: normal;
}
/* Dialogs fit on a phone screen and scroll if needed */
body.touch .modal-content,
body.touch #flight-modal .modal-content, body.touch #cruise-modal .modal-content, body.touch #spawn-modal .modal-content {
    margin: max(12px, 4dvh) auto;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 16px;
    touch-action: pan-y;
}
body.touch .modal-content h2 { font-size: 20px; margin-bottom: 10px; }
body.touch .btn-primary, body.touch .btn-secondary { padding: 12px 22px; min-height: 44px; }
/* Narrow screens (portrait phones): smaller controls */
@media (max-width: 600px) {
    body.touch #joystick { width: 112px; height: 112px; }
    body.touch #touch-buttons { width: 180px; gap: 8px; }
    body.touch .tbtn { width: 50px; height: 50px; font-size: 19px; }
    body.touch .tbtn-big { width: 64px; height: 64px; font-size: 26px; }
    body.touch .tbtn-small { width: 40px; height: 40px; font-size: 15px; }
    body.touch #city-map { width: 120px; height: 60px; bottom: calc(150px + env(safe-area-inset-bottom)); }
    body.touch #speedometer { bottom: calc(216px + env(safe-area-inset-bottom)); }
    body.touch #interact-prompt, body.touch #cruise-prompt, body.touch #car-prompt,
    body.touch #tram-prompt, body.touch #taxi-hint { bottom: calc(236px + env(safe-area-inset-bottom)); max-width: 90vw; }
}

/* Multiplayer UI */
.multiplayer-button {
    position: absolute;
    top: 20px;
    right: 300px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 2px solid #4CAF50;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    pointer-events: auto; /* Enable clicks on this button */
}

.multiplayer-button:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: rgba(20, 20, 20, 0.95);
    margin: 15% auto;
    padding: 30px;
    border: 2px solid #4CAF50;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    color: white;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #4CAF50;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #666;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-content input:focus {
    outline: none;
    border-color: #4CAF50;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: scale(1.05);
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #777;
    transform: scale(1.05);
}

#connection-status {
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}



/* ===================== Comic-panel intro ===================== */
#comic-intro {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
    font-family: 'Anton', 'Impact', sans-serif;
}
#comic-intro.visible { display: block; opacity: 1; }
#comic-intro.leaving { opacity: 0; }
/* Punchier, inked look for the 3D panels while the intro runs */
body.intro-active #game-canvas { filter: contrast(1.18) saturate(1.45) brightness(1.03); }
body.intro-active #ui,
body.intro-active #day-clock { display: none !important; }
.ci-halftone {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.55) 1px, transparent 1.6px);
    background-size: 5px 5px;
    mix-blend-mode: multiply;
    opacity: 0.22;
}
/* Panel borders: must match IntroCinematic.panels() (left 42% | right split at 53% from the top) */
.ci-frame {
    position: absolute;
    box-sizing: border-box;
    border: 9px solid #fbfaf5;
    box-shadow: inset 0 0 0 3px #111, 0 0 0 3px #111;
}
.ci-f1 { left: 0; top: 0; width: 42%; height: 100%; }
.ci-f2 { left: 42%; top: 0; width: 58%; height: 53%; }
.ci-f3 { left: 42%; top: 53%; width: 58%; height: 47%; }
.ci-shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}
.ci-title {
    position: absolute;
    left: 4%;
    bottom: 17%;
    transform: rotate(-4deg);
    transform-origin: left bottom;
}
.ci-presents {
    font-family: 'Bangers', 'Impact', sans-serif;
    color: #ffd23f;
    font-size: clamp(16px, 2vw, 26px);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
    opacity: 0;
    animation: ciFadeUp 0.6s ease-out 0.2s forwards;
}
.ci-logo {
    display: flex;
    gap: 0.25em;
    align-items: baseline;
    line-height: 0.9;
    text-transform: uppercase;
    font-size: clamp(58px, 9.5vw, 150px);
    letter-spacing: 1px;
    opacity: 0;
    animation: ciSlam 0.55s cubic-bezier(.2, 1.6, .4, 1) 0.6s forwards;
}
.ci-l1, .ci-l2 {
    -webkit-text-stroke: 3px #000;
    paint-order: stroke fill;
    text-shadow: 4px 4px 0 #000, 9px 9px 0 rgba(0, 0, 0, 0.35);
}
.ci-l1 { color: #fbfaf5; }
.ci-l2 { color: #ffd23f; }
.ci-tagline {
    margin-top: 8px;
    font-family: 'Bangers', 'Impact', sans-serif;
    font-size: clamp(18px, 2.4vw, 34px);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    background: #d7263d;
    display: inline-block;
    padding: 2px 14px 0;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 #000;
    opacity: 0;
    animation: ciFadeUp 0.5s ease-out 1.15s forwards;
}
.ci-loading {
    position: absolute;
    left: 4%;
    bottom: 6%;
    width: min(40%, 520px);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
}
.ci-bar {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    box-shadow: 3px 3px 0 #000;
}
.ci-bar-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(-45deg, #ffd23f 0 10px, #f2b705 10px 20px);
}
.ci-percent { min-width: 3.2em; text-align: right; }
.ci-press {
    position: absolute;
    right: 4%;
    bottom: 6%;
    font-family: 'Bangers', 'Impact', sans-serif;
    font-size: clamp(20px, 2.6vw, 34px);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 3px 3px 0 #000;
    opacity: 0;
}
#comic-intro.ready .ci-press { animation: ciBlink 1.1s steps(2, start) infinite; }
#comic-intro.ready .ci-loading { opacity: 0.45; transition: opacity 0.4s; }
.ci-copy {
    position: absolute;
    right: 1.6%;
    top: 2.4%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0 #000;
}
@keyframes ciSlam {
    0% { opacity: 0; transform: scale(2.6) rotate(6deg); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes ciFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes ciBlink { to { opacity: 1; } }
@media (max-width: 700px) {
    .ci-f1 { width: 100%; height: 40%; }
    .ci-f2 { left: 0; top: 40%; width: 50%; height: 60%; }
    .ci-f3 { left: 50%; top: 40%; width: 50%; height: 60%; }
    .ci-loading { width: 60%; }
}

body.intro-active #wanted-stars { display: none !important; }

/* ===== Compact status column (top right) ===== */
#hud-status {
    position: absolute;
    top: 18px;
    right: 82px;               /* left of the 50px music button */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    z-index: 20;
    pointer-events: none;
}
.hud-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font: 600 14px/1.2 system-ui, -apple-system, sans-serif;
    white-space: nowrap;
}
.hud-icon { font-size: 13px; }
.hud-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.3); margin: 0 3px; }
#hit-counter.hud-pill {
    position: static;
    min-width: 0;
    border: none;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}
#hit-counter #pedestrian-count,
#hit-counter #car-count { color: #ff6b6b; font-weight: 700; }
#taxi-earnings { color: #ffd23f; }
#wanted-stars { font: 22px/1 Impact, Anton, sans-serif; letter-spacing: 1px; }

/* ===== Missions ===== */
#mission-hud {
    position: absolute;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    max-width: 440px;
    padding: 6px 14px 7px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
    pointer-events: none;
    z-index: 15;
}
.mh-title { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #ffd23f; font-weight: 700; }
.mh-objective { font-size: 15px; font-weight: 600; margin-top: 2px; }
.mh-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 3px; font-size: 13px; opacity: 0.95; }
.mh-arrow { display: inline-block; color: #ffd23f; font-size: 14px; }
.mh-timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.mh-timer.urgent { color: #ff4d4d; }
#mission-banner {
    position: fixed;
    top: 30%;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    z-index: 8000;
}
#mission-banner.show { animation: missionBanner 3.4s ease forwards; }
.mb-title {
    font-family: 'Anton', Impact, sans-serif;
    font-size: clamp(40px, 7vw, 84px);
    letter-spacing: 2px;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
    text-shadow: 4px 4px 0 #000;
}
.mb-sub {
    font-family: 'Bangers', Impact, sans-serif;
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}
@keyframes missionBanner {
    0% { opacity: 0; transform: scale(1.25); }
    10% { opacity: 1; transform: scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
#mission-offer .mo-reward { color: #ffd23f; font-weight: 700; margin-top: 8px; }

/* ===== Airport: check-in prompt, departures list, flight HUD ===== */
#interact-prompt, #cruise-prompt, #car-prompt, #tram-prompt, #taxi-hint {
    display: none;
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    pointer-events: none;
    z-index: 20;
}
#interact-prompt b, #cruise-prompt b, #car-prompt b, #tram-prompt b {
    display: inline-block;
    min-width: 22px;
    padding: 1px 6px;
    margin-right: 4px;
    border-radius: 5px;
    background: #4fc3f7;
    color: #0b1a24;
    text-align: center;
}
#flight-modal .modal-content, #cruise-modal .modal-content, #spawn-modal .modal-content {
    max-width: 560px;
    margin: 7% auto;
    border-color: #4fc3f7;
    text-align: left;
}
#flight-modal h2, #cruise-modal h2, #spawn-modal h2 { color: #4fc3f7; text-align: center; margin-bottom: 6px; }
#flight-modal .fm-sub, #cruise-modal .fm-sub, #spawn-modal .fm-sub { text-align: center; color: #aab4bd; font-size: 13px; margin-bottom: 14px; }
#flight-modal .fm-row, #cruise-modal .fm-row, #spawn-modal .fm-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}
#flight-modal .fm-code, #cruise-modal .fm-code, #spawn-modal .fm-code { font: 700 15px monospace; color: #ffd54f; min-width: 60px; }
#flight-modal .fm-info, #cruise-modal .fm-info, #spawn-modal .fm-info { flex: 1; min-width: 0; }
#flight-modal .fm-name, #cruise-modal .fm-name, #spawn-modal .fm-name { font-weight: 700; font-size: 16px; }
#flight-modal .fm-desc, #cruise-modal .fm-desc, #spawn-modal .fm-desc { color: #c9d1d8; font-size: 13px; margin-top: 2px; }
#flight-modal .fm-meta, #cruise-modal .fm-meta, #spawn-modal .fm-meta { color: #8fa0ad; font-size: 12px; margin-top: 3px; }
#flight-modal .fm-row .btn-primary, #cruise-modal .fm-row .btn-primary, #spawn-modal .fm-row .btn-primary { padding: 9px 16px; font-size: 14px; }
#flight-modal .fm-row .btn-primary:disabled, #cruise-modal .fm-row .btn-primary:disabled, #spawn-modal .fm-row .btn-primary:disabled { background: #555; cursor: not-allowed; transform: none; }
#flight-modal .fm-note, #cruise-modal .fm-note, #spawn-modal .fm-note { text-align: center; color: #ffd54f; font-size: 13px; margin-top: 10px; }
#flight-hud, #cruise-hud {
    display: none;
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 32px));
    padding: 8px 14px 9px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.66);
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    text-align: center;
    pointer-events: none;
    z-index: 25;
}
#flight-hud .fh-title, #cruise-hud .fh-title { font-size: 12px; letter-spacing: 1px; color: #4fc3f7; font-weight: 700; }
#flight-hud .fh-status, #cruise-hud .fh-status { font-size: 16px; font-weight: 700; margin: 3px 0 6px; }
#flight-hud .fh-bar, #cruise-hud .fh-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
#flight-hud .fh-fill, #cruise-hud .fh-fill { height: 100%; width: 0; background: #4fc3f7; }
#flight-hud .fh-stats, #cruise-hud .fh-stats { font-size: 12px; color: #c9d1d8; margin-top: 5px; }
#flight-hud .fh-keys, #cruise-hud .fh-keys { font-size: 11px; color: #8fa0ad; margin-top: 3px; }
body:has(#flight-hud[style*="block"]) #mission-hud { display: none; }
/* In Chongqing: hide Male City's mission HUD */
body.in-chongqing #mission-hud { display: none; }

body:has(#cruise-hud[style*="block"]) #mission-hud { display: none; }

/* ===== Chongqing tour (src/chongqing/ChongqingTour.js) ===== */
#tour-modal .modal-content { max-width: 560px; margin: 5% auto; border-color: #ffd23f; }
#tour-modal h2 { color: #ffd23f; }
#tour-modal .tm-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #fbfaf5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    transform: rotate(-1deg);
    margin: 4px 0 12px;
}
#tour-modal .tm-text { font-size: 15px; line-height: 1.5; color: #dde3e8; }
#tour-modal .tm-buttons { flex-wrap: wrap; }
#tour-modal a.btn-primary, #tour-modal a.btn-secondary { text-decoration: none; display: inline-flex; align-items: center; }
#tour-hud {
    display: none;
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.66);
    color: #ffd23f;
    font: 700 15px system-ui, -apple-system, sans-serif;
    pointer-events: none;
    z-index: 25;
}
body.touch #tour-hud { top: calc(40px + env(safe-area-inset-top)); font-size: 13px; }
#tour-flash {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 900;
}
#tour-flash.on { animation: tourFlash 0.6s ease-out; }
@keyframes tourFlash { from { opacity: 0.85; } to { opacity: 0; } }

/* Start screen for ?mode=chongqing: one tap so the song can start with the intro */
#start-gate {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, #1b2a4a 0%, #070b16 75%);
}
#start-gate .sg-box { text-align: center; color: #fff; font-family: 'Anton', Impact, sans-serif; }
#start-gate .sg-title { font-size: clamp(48px, 9vw, 110px); letter-spacing: 2px; color: #ffd23f; text-shadow: 4px 4px 0 #000; }
#start-gate .sg-sub { font-family: 'Bangers', Impact, sans-serif; font-size: clamp(18px, 2.6vw, 30px); letter-spacing: 3px; margin: 6px 0 26px; }
#start-gate .sg-btn { font-size: 24px; padding: 14px 44px; border-radius: 40px; }

/* Chongqing intro (?mode=chongqing): GTA-style artwork - a mosaic of panels with light gutters
   and dark outlines; colours a little richer than real, no halftone */
body.intro-cq.intro-active #game-canvas { filter: contrast(1.08) saturate(1.15); }
body.intro-cq .ci-frame, body.intro-cq .ci-halftone { display: none; }
.ci-gframe {
    position: absolute;
    box-sizing: border-box;
    border: 3px solid #111;
    box-shadow: 0 0 0 2px #f2eee4, 4px 6px 0 rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 0;
    animation: ciPanelIn 0.45s ease-out forwards;
}
@keyframes ciPanelIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
body.intro-cq .ci-shade { height: 55%; background: linear-gradient(to top, rgba(4, 8, 18, 0.8), rgba(4, 8, 18, 0)); }
body.intro-cq .ci-tagline { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.5); box-shadow: none; }

/* ===== Help: the ? button and the controls window ===== */
#help-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #4CAF50;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font: 700 24px/1 system-ui, -apple-system, sans-serif;
    cursor: pointer;
    pointer-events: auto;
    z-index: 20;
    transition: transform 0.15s, background 0.15s;
}
#help-btn:hover { background: rgba(76, 175, 80, 0.5); transform: scale(1.08); }
#help-modal .modal-content { max-width: 820px; margin: 6% auto; text-align: left; }
#help-modal h2 { text-align: center; }
#help-modal h3 { color: #4CAF50; font-size: 15px; margin-bottom: 8px; }
.help-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.help-keys p, .help-touch p { font-size: 13.5px; line-height: 1.55; margin: 4px 0; color: #dde3e8; }
#help-modal kbd {
    display: inline-block;
    min-width: 22px;
    padding: 1px 6px;
    margin-right: 2px;
    border-radius: 5px;
    background: #2c3138;
    border: 1px solid #555c64;
    border-bottom-width: 2px;
    color: #fff;
    font: 600 12px/1.5 system-ui, -apple-system, sans-serif;
    text-align: center;
}
.help-touch { display: none; margin-top: 16px; }
body.touch .help-touch { display: block; }
body.touch .help-keys { display: none; }
body.touch #help-btn { top: calc(8px + env(safe-area-inset-top)); left: calc(54px + env(safe-area-inset-left)); width: 38px; height: 38px; font-size: 20px; border-width: 1px; }
body.intro-active #help-btn { display: none; }
@media (max-width: 760px) { .help-keys { grid-template-columns: 1fr; } }

/* Chongqing tour: a clean screen - no game HUD */
body.tour-mode #health-bar, body.tour-mode #stamina-bar, body.tour-mode #nitro-bar, body.tour-mode #ammo-display,
body.tour-mode #wanted-stars, body.tour-mode #hud-stars-slot, body.tour-mode #multiplayer-btn, body.tour-mode #hit-counter,
body.tour-mode #taxi-earnings, body.tour-mode #hud-earnings-slot, body.tour-mode #speedometer, body.tour-mode #mode-display,
body.tour-mode #mission-hud { display: none !important; }

/* On board a flight (the flight HUD is shown): no minimap */
body:has(#flight-hud[style*="block"]) #city-map { display: none; }

/* =====================================================================================
   Chinese cyberpunk UI theme: dark glass panels, cyan neon edges, magenta corner brackets,
   red-and-gold Chinese accents, clipped corners and the Orbitron tech font. Visual only:
   positions and sizes come from the rules above.
   ===================================================================================== */
:root {
    --cp-bg: rgba(6, 10, 22, 0.78);
    --cp-bg-strong: rgba(6, 9, 20, 0.92);
    --cp-cyan: #22f2ff;
    --cp-magenta: #ff2bd6;
    --cp-red: #ff2f4f;
    --cp-gold: #ffc93c;
    --cp-text: #e8fbff;
    --cp-dim: #8fb6c4;
    --cp-font: 'Orbitron', 'Noto Sans SC', system-ui, sans-serif;
    --cp-glow: 0 0 6px rgba(34, 242, 255, 0.55), 0 0 18px rgba(34, 242, 255, 0.18);
    --cp-scan: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}

/* ---- HUD panels ---- */
#mode-display, #health-bar, #nitro-bar, #stamina-bar, #ammo-display, #speedometer, #mission-hud,
#flight-hud, #cruise-hud, #tour-hud, #interact-prompt, #cruise-prompt, #car-prompt, #tram-prompt, #taxi-hint {
    background: var(--cp-scan), var(--cp-bg) !important;
    border: 1px solid rgba(34, 242, 255, 0.65) !important;
    border-radius: 0 !important;
    box-shadow: var(--cp-glow), inset 0 0 14px rgba(34, 242, 255, 0.08) !important;
    color: var(--cp-text) !important;
    font-family: var(--cp-font) !important;
    letter-spacing: 0.5px;
}
#mode-display { text-transform: uppercase; font-size: 14px; letter-spacing: 2px; border-left: 3px solid var(--cp-magenta) !important; }
#health-bar { border-color: rgba(255, 47, 79, 0.7) !important; box-shadow: 0 0 8px rgba(255, 47, 79, 0.45) !important; }
#nitro-bar { border-color: rgba(34, 242, 255, 0.8) !important; }
#stamina-bar { border-color: rgba(120, 255, 170, 0.7) !important; box-shadow: 0 0 8px rgba(120, 255, 170, 0.35) !important; }
.health-label { font-family: var(--cp-font); text-transform: uppercase; letter-spacing: 2px; color: var(--cp-dim); font-size: 10px; }
.health-container { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(34, 242, 255, 0.35); border-radius: 0; }
#health-fill { background: linear-gradient(90deg, #ff1744, var(--cp-red)); box-shadow: 0 0 8px var(--cp-red); }
#nitro-fill { background: linear-gradient(90deg, #00b8ff, var(--cp-cyan)); box-shadow: 0 0 8px var(--cp-cyan); }
#stamina-fill { background: linear-gradient(90deg, #00e676, #7dffb0); box-shadow: 0 0 8px #3dff9a; }
.health-text { font-family: var(--cp-font); font-size: 11px; }
#ammo-display { border-color: rgba(255, 201, 60, 0.75) !important; color: var(--cp-gold) !important; text-shadow: 0 0 6px rgba(255, 201, 60, 0.6); }
#speed { font-family: var(--cp-font); color: var(--cp-cyan); text-shadow: 0 0 10px var(--cp-cyan); font-weight: 900; }
#speed-unit { font-family: var(--cp-font); color: var(--cp-magenta); letter-spacing: 3px; text-transform: uppercase; }
/* corner brackets (magenta) on the bigger panels */
#speedometer::before, #flight-hud::before, #cruise-hud::before, #mission-hud::before, .modal-content::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 14px; height: 14px;
    border-top: 2px solid var(--cp-magenta);
    border-left: 2px solid var(--cp-magenta);
    pointer-events: none;
}
#speedometer::after, #flight-hud::after, #cruise-hud::after, #mission-hud::after, .modal-content::after {
    content: '';
    position: absolute;
    bottom: -1px; right: -1px;
    width: 14px; height: 14px;
    border-bottom: 2px solid var(--cp-magenta);
    border-right: 2px solid var(--cp-magenta);
    pointer-events: none;
}
#flight-hud .fh-title, #cruise-hud .fh-title { color: var(--cp-cyan); text-shadow: 0 0 6px var(--cp-cyan); letter-spacing: 2px; text-transform: uppercase; }
#flight-hud .fh-status, #cruise-hud .fh-status, .mh-objective { font-family: var(--cp-font); }
#flight-hud .fh-bar, #cruise-hud .fh-bar { border-radius: 0; background: rgba(34, 242, 255, 0.12); }
#flight-hud .fh-fill, #cruise-hud .fh-fill { background: linear-gradient(90deg, var(--cp-magenta), var(--cp-cyan)); box-shadow: 0 0 8px var(--cp-cyan); }
.mh-title { color: var(--cp-gold); text-shadow: 0 0 6px rgba(255, 201, 60, 0.7); }
#tour-hud { color: var(--cp-gold) !important; text-shadow: 0 0 6px rgba(255, 201, 60, 0.6); }

/* Status pills, minimap, round buttons */
.hud-pill, #hit-counter.hud-pill {
    background: var(--cp-bg) !important;
    border: 1px solid rgba(34, 242, 255, 0.45) !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    font-family: var(--cp-font) !important;
    font-size: 12px !important;
    color: var(--cp-text) !important;
}
#taxi-earnings { color: var(--cp-gold) !important; text-shadow: 0 0 6px rgba(255, 201, 60, 0.6); }
#wanted-stars { color: var(--cp-red) !important; text-shadow: 0 0 8px var(--cp-red); }
#city-map {
    border: 1px solid rgba(34, 242, 255, 0.7) !important;
    border-radius: 0 !important;
    box-shadow: var(--cp-glow) !important;
    background: var(--cp-bg-strong) !important;
}
#map-canvas { border-radius: 0 !important; }
.music-btn, #help-btn, #btn-fullscreen {
    background: var(--cp-bg) !important;
    border: 1px solid var(--cp-cyan) !important;
    border-radius: 0 !important;
    clip-path: polygon(25% 0, 100% 0, 100% 75%, 75% 100%, 0 100%, 0 25%);
    color: var(--cp-cyan) !important;
    text-shadow: 0 0 6px var(--cp-cyan);
    font-family: var(--cp-font) !important;
}
.music-btn:hover, #help-btn:hover { background: rgba(255, 43, 214, 0.25) !important; color: #fff !important; }
.multiplayer-button {
    background: var(--cp-bg) !important;
    border: 1px solid var(--cp-magenta) !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    font-family: var(--cp-font) !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px !important;
    color: #ffd6f6 !important;
    text-shadow: 0 0 6px var(--cp-magenta);
}

/* Prompts: the key badge */
#interact-prompt b, #cruise-prompt b, #car-prompt b, #tram-prompt b {
    background: var(--cp-cyan) !important;
    color: #04121a !important;
    border-radius: 0 !important;
    box-shadow: 0 0 8px var(--cp-cyan);
    font-family: var(--cp-font);
}

/* ---- Windows ---- */
.modal { background-color: rgba(2, 4, 12, 0.72) !important; backdrop-filter: blur(2px); }
.modal-content {
    position: relative;
    background: var(--cp-scan), linear-gradient(160deg, rgba(14, 18, 40, 0.96), rgba(6, 8, 20, 0.97)) !important;
    border: 1px solid rgba(34, 242, 255, 0.7) !important;
    border-radius: 0 !important;
    box-shadow: 0 0 24px rgba(34, 242, 255, 0.25), inset 0 0 30px rgba(255, 43, 214, 0.06) !important;
    color: var(--cp-text) !important;
}
.modal-content h2, #flight-modal h2, #cruise-modal h2, #spawn-modal h2, #tour-modal h2, #help-modal h2 {
    font-family: var(--cp-font) !important;
    color: var(--cp-cyan) !important;
    text-shadow: 0 0 8px rgba(34, 242, 255, 0.8), 0 0 22px rgba(255, 43, 214, 0.35);
    letter-spacing: 2px;
    text-transform: uppercase;
}
#tour-modal h2 { color: var(--cp-gold) !important; text-shadow: 0 0 8px rgba(255, 201, 60, 0.8), 0 0 22px rgba(255, 47, 79, 0.4); }
#tour-modal .tm-photo { border: 1px solid var(--cp-cyan); border-radius: 0; box-shadow: var(--cp-glow); transform: none; }
.fm-row { background: rgba(34, 242, 255, 0.06) !important; border-left: 2px solid var(--cp-magenta); border-radius: 0 !important; }
.fm-code { color: var(--cp-gold) !important; font-family: var(--cp-font) !important; }
.fm-note { color: var(--cp-gold) !important; }
#help-modal h3 { color: var(--cp-magenta) !important; font-family: var(--cp-font); letter-spacing: 1.5px; text-transform: uppercase; text-shadow: 0 0 6px rgba(255, 43, 214, 0.6); }
#help-modal kbd { background: rgba(34, 242, 255, 0.1) !important; border: 1px solid var(--cp-cyan) !important; border-radius: 0 !important; color: var(--cp-cyan) !important; font-family: var(--cp-font) !important; box-shadow: 0 0 6px rgba(34, 242, 255, 0.4); }

/* Buttons: clipped corners, neon */
.btn-primary, .btn-secondary {
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    font-family: var(--cp-font) !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px !important;
}
.btn-primary { background: linear-gradient(90deg, #ff2f4f, #ff2bd6) !important; color: #fff !important; text-shadow: 0 0 6px rgba(0, 0, 0, 0.5); }
.btn-primary:hover { background: linear-gradient(90deg, #ff2bd6, #22f2ff) !important; transform: none !important; }
.btn-secondary { background: rgba(34, 242, 255, 0.12) !important; color: var(--cp-cyan) !important; border: 1px solid var(--cp-cyan) !important; }
.btn-secondary:hover { background: rgba(34, 242, 255, 0.28) !important; transform: none !important; }
.btn-primary:disabled { background: #333a44 !important; }

/* Taxi / mission notifications (inline-styled) */
#taxi-notification {
    background: var(--cp-bg-strong) !important;
    border: 1px solid var(--cp-gold) !important;
    border-radius: 0 !important;
    box-shadow: 0 0 12px rgba(255, 201, 60, 0.45) !important;
    font-family: var(--cp-font) !important;
    color: var(--cp-gold) !important;
    letter-spacing: 1px;
}

/* Start gate */
#start-gate { background: var(--cp-scan), radial-gradient(circle at 50% 40%, #2a0c3a 0%, #050814 70%) !important; }
#start-gate .sg-title { font-family: 'Orbitron', 'Noto Sans SC', sans-serif !important; font-weight: 900; color: var(--cp-cyan) !important; text-shadow: 0 0 14px var(--cp-cyan), 0 0 40px rgba(255, 43, 214, 0.6) !important; }
#start-gate .sg-sub { font-family: var(--cp-font) !important; color: var(--cp-magenta); text-shadow: 0 0 8px var(--cp-magenta); text-transform: uppercase; }

/* Touch controls */
.tbtn {
    background: var(--cp-bg) !important;
    border: 1px solid rgba(34, 242, 255, 0.7) !important;
    box-shadow: 0 0 8px rgba(34, 242, 255, 0.35);
    color: var(--cp-cyan) !important;
    font-family: var(--cp-font) !important;
}
.tbtn.pressed { background: rgba(255, 43, 214, 0.45) !important; }
.tbtn-e.ready { background: var(--cp-cyan) !important; color: #04121a !important; box-shadow: 0 0 14px var(--cp-cyan); }
#joystick { border-color: rgba(34, 242, 255, 0.6) !important; box-shadow: 0 0 14px rgba(34, 242, 255, 0.25); }
#joystick-knob { background: radial-gradient(circle, #ff2bd6 0%, rgba(255, 43, 214, 0.4) 60%, transparent 70%) !important; box-shadow: 0 0 12px var(--cp-magenta) !important; }

/* ===== Boot screen: until the game is built and the intro starts, nothing of the UI shows ===== */
#boot-loader { display: none; }
body.booting #boot-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px), radial-gradient(circle at 50% 40%, #16224a 0%, #050814 70%);
    color: #e8fbff;
    font-family: 'Orbitron', 'Noto Sans SC', system-ui, sans-serif;
}
body.booting #game-container, body.booting .modal, body.booting #comic-intro,
body.booting [id$="-prompt"], body.booting #taxi-hint, body.booting #day-clock { visibility: hidden !important; }
#boot-loader .bl-title { font-size: clamp(38px, 7vw, 76px); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: #fff; text-shadow: 0 0 14px rgba(34, 242, 255, 0.7); }
#boot-loader .bl-title span { color: #ffd23f; text-shadow: 0 0 14px rgba(255, 201, 60, 0.7); }
#boot-loader .bl-sub { margin: 6px 0 28px; letter-spacing: 6px; color: #ff2bd6; text-shadow: 0 0 8px #ff2bd6; font-size: 14px; }
#boot-loader .bl-bar { width: min(320px, 70vw); height: 4px; background: rgba(34, 242, 255, 0.15); overflow: hidden; }
#boot-loader .bl-bar div { width: 35%; height: 100%; background: linear-gradient(90deg, #ff2bd6, #22f2ff); box-shadow: 0 0 10px #22f2ff; animation: blSlide 1.2s ease-in-out infinite; }
@keyframes blSlide { from { transform: translateX(-110%); } to { transform: translateX(310%); } }
#boot-loader .bl-text { margin-top: 14px; font-size: 12px; letter-spacing: 3px; color: #8fb6c4; text-transform: uppercase; }

/* Chongqing tour: no joystick / action buttons (the tour drives you), only the camera button (👁)
   on the flight and the river cruise; no flight / cruise / taxi status panels */
body.tour-mode #joystick, body.tour-mode #touch-buttons .tbtn { display: none !important; }
body.tour-mode:has(#flight-hud[style*="block"]) #touch-buttons .tbtn[data-tap="KeyV"],
body.tour-mode:has(#cruise-hud[style*="block"]) #touch-buttons .tbtn[data-tap="KeyV"] { display: flex !important; }
body.tour-mode #flight-hud, body.tour-mode #cruise-hud, body.tour-mode #tour-hud { display: none !important; }
