@layer reset, base, components, modals, states;

@layer reset {
    :where(html, body) {
        margin: 0;
        padding: 0;
    }

    :where(#gameContainer, #gameContainer *, #gameContainer *::before, #gameContainer *::after, .cyber-dialog, .cyber-dialog *, .cyber-dialog *::before, .cyber-dialog *::after) {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
}

@layer base {
    :root {
        --bg-deep: #030714;
        --bg-void: #01030a;
        --surface-glass: rgba(7, 15, 34, 0.78);
        --surface-card: rgba(9, 20, 44, 0.86);
        --cyan: #00f2fe;
        --cyan-soft: rgba(0, 242, 254, 0.16);
        --cyan-border: rgba(0, 242, 254, 0.36);
        --magenta: #ff2a85;
        --magenta-soft: rgba(255, 42, 133, 0.16);
        --gold: #ffd700;
        --gold-soft: rgba(255, 215, 0, 0.16);
        --emerald: #00ff9d;
        --emerald-soft: rgba(0, 255, 157, 0.14);
        --danger: #ff3b5c;
        --text-main: #f8fafc;
        --text-sub: #cbd5e1;
        --text-muted: #94a3b8;
        --font-ui: 'M PLUS 1', 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, sans-serif;
        --font-display: 'Orbitron', 'Oxanium', 'M PLUS 1', sans-serif;
        --font-cyber: 'Orbitron', 'Oxanium', 'M PLUS 1', sans-serif;
        --font-art: 'Oxanium', 'M PLUS 1', 'Zen Kaku Gothic New', sans-serif;
        --font-dot: 'Chakra Petch', 'M PLUS 1 Code', sans-serif;
        --font-tech: 'Michroma', 'Chakra Petch', 'M PLUS 1 Code', sans-serif;
        --font-mono: 'Chakra Petch', 'Share Tech Mono', 'M PLUS 1 Code', ui-monospace, monospace;
        --font-stencil: 'Quantico', 'Chakra Petch', 'Orbitron', monospace;
        --font-wide: 'Syncopate', 'Orbitron', sans-serif;
        --font-zendots: 'Zen Dots', 'Orbitron', sans-serif;
        --radius-shell: 14px;
        --radius-panel: 10px;
        --radius-chip: 6px;
        --radius-badge: 12px;
        --in-oklab: ;
        --in-oklch: ;
    }

    @supports (background: linear-gradient(in oklab, white, black)) {
        :root {
            --in-oklab: in oklab;
            --in-oklch: in oklch;
        }
    }

    html, body {
        inline-size: 100%;
        block-size: 100%;
        block-size: 100dvh;
        background: radial-gradient(circle at 50% 35%, #07122a 0%, #02050d 65%, #010207 100%);
        color: var(--text-main);
        font-family: var(--font-ui);
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        touch-action: manipulation;
    }

    :where(button, select, input, [tabindex], [role="button"]):focus-visible {
        outline: 2px solid #67e8f9;
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.22);
    }

    .ui-svg {
        inline-size: 1.15em;
        block-size: 1.15em;
        flex-shrink: 0;
        display: block;
        shape-rendering: geometricPrecision;
    }

    .mini-svg {
        inline-size: 1em;
        block-size: 1em;
    }

    .cyan-txt { color: var(--cyan); }
    .mag-txt { color: var(--magenta); }
    .gold-txt { color: var(--gold); }
    .emerald-txt { color: var(--emerald); }
}

@layer components {
    /* ===== メインゲームコンテナ（モバイル全画面・デスクトップ縦型ショーケース） ===== */
    #gameContainer {
        position: relative;
        inline-size: 100%;
        block-size: 100%;
        block-size: 100dvh;
        background: #01030a;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        padding-block: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-bottom));
        padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
        gap: 6px;
        isolation: isolate;
    }

    .cosmos-shader-bg {
        position: absolute;
        inset: 0;
        inline-size: 100%;
        block-size: 100%;
        z-index: 0;
        pointer-events: none;
        display: block;
    }

    @media (min-width: 540px) and (min-height: 680px) {
        body::before,
        body::after {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
        }
        body::before {
            background:
                radial-gradient(ellipse 42% 60% at 14% 28%, color-mix(in oklch, #00f2fe 15%, transparent), transparent 72%),
                radial-gradient(ellipse 40% 58% at 86% 72%, color-mix(in oklch, #ec4899 13%, transparent), transparent 72%),
                radial-gradient(circle at 50% 42%, rgba(15, 36, 82, 0.45), transparent 64%);
            filter: blur(24px);
        }
        body::after {
            background-image:
                radial-gradient(1px 1px at 14% 22%, rgba(224, 242, 254, 0.42), transparent),
                radial-gradient(1px 1px at 26% 68%, rgba(103, 232, 249, 0.34), transparent),
                radial-gradient(1.5px 1.5px at 82% 24%, rgba(244, 114, 182, 0.34), transparent),
                radial-gradient(1px 1px at 88% 76%, rgba(224, 242, 254, 0.38), transparent),
                linear-gradient(to right, rgba(56, 189, 248, 0.028) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(56, 189, 248, 0.028) 1px, transparent 1px);
            background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 64px 64px, 64px 64px;
            opacity: 0.72;
        }
        #gameContainer {
            position: relative;
            z-index: 1;
            inline-size: min(100vw - 24px, 460px);
            block-size: min(94dvh, 880px);
            border-radius: 18px;
            border: 1px solid color-mix(in oklch, #38bdf8 46%, transparent);
            box-shadow:
                0 28px 80px rgba(0, 0, 0, 0.88),
                0 0 46px rgba(0, 242, 254, 0.20),
                0 0 90px rgba(56, 189, 248, 0.10),
                inset 0 1px 0 rgba(224, 242, 254, 0.14);
            transition: border-color 0.32s ease, box-shadow 0.32s ease;
        }
        @supports (corner-shape: squircle) {
            #gameContainer {
                corner-shape: squircle;
            }
        }
    }

    /* 四隅の近未来レーザー照準ブラケット（完全長方形シルエット維持・テキスト非干渉） */
    .hud-corner {
        position: absolute;
        inline-size: 15px;
        block-size: 15px;
        pointer-events: none;
        z-index: 12;
        opacity: 0.78;
        filter: drop-shadow(0 0 6px color-mix(in oklch, var(--cyan) 62%, transparent));
    }

    .hud-corner::after {
        content: "";
        position: absolute;
        inline-size: 4px;
        block-size: 4px;
        border-radius: 1px;
        background: #a5f3fc;
        box-shadow: 0 0 6px var(--cyan);
    }
    .corner-tl::after { top: -1px; left: -1px; }
    .corner-tr::after { top: -1px; right: -1px; }
    .corner-bl::after { bottom: -1px; left: -1px; }
    .corner-br::after { bottom: -1px; right: -1px; }

    .corner-tl {
        top: max(4px, env(safe-area-inset-top));
        left: max(4px, env(safe-area-inset-left));
        border-top: 1.5px solid var(--cyan);
        border-left: 1.5px solid var(--cyan);
    }
    .corner-tr {
        top: max(4px, env(safe-area-inset-top));
        right: max(4px, env(safe-area-inset-right));
        border-top: 1.5px solid var(--cyan);
        border-right: 1.5px solid var(--cyan);
    }
    .corner-bl {
        bottom: max(4px, env(safe-area-inset-bottom));
        left: max(4px, env(safe-area-inset-left));
        border-bottom: 1.5px solid var(--cyan);
        border-left: 1.5px solid var(--cyan);
    }
    .corner-br {
        bottom: max(4px, env(safe-area-inset-bottom));
        right: max(4px, env(safe-area-inset-right));
        border-bottom: 1.5px solid var(--cyan);
        border-right: 1.5px solid var(--cyan);
    }

    /* ===== トップHUDヘッダー ===== */
    .hud-header {
        position: relative;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        padding: 5px 9px;
        background: linear-gradient(180deg, rgba(6, 14, 34, 0.90) 0%, rgba(3, 8, 22, 0.84) 100%);
        border: 1px solid rgba(56, 189, 248, 0.34);
        border-radius: 10px;
        backdrop-filter: blur(12px);
        flex-shrink: 0;
    }

    .score-panel {
        flex: 1 1 auto;
        min-inline-size: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
    }

    .hud-meta-row {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 3px;
        min-inline-size: 0;
    }

    .phase-badge {
        font-family: var(--font-mono);
        font-size: 0.51rem;
        font-weight: 800;
        color: #031326;
        background: #38bdf8;
        padding: 1px 4px;
        border-radius: 5px;
        white-space: nowrap;
        letter-spacing: 0.01em;
        flex-shrink: 0;
    }

    .mode-badge {
        font-family: var(--font-mono);
        font-size: 0.50rem;
        font-weight: 700;
        color: var(--cyan);
        border: 1px solid rgba(0, 242, 254, 0.45);
        padding: 0 3.5px;
        border-radius: 5px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mode-badge.overdrive {
        color: #ffcf5c;
        border-color: rgba(255, 215, 0, 0.55);
        background: rgba(255, 215, 0, 0.12);
    }

    .mode-badge.campaign {
        color: #a5f3fc;
        border-color: rgba(56, 189, 248, 0.6);
        background: rgba(56, 189, 248, 0.14);
    }

    .best-score {
        font-family: var(--font-mono);
        font-size: 0.50rem;
        font-weight: 600;
        color: #94a3b8;
        letter-spacing: -0.02em;
        white-space: nowrap;
        min-inline-size: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-variant-numeric: tabular-nums;
    }

    .score-row {
        display: flex;
        align-items: baseline;
        gap: 5px;
        min-inline-size: 0;
        overflow: hidden;
    }

    .score-value {
        display: inline-block;
        font-family: var(--font-cyber);
        font-size: clamp(0.82rem, 3.25vw, 1.36rem);
        font-weight: 900;
        line-height: 1.05;
        letter-spacing: 0.035em;
        color: #f6fcff;
        font-variant-numeric: tabular-nums;
        transform: skewX(-6deg);
        padding-inline: 2px;
        text-shadow:
            -0.8px 0 0 rgba(0, 242, 254, 0.72),
            0.8px 0 0 rgba(255, 42, 133, 0.45),
            0 0 12px rgba(224, 242, 254, 0.80),
            0 0 26px rgba(0, 242, 254, 0.62),
            0 2px 5px rgba(0, 0, 0, 0.96);
        white-space: nowrap;
        flex-shrink: 0;
        transform-origin: left center;
    }

    #gameContainer[data-polarity="MAGENTA"] .score-value {
        color: #fff6fa;
        text-shadow:
            -0.8px 0 0 rgba(255, 42, 133, 0.75),
            0.8px 0 0 rgba(56, 189, 248, 0.45),
            0 0 12px rgba(255, 228, 240, 0.82),
            0 0 26px rgba(255, 42, 133, 0.68),
            0 2px 5px rgba(0, 0, 0, 0.96);
    }

    .score-value.score-pulse-a {
        animation: hudScorePulseA 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .score-value.score-pulse-b {
        animation: hudScorePulseB 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes hudScorePulseA {
        0% { transform: scale(1); filter: brightness(1); }
        38% { transform: scale(1.06); filter: brightness(1.38); }
        100% { transform: scale(1); filter: brightness(1); }
    }

    @keyframes hudScorePulseB {
        0% { transform: scale(1); filter: brightness(1); }
        38% { transform: scale(1.06); filter: brightness(1.38); }
        100% { transform: scale(1); filter: brightness(1); }
    }

    .dim-zero {
        opacity: 1;
        color: rgba(148, 197, 255, 0.24);
        font-weight: 700;
        text-shadow: none;
    }

    .combo-badge {
        display: inline-block;
        font-family: var(--font-cyber);
        font-size: clamp(0.48rem, 1.85vw, 0.58rem);
        font-weight: 800;
        letter-spacing: 0.03em;
        color: var(--gold);
        transform: skewX(-5deg);
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.78), 0 1px 4px rgba(0, 0, 0, 0.92);
        white-space: nowrap;
        min-inline-size: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-controls {
        display: flex;
        align-items: center;
        gap: 3px;
        flex-shrink: 0;
    }

    .hud-btn {
        min-inline-size: 30px;
        min-block-size: 30px;
        padding: 0 5px;
        border-radius: 8px;
        border: 1px solid rgba(56, 189, 248, 0.32);
        background: rgba(8, 18, 42, 0.88);
        color: var(--text-main);
        font-family: var(--font-ui);
        font-size: 0.74rem;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        cursor: pointer;
        white-space: nowrap;
        transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
        transition-timing-function: linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1), ease, ease, ease;
    }

    .hud-btn.icon-only {
        inline-size: 30px;
        padding: 0;
    }

    .hud-btn:hover {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.16);
        box-shadow: 0 0 14px rgba(0, 242, 254, 0.3);
        transform: translateY(-1px);
    }

    .hud-btn:active {
        transform: scale(0.94);
    }

    .hud-btn:hover:active {
        transform: translateY(0) scale(0.93);
    }

    .hud-btn.muted {
        color: var(--text-muted);
        border-color: rgba(148, 163, 184, 0.3);
    }

    @media (pointer: coarse) {
        .hud-btn {
            min-inline-size: 34px;
            min-block-size: 38px;
        }
        .hud-btn.icon-only {
            inline-size: 34px;
        }
    }

    .skin-dot {
        inline-size: 9px;
        block-size: 9px;
        border-radius: 50%;
        background: var(--cyan);
        box-shadow: 0 0 8px currentColor;
        flex-shrink: 0;
    }

    /* ===== AI ヴァルキリー通信バー（全文視認・省略なし） ===== */
    .ai-subtitle-bar {
        position: relative;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 6px;
        min-block-size: 30px;
        padding: 4px 9px;
        background: rgba(6, 15, 34, 0.84);
        border: 1px solid rgba(0, 242, 254, 0.25);
        border-left: 3px solid var(--nav-accent, var(--cyan));
        border-radius: 8px;
        flex-shrink: 0;
    }

    .ai-speaker-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 2px 7px 2px 2px;
        border-radius: 8px;
        background: rgba(0, 242, 254, 0.12);
        border: 1px solid var(--nav-accent, rgba(0, 242, 254, 0.35));
        flex-shrink: 0;
        transition: box-shadow 0.22s ease, border-color 0.22s ease;
    }

    .nav-portrait-micro,
    .nav-portrait-mini,
    .nav-portrait-sm {
        display: inline-grid;
        place-items: center;
        border-radius: 6px;
        overflow: hidden;
        background: radial-gradient(circle at 50% 35%, rgba(0, 242, 254, 0.16), rgba(4, 12, 28, 0.94));
        border: 1px solid var(--nav-accent, rgba(0, 242, 254, 0.45));
        flex-shrink: 0;
    }

    .nav-portrait-micro {
        inline-size: 18px;
        block-size: 18px;
        border-radius: 50%;
    }

    .nav-portrait-mini {
        inline-size: 26px;
        block-size: 26px;
        border-radius: 6px;
    }

    .ai-debrief-box .nav-portrait-mini {
        inline-size: 48px;
        block-size: 48px;
        border-radius: 10px;
        border-width: 1.5px;
        box-shadow: 0 0 14px rgba(0, 242, 254, 0.24);
    }

    .nav-portrait-sm {
        inline-size: 36px;
        block-size: 36px;
        border-radius: 8px;
        border-color: var(--nav-preview-accent, rgba(0, 242, 254, 0.45));
    }

    .nav-portrait-img {
        inline-size: 100%;
        block-size: 100%;
        object-fit: cover;
        object-position: 50% 18%;
        display: block;
        filter: contrast(1.04) saturate(1.06);
    }

    .nav-portrait-micro svg,
    .nav-portrait-mini svg,
    .nav-portrait-sm svg,
    .nav-hero-portrait svg,
    .nav-crest svg {
        inline-size: 100%;
        block-size: 100%;
        display: block;
    }

    .ai-dot {
        inline-size: 6px;
        block-size: 6px;
        border-radius: 50%;
        background: var(--nav-accent, var(--cyan));
        box-shadow: 0 0 8px var(--nav-accent, var(--cyan));
    }

    .ai-label {
        font-family: var(--font-tech);
        font-size: 0.60rem;
        font-weight: 800;
        letter-spacing: 0.09em;
        color: var(--nav-accent, var(--cyan));
        text-shadow:
            0 0 10px color-mix(in oklch, var(--nav-accent, var(--cyan)) 78%, transparent),
            0 1px 3px rgba(0, 0, 0, 0.92);
        white-space: nowrap;
    }

    .ai-text {
        flex: 1;
        min-inline-size: 0;
        font-family: var(--font-ui);
        font-size: clamp(0.70rem, 2.6vw, 0.78rem);
        font-weight: 700;
        letter-spacing: 0.025em;
        font-feature-settings: "palt" 1;
        line-height: 1.44;
        color: #f4f9ff;
        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.94),
            0 0 14px color-mix(in oklch, var(--nav-accent, #38bdf8) 26%, transparent);
        text-wrap: pretty;
        word-break: normal;
        overflow-wrap: anywhere;
        line-break: strict;
    }

    .ai-spectrum-viz {
        display: flex;
        align-items: flex-end;
        gap: 2px;
        block-size: 14px;
        flex-shrink: 0;
        opacity: 0.45;
    }

    .spec-bar {
        inline-size: 2.5px;
        block-size: 4px;
        border-radius: 2px;
        background: var(--cyan);
        transition: height 0.15s ease;
    }

    /* ===== デュアルステータスバッジ（1行フィット・折り返し防止） ===== */
    .status-row {
        position: relative;
        z-index: 10;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        flex-shrink: 0;
    }

    .status-pill {
        min-inline-size: 0;
        padding: 4px 8px;
        border-radius: 8px;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(5, 13, 30, 0.86);
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: clamp(0.69rem, 2.65vw, 0.78rem);
        font-weight: 700;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
    }

    .pill-ico {
        inline-size: 14px;
        block-size: 14px;
    }

    .pill-txt {
        flex: 1;
        min-inline-size: 0;
        font-family: var(--font-art);
        font-size: clamp(0.58rem, 2.25vw, 0.70rem);
        font-weight: 800;
        letter-spacing: 0.02em;
        font-feature-settings: "palt" 1;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.90), 0 0 12px rgba(186, 230, 253, 0.36);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pill-code {
        font-family: var(--font-dot);
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        padding: 1px 5px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.09);
        border: 1px solid rgba(255, 255, 255, 0.14);
        flex-shrink: 0;
        white-space: nowrap;
    }

    .status-pill.active {
        color: #dcfce7;
        border-color: rgba(0, 255, 157, 0.5);
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 255, 157, 0.16), rgba(6, 22, 40, 0.86));
    }
    .status-pill.active .pill-ico { color: var(--emerald); }
    .status-pill.active .pill-code { color: var(--emerald); background: rgba(0, 255, 157, 0.14); }

    .status-pill.cyan {
        color: #e0faff;
        border-color: rgba(0, 242, 254, 0.5);
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 242, 254, 0.16), rgba(6, 22, 40, 0.86));
    }
    .status-pill.cyan .pill-ico { color: var(--cyan); }
    .status-pill.cyan .pill-code { color: var(--cyan); background: rgba(0, 242, 254, 0.14); }

    .status-pill.magenta {
        color: #ffe4f1;
        border-color: rgba(255, 42, 133, 0.55);
        background: linear-gradient(90deg var(--in-oklab), rgba(255, 42, 133, 0.18), rgba(28, 10, 32, 0.86));
    }
    .status-pill.magenta .pill-ico { color: var(--magenta); }
    .status-pill.magenta .pill-code { color: #ff6ba9; background: rgba(255, 42, 133, 0.18); }

    /* ===== ボス専用HPバー ===== */
    .boss-hud-bar {
        position: relative;
        z-index: 10;
        padding: 4px 10px;
        border-radius: 8px;
        background: rgba(34, 8, 22, 0.86);
        border: 1px solid rgba(255, 42, 133, 0.6);
        box-shadow: 0 0 18px rgba(255, 42, 133, 0.25);
        flex-shrink: 0;
    }

    .boss-hud-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--font-mono);
        font-size: 0.66rem;
        margin-bottom: 3px;
    }

    .boss-hud-name {
        color: #ff77b0;
        font-weight: 700;
        letter-spacing: 0.06em;
    }

    .boss-hud-hp {
        color: #ffffff;
        font-weight: 700;
    }

    .boss-hp-track {
        inline-size: 100%;
        block-size: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }

    .boss-hp-fill {
        inline-size: 100%;
        block-size: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg var(--in-oklch), #ff2a85 0%, #ff8800 100%);
        transition: width 0.15s ease-out;
    }

    /* ===== プレイフィールドキャンバス ===== */
    .playfield-stage {
        position: absolute;
        inset: 0;
        z-index: 2;
        inline-size: 100%;
        block-size: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    #gameCanvas {
        inline-size: 100%;
        block-size: 100%;
        display: block;
        touch-action: none;
    }

    /* ミッション達成トースト（プレイフィールドを遮らずHUD最上位に表示） */
    .mission-toast {
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 10px);
        left: 50%;
        transform: translateX(-50%);
        z-index: 35;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 7px 13px;
        border-radius: 10px;
        background: rgba(6, 18, 38, 0.94);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 215, 0, 0.72);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.72), 0 0 22px rgba(255, 215, 0, 0.28);
        max-inline-size: calc(100% - 20px);
        pointer-events: none;
        opacity: 1;
        transition:
            display 0.22s,
            opacity 0.22s ease-out,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        transition-behavior: allow-discrete;
    }
    @starting-style {
        .mission-toast {
            opacity: 0;
            transform: translate(-50%, -12px);
        }
    }
    .mission-toast[hidden] {
        display: none;
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    @media (prefers-reduced-motion: reduce) {
        .mission-toast {
            transition-duration: 0.1s;
        }
        @starting-style {
            .mission-toast {
                transform: translateX(-50%);
            }
        }
        .mission-toast[hidden] {
            transform: translateX(-50%);
        }
    }
    .toast-ico { color: var(--gold); inline-size: 18px; block-size: 18px; }
    .toast-body { display: flex; flex-direction: column; line-height: 1.15; }
    .toast-kicker { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gold); letter-spacing: 0.08em; }
    .toast-title { font-size: 0.78rem; color: #ffffff; white-space: nowrap; }
    .toast-reward {
        font-family: var(--font-mono);
        font-size: 0.74rem;
        font-weight: 700;
        color: var(--emerald);
        white-space: nowrap;
    }

    /* ===== ボトムタクティカルコンソール ===== */
    .hud-footer {
        position: relative;
        z-index: 10;
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex-shrink: 0;
    }

    .gauge-section {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 5px 10px;
        border-radius: 8px;
        background: rgba(6, 14, 30, 0.8);
        border: 1px solid rgba(0, 242, 254, 0.2);
    }

    .gauge-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-family: var(--font-tech);
        font-size: 0.62rem;
    }

    .gauge-title-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: var(--gold);
        font-weight: 800;
        letter-spacing: 0.08em;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
    }

    .gauge-pct-tag {
        color: #ffffff;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    .gauge-track {
        position: relative;
        inline-size: 100%;
        block-size: 8px;
        border-radius: 3px;
        background:
            repeating-linear-gradient(90deg, rgba(2, 8, 22, 0.72) 0 1px, rgba(56, 189, 248, 0.12) 1px 10px),
            rgba(4, 12, 30, 0.85);
        border: 1px solid rgba(56, 189, 248, 0.24);
        overflow: visible;
    }

    .gauge-fill {
        position: relative;
        inline-size: 0%;
        block-size: 100%;
        border-radius: 2px;
        background-image:
            repeating-linear-gradient(90deg, transparent 0 8px, rgba(2, 6, 18, 0.62) 8px 10px),
            linear-gradient(90deg var(--in-oklab), #00f2fe 0%, #3b82f6 52%, #e879f9 82%, #ffd700 100%);
        box-shadow: 0 0 12px rgba(0, 242, 254, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.52);
        transition: width 0.14s ease-out;
    }

    .gauge-fill.ready {
        background-image:
            repeating-linear-gradient(90deg, transparent 0 8px, rgba(40, 10, 4, 0.45) 8px 10px),
            linear-gradient(90deg var(--in-oklch), #ffd700 0%, #fb923c 50%, #ff2a85 100%);
        box-shadow: 0 0 14px rgba(255, 215, 0, 0.85), 0 0 26px rgba(255, 42, 133, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.68);
    }

    /* 50% NOVA BURST 点火臨界ゲートマーカー */
    .gauge-gate-50 {
        position: absolute;
        left: 50%;
        top: -2.5px;
        bottom: -2.5px;
        inline-size: 2px;
        transform: translateX(-50%);
        border-radius: 999px;
        background: #fde047;
        box-shadow: 0 0 8px rgba(250, 204, 21, 0.95), 0 0 14px rgba(250, 204, 21, 0.55);
        pointer-events: none;
        z-index: 2;
    }

    /* 2段エルゴノミクス操作デッキ（下段フルワイド巨大軌道切替＋上段高視認色チェンジ＆ノヴァでスマホ誤爆ゼロ） */
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .action-btn {
        position: relative;
        min-inline-size: 0;
        min-block-size: 56px;
        padding: 7px 10px;
        border-radius: 14px;
        border: 1.5px solid rgba(0, 242, 254, 0.42);
        background: linear-gradient(180deg, rgba(11, 25, 54, 0.9) 0%, rgba(5, 13, 30, 0.94) 100%);
        color: var(--text-main);
        font-family: var(--font-ui);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.14s ease, box-shadow 0.14s ease;
        transition-timing-function: linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1), ease, ease;
    }

    .action-btn:hover:not(:disabled) {
        border-color: rgba(103, 232, 249, 0.78);
        transform: translateY(-1px);
    }

    .action-btn:focus-visible {
        outline: 3px solid #67e8f9;
        outline-offset: 2px;
    }

    .action-btn:is(:active, .is-pressed):not(:disabled) {
        transform: scale(0.96);
    }

    .action-btn:hover:is(:active, .is-pressed):not(:disabled) {
        transform: translateY(0) scale(0.96);
    }

    .btn-top {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-family: var(--font-dot);
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        font-feature-settings: "palt" 1;
        opacity: 0.98;
        white-space: nowrap;
    }

    .btn-ico {
        inline-size: 15px;
        block-size: 15px;
        flex-shrink: 0;
    }

    .btn-main {
        display: inline-block;
        font-family: var(--font-cyber);
        font-size: clamp(0.84rem, 3.35vw, 0.98rem);
        font-weight: 900;
        letter-spacing: 0.06em;
        font-feature-settings: "palt" 1;
        line-height: 1.18;
        transform: skewX(-8deg);
        padding-inline: 5px;
        white-space: nowrap;
    }

    .btn-sub {
        font-family: var(--font-ui);
        font-size: clamp(0.62rem, 2.35vw, 0.72rem);
        font-weight: 700;
        letter-spacing: 0.03em;
        font-feature-settings: "palt" 1;
        color: rgba(226, 240, 255, 0.90);
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
        white-space: nowrap;
    }

    /* スマホ親指ゾーン専用：全幅・特大プライマリ軌道チェンジトリガー */
    .orbit-btn {
        grid-column: 1 / -1;
        min-block-size: 74px;
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        border-width: 1.5px;
        border-color: rgba(0, 242, 254, 0.72);
        box-shadow:
            0 6px 22px rgba(0, 8, 28, 0.60),
            0 0 26px rgba(0, 242, 254, 0.22),
            inset 0 1px 0 rgba(224, 242, 254, 0.38);
    }

    .orbit-btn-head {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 9px;
        min-inline-size: 0;
        overflow: hidden;
    }

    .orbit-btn-head .btn-ico {
        inline-size: 24px;
        block-size: 24px;
        flex-shrink: 0;
        color: #67e8f9;
        filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.75));
    }

    .orbit-btn-titles {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.14;
        gap: 3px;
        min-inline-size: 0;
        max-inline-size: 100%;
    }

    .orbit-btn .btn-code {
        font-family: var(--font-dot);
        font-size: clamp(0.58rem, 2.4vw, 0.68rem);
        font-weight: 700;
        letter-spacing: 0.02em;
        font-feature-settings: "palt" 1;
        color: #bae6fd;
        text-shadow: 0 0 10px rgba(56, 189, 248, 0.50), 0 1px 4px rgba(0, 0, 0, 0.9);
        max-inline-size: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #gameContainer[data-polarity="MAGENTA"] .orbit-btn .btn-code {
        color: #fecdd3;
        text-shadow: 0 0 10px rgba(251, 113, 133, 0.55), 0 1px 4px rgba(0, 0, 0, 0.9);
    }

    .orbit-btn .btn-main {
        font-family: var(--font-cyber);
        font-size: clamp(0.80rem, 3.45vw, 1.02rem);
        font-weight: 900;
        letter-spacing: 0.04em;
        font-feature-settings: "palt" 1;
        transform: skewX(-8deg);
        padding-inline: 2px 6px;
        max-inline-size: 100%;
        white-space: nowrap;
        background-image: linear-gradient(175deg var(--in-oklch), #ffffff 8%, #e0f9ff 38%, #67e8f9 68%, #38bdf8 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.45px rgba(224, 249, 255, 0.58);
        filter:
            drop-shadow(-1px 0 0 rgba(0, 242, 254, 0.84))
            drop-shadow(1px 0 0 rgba(167, 139, 250, 0.52))
            drop-shadow(0 0 14px rgba(0, 242, 254, 0.78))
            drop-shadow(0 2px 5px rgba(0, 0, 0, 0.95));
    }

    #gameContainer[data-polarity="MAGENTA"] .orbit-btn .btn-main {
        background-image: linear-gradient(175deg var(--in-oklch), #ffffff 10%, #ffe4f0 44%, #f472b6 76%, #fda4af 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.45px rgba(255, 228, 240, 0.58);
        filter:
            drop-shadow(-1px 0 0 rgba(255, 42, 133, 0.84))
            drop-shadow(1px 0 0 rgba(56, 189, 248, 0.52))
            drop-shadow(0 0 14px rgba(255, 42, 133, 0.78))
            drop-shadow(0 2px 5px rgba(0, 0, 0, 0.95));
    }

    .orbit-btn-tail {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        flex-shrink: 0;
    }

    .orbit-ring-pills {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .orbit-ring-pills span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-dot);
        min-inline-size: 31px;
        min-block-size: 24px;
        padding-inline: 5px;
        border-radius: 999px;
        font-size: 0.64rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        color: rgba(203, 235, 255, 0.78);
        background: rgba(15, 23, 42, 0.78);
        border: 1px solid rgba(56, 189, 248, 0.34);
        transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
    }

    .orbit-btn[data-orbit="0"] .orbit-ring-pills span[data-idx="0"],
    .orbit-btn[data-orbit="1"] .orbit-ring-pills span[data-idx="1"],
    .orbit-btn[data-orbit="2"] .orbit-ring-pills span[data-idx="2"] {
        color: #031526;
        background: #67e8f9;
        border-color: #e0f9ff;
        box-shadow: 0 0 14px rgba(103, 232, 249, 0.85);
        transform: scale(1.06);
    }

    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="0"] .orbit-ring-pills span[data-idx="0"],
    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="1"] .orbit-ring-pills span[data-idx="1"],
    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="2"] .orbit-ring-pills span[data-idx="2"] {
        color: #2c0416;
        background: #fda4af;
        border-color: #fff1f2;
        box-shadow: 0 0 14px rgba(251, 113, 133, 0.88);
        transform: scale(1.06);
    }

    .orbit-btn:is(:active, .is-pressed):not(:disabled) {
        transform: scale(0.965);
        border-color: #a5f3fc;
        box-shadow:
            0 0 34px rgba(0, 242, 254, 0.60),
            inset 0 0 24px rgba(0, 242, 254, 0.36);
    }

    #gameContainer[data-polarity="MAGENTA"] .orbit-btn:is(:active, .is-pressed):not(:disabled) {
        border-color: #fda4af;
        box-shadow:
            0 0 34px rgba(255, 42, 133, 0.62),
            inset 0 0 24px rgba(255, 42, 133, 0.36);
    }

    /* 端末種別・モバイル幅に応じたヒント自動出し分けと大型タッチ領域 */
    .hint-touch { display: none; }
    .hint-desktop { display: inline; }

    @media (hover: none), (pointer: coarse), (max-width: 539px) {
        .hint-touch { display: inline; }
        .hint-desktop { display: none; }
        .action-btn {
            min-block-size: 62px;
            padding: 8px 10px;
        }
        .orbit-btn {
            min-block-size: 84px;
            padding: 10px 14px;
        }
        .orbit-ring-pills {
            gap: 4px;
        }
        .orbit-ring-pills span {
            min-inline-size: 29px;
            min-block-size: 25px;
            font-size: 0.72rem;
        }
    }

    @media (max-height: 620px) {
        .hud-footer {
            gap: 5px;
        }
        .gauge-section {
            padding: 4px 9px;
        }
        .action-btn {
            min-block-size: 52px;
            padding: 6px 8px;
        }
        .orbit-btn {
            min-block-size: 68px;
            padding: 8px 14px;
        }
    }

    .burst-btn:disabled {
        cursor: not-allowed;
        border-color: rgba(148, 163, 184, 0.34);
        background: rgba(15, 23, 42, 0.74);
        color: #cbd5e1;
        opacity: 0.88;
    }

    .burst-btn:disabled .btn-main {
        background: linear-gradient(180deg var(--in-oklch), #f8fafc 16%, #cbd5e1 58%, #94a3b8 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.92));
    }

    .burst-btn.ready {
        border-color: var(--gold);
        background: linear-gradient(180deg var(--in-oklab), rgba(255, 200, 0, 0.28) 0%, rgba(160, 40, 10, 0.6) 100%);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.42);
        color: #ffffff;
    }
    .burst-btn.ready .btn-top { color: #fde68a; text-shadow: 0 0 10px rgba(255, 215, 0, 0.58); }
    .burst-btn.ready .btn-main {
        background: linear-gradient(180deg var(--in-oklch), #ffffff 16%, #fef08a 56%, #f59e0b 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter:
            drop-shadow(-0.8px 0 0 rgba(255, 215, 0, 0.75))
            drop-shadow(0.8px 0 0 rgba(255, 115, 0, 0.55))
            drop-shadow(0 0 14px rgba(255, 215, 0, 0.76))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.94));
    }

    .polarity-btn.cyan {
        border-color: rgba(0, 242, 254, 0.55);
        background: linear-gradient(180deg var(--in-oklab), rgba(0, 242, 254, 0.2) 0%, rgba(5, 24, 52, 0.92) 100%);
    }
    .polarity-btn.cyan .btn-top { color: #a5f3fc; text-shadow: 0 0 10px rgba(0, 242, 254, 0.55); }
    .polarity-btn.cyan .btn-main {
        background: linear-gradient(180deg var(--in-oklch), #ffffff 16%, #bff8ff 54%, #22d3ee 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter:
            drop-shadow(-0.8px 0 0 rgba(0, 242, 254, 0.78))
            drop-shadow(0.8px 0 0 rgba(167, 139, 250, 0.45))
            drop-shadow(0 0 14px rgba(0, 242, 254, 0.72))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.94));
    }

    .polarity-btn.magenta {
        border-color: rgba(255, 42, 133, 0.65);
        background: linear-gradient(180deg var(--in-oklab), rgba(255, 42, 133, 0.22) 0%, rgba(44, 8, 28, 0.92) 100%);
    }
    .polarity-btn.magenta .btn-top { color: #fecdd3; text-shadow: 0 0 10px rgba(255, 42, 133, 0.60); }
    .polarity-btn.magenta .btn-main {
        background: linear-gradient(180deg var(--in-oklch), #ffffff 16%, #ffd6ea 54%, #fb7185 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter:
            drop-shadow(-0.8px 0 0 rgba(255, 42, 133, 0.78))
            drop-shadow(0.8px 0 0 rgba(56, 189, 248, 0.48))
            drop-shadow(0 0 14px rgba(255, 42, 133, 0.76))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.94));
    }

    /* ===== フルスクリーン・オーバーレイ（タイトルロビー＆リザルト） ===== */
    .overlay-screen {
        position: absolute;
        inset: 0;
        z-index: 40;
        display: flex;
        flex-direction: column;
        padding-block: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom));
        padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* 背景でリアルタイムGPU宇宙シェーダー・惑星・軌道戦闘機が透過で見える商業ロビー設計 */
    .lobby-screen {
        background: linear-gradient(
            180deg var(--in-oklab),
            rgba(2, 6, 18, 0.42) 0%,
            rgba(2, 6, 18, 0.08) 34%,
            rgba(2, 6, 18, 0.54) 72%,
            rgba(2, 5, 14, 0.86) 100%
        );
    }

    .lobby-shell {
        inline-size: 100%;
        block-size: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 6px;
    }

    .lobby-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .pilot-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 8px 4px 5px;
        border-radius: 10px;
        background: rgba(7, 16, 36, 0.85);
        border: 1px solid rgba(0, 242, 254, 0.28);
        backdrop-filter: blur(8px);
        min-inline-size: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .pilot-rank-badge {
        font-family: var(--font-display);
        font-size: 0.68rem;
        font-weight: 900;
        padding: 3px 5px;
        border-radius: 6px;
        background: rgba(0, 242, 254, 0.16);
        border: 1px solid var(--cyan);
        color: var(--cyan);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .pilot-meta {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
        min-inline-size: 0;
        overflow: hidden;
    }

    .pilot-title {
        font-size: clamp(0.56rem, 2.1vw, 0.68rem);
        font-weight: 800;
        letter-spacing: 0;
        color: var(--text-main);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pilot-best {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        color: var(--text-sub);
        white-space: nowrap;
    }

    .lobby-top-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .credit-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 7px;
        border-radius: 999px;
        background: rgba(24, 18, 4, 0.82);
        border: 1px solid rgba(255, 215, 0, 0.45);
        font-family: var(--font-mono);
        font-size: 0.70rem;
        font-weight: 700;
        color: var(--gold);
        white-space: nowrap;
    }

    .credit-ico {
        inline-size: 14px;
        block-size: 14px;
    }

    /* ヒーロー・ロゴセクション（映像主役・透明シネマティック配置） */
    .lobby-hero {
        text-align: center;
        padding: 0 8px;
        border-radius: 0;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex-shrink: 0;
    }

    .hero-kicker {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 2px 10px;
        border-radius: 999px;
        background: color-mix(in oklch, #00f2fe 10%, rgba(4, 11, 28, 0.54));
        border: 1px solid color-mix(in oklch, #38bdf8 44%, transparent);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(224, 242, 254, 0.22);
        backdrop-filter: blur(12px) saturate(1.4);
        font-family: var(--font-mono);
        font-size: clamp(0.58rem, 2.2vw, 0.64rem);
        color: #cffafe;
        letter-spacing: 0.12em;
    }

    .status-pulse-dot {
        inline-size: 6px;
        block-size: 6px;
        border-radius: 50%;
        background: var(--emerald);
        box-shadow: 0 0 8px var(--emerald);
    }

    .game-title {
        font-family: var(--font-display);
        font-size: clamp(1.66rem, 7.6vw, 2.25rem);
        font-weight: 900;
        letter-spacing: 0.08em;
        line-height: 1.03;
        text-wrap: balance;
        background: linear-gradient(135deg var(--in-oklch), #ffffff 12%, #e0f2fe 38%, #67e8f9 68%, #a78bfa 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.55)) drop-shadow(0 3px 12px rgba(0, 0, 0, 0.85));
    }

    .subtitle {
        font-size: clamp(0.70rem, 2.7vw, 0.82rem);
        font-weight: 700;
        letter-spacing: 0.18em;
        color: #e0f2fe;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 20px rgba(56, 189, 248, 0.38);
    }

    .active-unit-pill {
        margin-top: 1px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 3px 10px;
        border-radius: 999px;
        background: rgba(4, 12, 32, 0.52);
        border: 1px solid color-mix(in oklch, #38bdf8 40%, transparent);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(224, 242, 254, 0.2);
        backdrop-filter: blur(14px) saturate(1.4);
        font-family: var(--font-mono);
        font-size: clamp(0.62rem, 2.5vw, 0.69rem);
        color: #bae6fd;
        max-inline-size: 100%;
    }

    .unit-nav-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 1px 7px;
        border-radius: 999px;
        border: 1px solid rgba(255, 110, 199, 0.45);
        background: rgba(255, 110, 199, 0.12);
        color: #f9a8d4;
        font-family: inherit;
        font-size: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .unit-ico { inline-size: 13px; block-size: 13px; }
    .unit-divider { opacity: 0.45; }

    /* タブデッキ（初期は中央映像を広々と魅せるコンパクト発進ドック、詳細・格納庫選択時のみ展開） */
    .lobby-deck {
        display: flex;
        flex-direction: column;
        border-radius: 14px;
        background: linear-gradient(170deg var(--in-oklab), rgba(5, 13, 32, 0.88) 0%, rgba(2, 6, 18, 0.94) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 46%, transparent);
        box-shadow:
            0 8px 32px rgba(0, 2, 12, 0.72),
            0 0 26px color-mix(in oklch, #0ea5e9 12%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.26);
        backdrop-filter: blur(18px) saturate(1.35);
        overflow: hidden;
        flex: 0 1 auto;
        min-block-size: 0;
        margin-block-start: auto;
        max-block-size: min(350px, 52dvh);
        transition: max-block-size 0.32s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease;
    }

    .lobby-deck.is-compact {
        max-block-size: 184px;
    }

    .lobby-deck.is-compact .lobby-tabs {
        min-block-size: 31px;
    }

    .lobby-deck.is-compact .lobby-tab {
        min-block-size: 31px;
        font-size: clamp(0.64rem, 2.4vw, 0.71rem);
    }

    .lobby-deck.is-compact .lobby-panels {
        padding: 6px 9px 7px;
        overflow: hidden;
    }

    .lobby-deck.is-compact .lobby-panels::before,
    .lobby-deck.is-compact .lobby-panels::after {
        display: none;
    }

    .lobby-deck.is-compact .mode-selector {
        margin-bottom: 6px;
        gap: 5px;
    }

    .lobby-deck.is-compact .mode-option {
        padding: 4px 6px;
        align-items: center;
        text-align: center;
    }

    .lobby-deck.is-compact .mode-desc {
        display: none;
    }

    .lobby-deck.is-compact .mode-name {
        font-size: clamp(0.61rem, 2.3vw, 0.69rem);
    }

    .lobby-deck.is-compact .campaign-stage-card {
        padding: 6px 8px;
        gap: 5px;
    }

    .lobby-deck.is-compact .stage-nav-btn {
        min-inline-size: 26px;
        min-block-size: 26px;
    }

    .lobby-deck.is-compact .campaign-stage-title {
        font-size: clamp(0.75rem, 3.05vw, 0.84rem);
    }

    .lobby-deck.is-compact .campaign-stage-dots {
        gap: 4px;
    }

    .lobby-deck.is-compact .stage-dot {
        min-block-size: 6px;
        block-size: 6px;
        font-size: 0;
        border-radius: 999px;
        border-color: rgba(148, 163, 184, 0.28);
    }

    .lobby-deck.is-compact .stage-dot.active {
        min-block-size: 7px;
        block-size: 7px;
        background: #38bdf8;
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
    }

    .lobby-deck.is-compact .tactical-chips,
    .lobby-deck.is-compact .next-mission-banner {
        display: none;
    }

    .campaign-story-btn {
        flex-shrink: 0;
        padding: 2px 7px;
        border-radius: 999px;
        border: 1px solid rgba(56, 189, 248, 0.45);
        background: rgba(14, 165, 233, 0.14);
        color: #bae6fd;
        font-family: var(--font-ui);
        font-size: 0.60rem;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
        transition: border-color 0.15s ease, background-color 0.15s ease;
    }

    .campaign-story-btn:hover,
    .campaign-story-btn.active {
        border-color: #67e8f9;
        background: rgba(56, 189, 248, 0.28);
        color: #ffffff;
    }

    .campaign-story-drawer {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding-top: 4px;
        border-top: 1px solid rgba(56, 189, 248, 0.18);
        opacity: 1;
        translate: 0 0;
        transition:
            display 0.22s,
            opacity 0.22s ease-out,
            translate 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        transition-behavior: allow-discrete;
    }

    @starting-style {
        .campaign-story-drawer {
            opacity: 0;
            translate: 0 -6px;
        }
    }

    .campaign-story-drawer[hidden] {
        display: none;
        opacity: 0;
        translate: 0 -6px;
    }

    @media (prefers-reduced-motion: reduce) {
        .campaign-story-drawer {
            translate: none;
            transition-duration: 0.1s;
        }
        @starting-style {
            .campaign-story-drawer {
                translate: none;
            }
        }
        .campaign-story-drawer[hidden] {
            translate: none;
        }
    }

    .lobby-tabs {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        border-bottom: 1px solid color-mix(in oklch, #38bdf8 26%, transparent);
        background: rgba(4, 10, 26, 0.92);
        flex-shrink: 0;
    }

    .lobby-tab {
        position: relative;
        min-block-size: 38px;
        padding: 4px 2px;
        border: none;
        background: transparent;
        color: #94a3b8;
        font-family: var(--font-art);
        font-size: clamp(0.55rem, 2.15vw, 0.72rem);
        font-weight: 800;
        letter-spacing: 0.04em;
        font-feature-settings: "palt" 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        cursor: pointer;
        white-space: nowrap;
        transition: color 0.16s ease, background-color 0.16s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }

    .tab-ico { inline-size: 13px; block-size: 13px; flex-shrink: 0; }

    .lobby-tab:hover {
        color: var(--text-main);
        background: rgba(0, 242, 254, 0.09);
    }

    .lobby-tab:active {
        transform: scale(0.95);
        background: rgba(0, 242, 254, 0.14);
    }

    .lobby-tab:hover:active {
        transform: scale(0.94);
        color: #cffafe;
        background: rgba(0, 242, 254, 0.18);
    }

    .lobby-tab[aria-selected="true"] {
        color: #a5f3fc;
        background: linear-gradient(180deg, color-mix(in oklch, #00f2fe 16%, transparent), rgba(0, 242, 254, 0.04));
        text-shadow: 0 0 12px rgba(0, 242, 254, 0.45);
    }

    /* Forced Colors Mode対応の確定アンダーライン */
    .lobby-tab[aria-selected="true"]::after {
        content: "";
        position: absolute;
        inset-inline: 10%;
        inset-block-end: 0;
        border-block-end: 2.5px solid var(--cyan);
        box-shadow: 0 0 10px var(--cyan);
    }

    .lobby-panels {
        position: relative;
        flex: 1;
        min-block-size: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 6px 9px;
        container-type: scroll-state;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 242, 254, 0.35) rgba(5, 11, 26, 0.4);
    }

    /* Scrollability affordance: sticky radial scroll shadows inside .lobby-panels */
    .lobby-panels::before,
    .lobby-panels::after {
        content: "";
        position: sticky;
        display: block;
        inline-size: calc(100% + 18px);
        margin-inline: -9px;
        block-size: 20px;
        pointer-events: none;
        z-index: 4;
        opacity: 0;
        transition: opacity 0.22s ease;
    }

    .lobby-panels::before {
        inset-block-start: -6px;
        margin-block-end: -20px;
        background: linear-gradient(180deg, rgba(2, 6, 18, 0.92) 0%, rgba(2, 6, 18, 0.45) 55%, transparent 100%);
    }

    .lobby-panels::after {
        inset-block-end: -6px;
        margin-block-start: -20px;
        background:
            radial-gradient(farthest-side at 50% 100%, rgba(56, 189, 248, 0.16), transparent 80%),
            linear-gradient(0deg, rgba(2, 6, 18, 0.96) 0%, rgba(2, 6, 18, 0.65) 52%, transparent 100%);
    }

    @container scroll-state(scrollable: top) {
        .lobby-panels::before { opacity: 1; }
    }

    @container scroll-state(scrollable: bottom) {
        .lobby-panels::after { opacity: 1; }
    }

    @supports not (container-type: scroll-state) {
        @keyframes revealDeckScrollTop {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes revealDeckScrollBottom {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        .lobby-panels::before {
            animation: revealDeckScrollTop linear both;
            animation-timeline: scroll(self);
            animation-range: 0px 24px;
        }
        .lobby-panels::after {
            animation: revealDeckScrollBottom linear both;
            animation-timeline: scroll(self);
            animation-range: calc(100% - 24px) 100%;
        }
    }

    .lobby-panels::-webkit-scrollbar { width: 5px; }
    .lobby-panels::-webkit-scrollbar-thumb { background: rgba(0, 242, 254, 0.35); border-radius: 999px; }

    /* ロビー画面・リザルト画面では背景HUDを完全非表示にしてロゴ視認性・超新星フィナーレを最大化 */
    #gameContainer:has(#startOverlay:not([style*="display: none"]):not([data-closing])) :is(.hud-header, .ai-subtitle-bar, .status-row, .boss-hud-bar, .hud-footer),
    #gameContainer[data-screen="lobby"] :is(.hud-header, .ai-subtitle-bar, .status-row, .boss-hud-bar, .hud-footer),
    #gameContainer[data-screen="finale"] :is(.hud-header, .ai-subtitle-bar, .status-row, .boss-hud-bar, .hud-footer) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* ロビー待機中は全面キャンバスをそのまま見せ、惑星ネオ・ガイアや星空の上下欠けを防ぐ */
    #gameContainer[data-screen="lobby"] .playfield-stage {
        -webkit-mask-image: none;
        mask-image: none;
    }

    @keyframes panelReveal {
        from {
            opacity: 0;
            translate: 0 5px;
        }
        to {
            opacity: 1;
            translate: 0 0;
        }
    }

    .lobby-panel {
        display: block;
    }

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

    @media (prefers-reduced-motion: no-preference) {
        .lobby-panel:not([hidden]) {
            animation: panelReveal 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
        }
    }

    /* パネル1: 難易度 & キャンペーン進捗（余白と視認性を優先した整理レイアウト） */
    .mode-selector {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 7px;
    }

    .mode-option {
        min-inline-size: 0;
        overflow: hidden;
        padding: 6px 5px;
        border-radius: 9px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        background: rgba(9, 19, 42, 0.76);
        color: var(--text-sub);
        text-align: left;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 2px;
        transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }

    .mode-option:hover {
        border-color: rgba(103, 232, 249, 0.65);
        background: rgba(14, 30, 62, 0.85);
        transform: translateY(-1px);
    }
    .mode-option:active { transform: scale(0.96); }
    .mode-option:hover:active { transform: translateY(0) scale(0.95); }

    .mode-name {
        font-family: var(--font-cyber);
        font-size: clamp(0.50rem, 1.88vw, 0.60rem);
        font-weight: 800;
        letter-spacing: 0.02em;
        color: #f8fafc;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mode-desc {
        font-size: 0.61rem;
        line-height: 1.24;
        color: #94a3b8;
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .mode-option.active {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.14);
    }
    .mode-option.campaign-opt.active {
        border-color: #38bdf8;
        background: rgba(56, 189, 248, 0.18);
    }
    .mode-option.campaign-opt.active .mode-name { color: #7dd3fc; }
    .mode-option.campaign-opt.active .mode-desc { color: #e0f2fe; }
    .mode-option.overdrive-opt.active {
        border-color: var(--gold);
        background: rgba(255, 215, 0, 0.14);
    }
    .mode-option.overdrive-opt.active .mode-name { color: var(--gold); }

    /* 全10章ストーリーキャンペーン選択カード（二重枠線を排したクリア構成） */
    .campaign-stage-card {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 8px 10px;
        margin-bottom: 0;
        border-radius: 10px;
        background: rgba(8, 19, 44, 0.68);
        border: none;
        border-inline-start: 2.5px solid rgba(56, 189, 248, 0.78);
    }
    .campaign-stage-card[hidden] { display: none; }

    .campaign-stage-meta-row {
        display: flex;
        align-items: center;
        gap: 6px;
        min-inline-size: 0;
    }

    .campaign-stage-meta-row .campaign-story-btn {
        margin-inline-start: auto;
    }

    .campaign-stage-top {
        display: flex;
        align-items: center;
        gap: 6px;
        min-inline-size: 0;
    }

    .stage-nav-btn {
        flex-shrink: 0;
        min-inline-size: 30px;
        min-block-size: 30px;
        padding: 2px 6px;
        border-radius: 8px;
        border: 1px solid rgba(56, 189, 248, 0.42);
        background: rgba(10, 24, 52, 0.85);
        color: #a5f3fc;
        font-size: 0.70rem;
        font-weight: 800;
        cursor: pointer;
        display: grid;
        place-items: center;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }
    .stage-nav-btn:hover { border-color: #67e8f9; box-shadow: 0 0 10px rgba(0, 242, 254, 0.3); transform: scale(1.04); }
    .stage-nav-btn:active { transform: scale(0.93); }
    .stage-nav-btn:hover:active { transform: scale(0.92); }

    .campaign-stage-code {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        color: #38bdf8;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .campaign-stage-status {
        font-family: var(--font-mono);
        font-size: 0.60rem;
        font-weight: 800;
        padding: 1.5px 7px;
        border-radius: 999px;
        border: 1px solid rgba(250, 204, 21, 0.52);
        background: rgba(250, 204, 21, 0.14);
        color: #fde047;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .campaign-stage-status.cleared {
        border-color: rgba(52, 211, 153, 0.6);
        background: rgba(16, 185, 129, 0.16);
        color: #6ee7b7;
    }
    .campaign-stage-status.boss {
        border-color: rgba(244, 114, 182, 0.65);
        background: rgba(236, 72, 153, 0.16);
        color: #f9a8d4;
    }

    .campaign-stage-title {
        flex: 1;
        min-inline-size: 0;
        text-align: center;
        font-family: var(--font-art);
        font-size: clamp(0.65rem, 2.55vw, 0.82rem);
        font-weight: 800;
        letter-spacing: 0.04em;
        font-feature-settings: "palt" 1;
        line-height: 1.32;
        transform: skewX(-4deg);
        padding-inline: 2px;
        background-image: linear-gradient(175deg var(--in-oklch), #ffffff 12%, #e0f9ff 48%, #67e8f9 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.25px rgba(224, 249, 255, 0.42);
        filter:
            drop-shadow(-0.8px 0 0 rgba(0, 242, 254, 0.72))
            drop-shadow(0.8px 0 0 rgba(167, 139, 250, 0.45))
            drop-shadow(0 0 12px rgba(56, 189, 248, 0.60))
            drop-shadow(0 1px 6px rgba(0, 0, 0, 0.92));
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .stage-dot {
        min-block-size: 21px;
        padding: 0;
        border-radius: 5px;
        border: 1px solid rgba(148, 163, 184, 0.3);
        background: rgba(8, 18, 40, 0.72);
        color: rgba(226, 232, 240, 0.84);
        font-family: var(--font-mono);
        font-size: 0.60rem;
        font-weight: 700;
        cursor: pointer;
        transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }
    .stage-dot:hover { border-color: rgba(103, 232, 249, 0.7); color: #ffffff; transform: translateY(-1px); }
    .stage-dot:active { transform: scale(0.92); }
    .stage-dot:hover:active { transform: scale(0.90); }
    .stage-dot.cleared {
        border-color: rgba(52, 211, 153, 0.55);
        background: rgba(16, 185, 129, 0.18);
        color: #a7f3d0;
    }
    .stage-dot.boss {
        border-color: rgba(244, 114, 182, 0.5);
        color: #fbcfe8;
    }
    .stage-dot.active {
        border-color: #38bdf8;
        background: rgba(0, 242, 254, 0.28);
        color: #ffffff;
        box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
    }

    .campaign-nav-perk-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 3px 6px;
        flex-wrap: wrap;
        min-inline-size: 0;
    }

    .campaign-nav-tag {
        order: 1;
        font-size: 0.68rem;
        font-weight: 800;
        color: #a5f3fc;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .campaign-perk-pill {
        order: 3;
        flex: 1 0 100%;
        inline-size: 100%;
        min-inline-size: 0;
        font-size: clamp(0.60rem, 2.3vw, 0.67rem);
        line-height: 1.38;
        padding: 4px 8px;
        border-radius: 7px;
        background: rgba(56, 189, 248, 0.10);
        border: 1px solid rgba(56, 189, 248, 0.26);
        color: #e0f2fe;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .campaign-log-toggle-btn {
        order: 2;
        margin-inline-start: auto;
        flex-shrink: 0;
        padding: 3px 9px;
        border-radius: 999px;
        border: 1px solid color-mix(in oklch, #fbbf24 58%, transparent);
        background: linear-gradient(165deg var(--in-oklab), rgba(251, 191, 36, 0.16), rgba(245, 158, 11, 0.24));
        color: #fde68a;
        font-family: var(--font-ui);
        font-size: 0.64rem;
        font-weight: 800;
        letter-spacing: 0.02em;
        white-space: nowrap;
        cursor: pointer;
        backdrop-filter: none;
        transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }
    .campaign-log-toggle-btn:hover { border-color: #fde047; box-shadow: 0 0 10px rgba(251, 191, 36, 0.28); transform: translateY(-1px); }
    .campaign-log-toggle-btn:active { transform: scale(0.95); }
    .campaign-log-toggle-btn:hover:active { transform: translateY(0) scale(0.94); }
    .campaign-log-toggle-btn.active-truth {
        border-color: color-mix(in oklch, #e879f9 78%, #ffffff);
        background: linear-gradient(165deg var(--in-oklab), rgba(232, 121, 249, 0.24), rgba(56, 189, 248, 0.24));
        color: #fdf4ff;
        box-shadow: 0 0 12px color-mix(in oklch, #e879f9 26%, transparent);
    }

    .campaign-mystery-line {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #fcd34d;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.92);
    }

    .campaign-briefing-txt {
        margin: 0;
        padding-inline-start: 8px;
        border-inline-start: 2px solid rgba(56, 189, 248, 0.45);
        font-family: var(--font-ui);
        font-size: 0.71rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        font-feature-settings: "palt" 1;
        line-height: 1.48;
        text-wrap: pretty;
        color: #f1f5f9;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.88);
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    .tactical-chips[hidden] { display: none; }

    .tactical-chips {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 9px;
    }

    .tac-chip {
        padding: 7px 6px;
        border-radius: 8px;
        background: rgba(10, 20, 42, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .tac-chip-ico {
        inline-size: 26px;
        block-size: 26px;
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.06);
        display: grid;
        place-items: center;
    }

    .tac-chip-txt {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .tac-chip-txt strong {
        font-size: 0.72rem;
        color: var(--text-main);
        white-space: nowrap;
    }

    .tac-chip-txt span {
        font-size: 0.63rem;
        line-height: 1.25;
        color: var(--text-sub);
        word-break: keep-all;
    }

    .next-mission-banner {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
        padding: 4px 8px;
        border-radius: 6px;
        background: rgba(250, 204, 21, 0.08);
        border: none;
        border-inline-start: 2px solid #facc15;
        font-size: 0.67rem;
        line-height: 1.3;
        color: #fef08a;
        word-break: keep-all;
    }

    /* パネル2: 格納庫 */
    .hangar-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hangar-card {
        padding: 9px;
        border-radius: 9px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        background: rgba(10, 21, 44, 0.82);
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        text-align: left;
        color: var(--text-main);
        transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }

    .hangar-card:hover { border-color: rgba(103, 232, 249, 0.68); transform: translateY(-1px); }
    .hangar-card:active { transform: scale(0.97); }
    .hangar-card:hover:active { transform: translateY(0) scale(0.96); }

    .hangar-card.equipped {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.12);
        box-shadow: 0 0 14px rgba(0, 242, 254, 0.18);
    }

    .hangar-card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .hangar-swatch {
        inline-size: 40px;
        block-size: 24px;
        border-radius: 5px;
        background: rgba(5, 14, 34, 0.9);
        border: 1px solid currentColor;
        box-shadow: 0 0 10px currentColor;
        display: inline-grid;
        place-items: center;
        flex-shrink: 0;
    }

    .hangar-swatch svg {
        inline-size: 32px;
        block-size: 18px;
        display: block;
    }

    .hangar-status {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.08);
        white-space: nowrap;
    }

    .hangar-card.equipped .hangar-status {
        background: var(--cyan);
        color: #031224;
        font-weight: 800;
    }

    .hangar-status.locked {
        color: var(--gold);
        border: 1px solid rgba(255, 215, 0, 0.45);
        background: rgba(255, 215, 0, 0.1);
    }

    .hangar-name {
        font-family: var(--font-display);
        font-size: 0.74rem;
        font-weight: 800;
    }

    .hangar-trait {
        font-size: 0.67rem;
        color: var(--text-sub);
        line-height: 1.3;
        word-break: keep-all;
    }

    /* パネル3: 専属AIナビゲーター選択 */
    .nav-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 7px;
    }

    .nav-panel-title {
        font-size: 0.74rem;
        font-weight: 800;
        color: var(--text-main);
    }

    .nav-engine-badge {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        padding: 2px 7px;
        border-radius: 999px;
        background: rgba(0, 242, 254, 0.1);
        border: 1px solid rgba(0, 242, 254, 0.3);
        color: var(--cyan);
        max-inline-size: 165px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-filter-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        margin-bottom: 6px;
    }

    .nav-filter-btn {
        min-block-size: 27px;
        padding: 0 6px;
        border-radius: 6px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        background: rgba(15, 23, 42, 0.72);
        color: var(--text-muted);
        font-family: var(--font-ui);
        font-size: 0.68rem;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.15s ease;
    }

    .nav-filter-btn.active {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.18);
        color: #ffffff;
    }

    .nav-cat-tag {
        font-family: var(--font-mono);
        font-size: 0.54rem;
        font-weight: 800;
        padding: 1px 5px;
        border-radius: 4px;
        letter-spacing: 0.05em;
    }

    .nav-cat-tag.human {
        background: rgba(56, 189, 248, 0.14);
        border: 1px solid rgba(56, 189, 248, 0.35);
        color: #7dd3fc;
    }

    .nav-cat-tag.robot {
        background: rgba(0, 255, 136, 0.14);
        border: 1px solid rgba(0, 255, 136, 0.45);
        color: #6ee7b7;
    }

    /* キャラクター・ホログラフィック・ショーケースステージ */
    .nav-hero-stage {
        display: flex;
        align-items: stretch;
        gap: 8px;
        padding: 7px;
        margin-bottom: 7px;
        border-radius: 12px;
        background: linear-gradient(125deg, rgba(8, 22, 52, 0.96) 0%, rgba(4, 12, 28, 0.94) 100%);
        border: 1.5px solid var(--nav-preview-accent, rgba(0, 242, 254, 0.45));
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(0, 242, 254, 0.08);
        transition: border-color 0.2s ease, box-shadow 0.22s ease;
    }

    .nav-hero-portrait-btn {
        position: relative;
        inline-size: 76px;
        min-block-size: 84px;
        padding: 0;
        border-radius: 10px;
        border: 1.5px solid var(--nav-preview-accent, var(--cyan));
        background: #040d20;
        overflow: hidden;
        cursor: pointer;
        flex-shrink: 0;
        box-shadow: 0 0 16px rgba(0, 242, 254, 0.22);
    }

    .nav-hero-portrait-btn::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, transparent 58%, rgba(2, 6, 18, 0.65) 100%);
        pointer-events: none;
    }

    .nav-hero-portrait {
        inline-size: 100%;
        block-size: 100%;
        display: block;
    }

    .nav-hero-scan {
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(
            180deg,
            transparent 0px,
            transparent 3px,
            rgba(255, 255, 255, 0.03) 3px,
            rgba(255, 255, 255, 0.03) 4px
        );
        pointer-events: none;
    }

    .nav-hero-info {
        flex: 1;
        min-inline-size: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 3px;
    }

    .nav-hero-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
    }

    .nav-preview-speaker {
        font-family: var(--font-ui);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.02em;
        color: var(--nav-preview-accent, var(--cyan));
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-hero-role {
        font-size: 0.62rem;
        font-weight: 600;
        color: var(--text-sub);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-hero-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav-trait-chip {
        font-size: 0.56rem;
        font-weight: 700;
        line-height: 1.28;
        padding: 2px 6px;
        border-radius: 5px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(148, 163, 184, 0.28);
        color: #cbd5e1;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
        max-inline-size: 100%;
    }

    .nav-preview-text {
        font-size: 0.65rem;
        line-height: 1.32;
        color: var(--text-main);
        word-break: normal;
        overflow-wrap: anywhere;
        line-break: strict;
    }

    .nav-hero-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        margin-top: 2px;
    }

    .nav-line-counter {
        font-family: var(--font-mono);
        font-size: 0.56rem;
        font-weight: 700;
        color: var(--text-muted);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-hero-wave {
        display: flex;
        align-items: flex-end;
        gap: 2px;
        block-size: 12px;
        opacity: 0.35;
    }

    .nav-hero-wave span {
        inline-size: 2.5px;
        block-size: 4px;
        border-radius: 2px;
        background: var(--nav-preview-accent, var(--cyan));
    }

    .nav-hero-play-btn {
        min-block-size: 24px;
        padding: 0 9px;
        border-radius: 999px;
        border: 1px solid rgba(255, 215, 0, 0.65);
        background: rgba(255, 215, 0, 0.14);
        color: #fef08a;
        font-family: var(--font-mono);
        font-size: 0.62rem;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
    }

    .nav-hero-play-btn:hover {
        background: rgba(255, 215, 0, 0.28);
        color: #ffffff;
    }

    /* AivisSpeech リアルタイム連携・話者切替バー */
    .nav-aivis-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 8px;
        padding: 5px 8px;
        border-radius: 9px;
        background: rgba(7, 16, 36, 0.88);
        border: 1px solid rgba(56, 189, 248, 0.28);
    }

    .nav-aivis-label {
        font-family: var(--font-mono);
        font-size: 0.56rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        color: var(--cyan);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cyber-select {
        flex: 1;
        min-inline-size: 0;
        min-block-size: 30px;
        padding: 4px 6px;
        border-radius: 7px;
        border: 1px solid rgba(148, 163, 184, 0.34);
        background: rgba(10, 22, 48, 0.96);
        color: var(--text-main);
        font-family: var(--font-ui);
        font-size: 0.7rem;
        font-weight: 700;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        cursor: pointer;
        text-overflow: ellipsis;
    }

    .nav-aivis-refresh {
        min-block-size: 28px;
        padding: 0 8px;
        border-radius: 7px;
        border: 1px solid rgba(0, 242, 254, 0.45);
        background: rgba(0, 242, 254, 0.12);
        color: #bae6fd;
        font-family: var(--font-mono);
        font-size: 0.6rem;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-aivis-refresh:hover {
        background: rgba(0, 242, 254, 0.25);
        color: #ffffff;
    }

    .setting-aivis-card {
        display: flex;
        flex-direction: column;
        gap: 7px;
        padding: 9px 11px;
        border-radius: 9px;
        background: rgba(0, 242, 254, 0.06);
        border: 1px solid rgba(0, 242, 254, 0.28);
    }

    .setting-aivis-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        font-size: 0.74rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .aivis-status-pill {
        font-family: var(--font-mono);
        font-size: 0.62rem;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.18);
        color: var(--text-sub);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .aivis-status-pill.connected {
        background: rgba(0, 255, 136, 0.18);
        color: var(--emerald);
        border: 1px solid rgba(0, 255, 136, 0.45);
    }

    .setting-custom-voice-row {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .cyber-input {
        flex: 1;
        min-inline-size: 0;
        min-block-size: 30px;
        padding: 4px 8px;
        border-radius: 7px;
        border: 1px solid rgba(148, 163, 184, 0.34);
        background: rgba(5, 11, 26, 0.92);
        color: var(--text-main);
        font-family: var(--font-ui);
        font-size: 0.72rem;
    }

    .navigator-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .navigator-card {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 5px 6px;
        border-radius: 10px;
        border: 1px solid rgba(148, 163, 184, 0.24);
        background: rgba(10, 21, 44, 0.85);
        cursor: pointer;
        transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
        transition-timing-function: ease, ease, ease, linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1);
    }

    .navigator-card:hover { border-color: rgba(103, 232, 249, 0.68); transform: translateY(-1px); }
    .navigator-card:active { transform: scale(0.97); }
    .navigator-card:hover:active { transform: translateY(0) scale(0.96); }

    .navigator-card.equipped {
        border-color: var(--nav-color, var(--cyan));
        background: linear-gradient(110deg, rgba(14, 34, 68, 0.96), rgba(9, 20, 42, 0.92));
        box-shadow: 0 0 16px rgba(0, 242, 254, 0.22);
    }

    .nav-crest {
        inline-size: 40px;
        block-size: 40px;
        border-radius: 10px;
        display: grid;
        place-items: center;
        overflow: hidden;
        color: var(--nav-color, #ffffff);
        border: 1.5px solid var(--nav-color, var(--cyan));
        background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.12), rgba(4, 12, 28, 0.96));
        box-shadow: 0 0 12px rgba(0, 242, 254, 0.22), inset 0 0 10px rgba(0, 242, 254, 0.12);
        flex-shrink: 0;
    }

    .nav-card-meta {
        flex: 1;
        min-inline-size: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .nav-name-row {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
        min-inline-size: 0;
        overflow: hidden;
    }

    .nav-name {
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--text-main);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-code {
        font-family: var(--font-mono);
        font-size: 0.6rem;
        color: var(--nav-color, var(--cyan));
    }

    .nav-role {
        font-size: 0.61rem;
        color: var(--text-sub);
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-perk-mini {
        display: block;
        font-size: 0.58rem;
        line-height: 1.22;
        color: #7dd3fc;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-perk-chip {
        border-color: rgba(56, 189, 248, 0.55) !important;
        background: rgba(56, 189, 248, 0.16) !important;
        color: #e0f2fe !important;
    }

    .nav-card-actions {
        display: flex;
        align-items: center;
        gap: 3px;
        flex-shrink: 0;
    }

    .nav-sample-btn {
        min-inline-size: 32px;
        min-block-size: 25px;
        padding: 0 6px;
        border-radius: 999px;
        border: 1px solid rgba(255, 215, 0, 0.55);
        background: rgba(255, 215, 0, 0.12);
        color: #fef08a;
        font-family: var(--font-mono);
        font-size: 0.6rem;
        font-weight: 800;
        cursor: pointer;
    }

    .nav-sample-btn:hover {
        background: rgba(255, 215, 0, 0.25);
        color: #ffffff;
    }

    .nav-select-pill {
        min-inline-size: 40px;
        padding: 3px 5px;
        border-radius: 6px;
        font-family: var(--font-mono);
        font-size: 0.58rem;
        font-weight: 800;
        text-align: center;
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-sub);
        white-space: nowrap;
    }

    .navigator-card.equipped .nav-select-pill {
        background: var(--nav-color, var(--cyan));
        color: #031224;
    }

    /* パネル3: 任務リスト */
    .missions-list {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .mission-item {
        padding: 8px 10px;
        border-radius: 8px;
        background: rgba(10, 21, 44, 0.8);
        border: 1px solid rgba(148, 163, 184, 0.22);
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mission-item.completed {
        border-color: rgba(0, 255, 157, 0.45);
        background: rgba(0, 255, 157, 0.08);
    }

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

    .mission-title {
        font-size: 0.76rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .mission-reward {
        font-family: var(--font-mono);
        font-size: 0.68rem;
        font-weight: 700;
        color: var(--gold);
        white-space: nowrap;
    }

    .mission-item.completed .mission-reward {
        color: var(--emerald);
    }

    .mission-bar-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mission-bar-track {
        flex: 1;
        block-size: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }

    .mission-bar-fill {
        block-size: 100%;
        background: var(--cyan);
        border-radius: 999px;
    }
    .mission-item.completed .mission-bar-fill { background: var(--emerald); }

    .mission-progress-txt {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        color: var(--text-sub);
        white-space: nowrap;
    }

    /* パネル4: 戦術ガイド */
    .manual-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .manual-item {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        padding: 8px;
        border-radius: 8px;
        background: rgba(10, 21, 44, 0.78);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .manual-ico {
        inline-size: 28px;
        block-size: 28px;
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.06);
        display: grid;
        place-items: center;
        flex-shrink: 0;
    }

    .manual-item strong {
        display: block;
        font-size: 0.78rem;
        margin-bottom: 2px;
        color: var(--text-main);
    }

    .manual-item p {
        font-size: 0.71rem;
        line-height: 1.4;
        color: var(--text-sub);
        word-break: keep-all;
        overflow-wrap: break-word;
    }

    /* 発進・再出撃ボタン */
    .lobby-launch-bar {
        flex-shrink: 0;
    }

    .primary-btn {
        inline-size: 100%;
        min-block-size: 54px;
        padding: 10px 16px;
        border-radius: 12px;
        border: 1.5px solid rgba(103, 232, 249, 0.85);
        background: linear-gradient(135deg var(--in-oklab), rgba(6, 182, 212, 0.55) 0%, rgba(14, 116, 214, 0.72) 55%, rgba(29, 78, 216, 0.82) 100%);
        color: #ffffff;
        font-family: var(--font-ui);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        box-shadow: 0 6px 26px rgba(0, 242, 254, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.42);
        transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
        transition-timing-function: linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1), ease, ease;
    }

    @media (prefers-reduced-motion: no-preference) {
        .primary-btn::after {
            content: "";
            position: absolute;
            inset-block: -20%;
            inset-inline-start: -40%;
            inline-size: 36%;
            background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.24) 50%, transparent 80%);
            transform: skewX(-18deg);
            animation: launchSheen 3.8s ease-in-out infinite;
            pointer-events: none;
        }
    }

    @keyframes launchSheen {
        0%, 62% { translate: 0 0; opacity: 0; }
        72% { opacity: 1; }
        100% { translate: 420% 0; opacity: 0; }
    }

    .primary-btn:hover {
        border-color: #ffffff;
        box-shadow: 0 0 32px rgba(0, 242, 254, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
        transform: translateY(-1px);
    }

    .primary-btn:active {
        transform: scale(0.975);
    }

    .primary-btn:hover:active {
        transform: translateY(0) scale(0.965);
    }

    .btn-main-txt {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-cyber);
        font-size: clamp(0.86rem, 3.55vw, 1.00rem);
        font-weight: 900;
        letter-spacing: 0.06em;
        transform: skewX(-4deg);
        padding-inline: 3px;
        text-shadow:
            -0.8px 0 0 rgba(0, 242, 254, 0.68),
            0.8px 0 0 rgba(192, 132, 252, 0.48),
            0 0 14px rgba(103, 232, 249, 0.65);
        white-space: nowrap;
    }

    .launch-ico {
        inline-size: 18px;
        block-size: 18px;
    }

    .btn-sub-txt {
        font-family: var(--font-tech);
        font-size: 0.56rem;
        letter-spacing: 0.14em;
        color: rgba(226, 232, 240, 0.88);
        margin-top: 2px;
    }

    /* ===== 作戦結果（Game Over）リザルトモーダル ===== */
    .result-screen {
        justify-content: center;
        align-items: center;
        padding: 6px 8px;
        background: rgba(2, 6, 18, 0.78);
        backdrop-filter: blur(6px);
    }

    .result-card {
        inline-size: 100%;
        max-inline-size: 420px;
        max-block-size: calc(100dvh - 12px);
        overflow-y: auto;
        padding: 9px 11px;
        border-radius: 12px;
        background: linear-gradient(180deg, rgba(6, 16, 38, 0.90) 0%, rgba(2, 8, 22, 0.94) 100%);
        border: 1px solid rgba(0, 242, 254, 0.48);
        box-shadow:
            0 18px 46px rgba(0, 0, 0, 0.78),
            0 0 28px rgba(0, 242, 254, 0.18),
            inset 0 1px 0 rgba(224, 242, 254, 0.36);
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .debrief-header {
        border-bottom: 1px solid rgba(125, 211, 252, 0.24);
        padding-bottom: 4px;
    }

    .debrief-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--font-mono);
        font-size: 0.60rem;
        margin-bottom: 2px;
    }

    .debrief-tag { color: var(--cyan); }
    .debrief-status-dot { color: #ff6b8b; }

    .result-title {
        font-family: var(--font-display);
        font-size: clamp(0.96rem, 4.1vw, 1.18rem);
        font-weight: 900;
        color: #ffffff;
        letter-spacing: 0.05em;
        line-height: 1.15;
        text-wrap: balance;
    }

    .rank-showcase {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 6px 9px;
        border-radius: 9px;
        background: rgba(5, 14, 34, 0.82);
        border: 1px solid rgba(255, 215, 0, 0.34);
    }

    .rank-circle {
        min-inline-size: 40px;
        min-block-size: 40px;
        aspect-ratio: 1;
        padding: 2px 6px;
        border-radius: 50%;
        border: 2px solid var(--gold);
        background: radial-gradient(circle, rgba(255, 215, 0, 0.24), rgba(10, 16, 36, 0.92));
        display: grid;
        place-items: center;
        font-family: var(--font-display);
        font-size: 1.28rem;
        font-weight: 900;
        color: var(--gold);
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.65);
        flex-shrink: 0;
    }

    .rank-info {
        flex: 1;
        min-inline-size: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .rank-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
    }

    .rank-class-code {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        color: var(--gold);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .earned-cr-badge {
        font-family: var(--font-mono);
        font-size: 0.68rem;
        font-weight: 700;
        padding: 1px 7px;
        border-radius: 999px;
        background: rgba(0, 255, 157, 0.16);
        border: 1px solid rgba(0, 255, 157, 0.45);
        color: var(--emerald);
        white-space: nowrap;
    }

    .rank-name {
        font-size: clamp(0.80rem, 3.3vw, 0.94rem);
        font-weight: 800;
        color: #ffffff;
        line-height: 1.18;
        text-wrap: balance;
        word-break: keep-all;
    }

    .rank-progress-bar {
        inline-size: 100%;
        block-size: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        overflow: hidden;
    }

    .rank-bar-fill {
        inline-size: 55%;
        block-size: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg var(--in-oklch), #fde047 0%, #f59e0b 55%, #38bdf8 100%);
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    }

    .score-readout-panel {
        padding: 5px 10px;
        border-radius: 9px;
        background: rgba(4, 12, 28, 0.85);
        border: 1px solid rgba(0, 242, 254, 0.28);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .readout-label {
        font-family: var(--font-mono);
        font-size: 0.60rem;
        color: var(--text-sub);
        letter-spacing: 0.12em;
    }

    .final-score-num {
        font-family: var(--font-display);
        font-size: clamp(1.42rem, 6.2vw, 1.82rem);
        font-weight: 900;
        color: #ffffff;
        font-variant-numeric: tabular-nums;
        text-shadow: 0 0 18px rgba(0, 242, 254, 0.65);
        line-height: 1.02;
    }

    .final-score-flash {
        color: var(--cyan);
    }

    .new-best-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 1px 8px;
        border-radius: 999px;
        background: rgba(255, 215, 0, 0.2);
        border: 1px solid var(--gold);
        font-family: var(--font-mono);
        font-size: 0.62rem;
        font-weight: 700;
        color: var(--gold);
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .stat-box {
        padding: 5px 8px;
        border-radius: 8px;
        background: rgba(6, 16, 38, 0.82);
        border: 1px solid rgba(125, 211, 252, 0.2);
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .stat-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-family: var(--font-mono);
        font-size: 0.58rem;
        color: var(--text-sub);
    }

    .stat-val {
        font-family: var(--font-display);
        font-size: 0.88rem;
        font-weight: 800;
        color: #ffffff;
        font-variant-numeric: tabular-nums;
    }

    .ai-debrief-box {
        padding: 7px 9px;
        border-radius: 8px;
        background: rgba(4, 14, 34, 0.82);
        border: 1px solid rgba(0, 242, 254, 0.34);
    }

    .ai-debrief-head {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 3px;
    }

    .ai-debrief-title {
        display: block;
        font-family: var(--font-mono);
        font-size: 0.60rem;
        color: var(--cyan);
        margin-bottom: 0;
    }

    .ai-comment-text {
        font-size: 0.72rem;
        line-height: 1.36;
        color: var(--text-main);
        word-break: normal;
        overflow-wrap: anywhere;
        line-break: strict;
        max-block-size: 84px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 242, 254, 0.45) transparent;
    }

    .result-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        align-items: stretch;
        margin-top: 1px;
    }

    .result-actions .primary-btn {
        padding: 7px 6px;
        min-inline-size: 0;
    }

    .result-actions .btn-main-txt {
        font-size: clamp(0.60rem, 2.45vw, 0.78rem);
        gap: 4px;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }

    .result-actions .launch-ico {
        inline-size: 14px;
        block-size: 14px;
        flex-shrink: 0;
    }

    .result-actions .btn-sub-txt {
        font-size: 0.54rem;
    }

    .secondary-btn {
        min-inline-size: 54px;
        padding: 6px 6px;
        border-radius: 10px;
        border: 1px solid rgba(148, 163, 184, 0.4);
        background: rgba(10, 20, 44, 0.88);
        color: var(--text-main);
        font-family: var(--font-ui);
        font-size: 0.72rem;
        font-weight: 700;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        cursor: pointer;
        white-space: nowrap;
        transition: border-color 0.16s ease, background-color 0.16s ease;
    }

    .secondary-btn:hover {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.12);
    }
}

@layer modals {
    /* ===== ネイティブ Top-Layer <dialog> モーダル ===== */
    dialog.cyber-dialog {
        margin: auto;
        inline-size: min(92vw, 400px);
        max-block-size: min(88dvh, 640px);
        padding: 0;
        border: 1px solid rgba(0, 242, 254, 0.45);
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(10, 21, 46, 0.97) 0%, rgba(5, 11, 26, 0.99) 100%);
        color: var(--text-main);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 242, 254, 0.22);
        overflow: hidden;
        overscroll-behavior: contain;

        /* Top-layer スムーズ入退場アニメーション（プログレッシブ拡張） */
        opacity: 0;
        transition-property: opacity, overlay, display;
        transition-duration: 0.22s;
        transition-timing-function: ease;
        transition-behavior: allow-discrete;
    }

    @media (prefers-reduced-motion: no-preference) {
        dialog.cyber-dialog {
            transform: translateY(10px) scale(0.97);
            transition-property: opacity, transform, overlay, display;
            transition-duration: 0.24s;
            transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
            transition-behavior: allow-discrete;
        }
    }

    dialog.cyber-dialog[open] {
        opacity: 1;
    }

    @starting-style {
        dialog.cyber-dialog[open] {
            opacity: 0;
        }
    }

    @media (prefers-reduced-motion: no-preference) {
        dialog.cyber-dialog[open] {
            transform: translateY(0) scale(1);
        }
        @starting-style {
            dialog.cyber-dialog[open] {
                opacity: 0;
                transform: translateY(12px) scale(0.96);
            }
        }
    }

    dialog.cyber-dialog::backdrop {
        background-color: rgba(2, 5, 14, 0);
        backdrop-filter: blur(0px);
        overflow: hidden;
        transition-property: background-color, backdrop-filter, overlay, display;
        transition-duration: 0.22s;
        transition-timing-function: ease;
        transition-behavior: allow-discrete;
    }

    dialog.cyber-dialog[open]::backdrop {
        background: rgba(2, 5, 14, 0.78);
        backdrop-filter: blur(8px);
    }

    @starting-style {
        dialog.cyber-dialog[open]::backdrop {
            background: rgba(2, 5, 14, 0);
            backdrop-filter: blur(0px);
        }
    }

    /* Firefox / 旧Safari用クロージングフォールバック */
    dialog.cyber-dialog[data-closing="true"] {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }

    dialog.cyber-dialog[data-closing="true"]::backdrop {
        background: rgba(2, 5, 14, 0);
    }

    .dialog-panel {
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 11px;
        max-block-size: inherit;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 242, 254, 0.35) rgba(5, 11, 26, 0.4);
    }

    .dialog-panel::-webkit-scrollbar {
        width: 5px;
    }

    .dialog-panel::-webkit-scrollbar-track {
        background: rgba(5, 11, 26, 0.4);
        border-radius: 999px;
    }

    .dialog-panel::-webkit-scrollbar-thumb {
        background: rgba(0, 242, 254, 0.35);
        border-radius: 999px;
    }

    .dialog-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    }

    .dialog-kicker {
        display: block;
        font-family: var(--font-mono);
        font-size: 0.64rem;
        color: var(--cyan);
        letter-spacing: 0.08em;
    }

    .dialog-title {
        font-family: var(--font-display);
        font-size: 1.05rem;
        font-weight: 800;
        color: #ffffff;
    }

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

    .pause-stat {
        padding: 9px 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(0, 242, 254, 0.2);
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .pause-stat span {
        font-family: var(--font-mono);
        font-size: 0.64rem;
        color: var(--text-sub);
    }

    .pause-stat strong {
        font-family: var(--font-display);
        font-size: 1rem;
        color: #ffffff;
    }

    .dialog-stack {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .dialog-action-btn {
        min-block-size: 44px;
        padding: 9px 12px;
        border-radius: 9px;
        border: 1px solid rgba(148, 163, 184, 0.3);
        background: rgba(14, 28, 56, 0.85);
        color: var(--text-main);
        font-family: var(--font-ui);
        font-size: 0.85rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }

    .dialog-action-btn:hover {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.12);
    }

    .dialog-action-btn.danger {
        border-color: rgba(255, 59, 92, 0.45);
        color: #ff99aa;
    }
    .dialog-action-btn.danger:hover {
        border-color: var(--danger);
        background: rgba(255, 59, 92, 0.14);
    }

    /* 設定スライダー・トグル */
    .settings-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .setting-slider-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 9px 11px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .setting-label-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.82rem;
        font-weight: 700;
    }
    .setting-label-row strong {
        font-family: var(--font-mono);
        color: var(--cyan);
    }

    .setting-slider-row input[type="range"] {
        inline-size: 100%;
        accent-color: var(--cyan);
        cursor: pointer;
    }

    .setting-toggle-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 9px 11px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .setting-toggle-info {
        display: flex;
        align-items: center;
        gap: 9px;
        min-inline-size: 0;
    }

    .setting-toggle-info strong {
        display: block;
        font-size: 0.8rem;
        color: var(--text-main);
    }

    .setting-toggle-info span {
        display: block;
        font-size: 0.68rem;
        color: var(--text-muted);
    }

    .toggle-pill {
        min-inline-size: 68px;
        min-block-size: 32px;
        padding: 0 10px;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.35);
        background: rgba(15, 23, 42, 0.9);
        color: var(--text-sub);
        font-family: var(--font-mono);
        font-size: 0.72rem;
        font-weight: 800;
        cursor: pointer;
        flex-shrink: 0;
    }

    .toggle-pill.active {
        border-color: var(--cyan);
        background: rgba(0, 242, 254, 0.2);
        color: #ffffff;
        box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
    }

    .voice-actions-row {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .voice-sample-btn {
        min-inline-size: 52px;
        border-color: rgba(255, 215, 0, 0.55);
        color: #fef08a;
        background: rgba(255, 215, 0, 0.12);
    }

    .voice-sample-btn:hover {
        border-color: var(--gold);
        background: rgba(255, 215, 0, 0.24);
        color: #ffffff;
    }
}

@layer states {
    /* AI音声再生中の控えめなアニメーション（WCAG 2.3.1準拠・3Hz未満） */
    @media (prefers-reduced-motion: no-preference) {
        .ai-subtitle-bar.speaking .ai-dot {
            animation: gentlePulse 0.9s ease-in-out infinite alternate;
        }
        .ai-subtitle-bar.speaking .ai-spectrum-viz {
            opacity: 1;
        }
        .ai-subtitle-bar.speaking .spec-bar:nth-child(1) { animation: specWave 0.65s ease-in-out infinite alternate; }
        .ai-subtitle-bar.speaking .spec-bar:nth-child(2) { animation: specWave 0.55s ease-in-out 0.15s infinite alternate; }
        .ai-subtitle-bar.speaking .spec-bar:nth-child(3) { animation: specWave 0.7s ease-in-out 0.25s infinite alternate; }
        .ai-subtitle-bar.speaking .spec-bar:nth-child(4) { animation: specWave 0.6s ease-in-out 0.1s infinite alternate; }
        .ai-subtitle-bar.speaking .ai-speaker-badge {
            box-shadow: 0 0 14px var(--nav-accent, rgba(0, 242, 254, 0.55));
        }
        .ai-subtitle-bar.priority-alert {
            border-color: var(--nav-accent, var(--cyan));
            box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
        }
        .nav-hero-stage.speaking {
            box-shadow: 0 0 22px rgba(0, 242, 254, 0.28), inset 0 0 18px rgba(0, 242, 254, 0.12);
        }
        .nav-hero-stage.speaking .nav-hero-wave { opacity: 1; }
        .nav-hero-stage.speaking .nav-hero-wave span:nth-child(1) { animation: specWave 0.6s ease-in-out infinite alternate; }
        .nav-hero-stage.speaking .nav-hero-wave span:nth-child(2) { animation: specWave 0.5s ease-in-out 0.12s infinite alternate; }
        .nav-hero-stage.speaking .nav-hero-wave span:nth-child(3) { animation: specWave 0.65s ease-in-out 0.22s infinite alternate; }
        .nav-hero-stage.speaking .nav-hero-wave span:nth-child(4) { animation: specWave 0.55s ease-in-out 0.08s infinite alternate; }
        .burst-btn.ready {
            animation: burstReadyPulse 1.5s ease-in-out infinite alternate;
        }
    }

    @keyframes burstReadyPulse {
        from { box-shadow: 0 0 14px rgba(255, 215, 0, 0.38); }
        to { box-shadow: 0 0 26px rgba(255, 215, 0, 0.72); }
    }

    @keyframes gentlePulse {
        from { opacity: 0.55; transform: scale(0.92); }
        to { opacity: 1; transform: scale(1.15); }
    }

    @keyframes specWave {
        from { block-size: 4px; }
        to { block-size: 14px; }
    }

    @media (prefers-reduced-motion: reduce) {
        .hud-btn, .action-btn, .orbit-ring-pills span, .primary-btn, .gauge-fill, .boss-hp-fill {
            transition: none;
        }
        .action-btn:hover:not(:disabled),
        .action-btn:is(:active, .is-pressed):not(:disabled),
        .action-btn:hover:is(:active, .is-pressed):not(:disabled) {
            transform: none;
        }
        dialog.cyber-dialog {
            transition-property: opacity, overlay, display;
            transition-duration: 0.1s;
            transition-timing-function: ease;
            transition-behavior: allow-discrete;
        }
        dialog.cyber-dialog::backdrop {
            transition-property: background-color, overlay, display;
            transition-duration: 0.1s;
            transition-timing-function: ease;
            transition-behavior: allow-discrete;
        }
    }

    /* ===== v63.0 近未来ホログラフィック・コックピット＆リザルトUI最高品質化 ===== */
    .result-screen {
        background:
            radial-gradient(circle at 50% 18%, color-mix(in oklch, #00f2fe 16%, transparent), transparent 55%),
            radial-gradient(circle at 80% 82%, color-mix(in oklch, #8b5cf6 14%, transparent), transparent 52%),
            rgba(2, 6, 18, 0.72);
        backdrop-filter: blur(10px) saturate(1.25);
    }

    .result-card.cyber-debrief-card {
        position: relative;
        border-radius: 16px;
        background:
            radial-gradient(circle at 88% 8%, color-mix(in oklch, #38bdf8 18%, transparent), transparent 44%),
            radial-gradient(circle at 12% 92%, color-mix(in oklch, #ec4899 10%, transparent), transparent 46%),
            radial-gradient(circle, rgba(148, 226, 255, 0.08) 1px, transparent 1px) 0 0 / 16px 16px,
            linear-gradient(165deg var(--in-oklab), rgba(6, 16, 40, 0.88) 0%, rgba(2, 7, 20, 0.94) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 48%, transparent);
        box-shadow:
            0 6px 18px rgba(0, 0, 0, 0.55),
            0 24px 60px rgba(0, 4, 16, 0.85),
            0 0 36px color-mix(in oklch, #00f2fe 16%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            inset 0 -1px 0 color-mix(in oklch, #38bdf8 22%, transparent);
        backdrop-filter: blur(22px) saturate(1.4);
    }

    .debrief-header {
        border-bottom: 1px solid color-mix(in oklch, #38bdf8 30%, transparent);
        padding-bottom: 10px;
    }

    .debrief-tag {
        color: #7dd3fc;
        letter-spacing: 0.14em;
        text-shadow: 0 0 10px color-mix(in oklch, #38bdf8 55%, transparent);
    }

    .debrief-status-dot {
        padding: 2px 8px;
        border-radius: 999px;
        background: color-mix(in oklch, #f43f5e 16%, rgba(15, 23, 42, 0.78));
        border: 1px solid color-mix(in oklch, #fb7185 45%, transparent);
        color: #fda4af;
        font-size: 0.62rem;
    }

    .result-title {
        background: linear-gradient(90deg var(--in-oklab), #ffffff 22%, #a5f3fc 70%, #38bdf8 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.42));
    }

    .rank-showcase {
        position: relative;
        border-radius: 12px;
        background:
            linear-gradient(125deg var(--in-oklab), rgba(10, 25, 56, 0.82), rgba(5, 12, 30, 0.90));
        border: 1px solid color-mix(in oklch, #22d3ee 42%, transparent);
        box-shadow:
            0 8px 24px rgba(0, 0, 0, 0.42),
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            inset 0 0 22px color-mix(in oklch, #0ea5e9 10%, transparent);
    }

    .rank-circle.cyber-rank-badge {
        position: relative;
        background:
            radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.24), transparent 55%),
            linear-gradient(145deg var(--in-oklch), #083344 0%, #021324 100%);
        border: 2px solid #22d3ee;
        filter: drop-shadow(0 0 12px color-mix(in oklch, #22d3ee 55%, transparent));
        box-shadow: inset 0 0 14px color-mix(in oklch, #22d3ee 32%, transparent);
    }

    .rank-progress-bar {
        background: rgba(2, 8, 22, 0.9);
        border: 1px solid rgba(148, 163, 184, 0.24);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
    }

    .rank-bar-fill {
        background: linear-gradient(90deg var(--in-oklch), #06b6d4 0%, #22d3ee 45%, #facc15 100%);
        box-shadow: 0 0 12px color-mix(in oklch, #38bdf8 65%, transparent);
    }

    .score-readout-panel {
        position: relative;
        border-radius: 12px;
        background:
            repeating-linear-gradient(0deg, rgba(186, 230, 253, 0.03) 0 1px, transparent 1px 4px),
            radial-gradient(ellipse at 50% 0%, color-mix(in oklch, #00f2fe 16%, transparent), transparent 72%),
            linear-gradient(180deg var(--in-oklab), rgba(6, 17, 42, 0.88), rgba(3, 9, 24, 0.94));
        border: 1px solid color-mix(in oklch, #00f2fe 46%, transparent);
        box-shadow:
            0 10px 26px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            inset 0 0 24px color-mix(in oklch, #00f2fe 8%, transparent);
    }

    .final-score-num {
        font-variant-numeric: tabular-nums;
        background: linear-gradient(180deg var(--in-oklch), #ffffff 12%, #67e8f9 62%, #00f2fe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(0 0 18px rgba(0, 242, 254, 0.58));
    }

    .stat-box {
        border-radius: 10px;
        background:
            linear-gradient(150deg var(--in-oklab), rgba(11, 23, 52, 0.82), rgba(4, 10, 26, 0.92));
        border: 1px solid color-mix(in oklch, #60a5fa 32%, transparent);
        border-top: 1.5px solid color-mix(in oklch, #38bdf8 48%, transparent);
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.38),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

    .ai-debrief-box {
        border-radius: 12px;
        background:
            radial-gradient(circle at 0% 50%, color-mix(in oklch, var(--nav-accent, #38bdf8) 16%, transparent), transparent 48%),
            linear-gradient(145deg var(--in-oklab), rgba(8, 19, 44, 0.86), rgba(4, 10, 26, 0.94));
        border: 1px solid color-mix(in oklch, var(--nav-accent, #38bdf8) 44%, transparent);
        border-inline-start: 3px solid var(--nav-accent, #38bdf8);
        box-shadow:
            0 8px 22px rgba(0, 0, 0, 0.42),
            inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    .nav-portrait-mini {
        border-radius: 10px;
        border: 1.5px solid color-mix(in oklch, var(--nav-accent, #38bdf8) 70%, #ffffff);
        box-shadow: 0 0 14px color-mix(in oklch, var(--nav-accent, #38bdf8) 45%, transparent);
    }

    .primary-btn,
    .primary-btn.cyber-launch-btn,
    .primary-btn.cyber-scramble-btn {
        border-radius: 12px;
        background:
            linear-gradient(135deg var(--in-oklch), #075985 0%, #0369a1 45%, #1d4ed8 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 78%, #ffffff);
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.55),
            0 0 26px color-mix(in oklch, #00f2fe 36%, transparent),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.36),
            inset 0 -2px 0 rgba(2, 6, 23, 0.55);
        color: #ffffff;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
    }

    .primary-btn .btn-sub-txt,
    .primary-btn .launch-sub {
        color: #e0f2fe;
        opacity: 0.96;
    }

    .primary-btn:hover,
    .primary-btn.cyber-launch-btn:hover,
    .primary-btn.cyber-scramble-btn:hover {
        background:
            linear-gradient(135deg var(--in-oklch), #0369a1 0%, #0284c7 48%, #2563eb 100%);
        box-shadow:
            0 6px 20px rgba(0, 0, 0, 0.6),
            0 0 34px color-mix(in oklch, #22d3ee 52%, transparent),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.48);
    }

    .secondary-btn {
        border-radius: 12px;
        background: linear-gradient(160deg var(--in-oklab), rgba(14, 28, 58, 0.86), rgba(6, 13, 30, 0.94));
        border: 1px solid color-mix(in oklch, #94a3b8 42%, transparent);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    .secondary-btn:hover {
        border-color: color-mix(in oklch, #38bdf8 65%, transparent);
        background: linear-gradient(160deg var(--in-oklab), rgba(18, 40, 82, 0.92), rgba(8, 18, 42, 0.96));
    }

    .hud-header {
        background:
            linear-gradient(180deg var(--in-oklab), rgba(5, 13, 32, 0.88), rgba(2, 7, 20, 0.92));
        border-bottom: 1px solid color-mix(in oklch, #38bdf8 34%, transparent);
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), inset 0 -1px 0 color-mix(in oklch, #00f2fe 16%, transparent);
        backdrop-filter: blur(14px) saturate(1.3);
    }

    /* v64.0 APEX EDITION: 格納庫パークピル & フィーバー階層バッジ & Modern Web最適化 */
    .hangar-card,
    .navigator-card,
    .mission-item,
    .stat-box {
        contain: layout style paint;
        min-block-size: fit-content;
    }

    .hangar-card.equipped {
        border-color: color-mix(in oklch, #38bdf8 78%, #ffffff);
        box-shadow:
            0 0 18px color-mix(in oklch, #00f2fe 26%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    .hangar-perk-pill {
        margin-top: 5px;
        padding: 3px 7px;
        min-block-size: 20px;
        width: fit-content;
        max-inline-size: 100%;
        border-radius: 5px;
        font-family: var(--font-mono);
        font-size: 0.57rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        line-height: 1.35;
        color: #bae6fd;
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 242, 254, 0.14), rgba(56, 189, 248, 0.06));
        border: 1px solid color-mix(in oklch, #38bdf8 36%, transparent);
    }

    .hangar-card.equipped .hangar-perk-pill {
        color: #f0fdfa;
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 242, 254, 0.24), rgba(16, 185, 129, 0.16));
        border-color: color-mix(in oklch, #00f2fe 58%, transparent);
    }

    .combo-badge {
        min-block-size: 18px;
        padding: 1px 6px;
        border-radius: 5px;
        border: 1px solid transparent;
    }

    .combo-badge.fever-tier-1 {
        color: #7dd3fc;
        background: rgba(14, 165, 233, 0.16);
        border-color: rgba(56, 189, 248, 0.45);
        text-shadow: 0 0 10px rgba(0, 242, 254, 0.65);
    }

    .combo-badge.fever-tier-2 {
        color: #fde047;
        background: rgba(234, 179, 8, 0.18);
        border-color: rgba(250, 204, 21, 0.58);
        text-shadow: 0 0 12px rgba(255, 215, 0, 0.78);
    }

    .combo-badge.fever-tier-3 {
        color: #f5d0fe;
        background: linear-gradient(90deg var(--in-oklab), rgba(236, 72, 153, 0.24), rgba(168, 85, 247, 0.24));
        border-color: color-mix(in oklch, #f472b6 68%, transparent);
        text-shadow: 0 0 14px rgba(244, 114, 182, 0.85);
    }

    /* 長文可読性チューニング（typography） */
    .ai-comment-text,
    .nav-preview-text,
    .manual-item p {
        text-wrap: pretty;
        line-height: 1.5;
    }

    /* ナビ肖像のアスペクト比維持（CLS防止） */
    .nav-portrait-img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    @media (prefers-reduced-motion: no-preference) {
        .rank-bar-fill {
            transition: inline-size 0.55s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .lobby-panel.active:not([hidden]),
        .result-card.cyber-debrief-card {
            transition:
                opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .combo-badge.fever-tier-1,
        .combo-badge.fever-tier-2,
        .combo-badge.fever-tier-3 {
            transition:
                transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.22s ease;
        }

        @starting-style {
            .lobby-panel.active:not([hidden]),
            .result-card.cyber-debrief-card {
                opacity: 0;
                transform: translateY(8px) scale(0.985);
            }
        }
    }

    /* v65.0 NEO-FUTURISTIC AEROSPACE GLASS: 透き通るサファイアガラス × 光ファイバー境界統一レイヤー */
    :root {
        color-scheme: dark;
    }

    .lobby-screen {
        background: linear-gradient(
            180deg var(--in-oklab),
            rgba(2, 6, 18, 0.18) 0%,
            rgba(2, 6, 18, 0.0) 28%,
            rgba(2, 6, 18, 0.04) 68%,
            rgba(2, 5, 16, 0.56) 100%
        );
    }

    .pilot-chip,
    .credit-pill,
    .hud-btn {
        background: linear-gradient(165deg var(--in-oklab), rgba(7, 17, 42, 0.56), rgba(3, 9, 24, 0.68));
        border: 1px solid color-mix(in oklch, #38bdf8 40%, transparent);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.36),
            inset 0 1px 0 rgba(224, 242, 254, 0.22);
        backdrop-filter: blur(16px) saturate(1.42);
    }

    .credit-pill {
        border-color: color-mix(in oklch, #facc15 48%, transparent);
        background: linear-gradient(165deg var(--in-oklab), rgba(28, 22, 6, 0.54), rgba(14, 11, 4, 0.68));
    }

    .lobby-deck {
        border-radius: 15px;
        background: linear-gradient(172deg var(--in-oklab), rgba(5, 13, 32, 0.88) 0%, rgba(2, 6, 18, 0.94) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 48%, transparent);
        box-shadow:
            0 10px 36px rgba(0, 2, 12, 0.74),
            0 0 28px color-mix(in oklch, #0ea5e9 14%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.26);
        backdrop-filter: blur(20px) saturate(1.38);
    }

    .lobby-tabs {
        background: rgba(4, 10, 26, 0.92);
        border-bottom: 1px solid color-mix(in oklch, #38bdf8 26%, transparent);
    }

    .lobby-tab[aria-selected="true"] {
        color: #cffafe;
        background: linear-gradient(180deg var(--in-oklab), color-mix(in oklch, #00f2fe 15%, transparent), transparent);
        text-shadow: 0 0 12px color-mix(in oklch, #38bdf8 55%, transparent);
    }

    .hangar-card,
    .navigator-card,
    .mission-item,
    .mode-option,
    .manual-item,
    .stat-box {
        background: linear-gradient(168deg var(--in-oklab), rgba(8, 20, 48, 0.76), rgba(4, 10, 26, 0.86));
        border: 1px solid color-mix(in oklch, #94a3b8 30%, transparent);
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.34),
            inset 0 1px 0 rgba(224, 242, 254, 0.16);
        backdrop-filter: blur(12px) saturate(1.25);
    }

    .hangar-swatch {
        background: rgba(3, 10, 26, 0.78);
        box-shadow:
            0 0 12px color-mix(in oklch, currentColor 32%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }

    .hangar-card.equipped,
    .navigator-card.equipped,
    .mode-option.active {
        background:
            radial-gradient(circle at 100% 0%, color-mix(in oklch, #00f2fe 16%, transparent), transparent 60%),
            linear-gradient(168deg var(--in-oklab), rgba(6, 28, 58, 0.84), rgba(4, 14, 34, 0.90));
        border-color: color-mix(in oklch, #38bdf8 78%, #e0f2fe);
        box-shadow:
            0 6px 20px rgba(0, 4, 18, 0.48),
            0 0 20px color-mix(in oklch, #00f2fe 20%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }

    /* 実戦プレイ中の近未来スモーク・クリスタルHUD（オープニングと同一美学・高視認＆透過宇宙光） */
    .hud-header {
        background:
            radial-gradient(ellipse 80% 60% at 50% 0%, rgba(56, 189, 248, 0.12), transparent 72%),
            linear-gradient(180deg var(--in-oklab), rgba(5, 13, 32, 0.62), rgba(2, 6, 18, 0.78));
        border: 1px solid color-mix(in oklch, #38bdf8 44%, transparent);
        border-top-color: color-mix(in oklch, #e0f2fe 68%, #38bdf8);
        box-shadow:
            0 8px 26px rgba(0, 2, 12, 0.44),
            inset 0 1px 0 rgba(224, 242, 254, 0.30);
        backdrop-filter: blur(16px) saturate(1.42);
        transition: border-color 0.28s ease, box-shadow 0.28s ease;
    }

    .ai-subtitle-bar {
        background: linear-gradient(90deg var(--in-oklab), rgba(5, 14, 34, 0.66), rgba(3, 9, 24, 0.56));
        border: 1px solid color-mix(in oklch, #38bdf8 36%, transparent);
        border-top-color: color-mix(in oklch, #bae6fd 52%, transparent);
        border-left: 3px solid var(--nav-accent, var(--cyan));
        box-shadow:
            0 6px 20px rgba(0, 2, 12, 0.36),
            inset 0 1px 0 rgba(224, 242, 254, 0.22);
        backdrop-filter: blur(14px) saturate(1.36);
    }

    .status-pill,
    .gauge-section {
        background: linear-gradient(180deg var(--in-oklab), rgba(5, 13, 32, 0.58), rgba(2, 7, 20, 0.74));
        border-color: color-mix(in oklch, #38bdf8 36%, transparent);
        border-top-color: color-mix(in oklch, #e0f2fe 54%, transparent);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.32),
            inset 0 1px 0 rgba(224, 242, 254, 0.22);
        backdrop-filter: blur(14px) saturate(1.36);
        transition: border-color 0.28s ease, box-shadow 0.28s ease;
    }

    .status-pill.active {
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 255, 157, 0.16), rgba(4, 18, 34, 0.54));
        border-color: color-mix(in oklch, #34d399 64%, transparent);
    }

    .status-pill.cyan {
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 242, 254, 0.16), rgba(4, 16, 38, 0.54));
        border-color: color-mix(in oklch, #38bdf8 62%, transparent);
    }

    .status-pill.magenta {
        background: linear-gradient(90deg var(--in-oklab), rgba(255, 42, 133, 0.18), rgba(24, 8, 28, 0.54));
        border-color: color-mix(in oklch, #fb7185 66%, transparent);
    }

    .action-btn {
        background: linear-gradient(175deg var(--in-oklab), rgba(8, 20, 46, 0.54) 0%, rgba(3, 8, 22, 0.72) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 46%, transparent);
        border-top-color: color-mix(in oklch, #bae6fd 66%, transparent);
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.32),
            0 8px 22px rgba(0, 4, 16, 0.44),
            0 0 16px color-mix(in oklch, #00f2fe 14%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.32);
        backdrop-filter: blur(16px) saturate(1.44);
    }

    .action-btn.orbit-btn {
        background:
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(103, 232, 249, 0.22), transparent 72%),
            linear-gradient(175deg var(--in-oklab), rgba(0, 242, 254, 0.18) 0%, rgba(5, 20, 48, 0.76) 55%, rgba(2, 9, 24, 0.86) 100%);
        border-color: color-mix(in oklch, #38bdf8 72%, transparent);
        border-top-color: color-mix(in oklch, #e0f2fe 78%, #38bdf8);
    }

    .action-btn.polarity-btn.cyan {
        background: linear-gradient(175deg var(--in-oklab), rgba(0, 242, 254, 0.18) 0%, rgba(4, 16, 40, 0.66) 100%);
        border-color: color-mix(in oklch, #22d3ee 66%, transparent);
    }

    .action-btn.polarity-btn.magenta {
        background: linear-gradient(175deg var(--in-oklab), rgba(255, 42, 133, 0.20) 0%, rgba(28, 8, 26, 0.66) 100%);
        border-color: color-mix(in oklch, #f472b6 68%, transparent);
    }

    .action-btn.burst-btn.ready {
        background: linear-gradient(175deg var(--in-oklab), rgba(250, 204, 21, 0.22) 0%, rgba(120, 40, 8, 0.58) 100%);
        border-color: color-mix(in oklch, #facc15 74%, #ffffff);
        box-shadow:
            0 0 24px color-mix(in oklch, #facc15 38%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.38);
    }

    /* コックピット極性シンクロ共振（MAGENTA反転／HYPER BURST時に計器フレームも共鳴） */
    #gameContainer[data-screen="active"][data-polarity="MAGENTA"] {
        border-color: color-mix(in oklch, #fb7185 56%, transparent);
        box-shadow:
            0 28px 80px rgba(0, 0, 0, 0.88),
            0 0 46px rgba(255, 42, 133, 0.22),
            inset 0 1px 0 rgba(253, 164, 175, 0.18);
    }
    #gameContainer[data-screen="active"][data-polarity="MAGENTA"] .hud-corner {
        border-color: rgba(255, 90, 170, 0.86);
        filter: drop-shadow(0 0 6px rgba(255, 42, 133, 0.6));
    }
    #gameContainer[data-screen="active"][data-polarity="MAGENTA"] .hud-header {
        background:
            radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 42, 133, 0.14), transparent 72%),
            linear-gradient(180deg var(--in-oklab), rgba(18, 8, 28, 0.64), rgba(8, 4, 18, 0.78));
        border-color: color-mix(in oklch, #fb7185 48%, transparent);
        border-top-color: color-mix(in oklch, #fecdd3 66%, #fb7185);
    }
    #gameContainer[data-screen="active"][data-polarity="MAGENTA"] .gauge-section {
        border-color: color-mix(in oklch, #f472b6 42%, transparent);
    }
    #gameContainer[data-screen="active"][data-polarity="MAGENTA"] .action-btn.orbit-btn {
        border-color: color-mix(in oklch, #f472b6 68%, transparent);
        border-top-color: color-mix(in oklch, #fce7f3 76%, #f472b6);
    }
    #gameContainer[data-screen="active"][data-burst="overdrive"] .hud-corner {
        border-color: rgba(250, 204, 21, 0.92);
        filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.7));
    }

    /* ===== v66.0 シネマティック・オープニング＆ラストフィナーレ演出（GPUコンポジタ駆動） ===== */
    #gameContainer :is(.hud-header, .ai-subtitle-bar, .status-row, .boss-hud-bar, .hud-footer) {
        transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s;
        transition-behavior: allow-discrete;
    }

    /* オープニングロビー：滑らかな入場＆出撃ワープ退場トランジション */
    #startOverlay {
        opacity: 1;
        transform: translateY(0) scale(1);
        transition:
            opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
            display 0.38s;
        transition-behavior: allow-discrete;
    }

    @starting-style {
        #startOverlay {
            opacity: 0;
            transform: translateY(10px) scale(0.975);
        }
    }

    #startOverlay[data-closing] {
        opacity: 0;
        transform: scale(1.065);
        pointer-events: none;
    }

    /* ロビー起動ボタン：光沢スイープ＆近未来立体ホログラム */
    #startBtn.cyber-launch-btn {
        position: relative;
        overflow: hidden;
        box-shadow:
            0 12px 34px rgba(0, 180, 255, 0.34),
            0 0 24px color-mix(in oklch, #00f2fe 26%, transparent),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.56);
        transition:
            transform 0.46s ease-out,
            box-shadow 0.28s ease;
        transition-timing-function:
            linear(0, 0.015, 0.062 3%, 0.24 8%, 0.78 16%, 1.05 24%, 1.09 31%, 1.01 46%, 0.992 60%, 1),
            ease;
    }

    .lobby-hero .game-title {
        filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.36)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.78));
    }

    #startBtn.cyber-launch-btn::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(108deg, transparent 22%, rgba(255, 255, 255, 0.36) 48%, rgba(125, 211, 252, 0.28) 54%, transparent 78%);
        transform: translateX(-115%);
        pointer-events: none;
    }

    @media (prefers-reduced-motion: no-preference) {
        #startBtn.cyber-launch-btn::after {
            animation: launchSheenSweep 4.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
        }
    }

    @keyframes launchSheenSweep {
        0%, 62% { transform: translateX(-115%); }
        88%, 100% { transform: translateX(120%); }
    }

    #startBtn.cyber-launch-btn:hover {
        transform: translateY(-1px) scale(1.018);
    }

    #startBtn.cyber-launch-btn:active {
        transform: scale(0.97);
    }

    #startBtn.cyber-launch-btn:hover:active {
        transform: translateY(0) scale(0.96);
    }

    /* エンディング・フィナーレ（#gameOverModal）：超新星爆発の余韻を残す段階開示＆物理スプリング */
    #gameOverModal {
        opacity: 1;
        backdrop-filter: blur(7px) saturate(1.18);
        transition: opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.14s, display 0.44s;
        transition-behavior: allow-discrete;
    }

    @starting-style {
        #gameOverModal {
            opacity: 0;
        }
    }

    #gameOverModal[data-finale-tier="legend"] {
        background: radial-gradient(circle at 50% 24%, rgba(251, 191, 36, 0.22) 0%, rgba(168, 85, 247, 0.16) 40%, rgba(2, 6, 18, 0.80) 100%);
    }

    #gameOverModal[data-finale-tier="elite"] {
        background: radial-gradient(circle at 50% 24%, rgba(34, 211, 238, 0.20) 0%, rgba(30, 64, 175, 0.18) 44%, rgba(2, 6, 18, 0.82) 100%);
    }

    #gameOverModal[data-finale-tier="standard"] {
        background: radial-gradient(circle at 50% 24%, rgba(56, 189, 248, 0.14) 0%, rgba(15, 23, 42, 0.26) 46%, rgba(2, 6, 18, 0.84) 100%);
    }

    #gameOverModal .result-card.cyber-debrief-card {
        opacity: 1;
        transform: translateY(0) scale(1);
        background:
            radial-gradient(circle at 88% 8%, color-mix(in oklch, #38bdf8 22%, transparent), transparent 44%),
            radial-gradient(circle at 12% 92%, color-mix(in oklch, #ec4899 14%, transparent), transparent 46%),
            radial-gradient(circle, rgba(148, 226, 255, 0.07) 1px, transparent 1px) 0 0 / 16px 16px,
            linear-gradient(165deg var(--in-oklab), rgba(6, 16, 40, 0.80) 0%, rgba(2, 7, 20, 0.91) 100%);
        backdrop-filter: blur(18px) saturate(1.42);
        transition:
            opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.22s,
            transform 0.72s ease-out 0.20s;
        transition-timing-function:
            cubic-bezier(0.22, 1, 0.36, 1),
            linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
    }

    #gameOverModal .result-card.cyber-debrief-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.9), rgba(255, 255, 255, 0.95), rgba(103, 232, 249, 0.9), transparent);
        pointer-events: none;
    }

    #gameOverModal[data-finale-tier="legend"] .result-card.cyber-debrief-card::before {
        background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.95), rgba(255, 255, 255, 1), rgba(244, 114, 182, 0.95), transparent);
    }

    @starting-style {
        #gameOverModal .result-card.cyber-debrief-card {
            opacity: 0;
            transform: translateY(22px) scale(0.94);
        }
    }

    #gameOverModal[data-finale-tier="legend"] .result-card.cyber-debrief-card {
        border-color: color-mix(in oklch, #fbbf24 58%, rgba(125, 211, 252, 0.5));
        box-shadow:
            0 22px 54px rgba(0, 0, 0, 0.72),
            0 0 42px rgba(251, 191, 36, 0.18),
            inset 0 1px 0 rgba(254, 240, 138, 0.36);
    }

    #gameOverModal[data-finale-tier="elite"] .result-card.cyber-debrief-card {
        border-color: color-mix(in oklch, #22d3ee 58%, rgba(255, 255, 255, 0.22));
        box-shadow:
            0 22px 54px rgba(0, 0, 0, 0.72),
            0 0 38px rgba(34, 211, 238, 0.16),
            inset 0 1px 0 rgba(165, 243, 252, 0.32);
    }

    #gameOverModal .rank-circle.cyber-rank-badge {
        transform: scale(1) rotate(0deg);
        transition: transform 0.78s ease-out 0.32s;
        transition-timing-function: linear(0, 0.012, 0.048 2.4%, 0.185, 0.382 7.2%, 0.812 13.8%, 1.024 18.2%, 1.118, 1.148 24.1%, 1.132 29.2%, 1.046 37.5%, 0.986 45.2%, 0.968 51.8%, 0.988 63.4%, 1.005 76.8%, 1);
    }

    @starting-style {
        #gameOverModal .rank-circle.cyber-rank-badge {
            transform: scale(0.55) rotate(-10deg);
        }
    }

    #gameOverModal[data-finale-tier="legend"] .debrief-status-dot {
        background: color-mix(in oklch, #fbbf24 18%, rgba(15, 23, 42, 0.86));
        border-color: color-mix(in oklch, #fbbf24 62%, transparent);
        color: #fde68a;
    }

    #gameOverModal[data-closing] {
        opacity: 0;
        pointer-events: none;
    }

    /* ===== v70.0 / v80.0 HYPER-FUTURISTIC HOLOGRAPHIC PRISM UI（GPUコンポジタ専用スイープ仕様） ===== */
    @keyframes holoSweepCompositor {
        0%, 100% {
            transform: translate3d(-46%, 0, 0);
            opacity: 0.25;
        }
        50% {
            transform: translate3d(46%, 0, 0);
            opacity: 0.72;
        }
    }

    @media (prefers-reduced-motion: no-preference) {
        .lobby-deck::before {
            content: "";
            position: absolute;
            inset-block: -20%;
            inset-inline: -35%;
            background: linear-gradient(112deg, transparent 38%, rgba(103, 232, 249, 0.08) 49%, rgba(240, 171, 252, 0.07) 53%, transparent 64%);
            pointer-events: none;
            z-index: 2;
            mix-blend-mode: screen;
            will-change: transform;
            animation: holoSweepCompositor 9.5s ease-in-out infinite;
        }
    }

    .lobby-screen {
        background: linear-gradient(
            180deg var(--in-oklab),
            rgba(2, 6, 18, 0.14) 0%,
            rgba(2, 6, 18, 0.00) 24%,
            rgba(2, 6, 18, 0.00) 60%,
            rgba(2, 5, 16, 0.44) 100%
        );
    }

    .lobby-hero {
        position: relative;
        isolation: isolate;
        margin-top: 2px;
        gap: 3px;
    }

    .lobby-hero::before {
        content: "";
        position: absolute;
        inset: -14px 8% -10px;
        background: radial-gradient(ellipse 68% 58% at 50% 48%, rgba(56, 189, 248, 0.14) 0%, rgba(167, 139, 250, 0.06) 46%, transparent 76%);
        pointer-events: none;
        z-index: -1;
    }

    .hero-kicker {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        inline-size: min(350px, 96%);
        padding: 1px 2px;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        font-family: var(--font-mono);
        font-size: clamp(0.51rem, 1.85vw, 0.60rem);
        color: #bae6fd;
        letter-spacing: 0.11em;
        white-space: nowrap;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.92);
    }

    .hero-kicker::before,
    .hero-kicker::after {
        content: "";
        flex: 1;
        block-size: 1px;
        min-inline-size: 10px;
        max-inline-size: 46px;
    }

    .hero-kicker::before {
        background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.68));
    }

    .hero-kicker::after {
        background: linear-gradient(90deg, rgba(103, 232, 249, 0.68), transparent);
    }

    @keyframes titleAuroraFlow {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    .hero-kicker {
        font-family: var(--font-dot);
        font-size: clamp(0.56rem, 2.05vw, 0.66rem);
        font-weight: 700;
        color: #7dd3fc;
        letter-spacing: 0.16em;
        white-space: nowrap;
        text-shadow: 0 0 12px rgba(0, 242, 254, 0.55), 0 1px 10px rgba(0, 0, 0, 0.92);
    }

    .title-holo-wrap {
        position: relative;
        display: inline-grid;
        place-items: center;
        isolation: isolate;
    }

    .game-title-wire {
        grid-area: 1 / 1;
        font-family: var(--font-cyber);
        font-size: clamp(1.38rem, 6.25vw, 2.02rem);
        font-weight: 900;
        letter-spacing: 0.10em;
        line-height: 1.06;
        padding-inline: 8px;
        white-space: nowrap;
        color: transparent;
        -webkit-text-stroke: 1px rgba(0, 242, 254, 0.42);
        transform: translate(2.5px, 2.5px) skewX(-8deg);
        pointer-events: none;
        user-select: none;
        filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.42));
    }

    .lobby-hero .game-title,
    .game-title {
        grid-area: 1 / 1;
        position: relative;
        z-index: 1;
        display: inline-block;
        font-family: var(--font-cyber);
        font-size: clamp(1.38rem, 6.25vw, 2.02rem);
        font-weight: 900;
        letter-spacing: 0.10em;
        line-height: 1.06;
        transform: skewX(-8deg);
        padding-inline: 8px;
        white-space: nowrap;
        background-image: linear-gradient(
            118deg var(--in-oklch),
            #ffffff 0%,
            #e0f9ff 20%,
            #67e8f9 40%,
            #ffffff 55%,
            #a78bfa 76%,
            #38bdf8 90%,
            #ffffff 100%
        );
        background-size: 220% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.55px rgba(224, 249, 255, 0.68);
        animation: titleAuroraFlow 6.5s ease-in-out infinite;
        filter:
            drop-shadow(-1.3px 0 0 rgba(0, 242, 254, 0.88))
            drop-shadow(1.3px 0 0 rgba(255, 42, 133, 0.58))
            drop-shadow(0 0 16px rgba(0, 242, 254, 0.72))
            drop-shadow(0 0 34px rgba(167, 139, 250, 0.44))
            drop-shadow(0 3px 10px rgba(0, 0, 0, 0.92));
    }

    .lobby-hero .subtitle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        inline-size: min(334px, 94%);
        font-family: var(--font-art);
        font-size: clamp(0.72rem, 2.7vw, 0.85rem);
        font-weight: 800;
        letter-spacing: 0.24em;
        font-feature-settings: "palt" 1;
        transform: skewX(-6deg);
        padding-inline: 4px;
        background-image: linear-gradient(90deg var(--in-oklch), #cffafe 0%, #ffffff 36%, #67e8f9 68%, #e0f2fe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.3px rgba(224, 249, 255, 0.45);
        filter:
            drop-shadow(-0.9px 0 0 rgba(0, 242, 254, 0.80))
            drop-shadow(0.9px 0 0 rgba(167, 139, 250, 0.58))
            drop-shadow(0 2px 12px rgba(0, 0, 0, 0.96))
            drop-shadow(0 0 22px rgba(56, 189, 248, 0.72));
    }

    .lobby-hero .subtitle::before,
    .lobby-hero .subtitle::after {
        content: "";
        flex: 1;
        block-size: 1px;
        max-inline-size: 36px;
    }

    .lobby-hero .subtitle::before {
        background: linear-gradient(90deg, transparent, rgba(224, 242, 254, 0.52));
    }

    .lobby-hero .subtitle::after {
        background: linear-gradient(90deg, rgba(224, 242, 254, 0.52), transparent);
    }

    .lobby-hero {
        position: relative;
        isolation: isolate;
        --hero-px: 50%;
        --hero-py: 45%;
        --hero-glow: 0;
    }

    .lobby-hero::before {
        content: "";
        position: absolute;
        inset: -12px 0;
        border-radius: 28px;
        background: radial-gradient(
            180px circle at var(--hero-px) var(--hero-py),
            color-mix(in oklch, #67e8f9 18%, transparent),
            color-mix(in oklch, #a78bfa 7%, transparent) 48%,
            transparent 74%
        );
        opacity: var(--hero-glow);
        pointer-events: none;
        z-index: -1;
        transition: opacity 0.35s ease;
    }

    .lobby-topbar .pilot-chip,
    .lobby-topbar .credit-pill,
    .lobby-topbar .hud-btn {
        background: linear-gradient(165deg var(--in-oklab), rgba(5, 14, 34, 0.32), rgba(2, 7, 20, 0.46));
        border: 1px solid color-mix(in oklch, #38bdf8 46%, transparent);
        border-top-color: color-mix(in oklch, #a5f3fc 70%, #ffffff);
        border-radius: 10px;
        min-block-size: 36px;
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.28),
            0 0 16px color-mix(in oklch, #00f2fe 14%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.28);
        backdrop-filter: blur(8px) saturate(1.4);
    }

    .lobby-topbar .hud-btn {
        min-inline-size: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .lobby-topbar .credit-pill {
        border-color: color-mix(in oklch, #facc15 54%, transparent);
        border-top-color: color-mix(in oklch, #fef08a 76%, #ffffff);
        padding: 4px 9px;
    }

    .pilot-chip,
    .credit-pill,
    .hud-btn {
        background: linear-gradient(165deg var(--in-oklab), rgba(5, 14, 34, 0.28), rgba(2, 7, 20, 0.42));
        border: 1px solid color-mix(in oklch, #38bdf8 46%, transparent);
        border-top-color: color-mix(in oklch, #a5f3fc 70%, #ffffff);
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.28),
            0 0 16px color-mix(in oklch, #00f2fe 14%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.28);
        backdrop-filter: blur(8px) saturate(1.4);
    }

    .active-unit-pill {
        margin-top: 2px;
        padding: 3px 12px;
        border-radius: 999px;
        background: linear-gradient(90deg var(--in-oklab), rgba(4, 12, 30, 0.14), rgba(8, 22, 52, 0.34), rgba(4, 12, 30, 0.14));
        border: 1px solid color-mix(in oklch, #67e8f9 28%, transparent);
        border-top-color: color-mix(in oklch, #a5f3fc 48%, transparent);
        box-shadow:
            0 4px 18px rgba(0, 0, 0, 0.26),
            inset 0 1px 0 rgba(224, 242, 254, 0.18);
        backdrop-filter: blur(6px) saturate(1.3);
        font-size: clamp(0.60rem, 2.35vw, 0.67rem);
        color: #e0f2fe;
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.92);
    }

    .lobby-deck {
        position: relative;
        isolation: isolate;
        border-radius: 16px;
        background:
            radial-gradient(ellipse 85% 45% at 50% 0%, rgba(56, 189, 248, 0.10), transparent 70%),
            linear-gradient(172deg var(--in-oklab), rgba(4, 11, 28, 0.56) 0%, rgba(2, 5, 16, 0.78) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 42%, transparent);
        border-top-color: color-mix(in oklch, #e0f2fe 72%, #38bdf8);
        box-shadow:
            0 12px 38px rgba(0, 2, 12, 0.56),
            0 0 32px color-mix(in oklch, #00f2fe 14%, transparent),
            inset 0 1px 0 rgba(224, 242, 254, 0.38);
        backdrop-filter: blur(16px) saturate(1.48);
    }

    .lobby-tabs {
        background: linear-gradient(180deg, rgba(6, 16, 40, 0.42), rgba(3, 9, 24, 0.24));
        border-bottom: 1px solid color-mix(in oklch, #38bdf8 26%, transparent);
    }

    .hangar-card,
    .navigator-card,
    .mission-item,
    .mode-option,
    .stage-nav-btn,
    .manual-item,
    .tac-chip,
    .next-mission-banner,
    .nav-hero-stage,
    .nav-aivis-bar {
        background: linear-gradient(168deg var(--in-oklab), rgba(6, 16, 38, 0.58), rgba(3, 9, 24, 0.72));
        border: 1px solid color-mix(in oklch, #7dd3fc 30%, transparent);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.30),
            inset 0 1px 0 rgba(224, 242, 254, 0.16);
        backdrop-filter: none;
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.92);
    }

    .campaign-stage-card {
        isolation: isolate;
        background: linear-gradient(168deg var(--in-oklab), rgba(7, 18, 44, 0.46), rgba(3, 9, 24, 0.62));
        border: 1px solid color-mix(in oklch, #38bdf8 20%, transparent);
        border-inline-start: 2.5px solid color-mix(in oklch, #67e8f9 86%, transparent);
        border-radius: 12px;
    }

    #startBtn.cyber-launch-btn {
        border-radius: 14px;
        background:
            radial-gradient(ellipse 75% 65% at 50% 0%, rgba(103, 232, 249, 0.28), transparent 72%),
            linear-gradient(130deg var(--in-oklch), #0c4a6e 0%, #0369a1 42%, #1d4ed8 82%, #312e81 100%);
        border: 1px solid color-mix(in oklch, #67e8f9 76%, #ffffff);
        box-shadow:
            0 10px 30px rgba(0, 180, 255, 0.30),
            0 0 28px color-mix(in oklch, #00f2fe 24%, transparent),
            inset 0 1.5px 0 rgba(255, 255, 255, 0.58),
            inset 0 -2px 0 rgba(2, 6, 23, 0.48);
    }

    @keyframes auroraHeroTitleFlow {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }

    @keyframes openingStageRise {
        from {
            opacity: 0;
            translate: 0 10px;
        }
        to {
            opacity: 1;
            translate: 0 0;
        }
    }

    @media (prefers-reduced-motion: no-preference) {
        .lobby-hero .game-title {
            animation: auroraHeroTitleFlow 11s ease-in-out infinite, openingStageRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s backwards;
        }
        .lobby-topbar {
            animation: openingStageRise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.02s backwards;
        }
        .hero-kicker {
            animation: openingStageRise 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.05s backwards;
        }
        .lobby-hero .subtitle {
            animation: openingStageRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.14s backwards;
        }
        .active-unit-pill {
            animation: openingStageRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.20s backwards;
        }
        .lobby-deck {
            animation: openingStageRise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.24s backwards;
        }
        .lobby-launch-bar {
            animation: openingStageRise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.30s backwards;
        }
    }

    .stage-dot {
        background: linear-gradient(165deg var(--in-oklab), rgba(6, 18, 44, 0.24), rgba(3, 9, 24, 0.34));
        border: 1px solid color-mix(in oklch, #7dd3fc 32%, transparent);
    }

    .stage-dot.cleared {
        background: linear-gradient(165deg var(--in-oklab), rgba(16, 185, 129, 0.42), rgba(6, 95, 70, 0.48));
        border-color: color-mix(in oklch, #34d399 78%, #ffffff);
        box-shadow: 0 0 8px color-mix(in oklch, #10b981 32%, transparent);
    }

    .stage-dot.boss:not(.cleared):not(.active) {
        border-color: color-mix(in oklch, #f472b6 58%, transparent);
        background: linear-gradient(165deg var(--in-oklab), rgba(88, 28, 72, 0.36), rgba(36, 10, 32, 0.42));
    }

    .stage-dot.active {
        background: linear-gradient(165deg var(--in-oklab), color-mix(in oklch, #00f2fe 46%, transparent), color-mix(in oklch, #38bdf8 34%, transparent));
        border-color: color-mix(in oklch, #a5f3fc 90%, #ffffff);
        box-shadow: 0 0 12px color-mix(in oklch, #38bdf8 56%, transparent);
    }

    .lobby-deck.is-compact .stage-dot.cleared:not(.active) {
        background: linear-gradient(90deg, #10b981, #34d399);
        border-color: #6ee7b7;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
    }

    .hangar-card.equipped,
    .navigator-card.equipped,
    .mode-option.active,
    .mode-option.campaign-opt.active {
        background:
            radial-gradient(circle at 100% 0%, color-mix(in oklch, #00f2fe 24%, transparent), transparent 62%),
            linear-gradient(165deg var(--in-oklab), rgba(6, 28, 60, 0.22), rgba(3, 12, 30, 0.30));
        border-color: color-mix(in oklch, #38bdf8 86%, #ffffff);
        border-top-color: color-mix(in oklch, #a5f3fc 90%, #ffffff);
        border-left-color: color-mix(in oklch, #e879f9 55%, #38bdf8);
        box-shadow:
            0 6px 22px rgba(0, 4, 18, 0.26),
            0 0 24px color-mix(in oklch, #00f2fe 30%, transparent),
            inset 0 0 20px rgba(0, 242, 254, 0.20),
            inset 0 1px 0 rgba(255, 255, 255, 0.40);
    }

    .mode-option.overdrive-opt.active {
        background:
            radial-gradient(circle at 100% 0%, color-mix(in oklch, #facc15 24%, transparent), transparent 62%),
            linear-gradient(165deg var(--in-oklab), rgba(42, 28, 6, 0.24), rgba(20, 12, 4, 0.32));
        border-color: color-mix(in oklch, #facc15 86%, #ffffff);
    }

    #gameOverModal,
    #gameOverModal[data-finale-tier="legend"],
    #gameOverModal[data-finale-tier="elite"],
    #gameOverModal[data-finale-tier="standard"] {
        backdrop-filter: blur(5px) saturate(1.45);
        background: radial-gradient(circle at 50% 24%, rgba(4, 14, 36, 0.52) 0%, rgba(2, 8, 22, 0.74) 55%, rgba(1, 4, 14, 0.90) 100%);
    }

    #gameOverModal .result-card.cyber-debrief-card {
        isolation: isolate;
        border-radius: 16px;
        overflow-x: hidden;
        background-image:
            linear-gradient(115deg, rgba(103, 232, 249, 0.05) 0%, transparent 46%, rgba(240, 171, 252, 0.05) 100%),
            radial-gradient(circle at 88% 8%, color-mix(in oklch, #38bdf8 20%, transparent), transparent 46%),
            radial-gradient(circle at 12% 92%, color-mix(in oklch, #ec4899 16%, transparent), transparent 48%),
            linear-gradient(165deg var(--in-oklab), rgba(5, 14, 36, 0.84) 0%, rgba(2, 7, 20, 0.92) 100%);
        border: 1px solid color-mix(in oklch, #38bdf8 62%, transparent);
        border-top-color: color-mix(in oklch, #a5f3fc 90%, #ffffff);
        border-left-color: color-mix(in oklch, #e879f9 62%, #38bdf8);
        box-shadow:
            0 16px 44px rgba(0, 2, 14, 0.62),
            0 0 34px color-mix(in oklch, #00f2fe 22%, transparent),
            inset 0 0 28px rgba(0, 242, 254, 0.14),
            inset 0 1px 0 rgba(224, 242, 254, 0.45);
        backdrop-filter: blur(12px) saturate(1.55) contrast(1.06);
    }

    @supports (corner-shape: squircle) {
        #gameOverModal .result-card.cyber-debrief-card {
            corner-shape: squircle;
        }
    }

    #gameOverModal .ai-comment-text {
        text-wrap: pretty;
        line-height: 1.48;
    }

    #gameOverModal :is(.rank-showcase, .score-readout-panel, .stat-box, .ai-debrief-box) {
        background: linear-gradient(155deg var(--in-oklab), rgba(4, 12, 30, 0.78), rgba(2, 7, 18, 0.88));
        border: 1px solid color-mix(in oklch, #38bdf8 36%, transparent);
        border-top-color: color-mix(in oklch, #67e8f9 68%, transparent);
        border-left: 2px solid color-mix(in oklch, #00f2fe 65%, transparent);
        box-shadow:
            0 4px 14px rgba(0, 0, 0, 0.34),
            inset 0 0 14px rgba(0, 242, 254, 0.10),
            inset 0 1px 0 rgba(224, 242, 254, 0.26);
        backdrop-filter: none;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
    }

    #gameOverModal .final-score-num {
        filter:
            drop-shadow(0 0 10px rgba(0, 242, 254, 0.68))
            drop-shadow(0 0 24px rgba(232, 121, 249, 0.44));
    }

    /* ===== v99.0 次世代2126年サイバーコックピット幾何美学 ===== */
    .lobby-hero {
        position: relative;
    }

    .hero-holo-reticle {
        position: absolute;
        left: 50%;
        top: 50%;
        inline-size: 236px;
        block-size: 236px;
        translate: -50% -52%;
        border-radius: 50%;
        border: 1px dashed rgba(56, 189, 248, 0.24);
        box-shadow:
            0 0 28px rgba(0, 242, 254, 0.08),
            inset 0 0 22px rgba(56, 189, 248, 0.06);
        background: conic-gradient(
            from 0deg,
            transparent 0deg 65deg,
            rgba(103, 232, 249, 0.20) 72deg 88deg,
            transparent 94deg 245deg,
            rgba(244, 114, 182, 0.16) 252deg 268deg,
            transparent 274deg 360deg
        );
        -webkit-mask-image: radial-gradient(circle, transparent 62%, #000 63% 71%, transparent 72%);
        mask-image: radial-gradient(circle, transparent 62%, #000 63% 71%, transparent 72%);
        opacity: 0.72;
        pointer-events: none;
        z-index: -1;
    }

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

    @media (prefers-reduced-motion: no-preference) {
        .hero-holo-reticle {
            animation: heroReticleSpin 28s linear infinite;
        }
    }

    /* 統一精密ガラスベゼル（角欠け・非対称角を廃した全周一体フレーム） */
    .hud-header,
    .ai-subtitle-bar,
    .campaign-stage-card {
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.36);
        border-top-color: rgba(165, 243, 252, 0.62);
        background:
            repeating-linear-gradient(135deg, rgba(103, 232, 249, 0.022) 0 1px, transparent 1px 8px),
            linear-gradient(174deg var(--in-oklab), rgba(6, 16, 38, 0.78), rgba(2, 6, 18, 0.90));
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.16), 0 4px 16px rgba(0, 0, 0, 0.30);
    }

    .status-pill,
    .gauge-section,
    .mode-option,
    .pilot-chip,
    .credit-pill,
    .hud-btn {
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.38);
        border-top-color: rgba(165, 243, 252, 0.64);
        background: linear-gradient(175deg var(--in-oklab), rgba(6, 16, 40, 0.72), rgba(2, 7, 20, 0.86));
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.26);
    }

    .credit-pill {
        border-color: rgba(250, 204, 21, 0.50);
        border-top-color: rgba(254, 240, 138, 0.74);
    }

    .status-pill.active {
        border-color: rgba(52, 211, 153, 0.58);
        border-top-color: rgba(110, 231, 183, 0.82);
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 255, 157, 0.16), rgba(4, 18, 34, 0.72));
    }

    .status-pill.cyan {
        border-color: rgba(34, 211, 238, 0.58);
        border-top-color: rgba(103, 232, 249, 0.82);
        background: linear-gradient(90deg var(--in-oklab), rgba(0, 242, 254, 0.16), rgba(4, 16, 38, 0.72));
    }

    .status-pill.magenta {
        border-color: rgba(251, 113, 133, 0.60);
        border-top-color: rgba(253, 164, 175, 0.84);
        background: linear-gradient(90deg var(--in-oklab), rgba(255, 42, 133, 0.22), rgba(24, 8, 28, 0.76));
    }

    .action-btn,
    .action-btn.orbit-btn {
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.44);
        border-top-color: rgba(165, 243, 252, 0.74);
        background:
            repeating-linear-gradient(135deg, rgba(103, 232, 249, 0.026) 0 1px, transparent 1px 7px),
            linear-gradient(175deg var(--in-oklab), rgba(8, 22, 50, 0.74) 0%, rgba(2, 8, 22, 0.90) 100%);
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.34);
    }

    .action-btn.orbit-btn {
        border-color: rgba(56, 189, 248, 0.58);
        border-top-color: rgba(165, 243, 252, 0.86);
        background:
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(103, 232, 249, 0.24), transparent 72%),
            linear-gradient(175deg var(--in-oklab), rgba(0, 242, 254, 0.20) 0%, rgba(5, 20, 48, 0.84) 55%, rgba(2, 9, 24, 0.92) 100%);
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.26), 0 6px 18px rgba(0, 180, 255, 0.16);
    }

    .action-btn.polarity-btn.magenta {
        border-color: rgba(251, 113, 133, 0.58);
        border-top-color: rgba(253, 164, 175, 0.82);
        background: linear-gradient(175deg var(--in-oklab), rgba(255, 42, 133, 0.24) 0%, rgba(28, 8, 26, 0.84) 100%);
        box-shadow: inset 0 1px 0 rgba(255, 228, 235, 0.22), 0 4px 16px rgba(255, 42, 133, 0.18);
    }

    .action-btn.burst-btn.ready {
        border-color: rgba(251, 191, 36, 0.72);
        border-top-color: rgba(254, 240, 138, 0.92);
        background: linear-gradient(175deg var(--in-oklab), rgba(250, 204, 21, 0.26) 0%, rgba(120, 40, 8, 0.74) 100%);
        box-shadow: inset 0 1px 0 rgba(254, 249, 195, 0.30), 0 0 18px rgba(250, 204, 21, 0.34);
    }

    .lobby-deck {
        border-radius: var(--radius-shell);
    }

    #startBtn.cyber-launch-btn {
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.68);
        border-top-color: rgba(224, 249, 255, 0.90);
        background:
            radial-gradient(ellipse 75% 65% at 50% 0%, rgba(103, 232, 249, 0.32), transparent 72%),
            linear-gradient(130deg var(--in-oklch), #0c4a6e 0%, #0369a1 42%, #1d4ed8 82%, #312e81 100%);
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.38), 0 8px 22px rgba(0, 180, 255, 0.32);
        letter-spacing: 0.14em;
    }

    /* ===== ARバイザーレール（プレイ領域中央） ===== */
    .hud-visor-rail {
        position: absolute;
        top: 172px;
        bottom: 204px;
        inline-size: 7px;
        pointer-events: none;
        z-index: 6;
        opacity: 0.42;
        background-image:
            repeating-linear-gradient(
                to bottom,
                rgba(103, 232, 249, 0.68) 0 1px,
                transparent 1px 10px
            ),
            repeating-linear-gradient(
                to bottom,
                rgba(103, 232, 249, 0.28) 0 1px,
                transparent 1px 5px
            );
        background-repeat: no-repeat;
    }

    .hud-visor-rail.rail-left {
        left: 3px;
        border-left: 1px solid rgba(56, 189, 248, 0.34);
        background-size: 6px 100%, 3px 100%;
        background-position: left top, left top;
    }

    .hud-visor-rail.rail-right {
        right: 3px;
        border-right: 1px solid rgba(56, 189, 248, 0.34);
        background-size: 6px 100%, 3px 100%;
        background-position: right top, right top;
    }

    #gameContainer[data-polarity="MAGENTA"] .hud-visor-rail {
        border-color: rgba(251, 113, 133, 0.40);
        opacity: 0.50;
    }

    /* ロビー・ウィングデバイダー & タイトルホロ輝き */
    .lobby-hero .hero-kicker {
        gap: 8px;
    }

    .lobby-hero .hero-kicker::before,
    .lobby-hero .hero-kicker::after {
        content: "";
        display: inline-block;
        inline-size: clamp(14px, 4.2vw, 28px);
        block-size: 1px;
        background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.78));
    }

    .lobby-hero .hero-kicker::after {
        background: linear-gradient(90deg, rgba(103, 232, 249, 0.78), transparent);
    }

    /* コンボバッジ：均一角丸・テレメトリーアンバータグ */
    .combo-badge {
        padding: 1px 6px;
        border-radius: var(--radius-chip);
        background: linear-gradient(90deg, rgba(250, 204, 21, 0.22), rgba(250, 204, 21, 0.06));
        border: 1px solid rgba(250, 204, 21, 0.46);
    }

    .combo-badge:empty {
        display: none;
    }

    /* AI通信ウェーブバー：有機マイクロイコライザー */
    .ai-spectrum-viz {
        opacity: 0.85;
    }

    .ai-spectrum-viz .spec-bar {
        block-size: 5px;
    }

    @media (prefers-reduced-motion: no-preference) {
        .ai-spectrum-viz .spec-bar:nth-child(1) { animation: specPulse 1.15s ease-in-out 0.00s infinite alternate; }
        .ai-spectrum-viz .spec-bar:nth-child(2) { animation: specPulse 0.92s ease-in-out 0.18s infinite alternate; }
        .ai-spectrum-viz .spec-bar:nth-child(3) { animation: specPulse 1.24s ease-in-out 0.36s infinite alternate; }
        .ai-spectrum-viz .spec-bar:nth-child(4) { animation: specPulse 1.05s ease-in-out 0.54s infinite alternate; }
    }

    @keyframes specPulse {
        0% { block-size: 4px; opacity: 0.52; }
        100% { block-size: 12px; opacity: 1; }
    }

    /* 全ロビーカード（MODE / HANGAR / NAVI / MISSION / GUIDE）統一角丸グラス */
    .mode-option,
    .hangar-card,
    .navigator-card,
    .mission-item,
    .manual-item {
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.32);
        border-top-color: rgba(165, 243, 252, 0.50);
        background:
            radial-gradient(circle, rgba(125, 211, 252, 0.055) 1px, transparent 1px) 0 0 / 16px 16px,
            linear-gradient(168deg var(--in-oklab), rgba(6, 16, 38, 0.68), rgba(3, 9, 24, 0.82));
        box-shadow: inset 0 1px 0 rgba(224, 249, 255, 0.12);
    }

    .mode-option.active,
    .mode-option.campaign-opt.active,
    .hangar-card.equipped,
    .navigator-card.equipped {
        border-color: rgba(103, 232, 249, 0.68);
        border-top-color: rgba(224, 249, 255, 0.86);
        background:
            radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in oklch, #00f2fe 20%, transparent), transparent 72%),
            radial-gradient(circle, rgba(103, 232, 249, 0.09) 1px, transparent 1px) 0 0 / 16px 16px,
            linear-gradient(165deg var(--in-oklab), rgba(6, 28, 60, 0.64), rgba(3, 12, 30, 0.80));
        box-shadow: 0 0 18px rgba(0, 242, 254, 0.22), inset 0 1px 0 rgba(224, 242, 254, 0.28);
    }

    .mode-option.overdrive-opt.active {
        border-color: rgba(250, 204, 21, 0.72);
        border-top-color: rgba(254, 240, 138, 0.88);
        background:
            radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in oklch, #facc15 20%, transparent), transparent 72%),
            linear-gradient(165deg var(--in-oklab), rgba(42, 28, 6, 0.56), rgba(20, 12, 4, 0.72));
        box-shadow: 0 0 18px rgba(250, 204, 21, 0.20), inset 0 1px 0 rgba(254, 240, 138, 0.26);
    }

    /* スコア先頭ゼロ：クリアな極細シアンフォスファー化 */
    .dim-zero {
        color: rgba(103, 232, 249, 0.24);
    }

    /* OVERDRIVE プラズマ流動シェーン */
    .gauge-fill {
        overflow: hidden;
    }

    /* 残存バッジ・タブ・ダイアログの完全角丸統一 */
    .pilot-rank-badge,
    .phase-badge,
    .mode-badge,
    .status-pill .pill-code {
        border-radius: var(--radius-chip);
    }

    .lobby-tab[aria-selected="true"]::after {
        border-block-end: none;
        block-size: 2.5px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(56, 189, 248, 0.55) 0%, #67e8f9 25%, #ffffff 50%, #67e8f9 75%, rgba(56, 189, 248, 0.55) 100%);
    }

    #gameOverModal .result-card.cyber-debrief-card,
    dialog.cyber-dialog {
        border-radius: var(--radius-shell);
    }

    @media (prefers-reduced-motion: no-preference) {
        .gauge-fill::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.48) 50%, transparent 100%);
            transform: translateX(-100%);
            animation: gaugePlasmaFlow 2.2s linear infinite;
            pointer-events: none;
        }
    }

    @keyframes gaugePlasmaFlow {
        to { transform: translateX(100%); }
    }

    @media (prefers-reduced-motion: reduce) {
        #startOverlay,
        #gameOverModal,
        #gameOverModal .result-card.cyber-debrief-card,
        #gameOverModal .rank-circle.cyber-rank-badge,
        #startBtn.cyber-launch-btn,
        .lobby-tab,
        .mode-option,
        .stage-nav-btn,
        .stage-dot,
        .campaign-log-toggle-btn,
        .hangar-card,
        .navigator-card,
        .hud-btn,
        .action-btn,
        .primary-btn {
            transition: opacity 0.18s ease, border-color 0.16s ease, background-color 0.16s ease;
            transition-timing-function: ease;
            transition-delay: 0s;
            transform: none;
        }
        .lobby-deck::before,
        #startBtn.cyber-launch-btn::after,
        .title-holo-wrap::after,
        .gauge-fill::after,
        .ai-spectrum-viz .spec-bar,
        .hero-holo-reticle,
        .lobby-hero .game-title,
        .game-title,
        .w-orbital,
        .w-surge,
        #gameOverModal .result-title {
            animation: none;
        }
    }

    /* ===== v103.0 WORLD-CLASS 2126 CYBERNETIC COCKPIT & HOLOGRAPHIC PRECISION ===== */
    /* 1. タイトル枠の統一ラウンド・精密ガラス化（文字端欠け防止・完全外周フレーム） */
    .title-holo-wrap {
        position: relative;
        overflow: hidden;
        padding: 14px 20px 13px;
        max-inline-size: calc(100% - 10px);
        box-sizing: border-box;
        border-radius: var(--radius-panel);
        border: 1px solid rgba(56, 189, 248, 0.44);
        border-top-color: rgba(165, 243, 252, 0.72);
        background:
            radial-gradient(circle at 50% 50%, rgba(103, 232, 249, 0.085) 1px, transparent 1px) 0 0 / 16px 16px,
            linear-gradient(168deg var(--in-oklab), rgba(4, 14, 34, 0.56), rgba(2, 8, 20, 0.72));
        box-shadow:
            0 8px 24px rgba(0, 0, 0, 0.44),
            0 0 18px rgba(0, 242, 254, 0.14),
            inset 0 1px 0 rgba(224, 242, 254, 0.24);
    }

    .lobby-hero .game-title,
    .game-title {
        -webkit-text-stroke: 0.4px rgba(240, 253, 255, 0.72);
        filter:
            drop-shadow(-1px 0 0 rgba(0, 242, 254, 0.85))
            drop-shadow(1px 0 0 rgba(255, 42, 133, 0.56))
            drop-shadow(0 0 8px rgba(0, 242, 254, 0.55))
            drop-shadow(0 2px 6px rgba(0, 0, 0, 0.96));
    }

    .lobby-hero .subtitle {
        inline-size: min(350px, 96%);
        font-size: clamp(0.58rem, 2.15vw, 0.76rem);
        letter-spacing: 0.16em;
        white-space: nowrap;
        gap: 8px;
    }

    @media (prefers-reduced-motion: no-preference) {
        .title-holo-wrap::after {
            content: "";
            position: absolute;
            inset-block: -20%;
            inset-inline-start: 0;
            inline-size: 28%;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.24) 48%, rgba(103, 232, 249, 0.34) 55%, transparent 100%);
            transform: translateX(-160%) skewX(-22deg);
            animation: titleHoloGlint 5.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
            pointer-events: none;
            z-index: 2;
        }
    }

    @keyframes titleHoloGlint {
        0%, 62% { transform: translateX(-160%) skewX(-22deg); opacity: 0; }
        68% { opacity: 1; }
        88% { transform: translateX(480%) skewX(-22deg); opacity: 0.85; }
        100% { transform: translateX(480%) skewX(-22deg); opacity: 0; }
    }

    /* 2. アクティブユニット表示バー：統一角丸精密ガラス（四隅欠け・polygon排除） */
    .active-unit-pill {
        position: relative;
        isolation: isolate;
        border: 1px solid rgba(56, 189, 248, 0.42);
        border-top-color: rgba(165, 243, 252, 0.72);
        border-radius: var(--radius-panel);
        background: linear-gradient(90deg var(--in-oklab), rgba(4, 12, 32, 0.54), rgba(10, 28, 64, 0.68), rgba(4, 12, 32, 0.54));
        box-shadow:
            0 0 14px rgba(0, 242, 254, 0.14),
            inset 0 1px 0 rgba(224, 242, 254, 0.22);
        padding: 4px 12px;
    }

    .active-unit-pill::before,
    .active-unit-pill::after {
        display: none;
    }

    .nav-portrait-micro {
        border-radius: var(--radius-chip);
    }

    /* 3. コマンドデッキ・格納庫・ナビカードの統一精密ガラス＆微細グリッド */
    .lobby-deck {
        background:
            radial-gradient(circle, rgba(103, 232, 249, 0.085) 1px, transparent 1px) 0 0 / 22px 22px,
            radial-gradient(ellipse 85% 45% at 50% 0%, rgba(56, 189, 248, 0.11), transparent 70%),
            linear-gradient(172deg var(--in-oklab), rgba(4, 11, 28, 0.60) 0%, rgba(2, 5, 16, 0.82) 100%);
    }

    .hangar-card,
    .navigator-card {
        background-image:
            radial-gradient(circle, rgba(125, 211, 252, 0.07) 1px, transparent 1px),
            linear-gradient(168deg var(--in-oklab), rgba(6, 16, 38, 0.64), rgba(3, 9, 24, 0.80));
        background-position: 0 0, center;
        background-size: 16px 16px, 100% 100%;
        background-repeat: repeat, no-repeat;
        border-radius: var(--radius-panel);
    }

    .hangar-card.equipped,
    .navigator-card.equipped {
        background-image:
            radial-gradient(circle, rgba(103, 232, 249, 0.11) 1px, transparent 1px),
            linear-gradient(168deg var(--in-oklab), rgba(6, 30, 56, 0.78), rgba(4, 14, 34, 0.86));
        box-shadow:
            0 0 18px rgba(0, 242, 254, 0.22),
            inset 0 1px 0 rgba(224, 242, 254, 0.30);
    }

    /* 4. インジケーター・ピル・ボタン角の統一（6px統一角丸） */
    .lobby-deck.is-compact .stage-dot {
        border-radius: 3px;
        transform: none;
    }

    .stage-dot {
        border-radius: 3px;
    }

    .campaign-story-btn,
    .campaign-stage-status,
    .stage-nav-btn,
    .hangar-swatch,
    .hangar-status,
    .ai-speaker-badge {
        border-radius: var(--radius-chip);
    }

    .nav-portrait-mini {
        position: relative;
        border-radius: var(--radius-chip);
    }

    .nav-portrait-mini::after {
        content: "";
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 242, 254, 0.14) 2px 3px);
        pointer-events: none;
    }

    /* 5. 戦闘HUDスコア精細化 ＆ 下部ORBITセレクターの統一角丸カプセル化 */
    .score-panel {
        position: relative;
    }

    .score-value {
        text-shadow:
            -0.9px 0 0 rgba(0, 242, 254, 0.82),
            0.9px 0 0 rgba(255, 42, 133, 0.52),
            0 0 8px rgba(103, 232, 249, 0.62),
            0 2px 4px rgba(0, 0, 0, 0.98);
    }

    #gameContainer[data-polarity="MAGENTA"] .score-value {
        text-shadow:
            -0.9px 0 0 rgba(255, 42, 133, 0.85),
            0.9px 0 0 rgba(56, 189, 248, 0.50),
            0 0 8px rgba(251, 113, 133, 0.66),
            0 2px 4px rgba(0, 0, 0, 0.98);
    }

    .orbit-ring-pills {
        gap: 4px;
    }

    .orbit-ring-pills span {
        min-inline-size: 33px;
        border-radius: var(--radius-chip);
        clip-path: none;
        border: 1px solid rgba(56, 189, 248, 0.42);
        border-top-color: rgba(165, 243, 252, 0.64);
        background: rgba(10, 22, 46, 0.88);
        color: rgba(203, 235, 255, 0.86);
    }

    .orbit-btn[data-orbit="0"] .orbit-ring-pills span[data-idx="0"],
    .orbit-btn[data-orbit="1"] .orbit-ring-pills span[data-idx="1"],
    .orbit-btn[data-orbit="2"] .orbit-ring-pills span[data-idx="2"] {
        color: #031526;
        background: #67e8f9;
        border-color: #ffffff;
        box-shadow: 0 0 14px rgba(103, 232, 249, 0.92);
    }

    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="0"] .orbit-ring-pills span[data-idx="0"],
    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="1"] .orbit-ring-pills span[data-idx="1"],
    #gameContainer[data-polarity="MAGENTA"] .orbit-btn[data-orbit="2"] .orbit-ring-pills span[data-idx="2"] {
        color: #2c0416;
        background: #fda4af;
        border-color: #fff1f2;
        box-shadow: 0 0 14px rgba(251, 113, 133, 0.92);
    }

    /* ===== v104.0 PROLOGUE & FINALE — 世界最高峰オープニング＆エンディング近未来タイポグラフィ ===== */
    /* A. オープニング先頭キッカーの光学ダイヤノード化 */
    .hero-kicker .status-pulse-dot {
        border-radius: 1px;
        transform: rotate(45deg);
        box-shadow: 0 0 8px #34d399;
    }

    /* B. リザルト／エンディング端末（#gameOverModal）：統一角丸精密ガラスシャーシ＋座標グリッド */
    #gameOverModal .result-card.cyber-debrief-card {
        position: relative;
        isolation: isolate;
        border: 1px solid rgba(56, 189, 248, 0.48);
        border-top-color: rgba(165, 243, 252, 0.76);
        border-radius: var(--radius-shell);
        background:
            radial-gradient(circle, rgba(103, 232, 249, 0.08) 1px, transparent 1px) 0 0 / 20px 20px,
            radial-gradient(ellipse 85% 45% at 50% 0%, rgba(56, 189, 248, 0.14), transparent 72%),
            linear-gradient(172deg var(--in-oklab), rgba(4, 12, 32, 0.88) 0%, rgba(2, 6, 18, 0.95) 100%);
        box-shadow:
            0 22px 54px rgba(0, 0, 0, 0.76),
            0 0 26px rgba(0, 242, 254, 0.16),
            inset 0 1px 0 rgba(224, 242, 254, 0.24);
    }

    #gameOverModal .result-card.cyber-debrief-card::before,
    #gameOverModal .result-card.cyber-debrief-card::after {
        display: none;
    }

    #gameOverModal[data-finale-tier="legend"] .result-card.cyber-debrief-card {
        border-color: rgba(250, 204, 21, 0.62);
        border-top-color: rgba(254, 240, 138, 0.88);
        box-shadow:
            0 22px 54px rgba(0, 0, 0, 0.78),
            0 0 30px rgba(250, 204, 21, 0.24),
            inset 0 1px 0 rgba(254, 249, 195, 0.28);
    }

    #gameOverModal :is(.rank-showcase, .score-readout-panel, .stat-box, .ai-debrief-box) {
        border-radius: var(--radius-panel);
        background-image: linear-gradient(155deg var(--in-oklab), rgba(4, 12, 30, 0.82), rgba(2, 7, 18, 0.92));
        background-position: center;
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }

    /* C. 「ラストの文字」主見出し（MISSION CLEAR / SIGNAL LOST / TRUE ENDING）：メタリッククローム×ホログラム */
    #gameOverModal .result-title {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        white-space: nowrap;
        font-family: var(--font-cyber);
        font-size: clamp(0.76rem, 3.45vw, 1.04rem);
        font-weight: 900;
        letter-spacing: 0.06em;
        line-height: 1.15;
        transform: skewX(-6deg);
        background-image: linear-gradient(115deg var(--in-oklch), #ffffff 10%, #cffafe 42%, #38bdf8 72%, #e0f2fe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.35px rgba(240, 253, 255, 0.65);
        filter:
            drop-shadow(-1px 0 0 rgba(0, 242, 254, 0.78))
            drop-shadow(1px 0 0 rgba(255, 42, 133, 0.48))
            drop-shadow(0 0 8px rgba(56, 189, 248, 0.52))
            drop-shadow(0 2px 5px rgba(0, 0, 0, 0.96));
    }

    #gameOverModal .result-title::before,
    #gameOverModal .result-title::after {
        content: "";
        flex: 1;
        block-size: 1.2px;
        min-inline-size: 12px;
        max-inline-size: 28px;
        background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.78));
    }

    #gameOverModal .result-title::after {
        background: linear-gradient(90deg, rgba(103, 232, 249, 0.78), transparent);
    }

    #gameOverModal[data-finale-tier="legend"] .result-title {
        background-image: linear-gradient(115deg var(--in-oklch), #ffffff 8%, #fef08a 42%, #f59e0b 68%, #67e8f9 100%);
        filter:
            drop-shadow(-1px 0 0 rgba(250, 204, 21, 0.85))
            drop-shadow(1px 0 0 rgba(56, 189, 248, 0.55))
            drop-shadow(0 0 10px rgba(250, 204, 21, 0.58))
            drop-shadow(0 2px 5px rgba(0, 0, 0, 0.96));
    }

    /* D. 最終スコア桁・ランク称号・オクタゴンランクコア */
    #gameOverModal .final-score-num {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        font-family: var(--font-cyber);
        transform: skewX(-5deg);
        background-image: linear-gradient(180deg var(--in-oklch), #ffffff 12%, #a5f3fc 56%, #00f2fe 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-stroke: 0.35px rgba(224, 249, 255, 0.55);
        filter:
            drop-shadow(-1px 0 0 rgba(0, 242, 254, 0.72))
            drop-shadow(1px 0 0 rgba(255, 42, 133, 0.44))
            drop-shadow(0 0 8px rgba(0, 242, 254, 0.56))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.96));
    }

    #gameOverModal[data-finale-tier="legend"] .final-score-num {
        background-image: linear-gradient(180deg var(--in-oklch), #ffffff 10%, #fef08a 52%, #fbbf24 100%);
    }

    #gameOverModal .rank-circle.cyber-rank-badge {
        border-radius: var(--radius-badge);
        clip-path: none;
        font-family: var(--font-cyber);
        letter-spacing: -0.02em;
    }

    #gameOverModal .rank-name {
        font-family: var(--font-cyber);
        font-size: clamp(0.72rem, 3.0vw, 0.88rem);
        letter-spacing: 0.06em;
        color: #f0fdff;
        text-shadow: 0 0 10px rgba(0, 242, 254, 0.45);
    }

    #gameOverModal .debrief-status-dot,
    #gameOverModal .earned-cr-badge,
    #gameOverModal .new-best-badge {
        border-radius: var(--radius-chip);
        letter-spacing: 0.06em;
    }

    #gameOverModal .rank-progress-bar,
    #gameOverModal .rank-bar-fill {
        border-radius: 999px;
    }

    /* E. リザルト行動ボタン（統一角丸精密ガラス、:focus-visible非クリップ） */
    #retryBtn,
    #lobbyBtn {
        position: relative;
        isolation: isolate;
        border: 1px solid rgba(56, 189, 248, 0.48);
        border-top-color: rgba(165, 243, 252, 0.78);
        border-radius: var(--radius-panel);
        font-family: var(--font-cyber);
    }

    #retryBtn {
        background: linear-gradient(130deg var(--in-oklch), #0c4a6e 0%, #0369a1 45%, #1d4ed8 85%, #312e81 100%);
        box-shadow:
            0 6px 20px rgba(3, 105, 161, 0.42),
            inset 0 1px 0 rgba(224, 242, 254, 0.34);
    }

    #lobbyBtn {
        background: linear-gradient(165deg, rgba(10, 22, 48, 0.90), rgba(4, 10, 24, 0.96));
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.42),
            inset 0 1px 0 rgba(224, 242, 254, 0.18);
    }

    #retryBtn::before,
    #retryBtn::after,
    #lobbyBtn::before,
    #lobbyBtn::after {
        display: none;
    }

    #gameOverModal[data-finale-tier="legend"] #retryBtn {
        border-color: rgba(250, 204, 21, 0.65);
        border-top-color: rgba(254, 240, 138, 0.90);
        box-shadow:
            0 6px 24px rgba(245, 158, 11, 0.36),
            inset 0 1px 0 rgba(254, 249, 195, 0.42);
    }

    /* ===== v105.0 CHRONO-HOLO BESPOKE TYPOGRAPHY（世界最高水準・最初とラストの文字完全造形） ===== */

    /* 1. ヒーロー周囲の極小CADテレメトリ刻印（SYS // 2126 & V107 // SYNC） */
    .title-holo-wrap {
        position: relative;
        padding: 15px 18px 14px;
    }

    .hero-cad-code {
        position: absolute;
        font-family: var(--font-stencil);
        font-size: 0.46rem;
        font-weight: 700;
        letter-spacing: 0.18em;
        line-height: 1;
        color: rgba(165, 243, 252, 0.84);
        text-shadow: 0 0 8px rgba(0, 242, 254, 0.55), 0 1px 2px rgba(0, 0, 0, 0.95);
        pointer-events: none;
        user-select: none;
        white-space: nowrap;
        z-index: 2;
    }

    .hero-cad-l {
        top: 5px;
        left: 12px;
    }

    .hero-cad-r {
        bottom: 5px;
        right: 12px;
        color: rgba(216, 180, 254, 0.86);
        text-shadow: 0 0 8px rgba(167, 139, 250, 0.58), 0 1px 2px rgba(0, 0, 0, 0.95);
    }

    /* 2. 「最初の文字」ORBITAL / SURGE 二相レーザー走査線テキストクリップ（端欠け防止スケーリング） */
    .game-title-wire {
        font-size: clamp(1.12rem, 5.05vw, 1.84rem);
        letter-spacing: 0.08em;
        padding-inline: 6px;
        transform: translate(2px, 2px) skewX(-4deg);
    }

    .lobby-hero .game-title,
    .game-title {
        display: inline-flex;
        align-items: baseline;
        justify-content: center;
        gap: 0.22em;
        font-size: clamp(1.12rem, 5.05vw, 1.84rem);
        letter-spacing: 0.08em;
        padding-inline: 6px;
        transform: skewX(-4deg);
        background: none;
        background-image: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        color: #f8fafc;
        -webkit-text-stroke: 0;
        animation: none;
        filter: none;
    }

    .game-title .w-orbital,
    .game-title .w-surge {
        display: inline-block;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .game-title .w-orbital {
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.16) 0 1px,
                rgba(3, 12, 28, 0.20) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(
                172deg var(--in-oklch),
                #ffffff 0%,
                #f0f9ff 34%,
                #bae6fd 58%,
                #7dd3fc 84%,
                #ffffff 100%
            );
        background-size: 100% 3px, 100% 100%;
        -webkit-text-stroke: 0.55px rgba(224, 249, 255, 0.76);
        filter:
            drop-shadow(-1.1px 0 0 rgba(0, 242, 254, 0.85))
            drop-shadow(1.1px 0 0 rgba(56, 189, 248, 0.55))
            drop-shadow(0 0 14px rgba(0, 242, 254, 0.58))
            drop-shadow(0 3px 10px rgba(0, 0, 0, 0.95));
    }

    .game-title .w-surge {
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.14) 0 1px,
                rgba(6, 18, 42, 0.22) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(
                118deg var(--in-oklch),
                #e0f9ff 0%,
                #00f2fe 24%,
                #ffffff 48%,
                #c084fc 74%,
                #38bdf8 92%,
                #ffffff 100%
            );
        background-size: 100% 3px, 220% 100%;
        -webkit-text-stroke: 0.55px rgba(165, 243, 252, 0.72);
        animation: titleAuroraFlow 5.6s ease-in-out infinite;
        filter:
            drop-shadow(-1.4px 0 0 rgba(0, 242, 254, 0.92))
            drop-shadow(1.4px 0 0 rgba(255, 42, 133, 0.68))
            drop-shadow(0 0 18px rgba(0, 242, 254, 0.78))
            drop-shadow(0 0 34px rgba(168, 85, 247, 0.50))
            drop-shadow(0 3px 10px rgba(0, 0, 0, 0.95));
    }

    /* 3. Syncopate ワイドSFサブタイトル＆Quantico 航空宇宙計器書体統一 */
    .lobby-hero .subtitle {
        font-family: var(--font-wide);
        font-size: clamp(0.47rem, 1.78vw, 0.58rem);
        font-weight: 700;
        letter-spacing: 0.14em;
        white-space: nowrap;
        inline-size: min(344px, 95%);
        gap: 8px;
    }

    .lobby-hero .hero-kicker {
        font-family: var(--font-stencil);
        letter-spacing: 0.18em;
    }

    .score-value,
    .best-score,
    .gauge-pct-tag,
    #lobbyCredits,
    .pilot-best,
    #gameOverModal .stat-val {
        font-family: var(--font-stencil);
        font-variant-numeric: tabular-nums;
    }

    /* 4. 「ラストの文字」デブリーフ見出し内部レーザー走査線＆ブラケット装着スコア */
    #gameOverModal .debrief-tag {
        font-family: var(--font-wide);
        font-weight: 700;
        letter-spacing: 0.14em;
    }

    #gameOverModal .result-title {
        font-size: clamp(0.72rem, 3.22vw, 0.98rem);
        letter-spacing: 0.055em;
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.18) 0 1px,
                rgba(4, 14, 34, 0.22) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(115deg var(--in-oklch), #ffffff 8%, #cffafe 42%, #38bdf8 72%, #e0f2fe 100%);
        background-size: 100% 3px, 100% 100%;
    }

    #gameOverModal[data-finale-tier="legend"] .result-title {
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.18) 0 1px,
                rgba(30, 18, 4, 0.22) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(115deg var(--in-oklch), #ffffff 8%, #fef08a 42%, #f59e0b 68%, #67e8f9 100%);
        background-size: 100% 3px, 100% 100%;
    }

    #gameOverModal .final-score-num {
        font-family: var(--font-stencil);
        font-variant-numeric: tabular-nums;
        gap: 5px;
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.16) 0 1px,
                rgba(4, 12, 30, 0.20) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(180deg var(--in-oklch), #ffffff 10%, #a5f3fc 56%, #00f2fe 100%);
        background-size: 100% 3px, 100% 100%;
    }

    #gameOverModal .final-score-num::before,
    #gameOverModal .final-score-num::after {
        font-family: var(--font-stencil);
        font-size: 0.72em;
        font-weight: 700;
        color: #67e8f9;
        -webkit-text-stroke: 0;
        text-shadow: 0 0 10px rgba(0, 242, 254, 0.85);
        opacity: 0.82;
        transform: translateY(-0.04em);
    }

    #gameOverModal .final-score-num::before {
        content: "[";
    }

    #gameOverModal .final-score-num::after {
        content: "]";
    }

    #gameOverModal[data-finale-tier="legend"] .final-score-num {
        background-image:
            repeating-linear-gradient(
                0deg,
                rgba(255, 255, 255, 0.18) 0 1px,
                rgba(28, 16, 4, 0.20) 1px 2px,
                transparent 2px 3px
            ),
            linear-gradient(180deg var(--in-oklch), #ffffff 10%, #fef08a 52%, #fbbf24 100%);
        background-size: 100% 3px, 100% 100%;
    }

    #gameOverModal[data-finale-tier="legend"] .final-score-num::before,
    #gameOverModal[data-finale-tier="legend"] .final-score-num::after {
        color: #fef08a;
        text-shadow: 0 0 10px rgba(250, 204, 21, 0.90);
    }

    #gameOverModal .rank-circle.cyber-rank-badge {
        font-family: var(--font-stencil);
        font-weight: 700;
    }

    #startBtn .btn-main-txt span,
    #retryBtn .btn-main-txt span {
        text-shadow: 0 0 12px rgba(0, 242, 254, 0.78), 0 1px 3px rgba(0, 0, 0, 0.94);
    }

    /* Windowsハイコントラスト / Forced Colors Mode完全対応 */
    @media (forced-colors: active) {
        .lobby-screen {
            background: Canvas;
        }
        .hero-holo-reticle,
        .hud-visor-rail,
        .title-holo-wrap::after,
        .nav-portrait-mini::after {
            display: none;
        }
        .hero-cad-code {
            color: CanvasText;
            text-shadow: none;
        }
        .action-btn::before,
        .action-btn::after,
        #startBtn.cyber-launch-btn::before,
        #startBtn.cyber-launch-btn::after,
        #retryBtn::before,
        #retryBtn::after,
        #lobbyBtn::before,
        #lobbyBtn::after,
        .result-card.cyber-debrief-card::before,
        .result-card.cyber-debrief-card::after,
        .pilot-chip::before,
        .pilot-chip::after,
        .credit-pill::before,
        .credit-pill::after,
        .active-unit-pill::before,
        .active-unit-pill::after,
        .hud-btn::before,
        .hud-btn::after,
        .gauge-fill::after,
        .hud-header::before,
        .hud-header::after,
        .ai-subtitle-bar::before,
        .ai-subtitle-bar::after,
        .status-pill::before,
        .status-pill::after,
        .gauge-section::before,
        .gauge-section::after,
        .campaign-stage-card::before,
        .campaign-stage-card::after {
            display: none;
        }
        .gauge-gate-50 {
            background: Highlight;
            box-shadow: none;
        }
        #gameContainer, .hud-header, .ai-subtitle-bar, .status-pill, .action-btn, .lobby-deck, .result-card, dialog.cyber-dialog,
        .pilot-chip, .credit-pill, .active-unit-pill, .hangar-card, .navigator-card, .mission-item, .mode-option, .campaign-stage-card, .stage-nav-btn, .stage-dot, .campaign-perk-pill, .campaign-log-toggle-btn, .manual-item, .stat-box, .gauge-section, .hangar-perk-pill, .orbit-ring-pills span, #retryBtn, #lobbyBtn {
            border: 1px solid CanvasText !important;
            background: Canvas !important;
            background-image: none !important;
            color: CanvasText;
            box-shadow: none !important;
            filter: none !important;
            backdrop-filter: none !important;
            clip-path: none !important;
            transform: none !important;
        }
        .primary-btn, .hud-btn, .mode-option.active, .mode-option.campaign-opt.active, .stage-dot.active, .hangar-card.equipped, .navigator-card.equipped, .toggle-pill.active, .action-btn.burst-btn.ready {
            border: 2px solid Highlight;
            outline: 1px solid Highlight;
        }
        .game-title-wire {
            display: none;
        }
        .game-title, .game-title .w-orbital, .game-title .w-surge, .lobby-hero .subtitle, .campaign-stage-title, .result-title, .final-score-num,
        .orbit-btn .btn-main, .polarity-btn .btn-main, .burst-btn .btn-main {
            background: none;
            background-image: none;
            color: CanvasText;
            -webkit-text-stroke: 0;
            filter: none;
        }
        #gameOverModal .final-score-num::before,
        #gameOverModal .final-score-num::after {
            color: Highlight;
            text-shadow: none;
        }
        .rank-circle.cyber-rank-badge {
            clip-path: none !important;
            filter: none;
        }
    }

    /* 分離型UIコンポーネントのCSS Containment適用（不要な全体再レイアウト抑止） */
    .hud-header,
    .ai-subtitle-bar,
    .boss-hud-bar,
    .status-pill,
    .hangar-card,
    .navigator-card,
    .mission-item,
    .campaign-stage-card {
        contain: layout style;
    }

    /* タブ内リスト領域のレイアウト封じ込め（hidden切替時の再描画欠け防止） */
    .hangar-grid,
    .navigator-list,
    .missions-list,
    .manual-list {
        contain: layout style;
    }
}
