[hidden], .hidden { display:none !important; }
button, input, textarea { font:inherit; }
button, a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
:focus-visible { outline:2px solid #805e23; outline-offset:4px; }
.lang { z-index:5; }
.back-link { display:block; margin:0 0 28px; font-size:15px; }
.upload-page main { padding-top:72px; }
.upload-page::before, .admin-page::before, footer::before {
  content:""; position:absolute; bottom:0; right:0; width:220px; height:220px;
  background:url(/art/corner.webp) left bottom / contain no-repeat; transform:scaleX(-1); pointer-events:none;
}
.dropzone { display:block; width:100%; padding:30px 18px; margin-top:24px; border:1px dashed var(--gold); border-radius:8px; background:#fffdf980; color:var(--soft); }
.dropzone.dragging { background:#eee3ce; border-style:solid; }
.preview-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; }
.preview { position:relative; min-width:0; border:1px solid var(--line); border-radius:6px; background:#fffdf9; overflow:hidden; }
.preview img { width:100%; aspect-ratio:1; object-fit:cover; display:block; }
.preview .filename { display:block; padding:8px; font-size:13px; overflow-wrap:anywhere; }
.preview .fallback { min-height:100px; display:grid; place-items:center; color:var(--soft); }
.preview button { position:absolute; right:5px; top:5px; width:32px; height:32px; border-radius:50%; border:1px solid var(--line); background:var(--paper); color:var(--ink); }
progress { width:100%; height:12px; accent-color:var(--gold); }
.item { flex-wrap:wrap; }
.item .nm { min-width:100px; }
.item .st { font-size:13px; white-space:normal; }
.btn { text-decoration:none; }
.closing-garland { height:90px; width:min(650px,95%); margin:10px auto 0; background:url(/art/divider.webp) center / contain no-repeat; }
.more-photos { display:block; margin:20px auto 30px; background:transparent; font:inherit; }
.gallery img { aspect-ratio:4/3; object-fit:cover; background:linear-gradient(110deg,#eee6d9 20%,#faf6ef 40%,#eee6d9 60%); background-size:200% 100%; animation:shimmer 1.7s linear infinite; }
.gallery img.loaded { aspect-ratio:auto; animation:none; }
@keyframes shimmer { to { background-position:-200% 0; } }
#top { position:fixed; bottom:175px; right:16px; z-index:4; border:1px solid var(--line); background:var(--paper); color:var(--gold); width:42px; height:42px; border-radius:50%; }
.lightbox { cursor:default; padding:55px 16px 25px; }
.lightbox img { max-height:65vh; max-width:90vw; object-fit:contain; }
.lightbox .box-caption { color:#faf6ef; text-align:center; max-width:700px; max-height:15vh; overflow:auto; margin:0; white-space:pre-wrap; }
.box-controls { display:flex; align-items:center; gap:20px; color:#faf6ef; }
.lightbox button { border:1px solid #a8853f; background:#2b2622; color:#faf6ef; min-width:44px; min-height:44px; border-radius:50%; }
.lightbox .box-close { position:absolute; top:12px; right:16px; }
@media(max-width:520px) {
 .upload-page::before,.admin-page::before,footer::before { width:150px; height:150px; }
 .upload-page::after,.admin-page::after,footer::after { width:150px; height:150px; }
 .preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .row .btn { padding:10px 16px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
.admin-page main { max-width:1100px; padding-top:72px; }
.admin-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:18px; margin:24px 0; }
.admin-card { min-width:0; padding:14px; background:#fffdf9; border:1px solid var(--line); border-radius:8px; }
.admin-card img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:4px; }
.admin-card .thumb { border:0; padding:0; display:block; width:100%; background:transparent; }
.admin-card p { overflow-wrap:anywhere; font-size:14px; }
.admin-card label { margin-top:6px; }
.admin-card textarea { min-height:90px; }
.admin-card .btn { padding:8px 18px; }
[role=tab][aria-selected=true] { background:var(--gold); color:white; }
#duplicates { border-top:1px solid var(--line); padding-top:20px; }
#duplicates summary { cursor:pointer; font:600 26px "Cormorant Garamond",serif; }
.duplicate-group { border:1px solid var(--line); padding:16px; margin:16px 0; border-radius:8px; }
.duplicate-options { display:flex; gap:16px; overflow:auto; padding-bottom:12px; }
.duplicate-options label { width:140px; flex:none; overflow-wrap:anywhere; font-size:13px; }
.duplicate-options img { display:block; width:140px; height:110px; object-fit:cover; }
dialog { max-width:94vw; max-height:94vh; background:var(--paper); border:1px solid var(--gold); border-radius:8px; }
dialog::backdrop { background:#140f0de8; }
dialog img { display:block; max-width:85vw; max-height:72vh; margin-top:12px; }
dialog button { background:transparent; border:1px solid var(--gold); color:var(--ink); padding:8px 16px; border-radius:30px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#share { background:transparent; font:inherit; }
#album { scroll-margin-top:70px; }
