/* ============================================================
   AMEERA'S CREATIVE WORLD — Main Stylesheet
   Theme  : Pink / Bubblegum / Playful
   Skills : Accessibility · Performance · SEO-ready
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink-1:    #d6005c;   /* darkened for WCAG AA contrast on white */
  --pink-2:    #e8307a;
  --pink-3:    #f472a8;
  --pink-4:    #ffd6eb;
  --pink-5:    #fff0f7;
  --pink-hero: #ff3388;   /* used only on gradient/large display text */
  --purple:    #7e3aad;
  --purple-l:  #d7b8f3;
  --text-dark: #1e0e1e;
  --text-mid:  #4a2a4a;
  --text-soft: #7a4a7a;
  --white:     #ffffff;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --shadow-sm: 0 4px 12px rgba(180,0,80,0.10);
  --shadow-md: 0 8px 28px rgba(180,0,80,0.15);
  --shadow-lg: 0 16px 48px rgba(180,0,80,0.20);
  /* Use a shorter transition on preference — disabled via media query below */
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
  /* Minimum tap-target size for children / touch */
  --tap-min: 48px;
}

/* ── Reduced motion: respect OS setting ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:    0.01ms !important;
    animation-iteration-count: 1  !important;
    transition-duration:   0.01ms !important;
    scroll-behavior:       auto   !important;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', Arial, sans-serif;
  /* Subtle, low-motion-safe gradient — no canvas/animation */
  background: linear-gradient(150deg, #fff0f7 0%, #ffe4f2 35%, #f4e8ff 65%, #e8f0ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-dark);
  overflow-x: hidden;
  /* Improve text rendering */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Skip Link (accessibility first) ─────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--pink-1);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Global focus style — vivid, child-friendly ──────────── */
:focus-visible {
  outline: 3px solid var(--pink-1);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Remove outline for mouse users only */
:focus:not(:focus-visible) { outline: none; }

/* ── Floating Decorations (visual only, aria-hidden) ─────── */
.deco-bubble {
  position: fixed;
  font-size: 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  will-change: transform;   /* promote to GPU layer */
  animation: floatBubble linear infinite;
}

.b1 { left:3%;  top:15%; animation-duration:9s;  animation-delay:0s;   font-size:30px; }
.b2 { left:92%; top:20%; animation-duration:10s; animation-delay:1s;   font-size:24px; }
.b3 { left:8%;  top:55%; animation-duration:12s; animation-delay:2s;   font-size:28px; }
.b4 { left:88%; top:60%; animation-duration:8s;  animation-delay:0.5s; font-size:26px; }
.b5 { left:50%; top:5%;  animation-duration:11s; animation-delay:3s;   font-size:22px; }
.b6 { left:20%; top:80%; animation-duration:13s; animation-delay:1.5s; font-size:28px; }
.b7 { left:75%; top:85%; animation-duration:10s; animation-delay:4s;   font-size:24px; }
.b8 { left:40%; top:92%; animation-duration:9s;  animation-delay:2.5s; font-size:26px; }

@keyframes floatBubble {
  0%   { transform: translateY(0)    rotate(0deg);  }
  40%  { transform: translateY(-16px) rotate(4deg); }
  70%  { transform: translateY(6px)  rotate(-4deg); }
  100% { transform: translateY(0)    rotate(0deg);  }
}

/* ── Header ───────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(90deg, #c4004f 0%, #e8307a 45%, #a020c8 100%);
  box-shadow: 0 3px 16px rgba(180,0,80,0.35);
  /* Contain paint — avoid repaints on scroll */
  contain: layout style;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
}

/* Logo */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  font-size: 34px;
  display: inline-block;
  will-change: transform;
  animation: gentleSpin 8s ease-in-out infinite;
}

@keyframes gentleSpin {
  0%,100% { transform: rotate(-5deg) scale(1);    }
  50%      { transform: rotate(5deg)  scale(1.12); }
}

.site-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(18px, 2.2vw, 26px);
  color: white;
  text-shadow: 1px 2px 0 rgba(0,0,0,0.25);
  line-height: 1.1;
}

.site-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.88);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Nav */
#main-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  font-size: 14px;
  /* Ensure minimum tap target */
  min-height: var(--tap-min);
  padding: 0 14px;
  border-radius: 50px;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.22);
  color: white;
}

.nav-link.active {
  background: rgba(255,255,255,0.28);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4);
}

.nav-link i { font-size: 13px; }

/* Hamburger */
.hamburger {
  display: none;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.45);
  color: white;
  border-radius: 10px;
  /* Meets 48 × 48 tap target */
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--transition);
  align-items: center;
  justify-content: center;
}

.hamburger:hover { background: rgba(255,255,255,0.32); }

/* ── Main Content ─────────────────────────────────────────── */
#main-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 20px 64px;
  min-height: calc(100vh - 156px);
  /* Avoid layout shift */
  contain: layout;
}

/* ── Section Visibility ───────────────────────────────────── */
.content-section        { display: none; }
.content-section.active {
  display: block;
  animation: fadeInUp 0.35s ease-out both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero-block {
  padding: 36px 16px 48px;
}

/* Two-column layout: text left, photo right */
.hero-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-text-side {
  flex: 1 1 320px;
  text-align: center;
  max-width: 560px;
}

/* Photo column */
.hero-photo-side {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* ── Hero Photo Frame ────────────────────────────────────── */
.hero-photo-frame {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
}

/* Outer spinning dashed ring */
.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 44% 56% 52% 48% / 50% 44% 56% 50%;
  border: 3px dashed #f472a8;
  opacity: 0.7;
  animation: spinFrame 12s linear infinite;
  z-index: 0;
}

/* Inner solid border ring */
.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 42% 58% 54% 46% / 48% 42% 58% 52%;
  border: 3px solid #ffb3d5;
  background: linear-gradient(135deg, #fff0f7 0%, #f4e8ff 50%, #ffe4f2 100%);
  z-index: 0;
  animation: spinFrame 16s linear infinite reverse;
}

@keyframes spinFrame {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

/* Soft glow blob behind the image */
.hero-photo-glow {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 65%,
    #ffb3d5 0%, #e8d0ff 45%, transparent 72%);
  z-index: 0;
  filter: blur(22px);
  opacity: 0.8;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,100% { transform: scale(1);    opacity: 0.75; }
  50%      { transform: scale(1.08); opacity: 1;    }
}

/* Decorative emoji stickers on the frame corners */
.photo-sticker {
  position: absolute;
  font-size: 22px;
  z-index: 3;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  animation: stickerWiggle 3s ease-in-out infinite;
  user-select: none;
}
.photo-sticker:nth-child(1) { top: -8px;   left: -8px;   animation-delay: 0s;    }
.photo-sticker:nth-child(2) { top: -8px;   right: -8px;  animation-delay: 0.6s;  }
.photo-sticker:nth-child(3) { bottom: 16px; left: -8px;  animation-delay: 1.2s;  }
.photo-sticker:nth-child(4) { bottom: 16px; right: -8px; animation-delay: 1.8s;  }

@keyframes stickerWiggle {
  0%,100% { transform: rotate(-8deg)  scale(1);    }
  50%      { transform: rotate( 8deg)  scale(1.15); }
}

/* Crop window — hides the bottom ~22% (dark pants) cleanly */
.hero-photo-crop {
  position: relative;
  z-index: 2;
  width: 260px;
  /* Image is ~2:3 ratio (436x673px). Show top 78% = waist crop */
  height: 320px;
  overflow: hidden;
  border-radius: 28px 28px 22px 22px;
  /* Soft fade at the bottom so the crop looks intentional */
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%, black 72%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    black 0%, black 72%, transparent 100%);
  /* Float animation lives here so stickers don't move with it */
  animation: heroFloat 4s ease-in-out infinite;
}

.hero-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 8px 24px rgba(180,0,80,0.18));
}

@keyframes heroFloat {
  0%,100% { transform: translateY(0);    }
  50%      { transform: translateY(-10px); }
}

.hero-emoji-ring {
  font-size: 34px;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-emoji-ring span {
  display: inline-block;
  animation: popIn 0.5s ease-out backwards;
}
.hero-emoji-ring span:nth-child(1) { animation-delay:0s;    }
.hero-emoji-ring span:nth-child(2) { animation-delay:0.06s; }
.hero-emoji-ring span:nth-child(3) { animation-delay:0.12s; }
.hero-emoji-ring span:nth-child(4) { animation-delay:0.18s; }
.hero-emoji-ring span:nth-child(5) { animation-delay:0.24s; }
.hero-emoji-ring span:nth-child(6) { animation-delay:0.30s; }

@keyframes popIn {
  from { opacity:0; transform:scale(0.3) rotate(-20deg); }
  to   { opacity:1; transform:scale(1)   rotate(0);      }
}

.hero-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(26px, 4.5vw, 50px);
  /* Gradient text — decorative, backed by colour for older browsers */
  color: var(--pink-hero);
  background: linear-gradient(135deg, #d6005c, #7e3aad, #e8307a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

/* Stats row */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  border: 3px solid var(--pink-4);
  border-radius: var(--radius-md);
  padding: 16px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  min-width: 105px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-md);
  border-color: var(--pink-2);
}

.stat-num {
  font-family: 'Pacifico', cursive;
  font-size: 34px;
  color: var(--pink-1);
}

.stat-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-mid);
}

/* CTA button */
.cta-btn {
  background: linear-gradient(135deg, var(--pink-1), var(--purple));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 42px;
  font-size: 19px;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(180,0,80,0.32);
  transition: transform var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  /* Meets tap target */
  min-height: var(--tap-min);
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(180,0,80,0.42);
}

/* ── Section Headings ─────────────────────────────────────── */
.section-title-row   { margin-bottom: 26px; text-align: center; }

.section-heading {
  font-family: 'Pacifico', cursive;
  font-size: 28px;
  color: var(--pink-1);
}

.section-header  { text-align: center; margin-bottom: 34px; }

.section-big-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(24px, 3.8vw, 40px);
  color: var(--pink-1);
  background: linear-gradient(135deg, #d6005c, #7e3aad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-soft);
  font-size: 17px;
  font-weight: 700;
}

/* ── Cards Grid ───────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
  list-style: none;      /* used with role="list" in HTML */
}

/* ── Creation Card ────────────────────────────────────────── */
.creation-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--pink-4);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  position: relative;
  /* Contain internal layout for performance */
  contain: layout;
}

.creation-card:hover {
  transform: translateY(-7px) scale(1.015);
  box-shadow: var(--shadow-lg);
  border-color: var(--pink-3);
}

/* Keyboard focus ring for card */
.creation-card:focus-visible {
  outline: 3px solid var(--pink-1);
  outline-offset: 4px;
  border-color: var(--pink-1);
}

.coming-card          { cursor: default; }
.coming-card:hover    { transform: none; box-shadow: var(--shadow-sm); }

/* Card Banners */
.card-banner {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.candy-banner     { background: linear-gradient(135deg,#ff66aa,#ffb3d5,#ffe4f2); }
.balloon-banner   { background: linear-gradient(135deg,#6bb8d8,#b0e2f5,#d8f5ff); }
.music-banner     { background: linear-gradient(135deg,#7e3aad,#c49ee8,#eedcff); }
.puzzle-banner    { background: linear-gradient(135deg,#e6b800,#ffe566,#fffacc); }
.apple-banner     { background: linear-gradient(135deg,#2d8a4e,#5ec47a,#c8f5d8); }
.minecraft-banner { background: linear-gradient(135deg,#5c8a3c,#8bc34a,#c5e8a0); }
.snake-banner     { background: linear-gradient(135deg,#1a1a2e,#3a3a6e,#6a6aae); }

.card-emoji {
  font-size: 68px;
  display: inline-block;
  will-change: transform;
  animation: gentleBounce 3s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%,100% { transform: translateY(0);    }
  50%      { transform: translateY(-9px); }
}

/* Card Body */
.card-body { padding: 20px; }

.card-badge {
  display: inline-block;
  border-radius: 50px;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.game-badge   { background: var(--pink-4);  color: #8a003a; }
.music-badge  { background: #eedcff;        color: #4a007a; }
.coming-badge { background: #fff3cd;        color: #614a00; }

.card-title {
  font-size: 19px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
  list-style: none;
}

.tag {
  background: var(--pink-5);
  color: #8a003a;
  border: 1.5px solid var(--pink-4);
  border-radius: 50px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
}

/* Play button */
.play-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--pink-1), var(--pink-2));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0 20px;
  height: var(--tap-min);
  font-size: 15px;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 12px rgba(180,0,80,0.28);
  /* Contain for paint efficiency */
  will-change: transform;
}

.play-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(180,0,80,0.40);
}

.disabled-btn {
  background: linear-gradient(90deg, #c9c9c9, #b5b5b5);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.75;
}
.disabled-btn:hover { transform: none; box-shadow: none; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 72px 36px;
  background: white;
  border-radius: var(--radius-lg);
  border: 3px dashed var(--pink-3);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  font-size: 78px;
  margin-bottom: 18px;
  display: inline-block;
  animation: gentleBounce 3.5s ease-in-out infinite;
}

.empty-state h2 {
  font-family: 'Pacifico', cursive;
  font-size: 26px;
  color: var(--pink-1);
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 400px;
  margin: 0 auto 14px;
}

.empty-decoration {
  font-size: 28px;
  letter-spacing: 7px;
  margin-top: 14px;
}

/* ── About ────────────────────────────────────────────────── */
.about-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.about-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 3px solid var(--pink-4);
  padding: 40px 36px 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* About photo */
.about-photo-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 16px;
  padding: 18px 18px 8px;
}

/* Pastel card background behind the photo */
.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 42% 58% / 52% 52% 48% 48%;
  background: linear-gradient(145deg, #ffe4f2 0%, #f0e0ff 50%, #ffe8d6 100%);
  z-index: 0;
  box-shadow: 0 6px 24px rgba(180,0,80,0.12);
}

/* Spinning dashed outer ring */
.about-photo-wrap::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50% 46% 54% 44% / 48% 54% 46% 52%;
  border: 2.5px dashed #f472a8;
  opacity: 0.65;
  animation: spinFrame 14s linear infinite;
  z-index: 0;
}

/* Crop window for about photo */
.about-photo-crop {
  position: relative;
  z-index: 2;
  width: 150px;
  height: 190px;
  overflow: hidden;
  border-radius: 24px 24px 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom,
    black 0%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    black 0%, black 70%, transparent 100%);
  animation: gentleBounce 4s ease-in-out infinite;
}

.about-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: drop-shadow(0 4px 12px rgba(180,0,80,0.15));
}

.about-name {
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  color: var(--pink-1);
  margin-bottom: 16px;
}

.about-bio {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 22px;
}

.about-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 24px;
  list-style: none;
  padding: 0;
}

.interest-tag {
  background: var(--pink-4);
  color: #8a003a;
  border: 2px solid var(--pink-3);
  border-radius: 50px;
  padding: 7px 17px;
  font-size: 13px;
  font-weight: 800;
  transition: background var(--transition), color var(--transition);
  /* Large enough to tap */
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.interest-tag:hover {
  background: var(--pink-1);
  color: white;
}

.about-quote {
  background: var(--pink-5);
  border-left: 4px solid var(--pink-1);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-style: italic;
  font-size: 16px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.about-quote i { color: var(--pink-3); font-size: 15px; flex-shrink: 0; }

/* ── Game Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.68);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  backdrop-filter: blur(5px);
  /* Performance: promote to own layer */
  will-change: opacity;
}

/* Using .open class toggled by JS */
.modal-overlay.open { display: flex; }

/* When hidden attr is removed, show via class */
.modal-overlay:not([hidden]) { display: flex; }

.modal-container {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  border: 4px solid var(--pink-4);
  contain: layout style;
}

.modal-header {
  background: linear-gradient(90deg, #c4004f, #a020c8);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Pacifico', cursive;
  font-size: 20px;
  color: white;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.25);
}

.modal-close {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.45);
  color: white;
  border-radius: 10px;
  /* Meets tap target */
  width: var(--tap-min);
  height: var(--tap-min);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-close:hover { background: rgba(255,255,255,0.32); }
.modal-close:focus-visible {
  outline: 3px solid white;
  outline-offset: 2px;
}

.modal-body { flex: 1; overflow: hidden; }

#game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Footer ───────────────────────────────────────────────── */
#site-footer {
  background: linear-gradient(90deg, #c4004f, #a020c8);
  padding: 26px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-emojis {
  font-size: 20px;
  letter-spacing: 5px;
  margin-bottom: 8px;
  display: block;
}

.footer-text {
  color: white;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.footer-sub {
  color: rgba(255,255,255,0.78);
  font-size: 12px;
}

/* ── Responsive: Tablet ───────────────────────────────────── */
@media (max-width: 768px) {
  #main-nav { display: none; }

  #main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(160deg, #c4004f, #a020c8);
    padding: 12px;
    gap: 6px;
    z-index: 199;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  }

  #main-nav.open .nav-link {
    justify-content: flex-start;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 16px;
  }

  .hamburger         { display: flex; }
  .header-inner      { height: 66px; }
  .site-title        { font-size: 18px; }
  #main-content      { padding: 22px 14px 48px; }
  .hero-block        { padding: 22px 8px 30px; }
  .cards-grid        { grid-template-columns: 1fr; gap: 18px; }
  .modal-container   { height: 96vh; border-radius: var(--radius-md); }
  .stat-card         { min-width: 88px; padding: 13px 16px; }

  /* Hero: stack vertically on tablet — photo on top */
  .hero-layout           { flex-direction: column-reverse; gap: 28px; }
  .hero-photo-crop       { width: 210px; height: 258px; }
  .hero-text-side        { text-align: center; }
  .hero-photo-frame      { margin-bottom: 8px; }
}

/* ── Responsive: Mobile ───────────────────────────────────── */
@media (max-width: 480px) {
  .hero-emoji-ring   { gap: 8px; font-size: 26px; }
  .hero-stats        { gap: 10px; }
  .about-card        { padding: 28px 16px; }
  .site-tagline      { display: none; }
  .hero-photo-crop   { width: 165px; height: 204px; }
  .about-photo-crop  { width: 125px; height: 158px; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .deco-bubble, #site-header, #site-footer, #game-modal, .hamburger { display: none !important; }
  body { background: white; }
  .content-section { display: block !important; }
}
