* { box-sizing: border-box; }

:root {
    --cyan: #65faff;
    --orange: #ff7a18;
    --gold: #ffc44d;
    --lavender: #c6a0ff;
    --pink: #ff4fa8;
    --red: #ff3b42;
    --ink: #000306;
    --panel: rgba(0, 7, 11, 0.93);
    --text: #c9e5e8;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ink);
    color: var(--text);
    font-family: "Courier New", monospace;
}

body { overflow-x: hidden; }

.program-entry {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at center, rgba(0, 234, 255, 0.12), transparent 38%),
        rgba(0, 3, 6, 0.96);
    backdrop-filter: blur(6px);
    transition: opacity 380ms ease, visibility 380ms ease;
}

.program-entry.cleared {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.program-entry-button {
    display: grid;
    gap: 12px;
    min-width: min(520px, 90vw);
    padding: 28px 34px;
    border: 1px solid var(--orange);
    background: rgba(0, 8, 12, 0.96);
    color: #efffff;
    font: 900 clamp(24px, 4vw, 42px) "Arial Black", Impact, sans-serif;
    letter-spacing: 0.09em;
    cursor: pointer;
    box-shadow: 0 0 34px rgba(255, 122, 24, 0.25),
                inset 0 0 30px rgba(0, 234, 255, 0.07);
    text-align: center;
    transition: 180ms ease;
}

.program-entry-button span,
.program-entry-button small {
    color: var(--cyan);
    font: 700 11px "Courier New", monospace;
    letter-spacing: 0.22em;
}

.program-entry-button small {
    color: #88aeb2;
    font-size: 10px;
}

.program-entry-button:hover,
.program-entry-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 46px rgba(255, 122, 24, 0.42),
                inset 0 0 34px rgba(0, 234, 255, 0.12);
    outline: none;
}

#matrix {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--ink);
}

.top-nav {
    position: fixed;
    top: 22px;
    left: 50%;
    z-index: 100;
    display: flex;
    gap: clamp(8px, 1.5vw, 24px);
    transform: translateX(-50%);
    padding: 8px 18px;
    border-bottom: 1px solid rgba(101, 250, 255, 0.22);
    background: rgba(0, 5, 8, 0.72);
    backdrop-filter: blur(10px);
}

.top-nav a {
    position: relative;
    padding: 9px 4px 12px;
    color: #a9c1c5;
    font-family: system-ui, "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-decoration: none;
    white-space: nowrap;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.top-nav a::after {
    position: absolute;
    right: 4px;
    bottom: 4px;
    left: 4px;
    height: 2px;
    background: var(--orange);
    box-shadow: 0 0 10px rgba(255, 122, 24, 0.72);
    content: "";
    opacity: 0;
    transform: scaleX(0.45);
    transition: opacity 180ms ease, transform 180ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a.active {
    color: #fff;
    text-shadow: 0 0 12px rgba(101, 250, 255, 0.5);
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after,
.top-nav a.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.top-nav a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.program-page {
    position: relative;
    z-index: 2;
    width: min(1600px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 64px;
}

.program-header {
    margin-bottom: 28px;
    text-align: center;
}

.eyebrow,
.record-kicker {
    color: var(--orange);
    font-size: 12px;
    letter-spacing: 0.28em;
}

h1 {
    margin: 10px 0 8px;
    color: #040708;
    font-family: "Orbitron", "Arial Black", sans-serif;
    font-size: clamp(48px, 8vw, 94px);
    letter-spacing: 0.06em;
    line-height: 0.95;
    -webkit-text-stroke: 2px var(--cyan);
    text-shadow: -4px 0 14px rgba(0, 234, 255, 0.6),
                  4px 0 14px rgba(255, 101, 0, 0.38);
}

.lede {
    margin: 0;
    color: #94b7bb;
    letter-spacing: 0.16em;
}

.roster-note {
    margin: 16px auto 0;
    max-width: 740px;
    color: #a4bdc6;
    font-size: 14px;
    line-height: 1.8;
}

.gallery-help {
    margin: 0 0 12px;
    color: #aac6cd;
    font-size: 11px;
    letter-spacing: 0.12em;
    line-height: 1.7;
    text-align: center;
}

.mobile-gallery-hint {
    display: none;
    margin: 10px auto 18px;
    color: #b8cbd0;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.music-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 16px;
    border: 1px solid rgba(101, 250, 255, 0.55);
    background: rgba(0, 8, 12, 0.9);
    color: #8fbfc3;
    font: 700 11px "Courier New", monospace;
    letter-spacing: 0.16em;
    cursor: pointer;
    box-shadow: inset 0 0 16px rgba(0, 234, 255, 0.05);
    transition: 180ms ease;
}

.music-toggle:hover,
.music-toggle:focus-visible,
.music-toggle.active {
    border-color: var(--orange);
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 122, 24, 0.28),
                inset 0 0 16px rgba(255, 122, 24, 0.08);
    outline: none;
}

.music-icon {
    color: var(--orange);
    text-shadow: 0 0 8px rgba(255, 122, 24, 0.8);
}

.music-toggle.active .music-icon {
    animation: musicPulse 1.4s ease-in-out infinite;
}

@keyframes musicPulse {
    50% {
        transform: scale(1.22);
        color: var(--gold);
    }
}

.lineup {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(101, 250, 255, 0.72);
    background: #020608;
    box-shadow: -9px 0 28px rgba(0, 234, 255, 0.2),
                9px 0 28px rgba(255, 101, 0, 0.18);
}

.lineup-scene { position: relative; }

.lineup img {
    display: block;
    width: 100%;
    height: auto;
}

.program-hotspots {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
}

.program-hotspot {
    position: absolute;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

[data-program="dot"] { --program-color: var(--lavender); }
[data-program="tail"] { --program-color: var(--lavender); }
[data-program="prime"] { --program-color: var(--gold); }
[data-program="valor"], [data-program="lox"] { --program-color: var(--cyan); }
[data-program="pulse"] { --program-color: var(--pink); }
[data-program="rig"] { --program-color: var(--red); }

.program-hotspot[data-program="lox"] { left: 9%; top: 6%; width: 11.8%; height: 92%; }
.program-hotspot[data-program="dot"] { left: 21%; top: 6%; width: 11.5%; height: 92%; }
.program-hotspot[data-program="tail"] { left: 32.8%; top: 6%; width: 8.5%; height: 92%; }
.program-hotspot[data-program="prime"] { left: 41.6%; top: 5%; width: 15.6%; height: 93%; }
.program-hotspot[data-program="pulse"] { left: 57.5%; top: 6%; width: 10.2%; height: 92%; }
.program-hotspot[data-program="valor"] { left: 68%; top: 6%; width: 11.6%; height: 92%; }
.program-hotspot[data-program="rig"] { left: 80%; top: 6%; width: 11.5%; height: 92%; }

.program-hotspot:hover,
.program-hotspot:focus-visible {
    border-color: var(--program-color);
    box-shadow: 0 0 16px var(--program-color);
    outline: none;
}

.program-hotspot.active { border-bottom-color: var(--program-color); }

.program-hotspot:disabled { cursor: wait; }

.retry-programs:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -5px;
}

.program-record .record-heading h2 {
    color: var(--program-color, var(--cyan));
}

.program-console {
    margin-top: 28px;
    border: 1px solid rgba(101, 250, 255, 0.55);
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.055), rgba(255, 101, 0, 0.045)), var(--panel);
    box-shadow: inset 0 0 36px rgba(0, 234, 255, 0.055);
}

.selection-prompt {
    margin: 0;
    padding: 34px 20px;
    color: #8fc8cd;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-align: center;
}

.program-record {
    padding: clamp(24px, 5vw, 52px);
    scroll-margin-top: 96px;
}

.record-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 4vw, 54px);
}

.program-record[data-program="prime"] .record-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
}

.record-copy { min-width: 0; }

.record-portrait {
    position: sticky;
    top: 112px;
    padding: 12px;
    border: 1px solid rgba(255, 196, 77, 0.75);
    background: linear-gradient(145deg, rgba(255, 196, 77, 0.12), rgba(0, 5, 8, 0.96) 42%);
    box-shadow: 0 0 30px rgba(255, 153, 35, 0.2), inset 0 0 24px rgba(255, 196, 77, 0.06);
}

.portrait-frame {
    overflow: hidden;
    aspect-ratio: 0.86;
    border: 1px solid rgba(255, 196, 77, 0.55);
    background: #08090b;
}

.portrait-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.portrait-caption {
    margin: 14px 4px 2px;
    color: #c9b381;
    font-size: 10px;
    letter-spacing: 0.18em;
    line-height: 1.7;
    text-align: center;
}

.portrait-caption span:first-child {
    color: var(--gold);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-shadow: 0 0 12px rgba(255, 196, 77, 0.48);
}

.program-record:focus-visible { outline: 2px solid var(--program-color); outline-offset: 3px; }

.retry-programs {
    margin: 0 24px 24px;
    padding: 12px 18px;
    border: 1px solid var(--cyan);
    background: #02080b;
    color: var(--cyan);
    font: inherit;
    cursor: pointer;
}

.record-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(18px, 2.4vw, 30px);
    border: 1px solid color-mix(in srgb, var(--program-color, var(--cyan)) 48%, transparent);
    background: linear-gradient(120deg, color-mix(in srgb, var(--program-color, var(--cyan)) 9%, transparent), rgba(0, 8, 12, 0.7));
    box-shadow: inset 0 0 24px rgba(101, 250, 255, 0.025);
}

.record-heading h2 {
    margin: 6px 0 4px;
    color: #eaffff;
    font-family: "Orbitron", "Arial Black", sans-serif;
    font-size: clamp(42px, 6vw, 72px);
    letter-spacing: 0.06em;
    line-height: 1;
    text-shadow: 0 0 13px rgba(101, 250, 255, 0.48);
}

.record-role {
    margin: 0;
    color: #8fc8cd;
    letter-spacing: 0.12em;
}

.status-badge {
    padding: 10px 14px;
    border: 1px solid var(--orange);
    color: #ffae72;
    font-size: 12px;
    letter-spacing: 0.16em;
    line-height: 1.5;
    max-width: 270px;
}

.status-badge[data-state="active"] { border-color: var(--cyan); color: var(--cyan); }
.status-badge[data-state="planned"] { border-color: var(--lavender); color: var(--lavender); }
.status-badge[data-state="designed"] { border-color: var(--pink); color: #ff8ac5; }
.status-badge[data-state="monitoring"] { border-color: #fff; color: #fff; }

.record-summary {
    max-width: none;
    margin: 24px 0 30px;
    padding: clamp(16px, 2vw, 24px);
    border: 1px solid color-mix(in srgb, var(--program-color, var(--cyan)) 34%, transparent);
    border-left: 3px solid var(--program-color, var(--cyan));
    background: linear-gradient(90deg, rgba(255, 196, 77, 0.08), rgba(0, 7, 11, 0.18));
    box-shadow: inset 0 0 22px rgba(101, 250, 255, 0.025);
    color: #e0f3f4;
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.65;
}

.record-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 34px;
}

.record-layout div {
    padding: 18px;
    border: 1px solid rgba(101, 250, 255, 0.28);
    background: linear-gradient(145deg, rgba(0, 13, 18, 0.9), rgba(0, 5, 8, 0.92));
    box-shadow: inset 0 0 18px rgba(101, 250, 255, 0.025);
}

.record-layout .wide { grid-column: 1 / -1; }

dt, h3 {
    margin: 0 0 9px;
    color: var(--cyan);
    font-size: 12px;
    letter-spacing: 0.19em;
}

dd {
    margin: 0;
    color: #d9eef0;
    line-height: 1.55;
}

.record-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.record-columns section {
    padding: 20px;
    border: 1px solid rgba(101, 250, 255, 0.28);
    border-left: 2px solid var(--program-color, var(--cyan));
    background: linear-gradient(145deg, rgba(0, 13, 18, 0.76), rgba(0, 5, 8, 0.62));
    box-shadow: inset 0 0 20px rgba(101, 250, 255, 0.025);
}

.record-columns p,
.record-columns li,
.limits p,
.limits li {
    color: #abc9cc;
    font-size: 15px;
    line-height: 1.7;
}

.record-columns ul {
    margin: 0;
    padding-left: 20px;
}

.record-columns li + li { margin-top: 8px; }

.limits {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid rgba(255, 122, 24, 0.38);
    border-left: 3px solid var(--orange);
    background: linear-gradient(145deg, rgba(255, 101, 0, 0.065), rgba(0, 5, 8, 0.65));
    box-shadow: inset 0 0 20px rgba(255, 122, 24, 0.025);
}

.limits h3 { color: var(--orange); }
.limits p { margin: 0; }
.limits ul { margin: 0; padding-left: 20px; }
.limits li + li { margin-top: 8px; }
.boundary {
    border-color: rgba(164, 191, 200, 0.3);
    border-left-color: #8fc8cd;
    background: linear-gradient(145deg, rgba(101, 250, 255, 0.04), rgba(0, 5, 8, 0.68));
}
.boundary h3 { color: #a4bfc8; }
.record-updated { margin: 24px 0 0; color: #93aab5; font-size: 10px; line-height: 1.8; letter-spacing: 0.1em; }

.system-status {
    margin: 30px 0 0;
    color: #8efcff;
    font-size: 12px;
    letter-spacing: 0.16em;
}

.system-status span {
    color: var(--orange);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 760px) {
    .record-layout,
    .program-record[data-program="prime"] .record-layout { grid-template-columns: 1fr; }
    .record-portrait {
        position: static;
        width: min(100%, 390px);
        margin: 0 auto 26px;
        grid-row: 1;
    }
    .portrait-frame { aspect-ratio: 1 / 1; }
    .top-nav {
        position: absolute;
        top: 14px;
        left: 12px;
        right: 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 7px;
        transform: none;
    }

    .top-nav a {
        padding: 7px 4px 10px;
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .program-page { padding-top: 126px; }
    .lineup { overflow: hidden; }
    .lineup-scene { min-width: 0; }
    .lineup img { height: auto; }
    .mobile-gallery-hint { display: block; }
    .record-heading { display: block; }
    .status-badge { display: inline-block; margin-top: 18px; }
    .record-layout, .record-columns { grid-template-columns: 1fr; }
    .record-layout .wide { grid-column: auto; }
    .program-record { padding: 24px 18px; }
    .roster-note { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    #matrix { display: none; }
}
