/* ================================================
   Goo splash — the shop's intro screen (see inc/goo-splash.php and
   js/goo-splash.js). Hidden unless <html> has .tomo-splash-on.
   The "enter" button is drawn in the goo itself; the real <button> is an
   invisible hit area over that blob (for keyboard + screen readers).
   ================================================ */

.tomo-splash { display: none; }

html.tomo-splash-on,
html.tomo-splash-on body { overflow: hidden !important; }

html.tomo-splash-on .tomo-splash {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100000;              /* above the nav, code buddy, confetti, lightbox */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #fff;
  cursor: pointer;
}
/* Leaving: with WebGL the canvas takes over painting the white (and opens a
   window in it), so the CSS white goes at once; without WebGL it fades. */
html.tomo-splash-on .tomo-splash.is-leaving { background-color: transparent; pointer-events: none; }
.tomo-splash.no-gl { transition: background-color 0.5s ease; }
.tomo-splash.no-gl.is-leaving .tomo-splash-stage { opacity: 0; transition: opacity 0.3s ease; }

/* Design box: 600 × 750 units — the splat on top, the word below
   (keep in step with STAGE_H / TOP_PAD / ENTER_Y in the JS). */
.tomo-splash-stage {
  position: relative;
  width: min(86vw, 68vh, 580px);
  aspect-ratio: 600 / 750;
  flex: none;
}

.tomo-splash canvas {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

/* Invisible hit area over the word (centred at design y ~686 of 750, ~340 × 110 units) */
.tomo-splash-enter {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 91.5%;
  width: 57%;
  height: 15%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tomo-splash-enter:focus { outline: none; }
.tomo-splash-enter:focus-visible { outline: 3px dashed #ff4b9e; outline-offset: 6px; }
.tomo-splash-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── No WebGL: a plain pink logo blob + a pink "enter" pill ── */
.tomo-splash-fallback { display: none; }
.tomo-splash.no-gl .tomo-splash-fallback {
  display: block;
  position: absolute;
  left: 6%;
  top: 3%;
  width: 88%;
  height: 72%;
  object-fit: contain;
  padding: 10%;
  box-sizing: border-box;
  background: #ff4b9e;
  border-radius: 48% 52% 50% 46% / 50% 46% 54% 50%;
  filter: none;
}
.tomo-splash.no-gl .tomo-splash-enter {
  height: 13%;
  background: #ff4b9e;
  border-radius: 999px;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
}
.tomo-splash.no-gl .tomo-splash-label {
  position: static;
  width: auto; height: auto;
  clip: auto;
}

@media (prefers-reduced-motion: reduce) {
  .tomo-splash.no-gl { transition-duration: 0.2s; }
}
