:root {
  /* Compliance tokens from DESIGN.md: IBM Plex Mono (300 (Google Fonts Intersection Observer API (not library IntersectionObserver` listener `requestAnimationFrame` */
  --aero-blue: #64B5F6;
  --blossom: #F48FB1;
  --gold: #FFD54F;
  --coral: #FF8A65;
  --cloud: #F5F7FA;
  --earth: #3E2723;
  --indigo: #1A237E;
  --leaf: #81C784;
  --glass: rgba(245, 247, 250, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background: linear-gradient(180deg, #1A237E 0%, #3E2723 100%);
  color: #3E2723;
  font-family: "Nunito Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  border: 0;
  font: inherit;
}

.section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.phase-indicator {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(245, 247, 250, 0.65);
  box-shadow: 0 10px 35px rgba(26, 35, 126, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  color: #1A237E;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.phase-ring {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: conic-gradient(#FF8A65 var(--progress, 0deg), rgba(100, 181, 246, 0.18) 0deg);
  box-shadow: 0 0 18px rgba(255, 138, 101, 0.28);
}

.phase-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(245, 247, 250, 0.86);
}

.split-grid {
  position: relative;
  display: grid;
  min-height: 100vh;
}

.dawn-grid {
  grid-template-columns: 60% 40%;
}

.split-cell {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dawn-left {
  background: linear-gradient(135deg, #F5F7FA 0%, #64B5F6 40%, #F48FB1 100%);
}

.dawn-left::before,
.dawn-right::before,
.convergence::before,
.afternoon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.65), transparent 18%), radial-gradient(circle at 82% 30%, rgba(255, 255, 255, 0.26), transparent 22%), linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 42%);
  pointer-events: none;
}

.dawn-right {
  background: linear-gradient(145deg, rgba(245, 247, 250, 0.7), rgba(100, 181, 246, 0.45) 45%, rgba(244, 143, 177, 0.75));
}

.hero-word {
  position: relative;
  z-index: 2;
  font-family: "Outfit", "Noto Sans KR", "Noto Sans JP", "Inter", system-ui, sans-serif;
  font-size: clamp(8rem, 18vw, 20rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.04em;
  text-shadow: 0 16px 34px rgba(26, 35, 126, 0.2), 0 0 38px rgba(245, 247, 250, 0.46);
  animation: breathe 5s ease-in-out infinite;
}

.hero-korean {
  color: #1A237E;
}

.hero-japanese {
  color: #FF8A65;
  font-family: "Outfit", "Noto Sans JP", system-ui, sans-serif;
}

.frosted-kanji,
.frosted-card {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 32px;
  background: rgba(245, 247, 250, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 24px 60px rgba(26, 35, 126, 0.18);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.frosted-kanji {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 5rem);
}

.micro-caption {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  color: rgba(62, 39, 35, 0.76);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: 0.04em;
}

.divider {
  position: absolute;
  z-index: 5;
  background: linear-gradient(180deg, #FF8A65, #F48FB1, #64B5F6);
  box-shadow: 0 0 12px rgba(255, 138, 101, 0.4), 0 0 24px rgba(100, 181, 246, 0.2);
  animation: pulse 3s ease-in-out infinite alternate;
}

.vertical-divider {
  top: 0;
  bottom: 0;
  left: 60%;
  width: 2px;
}

.convergence {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #F5F7FA 0%, #64B5F6 40%, #F48FB1 100%);
}

.merge-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: var(--merge-left, 60%) var(--merge-right, 40%);
}

.merge-left {
  background: linear-gradient(135deg, rgba(245, 247, 250, 0.7), rgba(100, 181, 246, 0.55));
}

.merge-right {
  background: linear-gradient(135deg, rgba(255, 138, 101, 0.48), rgba(244, 143, 177, 0.72));
}

.merge-divider {
  top: 0;
  bottom: 0;
  left: var(--merge-left, 60%);
  width: var(--merge-line-width, 2px);
  opacity: var(--merge-line-opacity, 1);
  transform: translateX(-50%);
}

.poem-block {
  position: relative;
  z-index: 6;
  max-width: min(760px, 84vw);
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 38px;
  background: rgba(245, 247, 250, 0.48);
  box-shadow: 0 28px 90px rgba(26, 35, 126, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  text-align: center;
}

.poem-block h1 {
  margin-bottom: 28px;
  color: #1A237E;
  font-family: "Outfit", "Inter", system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.poem-block p {
  color: rgba(62, 39, 35, 0.88);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.word {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 700ms ease;
}

.in-view .word {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.midday {
  min-height: 120vh;
  background: linear-gradient(135deg, #64B5F6 0%, #F5F7FA 38%, #FFD54F 100%);
}

.prism-grid {
  grid-template-columns: 40% 60%;
  min-height: 120vh;
}

.timeline-panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(2rem, 6vw, 7rem);
  background: rgba(26, 35, 126, 0.08);
}

.timeline-title {
  margin-bottom: 14px;
  color: #3E2723;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hour-marker {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(245, 247, 250, 0.38);
  color: #1A237E;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: transform 350ms ease, background 350ms ease, box-shadow 350ms ease;
}

.hour-marker span {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  letter-spacing: 0.1em;
}

.hour-marker svg {
  width: 100%;
  height: 28px;
}

.hour-marker path {
  fill: none;
  stroke: #81C784;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  transition: stroke-dashoffset 900ms ease;
}

.hour-marker.active {
  background: rgba(255, 213, 79, 0.52);
  box-shadow: 0 18px 45px rgba(255, 213, 79, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateX(10px);
}

.hour-marker.active path {
  stroke-dashoffset: 0;
}

.scene-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120vh;
  background: radial-gradient(circle at 52% 48%, rgba(255, 213, 79, 0.8), rgba(255, 138, 101, 0.26) 34%, rgba(100, 181, 246, 0.34) 70%);
}

.scene {
  position: absolute;
  inset: clamp(2rem, 7vw, 7rem);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 600ms ease;
  filter: blur(8px);
}

.scene.active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.scene p {
  align-self: end;
  max-width: 560px;
  padding: 18px 24px;
  border-radius: 999px;
  background: rgba(245, 247, 250, 0.56);
  color: #3E2723;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
  text-align: center;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.prism-divider {
  left: 40%;
}

.sun-orb,
.prism-core,
.soft-moon,
.bubble-illustration {
  position: absolute;
  width: min(44vw, 430px);
  height: min(44vw, 430px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 213, 79, 0.42) 38%, rgba(100, 181, 246, 0.12) 100%);
  box-shadow: inset 0 -18px 35px rgba(62, 39, 35, 0.08), 0 28px 80px rgba(100, 181, 246, 0.24);
}

.prism-core {
  border-radius: 34% 66% 48% 52%;
  background: conic-gradient(from 120deg, #64B5F6, #F48FB1, #FFD54F, #81C784, #64B5F6);
  opacity: 0.78;
  animation: slowSpin 18s linear infinite;
}

.soft-moon {
  width: min(36vw, 350px);
  height: min(36vw, 350px);
  background: radial-gradient(circle at 32% 30%, #F5F7FA 0%, rgba(244, 143, 177, 0.38) 46%, rgba(26, 35, 126, 0.24) 100%);
}

.leaf,
.pill-art,
.ray {
  position: absolute;
  display: block;
}

.leaf {
  width: 180px;
  height: 54px;
  border-radius: 100% 0 100% 0;
  background: rgba(129, 199, 132, 0.32);
  filter: blur(1px);
}

.leaf-a { transform: translate(-150px, -120px) rotate(-30deg); }
.leaf-b { transform: translate(160px, 80px) rotate(35deg); }

.ray {
  width: 55vw;
  height: 12vw;
  background: linear-gradient(90deg, rgba(245, 247, 250, 0), rgba(245, 247, 250, 0.18), rgba(245, 247, 250, 0));
  filter: blur(12px);
}

.ray-a { transform: rotate(24deg); }
.ray-b { transform: rotate(-32deg); }

.pill-art {
  width: 260px;
  height: 82px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(244, 143, 177, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 20px 50px rgba(255, 138, 101, 0.22);
}

.pill-one { transform: translate(-110px, -80px) rotate(-14deg); }
.pill-two { transform: translate(120px, 82px) rotate(18deg); background: rgba(100, 181, 246, 0.52); }

.afternoon {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, #FFD54F 0%, #FF8A65 50%, #F48FB1 100%);
}

.haiku {
  position: relative;
  z-index: 8;
  color: #F5F7FA;
  font-family: "Outfit", "Noto Sans JP", system-ui, sans-serif;
  font-size: clamp(3rem, 8vw, 9rem);
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow: 0 20px 55px rgba(62, 39, 35, 0.18), 0 0 30px rgba(255, 213, 79, 0.38);
}

.rays {
  position: absolute;
  inset: -20%;
  animation: slowSpin 80s linear infinite;
}

.rays span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80vw;
  height: 7vw;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(245, 247, 250, 0.08), transparent);
  filter: blur(10px);
}

.rays span:nth-child(1) { transform: rotate(0deg); }
.rays span:nth-child(2) { transform: rotate(45deg); }
.rays span:nth-child(3) { transform: rotate(90deg); }
.rays span:nth-child(4) { transform: rotate(135deg); }
.rays span:nth-child(5) { transform: rotate(180deg); }
.rays span:nth-child(6) { transform: rotate(225deg); }
.rays span:nth-child(7) { transform: rotate(270deg); }
.rays span:nth-child(8) { transform: rotate(315deg); }

.floating-pills i {
  position: absolute;
  z-index: 3;
  width: clamp(90px, 14vw, 210px);
  height: clamp(34px, 5vw, 74px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(245, 247, 250, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 22px 48px rgba(62, 39, 35, 0.13);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  animation: pillDrift 16s ease-in-out infinite alternate;
}

.floating-pills i:nth-child(1) { left: 8%; top: 14%; background: rgba(100, 181, 246, 0.36); }
.floating-pills i:nth-child(2) { right: 10%; top: 20%; background: rgba(244, 143, 177, 0.4); animation-delay: -4s; }
.floating-pills i:nth-child(3) { left: 16%; bottom: 16%; background: rgba(129, 199, 132, 0.34); animation-delay: -8s; }
.floating-pills i:nth-child(4) { right: 18%; bottom: 12%; background: rgba(255, 213, 79, 0.36); animation-delay: -2s; }
.floating-pills i:nth-child(5) { left: 46%; top: 9%; background: rgba(245, 247, 250, 0.3); animation-delay: -6s; }
.floating-pills i:nth-child(6) { left: 42%; bottom: 8%; background: rgba(255, 138, 101, 0.28); animation-delay: -10s; }

.evening {
  background: linear-gradient(135deg, #F48FB1 0%, #FF8A65 36%, #1A237E 100%);
}

.evening-grid {
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 8vw, 10rem);
  align-items: center;
  justify-items: center;
  padding: clamp(2rem, 7vw, 8rem);
}

.evening-card {
  position: relative;
  z-index: 4;
  width: min(460px, 82vw);
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 42px;
  text-align: center;
}

.evening-card span {
  color: rgba(26, 35, 126, 0.72);
  font-family: "Outfit", "Inter", system-ui, sans-serif;
  font-size: clamp(4rem, 11vw, 11rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.evening-card p {
  color: rgba(62, 39, 35, 0.72);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.bubble-stream {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #64B5F6, #F48FB1, #FF8A65);
  box-shadow: 0 0 24px rgba(245, 247, 250, 0.42);
}

.night {
  min-height: 50vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #1A237E 0%, #3E2723 100%);
}

.night-drop {
  position: absolute;
  width: clamp(130px, 20vw, 260px);
  height: clamp(130px, 20vw, 260px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #F5F7FA 0%, rgba(100, 181, 246, 0.58) 36%, rgba(26, 35, 126, 0.18) 100%);
  box-shadow: inset 0 -18px 36px rgba(62, 39, 35, 0.18), 0 0 65px rgba(100, 181, 246, 0.42);
  opacity: 0.8;
}

.tomorrow {
  position: relative;
  z-index: 2;
  color: #F5F7FA;
  font-family: "Outfit", "Inter", system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 3s ease, transform 3s ease;
}

.night.in-view .tomorrow {
  opacity: 1;
  transform: translateY(0);
}

.bubble-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  left: var(--x);
  bottom: -90px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: var(--opacity);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, rgba(100, 181, 246, 0.2) 40%, rgba(100, 181, 246, 0.05) 100%);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.05), 0 2px 12px rgba(100, 181, 246, 0.2);
  animation: rise var(--duration) linear var(--delay) infinite, wobble calc(var(--duration) * 0.45) ease-in-out var(--delay) infinite alternate;
}

.downward .bubble {
  top: -90px;
  bottom: auto;
  animation-name: fall, wobble;
}

@keyframes rise {
  0% { transform: translate3d(0, 0, 0) scale(var(--scale)); }
  100% { transform: translate3d(0, -115vh, 0) scale(var(--scale)); }
}

@keyframes fall {
  0% { transform: translate3d(0, 0, 0) scale(var(--scale)); }
  100% { transform: translate3d(0, 115vh, 0) scale(var(--scale)); }
}

@keyframes wobble {
  0% { margin-left: calc(var(--wobble) * -1); }
  100% { margin-left: var(--wobble); }
}

@keyframes pulse {
  from { opacity: 0.62; filter: blur(0); }
  to { opacity: 1; filter: blur(0.6px); }
}

@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.015); }
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

@keyframes pillDrift {
  0% { transform: translate3d(-12px, 10px, 0) rotate(-5deg); }
  100% { transform: translate3d(28px, -24px, 0) rotate(7deg); }
}

@media (max-width: 768px) {
  .phase-indicator {
    top: 14px;
    right: 14px;
    min-width: 0;
  }

  .dawn-grid,
  .prism-grid,
  .evening-grid,
  .merge-stage {
    grid-template-columns: 1fr !important;
  }

  .split-cell,
  .timeline-panel,
  .scene-panel {
    min-height: 50vh;
  }

  .vertical-divider,
  .merge-divider,
  .bubble-stream {
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    width: 100%;
    height: 2px;
    transform: none;
    background: linear-gradient(90deg, #FF8A65, #F48FB1, #64B5F6);
  }

  .hero-word {
    font-size: clamp(5rem, 22vw, 9rem);
  }

  .timeline-panel {
    padding-top: 82px;
  }

  .hour-marker {
    grid-template-columns: 74px 1fr;
  }

  .scene {
    inset: 1rem;
  }

  .evening-grid {
    min-height: 100vh;
    gap: 1rem;
  }

  .evening-card {
    min-height: 220px;
  }
}
