/* ═════════════════════════════════════════════════════════════
   COCKPIT CSS — Star News TV Architecture
   Based on the working star-news-tv.html design
   ═════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #03070e;
    --glow: #00cfff;
    --amber: #ffb84d;
    --red: #ff3c3c;
    --green: #39ff14;
    --purple: #c084fc;
    --dim: #1e3a52;
    --text: #b8d4e8;
    --card-bg: rgba(4, 12, 24, .94);
    --term-bg: rgba(2, 6, 14, .98);
    --term-border: rgba(0, 80, 130, .4);
    --sky-pinch-x: 1;
    --sky-pinch-y: 1;
}

/* ── CURSOR ──────────────────────────────────────────────── */
#cursor {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--glow);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--glow);
    transition: width .18s, height .18s, background .18s;
}

#cursor-ring {
    position: fixed;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(0, 207, 255, .35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width .14s, height .14s, border-color .3s, opacity .4s;
}

/* Live pulse animation for WATCH LIVE button */
.live-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ticker scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

body.hovering #cursor {
    width: 9px;
    height: 9px;
    background: var(--amber);
    box-shadow: 0 0 14px var(--amber);
}

body.hovering #cursor-ring {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 184, 77, .5);
}

body.terminal-focus #cursor {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

body.terminal-focus #cursor-ring {
    border-color: rgba(57, 255, 20, .28);
}

body.shifting #cursor {
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple);
}

body.wobbling #cursor-ring {
    border-color: rgba(0, 207, 255, .14);
    opacity: .5;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 207, 255, .011) 3px, rgba(0, 207, 255, .011) 4px);
    pointer-events: none;
    z-index: 9000;
}

/* ── BACKGROUND ──────────────────────────────────────────── */
#bg-scene {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 50% 35% at 50% 115%, rgba(0, 25, 55, .9) 0%, transparent 70%), radial-gradient(ellipse 110% 55% at 50% 105%, rgba(0, 10, 28, 1) 0%, transparent 80%), linear-gradient(180deg, #000204 0%, #010810 50%, #030f1c 100%);
    transition: background 2s ease;
    transform: scaleX(var(--sky-pinch-x)) scaleY(var(--sky-pinch-y));
    transform-origin: center center;
}

#horizon {
    position: fixed;
    bottom: 18%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 80, 160, .25) 20%, rgba(0, 160, 230, .4) 50%, rgba(0, 80, 160, .25) 80%, transparent 100%);
    box-shadow: 0 0 40px 6px rgba(0, 120, 200, .09);
    pointer-events: none;
    z-index: 2;
    transition: box-shadow 1.5s;
}

#stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    transform: scaleX(var(--sky-pinch-x)) scaleY(var(--sky-pinch-y));
    transform-origin: center center;
}

/* ── FLOATING LOGO ───────────────────────────────────────── */
#floating-logo {
    position: fixed;
    top: 14px;
    left: 20px;
    z-index: 200;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(.16, 1, .3, 1);
}

#floating-logo .sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6px;
    letter-spacing: 3px;
    color: var(--amber);
    text-transform: uppercase;
    margin-top: 3px;
    padding-left: 4px;
}

/* ── FLOATING SECTION NAV ────────────────────────────────── */
#sections {
    position: fixed;
    top: 60px;
    left: 20px;
    z-index: 200;
    display: flex;
    gap: 0;
    transition: transform 0.8s cubic-bezier(.16, 1, .3, 1);
}

.sec-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--dim);
    padding: 4px 12px;
    cursor: pointer;
    border: none;
    background: none;
    transition: color .2s;
    position: relative;
    white-space: nowrap;
}

.sec-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--glow);
    transform: scaleX(0);
    transition: transform .2s;
}

.sec-btn:hover {
    color: var(--text);
}

.sec-btn:hover::after,
.sec-btn.active::after {
    transform: scaleX(1);
}

.sec-btn.active {
    color: var(--glow);
}

/* ── FLOATING HUD RIGHT ─────────────────────────────────── */
#hud-right {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.8s cubic-bezier(.16, 1, .3, 1);
}

#publish-launcher {
    position: fixed;
    top: 14px;
    right: 170px;
    z-index: 210;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform .8s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}

#publish-top-btn {
    border: 1px solid rgba(57, 255, 20, .45);
    background: linear-gradient(180deg, rgba(8, 28, 16, .96), rgba(3, 11, 8, .96));
    color: var(--green);
    padding: 8px 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(57, 255, 20, .12);
}

#publish-top-btn:hover {
    background: rgba(57, 255, 20, .08);
    box-shadow: 0 0 24px rgba(57, 255, 20, .24);
}

#publish-hot-tip {
    padding: 4px 10px;
    border: 1px solid rgba(255, 184, 77, .28);
    background: rgba(24, 11, 0, .86);
    color: var(--amber);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}

#publish-hot-tip::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -6px;
    width: 10px;
    height: 10px;
    background: rgba(24, 11, 0, .86);
    border-left: 1px solid rgba(255, 184, 77, .28);
    border-top: 1px solid rgba(255, 184, 77, .28);
    transform: translateX(-50%) rotate(45deg);
}

#live-dot {
    display: flex;
    align-items: center;
    gap: 6px;
}

#live-dot .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
    animation: blink 1.1s infinite;
}

#live-dot .lbl {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    color: var(--red);
    text-transform: uppercase;
}

#live-clock {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(180, 210, 230, .58);
}

#live-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
}

/* ── FLOATING GLASS HUD ───────────────────────────────────── */
#floating-hud {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px 16px;
    padding: 14px 18px 12px;
    background: linear-gradient(180deg, rgba(3, 10, 22, .78), rgba(4, 10, 24, .55));
    border: 1px solid rgba(0, 120, 180, .28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter: blur(18px) saturate(120%);
    z-index: 260;
    border-radius: 18px;
    transition: transform .35s ease, opacity .25s ease, width .25s ease;
}

#floating-hud::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,207,255,.7), rgba(57,255,20,.45), transparent);
}

.hud-section {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-left { grid-column: 1; grid-row: 1; }
.hud-center { grid-column: 2; grid-row: 1; justify-content: center; flex-wrap: wrap; }
.hud-right { grid-column: 3; grid-row: 1; justify-content: flex-end; }

/* Hide top HUD right section - moved to bottom console */
#floating-hud .hud-right {
    display: none !important;
}

#floating-hud .hud-center {
    display: none !important;
}

#floating-hud .hud-celestial-bar {
    display: none !important;
}

/* Center the station info */
#floating-hud .hud-left {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hud-celestial-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 2px;
    border-top: 1px solid rgba(0, 70, 120, .22);
}

.station-crest {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--glow);
    border: 1px solid rgba(0, 207, 255, .35);
    background: radial-gradient(circle at 30% 30%, rgba(0,207,255,.12), rgba(0,0,0,0));
    box-shadow: 0 0 18px rgba(0, 207, 255, .14);
}

.station-name {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 4px;
    font-size: 24px;
    color: #e4f6ff;
}

.station-meta, .hud-clock, .weather-mini, .hud-actions-mini {
    font-family: 'IBM Plex Mono', monospace;
}

.station-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.live-indicator, .location-pill, .astro-item, .nav-pill, .action-icon {
    border: 1px solid rgba(0, 85, 130, .32);
    background: rgba(3, 10, 20, .58);
}

.live-indicator, .location-pill {
    padding: 4px 8px;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.live-dot-mini {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
    margin-right: 6px;
    animation: blink 1.1s infinite;
}

.location-pill { color: var(--amber); }

.nav-pill {
    color: #8ab5d1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
}

.nav-pill.active,
.nav-pill:hover {
    color: var(--glow);
    border-color: rgba(0, 207, 255, .44);
    box-shadow: 0 0 18px rgba(0,207,255,.1);
}

.weather-mini,
.hud-clock {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 10px;
    border: 1px solid rgba(0, 85, 130, .28);
    background: rgba(3, 10, 20, .5);
}

.wx-temp, .clock-time {
    color: #dcefff;
    font-size: 12px;
    letter-spacing: 1px;
}

.wx-desc, .clock-date {
    color: #6d91ac;
    font-size: 7px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.hud-actions-mini {
    display: flex;
    gap: 8px;
}

.action-icon {
    color: var(--glow);
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 13px;
}

.action-icon:hover {
    color: #fff;
    border-color: rgba(0, 207, 255, .52);
    box-shadow: 0 0 18px rgba(0,207,255,.12);
}

#floating-hud.compact {
    width: min(980px, calc(100vw - 40px));
    padding: 10px 14px 10px;
    gap: 8px 12px;
}

#floating-hud.compact .station-name {
    font-size: 20px;
}

#floating-hud.compact .weather-mini,
#floating-hud.compact .hud-clock {
    padding: 6px 8px;
}

#floating-hud.compact .hud-celestial-bar {
    gap: 8px;
}

#floating-hud.compact .astro-item,
#floating-hud.compact .nav-pill,
#floating-hud.compact .live-indicator,
#floating-hud.compact .location-pill {
    font-size: 7px;
}

body.publish-mode-active #floating-hud,
body.publish-mode-active #floating-logo,
body.publish-mode-active #sections,
body.publish-mode-active #hud-right,
body.publish-mode-active #publish-launcher {
    opacity: .16;
    pointer-events: none;
    transition: opacity .25s ease;
}

.card.side-widget,
.plane-left-rail {
    transition: opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}

#floating-hud.compact ~ #scene .plane-left-rail,
#floating-hud.compact ~ #scene .card.side-widget {
    opacity: .72;
}

.astro-item {
    padding: 5px 8px;
    color: #9fc6de;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

#tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    padding: 6px 10px;
    max-width: 240px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    color: #d9f2ff;
    background: rgba(2, 8, 18, .94);
    border: 1px solid rgba(0, 207, 255, .24);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    transition: opacity .16s ease;
}

/* ── 3D SCENE ────────────────────────────────────────────── */
#scene {
    position: fixed;
    inset: 0;
    perspective: 860px;
    perspective-origin: 50% 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: perspective-origin .8s cubic-bezier(.16, 1, .3, 1);
    z-index: 50;
    pointer-events: none;
}

#arc-stage {
    position: relative;
    width: 0;
    height: 0;
    min-width: 100vw;
    min-height: 100vh;
    transform-style: preserve-3d;
    will-change: transform;
    pointer-events: auto;
    transition: transform .12s ease-out;
}

#article-plane {
    position: fixed;
    inset: 50% auto auto 50%;
    width: min(1480px, calc(100vw - 24px));
    height: min(96vh, 1080px);
    transform: translate3d(-50%, -50%, 120px) scale(.97);
    transform-origin: center center;
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    display: block;
    transition: opacity .3s ease, transform .38s cubic-bezier(.16,1,.3,1);
}

#article-plane.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, -50%, 140px) scale(1);
}

#article-inner {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(0, 120, 180, .34);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(2, 7, 16, .98), rgba(3, 10, 20, .96));
    box-shadow: 0 36px 120px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.04) inset;
}

#article-close {
    position: sticky;
    top: 10px;
    z-index: 8;
    margin: 10px 10px 0 auto;
    display: block;
    border: 1px solid rgba(0,207,255,.28);
    border-radius: 999px;
    background: rgba(2,12,22,.88);
    color: #dff3ff;
    padding: 10px 18px;
    font: 700 11px 'IBM Plex Mono', monospace;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

#article-close:hover {
    border-color: #00cfff;
    color: #00cfff;
}

.article-header,
.article-img,
#a-thumbs,
.article-related {
    width: 100%;
}

.article-related {
    padding: 24px 32px 32px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.article-open #scene {
    pointer-events: none;
}

body.article-open #arc-stage .post-card {
    filter: blur(6px) saturate(.8);
    opacity: .22;
    pointer-events: none;
}

.post-card {
    overflow: hidden;
}

.post-card .cockpit-type-desc {
    pointer-events: none;
}

.post-card video,
.post-card .cockpit-card-video {
    background: #02060d;
}

.plane-left-rail {
    width: min(300px, 28vw);
}

.plane-rail-card {
    width: 100%;
    min-height: 220px;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,.34);
}

.plane-rail-card-events {
    background: linear-gradient(180deg, rgba(3,12,24,.92), rgba(4,10,20,.82));
    border: 1px solid rgba(0,207,255,.24);
}

.plane-rail-card-history {
    background: linear-gradient(180deg, rgba(18,10,3,.92), rgba(20,10,4,.82));
    border: 1px solid rgba(255,184,77,.22);
}

.plane-rail-kicker {
    font: 700 10px 'IBM Plex Mono', monospace;
    letter-spacing: 2px;
    color: #00cfff;
    text-transform: uppercase;
}

.plane-rail-kicker-history {
    color: #ffb84d;
}

.plane-rail-calendar {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: start;
}

.plane-rail-calendar-date {
    border: 1px solid rgba(0,207,255,.18);
    border-radius: 14px;
    padding: 10px;
    background: rgba(0,18,34,.55);
    text-align: center;
}

.plane-rail-calendar-month,
.plane-rail-calendar-weekday,
.plane-rail-event-meta,
.plane-rail-history-copy {
    font-family: 'IBM Plex Mono', monospace;
}

.plane-rail-calendar-month,
.plane-rail-calendar-weekday {
    font-size: 10px;
    color: #7fa7c8;
    letter-spacing: 2px;
}

.plane-rail-calendar-day {
    font: 700 34px 'Bebas Neue', sans-serif;
    color: #fff;
    line-height: 1;
}

.plane-rail-event-list,
.plane-rail-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plane-rail-event-item {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.plane-rail-event-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.plane-rail-event-title {
    font: 700 16px 'Bebas Neue', sans-serif;
    color: #fff;
}

.plane-rail-event-meta {
    font-size: 10px;
    color: #a8c8de;
}

.plane-rail-history-year {
    font: 700 12px 'IBM Plex Mono', monospace;
    color: #fff;
}

.plane-rail-history-copy {
    font-size: 11px;
    color: #d7c2a2;
    line-height: 1.6;
}

.post-card-video::after {
    content: 'VIDEO';
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    font: 700 9px 'IBM Plex Mono', monospace;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.2);
    padding: 4px 8px;
    border-radius: 999px;
}

@media (max-width: 1280px) {
    #arc-stage {
        min-height: 1220px;
    }

    #floating-hud {
        width: min(1100px, calc(100vw - 32px));
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 10px;
        left: 16px;
        right: 16px;
        transform: none;
    }

    .hud-left,
    .hud-center,
    .hud-right,
    .hud-celestial-bar {
        grid-column: 1;
    }

    .hud-left { grid-row: 1; }
    .hud-center { grid-row: 2; justify-content: flex-start; }
    .hud-right { grid-row: 3; justify-content: space-between; flex-wrap: wrap; }
    .hud-celestial-bar { grid-row: 4; }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    html,
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    #scene {
        position: relative;
        inset: auto;
        min-height: auto;
        perspective: none;
        align-items: stretch;
        justify-content: flex-start;
        padding-top: 320px;
        padding-bottom: 140px;
        display: block;
        pointer-events: auto;
    }

    #arc-stage {
        width: 100%;
        height: auto;
        min-width: 0;
        min-height: auto;
        padding: 0 12px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        transform: none !important;
        transform-style: flat;
    }

    #arc-stage.mobile-feed {
        perspective: none;
        align-items: stretch;
    }

    #floating-logo {
        display: none !important;
    }

    #publish-launcher {
        display: none !important;
    }

    #publish-launcher {
        top: auto;
        right: 12px;
        bottom: 84px;
        left: 12px;
        align-items: stretch;
        gap: 4px;
    }

    #publish-top-btn,
    #publish-hot-tip {
        width: 100%;
        text-align: center;
    }

    #floating-hud {
        top: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        gap: 8px;
    }

    .station-name {
        font-size: 16px;
    }

    .hud-left,
    .hud-right {
        align-items: flex-start;
        gap: 8px;
    }

    .station-meta,
    .hud-celestial-bar {
        display: none !important;
    }

    .weather-mini,
    .hud-clock {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 10px;
    }

    .hud-actions-mini {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(42px, 1fr));
        gap: 8px;
        width: 100%;
    }

    .action-icon {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
        border-radius: 10px;
    }

    .nav-pill,
    .clock-time,
    .clock-date {
        font-size: 9px !important;
    }

    .hud-center {
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-pill {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 8px;
        letter-spacing: 1.2px;
    }

    .post-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 264px !important;
        height: auto !important;
        aspect-ratio: 16 / 11;
        margin: 0 !important;
        transform: none !important;
        padding: 0 !important;
        border-radius: 18px !important;
    }

    #terminal {
        display: none !important;
    }

    #bottom-console {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 100% !important;
        min-width: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 8px 12px 10px !important;
    }

    #sys-bar {
        display: none !important;
    }

    .plane-left-rail {
        order: -1;
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: none;
        transform: none;
        gap: 12px;
    }

    #arc-stage.mobile-feed .plane-left-rail {
        display: none !important;
    }

    #arc-stage.mobile-feed .post-card {
        display: block;
    }

    .plane-rail-card {
        width: 100% !important;
        min-height: auto !important;
    }

    #bottom-console {
        min-width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: 12px;
        transform: none !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        bottom: 12px !important;
    }

    #bottom-console input {
        width: 100% !important;
    }

    #article-plane {
        width: calc(100vw - 28px);
        height: calc(100vh - 40px);
        inset: 20px auto auto 50%;
        transform: translate3d(-50%, 0, 0) scale(.98);
    }

    #article-plane.open {
        transform: translate3d(-50%, 0, 0) scale(1);
    }

    #article-inner {
        border-radius: 18px;
    }

    .article-header {
        padding: 22px 20px 18px !important;
    }

    .article-related {
        padding: 20px;
    }

    .article-img {
        height: 220px !important;
    }

    #a-thumbs {
        padding: 10px !important;
    }

    .article-body,
    #a-body {
        padding: 20px !important;
        font-size: 15px !important;
        line-height: 1.7 !important;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    html,
    body {
        overflow: auto;
    }

    #arc-stage {
        min-height: 1320px;
    }

    .post-card {
        width: 100% !important;
        min-height: 250px !important;
        border-radius: 14px !important;
    }

    .post-card::after {
        right: 8px;
        bottom: 8px;
        font-size: 8px;
        padding: 3px 6px;
    }

    #floating-hud {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        top: 8px;
        padding: 10px;
    }

    .station-name {
        font-size: 15px;
    }

    .nav-pill,
    .astro-item,
    .location-pill,
    .live-indicator {
        font-size: 7px;
        letter-spacing: 1px;
        padding: 8px 8px;
    }

    .weather-mini,
    .hud-clock {
        width: 100%;
    }

    .hud-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        justify-content: stretch !important;
    }

    .hud-actions-mini {
        grid-column: 1 / -1;
    }

    .plane-left-rail {
        position: static;
        margin: 176px 0 16px;
        max-width: none;
        width: auto;
    }

    .plane-rail-card {
        padding: 14px;
        border-radius: 14px;
    }

    .plane-rail-calendar {
        grid-template-columns: 56px 1fr;
        gap: 10px;
    }

    .plane-rail-calendar-day {
        font-size: 28px;
    }

    .plane-rail-event-title {
        font-size: 14px;
    }

    #scene {
        position: relative;
        inset: auto;
        min-height: 0;
        padding-top: 148px;
        padding-bottom: 168px;
        display: block;
    }

    #arc-stage {
        min-height: 0;
    }

    #article-plane {
        inset: 12px !important;
        width: auto;
        height: auto;
        transform: none !important;
    }

    #article-plane.open {
        transform: none !important;
    }

    #article-inner {
        border-radius: 16px;
    }

    #article-close {
        top: 8px;
        margin: 8px 8px 0 auto;
        padding: 10px 12px;
        font-size: 9px;
        min-height: 44px;
    }

    #a-body > div {
        grid-template-columns: 1fr !important;
    }

    .article-header {
        padding: 18px 16px 14px !important;
    }

    .article-img {
        height: 180px !important;
    }

    #a-body {
        padding: 18px !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    #publish-launcher {
        bottom: 78px;
    }

    #publish-top-btn {
        min-height: 46px;
        font-size: 10px;
        letter-spacing: 2px;
    }

    #publish-hot-tip {
        font-size: 8px;
        letter-spacing: 1.5px;
        padding: 6px 10px;
    }

    #ticker-wrap {
        height: 32px;
    }

    #ticker-label {
        font-size: 10px;
        padding: 0 10px;
    }

    #ticker-inner {
        font-size: 8px;
        letter-spacing: 1px;
    }

    #hint {
        display: none;
    }

    .article-header {
        padding: 18px 16px 14px !important;
    }

    .article-hed,
    #a-hed {
        font-size: 24px !important;
        line-height: 1.05 !important;
    }

    .article-dek,
    #a-dek {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .article-img {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    #scene {
        padding-top: 140px;
        padding-bottom: 150px;
    }

    #arc-stage {
        padding: 0 10px;
        min-height: 0;
    }

    #floating-hud {
        width: calc(100vw - 16px);
        left: 8px;
        right: 8px;
        top: 8px;
        padding: 8px;
    }

    .hud-center {
        grid-template-columns: 1fr;
    }

    .hud-right {
        grid-template-columns: 1fr;
    }

    .weather-mini,
    .hud-clock {
        width: 100%;
    }

    .hud-actions-mini {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #floating-logo {
        top: 92px;
        left: 12px;
    }

    #floating-logo img {
        width: min(144px, 42vw) !important;
    }

    .post-card {
        min-height: 220px !important;
    }

    #article-plane {
        width: calc(100vw - 16px);
        height: calc(100vh - 24px);
        inset: 12px auto auto 50%;
    }

    .article-body,
    #a-body,
    .article-related {
        padding: 16px !important;
    }
}

@media (hover: none) {
    .post-card .cockpit-type-desc {
        max-height: 64px !important;
        opacity: 1 !important;
    }

    .post-card-video::after {
        content: 'TAP VIDEO';
    }
}

@media (max-width: 480px) {
    #scene {
        padding-top: 140px;
        padding-bottom: 150px;
    }

    #arc-stage {
        padding: 0 10px;
        min-height: 0;
    }

    #floating-hud {
        width: calc(100vw - 16px);
        left: 8px;
        right: 8px;
        top: 8px;
        padding: 8px;
    }

    .hud-center,
    .hud-right {
        grid-template-columns: 1fr;
    }

    .hud-actions-mini {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #floating-logo {
        top: 92px;
        left: 12px;
    }

    #floating-logo img {
        width: min(144px, 42vw) !important;
    }

    #publish-launcher {
        left: 10px;
        right: 10px;
        bottom: 74px;
    }

    .post-card {
        min-height: 220px !important;
    }

    #article-plane {
        width: calc(100vw - 16px);
        height: calc(100vh - 24px);
        inset: 12px auto auto 50%;
    }

    .article-body,
    #a-body,
    .article-related {
        padding: 16px !important;
    }
}

@media (max-width: 900px) {
    .post-mode-shell {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
    }

    .pm-body {
        grid-template-columns: 1fr;
    }

    .pm-controls {
        border-right: 0;
        border-bottom: 1px solid rgba(0,55,90,.3);
    }

    .pm-preview-panel {
        max-height: 34vh;
    }
}

@media (max-width: 640px) {
    .post-mode-shell {
        width: calc(100vw - 12px);
        height: calc(100vh - 12px);
    }

    .pm-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .pm-header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .pm-controls,
    .pm-preview-panel {
        padding: 12px;
    }
}

.plane-left-rail {
    position: absolute;
    left: -520px;
    top: -180px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform-style: preserve-3d;
    pointer-events: auto;
}

.plane-right-rail {
    position: absolute;
    right: -520px;
    top: -180px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform-style: preserve-3d;
    pointer-events: auto;
}

.plane-right-rail-teaser {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plane-right-rail-teaser:hover {
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(255,184,77,0.3);
}

.right-rail-teaser-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255,184,77,0.15), rgba(255,136,0,0.1));
    border: 1px solid rgba(255,184,77,0.4);
    border-radius: 14px;
    color: #ffb84d;
    font: 600 11px 'IBM Plex Mono',monospace;
    letter-spacing: 0.5px;
}

.right-rail-teaser-icon {
    font-size: 18px;
}

.right-rail-teaser-text {
    flex: 1;
}

.right-rail-teaser-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.plane-right-rail-teaser:hover .right-rail-teaser-arrow {
    transform: translateX(4px);
}

.plane-right-rail-expanded {
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gamification-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.gamification-stat {
    text-align: center;
    padding: 8px 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.gamification-stat-value {
    font: 700 14px 'Bebas Neue',sans-serif;
    color: #fff;
}

.gamification-stat-label {
    font: 400 8px 'IBM Plex Mono',monospace;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gamification-xp-bar {
    position: relative;
    height: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
}

.gamification-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb84d, #ffcc00);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gamification-xp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 9px 'IBM Plex Mono',monospace;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.achievement-unlocked .achievement-icon {
    font-size: 16px;
}

.achievement-locked {
    opacity: 0.5;
}

.achievement-locked .achievement-icon {
    font-size: 14px;
}

.achievement-info {
    flex: 1;
}

.achievement-title {
    font: 600 10px 'IBM Plex Mono',monospace;
    color: #fff;
}

.achievement-desc {
    font: 400 8px 'IBM Plex Mono',monospace;
    color: rgba(255,255,255,0.5);
}

.social-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.social-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 9px 'IBM Plex Mono',monospace;
    color: #fff;
}

.social-content {
    flex: 1;
    min-width: 0;
}

.social-user {
    font: 600 9px 'IBM Plex Mono',monospace;
    color: #fff;
}

.social-action {
    font: 400 7px 'IBM Plex Mono',monospace;
    color: rgba(255,255,255,0.4);
}

.social-story {
    font: 400 8px 'IBM Plex Mono',monospace;
    color: rgba(0,207,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    font: 400 10px 'IBM Plex Mono',monospace;
}

.leaderboard-top .leaderboard-rank {
    color: #ffb84d;
}

.leaderboard-rank {
    width: 16px;
    font: 700 10px 'Bebas Neue',sans-serif;
    color: rgba(255,255,255,0.6);
}

.leaderboard-name {
    flex: 1;
    color: #fff;
}

.leaderboard-score {
    color: rgba(255,255,255,0.7);
}

.leaderboard-you {
    background: rgba(0,207,255,0.15);
    border: 1px solid rgba(0,207,255,0.3);
}

.plane-rail-card {
    position: relative;
    width: 224px;
    min-height: 198px;
    transform: translate3d(0, 0, -90px) rotateY(12deg) rotateX(1deg);
}

/* ── CARDS (position:absolute, translate3d) ───────────────── */
/* ── ENHANCED MICRO-INTERACTIONS ─────────────────────────── */
.card {
    position: absolute;
    width: 192px;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    will-change: transform;
    transform-origin: center center;
}

.card:hover {
    transform: translateZ(30px) scale(1.08) rotateX(-2deg);
    z-index: 10;
}

.card:active {
    transform: translateZ(15px) scale(1.04) rotateX(-1deg);
    transition-duration: 0.1s;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(0, 212, 255, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.card:hover::after {
    opacity: 1;
}

.card-thumb-inner {
    width: 100%;
    height: 100%;
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
    filter: saturate(0.8);
}

.card:hover .card-thumb-inner {
    opacity: 0.8;
    filter: saturate(1.1);
    transform: scale(1.05);
}

.card-read {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    color: var(--primary-glow);
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-read::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    transition: right 0.3s ease;
    opacity: 0.6;
}

.card:hover .card-read::after {
    right: -12px;
}

.widget-action {
    margin-top: 12px;
    width: 100%;
    border: 1px solid var(--border-primary);
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.08) 0%, 
        rgba(0, 212, 255, 0.04) 100%);
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.widget-action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--primary-glow) 0%, 
        var(--secondary-glow) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.widget-action:hover {
    border-color: var(--primary-glow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.widget-action:hover::before {
    opacity: 0.1;
}

.widget-action:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.weather-temp {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.weather-content:hover .weather-temp {
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.celestial-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 7px;
    padding: 3px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.celestial-item:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: translateX(2px);
}

.celestial-icon {
    font-size: 9px;
    width: 14px;
    transition: transform 0.3s ease;
}

.celestial-item:hover .celestial-icon {
    transform: scale(1.2) rotate(5deg);
}

.movie-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-secondary);
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 6px 8px;
}

.movie-item:hover {
    background: rgba(0, 212, 255, 0.05);
    border-bottom-color: var(--primary-glow);
    transform: translateX(3px);
}

.movie-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.movie-item:hover .movie-title {
    color: var(--primary-glow);
}

.movie-more {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: var(--primary-glow);
    text-align: center;
    margin-top: 8px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* ── ENHANCED LOADING STATES & TRANSITIONS ────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
        border-color: var(--border-primary);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
        border-color: var(--primary-glow);
    }
}

.loading-skeleton {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        rgba(0, 212, 255, 0.1) 50%, 
        var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.card.loading .card-inner {
    position: relative;
    overflow: hidden;
}

.card.loading .card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.2) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
    z-index: 2;
}

.card.loading .card-headline,
.card.loading .card-lede,
.card.loading .card-cat {
    color: transparent;
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        rgba(0, 212, 255, 0.1) 50%, 
        var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
}

.card.loading .card-thumb-inner {
    background: linear-gradient(135deg, 
        var(--bg-secondary) 25%, 
        rgba(0, 212, 255, 0.1) 50%, 
        var(--bg-secondary) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Enhanced entrance animations */
.card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }
.card:nth-child(7) { animation-delay: 0.4s; }
.card:nth-child(8) { animation-delay: 0.45s; }
.card:nth-child(9) { animation-delay: 0.5s; }
.card:nth-child(10) { animation-delay: 0.55s; }
.card:nth-child(11) { animation-delay: 0.6s; }
.card:nth-child(12) { animation-delay: 0.65s; }
.card:nth-child(13) { animation-delay: 0.7s; }
.card:nth-child(14) { animation-delay: 0.75s; }
.card:nth-child(15) { animation-delay: 0.8s; }
.card:nth-child(16) { animation-delay: 0.85s; }

/* Weather widget loading state */
.weather-content.loading .weather-temp {
    color: transparent;
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        rgba(0, 212, 255, 0.1) 50%, 
        var(--bg-secondary) 75%);
    background-size: 100px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    min-width: 60px;
}

.weather-content.loading .weather-desc,
.weather-content.loading .celestial-time,
.weather-content.loading .detail-value {
    color: transparent;
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        rgba(0, 212, 255, 0.1) 50%, 
        var(--bg-secondary) 75%);
    background-size: 80px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
    min-width: 40px;
    display: inline-block;
}

/* Enhanced focus states */
.card:focus-visible {
    outline: 2px solid var(--primary-glow);
    outline-offset: 2px;
    border-radius: 8px;
}

.widget-action:focus-visible {
    outline: 2px solid var(--primary-glow);
    outline-offset: 2px;
}

/* Smooth page transitions */
body {
    transition: opacity 0.3s ease;
}

body.loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Enhanced hover transitions for better UX */
.card-inner {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-inner {
    transition-duration: 0.2s;
}

.card-thumb-inner {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:not(:hover) .card-thumb-inner {
    transition-duration: 0.6s;
}

/* Loading indicator for widgets */
.widget-loading {
    position: relative;
    overflow: hidden;
}

.widget-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.1) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

/* ── ACCESSIBILITY & RESPONSIVE ENHANCEMENTS ─────────────── */
/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-glow: #00ffff;
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --border-primary: rgba(0, 255, 255, 0.8);
        --bg-primary: rgba(0, 0, 0, 0.95);
    }
    
    .card-inner {
        border-width: 2px;
    }
    
    .card-headline {
        font-weight: 700;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card-inner,
    .card-thumb-inner,
    .widget-action,
    .celestial-item,
    .movie-item {
        transition: none;
        animation: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .loading-skeleton,
    .card.loading .card-inner::after {
        animation: none;
    }
}

/* Screen reader improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus indicators */
.card:focus-visible,
.widget-action:focus-visible,
.movie-more:focus-visible {
    outline: 3px solid var(--primary-glow);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid var(--primary-glow);
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Responsive design improvements */
@media (max-width: 1200px) {
    .card {
        transform: scale(0.9);
    }
    
    .card:hover {
        transform: scale(0.95) translateZ(15px);
    }
}

@media (max-width: 768px) {
    .card {
        transform: scale(0.8);
    }
    
    .card:hover {
        transform: scale(0.85) translateZ(10px);
    }
    
    .card-headline {
        font-size: 13px;
    }
    
    .card-lede {
        font-size: 7px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    .widget-action:hover,
    .movie-more:hover {
        transform: none;
    }
    
    .widget-action:active,
    .movie-more:active {
        transform: scale(0.95);
    }
}

/* Keyboard navigation enhancements */
.card:focus,
.widget-action:focus,
.movie-more:focus {
    order: -1;
    border: 2px solid var(--primary-glow);
}

/* Color blindness support */
@media (prefers-color-scheme: light) {
    :root {
        --primary-glow: #0066cc;
        --secondary-glow: #008800;
        --accent-amber: #cc8800;
        --accent-red: #cc0000;
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: rgba(255, 255, 255, 0.95);
        --bg-secondary: rgba(240, 240, 240, 0.95);
    }
    
    .card-inner {
        background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
        color: var(--text-primary);
    }
    
    .card-headline {
        color: var(--text-primary);
    }
    
    .card-lede {
        color: var(--text-secondary);
    }
}

/* Text size adjustments */
@media (max-resolution: 120dpi) {
    .card-headline {
        font-size: 16px;
    }
    
    .card-lede {
        font-size: 9px;
    }
    
    .widget-title {
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .card,
    .widget-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .card-inner {
        background: white;
        color: black;
    }
    
    .loading-skeleton,
    .card.loading .card-inner::after {
        display: none;
    }
}

/* ── ENHANCED COLOR SCHEME ───────────────────────────────── */
:root {
    --primary-glow: #00d4ff;
    --secondary-glow: #00ff88;
    --accent-amber: #ffb84d;
    --accent-red: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #b8d4e8;
    --text-tertiary: #6d91ac;
    --bg-primary: rgba(2, 8, 18, 0.98);
    --bg-secondary: rgba(4, 12, 24, 0.95);
    --bg-tertiary: rgba(8, 16, 32, 0.9);
    --border-primary: rgba(0, 140, 200, 0.4);
    --border-secondary: rgba(0, 80, 130, 0.3);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-ambient: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.card-inner {
    width: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-primary);
    padding: 14px 13px 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-ambient), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-glow) 20%, 
        var(--secondary-glow) 50%, 
        var(--primary-glow) 80%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(1px);
}

.card:hover .card-inner::before {
    opacity: 0.8;
}

.card:hover .card-inner {
    border-color: var(--primary-glow);
    box-shadow: var(--shadow-glow), var(--shadow-ambient), 
                0 0 60px rgba(0, 212, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.widget-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-secondary);
    padding: 0;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-secondary);
    background: linear-gradient(90deg, 
        rgba(0, 20, 40, 0.6) 0%, 
        rgba(0, 30, 60, 0.4) 100%);
}

.hero-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(4, 12, 24, 0.98) 0%, 
        rgba(8, 20, 36, 0.96) 100%);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.card.ghost .card-inner {
    border-color: rgba(0, 50, 80, .18);
    background: rgba(2, 7, 15, .75);
}

.card.ghost .card-headline {
    color: rgba(100, 150, 190, .28);
}

.card.ghost .card-cat,
.card.ghost .card-lede,
.card.ghost .card-footer {
    opacity: .22;
}

.card.ghost {
    cursor: default;
    pointer-events: none;
}

/* Side widget cards — weather/movies */
.card.side-widget {
    width: 180px;
}

.card.side-widget .card-inner {
    background: rgba(2, 8, 18, .96);
    border-color: rgba(0, 80, 130, .35);
}

.card-cat {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--glow);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.card-time {
    color: var(--dim);
}

.card-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    color: #eef5ff;
    line-height: 1.35;
    margin-bottom: 7px;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.card-lede {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    font-weight: 400;
    color: rgba(180, 210, 240, 0.85);
    line-height: 1.6;
    letter-spacing: 0.1px;
}

.card-thumb {
    width: 100%;
    height: 58px;
    margin-bottom: 8px;
    overflow: hidden;
}

.card-thumb-inner {
    width: 100%;
    height: 100%;
    opacity: .42;
    transition: opacity .3s;
    background-size: cover;
    background-position: center;
}

.card:hover .card-thumb-inner {
    opacity: .68;
}

.card-footer {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 60, 100, .28);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 2px;
    color: var(--amber);
    text-transform: uppercase;
}

.card-read {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    color: rgba(0, 207, 255, .4);
    text-transform: uppercase;
}

/* Widget card inner styles */
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 60, 100, .25);
}

.widget-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--glow);
    text-transform: uppercase;
}

.widget-icon {
    font-size: 14px;
}

.feature-widget .widget-story {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    line-height: 1.7;
    color: rgba(184, 212, 232, .74);
    margin: 10px 0 12px;
}

.feature-widget .widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-action {
    margin-top: 12px;
    width: 100%;
    border: 1px solid rgba(0, 207, 255, .28);
    background: rgba(0, 207, 255, .06);
    color: var(--glow);
    padding: 8px 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
}

.widget-action:hover {
    background: rgba(0, 207, 255, .12);
}

.weather-temp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    color: #fff;
    font-weight: 300;
}

.weather-desc {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: var(--dim);
}

.weather-details {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.weather-detail {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    color: var(--text);
}

.movie-item {
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 60, 100, .2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: var(--text);
}

.movie-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    color: var(--amber);
}

.movie-more {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    color: var(--glow);
    margin-top: 6px;
    cursor: pointer;
}

/* ── ARTICLE PLANE ───────────────────────────────────────── */
#article-plane {
    position: absolute;
    width: 560px;
    transform-style: preserve-3d;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-280px, -240px, -40px) scale(.92);
    transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
    z-index: 120;
}

#article-plane.open {
    opacity: 1;
    pointer-events: all;
    transform: translate3d(-280px, -240px, 60px) scale(1);
}

#article-inner {
    background: rgba(2, 8, 18, .97);
    border: 1px solid rgba(0, 140, 200, .35);
    box-shadow: 0 0 80px rgba(0, 140, 200, .1), 0 4px 60px rgba(0, 0, 0, .6);
    overflow-y: auto;
    max-height: 480px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 140, 200, .5) transparent;
}

#article-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--glow) 30%, var(--amber) 70%, transparent);
}

.article-header {
    padding: 22px 28px 16px;
    border-bottom: 1px solid rgba(0, 70, 110, .35);
}

.article-section-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--glow);
}

.article-hed {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: #eef5ff;
    line-height: 1.2;
    margin-bottom: 10px;
}

.article-dek {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 300;
    font-style: italic;
    color: rgba(180, 210, 240, .65);
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-img {
    width: 100%;
    height: 260px;
    background: rgba(0, 15, 32, .9);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 60, 100, .3);
    background-size: cover;
    background-position: center;
}

.article-img-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .5;
}

.article-img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 28px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 1px;
    color: var(--dim);
    background: rgba(0, 5, 14, .7);
}

.article-body {
    padding: 16px 28px 20px;
}

.article-body p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 300;
    color: var(--text);
    line-height: 1.82;
    margin-bottom: 10px;
    break-inside: avoid;
}

.article-body p.first::first-letter {
    font-size: 2.4em;
    font-weight: 600;
    float: left;
    line-height: .8;
    margin-right: 5px;
    color: var(--glow);
}

.article-pull {
    column-span: all;
    padding: 10px 0;
    margin: 4px 0 10px;
    border-top: 1px solid rgba(0, 207, 255, .2);
    border-bottom: 1px solid rgba(0, 207, 255, .2);
}

.article-pull blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-style: italic;
    font-weight: 600;
    color: rgba(200, 230, 255, .8);
    text-align: center;
    line-height: 1.4;
}

.article-related {
    padding: 10px 28px 16px;
    border-top: 1px solid rgba(0, 60, 100, .28);
}

.related-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 8px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.related-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: rgba(0, 207, 255, .5);
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 60, 100, .2);
    transition: color .2s;
}

.related-item:hover {
    color: var(--glow);
}

#article-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--dim);
    cursor: pointer;
    z-index: 10;
    padding: 4px 8px;
    border: 1px solid rgba(0, 60, 100, .3);
    background: none;
    transition: color .2s, border-color .2s;
}

#article-close:hover {
    color: var(--glow);
    border-color: var(--glow);
}

/* ── MOUNTAINS — Fixed Full Width ────────────────────────── */
.mountain-layer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 22%;
    pointer-events: none;
    z-index: 30;
}

.mountain-layer:nth-of-type(1) {
    z-index: 28;
    opacity: .6;
    height: 25%;
}

/* back */
.mountain-layer:nth-of-type(2) {
    z-index: 29;
    opacity: .8;
    height: 23%;
}

/* mid */
.mountain-front {
    z-index: 31;
}

/* ── SYS BAR ─────────────────────────────────────────────── */
#sys-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 190;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0, 55, 90, .3);
    background: rgba(2, 5, 12, .9);
    transition: bottom .4s cubic-bezier(.16, 1, .3, 1);
}

.sys-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-right: 1px solid rgba(0, 45, 70, .4);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--dim);
    cursor: pointer;
    transition: color .2s, background .2s;
    white-space: nowrap;
}

.sys-node:hover {
    background: rgba(0, 60, 100, .15);
    color: var(--text);
}

.sys-node.ok .dot-s {
    background: var(--green);
    box-shadow: 0 0 5px var(--green);
}

.sys-node.warn .dot-s {
    background: var(--amber);
    box-shadow: 0 0 5px var(--amber);
}

.sys-node.off .dot-s {
    background: var(--dim);
}

.sys-node.live-sys .dot-s {
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
    animation: blink .9s infinite;
}

.dot-s {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

#sys-bar-right {
    margin-left: auto;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#term-toggle {
    cursor: pointer;
    padding: 4px 10px;
    border: 1px solid rgba(0, 100, 160, .3);
    color: var(--glow);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: none;
    transition: all .2s;
}

#term-toggle:hover {
    background: rgba(0, 207, 255, .08);
    border-color: var(--glow);
}

@media (max-width: 1180px) {
    #floating-hud {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        width: calc(100vw - 24px);
        top: 10px;
        gap: 8px;
    }

    .hud-left, .hud-center, .hud-right, .hud-celestial-bar {
        grid-column: 1;
    }

    .hud-left { grid-row: 1; }
    .hud-center { grid-row: 2; justify-content: flex-start; }
    .hud-right { grid-row: 3; justify-content: space-between; flex-wrap: wrap; }
    .hud-celestial-bar { grid-row: 4; }

    #floating-logo,
    #sections,
    #hud-right,
    #publish-launcher {
        transform: scale(.92);
        transform-origin: top left;
    }
}

@media (max-width: 760px) {
    #floating-logo,
    #sections,
    #hud-right {
        display: none;
    }

    #publish-launcher {
        top: auto;
        right: 16px;
        bottom: 120px;
    }

    #article-plane,
    #article-plane.open {
        width: min(92vw, 560px);
        transform: translate3d(calc(-46vw + 20px), -180px, 30px) scale(.96);
    }
}

/* ── TERMINAL ────────────────────────────────────────────── */
#terminal {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--term-bg);
    border-top: 1px solid var(--term-border);
    display: flex;
    flex-direction: column;
    transition: bottom .4s cubic-bezier(.16, 1, .3, 1), height .3s cubic-bezier(.16, 1, .3, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
}

#terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow), var(--amber), var(--glow), transparent);
    opacity: .4;
}

#term-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 55, 90, .35);
    flex-shrink: 0;
}

#term-identity {
    padding: 7px 14px;
    border-right: 1px solid rgba(0, 55, 90, .35);
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-icon {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 207, 255, .4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--glow);
    position: relative;
}

.agent-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(0, 207, 255, .15);
    animation: spin 8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.agent-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--glow);
    text-transform: uppercase;
}

.agent-role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6px;
    letter-spacing: 2px;
    color: var(--dim);
    text-transform: uppercase;
    margin-top: 1px;
}

#term-tabs {
    display: flex;
    flex: 1;
}

.term-tab {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 13px;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--dim);
    cursor: pointer;
    border-right: 1px solid rgba(0, 55, 90, .25);
    transition: color .2s;
    border-bottom: 2px solid transparent;
    position: relative;
    top: 1px;
}

.term-tab.active {
    color: var(--green);
    border-bottom-color: var(--green);
}

.term-tab:hover:not(.active) {
    color: var(--text);
}

#term-header-right {
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

#thinking-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity .3s;
}

#thinking-indicator.active {
    opacity: 1;
}

.thinking-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--green);
}

#thinking-indicator .thinking-dot:nth-child(1) {
    animation: tdot .9s 0s infinite;
}

#thinking-indicator .thinking-dot:nth-child(2) {
    animation: tdot .9s .2s infinite;
}

#thinking-indicator .thinking-dot:nth-child(3) {
    animation: tdot .9s .4s infinite;
}

@keyframes tdot {

    0%,
    100% {
        opacity: .2;
        transform: scale(.8)
    }

    50% {
        opacity: 1;
        transform: scale(1)
    }
}

#thinking-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--green);
    text-transform: uppercase;
}

#term-log {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
    min-height: 0;
}

#term-log::-webkit-scrollbar {
    width: 3px;
}

#term-log::-webkit-scrollbar-thumb {
    background: var(--dim);
}

.log-entry {
    padding: 4px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9.5px;
    line-height: 1.55;
    border-bottom: 1px solid rgba(0, 40, 65, .18);
}

.log-prefix {
    flex-shrink: 0;
    font-size: 7.5px;
    letter-spacing: 2px;
    width: 48px;
    text-transform: uppercase;
    padding-top: 1px;
}

.log-entry.user .log-prefix {
    color: var(--amber);
}

.log-entry.agent .log-prefix {
    color: var(--green);
}

.log-entry.system .log-prefix {
    color: var(--dim);
}

.log-entry.exec .log-prefix {
    color: var(--glow);
}

.log-entry.error .log-prefix {
    color: var(--red);
}

.log-text {
    color: var(--text);
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-entry.system .log-text {
    color: var(--dim);
    font-style: italic;
}

.log-entry.exec .log-text {
    color: rgba(0, 207, 255, .7);
}

.log-entry.error .log-text {
    color: var(--red);
}

/* ── COMMAND SUGGESTION STRIP ────────────────────────────── */
#cmd-suggestion-strip {
    border-top: 1px solid rgba(0, 45, 70, .3);
    border-bottom: 1px solid rgba(0, 45, 70, .3);
    height: 26px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: rgba(0, 8, 18, .6);
}

#cmd-suggestion-strip::before {
    content: 'CMD';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    background: rgba(0, 50, 90, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 2px;
    color: var(--dim);
    z-index: 2;
    border-right: 1px solid rgba(0, 45, 70, .3);
}

#cmd-suggestion-strip::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, var(--term-bg));
    z-index: 2;
}

#suggestion-scroll {
    position: absolute;
    top: 0;
    left: 44px;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sug-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    color: rgba(0, 150, 200, .45);
    padding: 0 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .2s, background .15s;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(0, 45, 70, .2);
}

.sug-item:hover {
    color: var(--glow);
    background: rgba(0, 207, 255, .04);
}

.sug-item.highlight {
    color: rgba(255, 184, 77, .65);
}

.sug-item.highlight:hover {
    color: var(--amber);
}

.sug-item.danger {
    color: rgba(255, 60, 60, .35);
}

.sug-item.danger:hover {
    color: var(--red);
}

.sug-item.action {
    color: rgba(57, 255, 20, .35);
}

.sug-item.action:hover {
    color: var(--green);
}

/* Quick command chips */
#quick-cmds {
    padding: 5px 14px;
    border-top: 1px solid rgba(0, 45, 70, .25);
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.qcmd {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 9px;
    border: 1px solid rgba(0, 80, 130, .3);
    color: var(--dim);
    cursor: pointer;
    background: none;
    transition: all .18s;
    white-space: nowrap;
}

.qcmd:hover,
.qcmd:active {
    transform: scale(.97);
}

.qcmd.c-glow:hover {
    border-color: var(--glow);
    color: var(--glow);
    background: rgba(0, 207, 255, .05);
}

.qcmd.c-amber:hover {
    border-color: var(--amber);
    color: var(--amber);
    background: rgba(255, 184, 77, .05);
}

.qcmd.c-green:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(57, 255, 20, .04);
}

.qcmd.c-red:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(255, 60, 60, .04);
}

.qcmd.c-purple:hover {
    border-color: var(--purple);
    color: var(--purple);
    background: rgba(192, 132, 252, .04);
}

/* Input */
#term-input-row {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0, 55, 90, .35);
    flex-shrink: 0;
}

#term-prompt {
    padding: 0 10px 0 14px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--green);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

#term-prompt::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

#term-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--text);
    padding: 9px 0;
    letter-spacing: .5px;
    caret-color: var(--green);
}

#term-input::placeholder {
    color: rgba(30, 58, 82, .5);
}

#term-send {
    padding: 7px 14px;
    border: none;
    background: none;
    border-left: 1px solid rgba(0, 55, 90, .35);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--green);
    cursor: pointer;
    text-transform: uppercase;
    transition: background .2s;
}

#term-send:hover {
    background: rgba(57, 255, 20, .07);
}

/* ── TICKER ──────────────────────────────────────────────── */
#ticker-wrap {
    position: fixed;
    z-index: 200;
    left: 0;
    right: 0;
    height: 26px;
    border-top: 1px solid rgba(0, 55, 90, .35);
    background: rgba(2, 6, 13, .93);
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: bottom .4s cubic-bezier(.16, 1, .3, 1);
}

#ticker-label {
    flex-shrink: 0;
    padding: 0 11px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--bg);
    background: var(--glow);
    height: 100%;
    display: flex;
    align-items: center;
}

#ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

#ticker-inner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--text);
    animation: ticker 60s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateY(-50%) translateX(100vw)
    }

    100% {
        transform: translateY(-50%) translateX(-100%)
    }
}

.tick-sep {
    color: var(--glow);
    margin: 0 14px;
    opacity: .35;
}

.tick-cat {
    color: var(--amber);
    margin-right: 6px;
    font-weight: 700;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

#hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    color: rgba(30, 58, 82, .55);
    text-transform: uppercase;
    z-index: 100;
    white-space: nowrap;
    transition: opacity .8s;
    pointer-events: none;
}

/* ── DIM LIGHTS (cinematic mode) ─────────────────────────── */
body.dim-lights #scene {
    background: rgba(0, 6, 12, .85);
}

body.dim-lights .card:not([style*="z-index: 200"]) {
    opacity: .1 !important;
    filter: blur(4px) brightness(.2) !important;
    pointer-events: none;
}

body.publish-mode-active .card:not(.side-feature):not(.side-widget) {
    opacity: .38;
    filter: blur(1px) brightness(.55);
    transform: translate3d(280px, 0, -120px) rotateY(-16deg) scale(.9) !important;
}

body.publish-mode-active .plane-left-rail {
    transform: translate3d(-40px, 0, 40px);
}

body.publish-mode-active #publish-launcher {
    opacity: .3;
}


