/* FaceBlur: compact dark editing UI. */
:root {
  color-scheme: dark;
  --bg: #171717; --panel: #212121; --panel-2: #2a2a2a; --panel-3: #333; --line: #2f2f2f; --line-2: #3b3b3b;
  --text: #f2f2f2; --muted: #9c9c9c; --faint: #6f6f6f;
  --accent: #f36b65; --accent-hover: #ff817b; --accent-dim: #f36b6533; --selected: #ffd166;
  --zone: #b58cff; --clip: #4cc9b0; --audio: #f2b84b;
  --radius: 6px; --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 var(--font); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.icon { flex: none; display: block; }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--panel-2); border-radius: 3px; padding: 1px 4px; }
input[type=search], input[type=number], input:not([type]), textarea {
  background: #141414; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 7px 9px; outline: none; min-width: 0; width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }

/* Buttons */
.btn, .btn-accent, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius); padding: 7px 12px; font-weight: 600; border: 1px solid var(--line-2); background: var(--panel-2); text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--panel-3); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); }
.btn-danger { background: transparent; border-color: #6b3330; color: #ff9690; }
.btn-danger:hover { background: #3a1f1d; }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn.wide, .btn-accent.wide { width: 100%; margin: 10px 0 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); text-decoration: none; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.mini { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 0; }
.mini:hover { background: var(--panel-3); color: var(--text); }

/* Top bar (both pages) */
.topbar { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; letter-spacing: .01em; }
.logo-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: #fff; }
.topnav { display: flex; gap: 4px; margin-left: 18px; }
.topnav a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.topnav a.active, .topnav a:hover { background: var(--panel-2); color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.divider { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.filename { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.save-state { color: var(--faint); font-size: 12px; white-space: nowrap; }
.menu-wrap, .dropdown { position: relative; }
.menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 4px; box-shadow: 0 12px 30px #0008; z-index: 40; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--panel-3); }

/* ---------------------------------------------------------------- media library */
.library { padding: 26px 28px 40px; max-width: 1800px; margin: 0 auto; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.library-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.library-tools { display: flex; align-items: center; gap: 8px; }
.search-wrap { display: flex; align-items: center; gap: 4px; }
.search-wrap input { width: 0; padding: 7px 0; border-width: 0; transition: width .2s, padding .2s; }
.search-wrap.open input { width: 220px; padding: 7px 9px; border-width: 1px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 16px; }
.media-card { position: relative; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0e0e0e; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.media-card:hover .thumb img { transform: scale(1.03); }
.media-card:hover .thumb { border-color: var(--line-2); }
.thumb-empty { height: 100%; display: grid; place-items: center; color: var(--faint); }
.badge { position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #000a; backdrop-filter: blur(6px); border: 1px solid transparent; }
.badge-ready { color: #8fe3b6; border-color: #2f6b4b; }
.badge-redacted { color: #fff; background: #c9443ecc; }
.badge-detecting, .badge-queued, .badge-uploading { color: #ffd27a; border-color: #6e5a2c; }
.badge-redacting { color: #ffb0ab; border-color: #7a3936; }
.badge-failed { color: #ff8d86; border-color: #8a2f2b; background: #2b0f0ecc; }
.badge-uploaded, .badge-empty { color: var(--muted); border-color: var(--line-2); }
.duration { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 4px; font-size: 11px; background: #000b; font-variant-numeric: tabular-nums; }
.thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #0008; }
.thumb-progress span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.thumb-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.media-card:hover .thumb-actions, .thumb-actions:focus-within { opacity: 1; }
.thumb-action { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 5px; background: #000b; color: #ddd; text-decoration: none; }
.thumb-action:hover { background: #000; color: #fff; }
.card-meta { padding: 8px 2px 0; min-width: 0; }
.card-meta h2 { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta p { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-empty { grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 8px; }
.grid-empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* Modals */
dialog.modal { width: min(540px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px #000c; }
dialog.modal.small { width: min(420px, calc(100% - 32px)); }
dialog.modal.wide { width: min(860px, calc(100% - 32px)); }
dialog::backdrop { background: #000b; }
dialog h2 { margin: 0 0 14px; font-size: 17px; }
dialog h3 { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.modal-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent); margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 30px 16px; border: 1.5px dashed var(--line-2); border-radius: 8px; background: #1a1a1a; color: var(--muted); cursor: pointer; }
.dropzone strong { color: var(--text); }
.dropzone span { font-size: 12px; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: #1f1a1a; }
.row-buttons { display: flex; gap: 8px; margin-top: 10px; }
.file-pick-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 190px; overflow: auto; }
.file-pick-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; background: #1a1a1a; margin-bottom: 4px; }
.file-pick-list span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-pick-list small { color: var(--muted); }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.option { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; }
.option small { grid-column: 2; color: var(--muted); font-size: 11px; }
.option input { accent-color: var(--accent); }
.option.unavailable { opacity: .5; cursor: not-allowed; }
.help-list { padding-left: 20px; margin: 0; display: grid; gap: 8px; color: #ddd; }
.muted { color: var(--muted); } .small { font-size: 12px; }
#rename-form input { margin-top: 4px; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: min(640px, calc(100% - 32px)); padding: 10px 14px; border-radius: 8px; background: #2d2d2d; border: 1px solid var(--line-2); box-shadow: 0 12px 30px #0009; transition: opacity .2s, transform .2s; z-index: 100; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #3a1d1b; border-color: #7a3430; }

/* ---------------------------------------------------------------- editor */
.editor-page { height: 100vh; overflow: hidden; display: grid; grid-template-rows: 48px minmax(0, 1fr) clamp(200px, 34vh, 420px); }
.editor { display: grid; grid-template-columns: 74px auto minmax(0, 1fr); min-height: 0; }
.rail { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.rail button { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 10.5px; line-height: 1.15; text-align: center; }
.rail button:hover { color: var(--text); background: #262626; }
.rail button.active { background: var(--panel-3); color: var(--text); }
.tool-panel { width: 300px; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 14px 14px 24px; }
.tool-panel h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.tool-panel h2.spaced { margin-top: 22px; }
.tool-panel h3 { margin: 16px 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0; }
.section-row { display: flex; align-items: center; justify-content: space-between; }
.section-row h2 { margin-bottom: 0; }
.style-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.style-picker button { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #1a1a1a; font-size: 12px; }
.style-picker button.active { border-color: var(--accent); background: #2a1b1a; }
.swatch { width: 38px; height: 26px; border-radius: 4px; }
.swatch-smooth { background: radial-gradient(circle at 40% 40%, #c9b8a8, #6c625a 70%); filter: blur(2px); }
.swatch-pixelated { background: conic-gradient(#8d7f73 25%, #c4b5a6 0 50%, #6f655d 0 75%, #a99a8c 0); background-size: 10px 10px; }
.swatch-black { background: #000; border: 1px solid #444; }
.slider { display: grid; gap: 4px; margin-top: 14px; }
.slider span { display: flex; justify-content: space-between; color: #ddd; }
.slider output { color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { flex: none; width: 32px; height: 18px; border-radius: 9px; background: #444; position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ddd; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); background: #fff; }
.switch input:disabled + i { opacity: .4; }
.switch input:focus-visible + i { outline: 2px solid var(--selected); outline-offset: 2px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin: 4px 0; }
.segmented button { border: 0; padding: 6px; background: #1a1a1a; }
.segmented button + button { border-left: 1px solid var(--line-2); }
.segmented button.active { background: var(--accent); color: #fff; }
.range-list { display: grid; gap: 6px; margin-top: 6px; }
.range { display: grid; grid-template-columns: 1fr auto 1fr auto auto; align-items: end; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: #1b1b1b; }
.range.selected { border-color: var(--selected); }
.range label, .range-pair label, .field { display: grid; gap: 3px; font-size: 11px; color: var(--muted); }
.range input { padding: 4px 6px; }
.range-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.field { margin-bottom: 8px; font-size: 12px; }
.panel-list { display: grid; gap: 4px; margin-top: 8px; }
.list-item { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1px 8px; width: 100%; text-align: left; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #1b1b1b; text-decoration: none; }
.list-item > span { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item > .icon + span { grid-column: 2; }
.list-item small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.list-item > .icon + span + small { grid-column: 2; }
.list-item:hover { background: #242424; }
.list-item.static { grid-template-columns: 1fr auto; }
.list-item.static > span { grid-column: 1; }
.check, .check-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.check small, .check-item small { color: var(--muted); font-size: 11px; margin-left: auto; }
.check input, .check-item input { accent-color: var(--accent); }
.check.unavailable { opacity: .5; }
.check-item em { font-style: normal; font-size: 10px; color: var(--selected); border: 1px solid #6e5a2c; border-radius: 3px; padding: 0 4px; }
.status-box { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #1b1b1b; }
.status-box span { color: var(--muted); font-size: 12px; }
.status-box progress { width: 100%; accent-color: var(--accent); }
.unavailable-box { display: flex; gap: 10px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.unavailable-box p { margin: 0; }
.unavailable-box b { color: var(--text); }
.warn-box { display: flex; gap: 6px; align-items: flex-start; padding: 8px; border: 1px solid #6e5a2c; background: #2a2414; border-radius: var(--radius); color: #ffd27a; font-size: 12px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: 12px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.button-stack { display: grid; gap: 6px; }
.seg-list { display: grid; gap: 3px; max-height: 220px; overflow: auto; }
.seg-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 4px 4px 4px 8px; border-radius: 4px; background: #1b1b1b; cursor: pointer; font-variant-numeric: tabular-nums; }
.seg-item small { color: var(--muted); font-size: 11px; }
.seg-item.selected { outline: 1px solid var(--selected); }
.seg-item.off span { color: var(--faint); text-decoration: line-through; }

/* Preview */
.viewer { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: #101010; }
.stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 10px; }
.frame-box { position: relative; background: #000; }
.frame-box video, .frame-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame-box canvas { cursor: pointer; }
.frame-box canvas.drawing { cursor: crosshair; }
.stage-message { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; background: #101010e6; color: var(--muted); }
.stage-message b { color: var(--text); font-size: 15px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player { background: var(--panel); border-top: 1px solid var(--line); }
.progress { height: 4px; background: #3a3a3a; cursor: pointer; position: relative; transition: height .1s; }
.progress:hover { height: 7px; }
.progress-fill { height: 100%; background: var(--accent); width: 0; }
.player-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 10px; gap: 8px; }
.player-left, .player-right { display: flex; align-items: center; gap: 4px; }
.player-right { justify-content: flex-end; gap: 12px; }
.player-center { display: flex; align-items: center; gap: 2px; }
.play-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--text); color: #111; margin: 0 6px; }
.play-btn:hover { background: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 12px; }
.toggle.on { color: var(--text); border-color: var(--accent); background: #2a1b1a; }
.speed { border: 1px solid var(--line-2); background: transparent; border-radius: var(--radius); padding: 3px 8px; font-size: 12px; min-width: 42px; }
.timecode, .frame-no { font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.frame-no { color: var(--muted); }

/* Timeline */
.timeline { display: grid; grid-template-rows: 38px minmax(0, 1fr); background: var(--panel); border-top: 1px solid var(--line-2); min-height: 0; }
.timeline-bar { display: flex; align-items: center; gap: 10px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: var(--radius); font-weight: 600; }
.tab.active { background: var(--panel-3); color: var(--text); }
.timeline-tools { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.tool { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: #ccc; padding: 6px 8px; border-radius: var(--radius); font-size: 12px; }
.tool:hover { background: var(--panel-2); color: #fff; }
.tool.active { background: var(--accent); color: #fff; }
.zoom { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.zoom input { width: 110px; }
.timeline-scroll { overflow: auto; position: relative; min-height: 0; }
.timeline-content { position: relative; min-width: 100%; min-height: 100%; }
.tl-row { display: flex; height: 30px; border-bottom: 1px solid #272727; }
.tl-head { position: sticky; left: 0; z-index: 3; flex: none; width: 230px; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 10px; background: var(--panel); border-right: 1px solid var(--line-2); }
.tl-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; cursor: default; }
.tl-meta { color: var(--muted); font-size: 11px; }
.tl-lane { position: relative; flex: 1; cursor: pointer; }
.tl-row:hover .tl-head, .tl-row:hover .tl-lane { background-color: #252525; }
.tl-row.selected .tl-head { background: #2f2a1c; box-shadow: inset 3px 0 0 var(--selected); }
.tl-row.selected .tl-lane { background: #ffd16608; }
.tl-row.muted .tl-name { color: var(--muted); }
.eye.off { color: var(--faint); }
.warn { color: var(--selected); display: grid; }
.rename-inline { flex: 1; padding: 3px 6px; }
.tl-ruler-row { position: sticky; top: 0; z-index: 5; height: 28px; background: var(--panel); border-bottom: 1px solid var(--line-2); }
.tl-ruler-row .tl-head { z-index: 6; padding: 0 6px; }
.tl-ruler-row .tl-head input { padding: 3px 7px; font-size: 12px; }
.tl-ruler { position: relative; flex: 1; cursor: col-resize; overflow: hidden; }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 5px; background: #555; }
.tl-ruler i.major { height: 10px; background: #888; }
.tl-ruler span { position: absolute; top: 3px; transform: translateX(4px); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.seg-base, .seg { position: absolute; top: 7px; height: 16px; border-radius: 3px; }
.seg-base { border: 1px dashed #555; background: transparent; }
.seg-base.selected { border: 1.5px solid #fff; top: 5px; height: 20px; }
.seg { background: var(--accent); transition: filter .12s; }
.seg:hover { filter: brightness(1.2); }
.seg.off { background: #5a5a5a; }
.seg.zone { background: var(--zone); }
.seg.zone.off { background: #4f4466; }
.seg.clip { background: var(--clip); }
.seg.audio { background: var(--audio); }
.seg.audio.off { background: #6d5a35; }
.seg.selected { outline: 1.5px solid #fff; }
.handle { position: absolute; top: 4px; width: 8px; height: 22px; border-radius: 2px; background: #fff; cursor: ew-resize; z-index: 2; box-shadow: 0 0 0 1px #000; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: #fff; z-index: 7; pointer-events: none; }
.tl-playhead span { position: absolute; top: 0; left: -6px; width: 13px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); pointer-events: auto; cursor: grab; }
.tl-empty { padding: 20px; color: var(--muted); }

/* Export dialog */
.export-columns { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.export-summary { background: #1a1a1a; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 14px; }
.export-form { display: grid; gap: 12px; align-content: start; }
.export-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .tool-panel { width: 260px; }
  .player-left .toggle { padding: 5px; font-size: 0; gap: 0; }
}
@media (max-width: 800px) {
  .editor-page { height: auto; overflow: auto; grid-template-rows: 48px auto 320px; }
  .editor { grid-template-columns: 60px minmax(0, 1fr); }
  .tool-panel { grid-column: 1 / -1; grid-row: 2; width: auto; }
  .viewer { grid-column: 2; grid-row: 1; }
  .stage { height: 56vw; }
  .timeline-tools .tool { font-size: 0; gap: 0; }
  .export-columns, .option-grid { grid-template-columns: 1fr; }
  .library { padding: 16px; }
  .topnav, .save-state { display: none; }
}
