:root {
  color-scheme: dark;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #000306;
  color: #dff4ff;
  --signal: #61bdff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000306;
}

body {
  min-height: 100svh;
}

button,
input,
select {
  font: inherit;
}

.stage,
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage {
  isolation: isolate;
  overflow: hidden;
  background: #000306;
}

#field {
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.identity {
  position: fixed;
  z-index: 3;
  top: clamp(22px, 4vw, 48px);
  left: clamp(22px, 4vw, 56px);
  max-width: 300px;
  pointer-events: none;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.8);
}

.identity__eyebrow,
.identity__note {
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.5;
  text-transform: uppercase;
}

.identity__eyebrow {
  color: rgba(157, 215, 255, 0.52);
}

.identity h1 {
  margin: 7px 0 9px;
  font-size: clamp(19px, 2.1vw, 29px);
  font-weight: 440;
  letter-spacing: -0.025em;
  line-height: 1;
  color: rgba(225, 246, 255, 0.92);
}

.identity__note {
  color: rgba(167, 210, 236, 0.32);
  letter-spacing: 0.12em;
}

.telemetry {
  position: fixed;
  z-index: 3;
  left: clamp(22px, 4vw, 56px);
  bottom: clamp(22px, 4vw, 46px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(169, 220, 249, 0.42);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.telemetry__lamp {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 9px rgba(97, 189, 255, 0.75);
  transition: transform 180ms ease, background-color 180ms ease;
}

.telemetry.transmitting .telemetry__lamp {
  transform: scale(1.7);
  background: #d9f6ff;
}

.telemetry__divider {
  width: 22px;
  height: 1px;
  background: rgba(135, 201, 241, 0.16);
}

.key-hint {
  position: fixed;
  z-index: 3;
  right: 18px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(173, 214, 238, 0.26);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 220ms ease, right 280ms cubic-bezier(.4, 0, .2, 1);
}

.key-hint kbd {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(132, 195, 232, 0.13);
  border-radius: 50%;
  background: rgba(8, 24, 34, 0.45);
  color: rgba(210, 239, 255, 0.4);
  font: inherit;
}

#controls {
  --sh-bg: rgba(2, 8, 13, 0.93);
  --sh-border: rgba(100, 190, 242, 0.09);
  --sh-text: rgba(221, 244, 255, 0.9);
  --sh-text-dim: rgba(162, 210, 238, 0.46);
  --sh-text-mid: rgba(182, 224, 247, 0.66);
  --sh-surface: rgba(93, 182, 235, 0.08);
  --sh-surface-hover: rgba(100, 193, 249, 0.13);
  --sh-accent: rgba(110, 202, 255, 0.82);
  --sh-width: 304px;
}

#controls .sh-panel-body {
  padding-top: 4px;
}

body > .sh-panel-hint {
  display: none;
}

#controls .sh-slider input[type="range"]::-webkit-slider-thumb {
  background: #a9ddff;
  box-shadow: 0 0 9px rgba(69, 178, 255, 0.45);
}

#controls .sh-slider input[type="range"]::-moz-range-thumb {
  background: #a9ddff;
  box-shadow: 0 0 9px rgba(69, 178, 255, 0.45);
}

#controls .sh-switch input:checked + .sh-knob::after {
  background: #a9ddff;
}

.panel-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 19px 18px 8px;
  border-bottom: 1px solid rgba(97, 189, 255, 0.06);
  -webkit-user-select: none;
  user-select: none;
}

.panel-meta span {
  color: rgba(113, 195, 242, 0.42);
  font: 600 8px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.22em;
}

.panel-meta strong {
  color: rgba(222, 244, 255, 0.82);
  font-size: 15px;
  font-weight: 450;
  letter-spacing: -0.01em;
}

html:has(.sh-panel:not(.collapsed)) .key-hint {
  right: 320px;
  opacity: 0.46;
}

noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 200;
  color: #dff4ff;
  font-size: 12px;
}

@media (max-width: 720px) {
  .identity {
    top: 22px;
    left: 22px;
  }

  .identity__note {
    display: none;
  }

  .telemetry {
    left: 22px;
    bottom: 22px;
  }

  #controls {
    --sh-width: min(304px, 78vw);
    max-width: 78vw;
  }

  html:has(.sh-panel:not(.collapsed)) .key-hint {
    right: calc(min(304px, 78vw) + 10px);
    opacity: 0.72;
  }
}

@media (max-height: 620px) {
  .identity__note,
  .key-hint {
    display: none;
  }

  .identity {
    top: 18px;
  }

  .telemetry {
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telemetry__lamp,
  .key-hint {
    transition: none;
  }
}
