
/* Little Feet cinematic navigation — isolated from the working portal UI. */
/* The portal's global tab reveal keeps a transform on active tabs because
   animation-fill-mode is "both". A transformed ancestor interferes with the
   long sticky cinematic section, so the home tab must stay untransformed. */
#homeTab.tab-content.active {
  animation: none !important;
  transform: none !important;
}

.cinematic-journey {
  --cinematic-accent: #58fff2;
  --cinematic-blue: #28b8ff;
  --cinematic-violet: #946cff;
  position: relative;
  height: 680vh;
  margin: 0 0 28px;
  border-radius: 24px;
  isolation: isolate;
}
.cinematic-journey.is-active .cinematic-stage {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: auto;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  border-radius: 0;
}
.cinematic-journey.is-after .cinematic-stage {
  top: auto;
  bottom: 0;
}

/* User pause is also a scroll-bypass mode. Freeze the current visual frame,
   collapse the 680vh journey to one normal panel, and let the document scroll
   past it instead of trapping the user inside a stopped sequence. */
.cinematic-journey.is-user-paused {
  height: auto !important;
}
.cinematic-journey.is-user-paused .cinematic-stage {
  position: relative !important;
  inset: auto !important;
  width: min(100%, 1360px) !important;
  height: auto !important;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  border-radius: 24px;
}
@media (min-width: 960px) {
  #dashboardSection > .app-sidebar ~ .container .cinematic-journey.is-active .cinematic-stage {
    left: 260px;
    width: calc(100vw - 260px);
  }
  #dashboardSection > .app-sidebar.is-collapsed ~ .container .cinematic-journey.is-active .cinematic-stage {
    left: 76px;
    width: calc(100vw - 76px);
  }
}
@media (max-width: 959px) {
  .cinematic-journey.is-active .cinematic-stage {
    left: 0;
    width: 100vw;
  }
}

@media (min-width: 1920px) and (min-height: 900px) {
  #dashboardSection > .app-sidebar ~ .container .cinematic-journey.is-active .cinematic-stage {
    left: 280px;
    width: calc(100vw - 280px);
  }
  #dashboardSection > .app-sidebar.is-collapsed ~ .container .cinematic-journey.is-active .cinematic-stage {
    left: 76px;
    width: calc(100vw - 76px);
  }
}

.cinematic-stage {
  --surface-air-opacity: 1;
  --depth-dim: 0;
  --neon-boost: 0;
  --panel-glow: .10;
  --water-opacity: .58;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh - 28px);
  height: calc(100dvh - 28px);
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(118, 240, 255, .34);
  border-radius: 24px;
  background: #03162c;
  box-shadow:
    0 30px 90px rgba(0, 8, 25, .52),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 0 90px rgba(41, 214, 255, .08);
}
.cinematic-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(3,20,44,.03), transparent 22%, transparent 76%, rgba(0,0,0,.24));
}


/* Paused cinematic swaps the live ocean for one compact static school scene.
   The real HTML controls remain above it; WebGL/audio are already hard-stopped
   by the existing pause runtime. */
.cinematic-paused-picture {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: #07111e;
  transition: opacity .16s ease;
}
.cinematic-paused-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
  transform: translateZ(0);
}
.cinematic-journey.is-user-paused .cinematic-paused-picture {
  opacity: 1;
  visibility: visible;
}
.cinematic-journey.is-user-paused .cinematic-loading {
  display: none;
}
.cinematic-journey.is-user-paused .cinematic-copy,
.cinematic-journey.is-user-paused .cinematic-depth-meter,
.cinematic-journey.is-user-paused .cinematic-progress-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cinematic-depth-picture {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #03162c;
}
.cinematic-depth-picture::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0, 16, 38, 0) 0%,
      rgba(0, 10, 32, .18) 42%,
      rgba(0, 5, 22, .88) 100%
    );
  opacity: var(--depth-dim, 0);
}

.cinematic-depth-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(104deg, transparent 0 18%, rgba(140,244,255,.11) 30%, transparent 42%),
    linear-gradient(76deg, transparent 0 58%, rgba(116,207,255,.08) 69%, transparent 80%);
  opacity: .72;
}
.cinematic-journey.is-active:not(.is-user-paused) .cinematic-depth-image {
  will-change: transform;
}

.cinematic-depth-image {
  position: absolute;
  left: 50%;
  top: 0;
  width: 100%;
  height: 172%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 0%;
  transform: translate3d(-50%, 0, 0) scale(1.035);
  transform-origin: 50% 0%;
  will-change: auto;
}
@media (min-aspect-ratio: 16/10) {
  .cinematic-depth-image {
    width: max(100%, 1200px);
    height: 188%;
  }
}
@media (max-width: 900px) {
  .cinematic-depth-image {
    height: 158%;
  }
}

/* Above-water cap: the opening frame must read as air/sky over the ice,
   never as ocean sitting above land. It fades only after the mascot dives. */
.cinematic-surface-air {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: .62;
  height: 40%;
  pointer-events: none;
  opacity: var(--surface-air-opacity, 1);
  background:
    radial-gradient(ellipse at 72% 8%, rgba(255,255,255,.98) 0 8%, rgba(229,248,255,.82) 20%, transparent 45%),
    linear-gradient(180deg, rgba(207,244,255,1) 0%, rgba(166,224,245,.99) 58%, rgba(104,190,224,.95) 88%, rgba(73,165,210,.42) 100%);
  box-shadow: inset 0 -18px 36px rgba(188,244,255,.18);
  transition: opacity .16s linear;
}

.cinematic-water-surface,
.cinematic-water-current {
  position: absolute;
  pointer-events: none;
  z-index: .38;
  overflow: hidden;
}

/* The visible water starts below the ice. The air cap above remains dry. */
.cinematic-water-surface {
  left: -8%;
  width: 116%;
  top: 39.5%;
  height: 60%;
  opacity: var(--water-opacity, .58);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(223,253,255,.48) 0 2%, rgba(115,222,247,.22) 12%, transparent 28%),
    linear-gradient(
      180deg,
      rgba(190, 246, 255, .08) 0%,
      rgba(77, 199, 233, .19) 16%,
      rgba(18, 124, 190, .18) 48%,
      rgba(3, 46, 104, .10) 78%,
      rgba(2, 24, 67, 0) 100%
    );
}

.cinematic-water-surface::before {
  content: "";
  position: absolute;
  left: -8%;
  top: 2%;
  width: 116%;
  height: 38%;
  background:
    radial-gradient(ellipse at 18% 5%, rgba(224,255,255,.42) 0 1.5%, transparent 9%),
    radial-gradient(ellipse at 47% 7%, rgba(184,245,255,.34) 0 1.2%, transparent 8%),
    radial-gradient(ellipse at 76% 4%, rgba(214,252,255,.38) 0 1.4%, transparent 8%),
    repeating-linear-gradient(
      178deg,
      transparent 0 58px,
      rgba(175, 238, 252, .10) 60px 62px,
      transparent 64px 124px
    );
  transform: translate3d(-2%, 0, 0);
  animation: cinematicSurfaceDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}

.cinematic-water-surface::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 0;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0) 0%,
      rgba(235,255,255,.88) 34%,
      rgba(99,221,249,.48) 55%,
      rgba(32,143,203,0) 100%
    );
  box-shadow:
    0 0 22px rgba(154,239,255,.48),
    0 8px 28px rgba(54,190,229,.24);
  transform: translate3d(-1%, 0, 0) scaleX(1.015);
  animation: cinematicSurfaceShimmer 10s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.cinematic-water-current {
  left: -8%;
  width: 116%;
  top: 49%;
  height: 51%;
  opacity: calc(.20 + var(--depth-dim, 0) * .22);
  background:
    linear-gradient(
      180deg,
      rgba(6, 62, 117, 0) 0%,
      rgba(18, 115, 178, .08) 18%,
      rgba(48, 172, 216, .10) 44%,
      rgba(29, 85, 158, .09) 72%,
      rgba(1, 18, 55, .20) 100%
    );
}

.cinematic-water-current::before {
  content: "";
  position: absolute;
  left: -8%;
  top: -8%;
  width: 116%;
  height: 116%;
  background:
    repeating-linear-gradient(
      171deg,
      transparent 0 88px,
      rgba(120, 221, 247, .075) 90px 92px,
      transparent 94px 182px
    );
  transform: translate3d(-2%, 0, 0);
  animation: cinematicCurrentDrift 28s ease-in-out infinite alternate;
  will-change: transform;
}

.cinematic-journey:not(.is-active) .cinematic-water-surface::before,
.cinematic-journey:not(.is-active) .cinematic-water-surface::after,
.cinematic-journey:not(.is-active) .cinematic-water-current::before,
.cinematic-journey.is-user-paused .cinematic-water-surface::before,
.cinematic-journey.is-user-paused .cinematic-water-surface::after,
.cinematic-journey.is-user-paused .cinematic-water-current::before {
  animation-play-state: paused;
  will-change: auto;
}

@keyframes cinematicSurfaceDrift {
  from { transform: translate3d(-2%, -1px, 0); }
  to   { transform: translate3d(2.5%, 3px, 0); }
}

@keyframes cinematicSurfaceShimmer {
  from { transform: translate3d(-1%, 0, 0) scaleX(1.015); opacity: .80; }
  to   { transform: translate3d(1.8%, 1px, 0) scaleX(.985); opacity: 1; }
}

@keyframes cinematicCurrentDrift {
  from { transform: translate3d(-2%, 0, 0); }
  to   { transform: translate3d(2%, -3px, 0); }
}

@media (max-width: 900px) {
  .cinematic-water-surface {
    top: 42%;
    height: 58%;
  }
  .cinematic-water-current {
    top: 51%;
    height: 49%;
  }
}

.cinematic-life-2d {
  position: absolute;
  z-index: .5;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: calc(.36 + var(--neon-boost, 0) * .34);
  will-change: auto;
  transform: translate3d(0,0,0);
  animation-play-state: paused !important;
  mix-blend-mode: screen;
  filter:
    saturate(calc(1.05 + var(--neon-boost, 0) * .75))
    brightness(calc(.90 + var(--neon-boost, 0) * .32))
    drop-shadow(0 0 calc(5px + var(--neon-boost, 0) * 18px) rgba(73,221,255,.42));
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
.cinematic-journey.is-active:not(.is-user-paused) .cinematic-life-2d {
  animation-play-state: running !important;
  will-change: transform;
}
.cinematic-fish-2d {
  width: min(48vw, 760px);
  aspect-ratio: 16 / 7;
  overflow: visible;
  opacity: 1;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  mix-blend-mode: normal;
  filter: none;
}
.cinematic-fish-2d-a {
  left: 1%;
  top: 47%;
  animation: cinematicFishDriftA 30s ease-in-out infinite alternate;
}
.cinematic-fish-2d-b {
  right: 0;
  top: 64%;
  width: min(42vw, 660px);
  animation: cinematicFishDriftB 36s ease-in-out infinite alternate;
}
.cinematic-fish-sprite {
  position: absolute;
  left: var(--fish-x);
  top: var(--fish-y);
  width: var(--fish-width);
  height: auto;
  max-width: none;
  opacity: var(--fish-opacity);
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: cinematicFishIndividual calc(5.4s + var(--fish-phase) * .75s) ease-in-out infinite alternate;
  animation-delay: var(--fish-delay);
  filter:
    saturate(calc(.92 + var(--neon-boost, 0) * .18))
    brightness(calc(.80 + var(--neon-boost, 0) * .17))
    drop-shadow(0 2px 3px rgba(0, 22, 42, .34));
}
.cinematic-fish-2d-b .cinematic-fish-sprite {
  transform: scaleX(-1);
}
@keyframes cinematicFishIndividual {
  from {
    transform:
      translate3d(-2px, -2px, 0)
      rotate(var(--fish-tilt))
      scale(var(--fish-scale));
  }
  to {
    transform:
      translate3d(5px, 3px, 0)
      rotate(calc(var(--fish-tilt) + .8deg))
      scale(calc(var(--fish-scale) * 1.015));
  }
}
.cinematic-fish-2d-b .cinematic-fish-sprite {
  animation-name: cinematicFishIndividualReverse;
}
@keyframes cinematicFishIndividualReverse {
  from {
    transform:
      translate3d(2px, -2px, 0)
      rotate(calc(var(--fish-tilt) * -1))
      scaleX(-1)
      scale(var(--fish-scale));
  }
  to {
    transform:
      translate3d(-5px, 3px, 0)
      rotate(calc((var(--fish-tilt) * -1) - .8deg))
      scaleX(-1)
      scale(calc(var(--fish-scale) * 1.015));
  }
}

.cinematic-jelly-2d {
  width: min(18vw, 250px);
  aspect-ratio: 13 / 18;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Jellyfish01.jpg/960px-Jellyfish01.jpg');
  -webkit-mask-image: url('/assets/images/cinematic-jellyfish.svg');
  mask-image: url('/assets/images/cinematic-jellyfish.svg');
}
.cinematic-jelly-2d-a { right: 12%; top: 51%; animation: cinematicJellyDriftA 23s ease-in-out infinite alternate; }
.cinematic-jelly-2d-b { left: 9%; top: 72%; opacity: .44; animation: cinematicJellyDriftB 29s ease-in-out infinite alternate; }
.cinematic-manta-2d {
  width: min(35vw, 520px);
  aspect-ratio: 19 / 9;
  left: 32%;
  top: 79%;
  background-image: url('https://thumb.wikimedia.org/wikipedia/commons/thumb/9/9d/P2140268_Manta_Ray.jpg/960px-P2140268_Manta_Ray.jpg');
  -webkit-mask-image: url('/assets/images/cinematic-manta.svg');
  mask-image: url('/assets/images/cinematic-manta.svg');
  opacity: .34;
  animation: cinematicMantaDrift 35s ease-in-out infinite alternate;
}
.cinematic-journey:not(.is-active) .cinematic-life-2d,
.cinematic-journey.is-user-paused .cinematic-life-2d {
  will-change: auto;
}
@keyframes cinematicFishDriftA {
  from { transform: translate3d(-3vw, -5px, 0) scale(.88) rotate(-1deg); }
  to   { transform: translate3d(5vw, 7px, 0) scale(.92) rotate(.7deg); }
}
@keyframes cinematicFishDriftB {
  from { transform: translate3d(4vw, 6px, 0) scale(.72) rotate(.8deg); }
  to   { transform: translate3d(-5vw, -5px, 0) scale(.76) rotate(-.6deg); }
}
@keyframes cinematicJellyDriftA {
  from { transform: translate3d(-8px, 16px, 0) scale(.72); }
  to   { transform: translate3d(10px, -26px, 0) scale(.72); }
}
@keyframes cinematicJellyDriftB {
  from { transform: translate3d(12px, 14px, 0) scale(.56); }
  to   { transform: translate3d(-12px, -32px, 0) scale(.56); }
}
@keyframes cinematicMantaDrift {
  from { transform: translate3d(-7vw, 8px, 0) scale(.76); }
  to   { transform: translate3d(8vw, -10px, 0) scale(.76); }
}

@media (max-width: 900px) {
  .cinematic-fish-2d { width: 60vw; opacity: .42; }
  .cinematic-jelly-2d { width: 24vw; }
  .cinematic-manta-2d { width: 48vw; opacity: .28; }
}
@media (max-width: 560px) {
  .cinematic-fish-2d-b,
  .cinematic-jelly-2d-b,
  .cinematic-manta-2d { display: none; }
  .cinematic-fish-2d { width: 68vw; opacity: .34; }
  .cinematic-jelly-2d { width: 30vw; opacity: .32; }
}
#littleFeetCinematicCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}
.cinematic-ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}
.cinematic-copy {
  align-self: start;
  max-width: min(670px, 70vw);
  padding: clamp(18px, 2.8vw, 30px);
  border: 1px solid rgba(151, 247, 255, .28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(3, 24, 48, .78), rgba(6, 57, 86, .36));
  box-shadow:
    0 18px 55px rgba(0,0,0,.26),
    0 0 calc(20px + var(--panel-glow, .1) * 44px) rgba(65, 224, 255, calc(.08 + var(--panel-glow, .1) * .30)),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 calc(12px + var(--panel-glow, .1) * 24px) rgba(86,255,242, calc(.03 + var(--panel-glow, .1) * .12));
  border-color: rgba(151, 247, 255, calc(.26 + var(--panel-glow, .1) * .30));
  /* Preserve the glass colour/contrast without live-blurring the moving WebGL canvas. */
  background: linear-gradient(
    145deg,
    rgba(2, 18, 42, calc(.78 + var(--depth-dim, 0) * .12)),
    rgba(5, 58, 92, calc(.40 + var(--panel-glow, .1) * .08))
  );
  pointer-events: auto;
}
.cinematic-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #a7fff8;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cinematic-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7dfff7;
  box-shadow: 0 0 10px #7dfff7, 0 0 24px #28b8ff;
}
.cinematic-copy h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.55rem, 3.2vw, 3.35rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-shadow: 0 4px 28px rgba(0,0,0,.34), 0 0 24px rgba(88,255,242,.14);
}
.cinematic-copy p {
  margin: 0;
  max-width: 590px;
  color: #d8f8ff;
  line-height: 1.55;
  font-size: clamp(.88rem, 1.5vw, 1.02rem);
}
.cinematic-depth-meter {
  justify-self: end;
  align-self: center;
  display: grid;
  gap: 9px;
  width: min(300px, 28vw);
  pointer-events: auto;
}
.cinematic-stop {
  position: relative;
  width: 100%;
  padding: 11px 13px 11px 38px;
  border: 1px solid rgba(159,236,255,.18);
  border-radius: 14px;
  background: rgba(3,20,39,.58);
  color: #d7f7ff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.cinematic-stop::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #65d8ff;
  box-shadow: 0 0 9px rgba(101,216,255,.7);
}
.cinematic-stop:hover,
.cinematic-stop:focus-visible {
  transform: translateX(-5px);
  border-color: rgba(126,255,245,.72);
  outline: none;
  box-shadow: 0 0 0 2px rgba(88,255,242,.12), 0 10px 32px rgba(0,0,0,.24);
}
.cinematic-stop.is-current {
  border-color: rgba(126,255,245,.78);
  color: #fff;
  background: linear-gradient(110deg, rgba(0,174,188,.38), rgba(86,74,207,.28));
  box-shadow:
    0 0 calc(24px + var(--panel-glow, .1) * 30px) rgba(38,221,255, calc(.18 + var(--panel-glow, .1) * .20)),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.cinematic-stop.is-current::before {
  background: #d6ff64;
  box-shadow: 0 0 8px #d6ff64, 0 0 22px #58fff2;
}
.cinematic-footer {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.cinematic-progress-shell {
  width: min(520px, 62vw);
  pointer-events: none;
}
.cinematic-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
  color: rgba(226,251,255,.88);
  font-size: .71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.cinematic-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.34);
}
.cinematic-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #56fff0, #23c6ff 42%, #a66cff);
  box-shadow: 0 0 13px rgba(88,255,242,.88);
  will-change: width;
}
.cinematic-skip {
  pointer-events: auto;
  width: auto;
  padding: 10px 14px;
  border: 1px solid rgba(174,246,255,.3);
  border-radius: 999px;
  background: rgba(2,17,33,.6);
  color: #eaffff;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}
.cinematic-skip:hover,
.cinematic-skip:focus-visible {
  border-color: rgba(126,255,245,.78);
  outline: none;
  box-shadow: 0 0 18px rgba(88,255,242,.16);
}
.cinematic-loading {
  position: absolute;
  left: 50%;
  bottom: 50%;
  z-index: 6;
  transform: translate(-50%, 50%);
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(2,15,28,.72);
  color: #dffffc;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: opacity .35s ease, visibility .35s ease;
}
.cinematic-stage.is-ready .cinematic-loading {
  opacity: 0;
  visibility: hidden;
}
.cinematic-fallback .cinematic-loading {
  opacity: 1;
  visibility: visible;
  bottom: auto;
  top: 50%;
}
.cinematic-fallback #littleFeetCinematicCanvas {
  display: none;
}
.cinematic-fallback .cinematic-stage {
  background:
    radial-gradient(circle at 72% 26%, rgba(111,255,244,.24), transparent 25%),
    radial-gradient(circle at 25% 70%, rgba(73,119,255,.24), transparent 29%),
    linear-gradient(180deg,#a6f4ff 0%,#138fcb 24%,#07517f 48%,#032846 76%,#041522 100%);
}
@media (max-width: 860px) {
  .cinematic-journey { height: 520vh; }
  .cinematic-stage { min-height: 340px; border-radius: 18px; }
  .cinematic-ui { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding: 16px; }
  .cinematic-copy { max-width: 100%; }
  .cinematic-depth-meter {
    align-self: end;
    justify-self: stretch;
    width: 100%;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .cinematic-depth-meter::-webkit-scrollbar { display: none; }
  .cinematic-stop {
    flex: 0 0 auto;
    width: auto;
    min-width: 132px;
    padding: 9px 11px 9px 31px;
    font-size: .76rem;
  }
  .cinematic-stop::before { left: 11px; }
  .cinematic-footer { align-items: center; }
  .cinematic-progress-shell { width: min(100%, 420px); }
}
@media (max-width: 560px) {
  .cinematic-journey { height: 430vh; margin-inline: -6px; }
  .cinematic-stage {
    top: 8px;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    min-height: 0;
  }
  .cinematic-copy { padding: 15px; border-radius: 16px; }
  .cinematic-copy h2 { font-size: clamp(1.45rem, 9vw, 2.25rem); }
  .cinematic-copy p { font-size: .84rem; }
  .cinematic-footer { gap: 9px; }
  .cinematic-footer-actions { gap: 6px; }
  .cinematic-footer-actions .cinematic-skip { padding-inline: 9px; }
  .cinematic-skip { padding: 8px 10px; font-size: .7rem; }
  .cinematic-progress-label { font-size: .62rem; }
}
@media (max-height: 720px) {
  .cinematic-ui {
    gap: 10px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }
  .cinematic-copy {
    padding: 13px 15px;
    max-width: min(610px, 66vw);
    border-radius: 16px;
  }
  .cinematic-copy h2 {
    font-size: clamp(1.3rem, 3vw, 2.35rem);
  }
  .cinematic-copy p {
    font-size: .82rem;
    line-height: 1.4;
  }
  .cinematic-depth-meter { gap: 5px; }
  .cinematic-stop {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: .74rem;
  }
  .cinematic-footer { gap: 10px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .cinematic-ui {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
    grid-template-rows: auto 1fr auto;
  }
  .cinematic-copy {
    max-width: min(520px, 58vw);
    padding: 10px 12px;
  }
  .cinematic-copy p {
    max-width: 470px;
    font-size: .76rem;
  }
  .cinematic-depth-meter {
    width: min(250px, 32vw);
  }
  .cinematic-progress-shell {
    width: min(420px, 56vw);
  }
}

@media (min-width: 1600px) and (min-aspect-ratio: 16/10) {
  .cinematic-ui {
    max-width: 1920px;
    margin-inline: auto;
  }
  .cinematic-copy {
    max-width: 720px;
  }
}

/* Cross-device cinematic guard rails. Keep controls inside the stage on
   narrow/short screens and remove hidden live-ocean layers while paused. */
.cinematic-stage,
.cinematic-ui,
.cinematic-ui > *,
.cinematic-footer,
.cinematic-footer > * {
  min-width: 0;
  max-width: 100%;
}
.cinematic-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.cinematic-journey.is-user-paused .cinematic-depth-picture,
.cinematic-journey.is-user-paused .cinematic-surface-air,
.cinematic-journey.is-user-paused .cinematic-water-surface,
.cinematic-journey.is-user-paused .cinematic-water-current,
.cinematic-journey.is-user-paused .cinematic-life-2d,
.cinematic-journey.is-user-paused #littleFeetCinematicCanvas {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 860px) {
  .cinematic-footer {
    flex-wrap: wrap;
    align-items: center;
  }
  .cinematic-progress-shell {
    flex: 1 1 240px;
    min-width: 0;
  }
  .cinematic-footer-actions { margin-left: auto; }
}

@media (max-width: 560px) {
  .cinematic-journey.is-user-paused .cinematic-stage {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .cinematic-ui {
    gap: 10px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }
  .cinematic-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .cinematic-progress-shell { width: 100%; }
  .cinematic-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0;
  }
  .cinematic-footer-actions .cinematic-skip {
    width: 100%;
    white-space: normal;
  }
  .cinematic-paused-picture img { object-position: 50% 50%; }
}

@media (max-width: 360px) {
  .cinematic-footer-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-height: 600px) and (orientation: landscape) {
  .cinematic-journey.is-user-paused .cinematic-stage {
    width: min(100%, 1120px) !important;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .cinematic-ui {
    gap: 6px;
    padding:
      max(8px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }
  .cinematic-copy {
    max-width: min(460px, 58vw);
    padding: 8px 10px;
  }
  .cinematic-copy h2 { font-size: clamp(1.1rem, 3vw, 1.65rem); }
  .cinematic-copy p { font-size: .70rem; line-height: 1.25; }
  .cinematic-depth-meter { width: min(220px, 32vw); }
  .cinematic-stop {
    padding: 6px 8px 6px 28px;
    font-size: .68rem;
  }
  .cinematic-footer-actions .cinematic-skip {
    padding: 7px 9px;
    font-size: .68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-journey { height: auto; }
  .cinematic-stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 640px;
  }
  .cinematic-depth-meter { align-self: end; }
  .cinematic-progress-shell { display: none; }
}


/* Little Feet V2 preview mode: keep the V1 production page static while the interactive cinematic is completed. */
.cinematic-journey.cinematic-v2-preview {
  height: auto !important;
  display: grid;
  gap: 12px;
}
.cinematic-journey.cinematic-v2-preview .cinematic-stage {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  margin: 0 !important;
  border-radius: 24px;
}
.cinematic-v2-preview .cinematic-paused-picture {
  opacity: 1 !important;
  visibility: visible !important;
}
.cinematic-v2-preview .cinematic-depth-picture,
.cinematic-v2-preview .cinematic-surface-air,
.cinematic-v2-preview .cinematic-water-surface,
.cinematic-v2-preview .cinematic-water-current,
.cinematic-v2-preview .cinematic-life-2d,
.cinematic-v2-preview #littleFeetCinematicCanvas,
.cinematic-v2-preview .cinematic-loading,
.cinematic-v2-preview .cinematic-ui {
  display: none !important;
}
.cinematic-v2-status {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(94, 234, 212, .24);
  border-radius: 14px;
  background: rgba(7, 17, 30, .82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #e5eef7;
}
.cinematic-v2-status-label {
  color: #5eead4;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cinematic-v2-status strong {
  font-size: clamp(.96rem, 1.6vw, 1.08rem);
}
.cinematic-v2-status p {
  margin: 0;
  color: #aebdca;
  font-size: .88rem;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .cinematic-journey.cinematic-v2-preview .cinematic-stage {
    aspect-ratio: 16 / 9 !important;
    border-radius: 16px;
  }
  .cinematic-v2-status {
    padding: 12px 13px;
    border-radius: 12px;
  }
}
