:root {
  --zone-sunlight: #0077b6;
  --zone-sunlight-mid: #023e8a;
  --zone-twilight: #03045e;
  --zone-twilight-mid: #001845;
  --zone-midnight: #010b13;
  --zone-abyssal: #000000;
  --zone-abyssal-tint: #001a0e;
  --zone-hadal: #000000;
  --bio-cyan: #00f5d4;
  --bio-blue: #4cc9f0;
  --bio-green: #57cc99;
  --bio-amber: #f4a261;
  --depth-meter-bg: rgba(0, 0, 0, 0.6);
  --text-primary: #e0f7fa;
  --text-secondary: rgba(224, 247, 250, 0.55);
  --o2-full: #00b4d8;
  --o2-low: #ef233c;
  --surface-gradient: linear-gradient(180deg, #90e0ef 0%, #0077b6 60%, #023e8a 100%);
  --twilight-gradient: linear-gradient(180deg, #023e8a 0%, #03045e 70%, #001845 100%);
  --midnight-gradient: radial-gradient(circle at top, rgba(76, 201, 240, 0.05), transparent 28%),
    linear-gradient(180deg, #03131f 0%, #010b13 65%, #00070f 100%);
  --abyssal-gradient: radial-gradient(circle at 50% 12%, rgba(76, 201, 240, 0.035), transparent 18%),
    linear-gradient(180deg, #000000 0%, #02060a 58%, #000000 100%);
  --hadal-gradient: radial-gradient(circle at 50% 78%, rgba(0, 26, 14, 0.36), transparent 35%),
    linear-gradient(180deg, #000000 0%, #001a0e 72%, #000000 100%);
  --panel-bg: rgba(1, 17, 28, 0.72);
  --panel-border: rgba(76, 201, 240, 0.3);
  --scanline: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 4px
  );
  --sidebar-width: 12rem;
  --transition-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-duration: 1300ms;
  --hud-space: clamp(1rem, 2vw, 1.8rem);
  --panel-radius: 1.25rem;
  --shadow-glow: 0 0 18px rgba(76, 201, 240, 0.18);
  --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.42);
  --surface-haze: rgba(255, 255, 255, 0.18);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.02em;
  transition: background-color 700ms var(--transition-ease);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

body::before {
  background:
    radial-gradient(circle at 50% -6%, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.24) 55%, rgba(0, 0, 0, 0.62) 100%);
  mix-blend-mode: screen;
  opacity: 0.8;
}

body::after {
  background: radial-gradient(circle at 50% 40%, transparent 42%, rgba(0, 0, 0, 0.56) 100%);
  opacity: 0.7;
}

body[data-zone="sunlight"]::after {
  opacity: 0.28;
}

body[data-zone="twilight"]::after {
  opacity: 0.48;
}

body[data-zone="midnight"]::after {
  opacity: 0.72;
}

body[data-zone="abyssal"]::after,
body[data-zone="hadal"]::after {
  opacity: 0.86;
}

body.is-transitioning::before {
  animation: transition-breath 1.3s var(--transition-ease);
}

body.is-oxygen-critical::after {
  background:
    radial-gradient(circle at 50% 45%, transparent 34%, rgba(239, 35, 60, 0.22) 72%, rgba(0, 0, 0, 0.9) 100%),
    radial-gradient(circle at 50% 40%, transparent 42%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.92;
  animation: critical-vignette 1.15s ease-in-out infinite;
}

body.modal-open,
body.panel-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

#app {
  position: relative;
  min-height: 100vh;
}

.screen {
  position: fixed;
  inset: 0;
}

.screen[hidden] {
  display: none;
}

#end-screen {
  overflow-y: auto;
}

#intro-screen {
  overflow: hidden;
  background: #010b13;
}

.is-active {
  display: block;
}

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

.intro-screen__veil,
.end-screen__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(180deg, rgba(144, 224, 239, 0.5), rgba(0, 119, 182, 0.3) 20%, rgba(1, 11, 19, 0.9) 100%),
    var(--surface-gradient);
}

.intro-screen__veil::after,
.end-screen__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.08), transparent 20%), var(--scanline);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: subtle-drift 20s linear infinite;
}

.intro-screen__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.intro-screen__surface {
  position: absolute;
  top: -12rem;
  left: -12vw;
  width: 124vw;
  height: 20rem;
  background:
    radial-gradient(ellipse at 26% 62%, rgba(224, 247, 250, 0.38), transparent 31%),
    radial-gradient(ellipse at 68% 48%, rgba(76, 201, 240, 0.28), transparent 34%),
    repeating-radial-gradient(ellipse at center, rgba(224, 247, 250, 0.18) 0 0.12rem, transparent 0.15rem 1.25rem);
  filter: blur(9px);
  opacity: 0.68;
  mix-blend-mode: screen;
  animation: intro-surface-swell 13s var(--transition-ease) infinite alternate;
  will-change: transform, opacity;
}

.intro-screen__rays {
  position: absolute;
  top: -22%;
  left: -28%;
  width: 156%;
  height: 104%;
  background:
    conic-gradient(
      from -24deg at 50% 0%,
      transparent 0deg,
      rgba(224, 247, 250, 0.18) 9deg,
      transparent 19deg,
      transparent 34deg,
      rgba(76, 201, 240, 0.13) 43deg,
      transparent 58deg,
      transparent 360deg
    );
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.76) 42%, transparent 78%);
  opacity: 0.8;
  mix-blend-mode: screen;
  transform-origin: 50% 0%;
  animation: intro-rays-sway 21s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.intro-screen__particle-field {
  position: absolute;
  inset: 0;
}

.intro-screen__particle-field span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: rgba(224, 247, 250, 0.78);
  box-shadow:
    0 0 10px rgba(224, 247, 250, 0.34),
    0 0 22px rgba(76, 201, 240, 0.18);
  opacity: 0;
  animation: intro-particle-rise var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.intro-screen__creature {
  position: absolute;
  display: block;
  width: clamp(7rem, 16vw, 16rem);
  height: auto;
  object-fit: contain;
  opacity: 0.26;
  filter:
    brightness(0.16)
    saturate(0.45)
    sepia(0.22)
    hue-rotate(150deg)
    drop-shadow(0 0 20px rgba(76, 201, 240, 0.22));
  will-change: transform, opacity;
}

.intro-screen__creature--dolphin {
  top: 18%;
  right: -22rem;
  width: clamp(9rem, 20vw, 20rem);
  opacity: 0.22;
  animation: intro-swim-left-distant 30s ease-in-out -14s infinite;
}

.intro-screen__creature--turtle {
  right: -16rem;
  bottom: 16%;
  width: clamp(7rem, 15vw, 15rem);
  opacity: 0.18;
  animation: intro-swim-left-distant 38s ease-in-out -22s infinite;
}

.intro-screen__creature--squid {
  right: 18%;
  bottom: 22%;
  width: clamp(4.8rem, 8vw, 8rem);
  opacity: 0.26;
  filter:
    brightness(0.22)
    saturate(0.7)
    sepia(0.25)
    hue-rotate(138deg)
    drop-shadow(0 0 18px rgba(0, 245, 212, 0.22));
  animation: intro-squid-hover 12s ease-in-out -4s infinite;
}

.intro-screen__content,
.end-screen__content {
  position: relative;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 1.5rem;
  min-height: 100%;
  max-width: 42rem;
  padding: 4rem;
}

.intro-screen__eyebrow,
.end-screen__eyebrow,
.zone__eyebrow,
.panel-heading__eyebrow,
.modal__eyebrow,
.creature-panel__zone {
  margin: 0;
  color: var(--text-secondary);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#intro-title,
#end-title {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(3.6rem, 10vw, 6.8rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.intro-screen__lede,
.intro-screen__hint,
.end-screen__score,
.modal__prompt,
.zone__description {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: rgba(224, 247, 250, 0.86);
}

.intro-screen__actions,
.end-screen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.ui-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgba(76, 201, 240, 0.35);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition:
    border-color 260ms var(--transition-ease),
    box-shadow 260ms var(--transition-ease),
    transform 260ms var(--transition-ease),
    background-color 260ms var(--transition-ease);
}

.ui-button::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.14) 45%, transparent 85%);
  transform: translateX(-120%) rotate(8deg);
  transition: transform 620ms var(--transition-ease);
}

.ui-button:hover,
.ui-button:focus-visible {
  border-color: var(--bio-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
  transform: translateY(-1px);
}

.ui-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ui-button.is-energized {
  border-color: rgba(0, 245, 212, 0.82);
  box-shadow:
    0 0 16px rgba(0, 245, 212, 0.42),
    inset 0 0 14px rgba(0, 245, 212, 0.12);
}

.ui-button:hover::after,
.ui-button:focus-visible::after {
  transform: translateX(120%) rotate(8deg);
}

.ui-button--primary {
  border-color: rgba(244, 162, 97, 0.55);
  box-shadow: 0 0 18px rgba(244, 162, 97, 0.16);
}

.ui-button--primary:hover,
.ui-button--primary:focus-visible {
  border-color: var(--bio-amber);
  box-shadow: 0 0 14px rgba(244, 162, 97, 0.6);
}

.ui-button--icon {
  padding-inline: 0.95rem;
}

.ui-button--sonar {
  border-color: rgba(0, 245, 212, 0.44);
}

.ui-button--sonar::after {
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.16), transparent);
}

.ui-button--sonar.is-cooling {
  color: rgba(224, 247, 250, 0.58);
  border-color: rgba(76, 201, 240, 0.18);
  box-shadow: none;
}

.ui-button__key {
  padding: 0.16rem 0.34rem;
  border: 1px solid rgba(224, 247, 250, 0.2);
  color: var(--bio-cyan);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.icon {
  width: 1.3rem;
  height: 1.3rem;
}

#game-container {
  display: none;
  background: #000;
  isolation: isolate;
}

#game-container.is-active {
  display: block;
}

#depth-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  padding: 1.3rem 1rem;
  border-right: 1px solid rgba(76, 201, 240, 0.18);
  background:
    linear-gradient(180deg, rgba(0, 7, 15, 0.96), rgba(0, 14, 28, 0.88)),
    var(--scanline);
  backdrop-filter: blur(12px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02), 0 0 40px rgba(0, 0, 0, 0.3);
}

#depth-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(76, 201, 240, 0.1), transparent 22%);
  pointer-events: none;
}

.depth-sidebar__header,
.o2-meter {
  position: relative;
  z-index: 1;
}

.instrument-label-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.instrument-label,
.instrument-value,
.depth-readout,
.zone-readout,
.depth-scale__label,
.hud-chip__label,
.hud-chip__value {
  font-family: "Space Mono", "Courier New", monospace;
}

.instrument-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
}

.depth-readout {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: 0.08em;
}

.depth-scale {
  position: relative;
  height: min(46vh, 28rem);
  margin: 1.8rem 0 2rem;
  padding-right: 3.2rem;
}

.depth-scale__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.35rem;
  width: 0.36rem;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(144, 224, 239, 0.85) 0%,
    rgba(2, 62, 138, 0.95) 14%,
    rgba(3, 4, 94, 0.96) 42%,
    rgba(1, 11, 19, 1) 72%,
    rgba(0, 0, 0, 1) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(0, 180, 216, 0.12),
    0 0 40px rgba(76, 201, 240, 0.08);
}

.depth-scale__marker {
  position: absolute;
  left: 0.55rem;
  width: 1.95rem;
  height: 0.24rem;
  border-radius: 999px;
  background: var(--bio-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.75);
  transform: translateY(-50%);
  transition: top 300ms linear;
}

.depth-scale__label {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.o2-meter {
  padding-top: 1.4rem;
  border-top: 1px solid rgba(76, 201, 240, 0.16);
}

.instrument-value,
.zone-readout {
  margin: 0;
  font-size: 0.82rem;
}

.o2-meter__well {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 4.1rem;
  height: min(24vh, 13rem);
  margin: 1rem 0 0.9rem;
  border: 1px solid rgba(76, 201, 240, 0.25);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.o2-meter__well::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%, transparent 100%);
  opacity: calc(var(--o2-ratio, 1) * 0.9);
  pointer-events: none;
}

.o2-meter__fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(224, 247, 250, 0.15), rgba(0, 180, 216, 0.95));
  transform-origin: bottom;
  transition:
    transform 240ms linear,
    background 240ms linear,
    box-shadow 240ms linear;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12);
  position: relative;
}

.o2-meter__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 34%);
  opacity: 0.7;
}

.o2-meter.is-warning .o2-meter__well,
.o2-meter.is-warning .o2-meter__fill {
  animation: warning-pulse 1.6s ease-in-out infinite;
}

.o2-meter.is-refill .o2-meter__well {
  animation: refill-flash 1s var(--transition-ease);
}

.o2-meter.is-breath-refill .o2-meter__well {
  animation: breath-refill 1.25s var(--transition-ease);
}

.o2-bubble-burst {
  position: absolute;
  left: 2.05rem;
  bottom: 3.2rem;
  z-index: 3;
  pointer-events: none;
}

.o2-bubble-burst span {
  position: absolute;
  width: var(--bubble-size, 0.36rem);
  height: var(--bubble-size, 0.36rem);
  border: 1px solid rgba(224, 247, 250, 0.78);
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.14);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.48);
  animation: o2-bubble-rise 1.15s var(--transition-ease) forwards;
  animation-delay: var(--bubble-delay, 0ms);
  will-change: transform, opacity;
}

.zone-readout {
  color: var(--text-secondary);
  line-height: 1.4;
}

#zone-container {
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  overflow: hidden;
}

#zone-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform var(--transition-duration) var(--transition-ease);
  transform-style: preserve-3d;
}

body.is-transitioning #zone-stage {
  filter: saturate(1.06) contrast(1.02);
}

.zone {
  position: relative;
  flex: 0 0 100vh;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  transition: opacity 500ms var(--transition-ease);
  --reveal-x: 50%;
  --reveal-y: 50%;
  --reveal-color: var(--bio-cyan);
}

.zone__backdrop,
.zone__texture,
.zone__vignette,
.zone__particles,
.zone__pollution,
.zone__creatures,
.zone__content {
  position: absolute;
  inset: 0;
}

.zone__backdrop {
  z-index: 0;
  overflow: hidden;
}

.zone__backdrop::after {
  content: "";
  position: absolute;
  inset: -12%;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  animation: depth-current 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.zone__texture {
  z-index: 1;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 22%), var(--scanline);
  opacity: 0.4;
  mix-blend-mode: screen;
  animation: subtle-drift 26s linear infinite;
  transition: opacity 600ms var(--transition-ease);
}

.zone__vignette {
  z-index: 6;
  background: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.64) 100%);
  pointer-events: none;
  transition: opacity 400ms var(--transition-ease), background 400ms var(--transition-ease);
}

.zone::before,
.zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zone::before {
  z-index: 0;
  opacity: 0.5;
  transition: opacity 700ms var(--transition-ease), transform 1400ms var(--transition-ease);
}

.zone::after {
  z-index: 2;
  opacity: 0;
  transition: opacity 600ms var(--transition-ease);
}

.zone__content {
  z-index: 5;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  max-width: 30rem;
  padding: 3rem clamp(2rem, 4vw, 4rem) 0 clamp(2rem, 4vw, 4rem);
  pointer-events: none;
  transition: transform 700ms var(--transition-ease), opacity 700ms var(--transition-ease);
}

.zone__title {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zone__depth {
  margin: 0;
  color: rgba(224, 247, 250, 0.78);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.zone__description {
  font-size: 1.08rem;
  max-width: 24rem;
}

.zone--sunlight .zone__backdrop {
  background: var(--surface-gradient);
}

.zone--sunlight .zone__backdrop::after {
  background:
    conic-gradient(from 30deg at 50% -10%, rgba(255, 255, 255, 0.28), transparent 12%, rgba(255, 255, 255, 0.14) 20%, transparent 34%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 44px);
  opacity: 0.42;
}

.zone--sunlight::before {
  background:
    radial-gradient(circle at 15% 4%, rgba(255, 255, 255, 0.18), transparent 20%),
    radial-gradient(circle at 80% 12%, rgba(144, 224, 239, 0.16), transparent 24%);
}

.zone--twilight .zone__backdrop {
  background: var(--twilight-gradient);
}

.zone--twilight .zone__backdrop::after {
  background:
    radial-gradient(circle at 72% 28%, rgba(0, 245, 212, 0.16), transparent 14%),
    radial-gradient(circle at 22% 62%, rgba(76, 201, 240, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 32%);
  opacity: 0.32;
}

.zone--twilight::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 70% 22%, rgba(76, 201, 240, 0.14), transparent 22%);
}

.zone--midnight .zone__backdrop {
  background: var(--midnight-gradient);
}

.zone--midnight .zone__backdrop::after {
  background:
    radial-gradient(circle at 18% 58%, rgba(0, 245, 212, 0.14), transparent 11%),
    radial-gradient(circle at 76% 38%, rgba(244, 162, 97, 0.1), transparent 9%),
    repeating-linear-gradient(180deg, rgba(0, 245, 212, 0.035) 0 1px, transparent 1px 16px);
  opacity: 0.24;
  animation-duration: 24s;
}

.zone--midnight::before {
  background:
    radial-gradient(circle at 24% 55%, rgba(0, 245, 212, 0.08), transparent 18%),
    radial-gradient(circle at 68% 34%, rgba(76, 201, 240, 0.1), transparent 20%);
}

.zone--abyssal .zone__backdrop {
  background: var(--abyssal-gradient);
}

.zone--abyssal .zone__backdrop::after {
  background:
    radial-gradient(ellipse at 52% 84%, rgba(76, 201, 240, 0.065), transparent 20%),
    repeating-radial-gradient(circle at 50% 92%, rgba(224, 247, 250, 0.055) 0 1px, transparent 1px 28px);
  opacity: 0.14;
  animation-duration: 36s;
}

.zone--abyssal::before {
  background:
    radial-gradient(circle at 60% 42%, rgba(76, 201, 240, 0.045), transparent 16%),
    radial-gradient(circle at 40% 78%, rgba(255, 255, 255, 0.035), transparent 14%);
}

.zone--hadal .zone__backdrop {
  background: var(--hadal-gradient);
}

.zone--hadal .zone__backdrop::after {
  background:
    linear-gradient(86deg, transparent 0 48%, rgba(87, 204, 153, 0.12) 49%, transparent 51% 100%),
    linear-gradient(112deg, transparent 0 62%, rgba(224, 247, 250, 0.05) 63%, transparent 65% 100%),
    radial-gradient(circle at 50% 82%, rgba(87, 204, 153, 0.12), transparent 18%);
  opacity: 0.27;
  animation: trench-pressure 7s ease-in-out infinite;
}

.zone--hadal::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(87, 204, 153, 0.08), transparent 20%),
    radial-gradient(circle at 48% 14%, rgba(224, 247, 250, 0.045), transparent 12%),
    repeating-linear-gradient(92deg, transparent 0 28px, rgba(87, 204, 153, 0.025) 29px, transparent 30px 80px);
}

.zone--sunlight .zone__backdrop::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 44%),
    radial-gradient(circle at 10% -10%, rgba(255, 255, 255, 0.22), transparent 32%),
    conic-gradient(from 160deg at 50% 0%, rgba(255, 255, 255, 0.22), transparent 18%, rgba(255, 255, 255, 0.12) 28%, transparent 38%);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: ray-sway 18s ease-in-out infinite alternate;
}

.zone--sunlight .zone__texture {
  opacity: 0.55;
}

.zone--midnight .zone__texture,
.zone--abyssal .zone__texture,
.zone--hadal .zone__texture {
  opacity: 0.18;
}

.zone.is-active::before {
  opacity: 0.9;
  transform: scale(1.02);
}

.zone.is-active .zone__texture {
  opacity: 0.65;
}

.zone--midnight.is-active .zone__texture,
.zone--abyssal.is-active .zone__texture,
.zone--hadal.is-active .zone__texture {
  opacity: 0.42;
}

.zone.is-active .zone__content {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.zone:not(.is-active) .zone__content {
  opacity: 0.74;
  transform: translate3d(0, 1rem, 0);
}

.zone.is-polluted .zone__vignette {
  background: radial-gradient(circle at center, transparent 38%, rgba(84, 12, 12, 0.48) 100%);
}

.zone.is-cleansed .zone__vignette {
  background: radial-gradient(circle at center, transparent 35%, rgba(76, 201, 240, 0.18) 100%);
}

.zone.is-active .zone__content {
  animation: zone-content-enter 900ms var(--transition-ease);
}

.zone.is-reveal-burst::after {
  opacity: 1;
  background:
    radial-gradient(circle at var(--reveal-x) var(--reveal-y), rgba(255, 255, 255, 0.28), transparent 6%),
    radial-gradient(circle at var(--reveal-x) var(--reveal-y), color-mix(in srgb, var(--reveal-color) 42%, transparent), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.28) 78%);
  animation: reveal-burst 1.55s var(--transition-ease);
}

.zone.is-miss-shock::after {
  opacity: 1;
  background: radial-gradient(circle at 50% 50%, rgba(239, 35, 60, 0.16), transparent 30%);
  animation: miss-shock 1s var(--transition-ease);
}

.zone.is-sonar-active .zone__texture {
  opacity: 0.88;
}

.zone.has-flashlight {
  cursor: crosshair;
}

.zone.has-flashlight .zone__vignette {
  background:
    radial-gradient(
      circle at var(--spotlight-x, 52%) var(--spotlight-y, 52%),
      rgba(224, 247, 250, 0.035) 0 6%,
      rgba(0, 245, 212, 0.055) 8%,
      rgba(0, 6, 12, 0.74) 18%,
      rgba(0, 0, 0, 0.965) 34%,
      #000 64%
    );
  opacity: 1;
  transition: background 80ms linear;
}

.zone.has-flashlight .zone__vignette::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at var(--spotlight-x, 52%) var(--spotlight-y, 52%),
      rgba(0, 245, 212, 0.24),
      rgba(76, 201, 240, 0.08) 10%,
      transparent 20%
    );
  mix-blend-mode: screen;
  opacity: 0.8;
  animation: flashlight-breathe 2.2s ease-in-out infinite;
  pointer-events: none;
}

.zone.has-flashlight .creature:not(.revealed) .creature__img,
.zone.has-flashlight .pollution-item {
  opacity: 0.54;
}

.zone.has-flashlight .creature:not(.revealed) .creature__img {
  filter:
    brightness(0.07)
    blur(1.45px)
    drop-shadow(0 0 9px rgba(76, 201, 240, 0.34));
  opacity: 0.76;
}

.zone.has-flashlight .creature.seen:not(.revealed) .creature__img {
  filter:
    brightness(0.12)
    blur(1.5px)
    drop-shadow(0 0 12px rgba(244, 162, 97, 0.58));
  opacity: 0.88;
}

.zone.has-flashlight .creature:hover .creature__img,
.zone.has-flashlight .creature:focus-visible .creature__img,
.zone.has-flashlight .pollution-item:hover,
.zone.has-flashlight .pollution-item:focus-visible {
  opacity: 1;
}

.sonar-pulse {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: calc(0.72 * var(--return-intensity, 1));
  animation: sonar-layer-fade 1.7s var(--transition-ease) forwards;
}

.sonar-pulse__ring,
.sonar-pulse__sweep {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  transform: translate3d(-50%, -50%, 0) scale(0.12);
  will-change: transform, opacity;
}

.sonar-pulse__ring {
  border: 1px solid rgba(0, 245, 212, 0.72);
  box-shadow:
    0 0 18px rgba(0, 245, 212, 0.42),
    inset 0 0 18px rgba(0, 245, 212, 0.12);
  animation: sonar-ring 1.7s var(--transition-ease) forwards;
}

.sonar-pulse__ring:nth-child(2) {
  animation-delay: 120ms;
  border-color: rgba(76, 201, 240, 0.52);
}

.sonar-pulse__ring:nth-child(3) {
  animation-delay: 240ms;
  border-color: rgba(87, 204, 153, 0.38);
}

.sonar-pulse__sweep {
  width: min(82vw, 72rem);
  height: min(82vw, 72rem);
  background:
    conic-gradient(from -18deg, transparent 0deg, rgba(0, 245, 212, 0.16) 10deg, transparent 24deg),
    radial-gradient(circle, transparent 0 34%, rgba(0, 245, 212, 0.1) 35%, transparent 38%);
  mix-blend-mode: screen;
  animation: sonar-sweep 1.7s linear forwards;
}

.sonar-echo {
  position: absolute;
  left: var(--echo-x, 50%);
  top: var(--echo-y, 50%);
  z-index: 8;
  width: var(--echo-size, 4.8rem);
  height: var(--echo-size, 4.8rem);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--echo-color, var(--bio-cyan)) var(--echo-strength, 62%), transparent);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--echo-color, var(--bio-cyan)) var(--echo-glow, 42%), transparent),
    inset 0 0 16px color-mix(in srgb, var(--echo-color, var(--bio-cyan)) var(--echo-strength, 62%), transparent);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(0.2);
  animation: sonar-echo-return 980ms var(--transition-ease) forwards;
  animation-delay: var(--sonar-delay, 120ms);
  will-change: transform, opacity;
}

.zone__particles {
  z-index: 2;
  pointer-events: none;
}

.particle {
  position: absolute;
  top: -10%;
  left: var(--x, 50%);
  width: var(--size, 0.3rem);
  height: var(--size, 0.3rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  animation:
    particle-fall var(--duration, 16s) linear infinite,
    particle-fade var(--duration, 16s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}

.particle--surface {
  background: rgba(255, 255, 255, 0.35);
}

.particle--bio {
  background: var(--particle-color, var(--bio-cyan));
  box-shadow:
    0 0 14px color-mix(in srgb, var(--particle-color, var(--bio-cyan)) 80%, transparent),
    0 0 28px color-mix(in srgb, var(--particle-color, var(--bio-cyan)) 40%, transparent);
}

.particle--snow {
  background: rgba(224, 247, 250, 0.55);
}

.zone__creatures {
  z-index: 4;
  pointer-events: none;
}

.creature {
  position: absolute;
  z-index: 3;
  top: var(--top);
  left: var(--left);
  width: var(--width);
  padding: 0;
  border: 0;
  background: none;
  transition:
    transform 900ms var(--transition-ease),
    opacity 900ms var(--transition-ease),
    filter 900ms var(--transition-ease);
  will-change: transform, opacity;
  pointer-events: auto;
}

.creature::before {
  content: "";
  position: absolute;
  inset: var(--hitbox-inset, 0);
  pointer-events: auto;
}

.creature:focus-visible {
  outline: none;
}

.creature__img {
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
  filter: brightness(0) blur(2px);
  transition:
    filter 800ms var(--transition-ease),
    transform 600ms var(--transition-ease),
    opacity 600ms var(--transition-ease);
  will-change: transform, filter, opacity;
  transform-origin: center;
}

.creature__hint {
  position: absolute;
  top: -0.6rem;
  right: -0.45rem;
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid rgba(76, 201, 240, 0.42);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.18);
  transition: opacity 260ms var(--transition-ease), transform 260ms var(--transition-ease);
}

.creature__hint::before {
  pointer-events: none;
}

.zone.has-flashlight .creature__hint {
  opacity: 0.92;
  border-color: rgba(76, 201, 240, 0.7);
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.26);
}

.creature:hover .creature__hint,
.creature:focus-visible .creature__hint {
  transform: scale(1.05);
  opacity: 1;
}

.creature:hover,
.creature:focus-visible {
  transform: translate3d(0, -0.25rem, 0);
}

.creature.sonar-highlight .creature__img {
  animation: sonar-creature-flicker 700ms steps(4, end) both;
  animation-delay: var(--sonar-delay, 120ms);
  filter:
    brightness(0) blur(1px)
    drop-shadow(0 0 7px rgba(0, 245, 212, 0.92))
    drop-shadow(0 0 18px rgba(76, 201, 240, 0.55));
}

.creature.sonar-highlight .creature__hint::before {
  content: "";
  position: absolute;
  inset: -12%;
  border: 1px solid rgba(0, 245, 212, 0.52);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.92);
  animation: sonar-target-lock 1.25s var(--transition-ease);
  animation-delay: var(--sonar-delay, 120ms);
  pointer-events: none;
}

.creature.sonar-highlight .creature__hint {
  border-color: rgba(0, 245, 212, 0.86);
  color: var(--bio-cyan);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.52);
}

.creature.revealed .creature__img {
  filter: brightness(1.03) saturate(1.08) blur(0px);
}

.creature.revealed .creature__hint,
.creature.missed .creature__hint,
.creature.assisted .creature__hint {
  opacity: 0;
}

.creature.seen:not(.revealed) .creature__img {
  filter:
    brightness(0) blur(2.5px)
    drop-shadow(0 0 8px rgba(244, 162, 97, 0.38));
  opacity: 0.72;
}

.creature.seen:not(.revealed) .creature__hint {
  color: var(--bio-amber);
  border-color: rgba(244, 162, 97, 0.72);
  box-shadow: 0 0 14px rgba(244, 162, 97, 0.38);
}

.creature.assisted .creature__img {
  filter: grayscale(0.38) brightness(0.86) saturate(0.82) blur(0px);
}

.creature.revealed.bioluminescent .creature__img {
  animation: bio-breathe 3s ease-in-out infinite;
}

.creature.is-revealing .creature__img {
  animation: reveal-creature 1.2s var(--transition-ease);
}

.creature.is-spotlit::after {
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 8%),
    radial-gradient(circle, color-mix(in srgb, var(--bio-color, var(--bio-cyan)) 34%, transparent), transparent 54%);
  opacity: 0;
  animation: spotlight-fade 1.85s var(--transition-ease);
  pointer-events: none;
}

.creature.is-spotlit .creature__hint::before {
  content: "";
  position: absolute;
  inset: -24%;
  border: 1px solid color-mix(in srgb, var(--bio-color, var(--bio-cyan)) 74%, transparent);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.5);
  animation: reveal-lock-ring 1.6s var(--transition-ease);
  pointer-events: none;
}

.creature.missed {
  pointer-events: none;
  animation: creature-exit 1100ms var(--transition-ease) forwards;
}

.creature--fish .creature__img {
  animation: fish-drift 8s ease-in-out infinite;
}

.creature--whale .creature__img {
  animation: whale-pass 22s linear infinite;
}

.creature--jelly .creature__img,
.creature--cephalopod .creature__img {
  animation: jelly-bob 7.2s ease-in-out infinite;
}

.creature--eel .creature__img,
.creature--worm .creature__img {
  animation: eel-sway 6.5s ease-in-out infinite;
}

.creature--stationary .creature__img {
  animation: spin 30s linear infinite;
}

.creature.revealed .creature__img,
.creature.missed .creature__img {
  animation-delay: var(--delay, 0s);
}

.legendary-pass {
  position: absolute;
  top: 18%;
  left: 0;
  z-index: 2;
  width: min(78vw, 66rem);
  opacity: 0;
  transform: translate3d(-85vw, 0, 0) scale(1.18);
  pointer-events: none;
  filter:
    brightness(0.2)
    saturate(1.05)
    blur(0.45px)
    drop-shadow(0 0 16px rgba(0, 245, 212, 0.52))
    drop-shadow(0 0 42px rgba(76, 201, 240, 0.34));
  will-change: transform, opacity;
}

.legendary-pass img {
  width: 100%;
  height: auto;
}

.zone.is-squid-pass .legendary-pass {
  animation: legendary-pass 22s linear forwards;
}

.reveal-cinematic {
  position: absolute;
  inset: 0;
  z-index: 8;
  color: var(--reveal-color, var(--bio-cyan));
  pointer-events: none;
  animation: reveal-cinematic-life 1.85s var(--transition-ease) forwards;
}

.reveal-cinematic__halo,
.reveal-cinematic__scan,
.reveal-cinematic__ring,
.reveal-cinematic__label {
  position: absolute;
  left: var(--reveal-x, 50%);
  top: var(--reveal-y, 50%);
  will-change: transform, opacity;
}

.reveal-cinematic__halo {
  width: min(36vw, 26rem);
  height: min(36vw, 26rem);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 9%),
    radial-gradient(circle, color-mix(in srgb, currentColor 36%, transparent), transparent 62%);
  mix-blend-mode: screen;
  transform: translate3d(-50%, -50%, 0) scale(0.12);
  animation: reveal-halo 1.5s var(--transition-ease) forwards;
}

.reveal-cinematic__scan {
  width: min(42vw, 31rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, rgba(255, 255, 255, 0.88), currentColor, transparent);
  box-shadow:
    0 0 12px currentColor,
    0 0 32px color-mix(in srgb, currentColor 45%, transparent);
  transform: translate3d(-50%, -50%, 0) scaleX(0);
  animation: reveal-scanline 1.15s var(--transition-ease) forwards;
}

.reveal-cinematic__ring {
  width: min(24vw, 16rem);
  height: min(24vw, 16rem);
  border: 1px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 0 22px color-mix(in srgb, currentColor 48%, transparent);
  transform: translate3d(-50%, -50%, 0) scale(0.34);
  animation: reveal-ring 1.55s var(--transition-ease) forwards;
}

.reveal-cinematic__label {
  padding: 0.32rem 0.52rem;
  border-left: 2px solid currentColor;
  color: var(--text-primary);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 20%, transparent), transparent),
    rgba(0, 0, 0, 0.62);
  transform: translate3d(-12%, -240%, 0);
  opacity: 0;
  animation: reveal-label 1.65s var(--transition-ease) forwards;
}

.reveal-cinematic--legendary .reveal-cinematic__halo {
  width: min(52vw, 38rem);
  height: min(52vw, 38rem);
}

.zone__pollution {
  z-index: 3;
  pointer-events: auto;
}

.pollution-item {
  position: absolute;
  top: -8%;
  left: var(--left, 50%);
  width: var(--size, 2.4rem);
  height: var(--size, 2.4rem);
  padding: 0;
  opacity: 0;
  pointer-events: auto;
  border-radius: 999px;
  animation: pollution-fall var(--duration, 9s) cubic-bezier(0.32, 0.04, 0.66, 0.96) forwards;
  will-change: transform, opacity;
}

.pollution-item.is-proof-shot {
  top: var(--proof-top, 42%);
  left: var(--proof-left, 55%);
  z-index: 9;
  opacity: 0.95;
  animation: proof-trash-float 4.6s ease-in-out infinite;
  transform: translate3d(0, 0, 0) rotate(var(--proof-rotate, -8deg));
}

.pollution-item svg,
.pollution-item__img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pollution-item__img {
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(244, 162, 97, 0.18))
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
}

.pollution-item svg {
  overflow: visible;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 7px 9px rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
  opacity: var(--trash-alpha, 0.88);
  transform-origin: center;
  will-change: opacity;
}

.trash-fill {
  fill: var(--trash-main, #77786f);
  stroke: var(--trash-line, #2d302b);
  stroke-width: 1.6;
}

.trash-shade {
  fill: var(--trash-shade, #50534c);
  stroke: none;
  opacity: 0.66;
}

.trash-line {
  fill: none;
  stroke: var(--trash-line, #2d302b);
  stroke-width: 1.8;
  opacity: 0.7;
}

.trash-hole {
  fill: rgba(0, 0, 0, 0.46);
  stroke: var(--trash-line, #2d302b);
  stroke-width: 1.5;
}

.trash-cap,
.trash-knot {
  fill: var(--trash-shade, #50534c);
  stroke: var(--trash-line, #2d302b);
  stroke-width: 1.3;
}

.trash-rope {
  fill: none;
  stroke: var(--trash-line, #252a25);
  stroke-width: 2;
  opacity: 0.7;
}

.trash-rust {
  fill: var(--trash-rust, #76523a);
  opacity: 0.62;
  stroke: none;
}

.trash-dot {
  fill: var(--trash-main, #85877e);
  opacity: 0.76;
}

.trash-dot.shade {
  fill: var(--trash-shade, #62655e);
  opacity: 0.58;
}

.pollution-item[data-type="microplastics"] svg {
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.24));
}

.pollution-item__tag {
  position: absolute;
  left: 50%;
  bottom: -1.15rem;
  padding: 0.1rem 0.32rem;
  border: 1px solid rgba(180, 185, 170, 0.18);
  color: rgba(205, 211, 196, 0.6);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(2, 6, 8, 0.52);
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 260ms var(--transition-ease), transform 260ms var(--transition-ease);
}

.pollution-item:hover {
  opacity: 0.96;
}

.pollution-item:hover svg,
.pollution-item:focus-visible svg,
.pollution-item:hover .pollution-item__img,
.pollution-item:focus-visible .pollution-item__img {
  filter: drop-shadow(0 9px 11px rgba(0, 0, 0, 0.38)) brightness(1.14);
}

.pollution-item:hover .pollution-item__tag,
.pollution-item:focus-visible .pollution-item__tag {
  opacity: 0.82;
  transform: translateX(-50%) translateY(-0.15rem);
}

.pollution-item.is-collected {
  animation: pollution-pop 420ms ease-out forwards;
  pointer-events: none;
}

.pollution-item.is-collected .pollution-item__tag {
  color: rgba(201, 213, 190, 0.86);
  border-color: rgba(201, 213, 190, 0.34);
  opacity: 0.9;
}

#hud-overlay {
  position: fixed;
  top: var(--hud-space);
  right: var(--hud-space);
  z-index: 40;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: end;
  padding-left: 1rem;
}

.hud-chip {
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(76, 201, 240, 0.24);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-glow);
  transition: transform 360ms var(--transition-ease), box-shadow 360ms var(--transition-ease), border-color 360ms var(--transition-ease);
}

.hud-chip.is-energized {
  transform: translate3d(0, -0.18rem, 0);
  border-color: rgba(0, 245, 212, 0.62);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.32);
}

.hud-chip--breath {
  position: relative;
  overflow: hidden;
}

.hud-chip--breath::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: calc(var(--breath-level, 0) * 100%);
  background: linear-gradient(180deg, rgba(0, 245, 212, 0), rgba(0, 245, 212, 0.18));
  opacity: 0.85;
  pointer-events: none;
  transition: height 90ms linear;
}

.hud-chip--breath.is-listening {
  border-color: rgba(87, 204, 153, 0.34);
}

.hud-chip--breath.is-muted {
  border-color: rgba(239, 35, 60, 0.26);
  color: rgba(224, 247, 250, 0.54);
}

.hud-chip--breath.is-breath-detected {
  border-color: rgba(0, 245, 212, 0.88);
  box-shadow:
    0 0 18px rgba(0, 245, 212, 0.5),
    inset 0 0 18px rgba(0, 245, 212, 0.14);
  animation: breath-chip-flash 1.2s var(--transition-ease);
}

.hud-chip__label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.hud-chip__value {
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.sonar-status {
  flex-basis: 100%;
  margin: -0.18rem 0 0;
  color: rgba(0, 245, 212, 0.78);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 245, 212, 0.22);
  transition:
    color 260ms var(--transition-ease),
    text-shadow 260ms var(--transition-ease),
    transform 260ms var(--transition-ease);
}

.sonar-status.is-detected {
  color: var(--bio-cyan);
  text-shadow:
    0 0 10px rgba(0, 245, 212, 0.75),
    0 0 24px rgba(76, 201, 240, 0.45);
  transform: translate3d(0, -0.12rem, 0);
}

#creature-panel,
#logbook-panel {
  position: fixed;
  right: var(--hud-space);
  z-index: 45;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(0, 14, 28, 0.88), rgba(0, 7, 15, 0.94)),
    var(--scanline);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-heavy);
}

#creature-panel {
  bottom: var(--hud-space);
  width: min(26rem, calc(100vw - var(--sidebar-width) - 3rem));
  padding: 1.25rem 1.2rem 1.2rem;
  border-left: 4px solid var(--panel-accent, var(--bio-blue));
  opacity: 0;
  pointer-events: none;
  transform: translate3d(1.5rem, 0, 0);
  transition:
    transform 360ms var(--transition-ease),
    opacity 360ms var(--transition-ease),
    box-shadow 360ms var(--transition-ease);
}

#creature-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  box-shadow:
    0 0 40px color-mix(in srgb, var(--panel-accent, var(--bio-blue)) 18%, transparent),
    var(--shadow-heavy);
}

.creature-panel__inner {
  display: grid;
  gap: 0.8rem;
}

.creature-panel__name {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.9rem;
}

.creature-panel__meta {
  display: flex;
  gap: 1rem;
  color: rgba(224, 247, 250, 0.72);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creature-panel__facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1rem;
  font-size: 1rem;
  line-height: 1.45;
}

#logbook-panel {
  top: 0;
  bottom: 0;
  width: min(25rem, calc(100vw - var(--sidebar-width) - 2rem));
  padding: 1.4rem 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate3d(calc(100% + 2rem), 0, 0);
  transition: transform 440ms var(--transition-ease);
}

#logbook-panel.is-open {
  transform: translate3d(0, 0, 0);
}

.rarity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.rarity-filter {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(76, 201, 240, 0.22);
  color: rgba(224, 247, 250, 0.64);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 220ms var(--transition-ease),
    color 220ms var(--transition-ease),
    box-shadow 220ms var(--transition-ease);
}

.rarity-filter:hover,
.rarity-filter:focus-visible,
.rarity-filter.is-active {
  border-color: rgba(0, 245, 212, 0.62);
  color: var(--bio-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.18);
}

.panel-heading,
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.panel-heading h2,
.modal h2 {
  margin: 0.2rem 0 0;
  font-family: "Cinzel", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-close {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(76, 201, 240, 0.28);
  color: var(--text-primary);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 1.25rem;
  line-height: 1;
}

.panel-close:hover,
.panel-close:focus-visible {
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}

.logbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
  padding-bottom: 2rem;
}

.logbook-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  min-height: 9.5rem;
  border: 1px solid rgba(76, 201, 240, 0.2);
  background: rgba(255, 255, 255, 0.02);
  align-content: start;
  transition: transform 260ms var(--transition-ease), border-color 260ms var(--transition-ease), background-color 260ms var(--transition-ease);
}

.logbook-card[data-rarity="Rare"] {
  border-color: rgba(76, 201, 240, 0.28);
}

.logbook-card[data-rarity="Legendary"] {
  border-color: rgba(244, 162, 97, 0.36);
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 162, 97, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.02);
}

.logbook-card:hover {
  transform: translate3d(0, -0.18rem, 0);
  border-color: rgba(76, 201, 240, 0.38);
  background: rgba(255, 255, 255, 0.05);
}

.logbook-card__art {
  display: grid;
  place-items: center;
  height: 4rem;
}

.logbook-card__art img {
  max-height: 100%;
  width: auto;
  filter: brightness(0) blur(2px);
  transition: filter 500ms var(--transition-ease);
}

.logbook-card.is-found .logbook-card__art img {
  filter: brightness(1) blur(0px);
}

.logbook-card.is-seen {
  border-color: rgba(244, 162, 97, 0.34);
  background:
    linear-gradient(90deg, rgba(244, 162, 97, 0.07), transparent),
    rgba(255, 255, 255, 0.02);
}

.logbook-card.is-seen .logbook-card__art img {
  filter:
    brightness(0) blur(2px)
    drop-shadow(0 0 8px rgba(244, 162, 97, 0.42));
}

.logbook-card.is-assisted {
  border-color: rgba(87, 204, 153, 0.36);
  background:
    linear-gradient(90deg, rgba(87, 204, 153, 0.08), transparent),
    rgba(255, 255, 255, 0.025);
}

.logbook-card.is-assisted .logbook-card__art img {
  filter: grayscale(0.55) brightness(0.78) saturate(0.85) blur(0px);
}

.logbook-card__name {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.logbook-card__meta {
  margin: 0;
  color: var(--text-secondary);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.logbook-card__status {
  margin: 0;
  color: rgba(0, 245, 212, 0.58);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.35);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.4rem;
  border: 1px solid rgba(76, 201, 240, 0.28);
  background:
    linear-gradient(180deg, rgba(0, 14, 28, 0.94), rgba(0, 7, 15, 0.96)),
    var(--scanline);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
}

.modal__options {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.modal__option {
  justify-content: start;
  text-align: left;
  min-height: 3.15rem;
  font-size: 0.88rem;
}

.modal__option.is-answer-correct,
.modal__option.is-answer-revealed {
  border-color: rgba(87, 204, 153, 0.72);
  color: var(--bio-green);
  box-shadow: 0 0 14px rgba(87, 204, 153, 0.2);
}

.modal__option.is-answer-revealed {
  border-color: rgba(244, 162, 97, 0.72);
  color: var(--bio-amber);
}

.modal__option.is-answer-wrong {
  border-color: rgba(239, 35, 60, 0.64);
  color: rgba(255, 214, 219, 0.86);
}

.modal__feedback {
  min-height: 1.6rem;
  margin: 1rem 0 0;
  color: rgba(224, 247, 250, 0.9);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal__feedback.is-correct {
  color: var(--bio-green);
}

.modal__feedback.is-wrong {
  color: var(--bio-amber);
}

.end-screen__content {
  align-content: start;
  justify-items: start;
  min-height: auto;
  max-width: min(68rem, 100vw);
  margin: 0 auto;
  padding-top: clamp(2rem, 5vh, 4rem);
  padding-bottom: 4rem;
}

.end-screen__score {
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.end-screen__breakdown {
  display: grid;
  gap: 1rem;
  width: min(58rem, calc(100vw - 8rem));
  font-family: "Space Mono", "Courier New", monospace;
  color: rgba(224, 247, 250, 0.82);
}

.end-rank-card {
  position: relative;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--bio-cyan);
  background:
    linear-gradient(90deg, rgba(0, 245, 212, 0.11), transparent 52%),
    rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.12);
}

.end-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scanline);
  opacity: 0.36;
  pointer-events: none;
}

.end-rank-card__label {
  margin: 0 0 0.25rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.end-rank-card h3 {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.end-rank-card p:last-child {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: rgba(224, 247, 250, 0.78);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.end-stat-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.65rem;
}

.end-stat-grid article,
.zone-result {
  border: 1px solid rgba(76, 201, 240, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.26);
}

.end-stat-grid article {
  min-height: 5.6rem;
  padding: 0.8rem;
}

.end-stat-grid span {
  display: block;
  color: var(--bio-cyan);
  font-size: clamp(1rem, 2vw, 1.45rem);
  letter-spacing: 0.06em;
}

.end-stat-grid p,
.zone-result p {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zone-results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.zone-result {
  padding: 0.8rem;
}

.zone-result__header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zone-result__header strong {
  color: var(--bio-green);
}

.zone-result__bar {
  height: 0.32rem;
  margin: 0.65rem 0 0.5rem;
  border: 1px solid rgba(76, 201, 240, 0.22);
  background:
    linear-gradient(90deg, rgba(0, 245, 212, 0.88) 0 var(--zone-progress), rgba(255, 255, 255, 0.08) var(--zone-progress) 100%);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.14);
}

.zone-result__names {
  color: rgba(224, 247, 250, 0.74) !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.92rem !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25;
  text-transform: none !important;
}

#end-screen[data-rank="legend"] #end-title,
#end-screen[data-rank="guardian"] #end-title {
  text-shadow:
    0 0 18px currentColor,
    0 0 42px rgba(0, 245, 212, 0.28);
}

.share-feedback {
  min-height: 1.4rem;
  margin: 0;
  font-family: "Space Mono", "Courier New", monospace;
  color: var(--text-secondary);
}

@keyframes fish-drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(12px);
  }
}

@keyframes jelly-bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.04);
  }
}

@keyframes whale-pass {
  0% {
    transform: translateX(-120%) scaleX(1);
  }
  49% {
    transform: translateX(120%) scaleX(1);
  }
  50% {
    transform: translateX(120%) scaleX(-1);
  }
  100% {
    transform: translateX(-120%) scaleX(-1);
  }
}

@keyframes eel-sway {
  0%,
  100% {
    transform: rotate(-5deg) translateY(0);
  }
  50% {
    transform: rotate(5deg) translateY(-4px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bio-breathe {
  0%,
  100% {
    filter: brightness(1.08) saturate(1.08) drop-shadow(0 0 8px var(--bio-color, var(--bio-cyan)));
  }
  50% {
    filter: brightness(1.28) saturate(1.2) drop-shadow(0 0 24px var(--bio-color, var(--bio-cyan)));
  }
}

@keyframes reveal-creature {
  0% {
    transform: scale(0.78) rotate(-2deg);
    opacity: 0.18;
    filter: brightness(0) blur(7px);
  }
  28% {
    transform: scale(1.12) rotate(1deg);
    opacity: 1;
    filter: brightness(1.75) saturate(1.35) blur(0.6px);
  }
  54% {
    transform: scale(0.98) rotate(0deg);
    filter: brightness(0.94) saturate(1.08) blur(0px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1.03) saturate(1.08) blur(0px);
  }
}

@keyframes pollution-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(var(--tilt, 0deg));
  }
  8% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.72;
    transform: translate3d(var(--drift, 0vw), 120vh, 0) rotate(var(--tilt, 0deg));
  }
}

@keyframes pollution-pop {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  45% {
    opacity: 1;
    transform: translate3d(0, -0.35rem, 0) scale(1.18);
    filter: brightness(1.2) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.34));
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -1rem, 0) scale(1.4);
  }
}

@keyframes proof-trash-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--proof-rotate, -8deg)) scale(1);
  }
  50% {
    transform: translate3d(0.6rem, -0.8rem, 0) rotate(calc(var(--proof-rotate, -8deg) + 8deg)) scale(1.04);
  }
}

@keyframes sonar-layer-fade {
  0%,
  76% {
    opacity: calc(0.72 * var(--return-intensity, 1));
  }
  100% {
    opacity: 0;
  }
}

@keyframes sonar-ring {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.12);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(7.2);
  }
}

@keyframes sonar-sweep {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.2) rotate(-24deg);
  }
  18% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.24) rotate(42deg);
  }
}

@keyframes sonar-creature-flicker {
  0%,
  100% {
    opacity: 0.82;
  }
  30% {
    opacity: 0.38;
  }
  55% {
    opacity: 1;
  }
  72% {
    opacity: 0.48;
  }
}

@keyframes sonar-target-lock {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  24%,
  54% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes sonar-echo-return {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.18);
  }
  18% {
    opacity: var(--echo-alpha, 0.62);
  }
  46% {
    opacity: calc(var(--echo-alpha, 0.62) * 0.72);
    transform: translate3d(-50%, -50%, 0) scale(0.92);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.55);
  }
}

@keyframes sonar-debris-flicker {
  0%,
  100% {
    opacity: 0.72;
  }
  45% {
    opacity: 1;
  }
}

@keyframes reveal-burst {
  0% {
    opacity: 0;
    transform: scale(0.78);
  }
  18% {
    opacity: 1;
    transform: scale(0.96);
  }
  44% {
    opacity: 0.72;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes reveal-cinematic-life {
  0%,
  86% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes reveal-halo {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.12);
  }
  22% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.25);
  }
}

@keyframes reveal-scanline {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scaleX(0);
  }
  24% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scaleX(0.9);
  }
  62% {
    opacity: 0.9;
    transform: translate3d(-50%, 220%, 0) scaleX(1.1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -360%, 0) scaleX(0.35);
  }
}

@keyframes reveal-ring {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.34) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(1.85) rotate(28deg);
  }
}

@keyframes reveal-lock-ring {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  26%,
  58% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes reveal-label {
  0%,
  18% {
    opacity: 0;
    transform: translate3d(-12%, -200%, 0);
  }
  36%,
  72% {
    opacity: 1;
    transform: translate3d(-12%, -240%, 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-12%, -280%, 0);
  }
}

@keyframes miss-shock {
  0%,
  100% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}

@keyframes particle-fall {
  0% {
    transform: translate3d(0, -5vh, 0);
  }
  100% {
    transform: translate3d(var(--drift, 0vw), 120vh, 0);
  }
}

@keyframes particle-fade {
  0%,
  8% {
    opacity: 0;
  }
  16%,
  80% {
    opacity: var(--opacity, 0.55);
  }
  100% {
    opacity: 0;
  }
}

@keyframes zone-content-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes creature-exit {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(16vw, -6vh, 0) scale(0.75);
  }
}

@keyframes warning-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(239, 35, 60, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(239, 35, 60, 0.35);
  }
}

@keyframes critical-vignette {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.35);
  }
}

@keyframes refill-flash {
  0% {
    box-shadow: 0 0 0 rgba(76, 201, 240, 0);
  }
  45% {
    box-shadow: 0 0 24px rgba(0, 245, 212, 0.42);
  }
  100% {
    box-shadow: 0 0 0 rgba(76, 201, 240, 0);
  }
}

@keyframes breath-refill {
  0% {
    box-shadow: 0 0 0 rgba(0, 245, 212, 0);
    transform: translate3d(0, 0, 0);
  }
  32% {
    box-shadow:
      0 0 22px rgba(0, 245, 212, 0.52),
      inset 0 0 20px rgba(224, 247, 250, 0.18);
    transform: translate3d(0, -0.12rem, 0);
  }
  100% {
    box-shadow: 0 0 0 rgba(0, 245, 212, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes o2-bubble-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--bubble-x, 0), var(--bubble-y, -4rem), 0) scale(1.2);
  }
}

@keyframes breath-chip-flash {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  28% {
    transform: translate3d(0, -0.18rem, 0);
  }
}

@keyframes flashlight-breathe {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.025);
  }
}

@keyframes legendary-pass {
  0% {
    opacity: 0;
    transform: translate3d(-88vw, 4vh, 0) scale(1.16) rotate(-2deg);
  }
  15% {
    opacity: 0.32;
  }
  48% {
    opacity: 0.44;
    transform: translate3d(18vw, -1vh, 0) scale(1.22) rotate(1deg);
  }
  82% {
    opacity: 0.28;
  }
  100% {
    opacity: 0;
    transform: translate3d(112vw, 3vh, 0) scale(1.18) rotate(2deg);
  }
}

@keyframes intro-surface-swell {
  from {
    opacity: 0.52;
    transform: translate3d(-1.5vw, 0, 0) scaleX(1);
  }
  to {
    opacity: 0.76;
    transform: translate3d(1.5vw, 0.8rem, 0) scaleX(1.04);
  }
}

@keyframes intro-rays-sway {
  from {
    opacity: 0.62;
    transform: rotate(-5deg) translate3d(-1%, 0, 0);
  }
  to {
    opacity: 0.86;
    transform: rotate(4deg) translate3d(1%, 1.4%, 0);
  }
}

@keyframes intro-particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 2rem, 0) scale(0.65);
  }
  18%,
  74% {
    opacity: 0.68;
  }
  100% {
    opacity: 0;
    transform: translate3d(1.6vw, -26vh, 0) scale(1.08);
  }
}

@keyframes intro-swim-left-distant {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(2deg);
  }
  18%,
  76% {
    opacity: 0.24;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-100vw - 36rem), -4vh, 0) rotate(-2deg);
  }
}

@keyframes intro-squid-hover {
  0%,
  100% {
    opacity: 0.18;
    transform: translate3d(0, 0, 0) rotate(-5deg) scale(0.94);
  }
  45% {
    opacity: 0.32;
    transform: translate3d(-1.8vw, -2.2vh, 0) rotate(4deg) scale(1.03);
  }
  70% {
    opacity: 0.24;
    transform: translate3d(-2.8vw, 0.6vh, 0) rotate(-2deg) scale(0.98);
  }
}

@keyframes subtle-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -2%, 0);
  }
}

@keyframes depth-current {
  from {
    transform: translate3d(-1.5%, 1%, 0) scale(1);
    opacity: 0.18;
  }
  to {
    transform: translate3d(1.5%, -1%, 0) scale(1.04);
    opacity: 0.34;
  }
}

@keyframes trench-pressure {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.12;
  }
  47% {
    transform: translate3d(-0.3%, 0.2%, 0) scale(1.01);
    opacity: 0.22;
  }
  50% {
    transform: translate3d(0.4%, -0.2%, 0) scale(1.012);
    opacity: 0.32;
  }
  53% {
    transform: translate3d(-0.2%, 0.1%, 0) scale(1.006);
    opacity: 0.18;
  }
}

@keyframes ray-sway {
  from {
    transform: rotate(-3deg) scale(1);
  }
  to {
    transform: rotate(3deg) scale(1.03);
  }
}

@keyframes transition-breath {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

@keyframes spotlight-fade {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  25% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 5.8rem;
  }

  #depth-sidebar {
    padding-inline: 0.75rem;
  }

  .depth-scale {
    padding-right: 0;
  }

  .depth-scale__label,
  .zone-readout,
  .intro-screen__hint,
  .hud-chip__label {
    display: none;
  }

  #hud-overlay {
    gap: 0.55rem;
  }

  .hud-chip {
    padding: 0.65rem 0.75rem;
  }

  .ui-button__key,
  .sonar-status {
    display: none;
  }

  #creature-panel,
  #logbook-panel {
    width: min(24rem, calc(100vw - var(--sidebar-width) - 1.5rem));
  }

  .zone__content {
    max-width: 24rem;
  }

  .end-screen__content {
    padding: 2rem 1rem 2rem calc(var(--sidebar-width) + 1rem);
  }

  .end-screen__breakdown {
    width: calc(100vw - var(--sidebar-width) - 2rem);
  }

  .end-stat-grid,
  .zone-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
