/* Bubbelskott – only what is special to this game (the shared box is css/game-stage.css). */

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

#game {
  outline: none;                 /* the canvas takes keyboard focus; no blue ring on the first click */
  -webkit-tap-highlight-color: transparent;
  cursor: crosshair;
}

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

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

.bs-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 while the
   panel scrolls under it ---------- */

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

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

@media (max-width: 760px) {
  .is-lab .bs-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 .bs-play .stage {
    --room: 54svh;
    top: 0;
    z-index: 20;
    margin-inline: auto;
  }
}

/* the lab is for grown-ups: no help text or list under it */
.is-lab .section-narrow,
.is-lab #topplista {
  display: none;
}

/* The start screen lies over the demo playing by itself (bubbelskott.js startDemo): a little lighter than the games'
   usual overlay, so the demo shows through, while the title and the buttons stay readable */
.bs-play .overlay {
  background: rgba(14, 10, 36, 0.6);
}

/* The owner's logo on the start screen (index.html #overlay-logo): the h2 is hidden while it shows */
.bs-logo {
  display: block;
  width: min(26rem, 90%);
  height: auto;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 0 14px rgba(94, 240, 255, 0.35));
}

.overlay.has-logo > #overlay-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.overlay:not(.has-logo) > .bs-logo {
  display: none;
}
