/* Swim with Ellie · a calm follow-me game for ages 4 to 7, over the sandy shallows of La Jolla Shores.
   Same brand kit, sea, controls and caption as the other games. The habitat is wide, flat, open sand. */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}

:root {
  --navy: #2E3253;
  --sun: #FDF2C5;
  --coral: #F56F56;
  --lagoon: #0EC0DB;
  --deep: #0293C6;
  --ellie: #D29E76;
  --spots: #716166;
  --blush: #FBB5A8;
  --sand: #F1D9AC;
}

html, body {
  margin: 0; height: 100%; overflow: hidden;
  overscroll-behavior: none;
  background: #52D1E2;
}
body {
  position: fixed; inset: 0;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  color: var(--navy);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
img { -webkit-user-drag: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* clear, shallow turquoise water, lighter toward the surface. Holding and dragging never scrolls or zooms. */
.sea {
  position: absolute; inset: 0; overflow: hidden;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
  background:
    radial-gradient(110% 55% at 26% -10%, rgba(253, 242, 197, 0.6), transparent 62%),
    linear-gradient(180deg, #C9F2F2 0%, #93E3EA 15%, #58D2E3 38%, #31C3DA 60%, #3BBFD3 76%, #73CDCB 100%);
  cursor: pointer;
}

/* soft sunbeams slanting down from the surface */
.beams { position: absolute; inset: 0; pointer-events: none; }
.beams i {
  position: absolute; top: -14%;
  width: 9vw; min-width: 44px; height: 128%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 80%);
  filter: blur(12px); opacity: 0.26;
  animation: beam 17s ease-in-out infinite alternate;
}
.beams i:nth-child(1) { left: 4%; transform: rotate(-24deg); animation-delay: -5s; }
.beams i:nth-child(2) { left: 22%; width: 6vw; transform: rotate(-21deg); animation-delay: -11s; }
.beams i:nth-child(3) { left: 41%; width: 12vw; transform: rotate(-19deg); animation-delay: -2s; }
.beams i:nth-child(4) { left: 62%; width: 7vw; transform: rotate(-17deg); animation-delay: -14s; }
.beams i:nth-child(5) { left: 80%; transform: rotate(-15deg); animation-delay: -8s; }
@keyframes beam {
  from { opacity: 0.14; translate: -1.5vw 0; }
  to { opacity: 0.4; translate: 1.5vw 0; }
}

/* the wide, flat sandy floor with soft ripples and drifting water light */
.sand {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background:
    radial-gradient(40% 30% at 22% 40%, rgba(255, 255, 255, 0.3), transparent 70%),
    radial-gradient(30% 25% at 74% 62%, rgba(255, 255, 255, 0.26), transparent 70%),
    linear-gradient(180deg, #F3DDB3 0%, #EDCF9C 100%);
}
/* the edge and ripples are two screens wide (one tile, twice) and slide with the camera (swim.js) */
.sand__edge { position: absolute; left: 0; bottom: 100%; width: 200%; height: 34px; margin-bottom: -1px; will-change: transform; }
.sand__edge path { fill: #F3DDB3; }
.sand__ripples { position: absolute; left: 0; top: 0; width: 200%; height: 100%; will-change: transform; }
.rip { fill: none; stroke-linecap: round; }
.rip path { vector-effect: non-scaling-stroke; }
.rip--lt { stroke: rgba(255, 251, 238, 0.6); stroke-width: 2; }
.rip--dk { stroke: rgba(184, 142, 88, 0.24); stroke-width: 2; }

.caustics {
  position: absolute; left: 0; right: 0; top: -12px; bottom: 0; overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
}
.caustics__net { position: absolute; left: 0; top: 0; width: 200%; height: 100%; filter: blur(1px); will-change: transform; }
.caustics__net svg { display: block; }
.caustics__net--a { opacity: 0.3; animation: drift-a 40s ease-in-out infinite alternate; }
.caustics__net--b { opacity: 0.2; animation: drift-b 52s ease-in-out infinite alternate; }
@keyframes drift-a { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-20%, 6px, 0); } }
@keyframes drift-b { from { transform: translate3d(-24%, 5px, 0); } to { transform: translate3d(-3%, -4px, 0); } }

/* further out to sea. The ocean is about four screens wide: the shallows (home, one screen, bare sand) → the
   rocky edge (rocks, short seaweed) → the giant kelp forest off La Jolla. The camera follows Ellie; each layer
   slides at its own speed (far kelp slower, the front fronds faster), so the forest has depth. --deep (0 in the
   shallows, 1 at the far end) turns the water a deeper blue and thins out the sunbeams. */
.beams { opacity: calc(1 - 0.65 * var(--deep, 0)); }
.caustics { opacity: calc(1 - 0.5 * var(--deep, 0)); }
.layer { position: absolute; left: 0; top: 0; height: 100%; z-index: 1; pointer-events: none; will-change: transform; }
.layer--near { z-index: 3; }
.layer > * { position: absolute; left: 0; top: 0; }
.layer svg { display: block; overflow: visible; }
.deep {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #2A8FB4 0%, #12709A 55%, #0C5F84 100%);
  opacity: calc(0.6 * var(--deep, 0));
}
/* kelp and seaweed sway slowly from where they're rooted; anything off the screen holds still */
.sway { transform-origin: 50% 100%; animation: sway 8s ease-in-out infinite alternate; }
.sway--tuft { animation-name: tuft; animation-duration: 5s; }
.sway.is-still { animation-play-state: paused; }
@keyframes sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
@keyframes tuft { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

/* everyone who swims or rests here; JS places each one and keeps them in depth order */
.world { position: absolute; inset: 0; z-index: 2; pointer-events: none; will-change: transform; }
.world > * { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }

/* Ellie (and the other leopard sharks): CleoEllie art, drawn facing left with her heart showing */
.swimmer__turn { width: 100%; height: 100%; transition: transform 0.8s ease-in-out; }
.swimmer__turn.is-right { transform: scaleX(-1); }
.swimmer__tilt, .swimmer__nod { width: 100%; height: 100%; }
.swimmer__nod { transform-origin: 62% 55%; }
.ce { width: 100%; height: 100%; display: block; overflow: visible; }
.ellie .ce { filter: drop-shadow(0 12px 10px rgba(2, 80, 120, 0.16)); }
.swimmer .ce-tail { transform-box: fill-box; transform-origin: 0% 50%; animation: tail 2.6s ease-in-out infinite alternate; }
@keyframes tail { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
/* Bible: her one heart is on her LEFT side. Facing right shows her right side, so the heart hides,
   right at the middle of the turn (when she is edge-on). */
.ce-heart { transition: visibility 0s linear 0.4s; }
.is-right .ce-heart { visibility: hidden; }
/* the other sharks: a little smaller and softer, and never Ellie's heart */
.shark { opacity: 0; transition: opacity 2s ease; }
.shark.is-in { opacity: 0.86; }
.shark .ce { filter: drop-shadow(0 10px 9px rgba(2, 80, 120, 0.12)); }
.shark .ce-heart { display: none; }
.shark .ce-tail { animation-duration: 3.3s; }

/* a soft shadow on the sand when someone swims low */
.shade { border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 60, 50, 0.26), rgba(70, 60, 50, 0)); opacity: 0; }

/* the neighbors of the sandy shallows */
.nb { opacity: 0; transition: opacity 1.8s ease; }
.nb.is-in { opacity: 1; }
.nb__face { position: absolute; inset: 0; transition: transform 0.8s ease-in-out; }
.nb__face.is-right { transform: scaleX(-1); }
.nb__face svg, .nb__face img { width: 100%; height: 100%; display: block; overflow: visible; }
/* "come say hi" without words: a soft glow and a slow ring */
.nb__glow {
  position: absolute; inset: -18% -12%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 242, 197, 0.62), rgba(253, 242, 197, 0.22) 62%, rgba(253, 242, 197, 0));
  opacity: 0; transition: opacity 1.2s ease;
}
.nb.is-hint .nb__glow { opacity: 1; }
.nb__glow::after {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 4px solid rgba(253, 242, 197, 0.95);
  opacity: 0;
}
.nb.is-hint .nb__glow::after { animation: hint 3.2s ease-out infinite; }
@keyframes hint { 0% { transform: scale(0.86); opacity: 0; } 25% { opacity: 0.85; } 100% { transform: scale(1.24); opacity: 0; } }

/* bat ray: lifts off the sand, then glides with slow wing flaps */
.ray__body { transition: transform 1.6s cubic-bezier(0.3, 0, 0.2, 1); }
.nb.is-lift .ray__body { transform: translateY(-16px); }
.ray__shadow { transition: opacity 1.6s ease; }
.nb.is-lift .ray__shadow { opacity: 0.3; }
.ray__wing { transform-box: fill-box; }
.ray__wing--far { transform-origin: 50% 100%; }
.ray__wing--near { transform-origin: 50% 0%; }
.nb.is-flap .ray__wing--far { animation: flap-far 1.5s ease-in-out infinite alternate; }
.nb.is-flap .ray__wing--near { animation: flap-near 1.5s ease-in-out infinite alternate; }
@keyframes flap-far { from { transform: scaleY(0.9); } to { transform: scaleY(1.16); } }
@keyframes flap-near { from { transform: scaleY(1.08); } to { transform: scaleY(0.66); } }

/* round stingray: hidden under the sand, flutters out, settles again */
.rr__sand { transition: opacity 0.9s ease; }
.nb.is-out .rr__sand { opacity: 0; }
.rr__body { transition: transform 1s ease; }
.nb.is-out .rr__body { transform: translateY(-5px); }
.rr__disc { transform-box: fill-box; transform-origin: 50% 50%; }
.nb.is-flutter .rr__disc { animation: flutter 0.6s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: scaleY(1); } to { transform: scaleY(0.86); } }

/* sand dollars: standing on edge, swaying a tiny bit */
.sd { transform-box: fill-box; transform-origin: 50% 100%; animation: sd-sway 5.6s ease-in-out infinite alternate; }
.sd--2 { animation-duration: 6.5s; animation-delay: -2s; }
.sd--3 { animation-duration: 4.9s; animation-delay: -3.5s; }
@keyframes sd-sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.nb.is-met .sd { animation: sd-wave 2.6s ease-in-out 2; }
@keyframes sd-wave { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-6deg); } 70% { transform: rotate(5deg); } }

/* shovelnose guitarfish: rests, then glides off with a slow tail */
.gf__tail { transform-box: fill-box; transform-origin: 0% 50%; }
.nb.is-swim .gf__tail { animation: gf-tail 2.2s ease-in-out infinite alternate; }
@keyframes gf-tail { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* green sea turtle: paddles slowly across, high in the water */
.nb--turtle .nb__face img { filter: drop-shadow(0 12px 10px rgba(12, 70, 92, 0.2)); animation: paddle 2.6s ease-in-out infinite alternate; }
@keyframes paddle { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

/* hidden friends (part 2, step 2): someone hides behind a rock, under the sand or behind kelp, and only a little
   shows. Swim close or tap the spot, and they slowly peek out and do their real thing. Nothing jumps out. */
.hf { width: 0; height: 0; }
.hf > * { position: absolute; left: 0; top: 0; }
.hf__who { transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.hf__who img, .hf__who svg, .hf__cover svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hf__hint {
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 242, 197, 0.95), rgba(253, 242, 197, 0.35) 55%, rgba(253, 242, 197, 0));
  opacity: 0; animation: twinkle 5.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 68%, 100% { opacity: 0; transform: scale(0.4); }
  78% { opacity: 1; transform: scale(1.5); }
  88% { opacity: 0.35; transform: scale(0.9); }
}
.hf.is-found .hf__hint { display: none; }
.hf.is-off *, .hf.is-off { animation-play-state: paused !important; }
/* what each one really does once it's out */
.hf--crab.is-act .hf__who img { animation: crab-step 1.3s ease-in-out 4 alternate; }
@keyframes crab-step { from { transform: translateX(0) rotate(0deg); } to { transform: translateX(-7px) rotate(-4deg); } }
.hf--octopus.is-act .hf__who img { animation: octo-color 2.2s ease-in-out 4 alternate; }
@keyframes octo-color { from { filter: none; } to { filter: saturate(0.5) brightness(1.35) hue-rotate(-12deg); } }
.hf--garibaldi.is-act .hf__who img { animation: gari-flash 1.5s ease-in-out 4 alternate, gari-bob 4.5s ease-in-out 4.5s infinite alternate; }
@keyframes gari-flash { from { filter: none; } to { filter: brightness(1.18) drop-shadow(0 0 12px rgba(255, 150, 40, 0.95)); } }
@keyframes gari-bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.hf--moray.is-act .hf__who img { transform-origin: 100% 50%; animation: moray-sway 3.2s ease-in-out infinite alternate; }
@keyframes moray-sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.hf--lobster.is-act .hf__who img { transform-origin: 70% 85%; animation: lobster-wave 1.3s ease-in-out 6 alternate; }
@keyframes lobster-wave { from { transform: rotate(-3deg); } to { transform: rotate(2deg); } }
.hf--hornshark .hf__who { transition-duration: 3.4s; } /* it wakes and slides out slowly */
.hf--hornshark.is-act .hf__who img { animation: hs-rest 4.5s ease-in-out infinite alternate; }
@keyframes hs-rest { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.hf--stingray .rr__sand { transition: opacity 0.9s ease; }
.hf--stingray.is-found .rr__sand { opacity: 0; }
.hf--stingray .rr__body { transition: transform 1s ease; }
.hf--stingray.is-found .rr__body { transform: translateY(-5px); }
.hf--stingray.is-act .rr__disc { animation: flutter 0.6s ease-in-out 6 alternate; }

/* the friends you've found: a quiet row of little pictures, top right. No numbers. */
.found {
  position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top));
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 46vw;
  z-index: 6; pointer-events: none;
}
.found__pic {
  width: 42px; height: 42px; box-sizing: border-box; border-radius: 50%;
  background: rgba(255, 252, 240, 0.55); border: 2px solid rgba(255, 255, 255, 0.85);
  display: grid; place-items: center; overflow: hidden;
}
.found__pic img, .found__pic svg { width: 78%; height: 78%; object-fit: contain; filter: grayscale(1) brightness(1.7) opacity(0.4); transition: filter 1.2s ease; }
.found__pic .rr__sand { display: none; }
.found__pic.is-found { background: rgba(255, 252, 240, 0.9); animation: found-pop 0.9s ease; }
.found__pic.is-found img, .found__pic.is-found svg { filter: none; }
@keyframes found-pop { 40% { transform: scale(1.18); } }
@media (max-width: 420px) { .found__pic { width: 34px; height: 34px; } }

/* the warm light of the calm ending */
.warm {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(95% 60% at 28% -4%, rgba(255, 206, 120, 0.9), rgba(255, 206, 120, 0) 74%),
    linear-gradient(180deg, rgba(255, 196, 112, 0.62), rgba(255, 180, 100, 0.5));
  mix-blend-mode: soft-light; /* warms the colors underneath instead of tinting them green */
  opacity: 0; transition: opacity 4s ease;
}
.sea.is-warm .warm { opacity: 1; }
/* and golden sunlight from the surface */
.sea::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(85% 55% at 30% -8%, rgba(255, 214, 140, 0.55), rgba(255, 214, 140, 0) 72%),
    linear-gradient(180deg, rgba(255, 228, 170, 0.14), rgba(255, 228, 170, 0) 70%);
  opacity: 0; transition: opacity 4s ease;
}
.sea.is-warm::after { opacity: 1; }

/* touch ripples, bubbles, a little sand, and where Ellie is heading */
.fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; will-change: transform; }
.fx > * { position: absolute; left: 0; top: 0; pointer-events: none; }
.ripple {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}
.fxb {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95) 0 10%, rgba(255, 255, 255, 0.32) 14% 40%, rgba(255, 255, 255, 0.08) 65%, rgba(255, 255, 255, 0.04));
  border: 1.5px solid rgba(255, 255, 255, 0.8);
}
.grain { border-radius: 50%; background: rgba(222, 192, 140, 0.9); }
.aim {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(253, 242, 197, 0.9);
  box-shadow: 0 0 14px rgba(253, 242, 197, 0.55);
  opacity: 0; transition: opacity 0.6s ease;
}
.aim.is-on { opacity: 0.75; }

/* "touch here" without words: a soft pulsing ring on open water */
.touchme { width: 84px; height: 84px; opacity: 0; transition: opacity 1s ease; }
.touchme.is-on { opacity: 1; }
.touchme i {
  position: absolute; inset: 36%; border-radius: 50%;
  background: rgba(253, 242, 197, 0.6);
  box-shadow: 0 0 14px rgba(253, 242, 197, 0.85);
}
.touchme::before, .touchme::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid rgba(253, 242, 197, 0.95);
  opacity: 0;
}
.touchme.is-on::before { animation: hint 3.4s ease-out infinite; }
.touchme.is-on::after { animation: hint 3.4s ease-out 1.7s infinite; }

/* the arrow: "there's more ocean this way" (Des, 10/12: "they need an arrow to show them that they can
   continue going and reach more scenery"). A soft sea-glass bubble that nudges gently, never flashes. */
.more {
  position: absolute; top: 46%; z-index: 6;
  width: clamp(58px, 9vmin, 76px); height: clamp(58px, 9vmin, 76px);
  margin: -29px 0 0; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0 8%, #F4FCFE 16% 34%, #DDF5FA 62%, #B8E9F4);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.22), 0 0 30px 10px rgba(14, 192, 219, 0.28), 0 8px 20px rgba(2, 80, 120, 0.25);
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0; transition: opacity 1.2s ease;
}
.more[hidden] { display: none; }
.more.is-on { opacity: 1; }
.more:not(.is-on) { pointer-events: none; } /* fading out: not tappable (11/7) */
.more::after { content: ""; position: absolute; inset: -16px; border-radius: 50%; } /* a bigger, forgiving tap area */
.more svg { width: 60%; height: 60%; display: block; fill: none; stroke: #0293C6; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.more:focus-visible { outline: 3px solid var(--navy, #2E3253); outline-offset: 5px; }
.more--on { right: max(14px, env(safe-area-inset-right)); }
.more--home { left: max(14px, env(safe-area-inset-left)); }
.more--on.is-on svg { animation: nudge-r 2.6s ease-in-out infinite; }
.more--home.is-on svg { animation: nudge-l 2.6s ease-in-out infinite; }
@keyframes nudge-r { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(5px); } }
@keyframes nudge-l { 0%, 100% { transform: translateX(3px); } 50% { transform: translateX(-5px); } }

/* optional grown-up caption: one true line at a time (same as the tide pool) */
.caption {
  position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0; box-sizing: border-box;
  width: max-content; max-width: min(92vw, 640px);
  padding: 8px 16px; border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 252, 240, 0.84);
  font: 500 clamp(0.82rem, 2.4vw, 1rem)/1.3 "Fredoka", system-ui, sans-serif;
  text-align: center;
  z-index: 6; pointer-events: none;
  transition: opacity 0.35s ease;
}
.caption.is-fading { opacity: 0; }

/* grown-up controls (same as the other games; each hit area reaches 64px) */
.controls {
  position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top));
  display: flex; gap: 18px; z-index: 6;
}
.ctl {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 252, 240, 0.78);
  color: var(--navy); text-decoration: none;
  font: 500 0.92rem/1 "Fredoka", system-ui, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}
.ctl::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.ctl:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.ctl--round { width: 46px; height: 46px; padding: 0; justify-content: center; }
.ctl--round svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ctl--pill { box-sizing: border-box; height: 46px; padding: 0 16px 0 11px; gap: 7px; font-size: 1rem; } /* "Games": the way to every game, labeled so grown-ups find it */
.ctl--pill svg { width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 2.4; }
.ctl--round .spk { fill: var(--navy); }
.ctl--round .off { display: none; }
.ctl[aria-pressed="false"] .wave { display: none; }
.ctl[aria-pressed="false"] .off { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-height: 520px) and (orientation: landscape) {
  .caption { padding: 5px 14px; font-size: 0.82rem; }
}

/* reduced motion: nothing drifts on its own; Ellie swims at half speed (see swim.js) and bubbles fade in place */
@media (prefers-reduced-motion: reduce) {
  .beams i, .caustics__net, .swimmer .ce-tail, .sd, .nb.is-met .sd, .nb--turtle .nb__face img,
  .nb.is-flap .ray__wing--far, .nb.is-flap .ray__wing--near, .nb.is-flutter .rr__disc, .nb.is-swim .gf__tail, .sway,
  .hf.is-act .hf__who img, .hf--stingray.is-act .rr__disc, .found__pic.is-found { animation: none !important; }
  .hf__who, .hf--stingray .rr__body { transition: none; }
  .hf__hint { animation: hintfade 3s ease-in-out infinite alternate; }
  .swimmer__turn, .nb__face, .ce-heart { transition: none; }
  .nb.is-lift .ray__body, .nb.is-out .rr__body { transform: none; }
  .nb.is-hint .nb__glow::after, .touchme.is-on::before { animation: hintfade 3s ease-in-out infinite alternate; }
  .touchme.is-on::after { animation: none; }
  .more.is-on svg { animation: none; }
  .caption { transition: none; }
}
@keyframes hintfade { from { opacity: 0.2; } to { opacity: 0.9; } }
