:root {
  color-scheme: light;
  --ink: #403c34;
  --muted: #665f51;
  --green: #405e50;
  --paper: #f8f4eb;
  --line: #b4a994;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", SimSun, "华文宋体", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --roman: Georgia, "Times New Roman", serif;
  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='174' height='174'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.44' filter='url(%23g)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); }
h2 { font-size: clamp(2rem, 4.1vw, 3.7rem); font-weight: 600; line-height: 1.24; letter-spacing: .035em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #a5693b; outline-offset: 4px; }
h1:focus, h2:focus, h3:focus { outline: none; }
svg { display: block; }
.script-note { padding: 1rem; text-align: center; }
.bound { width: min(100%, 1440px); padding-inline: max(clamp(1.5rem, 8.4vw, 8rem), env(safe-area-inset-left), env(safe-area-inset-right)); margin-inline: auto; }
.chapter { position: relative; isolation: isolate; overflow: hidden; }
.grain::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: var(--texture);
  opacity: .19;
  mix-blend-mode: multiply;
  z-index: -1;
}

.eyebrow { display: flex; align-items: center; gap: .8rem; color: #755d3e; font-size: .875rem; line-height: 1.45; letter-spacing: .19em; }
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .7; flex: none; }
.eyebrow[lang="en"] { font-family: var(--roman); text-transform: uppercase; letter-spacing: .21em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3.25rem;
  padding: .68rem 1.35rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .05em;
  text-align: center;
  transition: background-color .23s, border-color .23s, color .23s, transform .23s;
}
.button:active { transform: translateY(1px); }
.button svg { width: 1.2rem; height: 1.2rem; stroke: currentColor; stroke-width: 1.4; fill: none; flex: none; }
.button-primary { color: #fff9e9; background: var(--green); border-color: var(--green); box-shadow: 0 6px 16px #38584926; }
.button-outline { color: #3a5548; border-color: #7f9280; }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  background: radial-gradient(ellipse at 70% 66%, #f4dcad 0%, transparent 51%),
    linear-gradient(117deg, #f9f4e8 13%, #f1ebd8 56%, #b8c9bc 100%);
  display: flex;
  flex-direction: column;
}
.hero::after, .night::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: var(--texture);
  opacity: .15;
  mix-blend-mode: multiply;
}
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 3.25vw, 3rem);
  min-height: calc(4.7rem + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(clamp(1.1rem, 4.6vw, 5rem), env(safe-area-inset-right)) 0 max(clamp(1.1rem, 4.6vw, 5rem), env(safe-area-inset-left));
  border-bottom: 1px solid #584e3921;
}
.brand { display: inline-flex; align-items: center; gap: .62rem; margin-right: auto; min-height: 44px; font-family: var(--serif); color: #454d3d; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.brand svg { width: 2.12rem; height: 2.12rem; color: #786343; }
.top-nav { display: flex; gap: clamp(.8rem, 2.8vw, 2.5rem); }
.top-nav a, .music-button { display: grid; align-items: center; min-height: 44px; font-size: .875rem; white-space: nowrap; color: #454d3d; }
.music-button { border-bottom: 1px solid #655b4290; }
.hero-inner { flex: 1; display: flex; align-items: flex-start; padding-top: clamp(5.1rem, 12.6vh, 9rem); padding-bottom: clamp(11rem, 20vh, 16rem); pointer-events: none; }
.hero-copy { position: relative; z-index: 4; width: fit-content; pointer-events: auto; }
.hero h1 {
  margin: 1.15rem 0 1.45rem;
  font-size: clamp(4rem, 7.6vw, 7.15rem);
  font-weight: 700;
  line-height: 1.095;
  letter-spacing: .11em;
  color: #393c31;
}
.hero h1 span { display: block; }
.hero h1 span + span { margin-top: .11em; color: #476153; }
.hero-subtitle { font-size: clamp(1rem, 1.47vw, 1.19rem); color: #514b40; margin-bottom: 1.65rem; letter-spacing: .056em; }
.gift-date { margin-top: .9rem; font-size: .875rem; color: #655645; }
.hero-scene, .night-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.city-art { position: absolute; bottom: 0; left: 0; right: 0; height: 78%; }
.city-art > svg { height: 100%; width: 100%; }
.hero { --sun-x: 73%; --sun-y: 42%; --sun-size: clamp(6.6rem, 10.6vw, 10rem); }
.sun-button, .sun-halo {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
  width: var(--sun-size);
  height: var(--sun-size);
  border-radius: 50%;
  margin: calc(var(--sun-size) / -2);
}
.sun-button { z-index: 2; }
.sun-halo { background: linear-gradient(150deg, #f8e7b6 0%, #ecc381 83%, #eac381); box-shadow: inset 0 0 0 1px #f9e6b9, 0 0 60px 43px #fbe4ae94, 0 0 95px 70px #ffe5b850; }
.small-note {
  position: absolute;
  z-index: 6;
  padding: .58rem .8rem;
  border-radius: .3rem;
  background: #faf3e5;
  color: #594634;
  font-size: .875rem;
  box-shadow: 0 4px 16px #18292229;
  pointer-events: none;
}
.small-note:empty { display: none; }
.sun-note { left: var(--sun-x); top: calc(var(--sun-y) - var(--sun-size) / 2 - 3.1rem); transform: translateX(-50%); width: max-content; max-width: 85%; }

.delivery { background: #e7eadb; }
.delivery-grid { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(4.5rem, 9vw, 9.5rem); }
.messenger { position: relative; text-align: center; align-self: center; }
.messenger::before {
  content: "";
  position: absolute;
  inset: 5% 8% 15%;
  border-radius: 49% 51% 44% 56% / 65% 54% 46% 35%;
  background: radial-gradient(ellipse at 48% 53%, #f8edcd, #ebebd7 71%, #eaebd900 74%);
  pointer-events: none;
}
.messenger-line { position: absolute; inset: 7% 12% 16%; border-radius: 50%; border: 1px solid #7a8d6640; transform: rotate(-11deg); pointer-events: none; }
.dog-button { display: block; width: 100%; position: relative; border-radius: 45%; }
.dog-button svg { width: 100%; height: auto; overflow: visible; }
.dog-caption { position: relative; display: grid; place-items: start center; min-height: 3.75rem; margin-top: -.3rem; }
.dog-message { width: fit-content; border-radius: 1.5rem; padding: .37rem .88rem; background: #f7f2e3; color: #5b664f; border: 1px solid #84947443; font-size: .875rem; }
.delivery-copy h2, .letter h2 { margin: .8rem 0 1.5rem; }
.delivery-copy > .button { margin-top: 1.25rem; }
.greeting-wrap { display: grid; justify-items: start; }
.envelope { display: inline-grid; justify-items: center; gap: .85rem; padding: .7rem 1rem; min-width: 10.5rem; font-size: .9375rem; font-weight: 600; color: #564837; letter-spacing: .06em; }
.envelope-art {
  position: relative;
  display: block;
  width: 9.4rem;
  height: 5.85rem;
  border: 1px solid #bfaa89;
  border-radius: .28rem;
  background: linear-gradient(33deg, transparent 49.25%, #c5ae88 49.7%, transparent 50.5%) bottom left / 51% 80% no-repeat,
    linear-gradient(-33deg, transparent 49.25%, #c5ae88 49.7%, transparent 50.5%) bottom right / 51% 80% no-repeat,
    linear-gradient(150deg, #f3e3bd, #ebd7ae);
  box-shadow: 0 9px 18px #624d3422;
}
.envelope-art::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 66%;
  clip-path: polygon(0 0,100% 0,100% 9%,51% 98%,49% 98%,0 9%);
  background: linear-gradient(#fff0cf, #eddbb5 96%, #baa17b);
  transform-origin: top;
}
.envelope-seal { position: absolute; left: 50%; top: 52%; translate: -50% -50%; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: #a16e5c; border: 2px double #f5d2aaab; box-shadow: 0 2px 3px #664b3d50; }
.envelope-seal::after { content: "♡"; color: #fff2d4; position: absolute; inset: 0; display: grid; place-items: center; font: 1rem/1 var(--serif); }
.greeting-card { width: 100%; position: relative; background: #faf5e8; border: 1px solid #c8ba93; padding: clamp(1.35rem, 2.9vw, 2.3rem); box-shadow: 4px 8px 0 #97a38a23, 0 11px 25px #48523d12; }
.greeting-card::before { content: ""; position: absolute; inset: .35rem; border: 1px solid #c8ba9370; pointer-events: none; }
.greeting-intro { color: #695b44; }
.role-name { font: 700 clamp(1.24rem, 2.26vw, 2.08rem)/1.45 var(--serif); color: #395447; margin-top: .46rem; }
.card-rule { width: 2.3rem; height: 1px; background: #b79b6b; margin: 1rem 0; }
.greeting-last { color: #625b4d; margin-top: .33rem; }
.greeting-card, .paper { scroll-margin-block-start: max(1.2rem, env(safe-area-inset-top)); }

.letter { background: radial-gradient(ellipse at 50% 20%, #fbf6eb, #eee2ce 100%); }
.letter-inner { text-align: center; width: min(100%, 54rem); margin: auto; padding: clamp(4.2rem, 8vw, 7.6rem) max(1.2rem, env(safe-area-inset-right), env(safe-area-inset-left)); }
.letter .eyebrow, .night .eyebrow { justify-content: center; }
.letter .eyebrow::after, .night .eyebrow::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .7; }
.letter-envelope { margin: .45rem auto; }
.letter-envelope .envelope-art { width: clamp(12rem, 26vw, 16.5rem); height: clamp(7.2rem, 15.9vw, 10rem); }
.letter-envelope .envelope-seal { width: 2rem; height: 2rem; }
.letter-inner > .button { margin-top: 1.45rem; }
.paper {
  isolation: isolate;
  position: relative;
  margin: 1.8rem auto 0;
  padding: clamp(1.65rem, 5vw, 4.25rem);
  background: #fffaf0;
  border: 1px solid #d1c1a6;
  box-shadow: 0 9px 0 -5px #f5ecdb, 0 10px 0 -5px #cbbda3, 0 16px 0 -10px #fbf3e4, 0 17px 0 -10px #cbbda3, 0 21px 44px #65492320;
  text-align: left;
}
.paper::after { content: ""; position: absolute; inset: .48rem; border: 1px solid #c1ad8756; pointer-events: none; }
.paper-mark { position: absolute; top: clamp(1.3rem, 3.7vw, 2.8rem); right: clamp(1.3rem, 3.7vw, 2.8rem); color: #9f7954; }
.paper-mark svg { width: 2.5rem; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }
.paper h3 { margin: 0 3.25rem 1.15rem 0; color: #4a6455; font-size: clamp(1.42rem, 3vw, 1.9rem); }
.paper p { font-size: clamp(1.05rem, 1.66vw, 1.21rem); line-height: 1.9; }
.paper p + p { margin-top: .86em; }
.paper .signature { margin-top: 1.55rem; text-align: right; color: #536956; font-family: var(--serif); font-weight: 700; }

.night {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  min-height: 100svh;
  background: #1f3547;
  color: #f9efdb;
  text-align: center;
}
.night-sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(#182a40 0%, #233d51 39%, #5b6870 63%, #b48569 83%); }
.night-sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#556574, #8b7a72 43%, #d9a077 80%); }
.night-scene { z-index: -1; }
.night .city-art { height: min(70%, 660px); }
.moon, .setting-sun { position: absolute; top: 25%; left: 78%; border-radius: 50%; width: clamp(2.65rem, 5.5vw, 5rem); aspect-ratio: 1; }
.moon { background: radial-gradient(circle at 38% 33%, #fff5d5, #f4dba6 75%); box-shadow: 0 0 42px #f3daa84c; }
.setting-sun { top: 49%; background: #f0bc85; box-shadow: 0 0 45px #f9c99180; }
.star-button { position: absolute; z-index: 4; top: 12%; left: 17%; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #f8dda9; }
.star-button svg { width: 1rem; fill: currentColor; opacity: .86; }
.star-note { top: calc(12% + 3rem); left: max(1rem, 10%); max-width: 80%; background: #fff3d9; }
.night-content { position: relative; z-index: 4; padding: clamp(4rem, 7.5vh, 6.5rem) max(1.3rem, env(safe-area-inset-left), env(safe-area-inset-right)) max(clamp(15rem, 28vh, 19rem), env(safe-area-inset-bottom)); max-width: 100%; }
.night .eyebrow { color: #efcf9a; }
.night h2 { margin: 1rem auto 1.15rem; font-size: clamp(1.73rem, 4.15vw, 3.75rem); text-shadow: 0 2px 12px #162a42; }
.night-verse { display: grid; gap: .74rem; font-size: clamp(1rem, 1.55vw, 1.14rem); line-height: 1.62; letter-spacing: .045em; text-shadow: 0 1px 9px #172b3a, 0 1px 2px #172b3a; }
.night-wish { margin-top: 1.05rem; font: 700 clamp(1.15rem, 2.28vw, 1.75rem)/1.5 var(--serif); color: #fff0cc; text-shadow: 0 1px 7px #1b303c, 0 1px 3px #1b303c; }
.heart-button { display: grid; place-items: center; margin: .06rem auto .17rem; width: 44px; height: 44px; color: #ffdba9; border-radius: 50%; }
.heart-button svg { width: 1.32rem; fill: #d69c7a45; stroke: currentColor; stroke-width: 1.2; }
.night-actions { display: flex; justify-content: center; align-items: center; gap: .68rem; }
.button-night-outline { color: #fff4df; background: #263b4bb0; border-color: #cfbf9d; }
.button-night { color: #3f3e32; background: #f3ddad; border-color: #f3ddad; }
.night :focus-visible { outline-color: #fff0c5; }
.hug-bubble { position: absolute; top: auto; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2.5rem); display: flex; gap: .48rem; align-items: center; justify-content: center; margin-top: .6rem; border-radius: .3rem; padding: .55rem .8rem; color: #4d3b35; background: #faeaca; box-shadow: 0 6px 20px #192b3c56; font-size: .875rem; }
.hug-bubble:empty { display: none; }
.hug-bubble svg { width: 1.45rem; flex: none; fill: #a96357; }

@media (hover: hover) {
  .button-primary:hover { background: #324e42; border-color: #324e42; }
  .button-outline:hover { background: #687f7017; border-color: #526c59; }
  .top-nav a:hover, .envelope:hover { color: #8a5936; }
  .button-night:hover { background: #ffe9bc; }
  .button-night-outline:hover { background: #253949; border-color: #eed8ad; }
}
@media (max-width: 840px) {
  .hero { --sun-x: 75%; --sun-y: 51%; }
  .city-art { height: 71%; }
  .delivery-grid { gap: 1.45rem; }
  .delivery-copy h2 { font-size: clamp(1.8rem, 4.45vw, 3.2rem); }
}
@media (max-width: 620px) {
  .topbar { min-height: calc(3.8rem + env(safe-area-inset-top)); gap: .64rem; }
  .brand { font-size: .87rem; gap: .36rem; letter-spacing: .01em; }
  .brand svg { width: 1.65rem; height: 1.65rem; }
  .top-nav { gap: .65rem; }
  .top-nav a { font-size: .8125rem; }
  .top-nav a:first-child { display: none; }
  .topbar.has-music .top-nav { display: none; }
  .hero { --sun-x: 76%; --sun-y: 64%; --sun-size: clamp(4.9rem, 19vw, 6.65rem); min-height: max(635px, 100svh); background: radial-gradient(ellipse at 76% 64%, #f4d5a0, transparent 49%), linear-gradient(150deg, #f9f4e8 10%, #f3ebd5 58%, #b6c4b1 100%); }
  .hero-inner { padding-top: clamp(2.85rem, 8.6svh, 5.45rem); padding-bottom: 16.5rem; }
  .hero h1 { font-size: clamp(3.3rem, 12.2vw, 4.9rem); margin: .85rem 0 1.12rem; letter-spacing: .11em; }
  .hero-subtitle { margin-bottom: 1.22rem; letter-spacing: .015em; }
  .sun-note { left: auto; right: max(.7rem, env(safe-area-inset-right)); transform: none; }
  .hero .city-art { height: 56%; }
  .delivery-grid { grid-template-columns: 1fr; gap: .7rem; padding-block: 3.4rem 4.35rem; text-align: center; }
  .messenger { width: min(100%, 24rem); margin: 0 auto; }
  .delivery-copy .eyebrow { justify-content: center; }
  .delivery-copy .eyebrow::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .7; }
  .delivery-copy h2 { font-size: clamp(1.8rem, 8.6vw, 2.5rem); margin-bottom: .82rem; }
  .greeting-wrap { justify-items: center; }
  .greeting-card { text-align: left; width: min(100%, 27rem); }
  .letter h2 { font-size: clamp(1.8rem, 7.6vw, 2.6rem); }
  .night .city-art { height: 43%; }
  .night-content { padding-top: 3.45rem; padding-bottom: max(13rem, calc(11.5rem + env(safe-area-inset-bottom))); }
  .night h2 { width: min(100%, 21rem); text-wrap: balance; }
  .moon { left: 83%; top: 8%; }
  .star-button { left: 6%; top: 4%; }
  .star-note { top: calc(4% + 2.9rem); }
}
@media (max-width: 350px) {
  .topbar { padding-inline: max(.78rem, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .top-nav { gap: .44rem; }
  .hero h1 { font-size: 2.94rem; }
  .button { padding-inline: .85rem; }
  .night-actions { gap: .5rem; }
}
@media (max-width: 620px) and (max-height: 690px) {
  .hero { min-height: max(595px, 100svh); }
  .hero-inner { padding-bottom: 13rem; }
  .night-content { padding-top: 2.05rem; padding-bottom: max(9.5rem, calc(9rem + env(safe-area-inset-bottom))); }
  .night h2 { margin-block: .68rem .8rem; }
  .night-verse { gap: .53rem; }
  .night-wish { margin-top: .69rem; }
  .night-actions .button { min-height: 3rem; }
  .night .city-art { height: 49%; }
}
@media (min-width: 621px) and (max-height: 520px) {
  .topbar { min-height: calc(3.5rem + env(safe-area-inset-top)); }
  .hero { --sun-y: 47%; }
  .hero-inner { padding-top: 2rem; padding-bottom: 5.7rem; }
  .hero h1 { font-size: clamp(2.45rem, 8.5vh, 3.9rem); margin-block: .58rem .65rem; }
  .hero-subtitle { margin-bottom: .77rem; }
  .hero .city-art { height: 80%; }
}
