:root {
    --ink: #3f0b0f;
    --forest: #4d090f;
    --forest-light: #672027;
    --cream: #f7f3f3;
    --paper: #ffffff;
    --sand: #d2c4c5;
    --sage: #9b7b7d;
    --rust: #7d393b;
    --muted: #75696a;
    --line: rgba(77, 9, 15, .14);
    --shadow: 0 24px 70px rgba(77, 9, 15, .12);
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.theme-original {
    --ink: #23251f;
    --forest: #26382f;
    --forest-light: #385044;
    --cream: #f3eee6;
    --paper: #fffdf9;
    --sand: #ded2c2;
    --sage: #a8b2a1;
    --rust: #a45f45;
    --muted: #74766f;
    --line: rgba(35, 37, 31, .13);
    --shadow: 0 24px 70px rgba(40, 35, 27, .12);
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { width: 100%; max-width: 100%; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
main, section, header, footer { min-width: 0; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 20px; font-weight: bold; letter-spacing: -.3px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 18px; font-style: italic; }
.brand-light { color: #fff; }
.eyebrow { margin: 0 0 16px; color: var(--rust); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.65; }

.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 22px; padding: 0 24px; border: 0; border-radius: 2px; cursor: pointer; font-size: 13px; font-weight: 750; letter-spacing: .03em; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.button:hover { transform: translateY(-2px); }
.button span { font-size: 18px; transition: transform .25s ease; }
.button:hover span { transform: translateX(4px); }
.button-primary { color: #fff; background: var(--rust); box-shadow: 0 12px 30px rgba(125, 57, 59, .2); }
.button-primary:hover { background: #68292c; }
.button-dark { color: #fff; background: var(--forest); }
.button-dark:hover { background: var(--forest-light); }
.button-full { width: 100%; }
.button-quiet { min-height: 42px; border: 1px solid var(--line); background: #fff; }
.button:disabled { opacity: .55; cursor: wait; }

.field { display: grid; gap: 8px; }
.field > span, .format-options legend { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.field span small { color: var(--muted); font-weight: 500; text-transform: none; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 3px; outline: none; background: rgba(255,255,255,.8); color: var(--ink); padding: 14px 15px; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--rust); background: #fff; box-shadow: 0 0 0 3px rgba(125, 57, 59, .1); }
.form-stack { display: grid; gap: 19px; margin-top: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 120px; gap: 14px; }
.form-grid.equal { grid-template-columns: 1fr 1fr; }
.alert { margin: 0 0 20px; border: 1px solid; border-radius: 3px; padding: 13px 15px; font-size: 13px; line-height: 1.5; }
.alert-error { border-color: #c99a9d; background: #fff1f2; color: #68292c; }
.alert-success { border-color: #bda9ab; background: #f3ebec; color: #4d090f; }
.theme-original .button-primary { box-shadow: 0 12px 30px rgba(164,95,69,.2); }
.theme-original .button-primary:hover { background: #8e4d36; }
.theme-original .field input:focus, .theme-original .field textarea:focus { box-shadow: 0 0 0 3px rgba(164,95,69,.09); }
.theme-original .alert-error { border-color: #e6b9a9; background: #fff1ec; color: #803b26; }
.theme-original .alert-success { border-color: #b7cbb8; background: #eff8ef; color: #315b37; }

/* Installazione */
.setup-page { min-height: 100vh; background: var(--forest); }
.setup-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(350px, 42%) 1fr; }
.setup-intro { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; padding: 52px clamp(35px, 6vw, 100px); color: #f8f3eb; background: radial-gradient(circle at 80% 26%, rgba(255,255,255,.08), transparent 25%), var(--forest); }
.setup-intro::after { content: ''; position: absolute; width: 420px; height: 420px; right: -240px; bottom: 12%; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.setup-intro > * { position: relative; z-index: 1; }
.setup-intro h1 { margin: 0; font: 400 clamp(42px, 5vw, 74px)/.97 var(--serif); letter-spacing: -.04em; }
.setup-intro h1 em { color: #d2c4c5; font-weight: 400; }
.setup-intro > div > p:last-child { max-width: 500px; color: rgba(255,255,255,.65); line-height: 1.7; }
.setup-progress { display: flex; align-items: center; gap: 16px; }
.setup-progress span { color: rgba(255,255,255,.35); font: italic 20px var(--serif); }
.setup-progress span.active { color: #fff; }
.setup-progress small { margin-left: 6px; font: 700 9px var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.setup-progress i { width: 45px; height: 1px; background: rgba(255,255,255,.25); }
.setup-card { width: min(100%, 590px); align-self: center; justify-self: center; margin: 45px; padding: 55px; background: var(--paper); box-shadow: var(--shadow); }
.setup-card h2, .login-card h1 { margin: 4px 0 6px; font: 400 40px var(--serif); letter-spacing: -.03em; }
.step-label { margin: 0; color: var(--rust); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

/* Pagina pubblica */
.guest-page { overflow-x: hidden; }
.hero { display: grid; position: relative; min-height: 100vh; grid-template-columns: 51% 49%; align-items: center; padding: 120px clamp(24px, 8vw, 130px) 80px; background: linear-gradient(90deg, var(--cream) 0 51%, #d2c4c5 51%); }
.theme-original .hero { background: linear-gradient(90deg, var(--cream) 0 51%, #d7d6ca 51%); }
.hero-copy { min-width: 0; position: relative; z-index: 2; max-width: 600px; }
.hero h1 { max-width: 100%; margin: 0; overflow-wrap: anywhere; font: 400 clamp(64px, 8.5vw, 135px)/.84 var(--serif); hyphens: auto; letter-spacing: -.07em; }
.hero-script { margin: 18px 0 23px 17%; color: var(--rust); font: italic 29px var(--serif); transform: rotate(-4deg); }
.hero-text { max-width: 450px; margin: 0 0 34px; color: #6f6263; font-size: 16px; line-height: 1.75; }
.hero-art { width: min(35vw, 480px); height: min(46vw, 620px); position: relative; justify-self: end; }
.photo-card { position: absolute; padding: 13px 13px 55px; background: #fff; box-shadow: 0 30px 55px rgba(77,9,15,.18); }
.photo-card-main { z-index: 2; inset: 6% 4% 2% 12%; transform: rotate(4deg); animation: float 6s ease-in-out infinite; }
.photo-card-back { inset: 0 17% 12% 0; transform: rotate(-8deg); }
.photo-placeholder { display: grid; height: 100%; place-items: center; overflow: hidden; position: relative; background: linear-gradient(150deg, #4d090f, #9b7b7d); }
.photo-placeholder::before { content: ''; width: 60%; height: 60%; position: absolute; right: -10%; bottom: -12%; border-radius: 50% 50% 0 0; background: rgba(210,196,197,.72); transform: rotate(-20deg); }
.photo-placeholder::after { content: ''; width: 65%; height: 70%; position: absolute; left: -20%; bottom: -30%; border-radius: 50%; background: rgba(125,57,59,.82); }
.photo-placeholder span { z-index: 1; color: rgba(255,255,255,.75); font: 60px var(--serif); }
.photo-placeholder.alternate { background: linear-gradient(130deg, #7d393b, #d2c4c5 48%, #4d090f); }
.theme-original .hero-text { color: #60635d; }
.theme-original .photo-card { background: #f8f5ef; box-shadow: 0 30px 55px rgba(38,42,35,.2); }
.theme-original .photo-placeholder { background: linear-gradient(150deg, #5d7168, #b29a81); }
.theme-original .photo-placeholder::before { background: rgba(239,224,198,.55); }
.theme-original .photo-placeholder::after { background: rgba(45,68,57,.75); }
.theme-original .photo-placeholder.alternate { background: linear-gradient(130deg, #ae7b62, #e1c5ac 48%, #6a7f71); }
.botanical { position: absolute; z-index: 3; color: var(--forest); font: 100px var(--serif); opacity: .5; }
.botanical-one { right: -40px; top: -35px; transform: rotate(25deg); }
.botanical-two { left: -35px; bottom: -35px; transform: rotate(-25deg); }
@keyframes float { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }

.upload-section { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(500px, 1.25fr); gap: clamp(50px, 9vw, 150px); padding: clamp(90px, 10vw, 160px) clamp(24px, 8vw, 130px); background: var(--paper); }
.section-heading { padding-top: 45px; }
.section-heading h2 { margin: 0 0 25px; font: 400 clamp(45px, 5vw, 75px)/1 var(--serif); letter-spacing: -.05em; }
.section-heading > p:last-child { max-width: 430px; color: var(--muted); line-height: 1.75; }
.upload-panel { padding: clamp(25px, 4vw, 55px); border: 1px solid var(--line); background: #faf7f7; box-shadow: var(--shadow); }
.dropzone { display: grid; min-height: 330px; place-items: center; align-content: center; position: relative; border: 1px dashed #a99597; background: rgba(255,255,255,.62); text-align: center; transition: border-color .25s, background .25s, transform .25s; }
.dropzone.dragging { border-color: var(--rust); background: #fff3f4; transform: scale(1.01); }
.dropzone input { width: 1px; height: 1px; position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { display: grid; width: 66px; height: 66px; place-items: center; margin-bottom: 18px; border: 1px solid var(--sand); border-radius: 50%; color: var(--rust); background: #fff; cursor: pointer; }
.drop-icon span { font: 300 30px var(--sans); transition: transform .25s; }
.dropzone:hover .drop-icon span { transform: rotate(90deg); }
.dropzone h3 { margin: 0 0 22px; font: 400 25px var(--serif); }
.dropzone p { margin: 9px 0 22px; color: var(--muted); font-size: 13px; }
.dropzone small { color: #917f81; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.theme-original .upload-panel { background: #f8f5ef; }
.theme-original .dropzone { border-color: #aaa99f; background: rgba(255,255,255,.45); }
.theme-original .dropzone.dragging { border-color: var(--rust); background: #fff6f1; }
.theme-original .dropzone small { color: #92938d; }
.text-button { border: 0; border-bottom: 1px solid currentColor; padding: 0 0 2px; color: var(--rust); background: none; cursor: pointer; }
.text-button.danger { color: #7d393b; font-size: 11px; }
.theme-original .text-button.danger { color: #8b4431; }
.file-preview { margin-top: 26px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; }
.preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.preview-item { aspect-ratio: 1; overflow: hidden; position: relative; background: var(--sand); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-item button { display: grid; width: 24px; height: 24px; place-items: center; position: absolute; top: 5px; right: 5px; border: 0; border-radius: 50%; color: #fff; background: rgba(25,25,22,.78); cursor: pointer; }
.name-step { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin-top: 27px; }
.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.upload-progress { margin-top: 22px; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.upload-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.upload-progress strong { font-size: 11px; letter-spacing: .04em; }
.upload-progress > div span { color: var(--muted); font-size: 10px; }
.upload-progress-track { display: block; height: 6px; overflow: hidden; border-radius: 6px; background: var(--sand); }
.upload-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--rust); transition: width .18s ease; }
.upload-progress.error { border-color: #c99a9d; }
.upload-progress.error .upload-progress-track i { background: #9c3438; }
.is-uploading .dropzone, .is-uploading .file-preview, .is-uploading .name-step { opacity: .58; pointer-events: none; }
.honeypot-field { width: 1px; height: 1px; overflow: hidden; position: fixed; left: -10000px; opacity: 0; pointer-events: none; }
.upload-locked-state { display: grid; min-height: 390px; place-items: center; align-content: center; padding: 35px; text-align: center; }
.upload-locked-state .lock-symbol { margin: 0 0 25px; }
.upload-locked-state .eyebrow { margin-bottom: 12px; }
.upload-locked-state h3 { margin: 0 0 12px; font: 400 clamp(27px, 3vw, 38px) var(--serif); letter-spacing: -.03em; }
.upload-locked-state > p:last-child { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.guest-footer { display: flex; align-items: center; justify-content: space-between; padding: 35px clamp(24px, 8vw, 130px); color: rgba(255,255,255,.65); background: var(--forest); }
.guest-footer span, .guest-footer small { color: #fff; font: 25px var(--serif); }
.guest-gallery { padding: clamp(80px, 9vw, 135px) clamp(24px, 8vw, 130px); background: var(--cream); }
.guest-gallery-heading { max-width: 650px; margin-bottom: 38px; }
.guest-gallery-heading h2 { margin: 0 0 15px; font: 400 clamp(38px, 5vw, 64px)/1 var(--serif); letter-spacing: -.05em; }
.guest-gallery-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.guest-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.guest-photo-grid figure { overflow: hidden; margin: 0; aspect-ratio: 1; position: relative; border: 6px solid var(--paper); background: var(--sand); box-shadow: 0 8px 25px rgba(77,9,15,.08); }
.theme-original .guest-photo-grid figure { box-shadow: 0 8px 25px rgba(40,35,27,.08); }
.guest-photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.guest-photo-grid figure:hover img { transform: scale(1.035); }
.guest-video .video-play { display: grid; width: 38px; height: 38px; place-items: center; position: absolute; top: 50%; left: 50%; border-radius: 50%; color: #fff; background: rgba(53,20,24,.78); transform: translate(-50%, -50%); font-size: 13px; }

/* Login e ringraziamento */
.login-page, .thanks-page { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: radial-gradient(circle at 15% 10%, rgba(125,57,59,.13), transparent 32%), var(--cream); }
.theme-original.login-page, .theme-original.thanks-page { background: radial-gradient(circle at 15% 10%, rgba(164,95,69,.12), transparent 32%), var(--cream); }
.login-shell { display: grid; width: min(100%, 460px); gap: 25px; }
.login-shell > .brand { justify-self: center; }
.login-card { padding: clamp(32px, 7vw, 55px); background: var(--paper); box-shadow: var(--shadow); }
.back-link { justify-self: center; color: var(--muted); font-size: 12px; }
.thanks-card { width: min(100%, 620px); padding: clamp(45px, 8vw, 85px); background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.thanks-card.has-photos { width: min(100%, 900px); }
.thanks-mark { display: grid; width: 70px; height: 70px; place-items: center; margin: 0 auto 30px; border-radius: 50%; color: #fff; background: var(--forest); font-size: 25px; }
.thanks-card h1 { margin: 0; font: 400 clamp(45px, 7vw, 70px) var(--serif); letter-spacing: -.05em; }
.thanks-card > p:not(.eyebrow) { max-width: 460px; margin: 20px auto 35px; color: var(--muted); line-height: 1.7; }
.thanks-photos { margin-top: 55px; padding-top: 35px; border-top: 1px solid var(--line); }
.thanks-photos h2 { margin: 0 0 24px; font: 400 28px var(--serif); }
.thanks-photos .guest-photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); text-align: left; }

/* Blocco pagina pubblica */
.public-lock-page { display: flex; width: 100%; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center; padding: 28px; background: var(--forest); }
.public-lock-shell { display: flex; width: 100%; align-items: center; justify-content: center; }
.public-lock-form { width: min(100%, 510px); margin: auto; padding: clamp(35px, 5vw, 58px); background: var(--paper); box-shadow: var(--shadow); }
.public-lock-form h2 { margin: 5px 0 8px; font: 400 clamp(34px, 4vw, 46px) var(--serif); letter-spacing: -.04em; }
.public-lock-form .alert { margin-top: 22px; }
.lock-symbol { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 27px; border-radius: 50%; color: #fff; background: var(--forest); font-size: 26px; }
.admin-access-link { display: block; width: max-content; margin: 24px auto 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }

/* Dashboard */
.admin-page { min-height: 100vh; background: #f6f2f3; }
.theme-original.admin-page { background: #f5f3ef; }
.sidebar { display: flex; width: 245px; height: 100vh; flex-direction: column; position: fixed; z-index: 30; inset: 0 auto 0 0; padding: 34px 23px 22px; color: rgba(255,255,255,.75); background: var(--forest); }
.sidebar .brand { margin: 0 10px 55px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 3px; font-size: 13px; font-weight: 600; transition: color .2s, background .2s; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-icon { width: 20px; color: #d2c4c5; font-size: 19px; text-align: center; }
.theme-original .nav-icon { color: #c9ad98; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.theme-switcher { margin-top: auto; padding: 18px 10px; border-top: 1px solid rgba(255,255,255,.12); }
.theme-switcher label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.theme-switcher label > span { display: grid; min-width: 0; flex: 1; gap: 3px; }
.theme-switcher strong { color: #fff; font-size: 10px; }
.theme-switcher small { color: rgba(255,255,255,.45); font-size: 8px; line-height: 1.35; }
.theme-switcher input { position: absolute; opacity: 0; }
.theme-switcher i { width: 35px; height: 20px; flex: 0 0 auto; position: relative; border-radius: 15px; background: rgba(255,255,255,.22); transition: background .25s; }
.theme-switcher i::after { content: ''; width: 14px; height: 14px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: transform .25s; }
.theme-switcher input:checked + i { background: var(--rust); }
.theme-switcher input:checked + i::after { transform: translateX(15px); }
.theme-switcher + .sidebar-user { margin-top: 0; }
.sidebar-user > div { display: grid; min-width: 0; flex: 1; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; }
.sidebar-user small { margin-top: 3px; color: rgba(255,255,255,.45); font-size: 9px; }
.avatar { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--rust); font: 16px var(--serif); }
.avatar-large { width: 45px; height: 45px; font-size: 19px; }
.admin-main { min-height: 100vh; margin-left: 245px; padding: 45px clamp(25px, 4.5vw, 75px) 70px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 35px; margin-bottom: 35px; }
.admin-header .eyebrow { margin-bottom: 7px; }
.admin-header h1 { margin: 0; font: 400 clamp(34px, 4vw, 49px) var(--serif); letter-spacing: -.04em; }
.menu-toggle { display: none; border: 0; background: none; font-size: 24px; }
.search-form { display: flex; width: min(100%, 340px); align-items: center; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.search-form span { padding-left: 14px; color: var(--muted); font-size: 22px; }
.search-form input { min-width: 0; flex: 1; border: 0; outline: none; padding: 12px; background: transparent; }
.search-form button { align-self: stretch; border: 0; padding: 0 15px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.admin-alert { margin-bottom: 25px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 48px; }
.stat-grid article { display: grid; min-height: 145px; align-content: space-between; padding: 21px; border: 1px solid var(--line); background: var(--paper); }
.stat-grid small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-grid strong { font: 400 35px var(--serif); }
.stat-grid span { color: #9b898b; font-size: 10px; }
.theme-original .stat-grid span { color: #9a9b95; }
.content-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 21px; }
.content-heading h2 { margin: 0 0 5px; font: 400 26px var(--serif); }
.content-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.content-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; padding: 3px; background: var(--paper); }
.view-switch a { padding: 8px 11px; border-radius: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: color .2s, background .2s; }
.view-switch a.active { color: #fff; background: var(--forest); }
.collections-list { display: grid; gap: 16px; }
.collection-card { padding: 20px; border: 1px solid var(--line); background: var(--paper); transition: box-shadow .25s, transform .25s; }
.collection-card:hover { box-shadow: 0 15px 45px rgba(45,42,36,.07); transform: translateY(-2px); }
.collection-meta { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.collection-meta > div:nth-child(2) { min-width: 0; flex: 1; }
.collection-meta h3 { margin: 0 0 5px; font: 400 19px var(--serif); }
.collection-meta p { margin: 0; color: var(--muted); font-size: 10px; }
.collection-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.collection-download { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 18px; padding: 0 12px; color: var(--forest); background: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; transition: border-color .2s, color .2s, background .2s; }
.collection-download span { font-size: 15px; }
.collection-download:hover { border-color: var(--forest); color: #fff; background: var(--forest); }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: #fff; cursor: pointer; font-size: 20px; transition: .2s; }
.icon-button.danger:hover { border-color: #b98184; color: #68292c; background: #fff1f2; }
.theme-original .icon-button.danger:hover { border-color: #c9907e; color: #8b4431; background: #fff2ed; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 9px; }
.admin-photo { min-width: 0; margin: 0; position: relative; border: 1px solid var(--line); background: #fff; }
.admin-photo > a { display: block; overflow: hidden; aspect-ratio: 1.15; position: relative; background: #e8dfe0; }
.theme-original .admin-photo > a { background: #e5e2dc; }
.admin-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.admin-photo img.thumbnail-pending { object-fit: cover; opacity: .72; }
.admin-photo .video-play { display: grid; width: 42px; height: 42px; place-items: center; position: absolute; top: 50%; left: 50%; border-radius: 50%; color: #fff; background: rgba(53,20,24,.78); box-shadow: 0 5px 18px rgba(0,0,0,.2); transform: translate(-50%, -50%); pointer-events: none; font-size: 15px; }
.thumbnail-queue-status { position: fixed; right: 20px; bottom: 20px; z-index: 120; max-width: min(360px, calc(100vw - 40px)); border: 1px solid var(--line); border-radius: 3px; padding: 11px 15px; color: var(--forest); background: var(--paper); box-shadow: 0 10px 35px rgba(45,42,36,.14); font-size: 11px; font-weight: 700; }
.thumbnail-queue-status.warning { color: #68292c; background: #fff1f2; }
.admin-photo:hover img { transform: scale(1.045); }
.admin-photo figcaption { display: flex; align-items: center; gap: 6px; padding: 8px 9px; }
.admin-photo figcaption span { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-photo figcaption a { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--forest); }
.dashboard-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.grid-photo-card > a { aspect-ratio: 1; }
.grid-photo-card figcaption > div { display: grid; min-width: 0; flex: 1; gap: 3px; }
.grid-photo-card figcaption strong { overflow: hidden; font: 400 13px var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.grid-photo-card figcaption span { display: block; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.pagination-summary { color: var(--muted); font-size: 10px; }
.pagination > div { display: flex; align-items: center; gap: 5px; }
.pagination a, .pagination > div > span { display: grid; min-width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: var(--paper); font-size: 10px; font-weight: 700; transition: color .2s, border-color .2s, background .2s; }
.pagination a:hover, .pagination a.active { border-color: var(--forest); color: #fff; background: var(--forest); }
.pagination > div > span.disabled { opacity: .35; }
.pagination > div > span.ellipsis { min-width: 20px; border-color: transparent; background: transparent; }
.delete-photo-form { position: absolute; z-index: 2; top: 6px; right: 6px; }
.delete-photo-form button { display: grid; width: 27px; height: 27px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(35,37,31,.82); box-shadow: 0 3px 10px rgba(0,0,0,.18); cursor: pointer; font-size: 18px; line-height: 1; transition: color .2s, background .2s, transform .2s; }
.delete-photo-form button:hover { color: #fff; background: #7d393b; transform: scale(1.08); }
.theme-original .delete-photo-form button:hover { background: #994b34; }
.lightbox-open { overflow: hidden; }
.lightbox { display: flex; visibility: hidden; position: fixed; z-index: 100; inset: 0; align-items: center; justify-content: center; padding: 70px 85px; opacity: 0; background: rgba(44, 5, 10, .95); backdrop-filter: blur(10px); transition: visibility .25s, opacity .25s; }
.theme-original .lightbox { background: rgba(18,24,20,.94); }
.lightbox.open { visibility: visible; opacity: 1; }
.lightbox-content { display: flex; width: min(100%, 1200px); height: 100%; min-width: 0; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.lightbox-content > img, .lightbox-content > video { min-height: 0; max-width: 100%; max-height: calc(100% - 58px); object-fit: contain; opacity: 1; box-shadow: 0 25px 80px rgba(0,0,0,.32); transition: opacity .2s; }
.lightbox-content > video { width: min(100%, 1000px); background: #000; }
.lightbox.loading .lightbox-content > img, .lightbox.loading .lightbox-content > video { opacity: 0; }
.lightbox-loader { display: none; width: 38px; height: 38px; position: absolute; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: lightbox-spin .7s linear infinite; }
.lightbox.loading .lightbox-loader { display: block; }
.lightbox-caption { width: 100%; min-height: 40px; flex: 0 0 auto; padding-top: 18px; color: rgba(255,255,255,.72); font-size: 11px; text-align: center; }
.lightbox-caption span { display: block; max-width: min(100%, 650px); margin: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-top-actions { display: flex; position: absolute; z-index: 3; top: 22px; right: 25px; align-items: center; gap: 10px; }
.lightbox-download { display: inline-flex; height: 42px; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 22px; padding: 0 17px; color: #fff; background: rgba(255,255,255,.06); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; transition: background .2s, transform .2s; }
.lightbox-download span { font-size: 16px; }
.lightbox-download:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.lightbox-close, .lightbox-nav { display: grid; place-items: center; position: absolute; z-index: 2; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; transition: background .2s, transform .2s; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.16); transform: scale(1.06); }
.lightbox-close { width: 42px; height: 42px; position: static; font-size: 25px; }
.lightbox-nav { width: 46px; height: 46px; top: 50%; font-size: 19px; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
.empty-state { padding: 80px 25px; border: 1px dashed var(--line); background: var(--paper); text-align: center; }
.empty-state > span { font-size: 35px; color: var(--rust); }
.empty-state h3 { margin: 14px 0 5px; font: 400 25px var(--serif); }
.empty-state p { margin: 0 0 25px; color: var(--muted); font-size: 12px; }
.multi-download-page { display: grid; min-height: 100vh; place-items: center; padding: 30px; background: var(--cream); }
.multi-download-card { width: min(100%, 680px); padding: clamp(35px, 7vw, 65px); background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.multi-download-icon { display: grid; width: 60px; height: 60px; place-items: center; margin: 0 auto 25px; border-radius: 50%; color: #fff; background: var(--forest); font-size: 25px; }
.multi-download-card h1 { margin: 0; font: 400 clamp(36px, 6vw, 54px) var(--serif); letter-spacing: -.045em; }
.multi-download-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.multi-download-progress { height: 7px; overflow: hidden; margin: 24px 0; border-radius: 7px; background: var(--sand); }
.multi-download-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--rust); transition: width .25s; }
.multi-download-note { margin: 20px auto; }
.download-fallback { margin: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.download-fallback summary { padding: 14px 0; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; }
.download-fallback > div { display: grid; max-height: 250px; overflow-y: auto; padding-bottom: 10px; }
.download-fallback a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 5px; border-top: 1px solid var(--line); font-size: 11px; }
.multi-download-card > .back-link { display: inline-block; margin-top: 8px; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(220px, 320px); gap: 22px; align-items: start; }
.settings-card { display: grid; gap: 21px; padding: clamp(25px, 4vw, 45px); border: 1px solid var(--line); background: var(--paper); }
.settings-heading { display: flex; gap: 16px; align-items: start; }
.settings-heading > span { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--forest); font: italic 12px var(--serif); }
.settings-heading h2 { margin: 0 0 4px; font: 400 23px var(--serif); }
.settings-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-divider { height: 1px; margin: 12px 0; background: var(--line); }
.format-options { display: flex; gap: 10px; border: 0; padding: 0; margin: 0; }
.format-options legend { margin-bottom: 10px; }
.format-options label input { position: absolute; opacity: 0; }
.format-options label span { display: block; border: 1px solid var(--line); padding: 11px 15px; color: var(--muted); cursor: pointer; font-size: 11px; transition: .2s; }
.format-options label input:checked + span { border-color: var(--forest); color: #fff; background: var(--forest); }
.invite-token-field, .invite-url-field { display: flex; min-width: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.invite-token-field { margin-top: -18px; }
.invite-token-field input, .invite-url-field input { min-width: 0; flex: 1; border: 0; outline: none; padding: 13px 14px; color: var(--muted); background: transparent; font: 11px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.invite-token-field input:focus { box-shadow: inset 0 0 0 1px var(--rust); }
.invite-token-field button, .invite-url-field button { flex: 0 0 auto; border: 0; border-left: 1px solid var(--line); padding: 0 16px; color: #fff; background: var(--forest); cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.invite-token-field button:hover, .invite-url-field button:hover { background: var(--forest-light); }
.field-help { margin: -10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.field-help code { color: var(--rust); }
.toggle-field { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.toggle-field > input { position: absolute; opacity: 0; }
.toggle-control { width: 44px; height: 24px; flex: 0 0 auto; position: relative; border-radius: 20px; background: #cacac4; transition: background .25s; }
.toggle-control::after { content: ''; width: 18px; height: 18px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: transform .25s; }
.toggle-field > input:checked + .toggle-control { background: var(--rust); }
.toggle-field > input:checked + .toggle-control::after { transform: translateX(20px); }
.toggle-field > span:last-child { display: grid; gap: 3px; }
.toggle-field strong { font-size: 12px; }
.toggle-field small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.emergency-toggle { border: 1px solid var(--line); border-radius: 3px; padding: 14px; background: rgba(125,57,59,.04); }
.theme-original .emergency-toggle { background: rgba(164,95,69,.04); }
.server-note { display: flex; gap: 13px; padding: 20px; color: #e8e6df; background: var(--forest); }
.server-note > span { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font: italic 15px var(--serif); }
.server-note strong { font-size: 12px; }
.server-note p { margin: 7px 0 0; color: rgba(255,255,255,.6); font-size: 10px; line-height: 1.65; }
.server-note code { color: #e4cfd1; }
.theme-original .server-note code { color: #efd3c4; }
.sidebar-overlay { display: none; }

.reveal { animation: reveal .7s cubic-bezier(.2,.7,.2,1) both; }
.delay-1 { animation-delay: .14s; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
    .hero { grid-template-columns: 55% 45%; padding-left: 55px; padding-right: 55px; }
    .upload-section { gap: 45px; padding-left: 55px; padding-right: 55px; }
    .preview-grid { grid-template-columns: repeat(4, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
    .setup-shell { display: block; }
    .setup-intro { min-height: 390px; padding: 35px 28px; }
    .setup-intro h1 { font-size: 44px; }
    .setup-intro > div > p:last-child { display: none; }
    .setup-card { width: auto; margin: 20px; padding: 35px 25px; }
    .public-lock-page { padding: 16px; }
    .public-lock-shell { padding: 0; }
    .public-lock-form { width: 100%; padding: 34px 24px; }
    .hero { display: block; min-height: auto; padding: 105px 24px 85px; background: var(--cream); }
    .hero-copy { width: 100%; max-width: 100%; text-align: center; }
    .hero h1 { width: 100%; font-size: clamp(48px, 15vw, 76px); line-height: .92; letter-spacing: -.055em; }
    .hero-script { margin-left: 0; }
    .hero-text { margin-left: auto; margin-right: auto; }
    .hero-art { width: min(72vw, 390px); height: min(90vw, 500px); margin: 70px auto 0; }
    .upload-section { display: block; padding: 80px 20px; }
    .section-heading { padding: 0 5px 35px; }
    .section-heading h2 { font-size: 48px; }
    .upload-panel { width: 100%; min-width: 0; padding: 18px; }
    .dropzone { min-height: 290px; padding: 25px 15px; }
    .name-step { grid-template-columns: 1fr; }
    .name-step .button { width: 100%; }
    .guest-footer { align-items: center; justify-content: center; text-align: center; }
    .guest-footer small { display: none; }
    .guest-gallery { padding: 70px 20px; }
    .guest-photo-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .guest-photo-grid figure { border-width: 4px; }
    .sidebar { transform: translateX(-100%); transition: transform .3s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: block; position: fixed; z-index: 20; inset: 0; visibility: hidden; opacity: 0; background: rgba(53,7,12,.48); transition: .3s; }
    .theme-original .sidebar-overlay { background: rgba(24,29,25,.45); }
    .sidebar-overlay.open { visibility: visible; opacity: 1; }
    .admin-main { width: 100%; min-width: 0; margin-left: 0; padding: 25px 18px 50px; overflow: hidden; }
    .admin-header { display: grid; grid-template-columns: auto 1fr; gap: 15px; }
    .menu-toggle { display: block; }
    .search-form { width: 100%; grid-column: 1 / -1; }
    .content-heading { align-items: flex-start; gap: 15px; flex-direction: column; }
    .content-actions { width: 100%; flex-wrap: wrap; }
    .photo-strip { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .dashboard-photo-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .pagination > div { max-width: 100%; flex-wrap: wrap; }
    .lightbox { padding: 65px 15px 25px; }
    .lightbox-content { height: calc(100% - 55px); }
    .lightbox-content > img, .lightbox-content > video { max-height: calc(100% - 50px); }
    .lightbox-top-actions { top: 13px; right: 15px; }
    .lightbox-download { height: 40px; padding: 0 14px; }
    .lightbox-close { width: 40px; height: 40px; }
    .lightbox-nav { width: 40px; height: 40px; top: auto; bottom: 16px; background: rgba(255,255,255,.12); }
    .lightbox-prev { left: 15px; }
    .lightbox-next { right: 15px; }
    .lightbox-caption { min-height: 42px; padding: 15px 55px 0; }
}

@media (max-width: 500px) {
    .form-grid, .form-grid.equal { grid-template-columns: 1fr; }
    .setup-progress small { display: block; margin: 3px 0 0; }
    .preview-grid { grid-template-columns: repeat(3, 1fr); }
    .hero h1 { font-size: clamp(43px, 14vw, 66px); }
    .stat-grid { gap: 8px; }
    .stat-grid article { min-height: 125px; padding: 15px; }
    .stat-grid strong { font-size: 27px; }
    .collection-card { padding: 14px; }
    .collection-meta p { line-height: 1.5; }
    .collection-meta { align-items: flex-start; flex-wrap: wrap; }
    .collection-actions { width: 100%; justify-content: flex-end; }
    .dashboard-photo-grid { grid-template-columns: repeat(2, 1fr); }
    .format-options { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
