@import url("https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --night: #071d4d;
  --sky: #0a3487;
  --blue: #6595ee;
  --powder: #cfe2ff;
  --cloud: #f8fbff;
  --pink: #f28aa4;
  --gold: #ffd9a0;
  --ink: #102a56;
  --display: "Outfit", "Noto Sans KR", system-ui, sans-serif;
  --body: "Gowun Dodum", "Noto Sans KR", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--cloud);
  background: var(--night);
  font-family: var(--body);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

.sound-toggle {
  position: fixed;
  z-index: 140;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: var(--cloud);
  background: linear-gradient(145deg, rgba(14, 54, 127, 0.96), rgba(87, 134, 220, 0.94));
  box-shadow: 0 10px 28px rgba(1, 13, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0) scale(0.92);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

body.audio-started .sound-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.sound-toggle span {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.sound-toggle.is-muted {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(9, 36, 91, 0.88);
}

.sound-toggle.is-muted::after {
  position: absolute;
  width: 23px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(-45deg);
}

.sound-toggle:hover {
  transform: translate3d(0, -2px, 0) scale(1.04);
}

body.story-mode .sound-toggle {
  top: 78px;
  bottom: auto;
}

.world-backdrop {
  position: fixed;
  inset: -2.5%;
  z-index: 0;
  overflow: hidden;
  background: var(--sky);
  will-change: transform;
  transform: translate3d(var(--story-x, 0px), var(--story-y, 0px), 0) scale(var(--story-scale, 1));
  transition: transform 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.world-backdrop > img {
  width: 105%;
  height: 105%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.02);
  transform: translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0) scale(1.025);
  will-change: transform;
  transition: transform 0.18s ease-out;
}

.world-light,
.world-vignette,
.star-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-light {
  background:
    radial-gradient(circle at var(--light-x, 42%) var(--light-y, 42%), rgba(168, 204, 255, 0.17), transparent 27%),
    linear-gradient(90deg, rgba(7, 29, 77, 0.4) 0%, rgba(7, 29, 77, 0.06) 52%, rgba(7, 29, 77, 0.12) 100%);
}

.world-vignette {
  box-shadow: inset 0 0 170px rgba(1, 13, 43, 0.5);
}

.star-dust span {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px #fff;
  animation: twinkle var(--speed) ease-in-out infinite alternate;
}

.star-dust {
  contain: strict;
}

.gift-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 24, 69, 0.5);
  transition: clip-path 1.05s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 1.05s;
  clip-path: circle(150% at 50% 50%);
}

.gift-gate.is-opening {
  clip-path: circle(0% at 50% 49%);
  visibility: hidden;
}

body.gift-locked .world {
  visibility: hidden;
}

body.gift-locked .world-backdrop > img {
  filter: saturate(0.86) brightness(0.88) blur(7px);
  transform: scale(1.05);
}

body.gift-locked .star-dust span,
body.dialog-open .star-dust span,
body.dialog-open .portal,
body.dialog-open .phone-rings {
  animation-play-state: paused;
}

.gift-card {
  width: min(650px, 94vw);
  text-align: center;
  filter: drop-shadow(0 32px 80px rgba(1, 13, 43, 0.38));
}

.gift-card > p {
  margin: 0 0 36px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gift-card h1 {
  margin: 26px 0 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.mini-envelope {
  position: relative;
  width: min(260px, 68vw);
  aspect-ratio: 1.5;
  margin: auto;
  overflow: visible;
  border-radius: 12px;
  filter: drop-shadow(0 24px 26px rgba(1, 13, 43, 0.34));
  perspective: 700px;
  transform: rotate(-3deg);
}

.mini-envelope::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  background: linear-gradient(160deg, #dbe9ff, #c8dcfa);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  content: "";
}

.mini-letter {
  position: absolute;
  z-index: 2;
  inset: 13px 23px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #f2f7ff);
  box-shadow: 0 8px 18px rgba(37, 75, 137, 0.16);
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mini-letter span {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
}

.mini-letter strong {
  color: var(--pink);
  font-size: 1.4rem;
}

.mini-pocket {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: 72%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 0 12px 12px;
  background: linear-gradient(135deg, #f8fbff 0 49.4%, #deebff 50% 100%);
  clip-path: polygon(0 0, 50% 57%, 100% 0, 100% 100%, 0 100%);
}

.mini-pocket::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(225deg, rgba(255, 255, 255, 0.72) 0 49.4%, transparent 50%);
  content: "";
}

.mini-flap {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 66%;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(160deg, #edf4ff, #cbdffc);
  clip-path: polygon(0 0, 100% 0, 50% 86%);
  backface-visibility: hidden;
  transform-origin: top;
  transition: transform 0.65s ease;
}

.mini-envelope i {
  position: absolute;
  z-index: 5;
  top: 52%;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-style: normal;
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.gift-gate.unsealing .mini-flap {
  transform: rotateX(178deg);
}

.gift-gate.unsealing .mini-letter {
  transform: translateY(-30px);
}

.gift-gate.unsealing .mini-envelope i {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.7);
}

.unseal-button {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  padding: 10px 10px 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: var(--ink);
  background: var(--cloud);
  box-shadow: 0 18px 38px rgba(1, 13, 43, 0.25);
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.unseal-button i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-style: normal;
}

.unseal-button:hover {
  box-shadow: 0 22px 48px rgba(1, 13, 43, 0.34);
  transform: translateY(-4px) rotate(-1deg);
}

.unseal-button:active {
  transform: translateY(1px) scale(0.98);
}

/* The first visit is a click-through short film. The hub only appears after its final frame. */
body.story-mode .world {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.story-mode .world-light {
  background:
    radial-gradient(circle at var(--light-x, 48%) var(--light-y, 40%), rgba(168, 204, 255, 0.2), transparent 25%),
    linear-gradient(90deg, rgba(3, 20, 61, 0.62) 0%, rgba(5, 33, 89, 0.2) 54%, rgba(2, 16, 52, 0.35) 100%);
}

body[data-story-step="0"] { --story-x: 4vw; --story-y: 1vh; --story-scale: 1.12; }
body[data-story-step="1"] { --story-x: -2vw; --story-y: 2vh; --story-scale: 1.17; }
body[data-story-step="2"] { --story-x: 5vw; --story-y: -2vh; --story-scale: 1.15; }
body[data-story-step="3"] { --story-x: -4vw; --story-y: 0vh; --story-scale: 1.1; }
body[data-story-step="4"] { --story-x: -7vw; --story-y: -4vh; --story-scale: 1.2; }
body[data-story-step="5"] { --story-x: 0vw; --story-y: 0vh; --story-scale: 1.025; }

.story-reel {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  color: #fff;
  contain: layout paint;
  isolation: isolate;
}

.story-reel[hidden] {
  display: none;
}

.story-reel.is-finishing {
  opacity: 0;
  transform: scale(1.035);
  pointer-events: none;
  transition: opacity 0.58s ease, transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-reel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(1, 15, 48, 0.46), rgba(5, 35, 94, 0.06) 56%, rgba(2, 17, 55, 0.22));
  content: "";
}

.story-grain {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.story-header {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  min-height: 84px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px clamp(22px, 4vw, 64px);
}

.story-mark {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
}

.story-mark i {
  color: var(--pink);
  font-style: normal;
}

.story-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--display);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
}

.story-progress-track {
  width: min(18vw, 180px);
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.story-progress-track i {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #fff);
  box-shadow: 0 0 12px #fff;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-skip {
  justify-self: end;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.story-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  contain: layout paint;
}

.story-step {
  position: absolute;
  inset: 84px clamp(24px, 6vw, 92px) 108px;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  pointer-events: none;
  will-change: opacity, transform;
}

.story-step[hidden] {
  display: none;
}

.story-step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  animation: story-step-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.story-step.is-leaving {
  display: grid;
  opacity: 0;
  transform: translateY(-22px) scale(1.01);
  transition: opacity 0.3s ease, transform 0.44s ease;
}

.story-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-kicker i {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.story-lead {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(0.9rem, 1.3vw, 1.12rem);
  line-height: 1.7;
}

.story-whisper {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.story-names {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding-left: 5vw;
}

.story-names .story-lead {
  width: min(520px, 52vw);
  margin: 24px 0 16px;
}

.story-name-sequence {
  display: flex;
  align-items: flex-end;
  gap: clamp(32px, 5.5vw, 90px);
  margin: 1vh 0 3vh;
}

.story-name-sequence > span {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  opacity: 0;
  transform: translateY(28px);
  animation: name-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.story-name-sequence > span:nth-child(2) { animation-delay: 0.32s; }
.story-name-sequence > span:nth-child(3) { animation-delay: 0.64s; }

.story-name-sequence small {
  order: 2;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.story-name-sequence strong {
  font-family: var(--display);
  font-size: clamp(4.2rem, 9vw, 9.5rem);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.07em;
  text-shadow: 0 12px 42px rgba(1, 13, 43, 0.3);
}

.story-name-sequence > span:nth-child(2) strong { color: var(--powder); }
.story-name-sequence > span:nth-child(3) strong { color: #fff2dc; }

.story-things {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 7vw;
}

.story-things-copy h2,
.story-photo-copy h2,
.story-call-copy h2,
.story-finale h2 {
  margin: 12px 0 22px;
  font-family: var(--display);
  font-size: clamp(3rem, 5.6vw, 6.3rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.story-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.story-facts > span {
  display: grid;
  min-height: 104px;
  grid-template-columns: auto 1fr;
  align-content: center;
  padding: 17px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 57, 126, 0.72), rgba(6, 38, 100, 0.54));
  box-shadow: 0 16px 32px rgba(1, 13, 43, 0.16);
  opacity: 0;
  transform: translateY(14px);
  animation: fact-arrive 0.55s ease forwards;
}

.story-facts > span:nth-child(2) { animation-delay: 0.1s; }
.story-facts > span:nth-child(3) { animation-delay: 0.2s; }
.story-facts > span:nth-child(4) { animation-delay: 0.3s; }
.story-facts > span:nth-child(5) { animation-delay: 0.4s; }
.story-facts > span:nth-child(6) { animation-delay: 0.5s; }

.story-facts i {
  grid-row: 1 / 3;
  align-self: center;
  margin-right: 14px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.55rem;
  font-style: normal;
}

.story-facts strong {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
}

.story-facts .story-fact-size strong {
  font-size: clamp(0.96rem, 1.35vw, 1.22rem);
  white-space: nowrap;
}

.story-facts small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.66rem;
}

.story-photo {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) 1.28fr;
  align-items: center;
  gap: 8vw;
}

.story-photo .story-kicker {
  position: absolute;
  top: 2vh;
  left: 0;
}

.story-polaroid {
  position: relative;
  width: min(360px, 32vw);
  margin: 0;
  justify-self: end;
  padding: 13px 13px 42px;
  color: var(--ink);
  background: #f8fbff;
  box-shadow: 0 30px 70px rgba(1, 13, 43, 0.34);
  transform: rotate(-4deg);
  animation: polaroid-drop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.story-polaroid > span {
  position: absolute;
  z-index: 2;
  top: -16px;
  left: 50%;
  width: 94px;
  height: 30px;
  background: rgba(255, 224, 181, 0.82);
  transform: translateX(-50%) rotate(3deg);
}

.story-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 0.82;
  object-fit: cover;
  object-position: right center;
}

.story-polaroid figcaption {
  padding-top: 16px;
  text-align: center;
  font-size: 0.76rem;
}

.story-photo-copy {
  width: min(650px, 50vw);
}

.story-photo-copy > p:last-child,
.story-call-copy > p:last-child,
.story-finale > p {
  color: rgba(255, 255, 255, 0.69);
  line-height: 1.7;
}

.story-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.story-letter .story-kicker {
  position: absolute;
  top: 2vh;
  left: 0;
}

.story-paper-plane {
  position: absolute;
  top: 14%;
  right: 12%;
  color: var(--gold);
  font-size: 2.4rem;
  filter: drop-shadow(0 0 18px rgba(255, 217, 160, 0.6));
  animation: plane-glide 4s ease-in-out infinite alternate;
}

.story-letter blockquote {
  max-width: 1030px;
  margin: 0;
}

.story-letter blockquote p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.2vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.story-letter blockquote p:last-child {
  margin-top: 8px;
  color: var(--powder);
  font-style: italic;
}

.story-letter-detail {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 30px 0 22px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-letter-detail i {
  color: var(--gold);
  font-style: normal;
}

.story-call {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: center;
  gap: 8vw;
}

.story-call .story-kicker {
  position: absolute;
  top: 2vh;
  left: 0;
}

.story-phone {
  position: relative;
  display: grid;
  width: clamp(190px, 23vw, 310px);
  aspect-ratio: 1;
  justify-self: end;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(15, 57, 126, 0.72), rgba(6, 38, 100, 0.56));
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.05), 0 0 80px rgba(207, 226, 255, 0.24);
}

.story-phone span {
  display: grid;
  width: 58%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 0 54px rgba(242, 138, 164, 0.62);
  font-size: clamp(3.3rem, 7vw, 6rem);
  animation: phone-nudge 2.7s ease-in-out infinite;
}

.story-phone i,
.story-phone b {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  animation: call-wave 2.4s ease-out infinite;
}

.story-phone b {
  animation-delay: 0.8s;
}

.story-call-copy h2 em,
.story-finale h2 em {
  color: var(--powder);
  font-style: italic;
}

.story-finale {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.story-finale h2 {
  margin: 10px 0 18px;
  font-size: clamp(4rem, 7.4vw, 8rem);
}

.finale-heart {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(8, 46, 112, 0.35);
  box-shadow: 0 0 44px rgba(255, 255, 255, 0.15);
}

.finale-heart span {
  color: var(--pink);
  font-size: 3rem;
  animation: heart-beat 1.8s ease-in-out infinite;
}

.finale-heart i {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: guide-ring 1.8s ease-out infinite;
}

.story-signoff {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.story-signoff span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-signoff strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.15rem;
}

.story-controls {
  position: absolute;
  z-index: 9;
  right: clamp(22px, 4vw, 64px);
  bottom: 22px;
  left: clamp(22px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.story-controls > p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.story-controls > p span {
  color: var(--gold);
  animation: twinkle 1.4s ease-in-out infinite alternate;
}

.story-next {
  display: flex;
  min-width: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 9px 9px 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 16px 44px rgba(1, 13, 43, 0.28);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-next i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-style: normal;
}

.story-next:hover {
  box-shadow: 0 20px 52px rgba(1, 13, 43, 0.35), 0 0 28px rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.story-next:active {
  transform: scale(0.98);
}

@keyframes story-step-in {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes name-rise {
  to { opacity: 1; transform: none; }
}

@keyframes fact-arrive {
  to { opacity: 1; transform: none; }
}

@keyframes polaroid-drop {
  from { opacity: 0; transform: translateY(-70px) rotate(-10deg) scale(0.88); }
  to { opacity: 1; transform: rotate(-4deg); }
}

@keyframes plane-glide {
  from { transform: translate(-24px, 16px) rotate(-9deg); }
  to { transform: translate(24px, -18px) rotate(5deg); }
}

@keyframes call-wave {
  from { opacity: 0.65; transform: scale(0.82); }
  to { opacity: 0; transform: scale(1.18); }
}

.world {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100dvh;
}

.world-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(20px, 4vw, 64px);
}

.monogram {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-weight: 700;
}

.monogram i {
  color: var(--pink);
  font-style: normal;
}

.seoul-time {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(7, 29, 77, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seoul-time span {
  color: rgba(255, 255, 255, 0.58);
}

.seoul-time strong {
  font-family: var(--display);
}

.world-copy {
  position: absolute;
  z-index: 5;
  top: clamp(110px, 17vh, 190px);
  left: clamp(24px, 5.4vw, 88px);
  width: min(480px, 41vw);
  text-shadow: 0 3px 22px rgba(2, 20, 59, 0.25);
}

.world-copy > p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 6vw, 6.6rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.06em;
}

.world-copy h2 em {
  display: inline-block;
  padding-bottom: 0.08em;
  color: var(--powder);
  font-style: italic;
  transform: rotate(-2deg);
}

.world-copy > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.world-copy > span::before {
  content: "✦";
  color: var(--gold);
}

.portal {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, rgba(20, 59, 126, 0.76), rgba(7, 29, 77, 0.66));
  box-shadow: 0 12px 34px rgba(1, 13, 43, 0.2), inset 0 0 18px rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.portal::before {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  content: "";
  animation: portal-breathe 2.4s ease-in-out infinite;
}

.portal:hover {
  z-index: 12;
  background: rgba(32, 80, 161, 0.68);
  box-shadow: 0 16px 44px rgba(1, 13, 43, 0.28), 0 0 26px rgba(207, 226, 255, 0.24);
  transform: translate(-50%, -50%) rotate(0) scale(1.08);
}

.portal:active {
  transform: translate(-50%, -50%) scale(0.98);
}

.portal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--cloud);
  box-shadow: 0 0 24px rgba(248, 251, 255, 0.44);
  font-family: var(--display);
  font-size: 1.12rem;
  font-style: normal;
}

.portal-label {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
}

.portal-label small {
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--display);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-label strong {
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
}

.portal-names { --tilt: -3deg; top: 59%; left: 25%; }
.portal-letter { --tilt: 2deg; top: 29%; left: 77%; }
.portal-favorites { --tilt: -2deg; top: 84%; left: 68%; }
.portal-photo { --tilt: 3deg; top: 84%; left: 14%; }
.portal-call { --tilt: 1deg; top: 77%; left: 89%; }
.portal-secret { --tilt: -2deg; top: 14%; left: 75%; }

.portal-call {
  border-color: rgba(255, 217, 160, 0.72);
  background: rgba(44, 72, 132, 0.72);
}

.portal-call .portal-icon {
  color: #fff;
  background: var(--pink);
  box-shadow: 0 0 30px rgba(242, 138, 164, 0.58);
  animation: phone-nudge 2.7s ease-in-out infinite;
}

.phone-rings {
  position: absolute;
  left: 4px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  animation: phone-rings 2.7s ease-out infinite;
}

.portal-secret .portal-icon {
  color: #fff;
  background: var(--pink);
}

.sky-guide {
  position: absolute;
  z-index: 48;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: min(440px, calc(100vw - 36px));
  transform: translateX(-50%);
  animation: guide-arrive 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sky-guide[hidden] {
  display: none;
}

.sky-guide[data-target="call"],
.sky-guide[data-target="favorites"] {
  left: 28px;
  transform: none;
}

.sky-guide[data-target="photo"] {
  right: 28px;
  left: auto;
  transform: none;
}

.guide-mascot {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 48% 52% 46% 54%;
  color: var(--gold);
  background: linear-gradient(145deg, rgba(22, 65, 138, 0.92), rgba(7, 29, 77, 0.88));
  box-shadow: 0 0 28px rgba(207, 226, 255, 0.34);
  animation: mascot-float 2.1s ease-in-out infinite alternate;
}

.guide-mascot span {
  font-size: 1.55rem;
}

.guide-mascot i {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-size: 0.72rem;
  font-style: normal;
}

.guide-bubble {
  position: relative;
  flex: 1;
  padding: 14px 16px 13px;
  border: 1px solid rgba(255, 255, 255, 0.43);
  border-radius: 18px 18px 18px 5px;
  color: var(--ink);
  background: rgba(248, 251, 255, 0.985);
  box-shadow: 0 18px 48px rgba(1, 13, 43, 0.28);
}

.guide-bubble small {
  color: #6680a8;
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.guide-bubble p {
  min-height: 39px;
  margin: 5px 0 9px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guide-actions button {
  border: 0;
  cursor: pointer;
  font-size: 0.7rem;
}

#guideSkip {
  padding: 6px 0;
  color: #6c82a4;
  background: transparent;
}

#guideNext {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
}

#guideNext span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
}

.portal.guide-target {
  z-index: 46;
  border-color: #fff;
  background: rgba(49, 95, 174, 0.82);
  box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.16), 0 0 52px rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%) rotate(0) scale(1.14);
}

.portal.guide-target::before {
  border-color: #fff;
  animation: guide-ring 1.15s ease-out infinite;
}

.guide-reopen {
  position: absolute;
  z-index: 22;
  left: 24px;
  bottom: 21px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, rgba(20, 59, 126, 0.82), rgba(7, 29, 77, 0.76));
  cursor: pointer;
  font-size: 0.68rem;
}

.guide-reopen[hidden] {
  display: none;
}

.guide-reopen span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}

.world-signature {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.mobile-dock {
  display: none;
}

.dialog-curtain {
  position: fixed;
  z-index: 118;
  inset: 0;
  background: rgba(2, 16, 48, 0.76);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

body.dialog-open .dialog-curtain {
  opacity: 1;
}

.portal-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: min(88dvh, 860px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(248, 251, 255, 0.985), rgba(235, 242, 253, 0.98));
  box-shadow: 0 36px 110px rgba(1, 13, 43, 0.52);
  transform: translateZ(0);
  contain: paint;
}

.portal-dialog.is-animating {
  will-change: transform, opacity;
}

.portal-dialog::backdrop {
  background: transparent;
}

.portal-dialog.is-prewarming {
  position: fixed;
  top: 0;
  left: -200vw;
  display: block;
  visibility: hidden;
  pointer-events: none;
  transform: none;
}

.portal-dialog.is-prewarming *,
.portal-dialog.is-animating .fact-pill {
  animation-play-state: paused !important;
}

.dialog-close {
  position: sticky;
  z-index: 20;
  top: 16px;
  float: right;
  display: grid;
  width: 42px;
  height: 42px;
  margin: 16px 16px 0 0;
  place-items: center;
  border: 1px solid rgba(16, 42, 86, 0.14);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 9px 24px rgba(16, 42, 86, 0.11);
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease;
}

.dialog-close:hover {
  background: #fff;
  transform: rotate(8deg) scale(1.06);
}

.dialog-heading {
  padding: 58px clamp(28px, 6vw, 70px) 24px;
}

.dialog-heading > span,
.favorites-heading > span,
.photo-modal-copy > span,
.call-modal-heading small {
  color: #476cae;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dialog-heading h2,
.favorites-heading h2,
.photo-modal-copy h2,
.folded-letter h2,
.call-modal-heading h2,
.secret-dialog h2 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.dialog-heading h2 {
  font-size: clamp(3.3rem, 7vw, 6rem);
}

.name-switcher {
  display: flex;
  gap: 8px;
  padding: 0 clamp(28px, 6vw, 70px);
}

.name-tab {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #bdd0ee;
  border-radius: 14px 14px 0 0;
  color: #5d78a3;
  background: #eaf2ff;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.name-tab:hover {
  transform: translateY(-3px);
}

.name-tab.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.name-stage {
  min-height: 340px;
  margin: 0 clamp(28px, 6vw, 70px) 60px;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 0 0 22px 22px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(242, 138, 164, 0.25), transparent 24%),
    #396dbd;
  box-shadow: 0 24px 54px rgba(49, 95, 174, 0.2);
}

.name-view {
  animation: name-swap 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.name-view[hidden] {
  display: none;
}

.name-view small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.name-view strong {
  display: block;
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(4.5rem, 12vw, 9.4rem);
  line-height: 0.77;
  letter-spacing: -0.065em;
}

.name-view p {
  max-width: 36rem;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.03rem;
}

.name-view span {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.favorites-dialog {
  min-height: min(780px, 88dvh);
  background:
    radial-gradient(circle at 72% 55%, rgba(95, 143, 232, 0.22), transparent 36%),
    rgba(238, 245, 255, 0.96);
}

.favorites-heading {
  max-width: 520px;
  padding: 62px 54px 0;
}

.favorites-heading h2 {
  font-size: clamp(3.2rem, 6vw, 5.6rem);
}

.favorites-heading p {
  max-width: 34rem;
  margin: 18px 0 0;
  color: #5c759c;
}

.fact-orbit {
  position: relative;
  width: min(660px, 82vw);
  aspect-ratio: 1.5;
  margin: 8px 30px 24px auto;
}

.fact-core {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  width: 196px;
  height: 196px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 26px 60px rgba(49, 95, 174, 0.28);
  transform: translate(-50%, -50%);
}

.fact-core small {
  font-size: 0.7rem;
}

.fact-core strong {
  font-family: var(--display);
  font-size: 3.9rem;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.orbit-line {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(49, 95, 174, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-a { width: 68%; height: 70%; }
.orbit-b { width: 95%; height: 92%; border-style: solid; opacity: 0.54; }

.fact-pill {
  position: absolute;
  z-index: 4;
  display: flex;
  min-width: 145px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(95, 143, 232, 0.19);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(49, 95, 174, 0.13);
  animation: fact-float 3.8s ease-in-out infinite alternate;
}

.fact-pill > i {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: #e3edff;
  font-style: normal;
}

.fact-pill > span {
  display: flex;
  flex-direction: column;
}

.fact-pill small {
  color: #7288ac;
  font-size: 0.6rem;
}

.fact-pill strong {
  font-family: var(--display);
  font-size: 0.9rem;
}

.fact-summer { top: 2%; left: 39%; }
.fact-food { top: 28%; right: 0; animation-delay: -1s; }
.fact-mbti { right: 7%; bottom: 2%; animation-delay: -2s; }
.fact-birthday { bottom: 0; left: 13%; animation-delay: -0.6s; }
.fact-size { top: 34%; left: 0; animation-delay: -1.6s; }

.birthday-count {
  margin: -8px 54px 44px;
  color: #496a9e;
  font-family: var(--display);
  font-size: 0.9rem;
  text-align: right;
}

.photo-dialog {
  background: rgba(238, 245, 255, 0.96);
}

.photo-modal-grid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: clamp(38px, 6vw, 76px);
  min-height: 620px;
  padding: 64px clamp(32px, 6vw, 72px);
}

.modal-polaroid {
  position: relative;
  margin: 0;
  padding: 14px 14px 62px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(49, 95, 174, 0.25);
  transform: rotate(-2.4deg);
}

.modal-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1.05;
  object-fit: cover;
  object-position: right center;
  border-radius: 3px;
}

.modal-tape {
  position: absolute;
  z-index: 2;
  top: -17px;
  left: 50%;
  width: 124px;
  height: 35px;
  background: rgba(190, 215, 255, 0.75);
  transform: translateX(-50%) rotate(2deg);
}

.modal-polaroid > i {
  position: absolute;
  right: 20px;
  bottom: 70px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 8px 20px rgba(242, 138, 164, 0.25);
  font-family: var(--display);
  font-size: 0.65rem;
  font-style: normal;
  transform: rotate(-4deg);
}

.modal-polaroid figcaption {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
  color: #657da4;
  font-size: 0.76rem;
  text-align: center;
}

.photo-modal-copy h2 {
  font-size: clamp(3rem, 5.7vw, 5.5rem);
}

.photo-modal-copy p {
  margin: 24px 0 0;
  color: #5b7399;
  line-height: 1.65;
}

.photo-modal-copy strong {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(49, 95, 174, 0.32);
  color: #416bb1;
}

.letter-dialog {
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.16), transparent 24%),
    rgba(72, 117, 195, 0.93);
}

.folded-letter {
  position: relative;
  margin: 70px clamp(30px, 8vw, 100px) 24px;
  padding: clamp(38px, 7vw, 74px);
  border-radius: 13px;
  color: var(--ink);
  background: var(--cloud);
  box-shadow: 0 32px 72px rgba(1, 13, 43, 0.3);
  transform: rotate(-0.7deg);
}

.folded-letter::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 49.5%, rgba(49, 95, 174, 0.05) 50%, transparent 50.5%);
}

.letter-tape {
  position: absolute;
  z-index: 2;
  top: -16px;
  left: 50%;
  width: 128px;
  height: 33px;
  background: rgba(200, 220, 255, 0.82);
  transform: translateX(-50%) rotate(2deg);
}

.folded-letter > p:first-of-type {
  margin: 0 0 20px;
  color: var(--pink);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
}

.folded-letter h2 {
  max-width: 690px;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
}

.letter-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 34px;
}

.letter-columns p {
  margin: 0;
  color: #536f99;
  line-height: 1.7;
}

.folded-letter footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid #d0dff4;
}

.folded-letter footer span {
  color: #7187a8;
  font-size: 0.76rem;
}

.folded-letter footer strong {
  color: #416bb1;
  font-family: var(--display);
  font-size: 1.8rem;
}

.letter-whisper {
  margin: 0 0 38px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.call-dialog {
  width: min(980px, calc(100vw - 36px));
  background:
    radial-gradient(circle at 88% 12%, rgba(242, 138, 164, 0.16), transparent 26%),
    rgba(244, 248, 255, 0.97);
}

.call-modal-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 58px clamp(28px, 6vw, 70px) 28px;
}

.call-bubble {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 0 #d1e1fa;
  font-size: 1.55rem;
  transform: rotate(-8deg);
}

.call-modal-heading h2 {
  max-width: 710px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
}

.call-modal-heading p {
  margin: 15px 0 0;
  color: #5b739a;
}

.call-planner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 clamp(28px, 6vw, 70px) 54px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #c8d9f1;
  border-radius: 22px;
  background: rgba(233, 242, 255, 0.78);
}

.call-planner[hidden] {
  display: none;
}

.call-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.call-field label,
.call-field legend {
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 700;
}

.call-field > input,
.call-field > select {
  width: 100%;
  height: 51px;
  padding: 0 14px;
  border: 1px solid #b9cce9;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
}

.call-field > small {
  min-height: 18px;
  color: #7086a8;
  font-size: 0.7rem;
}

.duration-field,
.mood-field,
.make-invitation,
.privacy-note {
  grid-column: 1 / -1;
}

.duration-choices,
.mood-choices {
  display: grid;
  gap: 8px;
}

.duration-choices {
  grid-template-columns: repeat(4, 1fr);
}

.mood-choices {
  grid-template-columns: repeat(2, 1fr);
}

.duration-choices label,
.mood-choices label {
  cursor: pointer;
}

.duration-choices input,
.mood-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.duration-choices span,
.mood-choices span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #c3d3eb;
  border-radius: 11px;
  color: #5c7399;
  background: #fff;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.duration-choices input:checked + span,
.mood-choices input:checked + span {
  color: #fff;
  background: var(--blue);
}

.duration-choices label:hover span,
.mood-choices label:hover span {
  transform: translateY(-2px);
}

.duration-choices input:focus-visible + span,
.mood-choices input:focus-visible + span {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

.make-invitation {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
  border: 0;
  border-radius: 20px 20px 50% 20px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 0 #c6d8f3;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.make-invitation i {
  color: var(--pink);
  font-style: normal;
}

.make-invitation:hover {
  box-shadow: 0 14px 0 #c6d8f3;
  transform: translateY(-4px);
}

.make-invitation:active {
  box-shadow: 0 4px 0 #c6d8f3;
  transform: translateY(6px);
}

.privacy-note {
  margin: 0;
  color: #7b90ae;
  font-size: 0.68rem;
  text-align: center;
}

.invitation-result[hidden] {
  display: none;
}

.invitation-result {
  padding: 4px clamp(28px, 6vw, 70px) 54px;
  animation: result-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.invitation-ticket {
  padding: clamp(26px, 5vw, 48px);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 12%, rgba(242, 138, 164, 0.28), transparent 25%),
    #315fae;
  box-shadow: 0 28px 64px rgba(49, 95, 174, 0.28);
}

.invitation-ticket > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.36);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.invitation-ticket > header i {
  color: var(--pink);
  font-size: 1.15rem;
  font-style: normal;
}

.invitation-ticket > p {
  margin: 26px 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.time-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
}

.time-pair div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.time-pair div:last-child {
  text-align: right;
}

.time-pair small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.65rem;
}

.time-pair strong {
  font-family: var(--display);
  font-size: 0.95rem;
}

.time-pair > i {
  color: var(--powder);
  font-style: normal;
}

.invitation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.invitation-actions button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-radius: 11px;
  cursor: pointer;
}

#shareInvitation {
  border: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 5px 5px 0 rgba(7, 29, 77, 0.2);
}

#saveDate {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: transparent;
}

.invitation-actions i {
  font-style: normal;
}

.celebrate-button {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(242, 138, 164, 0.28);
  cursor: pointer;
}

#copyStatus {
  min-height: 16px;
  margin: 10px 0 0;
  color: var(--powder);
  font-size: 0.7rem;
  text-align: center;
}

.change-time {
  display: block;
  margin: 18px auto 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #8da6cc;
  color: #5a739b;
  background: transparent;
  cursor: pointer;
}

.secret-dialog {
  width: min(660px, calc(100vw - 36px));
  min-height: min(620px, 86dvh);
  padding: 76px 30px 50px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(95, 143, 232, 0.46), transparent 37%),
    rgba(7, 29, 77, 0.96);
}

.secret-dialog::before,
.secret-dialog::after {
  position: absolute;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.secret-dialog::before { top: -150px; left: -100px; }
.secret-dialog::after { right: -140px; bottom: -130px; }

.secret-dialog .dialog-close {
  position: absolute;
  right: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.secret-stars {
  margin-bottom: 36px;
  color: var(--gold);
  letter-spacing: 0.2em;
}

.secret-dialog > p {
  margin: 0 0 22px;
  color: var(--powder);
}

.secret-dialog h2 {
  font-size: clamp(4.2rem, 11vw, 7.8rem);
  line-height: 0.76;
}

.secret-dialog h2 em {
  display: inline-block;
  padding-bottom: 0.12em;
  color: var(--pink);
  font-style: italic;
  transform: rotate(-3deg);
}

.secret-call {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin-top: 38px;
  padding: 11px 11px 11px 22px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 34px rgba(1, 13, 43, 0.25);
  cursor: pointer;
}

.secret-call span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 500;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  animation: confetti-fall var(--fall-time) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

@keyframes twinkle {
  from { opacity: 0.18; transform: scale(0.7); }
  to { opacity: 0.9; transform: scale(1.18); }
}

@keyframes portal-breathe {
  0%, 100% { opacity: 0; transform: scale(0.92); }
  50% { opacity: 0.7; transform: scale(1.12); }
}

@keyframes guide-arrive {
  from { opacity: 0; transform: translate(-50%, 22px) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes guide-arrive-mobile {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mascot-float {
  from { transform: translateY(-3px) rotate(-3deg); }
  to { transform: translateY(5px) rotate(3deg); }
}

@keyframes guide-ring {
  from { opacity: 0.9; transform: scale(0.92); }
  to { opacity: 0; transform: scale(1.4); }
}

@keyframes phone-nudge {
  0%, 82%, 100% { transform: rotate(0); }
  86% { transform: rotate(-9deg); }
  90% { transform: rotate(8deg); }
  94% { transform: rotate(-5deg); }
}

@keyframes phone-rings {
  0%, 76% { opacity: 0; transform: scale(0.85); }
  82% { opacity: 0.8; }
  100% { opacity: 0; transform: scale(1.7); }
}

@keyframes name-swap {
  from { transform: translateX(22px) rotate(1deg); }
  to { transform: translateX(0) rotate(0); }
}

@keyframes fact-float {
  from { transform: translateY(-3px) rotate(-1deg); }
  to { transform: translateY(5px) rotate(1deg); }
}

@keyframes result-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confetti-fall {
  from { transform: translate3d(0, -10px, 0) rotate(0); }
  to { transform: translate3d(var(--drift), 105dvh, 0) rotate(var(--spin)); }
}

@media (max-width: 980px) {
  .world-copy {
    width: min(500px, 54vw);
  }

  .world-copy h2 {
    font-size: clamp(3rem, 7.2vw, 5.5rem);
  }

  .portal-label {
    display: none;
  }

  .portal {
    padding: 6px;
  }

  .photo-modal-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

@media (max-width: 760px) {
  .sound-toggle {
    right: 16px;
    bottom: 104px;
    width: 40px;
    height: 40px;
  }

  body.story-mode .sound-toggle {
    top: 76px;
    bottom: auto;
  }

  .world-backdrop {
    inset: -1%;
  }

  .world-backdrop > img {
    width: 102%;
    height: 102%;
    object-position: 72% center;
  }

  .world-light {
    background: linear-gradient(180deg, rgba(7, 29, 77, 0.08), rgba(7, 29, 77, 0.52));
  }

  .world-vignette {
    box-shadow: inset 0 0 90px rgba(1, 13, 43, 0.38);
  }

  .gift-card h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .gift-card > p {
    line-height: 1.5;
  }

  .world-header {
    min-height: 64px;
    padding-inline: 18px;
  }

  .world-copy {
    top: 82px;
    left: 20px;
    width: calc(100vw - 40px);
  }

  .world-copy > p {
    margin-bottom: 12px;
    font-size: 0.62rem;
  }

  .world-copy h2 {
    max-width: 340px;
    font-size: clamp(3.1rem, 14.5vw, 4.6rem);
    line-height: 0.85;
  }

  .world-copy > span {
    margin-top: 16px;
  }

  .portal-map {
    display: none;
  }

  .mobile-dock {
    position: absolute;
    z-index: 20;
    right: 12px;
    bottom: 15px;
    left: 12px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    gap: 5px;
    padding: 8px 7px 7px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(18, 56, 124, 0.92), rgba(7, 29, 77, 0.9));
    box-shadow: 0 18px 44px rgba(1, 13, 43, 0.32);
  }

  .mobile-dock button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 4px 2px 2px;
    border: 0;
    color: rgba(255, 255, 255, 0.76);
    background: transparent;
    cursor: pointer;
    font-size: 0.58rem;
  }

  .mobile-dock i {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: var(--ink);
    background: rgba(248, 251, 255, 0.9);
    font-size: 0.95rem;
    font-style: normal;
  }

  .mobile-dock .dock-call {
    color: #fff;
  }

  .mobile-dock .dock-call i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    background: var(--pink);
    box-shadow: 0 0 24px rgba(242, 138, 164, 0.5);
    transform: translateY(-4px);
  }

  .mobile-dock button.guide-target {
    position: relative;
    z-index: 3;
    color: #fff;
  }

  .mobile-dock button.guide-target i {
    color: #fff;
    background: var(--pink);
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18), 0 0 28px rgba(242, 138, 164, 0.72);
    transform: translateY(-5px) scale(1.12);
  }

  .sky-guide {
    right: 12px;
    bottom: 102px;
    left: 12px;
    width: auto;
    transform: none;
    animation: guide-arrive-mobile 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .sky-guide[data-target] {
    right: 12px;
    left: 12px;
    transform: none;
  }

  .guide-mascot {
    width: 54px;
    height: 54px;
  }

  .guide-bubble {
    padding: 12px 13px 11px;
  }

  .guide-bubble p {
    min-height: 34px;
    margin-block: 4px 7px;
    font-size: 0.77rem;
  }

  .guide-reopen {
    bottom: 101px;
    left: 14px;
  }

  .world-signature {
    display: none;
  }

  .portal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .dialog-close {
    top: 12px;
    width: 40px;
    height: 40px;
    margin: 12px 12px 0 0;
  }

  .dialog-heading,
  .favorites-heading {
    padding: 60px 22px 22px;
  }

  .dialog-heading h2,
  .favorites-heading h2 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .name-switcher {
    padding: 0 18px;
  }

  .name-tab {
    padding: 11px 7px;
    font-size: 0.86rem;
  }

  .name-stage {
    min-height: 330px;
    margin: 0 18px 24px;
    padding: 30px 24px;
  }

  .name-view strong {
    font-size: clamp(4.2rem, 23vw, 6.6rem);
  }

  .fact-orbit {
    display: grid;
    width: auto;
    aspect-ratio: auto;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 16px 18px 28px;
  }

  .fact-core {
    position: relative;
    top: auto;
    left: auto;
    width: 175px;
    height: 175px;
    grid-column: 1 / -1;
    justify-self: center;
    margin-bottom: 10px;
    transform: none;
  }

  .orbit-line {
    display: none;
  }

  .fact-pill {
    position: relative;
    inset: auto;
    min-width: 0;
    border-radius: 15px;
    animation: none;
  }

  .fact-birthday {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(230px, 100%);
  }

  .birthday-count {
    margin: 0 22px 32px;
    text-align: center;
  }

  .photo-modal-grid {
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 68px 20px 42px;
  }

  .modal-polaroid {
    width: min(340px, 100%);
    justify-self: center;
  }

  .photo-modal-copy {
    text-align: center;
  }

  .photo-modal-copy h2 {
    font-size: clamp(2.9rem, 13vw, 4.4rem);
  }

  .folded-letter {
    margin: 62px 16px 24px;
    padding: 42px 24px;
  }

  .folded-letter h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .letter-columns {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .folded-letter footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .letter-whisper {
    padding: 0 20px;
  }

  .call-modal-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 58px 20px 24px;
  }

  .call-bubble {
    width: 56px;
    height: 56px;
  }

  .call-modal-heading h2 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .call-planner {
    grid-template-columns: 1fr;
    margin: 0 16px 28px;
    padding: 22px 16px 28px;
  }

  .duration-field,
  .mood-field,
  .make-invitation,
  .privacy-note {
    grid-column: 1;
  }

  .mood-choices {
    grid-template-columns: 1fr;
  }

  .invitation-result {
    padding: 0 16px 30px;
  }

  .time-pair {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .time-pair div:last-child {
    text-align: center;
  }

  .invitation-actions {
    grid-template-columns: 1fr;
  }

  .secret-dialog {
    padding-top: 80px;
  }

  .secret-dialog h2 {
    font-size: clamp(4.1rem, 20vw, 6.6rem);
  }
}

@media (max-width: 390px) {
  .seoul-time span {
    display: none;
  }

  .world-copy h2 {
    font-size: 3.15rem;
  }

  .duration-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-pill {
    padding-inline: 8px;
  }

  .fact-pill > i {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 760px) {
  body[data-story-step] {
    --story-x: 0vw;
    --story-y: 0vh;
    --story-scale: 1.08;
  }

  .story-header {
    min-height: 66px;
    grid-template-columns: auto 1fr auto;
    gap: 13px;
    padding: 10px 17px;
  }

  .story-progress {
    justify-self: center;
  }

  .story-progress-track {
    width: 66px;
  }

  .story-skip {
    width: 54px;
    overflow: hidden;
    border: 0;
    font-size: 0;
    white-space: nowrap;
  }

  .story-skip::after {
    font-size: 0.64rem;
    content: "Skip";
  }

  .story-step {
    inset: 68px 18px 116px;
  }

  .story-kicker {
    font-size: 0.54rem;
  }

  .story-names {
    justify-content: center;
    padding: 0 4px;
  }

  .story-names .story-lead {
    width: 92%;
    margin: 18px 0 22px;
  }

  .story-name-sequence {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 18px 12px;
    margin: 0 0 22px;
  }

  .story-name-sequence > span:first-child {
    grid-column: 1 / -1;
  }

  .story-name-sequence strong {
    font-size: clamp(3.7rem, 18vw, 5.1rem);
  }

  .story-name-sequence small {
    max-width: 150px;
    font-size: 0.55rem;
  }

  .story-things {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    padding-top: 4px;
  }

  .story-things-copy {
    width: 100%;
  }

  .story-things-copy .story-lead {
    margin: 0;
  }

  .story-things-copy h2,
  .story-photo-copy h2,
  .story-call-copy h2,
  .story-finale h2 {
    margin: 6px 0 10px;
    font-size: clamp(2.25rem, 10.5vw, 3.2rem);
  }

  .story-facts {
    width: 100%;
    gap: 7px;
  }

  .story-facts > span {
    min-height: 70px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  .story-facts i {
    margin-right: 7px;
    font-size: 0.46rem;
  }

  .story-facts strong {
    font-size: 1rem;
  }

  .story-facts small {
    font-size: 0.53rem;
  }

  .story-photo {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 19px;
    padding-top: 17px;
  }

  .story-photo .story-kicker,
  .story-letter .story-kicker,
  .story-call .story-kicker {
    top: 0;
  }

  .story-polaroid {
    width: min(210px, 58vw);
    justify-self: center;
    padding: 8px 8px 29px;
  }

  .story-polaroid figcaption {
    padding-top: 9px;
    font-size: 0.58rem;
  }

  .story-photo-copy {
    width: 100%;
    text-align: center;
  }

  .story-photo-copy .story-lead,
  .story-photo-copy > p:last-child {
    margin: 0;
    font-size: 0.72rem;
  }

  .story-letter {
    justify-content: center;
  }

  .story-paper-plane {
    top: 12%;
    right: 6%;
    font-size: 1.6rem;
  }

  .story-letter blockquote p {
    font-size: clamp(2.2rem, 11vw, 3.25rem);
    line-height: 0.98;
  }

  .story-letter-detail {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin: 24px 0 15px;
    font-size: 0.57rem;
  }

  .story-letter .story-whisper {
    margin: 0;
    font-size: 0.72rem;
  }

  .story-call {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    padding-top: 16px;
    text-align: center;
  }

  .story-phone {
    width: 146px;
    justify-self: center;
    box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.05), 0 0 55px rgba(207, 226, 255, 0.22);
  }

  .story-phone span {
    font-size: 3rem;
  }

  .story-call-copy h2 {
    font-size: 2.9rem;
  }

  .story-call-copy .story-lead,
  .story-call-copy > p:last-child {
    margin: 0;
    font-size: 0.7rem;
  }

  .story-finale .story-lead {
    margin: 0;
  }

  .story-finale h2 {
    margin-block: 8px 13px;
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .story-finale > p {
    margin: 0;
    font-size: 0.74rem;
  }

  .finale-heart {
    width: 68px;
    height: 68px;
  }

  .finale-heart span {
    font-size: 2.3rem;
  }

  .story-controls {
    right: 17px;
    bottom: 14px;
    left: 17px;
    display: block;
  }

  .story-controls > p {
    justify-content: center;
    margin-bottom: 8px;
    font-size: 0.58rem;
  }

  .story-next {
    width: 100%;
    min-width: 0;
    padding-left: 18px;
  }
}

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

  .world-backdrop > img {
    transform: scale(1.025) !important;
  }

  .world-backdrop {
    transform: none !important;
  }
}
