:root {
  --accent: #ff6a1a;
  --ink: #f2f1ee;
  --ink-2: #a9a8a3;
  --ink-3: #6f6e6a;
  --line: rgba(255, 255, 255, .13);
  --panel: rgba(9, 9, 10, .86);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: 16px;
  --hit: 28px;
  --badge-clearance: 56px;
  --show-w: 288px;
}
@media (pointer: coarse) { :root { --hit: 44px; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body { color: var(--ink); font: 11px/1.35 var(--mono); -webkit-font-smoothing: antialiased; }
body.idle { cursor: none; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#ui { position: fixed; inset: 0; pointer-events: none; transition: opacity .35s ease; }
body.idle #ui { opacity: 0; }
body.idle #ui * { pointer-events: none !important; }

.corner {
  position: absolute; display: flex; gap: 8px; pointer-events: none; max-width: calc(100vw - 2 * var(--gutter));
  padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.corner.tl { top: 0; left: 0; flex-direction: column; align-items: flex-start; }
.corner.tr { top: 0; right: 0; flex-direction: column; align-items: flex-end; }
.corner.bl { bottom: 0; left: 0; flex-direction: column-reverse; align-items: flex-start; }
.corner.br { bottom: 0; right: 0; flex-direction: column-reverse; align-items: flex-end; }
/* With My scenes open, the right-hand corners sit beside it. */
body.show-open .corner.tr, body.show-open .corner.br { right: var(--show-w); }
/* Clears the "Powered by Netlify" badge, which hosts pin to this corner. */
.corner.br { padding-bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + var(--badge-clearance)); }
/* The Visual panel shares this side and must stop above those raised buttons too. */
.corner.tr .panel { max-height: calc(100dvh - 2 * var(--gutter) - 2 * var(--hit) - 24px - var(--badge-clearance)); }
.corner.br .panel { max-height: calc(100dvh - 2 * var(--gutter) - 2 * var(--hit) - 24px - var(--badge-clearance)); }

.bar { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: auto; align-items: stretch; }
.corner.tr .bar, .corner.br .bar { justify-content: flex-end; }

button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 1px; }

.chip {
  min-height: var(--hit); padding: 0 10px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(9, 9, 10, .62); border: 1px solid var(--line); border-radius: 2px;
  letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: rgba(255, 255, 255, .4); }
.chip[aria-expanded="true"], .chip.on { background: var(--ink); color: #000; border-color: var(--ink); }
.chip .sub { color: var(--ink-2); letter-spacing: .03em; text-transform: none; font-variant-numeric: tabular-nums; }
.chip[aria-expanded="true"] .sub { color: #444; }

.meter { width: 34px; height: 6px; background: rgba(255, 255, 255, .14); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.led { width: 6px; height: 6px; background: rgba(255, 255, 255, .2); border-radius: 50%; flex: none; }
.led.lit { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.panel {
  pointer-events: auto; width: 296px; max-width: 100%;
  max-height: calc(100dvh - 2 * var(--gutter) - 2 * var(--hit) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 12px; display: none; scrollbar-width: thin; scrollbar-color: #444 transparent;
  animation: panelIn .14s ease-out;
}
.panel.open { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } #ui { transition: none; } }

.title { color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; margin: 14px 0 7px; }
.title:first-child { margin-top: 0; }

.seg { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 2px; }
.seg button { flex: 1 1 22%; min-height: var(--hit); letter-spacing: .06em; text-transform: uppercase; background: #0b0b0c; color: var(--ink-2); padding: 0 4px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #000; }

.row { display: grid; grid-template-columns: 1fr 72px; column-gap: 8px; align-items: center; margin-top: 9px; }
.row label { color: var(--ink-2); grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; height: var(--hit); border: 1px solid var(--line); border-radius: 2px; padding: 0 6px 0 0; }
.num:focus-within { border-color: var(--accent); }
.num input { width: 100%; min-width: 0; background: none; border: 0; outline: 0; text-align: right; padding: 0 3px 0 4px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num span { color: var(--ink-3); flex: none; }

input[type=range] { -webkit-appearance: none; appearance: none; grid-column: 1; width: 100%; height: 16px; margin: 1px 0 0; background: none; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ink) var(--fill, 0%), rgba(255, 255, 255, .2) var(--fill, 0%)); }
input[type=range]::-moz-range-track { height: 2px; background: rgba(255, 255, 255, .2); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 7px; height: 14px; margin-top: -6px; background: var(--ink); border: 0; border-radius: 1px; }
input[type=range]::-moz-range-thumb { width: 7px; height: 14px; background: var(--ink); border: 0; border-radius: 1px; }
@media (pointer: coarse) {
  input[type=range] { height: 28px; }
  input[type=range]::-webkit-slider-thumb { width: 16px; height: 24px; margin-top: -11px; }
}

.color { display: grid; grid-template-columns: 1fr var(--hit) 80px; gap: 8px; align-items: center; margin-top: 9px; }
.color label { color: var(--ink-2); }
.color input[type=color] { -webkit-appearance: none; appearance: none; width: var(--hit); height: var(--hit); padding: 0; border: 1px solid var(--line); border-radius: 2px; background: none; cursor: pointer; }
.color input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.color input[type=color]::-webkit-color-swatch { border: 0; border-radius: 1px; }
.color input[type=color]::-moz-color-swatch { border: 0; }
.hex { height: var(--hit); width: 100%; background: none; border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; text-transform: uppercase; }
.hex:focus { outline: 0; border-color: var(--accent); }
.hex.bad { border-color: #ff4040; color: #ff8a8a; }

.field { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; margin-top: 9px; }
.field label { color: var(--ink-2); }
select { height: var(--hit); width: 100%; background: #111; border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; }
.textline { width: 100%; height: 34px; background: none; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 13px; }
.textline:focus { outline: 0; border-color: var(--accent); }

.toggle { display: flex; justify-content: space-between; align-items: center; min-height: var(--hit); width: 100%; margin-top: 7px; color: var(--ink-2); text-align: left; }
.toggle:hover { color: var(--ink); }
.toggle .box { font-size: 10px; letter-spacing: .08em; border: 1px solid var(--line); padding: 2px 6px; min-width: 38px; text-align: center; color: var(--ink-2); }
.toggle[aria-pressed="true"] .box { background: var(--ink); color: #000; border-color: var(--ink); }

.status { margin-top: 8px; color: var(--ink-2); }
.status.error { color: #ff9b8a; }
.status.wait { color: var(--ink); }
.note { margin-top: 10px; color: var(--ink-3); line-height: 1.45; }
.readout { display: flex; justify-content: space-between; margin-top: 9px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.readout b { font-weight: 400; color: var(--ink); }

.scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.scene { min-height: 50px; padding: 6px 7px; text-align: left; border: 1px solid var(--line); border-radius: 2px; display: flex; flex-direction: column; gap: 3px; }
.scene:hover { border-color: rgba(255, 255, 255, .4); }
.scene .k { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scene .e { color: var(--ink-3); font-size: 10px; }
.scene[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.scene[aria-pressed="true"] .k, .scene[aria-pressed="true"] .e { color: #555; }
.actions { display: flex; gap: 6px; margin-top: 8px; }
.actions button { flex: 1; min-height: var(--hit); border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); padding: 0 6px; }
.actions button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }

.keys { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin-top: 6px; color: var(--ink-2); }
kbd { font: inherit; color: var(--ink); }

#fatal { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--ink); text-align: center; font-size: 13px; }

@media (max-width: 760px) {
  .bar { max-width: 46vw; }
  .chip { padding: 0 7px; letter-spacing: .04em; }
  .chip .sub, .chip .hide-s { display: none; }
}
@media (max-width: 520px) {
  .chip .sub, .chip .hide-s { display: none; }
  .panel { width: 100%; }
  .corner { width: 100%; max-width: 100vw; }
  /* The chips wrap on a phone, so open panels leave room for a second row of them. */
  .panel, .corner.tr .panel, .corner.br .panel { max-height: calc(100dvh - 3 * var(--hit) - 3 * var(--gutter) - var(--badge-clearance) - 24px); }
}

/* Control deck: the visual is in its own window, and this window is the desk. */
#deck { display: none; }
body.console #stage { display: none; }
body.console { background: #0b0b0c; cursor: auto; }
body.console #deck {
  /* The bottom edge stops above the corner buttons and the host's badge, which run in under this column. */
  position: absolute; inset: 16px 328px calc(var(--gutter) + var(--hit) + var(--badge-clearance) + 12px); display: flex; flex-direction: column; gap: 8px;
  pointer-events: auto;
}
/* The picture takes whatever height the controls leave. */
.preview { display: block; flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; background: #000; border: 1px solid var(--line); border-radius: 2px; }
.deck-status { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.deck-scenes { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.deck-scenes button, .deck-actions button {
  min-height: 40px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis;
}
.deck-scenes button:hover, .deck-actions button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }
.deck-scenes button[aria-pressed="true"], .deck-actions button[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.deck-actions { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 4px; }
.deck-actions .hit { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.deck-actions .hit:hover { color: #000; }
.deck-note { margin-top: 0; min-height: 1.45em; }
@media (max-width: 1100px) {
  body.console #deck { inset: 64px 16px 112px; }
  .deck-scenes { grid-template-columns: repeat(3, 1fr); }
  .deck-actions { grid-template-columns: 1fr 1fr; }
  .deck-actions .hit { grid-column: 1 / -1; }
}

.set-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.set-row { display: grid; grid-template-columns: 16px 1fr 58px 20px 20px 20px; gap: 4px; align-items: center; }
.set-row select { min-width: 0; }
.set-row .num { grid-column: auto; grid-row: auto; }
.set-row button { min-height: var(--hit); color: var(--ink-2); border: 1px solid var(--line); border-radius: 2px; }
.set-row button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }
.set-n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.set-row.current .set-n { color: var(--accent); }

.about-chip { padding: 0 8px; letter-spacing: 0; color: var(--ink-2); }
.about-name { font: 700 22px/1 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: .01em; }
.about-link { display: block; margin-top: 4px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.about-link:hover { color: var(--accent); }

.wordsbox { height: auto; min-height: 92px; padding: 8px; resize: vertical; line-height: 1.35; display: block; }

.set-step { display: flex; flex-direction: column; gap: 3px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.set-step.current .set-n { color: var(--accent); }
.set-trans { display: grid; grid-template-columns: 1fr 58px; gap: 3px; margin-left: 20px; }
.set-trans select { min-width: 0; color: var(--ink-2); }
.set-trans .num { grid-column: auto; grid-row: auto; }

.scene.pending { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.deck-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.deck-box { display: block; text-align: left; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: #000; }
.deck-box:hover { border-color: rgba(255, 255, 255, .4); }
.deck-box.air { border-color: #ff4d4d; }
.deck-box.editing .deck-label { color: var(--ink); }
.deck-preview { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.deck-label { padding: 3px 4px; color: var(--ink-3); font-size: 10px; min-height: 2.9em; }
.deck-fader { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: end; }
.deck-fader button { min-height: 40px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); }
.deck-fader button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }

.actions button.held, .actions button[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.actions button:disabled { opacity: .4; cursor: default; }
.rec-btn.live { background: #d92020 !important; border-color: #d92020 !important; color: #fff !important; }
.led.rec { display: none; background: #ff3030; }
.led.rec.lit { display: inline-block; box-shadow: 0 0 8px #ff3030; animation: recBlink 1.2s steps(2, jump-none) infinite; }
@keyframes recBlink { from { opacity: 1; } to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .led.rec.lit { animation: none; } }

.routes { display: flex; flex-direction: column; gap: 6px; }
.route { border: 1px solid var(--line); border-radius: 2px; padding: 5px; }
.route-head { display: grid; grid-template-columns: 34px 1fr auto 20px; gap: 5px; align-items: center; }
.route-head button { min-height: var(--hit); padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); }
.route-head button:hover { color: var(--ink); }
.route-on[aria-pressed="true"] { background: var(--ink); color: #000 !important; border-color: var(--ink) !important; }
.route-text { color: var(--ink); line-height: 1.3; }
.route-text.off { color: var(--ink-3); text-decoration: line-through; }
.route-live { display: block; margin: 3px 0 0 39px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-height: 1.35em; }
.route-details { display: none; padding-top: 4px; }
.route-details.open { display: block; }

.map-editor { position: fixed; pointer-events: auto; cursor: crosshair; touch-action: none; }
.map-editor:focus { outline: 0; }

/* A phone has room for one thing at a time: an open panel clears the buttons it would run under. */
@media (max-width: 760px) {
  #ui:has(.corner.tl .panel.open) .corner.bl .bar, #ui:has(.corner.tl .panel.open) .corner.br .bar,
  #ui:has(.corner.tr .panel.open) .corner.bl .bar, #ui:has(.corner.tr .panel.open) .corner.br .bar,
  #ui:has(.corner.bl .panel.open) .corner.br .bar, #ui:has(.corner.br .panel.open) .corner.bl .bar { display: none; }
}

/* The first thing a visitor sees is the simple interface. The rest waits behind one button. */
body:not(.advanced) .adv { display: none !important; }
.chip.mode { color: var(--ink-2); border-style: dashed; }
.chip.mode:hover { color: var(--ink); }
.tabs { margin-bottom: 10px; }
.tabs button { flex: 1 1 0; }
.tab > .title:first-child { margin-top: 2px; }

/* Calibration: the operator's side of lining up the projector. */
.cal { display: none; position: fixed; inset: 0; pointer-events: auto; }
body.calibrating .cal { display: block; }
body.calibrating #ui > .corner, body.calibrating #deck, body.calibrating .map-editor { display: none !important; }
.cal-view { display: none; }
body.console .cal-view { display: flex; position: absolute; inset: 16px 328px 16px 16px; align-items: center; justify-content: center; }
.cal-preview { display: block; max-width: 100%; max-height: 100%; background: #000; outline: 1px solid var(--line); }
.cal-handles { position: fixed; touch-action: none; cursor: move; }
.cal-handles:focus { outline: 0; }
.cal-panel {
  /* Stops above the "Powered by Netlify" badge, like the other controls in this corner. */
  position: absolute; top: 16px; right: 16px; bottom: calc(16px + var(--badge-clearance)); width: 296px; padding: 12px 12px 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); scrollbar-width: thin; scrollbar-color: #444 transparent;
  transition: opacity .12s;
}
body.cal-hide .cal-panel { display: none; }
/* Out of the way during a drag, so a corner beneath it can still be placed by eye. */
body.cal-drag:not(.console) .cal-panel { opacity: .12; pointer-events: none; }
.cal-brand { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cal-brand strong { font: 700 22px/1 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: .01em; }
.cal-brand span { color: var(--ink-2); font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
.cal-panel select { margin-top: 0; }
.cal-panel .textline { margin-top: 8px; height: var(--hit); font-size: 11px; }
.cal-foot { position: sticky; bottom: 0; margin: 12px -12px 0; padding: 2px 12px 12px; background: #09090a; border-top: 1px solid var(--line); }
.cal-foot .status:empty { display: none; }
.actions button.primary { background: var(--ink); color: #000; border-color: var(--ink); letter-spacing: .06em; text-transform: uppercase; }
.actions button.primary:hover { color: #000; }
.actions button.primary:disabled { background: none; color: var(--ink-2); border-color: var(--line); }

/* Library: a wall of tiles for looking around. */
.panel-library { width: 452px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; }
.tile { display: block; text-align: left; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: #000; }
.tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
.tile span { display: block; padding: 4px 6px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover { border-color: rgba(255, 255, 255, .5); }
.tile:hover span { color: var(--ink); }
.tile[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tile[aria-pressed="true"] span { background: var(--ink); color: #000; }
.tile.pending { border-color: var(--accent); }
body.console .panel-library { width: 296px; }
body.console .tiles { grid-template-columns: repeat(2, 1fr); }

/* My scenes: the performer's own list, always beside the stage. */
.show { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: var(--show-w); padding: 12px 12px var(--badge-clearance); flex-direction: column; gap: 8px; pointer-events: auto; background: var(--panel); border-left: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
body.show-open .show { display: flex; }
.show .title { margin: 0; }
.show-head { display: flex; justify-content: space-between; align-items: center; min-height: 18px; }
.show-count { color: var(--ink-2); }
.show-close { width: 22px; height: 22px; color: var(--ink-2); font-size: 15px; line-height: 1; }
.show-close:hover { color: var(--ink); }
.key-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; flex: none; }
.key-tile { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: #000; display: block; text-align: left; }
.key-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.key-tile:not(.empty):hover img { opacity: 1; }
.key-tile img:not([src]) { display: none; }
.key-tile b { position: absolute; top: 2px; left: 3px; padding: 0 4px; background: rgba(0, 0, 0, .72); border-radius: 1px; font-weight: 700; color: var(--ink); }
.key-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 4px; font-size: 10px; background: rgba(0, 0, 0, .68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.key-tile.empty { border-style: dashed; background: none; }
.key-tile.empty b { background: none; color: var(--ink-3); }
.key-tile.empty .key-name { background: none; color: var(--ink-3); }
.key-tile:hover { border-color: rgba(255, 255, 255, .5); }
.key-tile[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.key-tile.flash { animation: keyFlash .5s ease-out; }
@keyframes keyFlash { from { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); } }
.show-add { flex: none; min-height: 34px; background: var(--ink); color: #000; border-radius: 2px; font-weight: 700; letter-spacing: .03em; }
.show-add:hover { background: #fff; }
.show-note { margin: 0; flex: none; color: var(--ink-2); }
.show-note:empty { display: none; }
.show-empty { margin: 0; padding: 0 0 0 16px; color: var(--ink-3); line-height: 1.5; display: flex; flex-direction: column; gap: 6px; }
.show-rows { flex: 1 1 0; min-height: 60px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.show-row { flex: none; border: 1px solid var(--line); border-radius: 2px; background: rgba(255, 255, 255, .025); }
.show-row.live { border-color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.show-row.next:not(.live) { border-color: rgba(255, 255, 255, .34); border-style: dashed; }
.show-row.dragging { opacity: .6; }
.row-main { display: flex; align-items: center; gap: 2px; min-height: 40px; }
.row-handle { flex: none; width: 15px; text-align: center; color: var(--ink-3); cursor: grab; touch-action: none; user-select: none; letter-spacing: -2px; }
.row-handle:active { cursor: grabbing; }
.row-play { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 7px; text-align: left; padding: 2px 0; }
.row-play img { flex: none; width: 58px; height: 33px; object-fit: cover; background: #111; border-radius: 1px; }
.row-play img:not([src]), .row-play img[src=""] { visibility: hidden; }
.row-text { min-width: 0; display: flex; flex-direction: column; }
.row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.row-tag { color: var(--ink-3); font-size: 10px; }
.row-tag:empty { display: none; }
.row-key { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--ink-2); border-radius: 2px; color: var(--ink); font-weight: 700; font-size: 10px; }
.row-menu { flex: none; width: 24px; align-self: stretch; color: var(--ink-2); }
.row-menu:hover { color: var(--ink); }
.row-more { padding: 6px 8px 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.row-more .textline { height: var(--hit); font-size: 11px; }
.row-more .actions { margin-top: 2px; }
.key-pick { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.key-pick button { min-height: 24px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); }
.key-pick button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }
.key-pick button[aria-pressed="true"] { background: var(--ink); color: #000; border-color: var(--ink); }
.set-trans-time { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; }
.set-trans-time .num { grid-column: auto; grid-row: auto; }
.set-trans-time .note { margin: 0; }
.row-more .set-trans { margin-left: 0; }
.show-foot { flex: none; display: flex; flex-direction: column; gap: 2px; }
.show-foot .actions { margin-top: 4px; }
.show-foot .actions button { min-height: 32px; }
.show-status { color: var(--ink-3); font-size: 10px; line-height: 1.35; }
.show-status:empty { display: none; }

/* The desk leaves room for My scenes, and for the Visual panel beside it when that is open. */
body.console.show-open #deck { right: calc(var(--show-w) + 16px); top: 56px; }
body.console.show-open:has(#panel-visual.open) #deck, body.console.show-open:has(#panel-fx.open) #deck, body.console.show-open:has(#panel-out.open) #deck { right: calc(var(--show-w) + 328px); }
.deck-scenes button.empty { color: var(--ink-3); border-style: dashed; }

/* Help */
.help { display: none; position: absolute; inset: 0; z-index: 5; pointer-events: auto; background: rgba(0, 0, 0, .55); align-items: center; justify-content: center; padding: 24px; }
.help.open { display: flex; }
.help-box { position: relative; width: 620px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 20px 22px 22px; background: #0d0d0e; border: 1px solid var(--line); border-radius: 3px; line-height: 1.5; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.help-box .show-close { position: absolute; top: 12px; right: 12px; }
.help-box h2 { margin: 0 0 6px; font: 700 22px/1.1 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.help-box h3 { margin: 16px 0 6px; color: var(--ink-3); font: inherit; letter-spacing: .12em; text-transform: uppercase; }
.help-box ol { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.help-box .keys { grid-template-columns: 96px 1fr; gap: 4px 12px; }
body.calibrating #ui > .show, body.calibrating #ui > .help { display: none !important; }

@media (max-width: 820px) {
  .panel-library { width: 100%; }
  .show { width: 100%; }
  body.show-open .corner.tr, body.show-open .corner.br { right: 0; }
  body.show-open .corner.bl, body.show-open .corner.tl { display: none; }
  body.show-open .show { z-index: 1; }
}

.actions.reset button { color: var(--ink-3); border-style: dashed; min-height: 24px; }
.actions.reset button:hover { color: var(--ink); }
