/* ---------- Tokens ---------- */
:root {
  --accent: #0a84ff;
  --on-accent: #fff;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --fill: rgba(120, 120, 128, 0.12);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --danger: #ff3b30;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.06), 0 20px 48px rgba(0, 0, 0, 0.14);
  --row: 300px;
  --gap: 10px;
  --pad: max(20px, 5vw);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #98989d;
    --line: rgba(255, 255, 255, 0.1);
    --fill: rgba(120, 120, 128, 0.24);
    --glass: rgba(30, 30, 32, 0.62);
    --glass-strong: rgba(30, 30, 32, 0.8);
    --danger: #ff453a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 56px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 17px/1.47 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(40px, 8vw, 96px); font-weight: 700; line-height: 1.02; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg path[d^="M8 5v14"], svg path[d^="M8 5h3"] { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inline { display: inline-flex; margin: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-scroll { overflow: hidden; }
.glass { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  font: 600 15px var(--font); letter-spacing: -0.01em; color: var(--text); background: var(--fill);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.3s var(--spring), background 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.btn:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-tinted { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.btn-tinted:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn-tinted[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.btn-light { background: #fff; color: #1d1d1f; }
.btn-light:hover { background: rgba(255, 255, 255, 0.85); }
.btn-glass { color: #fff; background: rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.26); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; font-size: 18px; text-decoration: none;
  transition: background 0.2s, transform 0.3s var(--spring);
}
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.small { width: 44px; height: 36px; }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
input:not([type=checkbox]):not([type=color]):not([type=file]) {
  width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px;
  font: 17px var(--font); color: var(--text); background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=color] { width: 64px; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.error { color: var(--danger); margin: 0; font-size: 15px; }
.notice { padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, transparent); margin: 0; }
.stack { display: grid; gap: 12px; margin-top: 28px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Password gate ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; overflow: hidden; background: #0b0b0d; }
.gate-bg { position: fixed; inset: -60px; background: center/cover no-repeat; filter: blur(14px) brightness(0.55) saturate(1.2); transform: scale(1.08); animation: drift 30s ease-in-out infinite alternate; }
.gate-mesh {
  position: fixed; inset: -20%;
  background:
    radial-gradient(40% 50% at 20% 25%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%),
    radial-gradient(45% 55% at 80% 30%, color-mix(in srgb, var(--accent) 35%, #6e5bff), transparent 70%),
    radial-gradient(50% 60% at 60% 85%, color-mix(in srgb, var(--accent) 45%, #ff6b9a), transparent 70%),
    #0b0b0d;
  filter: blur(40px) saturate(1.2); animation: drift 24s ease-in-out infinite alternate;
}
.gate-card {
  position: relative; width: min(420px, 100%); padding: 40px 32px 32px; border-radius: 32px; text-align: center; color: #fff;
  background: rgba(30, 30, 32, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: rise 0.9s var(--ease-out) both;
}
.gate-thumb { width: 88px; height: 88px; margin: 0 auto 24px; border-radius: 22px; background: center/cover; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.gate-card h1 { font-size: clamp(30px, 6vw, 40px); }
.gate-sub { margin: 10px 0 0; color: rgba(255, 255, 255, 0.7); }
.gate-card input { background: rgba(255, 255, 255, 0.1) !important; border-color: rgba(255, 255, 255, 0.18) !important; color: #fff !important; text-align: center; }
.gate-card input::placeholder { color: rgba(255, 255, 255, 0.5); }
.gate-card .error { color: #ff6961; }
/* Admin login reuses the gate without a background. */
.gate:not(.has-cover):not(:has(.gate-mesh)) { background: var(--bg); }
.gate:not(.has-cover):not(:has(.gate-mesh)) .gate-card { color: var(--text); background: var(--glass); box-shadow: var(--shadow-float); }
.gate:not(.has-cover):not(:has(.gate-mesh)) .gate-card input { background: var(--surface) !important; border-color: var(--line) !important; color: var(--text) !important; }
.gate:not(.has-cover):not(:has(.gate-mesh)) .gate-card input::placeholder { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 56vh; display: flex; align-items: flex-end; padding: 96px var(--pad) 72px; overflow: hidden; background: #0b0b0d; color: #fff; isolation: isolate; }
.hero.has-cover { min-height: 100vh; min-height: 100svh; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; animation: hero-in 2.2s var(--ease-out) both; }
.hero-img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero.has-cover::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0) 65%), linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 25%);
}
.hero-content { max-width: 1000px; }
.hero-content > * { animation: rise 1s var(--ease-out) both; }
.hero-content > :nth-child(2) { animation-delay: 0.08s; }
.hero-content > :nth-child(3) { animation-delay: 0.16s; }
.hero-content > :nth-child(4) { animation-delay: 0.24s; }
.hero-content > :nth-child(5) { animation-delay: 0.32s; }
.hero-sub { font-size: clamp(19px, 2.4vw, 26px); font-weight: 500; letter-spacing: -0.01em; margin: 16px 0 0; color: rgba(255,255,255,0.88); }
.hero-meta { margin: 12px 0 0; font-size: 15px; color: rgba(255,255,255,0.6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; color: rgba(255,255,255,0.7); display: grid; bottom: 56px; place-items: center; width: 44px; height: 44px; animation: bob 2.4s ease-in-out infinite; }
.scroll-cue svg { width: 28px; height: 28px; }

/* ---------- Floating toolbar ---------- */
.toolbar-wrap { position: sticky; top: 12px; z-index: 30; padding: 0 var(--pad); margin-top: -28px; pointer-events: none; }
.toolbar {
  pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 6px;
  border-radius: 999px; box-shadow: var(--shadow-float); outline: 1px solid var(--line); background: var(--glass-strong);
  transition: background 0.3s;
}
.toolbar-wrap.is-stuck .toolbar { background: var(--glass); }
.toolbar-sections { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding-left: 2px; scroll-behavior: smooth; }
.toolbar-sections::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background 0.25s, color 0.25s;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: color-mix(in srgb, var(--text) 10%, var(--surface)); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.toolbar-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.toolbar .btn { min-height: 40px; }

/* ---------- Sections & grid ---------- */
.sections { padding: 24px var(--pad) 96px; max-width: 1600px; margin: 0 auto; }
.section { margin-top: clamp(56px, 8vw, 104px); }
.section:first-of-type { margin-top: clamp(32px, 4vw, 48px); }
.section-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 4px 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-index { font: 600 15px var(--font); color: var(--accent); font-variant-numeric: tabular-nums; }
.section-count { font-size: 15px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 96px 0; }

/* Justified rows: each tile grows proportionally to its aspect ratio. */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.grid::after { content: ""; flex-grow: 999999; }
.tile { position: relative; flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row)); max-width: calc(var(--r) * var(--row) * 1.7); }
.tile.will-reveal { opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.8s var(--ease-out) var(--delay), transform 0.9s var(--ease-out) var(--delay); }
.tile.will-reveal.is-visible { opacity: 1; transform: none; }
.tile-btn {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  background: var(--fill); cursor: zoom-in; transition: transform 0.5s var(--spring), box-shadow 0.4s;
}
.tile-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 40%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.tile-btn img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: transform 0.8s var(--ease-out), opacity 0.3s, border-radius 0.3s; }
@media (hover: hover) {
  .tile:hover .tile-btn { box-shadow: 0 14px 34px rgba(0,0,0,0.18); }
  .tile:hover .tile-btn img { transform: scale(1.04); }
  .tile:hover .tile-btn::after, .tile:hover .tile-dl { opacity: 1; }
}
.tile-dl {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; background: rgba(0,0,0,0.35); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 0.3s, transform 0.3s var(--spring);
}
.tile-dl:hover { transform: scale(1.08); }
.tile-dl:focus-visible { opacity: 1; }
.selecting .tile-dl { display: none; }
.check {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,0.2); color: #fff;
  opacity: 0; transform: scale(0.6); transition: all 0.35s var(--spring); box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.check svg { width: 16px; height: 16px; stroke-width: 2.8; opacity: 0; }
.selecting .tile-btn { cursor: pointer; }
.selecting .check { opacity: 1; transform: scale(1); }
.tile-btn.is-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile-btn.is-selected .check { background: var(--accent); border-color: var(--accent); }
.tile-btn.is-selected .check svg { opacity: 1; }
.tile-btn.is-selected img { transform: scale(1.04); opacity: 0.85; }

.selbar {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 22px; border-radius: 999px;
  box-shadow: var(--shadow-float); outline: 1px solid var(--line); animation: rise-center 0.5s var(--spring); white-space: nowrap;
}
.selbar span { font-weight: 600; margin-right: 8px; font-variant-numeric: tabular-nums; }
.foot { text-align: center; padding: 64px 24px 48px; border-top: 1px solid var(--line); }
.foot p { margin: 0; font-size: 13px; }
.foot-brand { font: 600 15px var(--font-display) !important; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px !important; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: #000; color: #fff; overflow: hidden; opacity: 0; transition: opacity 0.25s;
}
.lightbox.is-open { opacity: 1; }
.lb-ambient {
  position: absolute; inset: -15%; background: center/cover no-repeat; filter: blur(70px) saturate(1.4) brightness(0.35);
  transform: scale(1.1); transition: background-image 0.6s; pointer-events: none;
}
.lb-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 16px 8px; }
.lb-pill { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.lb-counter { padding: 10px 16px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-actions a { color: #fff; }
.lb-actions .icon-btn:hover { background: rgba(255,255,255,0.14); }
.lb-stage { position: relative; z-index: 1; flex: 1; min-height: 0; }
.lb-stage img {
  position: absolute; inset: 4px clamp(8px, 7vw, 104px); width: calc(100% - 2 * clamp(8px, 7vw, 104px)); height: calc(100% - 8px); object-fit: contain; user-select: none; -webkit-user-drag: none;
  opacity: 0; transform: translateX(var(--from, 0)) scale(0.985); transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}
.lb-stage img.is-loaded { opacity: 1; transform: none; }
.is-playing .lb-stage img.is-loaded { animation: kenburns 4.5s linear both; }
.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  cursor: pointer; transition: background 0.2s, transform 0.3s var(--spring);
}
.lb-nav:hover { background: rgba(255,255,255,0.2); }
.lb-nav:active { transform: scale(0.9); }
.lb-prev { left: max(12px, calc(3.5vw - 24px)); }
.lb-next { right: max(12px, calc(3.5vw - 24px)); }
.lb-strip {
  position: relative; z-index: 2; display: flex; gap: 6px; height: 76px; padding: 10px 50vw; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-thumb { flex: 0 0 auto; height: 100%; aspect-ratio: var(--r); padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: 0.45; background: rgba(255,255,255,0.08); transition: opacity 0.25s, transform 0.35s var(--spring); scroll-snap-align: center; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 0.8; }
.lb-thumb.is-active { opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 2px #fff; margin: 0 6px; }
.lb-progress { position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.i-pause, .is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }

@media (max-width: 640px) {
  :root { --row: 150px; --gap: 6px; }
  .lb-nav { display: none; }
  .lb-stage img { inset: 4px 0; width: 100%; }
  .hide-sm { display: none; }
  .toolbar .btn { padding: 0 14px; }
  .hero-actions .btn { flex: 1; }
  .section-head { grid-template-columns: auto 1fr; }
  .section-count { grid-column: 2; }
  .selbar { padding-left: 16px; }
}

/* ---------- Admin ---------- */
.admin-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px max(16px, 4vw); border-bottom: 1px solid var(--line); min-height: 60px; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 32px 16px 80px; display: grid; gap: 24px; }
.page-head { display: flex; align-items: center; justify-content: space-between; }
.page-head h1 { font-size: 34px; }
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; margin-bottom: 16px; }
.create-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
@media (max-width: 720px) { .create-form { grid-template-columns: 1fr; } }
.gallery-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gcard { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform 0.3s var(--spring); }
.gcard:hover { transform: translateY(-2px); }
.gcard-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, var(--surface)), var(--surface)); }
.gcard-cover img { width: 100%; height: 100%; object-fit: cover; }
.gcard-body { display: grid; gap: 2px; padding: 14px 16px 16px; }
.gcard-body .muted { font-size: 13px; }

.share { display: grid; gap: 12px; }
.share h2 { margin-bottom: 0; }
.share-row { display: flex; gap: 8px; }
.password-flash { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, #34c759 14%, transparent); }
.password-flash code { font: 600 17px ui-monospace, "SF Mono", Menlo, monospace; }
.password-flash p { flex-basis: 100%; margin: 0; }
.settings-grid .field:has(.focal) { grid-column: 1 / -1; max-width: 640px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.banner-preview { margin-top: 8px; border-radius: 10px; aspect-ratio: 16/7; object-fit: cover; width: 100%; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text) !important; font-weight: 400 !important; min-height: 44px; }

.section-admin { display: grid; gap: 16px; }
.section-admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rename { display: flex; gap: 4px; flex: 1; min-width: 240px; max-width: 460px; }
.rename input { font-weight: 600 !important; }
.section-tools { display: flex; align-items: center; gap: 4px; }
.section-tools .count { margin-right: 8px; font-size: 15px; }
.dropzone {
  display: grid; place-items: center; gap: 4px; padding: 32px 16px; border: 2px dashed var(--line); border-radius: var(--radius);
  text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.upload-progress { position: relative; height: 32px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--text) 6%, transparent); }
.upload-progress .bar { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 30%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s; }
.upload-progress .label { position: relative; display: block; padding: 6px 12px; font-size: 13px; }
.admin-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.admin-grid li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--text) 6%, transparent); transition: opacity 0.2s; }
.admin-grid img { width: 100%; height: 100%; object-fit: cover; }
.admin-grid .del {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.admin-grid li:hover .del, .admin-grid .del:focus-visible { opacity: 1; }
@media (hover: none) { .admin-grid .del { opacity: 1; } }
.admin-grid li.is-deleting { opacity: 0.3; }
.add-section { display: flex; gap: 8px; }
.danger-zone { text-align: center; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes rise-center { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes zoom { from { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@keyframes hero-in { from { transform: scale(1.12); opacity: 0.4; } }
@keyframes drift { to { transform: scale(1.18) translate(2%, -2%); } }
@keyframes bob { 50% { transform: translateY(6px); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.04); } }

/* Admin: banner picker on photos */
.admin-grid .set-banner {
  position: absolute; left: 6px; bottom: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  font: 600 12px var(--font); color: #fff; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  cursor: pointer; opacity: 0; transition: opacity 0.2s;
}
.admin-grid li:hover .set-banner, .admin-grid .set-banner:focus-visible { opacity: 1; }
@media (hover: none) { .admin-grid .set-banner { opacity: 1; } }
.admin-grid li.is-banner { outline: 3px solid var(--accent); outline-offset: 2px; }
.admin-grid li.is-banner .set-banner { opacity: 1; background: var(--accent); }
.notice.is-error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 600; }

/* Admin: banner focal point */
.focal { display: grid; gap: 12px; margin-top: 8px; }
.focal p { margin: 0; }
.focal-picker { position: relative; border-radius: 10px; overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; }
.focal-picker img { width: 100%; height: auto; pointer-events: none; }
.focal-dot {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: 28px; height: 28px; translate: -50% -50%;
  border-radius: 50%; border: 3px solid #fff; background: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 2px 10px rgba(0,0,0,0.4); pointer-events: none;
}
.focal-previews { display: flex; gap: 12px; align-items: flex-end; }
.focal-previews figure { margin: 0; display: grid; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.fp { background: var(--pos) / cover no-repeat; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.fp-desktop { width: 160px; aspect-ratio: 16 / 10; }
.fp-mobile { width: 56px; aspect-ratio: 9 / 19.5; }

/* Admin: security */
.security-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }
.security-form .notice { grid-column: 1 / -1; }
