:root {
  --ink: #342a22;
  --accent: #913629;
  --paper: #faf1e7;
  --line: #d5c8b9;
  background: var(--paper);
  color: var(--ink);
  font: 100%/1.65 "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box }
body { max-width: 1230px; margin: auto; padding: 0 clamp(20px, 5vw, 80px) }
a { color: inherit }
header, nav, .links, .heading, .controls { display: flex; align-items: center; gap: 24px }
header, .heading, .controls { justify-content: space-between }
header { min-height: 70px; border-bottom: 1px solid var(--line) }
header a { text-decoration: none }
.brand { font-weight: 750 }
.brand span { color: var(--accent); font-size: 1.4em; vertical-align: middle }
h1, h2, p, figure { margin: 0 }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4%; padding: clamp(30px, 5vw, 68px) 0 }
h1, h2 { font-family: "Songti SC", "Noto Serif CJK SC", serif }
h1 { font-size: clamp(3.2rem, 7vw, 6.4rem); line-height: 1.2; letter-spacing: -.05em; color: var(--accent) }
.bio { margin: 1.2rem 0 1.8rem; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.9 }
.links a { text-underline-offset: 5px; font-weight: 650 }
.douyin { padding: 10px 22px; background: var(--ink); color: white; text-decoration: none; border-radius: 24px }
.cover img { width: 100%; height: auto; display: block; aspect-ratio: 5/4; object-fit: cover; border-radius: 46% 46% 4px 4px }
#album, #wishes { border-top: 1px solid var(--line); padding: 36px 0 44px }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.4 }
.heading { margin-bottom: 20px }
.heading span, footer { font-size: .9rem; color: #66584d }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.photos img { width: 100%; height: auto; aspect-ratio: 4/4.5; display: block; object-fit: cover }
.photos a:hover img { filter: brightness(1.05) }
#wishes { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-items: start; padding: clamp(22px, 4vw, 52px); background: #f1e5d9 }
.date, summary { color: var(--accent); font-weight: 700 }
.birthday-intro h2 { margin: .35rem 0 .7rem }
details { margin-top: 18px }
summary, button { cursor: pointer }
details img { display: block; max-width: 100%; margin: 16px 0 }
.timer h2, .birthday-player label { font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.6 }
#clock { display: flex; gap: clamp(8px, 1.4vw, 18px); flex-wrap: wrap; margin: .2rem 0 1.1rem }
#clock b { margin-right: 3px; font: 500 clamp(24px, 3vw, 40px)/1.4 Georgia, serif; font-variant-numeric: tabular-nums }
audio { display: block; width: 100%; margin-top: .5rem }
footer { padding: 24px 0; text-align: center }
dialog { color: var(--ink); background: var(--paper); border: 0; max-width: 94vw; padding: 14px }
dialog::backdrop { background: #231b17ed }
dialog img { display: block; max-width: 85vw; max-height: 68vh; margin: 8px auto; object-fit: contain }
button { font: inherit; background: white; border: 1px solid var(--line); border-radius: 4px; padding: 4px 14px }
#close { display: block; margin-left: auto }
@media (max-width: 680px) {
  header { min-height: 60px }
  .hero, #wishes { grid-template-columns: 1fr; gap: 24px }
  .cover img { aspect-ratio: 4/3; border-radius: 35% 35% 4px 4px }
  .photos { grid-template-columns: repeat(2, 1fr); gap: 8px }
  .heading { gap: 8px }
}
