:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(14, 18, 25, .97);
  --panel-2: #111720;
  --panel-3: #18202b;
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #e8edf5;
  --muted: #8792a2;
  --soft: #b2bdcb;
  --accent: #63e4b6;
  --accent-2: #6ba7ff;
  --warning: #e8b463;
  --danger: #ef7187;
  --top-h: 54px;
  --left-w: 278px;
  --right-w: 288px;
  --timeline-h: 116px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }

::selection { background: rgba(99, 228, 182, .28); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #313a47; border-radius: 10px; }

.boot-screen {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center;
  gap: 20px; background: radial-gradient(circle at 50% 42%, #182932 0, #0b1016 28%, #06080b 68%);
}
.boot-screen.boot-error .boot-mark { border-color: rgba(239, 113, 135, .3); }
.boot-screen.boot-error .boot-mark span { background: var(--danger); box-shadow: 0 0 30px var(--danger); }
.boot-mark { width: 78px; height: 78px; border: 1px solid rgba(99, 228, 182, .22); border-radius: 50%; position: relative; }
.boot-mark::before, .boot-mark::after { content: ""; position: absolute; inset: 9px -7px; border: 1px solid rgba(107, 167, 255, .28); border-radius: 50%; transform: rotate(35deg); }
.boot-mark::before { animation: boot-orbit-a 5.5s linear infinite; }
.boot-mark::after { transform: rotate(-35deg); animation: boot-orbit-b 7s linear infinite reverse; }
.boot-mark span { position: absolute; width: 12px; height: 12px; left: 50%; top: 50%; margin: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 30px var(--accent); animation: boot-satellite 1.2s linear infinite; }
.boot-copy { display: grid; justify-items: center; gap: 7px; letter-spacing: .02em; }
.boot-copy strong { font-size: 22px; font-weight: 620; }
.boot-copy small { color: var(--muted); }
@keyframes boot-orbit-a { from { transform: rotate(35deg); } to { transform: rotate(395deg); } }
@keyframes boot-orbit-b { from { transform: rotate(-35deg); } to { transform: rotate(325deg); } }
@keyframes boot-satellite { from { transform: rotate(0deg) translateX(37px); } to { transform: rotate(360deg) translateX(37px); } }

.studio-shell { height: 100%; display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr) var(--timeline-h); }
.topbar { display: grid; grid-template-columns: var(--left-w) 1fr auto; align-items: center; height: var(--top-h); border-bottom: 1px solid var(--line); background: #0b0f15; z-index: 20; }
.brand { height: 100%; display: flex; align-items: center; gap: 11px; padding: 0 16px; border-right: 1px solid var(--line); }
.brand > div:last-child { display: flex; align-items: baseline; gap: 6px; }
.brand b { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.brand span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.brand-orbit { width: 25px; height: 25px; position: relative; border: 1px solid rgba(99, 228, 182, .52); border-radius: 50%; transform: rotate(-18deg); }
.brand-orbit::after { content: ""; position: absolute; inset: 7px -4px; border: 1px solid var(--accent-2); border-radius: 50%; }
.brand-orbit i { position: absolute; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; left: -1px; top: 3px; box-shadow: 0 0 10px var(--accent); }
.project-identity { justify-self: start; padding-left: 18px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-name { width: min(32vw, 360px); color: var(--text); border: 1px solid transparent; background: transparent; padding: 6px 8px; border-radius: 5px; font-size: 13px; font-weight: 590; }
.project-name:hover, .project-name:focus { border-color: var(--line-strong); background: rgba(255,255,255,.025); outline: none; }
.save-state { color: var(--muted); font-size: 10px; white-space: nowrap; }
.save-state.dirty { color: var(--warning); }
.save-state.saved { color: var(--accent); }
.top-actions { height: 100%; display: flex; align-items: center; gap: 5px; padding: 0 12px; }
.tool-button, .icon-button { height: 31px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 11px; cursor: pointer; }
.tool-button { padding: 0 10px; color: var(--soft); }
.tool-button span { color: var(--muted); margin-right: 4px; }
.tool-button:hover, .icon-button:hover { border-color: var(--line-strong); background: var(--panel-3); color: #fff; }
.tool-button.primary { border-color: rgba(99, 228, 182, .32); background: rgba(99, 228, 182, .11); color: var(--accent); }
.icon-button { width: 31px; font-size: 14px; color: var(--muted); }

.workspace { min-height: 0; display: grid; grid-template-columns: var(--left-w) minmax(360px, 1fr) var(--right-w); }
.panel { min-height: 0; background: var(--panel); z-index: 10; }
.left-panel { border-right: 1px solid var(--line); }
.right-panel { border-left: 1px solid var(--line); }
.panel-tabs { height: 42px; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); padding: 0 8px; }
.panel-tab { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 10px; letter-spacing: .04em; cursor: pointer; }
.panel-tab:hover { color: var(--soft); }
.panel-tab.active { border-color: var(--accent); color: var(--text); }
.panel-page { display: none; height: calc(100% - 42px); overflow-y: auto; padding: 15px 13px 24px; }
.panel-page.active { display: block; }
.section-label { color: var(--muted); text-transform: uppercase; letter-spacing: .105em; font-size: 9px; font-weight: 720; margin: 4px 2px 10px; }
.section-label.space-between { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.text-button { background: none; border: 0; color: var(--accent); padding: 3px; text-transform: none; letter-spacing: 0; font-size: 10px; cursor: pointer; }

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-card { min-height: 89px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-content: center; text-align: left; column-gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(145deg, #151c25, #10151c); padding: 11px; cursor: pointer; transition: .14s ease; }
.preset-card:hover { transform: translateY(-1px); border-color: rgba(99, 228, 182, .35); box-shadow: 0 7px 22px rgba(0,0,0,.22); }
.preset-card b { align-self: end; font-size: 11px; font-weight: 620; }
.preset-card small { align-self: start; color: var(--muted); font-size: 9px; line-height: 1.35; margin-top: 3px; }
.preset-icon { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; align-self: center; border: 1px solid rgba(107,167,255,.22); border-radius: 50%; color: var(--accent-2); background: rgba(107,167,255,.06); font-size: 17px; }

.keyframe-list, .project-list { display: grid; gap: 5px; }
.empty-list { min-height: 135px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 7px; }
.empty-state { text-align: center; color: var(--muted); }
.empty-state span { color: var(--accent-2); font-size: 16px; }
.empty-state p { font-size: 10px; margin: 8px 0 3px; color: var(--soft); }
.empty-state small { font-size: 9px; }
.keyframe-row, .project-row { position: relative; display: grid; align-items: center; gap: 7px; min-height: 47px; border: 1px solid var(--line); border-radius: 6px; background: #121821; cursor: pointer; }
.keyframe-row { grid-template-columns: 32px minmax(0, 1fr) 50px 24px; padding: 6px 6px 6px 8px; }
.keyframe-row:hover, .project-row:hover { border-color: var(--line-strong); background: #161e28; }
.keyframe-row.active { border-color: rgba(99,228,182,.4); background: rgba(99,228,182,.055); }
.keyframe-index { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(107,167,255,.1); color: var(--accent-2); font-size: 9px; }
.keyframe-copy, .project-copy { min-width: 0; display: grid; gap: 3px; }
.keyframe-copy b, .project-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 610; }
.keyframe-copy small, .project-copy small { color: var(--muted); font-size: 8px; }
.keyframe-frame { width: 50px; min-width: 0; padding: 4px 3px; border: 1px solid var(--line); border-radius: 4px; background: #0d131b; color: var(--soft); font: 9px ui-monospace, monospace; text-align: center; }
.keyframe-frame:hover, .keyframe-frame:focus { border-color: var(--accent-2); color: var(--text); outline: none; }
.keyframe-delete { border: 0; background: transparent; color: var(--muted); border-radius: 4px; cursor: pointer; }
.keyframe-delete:hover { color: var(--danger); background: rgba(239,113,135,.1); }

.keyframe-context-menu { position: fixed; z-index: 3000; width: 248px; padding: 6px; border: 1px solid #344151; border-radius: 8px; background: rgba(14,19,26,.98); color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.58); backdrop-filter: blur(12px); }
.keyframe-context-menu[hidden] { display: none; }
.keyframe-context-menu header { min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 3px 7px 7px; border-bottom: 1px solid var(--line); }
.keyframe-context-menu header span { min-width: 0; display: grid; gap: 3px; }
.keyframe-context-menu header b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.keyframe-context-menu header small { color: var(--muted); font: 8px ui-monospace, monospace; }
.keyframe-context-menu header kbd { border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px; color: var(--muted); background: #090d12; font: 7px ui-monospace, monospace; }
.keyframe-menu-group { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.keyframe-menu-group:last-child { border-bottom: 0; padding-bottom: 0; }
.keyframe-menu-group > span { padding: 1px 7px 4px; color: #677383; font-size: 7px; letter-spacing: .12em; }
.keyframe-menu-group button { min-height: 34px; display: grid; grid-template-columns: 24px 1fr auto; grid-template-rows: auto auto; column-gap: 5px; align-items: center; padding: 5px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--soft); text-align: left; cursor: pointer; }
.keyframe-menu-group button:hover, .keyframe-menu-group button:focus-visible { border-color: var(--line); background: #18212c; outline: none; }
.keyframe-menu-group button.active { border-color: rgba(99,228,182,.25); background: rgba(99,228,182,.07); color: var(--accent); }
.keyframe-menu-group button:disabled { opacity: .35; cursor: not-allowed; }
.keyframe-menu-group button i { grid-row: 1 / 3; width: 21px; color: var(--accent-2); font-style: normal; text-align: center; }
.keyframe-menu-group button b { font-size: 9px; font-weight: 590; }
.keyframe-menu-group button small { grid-column: 2 / 4; color: var(--muted); font-size: 7px; }
.keyframe-menu-group button.danger:hover, .keyframe-menu-group button.danger:focus-visible { border-color: rgba(239,113,135,.28); background: rgba(239,113,135,.08); color: var(--danger); }
.keyframe-menu-group.compact { grid-template-columns: 1fr 1fr; }
.keyframe-menu-group.compact button { grid-template-columns: 20px 1fr; }
.keyframe-menu-group.compact button small { grid-column: 2; }

.project-row { grid-template-columns: 1fr auto; padding: 10px; }
.project-row button { border: 1px solid var(--line); border-radius: 4px; background: #1a2330; color: var(--soft); padding: 5px 8px; font-size: 9px; cursor: pointer; }
.inline-loader, .panel-note { color: var(--muted); font-size: 9px; line-height: 1.5; padding: 10px 3px; }

.layer-list { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.layer-row { min-height: 54px; display: grid; grid-template-columns: 27px 1fr 18px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.layer-row:last-child { border: 0; }
.layer-row:hover { background: rgba(255,255,255,.018); }
.layer-row input { display: none; }
.switch { width: 26px; height: 14px; border-radius: 9px; background: #303947; position: relative; transition: .16s; }
.switch::after { content: ""; position: absolute; width: 10px; height: 10px; left: 2px; top: 2px; border-radius: 50%; background: #8792a2; transition: .16s; }
.layer-row input:checked + .switch { background: rgba(99,228,182,.28); }
.layer-row input:checked + .switch::after { left: 14px; background: var(--accent); box-shadow: 0 0 8px rgba(99,228,182,.5); }
.layer-copy { display: grid; gap: 3px; }
.layer-copy b { font-size: 10px; font-weight: 610; }
.layer-copy small { color: var(--muted); font-size: 8px; }
.layer-swatch { width: 13px; height: 13px; border-radius: 3px; background: #555; }
.imagery-swatch { background: linear-gradient(135deg, #344e3d, #9b8853); }
.terrain-swatch { background: linear-gradient(135deg, #65533d, #384a37); }
.buildings-swatch { background: #7990a6; }
.preset-card.custom-card { grid-column: 1 / -1; min-height: 67px; }
.custom-icon { color: var(--accent); border-color: rgba(99,228,182,.25); background: rgba(99,228,182,.06); }
.lidar-swatch { background: #d35bea; box-shadow: 0 0 8px rgba(211,91,234,.32); }
.traffic-swatch { background: #f09a55; }
.source-facts { margin-top: 20px; }
.source-facts dl { margin: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.source-facts dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; border-bottom: 1px solid var(--line); font-size: 9px; }
.source-facts dl div:last-child { border: 0; }
.source-facts dt { color: var(--muted); }
.source-facts dd { margin: 0; color: var(--soft); text-align: right; }
.datum-warning { border-left: 2px solid var(--warning); padding: 7px 9px; color: #bcae92; background: rgba(232,180,99,.055); font-size: 8px; line-height: 1.5; }

.viewport-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #05070a; }
#cesium-container { position: absolute; inset: 0; }
#cesium-container .cesium-viewer-bottom, #cesium-container .cesium-viewer-toolbar, #cesium-container .cesium-viewer-animationContainer, #cesium-container .cesium-viewer-timelineContainer, #cesium-container .cesium-viewer-fullscreenContainer { display: none !important; }
#cesium-container .cesium-widget-credits { opacity: .58; font-size: 8px; }
.viewport-wrap::after { content: ""; pointer-events: none; position: absolute; inset: 0; box-shadow: inset 0 0 90px rgba(0,0,0,.2); }
.viewport-tools { position: absolute; top: 12px; z-index: 5; display: flex; gap: 5px; }
.left-tools { left: 12px; }
.right-tools { right: 12px; }
.viewport-button { min-width: 33px; height: 33px; border: 1px solid rgba(255,255,255,.13); border-radius: 5px; background: rgba(12,17,24,.84); backdrop-filter: blur(8px); color: var(--soft); cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,.22); }
.viewport-button.wide { padding: 0 10px; font-size: 10px; }
.viewport-button:hover, .viewport-button.active { color: var(--accent); border-color: rgba(99,228,182,.38); background: rgba(19,30,34,.9); }
.viewport-status { position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; color: rgba(225,232,241,.7); text-shadow: 0 1px 3px #000; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-pill { display: flex; gap: 6px; align-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(6,9,13,.7); padding: 4px 8px; backdrop-filter: blur(5px); }
.status-pill i { width: 5px; height: 5px; background: var(--warning); border-radius: 50%; }
.status-pill.ready i { background: var(--accent); }
.target-readout { position: absolute; z-index: 6; left: 50%; top: 12px; transform: translateX(-50%); display: grid; grid-template-columns: 9px auto 22px; grid-template-rows: auto auto; column-gap: 7px; padding: 7px 8px; min-width: 210px; border: 1px solid rgba(107,167,255,.35); border-radius: 6px; background: rgba(10,15,22,.9); backdrop-filter: blur(8px); }
.target-readout > span { grid-row: 1/3; align-self: center; width: 7px; height: 7px; border: 1px solid var(--accent-2); border-radius: 50%; box-shadow: 0 0 8px var(--accent-2); }
.target-readout b { font-size: 9px; }
.target-readout small { color: var(--muted); font: 8px ui-monospace, monospace; }
.target-readout button { grid-column: 3; grid-row: 1/3; border: 0; background: none; color: var(--muted); cursor: pointer; }
.toast-stack { position: absolute; right: 12px; bottom: 35px; z-index: 30; display: grid; gap: 7px; justify-items: end; }
.toast { max-width: 320px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(14,20,28,.94); box-shadow: 0 8px 25px rgba(0,0,0,.35); color: var(--soft); font-size: 9px; animation: toast-in .2s ease; }
.toast.success { border-left: 2px solid var(--accent); }
.toast.warning { border-left: 2px solid var(--warning); }
.toast.error { border-left: 2px solid var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } }

.inspector-head { height: 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 13px; font-size: 11px; font-weight: 610; }
.inspector-head small { font-size: 8px; letter-spacing: .13em; color: var(--accent-2); }
.inspector-scroll { height: calc(100% - 42px); overflow-y: auto; }
.inspector-section { border-bottom: 1px solid var(--line); }
.section-toggle { width: 100%; height: 35px; display: flex; justify-content: space-between; align-items: center; padding: 0 13px; border: 0; background: none; color: var(--soft); font-size: 9px; font-weight: 650; cursor: pointer; }
.section-toggle i { color: var(--muted); font-style: normal; transition: .16s; }
.inspector-section.collapsed .section-toggle i { transform: rotate(180deg); }
.inspector-section.collapsed .section-body { display: none; }
.section-body { padding: 2px 13px 14px; }
.coordinate-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.triple-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.double-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.field, .select-field { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.field > div { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: #0d1219; }
.field input { width: 100%; min-width: 0; height: 27px; padding: 0 6px; border: 0; outline: none; background: transparent; color: var(--text); font: 9px ui-monospace, monospace; }
.field em { padding-right: 6px; color: #657182; font-style: normal; font-size: 8px; }
.field > div:focus-within { border-color: rgba(99,228,182,.35); }
.datum-tag { display: flex; justify-content: space-between; margin: 8px 0 0; padding: 6px 7px; border-radius: 4px; background: rgba(107,167,255,.055); color: var(--muted); font-size: 7px; letter-spacing: .06em; }
.datum-tag b { color: var(--accent-2); font-weight: 570; letter-spacing: 0; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.button { min-height: 30px; border-radius: 5px; border: 1px solid var(--line-strong); background: #19212c; color: var(--soft); font-size: 9px; cursor: pointer; }
.button:hover { filter: brightness(1.15); }
.button.primary { border-color: rgba(99,228,182,.3); background: rgba(99,228,182,.13); color: var(--accent); }
.button.secondary { background: #151c25; }
.range-field { display: grid; gap: 8px; color: var(--muted); font-size: 8px; }
.range-field > span { display: flex; justify-content: space-between; }
.range-field output { color: var(--soft); }
input[type="range"] { accent-color: var(--accent); }
.select-field { margin-top: 9px; }
.select-field select, .select-field input { width: 100%; height: 29px; border: 1px solid var(--line); border-radius: 4px; background: #0d1219; color: var(--soft); padding: 0 7px; outline: none; font-size: 9px; }
.check-field { min-height: 26px; display: flex; gap: 7px; align-items: center; color: var(--soft); font-size: 9px; }
.check-field input { accent-color: var(--accent); }

.timeline-panel { min-width: 0; display: grid; grid-template-columns: 218px 126px minmax(250px, 1fr) 150px; align-items: center; border-top: 1px solid var(--line); background: #0a0e13; z-index: 20; }
.playback-controls { display: flex; justify-content: center; align-items: center; gap: 5px; border-right: 1px solid var(--line); height: 100%; }
.transport-button, .play-button { display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 9px; }
.transport-button { width: 25px; height: 25px; }
.play-button { width: 36px; height: 36px; border: 1px solid rgba(99,228,182,.28); border-radius: 50%; background: rgba(99,228,182,.1); color: var(--accent); padding-left: 2px; }
.transport-button:hover { color: var(--text); }
.timecode { display: flex; align-items: baseline; justify-content: center; gap: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.timecode b { font-size: 11px; font-weight: 520; color: var(--text); }
.timecode span, .timecode small { color: var(--muted); font-size: 8px; }
.timeline-track-wrap { min-width: 0; align-self: stretch; padding: 23px 12px 13px; display: grid; grid-template-rows: 19px 1fr; }
.timeline-ruler { display: flex; justify-content: space-between; color: #5f6977; font: 7px ui-monospace, monospace; border-bottom: 1px solid var(--line); }
.timeline-track { position: relative; margin-top: 7px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #10161e; overflow: visible; }
.timeline-track::before { content: "CAMERA"; position: absolute; left: 6px; top: 5px; color: #566171; font-size: 7px; letter-spacing: .08em; }
.timeline-progress { position: absolute; inset: 0 auto 0 0; width: 0; pointer-events: none; background: rgba(99,228,182,.055); border-right: 1px solid var(--accent); }
.timeline-markers { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.timeline-marker { position: absolute; top: 17px; width: 7px; height: 7px; transform: translate(-50%, -50%) rotate(45deg); background: var(--accent-2); border: 1px solid #b4d0ff; box-shadow: 0 0 6px rgba(107,167,255,.5); pointer-events: auto; cursor: ew-resize; touch-action: none; }
.timeline-marker::after { content: ""; position: absolute; inset: -8px; }
.timeline-marker:hover, .timeline-marker.dragging { background: var(--accent); border-color: #caffed; box-shadow: 0 0 10px rgba(99,228,182,.75); }
.timeline-marker.eased { border-radius: 50%; }
.timeline-marker.smooth-path { background: var(--accent); box-shadow: 0 0 9px rgba(99,228,182,.72); }
#timeline-scrubber { z-index: 1; position: absolute; inset: -6px -1px; width: calc(100% + 2px); height: calc(100% + 12px); margin: 0; opacity: 0; cursor: ew-resize; }
.timeline-meta { height: 100%; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font: 8px ui-monospace, monospace; }
.timeline-meta b { color: var(--text); }
.chip-button { border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
.chip-button.active { border-color: rgba(99,228,182,.28); color: var(--accent); background: rgba(99,228,182,.06); }

.studio-dialog { width: min(620px, calc(100vw - 30px)); max-height: min(720px, calc(100vh - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 9px; background: #10161e; color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.studio-dialog::backdrop { background: rgba(2,4,7,.72); backdrop-filter: blur(4px); }
.studio-dialog form { margin: 0; }
.dialog-head { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.dialog-head > div { display: grid; gap: 4px; }
.dialog-head b { font-size: 13px; }
.dialog-head small { color: var(--muted); font-size: 9px; }
.dialog-close { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.dialog-body { display: grid; gap: 13px; padding: 17px 18px; overflow: auto; }
.dialog-field { display: grid; gap: 5px; font-size: 9px; color: var(--soft); }
.dialog-field input { height: 34px; border: 1px solid var(--line); border-radius: 5px; background: #090d12; color: var(--text); padding: 0 10px; outline: none; font: 9px ui-monospace, monospace; }
.dialog-field input:focus { border-color: rgba(99,228,182,.38); }
.dialog-field small { color: var(--muted); font-size: 8px; }
.dialog-actions { min-height: 58px; display: flex; justify-content: flex-end; align-items: center; gap: 7px; padding: 10px 18px; border-top: 1px solid var(--line); }
.dialog-actions .button { padding: 0 18px; }
.compact-dialog { width: min(480px, calc(100vw - 30px)); }
.dialog-project-list { max-height: 420px; overflow-y: auto; display: grid; gap: 6px; padding: 14px; }

.focus-mode { --left-w: 0px; --right-w: 0px; }
.focus-mode .left-panel, .focus-mode .right-panel { opacity: 0; pointer-events: none; overflow: hidden; }
.focus-mode .brand { border-right-color: transparent; }

@media (max-width: 1050px) {
  :root { --left-w: 236px; --right-w: 250px; }
  .top-actions .tool-button:not(.primary) { display: none; }
  .timeline-panel { grid-template-columns: 178px 110px minmax(190px,1fr) 100px; }
  .preset-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --left-w: 0px; --right-w: 0px; --timeline-h: 94px; }
  .left-panel, .right-panel { display: none; }
  .topbar { grid-template-columns: 120px 1fr auto; }
  .brand { padding: 0 9px; }
  .brand > div:last-child span { display: none; }
  .project-name { width: 34vw; }
  .top-actions .icon-button { display: none; }
  .timeline-panel { grid-template-columns: 150px 1fr; }
  .timecode, .timeline-meta { display: none; }
}
