/* Drippy 3D — flat bright kid aesthetic, touch-first, no fonts/images fetched.
   Visual language borrowed from Gobble v5's style.css, trimmed to this toy. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: "Trebuchet MS", "Comic Sans MS", Verdana, sans-serif;
  /* soft sky gradient: the WebGL canvas has a transparent clear color, so the
     sky the kid sees above the ocean IS this gradient (zero draw cost). */
  background: linear-gradient(180deg, #7cc8f7 0%, #aee3ff 55%, #d8f4ff 100%);
  touch-action: none; -webkit-user-select: none; user-select: none;
  overscroll-behavior: none;
}
#game3d { position: fixed; inset: 0; display: block; touch-action: none; z-index: 2; }
/* sky mood tints: below the alpha canvas (z-index 1 < 2) so they only tint the
   sky showing through the transparent clear color, never the 3D scene itself */
#warmTint, #stormTint { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
#warmTint { background: linear-gradient(180deg, rgba(255,166,64,.68) 0%, rgba(255,200,110,.38) 55%, rgba(255,225,160,.2) 100%); }
#stormTint { background: linear-gradient(180deg, rgba(70,86,105,.65) 0%, rgba(110,126,146,.4) 55%, rgba(140,154,170,.25) 100%); }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 14px; z-index: 8;
  display: flex; gap: 10px;
}
.pillBtn {
  width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #2b6a9b; font-size: 26px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.pillBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.pillBtn.off { opacity: .45; }

/* ---------- stage banner ---------- */
#banner {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  max-width: 72vw; padding: 12px 30px; border-radius: 28px;
  background: #ffffff; color: #2b3a55;
  border-bottom: 4px solid #00a6c4; /* per-stage accent, set in main.js showPrompt */
  font-size: clamp(20px, 3.6vmin, 36px); font-weight: 900; text-align: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
  transition: transform .25s ease, opacity .25s ease;
  z-index: 7; pointer-events: none;
}
#banner.pop { animation: bannerPop .45s ease-out; }
@keyframes bannerPop { 0% { transform: translateX(-50%) scale(.6); opacity: 0; }
                       60% { transform: translateX(-50%) scale(1.08); opacity: 1; }
                       100% { transform: translateX(-50%) scale(1); } }

/* ---------- cycle wheel (4 icons, current stage highlighted, no numbers) ---------- */
#cycleWheel {
  position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 7;
  padding: 12px 10px; border-radius: 26px;
  background: rgba(255,255,255,.55);
  pointer-events: none;
}
.cycIcon {
  width: 44px; height: 44px; color: #6f93b4;
  transition: color .3s ease, transform .3s ease;
}
.cycIcon.on { color: #ff9f1c; transform: scale(1.25); }
#cyc-cloud.on, #cyc-rain.on { color: #5b8def; }
#cyc-wave.on { color: #00a6c4; }

/* ---------- phone: keep the stage banner clear of the topbar pills when
   the app runs full-screen in portrait ---------- */
@media (max-width: 768px) {
  #banner { top: calc(76px + env(safe-area-inset-top)); }
}


/* ---------- warm meter: appears while Drippy heads for the sun ---------- */
#warmMeter { position: fixed; left: 50%; top: calc(188px + env(safe-area-inset-top)); transform: translateX(-50%) scale(.9); opacity: 0; pointer-events: none; z-index: 6;
  padding: 8px 18px 10px; border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 4px 0 rgba(0,0,0,.15); text-align: center; transition: opacity .3s, transform .3s; min-width: 190px; }
#warmMeter.show { opacity: 1; transform: translateX(-50%) scale(1); }
#warmMeter span { display: block; font-weight: 900; font-size: 18px; color: #c2560a; }
#warmMeter .bar { height: 12px; margin-top: 6px; border-radius: 8px; background: #dfeaf3; overflow: hidden; }
#warmMeter .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7ad3ff, #ffd43b, #ff8a3d); transition: width .15s; }
