:root{color-scheme:light;--ink:#172e27;--muted:#52635b;--forest:#10392d;--line:#d9e2d9;--cream:#f7f7ef;--mint:#d5edbd;font-family:system-ui,sans-serif;color:var(--ink);background:var(--cream)}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
[hidden]{display:none!important}
.wrap{width:min(1180px,calc(100% - 48px));margin-inline:auto}
.top{background:#fff}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:72px}
.brand{display:flex;align-items:center;gap:12px;font-weight:800;text-decoration:none}
.brand small{display:block;font-weight:500;color:var(--muted)}
.mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--forest);color:var(--mint);font-weight:800}
a{color:inherit}
nav a,footer a{font-size:.9rem;font-weight:650}
.hero{position:relative;isolation:isolate;overflow:hidden;color:white;background:radial-gradient(ellipse at 100% 110%,#477653,transparent 62%),linear-gradient(115deg,#102d26,#195341)}
.hero-photo,.has-photo::after{position:absolute;inset:0;width:100%;height:100%;z-index:-1}
.hero-photo{object-fit:cover}
.has-photo::after{content:"";background:linear-gradient(90deg,#102d26f5,#102d2699)}
.hero-content{padding-block:clamp(52px,8vw,105px)}
h1,h2,h3,p{margin:0}
.hero h1{font:400 clamp(3.15rem,8vw,7rem)/.98 Georgia,serif;letter-spacing:-.055em}
.hero p{color:#e4f1dc;margin:20px 0 30px;font-size:clamp(1rem,2vw,1.2rem)}
.search{max-width:540px}
label{display:block;font-weight:700;font-size:.9rem;margin-bottom:7px}
input,select,textarea{width:100%;font:inherit;padding:12px;border:1px solid #aebcb2;border-radius:10px;background:white;color:var(--ink)}
.search input{padding:16px 17px}
.collection,.manager{padding-block:34px 62px;flex:1}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:22px}
.section-head p,.caption p,.panel p{color:var(--muted);margin-top:5px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:20px}
.card{overflow:hidden;border:1px solid var(--line);border-radius:17px;background:white}
.photo-link{display:grid;place-items:center;aspect-ratio:4/3;background:#e4ecdf;overflow:hidden}
.photo-link img{width:100%;height:100%;object-fit:cover;transition:transform .25s}
.photo-link:hover img{transform:scale(1.04)}
.caption{padding:15px;overflow-wrap:anywhere}
.caption span{font-size:.8rem;font-weight:750;color:#386445}
.caption h3{font-size:1.12rem;margin-top:4px}
.empty,.message{background:#e8efe2;border-radius:12px;padding:18px}
footer{background:#e9eee5}
button{background:var(--forest);color:white;border:0;border-radius:9px;padding:10px 15px;font:inherit;font-weight:700;cursor:pointer}
button:disabled{opacity:.45;cursor:default}
:focus-visible{outline:3px solid #6d9d45;outline-offset:3px}
dialog{padding:18px;border:0;border-radius:16px;background:#12251e;color:#fff;width:min(960px,calc(100% - 24px));max-height:calc(100% - 24px)}
dialog::backdrop{background:#081710df}
.viewer-top,.viewer-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.viewer-top{justify-content:space-between}
.viewer-top h2{font-size:1.15rem;overflow-wrap:anywhere}
#full{display:block;width:100%;height:auto;max-height:65vh;object-fit:contain;margin:12px 0}
.viewer-tools a{padding:8px 0}
.manager h1,.manager>form,.manager>p{margin-bottom:20px}
.panel{max-width:720px;background:white;border:1px solid var(--line);padding:22px;border-radius:14px;display:grid;gap:12px}
.panel label :is(input,textarea){margin-top:5px}
.panel button{justify-self:start}
.manage-item{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}
.manage-item img{width:76px;height:57px;object-fit:cover;border-radius:6px}
.manage-item button{margin-left:auto}
.error{background:#f8e1dc}
@media(max-width:560px){.wrap{width:calc(100% - 28px)}.section-head{align-items:start;flex-wrap:wrap}.viewer-tools{gap:8px}.hero h1{font-size:clamp(2.8rem,11vw,4rem)}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.photo-picker{min-width:0}
.photo-picker input{font-size:16px}
.photo-picker input::file-selector-button{font:inherit;font-weight:700;min-height:44px;margin-right:10px;border:0;border-radius:7px;padding:8px 12px;background:var(--forest);color:white;cursor:pointer}
#photo-queue{list-style:none;margin:10px 0;padding:0;display:grid;gap:6px}
#photo-queue li{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;border:1px solid var(--line);border-radius:9px;padding:5px}
#photo-queue img{width:48px;height:48px;border-radius:5px;object-fit:cover}
#photo-queue span{overflow-wrap:anywhere}
#photo-queue button,#clear-photos{min-height:44px;background:#e8efe2;color:var(--ink)}
#photo-status{font-weight:650}
