/* Flipper (Dr. Errors återkomst) – only what is special to this game (the shared box is css/game-stage.css). */

/* The table is tall, so on a phone held upright the box is taller than the usual 16:9 and the table gets bigger
   (see "Game pages = ONE SCREEN" in CLAUDE.md). */
@media (max-aspect-ratio: 1 / 1) {
  .stage {
    --aspect: 3 / 4;
  }

  /* The sound button under the fullscreen button (owner, 2026-10-22): the bottom is the flippers' and the plunger's */
  .stage .mute-button {
    top: calc(0.6rem + var(--safe-top) + 2.6rem + 0.5rem);
    bottom: auto;
  }
}

#game {
  outline: none;                 /* the canvas takes keyboard focus; no blue ring on the first click */
  -webkit-tap-highlight-color: transparent;
  touch-action: none;            /* fingers are flippers here, never scrolling */
}

.stage .overlay p {
  white-space: pre-line;         /* the result screen writes its lines with \n */
}

.stage .overlay p:empty {
  display: none;
}

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

/* ---------- The lab (?labb): the game and the panel side by side; on a phone the game stays at the top ---------- */

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

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

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

  .is-lab .site-header {
    position: static;
  }

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

.is-lab .section-narrow,
.is-lab #topplista {
  display: none;
}
