/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --black:       #0a0a0a;
  --black-mid:   #111111;
  --black-soft:  #1a1a1a;
  --grey-dark:   #2a2a2a;
  --grey-mid:    #444444;
  --grey-light:  #888888;
  --white:       #f5f5f5;
  --white-dim:   #c0c0c0;
  --gold:        #C9A84C;
  --gold-light:  #e0c070;
  --gold-dark:   #9e7c2e;

  --radius:      6px;
  --radius-lg:   12px;
  --transition:  0.2s ease;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

/* ─── Light Theme ────────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --black:       #ffffff;
  --black-mid:   #f5f5f5;
  --black-soft:  #ededed;
  --grey-dark:   #e0e0e0;
  --grey-mid:    #bdbdbd;
  --grey-light:  #666666;
  --white:       #1a1a1a;
  --white-dim:   #444444;
  --gold:        #9e7c2e;
  --gold-light:  #b89238;
  --gold-dark:   #c9a84c;
}

[data-theme="light"] body { background: var(--black); color: var(--white); }

[data-theme="light"] .login-page {
  background: radial-gradient(ellipse at 20% 50%, rgba(158, 124, 46, 0.05) 0%, transparent 60%), #f5f5f5;
}
[data-theme="light"] .login-card { background: #ffffff; border-color: var(--grey-dark); }
[data-theme="light"] .form-group input { background: var(--black-soft); border-color: var(--grey-dark); color: var(--white); }

[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--grey-dark);
}

[data-theme="light"] .sidebar { border-right-color: var(--grey-dark); }
[data-theme="light"] .year-btn:hover { background: var(--black-soft); }
[data-theme="light"] .month-btn .count { background: var(--grey-dark); }

[data-theme="light"] .section-header { border-bottom-color: var(--grey-dark); }

[data-theme="light"] .episode-card {
  background: var(--black-mid);
  border-color: var(--grey-dark);
}
[data-theme="light"] .episode-card:hover { background: var(--black-soft); border-color: var(--gold-dark); }
[data-theme="light"] .episode-card.playing { background: rgba(201, 168, 76, 0.06); border-color: var(--gold); }

[data-theme="light"] .player-bar {
  background: rgba(255, 255, 255, 0.98);
  border-top-color: var(--grey-dark);
}
[data-theme="light"] .player-btn { color: var(--white-dim); }
[data-theme="light"] .player-btn:hover { color: var(--white); }
[data-theme="light"] .player-progress { background: var(--grey-dark); }

[data-theme="light"] .page-tabs { background: var(--black-mid); border-bottom-color: var(--grey-dark); }

[data-theme="light"] .replay-card { background: var(--black-mid); border-color: var(--grey-dark); }
[data-theme="light"] .replay-card:hover { background: var(--black-soft); border-color: var(--gold-dark); }

[data-theme="light"] .chat-wrap { background: var(--black-mid); border-color: var(--grey-dark); }

[data-theme="light"] .guide-option { background: var(--black-mid); border-color: var(--grey-dark); }
[data-theme="light"] .guide-option:hover { background: var(--black-soft); border-color: var(--gold-dark); }
[data-theme="light"] .guide-option.selected { border-color: var(--gold); background: rgba(201, 168, 76, 0.06); }
[data-theme="light"] .option-icon { background: var(--black-soft); border-color: var(--grey-dark); }

[data-theme="light"] .recommendation { background: var(--black-mid); }

[data-theme="light"] .search-input { background: var(--black-soft); border-color: var(--grey-dark); color: var(--white); }

[data-theme="light"] .admin-section h2 { border-bottom-color: var(--grey-dark); }
[data-theme="light"] .sync-log { background: var(--black-soft); border-color: var(--grey-dark); }
[data-theme="light"] .add-user-form input { background: var(--black-soft); border-color: var(--grey-dark); color: var(--white); }
[data-theme="light"] .users-table th { border-bottom-color: var(--grey-dark); }
[data-theme="light"] .users-table td { border-bottom-color: rgba(224, 224, 224, 0.5); }

/* ─── Theme Toggle Button ────────────────────────────────────────────────────── */
.theme-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--grey-dark);
  background: var(--black-soft);
  color: var(--grey-light);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.theme-toggle-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ─── Nav Logo ────────────────────────────────────────────────────────────────── */
.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; }

/* ─── Google Fonts (self-hosted fallback via system fonts) ───────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════════════════════ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    var(--black);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
}

.login-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo .wordmark {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--white);
  letter-spacing: 0.02em;
}

.login-logo .sub {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.25rem;
}

.login-card h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white-dim);
  margin-bottom: 1.75rem;
  font-family: var(--font-sans);
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-light);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--gold);
}

.btn-primary {
  width: 100%;
  background: var(--gold);
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.login-error {
  background: rgba(220, 60, 60, 0.15);
  border: 1px solid rgba(220, 60, 60, 0.4);
  color: #ff8080;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  display: none;
}
.login-error.visible { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════════
   APP SHELL (Library + Admin shared)
═══════════════════════════════════════════════════════════════════════════════ */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Nav ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--grey-dark);
  backdrop-filter: blur(12px);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-user {
  font-size: 0.8rem;
  color: var(--grey-light);
}

.nav-link {
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.nav-link:hover { color: var(--gold-light); }

/* ─── Main Layout ─────────────────────────────────────────────────────────── */
.app-main {
  display: flex;
  flex: 1;
  /* leave room for sticky player */
  padding-bottom: 100px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIBRARY PAGE
═══════════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar ── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--grey-dark);
  padding: 2rem 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-light);
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}

.year-group { margin-bottom: 0.25rem; }

.year-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white-dim);
  background: none;
  transition: color var(--transition), background var(--transition);
}

.year-btn:hover { color: var(--white); background: var(--black-soft); }
.year-btn.active { color: var(--gold); }

.year-btn .chevron {
  font-size: 0.6rem;
  transition: transform var(--transition);
}
.year-btn.open .chevron { transform: rotate(90deg); }

.month-list { display: none; }
.month-list.open { display: block; }

.month-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.5rem 0.4rem 2.5rem;
  font-size: 0.82rem;
  color: var(--grey-light);
  background: none;
  transition: color var(--transition);
}

.month-btn:hover { color: var(--white); }
.month-btn.active { color: var(--gold); }

.month-btn .count {
  font-size: 0.72rem;
  background: var(--grey-dark);
  border-radius: 10px;
  padding: 0 0.4rem;
}

/* ── Episode List ── */
.content {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--grey-dark);
}

.section-header h2 {
  font-size: 1.5rem;
  color: var(--white);
}

.section-header .ep-count {
  font-size: 0.8rem;
  color: var(--grey-light);
}

.month-section { margin-bottom: 2.5rem; }

.month-section h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ── Search ── */

.search-bar-wrap {
  padding: 1rem 1.5rem 0.5rem;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}

.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--grey-light); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

.search-results-header {
  padding: 0.75rem 1.5rem 0.5rem;
  font-size: 0.85rem;
  color: var(--grey-light);
}

.ep-topic-badge {
  font-size: 0.75rem;
  color: var(--gold);
  font-style: italic;
  margin-top: 0.35rem;
  padding: 0 0.5rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.month-topic {
  font-size: 0.85rem;
  color: var(--grey-light);
  font-style: italic;
  margin-bottom: 1rem;
  border-left: 2px solid var(--gold);
  padding-left: 0.75rem;
}

.episode-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Episode Card ── */
.episode-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.episode-card:hover { border-color: var(--gold-dark); background: var(--black-soft); }
.episode-card.playing { border-color: var(--gold); background: rgba(201, 168, 76, 0.05); }

.ep-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  font-size: 0.85rem;
  transition: background var(--transition), color var(--transition);
}

.episode-card:hover .ep-play-btn,
.episode-card.playing .ep-play-btn {
  background: var(--gold);
  color: var(--black);
}

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

.ep-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-meta {
  font-size: 0.78rem;
  color: var(--grey-light);
  margin-top: 0.2rem;
}

.ep-duration {
  font-size: 0.8rem;
  color: var(--grey-light);
  flex-shrink: 0;
}

/* ─── Loading / Empty States ─────────────────────────────────────────────── */
.state-msg {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--grey-light);
}

.state-msg .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.state-msg p { font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════════════════════════
   STICKY AUDIO PLAYER
═══════════════════════════════════════════════════════════════════════════════ */

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(17, 17, 17, 0.98);
  border-top: 1px solid var(--grey-dark);
  backdrop-filter: blur(12px);
  padding: 0.75rem 2rem;
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.player-bar.visible { display: flex; }

.player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-dim);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.player-btn:hover { color: var(--white); }

.player-btn.play-pause {
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--black);
  font-size: 1rem;
}

.player-btn.play-pause:hover { background: var(--gold-light); }

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

.player-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.player-time {
  font-size: 0.72rem;
  color: var(--grey-light);
  white-space: nowrap;
  min-width: 38px;
}

.player-progress {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--grey-dark);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}

.player-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: none;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-volume input[type=range] {
  width: 70px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--grey-dark);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-volume input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white-dim);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ADMIN PAGE
═══════════════════════════════════════════════════════════════════════════════ */

.admin-content {
  flex: 1;
  padding: 2.5rem;
  max-width: 900px;
}

.admin-section {
  margin-bottom: 3rem;
}

.admin-section h2 {
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--grey-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-section h2 .section-badge {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

/* Sync */
.sync-panel {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.sync-actions { display: flex; gap: 0.75rem; flex-direction: column; }

.btn-sync {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gold);
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.btn-sync:hover { background: var(--gold-light); }
.btn-sync:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sync-recent {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}

.btn-sync-recent:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--gold);
}

.sync-log {
  flex: 1;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--grey-light);
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.sync-status {
  font-size: 0.78rem;
  margin-top: 0.5rem;
}
.sync-status.running { color: var(--gold); }
.sync-status.done { color: #6fbf73; }

/* User form + table */
.add-user-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.add-user-form input {
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  color: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  width: 200px;
}

.add-user-form input:focus { border-color: var(--gold); }

.btn-add {
  background: var(--gold);
  color: var(--black);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.btn-add:hover { background: var(--gold-light); }

.form-msg {
  font-size: 0.82rem;
  padding: 0.5rem 0;
  display: none;
}
.form-msg.error { color: #ff8080; display: block; }
.form-msg.success { color: #6fbf73; display: block; }

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-light);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--grey-dark);
}

.users-table td {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(42, 42, 42, 0.5);
  vertical-align: middle;
}

.users-table tr:last-child td { border-bottom: none; }

.badge-admin {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  margin-left: 0.5rem;
}

.btn-delete {
  font-size: 0.78rem;
  color: var(--grey-light);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition);
}

.btn-delete:hover { color: #ff8080; border-color: rgba(220, 60, 60, 0.4); }

.btn-edit-topic {
  font-size: 0.78rem;
  color: var(--gold);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.btn-edit-topic:hover { background: rgba(201, 168, 76, 0.1); }

/* ── Episode Rename ── */
.ep-filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.admin-select {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  color: var(--white);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
}

.admin-text-input {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  color: var(--white);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  flex: 1;
  min-width: 220px;
}

.ep-rename-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ep-rename-day {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  width: 3.5rem;
  flex-shrink: 0;
}

.ep-rename-input {
  flex: 1;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  color: var(--white);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.ep-rename-input:focus { outline: none; border-color: var(--gold); }

.ep-rename-date {
  font-size: 0.75rem;
  color: var(--grey-light);
  width: 4rem;
  text-align: right;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PAGE TABS
═══════════════════════════════════════════════════════════════════════════════ */

.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--grey-dark);
  background: var(--black-mid);
  padding: 0 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-tab {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--grey-light);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.page-tab:hover { color: var(--white); }
.page-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════════════════════
   SIMPLE CONTENT PAGE (Replays, Chat)
═══════════════════════════════════════════════════════════════════════════════ */

.simple-page {
  flex: 1;
  padding: 2.5rem;
  max-width: 900px;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--grey-light);
}

/* Replay card (same look as episode card) */
.replay-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.replay-card:hover { border-color: var(--gold-dark); background: var(--black-soft); }

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

.replay-info { flex: 1; }
.replay-title { font-size: 0.95rem; font-weight: 500; color: var(--white); }
.replay-meta { font-size: 0.78rem; color: var(--grey-light); margin-top: 0.2rem; }

/* Chat embed */
.chat-wrap {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-join-block {
  padding: 3rem 2rem;
  text-align: center;
}

.chat-join-block .tg-logo {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.chat-join-block h2 {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.chat-join-block p {
  font-size: 0.9rem;
  color: var(--grey-light);
  max-width: 420px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gold);
  color: var(--black);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}

.btn-join:hover { background: var(--gold-light); color: var(--black); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════════════════════
   QUESTIONNAIRE / GUIDE PAGE
═══════════════════════════════════════════════════════════════════════════════ */

.guide-page {
  flex: 1;
  padding: 2.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.guide-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.guide-intro h1 {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.guide-intro p {
  font-size: 0.95rem;
  color: var(--grey-light);
  line-height: 1.7;
}

.guide-step { display: none; }
.guide-step.active { display: block; }

.guide-question {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 1.75rem;
  line-height: 1.4;
}

.guide-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.guide-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: left;
  width: 100%;
}

.guide-option:hover { border-color: var(--gold-dark); background: var(--black-soft); }
.guide-option.selected { border-color: var(--gold); background: rgba(201, 168, 76, 0.06); }

.option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.guide-option.selected .option-icon {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
}

.option-text { font-size: 0.93rem; color: var(--white); line-height: 1.4; }
.option-sub { font-size: 0.78rem; color: var(--grey-light); margin-top: 0.15rem; }

.guide-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guide-progress {
  font-size: 0.78rem;
  color: var(--grey-light);
  letter-spacing: 0.05em;
}

.btn-guide-next {
  background: var(--gold);
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  transition: background var(--transition), opacity var(--transition);
}

.btn-guide-next:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-guide-next:not(:disabled):hover { background: var(--gold-light); }

.btn-guide-back {
  font-size: 0.82rem;
  color: var(--grey-light);
  padding: 0.5rem;
  transition: color var(--transition);
}

.btn-guide-back:hover { color: var(--white); }

/* Results */
.guide-results { display: none; }
.guide-results.active { display: block; }

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-header .gold-star { font-size: 2rem; margin-bottom: 0.75rem; }

.results-header h2 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.results-header p {
  font-size: 0.9rem;
  color: var(--grey-light);
}

.recommendation {
  background: var(--black-mid);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.rec-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.rec-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.rec-desc {
  font-size: 0.85rem;
  color: var(--grey-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.btn-go-listen {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.btn-go-listen:hover { background: rgba(201, 168, 76, 0.08); color: var(--gold); }

.btn-restart {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--grey-light);
  transition: color var(--transition);
}

.btn-restart:hover { color: var(--white); }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--grey-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-mid); }

/* ─── Safe Area (iPhone notch / Dynamic Island) ──────────────────────────── */
.top-nav {
  padding-top: max(0px, env(safe-area-inset-top));
  height: calc(60px + max(0px, env(safe-area-inset-top)));
}

.app-shell {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.player-bar {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.login-page {
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .content { padding: 1.5rem 1rem; }
  .top-nav { padding: 0 1rem; padding-top: max(0px, env(safe-area-inset-top)); }
  .player-bar { padding: 0.75rem 1rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
  .player-volume { display: none; }

  .add-user-form input { width: 100%; }
  .admin-content { padding: 1.5rem 1rem; }

  .page-tabs { padding: 0 1rem; }
  .simple-page { padding: 1.5rem 1rem; }
  .guide-page { padding: 1.5rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   LUXURY FEATURES
   ═══════════════════════════════════════════════════════════════════ */

/* ── Scrollable nav on mobile ── */
.page-tabs { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs { flex-wrap: nowrap; white-space: nowrap; }

/* ── Dragon Mark / Complete button on episode card ── */
.ep-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ep-complete-btn {
  font-size: 0.85rem;
  color: var(--grey-dark);
  background: none;
  border: 1px solid var(--grey-dark);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.ep-complete-btn:hover { border-color: var(--gold); color: var(--gold); }
.ep-complete-btn--done {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
  animation: mark-appear 0.4s ease;
}
@keyframes mark-appear {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
.episode-card.completed { border-color: rgba(201,168,76,0.3); }

/* ─────────────────────────────────────────────────────────────────
   DRAGON'S AWAKENING OVERLAY
   ───────────────────────────────────────────────────────────────── */
.awakening-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,0.12) 0%, #050505 55%);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: awakening-in 0.8s ease;
}
@keyframes awakening-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.awakening-overlay.awakening-exit {
  animation: awakening-out 0.6s ease forwards;
}
@keyframes awakening-out {
  to { opacity: 0; transform: scale(1.03); }
}
.awakening-inner {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 520px;
  width: 100%;
}
.awakening-sigil {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: pulse-gold 3s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.awakening-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: #ffffff;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}
.awakening-sub {
  color: #c8c8c8;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.awakening-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.dragon-name-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.dragon-name-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--grey-dark);
  border-radius: 999px;
  color: var(--white-dim);
  font-size: 0.9rem;
  font-family: var(--font-serif);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.dragon-name-btn:hover { border-color: var(--gold); color: var(--gold); }
.dragon-name-btn.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.12);
  color: var(--gold);
}
.awakening-input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 2rem;
  transition: border-color var(--transition), background var(--transition);
}
.awakening-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.12); }
.awakening-input::placeholder { color: rgba(255,255,255,0.4); }
.btn-awakening {
  padding: 0.85rem 2.5rem;
  background: var(--gold);
  color: var(--black);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-awakening:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-awakening:not(:disabled):hover { opacity: 0.85; transform: translateY(-1px); }

/* ─────────────────────────────────────────────────────────────────
   INTEGRATION ALTAR MODAL
   ───────────────────────────────────────────────────────────────── */
.altar-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: awakening-in 0.3s ease;
}
.altar-modal {
  background: var(--black-mid);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  text-align: center;
}
.altar-sigil {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.altar-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.altar-sub {
  color: var(--gold);
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}
.altar-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  line-height: 1.6;
  transition: border-color var(--transition);
}
.altar-textarea:focus { border-color: var(--gold); }
.altar-textarea::placeholder { color: var(--grey-light); }
.altar-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.25rem;
}
.btn-altar-skip {
  padding: 0.65rem 1.25rem;
  color: var(--grey-light);
  font-size: 0.85rem;
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  cursor: pointer;
  background: transparent;
  transition: color var(--transition);
}
.btn-altar-skip:hover { color: var(--white-dim); }
.btn-altar-save {
  padding: 0.65rem 1.5rem;
  background: var(--gold);
  color: var(--black);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition);
}
.btn-altar-save:hover { opacity: 0.85; }

/* ─────────────────────────────────────────────────────────────────
   MY JOURNEY PAGE
   ───────────────────────────────────────────────────────────────── */
.journey-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

/* Hero */
.journey-hero {
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.1) 0%, transparent 70%);
  border-bottom: 1px solid var(--grey-dark);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}
.journey-hero-inner { max-width: 560px; margin: 0 auto; }
.journey-sigil {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  animation: pulse-gold 3s ease-in-out infinite;
}
.journey-name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.journey-intention {
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  min-height: 1.4em;
}
.journey-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}
.journey-stat { text-align: center; padding: 0 1.5rem; }
.journey-stat-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
}
.journey-stat-label { font-size: 0.75rem; color: var(--grey-light); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.08em; }
.journey-stat-divider { width: 1px; height: 40px; background: var(--grey-dark); }
.journey-progress-wrap {
  height: 3px;
  background: var(--grey-dark);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.journey-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 999px;
  transition: width 1s ease;
  width: 0%;
}
.journey-progress-label {
  font-size: 0.75rem;
  color: var(--grey-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sections */
.journey-section {
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--grey-dark);
}
.journey-section-header { margin-bottom: 1.5rem; }
.journey-section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.journey-section-header p { font-size: 0.85rem; color: var(--grey-light); }

/* Constellation */
.constellation-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.constellation-loading { color: var(--grey-light); font-size: 0.9rem; }
.constellation-month {}
.constellation-month-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.constellation-count {
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
}
.constellation-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dragon-mark {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--grey-dark);
  border: 1px solid var(--grey-dark);
  border-radius: 4px;
  transition: all var(--transition);
  cursor: default;
}
.dragon-mark--lit {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
  box-shadow: 0 0 8px rgba(201,168,76,0.2);
}

/* Sanctum */
.sanctum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.sanctum-card {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color var(--transition);
}
.sanctum-card--unlocked {
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.03);
}
.sanctum-card--locked { opacity: 0.6; }
.sanctum-lock {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}
.sanctum-card--locked .sanctum-lock { color: var(--grey-mid); }
.sanctum-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-light);
  margin-bottom: 0.4rem;
}
.sanctum-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--white);
  margin-bottom: 1rem;
}
.sanctum-audio { width: 100%; margin-top: 0.5rem; }
.sanctum-locked-msg { font-size: 0.75rem; color: var(--grey-light); font-style: italic; }

/* Reflections */
.reflections-empty { color: var(--grey-light); font-size: 0.9rem; font-style: italic; padding: 1rem 0; }
.reflection-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.reflection-entry:last-child { border-bottom: none; }
.reflection-episode {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.reflection-date { font-size: 0.75rem; color: var(--grey-light); margin-bottom: 0.6rem; }
.reflection-content {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--white-dim);
  line-height: 1.7;
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────────
   YOU FIRST CTA (in journey page)
   ───────────────────────────────────────────────────────────────── */
.you-first-cta {
  margin: 0;
  padding: 3rem 2rem;
  background: radial-gradient(ellipse at 50% 100%, rgba(201,168,76,0.08) 0%, transparent 70%);
  text-align: center;
}
.yf-cta-inner { max-width: 500px; margin: 0 auto; }
.yf-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.25rem;
}
.you-first-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.you-first-cta p {
  color: var(--grey-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}
.btn-you-first {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--gold);
  color: var(--black);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-you-first:hover { opacity: 0.85; transform: translateY(-1px); }

/* ─────────────────────────────────────────────────────────────────
   YOU FIRST PAGE
   ───────────────────────────────────────────────────────────────── */
.yf-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.yf-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--grey-dark);
  margin-bottom: 2rem;
}
.yf-hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.5rem;
}
.yf-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.yf-hero-sub {
  color: var(--grey-light);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto;
}
.yf-what { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
.yf-what-card {
  display: flex;
  gap: 1rem;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
}
.yf-what-icon { font-size: 1.1rem; color: var(--gold); flex-shrink: 0; margin-top: 0.1rem; }
.yf-what-title { font-size: 0.9rem; font-weight: 600; color: var(--white); margin-bottom: 0.35rem; }
.yf-what-desc { font-size: 0.85rem; color: var(--grey-light); line-height: 1.6; }

/* Form */
.yf-form {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
}
.yf-form-header { text-align: center; margin-bottom: 2rem; }
.yf-form-header h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.yf-form-header p { font-size: 0.85rem; color: var(--grey-light); }
.yf-field { margin-bottom: 1.5rem; }
.yf-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.yf-input, .yf-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.yf-input:focus, .yf-textarea:focus { border-color: var(--gold); }
.yf-input::placeholder, .yf-textarea::placeholder { color: var(--grey-light); }
.yf-textarea { resize: vertical; line-height: 1.6; }
.yf-input--oneword {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  text-align: center;
  font-style: italic;
  letter-spacing: 0.05em;
}
.yf-form-error {
  color: #ff8080;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}
.btn-yf-submit {
  width: 100%;
  padding: 1rem;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-yf-submit:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.btn-yf-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Submitted state */
#yf-submitted-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.yf-submitted {
  text-align: center;
  padding: 2rem;
  max-width: 440px;
}
.yf-submitted-sigil {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: pulse-gold 3s ease-in-out infinite;
}
.yf-submitted h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.yf-submitted p { color: var(--grey-light); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.75rem; }
.yf-submitted-sub { font-style: italic; color: var(--gold) !important; }
.btn-yf-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--grey-light);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid var(--grey-dark);
  padding-bottom: 2px;
  transition: color var(--transition);
}
.btn-yf-back:hover { color: var(--white); }

/* ─────────────────────────────────────────────────────────────────
   WALL OF FIRE
   ───────────────────────────────────────────────────────────────── */
.wall-of-fire {
  margin-top: 2.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--grey-dark);
}
.wof-header { margin-bottom: 1.5rem; }
.wof-header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.wof-header p { font-size: 0.85rem; color: var(--grey-light); }
/* Wall of Fire form */
.wof-form-card {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.wof-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.wof-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-serif);
  font-style: italic;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  line-height: 1.6;
  transition: border-color var(--transition);
}
.wof-textarea:focus { border-color: var(--gold); }
.wof-textarea::placeholder { color: var(--grey-light); font-style: italic; }
.wof-form-field { margin-bottom: 1rem; }
.wof-form-field:last-child { margin-bottom: 0; }
.wof-form-row { display: flex; gap: 1rem; }
.wof-form-field--half { flex: 1; min-width: 0; }
.wof-field-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--black-soft);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.wof-field-input:focus { border-color: var(--gold); }
.wof-field-input::placeholder { color: var(--grey-light); }
.wof-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}
.wof-form-note { font-size: 0.75rem; color: var(--grey-light); font-style: italic; }
.btn-wof-submit {
  padding: 0.65rem 1.5rem;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.btn-wof-submit:hover { opacity: 0.85; }
.wof-msg { font-size: 0.8rem; margin-bottom: 1rem; }
.wof-msg--success { color: var(--gold); }
.wof-msg--error { color: #ff8080; }
.wof-loading { color: var(--grey-light); font-size: 0.9rem; }
.wof-empty { color: var(--grey-light); font-size: 0.9rem; font-style: italic; padding: 1rem 0; }
.wof-feed { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.wof-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.wof-quote-mark {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 0.8;
  flex-shrink: 0;
  opacity: 0.6;
  margin-top: 0.2rem;
}
.wof-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--white-dim);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 0.6rem;
}
.wof-attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.wof-name { font-size: 0.8rem; color: var(--gold); font-style: normal; font-weight: 500; }
.wof-day { font-size: 0.75rem; color: var(--grey-light); }

/* ─────────────────────────────────────────────────────────────────
   ADMIN: BREAKTHROUGH CARDS
   ───────────────────────────────────────────────────────────────── */
.breakthrough-card {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}
.breakthrough-card--live { border-color: rgba(201,168,76,0.35); }
.breakthrough-quote {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--white-dim);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.breakthrough-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}
.breakthrough-status { color: var(--gold); font-size: 0.75rem; }
.breakthrough-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-copy-testimonial {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-copy-testimonial:hover { background: rgba(201,168,76,0.1); }

/* ─────────────────────────────────────────────────────────────────
   ADMIN: YOU FIRST CARDS
   ───────────────────────────────────────────────────────────────── */
.yf-admin-card {
  background: var(--black-mid);
  border: 1px solid var(--grey-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.yf-admin-meta {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--grey-dark);
}
.yf-admin-field { margin-top: 0.75rem; }
.yf-admin-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.2rem;
}
.yf-admin-field p { font-size: 0.9rem; color: var(--white-dim); line-height: 1.6; margin: 0; }

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .journey-hero { padding: 2rem 1.25rem 2rem; }
  .journey-section { padding: 2rem 1.25rem; }
  .you-first-cta { padding: 2.5rem 1.25rem; }
  .yf-page { padding: 0 1rem 3rem; }
  .yf-form { padding: 1.5rem 1.25rem; }
  .awakening-inner { padding: 2rem 1.25rem; }
  .wof-form-row { flex-direction: column; gap: 0.75rem; }
  .wof-form-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .wof-form-footer .btn-wof-submit { width: 100%; }
  .sanctum-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
