/* Flowlight editor chrome. The diagram itself is styled by its theme (js/themes.js), not by this file. */
:root {
  --bg: #0b0c10;
  --panel: #121419;
  --panel-2: #181b22;
  --line: #242833;
  --line-2: #323745;
  --text: #e9ebf1;
  --mute: #8b91a1;
  --faint: #5d6373;
  --acc: #c8ff3d;
  --acc-ink: #0b0c10;
  --rec: #ff4d5e;
  --ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --display: 'Bricolage Grotesque', 'Geist', sans-serif;
  --r: 10px;
  --top-h: 56px;
  --rail-w: 64px;
  --insp-w: 312px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 14px/1.4 var(--ui);
  overflow: hidden; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); }
svg { flex: none; }
.ib svg, .seg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: #4a5164; background: #1f232c; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: transparent; color: #c9cdd8; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn.hot { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); font-weight: 600; }
.btn.hot:hover { background: #d9ff70; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.danger:hover { border-color: var(--rec); color: #ffb3ba; }
.btn.full { width: 100%; }
.ib {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: #c9cdd8; font-size: 18px; line-height: 1;
}
.ib:hover { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
.ib:disabled { opacity: .35; pointer-events: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- top bar ---------- */
.top {
  height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #101217, #0d0e13);
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.brand b { font: 800 19px/1 var(--display); letter-spacing: -.02em; }
.brand-dot { fill: var(--acc); filter: drop-shadow(0 0 4px var(--acc)); animation: brandDot 2.6s ease-in-out infinite; }
@keyframes brandDot { 0%, 100% { transform: translate(-9px, -5px); } 50% { transform: translate(5px, 6px); } }
.title-in {
  width: 210px; min-width: 0; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--mute); font-weight: 500;
}
.title-in:hover { border-color: var(--line); }
.title-in:focus { border-color: var(--line-2); background: var(--panel); color: var(--text); outline: none; }
.looks {
  margin: 0 auto; display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #08090c;
  border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.looks::-webkit-scrollbar { display: none; }
.look {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border-radius: 8px;
  border: 0; background: transparent; color: var(--mute); font-weight: 500; white-space: nowrap;
}
.look:hover { color: var(--text); background: var(--panel); }
.look[aria-checked="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.look .sw { width: 22px; height: 22px; border-radius: 6px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.look .sw i { position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; border-radius: 2px; }
.look .sw b { position: absolute; width: 6px; height: 6px; border-radius: 2px; top: 8px; }
.look .sw b:first-of-type { left: 2px; } .look .sw b:last-of-type { right: 2px; }
.acts { display: flex; align-items: center; gap: 4px; }
.only-narrow { display: none !important; }

/* ---------- workspace ---------- */
.work { position: absolute; inset: var(--top-h) 0 0 0; display: grid; grid-template-columns: var(--rail-w) 1fr var(--insp-w); }
.rail {
  border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 10px 0; overflow-y: auto; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .sep { width: 28px; height: 1px; background: var(--line); margin: 6px 0; flex: none; }
.shape-btn {
  width: 46px; height: 46px; flex: none; border-radius: 10px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: #b9bfcc; touch-action: none; position: relative;
}
.shape-btn svg { width: 28px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.shape-btn:hover { background: var(--panel-2); border-color: var(--line-2); color: var(--acc); }
.shape-btn:hover::after {
  content: attr(data-label); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: #000; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 9;
}

.stage-wrap { position: relative; overflow: hidden; background: #000; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage.panning { cursor: grabbing; }
#stage.recording { cursor: crosshair; }
#stage [data-node] { cursor: move; }
#stage [data-edge] { cursor: pointer; }
#stage.recording [data-node] { cursor: default; }
#stage [data-port] { cursor: crosshair; }
#stage [data-handle] { cursor: nwse-resize; }
#stage [data-handle="ne"], #stage [data-handle="sw"] { cursor: nesw-resize; }

.recbar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 7px 8px 7px 14px; border-radius: 12px; background: rgba(20, 8, 10, .92); border: 1px solid rgba(255, 77, 94, .5);
  color: #ffd9dd; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 24px);
}
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); flex: none; animation: blink 1s steps(2) infinite; box-shadow: 0 0 10px var(--rec); }
@keyframes blink { 50% { opacity: .25; } }

.empty {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px;
  pointer-events: none; color: #c3c8d4;
}
.empty > * { pointer-events: auto; }
.empty p { margin: 0; }
.empty-k { font: 800 30px var(--display); letter-spacing: -.02em; color: var(--text); }
.empty .btn { margin-top: 12px; }

.zoom, .playbar {
  position: absolute; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(14, 15, 20, .9); border: 1px solid var(--line-2); border-radius: 12px; backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.zoom { left: 14px; }
.zoom .ib { width: 30px; height: 30px; }
.zoom-k { min-width: 52px; height: 30px; border: 0; background: transparent; color: var(--mute); font: 12px var(--mono); border-radius: 7px; }
.zoom-k:hover { color: var(--text); background: var(--panel-2); }
.playbar { left: 50%; transform: translateX(-50%); padding: 4px 6px 4px 4px; gap: 6px; }
.playbar .ib { width: 30px; height: 30px; }
.playbar .i-play { display: none; }
.playbar.paused .i-play { display: block; }
.playbar.paused .i-pause { display: none; }
.playbar input[type=range] { width: 170px; }
.playbar.no-timeline input[type=range], .playbar.no-timeline .time { display: none; }
.time { font: 12px var(--mono); color: var(--mute); min-width: 82px; }
.btn.rec { border-color: rgba(255,77,94,.35); color: #ffc2c8; }
.btn.rec:hover { border-color: var(--rec); background: rgba(255,77,94,.08); }
.btn.rec.on { background: var(--rec); color: #fff; border-color: var(--rec); }

input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; accent-color: var(--acc); min-width: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--acc); margin-top: -5px; border: 0; box-shadow: 0 0 0 3px rgba(200,255,61,.18); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--acc); border: 0; }

.inline-edit {
  position: absolute; z-index: 4; resize: none; border: 2px solid var(--acc); border-radius: 8px; padding: 6px;
  background: rgba(8, 9, 12, .94); color: #fff; text-align: center; outline: none; overflow: hidden;
  box-shadow: 0 0 0 4px rgba(200,255,61,.15), 0 10px 30px rgba(0,0,0,.5);
}

/* ---------- inspector ---------- */
.inspector { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); flex: none; }
.tabs button {
  flex: 1; height: 38px; border: 0; background: transparent; color: var(--mute); font-weight: 600; letter-spacing: .01em;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--acc); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.panel { overflow-y: auto; padding: 4px 16px 28px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h3 { margin: 0 0 10px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.sec h3 .grow { flex: 1; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > span { font-size: 12px; color: var(--mute); display: flex; justify-content: space-between; }
.field > span em { font: 12px var(--mono); font-style: normal; color: var(--text); }
.inp, .sel, textarea.inp {
  width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #0d0f13;
}
textarea.inp { height: auto; min-height: 62px; padding: 8px 10px; resize: vertical; line-height: 1.35; }
.inp:focus, .sel:focus { border-color: var(--acc); outline: none; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row .inp { text-align: center; font-family: var(--mono); font-size: 13px; }
.row label { display: grid; gap: 4px; font-size: 11px; color: var(--faint); }
.seg { display: flex; gap: 2px; padding: 2px; background: #0d0f13; border: 1px solid var(--line-2); border-radius: 9px; }
.seg button {
  flex: 1; min-width: 0; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--mute); font-size: 12.5px;
  font-weight: 500; display: grid; place-items: center; padding: 0 4px; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.shape-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.shape-grid button { height: 38px; border-radius: 8px; border: 1px solid var(--line-2); background: #0d0f13; color: #b9bfcc; display: grid; place-items: center; }
.shape-grid button svg { width: 24px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.shape-grid button[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; padding: 0; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.swatch[aria-pressed="true"] { border-color: var(--text); }
.swatch.auto { background: conic-gradient(from 90deg, #22e4ff, #ff2fd6, #a6ff2e, #ffb21f, #22e4ff); }
.swatch.auto::after { content: 'A'; position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px var(--mono); color: #000; }
.swatch.custom { overflow: hidden; }
.swatch.custom input { position: absolute; inset: -6px; width: 40px; height: 40px; border: 0; padding: 0; cursor: pointer; }
.emoji-row { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 6px; }
.emoji-row button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; font-size: 16px; }
.emoji-row button:hover { background: var(--panel-2); }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 13.5px; }
.tog small { display: block; color: var(--faint); font-size: 12px; }
.tog input { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 21px; border-radius: 21px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; }
.tog input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #c9cdd8; transition: transform .15s; }
.tog input:checked { background: var(--acc); }
.tog input:checked::after { transform: translateX(15px); background: var(--acc-ink); }
.help { color: var(--mute); font-size: 12.5px; margin: 0 0 10px; }
.help b { color: var(--text); font-weight: 500; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 12.5px; color: var(--mute); align-items: center; }
.keys kbd { justify-self: start; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* light steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: st; }
.step {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 8px; border-radius: 10px;
  background: #0d0f13; border: 1px solid var(--line-2);
}
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--mono); background: var(--acc); color: var(--acc-ink); }
.chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chip {
  display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12.5px; padding: 3px 3px 3px 8px; border-radius: 7px;
  background: var(--panel-2); border: 1px solid transparent;
}
.chip:hover { border-color: var(--line-2); }
.chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button, .step-tools button {
  width: 24px; height: 24px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--mute); font-size: 13px; display: grid; place-items: center;
}
.chip button:hover, .step-tools button:hover { background: #262a34; color: var(--text); }
.chip button.on { color: var(--acc); }
.step-tools { display: grid; grid-template-columns: 24px; gap: 1px; }
.step-dur { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.step-dur input { width: 58px; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); font: 12px var(--mono); }
.steps-empty { padding: 16px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--mute); font-size: 13px; text-align: center; }

/* ---------- dialogs ---------- */
.dlg {
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0;
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.dlg.wide { width: min(1140px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(3, 4, 6, .72); backdrop-filter: blur(3px); }
.dlg[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; margin: 0; }
.dlg-head h2 { margin: 0; font: 800 22px var(--display); letter-spacing: -.02em; }
.dlg-sub { margin: -4px 20px 14px; color: var(--mute); font-size: 13px; }
.ex-grid { display: grid; grid-template-columns: 280px 1fr; gap: 0; border-top: 1px solid var(--line); min-height: 0; }
.ex-side { padding: 16px 18px 20px; border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 120px); }
.ex-side .seg { flex-wrap: wrap; }
.ex-side .seg button { flex: 1 1 45%; }
.ex-note { color: var(--mute); font-size: 12.5px; margin: 12px 0 6px; line-height: 1.5; }
.ex-note code { font: 11.5px var(--mono); color: var(--text); background: var(--panel-2); padding: 1px 4px; border-radius: 4px; }
.ex-main { padding: 16px; display: grid; grid-template-rows: minmax(160px, 1fr) auto 170px; gap: 10px; min-width: 0; max-height: calc(100vh - 120px); }
.ex-preview {
  border-radius: 12px; border: 1px solid var(--line); overflow: auto; display: grid; place-items: center; padding: 18px; min-height: 0;
  background: repeating-conic-gradient(#14161b 0 25%, #101216 0 50%) 0 0 / 18px 18px;
}
.ex-preview > div, .ex-preview > svg { width: 100%; }
.ex-preview svg { max-height: 46vh; width: 100%; height: auto; }
.ex-code-head { display: flex; align-items: center; gap: 8px; }
.ex-code-head .grow { flex: 1; }
#ex-size { font: 12px var(--mono); color: var(--mute); }
.ex-code { width: 100%; height: 100%; resize: none; border-radius: 10px; border: 1px solid var(--line-2); background: #08090c; color: #b8f0a0; font: 11.5px/1.5 var(--mono); padding: 10px 12px; }
.ex-opts { margin-top: 10px; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 0 20px 22px; max-height: calc(100vh - 160px); overflow-y: auto; }
.tpl {
  text-align: left; border: 1px solid var(--line-2); border-radius: 12px; background: #0d0f13; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.tpl:hover { border-color: var(--acc); transform: translateY(-2px); }
.tpl-art { height: 150px; display: grid; place-items: center; overflow: hidden; background: #000; }
.tpl-art svg { width: 100%; height: 100%; }
.tpl b { display: block; padding: 10px 12px 0; font-weight: 600; }
.tpl small { display: block; padding: 2px 12px 12px; color: var(--mute); }
.tpl.blank .tpl-art { background: #0b0c10; color: var(--faint); font-size: 34px; }

.files-acts { display: flex; gap: 8px; padding: 0 20px 12px; flex-wrap: wrap; }
.files { list-style: none; margin: 0; padding: 0 12px 16px; max-height: 50vh; overflow-y: auto; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.files li:hover { background: var(--panel-2); }
.files li.cur { background: rgba(200,255,61,.06); box-shadow: inset 0 0 0 1px rgba(200,255,61,.25); }
.files .f-main { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; padding: 0; }
.files .f-main b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .f-main small { color: var(--faint); font: 11.5px var(--mono); }

.toasts { position: fixed; z-index: 50; left: 50%; bottom: 76px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: #f4f6fa; color: #0b0c10; padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: toast 2.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.ghost-drag { position: fixed; z-index: 60; pointer-events: none; width: 70px; height: 46px; border: 2px dashed var(--acc); border-radius: 10px; background: rgba(200,255,61,.08); transform: translate(-50%, -50%); }

/* ---------- narrow screens ---------- */
@media (max-width: 1020px) {
  .title-in { display: none; }
  .look { padding: 0 8px 0 5px; }
}
@media (max-width: 820px) {
  :root { --top-h: 52px; }
  .top { gap: 8px; padding: 0 8px; }
  .brand b, #open-files, #open-templates { display: none; }
  .look span:not(.sw) { display: none; }
  .look { padding: 0 5px; }
  .only-narrow { display: inline-flex !important; }
  .work { grid-template-columns: 1fr; grid-template-rows: 1fr 60px; }
  .stage-wrap { grid-row: 1; }
  .rail { grid-row: 2; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 0 8px; overflow-x: auto; overflow-y: hidden; }
  .rail .sep { width: 1px; height: 28px; margin: 0 4px; }
  .shape-btn:hover::after { display: none; }
  .inspector {
    position: fixed; left: 0; right: 0; bottom: 0; height: min(62vh, 560px); z-index: 8; border-left: 0; border-top: 1px solid var(--line-2);
    border-radius: 16px 16px 0 0; box-shadow: 0 -20px 50px rgba(0,0,0,.5); transform: translateY(105%); transition: transform .22s ease;
  }
  .inspector.open { transform: none; }
  .zoom { bottom: 10px; left: 8px; }
  .zoom .zoom-k, #zoom-out, #zoom-in { display: none; }
  .playbar { bottom: 10px; left: auto; right: 8px; transform: none; max-width: calc(100% - 70px); }
  .playbar input[type=range] { width: 70px; }
  .time { min-width: 0; }
  .ex-grid { grid-template-columns: 1fr; }
  .ex-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .ex-main { max-height: none; grid-template-rows: 220px auto 160px; }
  .dlg.wide { max-height: calc(100vh - 20px); overflow-y: auto; }
}
@media (max-width: 480px) {
  .playbar .btn.rec { padding: 0 8px; }
  .playbar .time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
