/* The DithTill landing page: the app's own screen, cut down, with the Help card open. */
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/vt323-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dmmono-400-latin.woff2') format('woff2');
}
:root {
  --phos-rgb: 255, 222, 176;
  --glow-rgb: 255, 170, 40;
  --accent-rgb: 255, 176, 0;
  --phos: #ffdeb0;
  --phos-dim: rgba(255, 222, 176, 0.62);
  --phos-faint: rgba(255, 222, 176, 0.16);
  --phos-glow: 0 0 6px rgba(255, 170, 40, 0.45);
  --accent: #ffb000;
  --led-glow: rgba(255, 176, 0, 0.85);
}
body {
  margin: 0;
  background: #000;
}
[hidden] {
  display: none !important;
}
.scr {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  color: var(--phos);
  font-family: 'VT323', 'DM Mono', monospace;
  cursor: crosshair;
  outline: none;
  --panel-bg: rgba(4, 8, 5, 0.86);
}
.scr :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.scr-field {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: block;
  image-rendering: pixelated;
}

/* rails */
.scr-rail {
  position: absolute;
  top: 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 18px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel-bg);
  color: var(--phos);
  text-shadow: var(--phos-glow);
}
.scr-rail--l {
  left: 18px;
  width: 292px;
}
.scr-rail--r {
  right: 18px;
  width: 232px;
}
.ghost {
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s steps(4);
}
.scr.is-rails .ghost {
  opacity: 0.4;
}
.scr.is-rails.is-awake .ghost {
  opacity: 1;
}
.scr-brand {
  display: flex;
  align-items: baseline;
  gap: 2px 10px;
}
.scr-wordmark {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 2px currentColor,
    0 0 14px rgba(var(--glow-rgb), 0.5);
}
.scr-wordmark b {
  font-weight: normal;
  color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
}
.scr-modes {
  display: flex;
  gap: 44px;
}
.scr-mode {
  padding: 2px 0;
  font:
    21px/1.1 'VT323',
    monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--phos-dim);
}
.scr-mode.is-on {
  color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
}
.scr-mode.is-on::before {
  content: '>';
  margin-right: 1px;
}
.deck-panel-label {
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
}
.deck-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.deck-seg {
  display: flex;
  gap: 2px;
}
.deck-seg span {
  padding: 1px 7px;
  border-radius: 2px;
  font:
    18px/1.1 'VT323',
    monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--phos-dim);
}
.deck-seg span.is-on {
  color: #000;
  background: var(--accent);
  text-shadow: none;
  box-shadow: 0 0 10px var(--led-glow);
}
.deck-slider {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}
.deck-ctl-label {
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phos-dim);
}
.deck-slider-track {
  position: relative;
  height: 2px;
  background: var(--phos-faint);
  box-shadow: 0 0 6px rgba(var(--glow-rgb), 0.25);
}
.deck-slider-thumb {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 18px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--led-glow);
}
.deck-slider-readout {
  font-size: 18px;
  text-align: right;
  color: var(--phos);
}
.deck-hsep {
  height: 1px;
  margin: 3px 0;
  background: var(--phos-faint);
}
.deck-dd {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.deck-dd-btn {
  display: flex;
  justify-content: space-between;
  padding: 1px 8px;
  border: 1px solid var(--phos-faint);
  border-radius: 2px;
  font-size: 18px;
  color: var(--phos);
}
.deck-dd-caret {
  font-size: 14px;
  color: var(--phos-dim);
}
.deck-load {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--phos-faint);
  border-radius: 2px;
  font:
    19px/1.1 'VT323',
    monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--phos);
}
.deck-load.is-on {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
  text-shadow: none;
  box-shadow: 0 0 12px var(--led-glow);
}
.deck-load.deck-export {
  color: #ff9e8a;
  border-color: rgba(255, 158, 138, 0.45);
  text-shadow: 0 0 7px rgba(255, 120, 100, 0.55);
}
.scr-layers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crt-layers-title {
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--phos-dim);
}
.crt-layers-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--phos-faint);
  border-radius: 2px;
  font:
    20px/1 'VT323',
    monospace;
}
.crt-layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 2px 8px;
  border: 1px solid var(--phos-faint);
  border-radius: 2px;
}
.crt-layer-row.is-sel {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--led-glow);
}
.crt-layer-name {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--phos);
}
.crt-layer-row.is-sel .crt-layer-name {
  color: var(--accent);
}
.anim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.anim-head .deck-load {
  padding: 2px 10px;
}

/* the live corner: ? and power */
.scr-sys {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--phos-faint);
  transition: opacity 0.25s steps(4);
  opacity: 0;
}
.scr.is-on .scr-sys {
  opacity: 1;
}
.scr-sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.scr-chip {
  min-height: 26px;
  padding: 1px 8px;
  border: 1px solid var(--phos-faint);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  font:
    18px/1.1 'VT323',
    monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--phos-dim);
  text-shadow: var(--phos-glow);
}
.scr-chip--ghost {
  display: inline-flex;
  align-items: center;
  cursor: default;
  opacity: 0.4;
}
.scr-chip:hover:not(.scr-chip--ghost) {
  color: var(--accent);
  border-color: var(--accent);
}
.scr-chip.is-on {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
}
.scr-power {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: rgba(4, 8, 5, 0.6);
  color: var(--accent);
  cursor: pointer;
  box-shadow:
    0 0 14px -2px var(--accent),
    inset 0 0 10px -4px var(--accent);
}
.scr-power-glyph {
  position: absolute;
  inset: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 3px currentColor);
}
.scr-power-glyph::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  width: 2px;
  height: 10px;
  margin-left: -1px;
  border-radius: 1px;
  background: currentColor;
}
.scr:not(.is-on) .scr-power {
  animation: scr-breathe 2.4s ease-in-out infinite;
}
@keyframes scr-breathe {
  50% {
    box-shadow:
      0 0 22px 2px var(--accent),
      inset 0 0 12px -2px var(--accent);
  }
}
.scr:not(.is-on) .scr-rail--r {
  z-index: 9;
  background: transparent;
  text-shadow: none;
}
.scr:not(.is-on) .scr-sys {
  opacity: 1;
  border-top-color: transparent;
}
.scr:not(.is-on) .scr-chip {
  visibility: hidden;
}

/* timeline, down to a ruler and a playhead */
.scr-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  z-index: 3;
  padding: 8px 14px 10px;
  border-radius: 4px;
  background: var(--panel-bg);
  color: var(--phos);
  text-shadow: var(--phos-glow);
}
.tl-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 8px;
  align-items: end;
}
.tl-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-time {
  font-size: 19px;
  color: var(--accent);
  white-space: nowrap;
}
.tl-ruler {
  position: relative;
  height: 18px;
  border-bottom: 1px solid var(--phos-faint);
}
.tl-tick {
  position: absolute;
  top: 0;
  font-size: 14px;
  color: var(--phos-dim);
  transform: translateX(-2px);
}
.tl-grip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 14px;
  margin-left: -7px;
}
.tl-grip::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  border-top: 10px solid #ff6a55;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  filter: drop-shadow(0 0 3px rgba(255, 106, 85, 0.8));
}

/* the tube */
.scr-fx {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.scr-scan {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.55;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0.22) 1.5px,
    rgba(0, 0, 0, 0) 3px
  );
}
.scr-vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 115% at 50% 48%, transparent 60%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: inset 0 0 70px 12px rgba(0, 0, 0, 0.5);
}
.scr-off {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: radial-gradient(circle at 50% 45%, #0a0d0a, #020302);
  opacity: 1;
  transition: opacity 0.55s ease;
}
.scr.is-on .scr-off {
  opacity: 0;
  pointer-events: none;
}
.scr-staticline {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
  background: linear-gradient(
    0deg,
    #050805 44%,
    rgba(225, 255, 228, 0.95) 49.6%,
    rgba(225, 255, 228, 0.95) 50.4%,
    #050805 56%
  );
}

/* the Help card */
.crt-help {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.crt-help-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(680px, 100%);
  max-height: calc(100vh - 32px);
  padding: 18px 22px;
  overflow: auto;
  background: rgba(4, 8, 5, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.25);
  font-family: 'VT323', 'DM Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: default;
  pointer-events: auto;
  animation: card-on 0.2s steps(5) both;
}
@keyframes card-on {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 0.85;
  }
  60% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}
.crt-help-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.crt-help-title {
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
}
.crt-help-close {
  font-size: 16px;
  opacity: 0.6;
  text-align: right;
}
.crt-help-cols {
  display: flex;
  gap: 18px;
}
.crt-help-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 248px;
  padding-right: 12px;
  border-right: 1px solid rgba(var(--accent-rgb), 0.25);
}
.crt-help-item {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 8px 3px 2px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--accent);
}
.crt-help-item.is-on {
  color: #000;
  background: var(--accent);
  text-shadow: none;
  box-shadow: 0 0 10px var(--led-glow);
}
.crt-help-mark {
  display: inline-block;
  flex: none;
  width: 1.1em;
  text-align: center;
}
.crt-help-stack {
  display: grid;
  flex: 1;
  min-width: 0;
}
.crt-help-body {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.crt-help-body.is-off {
  visibility: hidden;
}
.crt-help-topic {
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 9px var(--led-glow);
}
.crt-help-line {
  font-size: 20px;
  line-height: 1.15;
  opacity: 0.9;
}
.is-print > * {
  animation: print-on 0.04s linear both;
}
.is-print > *:nth-child(2) {
  animation-delay: 0.05s;
}
.is-print > *:nth-child(3) {
  animation-delay: 0.1s;
}
.is-print > *:nth-child(4) {
  animation-delay: 0.15s;
}
.is-print > *:nth-child(5) {
  animation-delay: 0.2s;
}
.is-print > *:nth-child(6) {
  animation-delay: 0.25s;
}
@keyframes print-on {
  from {
    opacity: 0;
  }
}

/* installers, in the app's Layers-row idiom */
.dl-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 2px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 2px;
  color: var(--accent);
  text-decoration: none;
}
.dl-row.is-sel {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--led-glow);
}
.dl-name {
  font-size: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dl-row.is-sel .dl-name {
  text-shadow: 0 0 9px var(--led-glow);
}
.dl-tag {
  margin-left: 6px;
  font-size: 16px;
  opacity: 0.6;
}
.dl-file {
  flex: none;
  font-size: 18px;
  opacity: 0.75;
  white-space: nowrap;
}
.dl-note {
  padding-top: 9px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.25);
}

/* a one-line notice, the app's banner */
.crt-banner {
  position: absolute;
  left: 50%;
  bottom: 84px;
  z-index: 70;
  padding: 6px 12px;
  transform: translateX(-50%);
  background: rgba(4, 8, 5, 0.82);
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
  text-shadow: 0 0 9px var(--led-glow);
  pointer-events: none;
}

/* phone: the rails do not fit, and the page admits it */
.scr.is-phone {
  min-height: 0;
  cursor: default;
}
.is-phone .scr-rail {
  top: 14px;
}
.is-phone .scr-rail--l {
  left: -196px;
}
.is-phone .scr-rail--r {
  right: -152px;
}
.is-phone .crt-help {
  align-items: flex-end;
  padding: 12px;
}
.is-phone .crt-help-card {
  padding: 16px 18px;
  max-height: calc(100vh - 24px);
}
.is-phone .crt-help-list {
  flex: none;
  padding: 0;
  border: 0;
  gap: 4px;
}
.is-phone .crt-help-item {
  min-height: 44px;
  font-size: 22px;
}
.is-phone .dl-row {
  min-height: 44px;
}
.is-phone .crt-banner {
  left: 12px;
  right: 12px;
  bottom: auto;
  top: 14px;
  transform: none;
  white-space: normal;
  text-align: center;
}
.phone-more {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 20px;
  color: var(--accent);
  opacity: 0.7;
  text-decoration: none;
}
.phone-back {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 20px;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--accent);
  opacity: 0.7;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .crt-help-card,
  .is-print > *,
  .scr:not(.is-on) .scr-power {
    animation: none;
  }
  .ghost,
  .scr-sys,
  .scr-off {
    transition: none;
  }
}
