/* =========================================================
   SOBA – Trang thiệp cưới (theme qua biến CSS)
   ========================================================= */
:root {
  --bg: #fff6f8; --surface: #fff; --ink: #4a2533; --muted: #8a6573; --accent: #d04a78; --accent2: #f4b6c8; --line: #f1d3dc;
  --f-display: 'Dancing Script', cursive; --f-heading: 'Playfair Display', serif; --f-body: 'Be Vietnam Pro', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.paper { position: relative; max-width: 520px; margin: 0 auto; background: var(--bg); min-height: 100vh; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(0, 0, 0, .25); overflow: hidden; }
@media (min-width: 560px) { body { background: color-mix(in srgb, var(--bg) 70%, var(--accent2)); } }

.sec { position: relative; padding: 64px 28px; text-align: center; }
.sec + .sec::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 36px; background: linear-gradient(var(--line), transparent); }
.sec-title { font-family: var(--f-display); font-size: 40px; line-height: 1.1; color: var(--accent); margin: 0 0 6px; font-weight: 600; }
.sec-sub { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px; }
.orn { width: 180px; height: 34px; margin: 0 auto 18px; color: var(--accent); opacity: .85; }
.orn.flip { transform: rotate(180deg); margin: 18px auto 0; }
h1, h2, h3 { font-family: var(--f-heading); font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }

/* ===== Cover / mở thiệp ===== */
.cover { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity .9s var(--ease), visibility .9s; overflow: hidden; }
.cover.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.cover-inner { position: relative; width: min(92vw, 420px); text-align: center; padding: 24px; }
.cover-guest { font-size: 14px; color: var(--muted); letter-spacing: .04em; margin-bottom: 4px; }
.cover-guest strong { display: block; font-family: var(--f-display); font-size: 30px; color: var(--accent); font-weight: 600; line-height: 1.3; letter-spacing: 0; margin-top: 2px; }
.cover-names { text-wrap: balance; font-family: var(--f-display); font-size: 44px; line-height: 1.1; color: var(--accent); margin: 18px 0 6px; font-weight: 600; }
.cover-date { font-family: var(--f-heading); letter-spacing: .25em; color: var(--ink); font-size: 15px; }
.open-btn { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 14px 30px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; cursor: pointer; box-shadow: 0 12px 28px -12px var(--accent); animation: breathe 2.4s ease-in-out infinite; }
.open-btn:hover { filter: brightness(1.05); }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* Envelope */
.envelope { position: relative; width: 300px; height: 200px; margin: 26px auto 0; perspective: 900px; }
.env-back { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent2) 70%, #fff); border-radius: 10px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .3); }
.env-letter { position: absolute; left: 16px; right: 16px; top: 14px; bottom: 10px; background: var(--surface); border-radius: 6px; display: grid; place-items: center; font-family: var(--f-display); font-size: 26px; color: var(--accent); transition: transform 1s var(--ease) .35s; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.env-front { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; pointer-events: none; }
.env-front::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent2) 85%, #fff); clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 60%; background: color-mix(in srgb, var(--accent2) 60%, var(--accent)); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .7s var(--ease); z-index: 3; }
.env-seal { position: absolute; left: 50%; top: 52%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent)); z-index: 4; display: grid; place-items: center; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: opacity .3s; }
.env-seal .ic { width: 24px; height: 24px; fill: #fff; stroke: none; }
.cover.is-opening .env-flap { transform: rotateX(180deg); z-index: 1; }
.cover.is-opening .env-seal { opacity: 0; }
.cover.is-opening .env-letter { transform: translateY(-90px); z-index: 2; }

/* Monogram */
.monogram { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center; position: relative; }
.monogram::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 1px solid var(--line); }
.monogram span { font-family: var(--f-heading); font-size: 50px; color: var(--accent); letter-spacing: .02em; font-style: italic; }

/* Film */
.cover.is-film { background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, var(--bg)), var(--bg) 60%); }
.cover.is-film::before, .cover.is-film::after { content: ''; position: absolute; left: 0; right: 0; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, .1) 18px 30px); }
.cover.is-film::before { top: 18px; }
.cover.is-film::after { bottom: 18px; }
.film-kicker { font-size: 12px; letter-spacing: .5em; text-transform: uppercase; color: var(--accent2); }
.cover.is-film .cover-names { font-family: var(--f-heading); font-style: italic; font-weight: 500; text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 60%, transparent); }

/* Hỷ */
.hy-char { font-family: 'Noto Serif', serif; font-size: 110px; line-height: 1; color: var(--accent); text-shadow: 0 2px 0 color-mix(in srgb, var(--accent2) 60%, transparent); }
.cover.is-hy { background: radial-gradient(90% 60% at 50% 40%, #fff, var(--bg)); }
.cover.is-hy .cover-inner { border: 1.5px solid var(--accent2); outline: 1px solid var(--accent2); outline-offset: 6px; padding: 40px 24px; }

/* Letter */
.cover.is-letter { background: var(--bg) linear-gradient(transparent 0 31px, var(--line) 31px 32px) 0 0 / 100% 32px; }
.wax { width: 76px; height: 76px; margin: 22px auto 0; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent) 70%); color: #fff; font-family: var(--f-display); font-size: 34px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25), inset 0 -4px 8px rgba(0, 0, 0, .15); }

.cover.is-leaving .cover-inner { animation: coverOut .9s var(--ease) forwards; }
@keyframes coverOut { to { transform: scale(1.06); opacity: 0; } }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 56px 24px 64px; text-align: center; color: var(--ink); overflow: hidden; }
.hero.has-photo { color: #fff; }
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: kenburns 18s ease-out forwards; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .55)); }
@keyframes kenburns { to { transform: scale(1); } }
.hero > *:not(.hero-photo) { position: relative; z-index: 1; }
.hero:not(.has-photo) { justify-content: center; }
.hero-kicker { font-size: 13px; letter-spacing: .4em; text-transform: uppercase; opacity: .9; margin-bottom: 14px; }
.hero-names { font-family: var(--f-display); font-size: clamp(54px, 15vw, 76px); line-height: 1.02; color: var(--accent); font-weight: 600; }
.hero.has-photo .hero-names { color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.hero-amp { font-family: var(--f-display); font-size: 40px; opacity: .85; margin: 2px 0; }
.hero-date { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; font-family: var(--f-heading); }
.hero-date .d { font-size: 46px; line-height: 1; font-weight: 600; }
.hero-date .side { font-size: 13px; letter-spacing: .25em; text-transform: uppercase; padding: 6px 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; min-width: 86px; }
.hero-lunar { margin-top: 10px; font-size: 14px; font-style: italic; opacity: .85; }
.scroll-hint { margin-top: 36px; width: 26px; height: 40px; border-radius: 14px; border: 1.5px solid currentColor; opacity: .7; position: relative; }
.scroll-hint::after { content: ''; position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: currentColor; transform: translateX(-50%); animation: scrolly 1.8s infinite; }
@keyframes scrolly { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ===== Invitation ===== */
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 30px; font-size: 14.5px; }
.families h3 { font-family: var(--f-body); font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
.families p { margin: 0; color: var(--ink); }
.invite-to { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.invite-guest { font-family: var(--f-display); font-size: 36px; color: var(--accent); line-height: 1.2; margin: 6px 0 14px; font-weight: 600; }
.invite-msg { color: var(--muted); max-width: 380px; margin: 0 auto; }
.couple-line { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 30px; }
.couple-line .n { font-family: var(--f-display); font-size: 34px; color: var(--ink); font-weight: 600; }
.couple-line .heart { color: var(--accent); }
.couple-line .heart .ic { fill: currentColor; stroke: none; width: 20px; height: 20px; }

/* ===== Countdown + calendar ===== */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 380px; margin: 0 auto 36px; }
.cd { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 4px; }
.cd b { display: block; font-family: var(--f-heading); font-size: 30px; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.cd span { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.cal { max-width: 340px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.cal-head { font-family: var(--f-heading); font-size: 18px; margin-bottom: 14px; letter-spacing: .05em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 13.5px; }
.cal-grid .wd { font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 6px; }
.cal-grid .day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; position: relative; }
.cal-grid .day.is-wed { color: #fff; font-weight: 700; }
.cal-grid .day.is-wed::before { content: ''; position: absolute; inset: 2px; z-index: -1; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.cal-grid .day.is-wed { z-index: 0; isolation: isolate; }

/* ===== Couple ===== */
.people { display: grid; gap: 34px; }
.person-photo { width: 190px; height: 240px; margin: 0 auto 16px; border-radius: 100px 100px 16px 16px; overflow: hidden; background: color-mix(in srgb, var(--accent2) 45%, var(--surface)); display: grid; place-items: center; border: 6px solid var(--surface); box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .35); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .ph { font-family: var(--f-display); font-size: 70px; color: var(--accent); }
.person-role { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.person-name { font-family: var(--f-display); font-size: 40px; color: var(--accent); font-weight: 600; line-height: 1.2; }
.person-intro { color: var(--muted); max-width: 340px; margin: 6px auto 0; font-size: 15px; }

/* ===== Story ===== */
.timeline { position: relative; text-align: left; max-width: 400px; margin: 0 auto; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl { position: relative; padding-bottom: 28px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: -27px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl-year { font-size: 13px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.tl h3 { font-size: 19px; margin: 2px 0 6px; }
.tl p { color: var(--muted); margin: 0; font-size: 15px; }
.quote { font-family: var(--f-heading); font-style: italic; font-size: 21px; line-height: 1.5; max-width: 380px; margin: 0 auto; color: var(--ink); }
.quote::before, .quote::after { color: var(--accent); font-size: 1.4em; }
.quote::before { content: '“'; }
.quote::after { content: '”'; }

/* ===== Events ===== */
.events { display: grid; gap: 20px; }
.event { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px; text-align: center; box-shadow: 0 16px 32px -24px rgba(0, 0, 0, .25); }
.event h3 { font-family: var(--f-display); font-size: 34px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.event-time { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 15px; margin-bottom: 12px; }
.event-time span { display: inline-flex; align-items: center; gap: 6px; }
.event-time .ic { color: var(--accent); }
.event-venue { font-weight: 600; font-size: 17px; }
.event-addr { color: var(--muted); font-size: 14.5px; margin: 4px 0 16px; }
.event-map { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; margin-bottom: 14px; background: color-mix(in srgb, var(--accent2) 20%, var(--surface)); }
.event-map iframe { width: 100%; height: 100%; border: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .2s, filter .2s; }
.btn:hover { filter: brightness(1.06); color: #fff; }
.btn:active { transform: scale(.98); }
.btn-line { background: transparent; color: var(--accent); }
.btn-line:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ===== Album ===== */
.album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.album button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 3/4; background: var(--line); }
.album button:nth-child(3n + 1) { grid-column: span 2; aspect-ratio: 4/3; }
.album img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.album button:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(15, 8, 12, .92); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 8px; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ===== Forms ===== */
.form { display: grid; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 20px; }
.field { display: grid; gap: 6px; }
.field label, .legend { font-size: 14px; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 14px; cursor: pointer; transition: all .2s; background: var(--bg); }
.seg input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--accent2); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-msg { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; display: none; }
.form-msg.ok { display: block; background: color-mix(in srgb, #1f8a5b 12%, var(--surface)); color: #17603f; }
.form-msg.err { display: block; background: color-mix(in srgb, #c0352b 10%, var(--surface)); color: #9c2a21; }
.dark .form-msg.ok { color: #9be0bd; }
.dark .form-msg.err { color: #ffb4ab; }

/* ===== Wishes ===== */
.wishes { display: grid; gap: 12px; margin-top: 22px; max-height: 460px; overflow-y: auto; text-align: left; padding: 4px; }
.wish { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; animation: popIn .4s var(--ease); }
.wish strong { color: var(--accent); font-size: 15px; }
.wish p { margin: 4px 0 0; font-size: 15px; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } }

/* ===== Gift ===== */
.gift-cards { display: grid; gap: 16px; }
.gift { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.gift h3 { font-family: var(--f-display); font-size: 28px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.gift img { width: 220px; margin: 0 auto 14px; border-radius: 12px; background: #fff; padding: 6px; }
.gift .acc { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--f-heading); font-size: 20px; letter-spacing: .06em; }
.copy-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: inline-grid; place-items: center; cursor: pointer; color: var(--accent); }
.gift small { color: var(--muted); display: block; }

/* ===== Footer ===== */
.thanks { padding: 80px 28px 100px; text-align: center; }
.thanks .big { font-family: var(--f-display); font-size: 50px; color: var(--accent); line-height: 1.1; font-weight: 600; }
.made-by { display: inline-flex; align-items: center; gap: 6px; margin-top: 30px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); text-decoration: none; }
.made-by b { color: var(--accent); letter-spacing: .1em; }

/* ===== Music button ===== */
.music-btn { position: fixed; right: max(16px, calc(50% - 260px + 16px)); bottom: 18px; z-index: 40; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -10px var(--accent); }
.music-btn.is-playing .ic { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quick-nav { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 39; display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .4s; }
.quick-nav.is-on { opacity: 1; pointer-events: auto; }
.quick-nav a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.quick-nav a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

/* Petals */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.petal { position: absolute; top: -30px; width: 14px; height: 12px; background: var(--accent2); border-radius: 12px 0 12px 0; opacity: .8; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx, 60px), 110vh) rotate(var(--rot, 540deg)); } }

/* Reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 16px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: all .3s; z-index: 90; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Watermark ribbon for preview */
.preview-ribbon { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 999px; pointer-events: none; }

/* Theme: dark */
.dark .event, .dark .cd, .dark .cal, .dark .form, .dark .wish, .dark .gift { box-shadow: none; }
.dark .cover.is-film .cover-names { color: #fff; }

/* Ornament variations */
.ornament-hy .sec-title { font-family: var(--f-heading); font-style: italic; font-weight: 500; font-size: 34px; }
.cover-hy-sub { letter-spacing: .3em; text-transform: uppercase; font-size: 12px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  .petals { display: none; }
}

.paused { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.cd b, .hero-date, .cover-date, .cal, .gift .acc, .tl-year, .event-time { font-variant-numeric: lining-nums; }

/* ===== Bìa poster (thịnh hành) ===== */
.cover.is-poster { background: linear-gradient(180deg, var(--bg) 50%, color-mix(in srgb, var(--accent2) 55%, var(--bg)) 100%); }
.poster-title { font-family: var(--f-heading); font-weight: 700; text-transform: uppercase; font-size: clamp(46px, 15vw, 64px); line-height: .92; color: var(--accent); letter-spacing: -.01em; text-wrap: balance; }
.poster-art { width: 190px; height: 228px; margin: 14px auto 6px; color: var(--ink); }
.poster-art .couple-art, .hero-arch .couple-art { width: 100%; height: 100%; }
.cover.is-poster .poster-names { font-size: 30px; color: var(--ink); margin-top: 4px; }
/* Hero minh hoạ khi chưa có ảnh bìa */
.hero-arch { width: 210px; height: 270px; margin: 0 auto 22px; border-radius: 110px 110px 18px 18px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; color: var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--accent2) 45%, var(--surface)), var(--accent2)); box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line), 0 24px 50px -24px rgba(0, 0, 0, .35); }
.hero-arch .couple-art { width: 88%; height: 86%; }
.hero-photo ~ .hero-kicker { margin-top: 0; }
