:root {
  --bg-main: #eef6ff;
  --bg-card: rgba(255, 255, 255, 0.78);
  --text-main: #1d2b3e;
  --text-muted: #60738f;
  --accent: #6fa8d8;
  --accent-soft: #bfdcf2;
  --line-base: #d8e7f5;
  --line-active: linear-gradient(180deg, #6fa8d8 0%, #9bc4e8 100%);
  --shadow-soft: 0 22px 42px rgba(26, 52, 82, 0.12);
  --radius-xl: 30px;
  --radius-md: 20px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 85% 15%, #d9ebff 0%, transparent 35%),
    radial-gradient(circle at 10% 40%, #eaf5ff 0%, transparent 38%),
    var(--bg-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.mountain-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -1px;
  height: min(44vh, 360px);
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
  opacity: 0.92;
}

.mountain-layer {
  position: absolute;
  left: -6vw;
  width: 112vw;
  bottom: 0;
  transform: translateZ(0);
}

.mountain-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0) 36%);
  opacity: 0.7;
}

.mountain-far {
  height: 78%;
  background: linear-gradient(180deg, #b0c8de 0%, #8eaec9 100%);
  clip-path: polygon(0 84%, 6% 60%, 13% 73%, 20% 47%, 28% 69%, 35% 41%, 44% 72%, 52% 50%, 61% 77%, 70% 53%, 79% 73%, 88% 45%, 95% 67%, 100% 58%, 100% 100%, 0 100%);
  animation: driftFar 42s ease-in-out infinite alternate;
}

.mountain-mid {
  height: 62%;
  background: linear-gradient(180deg, #89a9c4 0%, #6f90ad 100%);
  clip-path: polygon(0 84%, 8% 62%, 16% 76%, 23% 45%, 31% 68%, 39% 38%, 47% 72%, 56% 48%, 64% 79%, 73% 52%, 82% 75%, 90% 43%, 100% 66%, 100% 100%, 0 100%);
  animation: driftMid 30s ease-in-out infinite alternate;
}

.mountain-near {
  height: 50%;
  background: linear-gradient(180deg, #6787a5 0%, #4f6f8d 100%);
  clip-path: polygon(0 88%, 7% 66%, 15% 80%, 22% 52%, 30% 74%, 38% 46%, 46% 78%, 54% 54%, 62% 82%, 70% 56%, 78% 78%, 86% 50%, 94% 70%, 100% 60%, 100% 100%, 0 100%);
  animation: driftNear 22s ease-in-out infinite alternate;
}

.mountain-fog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  background:
    linear-gradient(180deg, rgba(224, 239, 251, 0) 0%, rgba(224, 239, 251, 0.62) 100%);
}

.mountain-sign {
  position: absolute;
  right: clamp(14px, 3vw, 36px);
  bottom: clamp(12px, 2vw, 24px);
  color: rgba(31, 54, 80, 0.78);
  border: 1px solid rgba(151, 179, 205, 0.6);
  background: rgba(231, 243, 254, 0.56);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
}

body.is-locked {
  overflow: hidden;
}

.app-shell {
  transition: filter 360ms ease, opacity 360ms ease;
}

.app-shell.is-locked {
  filter: blur(8px) saturate(0.85);
  pointer-events: none;
  user-select: none;
}

.gift-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 85% 14%, rgba(215, 235, 252, 0.88) 0%, transparent 42%),
    radial-gradient(circle at 10% 80%, rgba(193, 221, 245, 0.82) 0%, transparent 42%),
    linear-gradient(135deg, #edf6ff 0%, #d8eaf9 60%, #c8def2 100%);
}

.gift-card {
  width: min(980px, 96vw);
  padding: clamp(22px, 4vw, 42px);
  border-radius: 26px;
  border: 1px solid rgba(197, 220, 242, 0.95);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 30px 48px rgba(30, 60, 92, 0.16);
}

.gift-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: #7089a7;
}

.gift-title {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4.7vw, 3.7rem);
}

.gift-lead {
  margin: 10px 0 0;
  color: #5f7895;
  line-height: 1.7;
}

.gift-cipher {
  margin-top: 18px;
  border-radius: 16px;
  padding: 14px;
  background: rgba(229, 241, 252, 0.62);
  border: 1px solid rgba(170, 200, 229, 0.9);
}

.gift-cipher-meta {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #456789;
  font-weight: 700;
}

.gift-cipher-text {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(22, 37, 56, 0.96);
  color: #e8f2fd;
  border: 1px solid rgba(111, 151, 186, 0.5);
  line-height: 1.5;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(207, 229, 250, 0.72) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(181, 215, 245, 0.64) 0%, transparent 42%),
    linear-gradient(130deg, rgba(238, 247, 255, 0.74) 0%, rgba(221, 239, 255, 0.78) 50%, rgba(204, 229, 251, 0.84) 100%);
}

.gate-screen.is-hidden {
  display: none;
}

.gate-screen-secondary {
  z-index: 31;
}

.gate-screen-tertiary {
  z-index: 32;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 22%, rgba(208, 229, 248, 0.78) 0%, transparent 42%),
    radial-gradient(circle at 84% 72%, rgba(181, 214, 244, 0.72) 0%, transparent 44%),
    linear-gradient(130deg, rgba(236, 246, 255, 0.9) 0%, rgba(218, 235, 251, 0.92) 55%, rgba(202, 223, 244, 0.96) 100%);
}

.gate-screen-tertiary::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Ctext x='20' y='86' font-size='44'%3E%F0%9F%8F%8B%EF%B8%8F%3C/text%3E%3Ctext x='90' y='156' font-size='44'%3E%F0%9F%8F%8B%EF%B8%8F%3C/text%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: dumbbellDrift 18s linear infinite;
}

.gate-screen-tertiary::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Ctext x='18' y='96' font-size='52'%3E%F0%9F%8D%BA%3C/text%3E%3Ctext x='126' y='178' font-size='52'%3E%F0%9F%8D%BA%3C/text%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: beerDrift 13s linear infinite;
}

.gate-screen-quaternary {
  z-index: 33;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 20%, rgba(207, 230, 250, 0.8) 0%, transparent 43%),
    radial-gradient(circle at 82% 76%, rgba(184, 216, 245, 0.76) 0%, transparent 45%),
    linear-gradient(130deg, rgba(236, 246, 255, 0.92) 0%, rgba(218, 235, 251, 0.94) 56%, rgba(201, 222, 244, 0.96) 100%);
}

.gate-screen-quaternary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(86, 126, 165, 0.22) 0%, rgba(86, 126, 165, 0) 68%);
  background-size: 120px 120px;
  animation: timestampBackdropDrift 16s linear infinite;
}

.gate-screen-quinary {
  z-index: 34;
  isolation: isolate;
  background:
    radial-gradient(circle at 15% 18%, rgba(210, 231, 249, 0.78) 0%, transparent 44%),
    radial-gradient(circle at 82% 74%, rgba(182, 216, 245, 0.74) 0%, transparent 46%),
    linear-gradient(130deg, rgba(234, 246, 255, 0.94) 0%, rgba(215, 235, 251, 0.94) 56%, rgba(197, 221, 244, 0.98) 100%);
}

.gate-screen-quinary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(82, 128, 171, 0.2) 0%, rgba(82, 128, 171, 0) 66%);
  background-size: 140px 140px;
  animation: fishBackdropDrift 18s linear infinite;
}

.gate-screen-senary {
  z-index: 35;
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 18%, rgba(214, 233, 250, 0.8) 0%, transparent 44%),
    radial-gradient(circle at 84% 76%, rgba(184, 218, 246, 0.76) 0%, transparent 46%),
    linear-gradient(130deg, rgba(236, 247, 255, 0.95) 0%, rgba(217, 236, 251, 0.94) 56%, rgba(197, 221, 244, 0.98) 100%);
}

.gate-screen-senary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(86, 131, 172, 0.2) 0%, rgba(86, 131, 172, 0) 66%);
  background-size: 140px 140px;
  animation: childhoodBackdropDrift 18s linear infinite;
}

.gate-screen-septenary {
  z-index: 36;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 18%, rgba(214, 233, 250, 0.8) 0%, transparent 44%),
    radial-gradient(circle at 84% 76%, rgba(184, 218, 246, 0.76) 0%, transparent 46%),
    linear-gradient(130deg, rgba(235, 247, 255, 0.95) 0%, rgba(216, 236, 251, 0.94) 56%, rgba(196, 221, 244, 0.98) 100%);
}

.gate-screen-septenary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(86, 131, 172, 0.2) 0%, rgba(86, 131, 172, 0) 66%);
  background-size: 140px 140px;
  animation: potterBackdropDrift 18s linear infinite;
}

.gate-screen-octonary {
  z-index: 37;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 18%, rgba(215, 233, 250, 0.82) 0%, transparent 44%),
    radial-gradient(circle at 84% 76%, rgba(186, 219, 246, 0.78) 0%, transparent 46%),
    linear-gradient(130deg, rgba(236, 247, 255, 0.96) 0%, rgba(217, 236, 251, 0.95) 56%, rgba(198, 222, 244, 0.99) 100%);
}

.gate-screen-octonary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(circle, rgba(89, 132, 171, 0.22) 0%, rgba(89, 132, 171, 0) 68%);
  background-size: 150px 150px;
  animation: catBackdropDrift 16s linear infinite;
}

.gate-screen-nonary {
  z-index: 38;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 20%, rgba(214, 233, 251, 0.82) 0%, transparent 44%),
    radial-gradient(circle at 84% 75%, rgba(184, 218, 246, 0.78) 0%, transparent 46%),
    linear-gradient(130deg, rgba(236, 247, 255, 0.96) 0%, rgba(217, 236, 252, 0.95) 56%, rgba(197, 222, 245, 0.99) 100%);
}

.gate-screen-nonary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(circle, rgba(84, 128, 168, 0.22) 0%, rgba(84, 128, 168, 0) 66%);
  background-size: 150px 150px;
  animation: riverBackdropDrift 16s linear infinite;
}

.gate-screen.is-leaving {
  animation: fadeGate 460ms ease forwards;
}

.gate-photo-stream {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.gate-edge-photo {
  position: absolute;
  top: var(--photo-top, 50%);
  width: var(--photo-size, 168px);
  height: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  transform-origin: center center;
  opacity: 0;
}

.gate-edge-photo[data-side="left"] {
  left: 0;
  animation: gatePhotoLeft 6.2s ease forwards;
}

.gate-edge-photo[data-side="right"] {
  right: 0;
  animation: gatePhotoRight 6.2s ease forwards;
}

.gate-card {
  width: min(680px, 94vw);
  padding: clamp(22px, 4vw, 44px);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 30px 48px rgba(30, 60, 92, 0.16);
  border: 1px solid rgba(201, 221, 241, 0.95);
  position: relative;
  z-index: 2;
}

.coords-card {
  width: min(860px, 96vw);
}

.gym-card {
  width: min(920px, 96vw);
}

.timestamp-card {
  width: min(980px, 96vw);
}

.fish-card {
  width: min(900px, 96vw);
}

.childhood-card {
  width: min(860px, 96vw);
}

.potter-card {
  width: min(860px, 96vw);
}

.gate-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  color: #7089a7;
}

.gate-title {
  margin: 8px 0 0;
  font-size: clamp(2.15rem, 5vw, 3.65rem);
}

.gate-lead {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.68;
}

.gate-form {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.coords-form {
  margin-top: 16px;
}

.gate-field {
  display: grid;
  gap: 6px;
}

.gate-field-full {
  grid-column: 1 / -1;
}

.gate-field span {
  font-size: 0.82rem;
  color: #5f7897;
  font-weight: 700;
}

.gate-field input {
  width: 100%;
  height: 45px;
  border: 1px solid #bdd3e9;
  border-radius: 12px;
  font: inherit;
  padding: 0 12px;
  color: #2d3f57;
  background: rgba(255, 255, 255, 0.92);
}

.gate-field input:focus-visible {
  outline: 2px solid #6f9fd0;
  outline-offset: 1px;
}

.gate-submit {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.btn-dev {
  color: #4e6787;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(136, 168, 199, 0.88);
  box-shadow: none;
}

.btn-hint {
  color: #3f5f84;
  background: rgba(222, 238, 252, 0.9);
  border: 1px solid rgba(163, 195, 225, 0.95);
  box-shadow: none;
}

.coords-photo-wrap {
  margin: 16px 0 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(193, 217, 240, 0.92);
  background: rgba(255, 255, 255, 0.54);
}

.coords-photo-wrap img {
  display: block;
  width: 100%;
  height: min(52vh, 460px);
  object-fit: contain;
  background: linear-gradient(180deg, rgba(225, 240, 253, 0.82) 0%, rgba(207, 226, 245, 0.74) 100%);
}

.coords-photo-wrap figcaption {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: #5f7895;
  background: rgba(235, 245, 253, 0.82);
}

.gym-question-line {
  margin-top: 16px;
  text-align: center;
}

.gym-question-text {
  margin: 0;
  font-weight: 700;
  color: #334e6f;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  line-height: 1.5;
}

.gym-photo-line {
  width: min(460px, 92%);
  height: min(44vh, 330px);
  margin: 10px auto 0;
  position: relative;
  display: grid;
  place-items: end center;
}

.gym-photo-line::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 16px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(103, 140, 176, 0.15) 0%, rgba(103, 140, 176, 0.52) 50%, rgba(103, 140, 176, 0.15) 100%);
}

.gym-photo-line img {
  position: relative;
  z-index: 2;
  display: block;
  width: min(360px, 88%);
  height: min(40vh, 290px);
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  animation: gymPushup 1.85s ease-in-out infinite;
  transform-origin: center bottom;
}

.gym-form {
  margin-top: 14px;
}

.timestamp-scene {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: end;
  gap: clamp(10px, 2vw, 24px);
}

.timestamp-photo {
  display: block;
  width: min(260px, 100%);
  height: min(42vh, 300px);
  justify-self: center;
  object-fit: contain;
  object-position: center bottom;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 12px 14px rgba(58, 86, 118, 0.22));
  animation: timestampPhotoFloat 4.8s ease-in-out infinite;
}

.timestamp-photo-right {
  animation-name: timestampPhotoFloatRight;
}

.timestamp-heart-wrap {
  display: grid;
  place-items: center;
  padding-bottom: 10px;
}

.timestamp-heart {
  position: relative;
  width: clamp(118px, 16vw, 190px);
  aspect-ratio: 1;
  transform: rotate(-45deg);
  border-radius: 24px;
  background: linear-gradient(148deg, #ffd8e8 0%, #ff97b8 45%, #ef5f8f 100%);
  box-shadow:
    inset 0 9px 16px rgba(255, 255, 255, 0.38),
    inset -10px -14px 18px rgba(177, 47, 90, 0.28),
    0 20px 36px rgba(197, 81, 124, 0.38);
  animation: heartPulse 1.5s ease-in-out infinite;
}

.timestamp-heart::before,
.timestamp-heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.timestamp-heart::before {
  top: -50%;
  left: 0;
}

.timestamp-heart::after {
  left: 50%;
  top: 0;
}

.timestamp-heart-gloss {
  position: absolute;
  top: -30%;
  left: -16%;
  width: 58%;
  height: 36%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0) 72%);
  transform: rotate(24deg);
  z-index: 2;
}

.timestamp-form {
  margin-top: 16px;
}

.fish-photo-wrap {
  margin: 16px auto 0;
  width: min(520px, 92%);
}

.fish-photo-wrap img {
  display: block;
  width: 100%;
  height: min(44vh, 330px);
  object-fit: contain;
  object-position: center;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 14px 18px rgba(53, 85, 120, 0.24));
  animation: fishPhotoHover 4.4s ease-in-out infinite;
}

.fish-form {
  margin-top: 16px;
}

.childhood-photo-wrap {
  margin: 16px auto 0;
  width: min(500px, 92%);
}

.childhood-photo-wrap img {
  display: block;
  width: 100%;
  height: min(44vh, 320px);
  object-fit: contain;
  object-position: center;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 14px 18px rgba(52, 84, 118, 0.24));
  animation: childhoodPhotoFloat 4.6s ease-in-out infinite;
}

.childhood-form {
  margin-top: 16px;
}

.potter-photo-wrap {
  margin: 16px auto 0;
  width: min(500px, 92%);
}

.potter-photo-wrap img {
  display: block;
  width: 100%;
  height: min(44vh, 320px);
  object-fit: contain;
  object-position: center;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 14px 18px rgba(52, 84, 118, 0.24));
  animation: potterPhotoFloat 4.6s ease-in-out infinite;
}

.potter-form {
  margin-top: 16px;
}

.catname-card {
  width: min(900px, 96vw);
}

.river-card {
  width: min(880px, 96vw);
}

.cat-photo-stage {
  position: relative;
  margin: 16px auto 0;
  width: min(560px, 96%);
  min-height: min(44vh, 340px);
  display: grid;
  place-items: center;
}

.cat-chaos-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.catname-photo-wrap {
  margin: 0;
  width: min(500px, 90%);
  position: relative;
  z-index: 2;
}

.catname-photo-wrap img {
  display: block;
  width: 100%;
  height: min(44vh, 330px);
  object-fit: contain;
  object-position: center;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 14px 18px rgba(52, 84, 118, 0.24));
  animation: catPhotoFloat 4.8s ease-in-out infinite;
}

.catname-form {
  margin-top: 16px;
}

.river-photo-wrap {
  margin: 16px auto 0;
  width: min(560px, 94%);
}

.river-photo-wrap img {
  display: block;
  width: 100%;
  height: min(44vh, 330px);
  object-fit: contain;
  object-position: center;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  filter: drop-shadow(0 14px 18px rgba(52, 84, 118, 0.24));
  animation: riverPhotoFloat 4.8s ease-in-out infinite;
}

.river-form {
  margin-top: 16px;
}

.cat-fly-emoji {
  position: absolute;
  left: var(--cat-left, 50%);
  top: var(--cat-top, 50%);
  font-size: var(--cat-size, 32px);
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  z-index: 3;
  filter: drop-shadow(0 6px 10px rgba(47, 75, 105, 0.25));
  animation: catChaosFly var(--cat-duration, 3600ms) linear forwards;
  will-change: transform, opacity;
}

.hint-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(30, 53, 76, 0.34);
  backdrop-filter: blur(3px);
  z-index: 60;
}

.hint-overlay.is-hidden {
  display: none;
}

.hint-dialog {
  width: min(460px, 92vw);
  border-radius: 18px;
  padding: 14px;
  background: rgba(250, 253, 255, 0.96);
  border: 1px solid rgba(181, 210, 236, 0.95);
  box-shadow: 0 22px 36px rgba(36, 62, 89, 0.25);
  position: relative;
}

.hint-title {
  margin: 0 28px 8px 0;
  color: #4f6f93;
  font-weight: 700;
  font-size: 0.96rem;
}

.hint-dialog img {
  width: 100%;
  height: min(48vh, 360px);
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(225, 240, 253, 0.82) 0%, rgba(207, 226, 245, 0.74) 100%);
}

.hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(215, 233, 249, 0.95);
  color: #446488;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
}

.gate-message {
  min-height: 1.3rem;
  margin: 10px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #6f819a;
}

.gate-message.is-error {
  color: #b24b5c;
}

.gate-message.is-success {
  color: #2f7f67;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: -1;
}

.bg-shape-a {
  width: 38vw;
  height: 38vw;
  background: linear-gradient(135deg, #d4e8fb 0%, #abcfee 100%);
  top: -12vw;
  right: -8vw;
  opacity: 0.34;
  animation: floatA 14s ease-in-out infinite;
}

.bg-shape-b {
  width: 34vw;
  height: 34vw;
  background: linear-gradient(135deg, #e0f0ff 0%, #bedcf6 100%);
  left: -12vw;
  bottom: -10vw;
  opacity: 0.28;
  animation: floatB 15s ease-in-out infinite;
}

.hero {
  width: min(1040px, 92vw);
  margin: 72px auto 50px;
  padding: 54px clamp(20px, 4vw, 56px);
  border-radius: var(--radius-xl);
  background: linear-gradient(122deg, rgba(255, 255, 255, 0.95) 5%, rgba(224, 238, 252, 0.9) 100%);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7289a8;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.06;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.lead {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid #6f9fd0;
  outline-offset: 2px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #6fa8d8 0%, #8cbde6 100%);
  box-shadow: 0 12px 24px rgba(111, 168, 216, 0.34);
}

.btn-ghost {
  color: #425b7b;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(185, 208, 230, 0.9);
}

.btn-ghost[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.audio-note {
  margin: 11px 0 0;
  color: #6f819a;
  font-size: 0.9rem;
}

main {
  width: min(1040px, 92vw);
  margin: 0 auto 96px;
}

.intro-card,
.future-card {
  background: var(--bg-card);
  backdrop-filter: blur(3px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 30px clamp(18px, 3vw, 34px);
}

.intro-meta {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #7089a5;
}

.intro-card h2,
.future-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.intro-card p,
.future-card p {
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 68ch;
}

.timeline-shell {
  margin: 34px 0;
  position: relative;
  padding-left: clamp(36px, 6vw, 72px);
}

.timeline-track {
  position: absolute;
  left: clamp(10px, 2.4vw, 22px);
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--line-base);
}

.timeline-track span {
  display: block;
  width: 100%;
  height: 0;
  border-radius: inherit;
  background: var(--line-active);
  box-shadow: 0 0 12px rgba(111, 168, 216, 0.56);
  transition: height 120ms linear;
}

.timeline {
  display: grid;
  gap: 26px;
}

.year-section {
  background: var(--bg-card);
  backdrop-filter: blur(3px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: clamp(20px, 3.5vw, 34px);
  position: relative;
}

.year-chip {
  display: inline-block;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, #dfeefe 0%, #edf6ff 100%);
  color: #55749a;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
}

.year-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.1vw, 2.55rem);
}

.year-desc {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 62ch;
}

.memory-grid {
  margin-top: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.memory-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(204, 223, 241, 0.9);
  transform: translateY(var(--card-shift, 22px));
  transition: transform 580ms cubic-bezier(0.21, 0.98, 0.39, 0.98), box-shadow 260ms ease;
  min-height: 100%;
}

.memory-card:hover {
  box-shadow: 0 14px 26px rgba(52, 84, 117, 0.18);
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--img-parallax, 0px)) scale(1.04);
  transition: transform 260ms ease;
}

.memory-card:hover .photo-frame img {
  transform: translateY(var(--img-parallax, 0px)) scale(1.08);
}

.memory-copy {
  padding: 14px 14px 16px;
}

.memory-copy h3 {
  margin: 0;
  font-size: 1.44rem;
}

.memory-copy p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: transform 720ms cubic-bezier(0.2, 0.95, 0.37, 1), opacity 720ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.memory-card.reveal.is-visible {
  --card-shift: 0px;
}

@media (max-width: 950px) {
  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .mountain-backdrop {
    height: min(34vh, 250px);
  }

  .mountain-sign {
    right: 12px;
    bottom: 10px;
    font-size: 0.56rem;
    letter-spacing: 0.16em;
    padding: 5px 10px;
  }

  .gate-form {
    grid-template-columns: 1fr;
  }

  .gate-card {
    padding: 24px 18px;
  }

  .coords-photo-wrap img {
    height: min(40vh, 300px);
  }

  .gym-photo-line {
    height: min(34vh, 240px);
    width: min(360px, 96%);
  }

  .gym-photo-line img {
    width: min(260px, 90%);
    height: min(30vh, 210px);
  }

  .timestamp-scene {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .timestamp-heart-wrap {
    order: 1;
  }

  .timestamp-photo-left {
    order: 2;
  }

  .timestamp-photo-right {
    order: 3;
  }

  .timestamp-photo {
    width: min(220px, 74vw);
    height: min(25vh, 180px);
  }

  .timestamp-heart {
    width: 128px;
  }

  .fish-photo-wrap {
    width: min(360px, 96%);
  }

  .fish-photo-wrap img {
    height: min(28vh, 210px);
  }

  .childhood-photo-wrap {
    width: min(340px, 96%);
  }

  .childhood-photo-wrap img {
    height: min(28vh, 200px);
  }

  .potter-photo-wrap {
    width: min(340px, 96%);
  }

  .potter-photo-wrap img {
    height: min(28vh, 200px);
  }

  .cat-photo-stage {
    width: min(360px, 96%);
    min-height: min(32vh, 240px);
  }

  .catname-photo-wrap {
    width: min(340px, 96%);
  }

  .catname-photo-wrap img {
    height: min(30vh, 220px);
  }

  .river-photo-wrap {
    width: min(360px, 96%);
  }

  .river-photo-wrap img {
    height: min(30vh, 220px);
  }

  .gift-shell {
    padding: 16px;
  }

  .gift-card {
    padding: 22px 16px;
  }

  .hero {
    margin-top: 42px;
    padding: 30px 20px;
  }

  .timeline-shell {
    padding-left: 24px;
  }

  .timeline-track {
    left: 2px;
    width: 3px;
  }

  .memory-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}

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

  .mountain-layer {
    animation: none !important;
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-14px, 22px) scale(1.04);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -14px) scale(1.06);
  }
}

@keyframes driftFar {
  0% {
    transform: translateX(-1.8%);
  }
  100% {
    transform: translateX(1.8%);
  }
}

@keyframes driftMid {
  0% {
    transform: translateX(-2.4%);
  }
  100% {
    transform: translateX(2.4%);
  }
}

@keyframes driftNear {
  0% {
    transform: translateX(-3.3%);
  }
  100% {
    transform: translateX(3.3%);
  }
}

@keyframes gatePhotoLeft {
  0% {
    opacity: 0;
    transform: translate(-130%, -50%) rotate(90deg);
  }
  18% {
    opacity: 0.95;
    transform: translate(-28%, -50%) rotate(90deg);
  }
  78% {
    opacity: 0.95;
    transform: translate(-28%, -50%) rotate(90deg);
  }
  100% {
    opacity: 0;
    transform: translate(-130%, -50%) rotate(90deg);
  }
}

@keyframes gatePhotoRight {
  0% {
    opacity: 0;
    transform: translate(130%, -50%) rotate(-90deg);
  }
  18% {
    opacity: 0.95;
    transform: translate(28%, -50%) rotate(-90deg);
  }
  78% {
    opacity: 0.95;
    transform: translate(28%, -50%) rotate(-90deg);
  }
  100% {
    opacity: 0;
    transform: translate(130%, -50%) rotate(-90deg);
  }
}

@keyframes dumbbellDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(40px, 30px, 0);
  }
}

@keyframes beerDrift {
  0% {
    transform: translate3d(-18px, 28px, 0) rotate(-1.5deg);
  }
  50% {
    transform: translate3d(20px, -14px, 0) rotate(1.2deg);
  }
  100% {
    transform: translate3d(56px, -42px, 0) rotate(2deg);
  }
}

@keyframes timestampBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(32px, 26px, 0);
  }
}

@keyframes timestampPhotoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-9px) rotate(1deg);
  }
}

@keyframes timestampPhotoFloatRight {
  0%,
  100% {
    transform: translateY(-2px) rotate(1deg);
  }
  50% {
    transform: translateY(-11px) rotate(-1deg);
  }
}

@keyframes heartPulse {
  0%,
  100% {
    transform: rotate(-45deg) scale(1);
  }
  28% {
    transform: rotate(-45deg) scale(1.12);
  }
  54% {
    transform: rotate(-45deg) scale(0.98);
  }
  78% {
    transform: rotate(-45deg) scale(1.07);
  }
}

@keyframes fishBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(30px, 24px, 0);
  }
}

@keyframes fishPhotoHover {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes childhoodBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(28px, 22px, 0);
  }
}

@keyframes childhoodPhotoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes potterBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(28px, 22px, 0);
  }
}

@keyframes potterPhotoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(1deg);
  }
  50% {
    transform: translateY(-8px) rotate(-1deg);
  }
}

@keyframes catBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(32px, 24px, 0);
  }
}

@keyframes catPhotoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes catChaosFly {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.74);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--cat-dx, 0px)), calc(-50% + var(--cat-dy, 0px))) rotate(var(--cat-rot, 0deg)) scale(1.08);
    opacity: 0;
  }
}

@keyframes riverBackdropDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(30px, 22px, 0);
  }
}

@keyframes riverPhotoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-9px) rotate(1deg);
  }
}

@keyframes gymPushup {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  25% {
    transform: translateY(7px) scaleY(0.985);
  }
  50% {
    transform: translateY(14px) scaleY(0.97);
  }
  75% {
    transform: translateY(7px) scaleY(0.985);
  }
}

@keyframes fadeGate {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}
