/* GooPatrol shared styles — implements the "GooPatrol website" design canvas.
   Same-origin only: no external url()s, ever. No inline styles in HTML (CSP). */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/fredoka-latin-wght-v1.woff2") format("woff2-variations"),
       url("/fonts/fredoka-latin-wght-v1.woff2") format("woff2");
}

/* ============================================================
   Tokens (design: project/assets/goopatrol-tokens.json)
   ============================================================ */
:root {
  --goo-green: #7ed957;
  --goo-green-dark: #3f9a2a;
  --goo-purple: #9b5de5;
  --goo-pink: #f15bb5;
  --goo-yellow: #fee440;
  --goo-blue: #00bbf9;
  --bg: #effae6;
  --surface: #ffffff;
  --ink: #1f2a1a;
  --ink-soft: #55644d;
  --yellow-pressed: #f2d61e;
  --green-tint: #ddf5cf;
  --purple-tint: #ebddfa;
  --pink-tint: #fcddf0;
  --blue-tint: #ccf1fe;
  --yellow-tint: #fff6bf;

  --radius-card: 28px;
  --radius-inner: 20px;
  --radius-overlay: 36px;
  --radius-pill: 999px;

  --shadow-press: 0 6px 0 rgb(0 0 0 / 0.12);
  --shadow-overlay: 0 8px 0 rgb(0 0 0 / 0.15);
  --scrim: rgb(31 42 26 / 0.55);
  --focus-ring: 4px solid var(--goo-purple);

  color-scheme: light;

  /* ---------- Mobile (< 600px) — design frame 390 × 844 ---------- */
  --pad: 20px;
  --mascot: 64px;
  --cols: 1;
  --grid-gap: 16px;
  --word: 38px;
  --tag: 22px;
  --head-gap: 12px;
  --head-mb: 24px;
  --illus-h: 104px;
  --card-title: 24px;
  --max-w: none;

  --empty-goo: 140px;
  --empty-h: 30px;
  --empty-pad: 32px;
  --empty-top: 24px;

  --nf-pad: 24px;
  --nf-gap: 14px;
  --nf-goo: 180px;
  --nf-h1: 40px;
  --nf-sub: 22px;

  --g-pad: 16px;
  --g-gap: 16px;
  --g-bar-gap: 10px;
  --g-btn: 56px;
  --g-icon: 28px;
  --g-title: 22px;
  --g-badge-h: 48px;
  --g-badge-pad: 14px;
  --g-badge-font: 18px;
  --g-max-w: none;
  --w-card-max: 358px;
  --w-card-pad: 28px;
  --w-card-gap: 14px;
  --w-goo: 132px;
  --w-h: 34px;
  --w-btn-dir: column;
}

/* ---------- Tablet portrait (≥ 600px) — design frame 820 × 1180, primary ---------- */
@media (min-width: 600px) {
  :root {
    --pad: 40px; --mascot: 88px; --cols: 2; --grid-gap: 24px;
    --word: 52px; --tag: 26px; --head-gap: 18px; --head-mb: 32px;
    --illus-h: 200px; --card-title: 26px;
    --empty-goo: 200px; --empty-h: 40px; --empty-pad: 48px; --empty-top: 96px;
    --nf-pad: 48px; --nf-gap: 18px; --nf-goo: 260px; --nf-h1: 56px; --nf-sub: 26px;
    --g-pad: 24px; --g-gap: 24px; --g-bar-gap: 16px; --g-btn: 64px; --g-icon: 32px;
    --g-title: 32px; --g-badge-h: 56px; --g-badge-pad: 20px; --g-badge-font: 20px;
    --w-card-max: 600px; --w-card-pad: 44px; --w-card-gap: 18px; --w-goo: 180px; --w-h: 48px;
    --w-btn-dir: row;
  }
}

/* ---------- Tablet landscape (≥ 1024px) — design frame 1180 × 820 ---------- */
@media (min-width: 1024px) {
  :root {
    --cols: 3; --illus-h: 180px;
    --empty-goo: 180px; --empty-pad: 40px; --empty-top: 16px;
    --nf-pad: 40px; --nf-gap: 14px; --nf-goo: 220px; --nf-h1: 52px; --nf-sub: 24px;
    --g-gap: 20px;
    --w-card-max: 620px; --w-card-pad: 36px; --w-card-gap: 14px; --w-goo: 150px; --w-h: 44px;
  }
}

/* ---------- Desktop (≥ 1280px) — design frame 1440 × 900 ---------- */
@media (min-width: 1280px) {
  :root {
    --pad: 48px; --mascot: 96px; --cols: 4;
    --word: 56px; --tag: 28px; --head-gap: 20px; --head-mb: 40px;
    --illus-h: 170px; --card-title: 24px; --max-w: 1200px;
    --empty-goo: 200px; --empty-h: 44px; --empty-pad: 48px; --empty-top: 40px;
    --nf-pad: 48px; --nf-gap: 16px; --nf-goo: 240px; --nf-h1: 56px; --nf-sub: 26px;
    --g-pad: 32px; --g-gap: 24px; --g-title: 34px; --g-max-w: 1100px;
    --w-card-max: 640px; --w-card-pad: 44px; --w-card-gap: 16px; --w-goo: 170px; --w-h: 48px;
  }
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
a { color: var(--ink); }

:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }

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

/* Pressable: chunky shadow that collapses as the element drops 6px */
.pressable {
  box-shadow: var(--shadow-press);
  transition: transform 80ms ease, box-shadow 80ms ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.pressable:active { transform: translateY(6px); box-shadow: 0 0 0 rgb(0 0 0 / 0.12); }

/* ============================================================
   Big buttons (primary yellow, secondary white)
   ============================================================ */
.goo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
  background: var(--goo-yellow);
}
.goo-button:active { background: var(--yellow-pressed); }
.goo-button svg { width: 30px; height: 30px; flex: 0 0 auto; }
.goo-button--secondary { background: var(--surface); box-shadow: inset 0 0 0 4px var(--green-tint), var(--shadow-press); }
.goo-button--secondary:active { background: var(--surface); box-shadow: inset 0 0 0 4px var(--green-tint); }

/* Round icon buttons (home, sound) */
.round-button {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--g-btn);
  height: var(--g-btn);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--goo-yellow);
  text-decoration: none;
}
.round-button svg { width: var(--g-icon); height: var(--g-icon); }
.round-button--sound { background: var(--surface); }
.round-button--sound[aria-pressed="true"] { background: var(--goo-blue); }
.round-button--sound .sound-on { display: none; }
.round-button--sound[aria-pressed="true"] .sound-on { display: inline; }
.round-button--sound[aria-pressed="true"] .sound-off { display: none; }

/* Streak dot */
.dot {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--goo-green-dark);
}

/* ============================================================
   Home
   ============================================================ */
.home { padding: var(--pad) var(--pad) calc(var(--pad) + 8px); }
.home__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--head-mb);
}

.site-header { display: flex; align-items: center; gap: var(--head-gap); }
.site-header .mascot { width: var(--mascot); height: var(--mascot); flex: 0 0 auto; }
.site-header__text { display: flex; flex-direction: column; gap: 2px; }
.wordmark { font-size: var(--word); line-height: 1; font-weight: 700; letter-spacing: -0.01em; }
.wordmark__goo { color: var(--goo-green-dark); }
.wordmark__patrol { color: var(--goo-purple); }
.site-tagline { font-size: var(--tag); line-height: 1.3; font-weight: 600; color: var(--ink); }

.mission-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}

/* Mission groups (one per Gooville neighbourhood) */
.mission-groups { display: flex; flex-direction: column; gap: calc(var(--grid-gap) * 1.75); }
.mission-group__title { margin: 0 0 12px; display: flex; }
.district-sign {
  --d-col: var(--goo-green-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
}
.district-sign-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--d-col);
  box-shadow: 0 3px 0 rgb(0 0 0 / 0.12);
}
.district-sign-icon svg { width: 26px; height: 26px; }
.more-missions { margin-top: calc(var(--grid-gap) * 1.5); align-self: center; }
nav[aria-label="Missions"] { display: flex; flex-direction: column; }
.more-missions[hidden] { display: none; }

/* Age picker (choice saved on the device only) */
.age-chip {
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 18px 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-press);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.age-chip svg { width: 36px; height: 29px; }
.age-chip[hidden] { display: none; }

.age-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-press);
}
.age-pick[hidden] { display: none; }
.age-pick__title { font-size: 28px; line-height: 1.2; font-weight: 700; text-align: center; }
.age-pick__row { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 12px; width: 100%; justify-content: center; }
.age-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 112px;
  padding: 10px 4px 12px;
  border: 0;
  border-radius: var(--radius-inner);
  background: var(--green-tint);
  box-shadow: var(--shadow-press);
  font: inherit;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.age-btn svg { width: 64px; height: 52px; }
.age-btn.is-current { background: var(--yellow-tint); box-shadow: inset 0 0 0 4px var(--goo-yellow), var(--shadow-press); }
.age-pick__note { font-size: 16px; font-weight: 500; color: var(--ink-soft); }
@media (max-width: 599.98px) {
  .age-pick__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .age-chip { min-height: 56px; font-size: 20px; padding: 0 14px 0 10px; }
  .district-sign { font-size: 22px; }
}

/* Mission card — tone classes cycle by position */
.tone-0 { --tone: var(--goo-green);  --tone-tint: var(--green-tint);  --tone-blob: #7ed957; }
.tone-1 { --tone: var(--goo-purple); --tone-tint: var(--purple-tint); --tone-blob: #9b5de5; }
.tone-2 { --tone: var(--goo-pink);   --tone-tint: var(--pink-tint);   --tone-blob: #f15bb5; }
.tone-3 { --tone: var(--goo-blue);   --tone-tint: var(--blue-tint);   --tone-blob: #00bbf9; }
.tone-4 { --tone: var(--goo-yellow); --tone-tint: var(--yellow-tint); --tone-blob: #f2cf00; }

.mission-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius-card);
  border-bottom: 8px solid var(--tone);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.mission-card__illus {
  position: relative;
  height: var(--illus-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-inner);
  background: var(--tone-tint);
}
.mission-card__illus svg { height: 55%; width: auto; aspect-ratio: 6 / 5; }
.mission-card__illus .blob { fill: var(--tone-blob); }
.mission-card__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 8px 8px;
  min-width: 0;
}
.mission-card__title,
.mission-card__desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-card__title { font-size: var(--card-title); line-height: 1.2; font-weight: 700; }
.mission-card__desc { font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--ink-soft); }

.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}
.streak-chip--card {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 36px;
  padding: 0 14px 0 10px;
  background: var(--surface);
  box-shadow: 0 3px 0 rgb(0 0 0 / 0.12);
}
.streak-chip--card .dot { width: 16px; height: 16px; }
.streak-chip--row {
  display: none;
  align-self: flex-start;
  height: 32px;
  margin-top: 4px;
  padding: 0 12px 0 8px;
  background: var(--green-tint);
}
.streak-chip--row .dot { width: 14px; height: 14px; }

/* Mobile: row variant (illustration left, text right) */
@media (max-width: 599.98px) {
  .mission-card { flex-direction: row; align-items: center; gap: 4px; min-height: 136px; }
  .mission-card__illus { flex: 0 0 104px; height: 104px; }
  .mission-card__illus svg { width: 72px; height: 60px; }
  .mission-card__text { gap: 4px; padding: 0 12px 0 14px; flex: 1 1 auto; }
  .streak-chip--card { display: none; }
  .streak-chip--row { display: inline-flex; }
}

/* Empty state */
.empty { display: flex; justify-content: center; padding-top: var(--empty-top); }
.empty[hidden] { display: none; }
.empty__card {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: var(--empty-pad);
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-press);
  text-align: center;
}
.empty__card .mascot { width: var(--empty-goo); height: var(--empty-goo); }
.empty__card h2 { font-size: var(--empty-h); line-height: 1.15; font-weight: 700; color: var(--goo-green-dark); }
.empty__card p { font-size: 22px; line-height: 1.4; font-weight: 500; color: var(--ink-soft); }

/* ============================================================
   404
   ============================================================ */
.not-found {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--nf-gap);
  padding: var(--nf-pad);
  text-align: center;
}
.not-found .mascot { width: var(--nf-goo); height: var(--nf-goo); }
.not-found h1 { font-size: var(--nf-h1); line-height: 1.1; font-weight: 700; color: var(--goo-green-dark); }
.not-found p { font-size: var(--nf-sub); line-height: 1.4; font-weight: 500; color: var(--ink-soft); }
.not-found .goo-button { margin-top: 16px; padding: 0 36px 0 28px; }

/* ============================================================
   Game shell (shared/game-shell.js)
   ============================================================ */
.game {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--g-gap);
  padding: var(--g-pad);
}
.game__bar {
  width: 100%;
  max-width: var(--g-max-w);
  display: flex;
  align-items: center;
  gap: var(--g-bar-gap);
}
.game__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--g-title);
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.streak-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--g-badge-h);
  padding: 0 var(--g-badge-pad) 0 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-press);
  font-size: var(--g-badge-font);
  font-weight: 600;
  white-space: nowrap;
}
.streak-badge[hidden] { display: none; }
.streak-badge__best { color: var(--ink-soft); }
.streak-badge__short { display: none; }
@media (max-width: 599.98px) {
  .streak-badge__full { display: none; }
  .streak-badge__short { display: inline; }
}

.game__play {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--g-max-w);
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-press);
}

/* Win overlay */
.win {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--g-pad);
  background: var(--scrim);
}
.win[hidden] { display: none; }
.win__blob { position: absolute; pointer-events: none; }
.win__card {
  position: relative;
  width: 100%;
  max-width: var(--w-card-max);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--w-card-gap);
  padding: var(--w-card-pad);
  background: var(--surface);
  border-radius: var(--radius-overlay);
  box-shadow: var(--shadow-overlay);
  text-align: center;
}
.win__card .mascot { width: var(--w-goo); height: var(--w-goo); }
.win__card h2 { font-size: var(--w-h); line-height: 1.1; font-weight: 700; color: var(--goo-green-dark); }
.win__streak {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 20px 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--green-tint);
  font-size: 22px;
  font-weight: 600;
}
.win__streak[hidden] { display: none; }
.win__actions {
  width: 100%;
  display: flex;
  flex-direction: var(--w-btn-dir);
  gap: 16px;
  margin-top: 8px;
}
.win__actions .goo-button { flex: 1 1 0; }

.win__note {
  font-size: 22px;
  font-weight: 700;
  color: var(--goo-purple);
}
.win__note[hidden] { display: none; }

/* ============================================================
   Mission runner (shared/mission.js)
   ============================================================ */

/* Start screen: level picker */
.mission-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vh, 40px);
  padding: 24px;
}
.mission-start__goo { width: clamp(120px, 22vh, 220px); height: auto; }
.level-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.level-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: clamp(104px, 26vw, 180px);
  min-height: clamp(120px, 18vh, 170px);
  padding: 16px 12px;
  border: 0;
  border-radius: var(--radius-card);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  background: var(--green-tint);
}
.level-btn--1 { background: var(--purple-tint); }
.level-btn--2 { background: var(--pink-tint); }
.level-btn.is-current { background: var(--goo-yellow); }
.level-btn__drops { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.level-btn__drops svg { width: 24px; height: 30px; fill: var(--goo-green-dark); }
.level-btn--1 .level-btn__drops svg { fill: var(--goo-purple); }
.level-btn--2 .level-btn__drops svg { fill: var(--goo-pink); }
.level-btn__dots { display: flex; gap: 6px; }
.level-btn__dots span { width: 14px; height: 14px; border-radius: 50%; background: rgb(31 42 26 / 0.18); }
.level-btn__dots span.is-on { background: var(--goo-green-dark); }
.level-btn.is-locked { cursor: default; box-shadow: none; background: #e6eee0; color: var(--ink-soft); }
.level-btn.is-locked .level-btn__drops { opacity: 0.35; }
.level-btn__lock { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; }
.level-btn.is-locked:active { transform: none; }

/* Route: 5 stops with Goo on the current one */
.mission-route {
  list-style: none;
  margin: 0;
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 28px);
}
.mission-route__stop {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mission-route__stop.is-done { background: var(--goo-green-dark); }
.mission-route__stop.is-current { width: 40px; height: 40px; background: var(--goo-yellow); }
.mission-route__stop img { width: 34px; height: 34px; }

/* Prompt row (game fills it) + stage */
.mission-prompt {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  font-size: 28px;
  font-weight: 700;
}
.mission-prompt:empty { min-height: 16px; }
.mission-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.game__play:has(.mission-stage) { display: flex; flex-direction: column; }

/* Hint ring (follows its target) */
.hint-ring {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  border-radius: 50%;
  border: 6px solid var(--goo-purple);
  box-shadow: 0 0 0 6px rgb(155 93 229 / 0.25);
  animation: hint-pulse 900ms ease-in-out infinite;
}
@keyframes hint-pulse { 50% { scale: 1.12; opacity: 0.7; } }

/* Round-complete splash */
.round-splash {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgb(255 255 255 / 0.55);
}
.round-splash img { width: clamp(140px, 30vh, 240px); height: auto; animation: goo-pop-in 320ms cubic-bezier(.2, 1.4, .5, 1) both; }

/* Colour marks (shared/colour-marks.js): size via the container */
.colour-mark { display: block; width: 100%; height: 100%; pointer-events: none; }

/* Common "wrong" feedback games can add to an element for one shake */
@keyframes goo-wobble { 20% { rotate: -8deg; } 40% { rotate: 7deg; } 60% { rotate: -5deg; } 80% { rotate: 3deg; } }
.is-wobbling { animation: goo-wobble 420ms ease-in-out; }

/* Entrance animations — decoration only */
@keyframes goo-pop-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes goo-drop-in { from { translate: 0 -40px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.win:not([hidden]) .win__card { animation: goo-pop-in 260ms cubic-bezier(.2, 1.4, .5, 1) both; }
.win:not([hidden]) .win__blob { animation: goo-drop-in 420ms ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }

  /* Keep feedback that doesn't move: a wrong answer dims briefly instead of wobbling,
     and the hint ring glows instead of pulsing in size. (Class selectors beat `*`.) */
  .is-wobbling { animation: goo-flash 420ms ease-in-out !important; }
  .hint-ring { animation: hint-glow 1200ms ease-in-out infinite !important; }
}
@keyframes goo-flash { 50% { filter: brightness(0.72) saturate(0.55); opacity: 0.75; } }
@keyframes hint-glow { 50% { opacity: 0.45; } }
