/* پویش روایت بدرaghhe — تم رسمی مراسم تشییع */

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ceremony-bg: #0c0c0c;
    --ceremony-bg-panel: #141414;
    --ceremony-bg-input: #1a1a1a;
    --ceremony-border: #3d3428;
    --ceremony-border-light: #5c4f3a;
    --ceremony-gold: #b8956a;
    --ceremony-gold-muted: #8a7355;
    --ceremony-text: #e8e4dc;
    --ceremony-text-muted: #9a9288;
    --ceremony-text-dim: #6b6560;
    --ceremony-success-bg: #1a2318;
    --ceremony-success-border: #3d5235;
    --ceremony-success-text: #a8c4a0;
    --ceremony-error-bg: #231818;
    --ceremony-error-border: #523535;
    --ceremony-error-text: #c4a0a0;
    --ceremony-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    --glass-bg: rgba(18, 18, 20, 0.42);
    --glass-bg-strong: rgba(22, 22, 24, 0.58);
    --glass-border: rgba(184, 149, 106, 0.22);
    --glass-border-light: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(24px) saturate(160%);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--glass-highlight);
    --glass-glow: 0 0 40px rgba(184, 149, 106, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body.ceremony {
    margin: 0;
    min-height: 100vh;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--ceremony-bg);
    color: var(--ceremony-text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.ceremony-bg-photo {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--ceremony-bg);
}

.ceremony-bg-photo--empty {
    background-image: linear-gradient(180deg, #0a0a0a 0%, #141414 50%, #0c0c0c 100%);
}

.ceremony-bg-photo--dashboard {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(184, 149, 106, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 90%, rgba(90, 75, 55, 0.1) 0%, transparent 50%),
        linear-gradient(165deg, #0a0a0c 0%, #121218 45%, #0e0e12 100%);
}

.ceremony-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
}

.ceremony-page::before,
.ceremony-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.ceremony-page::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(184, 149, 106, 0.18) 0%, transparent 70%);
}

.ceremony-page::after {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: radial-gradient(circle, rgba(120, 100, 70, 0.14) 0%, transparent 70%);
}

.ceremony-frame {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.ceremony-frame--wide {
    max-width: 640px;
}

.ceremony-page--dashboard {
    justify-content: flex-start;
    padding-top: 0;
}

.ceremony-card {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    position: relative;
    overflow: hidden;
}

.ceremony-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 40%,
        rgba(184, 149, 106, 0.03) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.ceremony-card > * {
    position: relative;
    z-index: 1;
}

.ceremony-header {
    text-align: center;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--glass-border-light);
    background: linear-gradient(180deg, rgba(184, 149, 106, 0.1) 0%, transparent 100%);
}

.ceremony-header__banner {
    display: block;
    width: 64px;
    height: auto;
    margin: 0 auto 1rem;
}

.ceremony-header__top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ceremony-header__img {
    display: block;
    object-fit: contain;
}

.ceremony-header__img--portrait {
    width: 88px;
    height: 88px;
}

.ceremony-header__img--emblem {
    width: 72px;
    height: 72px;
}

.ceremony-header__title-img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.ceremony-body {
    padding: 2rem;
}

.ceremony-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ceremony-field {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.ceremony-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ceremony-text-muted);
    margin-bottom: 0;
}

.ceremony-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ceremony-text);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border-light);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ceremony-input:focus {
    border-color: var(--ceremony-gold-muted);
    background: rgba(22, 22, 24, 0.65);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.12), inset 0 1px 0 var(--glass-highlight);
}

.ceremony-input--ltr {
    direction: ltr;
    text-align: left;
}

.ceremony-input--otp {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.45em;
    padding-left: 0.45em;
}

.ceremony-hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--ceremony-text-dim);
}

.ceremony-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ceremony-bg);
    background: linear-gradient(160deg, rgba(201, 168, 122, 0.95) 0%, var(--ceremony-gold) 50%, rgba(160, 128, 88, 0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(184, 149, 106, 0.45);
    border-radius: 12px;
    box-shadow: var(--glass-shadow), 0 0 24px rgba(184, 149, 106, 0.15);
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.ceremony-btn:hover {
    filter: brightness(1.08);
}

.ceremony-btn:active {
    transform: translateY(1px);
}

.ceremony-btn--ghost {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ceremony-text-muted);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border-light);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.ceremony-btn--ghost:hover {
    color: var(--ceremony-text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    filter: none;
}

.ceremony-btn--link {
    width: auto;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ceremony-gold);
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ceremony-btn--link:hover {
    color: #d4b88a;
    filter: none;
}

.ceremony-alert {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    border: 1px solid;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
}

.ceremony-alert--success {
    background: rgba(26, 35, 24, 0.55);
    border-color: rgba(61, 82, 53, 0.6);
    color: var(--ceremony-success-text);
}

.ceremony-alert--error {
    background: rgba(35, 24, 24, 0.55);
    border-color: rgba(82, 53, 53, 0.6);
    color: var(--ceremony-error-text);
}

.ceremony-alert ul {
    margin: 0;
    padding-right: 1.25rem;
}

.ceremony-mobile-display {
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ceremony-gold);
    direction: ltr;
    padding: 0.75rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    margin-bottom: 0.5rem;
}

.ceremony-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border-light);
}

.ceremony-footer {
    text-align: center;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--glass-border-light);
    font-size: 0.7rem;
    color: var(--ceremony-text-dim);
    line-height: 1.9;
}

.ceremony-footer--plain {
    border: none;
    margin-top: 2rem;
    padding: 0;
}

.ceremony-quote {
    font-size: 0.8125rem;
    color: var(--ceremony-text-muted);
    font-style: normal;
    margin-top: 0.25rem;
}

.ceremony-topbar {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.ceremony-topbar__inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1rem;
}

.ceremony-topbar__brand {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ceremony-text);
}

.ceremony-main {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.ceremony-panel {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.ceremony-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 40%,
        rgba(184, 149, 106, 0.03) 100%
    );
    pointer-events: none;
}

.ceremony-panel__title,
.ceremony-panel__desc,
.ceremony-stats,
.ceremony-dashboard-actions,
.ceremony-gallery,
.ceremony-empty {
    position: relative;
    z-index: 1;
}

.ceremony-panel__title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.ceremony-panel__desc {
    margin: 0 0 1.75rem;
    font-size: 0.875rem;
    color: var(--ceremony-text-muted);
}

.ceremony-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .ceremony-stats {
        grid-template-columns: 1fr 1fr;
    }
}

.ceremony-stat {
    padding: 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border-light);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.ceremony-stat:hover {
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight), 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.ceremony-stat__label {
    font-size: 0.75rem;
    color: var(--ceremony-text-dim);
    margin-bottom: 0.35rem;
}

.ceremony-stat__value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ceremony-text);
}

.ceremony-stat__value--ltr {
    direction: ltr;
    text-align: right;
}

.ceremony-dashboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.ceremony-dashboard-actions .ceremony-btn--action {
    width: 100%;
    aspect-ratio: 1;
    min-height: 0;
    padding: 1rem 0.625rem;
    gap: 0.5rem;
}

.ceremony-dashboard-actions .ceremony-btn__label {
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: center;
    font-weight: 700;
}

.ceremony-dashboard-actions .ceremony-btn__desc {
    display: block;
    font-size: 0.6875rem;
    line-height: 1.55;
    font-weight: 400;
    color: var(--ceremony-text-muted);
    text-align: center;
    padding: 0 0.25rem;
}

@media (min-width: 520px) {
    .ceremony-dashboard-actions {
        grid-template-columns: 1fr 1fr;
    }

    .ceremony-dashboard-actions--single {
        grid-template-columns: 1fr;
    }

    .ceremony-dashboard-actions--single .ceremony-btn--action {
        max-width: 200px;
        margin: 0 auto;
    }
}

.ceremony-btn--action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    min-height: 120px;
    text-decoration: none;
    color: var(--ceremony-text);
    font-weight: 600;
    font-size: 0.9375rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
}

.ceremony-btn--action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(184, 149, 106, 0.12) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ceremony-btn--action:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 149, 106, 0.45);
    background: rgba(184, 149, 106, 0.1);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(184, 149, 106, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    filter: none;
    color: var(--ceremony-text);
}

.ceremony-btn--action:hover::before {
    opacity: 1;
}

.ceremony-btn--action:active {
    transform: translateY(-1px);
}

.ceremony-btn--action--primary {
    border-color: rgba(184, 149, 106, 0.35);
    background: linear-gradient(
        160deg,
        rgba(184, 149, 106, 0.18) 0%,
        rgba(18, 18, 20, 0.5) 100%
    );
}

.ceremony-btn--action--primary:hover {
    background: linear-gradient(
        160deg,
        rgba(184, 149, 106, 0.28) 0%,
        rgba(22, 22, 24, 0.55) 100%
    );
}

.ceremony-btn__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border-light);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    position: relative;
    z-index: 1;
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.ceremony-btn--action:hover .ceremony-btn__icon-wrap {
    background: rgba(184, 149, 106, 0.15);
    border-color: rgba(184, 149, 106, 0.3);
    transform: scale(1.05);
}

.ceremony-btn__icon {
    font-size: 1.5rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.ceremony-btn__label {
    position: relative;
    z-index: 1;
}

.ceremony-footer--plain .ceremony-quote {
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.ceremony-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ceremony-wizard__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.ceremony-wizard__step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ceremony-text-dim);
    border: 1px solid var(--glass-border-light);
    border-radius: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ceremony-wizard__step.is-active {
    color: var(--ceremony-bg);
    background: var(--ceremony-gold);
    border-color: var(--ceremony-gold-muted);
}

.ceremony-wizard__step.is-done {
    color: var(--ceremony-gold);
    border-color: var(--ceremony-gold-muted);
}

.ceremony-wizard__line {
    width: 32px;
    height: 1px;
    background: var(--glass-border-light);
}

.ceremony-wizard__panel {
    display: none;
}

.ceremony-wizard__panel.is-active {
    display: block;
}

.ceremony-wizard__heading {
    margin: 0 0 0.35rem;
    font-size: 1.0625rem;
    font-weight: 700;
}

.ceremony-wizard__subheading {
    margin: 0 0 1.5rem;
    font-size: 0.8125rem;
    color: var(--ceremony-text-muted);
}

.ceremony-wizard__nav {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border-light);
}

.ceremony-wizard__nav-btn[hidden] {
    display: none !important;
}

.ceremony-wizard__nav .ceremony-wizard__nav-btn {
    flex: 1;
}

.ceremony-wizard__submit {
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--glass-border-light);
}

.ceremony-wizard__submit .ceremony-btn {
    width: 100%;
}

.ceremony-wizard__back {
    text-align: center;
    margin: 1.5rem 0 0;
}

.ceremony-wizard__back .ceremony-btn--link {
    padding: 10px 20px;
}

.ceremony-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ceremony-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ceremony-type-card:hover {
    border-color: var(--glass-border);
    transform: translateY(-1px);
}

.ceremony-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ceremony-type-card:has(input:checked) {
    border-color: var(--ceremony-gold);
    background: rgba(184, 149, 106, 0.12);
    box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 24px rgba(184, 149, 106, 0.1);
}

.ceremony-type-card__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.ceremony-type-card__label {
    font-size: 0.875rem;
    font-weight: 500;
}

.ceremony-radio-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.ceremony-radio {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    cursor: pointer;
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    transition: background 0.2s;
}

.ceremony-radio:has(input:checked) {
    background: rgba(184, 149, 106, 0.1);
}

.ceremony-radio input {
    accent-color: var(--ceremony-gold);
    width: 1rem;
    height: 1rem;
}

.ceremony-field legend {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ceremony-text-muted);
    margin-bottom: 0;
    padding: 0;
}

.ceremony-input--textarea {
    resize: vertical;
    min-height: 100px;
}

.ceremony-input--file {
    padding: 0.625rem;
    font-size: 0.875rem;
}

.ceremony-upload-field {
    gap: 1rem;
}

.ceremony-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ceremony-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ceremony-upload__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1.25rem;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, transform 0.25s;
}

.ceremony-upload__dropzone:hover,
.ceremony-upload__dropzone:focus-visible {
    border-color: rgba(184, 149, 106, 0.55);
    background: rgba(184, 149, 106, 0.06);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-glow);
    outline: none;
}

.ceremony-upload__dropzone.is-dragover {
    border-color: var(--ceremony-gold);
    background: rgba(184, 149, 106, 0.12);
    transform: scale(1.01);
    box-shadow: inset 0 1px 0 var(--glass-highlight), 0 0 32px rgba(184, 149, 106, 0.15);
}

.ceremony-upload--has-files .ceremony-upload__dropzone {
    padding: 1rem;
    border-style: dashed;
    border-width: 1px;
}

.ceremony-upload--has-files .ceremony-upload__visual,
.ceremony-upload--has-files .ceremony-upload__title,
.ceremony-upload--has-files .ceremony-upload__desc,
.ceremony-upload--has-files .ceremony-upload__badges,
.ceremony-upload--has-files .ceremony-upload__pick {
    display: none;
}

.ceremony-upload--has-files .ceremony-upload__dropzone::before {
    content: '＋';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    color: var(--ceremony-gold);
    background: rgba(184, 149, 106, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 0.25rem;
}

.ceremony-upload--has-files .ceremony-upload__dropzone::after {
    content: 'کلیک کنید یا فایل بیشتری بکشید';
    font-size: 0.8125rem;
    color: var(--ceremony-text-muted);
}

.ceremony-upload--at-limit .ceremony-upload__dropzone {
    display: none;
}

.ceremony-upload__visual {
    position: relative;
    width: 88px;
    height: 56px;
    margin-bottom: 0.25rem;
}

.ceremony-upload__stack {
    position: absolute;
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.ceremony-upload__stack:first-child {
    top: 8px;
    right: 8px;
    z-index: 3;
}

.ceremony-upload__stack--2 {
    top: 0;
    right: 28px;
    z-index: 2;
    opacity: 0.85;
    transform: rotate(-8deg);
}

.ceremony-upload__stack--3 {
    top: 12px;
    right: 48px;
    z-index: 1;
    opacity: 0.65;
    transform: rotate(8deg);
}

.ceremony-upload__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ceremony-text);
}

.ceremony-upload__desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ceremony-text-muted);
    max-width: 28rem;
    line-height: 1.7;
}

.ceremony-upload__desc strong {
    color: var(--ceremony-gold);
    font-weight: 700;
}

.ceremony-upload__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.ceremony-upload__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ceremony-gold);
    background: rgba(184, 149, 106, 0.1);
    border: 1px solid rgba(184, 149, 106, 0.25);
    border-radius: 999px;
}

.ceremony-upload__pick {
    width: auto;
    min-width: 180px;
    margin-top: 0.25rem;
}

.ceremony-upload__list-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ceremony-upload__list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border-light);
}

.ceremony-upload__list-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ceremony-text-muted);
}

.ceremony-upload__count {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ceremony-bg);
    background: var(--ceremony-gold);
    border-radius: 999px;
}

.ceremony-optional {
    font-weight: 400;
    color: var(--ceremony-text-dim);
    font-size: 0.75rem;
}

.ceremony-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.ceremony-file-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border-light);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.ceremony-file-item__thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ceremony-file-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ceremony-file-item__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.ceremony-file-item__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.ceremony-file-item__name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ceremony-text);
    word-break: break-word;
}

.ceremony-file-item__size {
    font-size: 0.75rem;
    color: var(--ceremony-text-dim);
}

.ceremony-file-item__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ceremony-file-item__btn {
    width: auto;
    min-width: 88px;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.ceremony-file-item__btn--danger {
    color: var(--ceremony-error-text);
    border-color: rgba(196, 160, 160, 0.35);
}

.ceremony-file-item__btn--danger:hover {
    color: #e8c4c4;
    border-color: rgba(196, 160, 160, 0.55);
    background: rgba(35, 24, 24, 0.5);
}

.ceremony-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ceremony-preview-modal[hidden] {
    display: none;
}

.ceremony-preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ceremony-preview-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ceremony-preview-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border-light);
}

.ceremony-preview-modal__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    word-break: break-word;
}

.ceremony-preview-modal__close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ceremony-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ceremony-preview-modal__close:hover {
    color: var(--ceremony-text);
    background: rgba(255, 255, 255, 0.08);
}

.ceremony-preview-modal__body {
    padding: 1.25rem;
    overflow: auto;
}

.ceremony-preview-modal__media {
    display: block;
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
}

.ceremony-preview-modal__audio {
    width: 100%;
}

.ceremony-preview-modal__text {
    margin: 0;
    padding: 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.8;
    color: var(--ceremony-text-muted);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-light);
    border-radius: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 50vh;
    overflow: auto;
}

.ceremony-preview-modal__info {
    text-align: center;
    padding: 1.5rem 1rem;
}

.ceremony-preview-modal__info-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.ceremony-preview-modal__info-size {
    font-size: 0.8125rem;
    color: var(--ceremony-text-dim);
}

@media (max-width: 480px) {
    .ceremony-file-item {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
    }

    .ceremony-file-item__thumb {
        width: 48px;
        height: 48px;
    }

    .ceremony-file-item__actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .ceremony-file-item__btn {
        flex: 1;
    }
}

.ceremony-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ceremony-text-muted);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px dashed var(--glass-border);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.ceremony-panel--gallery {
    max-width: 1200px;
}

.ceremony-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ceremony-gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ceremony-text-muted);
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--glass-border-light);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.ceremony-gallery-filter:hover {
    color: var(--ceremony-text);
    border-color: var(--glass-border);
}

.ceremony-gallery-filter.is-active {
    color: var(--ceremony-bg);
    background: linear-gradient(160deg, rgba(201, 168, 122, 0.95) 0%, var(--ceremony-gold) 100%);
    border-color: rgba(184, 149, 106, 0.45);
    box-shadow: 0 2px 12px rgba(184, 149, 106, 0.25);
}

.ceremony-gallery-filter__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
}

.ceremony-gallery-filter.is-active .ceremony-gallery-filter__count {
    background: rgba(255, 255, 255, 0.25);
}

.ceremony-gallery--masonry {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 640px) {
    .ceremony-gallery--masonry {
        column-count: 3;
    }
}

@media (min-width: 960px) {
    .ceremony-gallery--masonry {
        column-count: 4;
    }
}

.ceremony-gallery__item {
    break-inside: avoid;
    margin: 0 0 1rem;
    border-radius: 14px;
    overflow: hidden;
}

.ceremony-gallery__item[hidden] {
    display: none;
}

.ceremony-gallery__trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: inherit;
    color: inherit;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.ceremony-gallery__trigger:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-glow);
}

.ceremony-gallery__type-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    z-index: 2;
    padding: 0.2rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
}

.ceremony-gallery__media {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.ceremony-gallery__media--video {
    object-fit: cover;
}

.ceremony-gallery__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 160px;
    padding: 1.5rem 1rem;
}

.ceremony-gallery__placeholder--video {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.85), rgba(60, 50, 70, 0.75));
}

.ceremony-gallery__placeholder--audio {
    background: linear-gradient(145deg, rgba(40, 55, 80, 0.85), rgba(70, 90, 120, 0.75));
}

.ceremony-gallery__placeholder--text {
    background: linear-gradient(145deg, rgba(50, 45, 40, 0.85), rgba(90, 80, 70, 0.75));
}

.ceremony-gallery__placeholder-icon {
    font-size: 2rem;
    line-height: 1;
}

.ceremony-gallery__overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 0.875rem 0.875rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
    text-align: right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ceremony-gallery__trigger:hover .ceremony-gallery__overlay,
.ceremony-gallery__trigger:focus-visible .ceremony-gallery__overlay {
    opacity: 1;
}

.ceremony-gallery__overlay-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
}

.ceremony-gallery__overlay-sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.4;
}

.ceremony-gallery-empty-filter {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ceremony-text-muted);
    font-size: 0.875rem;
    border: 1px dashed var(--glass-border);
    border-radius: 14px;
}

.ceremony-gallery-empty-filter[hidden] {
    display: none;
}

body.ceremony-gallery-modal-open {
    overflow: hidden;
}

.ceremony-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ceremony-gallery-modal[hidden] {
    display: none;
}

.ceremony-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ceremony-gallery-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    overflow: hidden;
}

.ceremony-gallery-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border-light);
}

.ceremony-gallery-modal__heading {
    min-width: 0;
}

.ceremony-gallery-modal__type {
    display: inline-block;
    margin-bottom: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--ceremony-gold);
    background: rgba(184, 149, 106, 0.12);
    border-radius: 999px;
}

.ceremony-gallery-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.ceremony-gallery-modal__close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ceremony-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ceremony-gallery-modal__close:hover {
    color: var(--ceremony-text);
    background: rgba(255, 255, 255, 0.08);
}

.ceremony-gallery-modal__body {
    padding: 1rem 1.25rem 0;
    overflow: auto;
}

.ceremony-gallery-modal__media {
    display: block;
    width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 10px;
    background: #111;
}

.ceremony-gallery-modal__iframe {
    display: block;
    width: 100%;
    height: 55vh;
    border: none;
    border-radius: 10px;
    background: #fff;
}

.ceremony-gallery-modal__audio-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: linear-gradient(145deg, rgba(40, 55, 80, 0.15), rgba(70, 90, 120, 0.1));
    border-radius: 12px;
}

.ceremony-gallery-modal__audio-icon {
    font-size: 2.5rem;
}

.ceremony-gallery-modal__audio {
    width: 100%;
}

.ceremony-gallery-modal__doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ceremony-text-muted);
    background: rgba(255, 255, 255, 0.35);
    border-radius: 12px;
}

.ceremony-gallery-modal__doc-icon {
    font-size: 2.5rem;
}

.ceremony-gallery-modal__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ceremony-bg);
    text-decoration: none;
    background: linear-gradient(160deg, rgba(201, 168, 122, 0.95) 0%, var(--ceremony-gold) 100%);
    border-radius: 10px;
}

.ceremony-gallery-modal__meta {
    padding: 1rem 1.25rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--ceremony-text-muted);
    line-height: 1.65;
    border-top: 1px solid var(--glass-border-light);
}

.ceremony-gallery-modal__meta p {
    margin: 0 0 0.5rem;
}

.ceremony-gallery-modal__meta p:last-child {
    margin-bottom: 0;
}

.ceremony-gallery-modal__meta strong {
    color: var(--ceremony-text);
}

.ceremony-gallery-modal__filename {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem;
    font-size: 0.75rem;
    border-top: 1px dashed var(--glass-border-light);
    word-break: break-all;
}

/* Legacy gallery caption (kept for compatibility) */
.ceremony-gallery__caption {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    font-size: 0.75rem;
    color: var(--ceremony-text-muted);
}

.ceremony-gallery__caption strong {
    color: var(--ceremony-text);
    font-size: 0.8125rem;
}

.ceremony-gallery__location {
    color: var(--ceremony-gold-muted);
}

@media (max-width: 400px) {
    .ceremony-body {
        padding: 1.5rem;
    }

    .ceremony-header {
        padding: 1.25rem 1rem 1rem;
    }

    .ceremony-header__banner {
        width: 52px;
        margin-bottom: 0.75rem;
    }

    .ceremony-header__top {
        gap: 0.75rem;
    }

    .ceremony-header__img--portrait {
        width: 72px;
        height: 72px;
    }

    .ceremony-header__img--emblem {
        width: 60px;
        height: 60px;
    }
}
