/* R53 纪念宴会邀请函 v1 · 星辉晚宴 */
:root {
  --primary: #C9A96E; --accent: #F0D78C; --bg: #1A1A2E; --bg-light: #252538;
  --card: #222236; --text: #F5F0E6; --text-muted: #A89F8F; --border: #3D3A50;
  --shadow: 0 4px 32px rgba(0,0,0,.25);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'PingFang SC', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
html.has-mobile-bar body { padding-bottom: calc(8.75rem + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.persona-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; padding: .55rem 1rem; background: var(--card); border-bottom: 1px solid var(--border); }
.persona-btn { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: .82rem; color: var(--text-muted); }
.persona-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(201,169,110,.12); font-weight: 700; }

.top-nav { position: sticky; top: 0; z-index: 200; background: rgba(26,26,46,.92); backdrop-filter: blur(12px); }
.top-nav.is-scrolled { border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.top-nav__row { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; }
.top-nav__brand { font-weight: 700; color: var(--primary); font-size: .88rem; max-width: 36vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-nav__menu { margin-left: auto; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; }
.top-nav__links { display: none; width: 100%; flex-direction: column; gap: .2rem; padding: 0 1rem 1rem; }
.top-nav__links.is-open { display: flex; }
.top-nav__links a { color: var(--text-muted); padding: .45rem .65rem; font-size: .82rem; border-radius: 6px; }
.top-nav__share { border: 1px dashed var(--border) !important; }
@media (min-width: 768px) {
  .top-nav__menu { display: none; }
  .top-nav__links { display: flex !important; flex-direction: row; width: auto; margin-left: auto; padding: 0; }
}

.theme-panel { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 180; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--card); border-radius: 10px; border: 1px solid var(--border); max-height: 300px; overflow-y: auto; }
.theme-appearance-btn, .theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.theme-appearance-btn { background: var(--card); font-size: .72rem; line-height: 22px; text-align: center; }
.theme-dot.active { outline: 2px solid var(--accent); }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: calc(4.25rem + env(safe-area-inset-bottom)); z-index: 840; display: flex; background: var(--card); border-top: 1px solid var(--border); }
.mobile-bar__btn { flex: 1; padding: .55rem .2rem; border: none; background: none; font-size: .66rem; color: var(--text-muted); text-align: center; text-decoration: none; }
.mobile-bar__btn--primary { color: var(--primary); font-weight: 700; }
@media (min-width: 768px) { .mobile-bar { display: none; } html.has-mobile-bar body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }

.contact-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; padding: .45rem .75rem calc(.45rem + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--border); }
.contact-footer__btns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; max-width: 420px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn { padding: .4rem .85rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.contact-footer__cta { background: var(--primary); color: #1A1A2E; border: 1px solid var(--primary); }
.contact-footer__btn { background: var(--bg); border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.contact-footer__brand { text-align: center; font-size: .62rem; color: var(--text-muted); margin-top: .35rem; }

.glass-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.section { padding: 2.5rem 1.25rem; max-width: 720px; margin: 0 auto; position: relative; }
.section__title { font-size: 1.3rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: .35rem; letter-spacing: .04em; }
.section__sub { text-align: center; font-size: .78rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .88rem; border: none; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #1A1A2E; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; margin-top: .5rem; text-align: center; }

.hero { position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center; max-width: none; padding: 0; text-align: center; overflow: hidden; }
.hero__particles { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(26,26,46,.4), var(--bg)); }
.hero__content { position: relative; z-index: 2; padding: 2rem 1.25rem; max-width: 640px; }
.hero__subtitle { font-size: .78rem; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; margin-bottom: .5rem; }
.hero__title { font-size: 1.75rem; font-weight: 800; color: var(--primary); margin-bottom: .5rem; }
.hero__typed { min-height: 1.5rem; font-size: 1rem; color: var(--text); margin-bottom: .75rem; }
.hero__meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.7; }

/* 翻牌倒计时 */
.flip-clock { display: flex; justify-content: center; gap: .65rem; margin: 1rem 0; perspective: 400px; }
.flip-unit { text-align: center; }
.flip-card { position: relative; width: 52px; height: 56px; margin: 0 auto .25rem; border-radius: 8px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.flip-card__top, .flip-card__bottom { display: flex; align-items: center; justify-content: center; height: 50%; font-size: 1.35rem; font-weight: 800; color: var(--accent); background: linear-gradient(180deg, var(--bg-light), var(--card)); }
.flip-card__top { border-bottom: 1px solid var(--border); }
.flip-card.is-flipping .flip-card__top { animation: flipTop .35s ease-in forwards; transform-origin: bottom; }
@keyframes flipTop { to { transform: rotateX(-90deg); opacity: .6; } }
.flip-unit__label { font-size: .65rem; color: var(--text-muted); }
.countdown-label { font-size: .72rem; color: var(--text-muted); margin-bottom: 1rem; }
.countdown-phase { padding: .85rem 1rem; border-radius: 12px; background: rgba(201,169,110,.15); border: 1px solid var(--primary); margin: 1rem 0; font-weight: 600; }
.countdown-phase--live { color: var(--accent); }
.countdown-phase--ended { opacity: .85; }

.photo-masonry { column-count: 2; column-gap: .65rem; }
@media (min-width: 640px) { .photo-masonry { column-count: 3; } }
.photo-item { display: inline-block; width: 100%; margin-bottom: .65rem; break-inside: avoid; border-radius: 10px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.photo-item--tall img { min-height: 220px; object-fit: cover; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-item__year { position: absolute; top: 8px; left: 8px; background: rgba(26,26,46,.75); color: var(--accent); font-size: .68rem; padding: .2rem .45rem; border-radius: 4px; font-weight: 700; }
.photo-item__cap { display: block; padding: .45rem .55rem; font-size: .72rem; background: var(--card); color: var(--text-muted); }

.bless-tabs { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.bless-tab { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-muted); cursor: pointer; font-size: .78rem; }
.bless-tab.active { border-color: var(--primary); color: var(--primary); }
.bless-tab:disabled { opacity: .45; cursor: not-allowed; }
.bless-form { padding: 1rem; margin-bottom: 1rem; }
.bless-form input, .bless-form textarea { width: 100%; margin-bottom: .5rem; padding: .55rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.bless-wall { display: flex; flex-direction: column; gap: .5rem; }
.bless-card { padding: .85rem; }
.bless-card p { font-size: .88rem; line-height: 1.6; }
.bless-card footer { font-size: .72rem; color: var(--text-muted); margin-top: .35rem; }
.blessings-section { position: relative; min-height: 200px; }
.danmaku-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.danmaku-item { position: absolute; right: 0; white-space: nowrap; font-size: .85rem; color: var(--accent); text-shadow: 0 1px 4px rgba(0,0,0,.5); animation: danmaku-move linear forwards; }
@keyframes danmaku-move { from { transform: translateX(100%); } to { transform: translateX(-120vw); } }
.blessings-section--danmaku .bless-wall { opacity: .35; }

.hosts-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.host-card { padding: 1rem; text-align: center; width: 140px; }
.host-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto .5rem; border: 2px solid var(--primary); }
.host-card span { display: block; font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

.guest-swiper { padding-bottom: 2rem !important; }
.guest-card { padding: 1.25rem; text-align: center; min-height: 90px; }
.guest-card span { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.swiper-pagination-bullet-active { background: var(--primary) !important; }

.rsvp-steps { display: flex; justify-content: center; gap: .35rem; margin-bottom: 1rem; }
.rsvp-step { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); font-size: .9rem; opacity: .45; }
.rsvp-step.active { border-color: var(--primary); opacity: 1; background: rgba(201,169,110,.15); }
.rsvp-step.done { opacity: .7; }
.wizard { padding: 1.25rem; }
.wizard h3 { font-size: .95rem; color: var(--primary); margin-bottom: 1rem; text-align: center; }
.wizard label { display: block; font-size: .78rem; margin-bottom: .65rem; }
.wizard input, .wizard select, .wizard textarea { width: 100%; margin-top: .25rem; padding: .55rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.rsvp-options { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.rsvp-opt { padding: .65rem 1rem; border-radius: 10px; border: 2px solid var(--border); background: var(--bg); cursor: pointer; color: var(--text); }
.rsvp-opt.active { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.wizard-nav { display: flex; gap: .5rem; margin-top: 1.25rem; }
.wizard-nav .btn { flex: 1; }
.confirm-card { padding: 1rem; font-size: .85rem; }
.confirm-card p { margin-bottom: .35rem; }

.map-card { overflow: hidden; padding-bottom: 1rem; }
.map-card img { width: 100%; max-height: 180px; object-fit: cover; }
.map-card p { padding: .75rem 1rem 0; font-size: .82rem; color: var(--text-muted); }
.map-card .btn { margin: .75rem 1rem 0; width: calc(100% - 2rem); }

.banquet-toast { position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(26,26,46,.95); color: var(--accent); border: 1px solid var(--primary); padding: .55rem 1rem; border-radius: 999px; font-size: .82rem; z-index: 999; opacity: 0; pointer-events: none; transition: .3s; }
.banquet-toast--show { opacity: 1; }

.share-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg); }
.share-card { max-width: 400px; width: 100%; padding: 1.75rem; text-align: center; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }

@media (max-width: 767px) {
  .theme-panel { top: auto; bottom: calc(7.75rem + env(safe-area-inset-bottom)); transform: none; flex-direction: row; right: 8px; max-height: none; overflow-x: auto; }
}
