/* ─────────────────────────────────────────────────────────────────────
   Forever — main stylesheet
   Warm editorial design system
   Cream + ink + gold, serif headlines, modern UI sans
   ───────────────────────────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: #1a1714;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  color: #2a2420;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}
#root {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  width: 100%;
}

/* ── Phone shell ──────────────────────────────────────────────────── */
.phone-shell {
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  transform-origin: center center;
  transition: transform 0.15s ease;
}
.phone {
  width: 390px; height: 844px;
  background: var(--cream);
  border-radius: 48px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 4px #1a1714, 0 0 0 6px #2a2420, 0 30px 80px rgba(0,0,0,0.55);
  font-family: var(--font-ui);
  color: var(--ink);
}
.phone-status-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 54px;
  z-index: 60;
  pointer-events: none;
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 122px; height: 30px;
  background: #15110d;
  border-radius: 22px;
}
.phone-home-indicator {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px;
  background: rgba(42,36,32,0.35);
  z-index: 70;
}
.phone-content {
  position: absolute; inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 30px;
}
.phone-content::-webkit-scrollbar { width: 0; }

/* ── Top bar ──────────────────────────────────────────────────────── */
.global-top-bar {
  position: absolute;
  top: 54px; left: 0; right: 0;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  z-index: 50;
  transition: background 0.4s ease;
}
.global-top-bar.light { background: var(--cream); }
.global-top-bar.dark  { background: var(--ink); }
.top-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.top-icon-btn:hover { background: var(--parchment); }
.global-top-bar.dark .top-icon-btn:hover { background: rgba(255,255,255,0.06); }

/* ─── ONBOARD ─────────────────────────────────────────────────────── */
.onboard-screen {
  background: linear-gradient(180deg, var(--warm-white) 0%, var(--cream) 220px);
  min-height: 100%;
  padding: 24px 28px 40px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.onboard-mark {
  margin: 8px 0 20px;
  opacity: 0.85;
}
.onboard-tagline {
  font-family: var(--font-script);
  font-size: 19px; color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}
.onboard-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 34px; line-height: 1.05;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin-bottom: 10px;
  text-wrap: pretty;
  max-width: 290px;
}
.onboard-sub {
  font-size: 14.5px; line-height: 1.5;
  color: var(--ink-soft);
  max-width: 300px;
  margin-bottom: 30px;
  text-wrap: pretty;
}
.topic-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: 100%; margin-bottom: 14px;
}
.topic-btn {
  background: var(--cream);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 16px 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; text-align: center;
}
.topic-btn:hover { border-color: var(--gold-soft); transform: translateY(-1px); }
.topic-btn.selected {
  border-color: var(--gold);
  background: var(--gold-glow);
  box-shadow: 0 0 0 1.5px var(--gold) inset;
}
.topic-btn-icon { font-size: 24px; line-height: 1; }
.topic-btn-label { font-family: var(--font-serif); font-weight: 600; font-size: 16px; color: var(--ink); }
.topic-btn-desc { font-size: 11.5px; color: var(--ink-faint); line-height: 1.3; }

.surprise-btn {
  background: transparent;
  border: 1.2px dashed var(--ink-faint);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  font-family: var(--font-script);
  font-size: 18px; color: var(--ink-soft);
  width: 100%;
  margin: 6px 0 22px;
  transition: all 0.2s;
}
.surprise-btn:hover { border-color: var(--gold); color: var(--gold); }
.onboard-continue {
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 14px;
  padding: 17px 20px;
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.1px;
  cursor: pointer;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.onboard-continue:hover { transform: translateY(-1px); }
.onboard-foot {
  font-size: 12px; color: var(--ink-faint);
  margin-top: 18px; letter-spacing: 0.2px;
}

/* ─── HOME / BOOKSHELF ────────────────────────────────────────────── */
.bookshelf-area {
  padding: 14px 22px 0;
  min-height: 100%;
  background: var(--cream);
}
.shelf-greeting {
  font-family: var(--font-script);
  font-size: 19px; color: var(--ink-soft);
  margin-bottom: 2px;
}
.shelf-subject-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.shelf-subject-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 30px; line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.shelf-share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-soft);
}
.shelf-share-btn:hover { background: var(--gold-glow); color: var(--gold); border-color: var(--gold-soft); }
.shelf-stats {
  font-size: 12.5px; color: var(--ink-faint);
  margin-top: 6px; margin-bottom: 16px;
  font-feature-settings: 'tnum';
}

/* Streak card */
.streak-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 12px 14px 12px 16px;
  margin-bottom: 18px;
}
.streak-info { display: flex; align-items: center; gap: 14px; }
.streak-num {
  display: flex; flex-direction: column; line-height: 1;
}
.streak-num span {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 28px;
  color: var(--ink);
  font-feature-settings: 'lnum' 'tnum';
}
.streak-num em {
  font-style: normal; font-size: 10.5px;
  color: var(--ink-faint); margin-top: 3px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.streak-flame {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-glow);
  display: flex; align-items: center; justify-content: center;
}
.streak-dots { display: flex; gap: 5px; }
.streak-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--parchment);
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 600; color: var(--ink-faint);
  letter-spacing: 0.3px;
}
.streak-dot.on {
  background: var(--gold);
  color: var(--cream);
}
.streak-dot.today {
  outline: 1.5px solid var(--ink);
  outline-offset: 1.5px;
}

/* Prompt card */
.prompt-card {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  position: relative;
}
.prompt-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(30,22,15,0.07); }
.prompt-card-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  justify-content: center;
}
.prompt-card-label .hairline {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  opacity: 0.5;
}
.prompt-item {
  display: flex; gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.prompt-icon {
  width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.prompt-icon.callback { background: var(--parchment); color: var(--ink-soft); }
.prompt-icon.new      { background: var(--gold-glow); color: var(--gold); }
.prompt-type {
  font-family: var(--font-ui); font-style: normal;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-faint);
  display: block; margin-bottom: 3px;
}
.prompt-text {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 400;
  font-size: 16.5px; line-height: 1.42;
  color: var(--ink);
  text-wrap: pretty;
}
.prompt-start-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 14px;
  margin-top: 10px;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 14.5px; font-weight: 500;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.prompt-start-btn:hover { transform: translateY(-1px); }
.prompt-start-btn:active { transform: scale(0.98); }
.prompt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.3);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,168,76,0.3); }
  50%      { box-shadow: 0 0 0 5px rgba(201,168,76,0.15); }
}

/* Upload card */
.upload-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream);
  border: 1.2px dashed var(--parchment);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 28px;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-card:hover {
  border-color: var(--gold-soft);
  background: var(--gold-glow);
}
.upload-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.upload-card-text { flex: 1; }
.upload-card-title {
  font-family: var(--font-ui);
  font-weight: 600; font-size: 13.5px;
  color: var(--ink); margin-bottom: 2px;
}
.upload-card-desc {
  font-size: 11.5px; color: var(--ink-faint);
  line-height: 1.4;
}

/* Shelf header */
.shelf-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.shelf-section-label {
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-faint);
}
.shelf-zoom-btn {
  background: transparent; border: none;
  font-family: var(--font-ui);
  font-size: 11.5px; color: var(--ink-soft);
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.shelf-zoom-btn:hover { color: var(--gold); }

/* The actual bookshelf */
.bookshelf {
  position: relative;
  padding: 18px 0 10px;
  margin-bottom: 4px;
}
.shelf-row {
  display: flex; gap: 8px;
  padding: 0 4px 12px;
  align-items: flex-end;
  position: relative;
  min-height: 130px;
}
.shelf-plank {
  position: absolute;
  bottom: 0; left: -10px; right: -10px;
  height: 9px;
  background: linear-gradient(180deg, #8b6f54 0%, #6b5340 50%, #3d2e1e 100%);
  border-radius: 1.5px;
  box-shadow: 0 5px 10px rgba(30,22,15,0.18);
}
.shelf-plank::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.shelf-plank::after {
  content: '';
  position: absolute; bottom: -8px; left: 0; right: 0; height: 6px;
  background: linear-gradient(180deg, rgba(30,22,15,0.18), transparent);
  filter: blur(2px);
}

.book-spine {
  width: 36px;
  border-radius: 1.5px 4px 4px 1.5px;
  cursor: pointer; position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.6, 1);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 5px rgba(30,22,15,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}
.book-spine:hover { transform: translateY(-6px) rotate(-1.5deg); }
.book-spine .spine-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-serif);
  font-weight: 600; font-size: 10.5px;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.92);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(100% - 14px);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.book-spine::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(0,0,0,0.18);
  border-radius: 1.5px 0 0 1.5px;
}
.book-spine .spine-bands {
  position: absolute;
  top: 12%; left: 4px; right: 2px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  box-shadow: 0 8px 0 rgba(255,255,255,0.15), 0 -8px 0 rgba(0,0,0,0.12);
}

.book-output {
  width: 72px;
  border-radius: 2px 6px 6px 2px;
  cursor: pointer; position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.6, 1);
  box-shadow: 3px 3px 10px rgba(30,22,15,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  background: linear-gradient(135deg, var(--rose) 0%, #a05a4c 100%);
  padding: 12px 8px 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  color: rgba(255,255,255,0.95);
}
.book-output:hover { transform: translateY(-7px) rotate(-1deg); }
.book-output::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: rgba(0,0,0,0.22);
  border-radius: 2px 0 0 2px;
}
.book-output-label {
  font-family: var(--font-ui);
  font-size: 8px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  opacity: 0.7;
}
.book-output-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 13px;
  text-align: center; line-height: 1.05;
  letter-spacing: 0.2px;
  white-space: pre-line;
}
.book-output-sub {
  font-size: 9px; opacity: 0.75;
  letter-spacing: 0.4px;
}

/* Ghost book — voice avatar in progress */
.book-ghost {
  width: 56px;
  border-radius: 2px 5px 5px 2px;
  background:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 4px,
      rgba(201,168,76,0.08) 4px, rgba(201,168,76,0.08) 5px);
  border: 1.2px dashed var(--gold-soft);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.6, 1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  position: relative;
}
.book-ghost:hover { transform: translateY(-5px); }
.ghost-icon { display: flex; }
.ghost-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px; line-height: 1.1;
  color: var(--ink-soft);
  text-align: center;
}
.ghost-progress {
  width: 80%; height: 2px;
  background: var(--parchment);
  border-radius: 2px;
  overflow: hidden;
}
.ghost-progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 2px;
}

/* Chapter cards (alt metaphor) */
.chapter-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.chapter-card {
  border-radius: 14px;
  padding: 14px 14px 16px;
  min-height: 96px;
  position: relative;
  cursor: pointer;
  display: flex; flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(30,22,15,0.12);
}
.chapter-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30,22,15,0.18); }
.chapter-card-stories {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 28px;
  line-height: 1; opacity: 0.9;
  font-feature-settings: 'lnum' 'tnum';
}
.chapter-card-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 17px;
  letter-spacing: -0.2px;
  margin-top: 12px;
}
.memoir-card {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--ink) 0%, #45382f 100%);
  color: var(--cream);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30,22,15,0.25);
}
.memoir-card-label {
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 6px;
}
.memoir-card-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 22px;
  letter-spacing: -0.3px;
}
.memoir-card-sub {
  font-size: 12px; color: rgba(245,239,230,0.65);
  margin-top: 4px;
}
.memoir-card-arrow {
  position: absolute; top: 18px; right: 16px;
  color: var(--gold-soft);
}
.ghost-card {
  border-radius: 14px;
  padding: 14px;
  min-height: 96px;
  background:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 6px,
      rgba(201,168,76,0.06) 6px, rgba(201,168,76,0.06) 7px),
    var(--cream);
  border: 1.2px dashed var(--gold-soft);
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.ghost-card-icon { margin-bottom: 8px; }
.ghost-card-title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 15px; color: var(--ink);
}
.ghost-card-sub {
  font-size: 11px; color: var(--ink-faint);
  margin-top: 2px;
}

/* ─── RECORD (light, airy) ────────────────────────────────────────── */
.record-screen {
  background: linear-gradient(180deg, var(--warm-white) 0%, var(--cream) 50%, var(--warm-white) 100%);
  min-height: 100%;
  padding: 18px 26px 30px;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.record-subject {
  margin-top: 4px; margin-bottom: 24px;
}
.record-subject-label {
  font-family: var(--font-script);
  font-size: 17px; color: var(--gold);
  margin-bottom: 4px;
}
.record-subject-name {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.record-prompt-card {
  background: var(--cream);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 28px;
  width: 100%;
  text-align: left;
}
.record-prompt-label {
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.record-prompt-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px; line-height: 1.4;
  color: var(--ink-soft);
}

.record-waveform {
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  height: 82px;
  width: 100%;
  margin-bottom: 22px;
}
.wave-bar {
  width: 3px;
  background: var(--gold);
  border-radius: 4px;
  animation: wave 1.2s ease-in-out infinite;
}
.wave-bar.paused { animation-play-state: paused; opacity: 0.4; }
.wave-bar:nth-child(3n)   { background: var(--gold-soft); }
.wave-bar:nth-child(5n)   { background: var(--rose); opacity: 0.7; }
.wave-bar:nth-child(7n)   { background: var(--ink-soft); opacity: 0.5; }
@keyframes wave {
  0%, 100% { height: 8px; }
  50%      { height: 56px; }
}

.record-time {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.record-time-num {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 56px;
  letter-spacing: -1.5px;
  color: var(--ink);
  font-feature-settings: 'lnum' 'tnum';
  line-height: 1;
}
.record-time-of {
  font-family: var(--font-script);
  font-size: 17px;
  color: var(--ink-faint);
}
.record-progress {
  width: 100%; height: 3px;
  background: var(--parchment);
  border-radius: 2px;
  margin-bottom: 30px;
  position: relative;
}
.record-progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 2px;
  transition: width 0.5s linear;
}
.record-progress-marks { position: absolute; inset: 0; }
.record-progress-mark {
  position: absolute; top: -1px; width: 1px; height: 5px;
  background: var(--ink-faint);
  opacity: 0.5;
}

.record-controls {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 320px;
  margin-bottom: 20px;
}
.record-ctrl-secondary {
  background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.3px;
  width: 64px;
}
.record-ctrl-secondary:hover { color: var(--ink); }

.record-stop {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3), 0 0 0 6px var(--gold-glow);
  transition: transform 0.15s ease;
}
.record-stop:hover { transform: scale(1.04); }
.record-stop:active { transform: scale(0.96); }
.record-stop-inner {
  width: 26px; height: 26px;
  background: var(--gold);
  border-radius: 4px;
}
.record-foot {
  font-size: 11.5px; color: var(--ink-faint);
  margin-top: auto;
  letter-spacing: 0.3px;
}

/* ─── POST-SESSION ────────────────────────────────────────────────── */
.post-screen {
  padding: 20px 24px 36px;
  background: var(--cream);
  min-height: 100%;
}
.post-header {
  text-align: center;
  padding: 8px 0 24px;
}
.post-check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.post-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin-bottom: 4px;
}
.post-sub {
  font-size: 12.5px; color: var(--ink-faint);
  font-feature-settings: 'tnum';
}
.post-section-label {
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
  margin-top: 6px;
}
.post-moments {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 4px 0;
  margin-bottom: 24px;
}
.moment-item {
  display: flex; align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--parchment);
  transition: background 0.15s;
}
.moment-item:last-child { border-bottom: none; }
.moment-item:hover { background: var(--cream); }
.moment-time {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  color: var(--gold);
  font-feature-settings: 'tnum';
  flex-shrink: 0;
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.moment-divider {
  width: 1px; align-self: stretch;
  background: var(--parchment);
  margin-top: 2px;
}
.moment-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px; line-height: 1.42;
  color: var(--ink);
  text-wrap: pretty;
}

.post-photo-prompt {
  display: flex; align-items: center; gap: 14px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.post-photo-prompt:hover { transform: translateY(-1px); }
.post-photo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post-photo-text { flex: 1; }
.post-photo-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 2px;
}
.post-photo-sub {
  font-size: 12px; color: var(--ink-soft);
}

.post-shelf-preview {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 26px;
}
.post-spine-row {
  display: flex; align-items: center; gap: 16px;
}
.post-spine-row .book-spine { animation: spine-glow 2s ease-in-out infinite; }
@keyframes spine-glow {
  0%, 100% { box-shadow: 2px 2px 5px rgba(30,22,15,0.18); }
  50%      { box-shadow: 0 0 16px var(--gold-soft), 2px 2px 5px rgba(30,22,15,0.18); }
}
.post-spine-info { flex: 1; }
.post-spine-info-label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}
.post-spine-info-name {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 18px;
  color: var(--ink);
}
.post-spine-info-meta {
  font-size: 11.5px; color: var(--ink-faint);
  margin-top: 2px;
}

.post-done-btn, .post-share-btn {
  width: 100%; padding: 16px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none;
}
.post-done-btn {
  background: var(--ink); color: var(--cream);
  margin-bottom: 8px;
}
.post-share-btn {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--parchment);
}
.post-share-btn:hover { border-color: var(--gold-soft); color: var(--gold); }

/* ─── MEMORY DETAIL ───────────────────────────────────────────────── */
.memory-screen { padding: 14px 22px 30px; min-height: 100%; background: var(--cream); }
.memory-back-row { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.memory-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--warm-white); border: 1px solid var(--parchment);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.memory-back:hover { background: var(--gold-glow); }
.memory-meta { padding: 18px 0 18px; }
.memory-chapter {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.memory-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 30px;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 8px;
  text-wrap: pretty;
}
.memory-byline {
  font-size: 12px; color: var(--ink-faint);
  font-feature-settings: 'tnum';
}
.memory-player {
  display: flex; align-items: center; gap: 14px;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 22px;
}
.memory-play {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.memory-player-mid { flex: 1; }
.memory-scrubber {
  height: 3px; background: var(--parchment); border-radius: 2px;
  position: relative; margin-bottom: 6px;
}
.memory-scrubber-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--gold); border-radius: 2px;
}
.memory-scrubber-thumb {
  position: absolute; top: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
}
.memory-times {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--ink-faint);
  font-feature-settings: 'tnum';
}
.memory-transcript {
  margin-bottom: 22px;
}
.memory-transcript p {
  font-family: var(--font-serif);
  font-size: 16.5px; line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.memory-transcript p.active {
  color: var(--ink);
  font-weight: 500;
}
.memory-transcript p.dim {
  color: var(--ink-faint);
}
.memory-transcript em { color: var(--gold); font-style: italic; }
.memory-attached {
  border-top: 1px solid var(--parchment);
  padding-top: 16px;
}
.memory-attached-label {
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}
.memory-attached-row { display: flex; gap: 10px; }
.memory-photo {
  flex: 1;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 12px;
  padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-soft);
  cursor: pointer;
}
.memory-photo-add { border-style: dashed; color: var(--ink-faint); }

/* ─── MEMOIR (book reader) ────────────────────────────────────────── */
.memoir-screen {
  background: linear-gradient(180deg, var(--ink) 0%, #1f1814 100%);
  min-height: 100%;
  color: var(--cream);
  padding: 14px 22px 30px;
}
.memoir-back-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px; margin-bottom: 18px;
}
.memoir-back-row .memory-back {
  background: rgba(245,239,230,0.06);
  border-color: rgba(245,239,230,0.12);
  color: var(--cream);
}
.memoir-back-row .memory-back:hover { background: rgba(201,168,76,0.18); }
.memoir-progress-text {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--gold-soft);
  letter-spacing: 0.5px;
}
.memoir-page {
  background: var(--warm-white);
  color: var(--ink);
  border-radius: 8px;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  background-image:
    repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(196,125,109,0.04) 27px, rgba(196,125,109,0.04) 28px);
}
.memoir-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 4px 9px;
  border-radius: 30px;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 18px;
}
.memoir-chapter-no {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px; color: var(--ink-faint);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.memoir-h1 {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 30px;
  letter-spacing: -0.5px;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 10px;
  text-wrap: pretty;
}
.memoir-byline {
  font-family: var(--font-script);
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 16px;
}
.memoir-rule {
  width: 50px; height: 1px;
  background: var(--ink-faint);
  margin-bottom: 18px;
  opacity: 0.4;
}
.memoir-page p {
  font-family: var(--font-serif);
  font-size: 15.5px; line-height: 1.55;
  color: var(--ink);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.memoir-page p em { color: var(--rose); font-style: italic; }
.memoir-dropcap .dropcap {
  float: left;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 54px; line-height: 0.85;
  margin: 4px 8px 0 0;
  color: var(--gold);
}
.memoir-foot {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--parchment);
}
.memoir-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  border-radius: 10px;
  background: var(--ink); color: var(--cream);
  border: none; cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 500;
}
.memoir-cta.secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--parchment);
}

/* ─── SHELF ZOOM ──────────────────────────────────────────────────── */
.zoom-screen { padding: 14px 22px 30px; min-height: 100%; background: var(--cream); }
.zoom-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px; margin-bottom: 8px;
}
.zoom-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.zoom-stats {
  display: flex; gap: 14px;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 14px 0 8px;
}
.zoom-stats > div {
  flex: 1;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--parchment);
}
.zoom-stats > div:last-child { border-right: none; }
.zoom-stat-num {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 22px;
  color: var(--ink);
  font-feature-settings: 'lnum' 'tnum';
}
.zoom-stats em {
  font-style: normal; font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-top: 1px;
}

/* ─── SETTINGS / SHARE ────────────────────────────────────────────── */
.settings-screen, .share-screen {
  padding: 14px 22px 30px;
  min-height: 100%;
  background: var(--cream);
}
.settings-header, .share-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 4px;
  margin-bottom: 22px;
}
.settings-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 19px;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.settings-group-label {
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
  margin-top: 18px;
}
.settings-group-label:first-of-type { margin-top: 0; }
.settings-group {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  overflow: hidden;
}
.settings-pair {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--parchment);
  transition: background 0.15s;
}
.settings-pair:last-child { border-bottom: none; }
.settings-pair:hover { background: var(--cream); }
.settings-pair.active { background: var(--gold-glow); }
.settings-pair-info { flex: 1; }
.settings-pair-name {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 16px;
  color: var(--ink);
}
.settings-pair-meta {
  font-size: 11.5px; color: var(--ink-faint);
  margin-top: 1px;
  font-feature-settings: 'tnum';
}
.settings-active-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.settings-add {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 13.5px; font-weight: 500;
  border-top: 1px dashed var(--parchment);
}
.settings-add-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.2px dashed var(--parchment);
  display: flex; align-items: center; justify-content: center;
}
.settings-add:hover { color: var(--gold); }
.settings-add:hover .settings-add-icon { border-color: var(--gold-soft); }

.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--parchment);
  font-family: var(--font-ui);
  font-size: 14px; color: var(--ink);
  cursor: pointer;
}
.settings-row:last-child { border-bottom: none; }
.settings-row > span { flex: 1; }
.settings-row em {
  font-style: normal;
  color: var(--ink-faint);
  font-size: 12.5px;
}
.settings-row:hover { background: var(--cream); }

.settings-foot {
  text-align: center;
  font-size: 11px; color: var(--ink-faint);
  margin-top: 30px;
  letter-spacing: 0.4px;
}

/* Share */
.share-hero {
  text-align: center;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 14px;
  padding: 22px 22px 24px;
  margin-bottom: 14px;
}
.share-hero-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.share-hero-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.share-hero-sub {
  font-size: 13px; color: var(--ink-soft);
  line-height: 1.45;
  text-wrap: pretty;
  max-width: 280px;
  margin: 0 auto;
}
.share-tag {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-glow);
  padding: 5px 10px;
  border-radius: 20px;
}
.share-invite-btn {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 500;
  background: var(--ink); color: var(--cream);
  border: none; padding: 7px 14px; border-radius: 18px;
  cursor: pointer;
}
.share-cta {
  width: 100%; padding: 16px;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 14.5px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px;
}
