:root{
  color-scheme:dark;
  --bg:#101114;
  --card:#1a1c22;
  --text:#f4f1ea;
  --muted:#aaa498;
  --accent:#f5c36b;
  --line:#2c2f38;
  --thumb-size:200px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at top,#2b2f3a 0,#101114 45%,#090a0c 100%);color:var(--text);min-height:100vh}
.hero{padding:42px 22px 28px;max-width:1180px;margin:auto}.home{color:var(--accent);text-decoration:none;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:.8rem}.hero h1{font-size:clamp(2.2rem,7vw,5.5rem);line-height:.92;margin:20px 0 14px;text-transform:capitalize}.hero p{color:var(--muted);font-size:1.08rem;max-width:720px}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.button{border:1px solid var(--line);background:var(--accent);color:#171717;border-radius:999px;padding:12px 18px;font-weight:800;cursor:pointer;text-decoration:none}.button.secondary{background:#ffffff12;color:var(--text)}main{max-width:1180px;margin:auto;padding:0 22px 42px}.albums{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.album{display:block;background:rgba(26,28,34,.82);border:1px solid var(--line);border-radius:24px;padding:16px;text-decoration:none;color:var(--text);box-shadow:0 20px 70px rgba(0,0,0,.25);transition:.2s transform,.2s border-color;overflow:hidden}.album:hover{transform:translateY(-3px);border-color:var(--accent)}.album img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:18px;margin-bottom:16px}.album strong{display:block;font-size:1.35rem;text-transform:capitalize}.album span{display:block;color:var(--accent);margin-top:8px}.album small{display:block;color:var(--muted);margin-top:16px;word-break:break-all}.toolbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;background:rgba(16,17,20,.86);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:22px;padding:14px 16px;margin-bottom:18px}.toolbar label{font-weight:800}.toolbar input{flex:1;accent-color:var(--accent)}.toolbar span{color:var(--muted);min-width:88px;text-align:right}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--thumb-size)),1fr));gap:16px;align-items:start}.photo{display:block;border-radius:22px;overflow:hidden;background:var(--card);border:1px solid var(--line);box-shadow:0 18px 60px rgba(0,0,0,.22);cursor:zoom-in}.photo img{display:block;width:100%;aspect-ratio:4/3;height:auto;object-fit:cover;transition:transform .25s ease}.photo:hover img{transform:scale(1.035)}.empty{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:26px;color:var(--muted)}footer{max-width:1180px;margin:0 auto;padding:22px;color:#777;border-top:1px solid var(--line)}code{background:#00000055;padding:2px 6px;border-radius:8px}.lightbox{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;height:100dvh;z-index:50;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center;padding:72px 68px}.lightbox[hidden]{display:none!important}.lightbox img{display:block;max-width:calc(100vw - 136px);max-height:calc(100vh - 144px);max-height:calc(100dvh - 144px);width:auto;height:auto;object-fit:contain;border-radius:18px;box-shadow:0 30px 90px rgba(0,0,0,.5);margin:auto}.lightbox-close,.lightbox-nav{position:fixed;border:1px solid #ffffff30;background:#111111cc;color:white;border-radius:999px;cursor:pointer}.lightbox-close{top:18px;right:18px;width:46px;height:46px;font-size:34px;line-height:1}.lightbox-nav{top:50%;transform:translateY(-50%);width:54px;height:54px;font-size:46px;line-height:.7}.lightbox-nav.prev{left:18px}.lightbox-nav.next{right:18px}.lightbox-caption{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:#111111cc;border:1px solid #ffffff25;border-radius:999px;padding:10px 16px;color:#ddd;font-size:.95rem;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:700px){.hero{padding-top:28px}.actions,.toolbar{align-items:stretch}.toolbar{position:static;flex-wrap:wrap}.toolbar span{text-align:left}.lightbox{padding:64px 14px}.lightbox img{max-width:calc(100vw - 28px);max-height:calc(100vh - 128px);max-height:calc(100dvh - 128px)}.lightbox-nav{width:44px;height:44px;font-size:38px}.lightbox-nav.prev{left:8px}.lightbox-nav.next{right:8px}}

.hero.compact {
  padding-bottom: 2rem;
}

.panel {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,23,42,.12);
  color: #334155;
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(15,23,42,.10);
}

.link-form {
  display: grid;
  gap: 1rem;
}

.link-form label {
  display: grid;
  gap: .4rem;
  font-weight: 700;
  color: #475569;
}

.link-form input,
.share-output {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 14px;
  padding: .85rem 1rem;
  font: inherit;
  background: #ffffff;
  color: #334155;
}

.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
}

.message.error {
  background: #fff1f2;
  color: #9f1239;
}

.message.success {
  background: #ecfdf5;
  color: #065f46;
}

.message.success strong {
  display: block;
  margin-bottom: .5rem;
}

.panel,
.panel p,
.panel label,
.panel strong {
  color: #475569;
}

.panel input,
.link-form input,
.share-output {
  background: #ffffff;
  color: #334155;
  caret-color: #334155;
}

.panel input::placeholder {
  color: #94a3b8;
}


/* Admin */
.admin-message { width:min(1180px, calc(100% - 44px)); margin: 0 auto 1rem; }
.admin-layout { display:grid; grid-template-columns: 320px 1fr; gap: 1rem; align-items:start; }
.admin-side, .admin-main { width:100%; margin:0; }
.panel h2 { margin:0 0 1rem; color:#334155; }
.muted { color:#64748b; }
.mini-form { margin-bottom:1.25rem; padding-bottom:1rem; border-bottom:1px solid rgba(15,23,42,.12); }
.album-list { display:grid; gap:.5rem; }
.album-row { display:block; padding:.8rem .9rem; border:1px solid rgba(15,23,42,.12); border-radius:16px; text-decoration:none; color:#475569; background:#fff; }
.album-row:hover, .album-row.active { border-color:#d39a33; background:#fff8eb; }
.album-row strong { display:block; color:#334155; text-transform:capitalize; }
.album-row span { color:#64748b; font-size:.9rem; }
.admin-title-row { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1rem; }
.admin-title-row h2 { margin-bottom:.25rem; text-transform:capitalize; }
.share-box, .upload-box { display:grid; gap:.8rem; margin:1rem 0; padding:1rem; border:1px solid rgba(15,23,42,.12); border-radius:18px; background:#f8fafc; color:#475569; }
.share-box label, .upload-box label { display:grid; gap:.45rem; font-weight:700; color:#475569; }
.upload-box input[type=file] { color:#475569; background:#fff; border:1px solid rgba(15,23,42,.18); border-radius:14px; padding:.75rem; }
.admin-photos { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; margin-top:1rem; }
.admin-photo-card { background:#fff; border:1px solid rgba(15,23,42,.12); border-radius:18px; padding:.6rem; display:grid; gap:.55rem; color:#475569; }
.admin-photo-card img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:13px; background:#e2e8f0; }
.admin-photo-card span { font-size:.85rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#64748b; }
.button.danger { background:#be123c; color:#fff; border-color:#be123c; }
.button.small { width:100%; padding:.65rem .8rem; font-size:.85rem; }
@media (max-width:900px){ .admin-layout{grid-template-columns:1fr}.admin-title-row{display:grid}.admin-side{order:0}.admin-main{order:1} }
