:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #6e7c76;
  --line: #dfe7e2;
  --paper: #f7faf8;
  --card: #ffffff;
  --accent: #1e765a;
  --accent-dark: #155941;
  --soft: #eaf4ee;
  --danger: #a23e3e;
  --shadow: 0 14px 40px rgba(24, 55, 43, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 20px;
  background: rgba(247, 250, 248, .92);
  border-bottom: 1px solid rgba(223, 231, 226, .8);
  backdrop-filter: blur(14px);
}
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .01em; }
.ghost-link, .ghost-button { color: var(--muted); background: none; border: 0; text-decoration: none; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 72px; }
.hero { padding: 34px 0 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 5vw, 48px); line-height: 1.08; letter-spacing: -.03em; }
h2 { margin-bottom: 8px; font-size: 22px; }
.muted { color: var(--muted); line-height: 1.55; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.album-card, .panel { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.album-card { overflow: hidden; border-radius: 14px; text-decoration: none; color: inherit; }
.album-cover { aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; background: var(--soft); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover.placeholder { color: var(--accent); font-size: 30px; font-weight: 800; }
.album-info { padding: 16px; }
.album-info h2 { margin: 0 0 5px; font-size: 18px; }
.album-info p { margin: 0; color: var(--muted); font-size: 14px; }
.album-lock { color: var(--accent); font-size: 12px; font-weight: 700; }
.panel { border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.narrow { width: min(100%, 480px); margin: 48px auto; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 650; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 118, 90, .12); }
.primary-button, .secondary-button {
  min-height: 42px;
  border-radius: 10px;
  padding: 0 15px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary-button { color: white; background: var(--accent); }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { color: var(--accent-dark); background: var(--soft); border-color: #cfe3d7; }
.error { min-height: 18px; color: var(--danger); font-size: 13px; }
.success { min-height: 18px; color: var(--accent-dark); font-size: 13px; }
.empty { padding: 40px 0; color: var(--muted); text-align: center; }
.hidden { display: none !important; }
.page-heading, .section-heading, .selection-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; color: var(--accent-dark); background: var(--soft); font-size: 12px; font-weight: 750; white-space: nowrap; }
.admin-albums { display: grid; gap: 10px; }
.admin-album { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.admin-album h3 { margin: 0 0 5px; font-size: 16px; }
.admin-album p { margin: 0; color: var(--muted); font-size: 13px; }
.file-picker { padding: 18px; border: 1px dashed #aac9b7; border-radius: 12px; background: #f4fbf6; }
.file-picker input { margin-top: 10px; padding: 0; border: 0; background: transparent; }
.hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-bar { width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 18px; }
.mini-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.photo-card { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px; background: #e9f0ec; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card input { position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; accent-color: var(--accent); }
.photo-card.selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.selection-toolbar { position: sticky; top: 62px; z-index: 10; align-items: center; padding: 12px 0; background: rgba(247, 250, 248, .94); backdrop-filter: blur(12px); }
.selection-toolbar p { margin: 3px 0 0; font-size: 12px; }
.toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 120px); padding: 12px 16px; border-radius: 999px; color: #fff; background: #1d2d27; box-shadow: var(--shadow); transition: transform .2s ease; }
.toast.show { transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .topbar { padding: 0 15px; }
  .shell { width: min(100% - 24px, 1120px); padding-top: 20px; }
  .hero { padding-top: 18px; }
  .panel { padding: 17px; border-radius: 13px; }
  .page-heading, .section-heading, .selection-toolbar { display: grid; }
  .selection-toolbar { gap: 10px; }
  .toolbar-actions { justify-content: stretch; }
  .toolbar-actions button { flex: 1; min-width: 0; padding: 0 9px; font-size: 12px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-album { align-items: flex-start; flex-direction: column; }
  .admin-album .secondary-button { width: 100%; }
}
