:root {
  --bg: #080d0b;
  --panel: rgba(15, 22, 19, .94);
  --panel-2: #111a16;
  --panel-3: #0c1411;
  --ink: #edf6f1;
  --muted: #91a39a;
  --line: #26342e;
  --green: #43d7a0;
  --green-2: #20bd83;
  --lime: #c8f26a;
  --amber: #e6a63a;
  --red: #ee7967;
  --hand-left: #5feb46;
  --hand-right: #e15ae6;
  --shadow: 0 14px 38px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 72% -5%, rgba(44, 117, 86, .2), transparent 36rem), linear-gradient(180deg, #0a100d 0%, var(--bg) 54%); font-family: Inter, "Segoe UI", sans-serif; }
main { width: min(1700px, 96vw); margin: 0 auto; padding: 30px 0 50px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.panel-kicker { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
h1 { margin: 4px 0 3px; font-size: clamp(27px, 3vw, 43px); line-height: 1; letter-spacing: -.04em; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.identity { text-align: right; }
.identity span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.identity strong { display: block; margin-top: 5px; font-family: Consolas, monospace; font-size: 12px; font-weight: 600; }
.workspace { display: grid; grid-template-columns: minmax(0, 3.05fr) minmax(290px, 1fr); gap: 12px; align-items: stretch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.viewer-panel { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-head h2 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.02em; }
.panel-head.compact { padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.frame-readout { display: grid; grid-template-columns: auto auto; column-gap: 10px; text-align: right; align-items: baseline; }
.frame-readout span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.frame-readout strong { font: 700 21px/1 Consolas, monospace; }
.frame-readout em { grid-column: 1 / -1; margin-top: 3px; color: var(--muted); font: normal 10px Consolas, monospace; }
.view-tabs { display: flex; gap: 5px; margin: 13px 0 10px; overflow-x: auto; scrollbar-width: none; }
.view-tabs button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #101815; color: #a3b4ab; font: 700 10px inherit; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.view-tabs button:hover { border-color: #466055; color: var(--ink); background: #16211c; }
.view-tabs button.active { color: #06100c; border-color: var(--green); background: var(--green); }
.video-shell { position: relative; overflow: hidden; background: #07110d; border-radius: 10px; aspect-ratio: 3 / 2; }
.video-shell video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-badge { position: absolute; left: 13px; top: 13px; max-width: 70%; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.17); border-radius: 7px; color: white; background: rgba(4,14,10,.72); backdrop-filter: blur(9px); font-size: 10px; }
.live-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); }
.depth-legend { position:absolute; right:13px; bottom:44px; display:grid; grid-template-columns:auto 120px auto; align-items:center; gap:7px; padding:7px 9px; border:1px solid rgba(255,255,255,.18); border-radius:7px; color:white; background:rgba(4,14,10,.74); backdrop-filter:blur(9px); font-size:8px; }
.depth-legend[hidden] { display:none; }
.depth-legend i { height:6px; border-radius:999px; background:linear-gradient(90deg,#f0ad2f 0%,#ffe88b 35%,#a9d8df 68%,#4c86c6 100%); }
.depth-legend em { grid-column:1 / -1; color:#bdc9c3; font:normal 7px Consolas,monospace; text-align:center; }
.right-stack { display: grid; grid-template-rows: 1fr; gap: 12px; }
.current-action { display: flex; flex-direction: column; }
.action-index { margin: 18px 18px 8px; color: var(--green); font: 800 9px Consolas, monospace; letter-spacing: .1em; }
.current-action h3 { min-height: 58px; margin: 0 18px 9px; font-size: clamp(19px, 1.5vw, 27px); line-height: 1.12; letter-spacing: -.035em; }
.action-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding: 15px 18px; border-top: 1px solid var(--line); color: var(--muted); font: 700 9px Consolas,monospace; }
.action-position { display: grid; gap: 4px; }
.action-position strong { color: var(--green); font: 800 9px Consolas,monospace; }
.mini-head { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .12em; }
.mini-head span { color: var(--green); font-weight: 900; }
.mini-head strong { color: var(--muted); font-weight: 700; }
.hand-key { display:inline-block; width:7px; height:7px; margin:0 3px 0 7px; border-radius:50%; vertical-align:middle; box-shadow:0 0 0 1px rgba(255,255,255,.18); }
.hand-key:first-child { margin-left:0; }
.hand-key.left-hand { background:var(--hand-left); }
.hand-key.right-hand { background:var(--hand-right); }
.embedded-segments { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.embedded-segments-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.embedded-segments-head h2 { margin: 2px 0 0; font-size: 14px; }
.timeline-panel { margin-top: 12px; padding-bottom: 10px; }
.timeline-scroll { overflow: hidden; margin: 15px 16px 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-3); }
.timeline-track { width: 100%; height: 124px; position: relative; display: flex; background: linear-gradient(180deg, #121b17 0%, #0d1512 100%); }
.timeline-track::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 22px; height: 2px; background: #405048; }
.timeline-segment { --seg: #238463; position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 124px; padding: 13px 7px 38px; border: 0; border-right: 1px dashed #29372f; color: #b7c6be; background: transparent; text-align: left; font: 650 8px/1.3 inherit; overflow: hidden; cursor: pointer; transition: background .15s ease, color .15s ease; }
.timeline-segment::before { content: ""; position: absolute; z-index: 2; left: 50%; bottom: 18px; width: 9px; height: 9px; border: 2px solid #0d1512; border-radius: 50%; background: var(--seg); box-shadow: 0 0 0 1px var(--seg); transform: translateX(-50%); }
.timeline-segment::after { content: ""; position: absolute; left: 10px; right: 10px; top: 7px; height: 2px; border-radius: 2px; background: var(--seg); opacity: .7; }
.timeline-segment:hover { color: var(--ink); background: #17231e; }
.timeline-segment.active { z-index: 2; color: #e9fff5; background: rgba(67,215,160,.1); box-shadow: inset 0 0 0 1px rgba(67,215,160,.32); }
.timeline-segment.active::before { width: 12px; height: 12px; bottom: 16px; box-shadow: 0 0 0 3px rgba(35,132,99,.16); }
.timeline-segment small { display:flex; justify-content:space-between; gap:5px; margin-bottom:6px; color:#82958b; font: 600 7px Consolas,monospace; white-space:nowrap; }
.timeline-segment small b { color:#a8bab0; font:inherit; }
.timeline-segment small span { overflow:hidden; text-overflow:ellipsis; }
.timeline-label { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.playhead { width: 2px; height: 132px; position: absolute; z-index: 5; top: -4px; left: 0; pointer-events: none; background: #f0fff8; box-shadow: 0 0 0 1px rgba(67,215,160,.52), 0 0 10px rgba(67,215,160,.42); }
.playhead::before { content:""; position:absolute; top:-1px; left:-4px; border-left:5px solid transparent; border-right:5px solid transparent; border-top:7px solid #f0fff8; }
.timeline-ruler { position: relative; height: 23px; color: #82958b; background: #0b120f; border-top: 1px solid var(--line); font: 7px Consolas,monospace; overflow: hidden; }
.timeline-ruler span { position: absolute; transform: translateX(-50%); }
.timeline-ruler span:first-child { transform: none; }
.timeline-ruler .timeline-ruler-end { transform: translateX(-100%); }
.bottom-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; margin-top: 12px; align-items: start; }
.segment-list { height: 228px; overflow-y: auto; scrollbar-color: #405048 transparent; }
.segment-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 15px; border: 0; border-bottom: 1px solid #1f2b26; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.segment-row:hover { background: #141f1a; }.segment-row.active { background: rgba(67,215,160,.1); box-shadow: inset 3px 0 var(--green); }
.segment-row time { color: var(--muted); font: normal 9px Consolas,monospace; }.segment-row strong { font-size: 11px; }
.segment-row time { display:grid; gap:3px; }
.segment-row time small { color:var(--green); font:700 8px Consolas,monospace; }
.segment-count { color: var(--muted); font: 700 10px Consolas,monospace; }
.slam-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.slam-gallery figure { display: flex; flex-direction: column; min-width: 0; height: 300px; margin: 0; background: var(--panel-3); }
.slam-gallery img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #090f0d; }
.dense-map-panel figure { height: 300px; margin: 0; background: #090f0d; }
.dense-map-panel img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 1fr; }.right-stack { grid-template-columns: 1fr; grid-template-rows: 260px; }.bottom-grid{grid-template-columns:1fr}.identity{display:none} }
@media (max-width: 680px) { main{width:94vw;padding-top:20px}.right-stack{grid-template-columns:1fr;grid-template-rows:240px}.hero p{font-size:11px}.slam-gallery{grid-template-columns:1fr}.slam-gallery figure,.dense-map-panel figure{height:280px}.video-badge{display:none} }
