:root {
  color-scheme: dark;
  --base:#0f0f0f;
  --panel:#1c1c1c;
  --panel-lift:#242424;
  --field:#292929;
  --line:#373737;
  --soft-line:#2d2d2d;
  --text:#f4f4f4;
  --muted:#a8a8a8;
  --accent:#8caee8;
  --active:#252d3c;
  --pop:cubic-bezier(.2,.85,.23,1);
  --mono:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-family:Inter,"Segoe UI","Yu Gothic UI",sans-serif;
  font-size:16px;
  color:var(--text);
  background:var(--base);
}
* { box-sizing:border-box }
body { margin:0; min-width:240px }
button, input, select, summary, a, label { -webkit-tap-highlight-color:transparent }
button,input,select { font:inherit; color:inherit }
button, .tool, .upload, summary, .brand, .check-tool {
  display:inline-flex; align-items:center; justify-content:center; position:relative;
  flex-shrink:0; min-width:38px; min-height:38px; margin:0; padding:7px;
  border:1px solid transparent; border-radius:8px; background:transparent;
  color:var(--muted); cursor:pointer; text-decoration:none; line-height:1.15;
}
button:disabled { cursor:default; opacity:.32 }
button:not(:disabled):hover,.tool:hover,.upload:hover,summary:hover,.brand:hover,.check-tool:hover {
  color:var(--text); background:var(--field);
}
button[aria-pressed=true],button[aria-selected=true] { color:var(--accent) }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,
.upload:focus-within,.number-field:focus-within,.select-field:focus-within,.check-tool:focus-within {
  outline:2px solid var(--accent); outline-offset:2px;
}
[hidden] { display:none !important }
.sr {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap; border:0;
}
.glyph { display:block; flex:none; width:20px; height:20px; overflow:visible; pointer-events:none }
input[type=range] { min-width:0; accent-color:var(--accent); cursor:pointer }
.upload { overflow:hidden }
.upload input,.check-tool input {
  position:absolute; inset:0; z-index:1; width:100%; height:100%; margin:0; opacity:0; cursor:pointer;
}
.appbar {
  height:56px; padding:0 clamp(12px,1.35vw,24px); display:flex; align-items:center; gap:7px;
  background:#121212; border-bottom:1px solid var(--soft-line);
}
.brand { color:var(--text); min-width:32px; padding:4px; border-radius:5px }
.brand .glyph { width:31px; height:31px }
.history { display:flex; gap:1px; margin-left:9px; padding-left:12px; border-left:1px solid var(--line) }
.history .glyph { width:17px; height:17px }
.bar-space { flex:1 }
#language { margin-right:4px }
.paid {
  min-height:36px; gap:10px; padding:6px 13px; border:0; border-radius:7px;
  background:var(--accent); color:#091428; font:650 .86rem var(--mono); font-variant-numeric:tabular-nums;
}
.paid:hover:not(:disabled) { color:#091428; background:#abc6f5 }
.paid .glyph { width:17px; height:17px }
.workroom {
  display:grid; grid-template-columns:54px clamp(185px,19vw,294px) minmax(0,1fr) clamp(166px,17vw,244px);
  grid-template-areas:"rail bin monitor inspector" "edit edit edit edit";
  grid-template-rows:clamp(322px,calc(100svh - 285px),850px) auto;
  min-width:0; min-height:calc(100svh - 56px); align-content:start; gap:2px;
  background:var(--base);
}
.rail { grid-area:rail; display:flex; flex-direction:column; gap:5px; align-items:center; padding:12px 4px; background:#171717 }
.rail button { min-width:42px; min-height:42px; color:#9d9d9d }
.rail button[aria-pressed=true] { background:var(--active); color:var(--accent) }
.rail button[aria-pressed=true]::before {
  content:""; display:block; position:absolute; left:-6px; top:12px; bottom:12px;
  width:2px; border-radius:3px; background:var(--accent);
}
.bin,.inspector { min-width:0; min-height:0; background:var(--panel); scrollbar-width:thin; scrollbar-color:#4d4d4d transparent }
.bin { grid-area:bin; display:flex; overflow:hidden }
.pane { display:flex; flex-direction:column; gap:12px; width:100%; min-width:0; min-height:0; padding:12px; overflow:auto; overscroll-behavior:contain }
.bin-toolbar,.panel-tools,.shelf-tools,.clip-actions { display:flex; align-items:center; flex-wrap:wrap; gap:5px }
.bin-toolbar { flex-shrink:0; justify-content:space-between; padding-bottom:9px; border-bottom:1px solid var(--soft-line) }
.library-tabs { display:flex; align-items:center; gap:2px; background:#121212; border-radius:8px; padding:3px }
.library-tabs button { min-height:31px; min-width:36px; padding:6px; border-radius:6px }
.library-tabs button[aria-pressed=true] { color:var(--text); background:#393939; box-shadow:0 1px 3px #00000066 }
.library-tabs .glyph { width:17px; height:17px }
#presets,#library-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; align-items:start; flex-shrink:0 }
#presets:has(> :nth-child(2):last-child),#library-list:has(> :nth-child(2):last-child) { grid-template-columns:1fr }
.template-choice,#library-list button {
  display:grid; place-items:center; align-self:start; min-width:0; min-height:0; width:100%; padding:3px;
  border-radius:7px; border:1px solid var(--line); background:#131313; overflow:hidden;
}
.template-choice:hover:not(:disabled),#library-list button:hover { border-color:#818181 }
.template-choice[aria-pressed=true],#library-list button[aria-pressed=true] { border-color:var(--accent); background:#1a212e }
.template-choice canvas,#library-list canvas {
  display:block; width:100%; height:auto; max-height:clamp(102px,22vh,260px);
  object-fit:contain; background:#131313; border-radius:4px;
}
.template-choice[aria-pressed=true]::after,#library-list button[aria-pressed=true]::after {
  position:absolute; top:7px; right:7px; content:""; width:8px; height:8px; border-radius:50%;
  border:1px solid #081223; background:var(--accent); box-shadow:0 0 0 2px #15151557;
}
.template-choice span { display:none }
.template-choice small {
  position:absolute; left:7px; bottom:7px; padding:2px 4px; border-radius:3px;
  background:#0b0b0bb8; color:white; font:500 .69rem var(--mono);
}
.shelf-tools { margin-top:auto; padding-top:8px; border-top:1px solid var(--soft-line) }
#community { display:inline-flex; position:relative }
summary { list-style:none }
summary::-webkit-details-marker { display:none }
.publish-pop {
  position:absolute; z-index:8; left:0; bottom:calc(100% + 3px); width:max-content;
  max-width:min(190px,70vw); padding:7px; border:1px solid var(--line); border-radius:8px;
  background:#262626; box-shadow:0 8px 30px #00000088;
}
#publish-confirm p { margin:3px 3px 8px; font-size:.875rem; line-height:1.55 }
#community[open] { display:block; width:100% }
#community[open] .publish-pop {
  position:static; width:100%; max-width:100%; margin-top:3px; background:#292929;
  box-shadow:none; overflow-wrap:anywhere;
}
#publish-yes { color:var(--accent) }
#copy-fallback { width:100%; padding:6px; background:var(--field); border:1px solid var(--line); border-radius:5px }
#library-list:not(:has(button)) { display:block; font-size:.875rem; color:var(--muted) }
#slots,#rig-parts,#fx-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; min-width:0 }
.slot { display:flex; position:relative; justify-content:center; flex-wrap:wrap; align-items:center; min-width:0; padding:4px; border-radius:6px; border:1px solid var(--line); background:#131313 }
.slot canvas { width:100%; height:auto; aspect-ratio:1.15; object-fit:contain; border-radius:3px }
.slot .upload { width:100%; min-height:30px; padding:3px }
.slot button { position:absolute; top:2px; right:2px; min-width:25px; min-height:25px; padding:3px; background:#111111bb; border-radius:50% }
.slot .glyph { width:15px; height:15px }
#rig-parts button,#fx-choices button {
  min-width:0; background:#242424; border:1px solid var(--line); border-radius:6px; overflow:hidden;
}
#rig-parts .glyph,#fx-choices .glyph { width:21px; height:21px }
#rig-parts button[aria-pressed=true],#fx-choices button[aria-pressed=true] { border-color:var(--accent); color:var(--accent); background:#232934 }
#rig-parts canvas,#fx-choices canvas { max-width:100%; max-height:90px; object-fit:contain }
#rig-inspector { display:grid; gap:8px; padding-top:9px; border-top:1px solid var(--soft-line) }
#rig-inspector .panel-tools { gap:2px; flex-wrap:wrap }
#rig-inspector .panel-tools .select-field { flex:1 1 60px }
#rig-inspector .panel-tools :is(button,.upload) { min-width:28px; min-height:32px; padding:4px }
#rig-key[aria-pressed=true] .glyph { fill:currentColor }
.rig-row {
  display:grid; grid-template-columns:minmax(0,1fr) 26px; min-width:0; align-items:stretch;
  background:#292929; border:1px solid #3f3f3f; border-radius:6px; overflow:hidden;
}
#rig-parts .rig-row button { min-width:0; min-height:34px; padding:0; border:0; border-radius:0; background:transparent }
#rig-parts .rig-row [data-part] { background:#919191 }
#rig-parts .rig-row [data-part] canvas { display:block; width:100%; max-height:50px; object-fit:contain }
#rig-parts .rig-row [data-visibility] .glyph { width:15px; height:15px }
#rig-parts .rig-row [data-visibility][aria-pressed=true] { color:#c3c3c3 }
.rig-row:has([data-part][aria-pressed=true]) { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) }
.rig-row:has([data-visibility][aria-pressed=false]) [data-part] { opacity:.4 }
#fx-choices button { min-height:55px; isolation:isolate }
#fx-choices [data-effect] .glyph { width:24px; height:24px; color:#eeeeee }
#fx-choices [data-effect=echo] .glyph { filter:drop-shadow(-4px 0 0 #7e7e7e) drop-shadow(-3px 0 0 #4b4b4b) }
#fx-choices [data-effect=split] .glyph { filter:drop-shadow(-2px 0 0 #90aad6) drop-shadow(2px 1px 0 #7396d2) }
#fx-choices [data-effect=bloom] .glyph { filter:drop-shadow(0 0 4px #c6d7f4) }
#fx-choices [data-effect=shutter] { background:linear-gradient(to bottom,#151515 20%,#363636 20% 80%,#151515 80%) }
#fx-choices [data-effect=grain] { background:radial-gradient(#595959 .65px,transparent .8px) 0 0 / 4px 4px,#282828 }
#fx-choices [data-effect=vignette] { background:radial-gradient(ellipse,#4d4d4d,#141414 75%) }
#fx-choices [data-effect=rush] .glyph { filter:drop-shadow(3px -2px 2px #c3c3c3) }
#fx-choices [data-effect=negative] { background:linear-gradient(110deg,#141414 0 50%,#999999 50%) }
.range-field { display:flex; align-items:center; gap:8px; padding:6px 0; color:var(--muted) }
.range-field input { flex:1 }
.monitor {
  grid-area:monitor; display:grid; grid-template-rows:minmax(0,1fr) 45px; overflow:hidden;
  background:#121212; min-width:0; min-height:0;
}
.screen {
  display:grid; place-items:center; position:relative; overflow:hidden; min-width:0; min-height:0;
  grid-template:minmax(0,1fr) / minmax(0,1fr);
  padding:clamp(9px,1.2vw,22px);
  background:radial-gradient(ellipse at center,#1e1e1e 0%,#141414 76%);
  container-type:size;
}
#stage {
  display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain;
  max-width:100cqw; max-height:100cqh; min-width:0; min-height:0;
  background:#090909; box-shadow:0 0 0 1px #3a3a3a,0 7px 30px #00000055;
  touch-action:none; cursor:grab;
}
#stage:active { cursor:grabbing }
.transport { display:flex; align-items:center; gap:12px; border-top:1px solid var(--soft-line); background:#1a1a1a; padding:0 13px }
#play { color:#f5f5f5; min-height:34px; min-width:33px; padding:6px }
.transport input { flex:1; height:22px; background:transparent; appearance:none }
.transport input::-webkit-slider-runnable-track { height:3px; border-radius:3px; background:#484848 }
.transport input::-webkit-slider-thumb { -webkit-appearance:none; width:11px; height:11px; margin-top:-4px; border:0; border-radius:100%; background:#f5f5f5 }
.transport output { white-space:nowrap; color:#e0e0e0; font:500 .79rem var(--mono); font-variant-numeric:tabular-nums }
.inspector { grid-area:inspector; overflow:auto; overscroll-behavior:contain; padding:0 12px }
.property-group { padding:12px 0 14px; border-bottom:1px solid var(--soft-line) }
.property-group:last-child { border:0 }
.group-mark { display:flex; align-items:center; height:22px; margin:0 0 8px; color:#afafaf }
.group-mark .glyph { width:15px; height:15px }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; min-width:0 }
.number-field,.select-field {
  display:flex; align-items:center; gap:5px; position:relative; min-width:0; min-height:35px;
  padding:0 6px; border-radius:5px; border:1px solid #363636; background:var(--field); color:#acacac;
}
.number-field .glyph,.select-field .glyph { width:15px; height:15px }
.number-field input,.select-field select {
  min-width:0; width:100%; min-height:32px; padding:0; background:transparent; color:#ececec; border:0;
  outline:0; font:500 .82rem var(--mono); font-variant-numeric:tabular-nums;
}
.number-field input:focus-visible,.select-field select:focus-visible { outline:0 }
.number-field input[type=number] { appearance:textfield; -moz-appearance:textfield }
.number-field input::-webkit-inner-spin-button { -webkit-appearance:none }
.select-field select { appearance:none; cursor:pointer; padding-right:11px; outline:0 }
.select-field::after {
  pointer-events:none; position:absolute; right:7px; top:calc(50% - 3px); content:""; width:4px; height:4px;
  border-right:1px solid #c0c0c0; border-bottom:1px solid #c0c0c0; transform:rotate(45deg);
}
.select-field option { background:#232323; color:white }
.number-field:has(:disabled) { opacity:.5 }
.clip-actions { margin-top:6px; gap:4px }
.clip-actions .select-field { flex:1 }
.clip-actions .check-tool,.clip-actions .upload { min-width:32px; min-height:32px; padding:6px }
.check-tool:has(:checked) { color:var(--accent); background:var(--active) }
#overlay-options { margin-top:6px }
.edit {
  grid-area:edit; min-width:0; min-height:190px; padding:0 clamp(10px,1.3vw,24px) 18px;
  border-top:1px solid var(--soft-line); background:#1a1a1a;
}
.timeline-bar { display:flex; align-items:center; height:45px; gap:3px; border-bottom:1px solid var(--soft-line) }
.track-mark { display:flex; justify-content:center; align-items:center; height:22px; margin-right:6px; padding-right:13px; color:var(--muted); border-right:1px solid var(--line) }
.timeline-bar button { min-height:32px; min-width:32px; padding:6px }
.grid-tools { display:flex; align-items:center; margin-left:4px; border-left:1px solid var(--soft-line); padding-left:5px; gap:1px }
.grid-tools button[aria-pressed=true] { color:var(--accent); background:#232934 }
#time-division { width:55px; height:28px; padding:2px 4px; font:500 .76rem var(--mono); border:1px solid var(--soft-line); border-radius:4px; color:inherit; background:#242424 }
#time-units { font:600 .84rem var(--mono) }
@media(max-width:470px){.timeline-bar .track-mark { display:none }.timeline-bar{gap:0}.grid-tools{margin-left:0;padding-left:2px}.timeline-bar .zoom-control{gap:2px}.timeline-bar .zoom-control input{width:43px}}
.timeline-bar .glyph { width:17px; height:17px }
.zoom-control { margin-left:auto; display:flex; align-items:center; gap:7px; color:var(--muted) }
.zoom-control input { width:clamp(48px,8vw,106px); height:26px }
.timeline-scroll { max-width:100%; overflow-x:auto; scrollbar-width:thin; scrollbar-color:#4e4e4e #1c1c1c }
.track-bed { position:relative; isolation:isolate; width:100%; min-width:100%; padding-bottom:1px }
#ruler {
  position:relative; height:30px; padding:3px 0 6px;
  font:500 .71rem/1.25 var(--mono); color:#afafaf;
  background:repeating-linear-gradient(to right,#626262 0 1px,transparent 1px var(--tick,12px)) left bottom 4px / 100% 4px no-repeat;
}
#ruler span { position:absolute; transform:translateX(-50%); white-space:nowrap }
#ruler span:first-child { transform:none } #ruler span:last-child { transform:translateX(-100%) }
.track-bed[data-magnet=true] .layer-track { background-image:repeating-linear-gradient(to right,#a8c1ed1f 0 1px,transparent 1px var(--tick)) }
.cue[data-index]:not([data-index="0"]),.key-marker { cursor:grab;touch-action:none }
.cue[data-index]:not([data-index="0"])::before { content:"";position:absolute;left:0;top:25%;height:50%;width:2px;background:#c3c9d494;z-index:1 }
#timeline { display:flex; gap:0; width:100%; min-height:43px; overflow:hidden; border-radius:4px; background:#2f2f2f }
.cue {
  display:block; position:relative; flex:1 1 0; min-width:0; min-height:43px; padding:0; margin:0;
  overflow:hidden; border:0; border-radius:0; background:#3e3e3e;
}
.cue canvas { display:block; width:100%; height:43px; object-fit:cover; object-position:50% 36%; pointer-events:none }
.cue span { position:absolute; bottom:1px; right:3px; color:#ffffff; text-shadow:0 1px 3px #111111; font:550 .65rem var(--mono) }
.cue::after { content:""; position:absolute; inset:0; border-right:1px solid #1e1e1e; pointer-events:none }
.cue[aria-pressed=true]::after { border:2px solid var(--accent); border-radius:3px; box-shadow:inset 0 0 0 1px #18202e }
#layer-tracks { max-height:148px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#5e5e5e #1a1a1a }
.layer-track { min-width:0; min-height:22px; margin-top:3px; border-radius:4px; background:var(--active) }
.layer-track { position:relative; height:22px; overflow:hidden; border:1px solid #303640; background:#20242c }
.layer-track[data-active=true] { background:#343c49; border-color:#6d7f9e }
.layer-track[data-hidden=true] { opacity:.48 }
.lane-hit {
  display:flex; justify-content:flex-start; width:100%; height:100%; min-height:0;
  border:0; border-radius:0; padding:0; isolation:isolate;
}
.lane-hit canvas { display:block; width:32px; height:100%; border-right:1px solid #515151; object-fit:contain; background:#8a8a8a }
.lane-hit::after { content:""; position:absolute; z-index:-1; left:32px; right:0; top:50%; height:1px; background:#8e8e8e32 }
.lane-hit:hover:not(:disabled) { background:#3c4452 }
.key-marker {
  position:absolute; top:0; transform:translateX(-50%); display:flex; align-items:center; justify-content:center;
  min-width:18px; min-height:0; height:100%; padding:0; border:0; border-radius:0;
  background:transparent; color:#b5c9ec; font:normal .65rem var(--mono);
}
.key-marker:hover:not(:disabled),.key-marker:active:not(:disabled) { background:#4b5b76; color:#ffffff; transform:translateX(-50%) }
.timeline-frame { display:grid;grid-template-columns:33px minmax(0,1fr);align-items:start;--ruler-h:30px;--video-h:43px;--audio-h:27px }
.track-heads { display:flex;flex-direction:column;align-items:stretch;padding-right:3px;border-right:1px solid var(--soft-line);background:#181818 }
.track-heads .ruler-gutter { display:grid;place-items:center;height:var(--ruler-h);color:#909090 }
.ruler-gutter .glyph,.track-heads button .glyph { width:15px;height:15px }
.track-heads button { display:grid;place-items:center;padding:0;min-width:0;min-height:0;border:0;border-radius:3px;background:#303030;color:#dce5f4 }
.track-heads button[aria-pressed=false] { background:#222222;color:#8f8f8f }
#video-eye { height:var(--video-h) } #audio-speaker { margin-top:4px;height:var(--audio-h) }
#lane-heads { overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;height:var(--lanes-h,0px) }
#lane-heads::-webkit-scrollbar { display:none }
#lane-heads .track-eye { width:100%;height:22px;margin:3px 0 0 }
#wave[data-muted=true],#timeline[data-hidden=true] { opacity:.42 }
.track-eye .glyph { width:15px;height:15px }
.track-eye[aria-pressed=false] { color:#8a8a8a }
.login-btn { display:flex;align-items:center;gap:5px;padding:5px 8px;color:#dfe3eb;font-size:.78rem }
.login-btn .glyph { width:16px;height:16px }
.caption-tools { display:grid;gap:6px;justify-items:start;margin-bottom:6px }
#caption-fields { display:grid;gap:6px;width:100%;min-width:0 }
#caption-copy { width:100%;resize:vertical;background:#1c1c1c;color:#f4f4f4;border:1px solid var(--soft-line);padding:5px }
#caption-fields select { max-width:100% }
.field-grid>.select-field:has(#rig-curve) { grid-column:1/-1 }
.clip-actions .select-field:has(#cut-curve) { order:2;flex:1 1 100% }
#caption-track,#caption-eye { height:24px;margin-top:3px }
#caption-track { position:relative;background:#2b2b2b;border-radius:4px;overflow:hidden }
#caption-track button { position:absolute;top:0;height:24px;min-height:0;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;padding:2px 6px;background:#444444;border:1px solid #5b5b5b;border-radius:3px }
#caption-track button[aria-pressed=true] { border-color:var(--accent) }
.moving-key { color:#ffffff; background:#41516d }
.key-marker { z-index:4 }
.key-marker[style^="left: 0%"] { transform:none }
.key-marker[style^="left: 100%"] { transform:translateX(-100%) }
#wave { display:block; width:100%; height:27px; margin-top:4px; border-radius:4px; cursor:crosshair; touch-action:none; filter:invert(1) sepia(.35) hue-rotate(101deg) saturate(1.45) }
#ruler,#timeline,#playhead { user-select:none; touch-action:none; cursor:ew-resize }
.lane-hit { touch-action:pan-y }
#playhead { position:absolute; z-index:3; top:11px; bottom:0; width:17px; transform:translateX(-50%); background:linear-gradient(90deg,transparent calc(50% - 1px),#fdfdfd 0,#fdfdfd calc(50% + 1px),transparent 0); filter:drop-shadow(0 0 1px #111111) }
#playhead::before { content:""; display:block; margin:auto; width:13px; height:13px; background:#fdfdfd; clip-path:polygon(0 0,100% 0,100% 50%,50% 100%,0 50%) }
#playhead:focus-visible { outline:2px solid var(--accent); outline-offset:-2px }
.track-bed[data-seeking] { cursor:ew-resize }
#notice:not(:empty),#recovery:not([hidden]) {
  position:fixed; right:12px; bottom:12px; z-index:9; max-width:min(370px,95vw); padding:7px 12px;
  background:#353535; border:1px solid #505050; border-radius:7px; font-size:.875rem; box-shadow:0 5px 25px #00000088;
}
#notice:not(:empty):has(~#recovery:not([hidden])) { bottom:66px }
#recovery:not([hidden]) { padding:3px 6px }
dialog { width:min(460px,94vw); max-height:88svh; padding:25px; border:1px solid #464646; border-radius:14px; color:var(--text); background:#242424; box-shadow:0 22px 65px #070707b0 }
dialog::backdrop { background:#0b0b0bcc }
dialog h2 { font-weight:650; font-size:1.45rem; line-height:1.3; margin:.3rem 0 }
dialog p { font-size:1rem; color:#dcdcdc; line-height:1.6; margin:10px 0 }
dialog .quote { font-size:1.35rem; font-weight:650; color:#ffffff }
dialog .close { float:right; padding:5px; min-height:31px; min-width:31px }
#order-buttons { display:flex; flex-wrap:wrap; gap:6px; margin:14px 0 }
#order-buttons button { color:var(--text); background:var(--field); border:1px solid var(--line); padding:8px 11px; font-size:.89rem }
#order-buttons .solid { color:#0b1629; background:var(--accent); border-color:var(--accent) }
.terms { font-size:.83rem; color:#c0c0c0 }
@media(min-width:1050px) {
  .inspector,.pane { padding-inline:15px }
  .group-mark { margin-bottom:12px }
  .property-group { padding-block:16px }
}
@media(min-width:601px) {
  .workroom:has(#layer-tracks:not([hidden]) > .layer-track) { grid-template-rows:clamp(300px,calc(100svh - 345px),850px) auto }
  #layer-tracks { max-height:clamp(80px,12vh,118px) }
  #presets:has(>.template-choice:nth-child(3):last-child) .template-choice:nth-child(3) { grid-column:2; grid-row:1 / span 2 }
}
@media(max-width:780px) and (min-width:601px) {
  .workroom { grid-template-columns:43px 158px minmax(0,1fr) 133px }
  .pane,.inspector { padding-inline:7px }
  .rail { padding-inline:1px }
  .rail button { min-width:37px }
  .number-field,.select-field { padding-inline:4px; gap:3px }
  .number-field .glyph,.select-field .glyph { width:12px; height:12px }
}
@media(max-width:600px) {
  .appbar { height:46px; padding:0 8px; gap:3px }
  .brand .glyph { width:26px; height:26px }
  .history { margin-left:1px; padding-left:5px }
  .history button,.tool { min-width:32px; min-height:32px }
  .paid { min-height:32px; padding:5px 10px }
  .workroom {
    grid-template-columns:minmax(0,1fr); grid-template-areas:"monitor" "rail" "bin" "edit" "inspector";
    grid-template-rows:clamp(250px,43svh,400px) auto auto auto auto; min-height:calc(100svh - 46px);
  }
  .monitor { grid-template-rows:minmax(0,1fr) 39px }
  .screen { padding:8px }
  .transport { padding-inline:9px; gap:7px }
  .transport output { font-size:.74rem }
  .rail { flex-direction:row; justify-content:space-evenly; padding:3px 8px; gap:4px; border-block:1px solid #2c2c2c }
  .rail button { min-width:44px; min-height:36px; padding:5px 9px }
  .rail button::before { display:none!important }
  .pane { padding:7px 9px; gap:7px; max-height:265px }
  #templates-panel { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start }
  .bin-toolbar { flex-wrap:nowrap; align-self:stretch; align-items:flex-start; border:0; flex-direction:column; gap:2px; padding:0 }
  .bin-toolbar .upload,.library-tabs button,.shelf-tools :is(button,summary) { min-height:30px; min-width:31px; padding:4px }
  .library-tabs { flex-direction:column; padding:2px; gap:1px }
  #presets,#library-list,#presets:has(> :nth-child(2):last-child),#library-list:has(> :nth-child(2):last-child) {
    display:flex; flex-wrap:nowrap; align-items:flex-start; overflow-x:auto; min-width:0; padding:1px 0 4px; gap:7px; scrollbar-width:thin;
  }
  .template-choice,#library-list button { display:grid; flex:0 0 auto; width:auto; padding:2px; border-radius:5px }
  .template-choice canvas,#library-list canvas { height:85px; max-width:146px; max-height:100%; width:auto }
  .shelf-tools { grid-column:1/-1; justify-content:flex-end; gap:5px; padding:3px 0 0; margin:0 }
  .shelf-tools .glyph { width:16px; height:16px }
  #copy-fallback { grid-column:1/-1 }
  .publish-pop { left:auto; right:0 }
  #slots,#rig-parts,#fx-choices { grid-template-columns:repeat(4,minmax(0,1fr)) }
  #rig-inspector { display:flex; flex-wrap:wrap; gap:5px }
  #rig-inspector .field-grid { flex:1 1 150px; gap:3px }
  #rig-inspector .panel-tools { gap:1px; align-content:start }
  #rig-inspector .panel-tools .select-field { flex:0 1 56px }
  .rig-row { grid-template-columns:minmax(0,1fr) 22px }
  #rig-parts .rig-row [data-part] canvas { max-height:37px }
  #fx-choices button { min-height:50px }
  .slot canvas { max-height:65px }
  .edit { min-height:143px; padding:0 8px 9px }
  .timeline-bar { height:34px }
  #ruler { height:23px; font-size:.67rem }
  #timeline,.cue { min-height:37px }
  .cue canvas { height:37px }
  #layer-tracks { max-height:95px }
  #playhead { top:15px }
  #wave { height:22px }
  .inspector { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 9px; padding:0 9px 14px; overflow:visible }
  .property-group { padding:9px 0 }
  .property-group:nth-child(2) { grid-column:2; grid-row:1 / span 2 }
  .group-mark { margin-bottom:5px; height:16px }
  .field-grid { gap:4px }
  .number-field,.select-field { padding-inline:4px; min-height:32px; gap:3px }
  .number-field input,.select-field select { min-height:29px }
}
@media(prefers-reduced-motion:no-preference) {
  button,.tool,summary,.upload,.check-tool,.brand,.template-choice canvas { transition:color .14s,background-color .16s,border-color .16s,transform .23s var(--pop) }
  button:not(:disabled):active,.tool:active,summary:active,.upload:active { transform:scale(.93) }
  .pane:not([hidden]) { animation:pane-in .19s var(--pop) both }
  .rail button .glyph,.library-tabs button .glyph { transition:transform .22s var(--pop) }
  .rail button[aria-pressed=true] .glyph,.library-tabs button[aria-pressed=true] .glyph { transform:scale(1.07) }
  .template-choice:hover canvas { transform:scale(1.018) }
  @keyframes pane-in { from { opacity:.35; transform:translateY(3px) } to { opacity:1; transform:none } }
}

.rail,.library-tabs { position:relative; isolation:isolate }
.rail::before,.library-tabs::before {
  content:""; display:block; position:absolute; pointer-events:none; z-index:-1;
  border-radius:8px;
}
.rail::before {
  top:12px; left:50%; width:42px; height:42px; background:var(--active);
  transform:translate(-50%,calc(var(--active-tool,0) * 47px));
}
.rail button[aria-pressed=true],.library-tabs button[aria-pressed=true] { background:transparent; box-shadow:none }
.rail button[aria-pressed=true]::before { display:none }
.library-tabs::before {
  left:3px; top:3px; width:36px; height:31px; border-radius:6px;
  background:#393939; box-shadow:0 1px 3px #00000066;
  transform:translateX(calc(var(--shared,0) * 38px));
}
@media(max-width:780px) and (min-width:601px) {
  .rail::before { width:37px }
}
@media(max-width:600px) {
  .rail { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) }
  .rail::before {
    left:8px; top:3px; width:calc((100% - 28px) / 4); height:36px;
    transform:translateX(calc(var(--active-tool,0) * (100% + 4px)));
  }
  .library-tabs::before { left:2px; top:2px; width:31px; height:30px; transform:translateY(calc(var(--shared,0) * 31px)) }
}
@media(prefers-reduced-motion:no-preference) {
  .rail::before,.library-tabs::before { transition:transform .29s cubic-bezier(.22,.95,.32,1.13) }
}

.workroom[aria-busy="true"] .screen::after {
  content:""; width:24px; height:24px; position:absolute; border:2px solid #474747;
  border-top-color:#eaeaea; border-radius:50%; animation:art-loading .8s linear infinite;
}
@keyframes art-loading { to { transform:rotate(1turn) } }
.edit-label { font:600 .72rem/1.2 system-ui;margin:10px 0 4px;color:#d2d6de }
.rig-line { display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:5px 0 }
.rig-line button { font-size:.72rem }
.rig-row { position:relative }
.rig-row input[data-destination] { position:absolute;bottom:1px;left:1px;width:14px;height:14px;margin:0;accent-color:var(--accent) }
#puppet-properties details { font-size:.75rem;color:var(--muted);margin:6px 0 }
#ruler .beat-marker { color:#6b9bed;font-size:10px;transform:translateX(-50%);bottom:0 }
#rig-graph,#cut-graph { flex-basis:100%;min-width:0;width:100% }
.type-heading { display:flex;align-items:center;justify-content:space-between;gap:8px;margin:1px 0 6px }
.type-heading>label:first-child { font-size:.8rem;font-weight:650;color:#f2f2f2 }
.caption-tools #caption-entry,.caption-tools #caption-copy { box-sizing:border-box;width:100%;min-height:50px;resize:vertical;padding:8px 9px;border:1px solid var(--soft-line);border-radius:6px;background:#161616;color:inherit;font:500 .81rem/1.5 system-ui,sans-serif }
.caption-tools #caption-entry:focus,.caption-tools #caption-copy:focus { outline:1px solid var(--accent);outline-offset:-1px }
.caption-tools .insert-type { display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-height:30px;margin:5px 0 8px;border-radius:5px;background:#eaeaea;color:#171c25;font-weight:650;font-size:.76rem }
.insert-type .glyph { width:13px;height:13px }
#caption-fields .select-field,#aspect-preset { max-width:100%;min-width:0 }
#aspect-fields { margin-top:4px }
#division-custom { width:57px;background:#222222;color:inherit;border:1px solid var(--soft-line);border-radius:4px;padding:5px }
#caption-fields .number-field:has(#caption-width)::after,#caption-fields .number-field:has(#caption-height)::after { content:'%';color:#a7a7a7;font-size:10px }
@media(max-width:600px){
  .timeline-bar:has(#division-custom:not([hidden])) { flex-wrap:wrap;height:auto;row-gap:4px }
  .bin:has(#media-panel:not([hidden])) { overflow:auto }
  #media-panel .caption-tools { min-width:min(176px,55vw);max-width:220px }
}
@media (prefers-reduced-motion:reduce) { .workroom[aria-busy="true"] .screen::after { animation:none } }
.fx-hint { margin:0 0 8px;color:var(--muted);font-size:.72rem }
#fx-choices [draggable] { cursor:grab;touch-action:none;user-select:none }
#fx-choices [draggable]:active { cursor:grabbing }
.fx-drop-target,#background-tracks.file-over { outline:2px solid var(--accent);outline-offset:-3px }
.cue.fx-drop-target::after { background:#9bbcf433;border:2px solid var(--accent) }
.clip-fx { position:absolute;top:3px;left:3px;padding:1px 4px;border-radius:3px;color:#eaf0fb;background:#171e29ee;font:650 9px/1.3 var(--mono);pointer-events:none }
.fx-drag-ghost { position:fixed;z-index:1000;transform:translate(-50%,calc(-100% - 12px));pointer-events:none;border-radius:5px;background:#dee7f6;color:#101724;padding:5px 9px;font-size:12px }
.backdrop-file-tools { display:flex;align-items:center;gap:2px }
.backdrop-file-tools .upload { display:grid;place-items:center;width:32px;height:32px }
.edit:not([data-timeline-face=background]) .backdrop-file-tools { display:none }
@media(max-width:540px){
  .timeline-bar { height:auto;min-height:34px;flex-wrap:wrap;row-gap:2px;padding-block:2px }
  .fx-hint { margin:0 4px 4px }
}
@media(max-width:440px){
  .timeline-bar:has(#background-switch:not([hidden])) .grid-tools { flex:1 0 calc(100% - 88px);margin-left:0;padding-left:0;border:0 }
  #background-switch .fb-face-toggle { width:69px }
  #background-switch .fb-ticket-type b { display:inline }
}
