:root {
  color-scheme: light;
  --ink: #392b35;
  --muted: #6d5d67;
  --accent: #9b3b55;
  --line: #e7dce1;
  --paper: #fffdfd;
  --serif: "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fbf8f9;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 72% 8%, #f8e5ed99, transparent 42rem),
    linear-gradient(#96808f12 1px, transparent 1px),
    linear-gradient(90deg, #96808f12 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; top: 10px; left: 12px; transform: translateY(-150%); z-index: 2; background: white; padding: .75rem; }
.skip:focus { transform: none; }
.top, main, footer { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.top { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: grid; gap: 4px; white-space: nowrap; }
.wordmark > span { font-family: var(--serif); font-size: 1.48rem; font-weight: 700; }
.word-heart { color: var(--accent); font-family: Georgia, serif; font-size: .8em; }
.wordmark small { color: var(--muted); font-size: .72rem; letter-spacing: .14em; }
nav { display: flex; align-items: center; padding: 5px; gap: 2px; border: 1px solid var(--line); border-radius: 99px; background: #fffafddd; }
nav a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 99px; font-size: .86rem; white-space: nowrap; }
nav a:hover, nav a[aria-current] { background: #f2e4eb; color: var(--accent); }
nav .home-link { width: 40px; padding: 0; background: #f3e4ec; color: var(--accent); }
nav .home-link[aria-current] { color: white; background: var(--accent); }
nav .home-link[aria-current] svg { fill: currentColor; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; padding: 47px 0 54px; }
.eyebrow { margin: 0 0 13px; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .13em; }
.eyebrow > span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; background: var(--accent); border-radius: 50%; vertical-align: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); }
.hero h1 { font-size: clamp(4.5rem, 8vw, 8rem); line-height: 1.05; letter-spacing: -.085em; }
.hero h1 span { font-size: .44em; color: var(--accent); margin-inline: .19em; letter-spacing: 0; }
.hero-line { margin: 23px 0 11px; font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: .05em; }
.intro { max-width: 24rem; color: var(--muted); margin: 0 0 24px; line-height: 1.85; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: .87rem; font-weight: 700; }
.text-link:hover, .date-link:hover { text-decoration: underline; }
.hero-art { position: relative; height: 310px; min-width: 0; isolation: isolate; overflow: hidden; border: 1px solid #eedee4; border-radius: 44% 44% 16% 16% / 48% 48% 16% 16%; background: radial-gradient(ellipse at 60% 80%, #f6cedb, transparent 70%), linear-gradient(135deg, #fffbfb, #f5e4ee); }
.orbit { position: absolute; left: 11%; right: 11%; top: 14%; bottom: 18%; border: 1px solid #a54e7238; border-radius: 50%; transform: rotate(-25deg); }
.orbit-b { transform: rotate(25deg); }
.portrait { position: absolute; width: 34%; min-width: 90px; max-width: 163px; top: 17%; padding: 8px 8px 10px; background: var(--paper); border: 1px solid #eadce3; box-shadow: 0 15px 30px #6643581c; text-align: center; border-radius: 10px; }
.portrait div { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 5px; font: 700 clamp(2.5rem, 5vw, 4rem) var(--serif); }
.portrait small { display: block; margin-top: 8px; font-size: .62rem; font-weight: 700; letter-spacing: .2em; color: var(--muted); }
.xuan { right: 49%; transform: rotate(-11deg); }
.xuan div { color: #5b435c; background: linear-gradient(145deg, #eee2f1, #d7bbd9); }
.qian { left: 49%; top: 27%; transform: rotate(12deg); }
.qian div { color: #8d3855; background: linear-gradient(145deg, #fae1e5, #efb9ca); }
.art-star, .art-heart { position: absolute; color: var(--accent); font: 2.6rem Georgia, serif; }
.art-star { left: 12%; top: 24%; }
.art-heart { right: 13%; top: 17%; transform: rotate(14deg); }
.art-dot { position: absolute; left: 17%; bottom: 24%; width: 7px; height: 7px; background: #ae6688; border-radius: 50%; }
.art-caption { position: absolute; right: 0; bottom: 16px; left: 0; text-align: center; color: #6d5061; font-size: .65rem; font-weight: 700; letter-spacing: .17em; }
.counter-card { overflow: hidden; border: 1px solid var(--line); border-radius: 25px; background: #fffdfde8; box-shadow: 0 12px 40px #5338490a; }
.counter-bar { padding: 13px 23px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.counter-bar i { width: 8px; height: 8px; background: #d88ea5; border-radius: 50%; }
.counter-bar i:nth-child(2) { background: #ddad81; }
.counter-bar i:nth-child(3) { background: #a2b49d; }
.counter-bar span { margin-left: auto; color: var(--muted); font-size: .63rem; letter-spacing: .13em; }
.counter-content { display: grid; grid-template-columns: 1fr minmax(0, 1.45fr); gap: 24px; align-items: center; padding: 26px 32px; }
.counter-content h2 { font-size: clamp(1.25rem, 2.8vw, 2rem); }
#counter-caption { color: var(--muted); margin: 10px 0; font-size: .9rem; }
.date-link { padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: .84rem; }
.digits { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); text-align: center; }
.digits > div + div { border-left: 1px solid var(--line); }
.digits strong { display: block; font: 400 clamp(2rem, 5vw, 4.2rem)/1.15 Georgia, serif; color: #664050; font-variant-numeric: tabular-nums; }
.digits small { color: var(--muted); font-size: .69rem; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
.collection { margin: 58px 0 60px; }
.collection-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 20px; }
.collection-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.collection-head > p { color: var(--muted); margin: 0; font-size: .9rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.tile { min-height: 165px; padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: #fbebef; position: relative; transition: transform .18s, box-shadow .18s; }
.tile-album { background: #eee9f4; margin-top: 11px; }
.tile-wishes { background: #f2ede6; margin-top: 22px; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 10px 25px #53384912; }
.tile-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #69556633; border-radius: 12px; margin-bottom: 14px; }
.tile small { color: var(--muted); font-size: .65rem; letter-spacing: .11em; }
.tile h3 { font-size: 1.4rem; margin-top: 3px; }
.tile p { color: var(--muted); margin: 7px 0 0; font-size: .85rem; padding-right: 12px; }
.tile-arrow { position: absolute; right: 17px; top: 22px; }
footer { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-block: 19px 28px; color: var(--muted); }
footer > span { color: var(--ink); font: 700 1.1rem var(--serif); }
footer b { color: var(--accent); }
footer a { margin-left: auto; font-size: .8rem; }
.about, #journal { margin-block: 42px 62px; min-height: 45vh; }
.about { background: var(--paper); padding: clamp(20px, 5vw, 48px); border: 1px solid var(--line); border-radius: 24px; }
.about h1, .journal-head h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.about p:not(.eyebrow) { color: var(--muted); line-height: 1.75; max-width: 42rem; }
dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); color: var(--ink); background: var(--paper); border-radius: 20px; padding: 26px; box-shadow: 0 18px 80px #52354842; }
dialog::backdrop { background: #38273755; }
dialog label { display: block; margin: 18px 0 6px; font-weight: 700; }
.dialog-actions { display: flex; gap: 8px; justify-content: end; }
.dialog-actions button, .journal-submit { border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; background: white; color: var(--ink); }
.dialog-actions .primary, .journal-submit { background: var(--accent); color: white; border-color: var(--accent); }
.journal-head { margin-bottom: 22px; }
.journal-kicker { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .13em; }
.journal-intro, .journal-note { color: var(--muted); line-height: 1.65; }
.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.journal-card { min-width: 0; padding: clamp(16px, 3vw, 26px); border: 1px solid var(--line); background: var(--paper); border-radius: 20px; }
.journal-form { display: grid; gap: 12px; }
.journal-field { display: grid; gap: 6px; color: var(--ink); font-size: .89rem; }
.journal-field input, .journal-field textarea, .journal-field select, #date-input { width: 100%; min-width: 0; border: 1px solid #dac9d2; border-radius: 8px; color: var(--ink); background: #fffbfd; padding: 9px; }
.journal-field textarea { resize: vertical; }
.journal-submit { justify-self: start; }
.journal-list, .journal-album { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.journal-entry, .journal-photo, .journal-wish { padding: 12px; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; }
.journal-entry p { white-space: pre-wrap; }
.journal-entry-meta { color: var(--muted); font-size: .8rem; }
.journal-empty { color: var(--muted); margin-block: 12px 0; }
.journal-album { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.journal-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.journal-remove { margin-top: 5px; border: 0; background: transparent; color: var(--accent); padding: 4px; }
.journal-error, #date-error { color: #a11f43; font-size: .85rem; }
@media (max-width: 760px) {
  .top, main, footer { width: min(100% - 36px, 580px); }
  .top { flex-direction: column; align-items: start; gap: 13px; min-height: auto; padding-top: 20px; }
  .wordmark { display: flex; align-items: baseline; gap: 8px; }
  nav { width: 100%; justify-content: space-between; }
  nav a { gap: 2px; padding: 0 7px; font-size: .76rem; min-height: 36px; }
  nav a:not(.home-link) svg { display: none; }
  nav .home-link { width: 36px; }
  .hero { padding-block: 33px 28px; gap: 23px; }
  .hero h1 { font-size: clamp(3.55rem, 12vw, 5.4rem); }
  .hero-art { height: 236px; }
  .portrait { top: 20%; }
  .qian { top: 31%; }
  .counter-content { padding: 20px; gap: 18px; grid-template-columns: 1fr; }
  .tiles { gap: 8px; }
  .tile { padding: 11px; min-height: 151px; }
  .tile-arrow { top: 17px; right: 9px; width: .9rem; height: .9rem; }
  .journal-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { height: 220px; }
  .portrait { width: 31%; max-width: 111px; top: 17%; }
  .qian { top: 28%; }
  .hero-line { margin-top: 16px; }
  .intro { margin-bottom: 15px; }
  .collection-head { display: block; }
  .collection-head > p { margin-top: 7px; }
  .tile p { padding-right: 0; font-size: .76rem; }
  .tile small { font-size: .58rem; }
  .counter-bar { padding-inline: 16px; }
  .digits small { font-size: .61rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
