/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ivory:       #F7F3EC;
  --champagne:   #EDE5D4;
  --gold:        #C9A84C;
  --gold-light:  #E4C97A;
  --gold-dim:    rgba(201,168,76,0.18);
  --ink:         #1A1510;
  --ink-2:       #3D3428;
  --ink-3:       #7A6E5F;
  --ink-4:       #B5AA9B;
  --warm-white:  #FDFAF5;
  --border:      rgba(201,168,76,0.22);
  --border-soft: rgba(26,21,16,0.08);

  --ff-display:  'Playfair Display', Georgia, serif;
  --ff-ui:       'Outfit', 'DM Sans', system-ui, sans-serif;

  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  --nav-h:       64px;
  --max-w:       1280px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-ui);
  background: var(--ivory);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── VIEWS ──────────────────────────────────────────────────── */
.view { display: none; animation: fadeUp 0.45s var(--ease-out) both; }
.view.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════════ */
#view-login {
  min-height: 100dvh;
  display: none;
  position: relative;
  overflow: hidden;
}
#view-login.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(201,168,76,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% -10%, rgba(201,168,76,0.08) 0%, transparent 60%),
    var(--champagne);
}

.login-ornament {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.5;
}
.login-ornament::before {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.login-inner {
  position: relative;
  z-index: 2;
  width: min(480px, 92vw);
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 22px;
}

.login-brand-name {
  font-family: var(--ff-display);
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.login-tagline {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}

.login-form-wrap {
  width: 100%;
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.login-heading {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.login-heading span {
  color: var(--gold);
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.field-input {
  width: 100%;
  background: var(--ivory);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 14px 16px;
  font-family: var(--ff-ui);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus {
  border-color: var(--gold);
}
.field-input::placeholder {
  color: var(--ink-4);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--ink);
  color: var(--warm-white);
  font-family: var(--ff-ui);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.35s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary span { position: relative; z-index: 1; }
.btn-primary:active { transform: scale(0.98); }

.login-note {
  font-size: 12px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.6;
}

.login-footer {
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  text-align: center;
}

.login-divider {
  height: 1px;
  background: var(--border-soft);
  width: 100%;
}

/* ════════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 900;
  background: rgba(247,243,236,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.3s;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
}

.nav-brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 13px;
}

.nav-brand-name {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav-search-wrap {
  flex: 1;
  max-width: 360px;
  position: relative;
  margin-left: auto;
}

.nav-search {
  width: 100%;
  background: var(--champagne);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 9px 16px 9px 38px;
  font-family: var(--ff-ui);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.nav-search:focus {
  border-color: var(--gold);
  background: var(--warm-white);
}
.nav-search::placeholder { color: var(--ink-4); }

.nav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.nav-btn {
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-radius: 2px;
  transition: color 0.2s;
  font-weight: 500;
}
.nav-btn:hover { color: var(--ink); }

.nav-logout {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  transition: all 0.2s;
  font-weight: 500;
}
.nav-logout:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 640px) {
  .nav-search-wrap { display: none; }
  .nav-btn { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   HOME
═══════════════════════════════════════════════════════════════ */
#view-home {
  padding-top: var(--nav-h);
}

/* Hero */
.hero {
  min-height: clamp(380px, 55vw, 580px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 100% at 75% 0%, rgba(201,168,76,0.15) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 0% 100%, rgba(26,21,16,0.06) 0%, transparent 60%),
    linear-gradient(155deg, var(--champagne) 0%, #E8DFC8 60%, var(--champagne) 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(201,168,76,0.07) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(201,168,76,0.07) 60px
    );
}

.hero-cover-wrap {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  overflow: hidden;
}

.hero-cover-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  background: linear-gradient(90deg, var(--champagne), transparent);
  z-index: 2;
}

.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85);
}

.hero-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: clamp(32px, 5vw, 72px);
  max-width: 600px;
  padding-bottom: clamp(40px, 6vw, 80px);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero-eyebrow-text {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 440px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  padding: 14px 28px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-hero-ghost {
  padding: 14px 24px;
  border: 1px solid rgba(26,21,16,0.25);
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-hero-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Sections */
.section {
  padding: 48px 0 16px;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.75; }

/* Rail */
.rail {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 24px;
}
.rail::-webkit-scrollbar { display: none; }

.rail-track {
  display: flex;
  gap: 16px;
  padding: 4px 24px 4px;
  width: max-content;
}

/* Cards */
.card {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}
.card:hover { transform: translateY(-3px); }
.card:hover .card-img-wrap::after { opacity: 1; }

.card-sm { width: 140px; }
.card-md { width: 180px; }
.card-lg { width: 220px; }

.card-img-wrap {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: var(--champagne);
  border: 1px solid var(--border-soft);
}
.card-sm .card-img-wrap { aspect-ratio: 2/3; }
.card-md .card-img-wrap { aspect-ratio: 2/3; }
.card-lg .card-img-wrap { aspect-ratio: 2/3; }

.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--gold);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.25s;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--ink-4);
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 1px;
}

.card-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26,21,16,0.4);
  opacity: 0;
  transition: opacity 0.2s;
  color: white;
  font-size: 28px;
}
.card:hover .card-play-btn { opacity: 1; }

.card-info { padding: 10px 0 0; }

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Continue reading */
.continue-card {
  flex-shrink: 0;
  width: 280px;
  background: var(--warm-white);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  display: flex;
  gap: 14px;
  align-items: center;
}
.continue-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.continue-thumb {
  width: 52px;
  height: 72px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--champagne);
}

.continue-thumb-placeholder {
  width: 52px;
  height: 72px;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.continue-info { flex: 1; min-width: 0; }

.continue-collection {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.continue-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-progress-bar {
  height: 2px;
  background: var(--champagne);
  border-radius: 1px;
  margin-top: 10px;
  overflow: hidden;
}

.continue-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 1px;
}

/* Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 16px;
  padding: 0 24px;
}

/* Videos section */
.video-rail-track {
  display: flex;
  gap: 16px;
  padding: 4px 24px 4px;
  width: max-content;
}

.video-card {
  flex-shrink: 0;
  width: 300px;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}
.video-card:hover { transform: translateY(-3px); }

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 2px;
  background: var(--champagne);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26,21,16,0.35);
  transition: background 0.2s;
}
.video-card:hover .video-play-overlay {
  background: rgba(26,21,16,0.5);
}

.video-play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(247,243,236,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 18px;
  padding-left: 3px;
  transition: transform 0.2s;
}
.video-card:hover .video-play-icon { transform: scale(1.08); }

.video-info { padding: 10px 0 0; }

.video-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Search results */
.search-overlay {
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: var(--ivory);
  z-index: 800;
  overflow-y: auto;
  padding: 32px 24px;
  animation: fadeUp 0.3s var(--ease-out) both;
}

.search-results-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 16px;
}

.search-heading {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════════════════════════
   COLLECTION
═══════════════════════════════════════════════════════════════ */
#view-collection {
  padding-top: var(--nav-h);
}

.coll-hero {
  position: relative;
  background: var(--champagne);
  overflow: hidden;
}

.coll-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 24px clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  position: relative;
  z-index: 2;
}

.coll-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 120% at 100% 50%, rgba(201,168,76,0.1) 0%, transparent 60%),
    var(--champagne);
}

.coll-cover {
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 2/3;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 16px 48px rgba(26,21,16,0.14);
  background: var(--ivory);
}

.coll-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coll-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--ivory);
}

.coll-meta { align-self: center; }

.coll-kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
}

.coll-title {
  font-family: var(--ff-display);
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 16px;
}

.coll-desc {
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 28px;
}

.coll-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
}

.coll-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coll-stat-n {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.coll-stat-l {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.btn-coll-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-coll-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* Item list */
.coll-items {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.coll-items-title {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.item-list { display: flex; flex-direction: column; gap: 0; }

.item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.item-row:first-child { border-top: 1px solid var(--border-soft); }
.item-row::before {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: 0;
  bottom: 0;
  background: var(--champagne);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 2px;
}
.item-row:hover::before { opacity: 1; }

.item-num {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 300;
  color: var(--ink-4);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.item-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.item-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.item-type-label {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.item-arrow {
  color: var(--ink-4);
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: color 0.2s, transform 0.2s;
}
.item-row:hover .item-arrow {
  color: var(--gold);
  transform: translateX(3px);
}

/* ════════════════════════════════════════════════════════════════
   READER
═══════════════════════════════════════════════════════════════ */
#view-reader {
  padding-top: var(--nav-h);
  min-height: 100dvh;
  display: none;
  flex-direction: column;
}
#view-reader.active { display: flex; }

.reader-topbar {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 24px;
}

.reader-topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  transition: color 0.2s;
  padding: 6px 0;
}
.btn-back:hover { color: var(--gold); }

.reader-topbar-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.reader-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  transition: all 0.2s;
}
.reader-action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.reader-main {
  flex: 1;
  background: #2A2420;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.reader-frame-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: calc(100dvh - var(--nav-h) - 64px - 72px);
  min-height: 400px;
}

.reader-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.reader-no-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  color: rgba(247,243,236,0.6);
  text-align: center;
  padding: 24px;
}

.reader-no-preview-icon { font-size: 48px; opacity: 0.5; }

.reader-no-preview p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 300px;
}

.btn-open-pdf {
  padding: 14px 28px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  transition: all 0.2s;
}
.btn-open-pdf:hover { background: var(--gold-light); }

/* Next items */
.reader-next {
  background: var(--warm-white);
  border-top: 1px solid var(--border-soft);
  padding: 20px 24px;
}

.reader-next-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.reader-next-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
  font-weight: 600;
}

.reader-next-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.reader-next-list::-webkit-scrollbar { display: none; }

.reader-next-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ivory);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 220px;
}
.reader-next-item:hover {
  border-color: var(--gold);
}
.reader-next-item.active-item {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.reader-next-item-icon {
  color: var(--gold);
  font-size: 16px;
  flex-shrink: 0;
}

.reader-next-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* YouTube reader */
.reader-yt-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.reader-yt-embed {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 3px;
  overflow: hidden;
  background: black;
}

.reader-yt-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ════════════════════════════════════════════════════════════════
   PWA INSTALL TOAST
═══════════════════════════════════════════════════════════════ */
#pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: var(--warm-white);
  border-radius: 3px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(26,21,16,0.25);
  z-index: 9000;
  width: min(460px, 92vw);
  transition: transform 0.5s var(--ease-out);
  border-top: 2px solid var(--gold);
}
#pwa-toast.visible {
  transform: translateX(-50%) translateY(0);
}

.pwa-toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 18px;
  flex-shrink: 0;
}

.pwa-toast-text { flex: 1; }

.pwa-toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 3px;
}

.pwa-toast-sub {
  font-size: 12px;
  color: rgba(247,243,236,0.6);
  line-height: 1.4;
}

.pwa-toast-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-btn-install {
  padding: 8px 16px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  transition: background 0.2s;
}
.pwa-btn-install:hover { background: var(--gold-light); }

.pwa-btn-dismiss {
  padding: 8px;
  color: rgba(247,243,236,0.5);
  font-size: 18px;
  transition: color 0.2s;
}
.pwa-btn-dismiss:hover { color: var(--warm-white); }

/* iOS install sheet */
#ios-install {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--warm-white);
  border-top: 1px solid var(--border-soft);
  border-radius: 12px 12px 0 0;
  padding: 24px 24px 40px;
  z-index: 9000;
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out);
  box-shadow: 0 -8px 40px rgba(26,21,16,0.1);
}
#ios-install.visible { transform: translateY(0); }

.ios-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-soft);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.ios-sheet-title {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.ios-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.ios-step:last-of-type { border-bottom: none; }

.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
}

.ios-step-text {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

.ios-step-text strong { color: var(--ink); }

.ios-sheet-close {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  transition: all 0.2s;
}
.ios-sheet-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
═══════════════════════════════════════════════════════════════ */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(247,243,236,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
  z-index: 890;
}

@media (max-width: 640px) {
  #mobile-nav { display: flex; }
  #view-home { padding-bottom: 70px; }
  #view-collection { padding-bottom: 70px; }
}

.mobile-nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
}

.mob-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--ink-4);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.2s;
}
.mob-nav-btn.active { color: var(--gold); }
.mob-nav-btn:hover { color: var(--ink-2); }

.mob-nav-icon { font-size: 20px; line-height: 1; }

/* ─── MOBILE SEARCH BAR ──────────────────────────────────────── */
.mobile-search-bar {
  display: none;
  padding: 12px 20px 4px;
  background: var(--ivory);
}

@media (max-width: 640px) {
  .mobile-search-bar { display: block; }
}

.mobile-search {
  width: 100%;
  background: var(--champagne);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 10px 16px 10px 38px;
  font-family: var(--ff-ui);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.mobile-search:focus { border-color: var(--gold); }
.mobile-search::placeholder { color: var(--ink-4); }

.mobile-search-wrap {
  position: relative;
}

.mobile-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

/* ─── RESPONSIVE GRID ────────────────────────────────────────── */
@media (min-width: 768px) {
  .grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .rail-track { padding: 4px 0; }
  .section-inner { padding: 0 48px; }
  .hero-content { padding: clamp(48px, 6vw, 80px); }
  .coll-hero-inner { padding: clamp(56px, 7vw, 88px) 48px clamp(48px, 6vw, 72px); }
  .coll-items { padding: 48px 48px 80px; }
  .video-rail-track { padding: 4px 0; }
  .search-heading { padding: 0; }
  .search-results-grid { padding: 0; }
}

@media (max-width: 640px) {
  .coll-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .coll-cover {
    width: 120px;
    margin: 0 auto;
  }
  .coll-stats { justify-content: center; }
  .coll-kind-badge { justify-content: center; }
  .reader-topbar-title { font-size: 13px; }
  .reader-actions { gap: 4px; }
  .reader-action-btn { padding: 8px 10px; font-size: 11px; }
  .reader-action-btn .btn-label { display: none; }
  .hero-cover-wrap { width: 40%; opacity: 0.4; }
  #pwa-toast { bottom: 72px; }
  .pwa-toast-sub { display: none; }
}

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon { font-size: 40px; opacity: 0.3; }

.empty-state-text {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ─── SCROLLBAR THEMED ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--champagne); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ─── FOCUS VISIBLE ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ─── SELECTION ──────────────────────────────────────────────── */
::selection {
  background: var(--gold-dim);
  color: var(--ink);
}
