:root {
    color-scheme: dark;
    --primary-font-stack: "Flight Time", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --shell-width: 1280px;
    --shell-height: 720px;
    --shell-scale: 1;
    --shell-padding: 10px;
}

@font-face {
    font-family: "Flight Time";
    src: url("../assets/FlightTime.ttf") format("truetype");
    font-display: swap;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

html {
    height: 100%;
}

img,
canvas {
    user-select: none;
    -webkit-user-drag: none;
}

body {
    margin: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    padding: var(--shell-padding);
    font-family: var(--primary-font-stack);
    color: #fff;
    overflow: hidden;
    position: relative;
    gap: var(--shell-padding);
    -webkit-tap-highlight-color: transparent;
}

#controllerCursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(148, 210, 255, 0.9);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
    z-index: 80;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#controllerCursor.visible {
    opacity: 1;
}

#controllerCursor.clicking {
    transform: translate(-50%, -50%) scale(0.9);
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 16px rgba(96, 165, 250, 0.8);
}

body.settings-open {
    overflow: hidden;
}

body.info-modal-open {
    overflow: hidden;
}

.touch-only {
    display: none;
}

body.touch-enabled .desktop-only {
    display: none;
}

body.touch-enabled .touch-only {
    display: inline;
}

button:focus-visible,
input[type='range']:focus-visible,
input[type='checkbox']:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.85);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body.reduced-effects *,
body.reduced-effects *::before,
body.reduced-effects *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

#settingsButton {
    position: fixed;
    top: clamp(18px, 4vw, 28px);
    right: clamp(18px, 4vw, 28px);
    z-index: 30;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.86), rgba(99, 102, 241, 0.86));
    color: #e0f2fe;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(15, 118, 110, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease;
}

#settingsButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(15, 118, 110, 0.4);
}

#settingsButton .icon {
    font-size: 1rem;
}

body.touch-enabled #settingsButton {
    padding: 12px 18px;
    font-size: 0.82rem;
}

#settingsDrawer[hidden] {
    display: none;
}

#settingsDrawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
}

#settingsDrawer .settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#settingsDrawer .settings-content {
    position: relative;
    width: min(480px, 92vw);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.96), rgba(8, 16, 32, 0.92));
    border-radius: 20px;
    padding: clamp(22px, 5vw, 32px);
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.65), inset 0 0 0 1px rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(148, 210, 255, 0.18);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: min(90vh, 640px);
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
}

#settingsDrawer h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.92);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.settings-row .setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
    color: rgba(226, 232, 240, 0.9);
}

.settings-row .setting-label span {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.settings-row output {
    font-size: 0.82rem;
    color: rgba(148, 210, 255, 0.92);
    min-width: 3ch;
    text-align: right;
}

.settings-row input[type='range'] {
    flex: 1;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
}

.settings-row input[type='range']::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.settings-row input[type='range']::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.settings-toggle input[type='checkbox'] {
    appearance: none;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    position: relative;
    cursor: pointer;
    transition: background 160ms ease;
}

.settings-toggle .toggle-status {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(224, 231, 255, 0.82);
}

.settings-toggle input[type='checkbox']::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0f2fe;
    top: 2px;
    left: 2px;
    transition: transform 160ms ease, background 160ms ease;
    box-shadow: 0 4px 10px rgba(14, 116, 144, 0.35);
}

.settings-toggle input[type='checkbox']:checked {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.8), rgba(99, 102, 241, 0.8));
}

.settings-toggle input[type='checkbox']:checked::after {
    transform: translateX(18px);
    background: #f8fafc;
}

.settings-row.difficulty-row {
    flex-wrap: wrap;
    align-items: flex-start;
}

.settings-row.difficulty-row .setting-label {
    flex-basis: 160px;
}

.difficulty-selector {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.difficulty-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(59, 130, 246, 0.28);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.difficulty-option input[type='radio'] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.difficulty-option .difficulty-name {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.92);
}

.difficulty-option .difficulty-note {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.78);
}

.difficulty-option.selected {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
    background: rgba(30, 41, 59, 0.75);
}

.difficulty-option:focus-within {
    border-color: rgba(191, 219, 254, 0.85);
    box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.4);
}

.difficulty-description {
    margin: -4px 0 0 0;
    font-size: 0.76rem;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.4;
}

@media (max-width: 640px) {
    .settings-row.difficulty-row .setting-label {
        flex-basis: 100%;
    }

    .difficulty-selector {
        width: 100%;
    }
}

#settingsCloseButton {
    align-self: flex-end;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: rgba(148, 210, 255, 0.92);
    padding: 6px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

#settingsCloseButton:hover {
    background: rgba(30, 58, 138, 0.66);
    color: rgba(224, 242, 254, 0.92);
}

#preflightBar {
    width: min(520px, 100%);
    padding: 0 clamp(16px, 4vw, 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: clamp(12px, 3vw, 16px);
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

#gameShell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    height: auto;
    margin: 0;
    z-index: 0;
    min-height: 0;
}

#playfield {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    justify-items: stretch;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
}

#playfieldStage {
    position: relative;
    width: min(100%, calc(var(--shell-width) * var(--shell-scale)));
    max-width: 100%;
    margin: 0 auto;
    min-height: 0;
    justify-self: center;
}

#gameCanvas {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
}

#preflightBar[hidden] {
    display: none;
}

#loadingScreen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: clamp(28px, 6vw, 80px);
    background: #fff;
    z-index: 999;
    transition: opacity 400ms ease;
    text-align: center;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loadingImage {
    width: clamp(180px, 40vw, 420px);
    max-width: 520px;
    justify-self: center;
    display: block;
    margin: 0 auto;
    align-self: center;
}

.loading-credit {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    color: #0f172a;
    margin: 0;
}

#loadingStatus {
    text-align: center;
    font-family: "Consolas", "Lucida Console", "Courier New", monospace;
    letter-spacing: 0.2em;
    color: #0f172a;
    text-transform: uppercase;
    line-height: 1.6;
    background: rgba(226, 232, 240, 0.92);
    border-radius: 18px;
    padding: clamp(18px, 3vw, 26px);
    box-shadow:
        0 16px 42px rgba(15, 23, 42, 0.4),
        inset 0 0 0 1px rgba(15, 23, 42, 0.18);
    min-width: min(360px, 100%);
    margin: 0 auto;
}

#loadingStatus .loading-prefix {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    color: #1e293b;
    margin-bottom: 8px;
}

#loadingStatus .loading-line {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

#loadingStatus .loading-percent {
    color: #0284c7;
}

#backgroundContainer {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at top, #1a237e 0%, #0d0221 40%, #000 100%);
}

.backgroundLayer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 4s ease-in-out;
    will-change: opacity;
}

.backgroundLayer.visible {
    opacity: 1;
}

canvas {
    position: relative;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(5, 18, 55, 0.95) 0%, rgba(8, 27, 70, 0.95) 45%, rgba(0, 4, 20, 0.98) 100%);
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
    display: block;
    margin-inline: auto;
}

#debugOverlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow:
        0 12px 28px rgba(2, 6, 23, 0.45),
        inset 0 0 0 1px rgba(94, 234, 212, 0.12);
    font-family: "Consolas", "Lucida Console", "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: rgba(226, 232, 240, 0.92);
    pointer-events: none;
    z-index: 2;
}

#debugOverlay.hidden {
    display: none;
}

#stats {
    position: sticky;
    top: 0;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
    padding: 18px 20px 16px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(8, 16, 32, 0.82));
    box-shadow:
        0 18px 38px rgba(2, 6, 23, 0.45),
        inset 0 0 0 1px rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(12px);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#stats .stat-row {
    width: 100%;
}

#stats .value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

#stats .stat-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#stats .stat-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: rgba(226, 232, 240, 0.9);
}

#stats .stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(148, 163, 184, 0.85);
}

#survivalTimer {
    position: absolute;
    top: clamp(14px, 3vw, 28px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
}

#survivalTimer.paused {
    background: rgba(30, 64, 175, 0.85);
    box-shadow:
        0 10px 24px rgba(30, 64, 175, 0.35),
        0 0 0 1px rgba(191, 219, 254, 0.28);
}

#survivalTimer.paused .value {
    color: #fde68a;
}

#survivalTimer .value {
    color: #7dd3fc;
}

#preflightPrompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 48px));
    max-height: min(72vh, 460px);
    margin: 0;
    padding: clamp(18px, 4vw, 24px);
    border-radius: 12px;
    border: 4px solid #f4f4f4;
    background: linear-gradient(180deg, #161616 0%, #111 100%);
    box-shadow:
        0 0 0 8px #202020,
        0 18px 0 rgba(0, 0, 0, 0.35);
    color: #fefefe;
    font-family: "Flight Time", "Press Start 2P", "Consolas", monospace;
    font-size: clamp(13px, 2.4vw, 16px);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    display: grid;
    gap: clamp(12px, 2.4vw, 18px);
    justify-items: center;
    pointer-events: auto;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
    z-index: 70;
}

#preflightPrompt::after {
    content: "";
    position: absolute;
    inset: clamp(8px, 2.1vw, 12px);
    border: 2px solid rgba(255, 255, 255, 0.12);
    z-index: 0;
    pointer-events: none;
}

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

#preflightPrompt .hud-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border: 3px solid #ffffff;
    background: linear-gradient(180deg, #e53e3e 0%, #b91c1c 100%);
    color: #ffffff;
    font-size: clamp(12px, 2vw, 14px);
    letter-spacing: 0.16em;
    box-shadow: 0 4px 0 #450a0a;
}

#preflightPrompt .prompt-text {
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
    width: 100%;
    max-width: 32ch;
}

#preflightLoadoutSummary {
    display: grid;
    gap: clamp(10px, 2.2vw, 16px);
    width: 100%;
    justify-items: stretch;
}

@media (min-width: 520px) {
    #preflightLoadoutSummary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.preflight-loadout-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(10px, 2vw, 14px);
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.9), rgba(15, 118, 110, 0.22));
    border: 1px solid rgba(148, 210, 255, 0.4);
    box-shadow: 0 12px 26px rgba(5, 8, 25, 0.45);
    text-align: left;
}

.preflight-loadout-thumb {
    width: clamp(48px, 10vw, 60px);
    height: clamp(48px, 10vw, 60px);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(56, 189, 248, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.32);
}

.preflight-loadout-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(59, 130, 246, 0.4));
}

.preflight-loadout-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preflight-loadout-label {
    font-size: clamp(0.58rem, 1.6vw, 0.64rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.78);
}

.preflight-loadout-value {
    font-size: clamp(0.78rem, 2.1vw, 0.9rem);
    font-weight: 600;
    color: rgba(248, 250, 252, 0.96);
}

.preflight-loadout-meta {
    font-size: clamp(0.6rem, 1.8vw, 0.72rem);
    color: rgba(226, 232, 240, 0.78);
}

#preflightPrompt[hidden] {
    display: none;
}

#mobilePreflightButton {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    border: 3px solid #f4f4f4;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    color: #f8fafc;
    font-size: clamp(12px, 2.6vw, 15px);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 0 #0f172a;
    transition: transform 120ms ease, box-shadow 120ms ease;
    touch-action: manipulation;
}

#mobilePreflightButton:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #0f172a;
}

body.touch-enabled #mobilePreflightButton {
    display: inline-flex;
}

body.touch-enabled #preflightPrompt .desktop-only {
    display: none;
}

@media (max-width: 520px) {
    #preflightPrompt {
        width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
    }

    #preflightPrompt::after {
        inset: clamp(6px, 3vw, 10px);
    }
}

#stats span.value {
    font-weight: 700;
    color: #ffd54f;
}

#stats #comboMeter {
    width: 100%;
    margin: 4px 0 0;
}


.info-panel .control-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.flight-controls-toggle {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.controls-toggle {
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.82));
    color: rgba(226, 232, 240, 0.94);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.controls-toggle:hover,
.controls-toggle:focus-visible {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.28);
    outline: none;
}

.controls-toggle:active {
    transform: translateY(1px);
}

.controls-toggle[aria-expanded='true'] {
    border-color: rgba(129, 230, 217, 0.45);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.32);
}

.flight-controls-section {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.flight-controls-title {
    margin: 0 0 12px;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
}

.flight-controls-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-panel .control-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.info-panel .control-keys {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 96px;
}

.info-panel .keycap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.85));
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    box-shadow: inset 0 -2px 6px rgba(13, 148, 136, 0.25);
}

.info-panel .keycap.wide {
    min-width: 58px;
}

.info-panel .control-action {
    flex: 1;
    color: rgba(226, 232, 240, 0.86);
    font-size: 0.88rem;
}

.info-panel .control-action-title {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(148, 210, 255, 0.95);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.info-panel .control-details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-panel .control-details li {
    line-height: 1.45;
}

.info-panel .control-label {
    display: inline-block;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.95);
    margin-right: 8px;
}

.info-panel .control-tip {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.88);
}

.info-panel .mission-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-panel .mission-list li {
    position: relative;
    padding-left: 18px;
    color: rgba(226, 232, 240, 0.92);
}

.info-panel .mission-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.info-panel .card-body {
    margin: 0;
    color: rgba(224, 231, 255, 0.9);
    font-size: 0.88rem;
    line-height: 1.65;
}

#intelCard .card-body {
    transition: opacity 220ms ease;
}

.challenge-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.challenge-section h3,
.cosmetic-section h3 {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.82);
}

.challenge-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-item {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(94, 234, 212, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

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

.challenge-title {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.95);
}

.challenge-reset {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
}

.challenge-description {
    margin: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.82rem;
    line-height: 1.45;
}

.challenge-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.challenge-progress-track {
    height: 8px;
    width: 100%;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 999px;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(99, 102, 241, 0.9));
    border-radius: inherit;
    width: 0;
    transition: width 180ms ease;
}

.challenge-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.82);
}

.challenge-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    color: rgba(148, 210, 255, 0.8);
}

.challenge-status {
    color: rgba(226, 232, 240, 0.92);
}

.challenge-claim {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85));
    color: rgba(15, 23, 42, 0.92);
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.challenge-claim:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.35);
}

.challenge-claim:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

.cosmetic-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.cosmetic-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cosmetic-group-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

.cosmetic-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weapon-options {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.weapon-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 210, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.32);
}

.weapon-summary-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(56, 189, 248, 0.28));
}

.weapon-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weapon-summary-name {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.92);
}

.weapon-summary-description {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.85);
}

.weapon-change-button {
    align-self: flex-start;
    padding-inline: 18px;
}

.custom-loadout-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 210, 255, 0.18);
}

.custom-loadout-section h4 {
    margin: 0;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.85);
}

.custom-loadout-description {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.82);
}

.custom-loadout-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .custom-loadout-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

.custom-loadout-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.85), rgba(14, 116, 144, 0.32));
    border: 1px solid rgba(148, 210, 255, 0.26);
    box-shadow: 0 18px 34px rgba(5, 8, 25, 0.45);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.custom-loadout-card.is-active {
    border-color: rgba(244, 114, 182, 0.85);
    box-shadow: 0 22px 44px rgba(244, 114, 182, 0.32);
}

.custom-loadout-card.has-locked {
    border-color: rgba(248, 113, 113, 0.6);
}

.custom-loadout-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.95), rgba(56, 189, 248, 0.95));
    color: #fff;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.35);
}

.custom-loadout-header {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
}

.custom-loadout-header-actions {
    display: flex;
    gap: 8px;
}

.custom-loadout-name-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.custom-loadout-name-label {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.68);
}

.custom-loadout-name-input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 210, 255, 0.34);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    padding: 9px 12px;
    font-size: 0.78rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.custom-loadout-name-input:focus {
    border-color: rgba(56, 189, 248, 0.82);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
    outline: none;
}

.custom-loadout-save,
.custom-loadout-edit {
    border-radius: 999px;
    border: 1px solid rgba(148, 210, 255, 0.32);
    background: rgba(15, 23, 42, 0.65);
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 16px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.custom-loadout-save:hover,
.custom-loadout-save:focus-visible,
.custom-loadout-edit:hover,
.custom-loadout-edit:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(148, 210, 255, 0.75);
    box-shadow: 0 14px 26px rgba(14, 116, 144, 0.35);
    outline: none;
}

.custom-loadout-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.custom-loadout-preview-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.custom-loadout-preview-thumb {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(56, 189, 248, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.custom-loadout-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(56, 189, 248, 0.3));
}

.custom-loadout-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-loadout-preview-title {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.7);
}

.custom-loadout-preview-value {
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.94);
}

.custom-loadout-link {
    border: none;
    background: none;
    color: rgba(148, 210, 255, 0.86);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    align-self: flex-start;
    transition: color 160ms ease;
}

.custom-loadout-link:hover,
.custom-loadout-link:focus-visible {
    color: rgba(244, 114, 182, 0.92);
    text-decoration: underline;
    outline: none;
}

.custom-loadout-tags {
    display: grid;
    gap: 12px;
}

@media (min-width: 540px) {
    .custom-loadout-tags {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.custom-loadout-tag {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(56, 189, 248, 0.28);
}

.custom-loadout-tag-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.7);
}

.custom-loadout-tag-value {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.9);
}

.custom-loadout-trail-swatch {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.32);
}

.custom-loadout-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-loadout-apply {
    align-self: flex-start;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.92), rgba(99, 102, 241, 0.92));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.custom-loadout-apply:hover,
.custom-loadout-apply:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(56, 189, 248, 0.45);
    outline: none;
}

.custom-loadout-status {
    margin: 0;
    min-height: 0.9rem;
    font-size: 0.7rem;
    color: rgba(148, 210, 255, 0.82);
}

.custom-loadout-status.error {
    color: rgba(248, 113, 113, 0.92);
}

.custom-loadout-status.success {
    color: rgba(52, 211, 153, 0.88);
}

.custom-loadout-locked {
    margin: 0;
    font-size: 0.68rem;
    color: rgba(248, 113, 113, 0.9);
}

.cosmetic-option {
    border: 1px solid rgba(148, 210, 255, 0.18);
    background: rgba(15, 23, 42, 0.45);
    color: rgba(226, 232, 240, 0.9);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.cosmetic-option:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.45);
}

.cosmetic-option.equipped {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 12px 24px rgba(37, 99, 235, 0.25);
    background: rgba(56, 189, 248, 0.12);
}

.cosmetic-option:disabled {
    opacity: 0.45;
    cursor: default;
}

.cosmetic-option.locked {
    border-style: dashed;
}

.cosmetic-option-label {
    font-weight: 600;
}

.cosmetic-option-rarity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.rarity-common {
    background: rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.88);
}

.rarity-rare {
    background: rgba(59, 130, 246, 0.22);
    color: rgba(191, 219, 254, 0.96);
}

.rarity-epic {
    background: rgba(147, 51, 234, 0.24);
    color: rgba(233, 213, 255, 0.96);
}

.rarity-legendary {
    background: rgba(245, 158, 11, 0.28);
    color: rgba(253, 230, 138, 0.96);
}

.rarity-mythic {
    background: rgba(236, 72, 153, 0.28);
    color: rgba(251, 207, 232, 0.96);
}

.meta-progress-grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

@media (min-width: 960px) {
    .meta-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.meta-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 210, 255, 0.18);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.meta-card h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.94);
}

.meta-card-summary {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.85rem;
}

.reward-catalogue {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.reward-card {
    border: 1px solid rgba(148, 210, 255, 0.14);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.reward-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 210, 255, 0.32);
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.22);
}

.reward-card.owned {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.22);
}

.reward-card.limited {
    border-style: dashed;
}

.reward-card.rarity-rare {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
}

.reward-card.rarity-epic {
    box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.18);
}

.reward-card.rarity-legendary {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.22);
}

.reward-card.rarity-mythic {
    box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.25);
}

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

.reward-card-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(226, 232, 240, 0.94);
}

.reward-card-rarity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.reward-card-preview {
    border-radius: 12px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.78);
    overflow: hidden;
}

.reward-card-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.reward-card-preview.preview-weapon span {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.78);
}

.reward-card-description {
    margin: 0;
    font-size: 0.84rem;
    color: rgba(226, 232, 240, 0.78);
}

.reward-card-traits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reward-card-traits li {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(59, 130, 246, 0.22);
    color: rgba(226, 232, 240, 0.85);
}

.reward-card-sources {
    margin: 0;
    font-size: 0.74rem;
    color: rgba(125, 211, 252, 0.92);
}

.reward-card-status {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.season-pass-progress {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(30, 58, 138, 0.45);
    overflow: hidden;
}

#seasonPassProgressFill {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #f472b6, #fbbf24);
    transition: width 200ms ease;
}

.season-pass-tier-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.season-pass-tier {
    border: 1px solid rgba(148, 210, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.season-pass-tier.unlocked {
    border-color: rgba(250, 204, 21, 0.5);
}

.season-pass-tier.claimed {
    opacity: 0.85;
}

.season-pass-tier-label {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
}

.season-pass-tier-threshold {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.season-pass-tier-reward {
    font-size: 0.78rem;
    color: rgba(253, 224, 71, 0.92);
}

.community-goal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.community-goal-item {
    border: 1px solid rgba(148, 210, 255, 0.14);
    border-radius: 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.community-goal-item.completed {
    border-color: rgba(74, 222, 128, 0.42);
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.22);
}

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

.community-goal-name {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
}

.community-goal-completed {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(134, 239, 172, 0.96);
}

.community-goal-description {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.78);
}

.community-goal-progress-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(30, 58, 138, 0.5);
    overflow: hidden;
}

.community-goal-progress-fill {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.community-goal-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.74);
}

.community-goal-time {
    color: rgba(165, 243, 252, 0.9);
}

.achievement-badge-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 210, 255, 0.14);
    border-radius: 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    opacity: 0.75;
}

.achievement-badge-item.unlocked {
    opacity: 1;
    border-color: rgba(249, 115, 22, 0.48);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.22);
}

.achievement-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.9), rgba(217, 70, 239, 0.6));
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

.achievement-badge-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.achievement-badge-title {
    font-weight: 600;
    color: rgba(226, 232, 240, 0.92);
}

.achievement-badge-description {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.74);
}

.achievement-badge-status {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.reward-card.empty,
.community-goal-empty,
.achievement-badge-empty {
    border: 1px dashed rgba(148, 210, 255, 0.22);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: rgba(148, 163, 184, 0.95);
    background: rgba(15, 23, 42, 0.45);
    font-size: 0.85rem;
}

.intel-log {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.intel-log li {
    position: relative;
    padding-left: 18px;
    color: rgba(226, 232, 240, 0.94);
}

.intel-log li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.intel-log li.locked {
    color: rgba(148, 163, 184, 0.75);
}

.intel-log li.locked::before {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.7), rgba(100, 116, 139, 0.5));
    box-shadow: none;
}

.intel-log .intel-title {
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin: 0 0 6px;
    color: rgba(148, 210, 255, 0.82);
}

.intel-log .intel-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.7;
}

#touchControls {
    position: fixed;
    inset: 0;
    display: none;
    pointer-events: none;
    z-index: 1;
    --touch-bottom: clamp(16px, 8vh, 72px);
    --joystick-left: max(16px, calc(50% - 450px - 108px));
    --fire-left: auto;
    --fire-right: max(16px, calc(50% - 450px - 96px));
}

@media (pointer: coarse) {
    #touchControls {
        display: block;
    }
}

body.motion-controls-enabled #touchControls {
    display: none !important;
    pointer-events: none;
}

#joystickZone {
    position: absolute;
    width: clamp(132px, 26vw, 188px);
    height: clamp(132px, 26vw, 188px);
    left: var(--joystick-left);
    bottom: var(--touch-bottom);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.58);
    border: 2px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#joystickZone .joystick-ring {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 2px dashed rgba(148, 163, 184, 0.28);
}

#joystickZone .joystick-thumb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38%;
    height: 38%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.9), rgba(2, 132, 199, 0.75));
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.65);
    transform: translate(calc(-50% + var(--thumb-x, 0px)), calc(-50% + var(--thumb-y, 0px)));
    transition: transform 80ms ease-out;
}

#fireButton {
    position: absolute;
    left: var(--fire-left);
    right: var(--fire-right);
    bottom: var(--touch-bottom);
    width: clamp(108px, 24vw, 160px);
    height: clamp(108px, 24vw, 160px);
    border-radius: 40px;
    border: none;
    pointer-events: auto;
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: radial-gradient(circle at 30% 30%, rgba(255, 107, 214, 0.92), rgba(255, 64, 129, 0.88));
    box-shadow: 0 18px 38px rgba(255, 64, 129, 0.45);
    transition: transform 120ms ease, box-shadow 120ms ease;
    touch-action: manipulation;
}

#fireButton:active,
#fireButton.active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 12px 28px rgba(255, 64, 129, 0.35);
}

#overlay { 
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(5, 8, 25, 0.92), rgba(1, 3, 12, 0.94));
    padding: clamp(18px, 4vw, 54px);
    transition: opacity 200ms ease;
    z-index: 4;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
}

#pauseOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
    background: rgba(6, 11, 25, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 12;
    transition: opacity 180ms ease;
}

#pauseOverlay[hidden] {
    display: none;
}

#pauseOverlay .pause-card {
    width: min(420px, 92vw);
    padding: clamp(22px, 5vw, 36px);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    box-shadow:
        0 28px 56px rgba(2, 6, 23, 0.58),
        inset 0 0 0 1px rgba(96, 165, 250, 0.22);
    color: #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 24px);
}

#pauseOverlay .pause-card h2 {
    margin: 0;
    font-size: clamp(1.4rem, 4.2vw, 2.2rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bfdbfe;
}

#pauseOverlay .pause-card p {
    margin: 0;
    line-height: 1.5;
}

#pauseOverlay .pause-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

#pauseOverlay .pause-actions button {
    border: none;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 24px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

#pauseOverlay .pause-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(56, 189, 248, 0.92));
    color: #0f172a;
    box-shadow: 0 18px 32px rgba(56, 189, 248, 0.35);
}

#pauseOverlay .pause-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 38px rgba(56, 189, 248, 0.42);
}

#pauseOverlay .pause-primary:active {
    transform: translateY(2px) scale(0.98);
}

#pauseOverlay .pause-secondary {
    background: transparent;
    color: #bfdbfe;
    border: 1px solid rgba(191, 219, 254, 0.45);
    box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.25);
}

#pauseOverlay .pause-secondary:hover {
    opacity: 0.85;
}

#pauseOverlay .pause-secondary:active {
    transform: translateY(1px) scale(0.99);
}

#pauseOverlay .pause-hint {
    font-size: 0.85rem;
    color: rgba(191, 219, 254, 0.85);
}

.overlay-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(14px, 3vw, 24px);
    padding: clamp(24px, 5vw, 48px);
    width: min(720px, 92vw);
    max-height: min(92vh, 720px);
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    background: linear-gradient(155deg, rgba(8, 15, 35, 0.95), rgba(2, 6, 23, 0.9));
    border-radius: 28px;
    box-shadow:
        0 32px 64px rgba(2, 6, 23, 0.65),
        inset 0 0 0 1px rgba(56, 189, 248, 0.18);
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#overlay.hidden {
    pointer-events: none;
    opacity: 0;
}

#overlay .overlay-logo {
    margin: 0;
}

#overlay .overlay-logo img {
    display: block;
    max-width: clamp(200px, 50vw, 360px);
    height: auto;
}

#comicIntro {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 2vw, 21px);
    width: min(660px, 100%);
    margin: 0;
}

#comicIntro[hidden] {
    display: none;
}

.comic-panel {
    flex: 1 1 clamp(165px, 21%, 210px);
    min-height: 140px;
    border-radius: 18px;
    padding: clamp(12px, 1.5vw, 17px);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 14px 28px rgba(5, 8, 25, 0.6),
        inset 0 0 0 1px rgba(148, 210, 255, 0.22);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.85), rgba(99, 102, 241, 0.72));
    color: #0b1220;
    text-align: left;
}

.comic-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(226, 232, 240, 0.35), transparent 55%),
        radial-gradient(circle at bottom right, rgba(14, 116, 144, 0.4), transparent 60%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.comic-panel h3 {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.comic-panel p {
    margin: 0;
    font-size: 0.69rem;
    line-height: 1.45;
}

#callsignForm {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: min(315px, 100%);
}

#callsignForm label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.82);
}

#callsignForm .input-row {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#playerNameInput {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 210, 255, 0.35);
    background: rgba(8, 16, 32, 0.86);
    color: rgba(226, 232, 240, 0.95);
    padding: 9px 12px;
    font: inherit;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.15);
}

#playerNameInput:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.75);
    outline-offset: 3px;
}

#callsignHint {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.6);
}

#overlay p {
    margin: 0;
    font-size: 0.78rem;
    max-width: min(480px, 100%);
    color: rgba(224, 231, 255, 0.88);
    white-space: pre-line;
}

#overlayActions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: min(360px, 100%);
}

#overlayActions button {
    width: 100%;
}

#overlayActions .accent {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(59, 130, 246, 0.95));
    color: #0f172a;
    box-shadow: 0 20px 38px rgba(16, 185, 129, 0.4);
}

#overlayActions .accent:hover {
    box-shadow: 0 24px 46px rgba(16, 185, 129, 0.48);
}

#overlayActions .accent:active {
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.38);
}

#overlay button:not(.summary-tab):not(.pilot-preview-card) {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.92), rgba(99, 102, 241, 0.92));
    border: none;
    border-radius: 999px;
    padding: 11px 24px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.45);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

#overlay button:not(.summary-tab):not(.pilot-preview-card):hover {
    box-shadow: 0 22px 46px rgba(37, 99, 235, 0.52);
}

#overlay button:not(.summary-tab):not(.pilot-preview-card):active {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.48);
}

#overlay button[disabled] {
    cursor: default;
    opacity: 0.65;
    box-shadow: none;
}

#overlaySecondaryButton {
    background: transparent;
    border: 1px solid rgba(148, 210, 255, 0.45);
    color: rgba(224, 231, 255, 0.88);
    box-shadow: none;
}

#overlaySecondaryButton:hover {
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.3);
}

#overlayActions .tertiary {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 210, 255, 0.35);
    color: rgba(224, 231, 255, 0.9);
    box-shadow: none;
}

#overlayActions .tertiary:hover {
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.35);
}

#overlayActions .tertiary:active {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.28);
}

body.character-select-open,
body.weapon-select-open,
body.loadout-editor-open {
    overflow: hidden;
}

#characterSelectModal[hidden],
#weaponSelectModal[hidden],
#loadoutEditorModal[hidden] {
    display: none;
}

#characterSelectModal,
#weaponSelectModal,
#loadoutEditorModal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(24px, 5vw, 48px);
}

#characterSelectModal .character-select-backdrop,
#weaponSelectModal .character-select-backdrop,
#loadoutEditorModal .loadout-editor-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.94));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#characterSelectModal .character-select-content,
#weaponSelectModal .character-select-content,
#loadoutEditorModal .loadout-editor-content {
    position: relative;
    width: min(960px, 92vw);
    background: linear-gradient(155deg, rgba(8, 15, 35, 0.95), rgba(2, 6, 23, 0.92));
    border-radius: 28px;
    padding: clamp(24px, 4vw, 48px);
    box-shadow:
        0 32px 64px rgba(2, 6, 23, 0.65),
        inset 0 0 0 1px rgba(56, 189, 248, 0.22);
    color: rgba(226, 232, 240, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, 3vw, 28px);
    max-height: min(90vh, 720px);
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
}

#characterSelectModal h2,
#weaponSelectModal h2,
#loadoutEditorModal h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 2.1rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.92);
}

#characterSelectSummary,
#weaponSelectSummary,
#loadoutEditorSubtitle {
    width: min(72ch, 100%);
    max-width: 72ch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.4vw, 16px);
    color: rgba(191, 219, 254, 0.86);
    line-height: 1.5;
    min-height: clamp(64px, 12vh, 108px);
    max-height: clamp(140px, 26vh, 188px);
    overflow-y: auto;
    text-align: center;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
    padding-right: clamp(0px, 1vw, 10px);
}

#characterSelectSummary .character-summary-description,
#weaponSelectSummary .character-summary-description {
    margin: 0;
    font-size: clamp(0.72rem, 1.9vw, 0.9rem);
}

.loadout-editor-subtitle {
    display: block;
    color: rgba(148, 210, 255, 0.75);
    font-size: clamp(0.82rem, 2vw, 0.95rem);
    gap: 0;
    line-height: 1.6;
}

.loadout-editor-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.loadout-editor-close {
    border: none;
    background: rgba(15, 23, 42, 0.72);
    color: rgba(226, 232, 240, 0.92);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.35);
}

.loadout-editor-close:hover,
.loadout-editor-close:focus-visible {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.35);
    outline: none;
}

.loadout-editor-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.loadout-editor-summary {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 210, 255, 0.16);
}

.loadout-editor-summary-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loadout-editor-summary-label {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.6);
}

.loadout-editor-summary-value {
    font-size: clamp(0.82rem, 2vw, 0.98rem);
    color: rgba(226, 232, 240, 0.92);
    font-weight: 500;
}

.loadout-editor-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.loadout-editor-section h3 {
    margin: 0;
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.92);
}

.loadout-editor-section-note {
    margin: 0;
    font-size: clamp(0.68rem, 1.8vw, 0.82rem);
    color: rgba(148, 210, 255, 0.6);
    text-align: right;
}

#loadoutEditorModal .character-grid {
    justify-content: center;
}

.loadout-editor-chip-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 3vw, 18px);
}

.loadout-editor-option {
    border: 1px solid rgba(148, 210, 255, 0.22);
    background: rgba(8, 15, 35, 0.65);
    color: rgba(226, 232, 240, 0.92);
    padding: 10px 16px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.loadout-editor-option:hover:not(:disabled) {
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.45);
}

.loadout-editor-option.selected {
    border-color: rgba(56, 189, 248, 0.75);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 18px 34px rgba(37, 99, 235, 0.3);
}

.loadout-editor-option:disabled {
    opacity: 0.45;
    cursor: default;
}

.loadout-editor-option.locked {
    border-style: dashed;
}

.loadout-editor-option-thumb {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 210, 255, 0.28);
    background: rgba(15, 23, 42, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loadout-editor-option-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loadout-editor-option-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.loadout-editor-option-meta strong {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
}

.loadout-editor-option-meta span {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: rgba(148, 210, 255, 0.65);
}

.loadout-editor-trail-preview {
    width: 60px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 210, 255, 0.28);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85));
}

.loadout-editor-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#loadoutEditorSave {
    border-radius: 999px;
    border: 1px solid rgba(148, 210, 255, 0.32);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.68), rgba(56, 189, 248, 0.52));
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 22px;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.45);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

#loadoutEditorSave:hover,
#loadoutEditorSave:focus-visible {
    box-shadow: 0 24px 44px rgba(59, 130, 246, 0.45);
    outline: none;
}

.loadout-editor-actions .secondary {
    border-radius: 999px;
    border: 1px solid rgba(148, 210, 255, 0.32);
    background: rgba(15, 23, 42, 0.65);
    color: rgba(226, 232, 240, 0.86);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 9px 18px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.loadout-editor-actions .secondary:hover,
.loadout-editor-actions .secondary:focus-visible {
    border-color: rgba(148, 210, 255, 0.75);
    box-shadow: 0 18px 32px rgba(14, 116, 144, 0.35);
    outline: none;
}

.loadout-editor-content .character-card {
    max-width: clamp(220px, 28vw, 260px);
}

.loadout-editor-content .character-card.selected {
    border-color: rgba(148, 210, 255, 0.9);
}

#characterSelectSummary .character-summary-ongoing {
    width: 100%;
    margin: 0;
    padding: 0 0 0 1.25em;
    list-style: disc;
    text-align: left;
    font-size: clamp(0.68rem, 1.7vw, 0.82rem);
    color: rgba(226, 232, 240, 0.92);
}

#characterSelectSummary .character-summary-ongoing li {
    margin-bottom: 0.35em;
}

#characterSelectSummary .character-summary-ongoing[hidden] {
    display: none;
}

.character-grid {
    display: flex;
    justify-content: center;
    gap: clamp(16px, 4vw, 36px);
    flex-wrap: wrap;
    width: 100%;
}

.character-card {
    position: relative;
    flex: 1 1 clamp(180px, 26%, 240px);
    max-width: clamp(200px, 28vw, 260px);
    border: 1px solid rgba(148, 210, 255, 0.32);
    border-radius: 24px;
    background: linear-gradient(140deg, rgba(30, 64, 175, 0.22), rgba(15, 118, 110, 0.18));
    padding: clamp(18px, 2.4vw, 26px);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 36px rgba(5, 8, 25, 0.45);
}

.character-card:hover,
.character-card:focus-visible,
.character-card.selected {
    transform: translateY(-6px);
    border-color: rgba(148, 210, 255, 0.75);
    box-shadow: 0 28px 48px rgba(5, 8, 25, 0.6);
    outline: none;
}

.character-card:focus-visible {
    outline: 3px solid rgba(148, 210, 255, 0.65);
    outline-offset: 4px;
}

.character-card img {
    width: 100%;
    height: clamp(160px, 18vw, 210px);
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(14, 165, 233, 0.25));
    pointer-events: none;
}

.character-name {
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(244, 114, 182, 0.9);
}

.character-role {
    font-size: clamp(0.64rem, 1.8vw, 0.78rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.75);
}

.character-details {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: clamp(12px, 2vw, 18px);
    padding: clamp(12px, 1.6vw, 16px);
    border-radius: 18px;
    background: rgba(8, 15, 35, 0.92);
    box-shadow: 0 18px 32px rgba(2, 6, 23, 0.55);
    text-align: left;
    font-size: clamp(0.62rem, 1.6vw, 0.74rem);
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.94);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.character-details strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(96, 165, 250, 0.86);
}

.character-details ul {
    padding: 0 0 0 16px;
    margin: 0;
}

.character-details li {
    margin-bottom: 4px;
}

.character-card:hover .character-details,
.character-card:focus-visible .character-details,
.character-card:focus .character-details,
.character-card.selected .character-details {
    opacity: 1;
    transform: translateY(0);
}

.character-select-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

#characterSelectConfirm,
#characterSelectCancel,
#weaponSelectConfirm,
#weaponSelectCancel {
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
}

#characterSelectConfirm,
#weaponSelectConfirm {
    border: none;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.92), rgba(99, 102, 241, 0.92));
    color: #fff;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.45);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

#characterSelectConfirm[disabled],
#weaponSelectConfirm[disabled] {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

#characterSelectConfirm:not([disabled]):hover,
#weaponSelectConfirm:not([disabled]):hover {
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.55);
}

#characterSelectConfirm:not([disabled]):active,
#weaponSelectConfirm:not([disabled]):active {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.48);
}

#characterSelectCancel,
#weaponSelectCancel {
    border: 1px solid rgba(148, 210, 255, 0.4);
    background: transparent;
    color: rgba(226, 232, 240, 0.9);
}

#characterSelectCancel:hover,
#weaponSelectCancel:hover {
    border-color: rgba(148, 210, 255, 0.72);
    color: rgba(226, 232, 240, 1);
}

#overlaySecondaryButton:active {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

#overlay.unsupported #highScorePanel {
    display: none;
}

#comboMeter {
    width: 160px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    margin-top: 8px;
}

#comboFill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6a5acd, #00e5ff);
    transition: width 100ms ease-out;
}

#comboMeter.charged {
    background: rgba(16, 185, 129, 0.32);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

#comboMeter.charged #comboFill {
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.75));
}

#overlayPanels {
    width: 100%;
    display: flex;
    justify-content: center;
}

.summary-card {
    width: min(560px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 26px);
    border-radius: 18px;
    background: rgba(12, 15, 35, 0.68);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3vw, 20px);
    text-align: left;
}

.summary-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.summary-card-title {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.summary-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-tab {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: rgba(226, 232, 240, 0.9);
    border-radius: 999px;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.summary-tab:hover {
    transform: translateY(-1px);
}

.summary-tab:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.85);
    outline-offset: 2px;
}

.summary-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.82), rgba(99, 102, 241, 0.82));
    color: #e0f2fe;
    border-color: rgba(96, 165, 250, 0.45);
}

.summary-body {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 22px);
}

.summary-section {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.5vw, 18px);
}

.summary-section[hidden] {
    display: none;
}

.summary-section-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-section-header h3 {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.9);
}

.summary-status {
    margin: 0;
    font-size: 0.62rem;
    color: rgba(148, 163, 184, 0.85);
    min-height: 1.4em;
}

.summary-status.success {
    color: rgba(129, 230, 217, 0.9);
}

.summary-status.warning {
    color: rgba(251, 191, 36, 0.92);
}

.summary-status.error {
    color: rgba(248, 113, 113, 0.92);
}

.run-summary-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    background: rgba(15, 23, 42, 0.55);
    border-radius: 14px;
    padding: 12px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.run-summary-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.run-summary-metric .label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

.run-summary-metric .value {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.95);
}

.run-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.6rem;
    color: rgba(148, 163, 184, 0.78);
}

.run-summary-meta .meta-item:empty {
    display: none;
}

.summary-subpanel {
    background: rgba(15, 23, 42, 0.58);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
    width: 100%;
}

.summary-subtitle {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
    color: rgba(148, 163, 184, 0.95);
}

#leaderboardPanel .panel-title,
#sharePanel .panel-title {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
    color: rgba(148, 163, 184, 0.95);
}

#leaderboardPanel .panel-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.panel-tabs {
    display: inline-flex;
    gap: 6px;
}

.panel-tabs .leaderboard-tab {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.88);
    border-radius: 999px;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.panel-tabs .leaderboard-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(129, 140, 248, 0.85));
    color: #e0f2fe;
    border-color: rgba(96, 165, 250, 0.4);
}

.panel-tabs .leaderboard-tab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.panel-status {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.85);
    margin: 0;
}

.panel-status.success {
    color: rgba(134, 239, 172, 0.9);
}

.panel-status.loading {
    color: rgba(125, 211, 252, 0.88);
}

.panel-status.error {
    color: rgba(248, 113, 113, 0.92);
}

.panel-status.warning {
    color: rgba(251, 191, 36, 0.92);
}

.panel-status[hidden] {
    display: none;
}

.summary-subtitle {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
    color: rgba(148, 163, 184, 0.95);
}

#highScoreTitle {
    cursor: pointer;
}

#highScoreList {
    list-style: decimal inside;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.68rem;
}

#highScoreList li {
    color: rgba(226, 232, 240, 0.92);
}

#highScoreList li.empty {
    list-style: none;
    color: rgba(148, 163, 184, 0.85);
    font-style: italic;
}

#highScoreList li .time {
    font-weight: 600;
    color: #7dd3fc;
}

#highScoreList li .score {
    color: #facc15;
}

#leaderboardList {
    list-style: decimal inside;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.68rem;
}

#leaderboardList li {
    color: rgba(226, 232, 240, 0.92);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#leaderboardList li .meta {
    font-size: 0.54rem;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.78);
}

#leaderboardList li.empty {
    list-style: none;
    color: rgba(148, 163, 184, 0.85);
    font-style: italic;
}

#sharePanel {
    text-align: center;
}

#sharePanel .share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
}

#sharePanel button.share-button {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    padding: 8px 14px;
    font-size: 0.68rem;
    border-radius: 12px;
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(14, 165, 233, 0.35);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

#sharePanel button.share-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(14, 165, 233, 0.45);
}

#sharePanel button.share-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

#shareStatus {
    margin: 0;
    font-size: 0.62rem;
    color: rgba(148, 210, 255, 0.85);
    min-height: 1.4em;
    text-align: center;
}

#shareStatus.success {
    color: rgba(129, 230, 217, 0.9);
}

#shareStatus.error {
    color: rgba(248, 113, 113, 0.9);
}

@media (max-width: 1100px) {
    #gameShell {
        width: 100%;
        margin: 0;
        padding-inline: 0;
    }

    #instructionButtonBar {
        width: 100%;
        gap: clamp(6px, 1.6vw, 12px);
    }
}

@media (max-width: 768px) {
    body {
        padding: clamp(16px, 4vw, 28px);
        padding-inline: 10px;
        padding-bottom: clamp(80px, 24vw, 128px);
        align-items: stretch;
    }

    #gameShell {
        gap: clamp(16px, 5vw, 24px);
        width: 100%;
        margin: 0;
        padding-inline: 0;
    }

    #instructionButtonBar {
        padding-inline: clamp(12px, 6vw, 20px);
        gap: clamp(6px, 1.8vw, 12px);
        overflow-x: auto;
    }

    .instruction-button {
        flex: 1 0 auto;
        font-size: clamp(0.58rem, 1.8vw, 0.75rem);
        padding: clamp(10px, 2.5vw, 14px) clamp(12px, 4vw, 18px);
    }

    .info-modal-content {
        width: min(94vw, 600px);
        max-height: min(82vh, 720px);
    }

    .info-modal-body {
        padding: clamp(16px, 5vw, 24px);
    }
}

#pilotPreview {
    width: min(560px, 100%);
    background: rgba(15, 23, 42, 0.42);
    border-radius: 16px;
    padding: clamp(16px, 3.6vw, 22px);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

#pilotPreview .pilot-preview-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#pilotPreview h2 {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.85);
}

#pilotPreviewDescription {
    margin: 0;
    font-size: 0.64rem;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.5;
}

.pilot-preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pilot-preview-card {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    color: rgba(226, 232, 240, 0.92);
    font: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-align: left;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.pilot-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(59, 130, 246, 0.32);
    border-color: rgba(96, 165, 250, 0.4);
}

.pilot-preview-card:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.85);
    outline-offset: 3px;
}

.pilot-preview-card.active {
    border-color: rgba(129, 230, 217, 0.55);
    box-shadow: 0 16px 36px rgba(59, 130, 246, 0.38);
}

.pilot-preview-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}

.pilot-preview-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.95);
}

.pilot-preview-role {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.pilot-preview-card.active .pilot-preview-role {
    color: rgba(129, 230, 217, 0.92);
}

.pilot-preview-card.has-locked .pilot-preview-role {
    color: rgba(248, 113, 113, 0.9);
}

.pilot-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.pilot-preview-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.pilot-preview-meta-label {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.pilot-preview-meta-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.95);
    text-align: right;
}

.pilot-preview-locked {
    margin: 0;
    font-size: 0.6rem;
    color: rgba(248, 113, 113, 0.88);
}
#instructions {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-rows: auto;
    align-items: stretch;
    justify-items: stretch;
    gap: 12px;
    padding-top: 0;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
}

#instructions[data-active-panel] {
    grid-template-rows: auto 1fr;
    flex: 0 0 clamp(160px, 28vh, 260px);
    height: clamp(160px, 28vh, 260px);
    max-height: clamp(160px, 28vh, 260px);
    overflow: hidden;
}

#instructions:not([data-active-panel]) #instructionPanels {
    display: none;
}

#instructionButtonBar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    row-gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

#instructionPanels {
    flex: 1 1 auto;
    width: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 8px;
    max-height: none;
    min-height: 0;
}

#instructionPanels[hidden] {
    display: none !important;
}

.instruction-button {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid rgba(148, 210, 255, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 64, 175, 0.6));
    color: rgba(224, 242, 254, 0.92);
    padding: 12px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.5);
    transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease, color 160ms ease;
    white-space: nowrap;
}

.instruction-button:hover,
.instruction-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.86), rgba(99, 102, 241, 0.75));
    color: rgba(12, 18, 32, 0.92);
    outline: none;
}

.instruction-button:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.75);
    outline-offset: 3px;
}

.instruction-button:active {
    transform: translateY(1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.55);
}

.instruction-button.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(99, 102, 241, 0.82));
    color: rgba(12, 18, 32, 0.92);
    box-shadow: 0 18px 34px rgba(56, 189, 248, 0.45);
    border-color: rgba(148, 210, 255, 0.48);
}

.info-panel {
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.85), rgba(8, 16, 32, 0.78));
    border-radius: 18px;
    padding: clamp(18px, 3vw, 26px);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.45), inset 0 0 0 1px rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.4vw, 18px);
}

.info-panel .card-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(148, 210, 255, 0.9);
    margin: 0 0 12px;
}

.storyline-body {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 22px);
}

.storyline-current {
    background: rgba(13, 20, 38, 0.72);
    border-radius: 16px;
    border: 1px solid rgba(148, 210, 255, 0.18);
    padding: clamp(14px, 3vw, 20px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.storyline-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.storyline-meta {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.72);
}

.storyline-title {
    margin: 0;
    font-size: clamp(0.86rem, 2vw, 1.08rem);
    letter-spacing: 0.08em;
    color: rgba(224, 242, 254, 0.94);
}

.storyline-text {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.84);
}

.story-objectives {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-objectives[hidden] {
    display: none;
}

.story-objectives li {
    position: relative;
    margin: 0;
    padding-left: 18px;
    font-size: 0.68rem;
    color: rgba(190, 230, 255, 0.9);
    line-height: 1.5;
}

.story-objectives li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0.2em;
    font-size: 0.6rem;
    color: rgba(56, 189, 248, 0.8);
}

.storyboard-preview {
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 210, 255, 0.16);
    background: rgba(8, 16, 32, 0.55);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storyboard-preview[hidden] {
    display: none;
}

.storyboard-preview img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.storyboard-preview figcaption {
    margin: 0;
    font-size: 0.62rem;
    color: rgba(148, 210, 255, 0.75);
}

.storyline-grid {
    display: grid;
    gap: clamp(14px, 3vw, 18px);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.storyline-panel {
    background: rgba(13, 20, 38, 0.62);
    border-radius: 14px;
    border: 1px solid rgba(148, 210, 255, 0.14);
    padding: clamp(14px, 3vw, 18px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.05);
}

.storyline-panel-title {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.82);
}

.storyline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.storyline-entry {
    background: rgba(9, 14, 26, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(148, 210, 255, 0.12);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.04);
}

.storyline-entry-title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(224, 242, 254, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.storyline-entry-meta {
    font-size: 0.58rem;
    color: rgba(148, 210, 255, 0.68);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.storyline-entry-body {
    margin: 0;
    font-size: 0.64rem;
    line-height: 1.5;
    color: rgba(203, 213, 225, 0.82);
}

.storyline-entry--upcoming {
    border-style: dashed;
    background: rgba(9, 14, 26, 0.55);
}

.storyline-empty {
    font-size: 0.64rem;
    color: rgba(148, 163, 184, 0.78);
    border: 1px dashed rgba(148, 163, 184, 0.36);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(9, 14, 26, 0.45);
}

.info-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 6vw, 64px);
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.78), rgba(8, 16, 32, 0.86));
    backdrop-filter: blur(6px);
}

.info-modal[hidden] {
    display: none;
}

.info-modal-content {
    width: min(960px, 100%);
    max-height: min(80vh, 880px);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.95), rgba(8, 16, 32, 0.88));
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 28px 56px rgba(2, 6, 23, 0.65), inset 0 0 0 1px rgba(94, 234, 212, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(16px, 3vw, 24px) clamp(20px, 4vw, 28px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.8));
}

.info-modal-header h2 {
    margin: 0;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(148, 210, 255, 0.9);
}

.info-modal-close {
    border: 1px solid rgba(148, 210, 255, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: rgba(224, 242, 254, 0.92);
    font-size: clamp(0.72rem, 2vw, 0.9rem);
    line-height: 1;
    padding: clamp(6px, 1.4vw, 10px) clamp(10px, 2vw, 14px);
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease, color 160ms ease;
}

.info-modal-close:hover,
.info-modal-close:focus-visible {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.8), rgba(99, 102, 241, 0.72));
    color: rgba(12, 18, 32, 0.92);
    box-shadow: 0 14px 28px rgba(56, 189, 248, 0.35);
    outline: none;
}

.info-modal-close:focus-visible {
    outline: 2px solid rgba(148, 210, 255, 0.75);
    outline-offset: 3px;
}

.info-modal-body {
    padding: clamp(20px, 4vw, 32px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vw, 28px);
}

.mascot-callout {
    position: fixed;
    left: clamp(10px, 3vw, 24px);
    bottom: clamp(10px, 4vw, 28px);
    display: flex;
    align-items: flex-end;
    gap: clamp(12px, 2vw, 18px);
    max-width: min(320px, 70vw);
    transform: translateX(calc(-100% - 28px));
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms ease, opacity 220ms ease;
    z-index: 55;
}

.mascot-callout.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.mascot-callout img[data-mascot-image] {
    width: clamp(92px, 24vw, 140px);
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 28px rgba(2, 6, 23, 0.55));
}

.mascot-bubble {
    position: relative;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(8, 16, 32, 0.88));
    border: 1px solid rgba(148, 210, 255, 0.38);
    border-radius: 18px;
    padding: clamp(12px, 3vw, 18px) clamp(16px, 4vw, 22px);
    box-shadow: 0 20px 38px rgba(2, 6, 23, 0.55), inset 0 0 0 1px rgba(94, 234, 212, 0.12);
    max-width: min(260px, 68vw);
    color: rgba(224, 242, 254, 0.96);
}

.mascot-bubble::before {
    content: '';
    position: absolute;
    left: -14px;
    bottom: clamp(18px, 4vw, 26px);
    width: 18px;
    height: 18px;
    background: inherit;
    border: 1px solid rgba(148, 210, 255, 0.38);
    border-right: none;
    border-top: none;
    transform: rotate(45deg);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.12);
}

.mascot-text {
    margin: 0;
    font-size: clamp(0.82rem, 2.2vw, 0.95rem);
    line-height: 1.4;
    letter-spacing: 0.04em;
}

@media (max-width: 640px) {
    .mascot-callout {
        bottom: clamp(12px, 6vw, 20px);
        max-width: min(300px, 88vw);
    }

    .mascot-bubble::before {
        left: -12px;
    }
}
