:root {
  --bg: #f6f4f1;
  --paper: #fffcf8;
  --ink: #1a1917;
  --muted: #6b6560;
  --line: rgba(26, 25, 23, 0.12);
  --accent: #1a1917;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(246, 244, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
header.site.scrolled { border-bottom-color: var(--line); }
.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.player-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.player-filter select {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
  padding: 8px 28px 8px 10px;
  max-width: 180px;
}
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px 8px;
}
.share-status {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: default; }

.cover {
  position: relative;
  height: min(78vh, 820px);
  background: #ddd6cc center/cover no-repeat;
}
.cover.empty { background: #e6e0d8; }
.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,25,23,0.45), transparent 45%);
}
.cover-title {
  position: absolute;
  left: 0; right: 0; bottom: 48px;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}
.cover-title h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 6vw, 64px);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.cover-title p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

.collection-meta {
  text-align: center;
  padding: 40px 24px 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.grid-wrap { padding: 12px 12px 80px; max-width: 1600px; margin: 0 auto; }
.jrow { display: flex; gap: 8px; margin-bottom: 8px; }
.jcell {
  position: relative;
  overflow: hidden;
  background: #e6e0d8;
  cursor: pointer;
  flex: none;
}
.jcell img, .jcell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  background: rgba(0,0,0,0.12);
  pointer-events: none;
}

.msg {
  text-align: center;
  color: var(--muted);
  padding: 80px 24px;
  line-height: 1.6;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #0c0b0a;
  z-index: 40;
  color: #fff;
}
.lightbox.open { display: flex; flex-direction: column; }
.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 56px 16px;
}
.lightbox-stage img, .lightbox-stage video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lb-video-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.lb-error {
  color: #ddd;
  text-align: center;
  padding: 24px;
  max-width: 420px;
}
.hl-timeline {
  position: relative;
  height: 14px;
  margin: 0 56px 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  cursor: pointer;
}
.hl-mark {
  position: absolute;
  top: 2px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.hl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 24px 18px;
}
.hl-chip {
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #fff;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.hl-chip:hover { background: #fff; color: #0c0b0a; }
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
  padding: 12px;
  opacity: 0.7;
}
.nav:hover { opacity: 1; }
.nav.prev { left: 8px; }
.nav.next { right: 8px; }
.icon-btn {
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,25,23,0.45);
  z-index: 30;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper);
  max-width: 420px;
  width: 100%;
  padding: 32px 28px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
}
.modal h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 8px;
}
.modal p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 20px; }
.modal label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.modal input {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}
.modal .error { color: #9b2c2c; font-size: 13px; margin: -8px 0 12px; }

.download-menu { display: flex; flex-direction: column; gap: 8px; }
.download-menu button, .download-menu a {
  text-align: left;
}

@media (max-width: 700px) {
  header.site { padding: 14px 16px; }
  .cover { height: 56vh; }
  .lightbox-stage { padding: 0 8px 16px; }
  .nav { display: none; }
}
