:root {
  color-scheme: dark;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-synthesis: none;
  --black: #030605;
  --surface: #080e0b;
  --raised: #0c1510;
  --line: #26382b;
  --muted: #879b8b;
  --text: #c1cdbd;
  --phosphor: #b6d99b;
  --bright: #d9e8c5;
  --amber: #ccb57e;
  background: var(--black);
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 42% 12%, #0a150f 0, #030605 54%); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { transition: background .12s, color .12s, border-color .12s; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bright); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--phosphor); outline-offset: 4px;
}
input, select { min-width: 0; }
input[type="range"] { accent-color: var(--phosphor); cursor: pointer; }
input[type="number"], input:not([type]), select {
  width: 100%; border: 1px solid #344734; color: var(--text);
  background: #030705; border-radius: 2px; padding: 11px 10px;
  box-shadow: inset 0 2px 7px #0009;
}
[hidden] { display: none !important; }
.topbar {
  height: 78px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: #040906e8;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 800; letter-spacing: 3px; color: var(--bright); }
.brand img { width: 27px; height: 27px; }
.brand > span { font-size: 10px; border: 1px solid #4a5b3e; padding: 4px 5px; letter-spacing: 1px; color: var(--phosphor); }
nav { display: flex; align-items: center; gap: 25px; font-size: 11px; }
nav > a { color: #93a68d; }
#crt-toggle { border: 1px solid #526044; background: #0c170d; color: var(--phosphor); font-size: 10px; letter-spacing: 1px; padding: 8px 11px; border-radius: 2px; }
#crt-toggle[aria-pressed="false"] { background: transparent; color: var(--muted); border-color: var(--line); }
.local-dot { font-size: 9px; color: #8da680; text-transform: uppercase; letter-spacing: 1px; }
.local-dot::before, .signal-light { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--phosphor); margin-right: 9px; box-shadow: 0 0 7px #c8f4a452; }
main { max-width: 1540px; margin: auto; padding: 0 4vw; }
.intro { display: flex; justify-content: space-between; align-items: center; padding: 48px 0 38px; }
.eyebrow { color: #90aa7d; font-size: 10px; letter-spacing: 2px; margin: 0 0 20px; }
h1 { color: var(--bright); font-family: inherit; font-size: clamp(36px, 4.9vw, 70px); font-weight: 600; letter-spacing: -4px; line-height: 1.08; margin: 0; text-transform: uppercase; }
h1 em { font-style: normal; color: #90af7c; }
.crt-mode h1, .crt-mode .brand { text-shadow: 0 0 10px #a6ce991f; }
.intro-description { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 21px 0 0; }
.intro-stamp { width: 170px; padding: 15px 20px; margin-right: 1px; color: #7c9470; font-size: 9px; line-height: 1.7; letter-spacing: 2px; text-align: center; border: 1px solid #283b2a; }
.intro-stamp > span:first-child { font-size: 18px; color: #abc494; letter-spacing: 3px; }
.scope-mark { position: relative; width: 62px; height: 62px; border: 1px solid #4e6542; border-radius: 50%; margin: 19px auto; }
.scope-mark::before { content: ""; position: absolute; inset: 9px; border: 1px solid #2f432d; border-radius: 50%; }
.scope-mark::after { content: ""; position: absolute; inset: 25px; background: #9dbb86; border-radius: 50%; }
.scope-mark i:first-child { position: absolute; left: -9px; top: 30px; width: 78px; height: 1px; background: #4e6542; }
.scope-mark i:last-child { position: absolute; left: 30px; top: -9px; height: 78px; width: 1px; background: #4e6542; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 345px; gap: 30px; scroll-margin-top: 22px; align-items: start; }
.section-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 27px; margin-bottom: 14px; text-transform: uppercase; font-size: 9px; letter-spacing: 1px; color: #99af8c; }
.number { color: #637c59; margin-right: 8px; }
.tag { font-size: 9px; font-weight: 400; border: 1px solid #384a31; color: #b0c39a; padding: 5px 7px; white-space: nowrap; }
.player-shell { background: #121b14; border: 1px solid #46523e; border-radius: 17px; padding: 0 13px 10px; box-shadow: inset 0 2px 1px #ffffff07, inset 0 -3px 5px #000a, 0 12px 42px #0008; }
/* CRT texture belongs to the bezel, behind the opaque video stage. */
.crt-mode .player-shell {
  background-image: repeating-linear-gradient(0deg, #00000024 0 1px, transparent 1px 3px);
  border-color: #657856;
  box-shadow: inset 0 2px 1px #c8e9ad12, inset 0 -3px 5px #000a, 0 0 18px #9ec97d0a, 0 12px 42px #0008;
}
.player-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 7px; font-size: 9px; text-transform: uppercase; color: #9faf93; }
.screen-system { color: #687d5d; letter-spacing: 2px; }
.stage { display: flex; justify-content: center; background: #010302; border: 3px solid #010402; border-radius: 11px; overflow: hidden; box-shadow: 0 0 0 1px #394a35, 0 -3px 12px #000; }
#viewport { position: relative; width: 100%; aspect-ratio: 16/9; max-height: 620px; overflow: hidden; }
#sphere { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#sphere:active { cursor: grabbing; }
.crosshair { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); pointer-events: none; border: 1px solid #e4efd659; border-radius: 50%; z-index: 3; }
.crosshair::after { content: ""; position: absolute; width: 2px; height: 2px; background: #f1f7e0a6; top: 7px; left: 7px; }
.start-overlay { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; background: #050c07eb; border: 1px solid #adc9918a; border-radius: 3px; padding: 12px 18px; color: #d0e9b8; font-size: 11px; white-space: nowrap; box-shadow: 0 3px 15px #0008; }
.start-overlay > span { margin-right: 7px; }
.transport { display: flex; align-items: center; gap: 12px; padding: 17px 4px 5px; }
.transport output { font-size: 10px; color: #a2b691; white-space: nowrap; font-variant-numeric: tabular-nums; }
.transport > input { flex: 1; width: 60px; height: 3px; }
.icon-button { min-width: 29px; border: 0; background: transparent; color: #c1d5ac; font-size: 19px; padding: 3px; }
.text-button { border: 0; background: transparent; color: #9caf8e; font-size: 10px; padding: 5px 0; white-space: nowrap; }
.text-button:hover { color: var(--bright); }
.view-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; color: #829779; font-size: 9px; margin: 18px 0 27px; }
.view-tools label { display: flex; align-items: center; gap: 8px; }
.view-tools select { width: auto; font-size: 9px; padding: 8px; }
.clip-description { padding: 25px 0; border-top: 1px solid var(--line); }
h2 { font-family: inherit; font-size: 24px; font-weight: 500; letter-spacing: -1px; line-height: 1.25; color: #b5c5a7; margin: 0 0 13px; }
.clip-description p { color: var(--muted); font-size: 11px; line-height: 1.9; max-width: 680px; margin: 0 0 22px; }
.clip-facts { display: flex; flex-wrap: wrap; gap: 10px; font-size: 9px; color: #94a984; }
.clip-facts span { border: 1px solid #243927; padding: 6px 8px; background: #08100a; }
#draft-state { text-transform: none; letter-spacing: 0; color: #819477; font-size: 8px; text-align: right; }
.panel-content { border: 1px solid #35472f; border-radius: 3px; background: linear-gradient(120deg, #0b150e, #070d09); padding: 22px; box-shadow: inset 0 1px #52604429; }
.crt-mode .panel-content { background-image: repeating-linear-gradient(0deg, #00000010 0 1px, transparent 1px 3px), linear-gradient(120deg, #0b150e, #070d09); }
.panel-label { display: flex; justify-content: space-between; color: #6f8861; font-size: 8px; letter-spacing: 1px; margin: 0 0 24px; }
.panel-label span { color: #a89064; }
.panel-content h2 { font-size: 25px; color: #c4d4b4; }
.muted { font-size: 10px; color: #8a9f7e; line-height: 1.8; margin: 0 0 20px; }
.mode-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid #344b31; border-radius: 3px; margin-bottom: 22px; background: #030805; }
.mode-switch button { flex: 1; border: 0; border-radius: 1px; background: transparent; padding: 10px 3px; color: #9aaf8b; font-size: 10px; }
.mode-switch button.selected { background: #22391b; color: #cce9b2; box-shadow: inset 0 0 0 1px #405935; }
.camera-readout { display: flex; gap: 9px; justify-content: space-between; margin-bottom: 24px; }
.camera-readout > div { display: flex; flex-direction: column; gap: 10px; }
.camera-readout span { color: #809471; font-size: 9px; }
.camera-readout output { color: #c2d2ab; font-size: 21px; font-variant-numeric: tabular-nums; }
.camera-readout #perspective-value { font-size: 12px; padding-top: 5px; min-height: 25px; }
.perspective-controls { padding: 15px 0 17px; border-top: 1px dashed #31452e; border-bottom: 1px dashed #31452e; margin-bottom: 21px; }
.perspective-controls > label { font-size: 10px; color: #b3c49f; }
.perspective-controls > input { display: block; width: 100%; height: 28px; margin: 8px 0; }
.perspective-presets { display: flex; justify-content: space-between; gap: 5px; }
.perspective-presets button { color: #a0b38e; border: 1px solid #3b5135; background: #030804; font-size: 9px; padding: 9px 8px; border-radius: 2px; white-space: nowrap; }
.perspective-presets button[aria-pressed="true"] { background: #abc98f; color: #071006; border-color: #bedaa3; }
.perspective-controls .tiny { margin: 12px 0 0; }
.field-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; margin: 17px 0; }
.field-row label, .full-field, .trim-controls label { display: flex; flex-direction: column; gap: 8px; color: #8aa07b; font-size: 9px; }
.field-row select { font-size: 9px; padding: 10px 7px; }
.button-row { display: flex; gap: 9px; }
.primary, .secondary { border-radius: 2px; padding: 12px 11px; font-size: 10px; font-weight: 600; }
.primary { border: 1px solid #c2dca5; background: #b0cd93; color: #0b1308; box-shadow: inset 0 1px #e9f6d854, 0 2px 0 #355127; }
.primary:hover { background: #c3dfa5; }
.secondary { background: #080f09; border: 1px solid #4d633e; color: #bdd0a4; }
.secondary:hover { background: #182717; }
.secondary[aria-pressed="true"] { border-color: #c4a671; color: #e1bf87; }
.button-row .primary { flex: 1; }
.keys-heading { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 6px; font-size: 9px; color: #809573; }
.keyframes { list-style: none; padding: 0; margin: 0; max-height: 145px; overflow: auto; }
.keyframes > li { display: flex; align-items: center; gap: 7px; padding: 10px 0; border-top: 1px solid #253b27; }
.key-jump { display: flex; flex: 1; align-items: center; gap: 9px; background: none; border: 0; color: #b8cca3; font-size: 9px; padding: 2px 0; text-align: left; }
.key-jump::before { content: "◆"; font-size: 7px; color: #89ae66; }
.key-jump > span { margin-left: auto; font-size: 8px; color: #90a47e; }
.delete-key { border: 0; background: none; color: #8fa379; padding: 3px; font-size: 16px; }
.trim-controls { display: flex; align-items: end; gap: 8px; margin-top: 12px; padding-top: 17px; border-top: 1px dashed #31452e; }
.trim-controls > label { flex: 1; }
.trim-controls input { font-size: 11px; padding: 9px; }
.trim-controls .secondary { padding: 10px 11px; }
.tiny { color: #819675; font-size: 9px; line-height: 1.8; }
.full-field { margin: 17px 0; }
.full-field input { font-size: 11px; }
.optional { color: var(--muted); font-size: 9px; }
.wide { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 23px; padding: 14px 12px; }
.recipe-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 17px; }
.status { font-size: 10px; color: #9bbc81; line-height: 1.8; min-height: 30px; margin: 16px 0 0; }
.status.error { color: #d0a37b; }
.stage:fullscreen { height: 100vh; align-items: center; border: 0; border-radius: 0; }
.stage:fullscreen #viewport { max-height: 100vh; width: 100%; }
.budget-section { margin-top: 55px; padding: 45px 0 55px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.4fr; gap: 55px; scroll-margin-top: 25px; }
.budget-intro h2 { font-size: 29px; line-height: 1.3; }
.budget-intro > p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.9; }
.budget-card { padding: 25px; border: 1px solid #35472f; background: #08100a; }
.budget-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.budget-inputs label { display: flex; flex-direction: column; gap: 9px; font-size: 9px; color: #90a47e; }
.budget-inputs input { font-size: 14px; }
.budget-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 16px; }
.budget-result > div { display: flex; flex-direction: column; gap: 10px; }
.budget-result span { font-size: 9px; color: #819975; }
.budget-result output { font-size: 34px; color: #b9d598; }
.budget-bar { height: 5px; background: #20351c; }
.budget-bar > div { height: 100%; background: #a3c382; }
.budget-scale { display: flex; justify-content: space-between; color: #7f9472; margin: 8px 0 20px; font-size: 8px; }
.budget-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 10px; color: #8ca17d; margin-bottom: 20px; }
.budget-breakdown b { color: #c1d3af; font-weight: 400; }
.budget-card a { text-decoration: underline; text-underline-offset: 3px; }
footer { margin-top: 46px; padding: 28px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #657f5b; font-size: 9px; }
.brand.small { font-size: 10px; color: #a5bb91; letter-spacing: 2px; }
footer p { font-size: 9px; }
footer > span:last-child { font-size: 8px; letter-spacing: 1px; text-align: right; }
@media(min-width:1450px) { .workspace { grid-template-columns: minmax(0,1fr) 360px; gap: 35px; } .intro { padding-top: 55px; } }
@media(max-width:1100px) {
  .workspace { grid-template-columns: minmax(0,1fr) 320px; gap: 23px; }
  .panel-content { padding: 19px; }
  .view-tools > span { width: 100%; }
  .transport { gap: 7px; }
  .transport .text-button { font-size: 9px; }
  .screen-system { display: none; }
  .intro-stamp { width: 145px; }
}
@media(max-width:780px) {
  main { padding: 0 4vw; }
  .topbar { height: 65px; }
  #crt-toggle { min-height: 40px; }
  nav { gap: 13px; }
  nav > a { display: none; }
  .local-dot { font-size: 8px; }
  .brand { font-size: 15px; letter-spacing: 2px; gap: 8px; }
  .brand > span { font-size: 8px; padding: 3px; }
  .intro { padding: 35px 0; }
  h1 { font-size: clamp(35px,7.8vw,58px); letter-spacing: -2px; }
  .intro-stamp { display: none; }
  .intro-description { font-size: 11px; }
  .workspace { display: flex; flex-direction: column; gap: 18px; }
  .watch-column, .remix-panel { width: 100%; }
  .player-shell { padding: 0 8px 9px; border-radius: 12px; }
  .player-top { min-height: 35px; font-size: 8px; padding: 0 4px; }
  .stage { border-width: 2px; border-radius: 8px; }
  .transport { gap: 7px; padding-top: 13px; }
  .transport output { font-size: 9px; }
  .transport .icon-button { min-width: 30px; min-height: 40px; font-size: 17px; }
  .transport .text-button { min-height: 40px; }
  .transport > input { height: 30px; }
  .start-overlay { padding: 9px 12px; bottom: 15px; font-size: 9px; }
  .clip-description { padding: 20px 0 8px; }
  .clip-description h2 { font-size: 22px; }
  .panel-content { padding: 22px; }
  .panel-content .muted, .clip-description p { font-size: 12px; }
  .panel-content .tiny, .field-row label, .full-field, .trim-controls label { font-size: 11px; }
  .panel-content button { min-height: 40px; }
  .field-row { grid-template-columns: 1fr; }
  .field-row select, .full-field input, .trim-controls input { font-size: 16px; min-height: 44px; }
  .camera-readout { justify-content: space-around; }
  .perspective-controls > label { font-size: 12px; }
  .perspective-controls > input { height: 36px; }
  .perspective-presets button { flex: 1; padding: 10px 6px; font-size: 9px; }
  .budget-section { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; padding-top: 32px; }
  .budget-card { padding: 20px; }
  footer { margin-top: 32px; padding: 24px 0; flex-wrap: wrap; }
  footer p { display: none; }
}
@media(max-width:390px) { .local-dot { display: none; } .perspective-presets button { font-size: 8px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } button { transition: none; } }
