:root {
  color-scheme: light;
  --ink: #172820;
  --paper: #f4f0e6;
  --muted: #495951;
  --gold: #f2d8a5;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #ad744a; outline-offset: 5px; }
.shell { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 24px;
}
.wordmark, .nav-link, .site-footer a { text-decoration: none; }
.wordmark { font-weight: 700; letter-spacing: .08em; }
.wordmark span { margin-right: .3em; color: #967044; }
.nav-link, .site-footer { font-size: .875rem; }
.nav-link:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .3em; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: min(550px, 70vh);
  overflow: hidden;
  border-radius: 12px;
  color: #fff9e9;
  background: radial-gradient(ellipse at 74% 38%, #265b4e, #142b2f 40%, #101c18 72%);
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 20, 18, .86), rgba(7, 20, 18, .58) 37%, transparent 78%);
  content: "";
  pointer-events: none;
}
.sky { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; }
.hero-copy { padding: clamp(45px, 8vw, 102px); }
.hero h1, .collection h2, .feature h3 {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  margin: 0;
}
.hero h1 {
  font-size: clamp(2.6rem, 7.8vw, 6.2rem);
  line-height: 1.09;
  letter-spacing: .045em;
}
.hero-copy > p:not(.eyebrow) { max-width: 32em; line-height: 1.8; color: #f1eddf; }
.eyebrow {
  font-family: Georgia, serif;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: #6f583c;
  margin: 0 0 17px;
}
.hero .eyebrow { color: var(--gold); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85em;
  width: fit-content;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
}
.hero-copy > .button, .night-actions { margin-top: 15px; }
.button-light { background: var(--gold); color: #182820; }
.button-dark { background: #203f32; color: #fff9ee; }
.button-outline { border-color: #d9dbc9; color: #fff9e9; background: #132b24a6; }
.button:hover { box-shadow: 0 0 0 2px currentColor inset; }
.collection { padding-block: clamp(40px, 7vw, 80px); scroll-margin-top: 10px; }
.collection h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.feature {
  margin-top: 22px;
  border-block: 1px solid #cfc8b7;
  padding: 27px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.feature .eyebrow { margin-bottom: 8px; }
.feature h3 { font-size: 1.6rem; }
.feature p:last-child, .greeting p { margin-bottom: 0; color: var(--muted); line-height: 1.7; }
.site-footer { border-top: 1px solid #cfc8b7; color: var(--muted); }
.night-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.night .star-count { min-height: 1.8em; margin-bottom: 0; font-size: .88rem; }
#sent-wish { font-size: clamp(1.05rem, 2.8vw, 1.42rem); white-space: pre-wrap; overflow-wrap: anywhere; }
.scene-toggle {
  position: absolute;
  bottom: 16px;
  right: 16px;
  min-height: 42px;
  padding: 5px 12px;
  color: #fff9e9;
  background: #12241fe8;
  border: 1px solid #b4c2af;
  border-radius: 4px;
}
.greeting { display: grid; grid-template-columns: 1fr 1.2fr; gap: 35px; }
.card-form label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 7px; }
.card-form textarea, .card-form input {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #a0a496;
  border-radius: 4px;
  color: var(--ink);
  background: #fbf8ef;
}
.card-form textarea { resize: vertical; }
.share-result { margin-top: 16px; }
.share-row { display: flex; align-items: flex-start; gap: 8px; }
.share-row input { flex: 1; min-height: 46px; margin-bottom: 0; }
.greeting .status { min-height: 1.7em; font-size: .88rem; margin: 8px 0 0; }

@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .site-header, .site-footer { padding-block: 18px; }
  .hero { min-height: 445px; }
  .hero-copy { padding: 38px 23px 65px; }
  .hero::after { background: linear-gradient(90deg, #071412c9, #07141254); }
  .feature { flex-wrap: wrap; }
  .greeting { grid-template-columns: 1fr; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
