:root {
  --bg: #16171d;
  --bg-2: #1d1f27;
  --panel: #23252f;
  --panel-2: #2b2e3a;
  --line: #363a48;
  --text: #eceef4;
  --muted: #9aa0b4;
  --accent: #ff6a3d;
  --accent-2: #ff8a63;
  --accent-ink: #1b0d07;
  --ok: #3ecf8e;
  --warn: #f5b942;
  --danger: #ff4d5e;
  --focus: #7aa7ff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0 0 0.8em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Controls ---------- */
button, .btn {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}
button:hover, .btn:hover { background: #343848; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover { background: var(--accent-2); }
button.danger { background: transparent; border-color: rgba(255, 77, 94, 0.5); color: var(--danger); }
button.danger:hover { background: rgba(255, 77, 94, 0.12); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--panel-2); }
button.icon { width: 34px; padding: 0; }
button.sm { height: 28px; padding: 0 10px; font-size: 13px; }
button.icon.sm { width: 28px; padding: 0; }
button.active, button[aria-pressed='true'] { background: rgba(255, 106, 61, 0.18); border-color: var(--accent); color: var(--accent-2); }
button svg, .btn svg { width: 18px; height: 18px; flex: none; }
button.sm svg { width: 16px; height: 16px; }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
input[type='checkbox'] { width: 16px; height: 16px; accent-color: var(--accent); }
input[type='range'] { accent-color: var(--accent); padding: 0; background: none; border: 0; }
input[type='color'] { padding: 2px; width: 44px; height: 32px; }
textarea { width: 100%; min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
label.field input, label.field select { width: 100%; }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.slider-row input[type='range'] { grid-column: 1 / -1; width: 100%; }
.slider-row output { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.admin { background: rgba(255, 106, 61, 0.15); color: var(--accent-2); border-color: rgba(255, 106, 61, 0.4); }
.badge.ok { background: rgba(62, 207, 142, 0.12); color: var(--ok); border-color: rgba(62, 207, 142, 0.35); }
.badge.off { background: rgba(255, 77, 94, 0.12); color: var(--danger); border-color: rgba(255, 77, 94, 0.35); }
.meter { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; min-width: 60px; }
.meter > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.meter.warn > i { background: var(--warn); }
.meter.full > i { background: var(--danger); }

.boot { display: grid; place-items: center; height: 100vh; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top navigation ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 18px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.topbar nav { display: flex; gap: 4px; margin-left: 12px; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.topbar nav a:hover, .topbar nav a.current { color: var(--text); background: var(--panel-2); }
.usermenu { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 6px; z-index: 50;
}
.menu button, .menu a { width: 100%; justify-content: flex-start; border: 0; background: transparent; height: 32px; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--panel-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .menu-head { padding: 6px 10px 8px; font-size: 12px; color: var(--muted); }

.page { max-width: 1180px; margin: 0 auto; padding: 28px 18px 60px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, rgba(255, 106, 61, 0.18), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; margin-bottom: 18px; font-size: 20px; }
.auth-card form > * + * { margin-top: 14px; }
.auth-card button.primary { width: 100%; height: 40px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 1em; }

/* ---------- Projects ---------- */
.proj-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.proj-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.15s, transform 0.15s; }
.proj-card:hover { border-color: #4a4f63; transform: translateY(-2px); }
.proj-thumb { aspect-ratio: 16 / 9; background: #0e0f13 center/cover no-repeat; display: grid; place-items: center; color: var(--muted); cursor: pointer; position: relative; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-thumb .shared { position: absolute; top: 8px; left: 8px; }
.proj-body { padding: 10px 12px 12px; display: flex; gap: 6px; align-items: flex-start; }
.proj-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-new { border: 2px dashed var(--line); background: transparent; border-radius: 14px; min-height: 180px; display: grid; place-items: center; color: var(--muted); cursor: pointer; font-size: 15px; }
.proj-new:hover { border-color: var(--accent); color: var(--accent-2); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.storage-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.storage-line .meter { width: 140px; }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 6, 10, 0.6); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade 0.12s; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.modal.wide { max-width: 760px; }
.modal header { display: flex; align-items: center; padding: 16px 18px 0; }
.modal header h2 { margin: 0; flex: 1; }
.modal .body { padding: 16px 18px; }
.modal .body > * + * { margin-top: 12px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 16px; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; background: #2f3342; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); pointer-events: auto; animation: fade 0.15s; max-width: 90vw; }
.toast.error { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--bg-2); position: sticky; top: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tbody tr:last-child td { border-bottom: 0; }
td .user-cell { display: flex; flex-direction: column; }
td .user-cell b { font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); height: 40px; }
.tabs button.current { color: var(--text); border-bottom-color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type='search'] { width: 260px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Editor ---------- */
.editor { position: fixed; inset: 0; display: grid; grid-template-rows: 52px minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: #0f1014; }
.ed-top { display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); min-width: 0; }
.ed-title { font-weight: 600; font-size: 15px; background: transparent; border: 1px solid transparent; padding: 5px 8px; width: 260px; max-width: 30vw; }
.ed-title:hover { border-color: var(--line); }
.ed-title:focus { background: var(--bg-2); }
.sync { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; background: transparent; border: 0; height: 28px; padding: 0 8px; }
.sync:disabled { opacity: 1; cursor: default; }
.sync.error { color: var(--danger); cursor: pointer; }
.sync.error:hover { background: rgba(255, 77, 94, 0.1); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.sync.busy i { background: var(--warn); animation: pulse 1s infinite; }
.sync.error i { background: var(--danger); }
@keyframes pulse { 50% { opacity: 0.3; } }
.ed-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; min-width: 0; }
.stage-wrap { position: relative; display: grid; place-items: center; min-height: 0; min-width: 0; padding: 14px; overflow: hidden; }
.stage { position: relative; max-width: 100%; max-height: 100%; box-shadow: 0 0 0 1px var(--line), var(--shadow); background: #000; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage .overlay { position: absolute; inset: 0; pointer-events: none; }
.stage.picking { cursor: crosshair; }
.stage-badge { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); pointer-events: none; }
.stage-badge.live { background: var(--danger); color: #fff; }
.stage-counter { position: absolute; top: 10px; right: 10px; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; pointer-events: none; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.stage-msg > div { max-width: 360px; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.25s; }
@keyframes flash { from { opacity: 0.7; } to { opacity: 0; } }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); pointer-events: none; }

.side { background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
.side-tabs button { border: 0; border-radius: 0; background: transparent; height: 50px; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); padding: 0; }
.side-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.side-tabs button svg { width: 18px; height: 18px; }
.side-tabs button.current { color: var(--accent-2); box-shadow: inset 0 -2px 0 var(--accent); }
.side-body { overflow-y: auto; padding: 14px; flex: 1; }
.side-body section + section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.side-body .stack > * + * { margin-top: 10px; }
.side-body select, .side-body input[type='number'] { width: 100%; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-radius: 0; height: 30px; background: transparent; font-size: 12px; padding: 0 6px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.current { background: rgba(255, 106, 61, 0.18); color: var(--accent-2); }
.track { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.track + .track { margin-top: 8px; }
.track-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.bg-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 8px; border: 1px solid var(--line); background: #000 center/cover no-repeat; }

.ed-bottom { background: var(--bg-2); border-top: 1px solid var(--line); min-width: 0; }
.transport { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 12px; }
.tp-left, .tp-center, .tp-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tp-right { justify-content: flex-end; gap: 10px; }
.transport .time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); white-space: nowrap; }
.transport .time b { color: var(--text); font-weight: 600; }
.live-btn { height: 40px; }
.capture-btn { height: 44px; min-width: 132px; border-radius: 99px; font-size: 15px; background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(255, 77, 94, 0.3); }
.capture-btn:hover:not(:disabled) { background: #ff6b79; }
.capture-btn:disabled { background: var(--panel-2); border-color: var(--line); color: var(--muted); box-shadow: none; opacity: 1; }
.capture-btn svg { width: 22px; height: 22px; }
.play-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--text); border-color: var(--text); color: var(--bg); }
.play-btn:hover:not(:disabled) { background: #fff; }
.play-btn svg { width: 20px; height: 20px; }
.fps-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.fps-chip input { width: 58px; height: 30px; }
.zoom { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.zoom svg { width: 16px; height: 16px; }
.zoom input { width: 90px; }

.timeline { position: relative; overflow-x: auto; overflow-y: hidden; padding: 6px 10px 10px; user-select: none; }
.tl-frames { display: flex; gap: 0; min-height: 86px; align-items: stretch; position: relative; }
.tl-frame { position: relative; flex: none; height: 80px; padding: 0 2px; cursor: pointer; }
.tl-frame:hover .img { border-color: #4a4f63; }
.tl-frame .img:has(img:not([src])) { background: linear-gradient(90deg, #1b1d25 0%, #262935 50%, #1b1d25 100%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tl-frame .img { height: 62px; border-radius: 6px; background: #000 center/cover no-repeat; border: 2px solid transparent; position: relative; overflow: hidden; }
.tl-frame .img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tl-frame .num { font-size: 10px; color: var(--muted); text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tl-frame .hold { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; }
.tl-frame.selected .img { border-color: var(--focus); }
.tl-frame.current .img { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 106, 61, 0.35); }
.tl-frame.selected.current .img { border-color: var(--accent); }
.tl-frame.dragging { opacity: 0.35; }
.tl-insert { position: absolute; top: 0; width: 3px; height: 62px; background: var(--danger); border-radius: 2px; box-shadow: 0 0 8px var(--danger); pointer-events: none; z-index: 2; }
.tl-insert span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; }
.tl-insert svg { width: 13px; height: 13px; }
.tl-drop { position: absolute; top: -2px; width: 3px; height: 66px; background: var(--focus); border-radius: 2px; pointer-events: none; }
.tl-live { flex: none; width: 70px; height: 62px; margin: 0 2px; border-radius: 6px; border: 2px dashed var(--danger); display: grid; place-items: center; color: var(--danger); font-size: 11px; font-weight: 700; cursor: pointer; }
.tl-audio { position: relative; height: 22px; margin-top: 4px; }
.tl-clip { position: absolute; top: 0; height: 20px; border-radius: 5px; background: rgba(122, 167, 255, 0.25); border: 1px solid rgba(122, 167, 255, 0.6); font-size: 10px; line-height: 18px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: grab; }
.tl-clip.muted { opacity: 0.4; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.tl-empty { color: var(--muted); padding: 22px 6px; font-size: 13px; }
.sel-bar { display: flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.sel-hint { color: var(--muted); }
.sel-count { color: var(--text); font-weight: 600; margin-right: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.stepper output { min-width: 22px; text-align: center; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.danger-text { color: var(--danger) !important; }

.loading-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 16, 20, 0.85); z-index: 30; }
.progress { width: 240px; height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }

.ctx-menu { position: fixed; z-index: 150; }

@media (max-width: 900px) {
  .ed-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 1fr) minmax(0, 34vh); }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .ed-title { width: 140px; }
  .ed-top .badge { display: none; }
  .hide-sm { display: none !important; }
  .transport { gap: 4px; }
  .transport .time { min-width: 0; }
  .capture-btn { min-width: 0; height: 40px; }
}

/* ---------- Share / player page ---------- */
.player-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 14px; }
.player-page .stage { width: min(960px, 100%); }
.player-controls { display: flex; gap: 8px; align-items: center; width: min(960px, 100%); }
.player-controls input[type='range'] { flex: 1; }
.notice { background: rgba(245, 185, 66, 0.1); border: 1px solid rgba(245, 185, 66, 0.45); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* Floating view toggles over the stage */
.stage-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.stage-tool { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 99px; background: rgba(15, 16, 20, 0.72); border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); }
.stage-tool svg { width: 15px; height: 15px; }
.stage-tool:hover { background: rgba(15, 16, 20, 0.9); }
.stage-tool.on { background: rgba(255, 106, 61, 0.9); border-color: var(--accent); color: var(--accent-ink); }
.toast-action { color: var(--accent-2); font-weight: 700; }

@media (max-width: 900px) {
  .transport { grid-template-columns: auto 1fr; grid-template-areas: 'left right' 'center center'; row-gap: 6px; }
  .tp-left { grid-area: left; }
  .tp-center { grid-area: center; justify-content: center; }
  .tp-right { grid-area: right; }
  .stage-tool span { display: none; }
  .stage-tool { width: 32px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
