/* ==========================================================================
   کارت دعوت عروسی — استایل بخش مهمان
   فونت‌ها از خود هاست لود می‌شوند؛ راهنما در assets/fonts/README.md
   ========================================================================== */

/*
 * وزیرمتن به شکل فونت متغیر لود می‌شود: یک فایل، همه‌ی ضخامت‌ها از ۱۰۰ تا ۹۰۰.
 * فایل‌های تک‌ضخامتی هم برای مرورگرهای قدیمی کنار آن هستند.
 */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
         url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "VazirmatnStatic";
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "VazirmatnStatic";
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
/* ---------- فونت‌های دیگر (همه با لایسنس آزاد SIL، ساخته‌ی صابر راستی‌کردار) ---------- */
@font-face { font-family: "Shabnam"; src: url("../fonts/Shabnam-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Shabnam"; src: url("../fonts/Shabnam.woff2") format("woff2");       font-weight: 400; font-display: swap; }
@font-face { font-family: "Shabnam"; src: url("../fonts/Shabnam-Bold.woff2") format("woff2");  font-weight: 700; font-display: swap; }
@font-face { font-family: "Samim";   src: url("../fonts/Samim.woff2") format("woff2");         font-weight: 400; font-display: swap; }
@font-face { font-family: "Samim";   src: url("../fonts/Samim-Bold.woff2") format("woff2");    font-weight: 700; font-display: swap; }
@font-face { font-family: "Sahel";   src: url("../fonts/Sahel-Light.woff2") format("woff2");   font-weight: 300; font-display: swap; }
@font-face { font-family: "Sahel";   src: url("../fonts/Sahel.woff2") format("woff2");         font-weight: 400; font-display: swap; }
@font-face { font-family: "Sahel";   src: url("../fonts/Sahel-Bold.woff2") format("woff2");    font-weight: 700; font-display: swap; }
@font-face { font-family: "Tanha";   src: url("../fonts/Tanha.woff2") format("woff2");         font-weight: 400; font-display: swap; }

@font-face {
    font-family: "Nastaliq";
    src: url("../fonts/NotoNastaliqUrdu-Regular.woff2") format("woff2");
    font-display: swap;
}

:root {
    --font-body: "Vazirmatn", "VazirmatnStatic", "Vazir", Tahoma, system-ui, sans-serif;
    --font-display: "Vazirmatn", Tahoma, sans-serif;
}
[data-font="shabnam"] { --font-body: "Shabnam", Tahoma, sans-serif; }
[data-font="samim"]   { --font-body: "Samim", Tahoma, sans-serif; }
[data-font="sahel"]   { --font-body: "Sahel", Tahoma, sans-serif; }
[data-font="tanha"]   { --font-body: "Tanha", Tahoma, sans-serif; }

[data-display="shabnam"]  { --font-display: "Shabnam", Tahoma, sans-serif; }
[data-display="samim"]    { --font-display: "Samim", Tahoma, sans-serif; }
[data-display="sahel"]    { --font-display: "Sahel", Tahoma, sans-serif; }
[data-display="tanha"]    { --font-display: "Tanha", Tahoma, sans-serif; }
[data-display="nastaliq"] { --font-display: "Nastaliq", "Vazirmatn", serif; }

/* عددهای فارسی برای شماره‌گذاری خودکار بخش‌ها */
@counter-style fa {
    system: numeric;
    symbols: "\06F0" "\06F1" "\06F2" "\06F3" "\06F4" "\06F5" "\06F6" "\06F7" "\06F8" "\06F9";
    pad: 2 "\06F0";
}

/* ---------- قالب‌های رنگی ---------- */
:root,
[data-theme="editorial"] {
    --bg: #0f0f10;
    --panel: #161618;
    --panel-2: #1d1d20;
    --fg: #faf9f6;
    --muted: #9aa3a8;
    --accent: #9e8045;
    --accent-soft: rgba(158, 128, 69, .25);
    --line: rgba(158, 128, 69, .22);
    --sheet: #faf9f6;
    --sheet-fg: #161618;
    --sheet-line: rgba(22, 22, 24, .18);
    --yes: #3f7d5c;
    --no: #9b4a4a;
}
[data-theme="blue"] {
    --bg: #070f18;
    --panel: #0d1927;
    --panel-2: #12212f;
    --fg: #f1f6fa;
    --muted: #8ea2b4;
    --accent: #8fb3d0;
    --accent-soft: rgba(143, 179, 208, .22);
    --line: rgba(143, 179, 208, .22);
    --sheet: #f4f8fb;
    --sheet-fg: #0d1927;
    --sheet-line: rgba(13, 25, 39, .16);
    --yes: #3d7d6d;
    --no: #9c5560;
}
[data-theme="garden"] {
    --bg: #0a1310;
    --panel: #10201a;
    --panel-2: #152a22;
    --fg: #f3f2e8;
    --muted: #97ab9e;
    --accent: #c0a24e;
    --accent-soft: rgba(192, 162, 78, .22);
    --line: rgba(192, 162, 78, .22);
    --sheet: #f5f3ea;
    --sheet-fg: #10201a;
    --sheet-line: rgba(16, 32, 26, .16);
    --yes: #3f7d5c;
    --no: #9b4a4a;
}
[data-theme="blush"] {
    --bg: #efe6df;
    --panel: #fbf5f0;
    --panel-2: #f5ebe4;
    --fg: #3a2e2b;
    --muted: #8a7570;
    --accent: #b8766a;
    --accent-soft: rgba(184, 118, 106, .2);
    --line: rgba(184, 118, 106, .28);
    --sheet: #ffffff;
    --sheet-fg: #3a2e2b;
    --sheet-line: rgba(58, 46, 43, .16);
    --yes: #4c7a5f;
    --no: #a55a55;
}

/* ---------- پایه ---------- */
* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.95;
    -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

/*
 * تگ‌های عکس width و height دارند تا مرورگر قبل از دانلود جا برایشان باز کند
 * و صفحه هنگام لود نپرد. این خط جلوی ارتفاع ثابتِ همان تگ‌ها را می‌گیرد
 * تا نسبت تصویر از CSS بیاید.
 */
img { height: auto; }

a { color: inherit; }

button { font: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.ic { width: 22px; height: 22px; }
.ic.sm { width: 17px; height: 17px; }
.ic.lg { width: 34px; height: 34px; }

/* بافت ریز چاپ */
body.grain .hero-media::after,
body.grain .gate-media::after,
body.grain .closing::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: .16;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------- عناصر مشترک ---------- */
.script-names {
    margin: 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 12vw, 4.2rem);
    line-height: 2.1;
    letter-spacing: 0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.script-names .amp {
    display: inline-block;
    margin: 0 .35em;
    font-size: .62em;
    opacity: .75;
}
.script-names.small { font-size: clamp(1.9rem, 8vw, 2.8rem); }

[data-display="sans"] .script-names {
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-weight: 200;
    font-size: clamp(2rem, 9vw, 3.2rem);
    line-height: 1.7;
    letter-spacing: .06em;
}

.script-line {
    margin: 0 0 1.6rem;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 1.65rem;
    line-height: 2.4;
    color: var(--fg);
    opacity: .92;
    text-align: center;
}
.script-line.sm { font-size: 1.35rem; margin-bottom: .6rem; }
[data-display="sans"] .script-line {
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 2;
}

.eyebrow {
    margin: 0 0 .4rem;
    font-size: .76rem;
    letter-spacing: .28em;
    color: var(--muted);
}

.section-title {
    margin: 0 0 .4rem;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: .3em;
    text-align: center;
    color: var(--fg);
}
.section-sub {
    margin: 0 0 1.6rem;
    font-size: .88rem;
    color: var(--muted);
    text-align: center;
}
.section-title + .card,
.section-title + .gallery,
.section-sub + .card,
.section-sub + .gallery { margin-top: 1.6rem; }

.rule {
    width: 64px;
    height: 1px;
    background: var(--line);
}
.rule.center { margin: 1.3rem auto; }
.rule.short { width: 40px; margin: 1.8rem auto 1.4rem; }

.divider {
    width: min(85%, 640px);
    height: 1px;
    margin: 2.4rem auto;
    background: var(--line);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.6rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: transparent;
    color: var(--fg);
    font-size: .95rem;
    letter-spacing: .06em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}
.btn-solid {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 500;
}
[data-theme="blue"] .btn-solid,
[data-theme="blush"] .btn-solid { color: #fff; }
.btn-solid:hover { filter: brightness(1.08); }
.btn.wide { width: 100%; }

.hint {
    margin: .9rem 0 0;
    font-size: .84rem;
    color: var(--muted);
}
.hint.center { text-align: center; }
.optional { color: var(--muted); font-size: .85em; }

/* پیام‌های موقت */
.toasts {
    position: fixed;
    inset: auto 0 1.2rem;
    z-index: 90;
    display: grid;
    gap: .5rem;
    justify-items: center;
    padding: 0 1rem;
    pointer-events: none;
}
.toast {
    margin: 0;
    padding: .7rem 1.3rem;
    border-radius: 999px;
    font-size: .9rem;
    background: var(--sheet);
    color: var(--sheet-fg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    animation: toast-in .4s ease-out both;
}
.toast-error { background: #7f2a2a; color: #fff; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
}

/* ==========================================================================
   صفحه‌ی ورود
   ========================================================================== */
.gate {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: end;
    overflow: hidden;
}
.gate-media,
.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.gate-bg,
.hero-bg,
.closing-bg,
.intro-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}
.gate-bg-empty {
    background:
        radial-gradient(circle at 50% 18%, var(--panel-2) 0%, var(--bg) 70%);
}
.gate-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(to top, var(--bg) 4%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .55) 100%);
}
[data-theme="blush"] .gate-veil {
    background: linear-gradient(to top, var(--bg) 4%, rgba(255, 255, 255, .3) 55%, rgba(255, 255, 255, .5) 100%);
}

.gate-inner {
    position: relative;
    z-index: 5;
    width: min(100% - 2.5rem, 30rem);
    margin: 0 auto;
    padding: 4rem 0 3rem;
    text-align: center;
}
.gate-head { margin-bottom: 2.4rem; }
.gate-head .rule { margin: 1.4rem auto .9rem; }
.gate-meta {
    margin: 0;
    font-size: .82rem;
    letter-spacing: .22em;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
}
.gate-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
}

.gate-form label {
    display: block;
    margin-bottom: .75rem;
    font-size: .9rem;
    color: var(--muted);
}
.gate-field {
    display: grid;
    gap: .6rem;
}
.gate-field input {
    width: 100%;
    padding: .95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: var(--fg);
    font-size: 1.15rem;
    letter-spacing: .12em;
    text-align: center;
}
[data-theme="blush"] .gate-field input { background: rgba(255, 255, 255, .7); }
.gate-field input::placeholder { color: var(--muted); letter-spacing: .08em; }
.gate-field input[aria-invalid="true"] { border-color: var(--no); }
.field-error {
    margin: .7rem 0 0;
    font-size: .86rem;
    color: #e79a9a;
}
[data-theme="blush"] .field-error { color: var(--no); }
.gate-help {
    margin: 1.1rem 0 0;
    font-size: .84rem;
    color: var(--muted);
}
.gate-help a {
    display: inline-block;
    padding: .55rem .8rem;
    color: var(--accent);
}

/* ==========================================================================
   کارت بسته (ویدیوی ورودی)
   ========================================================================== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
}
.intro.is-gone { display: none; }
.intro-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.intro-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.intro-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .45));
}
.intro-content {
    position: relative;
    z-index: 3;
    display: grid;
    justify-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}
.seal {
    display: grid;
    place-items: center;
    width: 4.6rem;
    height: 4.6rem;
    margin-bottom: .6rem;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.1rem;
    letter-spacing: .1em;
}
.intro-open { margin-top: 1rem; }
.intro-player {
    position: absolute;
    inset: 0;
    background: #000;
}
.intro-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.intro-skip {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    padding: .5rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: .85rem;
    cursor: pointer;
}
.intro.is-fading { animation: intro-out .8s ease forwards; }
@keyframes intro-out {
    to { opacity: 0; visibility: hidden; }
}

/* ==========================================================================
   صفحه‌ی کارت
   ========================================================================== */
.site {
    max-width: 100%;
    margin: 0 auto;
    background: var(--panel);
    overflow: clip;
}

.hero {
    position: relative;
    min-height: 88vh;
    min-height: 88dvh;
    display: grid;
    align-items: center;
    overflow: hidden;
}
.hero-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(to top, var(--panel) 2%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, .5) 100%);
}
[data-theme="blush"] .hero-veil {
    background: linear-gradient(to top, var(--panel) 2%, rgba(255, 255, 255, .25) 45%, rgba(255, 255, 255, .45) 100%);
}
.hero-text {
    position: relative;
    z-index: 5;
    width: min(100% - 2.5rem, 34rem);
    margin: 0 auto;
    text-align: center;
}
.hero-quote {
    margin: 0 auto .8rem;
    max-width: 30rem;
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 2.1;
    color: var(--fg);
    opacity: .9;
}
.hero-corner {
    position: absolute;
    z-index: 5;
    right: 1.6rem;
    bottom: 1.6rem;
    display: grid;
    gap: .25rem;
    text-align: right;
}
.hero-corner .rule { margin-bottom: .5rem; }
.hero-date {
    font-size: .78rem;
    letter-spacing: .22em;
    color: var(--muted);
}
.hero-city {
    font-size: .82rem;
    letter-spacing: .28em;
    color: var(--fg);
}
.scroll-hint {
    position: absolute;
    z-index: 5;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    opacity: .7;
}

.band {
    width: min(100% - 2.5rem, 34rem);
    margin: 0 auto;
    padding: 2.6rem 0;
}
.band:first-of-type { padding-top: 2rem; }

/* شمارش معکوس */
.countdown-band { text-align: center; }
.countdown {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .6rem;
}
.cd-unit {
    display: grid;
    justify-items: center;
    min-width: 4.2rem;
}
.cd-num {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    font-weight: 200;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.cd-label {
    margin-top: .5rem;
    font-size: .72rem;
    letter-spacing: .22em;
    color: var(--muted);
}
.cd-sep {
    margin-top: .4rem;
    font-size: 1.8rem;
    font-weight: 200;
    color: var(--accent);
    opacity: .5;
}

/* متن دعوت */
.invite { text-align: center; }
.addressee {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: .04em;
}
.invite-text {
    margin: 0 auto 1.6rem;
    max-width: 30rem;
    font-weight: 300;
    color: var(--fg);
    opacity: .92;
}

/* کارت‌ها */
.card {
    padding: 2rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
}
[data-theme="blush"] .card { background: rgba(255, 255, 255, .6); }
.card.center { text-align: center; }
.card-eyebrow {
    margin: 0 0 .5rem;
    font-size: .72rem;
    letter-spacing: .3em;
    color: var(--muted);
    text-align: center;
}
.card-title {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: .1em;
    text-align: center;
}
.card-title.spaced { letter-spacing: .26em; margin-top: .6rem; }
.card-sub {
    margin: .3rem 0 0;
    font-size: .92rem;
    color: var(--muted);
    text-align: center;
}
.card-body {
    margin: .8rem 0 0;
    font-weight: 300;
    color: var(--fg);
    opacity: .9;
}
.card-date {
    margin: 0;
    font-size: 1rem;
    letter-spacing: .18em;
    text-align: center;
}
.card-figure {
    margin-top: 1.4rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
.card-figure img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.card-icon { display: block; margin: 0 auto .6rem; color: var(--accent); }
.dress-img {
    width: min(100%, 15rem);
    margin: 0 auto 1rem;
    border-radius: 12px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.2rem;
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .84rem;
    letter-spacing: .08em;
    color: var(--muted);
}
.card-actions li,
.card-actions a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
}
.card-actions li { min-height: 2.75rem; }
.card-actions a {
    min-height: 2.75rem;
    padding: .45rem .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--fg);
}
.card-actions a:hover { border-color: var(--accent); }
.card-actions svg { color: var(--accent); }

/* برنامه‌ی مراسم */
.timeline {
    display: grid;
    gap: 1.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.timeline li {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: .7rem;
}
.tl-icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--accent);
}
.tl-title {
    font-size: 1rem;
    letter-spacing: .06em;
}
.tl-dots {
    height: 1px;
    min-width: 12px;
    background-image: radial-gradient(circle, var(--muted) 1px, transparent 1px);
    background-size: 6px 1px;
    opacity: .6;
}
.tl-time {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    color: var(--fg);
    opacity: .9;
}

/* گالری */
.gallery {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(2, 1fr);
}
.polaroid {
    margin: 0;
    padding: .55rem .55rem 1.6rem;
    background: var(--sheet);
    border-radius: 3px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.polaroid:nth-child(odd) { transform: rotate(-1.1deg); }
.polaroid:nth-child(even) { transform: rotate(1deg); }
.polaroid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    filter: grayscale(.15) contrast(1.05);
}
.polaroid figcaption {
    margin-top: .6rem;
    font-size: .8rem;
    text-align: center;
    color: var(--sheet-fg);
    opacity: .75;
}

/* اقامتگاه */
.hotel-list { display: grid; }
.hotel { text-align: center; }
.hotel h3 {
    margin: 0 0 .3rem;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: .1em;
}
.hotel-addr {
    margin: 0;
    font-size: .85rem;
    color: var(--muted);
}
.hotel-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem 1.2rem;
    margin: .9rem 0 0;
    font-size: .84rem;
}
.hotel-links a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.75rem;
    padding: .45rem .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
}
.hotel-links a:hover { border-color: var(--accent); }
.hotel-links svg { color: var(--accent); }

/* هدیه */
.copy-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label icon" "value icon";
    align-items: center;
    gap: .1rem .8rem;
    width: 100%;
    margin-top: .8rem;
    padding: .75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--fg);
    cursor: pointer;
    text-align: right;
}
.copy-row:hover { border-color: var(--accent); }
.copy-label { grid-area: label; font-size: .78rem; color: var(--muted); }
.copy-value {
    grid-area: value;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    font-size: .98rem;
    letter-spacing: .04em;
    /* شماره شبا بلند است؛ بین گروه‌های رقم می‌شکند تا از کارت بیرون نزند */
    white-space: normal;
    overflow-wrap: break-word;
    font-variant-numeric: tabular-nums;
}
.copy-label { min-width: 0; }
.copy-row svg { grid-area: icon; align-self: center; color: var(--accent); }
.copy-row.copied { border-color: var(--yes); }

/* ---------- تأیید حضور ---------- */
.rsvp-band { width: 100%; padding: 0; }
.rsvp-sheet {
    width: min(100% - 2.5rem, 34rem);
    margin: 0 auto;
    padding: 2.4rem 1.4rem 2.6rem;
    background: var(--sheet);
    color: var(--sheet-fg);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.rsvp-head { text-align: center; margin-bottom: 1.4rem; }
.rsvp-head .script-line { color: var(--sheet-fg); }
.rsvp-for {
    margin: .2rem 0 0;
    font-size: .95rem;
    font-weight: 500;
}
.rsvp-sub {
    margin: .5rem 0 0;
    font-size: .86rem;
    opacity: .7;
}
.answered {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.2rem;
    padding: .7rem 1rem;
    border-radius: 12px;
    font-size: .92rem;
}
.answered-yes { background: rgba(63, 125, 92, .14); color: var(--yes); }
.answered-no { background: rgba(155, 74, 74, .12); color: var(--no); }

.rsvp-form { display: grid; gap: .55rem; }
.rsvp-form label { font-size: .88rem; margin-top: .6rem; }
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid var(--sheet-line);
    border-radius: 12px;
    background: #fff;
    color: var(--sheet-fg);
    font: inherit;
    font-size: .95rem;
}
.rsvp-form textarea { resize: vertical; }
.rsvp-form .btn { margin-top: 1.2rem; }
.rsvp-form .hint { text-align: center; color: inherit; opacity: .6; }

.choice { margin: 0; padding: 0; border: 0; }
.choice legend {
    padding: 0;
    font-size: .88rem;
    margin-bottom: .5rem;
}
.choice-row {
    display: grid;
    gap: .6rem;
    grid-template-columns: 1fr 1fr;
}
.choice-opt {
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem .6rem;
    border: 1px solid var(--sheet-line);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-size: .9rem;
    transition: border-color .2s, background-color .2s;
}
.choice-opt input { width: auto; margin: 0; accent-color: var(--accent); }
.choice-opt:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.only-yes.is-hidden { display: none; }

.switch {
    display: flex !important;
    align-items: center;
    gap: .55rem;
    font-size: .88rem;
}
.switch input { width: auto !important; accent-color: var(--accent); }

/* دفتر یادبود */
.notes { display: grid; gap: 1rem; }
.notes blockquote {
    margin: 0;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
}
[data-theme="blush"] .notes blockquote { background: rgba(255, 255, 255, .6); }
.notes p { margin: 0; font-weight: 300; }
.notes cite {
    display: block;
    margin-top: .5rem;
    font-size: .82rem;
    font-style: normal;
    color: var(--muted);
}

/* پایان */
.closing {
    position: relative;
    min-height: 70vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-top: 2.6rem;
}
.closing-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.closing-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--panel) 0%, rgba(0, 0, 0, .35) 35%, rgba(0, 0, 0, .55) 100%);
}
[data-theme="blush"] .closing-veil {
    background: linear-gradient(to bottom, var(--panel) 0%, rgba(255, 255, 255, .3) 35%, rgba(255, 255, 255, .45) 100%);
}
.closing-text {
    position: relative;
    z-index: 5;
    width: min(100% - 2.5rem, 30rem);
    text-align: center;
}

.site-footer {
    padding: 2rem 1.5rem 2.6rem;
    text-align: center;
    font-size: .82rem;
    color: var(--muted);
    background: var(--panel);
}
.site-footer p { margin: 0 0 .4rem; }
.site-footer a {
    display: inline-block;
    padding: .6rem .9rem;
    color: var(--accent);
}

/* دکمه‌ی موسیقی */
.music-btn {
    position: fixed;
    z-index: 80;
    bottom: 1.1rem;
    left: 1.1rem;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel-2);
    color: var(--fg);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.music-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }

/* ---------- ظاهر شدن بخش‌ها ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity .7s ease-out, transform .7s ease-out;
    }
    .reveal.in {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   تبلت و دسکتاپ
   ========================================================================== */
@media (min-width: 700px) {
    body { font-size: 17px; }

    .hero { min-height: 100vh; min-height: 100dvh; }
    .hero-corner { right: 3rem; bottom: 3rem; }

    .band { width: min(100% - 5rem, 46rem); padding: 3.4rem 0; }
    .card { padding: 2.6rem 2.4rem; }
    .card-figure img { aspect-ratio: 16 / 9; }

    .gallery { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
    .rsvp-sheet { width: min(100% - 5rem, 42rem); padding: 3rem 3rem 3.2rem; }
    .divider { margin: 3rem auto; }
    .music-btn { bottom: 1.8rem; left: 1.8rem; }
}

@media (min-width: 1024px) {
    .band { width: min(100% - 8rem, 60rem); padding: 4.2rem 0; }

    /* زمان و مکان: متن کنار عکس */
    .details-card {
        display: grid;
        grid-template-columns: 1fr 1.05fr;
        grid-template-areas: "head figure" "meta figure";
        align-content: center;
        gap: 0 2.6rem;
        text-align: right;
    }
    .details-card .card-head { grid-area: head; }
    .details-card .card-meta { grid-area: meta; }
    .details-card .card-figure {
        grid-area: figure;
        margin-top: 0;
        align-self: stretch;
    }
    .details-card .card-figure img { height: 100%; aspect-ratio: auto; min-height: 16rem; }
    .details-card .card-eyebrow,
    .details-card .card-title,
    .details-card .card-sub,
    .details-card .card-date { text-align: right; }
    .details-card .rule.center { margin: 1.3rem 0; }
    .details-card .card-actions { justify-content: flex-start; }

    .hotel-list {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
        gap: 2.4rem;
    }
    .notelist {
        grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
        gap: 1.6rem 2.2rem;
    }
    .hotel .rule.short { display: none; }
    .timeline { max-width: 34rem; margin: 0 auto; }
    .gallery { grid-template-columns: repeat(4, 1fr); }
    .notes { grid-template-columns: repeat(2, 1fr); }
    .closing { min-height: 80vh; }
}

/* ==========================================================================
   چاپ کارت — فقط اطلاعات مراسم روی کاغذ سفید
   ========================================================================== */
@media print {
    .music-btn,
    .size-btn,
    .quickbar,
    .scroll-hint,
    .intro,
    #print-btn,
    .print-row,
    .rsvp-form,
    .rsvp-quick,
    .more-details,
    .switch-answer,
    .toasts,
    .site-footer a,
    .hero-media,
    .closing,
    #guestbook { display: none !important; }

    html, body {
        background: #fff !important;
        color: #111 !important;
        font-size: 12pt;
    }
    .site { background: #fff !important; }

    .hero { min-height: auto !important; padding: 0 0 1rem; }
    .hero-text, .hero-corner { position: static; text-align: center; }
    .hero-corner { display: block; margin: .5rem auto 0; }
    .script-names, .script-line, .hero-quote, .card-title, .addressee, .card-date, .tl-title, .tl-time, .note-h {
        color: #111 !important;
        text-shadow: none !important;
    }
    .eyebrow, .card-eyebrow, .card-sub, .hero-date, .hero-city, .hint, .section-title, .note-b, .card-body {
        color: #444 !important;
    }
    /* متن دعوت روی کاغذ باید کاملاً خوانا باشد، نه کم‌رنگ */
    .invite-text, .notice-body, .card-actions, .hotel-addr, .dress-note, .notes blockquote p {
        color: #222 !important;
        opacity: 1 !important;
    }

    .band { width: 100% !important; padding: .5rem 0 !important; }
    .card, .rsvp-sheet {
        background: #fff !important;
        border: 1px solid #bbb !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .divider, .rule, .tl-dots { background: #ccc !important; }
    .card-actions a, .hotel-links a, .copy-row, .tl-icon { border-color: #bbb !important; }
    .notice { border: 1px solid #999 !important; background: #f4f4f4 !important; }
    .table-no, .copy-value { color: #111 !important; }
    .qr-box { border: 1px solid #ccc; }
    .gallery, .polaroid { break-inside: avoid; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   نسخه‌ی ۳ — سادگی و خوانایی برای مهمان‌های مسن‌تر
   ========================================================================== */

/* حالت متن درشت: همه‌ی اندازه‌ها با یک ضریب بزرگ می‌شوند */
html[data-large="1"] body { font-size: 19px; line-height: 2.05; }
html[data-large="1"] .invite-text,
html[data-large="1"] .card-body,
html[data-large="1"] .hero-quote { font-weight: 400; }
html[data-large="1"] .rsvp-form label,
html[data-large="1"] .rsvp-form input,
html[data-large="1"] .rsvp-form select,
html[data-large="1"] .rsvp-form textarea { font-size: 1.05rem; }
html[data-large="1"] .card-actions { font-size: .95rem; }
html[data-large="1"] .tl-title,
html[data-large="1"] .tl-time { font-size: 1.12rem; }
html[data-large="1"] .cd-label,
html[data-large="1"] .hint,
html[data-large="1"] .card-sub { font-size: .95rem; }
html[data-large="1"] .btn { padding: .95rem 1.7rem; font-size: 1.05rem; }

/* متن‌های نازک برای چشم مسن سخت خوانده می‌شوند */
html[data-large="1"] .cd-num { font-weight: 400; }
html[data-large="1"] .section-title { letter-spacing: .16em; font-weight: 500; }

/* دکمه‌ی تغییر اندازه‌ی متن */
.size-btn {
    position: fixed;
    z-index: 80;
    bottom: 1.1rem;
    inset-inline-end: 1.1rem;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel-2);
    color: var(--fg);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.size-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); font-size: 1.35rem; }
body.has-quickbar .size-btn { bottom: 5.2rem; }
body.has-quickbar .music-btn { bottom: 5.2rem; }

/* حالت آرام: حرکت کمتر */
body.calm .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.calm .gate, body.calm .card, body.calm .seal { animation: none !important; }

/* ---------- اعلان از طرف عروس و داماد ---------- */
.notice {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--accent);
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
}
[data-theme="blush"] .notice { background: rgba(255, 255, 255, .7); }
.notice-icon { color: var(--accent); flex: 0 0 auto; margin-top: .25rem; }
.notice-title { margin: 0; font-weight: 700; }
.notice-body { margin: .2rem 0 0; color: var(--fg); opacity: .9; font-weight: 300; }
.notice-important { border-inline-start-color: var(--gold, var(--accent)); }
.notice-urgent {
    border-inline-start-color: var(--no);
    background: rgba(155, 74, 74, .12);
}
.notice-urgent .notice-icon { color: var(--no); }

/* ---------- شماره میز ---------- */
.table-card { padding-block: 1.6rem; }
.table-no {
    margin: .2rem 0 .5rem;
    font-size: clamp(3rem, 16vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ---------- پیام صوتی ---------- */
.voice { margin: 1.2rem 0; }
.voice-btn.is-playing { border-color: var(--accent); color: var(--accent); }

/* ---------- کد ورود ---------- */
.qr-box {
    display: inline-block;
    margin: .8rem auto;
    padding: .7rem;
    background: #fff;
    border-radius: 12px;
}
.qr-box img { width: 12rem; height: 12rem; }

/* ---------- پاسخ با یک لمس ---------- */
.rsvp-quick { display: grid; gap: .7rem; }
.btn-xl {
    width: 100%;
    padding: 1.15rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 14px;
}
.rsvp-sheet .btn-ghost {
    border-color: var(--sheet-line);
    color: var(--sheet-fg);
}
.rsvp-sheet .btn-ghost:hover { background: rgba(0, 0, 0, .04); }
.more-details { margin-top: 1rem; }
.more-details summary {
    cursor: pointer;
    padding: .6rem 0;
    font-size: .95rem;
    color: var(--sheet-fg);
    opacity: .75;
}
.switch-answer { margin-top: .8rem; }

/* ---------- نوار دسترسی سریع ---------- */
.quickbar {
    position: fixed;
    z-index: 70;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    gap: .4rem;
    padding: .5rem .7rem calc(.5rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.quickbar a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    flex: 1 1 0;
    max-width: 9rem;
    padding: .5rem .3rem;
    border-radius: 10px;
    color: var(--fg);
    text-decoration: none;
    font-size: .78rem;
    text-align: center;
}
.quickbar a svg { color: var(--accent); }
.quickbar .qb-main {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}
.quickbar .qb-main svg { color: #fff; }
body.has-quickbar .site-footer { padding-bottom: 5.5rem; }

@media (min-width: 900px) {
    .quickbar { display: none; }
    body.has-quickbar .size-btn,
    body.has-quickbar .music-btn { bottom: 1.8rem; }
    body.has-quickbar .site-footer { padding-bottom: 2.6rem; }
}

/* متنی که فقط صفحه‌خوان‌ها می‌خوانند و دیده نمی‌شود */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- نکات مهم ---------- */
.notelist {
    display: grid;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.notelist li {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: .8rem;
}
.note-h { margin: 0; font-weight: 700; font-size: 1rem; }
.note-b { margin: .15rem 0 0; font-weight: 300; opacity: .88; }
.print-row { text-align: center; margin: 2rem 0 0; }

/* ==========================================================================
   عناصر مشترک قالب‌ها (نسخه‌ی ۳.۳)
   ========================================================================== */

/* نوار متن متحرک — به صورت پیش‌فرض خاموش است و هر قالب خودش روشنش می‌کند */
.marquee { display: none; }
.marquee {
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
}
.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
    padding-block: .9rem;
    animation: marquee 34s linear infinite;
}
.marquee-item { flex: none; }
.marquee-dot { flex: none; font-size: .5em; opacity: .55; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}
body.calm .marquee-track { animation: none; }

/* وقتی پاکت باز نشده، صفحه‌ی پشتش اسکرول نشود */
body.env-locked { overflow: hidden; }
