/* ========================================================
   BUDA OPUS 0 · 全站设计系统 (纯净工业流式自适应)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Kalam:wght@400;700&display=swap');

:root {
    --bg-light: #F4F4F0;
    --bg-dark: #0D0D10;
    --siren-gunship: #7A7F82;
    --ink-black: #141418;
    --ink-gray: #32353B;
    --ink-subtle: #52565E;
    --ink-reject: #D9383A;
    --line-subtle: rgba(0, 0, 0, 0.06);

    --gravity-damping: cubic-bezier(0.16, 1, 0.3, 1);
    --homing-damping: cubic-bezier(0.2, 0.8, 0.2, 1);

    --header-h: 80px;
    --header-gap-bottom: 9px;
    --footer-h: 64px;
    --pad-x: 64px;
    --logo-w: 156px;
    --dock-icon-w: 32px;

    --stage-gap-top: 16px;
    --stage-gap-bottom: 38px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-light);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
}

#app-frame {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-light);
    overflow: hidden;
}

/* ========================================================
   [1] 顶部指挥顶栏
   ======================================================== */
#global-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    padding: 0 var(--pad-x) var(--header-gap-bottom) var(--pad-x);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 1000;
}

#header-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-subtle);
    opacity: 0;
    transition: opacity 1.0s ease;
}
#header-divider.show { opacity: 1; }

#buda-box {
    width: var(--logo-w);
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
    cursor: default;
    transition: opacity 0.2s ease;
}
#buda-box.interactive {
    pointer-events: auto;
    cursor: pointer;
}
#buda-box.interactive:hover { opacity: 0.7; }
#buda-box img { width: 100%; height: auto; display: block; }

.product-dock-matrix { display: flex; gap: 20px; align-items: flex-end; }
.dock-slot { width: var(--dock-icon-w); opacity: 0; transition: opacity 1.0s ease; }
.dock-slot img { width: 100%; height: auto; display: block; }
.dock-slot.show { opacity: 1; }

/* ========================================================
   [2] 核心舞台视窗
   ======================================================== */
#stage-viewport {
    position: absolute;
    top: var(--header-h);
    bottom: var(--footer-h);
    left: 0;
    right: 0;
    overflow: hidden;
    z-index: 100;
    cursor: pointer;
}

.stage-safe-container {
    position: absolute;
    top: var(--stage-gap-top);
    bottom: var(--stage-gap-bottom);
    left: var(--pad-x);
    right: var(--pad-x);
    pointer-events: auto;
    transition: opacity 0.3s ease;
}
.stage-safe-container.stage-exiting { opacity: 0; }

/* Stage 1: OBS Bento Grid */
#obs-bento-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 3px;
    background-color: var(--bg-light);
    opacity: 0;
    transition: opacity 0.8s ease, background-color 1.0s ease;
}
#obs-bento-grid.active { opacity: 1; }
#obs-bento-grid.defocused { background-color: #141418; }
#obs-bento-grid.stage1-fadeout,
#obs-logic-overlay.stage1-fadeout {
    opacity: 0 !important;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bento-tile {
    position: relative;
    overflow: hidden;
    background: #1A1A1E;
    opacity: 0;
    transform: translateY(32px);
    transition: transform 1.3s var(--gravity-damping), opacity 0.9s ease;
}
.bento-tile.slid-in { opacity: 1; transform: translateY(0); }
.bento-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 1.0s ease, transform 1.2s ease;
}
#obs-bento-grid.defocused .bento-tile img { filter: brightness(0.48) blur(5px); transform: scale(1.04); }

.tile-hud {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    background: rgba(10, 14, 18, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    color: #E2E8F0;
    border-radius: 2px;
    z-index: 10;
}
.tile-hud span.val { color: #00FF7F; font-weight: 700; }
#obs-bento-grid.defocused .tile-hud { opacity: 0; }

.tile-1 { grid-column: 1 / span 5; grid-row: 1 / span 4; }
.tile-5 { grid-column: 6 / span 2; grid-row: 1 / span 4; }
.tile-2 { grid-column: 8 / span 3; grid-row: 1 / span 4; }
.tile-4 { grid-column: 11 / span 2; grid-row: 1 / span 3; }
.tile-3 { grid-column: 11 / span 2; grid-row: 4 / span 3; }
.tile-9 { grid-column: 1 / span 3; grid-row: 5 / span 2; }
.tile-6 { grid-column: 4 / span 2; grid-row: 5 / span 2; }
.tile-7 { grid-column: 6 / span 2; grid-row: 5 / span 2; }
.tile-8 { grid-column: 8 / span 3; grid-row: 5 / span 2; }

#obs-logic-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 200;
}
#obs-logic-overlay.active { opacity: 1; }

.logic-formula-bar {
    width: 780px;
    background: rgba(244, 244, 240, 0.96);
    backdrop-filter: blur(14px);
    padding: 14px 28px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 1.5s ease, transform 1.5s var(--gravity-damping);
}
.logic-formula-bar.show { opacity: 1; transform: translateY(0); }
.formula-header { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(0, 0, 0, 0.08); padding-bottom: 8px; font-family: "SF Mono", Consolas, monospace; font-size: 10px; color: rgba(20, 20, 24, 0.55); }
.formula-body { display: flex; justify-content: space-between; align-items: center; font-family: "SF Mono", Consolas, monospace; font-size: 13.5px; font-weight: 700; color: #141418; }
.formula-arrow { color: rgba(0, 0, 0, 0.35); font-weight: bold; }

.variable-stream { width: 780px; margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.var-line {
    background: rgba(13, 16, 20, 0.94);
    backdrop-filter: blur(10px);
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 11px 18px;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11.5px;
    color: #F4F4F0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.5s ease, transform 0.5s var(--gravity-damping);
}
.var-line.show { opacity: 1; transform: translateY(0); }
.var-line span.code { color: #CBD5E0; font-weight: 700; margin-right: 10px; }
.var-line.trans-buffer { border-left: 3px solid #F59E0B; background: rgba(28, 20, 10, 0.95); color: #FDE68A; }
.var-line.trans-buffer span.code { color: #F59E0B; }

.pulse-dots::after {
    content: ' .';
    display: inline-block;
    width: 24px;
    text-align: left;
    animation: dotPulse 1.2s infinite steps(1, start);
}
@keyframes dotPulse {
    0%   { content: ' .'; }
    33%  { content: ' ..'; }
    66%  { content: ' ...'; }
    100% { content: ' .'; }
}
.pulse-dots.frozen::after {
    content: ' ...';
    animation: none;
}

.var-line.crash-alert { border-left: 3px solid #FF2E4D; background: rgba(42, 10, 16, 0.96); color: #FFE4E6; }
.var-line.crash-alert span.code { color: #FF2E4D; }

/* Stage 2: HYP 纯思维推演场 */
#hyp-thinking-space {
    position: absolute;
    inset: 0;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.0s ease;
    z-index: 300;
}
#hyp-thinking-space.active { opacity: 1; pointer-events: auto; }

#hyp-board { position: relative; width: 1080px; height: 540px; }
#hyp-chalk-content {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
#hyp-chalk-content.faded { opacity: 0 !important; }

#hyp-sketch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 320; }
.hyp-line { fill: none; stroke: var(--ink-black); stroke-width: 1.8px; stroke-linecap: round; }
.hyp-reject-slash { fill: none; stroke: var(--ink-reject); stroke-width: 3.2px; stroke-linecap: round; }
.hyp-encircle-path { fill: none; stroke: var(--ink-black); stroke-width: 1.8px; stroke-linecap: round; }

#hyp-nodes-stage {
    position: absolute;
    inset: 0;
    font-family: 'Kalam', 'Caveat', 'Ink Free', 'Chalkboard SE', 'Segoe Print', cursive, sans-serif;
    z-index: 310;
}

.hyp-node {
    position: absolute;
    padding: 2px 4px;
    color: var(--ink-black);
    white-space: nowrap;
    user-select: none;
    opacity: 0;
    font-family: 'Kalam', 'Caveat', 'Ink Free', 'Chalkboard SE', 'Segoe Print', cursive, sans-serif;
    transition: opacity 0.5s ease;
}
.hyp-node.show { opacity: 1; }

.hyp-node.weight-small { font-size: 15px; font-weight: 700; color: var(--ink-black); letter-spacing: 0.02em; }
.hyp-node.weight-small .val { color: var(--ink-gray); font-weight: 400; margin-left: 8px; }
.hyp-node.weight-medium { font-size: 18px; font-weight: 700; color: var(--ink-black); letter-spacing: 0.02em; }
.hyp-node.weight-large { font-size: 21px; font-weight: 700; color: var(--ink-black); letter-spacing: 0.03em; }

.hyp-node.weight-ladder {
    position: absolute;
    top: 440px !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    height: auto !important;
    font-size: 23px;
    font-weight: 700;
    font-style: italic;
    color: var(--ink-black);
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    z-index: 315;
}

.chalk-text {
    display: inline-block;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    animation: chalkWipe 0.65s cubic-bezier(0.1, 0.6, 0.3, 1) forwards;
}
@keyframes chalkWipe { 0% { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } 100% { clip-path: polygon(0 0, 115% 0, 105% 100%, 0 100%); } }

.ladder-qmark-svg {
    width: 28px;
    height: 38px;
    overflow: visible;
    display: inline-block;
    vertical-align: middle;
    transform: skewX(-12deg);
}
.qmark-hook-path { fill: none; stroke: var(--ink-black); stroke-width: 3.2px; stroke-linecap: round; stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset 0.4s ease; }
.qmark-hook-path.draw { stroke-dashoffset: 0; }
.qmark-dot-elem { fill: var(--ink-black); opacity: 0; transition: opacity 0.15s ease; }
.qmark-dot-elem.draw { opacity: 1; }

#hyp-axiom-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2.0s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 340;
}
#hyp-axiom-layer.active { opacity: 1; }
#hyp-axiom-layer.closing { opacity: 0 !important; transition: opacity 1.2s ease !important; }
#hyp-final-question {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--ink-black);
    letter-spacing: -0.01em;
    text-align: center;
}

/* ========================================================
   Stage 3: ACT 空间操作系统 (严格在 16:9 沙盒内居中与演进)
   ======================================================== */
#act-stage-root {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 350;
    background: transparent;
}

.act-launcher {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.5s ease;
}
.act-launch-btn {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.act-launch-svg {
    width: 64px;
    height: 64px;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: none !important;
}
.act-launch-svg.show { opacity: 1; }

.act-launch-ripple {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72px;
    height: 72px;
    border: 1.5px solid #00AEEF;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.act-launch-ripple.expand { animation: actRippleAnim 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes actRippleAnim {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(3.5); opacity: 0; }
}

.act-cursor {
    position: absolute;
    top: 130px;
    left: 110px;
    opacity: 0;
    pointer-events: none;
    z-index: 60;
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}
.act-cursor.move-in { opacity: 1; transform: translate(-90px, -110px); }
.act-cursor.click { transform: translate(-90px, -110px) scale(0.85); }

/* 16:9 物理中段视窗 */
.act-spatial-stage {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 2px;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.act-spatial-stage.show { opacity: 1; }

.act-view {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: opacity, transform;
}
#act-aisle-view { z-index: 1; display: block; overflow: hidden; }
#act-topdown-view { z-index: 2; display: flex; align-items: center; justify-content: center; }
#act-ui-view { z-index: 3; display: flex; align-items: center; justify-content: center; }

.act-media-img,
.act-topdown-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    user-select: none !important;
}

.act-ui-viewport {
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transition: transform 2.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
.act-ui-viewport.zoom-top-left { transform: scale(1.52) translate(17%, 17%); }
.act-ui-viewport.zoom-bottom-right { transform: scale(1.52) translate(-17%, -17%); }
.act-ui-viewport.zoom-return { transform: scale(1.0) translate(0%, 0%); }
.act-ui-viewport.diverge { transform: scale(1.22); transition: transform 3.0s ease-out; }

.act-topdown-img { will-change: transform; }

.act-aisle-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    transform-origin: center center !important;
    will-change: transform;
    transition: none !important;
}

.act-hud-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 295px;
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-14px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.act-hud-overlay.visible { opacity: 1; transform: translateX(0); }
.act-tele-panel {
    background: rgba(14, 16, 20, 0.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid #00AEEF;
    padding: 10px 14px;
    border-radius: 3px;
}
.act-tele-head {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 5px;
    margin-bottom: 6px;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 9.5px;
    font-weight: 700;
    color: #A0A6AD;
}
.act-tele-head .freq { color: #00AEEF; }
.act-tele-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 94px;
    overflow: hidden;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 10.5px;
}
.act-tele-row { color: #E2E5E8; white-space: nowrap; }
.act-tele-row .sec { color: #8F959E; margin-right: 5px; }
.act-alert-box {
    margin-top: 6px;
    padding: 6px 9px;
    background: rgba(255, 60, 60, 0.22);
    border: 1px solid #FF3C3C;
    color: #FF6666;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    display: none;
    border-radius: 2px;
}
.act-alert-box.show { display: block; animation: flashActAlert 0.4s alternate infinite ease-in-out; }
@keyframes flashActAlert { from { opacity: 1; } to { opacity: 0.65; } }

.act-requirements-box {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 285px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 30;
    pointer-events: none;
    padding: 12px 16px;
    background: rgba(14, 16, 20, 0.52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: right 1.5s cubic-bezier(0.25, 1, 0.5, 1),
                transform 1.5s cubic-bezier(0.25, 1, 0.5, 1),
                width 1.5s cubic-bezier(0.25, 1, 0.5, 1),
                background 0.8s ease,
                backdrop-filter 0.8s ease,
                -webkit-backdrop-filter 0.8s ease,
                border-color 0.8s ease,
                box-shadow 0.8s ease,
                opacity 0.4s ease;
}
.act-requirements-box.show-box { opacity: 1; }
.act-req-line {
    display: none;
    align-items: center;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 1.2s ease;
}
.act-req-line.visible { display: flex; opacity: 1; transform: translateX(0); }
.act-req-line .idx { color: #00AEEF; width: 28px; flex-shrink: 0; }
.act-req-line .val { color: #F0F2F5; transition: color 1.2s ease; white-space: nowrap; }

.act-requirements-box.centered {
    right: 50% !important;
    transform: translate(50%, -50%) scale(1.16) !important;
    width: 320px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    gap: 13px;
}
.act-requirements-box.centered .act-req-line .val { color: #141418 !important; font-size: 13px; font-weight: 700; }
.act-requirements-box.centered .act-req-line .idx { color: #00AEEF !important; font-size: 13px; font-weight: 700; }

/* ========================================================
   Stage 4: SIREN 通用机器人底盘 (全状态机与盲悬浮工业视窗)
   ======================================================== */
.siren-stage-root {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 360;
    background: transparent;
}

/* 开场完整海妖 LOGO 浮现 */
.siren-logo-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
}
.siren-logo-box {
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.siren-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.siren-logo-img.visible {
    opacity: 1;
    transform: scale(1.0);
}

/* 核心视窗：自适应 16:9 画幅撑满 */
.siren-spatial-stage {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: transparent !important;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.8s ease;
    container-type: size;
    container-name: sirenStage;
}
.siren-spatial-stage.show { opacity: 1; }

/* 居中自适应布局骨架 (右栏锁定安全宽度，间隙刚性不可压缩) */
.siren-stage-layout {
    --stage-pad: clamp(24px, 2.8cqw, 44px);
    --stage-gap: clamp(32px, 3.6cqw, 52px);

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1560px;
    height: 88%;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--stage-gap);
    padding: 0 var(--stage-pad);
    box-sizing: border-box;
}

/* 底盘工位 (支持弹性收缩，在正方形窗口下优先缩小底盘以保护文字宽度) */
.siren-chassis-workstation {
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-shrink: 1;
    min-width: 0;
    opacity: 0;
    transform: translateX(calc(50cqw - 50% - var(--stage-pad)));
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 1.0s ease;
    z-index: 20;
}
.siren-chassis-workstation.visible { opacity: 1; }
.siren-chassis-workstation.docked-left {
    transform: translateX(0);
}

/* 左侧物理参照系卡片 (指示条 + 7:5大图 + 控制箭头) */
.siren-chassis-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.siren-view-indicator {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #6C737D;
    height: 22px;
    line-height: 22px;
    align-self: flex-start;
    padding-left: 2px;
}

/* 底盘 7:5 画布容器：双重数学限制，正方形与窄视窗下自动等比让位 */
.siren-canvas-box {
    position: relative;
    height: min(calc(100% - 50px), calc((100cqw - 380px - var(--stage-gap) - 2 * var(--stage-pad)) * 5 / 7));
    max-height: calc(100% - 50px);
    aspect-ratio: 7 / 5;
    border-radius: 3px;
    overflow: visible;
}

/* 双图交叉叠化 */
.siren-img-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}
.siren-img-layer.active {
    opacity: 1;
    transform: scale(1.0);
    pointer-events: auto;
}
.siren-img-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* 盲悬浮透明热区 (局部百分比锚定，绝对零漂移) */
.siren-hitbox {
    position: absolute;
    cursor: crosshair;
    z-index: 30;
    background: rgba(0, 0, 0, 0.001);
}

/* 真·磨砂玻璃动态信息卡 */
.siren-floating-card {
    position: absolute;
    width: 320px;
    background: rgba(16, 20, 26, 0.68) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-left: 3px solid #00AEEF !important;
    border-radius: 4px;
    padding: 14px 18px;
    color: #FFF;
    font-family: "SF Mono", Consolas, monospace;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 60;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38) !important;
}
.siren-floating-card.active {
    opacity: 1;
    transform: scale(1.0);
}
.siren-floating-card .card-head {
    font-size: 12px;
    font-weight: 700;
    color: #00AEEF;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.siren-floating-card .card-body {
    font-size: 12px;
    color: #F0F2F5;
    line-height: 1.5;
}

/* 底部切换控制器 */
.siren-view-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 24px;
}
.siren-nav-arrow {
    background: transparent;
    border: none;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    color: #6C737D;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 2px 6px;
    line-height: 1;
}
.siren-nav-arrow:hover {
    color: #00AEEF;
    transform: scale(1.15);
}

.siren-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.siren-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #CBD0D6;
    transition: background 0.3s ease;
}
.siren-dots .dot.active { background: #00AEEF; }
.siren-dots .dot-line {
    width: 20px;
    height: 1px;
    background: #D2D6DC;
}

/* ========================================================
   右侧工业规格展板：保底 380px 安全宽度，彻底杜绝文字贴脸
   ======================================================== */
.siren-specs-panel {
    flex: 1;
    min-width: 380px; /* 锁死最低安全宽度，杜绝倒计时与标题拥挤断裂 */
    max-width: 520px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 15;
}
.siren-specs-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

/* [1] 顶段：倒计时状态条与防断裂整行分层机制 */
.siren-telemetry-banner {
    background: rgba(14, 16, 20, 0.05);
    border: 1px solid rgba(20, 20, 24, 0.1);
    border-radius: 2px;
    padding: 7px 12px;
    min-height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.siren-telemetry-banner.active {
    opacity: 1;
    transform: translateY(0);
}
.siren-telemetry-banner .banner-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 空间不足时结构化折为两行，绝不破坏词组与括号 */
    gap: 4px 8px;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
}
.siren-telemetry-banner .banner-status {
    color: #383F48;
    letter-spacing: 0.04em;
    white-space: nowrap; /* 状态文本禁止内部折行，中括号永远完整 */
    flex-shrink: 0;
}
.siren-telemetry-banner .banner-status .paused-dot {
    color: #F59E0B;
    margin-right: 4px;
}
.siren-telemetry-banner .banner-action {
    background: transparent;
    border: none;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #00AEEF;
    cursor: pointer;
    padding: 0 4px;
    white-space: nowrap; /* 按钮绝不折断 [ INITIATE NOW ➔ ] */
    flex-shrink: 0;
    margin-left: auto;   /* 折行时自动沉底右对齐 */
    transition: opacity 0.2s ease;
}
.siren-telemetry-banner .banner-action:hover { opacity: 0.75; }

/* 倒流进度槽：高度提升至 3px 并附带青色发光 */
.siren-telemetry-banner .banner-progress-rail {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    margin-top: 6px;
    overflow: hidden;
    border-radius: 2px;
}
.siren-telemetry-banner .banner-progress-fill {
    width: 100%;
    height: 100%;
    background: #00AEEF;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(0, 174, 239, 0.45);
    transition: width 0.1s linear;
}

/* 规格内容容器 */
.siren-specs-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 8px;
}

/* [2] 标头层绝对固定：大号品牌标题 */
.siren-spec-header {
    flex-shrink: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.siren-spec-header .brand-title {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    color: #141418;
    letter-spacing: 0.03em;
    margin-bottom: 3px;
}
.siren-spec-header .brand-motto {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: #555D68;
}

/* [3] 核心视窗层：清晰常驻的工业微轨滚动条 (4px 槽道) */
.siren-spec-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 14px 8px 0;
    margin: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 20, 24, 0.32) rgba(0, 0, 0, 0.05);
}

/* 工业级常驻可视滑轨 (溢出时清晰可见，未溢出时静默) */
.siren-spec-grid::-webkit-scrollbar {
    width: 4px;
}
.siren-spec-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}
.siren-spec-grid::-webkit-scrollbar-thumb {
    background: rgba(20, 20, 24, 0.3);
    border-radius: 2px;
}
.siren-spec-grid::-webkit-scrollbar-thumb:hover {
    background: #00AEEF;
}

.spec-block {
    display: flex;
    gap: 10px;
    font-family: "SF Mono", Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #383F48;
}
.spec-block .num {
    color: #00AEEF;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 14px;
}
.spec-block .txt strong {
    color: #141418;
    font-weight: 800;
}

/* [4] 底段绝对固定：双行引言与落款 */
.siren-spec-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 8px;
    flex-shrink: 0;
    margin-top: auto;
}
.siren-spec-footer .quote {
    font-family: 'Newsreader', Georgia, serif;
    font-style: italic;
    font-size: 13px;
    line-height: 1.4;
    color: #5A626F;
    margin-bottom: 3px;
}
.siren-spec-footer .credit {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    color: #8C94A0;
    letter-spacing: 0.05em;
    text-align: right;
}

/* ========================================================
   [3] 物理基准线与工控行进导轨 (GPU 硬件加速，零卡顿)
   ======================================================== */
#ground-rail-system {
    position: absolute;
    bottom: var(--footer-h);
    left: 0;
    right: 0;
    height: 1px;
    z-index: 1200;
    pointer-events: none;
}
#ground-divider-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-subtle);
}

#siren-chassis {
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 38px;
    height: 27px;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
    z-index: 1210;
}
#siren-chassis.active { opacity: 1; }
#siren-chassis.chassis-sleeping { opacity: 0 !important; transition: opacity 1.2s ease; }
#siren-chassis.chassis-homing { transition: transform 1.0s var(--homing-damping) !important; }

.chassis-svg { display: block; width: 100%; height: 100%; }
.siren-mat { fill: var(--siren-gunship); fill-rule: evenodd; }

.siren-wheel {
    transform-box: fill-box;
    transform-origin: center center;
    animation: wheelForward 1.6s linear infinite;
}
@keyframes wheelForward { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wheelBackward { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

body.timeline-paused .siren-wheel,
#siren-chassis.chassis-parked .siren-wheel { animation-play-state: paused !important; }
#siren-chassis.chassis-homing .siren-wheel { animation: wheelBackward 0.6s linear infinite !important; }

.radar-emitter {
    position: absolute;
    top: 6.8px;
    left: 37.6px;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 1215;
}
.radar-arc {
    position: absolute;
    top: 0;
    left: 0;
    border: 2px solid var(--siren-gunship);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 50%, 100% 20%, 100% 80%);
    opacity: 0;
    animation: lidarScanPropagate 1.6s cubic-bezier(0.1, 0.6, 0.3, 1) infinite;
}
.radar-arc.arc-1 { animation-delay: 0s; }
.radar-arc.arc-2 { animation-delay: 0.8s; }
@keyframes lidarScanPropagate {
    0% { width: 6px; height: 6px; opacity: 1.0; }
    50% { opacity: 0.75; }
    100% { width: 54px; height: 54px; opacity: 0; }
}
body.timeline-paused .radar-arc { animation-play-state: paused !important; opacity: 0.6 !important; }
#siren-chassis.chassis-parked .radar-emitter,
#siren-chassis.chassis-homing .radar-emitter,
#siren-chassis.chassis-sleeping .radar-emitter { display: none !important; }

#station-hotspots {
    position: absolute;
    bottom: -18px;
    left: var(--pad-x);
    right: var(--pad-x);
    height: 36px;
    display: flex;
    pointer-events: auto;
}
.station-slot { position: relative; flex: 1; height: 100%; cursor: pointer; }
.station-slot.locked-slot { cursor: default; }
.slot-tip {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translate(-50%, 0);
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    color: #141418;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.station-slot:hover .slot-tip { opacity: 1; transform: translate(-50%, -2px); }
.station-slot.locked-slot .slot-tip { color: #8A8A93; }

/* [4] 底部底栏 */
#global-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--pad-x);
    border-top: 1px solid var(--line-subtle);
    font-family: "SF Mono", Consolas, monospace;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 1.0s ease;
    z-index: 1000;
}
#global-footer.show { opacity: 1; }
.copyable-text { user-select: text; cursor: text; }