/* StageManager web panel. No inline styles anywhere (the CSP forbids them); dynamic values are set from app.js. */
:root {
  --bg: #0a0c11;
  --panel: #11141b;
  --panel-2: #161a23;
  --line: #222836;
  --line-2: #2d3546;
  --text: #e7e9ef;
  --muted: #8b93a7;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code { font-family: var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
h1, h2, h3 { margin: 0 0 10px; font-weight: 600; }
h2 { font-size: 18px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* ---- gate ---- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-card { max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.gate-card h1 { font-size: 20px; margin-top: 18px; }
.gate-card p { color: var(--muted); margin: 0; }
.login { display: grid; gap: 10px; margin-top: 18px; }
.login .or { text-align: center; position: relative; margin-bottom: 2px; }
.login-error { color: #fca5a5; font-size: 13px; }
.passwd { display: grid; gap: 6px; margin-top: 6px; }

/* ---- brand ---- */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .01em; }
.brand .sub { font-weight: 400; }
.brand.big { font-size: 18px; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 200deg, var(--violet), var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(139, 92, 246, .45); }

/* ---- top bar ---- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #10131a, #0d1016); }
.conn { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.conn.live .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.conn.down .dot { background: var(--danger); }
.operator { display: flex; align-items: center; gap: 8px; }
.op-name { font-weight: 600; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-family: var(--mono); }
.pill.hot { color: #fff; border-color: transparent; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.menu { position: absolute; right: 12px; top: 52px; z-index: 20; min-width: 220px; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.menu-row { padding: 4px 6px 10px; font-size: 12px; }
.banner { padding: 8px 16px; display: flex; gap: 12px; align-items: center; }
.banner.danger { background: rgba(239, 68, 68, .14); border-bottom: 1px solid rgba(239, 68, 68, .4); color: #fecaca; font-weight: 600; }

/* ---- buttons & inputs ---- */
.btn { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: #3b4560; background: #1b2030; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; }
.btn.primary { border-color: transparent; background: linear-gradient(90deg, var(--violet), #6d6af5 50%, var(--cyan)); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger-outline { border-color: rgba(239, 68, 68, .55); color: #fca5a5; background: transparent; }
.btn.danger-outline:hover { background: rgba(239, 68, 68, .12); }
.btn.danger, .btn.on.danger-outline { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.on { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset; }
.btn.confirm { background: var(--danger); border-color: var(--danger); color: #fff; }
.input { font: inherit; color: var(--text); background: #0d1017; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; width: 100%; min-width: 0; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
.input.narrow { width: 110px; }
select.input { appearance: auto; }
input[type="color"] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--violet); }

/* ---- stages ---- */
.stage-switch { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.stage-pick { width: auto; max-width: 190px; padding: 5px 8px; font-weight: 600; border-color: rgba(139, 92, 246, .55); background: rgba(139, 92, 246, .12); }
.dlg-back { position: fixed; inset: 0; z-index: 40; background: rgba(4, 6, 10, .6); display: grid; place-items: center; padding: 16px; }
.dlg { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.stages-list { display: grid; gap: 10px; margin: 12px 0; }
.stage-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); display: grid; gap: 8px; }
.stage-card.current { border-color: var(--violet); }
.stage-card .row { gap: 8px; flex-wrap: wrap; }
.stage-card .meta { color: var(--muted); font-size: 12px; }
.stage-new .input { flex: 1; }

/* ---- pages ---- */
.pages { display: flex; gap: 2px; margin-left: 10px; }
.page-btn { font: inherit; background: none; border: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.page-btn:hover { color: var(--text); background: var(--panel-2); }
.page-btn.active { color: #fff; background: rgba(139, 92, 246, .18); box-shadow: 0 0 0 1px rgba(139, 92, 246, .45) inset; }
.page { flex: 1; min-height: 0; overflow: auto; }
.page-inner { max-width: 1180px; margin: 0 auto; padding: 18px 20px 40px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.empty { color: var(--muted); padding: 30px 10px; text-align: center; }

/* ---- stage page ---- */
.stage-page { display: grid; grid-template-columns: minmax(0, 1fr) 372px; overflow: hidden; }
.stage-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--panel); }
.tool-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg-btn { font: inherit; font-size: 13px; background: transparent; color: var(--muted); border: none; padding: 4px 12px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn.active { background: var(--panel-2); color: #fff; }
.small-input { width: auto; padding: 3px 8px; font-size: 13px; }
.check.small, .cut.small { font-size: 13px; color: var(--muted); }
.cut { display: flex; align-items: center; gap: 6px; }
.cut input[type="range"] { width: 130px; }
.cut output { min-width: 30px; color: var(--text); font-size: 12px; }
.stage-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #07090d; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: default; }
.stage-canvas.aiming { cursor: crosshair; }
.stage-canvas.panning { cursor: grabbing; }
.stage-canvas.over-light { cursor: pointer; }
.stage-canvas.editing.over-light { cursor: move; }
.stage-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); pointer-events: none; padding: 6px 12px; border-radius: 999px;
  background: rgba(17, 20, 27, .86); border: 1px solid var(--line-2); font-size: 13px; color: var(--text); white-space: nowrap; }
.stage-hint:empty { display: none; }
.stage-hint.aim { border-color: var(--cyan); box-shadow: 0 0 14px rgba(34, 211, 238, .25); }
.stage-tip { position: absolute; pointer-events: none; z-index: 5; background: rgba(17, 20, 27, .95); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 9px; font-size: 12px; line-height: 1.4; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); max-width: 260px; }
.stage-tip b { font-family: var(--mono); }
.stage-legend { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted);
  background: rgba(10, 12, 17, .78); padding: 5px 10px; border-radius: 8px; pointer-events: none; }
.lg { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid #cbd2e1; }
.lg-hang { border-radius: 3px; }
.lg-floor { border-radius: 50%; }
.lg-laser { transform: rotate(45deg) scale(.85); }
.edit-bar { white-space: nowrap; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; font-size: 13px;
  background: rgba(17, 20, 27, .95); border: 1px solid var(--violet); border-radius: 10px; padding: 7px 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }

/* ---- play bar ---- */
.playbar { border-top: 1px solid var(--line); background: var(--panel); padding: 6px 10px; display: grid; gap: 6px; }
.pb-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.pb-row > * { flex: none; }
.pb-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-left: 6px; }
.pb-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.pb-btns .btn { padding: 3px 9px; font-size: 12.5px; }
.pb-btns .btn.running { border-color: var(--cyan); background: rgba(34, 211, 238, .16); color: #fff; box-shadow: 0 0 10px rgba(34, 211, 238, .25); }
.pb-btns .look { display: inline-flex; align-items: center; gap: 6px; }
.pb-btns .look i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.3); }
.pb-target { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(139, 92, 246, .18); border: 1px solid rgba(139, 92, 246, .5); white-space: nowrap; }
.pb-slider { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pb-slider input { width: 90px; }
.pb-slider output { min-width: 52px; color: var(--text); font-size: 11.5px; }
.pb-slider.master input { accent-color: #f5c27a; }
.test-bar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; font-size: 13px; z-index: 4;
  background: rgba(17, 20, 27, .95); border: 1px solid var(--warn); border-radius: 10px; padding: 6px 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); white-space: nowrap; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ---- inspector ---- */
.inspector { border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; min-height: 0; }
.insp-section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.insp-section h3 { margin: 0 0 8px; }
.insp-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 6px; }
.insp-title { flex: 1; min-width: 0; }
.insp-title h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 10px; max-height: 76px; overflow: auto; }
.sel-chip { font: 11.5px var(--mono); padding: 1px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; }
.sel-chip:hover { color: #fff; border-color: var(--danger); }
.sel-groups { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.sel-groups .chip { font-size: 11.5px; padding: 1px 8px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px 16px 14px; border-bottom: 1px solid var(--line); }
.quick .btn { padding: 7px 4px; font-size: 13px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row h3 { margin-bottom: 6px; }
.big-out { font: 600 20px var(--mono); }
.big-range { height: 26px; }
.warm-cold { accent-color: #f5c27a; }
.howto { margin: 0 0 16px; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.howto b { color: var(--text); font-weight: 600; }
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 16px; }
.group-grid .btn { text-align: left; overflow: hidden; text-overflow: ellipsis; }
.group-grid .count { color: var(--muted); font-size: 12px; float: right; }
.light-list { list-style: none; margin: 8px 0 0; padding: 0; }
.light-list li { display: grid; grid-template-columns: 14px 1fr auto; gap: 9px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.light-list li:hover { background: var(--panel-2); }
.light-list .name { font: 600 13px var(--mono); }
.light-list .meta { color: var(--muted); font-size: 11.5px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #2e3648; background: #000; display: inline-block; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-bottom: 10px; }
.sw { height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; }
.sw:hover { outline: 2px solid #fff; outline-offset: 1px; }
.sw.current { outline: 2px solid var(--cyan); outline-offset: 1px; }
.aim-tip { margin: 0 0 8px; }
.pad { position: relative; aspect-ratio: 2 / 1; border-radius: 10px; border: 1px solid var(--line-2); cursor: crosshair; touch-action: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 12.5% 25%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 12.5% 25%,
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .06), transparent 70%), #0c0f15; }
.pad-axis { position: absolute; background: #3b4560; }
.pad-axis.x { left: 0; right: 0; top: 50%; height: 1px; }
.pad-axis.y { top: 0; bottom: 0; left: 50%; width: 1px; }
.pad-handle { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; left: 50%; top: 50%;
  background: radial-gradient(circle, #fff 0 30%, var(--cyan) 31%); box-shadow: 0 0 14px var(--cyan); pointer-events: none; }
.presets { margin-top: 8px; }
details.mini { margin-top: 8px; font-size: 13px; }
details.mini summary { color: var(--muted); cursor: pointer; margin-bottom: 6px; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h3 { margin: 0; }
.fold > summary::before { content: "▸"; color: var(--muted); font-size: 11px; width: 10px; }
.fold[open] > summary::before { content: "▾"; }
.fold[open] > summary { margin-bottom: 10px; }
.slider-row { display: grid; grid-template-columns: 92px 1fr 58px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.slider-row output { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--muted); }
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ch { background: #0d1017; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; }
.ch .k { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .v { font-family: var(--mono); font-size: 14px; }
.ch .bar { height: 3px; border-radius: 2px; margin-top: 3px; background: linear-gradient(90deg, var(--violet), var(--cyan)); width: 0; }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); align-content: start; }
.field.wide, .check.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.narrow-2 { width: 200px; }
.filter-row { margin: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font: inherit; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.chip.active { color: #fff; border-color: var(--violet); background: rgba(139, 92, 246, .2); }

/* ---- screens ---- */
.screen-list { display: grid; gap: 14px; margin: 14px 0; }
.screen-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: minmax(240px, 1.1fr) 1fr; gap: 16px; }
.screen-card h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 15px; margin: 0; }
.sc-preview { position: relative; background: #000; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); cursor: pointer; }
.sc-preview .zones { position: absolute; inset: 0; display: grid; }
.sc-preview .zone { border: 1px solid rgba(255, 255, 255, .06); }
.sc-preview .zone.pick { outline: 2px solid var(--cyan); outline-offset: -2px; }
.sc-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-preview .dim { position: absolute; inset: 0; background: #000; pointer-events: none; }
.sc-preview .tiles { position: absolute; inset: 0; pointer-events: none; display: grid; }
.sc-preview .tiles i { border-right: 1px dashed rgba(255,255,255,.08); border-bottom: 1px dashed rgba(255,255,255,.08); }
.sc-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.sc-controls { display: grid; gap: 10px; align-content: start; }
.sc-slots { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.slot-btn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; }
.slot-btn img { width: 34px; height: 22px; object-fit: cover; border-radius: 4px; background: #111; }
.slot-btn .x { color: var(--muted); padding: 0 2px; }
.slot-btn.on, .btn.on-content { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.media-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.media-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; }
.media-item .mi { padding: 6px 8px; font-size: 12px; display: grid; gap: 4px; }
.file-btn { position: relative; }
.join-row { margin-top: 10px; }
.join-row .input { max-width: 320px; }

/* ---- patch table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.patch-table td { font-size: 13px; }
.patch-table tbody tr { cursor: pointer; }
.patch-table tbody tr:hover td { background: var(--panel-2); }
.patch-table tr.selected td { background: rgba(139, 92, 246, .12); }
.patch-table .warn { color: var(--warn); }
/* ---- dmx grid ---- */
.dmx-grid { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 2px; margin-top: 12px; }
.cell { position: relative; aspect-ratio: 1; border-radius: 3px; background: #0d1017; border: 1px solid #191e29;
  font: 9px/1 var(--mono); color: #6b7489; display: grid; place-items: center; overflow: hidden; }
.cell.on { color: #fff; }
.cell.sel { border-color: var(--cyan); }
.cell.edge { border-left-color: var(--violet); border-left-width: 2px; }

/* ---- table ---- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.table tr.you td { background: rgba(139, 92, 246, .1); }
.state-live { color: var(--ok); }
.state-idle { color: var(--muted); }

/* ---- toasts ---- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--cyan); border-radius: 8px; padding: 9px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45); animation: pop .16s ease-out; }
.toast.error { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- small screens (phone / tablet at the stage) ---- */
@media (max-width: 1000px) {
  .stage-page { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 55vh) auto; overflow: auto; }
  .inspector { border-left: none; border-top: 1px solid var(--line); overflow: visible; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dmx-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); }
  .topbar { gap: 6px; padding: 8px 10px; flex-wrap: wrap; }
  .pages { order: 10; width: 100%; margin: 0; overflow-x: auto; }
  .conn #conn-text { display: none; }
  .topbar .btn { padding: 5px 9px; font-size: 13px; }
  .menu { top: 96px; }
  .edit-bar { flex-wrap: wrap; width: calc(100% - 24px); }
  .stage-legend { display: none; }
  .screen-card { grid-template-columns: 1fr; }
  .pb-row { flex-wrap: wrap; }
}
