:root {
  color-scheme: dark;
  --bg:#151719; --surface:#202426; --text:#f0f0e9;
  --muted:#bec4bf; --line:#6a756e; --accent:#d9edaa; --ink:#152010;
  --record:#ff9b94; --radius:8px;
  font-family:system-ui,"Yu Gothic",sans-serif;
}
* {box-sizing:border-box}
body {margin:0;background:var(--bg);color:var(--text);font-size:16px;line-height:1.75}
button,select,input {font:inherit}
button,select {color:var(--text)}
[hidden] {display:none!important}
.appHeader,main,footer {width:min(100%,1104px);margin-inline:auto;padding-inline:32px}
.appHeader {display:flex;align-items:center;justify-content:space-between;gap:24px;padding-block:24px;border-bottom:1px solid var(--line)}
.brand {display:flex;align-items:baseline;gap:16px;color:var(--text);font-size:20px;font-weight:700;text-decoration:none}
.brand span {font-size:12px;font-weight:400;color:var(--muted)}
.mode {display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.modeDot {width:8px;height:8px;border:1px solid var(--muted);border-radius:50%}
body[data-state=ready] .modeDot,body[data-state=review] .modeDot {background:var(--accent);border-color:var(--accent)}
body[data-state=recording] .mode {color:var(--record)}
body[data-state=recording] .modeDot {background:var(--record);border-color:var(--record)}
.progress {display:flex;justify-content:center;gap:32px;list-style:none;padding:24px 0;margin:0;color:var(--muted);font-size:13px}
.progress li {display:flex;align-items:center;gap:8px}
.progress li span {font-family:ui-monospace,monospace;font-size:12px}
.progress li[aria-current=step] {color:var(--accent);font-weight:700}
.workspace {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,380px);gap:48px;align-items:start}
.stage {min-width:0;display:flex;flex-direction:column;align-items:center}
.stageHeading {width:100%;text-align:center;margin-bottom:24px}
h1,h2,p {margin:0}
h1 {font-size:28px;line-height:1.35;font-weight:650;letter-spacing:-.025em}
.stageHeading p {color:var(--muted);font-size:13px;margin-top:8px}
.stageSurface {position:relative;width:min(100%,360px,calc((100svh - 220px)*9/16));min-width:180px;aspect-ratio:9/16;background:#080a09;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.stageSurface canvas,.stageSurface video {display:block;width:100%;height:100%;object-fit:contain;background:#080a09}
#overlay {position:absolute;inset:0;display:grid;place-items:center;text-align:center;white-space:pre-line;pointer-events:none;background:var(--surface);font-size:20px;line-height:1.75;color:var(--muted);padding:24px}
#overlay:empty {display:none}
body[data-state=countdown] #overlay {font:64px ui-monospace,monospace;color:var(--accent);background:#0005}
body[data-state=recording] .stageSurface {border-color:var(--record)}
.stageCaption {display:flex;align-items:start;justify-content:space-between;gap:16px;width:100%;max-width:360px;margin-top:12px;font-size:12px;color:var(--muted)}
#stagePhase {flex:none;color:var(--accent);font-weight:700}
#geometry {text-align:right;overflow-wrap:anywhere}
.controls {min-width:0}
#status {padding:0 0 16px;border-bottom:1px solid var(--line);margin-bottom:24px;color:var(--muted);font-size:14px}
fieldset {border:0;padding:0;margin:0 0 24px;min-width:0}
legend {padding:0;margin-bottom:12px;font-size:16px;font-weight:650;color:var(--text)}
label {display:block;font-size:14px;line-height:1.5;margin-bottom:8px}
.deviceFields {display:grid;grid-template-columns:1fr 1fr;gap:12px}
select {width:100%;min-height:44px;min-width:0;padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);font-size:14px}
button {min-height:44px;padding:10px 16px;background:transparent;border:1px solid var(--line);border-radius:var(--radius);font-size:14px;font-weight:600;line-height:1.5;cursor:pointer}
button:hover:not(:disabled) {border-color:var(--accent)}
button:disabled {opacity:.45;cursor:not-allowed}
button.primary {background:var(--accent);color:var(--ink);border-color:var(--accent)}
button.primary:hover:not(:disabled) {background:#e6f6c1}
button.textButton {border-color:transparent;padding-inline:8px;color:var(--muted)}
.check {display:flex;align-items:center;gap:8px;margin-top:12px}
input[type=checkbox] {width:16px;height:16px;accent-color:var(--accent);margin:0}
.actions {display:flex;flex-wrap:wrap;gap:8px}
.setupActions {margin-block:12px 8px}
.hint {color:var(--muted);font-size:13px;line-height:1.75}
input[type=range] {width:100%;height:28px;margin:0;accent-color:var(--accent)}
output {float:right;font-family:ui-monospace,monospace;color:var(--muted)}
.rangeLabels {display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:12px}
meter {display:block;width:100%;height:12px;margin-bottom:8px;accent-color:var(--accent)}
.recordActions {border-top:1px solid var(--line);padding-top:16px}
.timer {display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:12px}
.timer span {font:28px/1.3 ui-monospace,monospace}
.timer small {font-size:12px;color:var(--muted)}
.recordActions .hint {margin-top:8px}
#record {flex:1}
.recordDot {display:inline-block;width:8px;height:8px;background:currentColor;border-radius:50%;margin-right:8px}
.backButton {margin-top:16px;width:100%}
.reviewIntro {margin-bottom:24px}
.sectionLabel {font-size:13px;color:var(--accent)}
h2 {font-size:28px;line-height:1.35;font-weight:650;margin-block:8px 12px}
.reviewIntro p {font-size:14px;color:var(--muted)}
.reviewFacts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:16px 0;margin:0;border-block:1px solid var(--line)}
.reviewFacts div {min-width:0}
dt {font-size:12px;color:var(--muted)}
dd {margin:8px 0 0;font-size:16px;font-weight:650}
#reviewDuration {font-family:ui-monospace,monospace}
.fileInfo {font-size:12px;line-height:1.75;overflow-wrap:anywhere;color:var(--muted);margin-block:16px 24px}
.reviewActions {display:flex;flex-direction:column;gap:12px}
.reviewActions button {width:100%;min-height:48px;font-size:16px}
.saveStatus {font-size:14px;color:var(--accent);overflow-wrap:anywhere;margin-block:16px}
.saveStatus:empty {display:none}
.reviewActions+.saveStatus+.hint {margin-top:16px}
.privacyNote {font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:16px;margin-top:24px}
.qa {border-top:1px solid var(--line);padding-top:24px;margin-top:32px;font-size:13px}
.qa .actions {margin-top:12px}
pre {font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
footer {padding-block:24px;margin-top:24px;color:var(--muted);font-size:12px;text-align:center}
:focus-visible {outline:3px solid var(--accent);outline-offset:4px}
#reviewTitle:focus {outline:none}
body[data-state=review] #geometry {max-width:270px}
@media(max-width:850px) {
  .appHeader,main,footer {padding-inline:24px}
  .workspace {grid-template-columns:minmax(0,1fr) minmax(0,340px);gap:24px}
  h1,h2 {font-size:24px}
  .brand span {display:none}
}
@media(max-width:650px) {
  .appHeader,main,footer {padding-inline:16px}
  .appHeader {padding-block:16px;gap:12px}
  .brand {font-size:18px}
  .mode {font-size:12px;flex:none}
  .progress {padding-block:16px;gap:24px;font-size:12px}
  .workspace {grid-template-columns:minmax(0,1fr);gap:24px}
  .stageHeading {margin-bottom:16px}
  .stageSurface {width:min(100%,300px,calc((100svh - 200px)*9/16));min-width:180px}
  .stageCaption {max-width:300px}
  #status {margin-bottom:24px}
  h1,h2 {font-size:24px}
  .timer {flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

.stageSurface:focus-within {outline:3px solid var(--accent);outline-offset:4px}
.lookPresets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 0 20px}
.lookPresets button{min-height:44px}
.lookPresets button[aria-pressed="true"]{background:var(--accent);color:var(--ink);border-color:var(--accent)}
.lookActions{margin-top:12px}
.lookDetails,.shootGuide{margin:16px 0 24px}
.lookDetails summary,.shootGuide summary{cursor:pointer;min-height:44px;display:list-item;align-content:center;color:var(--text)}
.lookDetails[open] summary{margin-bottom:16px}
.shootGuide ol{padding-left:1.4em;margin:8px 0}
.shootGuide li{margin-bottom:10px}
