:root {
  --bg: #cfedff;
  --bg-deep: #92d6ef;
  --panel: #ffffff;
  --ocean: #0b6ea3;
  --ocean-deep: #03334b;
  --ink: #0f2a3d;
  --ink-soft: #4a6e82;

  /* V4 palette — saturation bump +20-25% per Codex. */
  --common: #2db84a;
  --common-soft: #dcf6e0;
  --uncommon: #1c7fe8;
  --uncommon-soft: #d7e7fb;
  --rare: #a344ea;
  --rare-soft: #efdffb;
  --legendary: #ffb81a;
  --legendary-soft: #fff0c9;
  --mythic: #ff3fcf;
  --mythic-soft: #ffe0f6;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 24px -12px rgba(5, 61, 91, 0.28), 0 2px 6px rgba(5, 61, 91, 0.1);
  --shadow-soft: 0 2px 8px rgba(5, 61, 91, 0.08);
  --shadow-chunky: 0 6px 0 rgba(5, 61, 91, 0.12), 0 12px 28px -10px rgba(5, 61, 91, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Nunito", "Quicksand", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #e9f8fd 0%, var(--bg) 45%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  /* Mobile cheap wins: dvh follows the iOS URL bar (no jump when it hides);
     safe-area keeps the home indicator off the bottom FAB row. */
  padding: 18px 22px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
  overscroll-behavior: none;
}

/* Mobile: kill the 300ms tap delay + double-tap-to-zoom on every button.
   One row below overrides it for the catches list, which needs pan-y. */
button { touch-action: manipulation; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; color: var(--ocean-deep); }
h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  position: relative;
}
/* V5 subtle game-panel header: gradient fill + small 3D offset shadow */
.panel h2 {
  color: #0a436b;
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 rgba(10, 67, 107, 0.14);
  letter-spacing: 0.02em;
}

/* --- Header --- */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
/* V5 stylized game-logo title — 3D outlined text with warm gradient fill */
.title {
  /* V12: bumped all three stops +20% per Sebastian's request. */
  font-size: clamp(2.64rem, 5.04vw, 4.08rem);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffd85c;
  text-shadow:
    /* outline ring */
    -2px 0 #0b3d62, 2px 0 #0b3d62, 0 -2px #0b3d62, 0 2px #0b3d62,
    -2px -2px #0b3d62, 2px -2px #0b3d62, -2px 2px #0b3d62, 2px 2px #0b3d62,
    /* 3D offset stack */
    0 4px 0 #0b3d62,
    0 6px 0 #0b3d62,
    0 8px 0 rgba(11, 61, 98, 0.55),
    /* soft drop */
    0 14px 18px rgba(11, 61, 98, 0.35);
  padding: 6px 4px 14px;
  animation: titleBreathe 4.8s ease-in-out infinite;
  line-height: 1.05;
}
@keyframes titleBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2px) scale(1.02); }
}
.title-emoji {
  font-size: 0.9em;
  color: initial;
  text-shadow:
    0 3px 2px rgba(11, 61, 98, 0.4),
    0 5px 8px rgba(11, 61, 98, 0.25);
  animation: bob 3.2s ease-in-out infinite;
}
.title-emoji:last-child { animation-delay: -1.6s; }

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1280px;
  justify-content: center;
  flex-wrap: wrap;
}

.pearls {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, #fff6df 0%, #ffdf87 100%);
  color: #5b4011;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #c99b2d, 0 6px 14px rgba(201, 155, 45, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  letter-spacing: 0.01em;
}
.pearls:hover { filter: brightness(1.04); transform: translateY(-1px); }
.pearls:active { transform: translateY(2px); box-shadow: 0 1px 0 #c99b2d, 0 2px 6px rgba(201, 155, 45, 0.3); }
.pearls-emoji { font-size: 1.2rem; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)); }
.pearls-count { font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }

.pearls.popping { animation: pearlsPop 320ms cubic-bezier(.3,1.5,.5,1); }
@keyframes pearlsPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(-2deg); box-shadow: 0 6px 0 #c99b2d, 0 0 24px 4px rgba(242, 179, 58, 0.55); }
  100% { transform: scale(1); }
}

.buff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  justify-content: center;
  width: 100%;
}

.next-goal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 14px;
  background: var(--panel);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  color: var(--ocean-deep);
  font-size: 0.95rem;
  max-width: 92vw;
}
.next-goal-emoji { font-size: 1.3rem; }
.next-goal-text { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.next-goal-head { font-size: 0.7rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.next-goal-label { font-size: 0.95rem; }
.next-goal-bar {
  position: relative;
  width: 140px;
  height: 8px;
  background: #e1ecf4;
  border-radius: 999px;
  overflow: hidden;
}
.next-goal-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #3a8dde, #a05ad8);
  border-radius: 999px;
  transition: width 400ms ease;
}
.next-goal.complete {
  background: linear-gradient(120deg, #fff6df 0%, #fee6a3 100%);
  animation: goalGlow 2.2s ease-in-out infinite;
}
@keyframes goalGlow {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: var(--shadow-soft), 0 0 18px 4px rgba(242, 179, 58, 0.35); }
}

.buff-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 2px solid var(--common);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  animation:
    pillPop 440ms cubic-bezier(.3, 1.7, .45, 1) both,
    pillGlowSweep 720ms ease-out both;
  isolation: isolate;
}

.buff-pill.autoreel-pill {
  border-color: #58c8e8;
  --pill-tint: #cdf0fb;
  animation:
    pillPop 440ms cubic-bezier(.3, 1.7, .45, 1) both,
    autoreelPulse 1.6s ease-in-out infinite 440ms;
}
.buff-pill.autoreel-pill .pill-emoji {
  animation: autoreelRodBob 1.2s ease-in-out infinite;
}
.buff-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pill-tint, var(--common-soft));
  transform-origin: left center;
  transform: scaleX(var(--fill, 1));
  transition: transform 250ms linear;
}
.buff-pill .pill-emoji { font-size: 1.2rem; line-height: 1; }
.buff-pill .pill-label { white-space: nowrap; }
.buff-pill .pill-time { font-variant-numeric: tabular-nums; opacity: .7; font-size: 0.85rem; }

.buff-pill.rarity-common { border-color: var(--common); --pill-tint: var(--common-soft); }
.buff-pill.rarity-uncommon { border-color: var(--uncommon); --pill-tint: var(--uncommon-soft); }
.buff-pill.rarity-rare { border-color: var(--rare); --pill-tint: var(--rare-soft); }
.buff-pill.rarity-legendary { border-color: var(--legendary); --pill-tint: var(--legendary-soft); }
.buff-pill.rarity-mythic    { border-color: var(--mythic);    --pill-tint: var(--mythic-soft); }

/* --- Board layout --- */
.board {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  gap: 16px;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* V14: keep panel heights independent so a long catches list can't stretch
     the pond row and push the Cast button below the fold. Each panel sizes
     itself; the catches panel scrolls internally when it fills. */
  align-items: start;
}
@media (max-width: 920px) {
  .board {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
}

/* V5 sticker panels — thick cyan border, inset top highlight, chunky warm drop shadow. */
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 251, 255, 0.98) 100%);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  border: 3px solid #2a85c0;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.75),
    0 10px 0 -2px rgba(20, 66, 95, 0.22),
    0 24px 36px -12px rgba(20, 66, 95, 0.34),
    inset 0 3px 0 rgba(255, 255, 255, 1),
    inset 0 -3px 0 rgba(20, 66, 95, 0.06);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto 2px;
  height: 36%;
  border-radius: 19px 19px 60% 60%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* --- Rod panel --- */
.rods { display: flex; flex-direction: column; gap: 10px; }
.rod {
  appearance: none;
  text-align: left;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #f4faff;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font: inherit;
  color: var(--ink);
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.rod:hover:not(.locked):not(:disabled) { background: #ecf6ff; }
.rod:active:not(.locked):not(:disabled) { transform: scale(1.04, 0.92); }
.rod.selected {
  border-color: var(--ocean);
  background: #e1f1fc;
  box-shadow: 0 0 0 3px rgba(11, 110, 163, 0.14);
}
.rod.locked {
  opacity: 0.7;
  background: #f2f4f7;
  cursor: not-allowed;
}
.rod.locked .rod-emoji { filter: grayscale(1) brightness(0.9); }
.rod-emoji { font-size: 1.8rem; line-height: 1; }
.rod-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.rod-name { font-weight: 800; display: block; }
.rod-desc { font-size: 0.82rem; color: var(--ink-soft); display: block; }
.rod-bar {
  display: block;
  width: 100%;
  height: 6px;
  background: #dfe8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}
.rod-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6bc0ff, #a05ad8);
  border-radius: 999px;
  transition: width 400ms ease;
}

/* --- Catches panel header --- */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-header h2 { margin: 0; }
/* --- Pond --- */
.pond-panel { gap: 16px; align-items: center; }
.pond {
  /* V6: strict surface-y contract — every surface-aware element reads this var. */
  --surface-y: 32%;
  position: relative;
  width: 100%;
  /* V10: pond flexes to fill its panel so the catches panel no longer
     leaves a dead white gap below the water. Clamps keep it sane on
     very short/tall viewports. V14.5.4: subtract 400px (header ≈ 287px
     + panel padding ≈ 23px + cast button row ≈ 75px + safety) so the
     Cast button stays in the viewport at typical desktop sizes
     (1440×900, 1920×1080). Cap at 700px so very tall screens don't
     produce a square pond that pushes catches off-screen. */
  flex: 1 1 auto;
  min-height: clamp(440px, calc(100dvh - 400px), 660px);
  max-height: clamp(440px, calc(100dvh - 380px), 700px);
  border-radius: var(--radius);
  overflow: hidden;
  /* Sky on top, water below — gradient changes color hard at the surface line. */
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.22) 0%, transparent 50%),
    linear-gradient(180deg,
      #c7ecff 0%,
      #d8f4ff calc(var(--surface-y) - 2%),
      #5fb6e0 calc(var(--surface-y) + 2%),
      #2e80c0 65%,
      #083960 100%);
  box-shadow:
    inset 0 6px 20px rgba(255, 255, 255, 0.5),
    inset 0 -8px 30px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(11, 110, 163, 0.35),
    0 10px 28px -8px rgba(5, 61, 91, 0.35);
  transition: transform 220ms ease;
}

/* V6 sky zone — sits above the surface line, hosts the ambient air elements. */
.sky-zone {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--surface-y);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.sky-ambient { position: absolute; inset: 0; pointer-events: none; }
.sky-cloud {
  position: absolute;
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 3px rgba(100, 120, 150, 0.35));
  opacity: 0.95;
  will-change: transform;
}
.sky-dragonfly {
  position: absolute;
  font-size: 1.4rem;
  filter: drop-shadow(0 2px 2px rgba(40, 60, 80, 0.35));
  will-change: transform;
}
/* V14 sky entities — bird (frequent), airplane (rare), celestial (sun/moon) */
.sky-bird {
  position: absolute;
  width: 52px; height: auto;
  filter: drop-shadow(0 3px 3px rgba(20, 40, 60, 0.35));
  will-change: transform, left;
  animation: skyBirdBob 0.9s ease-in-out infinite;
}
@keyframes skyBirdBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.sky-bird[style*="scaleX(-1)"] { animation: skyBirdBobFlip 0.9s ease-in-out infinite; }
@keyframes skyBirdBobFlip {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50%      { transform: scaleX(-1) translateY(-5px); }
}
.sky-airplane {
  position: absolute;
  width: 74px; height: auto;
  filter: drop-shadow(0 4px 4px rgba(20, 40, 60, 0.35));
  will-change: transform, left;
}
/* V14 sun/moon — stays in the sky zone, floats through the day. */
.sky-celestial {
  position: absolute;
  width: 68px; height: 68px;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(160, 130, 60, 0.35));
  transition: left 3s linear, top 3s linear, opacity 1.5s ease;
  will-change: left, top;
  z-index: 0;
}
body[data-dn-phase="night"] .sky-celestial {
  filter: drop-shadow(0 4px 10px rgba(200, 210, 255, 0.55));
}

.far-bank {
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 58%;
  /* Painterly far-horizon strip. The PNG (1536x1024) is sky+land+water; at
     100% width it scales to ~width*0.67 tall, much taller than .far-bank.
     `background-position: center 45%` lines up the 45%-y band of the image
     (the horizon silhouette) with the 45% point of the strip — so we see
     distant land + a bit of sky above + a bit of water below. */
  background: url("assets/env/far_horizon.png") center 45% / 100% auto no-repeat;
  opacity: 0.95;
  pointer-events: none;
}

/* V6 water surface — chunky sticker line with subtle scallops. */
.water-surface {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--surface-y) - 8px);
  height: 16px;
  width: 100%;
  overflow: visible;
  z-index: 2;
  pointer-events: none;
  /* tiny lateral drift — mostly static per Codex, just a hint of life */
  animation: surfaceDrift 14s ease-in-out infinite alternate;
}
.water-surface .surface-fill {
  fill: rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 2px 0 rgba(11, 61, 98, 0.18));
}
.water-surface .surface-crest {
  stroke: rgba(255, 255, 255, 1);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.7;
}
@keyframes surfaceDrift {
  0%   { transform: translateX(-6px); }
  100% { transform: translateX(6px); }
}

/* V6 local surface break — shows over the cast point and exposes the water
   beneath the surface line for ~350ms, selling the splash entry. */
.surface-break {
  position: absolute;
  top: calc(var(--surface-y) - 12px);
  width: 64px;
  height: 26px;
  left: 50%;
  transform: translateX(-50%) scaleX(0.3);
  background: radial-gradient(ellipse at center,
    rgba(11, 80, 130, 0.8) 0%,
    rgba(11, 80, 130, 0.4) 45%,
    transparent 75%);
  pointer-events: none;
  z-index: 3;
  animation: surfaceBreak 420ms ease-out forwards;
}
@keyframes surfaceBreak {
  0%   { opacity: 0; transform: translateX(-50%) scaleX(0.2) scaleY(0.6); }
  25%  { opacity: 1; transform: translateX(-50%) scaleX(1.1) scaleY(1); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(0.6) scaleY(0.4); }
}
.pond.casting { animation: pondPulse 1.5s ease-in-out; }
.pond-shimmer {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0 40px,
    rgba(255, 255, 255, 0.18) 40px 42px,
    rgba(255, 255, 255, 0) 42px 80px
  );
  mix-blend-mode: overlay;
  animation: shimmer 9s linear infinite;
  opacity: 0.8;
  pointer-events: none;
  z-index: 1;
}

/* --- V4/V6 light rays refracting down from the water surface into the depths. --- */
.pond-rays {
  position: absolute;
  left: -10%;
  right: -10%;
  top: var(--surface-y);
  bottom: 0;
  background: conic-gradient(from 260deg at 50% -10%,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0.16) 8deg,
    rgba(255, 255, 255, 0) 16deg,
    rgba(255, 255, 255, 0) 28deg,
    rgba(255, 255, 255, 0.12) 34deg,
    rgba(255, 255, 255, 0) 42deg,
    rgba(255, 255, 255, 0) 54deg,
    rgba(255, 255, 255, 0.14) 60deg,
    rgba(255, 255, 255, 0) 68deg,
    rgba(255, 255, 255, 0) 82deg,
    rgba(255, 255, 255, 0.1) 86deg,
    rgba(255, 255, 255, 0) 92deg,
    rgba(255, 255, 255, 0) 360deg
  );
  mix-blend-mode: screen;
  filter: blur(2px);
  opacity: 0.8;
  animation: raysDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes raysDrift {
  0%   { transform: translateX(-3%) rotate(-1deg); }
  50%  { transform: translateX(2%)  rotate(0.5deg); }
  100% { transform: translateX(-1%) rotate(-0.5deg); }
}

/* --- V4 bubbles rising --- */
.bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bubble {
  position: absolute;
  bottom: -24px;
  width: var(--sz, 12px);
  height: var(--sz, 12px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25) 60%, rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.4);
  opacity: 0.85;
  left: var(--x, 50%);
  animation: bubbleRise var(--dur, 6s) ease-in forwards;
}
@keyframes bubbleRise {
  0%   { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  15%  { opacity: 0.95; }
  100% { transform: translate(calc(-50% + var(--sway, 20px)), calc(-1 * (var(--h, 100%) + 60px))) scale(1); opacity: 0; }
}
.decorations { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.decoration {
  position: absolute;
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 3px 3px rgba(0, 20, 40, 0.45));
  animation: decoBob 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.decoration .deco-art { filter: none; }
.decoration.surface { width: 76px; height: 76px; }
@keyframes decoBob {
  0%, 100% { transform: translate(-50%, calc(-50% + 0px)) rotate(-3deg); }
  50%      { transform: translate(-50%, calc(-50% - 5px)) rotate(3deg); }
}

/* V6 surface decorations — sit ON the water line, get a brighter drop-shadow
   (daylight, not underwater) and a slower bob. */
.surface-decorations { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.decoration.surface {
  filter: drop-shadow(0 4px 3px rgba(10, 50, 90, 0.5));
  animation: decoBobSurface 3.6s ease-in-out infinite;
}
@keyframes decoBobSurface {
  0%, 100% { transform: translate(-50%, calc(-50% + 0px)) rotate(-2deg); }
  50%      { transform: translate(-50%, calc(-50% - 3px)) rotate(2deg); }
}

.ambient-fish { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.swim-fish {
  position: absolute;
  font-size: var(--fish-size, 1.6rem);
  will-change: transform;
  filter: drop-shadow(0 2px 2px rgba(0, 30, 60, 0.35));
}
.pond-center {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
  z-index: 3;
}
.cast-indicator {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  backdrop-filter: blur(4px);
  transition: opacity 300ms ease, transform 300ms ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.cast-indicator.hidden { opacity: 0; transform: translateY(-8px) scale(0.95); }

/* --- V4 cast reel --- */
.cast-reel {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(230, 246, 255, 0.92) 100%);
  border: 4px solid rgba(11, 58, 96, 0.6);
  box-shadow:
    0 8px 0 rgba(11, 58, 96, 0.4),
    0 0 0 6px rgba(255, 255, 255, 0.2),
    inset 0 4px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: reelPop 240ms cubic-bezier(.3,1.5,.5,1);
}
.cast-reel.hidden { display: none; }
.cast-reel-window {
  position: absolute;
  inset: 10px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #edf8ff 0%, #ffffff 50%, #edf8ff 100%);
  box-shadow: inset 0 6px 12px -4px rgba(0, 0, 0, 0.25), inset 0 -6px 12px -4px rgba(0, 0, 0, 0.25);
}
.cast-reel-strip {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  will-change: transform;
}
.cast-reel-row {
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 30, 60, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
}
.cast-reel-row .fish-art.reel { width: 3.2rem; height: 3.2rem; }
.cast-reel-row.ghost { opacity: 0.5; filter: blur(2px) drop-shadow(0 2px 2px rgba(0, 30, 60, 0.3)); }
.cast-reel-row.winner {
  filter: drop-shadow(0 3px 3px rgba(0, 30, 60, 0.45));
}
.cast-reel-row.winner .fish-art.reel { width: 3.6rem; height: 3.6rem; }
.cast-reel.landing .cast-reel-window { animation: reelThump 180ms ease; }
.cast-reel.rarity-rare      { border-color: #a344ea; box-shadow: 0 8px 0 rgba(163, 68, 234, 0.5), 0 0 0 6px rgba(163, 68, 234, 0.2), inset 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 24px rgba(163, 68, 234, 0.6); }
.cast-reel.rarity-legendary { border-color: #ffb81a; box-shadow: 0 8px 0 rgba(255, 184, 26, 0.55), 0 0 0 6px rgba(255, 184, 26, 0.2), inset 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 32px rgba(255, 184, 26, 0.75); }
.cast-reel.rarity-mythic    { border-color: #ff3fcf; box-shadow: 0 8px 0 rgba(255, 63, 207, 0.6),  0 0 0 6px rgba(255, 63, 207, 0.22), inset 0 4px 10px rgba(0, 0, 0, 0.15), 0 0 36px rgba(255, 63, 207, 0.85); }
.cast-reel.rarity-junk      { border-color: #94a3ad; box-shadow: 0 8px 0 rgba(148, 163, 173, 0.4), 0 0 0 6px rgba(148, 163, 173, 0.15), inset 0 4px 10px rgba(0, 0, 0, 0.1); filter: saturate(0.4); }

@keyframes reelPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes reelThump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(4px); }
  70% { transform: translateY(-2px); }
}

/* --- V4 screen shake + hit-stop + full-screen overlays --- */
body.screen-shake { animation: screenShake 420ms cubic-bezier(.36,.07,.19,.97) both; }
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-6px, 3px) rotate(-0.4deg); }
  20% { transform: translate(7px, -4px) rotate(0.4deg); }
  30% { transform: translate(-5px, 4px); }
  40% { transform: translate(5px, -3px); }
  50% { transform: translate(-3px, 2px); }
  60% { transform: translate(3px, -1px); }
  70% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -1px); }
  90% { transform: translate(-1px, 0); }
}

.hit-stop-dim {
  position: fixed;
  inset: 0;
  background: rgba(5, 20, 35, 0.35);
  z-index: 60;
  pointer-events: none;
  animation: hitStopDim 240ms ease-out forwards;
}
@keyframes hitStopDim {
  0% { opacity: 0; backdrop-filter: blur(0); }
  40% { opacity: 1; backdrop-filter: blur(2px); }
  100% { opacity: 0; backdrop-filter: blur(0); }
}

/* Full-screen legendary reveal card */
.legendary-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 62;
  pointer-events: none;
}
.legendary-card {
  padding: 18px 28px;
  background: linear-gradient(180deg, #fff4c4 0%, #ffcf33 55%, #c98100 100%);
  border-radius: 22px;
  color: #3a2400;
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.6),
    0 0 0 10px rgba(255, 180, 0, 0.7),
    0 20px 50px rgba(255, 140, 0, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  animation: legendaryPop 1100ms cubic-bezier(.3,1.6,.5,1) forwards;
  transform-origin: center;
  /* V8: promote to its own GPU layer so the pop/bounce composites smoothly
     without re-rasterizing the text, glow, and hero image each frame. */
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
}
.legendary-card .fish-art { image-rendering: auto; will-change: transform; }
@keyframes legendaryPop {
  0% { transform: scale(0.3) rotate(-4deg); opacity: 0; }
  40% { transform: scale(1.12) rotate(2deg); opacity: 1; }
  55% { transform: scale(0.96) rotate(-1deg); }
  70% { transform: scale(1.04) rotate(0.5deg); }
  85% { transform: scale(1); }
  100% { transform: scale(1.05) translateY(-12px); opacity: 0; }
}

/* Mythic banner — iridescent pink→purple with a magenta glow. Bigger than legendary. */
.legendary-card.mythic-card {
  background: linear-gradient(180deg, #ffe0f7 0%, #ff3fcf 50%, #7d22d0 100%);
  color: #2b0040;
  font-size: 2.4rem;
  padding: 22px 36px;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.65),
    0 0 0 12px rgba(255, 63, 207, 0.6),
    0 22px 58px rgba(180, 50, 220, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  animation: mythicPop 1400ms cubic-bezier(.3,1.6,.5,1) forwards;
}
@keyframes mythicPop {
  0% { transform: scale(0.25) rotate(-6deg); opacity: 0; }
  40% { transform: scale(1.18) rotate(3deg); opacity: 1; }
  55% { transform: scale(0.94) rotate(-1.5deg); }
  70% { transform: scale(1.06) rotate(0.8deg); }
  85% { transform: scale(1); }
  100% { transform: scale(1.08) translateY(-16px); opacity: 0; }
}

/* Full-screen shiny shimmer — diagonal gold sweep.
   V12: extended from 900ms → 2400ms so the moment lingers, with two sweep
   passes and three glint waves feeding into it from showShinySequence. */
.shiny-overlay {
  position: fixed;
  inset: 0;
  z-index: 61;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 240, 170, 0.28), transparent 70%);
  animation: shinyOverlayFade 2400ms ease-out forwards;
}
.shiny-overlay::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(110deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 250, 220, 0.65) 48%,
    rgba(255, 215, 110, 0.95) 52%,
    rgba(255, 250, 220, 0.65) 56%,
    transparent 66%,
    transparent 100%);
  transform: translateX(-60%);
  /* Two sweeps across the viewport during the overlay's lifetime. */
  animation: shinySweep 1400ms cubic-bezier(.25, .8, .35, 1) forwards,
             shinySweep 1400ms cubic-bezier(.25, .8, .35, 1) 1100ms forwards;
  mix-blend-mode: screen;
}
@keyframes shinyOverlayFade {
  0% { opacity: 0; }
  6%, 86% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes shinySweep {
  from { transform: translateX(-70%) skewX(-12deg); }
  to   { transform: translateX(70%) skewX(-12deg); }
}

.shiny-overlay .glints {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.shiny-overlay .glint {
  position: absolute;
  font-size: var(--sz, 1.6rem);
  left: var(--x, 50%);
  top: var(--y, 50%);
  animation: glintPop 1300ms ease-out forwards;
  animation-delay: var(--d, 0ms);
  filter: drop-shadow(0 0 6px #fff5b8);
}
@keyframes glintPop {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  25%  { transform: translate(-50%, -50%) scale(1.3) rotate(15deg); opacity: 1; }
  65%  { transform: translate(-50%, -50%) scale(1) rotate(-8deg); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(0.35) rotate(-20deg); opacity: 0; }
}

/* V12: golden glowing frame around the whole viewport — the "UI shine" overtone.
   Pulses in, holds, and fades over the length of the celebration. */
.shiny-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  box-shadow:
    inset 0 0 32px 8px rgba(255, 220, 100, 0.85),
    inset 0 0 110px 32px rgba(255, 180, 40, 0.45),
    inset 0 0 220px 60px rgba(255, 150, 20, 0.2);
  animation: shinyFramePulse 2500ms ease-out forwards;
}
@keyframes shinyFramePulse {
  0%   { opacity: 0; filter: brightness(1.1); }
  10%  { opacity: 1; filter: brightness(1.35); }
  30%  { opacity: 1; filter: brightness(1.15); }
  70%  { opacity: 1; filter: brightness(1.1); }
  100% { opacity: 0; filter: brightness(1); }
}

/* V12: SHINY! banner — matches the legendary/mythic pattern but gold-crystal
   themed. Uses .legendary-card as the base and overrides the palette. */
.legendary-card.shiny-card {
  background: linear-gradient(135deg, #ffe38c 0%, #fff5c6 38%, #ffd566 62%, #ffa820 100%);
  color: #5c3a08;
  font-size: 2.2rem;
  padding: 20px 32px;
  border: 4px solid rgba(255, 230, 140, 0.9);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75), 0 2px 6px rgba(140, 90, 10, 0.45);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.6),
    0 0 0 12px rgba(255, 200, 80, 0.65),
    0 20px 58px rgba(220, 150, 20, 0.55),
    0 0 110px 20px rgba(255, 220, 100, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  animation: shinyCardPop 1700ms cubic-bezier(.3, 1.6, .5, 1) forwards;
}
@keyframes shinyCardPop {
  0%   { transform: scale(0.3) rotate(-5deg); opacity: 0; }
  35%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  50%  { transform: scale(0.96) rotate(-1deg); }
  65%  { transform: scale(1.04) rotate(0.8deg); }
  80%  { transform: scale(1); }
  100% { transform: scale(1.06) translateY(-14px); opacity: 0; }
}

/* V12: cast button locked while shiny celebration runs. Dimmed + non-clickable
   so the kid can't tap past the fanfare. */
.cast-btn.shiny-lock {
  filter: saturate(0.55) brightness(0.85);
  opacity: 0.75;
  pointer-events: none;
  cursor: not-allowed;
}

body.slowmo { animation: slowmoFilter 520ms ease-in-out; }
@keyframes slowmoFilter {
  0%, 100% { filter: none; }
  50% { filter: saturate(1.2) contrast(1.08); }
}

.ripple {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}
.ripple.v5-ring {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.9);
  animation: rippleV5 1.5s ease-out forwards;
}
@keyframes rippleV5 {
  0%   { width: 18px; height: 18px; opacity: 0.9; border-width: 3px; }
  100% { width: 280px; height: 280px; opacity: 0; border-width: 0.5px; }
}

/* Cast droplet spray — tiny bubbles fly out and arc back down. */
.cast-droplet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98), rgba(180, 220, 255, 0.7) 60%, rgba(180, 220, 255, 0.1));
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), 0 0 3px rgba(255, 255, 255, 0.5);
  animation: castDroplet 720ms cubic-bezier(.3, .4, .6, 1) forwards;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
}
@keyframes castDroplet {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.95; }
  55%  { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx) * 1.2), calc(-50% + var(--dy) + 40px)) scale(0.8); opacity: 0; }
}

/* V5 edge flora (emoji) → V14 edge flora (Ideogram sticker PNGs).
   Seaweed sways, coral bobs, rocks are static — same pond-floor framing. */
.edge-flora { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.flora {
  position: absolute;
  bottom: -6px;
  font-size: 2.4rem;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 3px 3px rgba(0, 10, 25, 0.55));
}
/* V14 <img>-based flora — height driven by a CSS var set from JS.
   PNGs were bottom-trimmed (scripts/trim_transparent.py) so the bottom
   of the image is the bottom of the illustration — bottom:0 anchors them
   to the pond floor instead of floating. */
.flora.flora-img {
  width: auto;
  height: var(--flora-h, 100px);
  bottom: 0;
}
.flora.sway         { animation: floraSway 4.8s ease-in-out infinite; }
.flora.sway.reverse { animation: floraSway 4.2s ease-in-out infinite reverse; }
.flora.coral        {
  bottom: -12px;
  font-size: 2.8rem;
  animation: floraCoral 6s ease-in-out infinite;
}
.flora.flora-coral {
  bottom: 0;
  animation: floraCoral 6s ease-in-out infinite;
}
.flora.flora-rock {
  bottom: 0;
  animation: none;
  /* rocks sit slightly behind fish action — no transform origin override. */
}
@keyframes floraSway {
  0%, 100% { transform: translateX(-50%) rotate(-6deg); }
  50%      { transform: translateX(-50%) rotate(6deg); }
}
@keyframes floraCoral {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  50%      { transform: translateX(-50%) translateY(-3px) rotate(1deg); }
}

.cast-btn {
  appearance: none;
  border: none;
  padding: 14px 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd85c 0%, #ff9a0d 100%);
  color: #4a2900;
  font-weight: 900;
  font-size: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 6px 0 #c77d05,
    0 12px 28px rgba(199, 125, 5, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
  transition: transform 120ms cubic-bezier(.34, 1.4, .64, 1), box-shadow 120ms ease, filter 120ms ease;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
.cast-btn:hover { filter: brightness(1.05); }
/* V4: squash-on-press for all primary buttons — scaleX(1.06) scaleY(0.92) per Codex. */
.cast-btn:active {
  transform: scale(1.06, 0.92) translateY(3px);
  box-shadow: 0 2px 0 #c77d05, 0 4px 12px rgba(199, 125, 5, 0.35);
}
.cast-btn:disabled {
  filter: grayscale(0.4) brightness(0.95);
  cursor: wait;
  transform: none;
  box-shadow: 0 4px 0 #b8b8b8, 0 6px 16px rgba(0,0,0,0.15);
}
.cast-emoji { font-size: 1.4rem; }

/* --- Catches --- */
.catches-panel { min-height: 0; }
.catches {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 14px;
  scrollbar-gutter: stable;
  flex: 1;
  min-height: 140px;
  /* Cap so the panel doesn't eat the entire screen on ultra-tall monitors,
     but generous enough to show ~10 rows on mobile portrait without cutting
     off early. Pure 75vh on phones, absolute 900px on very tall windows. */
  max-height: min(75vh, 900px);
}
.catches::-webkit-scrollbar { width: 8px; }
.catches::-webkit-scrollbar-thumb { background: #cfe2ec; border-radius: 4px; }

.empty-catches {
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px 8px;
}

/* V10: each entry is a relative container so the swipe-behind hints can
   sit under the draggable card. */
.catch-entry {
  position: relative;
  border-radius: var(--radius-sm);
  --swipe-progress: 0;
  animation: entryIn 280ms cubic-bezier(.3,1.5,.5,1);
  overflow: hidden;
}
.catch-entry {
  /* Flex column children shrink by default — that squashed rows to ~20px
     when the inventory exceeded the scroll cap. Pin their size so the
     container scrolls instead of compressing each row. */
  flex-shrink: 0;
}
.catch-entry .catch-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 8px 48px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 0;
  /* Room for two stacked action buttons (Sell + Eat) without clipping. */
  min-height: 76px;
  background: #f8fbfd;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  touch-action: pan-y;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.catch-entry .catch-card.dragging {
  transition: none;
  cursor: grabbing;
}

/* Swipe hints — hidden at rest, brighten as the card is dragged past them. */
.catch-entry .catch-swipe-hint {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 0 18px;
  z-index: 1;
  opacity: calc(0.2 + var(--swipe-progress, 0) * 1.3);
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
}
.catch-entry .catch-swipe-hint.sell {
  right: 0;
  background: linear-gradient(90deg, rgba(100,188,255,0) 0%, #2e9dea 60%, #1e7dc0 100%);
  justify-content: flex-end;
}
.catch-entry .catch-swipe-hint.eat {
  left: 0;
  background: linear-gradient(90deg, #2f9a52 0%, #3fbc67 40%, rgba(63,188,103,0) 100%);
  justify-content: flex-start;
}
.catch-entry.swiping-sell { box-shadow: inset 0 0 0 3px rgba(46, 157, 234, 0.5); }
.catch-entry.swiping-eat  { box-shadow: inset 0 0 0 3px rgba(63, 188, 103, 0.5); }
.catch-card .catch-bar {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.catch-bar {
  width: 100%;
  height: 100%;
  min-height: 48px;
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.catch-bar.rarity-common { background: var(--common); }
.catch-bar.rarity-uncommon { background: var(--uncommon); }
.catch-bar.rarity-rare { background: var(--rare); }
.catch-bar.rarity-legendary { background: var(--legendary); }
.catch-bar.rarity-mythic {
  background: linear-gradient(180deg, #ff3fcf 0%, #9d28ff 100%);
  box-shadow: 0 0 6px rgba(255, 63, 207, 0.45) inset;
}
.catch-bar.rarity-junk {
  background: linear-gradient(180deg, #b4bec6 0%, #7c8a94 100%);
}
/* V12: junk rows read as "dingy" — desaturated, dimmer, sorted to the bottom.
   No swipe actions, just a tiny Toss button. */
.catch-entry.is-junk .catch-card {
  background: #eef2f5;
  filter: saturate(0.55);
  opacity: 0.82;
}
.catch-entry.is-junk .junk-emoji {
  font-size: 1.8rem;
  text-align: center;
}
.catch-entry.is-junk .catch-name { color: var(--ink-soft); }
.catch-entry.is-junk .catch-count { color: #9aa5ae; font-style: italic; }
.catch-btn.toss-btn {
  background: linear-gradient(180deg, #d0d8de 0%, #9aa5ae 100%);
  color: #2d3d4a;
  box-shadow: 0 3px 0 #6b7880, 0 6px 12px rgba(107, 120, 128, 0.22);
}
.catch-btn.toss-btn:active {
  transform: scale(1.05, 0.9) translateY(1px);
  box-shadow: 0 1px 0 #6b7880, 0 2px 6px rgba(107, 120, 128, 0.2);
}
/* Notification flavor for junk catches — neutral, no celebration vibe. */
.notif.rarity-junk { border-left-color: #94a3ad; }
.catch-emoji { font-size: 1.8rem; text-align: center; }
.catch-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.catch-name { font-weight: 800; font-size: 0.95rem; }
.catch-count { font-size: 0.8rem; color: var(--ink-soft); }
/* V10: each card has BOTH a sell and eat action, stacked vertically. */
.catch-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}
.catch-btn {
  appearance: none;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
  min-width: 72px;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.catch-btn.sell-btn {
  background: linear-gradient(180deg, #a3d8ff 0%, #4ea9e6 100%);
  color: #0d3b5a;
  box-shadow: 0 3px 0 #1e77b4, 0 6px 12px rgba(30, 119, 180, 0.22);
}
.catch-btn.eat-btn {
  background: linear-gradient(180deg, #ffb3b3 0%, #ff7a7a 100%);
  color: #5a1b1b;
  box-shadow: 0 3px 0 #c94444, 0 6px 12px rgba(201, 68, 68, 0.25);
}
.catch-btn:hover { filter: brightness(1.04); }
.catch-btn.sell-btn:active { transform: scale(1.05, 0.9) translateY(1px); box-shadow: 0 1px 0 #1e77b4, 0 2px 6px rgba(30, 119, 180, 0.22); }
.catch-btn.eat-btn:active  { transform: scale(1.05, 0.9) translateY(1px); box-shadow: 0 1px 0 #c94444, 0 2px 6px rgba(201, 68, 68, 0.25); }
.catch-btn .catch-btn-icon { font-size: 0.95rem; }
.catch-btn .catch-btn-val  { font-variant-numeric: tabular-nums; }

/* V10: Sell-All + Eat-All live side-by-side. Each holds-to-confirm with a
   fill wipe so kids can see the progress. */
.bulk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px 0;
}
.bulk-actions.empty .bulk-btn {
  filter: grayscale(0.6) brightness(0.95);
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.bulk-btn {
  position: relative;
  appearance: none;
  border: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #1a1a1a;
  font: inherit;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.bulk-btn:hover { filter: brightness(1.03); }
.bulk-btn:active { transform: translateY(1px); }
.sell-all-btn {
  background: linear-gradient(180deg, #b8e2ff 0%, #58b3ea 100%);
  color: #0c3752;
  box-shadow: 0 3px 0 #1e77b4, 0 6px 12px rgba(30, 119, 180, 0.28);
}
.eat-all-btn {
  background: linear-gradient(180deg, #ffd184 0%, #ff9f3e 100%);
  color: #4a2300;
  box-shadow: 0 3px 0 #c46b10, 0 6px 12px rgba(196, 107, 16, 0.3);
}
.bulk-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  transition: width 80ms linear;
}
.bulk-btn.holding .bulk-fill { transition: width 500ms linear; width: 100%; }
.bulk-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
  white-space: nowrap;
}
.bulk-emoji { font-size: 1.15rem; }

/* Cascade fish flying into the button */
.flying-fish {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 45;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 2px rgba(0, 30, 60, 0.3));
}

.pearl-pop {
  position: fixed;
  z-index: 46;
  pointer-events: none;
  font-weight: 900;
  color: #5b4011;
  background: linear-gradient(180deg, #fff6df 0%, #ffdf87 100%);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(201, 155, 45, 0.4);
  animation: pearlPop 900ms ease-out forwards;
}
@keyframes pearlPop {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.8); }
  25% { opacity: 1; transform: translate(var(--x), calc(var(--y) - 8px)) scale(1.05); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) - 50px)) scale(1); }
}

/* --- Notifications --- */
.notifications {
  position: fixed;
  top: 96px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  max-width: min(340px, 88vw);
  pointer-events: none;
}
.notif {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--ocean);
  animation: notifIn 280ms cubic-bezier(.3,1.5,.5,1);
  pointer-events: auto;
  min-width: 220px;
}
.notif.leaving { animation: notifOut 280ms ease forwards; }
.notif.rarity-common { border-left-color: var(--common); }
.notif.rarity-uncommon { border-left-color: var(--uncommon); }
.notif.rarity-rare { border-left-color: var(--rare); }
.notif.rarity-legendary { border-left-color: var(--legendary); }
.notif.rarity-mythic {
  border-left-color: var(--mythic);
  background: linear-gradient(120deg, #fff0fb 0%, #ffe0f6 100%);
}
.notif-emoji { font-size: 1.8rem; line-height: 1; }
.notif-text { display: flex; flex-direction: column; gap: 1px; }
.notif-title { font-weight: 800; font-size: 0.95rem; }
.notif-sub { font-size: 0.82rem; color: var(--ink-soft); }

.notif.celebrate {
  background: linear-gradient(120deg, #fff8df 0%, #fff6df 50%, #fee6a3 100%);
  animation: notifIn 280ms cubic-bezier(.3,1.5,.5,1), sparkle 1.2s ease-in-out infinite;
}

/* Little rarity tint gradients on catch notification backgrounds */
.notif.rarity-rare { background: linear-gradient(120deg, #faf1fe 0%, #f1e6fa 100%); }
.notif.rarity-uncommon { background: linear-gradient(120deg, #f2f8ff 0%, #e1ecfa 100%); }

/* --- Animations --- */
@keyframes shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 400px 0; }
}
@keyframes pondPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.015); filter: brightness(1.08) saturate(1.1); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(4deg); }
}
@keyframes ripple {
  0% { width: 20px; height: 20px; opacity: 0.9; }
  100% { width: 220px; height: 220px; opacity: 0; border-width: 1px; }
}
@keyframes notifIn {
  from { transform: translateX(120%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes notifOut {
  to { transform: translateX(120%) scale(0.9); opacity: 0; }
}
@keyframes pillPop {
  0%   { transform: translateY(-10px) scale(0.55); opacity: 0; }
  60%  { transform: translateY(2px)   scale(1.14); opacity: 1; }
  100% { transform: translateY(0)     scale(1);    opacity: 1; }
}
@keyframes pillGlowSweep {
  0%, 100% { box-shadow: var(--shadow-soft); }
  40%      { box-shadow: var(--shadow-soft), 0 0 16px 4px rgba(255, 210, 80, 0.55); }
}
@keyframes autoreelPulse {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50%      { box-shadow: var(--shadow-soft), 0 0 14px 3px rgba(88, 200, 232, 0.5); }
}
@keyframes autoreelRodBob {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(8deg); }
}
@keyframes entryIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes sparkle {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(242, 179, 58, 0.5); }
  50% { box-shadow: var(--shadow), 0 0 24px 6px rgba(242, 179, 58, 0.35); }
}

/* --- Shop FAB --- */
.settings-fab {
  position: fixed;
  left: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  appearance: none;
  border: none;
  background: linear-gradient(180deg, #fff 0%, #d0e3f0 100%);
  color: #0a436b;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 5px 0 #5a95c4, 0 8px 18px rgba(5, 61, 91, 0.3);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.settings-fab:hover { filter: brightness(1.05); }
.settings-fab:active { transform: scale(1.06, 0.9) translateY(2px); box-shadow: 0 2px 0 #5a95c4, 0 3px 8px rgba(5, 61, 91, 0.3); }

.settings-modal { max-width: 520px; }
.settings-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4faff;
  border: 2px solid rgba(42, 133, 192, 0.2);
}
.setting-row.danger {
  background: linear-gradient(180deg, #fff4f2 0%, #ffe1db 100%);
  border-color: rgba(200, 60, 40, 0.35);
}
.setting-label { display: flex; flex-direction: column; gap: 3px; font-weight: 800; color: var(--ink); }
.setting-label .setting-hint { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }

.mute-toggle {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  color: var(--ocean-deep);
}
.mute-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a5d4ec 0%, #3a8dde 100%);
  position: relative;
  transition: background 180ms ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.mute-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 180ms cubic-bezier(.3,1.5,.5,1);
}
.mute-toggle[aria-checked="true"] .mute-thumb { transform: translateX(20px); }
.mute-toggle.off .mute-track { background: linear-gradient(180deg, #dddddd 0%, #9aa0a5 100%); }
.mute-state { font-size: 0.9rem; }

.reset-btn {
  appearance: none;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a7a 0%, #d63a22 100%);
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #a02010, 0 5px 10px rgba(160, 32, 16, 0.3);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.reset-btn:hover { filter: brightness(1.04); }
.reset-btn:active { transform: scale(1.06, 0.88) translateY(2px); box-shadow: 0 1px 0 #a02010; }

.reset-confirm {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffbee 0%, #ffe9a8 100%);
  border: 2px dashed #c9911f;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: resetConfirmPop 260ms cubic-bezier(.3,1.5,.5,1);
}
.reset-confirm.hidden { display: none; }
@keyframes resetConfirmPop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reset-warn { margin: 0; font-size: 0.88rem; color: #5a3a00; font-weight: 700; line-height: 1.4; }
.reset-confirm-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.reset-cancel, .reset-yes {
  appearance: none;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}
.reset-cancel { background: #e0edf5; color: var(--ocean-deep); box-shadow: 0 2px 0 #a8c3d6; }
.reset-cancel:active { transform: scale(1.06, 0.88) translateY(1px); }
.reset-yes {
  background: linear-gradient(180deg, #ff8a7a 0%, #d63a22 100%);
  color: white;
  box-shadow: 0 3px 0 #a02010;
}
.reset-yes:disabled { filter: grayscale(0.6) brightness(0.85); cursor: not-allowed; }
.reset-yes:active:not(:disabled) { transform: scale(1.06, 0.88) translateY(2px); box-shadow: 0 1px 0 #a02010; }

.settings-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 700;
  padding-top: 4px;
}

/* V8 shared FAB shell — album/achievements/shop stack together bottom-right */
.fab-stack {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse; /* bottom-most button is first in DOM feel */
  gap: 12px;
  z-index: 30;
}
.fab {
  appearance: none;
  border: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 1.55rem;
  cursor: pointer;
  color: white;
  box-shadow: 0 5px 0 rgba(0,0,0,0.18), 0 10px 20px rgba(0,0,0,0.18);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}
.fab:hover  { filter: brightness(1.06); transform: translateY(-2px); }
.fab:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.18), 0 4px 8px rgba(0,0,0,0.2); }

.shop-fab { background: linear-gradient(180deg, #9bdfff 0%, #3a8dde 100%); }
.album-fab { background: linear-gradient(180deg, #d7b6ff 0%, #8a53e5 100%); }

/* --- Shop grid (decorations) --- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
  overflow-y: auto;
}
.shop-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 10px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 2px solid transparent;
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* V14.6: floor on intrinsic height so the parent grid's row sizing
     can't collapse rod/deco cards when sibling sections push more
     vertical space (the biome sub-grid). */
  min-height: 200px;
}
.shop-card.owned { border-color: #58c16b; background: linear-gradient(180deg, #ffffff 0%, #e7f8ea 100%); }
.shop-card.locked { opacity: 0.82; }
.shop-card-emoji {
  font-size: 3rem;
  line-height: 1.1;
  filter: drop-shadow(0 2px 2px rgba(0, 30, 60, 0.25));
}
.shop-card.locked .shop-card-emoji { filter: grayscale(0.5) brightness(0.92); }
.shop-card-name { font-weight: 800; font-size: 1rem; }
.shop-card-price {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: linear-gradient(180deg, #fff6df 0%, #ffdf87 100%);
  color: #5b4011;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: var(--shadow-soft);
}
.shop-buy {
  appearance: none;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9bdfff 0%, #3a8dde 100%);
  color: white;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #1a5a9b, 0 5px 10px rgba(26, 90, 155, 0.28);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}
.shop-buy:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.shop-buy:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #1a5a9b, 0 2px 6px rgba(26, 90, 155, 0.28); }
.shop-buy:disabled { filter: grayscale(0.6) brightness(0.95); cursor: not-allowed; }
.shop-owned-tag {
  font-weight: 800;
  color: #2a8f3e;
  font-size: 0.9rem;
  padding: 6px 12px;
  background: #e7f8ea;
  border-radius: 999px;
}

/* V10 shop sections + rod cards + milestone-locked state. */
.shop-section-header {
  grid-column: 1 / -1;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--ocean-deep);
  padding: 6px 2px 2px;
  letter-spacing: 0.01em;
}
.shop-card.rod-card .rod-shop-art {
  font-size: 2.4rem;
}
.shop-card.rod-card .rod-shop-art .rod-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.shop-card .deco-shop-art {
  font-size: 0;
  line-height: 0;
}
.shop-card .deco-shop-art .deco-art {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto;
}
.shop-card-sub {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: -4px;
}
.shop-card.milestone-locked {
  opacity: 0.72;
  background: linear-gradient(180deg, #f4f7fa 0%, #e9eef3 100%);
}
.shop-card.milestone-locked .rod-shop-art,
.shop-card.milestone-locked .shop-card-emoji { filter: grayscale(0.75) brightness(0.94); }

/* V14.6: biome cards. Thumbnail is the painted landscape PNG (or a CSS
   gradient mimicking the home pond) cropped to a wide rectangle so kids
   can recognize each place at a glance. Biome cards need more vertical
   room than the rod/deco cards (thumb + name + sub + milestone + price +
   button), so we force a min-height and let them grow past the grid's
   default row height. The grid auto-row will pick up the taller cards. */
/* Sub-grid for biome cards so their tall layout doesn't distort the
   rod/decoration rows in the parent shop-grid. Spans all columns. */
.shop-places-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.shop-card.biome-card {
  overflow: visible;
}
.shop-card.biome-card .biome-shop-art {
  display: block;
  align-self: stretch;
  width: 100%;
  font-size: 0;
  line-height: 0;
}
.shop-card.biome-card .biome-art {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.shop-card.biome-card .biome-art.biome-art-home {
  background: linear-gradient(180deg, #c7ecff 0%, #d8f4ff 30%, #5fb6e0 38%, #2e80c0 70%, #083960 100%);
}
.shop-card.biome-card.milestone-locked .biome-art { filter: grayscale(0.6) brightness(0.94); }
.shop-card.biome-card.locked .biome-art { filter: grayscale(0.3) brightness(0.96); }
.shop-lock-line {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a5a68;
  padding: 4px 10px;
  background: #eef2f6;
  border-radius: 999px;
}
.shop-lock-progress {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* --- Shiny styles --- */
.shiny {
  filter: saturate(1.7) hue-rotate(42deg) brightness(1.12) drop-shadow(0 0 8px #ffd86b) drop-shadow(0 0 14px rgba(255, 220, 120, 0.9));
  animation: shinyPulse 1.8s ease-in-out infinite;
}
@keyframes shinyPulse {
  0%, 100% { filter: saturate(1.7) hue-rotate(42deg) brightness(1.12) drop-shadow(0 0 8px #ffd86b) drop-shadow(0 0 14px rgba(255, 220, 120, 0.9)); }
  50%      { filter: saturate(2.0) hue-rotate(48deg) brightness(1.22) drop-shadow(0 0 14px #fff0a8) drop-shadow(0 0 22px rgba(255, 240, 168, 1.0)); }
}

/* Catch entry with shiny — add a subtle gold frame & star in count row */
.catch-entry.is-shiny {
  background: linear-gradient(180deg, #fff9e6 0%, #ffeebf 100%);
  border: 1.5px solid rgba(242, 179, 58, 0.55);
}
.catch-entry .catch-star { font-size: 0.85em; }

/* Album card shiny star badge */
.album-card .shiny-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff6c0 0%, #ffcf33 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(201, 155, 45, 0.5);
}

/* --- Album overlay --- */
.album-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 61, 91, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  animation: overlayFade 200ms ease;
}
.album-overlay.hidden { display: none; }
@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.album-modal {
  background: linear-gradient(180deg, #ffffff 0%, #f3faff 100%);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(5, 61, 91, 0.5);
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 260ms cubic-bezier(.3,1.5,.5,1);
}
@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e3edf3;
}
.album-header h2 { margin: 0; }
.album-progress {
  font-weight: 700;
  color: var(--ink-soft);
  flex: 1;
  text-align: right;
  margin-right: 12px;
  font-size: 0.95rem;
}
.album-close {
  appearance: none;
  border: none;
  background: #eaf3f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ocean-deep);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}
.album-close:hover { background: #dde9f1; transform: scale(1.04); }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
  overflow-y: auto;
}
.album-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 10px 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 2px solid transparent;
  transition: transform 150ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.album-card:hover { transform: translateY(-2px); }
.album-card.rarity-common.discovered    { border-color: var(--common); background: linear-gradient(180deg, #ffffff 0%, var(--common-soft) 100%); }
.album-card.rarity-uncommon.discovered  { border-color: var(--uncommon); background: linear-gradient(180deg, #ffffff 0%, var(--uncommon-soft) 100%); }
.album-card.rarity-rare.discovered      { border-color: var(--rare); background: linear-gradient(180deg, #ffffff 0%, var(--rare-soft) 100%); }
.album-card.rarity-legendary.discovered { border-color: var(--legendary); background: linear-gradient(180deg, #ffffff 0%, var(--legendary-soft) 100%); }
.album-card.rarity-mythic.discovered {
  border-color: var(--mythic);
  background: linear-gradient(180deg, #ffffff 0%, var(--mythic-soft) 100%);
  animation: mythicShimmer 3.2s ease-in-out infinite;
}
@keyframes mythicShimmer {
  0%, 100% { box-shadow: var(--shadow-soft), 0 0 0 0 rgba(255, 63, 207, 0); }
  50%      { box-shadow: var(--shadow-soft), 0 0 18px 2px rgba(255, 63, 207, 0.35); }
}
.album-card.undiscovered .album-emoji { filter: grayscale(1) brightness(0.6) blur(2px); opacity: 0.6; }
.album-card.undiscovered .album-name { color: var(--ink-soft); font-style: italic; }
.album-emoji { font-size: 2.8rem; line-height: 1.1; display: block; }
.album-name { font-weight: 800; font-size: 0.95rem; margin-top: 4px; line-height: 1.15; }
.album-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-rarity-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--badge, var(--ocean));
}

/* V6 — banner-style dismiss-on-tap notifications (first shiny, first
   legendary, album complete). Bigger, glowing, with a close button. */
.notif.banner {
  min-width: 300px;
  padding: 18px 42px 18px 18px;
  cursor: pointer;
  position: relative;
  background: linear-gradient(120deg, #fff8df 0%, #fee6a3 50%, #ffc34d 100%);
  animation: notifIn 280ms cubic-bezier(.3,1.5,.5,1), bannerPulse 2.4s ease-in-out infinite;
  box-shadow:
    var(--shadow),
    0 0 0 3px rgba(255, 215, 110, 0.5),
    0 0 30px rgba(242, 179, 58, 0.4);
}
@keyframes bannerPulse {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 3px rgba(255, 215, 110, 0.5), 0 0 30px rgba(242, 179, 58, 0.4); }
  50%      { box-shadow: var(--shadow), 0 0 0 5px rgba(255, 215, 110, 0.7), 0 0 50px rgba(242, 179, 58, 0.7); }
}
.notif.banner:hover { filter: brightness(1.04); }
.notif-close {
  appearance: none;
  border: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(11, 61, 98, 0.12);
  color: var(--ocean-deep);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, background 120ms ease;
}
.notif-close:hover { background: rgba(11, 61, 98, 0.22); transform: scale(1.1); }

/* Bigger notif variant for first-catch + milestones */
.notif.big { padding: 14px 18px; min-width: 260px; }
.notif-emoji.big { font-size: 2.6rem; }
.notif-title.big { font-size: 1.1rem; }
.notif-hat {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 800;
}

/* Celebration burst for legendary */
.celebration-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}
.celebration-burst .spark {
  position: absolute;
  font-size: 1.4rem;
  left: 50%;
  top: 50%;
  animation: burst 1500ms ease-out forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.3) rotate(var(--rot)); opacity: 0; }
}

/* ---------- V7 art assets ---------- */
/* Every emoji slot now hosts an <img class="fish-art|rod-art|badge-art"> whose
   size is driven by the parent's font-size so existing layout math is untouched.
   Transparent cutout PNGs, soft drop shadow to keep sticker feel on white panels. */
.fish-art, .rod-art, .badge-art, .deco-art {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.10));
}
/* Each slot is a fixed-size flex container so the img never overflows */
.catch-emoji, .notif-emoji, .rod-emoji, .next-goal-emoji, .album-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.catch-emoji { width: 48px; height: 48px; }
.notif-emoji { width: 44px; height: 44px; flex: 0 0 auto; }
.notif-emoji.big { width: 56px; height: 56px; }
.rod .rod-emoji { width: 40px; height: 40px; flex: 0 0 auto; }
.rod.locked .rod-art { filter: grayscale(1) brightness(0.9) drop-shadow(0 1px 0 rgba(0,0,0,0.10)); }
.next-goal-emoji { width: 28px; height: 28px; flex: 0 0 auto; }
.album-emoji { width: 56px; height: 56px; }
.album-card.undiscovered .fish-art { filter: grayscale(1) brightness(0.6) blur(2px); opacity: 0.6; }
/* Legendary/Mythic banners keep the fish tiny inline with the title */
.legendary-card .fish-art.banner {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
}

/* Emoji fallback when the PNG 404s — glyph fills the same slot as the img would. */
.art-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.6em;
}
.art-fallback.fish-art, .art-fallback.rod-art, .art-fallback.badge-art {
  width: 100%;
  height: 100%;
  font-size: 1.6em;
}
.fish-art.shiny, .notif-emoji.big.shiny .fish-art {
  filter: drop-shadow(0 0 4px rgba(255, 216, 90, 0.9)) drop-shadow(0 1px 0 rgba(0,0,0,0.10));
}

/* ---------- V8 tackle bag ---------- */
/* The board drops from 3 columns to 2 once rods live in the bag.
   Gated to ≥921px so the mobile breakpoint above can actually stack.
   Catches panel is clamped (260–340px) so the pond takes all remaining
   width — larger pond, tighter catches column. */
@media (min-width: 921px) {
  .board { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
}

.tackle-bag-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: #fff;
  border: 2.5px solid var(--ocean);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.tackle-bag-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(11, 110, 163, 0.22); }
.tackle-bag-chip:active { transform: translateY(0) scale(0.97); }
.tackle-bag-emoji {
  font-size: 1.5rem;
  line-height: 1;
  background: var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ocean);
}
.tackle-bag-rod {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
}
.tackle-bag-rod .rod-art { width: 26px; height: 26px; }
.tackle-bag-name { white-space: nowrap; }

.tackle-bag-modal { max-width: 560px; }
.tackle-bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px;
}
.tackle-bag-grid .rod {
  margin: 0;
}

/* ---------- V8 achievements ---------- */
.achievements-fab { background: linear-gradient(145deg, #ffd66b 0%, #f2a93b 100%); }

.achievements-modal { max-width: 560px; }
.achievements-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}
.achievement-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #f7fbfe;
  border: 2px solid #dde8f1;
  border-radius: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}
.achievement-row.unlocked {
  background: linear-gradient(180deg, #fff9e0 0%, #ffecad 100%);
  border-color: #f2b33a;
  box-shadow: 0 0 0 2px rgba(242, 179, 58, 0.22) inset;
}
.achievement-row:not(.unlocked) .ach-icon { filter: grayscale(1) brightness(0.85); opacity: 0.75; }
.ach-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.ach-icon .ach-badge { width: 100%; height: 100%; }
.ach-icon .art-fallback.ach-badge { font-size: 2rem; }
.ach-body { min-width: 0; }
.ach-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ach-name { font-weight: 800; font-size: 1rem; color: var(--ink); }
.achievement-row.unlocked .ach-name::after { content: " ★"; color: #e09b0f; }
.ach-status { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.achievement-row.unlocked .ach-status { color: #a06a08; }
.ach-desc { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.ach-bar {
  margin-top: 6px;
  height: 6px;
  background: #dde8f1;
  border-radius: 4px;
  overflow: hidden;
}
.ach-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ocean), var(--ocean-deep));
  transition: width 400ms ease;
}

/* ---------- V8 bonus: Today's Star ---------- */
/* Deliberately gentle per Codex — soft pulsing ring + small ribbon.
   No neon, no particles, no auto-popup. She has to open the album to find it. */
.album-card.todays-star {
  box-shadow:
    var(--shadow-soft),
    0 0 0 3px rgba(255, 215, 85, 0.55),
    0 0 14px rgba(255, 215, 85, 0.45);
  animation: starSoftPulse 2.6s ease-in-out infinite;
}
@keyframes starSoftPulse {
  0%, 100% {
    box-shadow:
      var(--shadow-soft),
      0 0 0 3px rgba(255, 215, 85, 0.45),
      0 0 10px rgba(255, 215, 85, 0.35);
  }
  50% {
    box-shadow:
      var(--shadow-soft),
      0 0 0 4px rgba(255, 215, 85, 0.7),
      0 0 18px rgba(255, 215, 85, 0.55);
  }
}
.album-card .star-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.05rem;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
  animation: starRibbonBreath 3.2s ease-in-out infinite;
}
@keyframes starRibbonBreath {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.12); opacity: 1; }
}
.album-star-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px 8px;
  background: linear-gradient(180deg, #fff5c4 0%, #ffe48a 100%);
  border: 1.5px solid #f2b33a;
  border-radius: 12px;
  font-size: 0.82rem;
  color: #6a4500;
  font-weight: 700;
}
.notif.todays-star {
  border-color: #f2b33a !important;
  box-shadow: 0 0 0 2px rgba(255, 215, 85, 0.35), var(--shadow-soft);
}

/* ---------- V9 naming ---------- */
/* Tap-to-name keepsake flow. One modal, eight names + surprise, no ceremony. */
.naming-modal { max-width: 440px; }
.naming-hero {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.naming-hero-art { width: 88px !important; height: 88px !important; }
.naming-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 16px 18px;
}
.name-option {
  appearance: none;
  border: 2.5px solid var(--ocean);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 14px 10px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ocean-deep), 0 6px 12px rgba(11, 110, 163, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.name-option:hover { transform: translateY(-2px); background: #eaf6ff; }
.name-option:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ocean-deep); }
.name-option.surprise {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #fff5c4 0%, #ffe48a 100%);
  border-color: #f2b33a;
  color: #6a4500;
  box-shadow: 0 4px 0 #c38a1a, 0 6px 12px rgba(195, 138, 26, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.name-option.surprise:hover { background: linear-gradient(180deg, #fff8d3 0%, #ffe48a 100%); }

/* Album card name tag — 'Name me' until picked, saved name after */
.album-name-tag {
  appearance: none;
  margin-top: 4px;
  padding: 2px 8px;
  font: inherit;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.3;
  border-radius: 999px;
  border: 1.5px solid var(--ocean);
  background: #eaf6ff;
  color: var(--ocean-deep);
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 120ms ease, background 120ms ease;
}
.album-name-tag:hover { background: #d5eeff; transform: translateY(-1px); }
.album-name-tag:active { transform: translateY(1px); }
.album-name-tag.name-me {
  background: linear-gradient(180deg, #fff5c4 0%, #ffe48a 100%);
  border-color: #f2b33a;
  color: #6a4500;
  animation: nameMeSoftPulse 3.4s ease-in-out infinite;
}
@keyframes nameMeSoftPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 85, 0); }
  50%      { box-shadow: 0 0 0 3px rgba(255, 215, 85, 0.45); }
}

/* V9 passport stamp — tiny, rotated, faded-ink look in the corner.
   Pure decoration, no animation, no interaction. */
.passport-stamp {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8a2728;
  border: 1.5px solid #8a2728;
  border-radius: 10px;
  padding: 2px 6px 1px;
  background: rgba(255, 240, 235, 0.55);
  transform: rotate(-10deg);
  opacity: 0.75;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  /* Ink-stamp feel: faint double outline + slight blur on the text shadow */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4) inset;
  text-shadow: 0 0 1px rgba(138, 39, 40, 0.3);
}
/* Shiny star badge already lives in the top-right; when both exist, nudge
   the stamp to the left so they don't collide. */
.album-card .shiny-badge ~ .passport-stamp { right: 36px; }
.album-card .star-ribbon ~ .passport-stamp { right: 36px; }

/* --- V12: profile picker --- */
.profile-modal { max-width: 560px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px 20px 22px;
  overflow-y: auto;
}
.profile-card {
  appearance: none;
  border: 2px solid rgba(42, 133, 192, 0.2);
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 12px 14px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.profile-card:hover { transform: translateY(-3px); border-color: var(--ocean); }
.profile-card:active { transform: translateY(1px); }
.profile-card.active {
  border-color: var(--legendary);
  background: linear-gradient(180deg, #fffef0 0%, var(--legendary-soft) 100%);
  box-shadow: var(--shadow-soft), 0 0 0 3px rgba(255, 184, 26, 0.25);
}
.profile-emoji {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(5, 61, 91, 0.18));
}
.profile-name {
  font-weight: 800;
  font-size: 1rem;
  margin-top: 4px;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-stats {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 700;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.profile-stats span { white-space: nowrap; }

.profile-card.new-slot {
  border-style: dashed;
  border-color: rgba(42, 133, 192, 0.4);
  background: linear-gradient(180deg, #f4faff 0%, #dff0fb 100%);
  color: var(--ocean-deep);
  justify-content: center;
  min-height: 140px;
}
.profile-card.new-slot .profile-emoji { font-size: 2.2rem; opacity: 0.85; }
.profile-card.new-slot .profile-name { color: var(--ocean-deep); }

/* --- V12: create-profile form --- */
.create-profile-modal { max-width: 480px; }
.create-profile-body {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.create-profile-label {
  font-weight: 800;
  color: var(--ink);
  font-size: 0.95rem;
}
.create-profile-input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(42, 133, 192, 0.3);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  background: #f4faff;
  transition: border-color 120ms ease, background 120ms ease;
}
.create-profile-input:focus {
  outline: none;
  border-color: var(--ocean);
  background: #ffffff;
}
.create-profile-emojis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: #f4faff;
  border-radius: 14px;
  border: 1.5px solid rgba(42, 133, 192, 0.15);
}
.create-profile-emoji-btn {
  appearance: none;
  border: 2px solid transparent;
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 0;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.create-profile-emoji-btn:hover { transform: scale(1.08); }
.create-profile-emoji-btn.selected {
  border-color: var(--legendary);
  background: var(--legendary-soft);
}
.create-profile-submit {
  margin-top: 6px;
  appearance: none;
  border: none;
  padding: 13px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  color: white;
  background: linear-gradient(180deg, #4caf50 0%, #2d8c32 100%);
  box-shadow: 0 4px 0 #226823, 0 6px 12px rgba(34, 104, 35, 0.3);
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}
.create-profile-submit:hover:not(:disabled) { filter: brightness(1.05); }
.create-profile-submit:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #226823, 0 3px 8px rgba(34, 104, 35, 0.25);
}
.create-profile-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: linear-gradient(180deg, #9bc69c 0%, #7aa17d 100%);
  box-shadow: 0 2px 0 #5e7a60;
}

/* --- V12: Switch-player button in settings --- */
.switch-profile-btn {
  appearance: none;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3db4f0 0%, #1b6ea8 100%);
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 0 #0b3c5f, 0 4px 10px rgba(5, 61, 91, 0.25);
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}
.switch-profile-btn:hover { filter: brightness(1.05); }
.switch-profile-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0b3c5f, 0 2px 6px rgba(5, 61, 91, 0.2);
}

.album-close.hidden { display: none; }

/* --- V12: Pond event pill + sky tints + mutation styling --- */
.event-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffbe8 0%, #ffe999 100%);
  border: 2.5px solid #e9b93a;
  color: #4c3104;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(233, 185, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
  animation: eventPillAppear 360ms cubic-bezier(.3, 1.5, .5, 1);
  align-self: center;
}
.event-pill.hidden { display: none; }
/* V13: idle "sunny" baseline — soft sky-blue, no glow, no animation pulse.
   Present 95%+ of the time so it sits quietly beside the other header chips. */
.event-pill.idle {
  background: linear-gradient(180deg, #e9f4ff 0%, #c9e3ff 100%);
  border-color: #6fa8d9;
  color: #1b4063;
  box-shadow: 0 3px 10px rgba(111, 168, 217, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: none;
}
/* V13: pending warning — same per-event color family as active, but with a
   soft pulse so your eye catches the "something's coming" state. */
.event-pill.pending {
  animation: weatherPillAppear 360ms cubic-bezier(.3, 1.5, .5, 1), weatherPillPulse 1.6s ease-in-out 360ms infinite;
}
.event-pill.pending .event-pill-timer { opacity: 0.9; }
@keyframes weatherPillAppear {
  0%   { transform: translateY(-8px) scale(0.8); opacity: 0; }
  70%  { transform: translateY(0) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes weatherPillPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.event-pill-emoji { font-size: 1.2rem; line-height: 1; }
.event-pill-label { font-weight: 900; }
.event-pill-timer { font-variant-numeric: tabular-nums; opacity: 0.75; }
.event-pill-fill {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 215, 90, 0.55), rgba(255, 184, 26, 0.25));
  transform: scaleX(var(--ratio, 1));
  transform-origin: left center;
  opacity: 0.35;
  z-index: 0;
  transition: transform 1s linear;
}
.event-pill > * { position: relative; z-index: 1; }

@keyframes eventPillAppear {
  0%   { transform: translateY(-8px) scale(0.8); opacity: 0; }
  70%  { transform: translateY(0) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Per-event pill accents */
.event-pill.event-storm {
  background: linear-gradient(180deg, #d9edff 0%, #88baff 100%);
  border-color: #3a8dde;
  color: #0b3d62;
  box-shadow: 0 4px 14px rgba(58, 141, 222, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.event-pill.event-rainbow {
  background: linear-gradient(90deg, #ffb3b3, #ffd98c, #b7f0a1, #a7d9ff, #d7b3ff);
  border-color: #a05ad8;
  color: #3a1a55;
}
.event-pill.event-moon {
  background: linear-gradient(180deg, #f1f0ff 0%, #c2bfff 100%);
  border-color: #7470d6;
  color: #1f1a55;
}

/* Sky-zone tints while an event is active. Reuses the .sky-zone gradient
   backdrop but lays a themed wash on top so the pond sky visibly shifts
   without touching the pond water below. */
/* sky-zone is already position: absolute, which is itself a positioning
   context for ::before/::after — no need to flip to relative, and doing so
   breaks `height: var(--surface-y)` (percentage on a relative-positioned
   block requires an explicit parent height; .pond only sets min-height). */
body.event-active .sky-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: eventSkyFade 600ms ease-out;
  mix-blend-mode: multiply;
}
body.event-storm .sky-zone::after {
  background: linear-gradient(180deg, #465d7a 0%, #7a8faa 80%);
  opacity: 0.45;
}
body.event-rainbow .sky-zone::after {
  background: linear-gradient(90deg,
    rgba(255, 140, 140, 0.35),
    rgba(255, 220, 120, 0.35),
    rgba(170, 240, 140, 0.35),
    rgba(140, 200, 255, 0.35),
    rgba(220, 170, 255, 0.35));
  mix-blend-mode: screen;
  opacity: 0.7;
}
body.event-moon .sky-zone::after {
  background: radial-gradient(ellipse at 70% 30%, rgba(255, 255, 230, 0.55) 0%, rgba(40, 40, 90, 0.55) 60%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
@keyframes eventSkyFade {
  from { opacity: 0; }
  to   { opacity: var(--target, 1); }
}

/* Subtle page-edge glow while event is active (gentler than shiny frame). */
body.event-active::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  animation: eventFrameFade 800ms ease-out forwards;
}
body.event-storm::before    { box-shadow: inset 0 0 80px 12px rgba(88, 160, 230, 0.35); }
body.event-rainbow::before  { box-shadow: inset 0 0 80px 12px rgba(200, 120, 220, 0.28); }
body.event-moon::before     { box-shadow: inset 0 0 80px 12px rgba(180, 180, 255, 0.32); }

@keyframes eventFrameFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Mutation catch rows --- */
.catch-entry.is-mutation .catch-card {
  position: relative;
  overflow: visible;
}
.catch-entry.is-mutation .catch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--mut-color, #58c8ff), 0 0 16px 2px var(--mut-glow, rgba(88, 200, 255, 0.6));
  z-index: 3;
}
.catch-entry.is-mutation.mut-electric  { --mut-color: #58c8ff; --mut-glow: rgba(88, 200, 255, 0.6); }
.catch-entry.is-mutation.mut-prismatic { --mut-color: #ff7ad0; --mut-glow: rgba(255, 122, 208, 0.55); }
.catch-entry.is-mutation.mut-lunar     { --mut-color: #c9c9ff; --mut-glow: rgba(232, 233, 255, 0.7); }

.catch-mut-icon {
  display: inline-block;
  font-size: 0.95rem;
  margin-right: 2px;
  filter: drop-shadow(0 0 4px var(--mut-glow, rgba(88, 200, 255, 0.6)));
}

.catch-entry.is-mutation .catch-emoji.mutation .fish-art {
  filter: drop-shadow(0 0 6px var(--mut-glow, rgba(88, 200, 255, 0.6))) saturate(1.2);
}

/* V12: Storm lightning flash — bright double-blink across the sky zone. */
.lightning-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(220, 240, 255, 0.6));
  mix-blend-mode: screen;
  animation: lightningFlash 700ms ease-out forwards;
  z-index: 5;
}
@keyframes lightningFlash {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  14%  { opacity: 0.15; }
  22%  { opacity: 0.9; }
  40%  { opacity: 0.35; }
  100% { opacity: 0; }
}
/* Slight electric-blue rim added to the pond during flashes for extra pop. */
body.event-storm .pond { position: relative; }
body.event-storm .pond::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 40px 2px rgba(120, 180, 255, 0.25);
  z-index: 2;
}

/* V12: Rainbow arc — SVG stacked bands arching over the pond's sky zone. */
.rainbow-arc {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  animation: rainbowArcAppear 900ms ease-out 200ms forwards, rainbowShimmer 4s ease-in-out 1.1s infinite;
}
.rainbow-arc svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(255, 220, 130, 0.55));
}
@keyframes rainbowArcAppear {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to   { opacity: 0.85; transform: translateY(0) scale(1); }
}
@keyframes rainbowShimmer {
  0%, 100% { filter: drop-shadow(0 2px 12px rgba(255, 220, 130, 0.55)); }
  50%      { filter: drop-shadow(0 2px 18px rgba(255, 240, 180, 0.9)) brightness(1.08); }
}

/* V12: Drifting moon during moon event — slow L→R drift, soft halo glow. */
.drifting-moon {
  position: absolute;
  top: 12%;
  left: -14%;
  font-size: 3.2rem;
  filter: drop-shadow(0 0 18px rgba(255, 250, 220, 0.85))
          drop-shadow(0 0 36px rgba(200, 200, 255, 0.55));
  transition: left 58s linear;
  z-index: 4;
  animation: moonBob 6s ease-in-out infinite;
  pointer-events: none;
}
.drifting-moon.drifting { left: 108%; }
@keyframes moonBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
/* Extra aura — soft radial halo that follows the moon via a pseudo-element. */
.drifting-moon::before {
  content: "";
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 220, 0.35) 0%, rgba(200, 200, 255, 0.15) 40%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Event notification accents */
.notif.event-notif.event-storm    { border-left-color: #3a8dde; }
.notif.event-notif.event-rainbow  { border-left-color: #a05ad8; }
.notif.event-notif.event-moon     { border-left-color: #7470d6; }

/* V13: in-pond weather-warning banner. Shows during the ~30s pending window
   before a weather event starts, so she gets a "get ready!" moment. Pixelated
   retro warning-sign vibe: chunky outline, hard edges, slight flicker, sitting
   above the water line in the top-right of the pond so it doesn't block the
   cast center. Per-event color accents match the event pill + sky tints. */
.weather-banner {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4; /* above surface decorations (z:3), below cast-center UI */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-family: "Baloo 2", "SF Pro Rounded", system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff7e8;
  background: #7a1e1e; /* default (storm): amber-warning red */
  border: 2.5px solid #2a0b0b;
  border-radius: 4px; /* boxy, not pill — pixel-sign feel */
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 6px 14px rgba(0, 0, 0, 0.25);
  animation: weatherBannerIn 420ms cubic-bezier(.3, 1.5, .5, 1), weatherBannerFlicker 2.2s ease-in-out 420ms infinite;
  pointer-events: none;
  user-select: none;
}
.weather-banner.hidden { display: none; }
.weather-banner-icon { font-size: 1rem; line-height: 1; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45)); }
.weather-banner-text { line-height: 1.05; }
/* Storm — warning-sign red/amber (default already matches) */
.weather-banner.event-storm {
  background: linear-gradient(180deg, #8f2525 0%, #6a1515 100%);
  border-color: #2a0b0b;
  color: #fff2d4;
}
/* Rainbow — soft pastel magenta/violet */
.weather-banner.event-rainbow {
  background: linear-gradient(180deg, #a63fae 0%, #6b2586 100%);
  border-color: #2a0b2e;
  color: #fff0fb;
}
/* Moon — deep indigo */
.weather-banner.event-moon {
  background: linear-gradient(180deg, #3a3875 0%, #22204a 100%);
  border-color: #0f0e28;
  color: #ecebff;
}
@keyframes weatherBannerIn {
  0%   { transform: translateY(-12px) scale(0.85); opacity: 0; }
  70%  { transform: translateY(0) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes weatherBannerFlicker {
  0%, 100% { filter: brightness(1); }
  48%      { filter: brightness(1); }
  50%      { filter: brightness(1.35); }
  52%      { filter: brightness(1); }
}
.notif.mut-electric  { border-left-color: #58c8ff; }
.notif.mut-prismatic { border-left-color: #ff7ad0; }
.notif.mut-lunar     { border-left-color: #c9c9ff; }

/* V12: Album mutation strip — one pip per mutation, faded until caught. */
.album-mut-strip {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}
.album-mut-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(200, 210, 220, 0.4);
  font-size: 0.9rem;
  line-height: 1;
  filter: grayscale(1) opacity(0.4);
  transition: filter 200ms ease, transform 200ms ease;
  cursor: help;
}
.album-mut-pip.caught {
  filter: none;
  box-shadow: 0 0 0 2px var(--pip-color, #58c8ff), 0 0 10px 1px var(--pip-glow, rgba(88, 200, 255, 0.5));
  background: var(--pip-soft, rgba(88, 200, 255, 0.18));
  animation: mutPipLit 3.2s ease-in-out infinite;
}
.album-mut-pip.mut-electric  { --pip-color: #58c8ff; --pip-glow: rgba(88, 200, 255, 0.55); --pip-soft: rgba(88, 200, 255, 0.18); }
.album-mut-pip.mut-prismatic { --pip-color: #ff7ad0; --pip-glow: rgba(255, 122, 208, 0.55); --pip-soft: rgba(255, 122, 208, 0.18); }
.album-mut-pip.mut-lunar     { --pip-color: #c9c9ff; --pip-glow: rgba(232, 233, 255, 0.7);  --pip-soft: rgba(232, 233, 255, 0.25); }
@keyframes mutPipLit {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ============================================================================
   V14 Welcome screen — click-to-start gate on every page load.
   Soft painterly wash (matches pond gradient + V13 deco palette). Big bold
   "LUCKY FISH" with chunky dark outline, per-letter staggered drop-in, and
   a Minecraft-style wobbling yellow splash quote.
   ============================================================================ */
.welcome-screen {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  animation: welcomeFadeIn 280ms ease;
}
.welcome-screen.welcome-hiding {
  pointer-events: none;
  animation: welcomeFadeOut 400ms ease forwards;
}
body.welcome-open { overflow: hidden; }

.welcome-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 245, 220, 0.0) 0%, rgba(10, 30, 60, 0.12) 100%),
    url("assets/welcome-bg.png") center / cover no-repeat;
  filter: saturate(1.03);
}

.welcome-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  max-width: 92vw;
}
.welcome-eyebrow {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 6px rgba(15, 50, 80, 0.35));
  animation: welcomeEyebrow 2.4s ease-in-out infinite;
}
@keyframes welcomeEyebrow {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-6px) rotate(6deg); }
}

.welcome-title {
  margin: 0;
  display: flex;
  justify-content: center;
  line-height: 0;
}
.welcome-logo {
  display: block;
  width: clamp(280px, 62vw, 640px);
  height: auto;
  max-height: 55vh;
  filter: drop-shadow(0 10px 18px rgba(8, 24, 48, 0.45));
  transform: scale(0.2) rotate(-8deg);
  opacity: 0;
  animation: welcomeLogoDrop 0.8s cubic-bezier(.2, 1.4, .35, 1) forwards,
             welcomeLogoBob 3.6s ease-in-out 0.8s infinite;
}
@keyframes welcomeLogoDrop {
  0%   { transform: scale(0.2) rotate(-8deg);   opacity: 0; }
  55%  { transform: scale(1.08) rotate(3deg);   opacity: 1; }
  80%  { transform: scale(0.97) rotate(-1deg); }
  100% { transform: scale(1) rotate(0);         opacity: 1; }
}
@keyframes welcomeLogoBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-8px) rotate(1deg); }
}
.welcome-word { display: inline-flex; position: relative; }
.welcome-letter {
  display: inline-block;
  position: relative;
  font-size: clamp(3.4rem, 13vw, 9rem);
  /* warm fill paints through transparent stroke; stacked shadows sit BEHIND
     the glyph (offset only down-right) so the 3D riser reads cleanly. */
  color: #ffd96b;
  -webkit-text-stroke: 3px #18233d;
  text-shadow:
    3px 3px 0 #18233d,
    6px 6px 0 #18233d,
    8px 9px 0 rgba(24, 35, 61, 0.85),
    0 14px 18px rgba(15, 50, 80, 0.45);
  /* entrance: drop-in from above + tiny rock-settle */
  transform: translateY(-120%) rotate(-8deg);
  opacity: 0;
  animation:
    welcomeLetterDrop 0.55s cubic-bezier(.2, 1.4, .4, 1) forwards,
    welcomeLetterBob 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.07s), calc(0.55s + var(--i, 0) * 0.07s);
}
@keyframes welcomeLetterDrop {
  0%   { transform: translateY(-120%) rotate(-8deg); opacity: 0; }
  60%  { transform: translateY(8%)    rotate(3deg);  opacity: 1; }
  85%  { transform: translateY(-2%)   rotate(-1deg); }
  100% { transform: translateY(0)     rotate(0);     opacity: 1; }
}
@keyframes welcomeLetterBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-6px) rotate(1.5deg); }
}

.welcome-splash {
  display: block;
  margin: clamp(20px, 3.5vh, 36px) auto clamp(18px, 3vh, 30px);
  padding: 2px 10px;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 3vw, 1.7rem);
  color: #ffef3f;
  /* classic Minecraft splash: pure yellow on dark drop-shadow, no stroke. */
  text-shadow:
    2px 2px 0 #2a1f00,
    3px 3px 0 rgba(42, 31, 0, 0.6),
    0 6px 10px rgba(30, 20, 0, 0.35);
  transform: rotate(-14deg);
  animation: welcomeSplashWobble 0.9s ease-in-out infinite;
  transform-origin: center;
  pointer-events: none;
  max-width: 80vw;
}
@keyframes welcomeSplashWobble {
  0%, 100% { transform: rotate(-14deg) scale(1); }
  50%      { transform: rotate(-14deg) scale(1.08); }
}

.welcome-start {
  display: block;
  margin: clamp(10px, 2vh, 22px) auto 0;
  padding: 14px 36px;
  border: 4px solid #1b2d4a;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffdc6a 0%, #ffb237 100%);
  color: #1b2d4a;
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  cursor: pointer;
  box-shadow: 0 6px 0 #1b2d4a, 0 10px 18px rgba(15, 50, 80, 0.3);
  transition: transform 120ms ease, box-shadow 120ms ease;
  animation: welcomeStartPulse 2.2s ease-in-out infinite;
}
.welcome-start:hover { transform: translateY(-2px); }
.welcome-start:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1b2d4a, 0 4px 8px rgba(15, 50, 80, 0.3);
  animation: none;
}
@keyframes welcomeStartPulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes welcomeFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes welcomeFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-eyebrow,
  .welcome-letter,
  .welcome-splash,
  .welcome-start { animation: none; }
  .welcome-letter { transform: none; opacity: 1; }
}

/* ============================================================================
   V14 deep-water ambient — large background fish + rare shark swim in the
   lower third of the water. Non-interactive — low z, below the main
   .ambient-fish layer, muted filter so they read as "background life".
   ============================================================================ */
.ambient-fish .bg-ambient-fish,
.ambient-fish .bg-ambient-shark {
  position: absolute;
  will-change: left, transform;
  /* Solid art — the painterly Ideogram output already has strong cel-shading
     that reads as recession; opacity dimming made them feel half-dissolved. */
  filter: drop-shadow(0 4px 6px rgba(2, 30, 60, 0.45));
  pointer-events: none;
  z-index: 1; /* below the main ambient emoji fish which run at z:2 */
}
.ambient-fish .bg-ambient-fish { width: 88px; height: auto; }
.ambient-fish .bg-ambient-shark { width: 132px; height: auto; }

/* ============================================================================
   V14 day/night cycle — cosmetic recolor only. --night-mix is 0..1, driven
   by updateDayNight() every few frames. We paint a translucent gradient on
   top of the pond (.pond::after) so the existing water gradient still shows
   through. Gameplay is untouched — PostHog events fire regardless.
   ============================================================================ */
body { --night-mix: 0; }
.pond::before {
  /* V14 day/night tint — fixed deep-blue gradient, opacity driven by
     --night-mix. opacity transitions cleanly (unlike background), so the
     overlay fades in/out smoothly over the 8-min cycle. Cosmetic only. */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg,
      #0e1436 0%,
      #141c48 calc(var(--surface-y) - 2%),
      #0b1434 calc(var(--surface-y) + 2%),
      #050b26 65%,
      #01030f 100%);
  opacity: var(--night-mix, 0);
  transition: opacity 3s linear;
}
/* Dusk/dawn warm band — visible only near transitions. Uses a dashed-var
   trick: ::after paints a horizon-kissed gradient whose alpha follows a
   second var --twilight-mix (0 at midnight and noon, peaks 0.7 at dusk/dawn). */
body[data-dn-phase="dusk"] .pond::after,
body[data-dn-phase="dawn"] .pond::after {
  /* Layered on top of pond-rays — keep it behind decor/fish by tapping into
     the existing z-index hierarchy (pond children default above ::after). */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg,
    rgba(255, 160, 90, 0.22) 0%,
    rgba(255, 190, 120, 0.15) calc(var(--surface-y) - 4%),
    rgba(90, 60, 100, 0.15) calc(var(--surface-y) + 6%),
    transparent 60%);
  animation: twilightFade 6s ease-in-out infinite alternate;
}
@keyframes twilightFade {
  0%   { opacity: 0.75; }
  100% { opacity: 1; }
}
/* Soften the sun during night so it doesn't pop through the moon swap. */
body[data-dn-phase="night"] .sky-cloud { opacity: 0.55; filter: brightness(0.65); }
body[data-dn-phase="night"] .far-bank { filter: brightness(0.55) saturate(0.8); }
body[data-dn-phase="dusk"] .far-bank,
body[data-dn-phase="dawn"] .far-bank { filter: brightness(0.85) saturate(0.95); }

/* ============================================================================
   V14.4 — painterly weather overlays. Each body.event-X class drops a scene
   illustration into the sky-zone via ::before. ::after is already used by the
   existing tint multiply, so overlays go on ::before at a higher z-index.
   ============================================================================ */
body.event-storm .sky-zone::before,
body.event-rainbow .sky-zone::before,
body.event-fog .sky-zone::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 3;
  animation: eventSkyFade 900ms ease-out;
}
body.event-storm .sky-zone::before {
  inset: 0;
  background: url("assets/env/weather_storm.png") center top / 100% auto no-repeat;
  opacity: 0.92;
}
body.event-rainbow .sky-zone::before {
  inset: 0;
  background: url("assets/env/weather_rainbow.png") center top / 100% auto no-repeat;
  opacity: 0.9;
}
body.event-fog .sky-zone::before {
  /* Fog clings to the water surface, not the upper sky. */
  left: -5%; right: -5%;
  bottom: -10%;
  height: 55%;
  background: url("assets/env/weather_fog.png") center / 110% auto no-repeat;
  opacity: 0.85;
  animation: eventSkyFade 1200ms ease-out, fogDrift 28s ease-in-out infinite alternate;
}
@keyframes fogDrift {
  0%   { transform: translateX(-3%); }
  100% { transform: translateX(3%); }
}

/* ============================================================================
   V14.5 — biome backdrops (dev flag `?biome=coral|arctic|sunset|jungle`).
   Each PNG is composed for layering: top 32% is transparent (revealing the
   pond's procedural sky gradient + the game's sky-zone entities — sun/moon,
   clouds, birds, airplane, weather), bottom 68% is the painted underwater
   scene with foreground silhouettes (mountains, palms, icebergs) poking up
   into the transparent sky region. Stretching to 100% 100% locks the
   painted waterline to the pond's --surface-y (32%).
   ============================================================================ */
.pond.biome-coral,
.pond.biome-arctic,
.pond.biome-sunset,
.pond.biome-jungle {
  /* Stack: biome PNG on top of the existing radial highlight + linear sky/water
     gradient. The biome's transparent sky region lets the gradient sky color
     show through while sky-zone entities render on top. The sky stops use
     --biome-sky so the gradient harmonizes with the PNG's painted sky color
     — otherwise the boundary between transparent and painted PNG regions
     shows as a horizontal seam. */
  background-image:
    var(--biome-image),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.22) 0%, transparent 50%),
    linear-gradient(180deg,
      var(--biome-sky, #c7ecff) 0%,
      var(--biome-sky, #d8f4ff) calc(var(--surface-y) - 2%),
      #5fb6e0 calc(var(--surface-y) + 2%),
      #2e80c0 65%,
      #083960 100%);
  background-size: 100% 100%, auto, auto;
  background-position: top left;
  background-repeat: no-repeat;
}
.pond.biome-coral  { --biome-image: url("assets/env/biome_coral.png");  --biome-sky: #a7c8c4; }
.pond.biome-arctic { --biome-image: url("assets/env/biome_arctic.png"); --biome-sky: #bfe4f2; }
.pond.biome-sunset { --biome-image: url("assets/env/biome_sunset.png"); --biome-sky: #f9bd93; }
.pond.biome-jungle { --biome-image: url("assets/env/biome_jungle.png"); --biome-sky: #e5ece1; }
/* Biomes paint their own horizon foreground and water surface — hide the
   default far-bank and the scalloped surface SVG so we don't get a white
   line running across the painted waterline. */
.pond.biome-coral  .far-bank,
.pond.biome-arctic .far-bank,
.pond.biome-sunset .far-bank,
.pond.biome-jungle .far-bank,
.pond.biome-coral  .water-surface,
.pond.biome-arctic .water-surface,
.pond.biome-sunset .water-surface,
.pond.biome-jungle .water-surface { display: none; }
/* Soften the night-tint overlay on biomes. At --night-mix: 1 the default
   rule goes near-opaque and swallows the painted scene; biomes have their
   own painted lighting, so we cap the darkening to half-strength — night
   still dims them noticeably but the art stays legible. */
.pond.biome-coral::before,
.pond.biome-arctic::before,
.pond.biome-sunset::before,
.pond.biome-jungle::before {
  opacity: calc(var(--night-mix, 0) * 0.5);
}

/* ============================================================================
   V14.4 — nugget fish mascot: same swim behavior as bg-ambient-fish, but
   slightly smaller and rarer. Gets a subtle breaded-gold drop-shadow.
   ============================================================================ */
.ambient-fish .bg-ambient-fish.nugget {
  width: 72px;
  filter: drop-shadow(0 4px 6px rgba(120, 80, 10, 0.5));
}
