/* VK: Labyrint – the HUD, the menus and the touch controls over the 3D picture. The box, the corner buttons and the
   start screen's frame come from css/game-stage.css; the menus look like VK: Arena's (the same series). */

.lb-stage {
  cursor: default;
}

/* ---------- The HUD ---------- */

.lb-hud {
  align-items: flex-start;
}

.lb-tag {
  display: inline-block;
  padding: 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: var(--bg, #0e0a24);
  background: var(--lb-me, var(--cyan));
}

.lb-me strong {
  color: var(--yellow);
  font-size: 2.3rem;
  text-shadow: 0 0 12px rgba(255, 233, 77, 0.6);
}

.lb-time {
  font-size: 2.4rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(94, 240, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.lb-time.is-low {
  color: var(--magenta);
  animation: lb-blink 0.5s steps(2) infinite;
}

@keyframes lb-blink {
  to { opacity: 0.4; }
}

.lb-stage:not(.is-playing) .lb-hud,
.lb-stage:not(.is-playing) .lb-mirror,
.lb-stage:not(.is-playing) .lb-shield,
.lb-stage:not(.is-playing) .lb-ammo,
.lb-stage:not(.is-playing) .lb-dash,
.lb-stage:not(.is-playing) .lb-ranking {
  display: none;
}

/* the rear-view mirror: top middle; the picture is drawn under this frame by labyrint.js */
.lb-mirror {
  position: absolute;
  top: calc(0.5rem + var(--safe-top, 0px));
  left: 50%;
  width: calc(15rem * var(--ui, 1));
  height: calc(5rem * var(--ui, 1));
  transform: translateX(-50%);
  border: 2px solid rgba(94, 240, 255, 0.75);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.4);
  pointer-events: none;
}

/* the SHIELD: a tall turquoise bar on the RIGHT (Super Maze Wars' place; VK: Arena's shield colour) – the only
   protection. It glows white while you hold it up (E / Alt), and turns magenta when it can't take another shot. */
.lb-shield {
  position: absolute;
  right: calc(1rem + var(--safe-right, 0px));
  top: 24%;
  bottom: 24%;
  width: calc(1.5rem * var(--ui, 1));
  border: 3px solid rgba(34, 230, 176, 0.75);
  background: rgba(4, 6, 24, 0.6);
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.lb-shield-fill {
  width: 100%;
  height: 50%;
  background: #22e6b0;
  box-shadow: 0 0 10px rgba(34, 230, 176, 0.7);
}

/* Only the gradual drain while holding the shield is smoothed; a hit cancels it immediately. */
.lb-shield-fill.is-draining {
  transition: height 120ms linear;
}

.lb-shield.is-held {
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(34, 230, 176, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.lb-shield.is-held .lb-shield-fill {
  background: #b9fff0;
}

.lb-shield.is-low {
  border-color: var(--magenta);
}

.lb-shield.is-low .lb-shield-fill {
  background: var(--magenta);
  box-shadow: 0 0 10px rgba(255, 63, 180, 0.8);
}

/* the shots: the overheat light, then two columns of dots on the LEFT, as wide as the shield bar */
.lb-ammo {
  position: absolute;
  left: calc(1rem + var(--safe-left, 0px));
  top: 24%;
  bottom: 24%;
  width: calc(1.5rem * var(--ui, 1));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(0.4rem * var(--ui, 1));
  pointer-events: none;
}

.lb-heat {
  width: calc(1.3rem * var(--ui, 1));
  height: calc(1.3rem * var(--ui, 1));
  border-radius: 50%;
  background: #5fd04a;
  box-shadow: 0 0 10px rgba(95, 208, 74, 0.8);
}

.lb-heat.is-hot {
  background: #ff3b3b;
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.9);
}

.lb-ammo-dots {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--lb-ammo-count, 20), minmax(0, 1fr));
  column-gap: 3px;
}

.lb-ammo-dots span {
  width: 100%;
  align-self: center;
  border-radius: 50%;
  aspect-ratio: 1;
  background: rgba(255, 233, 77, 0.15);
}

.lb-ammo-dots span.is-full {
  background: var(--yellow);
  box-shadow: 0 0 5px rgba(255, 233, 77, 0.8);
}

/* the turn signals: a small arrow each side of the radar, lit while you turn (or a turn waits for its corner) */
.lb-signal {
  align-self: center;
  width: 0;
  height: 0;
  border-top: calc(0.7rem * var(--ui, 1)) solid transparent;
  border-bottom: calc(0.7rem * var(--ui, 1)) solid transparent;
  opacity: 0.2;
}

.lb-signal-left {
  border-right: calc(1rem * var(--ui, 1)) solid var(--yellow);
}

.lb-signal-right {
  border-left: calc(1rem * var(--ui, 1)) solid var(--yellow);
}

.lb-signal.is-on {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--yellow));
}

/* how close a Jägare chasing YOU is: fills red as it comes (and it beeps faster) */
.lb-proximity {
  align-self: stretch;
  width: calc(0.9rem * var(--ui, 1));
  margin-bottom: 0.3rem;
  border: 2px solid rgba(255, 59, 59, 0.6);
  background: rgba(4, 6, 24, 0.6);
  display: flex;
  align-items: flex-end;
}

.lb-proximity-fill {
  width: 100%;
  height: 0;
  background: #ff3b3b;
  box-shadow: 0 0 10px rgba(255, 59, 59, 0.8);
}

/* the dashboard: bottom middle */
.lb-dash {
  position: absolute;
  bottom: calc(0.6rem + var(--safe-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: calc(0.6rem * var(--ui, 1));
  pointer-events: none;
}

/* the radar: a half dome showing what is AHEAD (Super Maze Wars' place and shape) */
.lb-stage .lb-radar {
  width: calc(15rem * var(--ui, 1));
  height: calc(7.5rem * var(--ui, 1));
}

.lb-lights,
.lb-seekers {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}

/* THE KEYS on the HUD (owner, 2026-10-27): a small keycap under the Jägare ([Q]) and under the shield bar ([E]), in
   their colour – like the corner buttons' [F] [M] [P]. Only with a mouse, and never once a finger has been used. */
.lb-key {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .lb-stage:not(.is-touch) .lb-key {
    display: grid;
    place-items: center;
    align-self: center;
    min-width: calc(1.25rem * var(--ui, 1));
    height: calc(1.25rem * var(--ui, 1));
    padding: 0 0.2rem;
    font-family: var(--font-body);
    font-size: calc(0.75rem * var(--ui, 1));
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    color: #5fd04a;
    background: rgba(4, 6, 24, 0.75);
    border: 1px solid currentColor;
    border-radius: 0.2rem;
    box-shadow: 0 1px 0 currentColor;
  }

  .lb-stage:not(.is-touch) .lb-key-shield {
    position: absolute;
    left: 50%;
    top: 100%;
    margin-top: 0.45rem;
    transform: translateX(-50%);
    color: #22e6b0;
  }
}

/* the "fast" abilities and the Jägare left: a PICTURE each that is dim until you have it, then lights up in its
   colour with a pop (owner, 2026-10-20: "ikoner som lyser upp när den uppgraderingen är igång") */
.lb-light,
.lb-seeker {
  display: grid;
  place-items: center;
  width: calc(1.9rem * var(--ui, 1));
  height: calc(1.9rem * var(--ui, 1));
  border: 2px solid currentColor;
  border-radius: 0.3rem;
  opacity: 0.22;
}

.lb-light svg,
.lb-seeker svg {
  width: 78%;
  height: 78%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-seeker {
  width: calc(1.5rem * var(--ui, 1));
  height: calc(1.5rem * var(--ui, 1));
}

.lb-light[data-boost="turbo"] { color: #ff8a2b; }
.lb-light[data-boost="fast"] { color: #b06bff; }
.lb-light[data-boost="turn"] { color: #ff9ecb; }
.lb-seeker { color: #5fd04a; }

.lb-light.is-on,
.lb-seeker.is-on {
  opacity: 1;
  background: color-mix(in srgb, currentColor 22%, transparent);
  box-shadow: 0 0 10px currentColor, inset 0 0 8px color-mix(in srgb, currentColor 45%, transparent);
}

.lb-light.is-on svg,
.lb-seeker.is-on svg {
  filter: drop-shadow(0 0 4px currentColor);
}

.lb-seeker.is-on svg {
  fill: currentColor;
}

/* just picked up: it pops */
.lb-light.is-on {
  animation: lb-pop 0.6s ease-out;
}

@keyframes lb-pop {
  0% { transform: scale(1.9); }
  45% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* the standings: QUIET (owner, 2026-10-20: "Så mycket behöver inte spelarna synas, de kan va mindre och mindre
   tydliga") – a small mark in the craft's colour, its name dim, the points; bottom left */
.lb-ranking {
  position: absolute;
  left: calc(4.2rem + var(--safe-left, 0px));
  bottom: calc(0.6rem + var(--safe-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-weight: 800;
  font-style: italic;
  font-size: calc(0.85rem * var(--ui, 1));
  opacity: 0.6;
  pointer-events: none;
}

.lb-rank {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.lb-rank i {
  width: 0.5em;
  height: 0.9em;
  transform: skewX(-12deg);
}

.lb-rank b {
  min-width: 2.6em;
  color: var(--text-muted);
  font-weight: 800;
}

.lb-rank span {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.lb-rank.is-me b,
.lb-rank.is-me span {
  color: var(--text);
}

/* blown up: the picture glitches and the screen cracks (breakdown.js draws on this canvas over the 3D picture) */
.lb-stage .lb-breakdown {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* a hit: the screen's edge flashes magenta on the side the shot came from */
.lb-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
}

.lb-vignette.is-flash {
  opacity: 1;
  transition: none;
}

.lb-vignette.from-front { background: linear-gradient(to bottom, rgba(255, 63, 180, 0.7), transparent 30%); }
.lb-vignette.from-back { background: linear-gradient(to top, rgba(255, 63, 180, 0.7), transparent 30%); }
.lb-vignette.from-left { background: linear-gradient(to right, rgba(255, 63, 180, 0.7), transparent 30%); }
.lb-vignette.from-right { background: linear-gradient(to left, rgba(255, 63, 180, 0.7), transparent 30%); }
.lb-vignette.is-shield { background: radial-gradient(ellipse at center, transparent 50%, rgba(34, 230, 176, 0.55) 100%); }

.lb-big {
  position: absolute;
  left: 0;
  right: 0;
  top: 32%;
  margin: 0;
  text-align: center;
  font-style: italic;
  font-weight: 900;
  font-size: calc(2.6rem * var(--ui, 1));
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(255, 233, 77, 0.7), 0 2px 0 rgba(14, 10, 36, 0.8);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
}

.lb-big.is-shown {
  opacity: 1;
  transform: scale(1);
}

.lb-big.is-blue {
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(94, 240, 255, 0.8), 0 2px 0 rgba(14, 10, 36, 0.8);
}

.lb-note {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: calc(1.1rem * var(--ui, 1));
  color: var(--text);
  text-shadow: 0 1px 0 rgba(14, 10, 36, 0.9);
  pointer-events: none;
}

.lb-note:empty {
  display: none;
}

/* ---------- Touch ---------- */

.lb-touch {
  position: absolute;
  inset: 0;
  z-index: 2;
  touch-action: none;
}

.lb-touch[hidden] {
  display: none;
}

.lb-touch-move,
.lb-touch-turn {
  position: absolute;
  top: 0;
  bottom: 0;
}

.lb-touch-move {
  left: 0;
  width: 45%;
}

.lb-touch-turn {
  right: 0;
  width: 55%;
}

/* the left thumb's stick: rests faintly bottom left (so the thumb knows where), and is born where the thumb lands */
.lb-stick {
  position: absolute;
  left: calc(18% + 2rem + var(--safe-left, 0px));
  top: 66%;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(94, 240, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 240, 255, 0.04) 40%, rgba(94, 240, 255, 0.14));
  transform: translate(-50%, -50%);
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.15s;
}

.lb-stick.is-held {
  opacity: 0.9;
  transition: none;
}

.lb-stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(94, 240, 255, 0.3);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.6);
  transform: translate(-50%, -50%);
}

/* the buttons: a PICTURE each (owner, 2026-10-20: "Istället för Skjut, Sköld, Jägare så borde det vara ikoner"), placed
   clear of the shield bar on the right edge and of the sound button in the corner */
.lb-touch-button {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: rgba(14, 10, 36, 0.55);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lb-touch-button svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px currentColor);
}

.lb-touch-button .lb-fill,
.lb-touch-seek svg {
  fill: currentColor;
}

.lb-touch-fire {
  right: calc(3.8rem + var(--safe-right, 0px));
  bottom: calc(0.9rem + var(--safe-bottom, 0px));
  width: 5.2rem;
  height: 5.2rem;
  color: var(--yellow);
}

.lb-touch-seek {
  right: calc(9.6rem + var(--safe-right, 0px));
  bottom: calc(1.2rem + var(--safe-bottom, 0px));
  width: 3.8rem;
  height: 3.8rem;
  color: #5fd04a;
}

.lb-touch-shield {
  right: calc(4.5rem + var(--safe-right, 0px));
  bottom: calc(6.9rem + var(--safe-bottom, 0px));
  width: 3.8rem;
  height: 3.8rem;
  color: #22e6b0;
}

.lb-touch-button.is-down {
  background: currentColor;
}

.lb-touch-button.is-down svg {
  stroke: #0e0a24;
  filter: none;
}

.lb-touch-button.is-down .lb-fill,
.lb-touch-seek.is-down svg {
  fill: #0e0a24;
}

/* ---------- The menus (= VK: Arena's) ---------- */

.lb-overlay {
  z-index: 3;
}

.lb-stage .icon-button {
  z-index: 4;
}

.lb-overlay h2 {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(94, 240, 255, 0.6);
}

.lb-overlay p {
  margin-bottom: 1rem;
}

.lb-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 32rem);
}

.lb-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
}

.lb-label {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.lb-choice {
  font: inherit;
  font-weight: 800;
  padding: 0.35rem 0.8rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(94, 240, 255, 0.4);
  cursor: pointer;
}

.lb-choice.is-chosen {
  color: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 233, 77, 0.35);
}

.lb-choice:disabled {
  opacity: 0.5;
  cursor: default;
}

.lb-choice.is-sure {
  color: var(--magenta);
  border-color: var(--magenta);
}

.lb-keys {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.4rem 1rem;
  align-items: center;
  margin: 0;
  text-align: left;
}

.lb-keys dt {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.lb-keys dd {
  margin: 0;
  color: var(--text-muted);
}

.lb-key {
  display: inline-block;
  min-width: 1.8rem;
  padding: 0.15rem 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom-width: 4px;
  border-radius: 0.3rem;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lb-code {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.lb-code .picture {
  width: 3.4rem;
  height: 3.4rem;
}

.lb-code-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* the waiting room's crafts / the results: the craft's three colours, its P-number, its points */
.lb-players {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 22rem;
}

.lb-players li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(94, 240, 255, 0.2);
  text-align: left;
}

.lb-players li.is-you {
  color: var(--yellow);
}

.lb-players li.is-gone {
  opacity: 0.5;
}

.lb-swatch {
  display: flex;
  flex: none;
}

.lb-swatch i {
  width: 0.7rem;
  height: 1.1rem;
  transform: skewX(-12deg);
}

.lb-players .lb-name {
  flex: 1;
  font-weight: 900;
  font-style: italic;
}

.lb-players .lb-about {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lb-players .lb-score {
  font-weight: 900;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.lb-kick {
  font: inherit;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  color: var(--magenta);
  background: transparent;
  border: 2px solid rgba(255, 63, 180, 0.5);
  cursor: pointer;
}

/* the lobby's list of open rooms */
.lb-rooms {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 24rem;
}

.lb-room {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  font: inherit;
  font-weight: 800;
  padding: 0.45rem 0.8rem;
  color: var(--text);
  background: rgba(94, 240, 255, 0.07);
  border: 2px solid rgba(94, 240, 255, 0.5);
  cursor: pointer;
  text-align: left;
}

.lb-room:disabled {
  opacity: 0.45;
  cursor: default;
}

.lb-room .lb-free {
  color: var(--yellow);
}

.lb-empty {
  margin: 0;
  color: var(--text-muted);
}

.lb-open {
  margin: 0;
  color: #22e6b0;
  font-weight: 900;
}

.lb-status {
  margin: 0;
  color: var(--yellow);
  font-weight: 800;
}

.lb-privacy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lb-privacy a {
  color: var(--cyan);
}

.lb-pad .picture-pad {
  max-width: 17rem;
}

.lb-pad .picture-button {
  padding: 0.4rem;
}

.lb-about {
  max-width: 60rem;
  margin: 0.5rem auto 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 600px) and (orientation: portrait) {
  .lb-stage {
    --aspect: 3 / 4;
  }

  /* a phone held upright: the dashboard goes up under the mirror and smaller – the bottom is for the thumbs (it was
     wider than the box and lay under every button) */
  .lb-dash {
    top: calc(6rem + var(--safe-top, 0px));
    bottom: auto;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .lb-stage .lb-radar {
    width: 9rem;
    height: 4.5rem;
  }

  .lb-light {
    width: 1.35rem;
    height: 1.35rem;
  }

  .lb-seeker {
    width: 1.05rem;
    height: 1.05rem;
  }

  .lb-lights,
  .lb-seekers {
    gap: 0.15rem;
    margin-bottom: 0;
  }

  /* (the shots' dots and the shield bar start under the dashboard) */
  .lb-ammo,
  .lb-shield {
    top: calc(11rem + var(--safe-top, 0px));
  }
}

/* a low box (a phone held sideways): the HUD smaller, so the corridor ahead stays clear */
@media (max-height: 500px) {
  .lb-stage .lb-radar {
    width: 6rem;
    height: 3rem;
  }

  .lb-mirror {
    width: 7rem;
    height: 2.4rem;
  }

  .lb-me strong,
  .lb-time {
    font-size: 1.5rem;
  }

  .lb-tag {
    font-size: 1rem;
  }

  .lb-shield,
  .lb-ammo {
    width: 0.8rem;
  }

  .lb-shield {
    border-width: 2px;
  }

  .lb-ammo-dots {
    column-gap: 2px;
  }

  .lb-heat {
    width: 0.8rem;
    height: 0.8rem;
  }

  .lb-light {
    width: 1.35rem;
    height: 1.35rem;
  }

  .lb-seeker {
    width: 1.05rem;
    height: 1.05rem;
  }

  .lb-ranking {
    left: 3.2rem;
    font-size: 0.68rem;
  }
}

/* On wider screens, move the edge HUD inward. Increase this one value for more room at the sides. */
@media (min-width: 900px) {
  .lb-stage {
    --lb-hud-inset: 16%;
  }

  .lb-hud {
    left: calc(4.25rem + var(--safe-left, 0px) + var(--lb-hud-inset));
    right: calc(4.25rem + var(--safe-right, 0px) + var(--lb-hud-inset));
  }

  .lb-ammo {
    left: calc(1rem + var(--safe-left, 0px) + var(--lb-hud-inset));
  }

  .lb-shield {
    right: calc(1rem + var(--safe-right, 0px) + var(--lb-hud-inset));
  }

  .lb-ranking {
    left: calc(4.2rem + var(--safe-left, 0px) + var(--lb-hud-inset));
  }
}

/* ---------- The lab (?labb, lab.js): the game and the panel side by side; on a phone the game stays at the top while
   the panel scrolls under it (the panel's own look is in lab.css) ---------- */

.lb-lab-host:empty {
  display: none;
}

/* a 3D picture wants width: the lab page is wider than the site's page width (the panel takes 22 rem of it) */
.is-lab .game-main {
  --page-width: 1600px;
}

.is-lab .lb-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
  gap: 1rem;
  align-items: start;
}

.is-lab .lb-play .stage {
  --room: calc(var(--window-height) - var(--stage-top) - 1rem);
  position: sticky;
  top: 3.2rem;
}

@media (max-width: 760px) {
  .is-lab .lb-play {
    display: block;
  }

  /* the site's top bar scrolls away here, or the game box would slide in under it */
  .is-lab .site-header {
    position: static;
  }

  .is-lab .lb-play .stage {
    --room: 54svh;
    top: 0;
    z-index: 20;
    margin-inline: auto;
  }
}

/* the lab is for grown-ups: no help text under it */
.is-lab .lb-about {
  display: none;
}
