/* ===== STORE CSS — Audio Opowieści Web Store =====
   Light, professional theme aligned with the authors-www landing.
   All class names from the dark version preserved. */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand */
  --gold: #d4a853;
  --gold-dark: #b8860b;
  --gold-light: #f0d58c;
  --gold-glow: rgba(212, 168, 83, 0.35);

  /* Dark accents (used for app banner + phone mockup which stay dark for contrast) */
  --night: #0a1222;
  --night-1: #0f1b2d;
  --night-2: #162740;

  /* Surfaces */
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e6e8ec;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #1a2332;
  --text-soft: #475569;
  --text-muted: #64748b;

  /* Legacy aliases — kept so any inline references keep working */
  --dark-bg: var(--bg);
  --dark-card: var(--surface);
  --dark-card-hover: var(--surface-alt);
  --text-light: var(--text);

  /* Status */
  --danger: #dc2626;
  --success: #16a34a;

  /* Geometry */
  --radius: 14px;
  --radius-lg: 22px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 18, 34, 0.06), 0 1px 2px rgba(10, 18, 34, 0.04);
  --shadow-md: 0 4px 16px rgba(10, 18, 34, 0.06), 0 2px 6px rgba(10, 18, 34, 0.04);
  --shadow-lg: 0 20px 40px rgba(10, 18, 34, 0.08), 0 6px 16px rgba(10, 18, 34, 0.05);
  --shadow-xl: 0 30px 60px rgba(10, 18, 34, 0.1), 0 10px 24px rgba(10, 18, 34, 0.06);
  --shadow-gold: 0 10px 30px var(--gold-glow);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

/* ============================================================
   NAV
   ============================================================ */
.store-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
/* Constrain to the same 1200px container the rest of the site uses (.nav-inner
   in styles.css) so the store doesn't read as a different, full-bleed site on
   wide screens. */
.store-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  gap: 1rem;
  min-width: 0;
  max-width: 1200px;
  margin: 0 auto;
}
.store-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-logo:hover { color: var(--gold-dark); }
.store-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
#nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-username {
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   LANGUAGE SWITCHER — SVG flag pills
   ============================================================ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-soft);
  border: none;
  padding: 0;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  overflow: hidden;
  position: relative;
  font-size: 0;            /* kill any inherited text sizing */
  line-height: 0;
}
.lang-btn:hover { background: rgba(212, 168, 83, 0.1); }
.lang-btn .flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s var(--ease);
}
.lang-btn:hover .flag { transform: scale(1.08); }
.lang-btn.active {
  background: var(--gold);
  box-shadow: 0 2px 6px var(--gold-glow);
}
.lang-btn.active .flag {
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--gold);
}
/* Robust SVG sizing — prevents browser fallback to 300x150 */
.lang-btn .flag svg,
.book-lang .flag svg,
.book-lang-chip .flag svg,
.book-detail-lang .flag svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Hide the old "Wybierz język" label and any orphan "Book language:" wrapper */
.lang-switcher-label,
.book-lang-label,
.book-lang-wrapper > .book-lang-label {
  display: none !important;
}

/* ============================================================
   CURRENCY SWITCHER — compact select pill
   ============================================================ */
.currency-switcher {
  display: inline-flex;
  align-items: center;
}
.currency-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1.85rem 0.35rem 0.85rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  /* chevron */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23475569' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
}
.currency-select:hover { border-color: var(--gold); }
.currency-select:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.currency-switcher-drawer .currency-select {
  width: 100%;
  min-height: 44px;
  font-size: 1rem;
  padding-right: 2.5rem;
}
.book-price-unavailable,
.purchase-unavailable {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 500;
}
.book-lang-wrapper {
  margin: 0 0 0.5rem 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border: none;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.btn-gold {
  background: var(--gold);
  color: var(--night);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 10px var(--gold-glow);
}
.btn-gold:hover {
  background: var(--gold-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 18px var(--gold-glow);
}
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-outline {
  background: var(--surface);
  color: var(--gold-dark);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: rgba(212, 168, 83, 0.08);
  color: var(--gold-dark);
}
.btn-sm {
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  border-radius: 8px;
}
.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  border-radius: 12px;
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #b91c1c; }

/* ============================================================
   HERO
   ============================================================ */
.store-hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem clamp(2.25rem, 5vw, 3.25rem);
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(212, 168, 83, 0.16), transparent 72%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.store-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.store-hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9e7510;
  background: rgba(212, 168, 83, 0.12);
  border: 1px solid rgba(212, 168, 83, 0.32);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.store-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  color: var(--text);
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.store-hero p {
  color: var(--text-soft);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  margin-bottom: 1.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-wrap: balance;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 2rem auto 1.75rem;
  flex-wrap: wrap;
}
.step {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  padding: 0.7rem 1.2rem 0.7rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.step-num {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px var(--gold-glow);
}
.step-text {
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}
.step-arrow {
  color: var(--gold-dark);
  font-size: 1.05rem;
  font-weight: 700;
  opacity: 0.45;
}
@media (max-width: 600px) {
  .how-it-works {
    flex-direction: column;
    gap: 0;
    max-width: 280px;
  }
  .step {
    width: 100%;
    justify-content: flex-start;
    padding: 0.6rem 1.1rem 0.6rem 0.6rem;
  }
  .step-arrow {
    transform: rotate(90deg);
    opacity: 0.4;
    margin: 0.15rem 0;
    font-size: 1rem;
  }
}

.badge {
  background: var(--surface);
  color: var(--text-soft);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.83rem;
  border: 1px solid var(--border);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   MAIN
   ============================================================ */
.store-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  max-width: 56ch;
  line-height: 1.55;
}

/* ============================================================
   BOOK LANGUAGE — clean inline chip (no label)
   ============================================================ */
.book-lang,
.book-lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem 0.25rem 0.4rem;
  margin: 0 0 0.5rem 0;
}
.book-lang .flag,
.book-lang-chip .flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

/* Book format badge (audio / text / both) — shown on store cards */
.book-format-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent, #d4a857);
  background: rgba(212, 168, 87, 0.12);
  border: 1px solid rgba(212, 168, 87, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin: 0 0 0.5rem 0.35rem;
}
/* "Część N z M" — seria (Storytel-style). Niebieski wariant badge'a formatu. */
.book-series-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4f8fc9;
  background: rgba(100, 181, 246, 0.12);
  border: 1px solid rgba(100, 181, 246, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin: 0 0 0.5rem 0.35rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
/* Lista części serii w modalu szczegółów książki */
.book-series-parts {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: rgba(100, 181, 246, 0.06);
  border: 1px solid rgba(100, 181, 246, 0.25);
  border-radius: 12px;
}
.book-series-parts h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4f8fc9;
}
/* Zachęta na pełnej edycji: "dostępna też w częściach" */
.series-parts-intro {
  margin: 0 0 0.6rem 0;
  font-size: 0.82rem;
  color: var(--text-muted, #8a8a9a);
}
.series-part-link {
  display: block;
  width: 100%;
  padding: 0.3rem 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text, #2a2a2a);
  text-decoration: none;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.series-part-link:hover {
  background: rgba(100, 181, 246, 0.12);
}
.series-part-link:focus-visible {
  outline: 2px solid #4f8fc9;
  outline-offset: -2px;
}
.series-part-link.current {
  color: #4f8fc9;
  font-weight: 700;
  background: rgba(100, 181, 246, 0.1);
}
.series-complete-link {
  margin-top: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(100, 181, 246, 0.3);
  color: var(--accent, #d4a857);
}
.book-detail-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.95rem 0.4rem 0.55rem;
  margin-bottom: 1rem;
}
.book-detail-lang .flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   BOOKS GRID + CARD
   ============================================================ */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.75rem;
  margin-top: 1.75rem;
}
/* Two-title catalog — center the pair rather than stranding them left. */
@media (min-width: 760px) {
  .books-grid:has(> .book-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(240px, 320px));
    justify-content: center;
  }
}
.book-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-strong);
}
.book-card:active { transform: translateY(-2px); }
.book-card:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow), var(--shadow-lg);
}
/* Deep-link target (?book=<id>) — briefly draws the eye to the right card
   after landing from a "Part N" link elsewhere on the site. */
.book-card-highlight {
  animation: book-card-pulse 2.6s var(--ease);
}
@keyframes book-card-pulse {
  0%, 100% { box-shadow: var(--shadow-sm); border-color: var(--border); }
  15%, 70% { box-shadow: 0 0 0 3px var(--gold-glow), var(--shadow-xl); border-color: var(--gold); }
}
.book-cover {
  aspect-ratio: 3 / 4;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--surface-alt), var(--surface-2));
  overflow: hidden;
}
/* Subtle gradient veil at the foot of the cover for cohesion + depth */
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 18, 34, 0.14) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.book-card:hover .book-cover::after { opacity: 1; }
.book-cover-emoji {
  font-size: 4.5rem;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}
.book-cover-title {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.book-card:hover .book-cover img { transform: scale(1.04); }
.book-info {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}
/* Series-part card: small series-name eyebrow above the episode headline,
   so cards from the same series don't read as duplicates of a long shared title. */
.book-series-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  margin: 0;
}
.book-info h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.book-info .author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
/* Lang chip + format badge share a row, then everything else flows below */
.book-tags .book-lang-chip,
.book-tags .book-format-badge { margin: 0; }
.book-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.book-meta > span {
  display: inline-flex;
  align-items: center;
}
.book-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-top: auto;
  padding-top: 0.7rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.book-price-free {
  color: var(--success);
}
.book-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.book-tags:empty { display: none; }
.book-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}
/* "View details →" hint — appears on hover/focus next to the price */
.book-card-foot::after {
  content: "→";
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-dark);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.book-card:hover .book-card-foot::after,
.book-card:focus-visible .book-card-foot::after {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   PREVIEW BUTTON
   ============================================================ */
.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.4);
  color: var(--gold-dark);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
}
.preview-btn:hover {
  background: rgba(212, 168, 83, 0.16);
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 18, 34, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.18s var(--ease);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.25s var(--ease);
}
@keyframes modalIn {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 1.5rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
  transform: rotate(90deg);
}
.modal-close:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.book-detail-modal {
  max-width: 660px;
}
.book-detail-cover {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-alt), var(--surface-2));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-detail-cover .book-cover-emoji {
  font-size: 5.5rem;
}
.book-detail-body {
  padding: 1.75rem;
}
.book-detail-body h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.book-detail-body .author {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.book-detail-body .description {
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}
.book-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.book-detail-meta .badge {
  font-size: 0.8rem;
}
.book-detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.book-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
/* Price + buy button pinned to the bottom of the modal's own scroll area, so
   longer content above (series-part list, description) never pushes the
   actual "buy" action out of view without an obvious way back to it. */
.book-detail-sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.1rem 1.75rem calc(1.1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(10, 18, 34, 0.08);
}
.book-detail-sticky-footer .book-detail-price { margin-bottom: 0.85rem; }
.book-detail-sticky-footer .book-detail-actions { gap: 0.6rem; }

.purchase-owned {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 10px;
}
.book-owned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--success);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  margin-top: 0.25rem;
}
.payment-pending {
  text-align: center;
  padding: 1rem;
  color: var(--gold-dark);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ============================================================
   AUTH MODAL + FORMS
   ============================================================ */
.auth-modal {
  max-width: 420px;
  padding: 2rem;
}
.auth-modal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  color: var(--text);
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.auth-modal .subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  font-family: inherit;
}
.form-group input::placeholder { color: var(--text-muted); }
/* Show/hide password toggle (login + register forms) */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-muted);
}
.pw-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold, #d4a857); }
.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.15);
}
.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: none;
}
.form-switch {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.form-switch a {
  color: var(--gold-dark);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}

/* ============================================================
   AUDIO PLAYER (mini)
   ============================================================ */
.mini-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
}
.mini-player button {
  background: var(--gold);
  border: none;
  color: var(--night);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}
.mini-player button:hover { transform: scale(1.05); }
.mini-player .progress {
  flex: 1;
  height: 5px;
  background: rgba(10, 18, 34, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.mini-player .progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.3s;
}
.mini-player .time {
  color: var(--text-muted);
  font-size: 0.78rem;
  min-width: 3rem;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   EMPTY / LOADING
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}
.empty-state a { color: var(--gold-dark); font-weight: 600; }
.empty-state a:hover { text-decoration: underline; }

.loading-spinner {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.loading-spinner::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.store-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0;
}
.store-footer a { color: var(--gold-dark); font-weight: 500; }

/* ============================================================
   APP DOWNLOAD BANNER — stays dark for high-contrast CTA
   ============================================================ */
.app-banner {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: clamp(3rem, 7vw, 4.75rem) clamp(1.1rem, 5vw, 2rem);
  background: linear-gradient(135deg, var(--night) 0%, var(--night-2) 50%, var(--night-1) 100%);
  border-top: 1px solid var(--border);
  color: #fff;
}
.app-banner-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.app-banner-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
}
.app-banner-glow.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--gold);
  top: -150px;
  left: -100px;
  animation: bannerFloat 20s ease-in-out infinite;
}
.app-banner-glow.glow-2 {
  width: 400px;
  height: 400px;
  background: #4a7c28;
  bottom: -100px;
  right: -50px;
  animation: bannerFloat 20s ease-in-out infinite reverse;
}
@keyframes bannerFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(30px, -20px); }
}
.app-banner-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.app-banner-badge {
  display: inline-block;
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold-light);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(212, 168, 83, 0.3);
  letter-spacing: 0.02em;
}
.app-banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.app-banner-text p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.app-banner-text p strong {
  color: var(--gold-light);
  font-weight: 700;
}
.app-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.app-features li {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.app-features li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 168, 83, 0.3);
}
.app-stores {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.store-badge-link {
  text-decoration: none;
  color: inherit;
}
.store-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.7rem;
  background: #fff;
  border-radius: 14px;
  width: fit-content;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.store-qr img {
  display: block;
  width: 120px;
  height: 120px;
}
.store-qr small {
  color: #1a1a2e;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  color: #fff;
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.store-badge:hover {
  background: rgba(212, 168, 83, 0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 83, 0.2);
}
.store-badge small {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  margin-bottom: 2px;
}
.store-badge strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

/* "Coming soon" state — App Store before iOS launch.
   Reads as deliberately-pending, not a broken/equal option. */
.store-badge-link.is-soon { cursor: default; }
.store-badge-link.is-soon .store-badge {
  position: relative;
  opacity: 0.62;
  cursor: default;
}
.store-badge-link.is-soon .store-badge:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: none;
  box-shadow: none;
}
.store-badge-soon {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 0.12rem 0.5rem;
  background: var(--gold);
  color: #0f1b2d;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 2px 6px var(--gold-glow);
}

/* ============================================================
   PHONE MOCKUP (in app banner — stays dark, it's a phone)
   ============================================================ */
.app-banner-visual {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
}
.phone-mockup {
  width: 224px;
  background: #0a0a1a;
  border-radius: 32px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  padding: 12px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(212, 168, 83, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.phone-mockup::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.phone-screen {
  background: #0f0f23;
  border-radius: 18px;
  padding: 1.25rem 0.75rem 0.75rem;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #f5f5f5;
}
.phone-app-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 168, 83, 0.15);
}
.phone-app-logo {
  font-size: 1.2rem;
}
.phone-book-item {
  display: flex;
  gap: 0.6rem;
  background: #1a1a2e;
  border-radius: 12px;
  padding: 0.65rem;
}
.phone-book-cover {
  width: 50px;
  height: 65px;
  background: linear-gradient(135deg, #1a2d4a, #0f1b2d);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.phone-book-info {
  flex: 1;
  min-width: 0;
}
.phone-book-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #f5f5f5;
  line-height: 1.3;
}
.phone-book-author {
  font-size: 0.65rem;
  color: #a0a0b0;
  margin-bottom: 0.4rem;
}
.phone-book-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.phone-book-progress span {
  font-size: 0.6rem;
  color: var(--gold);
  font-weight: 600;
}
.phone-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.phone-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}
.phone-player {
  margin-top: auto;
  background: #1a1a2e;
  border-radius: 14px;
  padding: 0.75rem;
  border: 1px solid rgba(212, 168, 83, 0.15);
}
.phone-player-title {
  font-size: 0.65rem;
  color: #a0a0b0;
  text-align: center;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: #a0a0b0;
  font-size: 0.9rem;
}
.phone-play-btn {
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #0f0f23;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* QR CODES */
.qr-codes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.qr-code { text-align: center; }
.qr-placeholder {
  background: #1a1a2e;
  border-radius: 14px;
  padding: 8px;
  display: inline-block;
  border: 1px solid rgba(212, 168, 83, 0.2);
}
.qr-code span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* BANNER RESPONSIVE */
@media (max-width: 900px) {
  .app-banner-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .app-features { justify-items: center; }
  .app-features li { justify-content: center; }
  .app-stores { justify-content: center; }
  .app-banner-visual { justify-content: center; }
  .store-qr { margin-left: auto; margin-right: auto; }
}
@media (max-width: 500px) {
  .app-features { grid-template-columns: 1fr; }
  .app-banner-visual { flex-direction: column; }
  .qr-codes { flex-direction: row; gap: 1.5rem; }
  .phone-mockup { width: 190px; }
}

/* Mobile hamburger toggle for store nav */
.store-nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent;
  cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
}
.store-nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.store-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.store-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.store-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.store-nav-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(15, 27, 45, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.store-nav-backdrop.open { opacity: 1; pointer-events: auto; }

.store-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 84vw; max-width: 320px;
  background: #1a1a2e; color: #fff;
  z-index: 160;
  padding: 1.5rem 1.25rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.1);
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: -10px 0 40px rgba(0,0,0,.3);
}
.store-nav-drawer.open { transform: translateX(0); }
.store-nav-drawer-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border: none; background: transparent;
  color: #fff; font-size: 1.8rem; cursor: pointer;
}
.store-nav-drawer h4 {
  margin: 0; padding-top: .5rem;
  font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}
.store-nav-drawer .store-nav-drawer-langs { display: flex; gap: .5rem; }
.store-nav-drawer .store-nav-drawer-langs .lang-btn { width: 44px; height: 44px; }
.store-nav-drawer .store-nav-drawer-actions { display: flex; flex-direction: column; gap: .6rem; }
.store-nav-drawer .store-nav-drawer-actions .btn { width: 100%; min-height: 44px; }

/* ============================================================
   RESPONSIVE — global
   ============================================================ */
@media (max-width: 600px) {
  .store-nav-inner {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .store-logo { font-size: 1.05rem; flex-shrink: 1; }
  .store-nav-toggle { display: flex; }
  .store-nav-right { display: none; }
  .store-main { padding: 2rem 1.1rem 2.5rem; }
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .book-info { padding: 0.9rem 0.95rem 1.05rem; gap: 0.35rem; }
  .book-info h3 { font-size: 1.02rem; }
  .book-price { font-size: 1.18rem; }
}
@media (min-width: 601px) {
  .store-nav-drawer, .store-nav-backdrop, .store-nav-toggle { display: none !important; }
}

/* ============================================================
   MODAL → full-height bottom sheet on small screens
   ============================================================ */
@media (max-width: 560px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: sheetIn 0.28s var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .auth-modal { padding: 1.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
  .book-detail-body { padding: 1.4rem 1.25rem; }
  .book-detail-sticky-footer { padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom)); }
  /* Drag-handle affordance — only on the auth sheet (book sheet leads with cover art) */
  .auth-modal::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--border-strong);
  }
  .modal-close { top: 0.6rem; right: 0.75rem; }
  .book-detail-cover { height: 220px; }
}
@keyframes sheetIn {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   FOCUS-VISIBLE — keyboard affordances
   ============================================================ */
.lang-btn:focus-visible,
.store-badge-link:focus-visible,
.preview-btn:focus-visible,
.store-footer a:focus-visible,
.empty-state a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-glow);
  border-radius: 999px;
}
.mini-player button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ============================================================
   REDUCED MOTION — keep it calm
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .app-banner-glow { animation: none !important; }
}

/* ============================================================
   Series "box set" section (e.g. King Matt the First — 10 parts)
   Groups the whole-book edition with its episodes in one block,
   encouraging the listener to start with Part 1.
   ============================================================ */
.series-sections { display: flex; flex-direction: column; gap: 28px; margin-bottom: 36px; }
.series-set {
  background: linear-gradient(180deg, #fffdf7, var(--surface));
  border: 1px solid var(--gold-glow);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.series-set-head { display: flex; gap: 22px; padding: 24px; align-items: center; }
.series-set-cover {
  flex: 0 0 auto; width: 132px; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--surface-2); display: grid; place-items: center;
}
.series-set-cover img { width: 100%; height: 100%; object-fit: cover; }
.series-set-cover .book-cover-emoji { font-size: 52px; }
.series-set-info { min-width: 0; flex: 1; }
.series-kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold-dark);
  background: rgba(212,168,83,.12); border: 1px solid var(--gold-glow);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
}
.series-set-title { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 8px; color: var(--text); }
.series-set-blurb { color: var(--text-soft); line-height: 1.55; margin: 0 0 16px; max-width: 60ch; }
.series-set-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* episodes as separately-buyable book cards, grouped under the series header */
.series-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
  padding: 4px 24px 24px;
}
.series-grid .book-card { margin: 0; }

@media (max-width: 640px) {
  .series-set-head { flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px; }
  .series-set-cover { width: 104px; }
  .series-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 4px 16px 18px; }
  .series-set-cta .btn { flex: 1; }
}
