/* ============================================================
   Magic Garden — Games CSS
   Quiz, Fireflies, Musical Flowers, Seed Counter HUD
   ============================================================ */

/* ── Keyframe re-declarations (used across all game screens) ── */
@keyframes treeSway     { 0%,100%{transform:rotate(-1.5deg)} 50%{transform:rotate(1.5deg)} }
@keyframes sway         { 0%,100%{transform:rotate(-4deg)}   50%{transform:rotate(4deg)}   }
@keyframes beeDrift     { 0%,100%{transform:translate(0,0) rotate(0deg)} 25%{transform:translate(30px,-20px) rotate(15deg)} 75%{transform:translate(-20px,15px) rotate(-10deg)} }
@keyframes butterflyFloat {
  0%  {transform:translate(0,0)      scaleX(1);}
  20% {transform:translate(40px,-25px) scaleX(1);}
  40% {transform:translate(80px,10px)  scaleX(-1);}
  60% {transform:translate(40px,-15px) scaleX(-1);}
  80% {transform:translate(-20px,5px)  scaleX(1);}
  100%{transform:translate(0,0)      scaleX(1);}
}

/* ── Shared garden background pattern ─────────────────────── */
.quiz-bg, .gff-bg, .gmf-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.quiz-sky, .gff-sky, .gmf-sky {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;  /* fill full screen — no gap */
  background: linear-gradient(180deg, #4EADEB 0%, #96D4F5 45%, #C8EEFF 72%, #b8e8a0 100%);
}
.quiz-hill, .gff-hill, .gmf-hill {
  position: absolute;
  bottom: 0;
  border-radius: 50% 50% 0 0;
}
.quiz-hill.qh-l, .gff-hill.gff-hl, .gmf-hill.gmf-hl {
  width: 55%; height: 160px;
  left: -10%;
  background: linear-gradient(180deg, #7ACE4C 0%, #58A632 100%);
}
.quiz-hill.qh-r, .gff-hill.gff-hr, .gmf-hill.gmf-hr {
  width: 50%; height: 135px;
  right: -8%;
  background: linear-gradient(180deg, #6EC845 0%, #4E9C2C 100%);
}
.quiz-ground-strip, .gff-ground, .gmf-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 22%;
  background: linear-gradient(180deg, #8DD44A 0%, #5DAA2E 60%, #4A8A24 100%);
  border-top: 5px solid #6EC240;
}
.quiz-amb, .gff-amb, .gmf-amb {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.18));
  animation: treeSway 4s ease-in-out infinite;
  transform-origin: bottom center;
}
.qa-tree1, .gff-tree1, .ga-tree1 { font-size: clamp(50px,7vw,100px); bottom: 20%; left: 0%; }
.qa-tree2, .gff-tree2, .ga-tree2 { font-size: clamp(45px,6vw,90px);  bottom: 20%; right: 0%; animation-delay: 1.2s; }
.gff-tree3                        { font-size: clamp(40px,5.5vw,80px);bottom: 20%; left: 28%; animation-delay: 0.6s; }
.qa-flower1 { font-size: clamp(22px,2.8vw,38px); bottom: 21%; left: 14%; animation: sway 2.5s ease-in-out infinite; transform-origin: bottom center; }
.qa-flower2 { font-size: clamp(22px,2.8vw,38px); bottom: 21%; right:14%; animation: sway 2.5s ease-in-out infinite 0.5s; transform-origin: bottom center; }
.qa-bee     { font-size: clamp(18px,2.2vw,30px); top: 40%; left: 38%;  animation: beeDrift 8s ease-in-out infinite; }
.qa-butterfly, .gmf-amb.ga-butterfly {
  font-size: clamp(20px,2.5vw,34px); top: 35%; left: 20%;
  animation: butterflyFloat 12s linear infinite;
}

/* ── Shared full-screen containers ────────────────────────── */
#quiz-game, #game-fireflies, #game-flowers {
  position: fixed;
  inset: 0;
  z-index: 9600;          /* above hub (8500) and doctor profile (9000) */
  font-family: 'Nunito', 'Comic Sans MS', cursive, sans-serif;
  overflow: hidden;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}
#quiz-game.quiz-hidden,
#game-fireflies.gff-hidden,
#game-flowers.gmf-hidden {
  opacity: 0; pointer-events: none; transform: scale(0.96); visibility: hidden;
}
#quiz-game.quiz-visible,
#game-fireflies.gff-visible,
#game-flowers.gmf-visible {
  opacity: 1; pointer-events: auto; transform: scale(1); visibility: visible;
}

/* ── Shared topbar ─────────────────────────────────────────── */
.quiz-topbar, .gff-topbar, .gmf-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, transparent 100%);
}
.quiz-back-btn, .gff-back-btn, .gmf-back-btn {
  background: rgba(255,255,255,.9);
  border: 3px solid #4CAF50;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: 'Nunito', cursive;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 900;
  color: #2E7D32;
  cursor: pointer;
  box-shadow: 0 4px 0 #388E3C;
  transition: transform .12s, box-shadow .12s;
}
.quiz-back-btn:hover, .gff-back-btn:hover, .gmf-back-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 #388E3C; }
.quiz-back-btn:active,.gff-back-btn:active,.gmf-back-btn:active { transform: translateY(2px);  box-shadow: 0 2px 0 #388E3C; }

.quiz-topbar-pill, .gff-topbar-pill, .gmf-topbar-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.88);
  border-radius: 50px;
  padding: 8px 24px;
  font-size: clamp(14px, 1.8vw, 24px);
  font-weight: 900;
  color: #2D4A1E;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
}

.quiz-seeds-chip, .gff-seeds-chip, .gmf-seeds-chip {
  background: rgba(255,255,255,.9);
  border: 2px solid #4CAF50;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  color: #2E7D32;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  min-width: 80px;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────────
   QUIZ GAME
   ───────────────────────────────────────────────────────────── */

/* Progress bar */
.quiz-progress-bar {
  position: absolute;
  top: 72px; left: 0; right: 0;
  height: 8px;
  background: rgba(0,0,0,.18);
  z-index: 15;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #AEEA00);
  border-radius: 0 4px 4px 0;
  transition: width 0.5s ease;
}
.quiz-progress-text {
  position: absolute;
  top: 82px; right: 22px;
  font-size: clamp(12px, 1.3vw, 18px);
  font-weight: 900;
  color: rgba(255,255,255,.9);
  z-index: 15;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* Question panel */
.quiz-question-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 95px 24px 24px;
  gap: clamp(12px, 2vh, 24px);
  z-index: 10;
}

.quiz-panel-enter {
  animation: quizPanelIn 0.4s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes quizPanelIn {
  0%  { opacity: 0; transform: translateY(18px) scale(0.97); }
  100%{ opacity: 1; transform: translateY(0)    scale(1); }
}

/* Hobby display */
.quiz-prompt {
  background: rgba(255,255,255,.92);
  border-radius: 28px;
  padding: clamp(14px, 2.5vh, 28px) clamp(22px, 3vw, 48px);
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
  animation: quizPromptPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes quizPromptPop {
  0%  { opacity: 0; transform: scale(0.7) rotate(-3deg); }
  100%{ opacity: 1; transform: scale(1)   rotate(0deg); }
}
.quiz-prompt-label {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.quiz-hobby-display {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 20px);
  justify-content: center;
}
.quiz-hobby-icon {
  font-size: clamp(40px, 6vw, 80px);
  animation: iconBob 1.5s ease-in-out infinite;
}
@keyframes iconBob {
  0%,100%{ transform: translateY(0) scale(1); }
  50%    { transform: translateY(-6px) scale(1.05); }
}
.quiz-hobby-name {
  font-size: clamp(18px, 2.6vw, 38px);
  font-weight: 900;
  color: #2D4A1E;
}

/* Choices grid */
.quiz-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.5vw, 20px);
  width: 100%;
  max-width: 900px;
}

.quiz-choice-btn {
  background: var(--coat-light);
  border: 3px solid var(--coat);
  border-radius: 20px;
  padding: clamp(10px, 1.5vh, 18px) clamp(8px, 1vw, 14px);
  cursor: pointer;
  font-family: 'Nunito', cursive;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
  transition: transform .15s cubic-bezier(0.34,1.56,0.64,1), box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.quiz-choice-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 0 rgba(0,0,0,.15);
}
.quiz-choice-btn:active:not(:disabled) {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.quiz-choice-btn.quiz-choice-locked { cursor: default; }

.quiz-choice-btn.quiz-choice-correct {
  background: #E8F5E9;
  border-color: #4CAF50;
  animation: correctPulse 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes correctPulse {
  0%  { transform: scale(0.95); }
  50% { transform: scale(1.08); }
  100%{ transform: scale(1); }
}
.quiz-choice-btn.quiz-choice-wrong {
  background: #FFEBEE;
  border-color: #F44336;
  animation: wrongShake 0.4s ease;
}
@keyframes wrongShake {
  0%,100%{ transform: translateX(0); }
  20%    { transform: translateX(-6px); }
  40%    { transform: translateX(6px); }
  60%    { transform: translateX(-4px); }
  80%    { transform: translateX(4px); }
}

.qcb-portrait-wrap {
  width: clamp(60px, 9vw, 130px);
  height: clamp(70px, 11vw, 160px);
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0,0,0,.06);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.qcb-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}
.qcb-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.qcb-name {
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 900;
  color: #2D4A1E;
}
.qcb-spec {
  font-size: clamp(10px, 1.1vw, 15px);
  font-weight: 700;
  color: var(--coat);
}

/* Feedback */
.quiz-feedback {
  width: 100%;
  max-width: 900px;
  border-radius: 18px;
  padding: clamp(12px, 1.8vh, 20px) clamp(16px, 2vw, 28px);
  transition: opacity 0.3s, transform 0.3s;
}
.quiz-feedback-hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.quiz-feedback-correct {
  background: #E8F5E9;
  border: 3px solid #4CAF50;
  animation: feedbackBounce 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.quiz-feedback-wrong {
  background: #FFF8E1;
  border: 3px solid #FF9800;
  animation: feedbackBounce 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes feedbackBounce {
  0%  { opacity: 0; transform: translateY(12px) scale(0.95); }
  100%{ opacity: 1; transform: translateY(0)    scale(1); }
}
.quiz-feedback-text {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 700;
  color: #2D4A1E;
  flex-wrap: wrap;
}
.qfb-emoji { font-size: clamp(22px, 2.8vw, 36px); }
.qfb-seeds {
  margin-left: auto;
  font-size: clamp(16px, 2vw, 26px);
  font-weight: 900;
  color: #2E7D32;
  background: #C8E6C9;
  border-radius: 12px;
  padding: 3px 12px;
}

/* Summary */
.quiz-summary {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,80,0,.35);
  backdrop-filter: blur(6px);
}
.qs-card {
  background: rgba(255,255,255,.96);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 56px);
  max-width: 520px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes cardPop {
  0%  { opacity: 0; transform: scale(0.7) rotate(-4deg); }
  100%{ opacity: 1; transform: scale(1)   rotate(0deg); }
}
.qs-title {
  font-size: clamp(22px, 3.5vw, 48px);
  font-weight: 900;
  color: #2D4A1E;
  margin-bottom: 8px;
}
.qs-rating {
  font-size: clamp(26px, 4vw, 56px);
  margin: 8px 0 16px;
}
.qs-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #F1F8E9;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: #2D4A1E;
}
.qs-seeds-row { background: #E8F5E9; }
.qs-score, .qs-seeds-earned { font-size: clamp(16px, 2.2vw, 28px); font-weight: 900; color: #2E7D32; }
.qs-total-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #DCEDC8;
  border-radius: 16px;
  margin: 10px 0 16px;
  font-size: clamp(15px, 1.9vw, 24px);
  font-weight: 900;
  color: #2E7D32;
}
.qs-total { font-size: clamp(20px, 2.8vw, 36px); }
.qs-stars { display: flex; justify-content: center; gap: 12px; margin: 8px 0 20px; }
.qs-star { font-size: clamp(28px, 4vw, 52px); opacity: 0; }
.qs-star-pop { animation: starPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards; }
@keyframes starPop {
  0%  { opacity: 0; transform: scale(0) rotate(-20deg); }
  100%{ opacity: 1; transform: scale(1) rotate(0deg); }
}
.qs-back-btn {
  background: #4CAF50;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-family: 'Nunito', cursive;
  font-size: clamp(15px, 1.9vw, 24px);
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 #2E7D32;
  transition: transform .12s, box-shadow .12s;
  width: 100%;
}
.qs-back-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 #2E7D32; }
.qs-back-btn:active { transform: translateY(2px);  box-shadow: 0 2px 0 #2E7D32; }


/* ─────────────────────────────────────────────────────────────
   FIREFLIES GAME
   ───────────────────────────────────────────────────────────── */

.gff-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 5;
  touch-action: none;
}

.gff-catch-flash {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: rgba(255,255,150,.0);
  border-radius: 0;
}
.gff-catch-flash.gff-flash-active {
  animation: catchFlash 0.22s ease-out forwards;
}
@keyframes catchFlash {
  0%  { background: rgba(255,255,150,.45); }
  100%{ background: rgba(255,255,150,.0);  }
}

/* HUD */
.gff-hud {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: clamp(280px, 55vw, 640px);
}
.gff-hud-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,.45);
  border-radius: 50px;
  padding: 10px 22px;
  backdrop-filter: blur(6px);
  width: 100%;
}
.gff-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 52px;
}
.gff-stat-icon { font-size: 20px; }
.gff-stat-val  { font-size: clamp(16px, 2.2vw, 28px); font-weight: 900; color: #fff; }
.gff-stat-label{ font-size: clamp(10px, 1.1vw, 14px); font-weight: 700; color: rgba(255,255,255,.7); }
.gff-timer-bar-wrap {
  flex: 1;
  height: 14px;
  background: rgba(255,255,255,.22);
  border-radius: 8px;
  overflow: hidden;
}
.gff-timer-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.25s linear, background 0.3s;
  background: #4CAF50;
}
.gff-time-text {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  color: #fff;
  min-width: 36px;
  text-align: right;
}
.gff-instruction {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  background: rgba(0,0,0,.22);
  border-radius: 20px;
  padding: 6px 18px;
}

/* Summary */
.gff-summary {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,40,0,.42);
  backdrop-filter: blur(6px);
}
.gff-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.gff-sum-card {
  background: rgba(255,255,255,.96);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 52px);
  max-width: 480px;
  width: 88%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  z-index: 2;
  animation: cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
.gff-sum-title {
  font-size: clamp(22px, 3.5vw, 46px);
  font-weight: 900;
  color: #2D4A1E;
  margin-bottom: 8px;
}
.gff-sum-rating {
  font-size: clamp(26px, 4vw, 54px);
  margin: 8px 0 16px;
}
.gff-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #F1F8E9;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: #2D4A1E;
}
.gff-seeds-row { background: #E8F5E9; }
.gff-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #DCEDC8;
  border-radius: 16px;
  margin: 10px 0 16px;
  font-size: clamp(15px, 1.9vw, 24px);
  font-weight: 900;
  color: #2E7D32;
}
.gff-sum-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gff-replay-btn, .gff-sum-back-btn {
  border: none;
  border-radius: 50px;
  padding: 13px 28px;
  font-family: 'Nunito', cursive;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  width: 100%;
}
.gff-replay-btn   { background: #4CAF50; color: #fff; box-shadow: 0 4px 0 #2E7D32; }
.gff-sum-back-btn { background: #fff; color: #2E7D32; border: 3px solid #4CAF50; box-shadow: 0 4px 0 #A5D6A7; }
.gff-replay-btn:hover, .gff-sum-back-btn:hover   { transform: translateY(-2px); }
.gff-replay-btn:active,.gff-sum-back-btn:active  { transform: translateY(2px); }


/* ─────────────────────────────────────────────────────────────
   MUSICAL FLOWERS GAME
   ───────────────────────────────────────────────────────────── */

.gmf-game-area {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 20px 20px;
  gap: clamp(10px, 2vh, 22px);
  z-index: 10;
}

/* Level row */
.gmf-level-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.gmf-level-lbl {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  background: rgba(0,0,0,.25);
  border-radius: 20px;
  padding: 5px 18px;
}
.gmf-progress-dots {
  display: flex;
  gap: 8px;
}
.gmf-progress-dot {
  width: clamp(10px, 1.4vw, 18px);
  height: clamp(10px, 1.4vw, 18px);
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  border: 2px solid rgba(255,255,255,.5);
  transition: background 0.3s, transform 0.3s;
}
.gmf-dot-done    { background: #4CAF50; border-color: #4CAF50; }
.gmf-dot-current { background: #FFD740; border-color: #FFD740; transform: scale(1.3); }

/* Message */
.gmf-message {
  font-size: clamp(16px, 2.4vw, 32px);
  font-weight: 900;
  color: #2D4A1E;
  background: rgba(255,255,255,.9);
  border-radius: 20px;
  padding: clamp(10px, 1.5vh, 18px) clamp(20px, 2.5vw, 36px);
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
  text-align: center;
}
.gmf-msg-pop { animation: msgPop 0.35s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes msgPop {
  0%  { transform: scale(0.88); opacity: 0.5; }
  100%{ transform: scale(1);    opacity: 1; }
}

/* Flower grid */
.gmf-flowers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.6vw, 22px);
  width: 100%;
  max-width: 860px;
}

.gmf-flower {
  background: var(--fl);
  border: 4px solid var(--fc);
  border-radius: 24px;
  padding: clamp(12px, 2vh, 22px) clamp(8px, 1.2vw, 16px);
  cursor: pointer;
  font-family: 'Nunito', cursive;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,.14);
  transition: transform .15s cubic-bezier(0.34,1.56,0.64,1), box-shadow .15s, background .12s;
  min-height: clamp(90px, 14vh, 160px);
  position: relative;
  overflow: hidden;
}
.gmf-flower:hover:not(:disabled) {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 10px 0 rgba(0,0,0,.14);
}
.gmf-flower:active:not(:disabled) {
  transform: scale(0.94);
  box-shadow: 0 2px 0 rgba(0,0,0,.14);
}
.gmf-flower.gmf-flower-disabled {
  opacity: 0.75;
  cursor: default;
}
.gmf-flower.gmf-flower-lit {
  background: var(--fc) !important;
  box-shadow: 0 0 0 6px var(--fc), 0 0 30px 8px var(--fc) !important;
  transform: scale(1.1) !important;
  animation: flowerLit 0.12s ease-in-out;
}
@keyframes flowerLit {
  0%  { transform: scale(1.0); }
  50% { transform: scale(1.14); }
  100%{ transform: scale(1.1); }
}
.gmf-flower-emoji { font-size: clamp(28px, 4.5vw, 64px); }
.gmf-flower-label { font-size: clamp(10px, 1.2vw, 16px); font-weight: 900; color: #2D4A1E; }

/* Game over overlay */
.gmf-over {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100,0,0,.4);
  backdrop-filter: blur(8px);
}
.gmf-over-card {
  background: rgba(255,255,255,.97);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 48px);
  max-width: 420px;
  width: 85%;
  text-align: center;
  box-shadow: 0 20px 56px rgba(0,0,0,.3);
  animation: cardPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.gmf-over-emoji { font-size: clamp(40px, 6vw, 80px); margin-bottom: 8px; }
.gmf-over-card h2 {
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 900;
  color: #C62828;
  margin: 0 0 10px;
}
.gmf-over-card p {
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: #4E342E;
  margin: 0 0 8px;
}
.gmf-over-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.gmf-retry-btn, .gmf-over-back-btn, .gmf-replay-btn, .gmf-sum-back-btn {
  border: none;
  border-radius: 50px;
  padding: 13px 28px;
  font-family: 'Nunito', cursive;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  width: 100%;
}
.gmf-retry-btn  { background: #4CAF50; color: #fff; box-shadow: 0 4px 0 #2E7D32; }
.gmf-over-back-btn { background: #fff; color: #2E7D32; border: 3px solid #4CAF50; box-shadow: 0 4px 0 #A5D6A7; }
.gmf-retry-btn:hover, .gmf-over-back-btn:hover   { transform: translateY(-2px); }
.gmf-retry-btn:active,.gmf-over-back-btn:active  { transform: translateY(2px); }

/* Summary */
.gmf-summary {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,50,0,.4);
  backdrop-filter: blur(8px);
}
.gmf-sum-card {
  background: rgba(255,255,255,.97);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 52px);
  max-width: 480px;
  width: 88%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
.gmf-sum-title {
  font-size: clamp(20px, 3.2vw, 44px);
  font-weight: 900;
  color: #2D4A1E;
  margin-bottom: 6px;
}
.gmf-sum-stars {
  font-size: clamp(28px, 4.5vw, 60px);
  margin: 8px 0 14px;
  animation: starsShine 1.5s ease-in-out infinite;
}
@keyframes starsShine {
  0%,100%{ opacity: 1; transform: scale(1); }
  50%    { opacity: 0.8; transform: scale(1.06); }
}
.gmf-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #F1F8E9;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: clamp(14px, 1.8vw, 22px);
  font-weight: 700;
  color: #2D4A1E;
}
.gmf-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #DCEDC8;
  border-radius: 16px;
  margin: 10px 0 16px;
  font-size: clamp(15px, 1.9vw, 24px);
  font-weight: 900;
  color: #2E7D32;
}
.gmf-sum-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gmf-replay-btn   { background: #4CAF50; color: #fff; box-shadow: 0 4px 0 #2E7D32; }
.gmf-sum-back-btn { background: #fff; color: #2E7D32; border: 3px solid #4CAF50; box-shadow: 0 4px 0 #A5D6A7; }
.gmf-replay-btn:hover, .gmf-sum-back-btn:hover   { transform: translateY(-2px); }
.gmf-replay-btn:active,.gmf-sum-back-btn:active  { transform: translateY(2px); }


/* ─────────────────────────────────────────────────────────────
   GLOBAL SEED COUNTER (persistent overlay in hub + games)
   ───────────────────────────────────────────────────────────── */

#seed-counter-global {
  position: fixed;
  top: 18px;
  right: 22px;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.96);
  border: 3px solid #4CAF50;
  border-radius: 50px;
  padding: 8px 20px;
  font-family: 'Nunito', cursive;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 900;
  color: #2E7D32;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
  pointer-events: none;
  transition: opacity 0.4s;
}
#seed-counter-global.scg-hidden { opacity: 0; }
#seed-counter-global .scg-icon { font-size: clamp(18px, 2.5vw, 30px); }
#seed-counter-global .scg-val  { font-size: clamp(16px, 2.2vw, 28px); }
#seed-counter-global .scg-lbl  { font-size: clamp(11px, 1.2vw, 16px); font-weight: 700; color: #388E3C; }

/* Seed gain animation */
.scg-burst {
  position: fixed;
  pointer-events: none;
  font-family: 'Nunito', cursive;
  font-size: clamp(15px, 2vw, 24px);
  font-weight: 900;
  color: #2E7D32;
  text-shadow: 0 2px 6px rgba(0,0,0,.25);
  z-index: 100000;
  white-space: nowrap;
  animation: seedBurst 1.2s ease-out forwards;
}
@keyframes seedBurst {
  0%   { opacity: 1; transform: translateY(0)     scale(1);   }
  60%  { opacity: 1; transform: translateY(-28px)  scale(1.2); }
  100% { opacity: 0; transform: translateY(-52px)  scale(1);   }
}

/* ─────────────────────────────────────────────────────────────
   MAZE GAME  (gmz-)
   ───────────────────────────────────────────────────────────── */
#game-maze {
  position: fixed; inset: 0; z-index: 9600;
  font-family: 'Nunito','Comic Sans MS',cursive,sans-serif;
  overflow: hidden;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}
#game-maze.gmz-hidden  { opacity:0; pointer-events:none; transform:scale(0.96); visibility:hidden; }
#game-maze.gmz-visible { opacity:1; pointer-events:auto; transform:scale(1);   visibility:visible; }

.gmz-bg { position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.gmz-sky { position:absolute; top:0; left:0; right:0; height:55%; background:linear-gradient(180deg,#4EADEB 0%,#96D4F5 55%,#C8EEFF 100%); }
.gmz-hill { position:absolute; bottom:0; border-radius:50% 50% 0 0; }
.gmz-hl { width:55%; height:150px; left:-10%; background:linear-gradient(180deg,#7ACE4C,#58A632); }
.gmz-hr { width:50%; height:130px; right:-8%; background:linear-gradient(180deg,#6EC845,#4E9C2C); }
.gmz-ground { position:absolute; bottom:0; left:0; right:0; height:22%; background:linear-gradient(180deg,#8DD44A 0%,#5DAA2E 60%,#4A8A24 100%); border-top:5px solid #6EC240; }
.gmz-amb { position:absolute; pointer-events:none; filter:drop-shadow(0 3px 5px rgba(0,0,0,.18)); animation:treeSway 4s ease-in-out infinite; transform-origin:bottom center; }
.gmz-tree1 { font-size:clamp(50px,7vw,100px); bottom:20%; left:0; }
.gmz-tree2 { font-size:clamp(45px,6vw,90px);  bottom:20%; right:0; animation-delay:1.2s; }

.gmz-topbar { position:absolute; top:0; left:0; right:0; z-index:20; display:flex; align-items:center; justify-content:space-between; padding:14px 22px 10px; background:linear-gradient(180deg,rgba(0,0,0,.22) 0%,transparent 100%); }
.gmz-back-btn { background:rgba(255,255,255,.9); border:3px solid #4CAF50; border-radius:50px; padding:10px 24px; font-family:'Nunito',cursive; font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#2E7D32; cursor:pointer; box-shadow:0 4px 0 #388E3C; transition:transform .12s,box-shadow .12s; }
.gmz-back-btn:hover  { transform:translateY(-2px); box-shadow:0 6px 0 #388E3C; }
.gmz-back-btn:active { transform:translateY(2px);  box-shadow:0 2px 0 #388E3C; }
.gmz-topbar-pill { display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.88); border-radius:50px; padding:8px 24px; font-size:clamp(14px,1.8vw,24px); font-weight:900; color:#2D4A1E; box-shadow:0 4px 16px rgba(0,0,0,.14); }
.gmz-seeds-chip { background:rgba(255,255,255,.9); border:2px solid #4CAF50; border-radius:50px; padding:8px 18px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; box-shadow:0 4px 14px rgba(0,0,0,.14); min-width:80px; text-align:center; }

.gmz-game-wrap { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:88px 16px 16px; gap:10px; z-index:10; }
.gmz-hud { display:flex; flex-direction:column; align-items:center; gap:6px; }
.gmz-level-lbl { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:rgba(255,255,255,.92); background:rgba(0,0,0,.28); border-radius:20px; padding:5px 18px; }
.gmz-message { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#2D4A1E; background:rgba(255,255,255,.9); border-radius:16px; padding:8px 20px; box-shadow:0 4px 14px rgba(0,0,0,.12); text-align:center; }
.gmz-canvas { width:min(80vw,600px); height:min(55vh,480px); border-radius:20px; box-shadow:0 12px 36px rgba(0,0,0,.25); cursor:grab; background:transparent; touch-action:none; }
.gmz-canvas:active { cursor:grabbing; }
@keyframes gmzShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-10px)} 40%{transform:translateX(10px)} 60%{transform:translateX(-7px)} 80%{transform:translateX(7px)} }
.gmz-shake { animation:gmzShake 0.4s ease; }
.gmz-hint { font-size:clamp(11px,1.3vw,17px); font-weight:700; color:rgba(255,255,255,.85); text-shadow:0 1px 4px rgba(0,0,0,.4); background:rgba(0,0,0,.22); border-radius:14px; padding:5px 16px; }

.gmz-summary { position:absolute; inset:0; z-index:20; display:flex; align-items:center; justify-content:center; background:rgba(0,50,0,.4); backdrop-filter:blur(8px); }
.gmz-sum-card { background:rgba(255,255,255,.97); border-radius:28px; padding:clamp(24px,4vw,52px); max-width:460px; width:88%; text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.28); animation:cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; }
.gmz-sum-title { font-size:clamp(18px,3vw,42px); font-weight:900; color:#2D4A1E; margin-bottom:10px; }
.gmz-sum-stars { font-size:clamp(28px,4.5vw,56px); margin:6px 0 14px; }
.gmz-sum-row { display:flex; justify-content:space-between; padding:10px 16px; background:#F1F8E9; border-radius:12px; margin-bottom:8px; font-size:clamp(13px,1.6vw,20px); font-weight:700; color:#2D4A1E; }
.gmz-sum-total { display:flex; justify-content:space-between; padding:14px 16px; background:#DCEDC8; border-radius:16px; margin:8px 0 16px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; }
.gmz-sum-btns { display:flex; flex-direction:column; gap:10px; }
.gmz-replay-btn,.gmz-back2-btn { border:none; border-radius:50px; padding:13px 28px; font-family:'Nunito',cursive; font-size:clamp(14px,1.8vw,22px); font-weight:900; cursor:pointer; transition:transform .12s; width:100%; }
.gmz-replay-btn  { background:#4CAF50; color:#fff; box-shadow:0 4px 0 #2E7D32; }
.gmz-back2-btn   { background:#fff; color:#2E7D32; border:3px solid #4CAF50; }
.gmz-replay-btn:hover,.gmz-back2-btn:hover   { transform:translateY(-2px); }
.gmz-replay-btn:active,.gmz-back2-btn:active { transform:translateY(2px); }

/* ─────────────────────────────────────────────────────────────
   SEED SORTING GAME  (gsd-)
   ───────────────────────────────────────────────────────────── */
#game-seeds {
  position:fixed; inset:0; z-index:9600;
  font-family:'Nunito','Comic Sans MS',cursive,sans-serif;
  overflow:hidden;
  transition:opacity 0.45s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}
#game-seeds.gsd-hidden  { opacity:0; pointer-events:none; transform:scale(0.96); visibility:hidden; }
#game-seeds.gsd-visible { opacity:1; pointer-events:auto; transform:scale(1);   visibility:visible; }

.gsd-bg { position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.gsd-sky { position:absolute; top:0; left:0; right:0; height:55%; background:linear-gradient(180deg,#4EADEB 0%,#96D4F5 55%,#C8EEFF 100%); }
.gsd-hill { position:absolute; bottom:0; border-radius:50% 50% 0 0; }
.gsd-hl { width:55%; height:150px; left:-10%; background:linear-gradient(180deg,#7ACE4C,#58A632); }
.gsd-hr { width:50%; height:130px; right:-8%; background:linear-gradient(180deg,#6EC845,#4E9C2C); }
.gsd-amb { position:absolute; pointer-events:none; filter:drop-shadow(0 3px 5px rgba(0,0,0,.18)); animation:treeSway 4s ease-in-out infinite; transform-origin:bottom center; }
.gsd-tree1 { font-size:clamp(50px,7vw,100px); bottom:5%; left:0; }
.gsd-tree2 { font-size:clamp(45px,6vw,90px);  bottom:5%; right:0; animation-delay:1.2s; }

.gsd-topbar { position:absolute; top:0; left:0; right:0; z-index:20; display:flex; align-items:center; justify-content:space-between; padding:14px 22px 10px; background:linear-gradient(180deg,rgba(0,0,0,.22) 0%,transparent 100%); }
.gsd-back-btn { background:rgba(255,255,255,.9); border:3px solid #4CAF50; border-radius:50px; padding:10px 24px; font-family:'Nunito',cursive; font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#2E7D32; cursor:pointer; box-shadow:0 4px 0 #388E3C; transition:transform .12s,box-shadow .12s; }
.gsd-back-btn:hover  { transform:translateY(-2px); box-shadow:0 6px 0 #388E3C; }
.gsd-back-btn:active { transform:translateY(2px);  box-shadow:0 2px 0 #388E3C; }
.gsd-topbar-pill { display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.88); border-radius:50px; padding:8px 24px; font-size:clamp(14px,1.8vw,24px); font-weight:900; color:#2D4A1E; box-shadow:0 4px 16px rgba(0,0,0,.14); }
.gsd-seeds-chip { background:rgba(255,255,255,.9); border:2px solid #4CAF50; border-radius:50px; padding:8px 18px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; min-width:80px; text-align:center; }

.gsd-hud { position:absolute; top:72px; left:0; right:0; z-index:10; display:flex; flex-direction:column; align-items:center; gap:4px; padding:0 16px; }
.gsd-hud-row { display:flex; align-items:center; gap:12px; background:rgba(0,0,0,.3); border-radius:50px; padding:8px 20px; backdrop-filter:blur(4px); }
.gsd-stat { font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#fff; white-space:nowrap; }
.gsd-timer-wrap { width:clamp(100px,18vw,260px); height:12px; background:rgba(255,255,255,.22); border-radius:8px; overflow:hidden; }
.gsd-timer-bar { height:100%; border-radius:8px; transition:width .25s linear; background:#4CAF50; }
.gsd-time { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#fff; min-width:36px; }
.gsd-instruction { font-size:clamp(11px,1.3vw,17px); font-weight:700; color:rgba(255,255,255,.85); text-shadow:0 1px 4px rgba(0,0,0,.4); background:rgba(0,0,0,.22); border-radius:14px; padding:5px 16px; }

.gsd-canvas { position:absolute; inset:0; width:100%; height:100%; z-index:5; cursor:default; touch-action:none; }
.gsd-flash { position:absolute; inset:0; z-index:6; pointer-events:none; }
.gsd-flash.gsd-flash-active { animation:gsdFlash 0.3s ease-out forwards; }
@keyframes gsdFlash { 0%{background:rgba(255,50,50,.45);} 100%{background:transparent;} }

.gsd-summary { position:absolute; inset:0; z-index:20; display:flex; align-items:center; justify-content:center; background:rgba(0,40,0,.4); backdrop-filter:blur(8px); }
.gsd-sum-card { background:rgba(255,255,255,.97); border-radius:28px; padding:clamp(24px,4vw,52px); max-width:460px; width:88%; text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.28); animation:cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; }
.gsd-sum-title { font-size:clamp(18px,3vw,40px); font-weight:900; color:#2D4A1E; margin-bottom:8px; }
.gsd-sum-rating { font-size:clamp(26px,4vw,52px); margin:8px 0 14px; }
.gsd-sum-row { display:flex; justify-content:space-between; padding:10px 16px; background:#F1F8E9; border-radius:12px; margin-bottom:8px; font-size:clamp(13px,1.6vw,20px); font-weight:700; color:#2D4A1E; }
.gsd-seeds-row { background:#E8F5E9; }
.gsd-sum-total { display:flex; justify-content:space-between; padding:14px 16px; background:#DCEDC8; border-radius:16px; margin:8px 0 16px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; }
.gsd-sum-btns { display:flex; flex-direction:column; gap:10px; }
.gsd-replay-btn,.gsd-back2-btn { border:none; border-radius:50px; padding:13px 28px; font-family:'Nunito',cursive; font-size:clamp(14px,1.8vw,22px); font-weight:900; cursor:pointer; transition:transform .12s; width:100%; }
.gsd-replay-btn { background:#4CAF50; color:#fff; box-shadow:0 4px 0 #2E7D32; }
.gsd-back2-btn  { background:#fff; color:#2E7D32; border:3px solid #4CAF50; }
.gsd-replay-btn:hover,.gsd-back2-btn:hover   { transform:translateY(-2px); }
.gsd-replay-btn:active,.gsd-back2-btn:active { transform:translateY(2px); }

/* ─────────────────────────────────────────────────────────────
   MIST GAME  (gms-)
   ───────────────────────────────────────────────────────────── */
#game-mist {
  position:fixed; inset:0; z-index:9600;
  font-family:'Nunito','Comic Sans MS',cursive,sans-serif;
  overflow:hidden;
  transition:opacity 0.45s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}
#game-mist.gms-hidden  { opacity:0; pointer-events:none; transform:scale(0.96); visibility:hidden; }
#game-mist.gms-visible { opacity:1; pointer-events:auto; transform:scale(1);   visibility:visible; }

.gms-bg { position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.gms-sky { position:absolute; top:0; left:0; right:0; height:55%; background:linear-gradient(180deg,#4EADEB 0%,#96D4F5 55%,#C8EEFF 100%); }
.gms-hill { position:absolute; bottom:0; border-radius:50% 50% 0 0; }
.gms-hl { width:55%; height:150px; left:-10%; background:linear-gradient(180deg,#7ACE4C,#58A632); }
.gms-hr { width:50%; height:130px; right:-8%; background:linear-gradient(180deg,#6EC845,#4E9C2C); }
.gms-ground { position:absolute; bottom:0; left:0; right:0; height:22%; background:linear-gradient(180deg,#8DD44A 0%,#5DAA2E 60%,#4A8A24 100%); border-top:5px solid #6EC240; }
.gms-amb { position:absolute; pointer-events:none; filter:drop-shadow(0 3px 5px rgba(0,0,0,.18)); animation:treeSway 4s ease-in-out infinite; transform-origin:bottom center; }
.gms-tree1 { font-size:clamp(50px,7vw,100px); bottom:20%; left:0; }
.gms-tree2 { font-size:clamp(45px,6vw,90px);  bottom:20%; right:0; animation-delay:1.2s; }

.gms-topbar { position:absolute; top:0; left:0; right:0; z-index:20; display:flex; align-items:center; justify-content:space-between; padding:14px 22px 10px; background:linear-gradient(180deg,rgba(0,0,0,.22) 0%,transparent 100%); }
.gms-back-btn { background:rgba(255,255,255,.9); border:3px solid #4CAF50; border-radius:50px; padding:10px 24px; font-family:'Nunito',cursive; font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#2E7D32; cursor:pointer; box-shadow:0 4px 0 #388E3C; transition:transform .12s,box-shadow .12s; }
.gms-back-btn:hover  { transform:translateY(-2px); box-shadow:0 6px 0 #388E3C; }
.gms-back-btn:active { transform:translateY(2px);  box-shadow:0 2px 0 #388E3C; }
.gms-topbar-pill { display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.88); border-radius:50px; padding:8px 24px; font-size:clamp(14px,1.8vw,24px); font-weight:900; color:#2D4A1E; box-shadow:0 4px 16px rgba(0,0,0,.14); }
.gms-seeds-chip { background:rgba(255,255,255,.9); border:2px solid #4CAF50; border-radius:50px; padding:8px 18px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; min-width:80px; text-align:center; }

.gms-game-wrap { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:88px 16px 12px; gap:10px; z-index:10; }
.gms-hud { display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; max-width:600px; }
.gms-hud-row { display:flex; align-items:center; gap:12px; background:rgba(0,0,0,.3); border-radius:50px; padding:8px 20px; backdrop-filter:blur(4px); width:100%; }
.gms-round-lbl { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#fff; white-space:nowrap; }
.gms-timer-wrap { flex:1; height:12px; background:rgba(255,255,255,.22); border-radius:8px; overflow:hidden; }
.gms-timer-bar { height:100%; border-radius:8px; transition:width .25s linear; background:#4CAF50; }
.gms-time { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#fff; min-width:36px; text-align:right; }

.gms-reveal-bar-wrap { display:flex; align-items:center; gap:10px; width:100%; max-width:600px; }
.gms-reveal-label { font-size:clamp(11px,1.2vw,16px); font-weight:900; color:rgba(255,255,255,.88); white-space:nowrap; text-shadow:0 1px 4px rgba(0,0,0,.4); }
.gms-reveal-track { flex:1; height:10px; background:rgba(255,255,255,.25); border-radius:6px; overflow:hidden; }
.gms-reveal-fill { height:100%; background:linear-gradient(90deg,#64B5F6,#1DE9B6); border-radius:6px; transition:width .1s; width:0%; }

.gms-canvas-wrap { position:relative; width:min(80vw,560px); height:min(44vh,380px); border-radius:22px; overflow:hidden; box-shadow:0 12px 40px rgba(0,0,0,.28); flex-shrink:0; }
.gms-reveal-canvas,.gms-mist-canvas { position:absolute; inset:0; width:100%; height:100%; }
.gms-mist-canvas { cursor:crosshair; touch-action:none; }

.gms-item-label { text-align:center; background:rgba(255,255,255,.92); border-radius:16px; padding:8px 24px; box-shadow:0 4px 14px rgba(0,0,0,.12); }
.gms-item-label span { font-size:clamp(13px,1.6vw,20px); font-weight:700; color:#555; }
.gms-item-label strong { font-size:clamp(16px,2vw,26px); font-weight:900; color:#2D4A1E; margin-left:8px; }
.gms-instruction { font-size:clamp(11px,1.3vw,17px); font-weight:700; color:rgba(255,255,255,.85); text-shadow:0 1px 4px rgba(0,0,0,.4); background:rgba(0,0,0,.22); border-radius:14px; padding:5px 16px; text-align:center; }

.gms-summary { position:absolute; inset:0; z-index:20; display:flex; align-items:center; justify-content:center; background:rgba(0,50,50,.4); backdrop-filter:blur(8px); }
.gms-sum-card { background:rgba(255,255,255,.97); border-radius:28px; padding:clamp(24px,4vw,52px); max-width:460px; width:88%; text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.28); animation:cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; }
.gms-sum-title { font-size:clamp(18px,3vw,40px); font-weight:900; color:#2D4A1E; margin-bottom:8px; }
.gms-sum-stars { font-size:clamp(28px,4.5vw,56px); margin:6px 0 14px; }
.gms-sum-row { display:flex; justify-content:space-between; padding:10px 16px; background:#E8F5E9; border-radius:12px; margin-bottom:8px; font-size:clamp(13px,1.6vw,20px); font-weight:700; color:#2D4A1E; }
.gms-sum-total { display:flex; justify-content:space-between; padding:14px 16px; background:#DCEDC8; border-radius:16px; margin:8px 0 16px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; }
.gms-sum-btns { display:flex; flex-direction:column; gap:10px; }
.gms-replay-btn,.gms-back2-btn { border:none; border-radius:50px; padding:13px 28px; font-family:'Nunito',cursive; font-size:clamp(14px,1.8vw,22px); font-weight:900; cursor:pointer; transition:transform .12s; width:100%; }
.gms-replay-btn { background:#4CAF50; color:#fff; box-shadow:0 4px 0 #2E7D32; }
.gms-back2-btn  { background:#fff; color:#2E7D32; border:3px solid #4CAF50; }
.gms-replay-btn:hover,.gms-back2-btn:hover   { transform:translateY(-2px); }
.gms-replay-btn:active,.gms-back2-btn:active { transform:translateY(2px); }

/* ─────────────────────────────────────────────────────────────
   SUNBEAM GAME  (gsb-)
   ───────────────────────────────────────────────────────────── */
#game-sunbeam {
  position:fixed; inset:0; z-index:9600;
  font-family:'Nunito','Comic Sans MS',cursive,sans-serif;
  overflow:hidden;
  transition:opacity 0.45s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}
#game-sunbeam.gsb-hidden  { opacity:0; pointer-events:none; transform:scale(0.96); visibility:hidden; }
#game-sunbeam.gsb-visible { opacity:1; pointer-events:auto; transform:scale(1);   visibility:visible; }

.gsb-bg { position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.gsb-sky { position:absolute; top:0; left:0; right:0; height:100%; background:linear-gradient(180deg,#1A237E 0%,#283593 30%,#3949AB 60%,#5C6BC0 100%); }
.gsb-hill { position:absolute; bottom:0; border-radius:50% 50% 0 0; opacity:0.7; }
.gsb-hl { width:55%; height:150px; left:-10%; background:linear-gradient(180deg,#37474F,#263238); }
.gsb-hr { width:50%; height:130px; right:-8%; background:linear-gradient(180deg,#455A64,#37474F); }
.gsb-ground { position:absolute; bottom:0; left:0; right:0; height:18%; background:linear-gradient(180deg,#2E7D32 0%,#1B5E20 100%); border-top:4px solid #388E3C; }
.gsb-amb { position:absolute; pointer-events:none; filter:drop-shadow(0 3px 5px rgba(0,0,0,.4)); animation:treeSway 4s ease-in-out infinite; transform-origin:bottom center; opacity:0.7; }
.gsb-tree1 { font-size:clamp(50px,7vw,100px); bottom:16%; left:0; }
.gsb-tree2 { font-size:clamp(45px,6vw,90px);  bottom:16%; right:0; animation-delay:1.2s; }

.gsb-topbar { position:absolute; top:0; left:0; right:0; z-index:20; display:flex; align-items:center; justify-content:space-between; padding:14px 22px 10px; background:linear-gradient(180deg,rgba(0,0,0,.35) 0%,transparent 100%); }
.gsb-back-btn { background:rgba(255,255,255,.88); border:3px solid #7986CB; border-radius:50px; padding:10px 24px; font-family:'Nunito',cursive; font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#3949AB; cursor:pointer; box-shadow:0 4px 0 #5C6BC0; transition:transform .12s,box-shadow .12s; }
.gsb-back-btn:hover  { transform:translateY(-2px); }
.gsb-back-btn:active { transform:translateY(2px); }
.gsb-topbar-pill { display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.18); border-radius:50px; padding:8px 24px; font-size:clamp(14px,1.8vw,24px); font-weight:900; color:#fff; box-shadow:0 4px 16px rgba(0,0,0,.2); }
.gsb-seeds-chip { background:rgba(255,255,255,.9); border:2px solid #4CAF50; border-radius:50px; padding:8px 18px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; min-width:80px; text-align:center; }

.gsb-game-wrap { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:88px 0 0; z-index:10; }
.gsb-hud { display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; padding:0 20px; }
.gsb-hud-row { display:flex; align-items:center; gap:12px; background:rgba(0,0,0,.4); border-radius:50px; padding:8px 20px; backdrop-filter:blur(4px); width:100%; max-width:700px; }
.gsb-progress-lbl { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#fff; white-space:nowrap; }
.gsb-timer-wrap { flex:1; height:12px; background:rgba(255,255,255,.22); border-radius:8px; overflow:hidden; }
.gsb-timer-bar { height:100%; border-radius:8px; transition:width .25s linear; background:#4CAF50; }
.gsb-time { font-size:clamp(13px,1.6vw,20px); font-weight:900; color:#fff; min-width:36px; text-align:right; }

.gsb-canvas { width:100%; flex:1; cursor:default; touch-action:none; display:block; }
.gsb-hint { position:absolute; bottom:3%; left:50%; transform:translateX(-50%); font-size:clamp(11px,1.3vw,17px); font-weight:700; color:rgba(255,255,255,.85); text-shadow:0 1px 4px rgba(0,0,0,.5); background:rgba(0,0,0,.3); border-radius:14px; padding:6px 18px; white-space:nowrap; z-index:15; }

.gsb-summary { position:absolute; inset:0; z-index:20; display:flex; align-items:center; justify-content:center; background:rgba(0,0,50,.5); backdrop-filter:blur(10px); }
.gsb-sum-card { background:rgba(255,255,255,.97); border-radius:28px; padding:clamp(24px,4vw,52px); max-width:460px; width:88%; text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.35); animation:cardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both; }
.gsb-sum-title { font-size:clamp(18px,3vw,40px); font-weight:900; color:#2D4A1E; margin-bottom:8px; }
.gsb-sum-rating { font-size:clamp(26px,4vw,52px); margin:8px 0 14px; }
.gsb-sum-row { display:flex; justify-content:space-between; padding:10px 16px; background:#F1F8E9; border-radius:12px; margin-bottom:8px; font-size:clamp(13px,1.6vw,20px); font-weight:700; color:#2D4A1E; }
.gsb-seeds-row { background:#E8F5E9; }
.gsb-sum-total { display:flex; justify-content:space-between; padding:14px 16px; background:#DCEDC8; border-radius:16px; margin:8px 0 16px; font-size:clamp(14px,1.8vw,22px); font-weight:900; color:#2E7D32; }
.gsb-sum-btns { display:flex; flex-direction:column; gap:10px; }
.gsb-replay-btn,.gsb-back2-btn { border:none; border-radius:50px; padding:13px 28px; font-family:'Nunito',cursive; font-size:clamp(14px,1.8vw,22px); font-weight:900; cursor:pointer; transition:transform .12s; width:100%; }
.gsb-replay-btn { background:#4CAF50; color:#fff; box-shadow:0 4px 0 #2E7D32; }
.gsb-back2-btn  { background:#fff; color:#2E7D32; border:3px solid #4CAF50; }
.gsb-replay-btn:hover,.gsb-back2-btn:hover   { transform:translateY(-2px); }
.gsb-replay-btn:active,.gsb-back2-btn:active { transform:translateY(2px); }

/* ── Games launcher strip in hub ───────────────────────────── */
.hub-games-strip {
  position: absolute;
  bottom: 1.5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(4px, 0.8vw, 12px);
  align-items: center;
  background: rgba(255,255,255,.92);
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  border: 3px solid rgba(76,175,80,.4);
  max-width: 96vw;
  overflow-x: auto;
  scrollbar-width: none;
}
.hub-games-strip::-webkit-scrollbar { display: none; }

.hub-game-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #F1F8E9;
  border: 2.5px solid #C8E6C9;
  border-radius: 16px;
  padding: clamp(6px, 1vh, 10px) clamp(8px, 1.2vw, 16px);
  cursor: pointer;
  font-family: 'Nunito', cursive;
  transition: background 0.18s, border-color 0.18s, transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s;
  min-width: clamp(50px, 6vw, 80px);
  flex-shrink: 0;
  position: relative;
}
.hub-game-btn:hover {
  background: #E8F5E9;
  border-color: #4CAF50;
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 6px 16px rgba(76,175,80,.25);
}
.hub-game-btn:active { transform: scale(0.93); }

.hub-game-icon  { font-size: clamp(20px, 2.8vw, 36px); line-height: 1; }
.hub-game-label {
  font-size: clamp(8px, 0.95vw, 13px);
  font-weight: 900;
  color: #2D4A1E;
  text-align: center;
  white-space: nowrap;
}
