:root {
  --ink: #06100f;
  --ink-soft: #0b1715;
  --moon: #fff1c7;
  --gold: #efc76d;
  --gold-bright: #ffe7a3;
  --jade: #68b9a7;
  --vermilion: #c84b3e;
  --paper: #f7eed6;
  --text: #f7f1e4;
  --muted: rgba(247, 241, 228, 0.58);
  --line: rgba(255, 241, 199, 0.19);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "FZSongKeBenXiuKaiS-R-GB", "STKaiti", "KaiTi", "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--text);
}

html {
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  touch-action: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--gold-bright);
}

#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.atmosphere,
.atmosphere > div {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere {
  z-index: 1;
  overflow: hidden;
}

.aurora {
  opacity: 0.22;
  filter: blur(70px);
  transform: translateZ(0);
}

.aurora-one {
  inset: 2% -10% auto 28%;
  width: 82%;
  height: 20%;
  background: linear-gradient(100deg, transparent, rgba(104, 185, 167, 0.48), transparent 72%);
  transform: rotate(-8deg);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}

.aurora-two {
  inset: auto 26% 14% -12%;
  width: 76%;
  height: 16%;
  background: linear-gradient(95deg, transparent, rgba(239, 199, 109, 0.24), transparent 74%);
  transform: rotate(9deg);
  animation: aurora-drift-two 30s ease-in-out infinite alternate;
}

.haze {
  background:
    linear-gradient(180deg, transparent 54%, rgba(10, 25, 22, 0.25) 70%, rgba(3, 11, 10, 0.68) 100%),
    linear-gradient(90deg, rgba(4, 13, 12, 0.32), transparent 34%, transparent 72%, rgba(4, 10, 10, 0.14));
}

.grain {
  opacity: 0.12;
  background-image:
    repeating-radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.24) 0 0.45px, transparent 0.75px 4px),
    repeating-radial-gradient(circle at 80% 70%, rgba(255, 232, 171, 0.14) 0 0.4px, transparent 0.7px 5px);
  background-size: 7px 7px, 11px 11px;
  mix-blend-mode: soft-light;
}

.vignette {
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.64);
}

@keyframes aurora-drift {
  from { transform: translate3d(-3%, -10px, 0) rotate(-8deg); }
  to { transform: translate3d(8%, 18px, 0) rotate(-5deg); }
}

@keyframes aurora-drift-two {
  from { transform: translate3d(-5%, 10px, 0) rotate(9deg); }
  to { transform: translate3d(12%, -20px, 0) rotate(6deg); }
}

.prelude {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #030a09;
  transition: opacity 1.1s var(--ease-out), visibility 1.1s;
}

.prelude::before,
.prelude::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 8%, var(--line) 50%, transparent 92%);
}

.prelude::before { left: 7vw; }
.prelude::after { right: 7vw; }

.prelude-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
}

.orbit,
.prelude-moon {
  position: absolute;
  inset: 50% auto auto 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit {
  border: 1px solid rgba(255, 232, 174, 0.13);
}

.orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(239, 199, 109, 0.8);
}

.orbit-outer {
  width: 100%;
  height: 100%;
  animation: orbit-spin 26s linear infinite;
}

.orbit-outer::after {
  left: 8%;
  top: 21%;
}

.orbit-inner {
  width: 390px;
  height: 390px;
  border-style: dashed;
  animation: orbit-spin-reverse 34s linear infinite;
}

.orbit-inner::after {
  right: 5%;
  bottom: 27%;
  width: 4px;
  height: 4px;
  background: var(--jade);
}

.prelude-moon {
  width: 336px;
  height: 336px;
  background:
    radial-gradient(ellipse at 66% 35%, rgba(90, 94, 82, 0.18) 0 9%, transparent 22%),
    radial-gradient(ellipse at 39% 57%, rgba(94, 98, 85, 0.16) 0 12%, transparent 27%),
    radial-gradient(ellipse at 61% 69%, rgba(104, 101, 84, 0.13) 0 8%, transparent 21%),
    radial-gradient(circle at 37% 30%, #fffdf0 0, #f1dfb7 58%, #bca276 100%);
  box-shadow:
    0 0 42px rgba(255, 237, 188, 0.42),
    0 0 110px rgba(239, 199, 109, 0.18),
    0 0 220px rgba(104, 185, 167, 0.1);
  animation: moon-breathe 5s ease-in-out infinite;
  background-position: center;
  background-size: cover;
  transition: filter 0.8s ease, box-shadow 0.8s ease;
}

body.moon-ready .prelude-moon {
  filter: saturate(0.96) sepia(0.06) contrast(0.97);
}

.prelude-moon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(132deg, rgba(255, 255, 255, 0.14), transparent 42%, rgba(54, 68, 60, 0.13));
  mix-blend-mode: multiply;
  opacity: 0.45;
}

.prelude-moon::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 245, 211, 0.26);
  border-radius: 50%;
}

.prelude-cloud {
  position: absolute;
  z-index: 2;
  height: 28px;
  border-top: 1px solid rgba(255, 244, 215, 0.42);
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.64;
}

.cloud-a {
  left: 46px;
  top: 258px;
  width: 278px;
  transform: rotate(3deg);
  animation: cloud-cross 11s ease-in-out infinite alternate;
}

.cloud-b {
  right: 40px;
  top: 308px;
  width: 228px;
  transform: rotate(-5deg);
  opacity: 0.38;
  animation: cloud-cross-two 14s ease-in-out infinite alternate;
}

@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes moon-breathe {
  50% {
    box-shadow:
      0 0 54px rgba(255, 237, 188, 0.55),
      0 0 140px rgba(239, 199, 109, 0.24),
      0 0 240px rgba(104, 185, 167, 0.13);
  }
}

@keyframes cloud-cross {
  to { transform: translateX(40px) rotate(1deg); opacity: 0.42; }
}

@keyframes cloud-cross-two {
  to { transform: translateX(-34px) rotate(-2deg); opacity: 0.6; }
}

.prelude-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(92vw, 680px);
  text-align: center;
}

.eyebrow,
.sheet-kicker {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.prelude h1 {
  display: flex;
  gap: 20px;
  margin: 0;
  font-family: var(--serif);
  font-size: 92px;
  font-weight: 400;
  line-height: 1;
  color: #263b33;
  text-shadow: 0 1px 0 rgba(255, 252, 231, 0.28);
}

.prelude h1 span {
  opacity: 0;
  transform: translateY(28px);
  animation: title-rise 1.1s var(--ease-out) forwards;
}

.prelude h1 span:nth-child(2) { animation-delay: 0.12s; }
.prelude h1 span:nth-child(3) { animation-delay: 0.24s; }

@keyframes title-rise {
  to { opacity: 1; transform: translateY(0); }
}

.prelude .eyebrow {
  color: #9e5940;
}

.prelude-line {
  margin: 22px 0 30px;
  color: rgba(31, 52, 44, 0.78);
  font-family: var(--serif);
  font-size: 17px;
}

.enter-button,
.primary-button,
.text-button,
.seal-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.enter-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  width: auto;
  min-width: 184px;
  max-width: min(88vw, 360px);
  min-height: 54px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 235, 183, 0.5);
  border-radius: 2px;
  background: rgba(7, 16, 15, 0.84);
  color: var(--moon);
  backdrop-filter: blur(12px);
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease-out);
}

.enter-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enter-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--moon);
  transform: translateX(-102%);
  transition: transform 0.45s var(--ease-out);
}

.enter-button:hover {
  color: var(--ink);
  border-color: var(--moon);
  transform: translateY(-2px);
}

.enter-button:hover::before { transform: translateX(0); }

.enter-button span,
.enter-button svg {
  position: relative;
  z-index: 1;
}

.enter-button svg,
.text-button svg,
.primary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prelude-signature {
  position: absolute;
  bottom: calc(26px + env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  color: rgba(255, 244, 211, 0.38);
  font-size: 9px;
  transform: translateX(-50%);
  white-space: nowrap;
}

body.is-live .prelude {
  opacity: 0;
  visibility: hidden;
}

body.is-live .prelude-orbit {
  transform: translate(-50%, -50%) scale(1.45);
  opacity: 0;
  transition: transform 1.4s var(--ease-out), opacity 0.8s ease;
}

.experience {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease 0.35s, visibility 1.1s;
}

.experience::after {
  content: "";
  position: fixed;
  z-index: 2;
  inset: 0;
  background: radial-gradient(circle at var(--lantern-x, 76%) 84%, rgba(255, 208, 111, 0.22), rgba(196, 72, 43, 0.07) 13%, transparent 31%);
  opacity: 0;
  pointer-events: none;
}

body.lantern-moment .experience::after {
  animation: lantern-wash 1.8s var(--ease-out);
}

@keyframes lantern-wash {
  0% { opacity: 0; transform: scale(0.55); }
  24% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}

body.is-live .experience {
  opacity: 1;
  visibility: visible;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(24px + env(safe-area-inset-top)) 42px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 241, 199, 0.55);
  border-radius: 2px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 20px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.brand-copy small {
  color: var(--muted);
  font-size: 8px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 241, 199, 0.17);
  border-radius: 50%;
  background: rgba(5, 15, 14, 0.3);
  color: rgba(255, 246, 220, 0.76);
  backdrop-filter: blur(12px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out);
}

.icon-button:hover {
  color: var(--moon);
  border-color: rgba(255, 232, 174, 0.52);
  background: rgba(255, 232, 174, 0.08);
  transform: translateY(-2px);
}

.icon-sound-on { display: none; }
.sound-on .icon-sound-on { display: block; }
.sound-on .icon-sound-off { display: none; }

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 106px 7vw 98px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(660px, 50vw);
  transform: translateY(12px);
}

.recipient-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 14px;
}

.recipient-line .line {
  width: 34px;
  height: 1px;
  background: var(--gold);
  transform-origin: left;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 400;
  line-height: 0.98;
}

.hero-title > span {
  display: block;
}

.title-soft {
  margin-bottom: 6px;
  color: rgba(247, 241, 228, 0.62);
  font-size: 0.48em;
}

.title-bright {
  color: var(--moon);
  text-shadow: 0 8px 54px rgba(255, 222, 145, 0.14);
}

.title-dot {
  display: inline-block;
  margin: 0 10px;
  color: var(--vermilion);
  font-size: 0.56em;
  vertical-align: 0.18em;
}

.hero-wish {
  max-width: 560px;
  margin: 28px 0 0;
  color: rgba(247, 241, 228, 0.72);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 34px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 25px;
  border: 1px solid var(--moon);
  border-radius: 3px;
  background: var(--moon);
  color: #15201c;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.primary-button:hover {
  background: var(--gold-bright);
  box-shadow: 0 16px 50px rgba(239, 199, 109, 0.17);
  transform: translateY(-3px);
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.text-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
  background: transparent;
  color: rgba(255, 247, 225, 0.78);
  font-family: var(--serif);
  font-size: 14px;
}

.text-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: rgba(255, 237, 188, 0.34);
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.text-button:hover::after { transform: scaleX(1); }
.text-button:hover svg { transform: translateX(4px); }
.text-button svg { transition: transform 0.3s var(--ease-out); }

.text-button.is-releasing {
  color: var(--gold-bright);
}

.text-button.is-releasing svg {
  transform: translate(4px, -5px) rotate(-38deg);
}

.moon-verse {
  position: fixed;
  z-index: 4;
  top: 50%;
  right: 4.1vw;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.moon-verse p {
  margin: 0;
  color: rgba(255, 246, 220, 0.63);
  font-family: var(--serif);
  font-size: 13px;
}

.moon-verse small {
  margin-top: 5px;
  color: rgba(255, 246, 220, 0.28);
  font-size: 7px;
  writing-mode: vertical-rl;
}

.verse-rule {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

.constellation {
  position: fixed;
  z-index: 3;
  left: 49%;
  top: 19%;
  width: 82px;
  height: 70px;
  opacity: 0.5;
}

.constellation::before,
.constellation::after {
  content: "";
  position: absolute;
  height: 1px;
  background: rgba(255, 236, 184, 0.25);
  transform-origin: left;
}

.constellation::before {
  left: 8px;
  top: 12px;
  width: 68px;
  transform: rotate(25deg);
}

.constellation::after {
  left: 29px;
  top: 37px;
  width: 49px;
  transform: rotate(-34deg);
}

.constellation span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--moon);
  box-shadow: 0 0 12px var(--moon);
  animation: star-pulse 3s ease-in-out infinite;
}

.constellation span:nth-child(1) { left: 5px; top: 9px; }
.constellation span:nth-child(2) { left: 30px; top: 30px; animation-delay: 0.7s; }
.constellation span:nth-child(3) { right: 2px; top: 37px; animation-delay: 1.4s; }
.constellation span:nth-child(4) { right: 6px; bottom: 3px; animation-delay: 2.1s; }

@keyframes star-pulse {
  50% { opacity: 0.25; transform: scale(0.68); }
}

.scene-footer {
  position: fixed;
  z-index: 8;
  right: 42px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  color: rgba(247, 241, 228, 0.38);
  font-size: 9px;
  pointer-events: none;
}

.scene-footer p { margin: 0; }

.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 9px var(--jade);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  50% { opacity: 0.35; }
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: rgba(255, 243, 210, 0.54);
  font-family: var(--serif);
  font-size: 11px;
}

.footer-center i {
  width: 1px;
  height: 19px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: footer-line 1.8s ease-in-out infinite;
}

@keyframes footer-line {
  50% { transform: scaleY(0.45); transform-origin: top; opacity: 0.45; }
}

.coordinates { text-align: right; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(1, 7, 6, 0.62);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(7px);
  transition: opacity 0.45s ease, visibility 0.45s;
}

.wish-sheet {
  position: fixed;
  z-index: 61;
  top: 0;
  right: 0;
  width: min(540px, 94vw);
  height: 100vh;
  height: 100dvh;
  overflow: hidden auto;
  border-left: 1px solid rgba(255, 241, 199, 0.16);
  background:
    linear-gradient(145deg, rgba(20, 35, 30, 0.96), rgba(6, 17, 15, 0.98)),
    var(--ink);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.4);
  visibility: hidden;
  transform: translateX(105%);
  transition: transform 0.65s var(--ease-out), visibility 0.65s;
}

body.sheet-open .sheet-backdrop {
  opacity: 1;
  visibility: visible;
}

body.sheet-open .wish-sheet {
  visibility: visible;
  transform: translateX(0);
}

.sheet-close {
  position: absolute;
  z-index: 2;
  top: calc(23px + env(safe-area-inset-top));
  right: 25px;
}

.sheet-inner {
  width: min(100%, 430px);
  min-height: 100%;
  margin: 0 auto;
  padding: calc(84px + env(safe-area-inset-top)) 0 calc(50px + env(safe-area-inset-bottom));
}

.sheet-inner h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 400;
}

.sheet-lead {
  margin: 13px 0 34px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
}

.field-label,
.tone-field legend {
  display: block;
  margin: 0 0 10px;
  color: rgba(247, 241, 228, 0.52);
  font-size: 11px;
}

.name-field {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255, 241, 199, 0.2);
}

.sender-field {
  margin-bottom: 26px;
}

.name-field > span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 20px;
}

.name-field input {
  width: 100%;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
}

.name-field input::placeholder,
.message-field textarea::placeholder {
  color: rgba(247, 241, 228, 0.26);
}

.tone-field {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

.tone-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 241, 199, 0.17);
  border-radius: 4px;
  overflow: hidden;
}

.tone-options label {
  position: relative;
  border-right: 1px solid rgba(255, 241, 199, 0.14);
}

.tone-options label:last-child { border-right: 0; }
.tone-options input { position: absolute; opacity: 0; pointer-events: none; }

.tone-options span {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: rgba(247, 241, 228, 0.58);
  font-family: var(--serif);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.tone-options input:checked + span {
  background: rgba(239, 199, 109, 0.14);
  color: var(--moon);
}

.tone-options input:focus-visible + span {
  outline: 2px solid var(--gold-bright);
  outline-offset: -3px;
}

.message-field {
  position: relative;
  margin-bottom: 28px;
}

.message-field textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  resize: vertical;
  padding: 16px 16px 31px;
  border: 1px solid rgba(255, 241, 199, 0.17);
  border-radius: 4px;
  outline: 0;
  background: rgba(1, 9, 8, 0.24);
  color: rgba(255, 249, 231, 0.86);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.message-field textarea:focus {
  border-color: rgba(255, 229, 165, 0.5);
  background: rgba(1, 9, 8, 0.36);
}

.char-count {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: rgba(247, 241, 228, 0.34);
  font-size: 9px;
}

.char-count b { font-weight: 400; }

.seal-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 10px 0 22px;
  border: 1px solid rgba(255, 237, 188, 0.6);
  border-radius: 3px;
  background: transparent;
  color: var(--moon);
  overflow: hidden;
  transition: color 0.35s ease, background 0.35s ease;
}

.seal-button:hover {
  color: var(--ink);
  background: var(--moon);
}

.seal-stamp {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--vermilion);
  border-radius: 50%;
  color: var(--vermilion);
  font-family: var(--serif);
  font-size: 18px;
  transform: rotate(-9deg);
}

.keepsake-view {
  display: none;
}

.wish-sheet.has-keepsake .composer-view { display: none; }
.wish-sheet.has-keepsake .keepsake-view { display: block; }

.keepsake-letter {
  position: relative;
  min-height: 330px;
  margin: 30px 0 24px;
  padding: 40px 34px 27px;
  overflow: hidden;
  border-radius: 5px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  color: #26352f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.keepsake-letter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.4), transparent 42%, rgba(161, 120, 63, 0.1));
  pointer-events: none;
}

.letter-moon {
  position: absolute;
  top: -74px;
  right: -54px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(169, 123, 62, 0.25);
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgba(199, 153, 84, 0.04), inset 0 0 0 42px rgba(199, 153, 84, 0.035);
}

.letter-to {
  position: relative;
  z-index: 1;
  margin: 0 0 32px;
  color: #a34b3c;
  font-family: var(--serif);
  font-size: 15px;
}

.keepsake-letter blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #27352f;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.85;
}

.letter-footer {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 22px;
  left: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(38, 53, 47, 0.54);
  font-family: var(--serif);
  font-size: 11px;
}

.letter-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(174, 54, 42, 0.78);
  border-radius: 3px;
  color: rgba(174, 54, 42, 0.88);
  font-size: 21px;
  transform: rotate(-7deg);
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  min-width: 180px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 241, 199, 0.23);
  border-radius: 4px;
  background: rgba(10, 25, 22, 0.9);
  color: var(--moon);
  font-family: var(--serif);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  backdrop-filter: blur(16px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reunion-mark {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 43%;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 231, 169, 0.55);
  border-radius: 50%;
  color: var(--moon);
  font-family: var(--serif);
  font-size: 26px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.65);
}

.reunion-mark::before,
.reunion-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(239, 199, 109, 0.28);
  border-radius: 50%;
}

.reunion-mark::after {
  inset: -16px;
  border-style: solid;
  opacity: 0.28;
}

.reunion-mark.show {
  animation: reunion-reveal 3.3s var(--ease-out) forwards;
}

@keyframes reunion-reveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.55) rotate(-12deg); filter: blur(8px); }
  22%, 68% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16); filter: blur(3px); }
}

.noscript {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
  color: var(--moon);
  font-family: var(--serif);
}

body.intro-leaving .prelude-copy {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.65s var(--ease-out);
}

body.is-live .hero-copy > *,
body.is-live .moon-verse,
body.is-live .scene-footer,
body.is-live .topbar {
  animation: interface-rise 1s var(--ease-out) both;
}

body.is-live .hero-copy > *:nth-child(1) { animation-delay: 0.45s; }
body.is-live .hero-copy > *:nth-child(2) { animation-delay: 0.56s; }
body.is-live .hero-copy > *:nth-child(3) { animation-delay: 0.68s; }
body.is-live .hero-copy > *:nth-child(4) { animation-delay: 0.8s; }
body.is-live .moon-verse { animation-delay: 0.85s; }
body.is-live .scene-footer { animation-delay: 1s; }

@keyframes interface-rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 1100px) {
  .hero-title { font-size: 78px; }
  .hero-copy { width: min(620px, 58vw); }
  .moon-verse { right: 3vw; }
}

@media (max-width: 760px) {
  .prelude-orbit {
    width: 390px;
    height: 390px;
  }

  .orbit-inner {
    width: 300px;
    height: 300px;
  }

  .prelude-moon {
    width: 268px;
    height: 268px;
  }

  .prelude h1 {
    gap: 12px;
    font-size: 64px;
  }

  .prelude-line { font-size: 15px; }

  .topbar {
    padding: calc(16px + env(safe-area-inset-top)) 18px 12px;
  }

  .fullscreen-button { display: none; }

  .hero {
    align-items: flex-end;
    padding: 94px 21px calc(98px + env(safe-area-inset-bottom));
  }

  .hero-copy {
    width: 100%;
    transform: none;
  }

  .recipient-line {
    margin-bottom: 15px;
    font-size: 12px;
  }

  .hero-title {
    font-size: 56px;
    line-height: 1;
  }

  .title-soft {
    margin-bottom: 4px;
    font-size: 0.44em;
  }

  .title-dot { margin: 0 5px; }

  .hero-wish {
    max-width: 94%;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.8;
  }

  .hero-actions {
    gap: 20px;
    margin-top: 22px;
  }

  .primary-button {
    min-height: 48px;
    padding: 0 18px;
  }

  .moon-verse,
  .constellation,
  .scene-footer > p {
    display: none;
  }

  .scene-footer {
    right: 0;
    bottom: calc(11px + env(safe-area-inset-bottom));
    left: 0;
    display: flex;
    justify-content: center;
  }

  .footer-center { font-size: 10px; }

  .wish-sheet {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(88vh, 760px);
    height: min(88dvh, 760px);
    border-top: 1px solid rgba(255, 241, 199, 0.16);
    border-left: 0;
    border-radius: 8px 8px 0 0;
    transform: translateY(105%);
  }

  body.sheet-open .wish-sheet { transform: translateY(0); }

  .sheet-inner {
    width: 100%;
    min-height: auto;
    padding: 68px 22px calc(34px + env(safe-area-inset-bottom));
  }

  .sheet-inner h2 { font-size: 34px; }
  .sheet-lead { margin-bottom: 25px; }
  .sheet-close { top: 13px; right: 16px; }
  .keepsake-letter { min-height: 292px; padding: 34px 25px 26px; }
  .keepsake-letter blockquote { font-size: 18px; }
  .letter-footer { left: 25px; }
  .share-actions { gap: 18px; }
}

@media (max-width: 380px) {
  .prelude h1 { font-size: 55px; }
  .prelude-orbit { transform: translate(-50%, -50%) scale(0.9); }
  .brand-copy small { display: none; }
  .hero-title { font-size: 49px; }
  .hero-wish { font-size: 13px; }
  .hero-actions { gap: 14px; }
  .primary-button { padding: 0 14px; font-size: 13px; }
  .text-button { font-size: 13px; }
  .tone-options span { font-size: 12px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .topbar {
    padding-top: calc(10px + env(safe-area-inset-top));
  }

  .brand-copy small,
  .scene-footer,
  .moon-verse {
    display: none;
  }

  .hero {
    align-items: center;
    padding: 70px 5vw 24px;
  }

  .hero-copy {
    width: min(560px, 62vw);
  }

  .hero-title {
    font-size: 48px;
  }

  .recipient-line {
    margin-bottom: 10px;
  }

  .hero-wish {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .primary-button {
    min-height: 44px;
  }
}

@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;
  }
}
