:root {
    --cream: #faf7f1;
    --paper: #fffdfa;
    --sage: #71816a;
    --sage-dark: #435746;
    --sage-soft: #e8ede4;
    --rose: #dbb8b3;
    --rose-soft: #f4e7e4;
    --gold: #bc9555;
    --gold-soft: #ead9b9;
    --ink: #3c3934;
    --muted: #746e65;
    --danger: #9b403a;
    --success: #477052;
    --border: #ebdfcf;
    --shadow: 0 18px 48px rgba(75, 60, 38, .09);
    --serif: "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --script: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
    --sans: "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 6% 4%, rgba(219,184,179,.16), transparent 30rem),
        radial-gradient(circle at 96% 12%, rgba(113,129,106,.13), transparent 32rem),
        var(--cream);
    color: var(--ink);
    font: 16px/1.65 var(--sans);
}
.landing-page, .form-page, .gallery-page { font-size: 17px; }

a { color: var(--sage-dark); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
    color: var(--sage-dark);
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.18;
}
h1 { font-size: clamp(2.05rem, 7vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

:focus-visible {
    outline: 3px solid rgba(188,149,85,.58);
    outline-offset: 3px;
}

.floral {
    display: none;
    position: fixed;
    z-index: 0;
    width: 210px;
    height: 270px;
    pointer-events: none;
    opacity: .64;
}
.floral::before {
    content: "";
    position: absolute;
    height: 235px;
    width: 1px;
    background: var(--gold-soft);
    transform: rotate(30deg);
}
.floral span {
    position: absolute;
    width: 52px;
    height: 24px;
    border-radius: 52px 2px 52px 2px;
    background: rgba(113,129,106,.2);
    border: 1px solid rgba(113,129,106,.18);
}
.floral span:nth-child(1) { top: 50px; left: 55px; transform: rotate(-12deg); }
.floral span:nth-child(2) { top: 111px; left: 88px; transform: scaleX(-1) rotate(-18deg); }
.floral span:nth-child(3) {
    top: 168px;
    left: 60px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(219,184,179,.28);
    box-shadow: 18px 3px 0 rgba(219,184,179,.2), 8px -15px 0 rgba(219,184,179,.18);
}
.floral-left { left: 0; bottom: 4vh; transform: rotate(-18deg); }
.floral-right { right: 0; top: 5vh; transform: scaleX(-1) rotate(-16deg); }

.site-shell {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, 900px);
    margin: 0 auto;
    padding: 24px 0 38px;
}
.wide-shell, .admin-shell {
    position: relative;
    z-index: 1;
    width: min(100% - 28px, 1320px);
    margin: 0 auto;
    padding: 22px 0 44px;
}
.narrow-shell { max-width: 650px; }
.script-title {
    margin: 0 0 14px;
    color: var(--gold);
    font: clamp(1.65rem, 6vw, 2.45rem)/1.4 var(--script);
}
.small-script { font-size: clamp(1.35rem, 4vw, 1.7rem); margin-bottom: 5px; }
.heart { color: #bb615c; }
.subtle { color: var(--muted); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
    background: var(--sage-dark);
    color: #fff;
    box-shadow: 0 9px 19px rgba(67,87,70,.2);
}
.button-primary:hover { background: #344837; color: #fff; }
.button-secondary {
    border-color: var(--gold-soft);
    background: var(--paper);
    color: var(--sage-dark);
}
.button-secondary:hover { background: #fff; color: var(--gold); }
.button-danger {
    border-color: #eccdc8;
    background: #fff7f5;
    color: var(--danger);
}
.button-danger:hover { background: #f8ece9; color: var(--danger); }
.button-large { min-height: 58px; padding-inline: 30px; font-size: 1.05rem; }
.button-quiet {
    min-height: 43px;
    padding: 9px 18px;
    color: #fff;
    background: rgba(20,20,20,.42);
    border-color: rgba(255,255,255,.3);
}
.button-quiet:hover { color: #fff; background: rgba(20,20,20,.68); }
.full-width { width: 100%; }
.upload-tip { margin: 10px 0 0; text-align: center; }
.text-button {
    padding: 10px 5px;
    border: 0;
    color: var(--muted);
    background: transparent;
    text-decoration: underline;
}
.back-link {
    display: inline-block;
    margin: 0 0 18px;
    font-weight: 600;
}
.back-link.centered { margin-top: 26px; }

/* Naslovnica */
.hero-card {
    padding: clamp(38px, 8vw, 70px) clamp(22px, 8vw, 82px);
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(255,253,250,.9);
    box-shadow: var(--shadow);
    text-align: center;
}
.wedding-date {
    margin-bottom: 20px;
    color: var(--gold);
    font-size: .83rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.couple-title {
    margin: 0;
    color: var(--sage-dark);
    font-size: clamp(3.05rem, 12vw, 5.3rem);
    letter-spacing: .025em;
}
.couple-title span { color: var(--gold); font-size: .82em; font-style: italic; }
.hero-card .script-title { margin-top: 4px; }
.gold-divider {
    position: relative;
    height: 22px;
    width: min(240px, 65%);
    margin: 23px auto 30px;
}
.gold-divider::before, .gold-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--gold-soft);
}
.gold-divider::before { left: 0; }
.gold-divider::after { right: 0; }
.gold-divider span {
    position: absolute;
    top: calc(50% - 4px);
    left: calc(50% - 4px);
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
}
.welcome-copy {
    max-width: 620px;
    margin: 0 auto;
    color: #4b4842;
    text-align: left;
}
.welcome-copy p { margin-bottom: 17px; }
.welcome-copy .emphasis {
    margin-top: 26px;
    color: var(--sage-dark);
    font-family: var(--serif);
    font-size: 1.23rem;
}
.hero-actions {
    display: grid;
    gap: 12px;
    margin: 36px auto 0;
    max-width: 410px;
}
.landing-page .hero-actions .button,
.form-page .button,
.gallery-page .button { min-height: 54px; }
.stats-section {
    margin: 34px auto 0;
    text-align: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.stat-card {
    padding: 20px 10px 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--paper);
}
.stat-card strong {
    display: block;
    color: var(--sage-dark);
    font: 2.1rem/1.1 var(--serif);
}
.stat-card span { color: var(--muted); font-size: .94rem; }
.privacy-note {
    margin: 28px auto 0;
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
}

/* Obrazci in prijave */
.form-card, .gate-card {
    padding: clamp(26px, 7vw, 48px);
    border-radius: 26px;
    border: 1px solid var(--border);
    background: var(--paper);
    box-shadow: var(--shadow);
}
.form-card h1, .gate-card h1 { margin-bottom: 12px; text-align: center; }
.gate-card { margin-top: clamp(20px, 10vh, 86px); text-align: center; }
.form-intro {
    margin: 0 auto 28px;
    color: var(--muted);
    text-align: center;
}
.simple-upload-card {
    padding: clamp(30px, 7vw, 54px) clamp(20px, 7vw, 52px);
}
.simple-upload-card h1 {
    font-size: clamp(2.15rem, 8vw, 3rem);
}
.upload-lead {
    max-width: 440px;
    font-size: 1.08rem;
    line-height: 1.62;
}
.wedding-form {
    display: grid;
    gap: 18px;
    text-align: left;
}
.compact-form { margin: 27px 0 4px; }
.field { display: grid; gap: 7px; }
.field > span {
    color: var(--sage-dark);
    font-weight: 600;
}
.field em {
    margin-left: 5px;
    color: var(--gold);
    font-size: .8rem;
    font-style: normal;
    font-weight: 500;
    text-transform: uppercase;
}
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea, .filter-form input, .filter-form select {
    width: 100%;
    border: 1px solid #ddcfbc;
    border-radius: 12px;
    padding: 13px 14px;
    background: #fff;
    color: var(--ink);
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--gold);
    outline: 2px solid rgba(188,149,85,.2);
}
.simple-upload-card .field input {
    min-height: 56px;
    font-size: 1.08rem;
}
.name-prompt {
    margin: -5px 0 0;
    font-size: 1rem;
}
.file-drop {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 27px 18px;
    border: 2px dashed var(--gold-soft);
    border-radius: 18px;
    background: #fcfaf6;
    color: var(--sage-dark);
    text-align: center;
    cursor: pointer;
}
.file-drop strong { font-size: 1.08rem; }
.file-drop span { color: var(--muted); }
.file-drop .file-help { font-size: .84rem; }
.file-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-picker {
    gap: 15px;
    padding: 0;
    border: 0;
    background: transparent;
}
.upload-picker strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 18px 20px;
    border-radius: 999px;
    background: var(--sage-dark);
    color: #fff;
    box-shadow: 0 12px 23px rgba(67,87,70,.22);
    font-size: clamp(1.15rem, 4.8vw, 1.3rem);
}
.upload-picker:hover strong {
    background: #344837;
}
.upload-picker:focus-within strong {
    outline: 3px solid rgba(188,149,85,.58);
    outline-offset: 3px;
}
.upload-picker span {
    padding-inline: 10px;
    font-size: 1rem;
    line-height: 1.55;
}
.wedding-form.is-uploading .upload-picker {
    opacity: .68;
    cursor: wait;
}
.upload-guidance {
    margin: 0;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-size: 1rem;
}
.consent-notice {
    margin: 0;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.55;
    text-align: center;
}
.checkbox-field {
    display: flex;
    gap: 11px;
    color: #524e47;
    font-size: .95rem;
    line-height: 1.5;
}
.checkbox-field input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    accent-color: var(--sage-dark);
}
.consent-simple {
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fcfaf6;
    font-size: 1rem;
}
.alert, .flash {
    padding: 12px 15px;
    border-radius: 12px;
    background: #f8ece9;
    color: var(--danger);
}
.flash.success { background: #edf5ec; color: var(--success); }
.flash.error { background: #f8ece9; color: var(--danger); }
.upload-progress {
    margin-top: 27px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.upload-progress h2 { font-size: 1.38rem; }
.file-results { display: grid; gap: 12px; }
.file-result {
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.file-result-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    font-size: .91rem;
}
.file-result-name {
    max-width: 72%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.progress-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--sage-soft);
}
.progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gold);
    transition: width .15s ease;
}
.file-result.success .progress-bar span { background: var(--success); }
.file-result.failed { border-color: #eccdc8; }
.file-result.failed .progress-bar span { background: var(--danger); }
.retry-button {
    margin-top: 9px;
    padding: 5px 12px;
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--sage-dark);
}
.thank-you-card {
    padding: 22px 0 5px;
    text-align: center;
}
.thank-you-card .button { margin: 7px 3px 0; }
.simple-upload-card .thank-you-card h2 {
    font-size: clamp(2.1rem, 8vw, 2.8rem);
    margin-bottom: 12px;
}
.simple-upload-card .thank-you-card .button {
    display: flex;
    width: min(100%, 360px);
    min-height: 58px;
    margin: 12px auto 0;
}

/* Zasebne strani */
.private-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 26px;
    padding: 16px 4px;
}
.private-header h1 { margin-bottom: 2px; }
.private-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.filters a {
    flex: 0 0 auto;
    min-height: 43px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
}
.filters a.active {
    border-color: var(--sage-dark);
    background: var(--sage-dark);
    color: #fff;
}
.story-cta { white-space: nowrap; }
.gallery-main-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}
.gallery-main-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 11px 19px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--paper);
    color: var(--sage-dark);
    font-weight: 600;
}
.gallery-main-actions a.active {
    border-color: var(--sage-dark);
    background: var(--sage-dark);
    color: #fff;
}
.gallery-more-filters {
    margin: 0 0 26px;
}
.gallery-more-filters summary {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 9px 17px;
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    background: var(--paper);
    color: var(--sage-dark);
    cursor: pointer;
    font-weight: 600;
}
.gallery-more-filters .filters {
    margin: 13px 0 0;
}
.story-intro {
    margin: 22px 0 28px;
    padding: clamp(22px, 5vw, 38px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--paper);
    text-align: center;
}
.story-intro h2 { margin: 0 0 8px; }
.story-intro p:last-child { margin-bottom: 0; color: var(--muted); }
.story-chapter-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 0 16px;
}
.story-chapter-title h2 {
    flex: 0 0 auto;
    margin: 0;
    color: var(--sage-dark);
    font-size: clamp(1.35rem, 4vw, 1.8rem);
}
.story-chapter-title span {
    flex: 1;
    height: 1px;
    background: var(--gold-soft);
}
.album-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}
.album-item {
    overflow: hidden;
    border-radius: 15px;
    background: var(--paper);
    box-shadow: 0 5px 19px rgba(75,60,38,.07);
}
.album-item img, .album-item video {
    display: block;
    width: 100%;
    max-height: 64vh;
    object-fit: cover;
    background: #ece7df;
}
.album-item:nth-child(3n) img { aspect-ratio: 4 / 5; }
.album-item:not(:nth-child(3n)) img { aspect-ratio: 1 / 1; }
.media-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}
.video-card {
    position: relative;
    min-height: 180px;
    background: linear-gradient(140deg, #e7eee5, #d9dfd6);
}
.video-card-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    opacity: .82;
}
.video-play-button {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(30,43,33,.65), rgba(30,43,33,.12));
    font-weight: 700;
}
.play-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: var(--sage-dark);
    font-size: 1.35rem;
    box-shadow: 0 9px 23px rgba(0,0,0,.18);
}
.album-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 11px 10px;
    color: var(--muted);
    font-size: .82rem;
}
.album-meta a { font-weight: 600; }
.album-meta .button {
    min-height: 40px;
    margin-top: 7px;
    padding: 8px 14px;
}
.album-meta small { margin-top: 5px; line-height: 1.45; }
.empty-state {
    padding: clamp(34px, 8vw, 72px) 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--paper);
    text-align: center;
}
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination a {
    display: grid;
    place-items: center;
    min-width: 43px;
    min-height: 43px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--paper);
}
.pagination a.active { background: var(--sage-dark); color: #fff; }
.lightbox {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 48px 22px;
    background: rgba(25,29,25,.9);
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 1180px);
    max-height: 100%;
}
.lightbox-stage img, .lightbox-stage video {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 190px);
    margin: 0 auto;
    object-fit: contain;
    background: #121612;
}
.lightbox-stage video { width: min(100%, 1080px); }
.lightbox-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #fff;
    background: rgba(15,18,15,.42);
}
.lightbox-meta span { color: #ded7ca; font-weight: 700; }
.lightbox-meta p { flex: 1 1 260px; margin: 0; }
.lightbox-meta .button {
    min-height: 42px;
    background: transparent;
    color: #fff;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 19px;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,.2);
    font-size: 2.5rem;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 68px;
    height: 82px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.16);
    font-size: 3.5rem;
    line-height: 1;
    transform: translateY(-50%);
}
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,.27); color: #fff; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* Zid zelja */
.wall-shell { max-width: 1060px; }
.message-wall {
    display: grid;
    gap: 15px;
}
.wish-card {
    position: relative;
    padding: 25px 23px 19px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--paper);
    box-shadow: 0 8px 25px rgba(75,60,38,.06);
}
.wish-card::before {
    content: "\201C";
    position: absolute;
    top: -3px;
    left: 15px;
    color: var(--gold-soft);
    font: 3.5rem/1 var(--serif);
}
.wish-card p { position: relative; margin: 12px 0 20px; }
.wish-card footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .9rem;
}

/* Diaprojekcija */
.slideshow-page {
    overflow: hidden;
    background: #11130f;
}
.slideshow-page .floral { display: none; }
.slideshow {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #11130f;
}
.slide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.slide-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.54), transparent 25%, transparent 72%, rgba(0,0,0,.18));
    pointer-events: none;
}
.slide-brand {
    position: absolute;
    left: clamp(16px, 4vw, 45px);
    bottom: clamp(18px, 4vw, 37px);
    color: #fff;
    font: clamp(1.3rem, 3vw, 2.15rem)/1.3 var(--serif);
}
.slide-brand span {
    display: block;
    color: #ead9b9;
    font: clamp(1.1rem, 2.4vw, 1.5rem)/1.4 var(--script);
}
.slide-caption {
    position: absolute;
    right: clamp(16px, 4vw, 45px);
    bottom: 32px;
    color: rgba(255,255,255,.77);
}
.slide-controls {
    position: absolute;
    top: 17px;
    right: 18px;
    display: flex;
    gap: 7px;
    opacity: .25;
    transition: opacity .2s;
}
.slideshow:hover .slide-controls, .slide-controls:focus-within { opacity: 1; }
.slideshow-empty {
    width: min(90%, 600px);
    margin: 20vh auto;
    color: #fff;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
}
.slideshow-empty h1 { color: #fff; }

/* Administracija */
.admin-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.admin-header h1 { margin: 0; }
.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 22px 0;
}
.dashboard-grid article {
    padding: 15px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--paper);
}
.dashboard-grid strong {
    display: block;
    color: var(--sage-dark);
    font: 1.75rem/1.2 var(--serif);
}
.dashboard-grid span { color: var(--muted); font-size: .85rem; }
.admin-panel {
    margin: 18px 0;
    padding: clamp(13px, 3vw, 24px);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--paper);
}
.panel-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}
.panel-title h2 { margin: 0; }
.panel-title p { margin: 6px 0 0; }
.admin-review-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.admin-review-tabs a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
}
.admin-review-tabs a.active {
    border-color: var(--sage-dark);
    background: var(--sage-dark);
    color: #fff;
}
.advanced-filters {
    margin-bottom: 17px;
    color: var(--muted);
}
.advanced-filters summary {
    margin-bottom: 12px;
    cursor: pointer;
    color: var(--sage-dark);
    font-weight: 600;
}
.filter-form {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}
.admin-bulk-bar {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 15px 0 19px;
    padding: 12px;
    border-radius: 16px;
    background: #f8f5ef;
}
.admin-bulk-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.admin-bulk-bar .button {
    min-height: 43px;
    padding: 9px 14px;
    font-size: .9rem;
}
.admin-feedback { margin: 0 0 18px; }
.empty-admin { color: var(--muted); }
.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-media-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}
.admin-card-check {
    position: absolute;
    z-index: 2;
    top: 9px;
    left: 9px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255,253,250,.94);
    color: var(--sage-dark);
    font-size: .78rem;
    font-weight: 600;
}
.admin-card-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--sage-dark);
}
.admin-preview-trigger {
    position: relative;
    display: block;
    width: 100%;
    height: clamp(142px, 21vw, 205px);
    padding: 0;
    border: 0;
    background: #ece7df;
}
.admin-preview-trigger img, .admin-preview-trigger video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-video-label {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34,43,35,.72);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}
.admin-card-content {
    display: grid;
    gap: 6px;
    padding: 11px;
}
.admin-card-content small { color: var(--muted); }
.admin-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.favorite-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f7eedc;
    color: #876735;
    font-size: .8rem;
}
.admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}
.admin-card-actions button, .card-advanced button, .admin-modal-actions button {
    padding: 6px 10px;
    border: 1px solid var(--gold-soft);
    border-radius: 8px;
    background: #fff;
    color: var(--sage-dark);
    font-size: .87rem;
}
.card-advanced {
    margin-top: 5px;
    color: var(--muted);
    font-size: .88rem;
}
.card-advanced summary { cursor: pointer; font-weight: 600; }
.card-advanced > a { display: block; margin: 8px 0; font-weight: 600; }
.card-advanced form { margin: 8px 0 0; }
.story-edit-form { display: grid; gap: 5px; min-width: 170px; }
.story-edit-form input, .story-edit-form select {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.table-scroll { overflow-x: auto; }
.admin-table {
    width: 100%;
    min-width: 930px;
    border-collapse: collapse;
    font-size: .9rem;
}
.admin-table th {
    color: var(--muted);
    font-size: .77rem;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}
.admin-table th, .admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ede4d7;
    vertical-align: top;
}
.admin-table small { display: block; color: var(--muted); }
.preview-cell img {
    width: 56px;
    height: 56px;
    border-radius: 7px;
    object-fit: cover;
}
.video-badge {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 7px;
    background: var(--sage-soft);
    font-size: .7rem;
    font-weight: 700;
}
.filename {
    display: block;
    max-width: 190px;
    word-break: break-word;
}
.inline-select { display: flex; gap: 4px; }
.inline-select select {
    max-width: 130px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.actions-cell form {
    display: flex;
    gap: 5px;
    margin-top: 6px;
}
.actions-cell button, .message-review button, .inline-select button {
    border: 1px solid var(--gold-soft);
    border-radius: 7px;
    background: #fff;
    color: var(--sage-dark);
    padding: 4px 7px;
    font-size: .83rem;
}
.actions-cell .danger-link, .message-review .danger-link {
    color: var(--danger);
    border-color: #eccdc8;
}
.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f5eee4;
    color: #745e3a;
    font-size: .8rem;
}
.status-approved { background: #e7f0e7; color: var(--success); }
.status-hidden { background: #f0efed; color: #68645c; }
.admin-viewer {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 68px 62px 25px;
    background: rgba(25,29,25,.92);
}
.admin-viewer[hidden] { display: none; }
.admin-viewer-frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
    width: min(100%, 1180px);
    max-height: 100%;
}
.admin-viewer-frame > img, .admin-viewer-frame > video {
    display: block;
    width: 100%;
    height: min(74vh, 780px);
    object-fit: contain;
    background: #111511;
}
.admin-viewer-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 16px;
    background: var(--paper);
}
.admin-viewer-info strong { color: var(--sage-dark); font-size: 1.15rem; }
.admin-viewer-info span { color: var(--muted); }
.admin-modal-actions { display: grid; gap: 7px; }
.admin-modal-actions .danger-link { border-color: #eccdc8; color: var(--danger); }
.admin-viewer-close, .admin-viewer-nav {
    position: absolute;
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    background: rgba(255,255,255,.15);
}
.admin-viewer-close {
    top: 13px;
    right: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 2.25rem;
}
.admin-viewer-nav {
    top: 50%;
    width: 54px;
    height: 74px;
    border-radius: 999px;
    font-size: 3rem;
    transform: translateY(-50%);
}
.admin-viewer-nav.previous { left: 7px; }
.admin-viewer-nav.next { right: 7px; }
.message-review { display: grid; gap: 12px; }
.message-review article {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.message-review article p { margin: 9px 0; }
.message-review form { display: flex; gap: 6px; margin-top: 10px; }

/* QR */
.qr-shell {
    position: relative;
    z-index: 1;
    width: min(100% - 30px, 610px);
    margin: 0 auto;
    padding: 28px 0;
    text-align: center;
}
.qr-card {
    padding: clamp(28px, 7vw, 50px);
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #fffdfa;
    box-shadow: var(--shadow);
}
.qr-card h1 { font-size: clamp(1.8rem, 6vw, 2.55rem); }
.qr-intro { color: var(--muted); }
.qr-code {
    display: flex;
    justify-content: center;
    margin: 24px auto;
    padding: 13px;
    width: fit-content;
    background: #fff;
}
.qr-code img, .qr-code canvas { max-width: 100%; height: auto; }
.qr-link {
    overflow-wrap: anywhere;
    color: var(--sage-dark);
    font-weight: 600;
}
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }

@media (min-width: 640px) {
    .site-shell { padding-top: 40px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .private-header, .admin-header { flex-direction: row; justify-content: space-between; align-items: center; }
    .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
    .message-wall { grid-template-columns: repeat(2, 1fr); }
    .filter-form { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
    .dashboard-grid { grid-template-columns: repeat(4, 1fr); }
    .admin-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
    .floral { display: block; }
    .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .admin-media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .hero-card { border-radius: 22px; }
    .slide-caption { display: none; }
    .slide-controls { left: 10px; right: 10px; justify-content: flex-end; }
    .slide-controls .button { padding: 8px 12px; font-size: .86rem; }
    .lightbox { padding: 56px 8px 12px; }
    .lightbox-stage img, .lightbox-stage video { max-height: calc(100vh - 220px); }
    .lightbox-nav { top: 50%; bottom: auto; width: 52px; height: 66px; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    .lightbox-meta { font-size: .92rem; }
    .admin-viewer { padding: 64px 9px 12px; }
    .admin-viewer-frame { display: flex; flex-direction: column; }
    .admin-viewer-frame > img, .admin-viewer-frame > video { height: min(48vh, 440px); }
    .admin-viewer-info { padding: 12px; }
    .admin-viewer-nav { width: 45px; height: 56px; top: 43%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto; transition: none !important; animation: none !important; }
}

@media print {
    body.qr-page {
        background: #fff;
        color: #000;
    }
    .qr-page .floral, .qr-actions { display: none !important; }
    .qr-shell { width: 100%; padding: 0; }
    .qr-card { box-shadow: none; border: 0; }
}
