/* ==========================================================
   بسيط — Coming soon "video" stage
   Mobile-first. Motion rules (MVP doc): max 2–3 moving things
   at once, no flashing, soft sounds, respects reduced motion.
   ========================================================== */

:root {
  --ink: #2B2D42;
  --ink-soft: #4A4E69;
  --purple: #6C5CE7;
  --purple-dark: #5243C9;
  --orange: #FF7A59;
  --teal: #2EC4B6;
  --yellow: #FFC93C;
  --white: #FFFFFF;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(43, 45, 66, .14);
  --font: "Baloo Bhaijaan 2", "Tahoma", "Segoe UI", system-ui, sans-serif;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --guide: clamp(92px, 24vw, 170px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 201, 60, .25), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(46, 196, 182, .25), transparent 40%),
    linear-gradient(160deg, #3B2F8F, #5243C9 55%, #2B2D42);
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Wrapper + stage ---------- */
.wrap {
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100dvh;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
           max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}

.stage {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 100%;
  max-height: 720px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #BDE7FF 0%, #E4F5FF 50%, #FFF4D6 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  isolation: isolate;
}

/* ---------- Sky ---------- */
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute;
  background: var(--white);
  border-radius: 999px;
  opacity: .8;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 55%; height: 160%; top: -70%; right: 15%; }
.cloud::after  { width: 40%; height: 130%; top: -45%; left: 12%; }
.cloud--1 { width: 130px; height: 36px; top: 14%; animation-duration: 80s; animation-delay: -20s; }
.cloud--2 { width: 100px; height: 28px; top: 48%; animation-duration: 110s; animation-delay: -70s; opacity: .6; }
@keyframes drift { from { transform: translateX(-40vw); } to { transform: translateX(140vw); } }

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 17; }

/* ---------- Promo video (video mode) ---------- */
.video-wrap {
  grid-row: 2;            /* same cell as the animated scene area */
  position: relative;
  min-height: 0;
  background: #FFFDF9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video {
  width: 100%;
  height: 100%;
  object-fit: contain;    /* letterbox: never crops the promo */
  display: block;
}
/* In video mode only the video + caption bubble show; hide every animated layer */
.stage.video-mode .props,
.stage.video-mode .guide,
.stage.video-mode .dialog,
.stage.video-mode .sky { display: none; }
.stage.video-mode { background: #FFFDF9; }
.stage.video-mode .video-wrap {
  grid-row: 2 / 4;                     /* scene + dialog rows */
  background: #FFFDF9;
  overflow: hidden;
}
/* Lock the video itself to the promo's 9:16 and center it. object-fit: contain
   then fills this exact-ratio box with zero bars and zero cropping. */
.stage.video-mode .video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Playful doodles in the blank frame around the video ---- */
.doodles { display: none; }
.stage.video-mode .doodles {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;               /* behind the video (video has no bg, so it stays on top visually) */
  pointer-events: none;
  overflow: hidden;
}
.stage.video-mode .video { position: relative; z-index: 1; }
.doodle {
  position: absolute;
  width: clamp(34px, 6vw, 60px);
  opacity: .9;
  filter: drop-shadow(0 4px 6px rgba(43,45,66,.12));
  animation: doodle-float 6s ease-in-out infinite;
}
.d1 { top: 8%;  left: 4%;  animation-delay: -0.3s; }
.d2 { top: 30%; left: 6%;  animation-delay: -2.1s; }
.d3 { top: 55%; left: 3%;  animation-delay: -1.2s; }
.d4 { top: 78%; left: 7%;  animation-delay: -3.4s; }
.d5 { top: 10%; right: 5%; animation-delay: -1.8s; }
.d6 { top: 34%; right: 4%; animation-delay: -0.9s; }
.d7 { top: 58%; right: 6%; animation-delay: -2.7s; }
.d8 { top: 80%; right: 4%; animation-delay: -3.9s; }
@keyframes doodle-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-12px) rotate(4deg); }
}
/* Narrow screens (phones/portrait): the video would fill the width and hide the
   side icons, so cap its height and move the doodles into the clear top/bottom strips. */
@media (max-width: 560px), (max-aspect-ratio: 3 / 4) {
  .stage.video-mode .video-wrap {
    padding: 64px 0;                 /* clear strips above and below the video */
  }
  /* top strip */
  .d1 { top: 10px;  left: 6%;  }   .d2 { top: 26px; left: 30%; }
  .d5 { top: 10px;  right: 6%; }   .d6 { top: 26px; right: 30%; }
  /* bottom strip (above the controls bar) */
  .d3 { top: auto; bottom: 64px; left: 8%;  }
  .d4 { top: auto; bottom: 78px; left: 34%; }
  .d7 { top: auto; bottom: 64px; right: 8%; }
  .d8 { top: auto; bottom: 78px; right: 34%; }
}
@media (prefers-reduced-motion: reduce) {
  .doodle { animation: none; }
}
/* Make the box chrome blend with the video's cream backdrop (one continuous surface) */
.stage.video-mode .controls {
  background: #FFFDF9;
  color: var(--ink);
  border-top: 1px solid rgba(43, 45, 66, .08);
}
.stage.video-mode .ctrl { color: var(--ink); }
.stage.video-mode .ctrl:hover { background: rgba(43, 45, 66, .08); }
.stage.video-mode .seg::before { background: rgba(43, 45, 66, .18); }
.stage.video-mode .seg::after { background: var(--purple); }
.stage.video-mode .ctrl--text { color: var(--purple-dark); }
.stage.video-mode .toast { background: rgba(43, 45, 66, .9); }

/* Final email card shown over the stage when the video ends */
.final-overlay {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, #3B2F8F, #2B2D42);
  color: var(--white);
  overflow-y: auto;
}
.final-overlay[hidden] { display: none; }
.stage.is-final .dialog { visibility: hidden; }
.final-overlay .big-logo { color: #fff; text-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.final-overlay .notify { color: var(--ink); width: min(100%, 440px); }

/* ---------- Top bar ---------- */
.stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 0;
}
.mini-logo { font-size: 1.6rem; font-weight: 800; color: var(--purple); }
.badge {
  display: inline-block;
  padding: 2px 16px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  box-shadow: var(--shadow);
}

/* ---------- Props (scene content) ---------- */
.props {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 28px);
  padding: 8px 14px;
  min-height: 0;
  overflow: hidden;
}
.prop { animation: drop-bounce .9s var(--bounce) var(--d, 0s) both; }

.pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--purple-dark);
  font-weight: 800;
  font-size: clamp(1rem, 3.8vw, 1.3rem);
  box-shadow: var(--shadow);
}
.pill--teal { color: #14857A; }
.pill--orange { color: #C2410C; }

.big-logo {
  font-size: clamp(4rem, 20vw, 8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--purple);
  text-shadow: 0 6px 0 rgba(108, 92, 231, .18);
}
.col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.sparkle { width: clamp(36px, 9vw, 64px); }
.sparkle--lg { width: clamp(56px, 14vw, 96px); }

.tile {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: clamp(92px, 26vw, 160px);
  padding: 12px 8px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  border-bottom: 5px solid var(--accent, var(--purple));
}
.tile svg { width: 70%; height: auto; }
.tile span { font-weight: 800; font-size: clamp(.95rem, 3.6vw, 1.2rem); color: var(--accent, var(--purple)); filter: brightness(.85); }

/* Episode "screen" with a bouncing ball inside */
.screen {
  position: relative;
  width: clamp(200px, 56vw, 300px);
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: var(--ink);
  padding: 10px;
  box-shadow: var(--shadow);
}
.screen__inner {
  position: relative;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, #7FDBFF, #E4F5FF);
  overflow: hidden;
}
.screen__ball {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 18%;
  aspect-ratio: 1;
  margin-left: -9%;
  border-radius: 50%;
  background: var(--orange);
  animation: ball 1.1s cubic-bezier(.5, 0, .5, 1) 1s infinite alternate;
}
.screen__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 12%; background: var(--teal); }
@keyframes ball {
  from { transform: translateY(-160%) scale(1, 1); }
  to   { transform: translateY(0) scale(1.15, .85); }
}

/* Mini game: apple goes into the basket, then a check pops */
.game { position: relative; width: 280px; height: 170px; }
.game__basket { position: absolute; left: 16px; bottom: 0; width: 110px; }
.game__apple  {
  position: absolute; right: 20px; top: 10px; width: 64px;
  animation: apple-in 1.3s ease-in-out 1.5s forwards;
}
.game__check {
  position: absolute; left: 46px; top: -6px; width: 54px;
  opacity: 0;
  animation: pop-in .5s var(--bounce) 2.9s forwards;
}
@keyframes apple-in {
  0%   { transform: translate(0, 0) rotate(0); }
  50%  { transform: translate(-80px, -30px) rotate(-20deg); }
  100% { transform: translate(-157px, 52px) rotate(-40deg) scale(.85); }
}

.spin-once { animation: spin 1.4s ease-in-out 1s both; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }

.icon-xl { width: clamp(90px, 24vw, 150px); }

/* Final card + notify form */
.final { width: min(100%, 520px); }
.notify {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .85);
  box-shadow: var(--shadow);
  text-align: center;
}
.notify h2 { margin: 0 0 8px; font-size: clamp(1.1rem, 4.4vw, 1.4rem); }
.notify__form { display: flex; flex-direction: column; gap: 8px; }
.notify__row { display: flex; flex-direction: column; gap: 8px; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: start;
  font-size: .92rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--purple); }
.notify__privacy { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn:disabled { opacity: .6; cursor: wait; }
.notify__form input[type="email"] {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 2px 4px rgba(43, 45, 66, .08);
}
.notify__form input[type="email"]:focus { outline: none; border-color: var(--purple); }
.notify__form input[type="email"][aria-invalid="true"] { border-color: var(--orange); }
.notify__msg { min-height: 1.5em; margin: 6px 0 0; font-weight: 700; }
.notify__msg.is-ok { color: #14857A; }
.notify__msg.is-error { color: #C2410C; }

.btn {
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 5px 0 var(--purple-dark);
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--purple-dark); }
.btn:focus-visible { outline: 4px solid var(--orange); outline-offset: 3px; }

/* ---------- Thumbs up ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 44px;
  padding: 0 12px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: var(--white);
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow);
  transition: background .2s, color .2s;
}
.like-btn svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }
.like-btn .like-num:empty { display: none; }
.like-btn.is-liked { background: var(--purple); color: var(--white); }
.like-btn:focus-visible { outline: 4px solid var(--orange); outline-offset: 3px; }
.like-btn.is-pop { animation: like-pop .5s var(--bounce); }

.like-btn--big {
  min-height: 60px;
  padding: 0 30px;
  font-size: 1.35rem;
  border-width: 3px;
  box-shadow: 0 6px 0 var(--purple-dark);
}
.like-btn--big svg { width: 30px; height: 30px; }
.like-btn--big:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--purple-dark); }

.like-cta { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.like-count { margin: 0; min-height: 1.5em; font-weight: 700; color: var(--ink-soft); }

@keyframes like-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18) rotate(-8deg); }
  100% { transform: scale(1); }
}

.big-logo--sm { font-size: clamp(2.6rem, 12vw, 4.6rem); }

/* ---------- Dialog: Guide + bubble ---------- */
.dialog {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 10px;
}

.guide { flex: 0 0 var(--guide); width: var(--guide); }
.guide svg { display: block; width: 100%; height: auto; overflow: visible; }

.guide__body   { transform-box: view-box; transform-origin: 100px 170px; animation: float 3.2s ease-in-out infinite; }
.guide__shadow { transform-box: view-box; transform-origin: 100px 190px; animation: shadow 3.2s ease-in-out infinite; }
.guide__wave   { transform-box: view-box; transform-origin: 156px 112px; }
.guide__eyes   { transform-box: view-box; transform-origin: 100px 96px; animation: blink 4.5s ease-in-out infinite; }
.guide__mouth  { transform-box: view-box; transform-origin: 100px 128px; opacity: 0; }

.guide.mood-wave  .guide__wave { animation: wave 2.2s ease-in-out infinite; }
.guide.mood-happy .guide__body { animation: jump .7s var(--bounce) 3; }
.guide.mood-happy .guide__wave { animation: wave .4s ease-in-out 6; }
.guide.mood-gentle .guide__body { animation: tilt 2.4s ease-in-out infinite; }

/* Talking: smile becomes an opening/closing mouth */
.guide.is-talking .guide__smile { opacity: 0; }
.guide.is-talking .guide__mouth { opacity: 1; animation: talk .26s ease-in-out infinite alternate; }

.bubble {
  position: relative;
  flex: 1;
  min-height: 84px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}
/* Tail points right, toward the Guide (RTL start side) */
.bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  margin-top: -12px;
  border: 12px solid transparent;
  border-left-color: var(--white);
  border-right: 0;
}
.bubble__text {
  margin: 0;
  font-size: clamp(1.15rem, 4.6vw, 1.8rem);
  font-weight: 700;
  line-height: 1.45;
}
.caret {
  display: inline-block;
  width: 3px; height: 1.05em;
  margin-inline-start: 3px;
  vertical-align: -.15em;
  border-radius: 2px;
  background: var(--purple);
  animation: caret 1s steps(1) infinite;
}

/* ---------- Controls ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: rgba(43, 45, 66, .88);
  color: var(--white);
}
.ctrl {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ctrl svg { width: 24px; height: 24px; fill: currentColor; }
.ctrl:hover { background: rgba(255, 255, 255, .12); }
.ctrl:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
.ctrl--text { width: auto; padding: 0 14px; border-radius: 999px; font: inherit; font-weight: 700; }

.ctrl .i-play, .ctrl .i-replay, .ctrl .i-mute { display: none; }
.stage.is-paused .ctrl .i-pause { display: none; }
.stage.is-paused .ctrl .i-play  { display: block; }
.stage.is-ended .ctrl .i-pause,
.stage.is-ended .ctrl .i-play   { display: none; }
.stage.is-ended .ctrl .i-replay { display: block; }
.stage.is-muted .ctrl .i-vol  { display: none; }
.stage.is-muted .ctrl .i-mute { display: block; }

.segments { flex: 1; display: flex; gap: 4px; min-width: 0; }
.seg {
  position: relative;
  flex: 1;
  height: 28px;           /* tall tap target, thin visual bar */
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.seg::before {
  content: "";
  position: absolute;
  inset: 11px 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .3);
}
.seg::after {
  content: "";
  position: absolute;
  inset: 11px auto 11px 0;
  right: 0;
  border-radius: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: right;   /* fills right-to-left (RTL) */
}
.seg.is-done::after { transform: scaleX(1); }
.seg.is-current::after { transform: scaleX(.5); transition: transform .4s ease; }
.seg:focus-visible { outline: 2px solid var(--yellow); }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  top: 58px;
  left: 50%;
  z-index: 18;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(43, 45, 66, .9);
  color: var(--white);
  font-size: .95rem;
  text-align: center;
  transform: translate(-50%, -10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Poster ---------- */
.poster {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, #BDE7FF, #FFF4D6);
  transition: opacity .5s ease, visibility .5s;
}
.poster.is-hidden { opacity: 0; visibility: hidden; }
.poster__guide { width: clamp(130px, 34vw, 200px); animation: drop-bounce 1s var(--bounce) .1s both; }
.poster__guide svg { width: 100%; height: auto; overflow: visible; }
.poster__guide .guide__wave { animation: wave 2.2s ease-in-out infinite; }
.poster__logo {
  margin: 0;
  font-size: clamp(3.4rem, 16vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--purple);
  text-shadow: 0 6px 0 rgba(108, 92, 231, .18);
  animation: drop-bounce 1s var(--bounce) .3s both;
}
.poster__tag { margin: 0 0 10px; font-size: clamp(1.05rem, 4vw, 1.35rem); color: var(--ink-soft); font-weight: 500; }
.poster__play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: var(--white);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 7px 0 var(--purple-dark), 0 0 0 0 rgba(108, 92, 231, .5);
  animation: pop-in .6s var(--bounce) .7s both, ring 2.4s ease-out 1.6s infinite;
}
.poster__play svg { width: 30px; height: 30px; fill: currentColor; }
.poster__play:active { transform: translateY(4px); }
.poster__play:focus-visible { outline: 4px solid var(--orange); outline-offset: 4px; }
.poster__hint {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 14px 0 0; color: var(--ink-soft); font-size: .95rem;
}
.poster__hint svg { width: 20px; height: 20px; fill: currentColor; }

/* ==========================================================
   Tablet (≥ 600px)
   ========================================================== */
@media (min-width: 600px) {
  .wrap { padding: 20px; }
  .stage { border-radius: 32px; }
  .stage__top { padding: 16px 24px 0; }
  .props { padding: 12px 24px; }
  .dialog { padding: 0 24px 14px; gap: 18px; }
  .bubble { min-height: 100px; padding: 18px 26px; }
  .controls { padding: 10px 16px; gap: 10px; }
  .notify__row { flex-direction: row; }
  .notify__row input[type="email"] { flex: 1; }
  .game { transform: scale(1.15); }
}

/* Short landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --guide: 84px; }
  .wrap { padding: 4px; }
  .stage { border-radius: 16px; }
  .stage__top { padding: 6px 14px 0; }
  .mini-logo { font-size: 1.2rem; }
  .bubble { min-height: 60px; padding: 8px 16px; }
  .bubble__text { font-size: 1.1rem; }
  .big-logo { font-size: 3.4rem; }
  .tile { width: 96px; padding: 6px; }
  .poster__guide { width: 90px; }
  .poster__logo { font-size: 3rem; }
  .poster__tag { margin-bottom: 4px; }
  .game { transform: scale(.8); }
  .final .big-logo { display: none; }   /* mini logo in the top bar is enough */
  .props { overflow-y: auto; }
}

/* Portrait tablets: use more of the tall screen */
@media (min-width: 600px) and (orientation: portrait) {
  .stage { max-height: 1000px; }
}

/* ---------- Keyframes ---------- */
@keyframes drop-bounce {
  0%   { opacity: 0; transform: translateY(-70px) scale(.9); }
  60%  { opacity: 1; transform: translateY(8px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pop-in { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: scale(1); } }
@keyframes float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.85); } }
@keyframes wave   { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(10deg); } }
@keyframes blink  { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes jump   { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-26px) scale(1.05, .95); } }
@keyframes tilt   { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes talk   { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes caret  { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@keyframes ring   {
  0%   { box-shadow: 0 7px 0 var(--purple-dark), 0 0 0 0 rgba(108, 92, 231, .45); }
  100% { box-shadow: 0 7px 0 var(--purple-dark), 0 0 0 22px rgba(108, 92, 231, 0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .cloud { display: none; }
  .game__check { opacity: 1; }
}
