/* ========================================
   The Stillwater Commons — Design System
   A calming manga village for burned-out remote workers
   ======================================== */

/* Fonts: Lora (serif headers), Inter (body) */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  --cream: #F5F0E8;
  --warm-white: #FAF7F2;
  --sage: #8B9E8B;
  --sage-light: #B5C5B5;
  --sage-dark: #6B7E6B;
  --dusty-blue: #8BA7C4;
  --dusty-blue-light: #B5CBDF;
  --warm-brown: #8B7355;
  --warm-amber: #C4A882;
  --dusty-lavender: #9B8EC4;
  --text-primary: #3D3A36;
  --text-secondary: #6B6560;
  --text-muted: #9B958E;
  --border: #E5DED4;
  --border-light: #EDE8DF;
  --panel-bg: #EDE8DF;
  --shadow-sm: 0 1px 3px rgba(61, 58, 54, 0.04);
  --shadow: 0 2px 8px rgba(61, 58, 54, 0.06);
  --shadow-lg: 0 8px 32px rgba(61, 58, 54, 0.08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-w: 720px;
  --max-w-wide: 1080px;
}

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

/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--sage-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--warm-brown); }

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--sage-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-brand-text {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  letter-spacing: 0.2px;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--sage-dark); }

.nav-cta {
  background: var(--text-primary);
  color: var(--cream) !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--warm-brown); color: var(--cream) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--text-secondary); }

/* ── Hero Section (Homepage) ── */
.hero {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -1px;
  max-width: 680px;
  margin: 0 auto 20px;
  line-height: 1.15;
}

.hero h1 em {
  font-style: italic;
  color: var(--sage-dark);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

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

/* ── Illustrated Hero (Two-Column) ── */
.hero-illustrated {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 48px 24px 48px;
  text-align: left;
}

.hero-visual {
  flex: 0 0 auto;
  width: 42%;
  max-width: 440px;
}

.hero-panel-img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  display: block;
  aspect-ratio: 1 / 1;
  background-color: var(--cream);
  object-fit: cover;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-illustrated .hero-label {
  /* text alignment inherited from parent */
}

.hero-illustrated h1 {
  margin-left: 0;
  margin-right: 0;
}

.hero-illustrated .hero-sub {
  margin-left: 0;
  margin-right: 0;
}

.hero-illustrated .hero-actions {
  justify-content: flex-start;
}

/* ── Trust Signals ── */
.trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
}

.trust-signal {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted, #7a7a6e);
  background: rgba(139, 158, 139, 0.1);
  border: 1px solid rgba(139, 158, 139, 0.25);
  border-radius: 100px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--warm-brown);
  color: var(--cream);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-sage {
  background: var(--sage);
  color: white;
}

.btn-sage:hover {
  background: var(--sage-dark);
  color: white;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
}

/* ── Sample Panels (Homepage) ── */
.sample-panels {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.sample-panels-header {
  text-align: center;
  margin-bottom: 32px;
}

.sample-panels-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.sample-panels-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Manga Panel ── */
.manga-panel {
  position: relative;
  background: linear-gradient(160deg, var(--gradient-from, #EDE8DF), var(--gradient-to, #D6CFC2));
  border-radius: var(--radius-lg);
  padding: 48px 36px 40px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 20px;
  overflow: hidden;
  border: 2px solid rgba(61, 58, 54, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.manga-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(255,255,255,0.2), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.08), transparent 50%);
  pointer-events: none;
}

.manga-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.panel-inner {
  position: relative;
  z-index: 1;
}

.panel-number {
  display: inline-block;
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(61, 58, 54, 0.3);
  margin-bottom: 16px;
}

.panel-scene {
  font-size: 0.82rem;
  color: rgba(61, 58, 54, 0.45);
  font-style: italic;
  margin-bottom: 18px;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

.panel-dialogue {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 20px 20px 20px 4px;
  padding: 16px 22px;
  margin-bottom: 16px;
  max-width: 85%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.panel-speaker {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sage-dark);
  margin-bottom: 4px;
}

.panel-dialogue p {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
  font-style: italic;
}

.panel-narration {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
}

/* Panel entrance animation */
.manga-panel {
  opacity: 0;
  transform: translateY(20px);
  animation: panelReveal 0.6s ease forwards;
}

.manga-panel:nth-child(1) { animation-delay: 0.1s; }
.manga-panel:nth-child(2) { animation-delay: 0.2s; }
.manga-panel:nth-child(3) { animation-delay: 0.3s; }
.manga-panel:nth-child(4) { animation-delay: 0.4s; }
.manga-panel:nth-child(5) { animation-delay: 0.5s; }
.manga-panel:nth-child(6) { animation-delay: 0.6s; }

@keyframes panelReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Illustrated Panel (has AI image) ── */
.manga-panel.has-image {
  padding: 0;
  min-height: unset;
  justify-content: flex-start;
}

.panel-illustration {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: opacity 0.4s ease;
}

.panel-illustration.loading {
  opacity: 0;
  background: linear-gradient(160deg, var(--gradient-from, #EDE8DF), var(--gradient-to, #D6CFC2));
  min-height: 200px;
}

.manga-panel.has-image .panel-inner {
  padding: 20px 28px 28px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--gradient-from, #EDE8DF) 80%, white 20%),
    var(--gradient-to, #D6CFC2)
  );
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, white, black)) {
  .manga-panel.has-image .panel-inner {
    background: linear-gradient(160deg, var(--gradient-from, #EDE8DF), var(--gradient-to, #D6CFC2));
  }
}

/* ── Episode Reader ── */
.reader-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: center;
}

.reader-meta {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 12px;
}

.reader-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.reader-description {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.reader-panels {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 60px;
}

.reader-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reader-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.reader-nav a:hover { color: var(--text-primary); }

/* ── Listen Along TTS ── */
.listen-along-wrap {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 36px;
}

.listen-along-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sage-dark);
  background: transparent;
  border: 1.5px solid var(--sage-light);
  border-radius: 100px;
  padding: 7px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  letter-spacing: 0.2px;
}

.listen-along-btn:hover {
  background: rgba(139, 158, 139, 0.12);
  border-color: var(--sage);
  color: var(--text-primary);
}

.tts-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.tts-status {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-style: italic;
  margin-right: 2px;
}

.tts-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(139, 158, 139, 0.1);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tts-ctrl-btn:hover {
  background: rgba(139, 158, 139, 0.2);
  border-color: var(--sage-light);
  color: var(--text-primary);
}

.tts-stop-btn {
  color: var(--text-muted);
}

.tts-stop-btn:hover {
  background: rgba(61, 58, 54, 0.06);
  border-color: var(--border);
  color: var(--text-secondary);
}

/* Panel reading highlight (active panel during TTS) */
.panel--reading {
  box-shadow: 0 0 0 2.5px var(--sage-light), 0 8px 32px rgba(139, 158, 139, 0.22) !important;
}

.panel--reading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: rgba(139, 158, 139, 0.06);
  pointer-events: none;
  z-index: 0;
}

/* ── Episodes Hero (Ad Landing CTA) ── */
.episodes-hero {
  background: linear-gradient(160deg, #EAE5D9 0%, #DDD5C6 60%, #CFC8B8 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.episodes-hero::before {
  /* Subtle watercolor texture overlay */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(139,158,139,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(196,168,130,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.episodes-hero-inner {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.episodes-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 16px;
  opacity: 0.85;
}

.episodes-hero-headline {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.episodes-hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto 28px;
}

.episodes-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text-primary);
  color: var(--cream);
  padding: 15px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Lora', Georgia, serif;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(61, 58, 54, 0.18);
  letter-spacing: 0.01em;
}

.episodes-hero-cta:hover {
  background: var(--warm-brown);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(61, 58, 54, 0.22);
}

.episodes-hero-cta:active {
  transform: translateY(0);
}

.episodes-hero-meta {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* When hero is shown, reduce top padding on archive-header */
.archive-header--with-hero {
  padding-top: 36px;
}

/* ── Episode Cards (Archive) ── */
.archive-header {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 60px 24px 40px;
}

.archive-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.archive-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.episode-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.episode-card {
  background: var(--warm-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.episode-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.episode-card-preview {
  height: 180px;
  background: linear-gradient(160deg, var(--gradient-from, #EDE8DF), var(--gradient-to, #D6CFC2));
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.episode-card-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.2), transparent 60%);
}

.episode-card-preview-text {
  position: relative;
  z-index: 1;
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(61, 58, 54, 0.65);
  line-height: 1.5;
}

.episode-card-body {
  padding: 24px;
}

.episode-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.episode-number-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.premium-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--warm-amber);
  background: rgba(196, 168, 130, 0.12);
  padding: 3px 10px;
  border-radius: 100px;
}

.free-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage);
  background: rgba(139, 158, 139, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
}

.inner-circle-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7B5E3A;
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.22) 0%, rgba(180, 148, 100, 0.18) 100%);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(196, 168, 130, 0.35);
}

.inner-circle-panel-count {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  opacity: 0.75;
}

.episode-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.episode-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Character Page ── */
.characters-header {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 60px 24px 20px;
  text-align: center;
}

.characters-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.characters-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.characters-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.character-card {
  background: var(--warm-white);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  border: 1px solid var(--border-light);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.character-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  position: relative;
}

.character-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(61, 58, 54, 0.06);
}

.character-card h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.character-role {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.character-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: left;
}

.character-traits {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.trait-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--cream);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ── Pricing Section ── */
.pricing-header {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 60px 24px 20px;
  text-align: center;
}

.pricing-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.pricing-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.pricing-grid {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pricing-card {
  background: var(--warm-white);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  border: 1.5px solid var(--border-light);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--sage);
  background: linear-gradient(180deg, rgba(139, 158, 139, 0.04), var(--warm-white));
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage);
  color: white;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 100px;
}

.pricing-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.pricing-amount {
  font-family: 'Lora', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--sage);
  font-weight: 600;
  font-size: 0.85rem;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
}

.pricing-grid-3 {
  max-width: 960px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pricing-card-free {
  opacity: 0.75;
  border-style: dashed;
}

.pricing-card-free .pricing-features li {
  color: var(--text-muted);
}

/* ── Premium Overlay ── */
.premium-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.premium-overlay-inner {
  padding: 60px 36px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 240, 232, 0), rgba(245, 240, 232, 0.95) 30%, var(--cream));
}

.premium-overlay h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.premium-overlay p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ── Homepage: Character Teasers ── */
.character-teasers {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.character-teasers-header {
  text-align: center;
  margin-bottom: 32px;
}

.character-teasers-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.character-teasers-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.character-teaser-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.character-teaser {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--warm-white);
  padding: 16px 22px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.character-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.character-teaser-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.character-teaser-info h4 {
  font-size: 0.88rem;
  font-family: 'Lora', serif;
  letter-spacing: -0.2px;
}

.character-teaser-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Homepage: Vibe Section ── */
.vibe-section {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.vibe-card {
  background: linear-gradient(160deg, rgba(139, 158, 139, 0.08), rgba(139, 167, 196, 0.06));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  text-align: center;
}

.vibe-card h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  max-width: 560px;
  margin: 0 auto 16px;
  line-height: 1.35;
}

.vibe-card p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Homepage: Features Grid ── */
.features-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Waitlist Section ── */
.waitlist-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.waitlist-section h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.waitlist-section p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.waitlist-form {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.waitlist-form input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  background: var(--warm-white);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.waitlist-form input:focus {
  border-color: var(--sage);
}

.waitlist-form input::placeholder {
  color: var(--text-muted);
}

.waitlist-form button {
  padding: 12px 24px;
  background: var(--text-primary);
  color: var(--cream);
  border: none;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
  white-space: nowrap;
}

.waitlist-form button:hover {
  background: var(--warm-brown);
}

.waitlist-success {
  color: var(--sage-dark);
  font-weight: 500;
  margin-top: 12px;
  display: none;
}

.waitlist-error {
  color: #C4605A;
  font-size: 0.88rem;
  margin-top: 12px;
  display: none;
}

/* ── Homepage Email Capture Section ── */
.email-capture-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.email-capture-inner {
  background: var(--warm-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px 40px 40px;
}

.email-capture-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.email-capture-inner h2 {
  font-size: 1.55rem;
  margin-bottom: 12px;
}

.email-capture-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.email-capture-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 12px;
}

.email-capture-form input {
  flex: 1;
  padding: 13px 20px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.email-capture-form input:focus {
  border-color: var(--sage);
}

.email-capture-form input::placeholder {
  color: var(--text-muted);
}

.email-capture-success {
  color: var(--sage-dark);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 4px;
}

.email-capture-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 10px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .email-capture-section { padding: 0 20px 60px; }
  .email-capture-inner { padding: 36px 24px 32px; }
  .email-capture-form { flex-direction: column; }
}

/* ── Homepage Subscribe CTA Section ── */
.subscribe-cta-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.subscribe-cta-section h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.subscribe-cta-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.subscribe-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.subscribe-cta-card {
  background: var(--warm-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.subscribe-cta-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.subscribe-cta-featured {
  border-color: var(--sage);
  background: linear-gradient(180deg, rgba(139, 158, 139, 0.05), var(--warm-white));
}

.subscribe-cta-popular-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.subscribe-cta-tier {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.subscribe-cta-price {
  font-family: 'Lora', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.subscribe-cta-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.subscribe-cta-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  min-height: 36px;
}

.subscribe-cta-card .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.88rem;
  padding: 11px 20px;
}

.subscribe-cta-footnote {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.subscribe-cta-footnote a {
  color: var(--sage-dark);
  text-decoration: underline;
  text-decoration-color: rgba(107, 126, 107, 0.35);
  text-underline-offset: 3px;
}

.subscribe-cta-footnote a:hover {
  color: var(--warm-brown);
}

/* ── Premium Announcement Banner ── */
.premium-announcement-banner {
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.11), rgba(181, 197, 181, 0.09));
  border-bottom: 1px solid rgba(196, 168, 130, 0.22);
  text-align: center;
  padding: 11px 24px;
  font-size: 0.80rem;
  color: var(--warm-brown);
  font-weight: 500;
  letter-spacing: 0.25px;
  line-height: 1.5;
}

.banner-spark {
  margin-right: 7px;
  color: var(--warm-amber);
  font-size: 0.75rem;
}

/* ── FAQ Section ── */
.faq-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 80px;
  text-align: center;
}

.faq-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.faq-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h4 {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.faq-item p {
  font-size: 0.90rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 560px;
}

@media (max-width: 768px) {
  .faq-section {
    padding: 20px 20px 60px;
  }
}

/* ── Divider ── */
.section-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--sage-light), var(--dusty-blue-light));
  margin: 0 auto 40px;
  border-radius: 2px;
}

/* ── Page Container ── */
.page-container {
  min-height: calc(100vh - 160px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  /* Illustrated hero: stack vertically on mobile */
  .hero-illustrated {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px 40px;
    gap: 28px;
  }
  .hero-visual {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .hero-illustrated h1 {
    margin: 0 auto 20px;
  }
  .hero-illustrated .hero-sub {
    margin: 0 auto 36px;
  }
  .hero-illustrated .hero-actions {
    justify-content: center;
  }
  .trust-signals {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 60px;
  }

  .episode-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 40px;
  }

  .characters-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .manga-panel {
    padding: 36px 24px 32px;
    min-height: 220px;
    border-radius: var(--radius);
  }

  .panel-narration { font-size: 1rem; }

  .vibe-card { padding: 40px 28px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .nav-toggle { display: block; }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .reader-header { padding: 36px 20px 24px; }
  .reader-panels { padding: 0 20px 40px; }

  .waitlist-form {
    flex-direction: column;
  }

  .character-teaser-grid {
    flex-direction: column;
    align-items: center;
  }

  .sample-panels { padding: 0 20px 60px; }
  .character-teasers { padding: 0 20px 60px; }
  .vibe-section { padding: 0 20px 60px; }
  .archive-header { padding: 40px 20px 24px; }
  .archive-header--with-hero { padding-top: 24px; }
  .episodes-hero { padding: 48px 20px 40px; }
  .episodes-hero-cta { padding: 14px 28px; font-size: 0.95rem; }
  .characters-header { padding: 40px 20px 20px; }
  .pricing-header { padding: 40px 20px 20px; }
  .waitlist-section { padding: 0 20px 60px; }

  .subscribe-cta-section { padding: 0 20px 60px; }
  .subscribe-cta-grid { grid-template-columns: 1fr; }
  .subscribe-cta-price { font-size: 2rem; }
  .subscribe-cta-desc { min-height: unset; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .manga-panel { padding: 28px 20px 24px; min-height: 200px; }
  .panel-narration { font-size: 0.95rem; }
  .character-card { padding: 32px 24px; }
}
