@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0c0c0e;
  --panel: #121214;
  --panel-raised: #171719;
  --panel-soft: #1c1c1f;
  --line: #2a2a2e;
  --line-bright: #3a3a3f;
  --ink: #f3f0ea;
  --muted: #969398;
  --muted-2: #65636a;
  --coral: #ff6b4a;
  --coral-bright: #ff8064;
  --coral-soft: rgba(255, 107, 74, .15);
  --green: #73e0a2;
  --teal: #5ec8c5;
  --header-h: 62px;
  --timeline-h: 248px;
  --rail-w: 58px;
  --inspector-w: 286px;
}

html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.45 "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
.app-shell { height: 100%; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px 0 18px;
  background: #101012;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; width: max-content; font-size: 15px; font-weight: 700; letter-spacing: -.025em; }
.brand b { color: var(--muted); font-weight: 500; }
.brand-mark {
  width: 25px; height: 25px; border: 1px solid var(--coral); border-radius: 6px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 5px;
  transform: rotate(-8deg);
}
.brand-mark i { display: block; border-radius: 1px; background: var(--coral); opacity: .85; }
.brand-mark i:nth-child(1) { opacity: .45; }
.brand-mark i:nth-child(2) { opacity: .7; }
.brand-mark i:nth-child(3) { opacity: .9; }
.brand-mark i:nth-child(4) { opacity: .55; }
.wcu-wink { width: 27px; height: 27px; border: 1px solid var(--coral); border-radius: 50%; position: relative; display: block; transform: rotate(-4deg); }
.wcu-wink i { position: absolute; width: 8px; height: 4px; border-top: 1px solid var(--coral); border-radius: 50%; left: 6px; top: 7px; transform: rotate(15deg); }
.wcu-wink::after { content: ""; position: absolute; width: 3px; height: 3px; background: var(--coral); border-radius: 50%; right: 6px; top: 7px; }
.wcu-wink b { position: absolute; left: 10px; top: 9px; color: var(--coral); font: 500 10px/1 "DM Mono", monospace; }
.wcu-app-brand > span:last-child { letter-spacing: .04em; }
.project-title-wrap { display: flex; align-items: center; gap: 9px; }
.save-state { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(115, 224, 162, .08); }
.save-state.dirty { background: #ffc46b; box-shadow: 0 0 0 4px rgba(255, 196, 107, .08); }
.project-name { width: 220px; border: 1px solid transparent; background: transparent; text-align: center; padding: 6px 9px; border-radius: 6px; font-weight: 600; letter-spacing: -.01em; }
.project-name:hover, .project-name:focus { outline: none; border-color: var(--line); background: var(--panel-raised); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.button { min-height: 34px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; color: var(--ink); background: var(--panel-soft); border: 1px solid var(--line-bright); cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 600; transition: border-color .15s, background .15s, transform .15s, color .15s; }
.button:hover { border-color: #535158; background: #232326; }
.button:active { transform: translateY(1px); }
.button-primary { color: #140b08; background: var(--coral); border-color: var(--coral); }
.button-primary:hover { background: var(--coral-bright); border-color: var(--coral-bright); }
.button-ghost { background: transparent; border-color: var(--line); }
.button-large { min-height: 42px; padding: 0 19px; font-size: 13px; }
.button-wide { width: 100%; }
.button:disabled { opacity: .38; pointer-events: none; }
.icon { color: var(--muted); font-size: 15px; line-height: 1; }

.workbench { min-height: 0; flex: 1; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--inspector-w); }
.toolrail { padding: 11px 8px 9px; background: #101012; border-right: 1px solid var(--line); display: flex; align-items: center; flex-direction: column; gap: 7px; z-index: 12; }
.tool { position: relative; width: 40px; height: 40px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); background: transparent; cursor: pointer; }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool:hover { color: var(--ink); background: var(--panel-soft); }
.tool.active { color: var(--coral); background: var(--coral-soft); box-shadow: inset 0 0 0 1px rgba(255,107,74,.2); }
.tool::after { content: attr(data-tip); position: absolute; left: 49px; top: 50%; transform: translate(5px,-50%); white-space: nowrap; background: #26262a; border: 1px solid #3b3a40; padding: 5px 8px; border-radius: 5px; color: var(--ink); font-size: 11px; pointer-events: none; opacity: 0; transition: .15s; z-index: 80; }
.tool:hover::after { opacity: 1; transform: translate(0,-50%); }
.tool-divider { width: 24px; border-top: 1px solid var(--line); margin: 2px 0; }
.rail-spacer { flex: 1; }
.question-mark { border: 1px solid currentColor; width: 19px; height: 19px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; }

.stage-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.stage-wrap { position: relative; flex: 1; min-height: 220px; overflow: hidden; background: #09090b; touch-action: none; }
.stage-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.023) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.023) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(circle at center, black 20%, transparent 87%); }
#previewCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
.empty-state { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 24px; background: radial-gradient(circle at 50% 45%, rgba(38,34,33,.48), transparent 45%); }
.empty-state.hidden { display: none; }
.empty-state h1 { margin: 5px 0 8px; font-size: clamp(28px, 3.3vw, 48px); line-height: 1; letter-spacing: -.055em; }
.empty-state > p:not(.eyebrow) { color: var(--muted); width: min(470px, 90%); margin: 0 0 20px; font-size: 14px; }
.empty-state .button { pointer-events: auto; }
.empty-state small { color: var(--muted-2); margin-top: 10px; font-size: 10px; }
.drop-overlay { position: absolute; z-index: 30; inset: 14px; display: grid; place-items: center; border: 2px dashed rgba(255,107,74,.7); border-radius: 12px; background: rgba(12,12,14,.82); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, visibility .15s; }
.drop-overlay div { min-width: 220px; padding: 24px; border-radius: 10px; color: var(--ink); background: rgba(28,28,31,.94); text-align: center; box-shadow: 0 18px 55px rgba(0,0,0,.4); }
.drop-overlay b, .drop-overlay span { display: block; }
.drop-overlay b { font-size: 15px; }
.drop-overlay span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.stage-wrap.drag-over .drop-overlay { opacity: 1; visibility: visible; }
.eyebrow { margin: 0; color: var(--coral); text-transform: uppercase; letter-spacing: .16em; font-size: 9px; font-weight: 700; }
.empty-graphic { width: 86px; height: 70px; position: relative; margin-bottom: 10px; border: 1px solid #3a3738; transform: skewY(-4deg); overflow: hidden; }
.empty-graphic span { position: absolute; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--coral); background: #151316; }
.empty-graphic span:nth-child(1) { left: -4px; top: -4px; }
.empty-graphic span:nth-child(2) { right: -4px; top: -4px; }
.empty-graphic span:nth-child(3) { left: -4px; bottom: -4px; }
.empty-graphic span:nth-child(4) { right: -4px; bottom: -4px; }
.empty-graphic i {
  position: absolute; inset: 16px 10px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255,107,74,.55) 18% 22%, transparent 22% 48%, rgba(94,200,197,.55) 48% 52%, transparent 52% 78%, rgba(255,107,74,.55) 78% 82%, transparent 82%),
    linear-gradient(180deg, #252124, #181719);
  clip-path: polygon(0 20%, 100% 0, 100% 80%, 0 100%);
}
.viewport-hud { position: absolute; z-index: 7; left: 13px; bottom: 12px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: rgba(18,18,20,.88); backdrop-filter: blur(10px); display: flex; align-items: center; padding: 0 5px 0 9px; color: var(--muted); font: 10px "DM Mono", monospace; pointer-events: auto; }
.viewport-hud > span { display: flex; align-items: center; gap: 6px; }
.viewport-hud b { font-weight: 400; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.hud-separator { height: 15px; border-left: 1px solid var(--line); margin: 0 6px; }
.viewport-hud button { background: transparent; color: var(--muted); cursor: pointer; min-width: 24px; height: 25px; border-radius: 4px; }
.viewport-hud button:hover { color: var(--ink); background: var(--panel-soft); }
.viewport-hud .zoom-label { min-width: 44px; }
.selection-hint { position: absolute; z-index: 7; right: 13px; bottom: 12px; background: rgba(18,18,20,.84); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; color: var(--muted-2); font-size: 10px; pointer-events: none; transition: opacity .25s; }

.inspector { min-height: 0; background: #101012; border-left: 1px solid var(--line); overflow: auto; z-index: 10; }
.inspector::-webkit-scrollbar { width: 6px; }
.inspector::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.inspector-header { height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-weight: 600; }
.inspector-header small { color: var(--muted-2); font-size: 10px; font-weight: 500; }
.inspector-section { padding: 17px 14px 18px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; text-transform: uppercase; color: var(--muted); letter-spacing: .12em; font-size: 9px; font-weight: 700; }
.section-title i { height: 1px; flex: 1; background: var(--line); }
.field-label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); padding: 3px; background: #0d0d0f; border-radius: 7px; margin-bottom: 13px; }
.segmented button { height: 29px; color: var(--muted); cursor: pointer; border-radius: 4px; background: transparent; font: 10px "DM Mono", monospace; }
.segmented button:hover { color: var(--ink); }
.segmented button.active { color: var(--ink); background: #29282c; box-shadow: inset 0 0 0 1px #3a393e; }
.property-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; color: var(--muted); font-size: 10px; border-bottom: 1px solid rgba(42,42,46,.65); }
.property-row b { color: #bebbc0; font: 10px "DM Mono", monospace; font-weight: 400; }
.inspector-copy { margin: 0 0 14px; color: var(--muted-2); font-size: 10px; line-height: 1.55; }
.toggle-row { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.toggle-row span { display: flex; flex-direction: column; }
.toggle-row b { font-size: 11px; font-weight: 600; }
.toggle-row small { color: var(--muted-2); font-size: 9px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > i { width: 32px; height: 18px; border-radius: 10px; background: #303035; border: 1px solid #3d3c42; position: relative; transition: .2s; }
.toggle-row > i::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; left: 2px; top: 2px; background: #858289; transition: .2s; }
.toggle-row input:checked + i { background: var(--coral); border-color: var(--coral); }
.toggle-row input:checked + i::after { left: 16px; background: white; }
.xy-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.xy-fields label { color: var(--muted); font-size: 10px; }
.xy-fields input { display: block; width: 100%; margin-top: 5px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #0d0d0f; font: 10px "DM Mono", monospace; }
.xy-fields input:focus, select:focus { outline: 1px solid var(--coral); border-color: var(--coral); }
.xy-fields input:disabled { opacity: .45; }
select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #0d0d0f; font-size: 11px; }

.timeline-panel { height: var(--timeline-h); min-height: var(--timeline-h); background: #111113; border-top: 1px solid var(--line); z-index: 11; }
.timeline-toolbar { height: 52px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); gap: 8px; }
.transport { display: flex; align-items: center; gap: 3px; }
.transport button, .icon-button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); background: transparent; border-radius: 5px; cursor: pointer; font-size: 9px; }
.transport button:hover, .icon-button:hover { color: var(--ink); background: var(--panel-soft); }
.transport .play-button { width: 34px; border: 1px solid var(--line); color: var(--ink); background: var(--panel-soft); }
.pause-icon { display: none; }
.playing .play-icon { display: none; }
.playing .pause-icon { display: inline; }
.timecode { min-width: 76px; color: #d4d1d5; font: 11px "DM Mono", monospace; padding-left: 5px; }
.loop-phase { min-width: 72px; color: var(--muted); font: 10px "DM Mono", monospace; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: #0d0d0f; text-align: center; }
.loop-phase.forward { color: var(--teal); border-color: rgba(94,200,197,.35); }
.loop-phase.reverse { color: var(--coral); border-color: rgba(255,107,74,.35); }
.timeline-spacer { flex: 1; }
.compact-field { height: 30px; display: flex; align-items: center; gap: 6px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 11px; font-size: 9px; }
.compact-field input {
  width: 64px; height: 28px; border: 0; border-radius: 4px;
  padding: 0 20px 0 8px; text-align: left;
  background: var(--panel-soft); color: var(--ink);
  font: 11px "DM Mono", monospace;
}
.compact-field input:focus { outline: 1px solid var(--coral); }
.compact-field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.compact-field input[type="number"]::-webkit-outer-spin-button,
.compact-field input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  opacity: 1;
  height: 28px;
}
.button-record { min-height: 30px; height: 30px; background: transparent; border-color: rgba(255,107,74,.5); color: var(--coral); font-size: 10px; }
.button-record i, .record-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.timeline-ruler-wrap { height: calc(var(--timeline-h) - 52px); padding: 8px 17px 10px; display: flex; flex-direction: column; gap: 4px; }
.timeline-labels { height: 16px; display: flex; justify-content: space-between; color: var(--muted-2); font: 8px "DM Mono", monospace; user-select: none; padding-left: 44px; }
.timeline-lanes { display: flex; flex-direction: column; gap: 6px; min-height: 0; flex: 1; }
.timeline-lane { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px; align-items: center; min-height: 0; }
.lane-label { color: var(--muted-2); font: 8px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.lane-toggle {
  justify-self: start; min-height: 22px; padding: 0 6px; border-radius: 4px;
  color: var(--teal); background: rgba(94,200,197,.1); border: 1px solid rgba(94,200,197,.35);
  cursor: pointer; font: 8px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .06em;
}
.lane-toggle:hover { color: var(--ink); border-color: #5ec8c5; }
.lane-toggle[aria-pressed="false"] {
  color: var(--muted-2); background: transparent; border-color: var(--line);
  text-decoration: line-through;
}
.timeline-track { position: relative; height: 36px; border: 1px solid var(--line); border-radius: 5px; background: #0b0b0d; cursor: ew-resize; outline: none; }
.timeline-track:focus-visible { border-color: #4b484e; }
.track-fill { position: absolute; inset: 0; opacity: .45; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), #29292d calc(10% - 1px), #29292d 10%); }
.segment-range {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0;
  background: linear-gradient(90deg, rgba(255,107,74,.22), rgba(94,200,197,.22));
  border: 1px solid rgba(255,107,74,.45); border-radius: 3px; pointer-events: none; z-index: 1;
}
.audio-range {
  background: linear-gradient(90deg, rgba(94,200,197,.28), rgba(115,224,162,.18));
  border-color: rgba(94,200,197,.55);
}
.range-handle {
  position: absolute; top: 3px; bottom: 3px; width: 10px; margin-left: -5px; z-index: 3;
  border-radius: 3px; background: var(--coral); border: 1px solid #ffaf9d; cursor: ew-resize; touch-action: none; padding: 0;
}
.range-handle::after { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 2px; background: rgba(20,11,8,.55); border-radius: 1px; box-shadow: 2px 0 0 rgba(20,11,8,.55); }
.range-handle.end { background: var(--teal); border-color: #9ee8e5; }
.range-handle.audio { background: #4aa8a5; border-color: #8fdad7; }
.range-handle.audio.end { background: #73e0a2; border-color: #b6f0cf; }
.range-handle:hover, .range-handle.dragging { box-shadow: 0 0 0 4px var(--coral-soft); }
.range-handle.end:hover, .range-handle.end.dragging { box-shadow: 0 0 0 4px rgba(94,200,197,.18); }
.range-handle.audio:hover, .range-handle.audio.dragging { box-shadow: 0 0 0 4px rgba(94,200,197,.2); }
.playhead { position: absolute; z-index: 4; top: -6px; bottom: -5px; width: 1px; left: 0; background: var(--coral); pointer-events: none; }
.playhead::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 2px 2px 50% 50%; top: -1px; left: -3px; background: var(--coral); }
.playhead span { position: absolute; top: 8px; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.audio-playhead { background: var(--teal); }
.audio-playhead::before { background: var(--teal); }
.audio-playhead span { background: var(--teal); box-shadow: 0 0 0 3px rgba(94,200,197,.2); }
.audio-track.is-disabled { opacity: .38; pointer-events: none; }

.drawer-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); visibility: hidden; opacity: 0; transition: .2s; }
.drawer-backdrop.open { visibility: visible; opacity: 1; }
.library-drawer { position: fixed; z-index: 91; top: 0; right: 0; height: 100%; width: min(390px, 92vw); padding: 22px; background: #131315; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.4); transform: translateX(102%); transition: transform .25s ease; }
.library-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-header h2, .modal h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.04em; }
.drawer-close, .modal-close { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); background: var(--panel-soft); cursor: pointer; font-size: 20px; }
.drawer-copy, .modal-copy { color: var(--muted); font-size: 11px; margin: 7px 0 20px; }
.library-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: calc(100% - 100px); }
.library-empty { padding: 48px 18px; border: 1px dashed var(--line-bright); color: var(--muted); text-align: center; border-radius: 8px; }
.project-card { display: grid; grid-template-columns: 65px 1fr auto; gap: 11px; align-items: center; min-height: 68px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #18181b; cursor: pointer; }
.project-card:hover { border-color: #454349; }
.project-card img, .project-card .blank-thumb { width: 65px; height: 50px; object-fit: cover; background: #0a0a0b; border-radius: 5px; }
.project-card > span { min-width: 0; display: flex; flex-direction: column; }
.project-card b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.project-card small { color: var(--muted-2); font-size: 9px; }
.project-card button { color: var(--muted-2); background: transparent; cursor: pointer; font-size: 17px; }
.project-card button:hover { color: #ff7b72; }

.modal { width: min(470px, calc(100vw - 30px)); color: var(--ink); background: #151517; border: 1px solid var(--line-bright); border-radius: 12px; padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.modal form { padding: 24px; position: relative; }
.modal-close { position: absolute; top: 15px; right: 15px; }
.modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.modal-fields label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; }
.modal-fields label span { display: flex; align-items: center; gap: 5px; background: #0c0c0e; border: 1px solid var(--line); border-radius: 6px; padding-right: 9px; }
.modal-fields input { min-width: 0; width: 100%; height: 34px; border: 0; background: transparent; padding: 0 9px; font: 11px "DM Mono", monospace; outline: 0; }
.modal-fields .field-wide { grid-column: 1 / -1; }
.modal-fields .export-gpu-toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  cursor: pointer;
}
.modal-fields .export-gpu-toggle span {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.modal-fields .export-gpu-toggle b { color: var(--ink); font-size: 11px; font-weight: 600; }
.modal-fields .export-gpu-toggle small { color: var(--muted-2); font-size: 9px; font-weight: 400; }
.modal-fields .export-gpu-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.modal-fields .export-gpu-toggle > i {
  flex: 0 0 auto;
  width: 32px;
  height: 18px;
  border-radius: 10px;
  background: #303035;
  border: 1px solid #3d3c42;
  position: relative;
  transition: .2s;
}
.modal-fields .export-gpu-toggle > i::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  background: #858289;
  transition: .2s;
}
.modal-fields .export-gpu-toggle input:checked + i { background: var(--coral); border-color: var(--coral); }
.modal-fields .export-gpu-toggle input:checked + i::after { left: 16px; background: white; }
.modal-fields select { height: 36px; border-color: var(--line); background: #0c0c0e; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 20px; }
.record-progress { margin-top: 16px; height: 34px; display: flex; align-items: center; gap: 9px; color: var(--muted); }
.record-progress i { width: 18px; height: 18px; border: 2px solid var(--line-bright); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.record-progress[hidden], #exportPreview[hidden] { display: none; }
#exportPreview { width: 100%; margin-top: 16px; max-height: 220px; background: black; border-radius: 7px; }
.shortcuts-grid { margin-top: 19px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shortcuts-grid span { display: flex; justify-content: space-between; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; }
kbd { color: var(--ink); background: var(--panel-soft); border: 1px solid var(--line-bright); border-radius: 4px; padding: 1px 5px; font: 9px "DM Mono", monospace; }
.toast-region { position: fixed; z-index: 120; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.toast { padding: 9px 13px; border: 1px solid var(--line-bright); border-radius: 7px; color: #dedbe0; background: rgba(29,29,32,.94); box-shadow: 0 8px 30px rgba(0,0,0,.3); font-size: 11px; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } }

@media (max-width: 900px) {
  :root { --inspector-w: 230px; }
  .brand b, .top-actions .button-ghost { display: none; }
  .project-name { width: 160px; }
}
@media (max-width: 700px) {
  :root { --inspector-w: 0px; --rail-w: 48px; }
  .inspector { display: none; }
  .toolrail { padding-inline: 4px; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .project-title-wrap { justify-content: center; }
  .project-name { width: 130px; }
  .compact-field, .selection-hint, .loop-phase { display: none; }
}
