/* 朱砂雅笺：图画保留纸感，全部宴会信息使用可选择的真实文字。 */
:root {
  color-scheme: light;
  --paper: #f6eedf;
  --red: #9f2024;
  --ink: #342617;
  --muted: #766243;
  --gold: #bc944c;
  --line: #d7bd8d;
  --song: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #e7decc; }
body { margin: 0; color: var(--ink); font-family: var(--song); line-height: 1.8; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7c4922; outline-offset: 5px; }
p, h1, h2 { margin: 0; }
.invitation { width: min(100%, 480px); margin-inline: auto; background: var(--paper); container-type: inline-size; }
.cover { position: relative; width: 100%; aspect-ratio: 853 / 1844; isolation: isolate; overflow: hidden; text-align: center; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; object-fit: fill; }
.cover p, .cover h1, .cover-cta, .cover-rule { position: absolute; margin: 0; }
.cover p, .cover h1 { left: 0; width: 100%; white-space: nowrap; }
.cover-kicker { top: 15.35%; font-family: var(--kai); font-size: 4.5cqw; letter-spacing: .3em; text-indent: .3em; color: #806237; line-height: 1.5; }
.cover h1 { top: 21.75%; font-family: var(--kai); font-size: 18.2cqw; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--red); }
.celebrant { top: 33.0%; font-size: 8.3cqw; font-weight: 600; line-height: 1.4; letter-spacing: .13em; text-indent: .13em; }
.cover-blessing { top: 39.0%; color: #806237; font-family: var(--kai); font-size: 4.7cqw; line-height: 1.6; letter-spacing: .14em; text-indent: .14em; }
.cover-rule { height: 1px; background: var(--gold); left: 34%; width: 32%; opacity: .85; }
.rule-top { top: 19.3%; }
.rule-bottom { top: 68.2%; left: 31.5%; width: 37%; }
.rule-sign { top: 96.5%; left: 39%; width: 22%; }
.cover-date { top: 70.8%; font-size: 5.2cqw; line-height: 1.5; letter-spacing: .035em; }
.cover-time { top: 74.5%; font-size: 5.1cqw; letter-spacing: .13em; line-height: 1.5; }
.cover-venue { top: 78.8%; font-size: 4.9cqw; letter-spacing: .1em; line-height: 1.4; }
.cover-hall { top: 82.0%; font-size: 4.5cqw; letter-spacing: .13em; line-height: 1.4; }
.cover-cta { left: 8%; width: 84%; top: 86.3%; min-height: 44px; height: 5.6%; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff5e3; border: 1px solid #bb8c43; outline: 1px solid #b88e4c; outline-offset: 2px; border-radius: 18px; font-family: var(--kai); font-size: 5.3cqw; letter-spacing: .17em; text-indent: .17em; transition: background .2s, transform .2s; }
.cover-cta:hover { background: #85151b; }
.cover-cta:active { transform: translateY(1px); }
.cover-sign { top: 93.5%; font-family: var(--kai); color: #806237; font-size: 4cqw; letter-spacing: .25em; text-indent: .25em; }
.section { padding: 56px 30px; text-align: center; }
.section-eyebrow { font-family: var(--kai); font-size: 14px; color: var(--muted); letter-spacing: .15em; margin-bottom: 12px; }
h2 { color: var(--red); font-weight: 600; font-size: 28px; line-height: 1.45; letter-spacing: .1em; }
.small-rule { height: 1px; width: 58px; background: var(--gold); margin: 25px auto; }
.letter { padding-top: 45px; }
.letter h2 { font-size: clamp(21px, 5.55cqw, 26px); letter-spacing: .025em; }
.letter-copy { margin: 0 auto; max-width: 330px; font-size: 18px; line-height: 2.05; }
.letter-copy p + p { margin-top: 22px; }
.letter-copy .letter-sign { font-family: var(--kai); color: var(--muted); letter-spacing: .15em; margin-top: 28px; }
.countdown-block { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 28px; }
#countdown-label { color: var(--muted); font-size: 15px; letter-spacing: .1em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px auto 0; max-width: 330px; }
.countdown > div { display: flex; flex-direction: column; align-items: center; }
.count-value { color: var(--red); font-family: "Baskerville", "Times New Roman", var(--song); font-size: 38px; font-variant-numeric: tabular-nums; line-height: 1.2; min-width: 2ch; }
.count-unit { color: var(--muted); font-size: 13px; margin-top: 6px; }
.banquet { background: #f1e6d4; scroll-margin-top: 18px; }
.banquet:focus { outline: none; }
.date-mark { display: flex; justify-content: center; gap: 15px; align-items: center; font-family: "Baskerville", "Times New Roman", var(--song); color: var(--red); font-size: 62px; line-height: 1.3; margin: 22px 0 10px; font-variant-numeric: lining-nums; }
.date-slash { font-size: 34px; color: var(--gold); font-weight: 400; }
.date-full { font-size: 18px; white-space: nowrap; }
.lunar-date { font-size: 14px; color: var(--muted); margin-top: 5px; }
.calendar { margin-top: 27px; border-top: 1px solid var(--line); padding-top: 18px; }
.calendar table { width: 100%; table-layout: fixed; border-collapse: collapse; font-family: var(--ui); font-size: 15px; font-variant-numeric: tabular-nums; }
.calendar caption { color: var(--muted); font-size: 13px; padding-bottom: 16px; letter-spacing: .12em; }
.calendar th { font-size: 13px; color: var(--muted); font-weight: 400; height: 36px; }
.calendar td { height: 42px; text-align: center; position: relative; }
.calendar .is-event { color: #fff8ed; background: var(--red); border-radius: 50%; font-weight: 600; }
.dinner-time { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 27px; padding: 20px 0; display: flex; flex-direction: column; gap: 4px; }
.dinner-time span { font-size: 14px; color: var(--muted); letter-spacing: .15em; }
.dinner-time strong { color: var(--red); font-family: "Baskerville", "Times New Roman", var(--song); font-size: 44px; line-height: 1.5; font-weight: 400; }
.venue { padding-top: 57px; padding-bottom: 50px; }
.venue-name { font-size: 28px; line-height: 1.65; letter-spacing: .12em; }
.hall-name { color: var(--red); font-size: 20px; margin-top: 17px; letter-spacing: .1em; }
address { font-size: 17px; font-style: normal; line-height: 1.9; color: var(--muted); margin: 18px 0 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 22px; border: 1px solid var(--red); border-radius: 8px; font-family: var(--ui); font-size: 16px; line-height: 1.5; letter-spacing: .035em; transition: background .2s; }
.button-primary { background: var(--red); color: #fff8ed; width: 100%; }
.button-primary:hover { background: #85151b; }
.button-outline { background: transparent; color: var(--red); border-color: #b37d61; }
.button-outline:hover { background: #eee0c9; }
.text-button { display: block; background: none; border: 0; padding: 12px 20px; color: var(--red); margin: 5px auto 0; min-height: 46px; text-decoration: underline; text-underline-offset: 5px; font-family: var(--ui); font-size: 14px; }
.map-note { color: var(--muted); font-size: 12px; font-family: var(--ui); margin-top: 2px; }
.closing { background: #eee1cc; padding-top: 40px; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.closing .small-rule { margin-top: 0; }
.closing-word { font-family: var(--kai); font-size: 17px; color: var(--muted); letter-spacing: .06em; }
.closing h2 { margin-top: 10px; font-size: 31px; }
.closing-date { font-family: "Baskerville", "Times New Roman", var(--song); font-size: 21px; color: var(--muted); letter-spacing: .15em; margin-top: 19px; }
.closing-sign { font-family: var(--kai); font-size: 17px; letter-spacing: .2em; margin-top: 17px; color: var(--muted); }
.footer-actions { display: flex; justify-content: center; gap: 12px; margin-top: 29px; }
.footer-actions > * { flex: 1; padding-inline: 12px; font-size: 14px; }
.toast { position: fixed; bottom: max(24px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translate(-50%, 15px); width: max-content; max-width: min(88vw, 400px); padding: 14px 20px; border-radius: 8px; color: #fff7eb; background: #44311f; font-family: var(--ui); font-size: 14px; line-height: 1.7; text-align: center; opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s; z-index: 20; pointer-events: none; }
.toast.show, .toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
dialog { width: min(90vw, 390px); padding: 26px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
dialog::backdrop { background: #23180d88; }
dialog h2 { font-size: 23px; margin-bottom: 15px; }
dialog label { font-family: var(--ui); font-size: 14px; display: block; margin-bottom: 10px; }
dialog input { width: 100%; padding: 12px; border: 1px solid #b99566; color: var(--ink); background: #fffaf2; border-radius: 6px; font-family: var(--ui); font-size: 15px; margin-bottom: 20px; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 10px 16px; background: white; color: #7e151a; transform: translateY(-200%); z-index: 30; font-family: var(--ui); }
.skip-link:focus { transform: translateY(0); }
@media (min-width: 600px) { .invitation { box-shadow: 0 0 50px #4f3a1714; } }
@media (max-width: 359px) { .section { padding-inline: 22px; } .letter-copy { font-size: 16px; } .date-full { font-size: 16px; } .footer-actions { gap: 8px; } .cover-cta { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { html { background: var(--paper); } .invitation { width: 100%; max-width: 480px; box-shadow: none; } .skip-link, .toast, dialog { display: none; } .section { break-inside: avoid; } }
