@font-face {
  font-family: BIOS;
  src: url('assets/WebPlus_IBM_BIOS.woff') format('woff');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --surface: #acaaac;
  --silver: #d3d2d3;
  --shadow: #555355;
  --cyan: #00c6c6;
  --yellow: #ffff55;
  --ui-font: BIOS, 'Lucida Console', monospace;
}

[data-release-mode='public'] { --ui-font: 'Lucida Console', monospace; }

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: #141414; }
[hidden] { display: none !important; }

#view {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 8px;
}

#viewport { width: 640px; height: 480px; position: relative; }
#screen {
  position: absolute;
  width: 640px;
  height: 480px;
  overflow: hidden;
  isolation: isolate;
  transform-origin: top left;
  background: var(--surface);
  color: #000;
  font: normal 8px/1 var(--ui-font);
  font-variant-ligatures: none;
  image-rendering: pixelated;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 1px dotted #222; outline-offset: -3px; }
.abs { position: absolute; }
.raise {
  border: 1px solid;
  border-color: #fff #080808 #080808 #fff;
  box-shadow: inset 1px 1px #dadada, inset -1px -1px var(--shadow);
  background: var(--surface);
}
.deep {
  border: 1px solid;
  border-color: #141414 #fff #fff #141414;
  box-shadow: inset 1px 1px #535353, inset -1px -1px #d1d1d1;
  background: var(--surface);
}

.bevel {
  padding: 2px 3px;
  border: 1px solid;
  border-color: #fff #111 #111 #fff;
  border-radius: 0;
  box-shadow: inset 1px 1px #d9d9d9, inset -2px -2px #565456;
  background: var(--surface);
  appearance: none;
  white-space: pre;
  text-align: center;
}
.bevel:active, .bevel.active {
  border-color: #111 #fff #fff #111;
  box-shadow: inset 1px 1px #5a585a, inset -1px -1px #e4e0e4;
}
.bevel:disabled { color: #595759; text-shadow: 1px 1px #e3e1e3; }
.light-text { color: white; text-shadow: 1px 1px #646264; }
.yellow-text { color: var(--yellow); }
.cyan-text { color: var(--cyan); text-shadow: 1px 1px #636363; }

.outer, .window {
  border: 1px solid #131313;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #fff;
  background-color: var(--surface);
}

.weave {
  background-color: #525044;
  background-image: var(--weave);
  background-size: 8px 8px;
}

.bar {
  display: grid;
  place-items: center;
  height: 16px;
  white-space: pre;
  overflow: hidden;
  color: #fff;
  text-shadow: 1px 1px #161616;
  background: linear-gradient(#dad7da 0 1px, #b6b4b6 2px, var(--surface) 44%, #696769 77%, #414041 100%);
  border: 1px solid #101010;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #d1cfd1;
}
.close-square {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  padding: 0;
}
.close-square::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid #080808;
  border-radius: 50%;
  box-shadow: inset 1px 1px #eee;
}
.indicator::before { background: #484648; border-color: #2d2b2d; box-shadow: inset 1px 1px #828082; }
.indicator.active::before { background: #ce0000; border-color: #8d0000; box-shadow: inset 1px 1px #ff7878; }
.decorative { pointer-events: none; }

.les-art { padding: 0; border: 0; box-shadow: none; }
.les-art canvas { display: block; }
.login-field {
  border: 1px solid;
  border-color: #111 #fff #fff #111;
  border-radius: 0;
  background: var(--surface);
  color: #000;
  text-align: center;
  padding: 0 5px;
  caret-color: #444;
}
.login-field:focus-visible { outline: none; }
.login-field::selection { color: var(--yellow); background: #555; }
.label-chip { display: grid; place-items: center; white-space: pre; }
.segment-value { color: #b90000; font: 16px/1 var(--ui-font); text-shadow: 1px 0 #fcc1ad; }
.segment-display { display: flex; align-items: center; justify-content: center; gap: 3px; }
.segment-digit { position: relative; display: inline-block; width: 10px; height: 15px; }
.segment-digit i { position: absolute; background: #ad1514; box-shadow: 1px 0 #f99a92; }
.segment-a, .segment-g, .segment-d { left: 2px; width: 7px; height: 1px; }
.segment-a { top: 0; }
.segment-g { top: 7px; }
.segment-d { bottom: 0; }
.segment-b, .segment-c, .segment-e, .segment-f { width: 1px; height: 6px; }
.segment-f, .segment-b { top: 1px; }
.segment-e, .segment-c { bottom: 1px; }
.segment-f, .segment-e { left: 1px; }
.segment-b, .segment-c { right: 0; }
.login-info { text-align: center; line-height: 10px; white-space: pre; }
.major { font-size: 8px; letter-spacing: 1px; }

.readout {
  display: grid;
  place-items: center;
  white-space: pre;
  color: white;
  background: #000;
  border: 1px solid;
  border-color: #fff #333 #333 #fff;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px #dedede;
}
.readout.cyan-text { color: var(--cyan); text-shadow: none; }
.tile {
  padding: 0;
  text-align: left;
  border: 1px solid;
  border-color: #272627 #242324 #242324 #272627;
  box-shadow: inset 1px 1px white, inset -2px -2px #6c6a6c;
  background: var(--surface);
}
.tile[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--cyan), inset -2px -2px #282728; }
.orphan-tile { border-color: transparent; box-shadow: none; background: transparent; }
.orphan-tile .tile-digits { left: 8px; right: auto; }
.tile-label { top: 3px; left: 4px; right: 4px; text-align: center; white-space: nowrap; }
.tile-swatch { display: block; position: absolute; height: 16px; background: white; }
.tile-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #000; }
.tile-dot.outlined { border: 1px solid #000; background: transparent; }
.tile-digits { bottom: 4px; right: 7px; color: var(--cyan); background: #000; white-space: pre; padding: 0 3px; }
.status-inner { background: var(--surface); }

.tall-slider { display: grid; place-items: center; background: #666; }
.tall-slider input[type='range'] { appearance: none; writing-mode: vertical-lr; direction: rtl; width: 11px; height: 94px; margin: 0; background: #878587; }
.tall-slider input::-webkit-slider-thumb { appearance: none; width: 10px; height: 14px; border: 1px solid; border-color: #70dcdf #0a6e71 #0a6e71 #70dcdf; border-radius: 0; background: #009fa1; }
.tall-slider input::-moz-range-thumb { width: 10px; height: 14px; border-radius: 0; background: #009fa1; }
input[type='range'] { background: transparent; accent-color: #007f7f; cursor: pointer; }
.meter { background: #111; border: 1px solid #6c6c6c; box-shadow: 0 0 0 1px #fff; }
.meter em { position: absolute; bottom: 0; left: 0; right: 0; background: #389320; }
.modal-layer { inset: 0; z-index: 20; }
.dialog {
  position: absolute;
  display: flex;
  flex-direction: column;
  border: 1px solid black;
  background: var(--surface);
  color: #000;
  box-shadow: inset 2px 2px #fff, inset -2px -2px #282828, 4px 4px #0007;
  font-size: 8px;
}
.dialog .bar { flex: 0 0 16px; margin: 2px 2px 0; position: relative; }
.dialog-body { padding: 10px; overflow: auto; line-height: 1.5; }
.dialog p { margin: 0 0 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 9px; }
.dialog .bevel { min-height: 19px; }
.exit-requester {
  display: block;
  border: 0;
  background: #ac0000;
  color: #fff;
  box-shadow: inset 2px 2px #fff, inset -2px -2px #555;
}
[data-release-mode='public'] .exit-requester {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 2px;
}
[data-release-mode='public'] .exit-requester button { letter-spacing: inherit; }
.exit-requester::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 2px solid;
  border-color: #555 #fff #fff #555;
  pointer-events: none;
}
.exit-requester .bar {
  position: absolute;
  left: 19px;
  top: 4px;
  right: 4px;
  height: 14px;
  margin: 0;
  overflow: visible;
  background: var(--surface);
  box-shadow: inset 1px 1px #fff, inset -1px -1px #161616;
}
.exit-requester .close-square {
  top: -1px;
  left: -16px;
  width: 14px;
  height: 14px;
  min-height: 0;
}
.exit-requester .dialog-body { position: absolute; inset: 0; padding: 0; overflow: visible; pointer-events: none; }
.exit-requester .dialog-body button { pointer-events: auto; color: #000; padding-bottom: 4px; }
.exit-requester .dialog-body button:last-child { outline: 1px solid #000; }
.exit-requester .dialog-body button:focus-visible { outline: 1px dotted #222; }
.exit-sign {
  display: grid;
  place-items: center;
  border: 1px solid #000;
  border-radius: 50%;
  background: #ff5552;
  color: #000;
  isolation: isolate;
  padding-bottom: 2px;
}
.exit-sign::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: #fff;
  border-radius: 50%;
  z-index: -1;
}
.exit-caption { text-align: center; line-height: 10px; white-space: pre; }
.list { width: 100%; border-collapse: collapse; text-align: left; }
.list td, .list th { padding: 3px 4px; border-bottom: 1px solid #777; }
.list tbody tr:nth-child(odd) { background: #bdbbbd; }
.list input, .list select, .dialog input[type='text'] {
  background: #d2d0d2;
  color: #111;
  border: 1px solid #555;
  padding: 3px;
  border-radius: 0;
}
.list input[type='number'] { width: 56px; }
.error { color: #980000; }
.dmx-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; margin: 6px 0; }
.dmx-cell { background: #111; color: #cbcbcb; text-align: center; padding: 4px 0; }
.dmx-cell.live { color: var(--cyan); }
.control-row { display: grid; grid-template-columns: 121px 1fr 44px; gap: 5px; align-items: center; margin: 4px 0; }
.control-row output { background: #111; color: var(--cyan); text-align: center; padding: 3px 0; }
.control-row input { width: 100%; margin: 0; }
.control-row select { width: 100%; background: #d2d0d2; border: 1px solid #555; }
.scanner-panel { pointer-events: none; }
.scanner-panel button, .scanner-panel input { pointer-events: auto; }
.scanner-bank { display: flex; justify-content: space-between; align-items: center; padding-inline: 5px; }
.readout.scanner-cue { left: 76px !important; top: 329px !important; width: 150px !important; }
.scanner-fader-name {
  writing-mode: vertical-lr;
  text-orientation: upright;
  letter-spacing: 1px;
  padding: 3px 1px;
  line-height: 8px;
  overflow: hidden;
}
.scanner-fader, .scanner-axis {
  appearance: none;
  writing-mode: vertical-lr;
  direction: ltr;
  margin: 0;
  padding: 0;
  border: 1px solid;
  border-color: #111 #fff #fff #111;
  border-radius: 0;
  background: #898789;
  cursor: pointer;
}
.scanner-fader::-webkit-slider-thumb, .scanner-axis::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 7px;
  border: 1px solid;
  border-color: #e6eaee #263739 #263739 #e6eaee;
  border-radius: 0;
  background: #68a6ab;
}
.scanner-fader::-moz-range-thumb, .scanner-axis::-moz-range-thumb {
  width: 8px;
  height: 5px;
  border: 1px solid #414c4d;
  border-radius: 0;
  background: #68a6ab;
}
.scanner-fader.inactive { background: var(--surface); }
.scanner-fader.soft-strobe { background: #d7ce85; }
.scanner-fader.soft-speed { background: #ab7745; }
.scanner-fader.inactive:not(:focus)::-webkit-slider-thumb { visibility: hidden; }
.scanner-fader.inactive:not(:focus)::-moz-range-thumb { visibility: hidden; }
.scanner-arrow { color: #006f72; padding-inline: 0; }
.scanner-percent { text-align: center; color: #820000; font-size: 5px; pointer-events: none; }
.scanner-wheel-key, .scanner-extra, .scanner-light { display: grid; place-items: center; padding: 1px 2px 2px; }
.scanner-icon { display: block; image-rendering: pixelated; }
.scanner-swatch { display: grid; place-items: center; width: 13px; height: 9px; }
.scanner-swatch i { width: 7px; height: 5px; }
.scanner-light { color: #ffff55; text-shadow: 1px 1px #505050; font-size: 14px; padding: 0 0 2px; }
.scanner-xy .dialog-body { position: absolute; inset: 0; padding: 0; overflow: visible; pointer-events: none; }
.scanner-xy-controls > :is(button, input, .scanner-pad), .scanner-coordinate-layer { pointer-events: auto; }
.scanner-axis-pan { writing-mode: horizontal-tb; }
.scanner-axis:disabled { background: #999; cursor: default; }
.scanner-xy-readout {
  padding: 1px 3px;
  line-height: 8px;
  background-image: linear-gradient(90deg, transparent var(--xy-position), #0000a8 var(--xy-position), #0000a8 calc(var(--xy-position) + 1px), transparent calc(var(--xy-position) + 1px));
}
.scanner-xy-y {
  writing-mode: vertical-lr;
  text-orientation: upright;
  padding: 3px 1px;
  background-image: linear-gradient(transparent var(--xy-position), #0000a8 var(--xy-position), #0000a8 calc(var(--xy-position) + 1px), transparent calc(var(--xy-position) + 1px));
}
.scanner-pad {
  background-color: #a9a9a9;
  background-image:
    linear-gradient(#7a7a7a 1px, transparent 1px),
    linear-gradient(90deg, #7a7a7a 1px, transparent 1px);
  background-size: 25% 25%;
  cursor: crosshair;
  overflow: hidden;
  touch-action: none;
}
.scanner-pad i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid black;
  outline: 1px solid white;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scanner-xy-motion, .scanner-xy-motion .scanner-pad { background-color: #9c743d; }
.scanner-xy-motion .scanner-pad { background-image: linear-gradient(#624e35 1px, transparent 1px), linear-gradient(90deg, #624e35 1px, transparent 1px); }
.scanner-pad .scanner-xy-actual {
  width: 5px;
  height: 5px;
  background: #ffff55;
  outline: 0;
}
.scanner-coordinate-layer { background: #0004; }
.scanner-coordinate-form { padding: 8px; }
.scanner-coordinate-form label { display: grid; grid-template-columns: 2em 1fr; align-items: center; margin-block: 4px; }
.scanner-coordinate-form input { width: 100%; background: #d3d2d3; border: 1px solid #555; }
.scanner-coordinate-form .dialog-actions { margin-top: 6px; }
.auth-login { display: contents; }
.auth-login-feedback {
  padding: 3px 4px;
  color: #ffff55;
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
  text-shadow: 1px 1px #222;
}
.account-form { display: grid; gap: 5px; }
.account-field { display: grid; grid-template-columns: 113px 1fr; align-items: center; gap: 4px; }
.account-field input:not([type='checkbox']), .account-field select {
  width: 100%;
  min-height: 19px;
  padding: 2px 4px;
  color: #000;
  background: #d3d2d3;
  border: 1px solid;
  border-color: #222 #fff #fff #222;
  border-radius: 0;
}
.account-field input[type='checkbox'] { justify-self: start; accent-color: #007f82; }
.account-list { max-height: 165px; overflow: auto; }
.account-form .account-hint, .account-form .account-message { margin: 0; }
.account-message:empty { display: none; }
.zoom-row {
  display: grid;
  grid-template-columns: 19px 1fr 19px;
  gap: 1px;
  margin-bottom: 3px;
  align-items: stretch;
}
.zoom-value { display: grid; place-items: center; min-height: 27px; padding: 2px; }
.zoom-value output { color: #860000; }
.zoom-row .bevel { padding-inline: 0; }
.setup-tools { display: flex; gap: 5px; margin-bottom: 6px; }
.setup-slot { min-width: 24px; }
.setup-axes-list {
  max-height: 152px;
  overflow: auto;
  border: 1px solid;
  border-color: #444 #dadada #dadada #444;
}
.setup-axis-fixture {
  display: grid;
  grid-template-columns: 18px minmax(100px, 1fr) minmax(140px, 1.6fr);
  align-items: center;
  min-height: 20px;
  gap: 5px;
  padding-inline: 3px;
}
.setup-axis-fixture:nth-child(odd) { background: #bdbbbd; }
.setup-axis-fixture input { margin: 0; accent-color: #007f82; }
.setup-axis-flags { line-height: 1.3; color: #3a2820; }
.setup-axis-switches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.setup-axis-switches > div { display: grid; grid-template-rows: 15px 20px; }
.unit-list { max-height: 225px; overflow: auto; margin: 7px 0; }
.unit-detail { width: 100%; text-align: left; }
.fixture-list { display: grid; gap: 4px; }
.fixture-list .bevel { text-align: left; padding-left: 6px; }
.sequence-list { max-height: 105px; overflow: auto; }
.show-file-row { display: grid; gap: 3px; }
.macro-file-row { grid-template-columns: minmax(0, 1fr) 52px; }
.sequence-file-row { grid-template-columns: minmax(0, 1fr) 42px 52px; }
.show-file-row .bevel { overflow: hidden; text-overflow: ellipsis; }
.show-editor-columns { display: grid; grid-template-columns: 1fr 1.65fr; gap: 5px; }
.show-editor-columns header { min-height: 16px; }
.show-editor-list { height: 126px; overflow: auto; padding: 3px; }
.show-editor-list > button { display: block; width: 100%; text-align: left; }
.show-editor-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 49px 20px 20px 32px;
  align-items: center;
  gap: 2px;
}
.show-editor-step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-editor-step input {
  width: 100%;
  color: #860000;
  background: #d3d2d3;
  border: 1px solid;
  border-color: #222 #fff #fff #222;
  font: inherit;
}
.show-editor-step .bevel { padding-inline: 1px; }
.sequence-edit-controls { pointer-events: none; }
.sequence-edit-controls button { pointer-events: auto; }
.sequence-edit-controls .sequence-position { color: #860000; text-shadow: 1px 1px #e4dcdc; }
.show-issues { max-height: 144px; overflow: auto; }
.sound-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
}
.sound-controls output { text-align: center; }
.sound-threshold { margin: 6px 0 2px; }
.sound-threshold input[type='range'] {
  appearance: none;
  min-height: 12px;
  padding: 0;
  background: #878587;
}
.sound-threshold input::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 12px;
  border: 1px solid;
  border-color: #70dcdf #0a6e71 #0a6e71 #70dcdf;
  background: #009fa1;
}
.sound-threshold input::-moz-range-thumb { width: 11px; height: 12px; border-radius: 0; background: #009fa1; }
.sound-meter {
  appearance: none;
  display: block;
  width: 100%;
  height: 10px;
  background: #111;
  border: 1px solid;
  border-color: #555 #eee #eee #555;
}
.sound-meter::-webkit-meter-bar { height: 100%; border: 0; border-radius: 0; background: #111; }
.sound-meter::-webkit-meter-optimum-value { background: #389320; }
.sound-meter::-moz-meter-bar { background: #389320; }
.sound-status { min-height: 12px; margin: 2px 0 7px; }
.macro-list { max-height: 110px; overflow: auto; margin-bottom: 8px; }
.macro-list .bevel { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.scene {
  position: relative;
  height: 175px;
  overflow: hidden;
  background: #15151c;
  border: 1px solid black;
}
.beam { position: absolute; width: 48px; height: 78px; transform-origin: 50% 0; clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%); pointer-events: none; }
.sim-legend { background: #151515; color: var(--cyan); padding: 4px; }

@media (prefers-reduced-motion: reduce) { *, *::before { scroll-behavior: auto !important; } }
