/* Threadline: a control room for a single molecule. Builds on arcade-kit/arcade.css. */
:root {
  --steel: #222039;
  --deep: #0e0d1c;
  --card: #1b1930;
  --line: #ffffff14;
  --blue: #00a6ff;
  --pink: #ff5eed;
  --mint: #c6fad9;
  --mauve: #cda9f6;
  --sky: #5de4ff;
  --orange: #ffaa4b;
  --emerald: #2ed47a;
  --muted: #b3b5cf;
  --acid: #5de4ff;
  background: var(--deep);
}
body {
  overflow: hidden;
  background: var(--deep);
}
.experiment-chip {
  font: 600 10px Inter;
  letter-spacing: 0.14em;
  color: var(--mauve);
  padding: 6px 10px;
  border: 1px solid #cda9f63a;
  border-radius: 20px;
  white-space: nowrap;
}
.console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  height: calc(100dvh - 62px - 38px);
  min-height: 420px;
}
.scope {
  position: relative;
  overflow: hidden;
  background: #0b0a17;
  isolation: isolate;
}
#board {
  outline-offset: -4px;
}
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.hud {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 2px 0 #06051a;
}
.hud-left {
  top: 16px;
  left: 18px;
}
.hud-left small,
.hud-right small {
  display: block;
  font: 600 9px Inter;
  letter-spacing: 0.18em;
  color: #cbc6ea;
}
.hud-left strong {
  display: block;
  font: 700 22px Poppins;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 2px;
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 5px 10px 5px 8px;
  border-radius: 20px;
  background: #1a1830d9;
  border: 1px solid #ffaa4b55;
  font: 600 10px Inter;
  letter-spacing: 0.12em;
  color: #ffd7a8;
}
.step-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.hud-right {
  top: 16px;
  right: 18px;
  display: flex;
  gap: 22px;
  text-align: right;
}
.hud-right strong {
  display: block;
  font: 700 28px Poppins;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hud-right strong.late {
  color: #ff8c7a;
}
.guidance {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 18px;
  max-width: min(440px, 62%);
  padding: 10px 14px 11px 13px;
  border-left: 3px solid var(--sky);
  border-radius: 6px 12px 12px 6px;
  background: #15132ad9;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.guidance strong {
  display: block;
  font: 600 13.5px Inter;
  color: #eaf7ff;
}
.guidance span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: #c9cbe3;
  margin-top: 3px;
}
.guidance[data-tone="warn"] {
  border-left-color: var(--orange);
}
.guidance[data-tone="good"] {
  border-left-color: var(--mint);
}
.dispense {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #15132ad9;
  border: 1px solid #00a6ff44;
  pointer-events: none;
  font: 600 10px Inter;
  letter-spacing: 0.12em;
  color: #bfe6ff;
}
.dispense strong {
  font: 700 22px Poppins;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 2.2ch;
  text-align: center;
}
.dispense em {
  font-style: normal;
  color: var(--sky);
  letter-spacing: 0.04em;
  font-size: 11px;
}
.dispense.soon {
  border-color: var(--orange);
}
.dispense.soon strong {
  color: var(--orange);
}
.announcement {
  font-style: normal;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow:
    0 3px 0 #1a1244,
    0 0 40px #8152f288;
}
/* Projected elements follow the 3D scene. */
.lane-tab {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 20px;
  background: #16142bd9;
  border: 1px solid #ffffff2a;
  font: 600 10px Inter;
  letter-spacing: 0.12em;
  color: #d5d3ea;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}
.lane-tab i {
  width: 14px;
  height: 10px;
  background:
    linear-gradient(#8f8bb1, #8f8bb1) 0 0 / 100% 2px no-repeat,
    linear-gradient(#8f8bb1, #8f8bb1) 0 4px / 100% 2px no-repeat,
    linear-gradient(#8f8bb1, #8f8bb1) 0 8px / 100% 2px no-repeat;
}
.lane-tab[aria-pressed="true"] {
  border-color: var(--sky);
  background: #0f2a3fe6;
  color: #e8fbff;
}
.lane-tab[aria-pressed="true"] i {
  background:
    linear-gradient(var(--blue), var(--blue)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--mint), var(--mint)) 0 4px / 100% 2px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 0 8px / 100% 2px no-repeat;
}
.lane-tab.done {
  border-color: #c6fad966;
  color: #d8ffe8;
}
.lane-tab.gated {
  border-color: #ff5eed66;
  color: #ffb9f6;
  text-decoration: line-through;
}
.hold-ring {
  position: absolute;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: conic-gradient(var(--mint) calc(var(--p) * 1%), #ffffff22 0);
  -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px);
  mask: radial-gradient(circle, transparent 17px, #000 18px);
  filter: drop-shadow(0 0 6px #c6fad9aa);
}
.hold-ring.pulse {
  background: conic-gradient(var(--sky) calc(var(--p) * 1%), #ffffff22 0);
}
.word {
  position: absolute;
  transform: translate(-50%, -50%);
  font: 700 13px Poppins;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow:
    0 2px 0 #06051a,
    0 0 14px currentColor;
  transition: none;
}
.word.small {
  font: 600 10px Inter;
  letter-spacing: 0.12em;
}
/* Instrument rail */
.rail {
  overflow: auto;
  padding: 12px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #141327;
  border-left: 1px solid #a693d82b;
  scrollbar-width: thin;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px 13px;
}
.card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card h2 {
  font: 700 12px Poppins;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e7e4ff;
}
.state-chip {
  font: 600 10px Inter;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 12px;
  background: #ffffff0a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.state-chip.blue {
  color: #bfe6ff;
  background: #00a6ff22;
}
.state-chip.pink {
  color: #ffc7f7;
  background: #ff5eed22;
}
.state-chip.mint {
  color: #d9ffe9;
  background: #c6fad922;
}
.state-chip.orange {
  color: #ffe0bb;
  background: #ffaa4b22;
}
.presets {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}
.preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 66px;
  padding: 8px 4px;
  background: #24223b;
  border-color: #ffffff1c;
}
.preset i {
  width: 22px;
  height: 14px;
  background:
    linear-gradient(#6f6c8f, #6f6c8f) 0 0 / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 5.5px / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 11px / 100% 3px no-repeat;
  border-radius: 2px;
}
.preset b {
  font: 700 12px Poppins;
}
.preset small {
  font: 500 9px Inter;
  letter-spacing: 0.1em;
  color: #9b98ba;
}
.preset.up[aria-pressed="true"] {
  border-color: var(--pink);
  background: #3a1d3a;
}
.preset.up[aria-pressed="true"] i {
  background:
    linear-gradient(#6f6c8f, #6f6c8f) 0 0 / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 5.5px / 100% 3px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 0 11px / 100% 3px no-repeat;
  filter: drop-shadow(0 0 5px var(--pink));
}
.preset.down[aria-pressed="true"] {
  border-color: var(--blue);
  background: #0f2a45;
}
.preset.down[aria-pressed="true"] i {
  background:
    linear-gradient(var(--blue), var(--blue)) 0 0 / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 5.5px / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 11px / 100% 3px no-repeat;
  filter: drop-shadow(0 0 5px var(--blue));
}
.preset.hold[aria-pressed="true"] {
  border-color: var(--mint);
  background: #163829;
}
.preset.hold[aria-pressed="true"] i {
  background:
    linear-gradient(#6f6c8f, #6f6c8f) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--mint), var(--mint)) 0 5.5px / 100% 3px no-repeat,
    linear-gradient(#6f6c8f, #6f6c8f) 0 11px / 100% 3px no-repeat;
  filter: drop-shadow(0 0 5px var(--mint));
}
.oscillate {
  width: 100%;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  background: linear-gradient(105deg, #1f2c4a, #2c2350);
  border-color: #8152f266;
}
.oscillate svg {
  width: 34px;
  height: 14px;
  overflow: visible;
}
.oscillate b {
  font: 700 12px Poppins;
}
.oscillate small {
  font: 500 9px Inter;
  letter-spacing: 0.1em;
  color: #b9b3d8;
}
.oscillate.active {
  border-color: var(--sky);
  box-shadow: 0 0 18px #5de4ff44;
}
.oscillate.active svg path {
  stroke: var(--sky);
}
.dial {
  margin-top: 12px;
}
.dial label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 11px Inter;
  letter-spacing: 0.06em;
  color: #d9d6ef;
}
.dial output {
  font: 700 13px Poppins;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.dial em {
  font: 600 9px Inter;
  letter-spacing: 0.14em;
  font-style: normal;
  color: var(--orange);
  margin-left: auto;
  margin-right: 8px;
}
.dial-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.dial-row button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 18px;
  border-radius: 8px;
}
.dial-row input {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  height: 38px;
  background: transparent;
  cursor: ew-resize;
  touch-action: pan-y;
}
.dial-row input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2d2b46, var(--blue));
}
#field::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--pink), #2d2b46 50%, var(--blue));
}
.dial-row input::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1c1a31;
  box-shadow: 0 0 0 2px #ffffff55;
}
.dial-row input::-moz-range-track {
  height: 6px;
  border-radius: 4px;
  background: #2d2b46;
}
.dial-row input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1c1a31;
}
.dial-row input:disabled {
  opacity: 0.45;
  cursor: default;
}
.ends {
  display: flex;
  justify-content: space-between;
  margin: 1px 44px 0;
  font: 500 9px Inter;
  letter-spacing: 0.08em;
  color: #8e8bb0;
}
.program {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 10px Inter;
  letter-spacing: 0.12em;
  color: #ffd7a8;
}
.program div {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: #ffffff12;
  overflow: hidden;
}
.program i {
  display: block;
  height: 100%;
  background: var(--orange);
}
.lane-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.lane-tabs button {
  flex: 1;
  min-height: 34px;
  padding: 4px;
  font: 600 10px Inter;
  letter-spacing: 0.1em;
}
.lane-tabs button[aria-pressed="true"] {
  border-color: var(--sky);
  background: #0f2a3f;
}
.lane-tabs button.gated {
  text-decoration: line-through;
  color: #ffb9f6;
}
.strand {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.strand span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #2b2945;
  position: relative;
}
.strand span.done {
  box-shadow: 0 0 10px currentColor;
}
.fragments {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}
.fragment {
  min-height: 70px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #24223b;
}
.fragment strong {
  font: 700 17px Poppins;
  letter-spacing: 0.1em;
}
.fragment span {
  font: 500 10px Inter;
  color: #c3c0dc;
}
.fragment.needed {
  border-color: currentColor;
  background: #2b2a48;
  box-shadow: inset 0 0 0 1px currentColor;
}
.fragment.needed span {
  color: #fff;
}
.hint {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 9px;
  min-height: 2.9em;
}
.hold-bar {
  height: 6px;
  border-radius: 4px;
  background: #ffffff12;
  overflow: hidden;
  margin-top: 8px;
}
.hold-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}
.gate {
  width: 100%;
  margin-top: 9px;
  min-height: 36px;
  font-size: 12px;
  background: #2b1c33;
  border-color: #ff5eed55;
  color: #ffd2f8;
}
.steps {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 5px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 500 11.5px Inter;
  color: #8f8cb0;
  padding: 3px 0;
}
.steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #5d5a7c;
  flex: none;
}
.steps li.done {
  color: #c6d9cd;
}
.steps li.done::before {
  background: var(--mint);
  border-color: var(--mint);
}
.steps li.current {
  color: #fff;
  font-weight: 600;
}
.steps li.current::before {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  animation: pulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .step-chip::before,
  .steps li.current::before {
    animation: none;
  }
}
.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.actions-row .primary {
  grid-column: 1 / -1;
}
.trace-card svg {
  display: block;
  width: 100%;
  height: 74px;
  border-radius: 8px;
  background: #0f0e1f;
}
.trace-card .legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font: 500 9px Inter;
  letter-spacing: 0.1em;
  color: #8e8bb0;
}
.game-footer {
  height: 38px;
  padding: 0 18px;
}
.game-footer kbd,
.guide-keys kbd {
  font: 600 10px Inter;
  padding: 1px 5px;
  border: 1px solid #ffffff2e;
  border-radius: 4px;
  background: #ffffff0a;
}
/* Dialogs */
#intro.dialog {
  width: min(900px, calc(100vw - 28px));
  margin: auto;
  padding: 30px 32px 26px;
  background: #1a1830f2;
}
#intro::backdrop {
  background: #0906178c;
  backdrop-filter: none;
}
#intro h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  margin-top: 10px;
}
#intro .lede {
  margin: 12px 0 18px;
  max-width: 640px;
}
.levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 9px;
}
.level {
  text-align: left;
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  min-height: 118px;
  background: #24223b;
  border-color: #ffffff1c;
  align-content: start;
}
.level small {
  font: 600 9px Inter;
  letter-spacing: 0.16em;
  color: var(--mauve);
}
.level strong {
  font: 700 15px Poppins;
  letter-spacing: -0.02em;
}
.level span {
  font: 400 11px Inter;
  line-height: 1.4;
  color: #c3c0dc;
}
.level .meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font: 600 10px Inter;
  color: #8e8bb0;
  font-variant-numeric: tabular-nums;
}
.level .stars-row {
  color: var(--orange);
  letter-spacing: 2px;
}
.level.next {
  border-color: var(--sky);
  box-shadow: 0 0 0 1px #5de4ff55;
}
.level.next small::after {
  content: " · NEXT UP";
  color: var(--sky);
}
.level.endless {
  background: linear-gradient(135deg, #24223b, #2c1f45);
}
.intro-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}
#intro .intro-foot .smallprint {
  margin: 0;
}
/* The way out of the picker, lettered like the top bar's ARCADE label. */
.intro-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 10px Inter;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  color: #c3b5de;
}
.stars-big {
  font: 700 30px Poppins;
  letter-spacing: 6px;
  color: var(--orange);
  margin: 6px 0 2px;
}
.stars-big span {
  opacity: 0.22;
}
.lab-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff08;
  border-left: 3px solid var(--mauve);
  font-size: 12px;
  line-height: 1.6;
  color: #d5d1ea;
}
.lab-note b {
  display: block;
  font: 600 9px Inter;
  letter-spacing: 0.16em;
  color: var(--mauve);
  margin-bottom: 4px;
}
.guide-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #d5d1ea;
}
.guide-steps b {
  color: #fff;
}
.guide-keys {
  line-height: 2;
}
/* The Guide opens on its heading, so it starts at the top and Space can't toggle the
   low-power setting. The heading is a focus target, not a control. */
#guide-title:focus {
  outline: none;
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
  min-height: 44px;
}
.setting input {
  width: 22px;
  height: 22px;
  accent-color: var(--sky);
}
.notebook {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff08;
  font-size: 13px;
  line-height: 1.6;
  color: #d5d1ea;
}
.notebook b {
  color: var(--mint);
}
/* Layout adaptations */
/* Short desktop windows and landscape phones: compact the rail so the protocol actions
   (Wash, Verify, Release) sit above its fold. The end labels repeat the dial names. */
@media (min-width: 821px) and (max-height: 820px) {
  .rail {
    padding: 10px 10px 12px;
    gap: 8px;
  }
  .card {
    padding: 10px 12px;
  }
  .card > header {
    margin-bottom: 7px;
  }
  /* Electrode lines beside the name and key instead of above them. */
  .preset {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    justify-content: center;
    align-items: center;
    column-gap: 8px;
    row-gap: 1px;
    min-height: 44px;
    padding: 5px 4px;
  }
  .preset i {
    grid-row: 1 / 3;
  }
  .preset b,
  .preset small {
    justify-self: start;
  }
  .oscillate {
    min-height: 36px;
    margin-top: 6px;
  }
  /* Each dial on one line: its name and value, then the control. */
  .dial {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
  }
  .dial label {
    flex-direction: column;
    align-items: flex-start;
    width: 54px;
  }
  .dial em {
    margin: 0;
  }
  .dial-row {
    flex: 1;
    margin-top: 0;
  }
  .dial-row button {
    height: 32px;
    min-height: 32px;
  }
  .dial-row input {
    height: 32px;
  }
  .ends {
    display: none;
  }
  .program {
    margin-top: 8px;
  }
  .lane-tabs {
    margin-bottom: 8px;
  }
  .lane-tabs button {
    min-height: 30px;
  }
  .strand {
    margin-bottom: 8px;
  }
  .fragment {
    min-height: 52px;
    padding: 5px 4px;
    gap: 2px;
  }
  .hint {
    min-height: 0;
    margin-top: 6px;
  }
  .hold-bar {
    margin-top: 6px;
  }
  .gate {
    min-height: 32px;
    margin-top: 7px;
  }
  .steps {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin-bottom: 8px;
  }
  .steps li {
    gap: 6px;
    padding: 1px 0;
  }
  .actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .actions-row button {
    flex: 1 1 auto;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
}
/* Landscape phones: the console fills the screen under the top bar instead of pushing the
   page (and the bar) out of view. */
@media (min-width: 821px) and (max-height: 520px) {
  .console {
    height: calc(100dvh - 62px);
    min-height: 0;
  }
  .game-footer {
    display: none;
  }
}
@media (max-width: 1080px) {
  .console {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .hud-left strong {
    font-size: 19px;
  }
  .hud-right strong {
    font-size: 24px;
  }
}
@media (max-width: 820px) {
  body {
    overflow: auto;
  }
  .console {
    display: block;
    height: auto;
    min-height: 0;
  }
  .scope {
    height: 54vh;
    min-height: 320px;
  }
  .rail {
    border-left: 0;
    border-top: 1px solid #a693d82b;
  }
  .guidance {
    max-width: calc(100% - 36px);
    bottom: 12px;
    left: 12px;
  }
  .dispense {
    bottom: 12px;
    right: 12px;
  }
  .hud-left {
    top: 12px;
    left: 12px;
  }
  .hud-right {
    top: 12px;
    right: 12px;
    gap: 14px;
  }
  .hud-right strong {
    font-size: 22px;
  }
  .experiment-chip {
    display: none;
  }
  .game-footer .key-help {
    display: none;
  }
  /* The projected channel tabs sit where the step chip would be. */
  .step-chip {
    display: none;
  }
  .hud-left strong {
    font-size: 18px;
  }
  #intro.dialog {
    padding: 22px 18px;
  }
}
/* Phones and landscape phones: the next-dispense card stacks in the bottom-right corner,
   clear of the channel tabs, and the guidance makes room for it. The projected tabs drop
   their icon so neighbouring channels' tabs don't overlap. */
@media (max-width: 820px), (max-height: 520px) {
  .lane-tab {
    padding: 5px 9px;
  }
  .lane-tab i {
    display: none;
  }
  .dispense {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 6px 10px 7px;
    font-size: 9px;
  }
  .dispense strong {
    font-size: 19px;
    min-width: 0;
  }
  .dispense em {
    font-size: 10px;
  }
  .scope:has(> .dispense:not([hidden])) .guidance {
    max-width: calc(100% - 145px);
  }
}
/* Landscape phones: the result fits on one screen, buttons and personal best included. */
@media (max-height: 500px) and (min-width: 601px) {
  .stars-big {
    font-size: 22px;
    margin: 2px 0 0;
  }
  .dialog .lede {
    font-size: 14px;
    margin: 4px 0 0;
  }
  .dialog .result-grid {
    margin: 8px 0;
  }
  .notebook {
    margin-top: 0;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.5;
  }
  .dialog .actions {
    margin-top: 12px;
  }
  .dialog .smallprint {
    margin-top: 8px;
  }
}
/* 320px phones: the logo and title share the bar with three buttons, and the projected
   channel tabs would cover the experiment name and the clock (the rail has the same tabs). */
@media (max-width: 359px) {
  .arcade-back img {
    width: 50px;
  }
  .brand-group {
    gap: 6px;
  }
  .game-title {
    font-size: 11px;
  }
  .top-actions {
    gap: 4px;
  }
  .lane-tab {
    display: none;
  }
}
@media (hover: none) and (pointer: coarse) {
  .preset small,
  .oscillate small {
    display: none;
  }
}
