:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-deep: #040609;
  --panel: rgba(13, 17, 23, 0.96);
  --panel-2: #111720;
  --panel-3: #171e28;
  --line: rgba(157, 177, 198, 0.13);
  --line-strong: rgba(157, 177, 198, 0.22);
  --text: #e8eef5;
  --muted: #8290a1;
  --muted-2: #596574;
  --accent: #56f0bb;
  --accent-2: #43b8ff;
  --accent-soft: rgba(86, 240, 187, 0.12);
  --warning: #ffc66d;
  --danger: #ff6f7d;
  --track-label-width: 244px;
  --timeline-height: 306px;
  --rail-width: 64px;
  --outliner-width: 262px;
  --inspector-width: 310px;
  --topbar-height: 54px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

[hidden] { display: none !important; }

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 25px;
  background:
    radial-gradient(circle at 50% 45%, rgba(39, 103, 102, 0.18), transparent 28%),
    linear-gradient(145deg, #050609, #0a0e14 58%, #06080b);
  transition: opacity 320ms ease, visibility 320ms ease;
}

.boot-screen.done { opacity: 0; visibility: hidden; }

.boot-orbit {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid rgba(86, 240, 187, 0.23);
  box-shadow: 0 0 60px rgba(86, 240, 187, 0.08), inset 0 0 22px rgba(86, 240, 187, 0.05);
  animation: boot-ring 2.8s linear infinite;
}

.boot-orbit::before,
.boot-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

.boot-orbit::before {
  inset: 8px;
  border-left-color: var(--accent);
  border-top-color: rgba(86, 240, 187, 0.45);
  animation: boot-ring 0.78s linear infinite reverse;
}

.boot-orbit::after {
  inset: 20px;
  background: radial-gradient(circle at 34% 30%, #194b4a, #081314 62%, #05080a);
  border-color: rgba(86, 240, 187, 0.28);
  box-shadow: inset -7px -8px 14px #030507, inset 4px 4px 11px rgba(86, 240, 187, 0.12);
}

.boot-orbit i {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 13px var(--accent);
}

.boot-orbit b {
  position: absolute;
  inset: 30px;
  z-index: 3;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
  filter: blur(7px);
}

@keyframes boot-ring { to { transform: rotate(360deg); } }

.boot-copy { display: grid; justify-items: center; gap: 7px; }
.boot-copy strong { font-size: 16px; letter-spacing: 0.025em; }
.boot-copy strong em { color: var(--accent); font-size: 11px; font-style: normal; vertical-align: top; }
.boot-copy small { color: var(--muted); font-size: 11px; letter-spacing: 0.055em; }

.studio2-shell {
  height: 100%;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr) var(--timeline-height);
  background: var(--bg);
}

.panel-surface {
  background: var(--panel);
  border-color: var(--line);
}

.topbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  min-width: 0;
  height: var(--topbar-height);
  padding: 0 11px 0 9px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(8, 11, 15, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.brand {
  width: calc(var(--rail-width) + var(--outliner-width) - 8px);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(86, 240, 187, 0.3);
  border-radius: 50%;
  box-shadow: inset 0 0 11px rgba(86, 240, 187, 0.08);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(86, 240, 187, 0.62);
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
}

.brand-mark i {
  position: absolute;
  top: 3px;
  left: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.brand-mark b {
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: rgba(86, 240, 187, 0.66);
}

.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: 14px; letter-spacing: 0.01em; }
.brand-copy small { margin-top: 5px; color: #9facba; font-size: 8px; letter-spacing: 0.24em; }
.brand-copy em { color: var(--accent); font-style: normal; letter-spacing: 0.05em; }

.project-crumbs {
  min-width: 240px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted-2);
}

.crumb {
  min-width: 0;
  max-width: 180px;
  height: 31px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.crumb:hover, .crumb.active { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.crumb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 520; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px rgba(86, 240, 187, 0.5); }
.project-crumbs > small { margin-left: 7px; white-space: nowrap; color: var(--muted-2); font-size: 10px; }

.history-controls, .project-actions { display: flex; align-items: center; gap: 4px; }
.history-controls { padding: 0 9px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.project-actions { margin-left: 8px; }

.icon-button, .quiet-button, .accent-button, .account-button {
  height: 31px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button { width: 30px; padding: 0; font-size: 17px; }
.icon-button:disabled { opacity: 0.25; cursor: default; }
.quiet-button { padding: 0 9px; }
.quiet-button:hover, .icon-button:not(:disabled):hover { border-color: var(--line); background: rgba(255,255,255,0.04); color: var(--text); }
.accent-button { padding: 0 12px; border-color: rgba(86, 240, 187, 0.25); background: var(--accent-soft); color: var(--accent); }
.accent-button:hover { background: rgba(86, 240, 187, 0.19); }
.account-button { min-width: 72px; margin-left: 3px; border-color: var(--line); background: #0c1117; }
.account-button span { color: var(--accent); }

.production-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: var(--rail-width) var(--outliner-width) minmax(320px, 1fr) var(--inspector-width);
}

.workspace-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 6px 5px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #090c11;
  scrollbar-width: none;
}

.workspace-button {
  min-height: 46px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  margin-bottom: 2px;
  padding: 4px 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #697687;
  cursor: pointer;
}

.workspace-button > span { font-size: 17px; line-height: 1; }
.workspace-button > small { font-size: 8px; letter-spacing: 0.05em; }
.workspace-button:hover { background: rgba(255,255,255,0.04); color: #b8c4d0; }
.workspace-button.active { background: var(--accent-soft); color: var(--accent); }
.workspace-button.active::before { content: ""; position: absolute; left: 0; width: 2px; height: 24px; background: var(--accent); }
.rail-spacer { flex: 1; }
.god-button { color: #b592ff; }
.god-button.active { background: rgba(160, 119, 255, 0.13); color: #c9abff; }

.outliner, .inspector {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.inspector { border-right: 0; border-left: 1px solid var(--line); }

.panel-heading {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading > div { display: grid; gap: 4px; }
.panel-heading small { color: var(--muted-2); font-size: 8px; letter-spacing: 0.18em; }
.panel-heading strong { font-size: 12px; font-weight: 600; }
.round-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  cursor: pointer;
}
.round-button:hover { color: var(--accent); border-color: rgba(86,240,187,0.25); }

.filter-row {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 9px 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(0,0,0,0.18);
  color: var(--muted-2);
}

.filter-row input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.filter-row input::placeholder { color: #4e5967; }
.filter-row button { border: 0; background: transparent; color: var(--muted-2); cursor: pointer; }

.scene-tree {
  height: calc(100% - 223px);
  min-height: 130px;
  padding: 5px 7px 12px;
  overflow: auto;
}

.tree-row {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  border-radius: 4px;
  color: #9ba8b6;
  cursor: pointer;
  user-select: none;
}

.tree-row:hover { background: rgba(255,255,255,0.035); color: #cbd5de; }
.tree-row.selected { background: var(--accent-soft); color: #dffff4; }
.tree-row[data-depth="1"] { padding-left: 18px; }
.tree-row[data-depth="2"] { padding-left: 34px; }
.tree-row[data-depth="3"] { padding-left: 50px; }
.tree-row .disclosure { width: 9px; color: var(--muted-2); font-size: 9px; }
.tree-row .tree-icon { width: 15px; color: #6c7d90; text-align: center; }
.tree-row.selected .tree-icon { color: var(--accent); }
.tree-row b { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.tree-row .tree-state { width: 7px; height: 7px; border-radius: 50%; border: 1px solid #4f5d6c; }
.tree-row .tree-state.live { border-color: var(--accent); background: rgba(86,240,187,0.5); }

.panel-section { padding: 11px 13px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--muted-2); font-size: 8px; letter-spacing: 0.13em; }
.section-heading button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.source-summary dl { display: grid; gap: 5px; margin: 0 0 9px; }
.source-summary dl div { display: flex; justify-content: space-between; gap: 8px; }
.source-summary dt { color: var(--muted-2); font-size: 9px; }
.source-summary dd { margin: 0; color: #aab6c3; font-size: 9px; text-align: right; }
.source-meter { height: 2px; overflow: hidden; border-radius: 1px; background: #222a34; }
.source-meter i { display: block; width: 0; height: 100%; background: var(--accent); transition: width 240ms ease; }
.source-summary > small { display: block; margin-top: 7px; color: var(--muted-2); font-size: 8px; line-height: 1.45; }

.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 25px;
  overflow: hidden;
  background: #05070a;
}

.viewport-toolbar {
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-bottom: 1px solid var(--line);
}

.view-modes { display: flex; height: 27px; padding: 2px; border-radius: 5px; background: rgba(0,0,0,0.28); }
.view-mode { min-width: 46px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.view-mode.active { background: #252d38; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.toolbar-divider { width: 1px; height: 18px; margin: 0 3px; background: var(--line-strong); }
.tool-toggle, .toolbar-button {
  height: 27px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tool-toggle { min-width: 27px; padding: 0 6px; }
.toolbar-button { padding: 0 8px; font-size: 10px; }
.tool-toggle:hover, .toolbar-button:hover { border-color: var(--line); background: rgba(255,255,255,0.035); color: var(--text); }
.tool-toggle.active { background: var(--accent-soft); color: var(--accent); }
.key-button { border-color: rgba(86,240,187,0.18); color: #a8ead3; }
.key-button span { color: var(--accent); }
.viewport-toolbar-end { min-width: 0; flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.viewport-toolbar-end > span { margin-right: 5px; color: var(--muted-2); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Keep authoring buttons reachable when side panels leave a narrow viewport. */
.stage { container-type: inline-size; container-name: studio-stage; }
.viewport-toolbar > .view-modes, .viewport-toolbar > button { flex-shrink: 0; }
.viewport-toolbar-end { flex-shrink: 0; min-width: 89px; }
.viewport-toolbar-end > button { flex-shrink: 0; }
@container studio-stage (max-width: 780px) {
  .viewport-toolbar-end > span { display: none; }
  .viewport-toolbar { gap: 3px; padding-left: 6px; padding-right: 6px; }
  .view-mode { min-width: 0; padding-left: 6px; padding-right: 6px; }
}
@container studio-stage (max-width: 580px) {
  .viewport-toolbar > #select-tool, .viewport-toolbar > #move-tool, .viewport-toolbar > #orbit-tool, .viewport-toolbar > .toolbar-divider { display: none; }
  .viewport-toolbar > #frame-selection { min-width: 27px; width: 27px; padding: 0; font-size: 0; }
  .viewport-toolbar > #frame-selection::before { content: '⌾'; font-size: 16px; }
  .view-mode { padding-left: 5px; padding-right: 5px; font-size: 9px; }
}

.viewport-grid { position: relative; min-height: 0; display: grid; overflow: hidden; }
.viewport-grid.mode-camera { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.viewport-grid.mode-map, .viewport-grid.mode-path { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.viewport-grid.mode-split { grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); grid-template-rows: 1fr 1fr; gap: 1px; background: var(--line-strong); }
.viewport-grid.mode-split .camera-pane { grid-row: 1 / 3; }

.viewport-pane { 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 { display: none !important; }
#cesium-container .cesium-widget-credits { opacity: 0.5; transform: scale(0.78); transform-origin: bottom right; }

.viewport-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; background: radial-gradient(circle at 50% 45%, #0d2023, #05070a 48%); color: var(--muted); }
.fallback-globe { position: relative; width: 108px; height: 108px; margin-bottom: 10px; border: 1px solid rgba(86,240,187,0.27); border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(86,240,187,0.17), transparent 54%); box-shadow: 0 0 80px rgba(86,240,187,0.07); }
.fallback-globe::before, .fallback-globe::after { content: ""; position: absolute; inset: 17px 4px; border: 1px solid rgba(86,240,187,0.12); border-radius: 50%; }
.fallback-globe::after { inset: 4px 31px; }
.viewport-fallback strong { color: #a9b7c5; font-weight: 500; }
.viewport-fallback small { color: var(--muted-2); }

.composition-guides { pointer-events: none; position: absolute; inset: 0; z-index: 3; opacity: 0.34; }
.composition-guides i, .composition-guides b { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.34); }
.composition-guides i { left: 33.333%; }.composition-guides b { left: 66.666%; }
.composition-guides span, .composition-guides em { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.34); }
.composition-guides span { top: 33.333%; }.composition-guides em { top: 66.666%; }

.render-mask { pointer-events: none; position: absolute; inset: 0; z-index: 4; border: 1px solid rgba(86,240,187,0.7); box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.35); clip-path: polygon(0 0,100% 0,100% 100%,0 100%,0 0,5% 5%,5% 95%,95% 95%,95% 5%,5% 5%); }

.viewport-overlay { position: absolute; z-index: 5; display: flex; align-items: center; gap: 8px; pointer-events: none; color: rgba(223,232,240,0.76); font-size: 9px; text-shadow: 0 1px 3px #000; }
.viewport-overlay.top-left { top: 10px; left: 11px; }.viewport-overlay.top-right { top: 10px; right: 11px; color: rgba(190,203,215,0.58); }
.viewport-overlay.bottom-left { bottom: 10px; left: 11px; pointer-events: auto; }
.viewport-label { padding: 4px 7px; border: 1px solid rgba(255,255,255,0.13); border-radius: 3px; background: rgba(4,7,10,0.56); letter-spacing: 0.12em; }
.viewport-label i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.viewport-overlay.bottom-left button { width: 27px; height: 27px; border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; background: rgba(5,8,11,0.64); color: #bec8d2; cursor: pointer; backdrop-filter: blur(8px); }
.viewport-overlay.bottom-left button:hover { border-color: rgba(86,240,187,0.35); color: var(--accent); }
.viewport-overlay.bottom-left span { margin-left: 4px; }

.map-pane { background: #090d12; }
.path-pane { background: #030507; }
.map-pane canvas, .path-pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pane-label { position: absolute; top: 10px; left: 12px; display: grid; gap: 3px; pointer-events: none; }
.pane-label span { color: var(--accent); font-size: 9px; letter-spacing: 0.15em; }
.pane-label small { color: var(--muted-2); font-size: 8px; }
.map-legend { position: absolute; right: 10px; bottom: 9px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.map-legend i { width: 12px; height: 2px; margin-left: 5px; }.camera-color { background: var(--accent); }.path-color { background: var(--accent-2); }.aoi-color { border-top: 2px dashed #69778a; }
.path-axis { position: absolute; inset: 35px 7px 8px 10px; pointer-events: none; border-left: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.path-axis span { position: absolute; color: var(--muted-2); font-size: 7px; letter-spacing: 0.12em; }
.path-axis span:first-child { left: -4px; top: 3px; writing-mode: vertical-rl; }.path-axis span:last-child { right: 3px; bottom: 3px; }

.status-strip { z-index: 8; display: flex; align-items: center; gap: 14px; padding: 0 10px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8px; }
.status-spacer { flex: 1; }.health-pill { color: #7f8d9b; }.health-pill i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--warning); }.health-pill.ready i { background: var(--accent); box-shadow: 0 0 5px rgba(86,240,187,0.55); }.health-pill.error i { background: var(--danger); }

.inspector-heading { height: 58px; }
.inspector-tabs { height: 36px; display: flex; border-bottom: 1px solid var(--line); }
.inspector-tab { flex: 1; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted-2); font-size: 9px; cursor: pointer; }
.inspector-tab.active { border-bottom-color: var(--accent); color: #cbd6df; }
.inspector-content { height: calc(100% - 94px); overflow: auto; padding-bottom: 20px; }
.inspector-section { border-bottom: 1px solid var(--line); }
.section-toggle { width: 100%; height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 0; background: transparent; color: #aab6c2; font-size: 10px; cursor: pointer; }
.section-toggle i { color: var(--muted-2); font-style: normal; }
.section-toggle:hover { background: rgba(255,255,255,0.02); }
.section-body { display: grid; gap: 6px; padding: 2px 11px 12px; }
.property-link-row { display: flex; align-items: center; justify-content: space-between; min-height: 24px; color: var(--muted-2); font-size: 9px; }
.link-button { width: 27px; height: 23px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted-2); cursor: pointer; }
.link-button.active { border-color: rgba(86,240,187,0.25); background: var(--accent-soft); color: var(--accent); }
.property-field { display: grid; grid-template-columns: 88px minmax(0,1fr) 24px 25px; align-items: center; min-height: 28px; color: var(--muted); font-size: 9px; }
.property-field input, .select-field select { width: 100%; height: 26px; border: 1px solid var(--line); border-radius: 4px; outline: 0; background: #090d12; color: #cbd5df; padding: 0 7px; font-size: 10px; }
.property-field input:focus, .select-field select:focus { border-color: rgba(86,240,187,0.4); }
.property-field em { color: var(--muted-2); font-size: 8px; font-style: normal; text-align: center; }
.key-property { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #596777; cursor: pointer; font-size: 14px; }
.key-property:hover, .key-property.keyed { color: var(--accent); }
.key-property.keyed { text-shadow: 0 0 7px rgba(86,240,187,0.5); }
.select-field { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.wide-button { height: 28px; border: 1px solid var(--line); border-radius: 4px; background: #111721; color: var(--muted); cursor: pointer; }
.wide-button:hover { border-color: rgba(86,240,187,0.25); color: var(--accent); }
.add-attribute-button { width: calc(100% - 22px); height: 31px; margin: 12px 11px; border: 1px dashed rgba(146,164,183,0.22); border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.add-attribute-button:hover { border-color: rgba(86,240,187,0.3); color: var(--accent); }

.timeline {
  position: relative;
  z-index: 30;
  min-height: 0;
  border-top: 1px solid var(--line-strong);
  background: #0a0e13;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
}

.timeline-toolbar { height: 42px; display: grid; grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr); align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); }
.timeline-tabs { align-self: stretch; display: flex; align-items: stretch; }
.timeline-tab { padding: 0 12px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted-2); font-size: 9px; cursor: pointer; }
.timeline-tab.active { border-bottom-color: var(--accent); color: #c4ced8; }
.transport-controls { display: flex; align-items: center; gap: 2px; }
.transport-controls button { width: 27px; height: 27px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.transport-controls button:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.transport-controls .play-button { background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.timecode-field { margin-left: 7px; }.timecode-field input { width: 88px; height: 26px; border: 1px solid var(--line); border-radius: 4px; background: #070a0f; color: #cdd7e0; text-align: center; font-variant-numeric: tabular-nums; font-size: 10px; }
.timeline-options { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.timeline-options label { display: flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 8px; }
.timeline-options select, .timeline-options input { height: 25px; border: 1px solid var(--line); border-radius: 4px; background: #080c11; color: #aab5c1; font-size: 9px; }
.timeline-options select { width: 50px; }.timeline-options input { width: 48px; padding-left: 6px; }.timeline-options em { font-style: normal; }
.option-toggle { height: 25px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted-2); font-size: 8px; cursor: pointer; }
.option-toggle.active { border-color: rgba(86,240,187,0.2); background: var(--accent-soft); color: var(--accent); }

.timeline-body { position: relative; height: calc(100% - 42px); min-height: 0; display: grid; grid-template-columns: var(--track-label-width) minmax(0, 1fr); overflow: hidden; }
.track-list { min-width: 0; overflow: auto; border-right: 1px solid var(--line-strong); background: #0d1117; }
.track-row { height: 27px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid rgba(157,177,198,0.055); color: #8794a2; user-select: none; cursor: pointer; }
.track-row:hover { background: rgba(255,255,255,0.02); }.track-row.selected { background: rgba(67,184,255,0.08); color: #c7d4df; }
.track-row.group { height: 29px; color: #b0bbc6; background: rgba(255,255,255,0.018); }
.track-row[data-depth="1"] { padding-left: 24px; }.track-row[data-depth="2"] { padding-left: 40px; }
.track-row .track-disclosure { width: 9px; color: var(--muted-2); font-size: 8px; }.track-row .track-type { width: 14px; color: #647384; text-align: center; }.track-row .track-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.track-row .track-actions { display: flex; color: var(--muted-2); font-size: 8px; gap: 5px; }.track-row .key-count { min-width: 20px; color: #566372; text-align: right; font-size: 8px; }
.timeline-editor { position: relative; min-width: 0; overflow: hidden; background: #080c11; }
.timeline-editor canvas, .curve-editor canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.timeline-playhead { position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: 1px; pointer-events: none; background: var(--accent); box-shadow: 0 0 6px rgba(86,240,187,0.35); }
.timeline-playhead i { position: absolute; top: 0; left: -4px; width: 9px; height: 8px; background: var(--accent); clip-path: polygon(0 0,100% 0,50% 100%); }.timeline-playhead span { position: absolute; top: 8px; bottom: 0; left: 0; border-left: 1px solid rgba(86,240,187,0.58); }
.curve-editor, .shot-sequencer { position: absolute; inset: 0; grid-column: 1 / 3; background: #080c11; }
.curve-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 5px; pointer-events: none; color: var(--muted); }.curve-empty b { font-size: 11px; font-weight: 500; }.curve-empty small { color: var(--muted-2); font-size: 9px; }
.shot-sequencer { overflow: auto; padding: 20px; }.shot-strip { display: flex; gap: 8px; }.shot-card, .add-shot-card { width: 210px; height: 90px; display: grid; align-content: center; gap: 5px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: #10161e; color: var(--muted); text-align: left; cursor: pointer; }.shot-card.active { border-color: rgba(86,240,187,0.32); box-shadow: inset 3px 0 var(--accent); }.shot-card span { color: var(--accent); font-size: 8px; letter-spacing: 0.12em; }.shot-card b { color: #cbd5df; font-size: 11px; }.shot-card small { color: var(--muted-2); font-size: 8px; }.add-shot-card { place-content: center; justify-items: center; border-style: dashed; text-align: center; }

.toast-region { position: fixed; right: 12px; bottom: calc(var(--timeline-height) + 12px); z-index: 200; display: grid; gap: 7px; pointer-events: none; }
.toast { width: min(350px, calc(100vw - 24px)); padding: 10px 12px; border: 1px solid var(--line-strong); border-left: 2px solid var(--accent); border-radius: 5px; background: rgba(13,18,24,0.96); box-shadow: 0 9px 30px rgba(0,0,0,0.35); color: #bdc8d2; font-size: 10px; line-height: 1.45; animation: toast-in 180ms ease; }
.toast.warning { border-left-color: var(--warning); }.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.studio2-shell.god-mode { --accent: #c39aff; --accent-soft: rgba(195,154,255,0.12); }
.studio2-shell.timeline-collapsed { --timeline-height: 42px; }
.studio2-shell.timeline-collapsed .timeline-body { display: none; }
.stage.maximized {
  position: fixed;
  inset: var(--topbar-height) 0 0 0;
  z-index: 90;
  box-shadow: 0 0 0 1px var(--line), 0 20px 80px rgba(0,0,0,.6);
}

@media (max-width: 1200px) {
  :root { --outliner-width: 228px; --inspector-width: 282px; --track-label-width: 220px; }
  .brand { width: calc(var(--rail-width) + var(--outliner-width) - 8px); }
  .project-actions .quiet-button { display: none; }
  .viewport-toolbar-end > span { display: none; }
}

@media (max-width: 900px) {
  :root { --outliner-width: 0px; --inspector-width: 250px; --timeline-height: 268px; }
  .outliner { display: none; }
  .production-workspace { grid-template-columns: var(--rail-width) minmax(260px, 1fr) var(--inspector-width); }
  .brand { width: var(--rail-width); }
  .brand-copy { display: none; }
  .project-crumbs > span, .project-crumbs .crumb:not(.project-crumb), .project-crumbs > small { display: none; }
  .timeline-options label:first-child, .timeline-options .option-toggle:not(:last-child) { display: none; }
}

@media (max-width: 680px) {
  :root { --rail-width: 48px; --inspector-width: 0px; --timeline-height: 250px; --track-label-width: 172px; }
  .inspector { display: none; }
  .production-workspace { grid-template-columns: var(--rail-width) minmax(240px, 1fr); }
  .workspace-button { min-height: 42px; }.workspace-button > small { display: none; }
  .project-actions .account-button { display: none; }
  .project-crumbs { min-width: 90px; }
  .timeline-toolbar { grid-template-columns: 1fr auto; }.timeline-options { display: none; }
  .transport-controls { justify-self: end; }.timecode-field { display: none; }
  .view-mode[data-view="split"] { display: none; }
}
