/* common.css — shared look for the gib kids' games.
 * Load before the game's own style.css:  <link rel="stylesheet" href="../common.css">
 * App-like: full screen, no scroll, no text selection, big touch targets. */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1e3a;
  /* Disable browser touch gestures (scroll/zoom) so they don't fight the game. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hidden { display: none !important; }

button { font-family: inherit; cursor: pointer; }

/* Full-screen overlay (title screen, dialogs). Respects iPad safe areas. */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(11, 30, 58, 0.85);
  color: #fff;
  text-align: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  z-index: 20;
}
.overlay h1 { font-size: clamp(32px, 9vw, 72px); }
.overlay p  { font-size: clamp(18px, 4.5vw, 32px); opacity: 0.9; }

/* Big, finger-friendly button. ~44px is Apple's min touch target; we go bigger. */
.big-btn {
  font-size: clamp(24px, 6vw, 40px);
  padding: 20px 48px;
  min-width: 200px;
  min-height: 72px;
  border: none;
  border-radius: 999px;
  background: #ffd54f;
  color: #5d4037;
  font-weight: 700;
  box-shadow: 0 6px 0 #f9a825;
  transition: transform 0.05s ease;
}
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #f9a825; }
.big-btn.secondary { background: #eceff1; color: #607d8b; box-shadow: 0 6px 0 #cfd8dc; }
.big-btn.secondary:active { box-shadow: 0 2px 0 #cfd8dc; }

/* Round icon button (emoji inside, so no reading needed). */
.ctrl-btn {
  width: 64px;
  height: 64px;
  font-size: 30px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.on { background: #ffe082; box-shadow: 0 0 0 3px #ffb300, 0 3px 8px rgba(0, 0, 0, 0.2); }

/* White card centered on an overlay. */
.dialog {
  background: #fff;
  color: #37474f;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 280px;
  max-width: 90vw;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.dialog h2 { font-size: clamp(20px, 5vw, 32px); text-align: center; }
.dialog-buttons { display: flex; gap: 14px; justify-content: center; }
.dialog .big-btn {
  min-width: 120px;
  min-height: 56px;
  padding: 14px 24px;
  font-size: clamp(18px, 4.5vw, 26px);
}

/* GIB.toast() */
.gib-toast {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(0.6);
  padding: 18px 34px;
  border-radius: 999px;
  background: #fff;
  color: #5d4037;
  font-size: clamp(24px, 6vw, 40px);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
.gib-toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
