/* ────────────────────────────────────────────────────────────
   The Last Self-Help Book — "Midnight Library" design system
   Dark cloth-bound cover → warm paper pages.
   Type: Fraunces (display) + Newsreader (body)
   ──────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --ink: #16131f;          /* midnight velvet */
  --ink-soft: #241e33;
  --ink-line: #322a45;
  --paper: #f7f2e8;        /* warm cream paper */
  --paper-deep: #efe7d7;
  --paper-line: #ddd2bc;
  --gold: #d8b97c;         /* champagne gold */
  --gold-bright: #e9cd96;
  --oxblood: #6b2d44;      /* mulberry wine, accent on paper */
  --text-on-paper: #2b2419;
  --text-soft: #6e6352;
  --text-on-ink: #ede6da;
  --text-on-ink-soft: #a99db9;
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Lora', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--text-on-paper);
  line-height: 1.6;
  min-height: 100vh;
}

::selection { background: var(--gold); color: var(--ink); }

/* ── shared atoms ─────────────────────────────────────────── */

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--gold); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--gold); color: var(--ink); }
.btn.solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn.paper {
  border-color: var(--oxblood); color: var(--oxblood);
}
.btn.paper:hover { background: var(--oxblood); color: var(--paper); }
.btn.paper.solid { background: var(--oxblood); color: var(--paper); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--gold-bright); }
.btn.paper:disabled:hover { background: transparent; color: var(--oxblood); }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--paper-line);
  border-radius: 2px;
  color: var(--text-on-paper);
  outline: none;
  transition: border-color .2s ease;
}
input:focus, textarea:focus { border-color: var(--oxblood); }
textarea { min-height: 9rem; resize: vertical; line-height: 1.65; }

/* grain overlay for atmosphere */
.grain::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fade-up { animation: fadeUp .8s cubic-bezier(.22,1,.36,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ── LANDING (dark cover) ─────────────────────────────────── */

body.cover {
  background:
    radial-gradient(120% 90% at 50% 0%, #221b33 0%, var(--ink) 58%),
    var(--ink);
  color: var(--text-on-ink);
}

.cover-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
  text-align: center;
}

.cover-rule {
  width: 110px; height: 1px;
  margin: 2.2rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
}
.cover-rule::after {
  content: '❦';
  position: absolute; top: -0.8em; left: 50%; transform: translateX(-50%);
  color: var(--gold); font-size: 0.9rem; background: transparent;
}

.cover-eyebrow { color: var(--gold); }

h1.cover-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2.7rem, 7.5vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 1.4rem 0 0;
  color: var(--text-on-ink);
}
h1.cover-title em {
  font-style: italic;
  font-weight: 340;
  color: var(--gold-bright);
}

.cover-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: var(--text-on-ink-soft);
  max-width: 34em;
  margin: 1.6rem auto 0;
  font-style: italic;
}

.cover-points {
  display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap;
  margin: 3.2rem auto 0; max-width: 760px;
  text-align: center;
}
.cover-points .pt { max-width: 200px; }
.cover-points .pt .n {
  font-family: var(--serif); font-style: italic;
  color: var(--gold); font-size: 1.6rem; display: block; margin-bottom: .4rem;
}
.cover-points .pt p { font-size: .95rem; color: var(--text-on-ink-soft); line-height: 1.5; }

.gate {
  margin: 3.6rem auto 0;
  max-width: 430px;
  padding: 2.4rem 2.2rem 2.6rem;
  border: 1px solid var(--ink-line);
  background: rgba(0,0,0,0.22);
  text-align: left;
}
.gate h3 {
  font-family: var(--serif); font-weight: 420; font-size: 1.3rem;
  margin-bottom: 1.2rem; color: var(--text-on-ink);
}
.gate input {
  background: rgba(255,255,255,0.06);
  border-color: var(--ink-line);
  color: var(--text-on-ink);
  font-size: 1rem;
  margin-bottom: .8rem;
}
.gate input:focus { border-color: var(--gold); }
.gate input::placeholder { color: #7d7391; }
.gate .err { color: #d98d76; font-size: .9rem; margin: .2rem 0 .6rem; min-height: 1.2em; }
.gate .or {
  text-align: center; margin: 1.4rem 0;
  color: var(--text-on-ink-soft); font-size: .8rem;
  letter-spacing: .2em; text-transform: uppercase;
}
.gate .btn { width: 100%; text-align: center; }

.cover-foot {
  margin-top: 4rem; font-size: .85rem; color: #6f6480; font-style: italic;
}

/* ── WIZARD (paper) ───────────────────────────────────────── */

.wizard-top {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(var(--paper) 75%, rgba(247,242,232,0));
  padding: 1.3rem 1.5rem 1.6rem;
}
.wizard-top-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wizard-brand {
  font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--text-soft);
}
.progress-track {
  flex: 1; height: 3px; background: var(--paper-line); position: relative; max-width: 320px;
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--oxblood) 70%, var(--gold));
  transition: width .5s cubic-bezier(.22,1,.36,1);
}
.progress-fill::after {
  content: ''; position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 6px rgba(216,185,124,.7);
}
.progress-tick {
  position: absolute; top: -2px; bottom: -2px; width: 1px;
  background: rgba(43,36,25,.22);
}
.progress-label { font-size: .75rem; letter-spacing: .15em; color: var(--text-soft); white-space: nowrap; }

@media (max-width: 700px) {
  .wizard-top { padding-bottom: 1.1rem; }
  .wizard-top-inner { flex-wrap: wrap; row-gap: .55rem; }
  .progress-track { order: 5; flex-basis: 100%; max-width: none; }
}

/* ── The Seal: progress pressed into one mark ─────────────── */
.seal-wrap { display: inline-flex; align-items: center; position: relative; }
.seal { display: block; overflow: visible; }
.seal .seal-seg {
  fill: none; stroke: var(--paper-line); stroke-width: 2.4; stroke-linecap: round;
  transition: stroke .9s ease;
}
.seal .seal-seg.done { stroke: var(--gold); }
.seal.complete .seal-seg { stroke: var(--gold); }
.seal .seal-star { fill: var(--gold); font-family: var(--serif); }
.seal-wrap.seal-pressed .seal { animation: sealPress 1.6s cubic-bezier(.22,1,.36,1) both; }
@keyframes sealPress {
  0%   { transform: scale(1); filter: none; }
  30%  { transform: scale(1.3); filter: drop-shadow(0 0 8px rgba(216,185,124,.85)); }
  100% { transform: scale(1); filter: none; }
}
.seal-intro { text-align: center; margin-bottom: 1.4rem; }
.seal-intro .seal { margin: 0 auto; }
.seal-intro-line, .seal-finale-line {
  font-size: .82rem; font-style: italic; color: var(--text-soft); margin-top: .55rem;
}
.seal-finale { text-align: center; margin: 0 auto 2rem; }
.seal-finale .seal { margin: 0 auto; }

/* hallmarks — quiet achievement marks */
.desk-hallmarks { margin-top: .55rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.desk-hallmarks:empty { display: none; }
.hallmark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(216,185,124,.5); color: var(--gold-bright);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; background: rgba(216,185,124,.08); cursor: default;
  font-style: normal;
}
.hallmark.fresh { animation: hallmarkIn 1s cubic-bezier(.22,1,.36,1) both; }
@keyframes hallmarkIn {
  0%   { transform: scale(.2); opacity: 0; }
  55%  { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 7px rgba(216,185,124,.8)); }
  100% { transform: scale(1); opacity: 1; filter: none; }
}
.hallmark-row {
  display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem;
}
.hallmark.big {
  width: auto; height: auto; border-radius: 999px; padding: .4rem .95rem;
  gap: .5rem; color: var(--oxblood); border-color: rgba(107,45,68,.3);
  background: rgba(216,185,124,.14);
}
.hallmark.big i { font-style: normal; color: var(--gold); font-size: .95rem; }
.hallmark.big em {
  font-style: normal; font-family: var(--serif); font-size: .8rem; letter-spacing: .04em;
}

/* finale extras: the book asks back + more sittings */
.extra-card {
  max-width: 420px; margin: 0 auto 1.6rem; padding: 1.4rem 1.6rem 1.5rem;
  border: 1px solid var(--paper-line); background: rgba(255,255,255,.45);
  text-align: left;
}
.extra-eyebrow {
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--oxblood); margin-bottom: .4rem;
}
.extra-title { font-family: var(--serif); font-size: 1.25rem; margin-bottom: .45rem; }
.extra-sub { font-size: .95rem; color: var(--text-soft); line-height: 1.55; margin-bottom: 1rem; }
.extra-done { font-family: var(--serif); font-style: italic; color: var(--oxblood); font-size: .95rem; }
.btn.sm { padding: .7rem 1.3rem; font-size: .72rem; }
.opt.sitting {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: .98rem; padding: .75rem 1rem;
}
.opt.sitting .sitting-count {
  font-size: .78rem; font-style: italic; color: var(--text-soft); white-space: nowrap;
}
.opt.sitting.done { border-color: rgba(216,185,124,.65); cursor: default; }
.opt.sitting.done .sitting-name { color: var(--oxblood); }

.wizard-main {
  max-width: 680px; margin: 0 auto;
  padding: 3rem 1.5rem 7rem;
  min-height: 70vh;
}

.section-head .eyebrow { color: var(--oxblood); }
.section-head h2 {
  font-family: var(--serif); font-weight: 400; font-size: 2.2rem; margin: .5rem 0 .4rem;
}
.section-head .sub { color: var(--text-soft); font-style: italic; }

.q-card { margin-top: 2.8rem; }
.q-number {
  font-family: var(--serif); font-style: italic;
  color: var(--oxblood); font-size: .95rem; margin-bottom: .9rem;
}
.q-prompt {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  line-height: 1.25;
  margin-bottom: .7rem;
}
.q-helper { color: var(--text-soft); font-style: italic; margin-bottom: 1.6rem; }

.opt {
  display: block; width: 100%; text-align: left;
  font-family: var(--body); font-size: 1.12rem;
  padding: 1rem 1.2rem; margin-bottom: .6rem;
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--paper-line); border-radius: 2px;
  cursor: pointer; color: var(--text-on-paper);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.opt:hover { border-color: var(--oxblood); background: #fff; }
.opt.selected {
  border-color: var(--oxblood);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--oxblood);
}

.why-box { margin-top: 1.2rem; animation: fadeUp .5s ease both; }
.why-box label {
  display: block; font-style: italic; color: var(--oxblood);
  margin-bottom: .5rem; font-size: 1.05rem;
}
.why-hint { font-size: .85rem; color: var(--text-soft); margin-top: .4rem; }

.scale-row { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .7rem; }
.scale-dot {
  width: 49px; height: 49px; border-radius: 50%;
  border: 1px solid var(--paper-line); background: rgba(255,255,255,.5);
  font-family: var(--serif); font-size: 1.05rem; color: var(--text-on-paper);
  cursor: pointer; transition: all .15s ease;
}
.scale-dot:hover { border-color: var(--oxblood); }
.scale-dot.selected { background: var(--oxblood); color: var(--paper); border-color: var(--oxblood); }
.scale-ends { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-soft); font-style: italic; max-width: 560px; }

.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2.6rem; gap: 1rem;
}
.nav-back {
  background: none; border: none; cursor: pointer;
  font-family: var(--body); font-size: .95rem; font-style: italic;
  color: var(--text-soft);
}
.nav-back:hover { color: var(--oxblood); }
.skip-note { font-size: .82rem; color: var(--text-soft); font-style: italic; }

/* section interludes & insight moments */
.interlude { text-align: center; padding: 4rem 0; }
.interlude .eyebrow { color: var(--oxblood); }
.interlude h2 { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; margin: .8rem 0; }
.interlude p.sub { color: var(--text-soft); font-style: italic; max-width: 30em; margin: 0 auto 2.2rem; }

.insight-card {
  max-width: 520px; margin: 0 auto 2.4rem;
  padding: 2rem 2.2rem;
  background: var(--ink);
  color: var(--text-on-ink);
  text-align: left;
  position: relative;
}
.insight-card::before {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid rgba(216,185,124,.35); pointer-events: none;
}
.insight-card .eyebrow { color: var(--gold); display: block; margin-bottom: .9rem; }
.insight-card p {
  font-family: var(--serif); font-weight: 350; font-style: italic;
  font-size: 1.18rem; line-height: 1.55;
}
.insight-thinking { color: var(--text-soft); font-style: italic; padding: 2rem 0; }
.dots span { animation: blink 1.4s infinite both; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }

/* Being Seen — score progression */
.score-label { position: relative; display: inline-flex; align-items: center; gap: .5rem; }
.sl-name {
  font-family: var(--serif); font-style: italic; font-size: .88rem;
  color: var(--oxblood); white-space: nowrap;
}
.sl-meter {
  width: 64px; height: 3px; background: var(--paper-line);
  border-radius: 2px; overflow: hidden; display: inline-block;
}
.sl-meter i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--oxblood), var(--gold));
  transition: width .8s cubic-bezier(.22,1,.36,1);
}
.sl-next { font-size: .68rem; font-style: italic; color: var(--text-soft); white-space: nowrap; }
.score-float {
  position: absolute; right: 0; top: -2px;
  font-family: var(--serif); font-style: italic; font-size: .82rem; color: var(--gold);
  animation: scoreFloat 1.3s ease-out both; pointer-events: none;
}
@keyframes scoreFloat {
  from { opacity: 0; transform: translateY(4px); }
  25% { opacity: 1; }
  to { opacity: 0; transform: translateY(-14px); }
}
.score-label.level-up .sl-name {
  animation: levelGlow 1.7s ease both;
}
@keyframes levelGlow {
  0% { text-shadow: none; }
  30% { text-shadow: 0 0 14px rgba(216,185,124,.9); color: var(--gold); }
  100% { text-shadow: none; }
}
.desk-level { font-size: .78rem; font-style: italic; color: var(--text-on-ink-soft); }
.desk-level strong { color: var(--gold-bright); font-weight: 500; }
.score-level-name {
  font-family: var(--serif); font-size: 2rem; font-weight: 400;
  color: var(--text-on-ink); margin-top: .5rem;
}
.score-level-line { font-style: italic; color: var(--text-on-ink-soft); font-size: .95rem; margin-bottom: .3rem; }
.score-next-line { font-size: .9rem; font-style: italic; color: var(--gold-bright); margin-top: .5rem; }

/* talk instead of type */
.mic-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .55rem; padding: .45rem .9rem;
  background: none; border: 1px solid var(--paper-line); border-radius: 999px;
  font-family: var(--body); font-style: italic; font-size: .85rem;
  color: var(--text-soft); cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.mic-btn:hover { border-color: var(--oxblood); color: var(--oxblood); }
.mic-btn.listening {
  border-color: var(--oxblood); color: var(--oxblood);
  animation: micPulse 1.6s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,45,68,.25); }
  50% { box-shadow: 0 0 0 7px rgba(107,45,68,0); }
}

/* depth engine */
.score-label {
  font-family: var(--serif); font-style: italic; font-size: .85rem;
  color: var(--oxblood); white-space: nowrap;
}
.depth-panel { border-top: 1px solid var(--paper-line); padding-top: 1.1rem; }
.depth-reading { font-style: italic; color: var(--text-soft); }
.depth-ack {
  font-family: var(--serif); font-style: italic; font-size: 1.08rem;
  color: var(--oxblood); margin-bottom: .6rem;
}
.depth-q { display: block; font-size: 1.08rem; line-height: 1.45; margin-bottom: .6rem; }
.score-levers {
  margin-top: 1rem; padding-top: .9rem;
  border-top: 1px solid rgba(216,185,124,.25); text-align: left;
}
.levers-title { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.lever { font-size: .92rem; font-style: italic; color: var(--text-on-ink-soft); margin-bottom: .35rem; line-height: 1.45; }

/* skip recovery (finale) */
.skip-recovery {
  max-width: 420px; margin: 0 auto 2rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--paper-line); background: rgba(255,255,255,.45);
}
.skip-recovery p { font-size: .98rem; color: var(--text-soft); margin-bottom: 1rem; }
.skip-recovery .btn { padding: .75rem 1.4rem; font-size: .72rem; }
.skip-recovery { text-align: left; }
.skipped-q { font-size: 1rem; padding: .8rem 1rem; }
.skip-rec-note { font-size: .85rem !important; font-style: italic; margin-top: .8rem; margin-bottom: 0 !important; }
.skip-note em { font-style: italic; color: var(--oxblood); }

/* held moments (disclosure sensitivity) */
.held-moment { animation: heldIn 1.1s cubic-bezier(.22,1,.36,1) both; }
@keyframes heldIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.held-card { max-width: 460px; padding: 2.4rem 2.4rem 2.2rem; margin-bottom: 2rem; }
.held-head {
  font-family: var(--serif); font-weight: 400; font-style: normal;
  font-size: 1.45rem; line-height: 1.3; color: var(--text-on-ink);
  margin-bottom: .8rem;
}
.held-card p { font-size: 1.05rem; font-style: normal; font-family: var(--body); color: var(--text-on-ink-soft); line-height: 1.6; }

/* ── The Listener (manuscript desk) ───────────────────────── */

#desk {
  position: fixed; left: 1.2rem; bottom: 1.2rem; z-index: 50;
  width: 290px; padding: 1.1rem 1.25rem 1.2rem;
  background: var(--ink); color: var(--text-on-ink);
  box-shadow: 6px 8px 0 rgba(43,36,25,.12);
  animation: deskIn .7s cubic-bezier(.22,1,.36,1) both;
}
#desk::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(216,185,124,.3); pointer-events: none;
}
@keyframes deskIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.desk-title {
  font-size: .62rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .45rem;
}
.desk-stats { font-size: .82rem; color: var(--text-on-ink-soft); line-height: 1.45; }
.desk-stats strong { color: var(--text-on-ink); font-weight: 600; }

.desk-threads { margin-top: .55rem; min-height: 0; }
.desk-threads-label { font-size: .72rem; font-style: italic; color: var(--text-on-ink-soft); }
.thread-chip {
  display: inline-block; font-size: .72rem; font-style: italic;
  color: var(--gold-bright); border: 1px solid rgba(216,185,124,.4);
  padding: .08rem .5rem; border-radius: 999px; margin: .15rem .15rem 0 0;
}

.desk-note {
  font-family: var(--serif); font-style: italic; font-weight: 350;
  font-size: .95rem; line-height: 1.45; color: var(--gold-bright);
  margin-top: .7rem; min-height: 1.4em;
  border-top: 1px solid rgba(216,185,124,.25); padding-top: .6rem;
}
.desk-note.inking {
  animation: inkReveal 1.1s cubic-bezier(.3,.6,.3,1) both;
}
@keyframes inkReveal {
  from { clip-path: inset(0 100% 0 0); opacity: .6; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}

@media (max-width: 900px) {
  #desk {
    left: 0; right: 0; bottom: 0; width: auto;
    padding: .65rem 1rem .75rem;
    box-shadow: 0 -4px 14px rgba(43,36,25,.18);
  }
  #desk::before { display: none; }
  .desk-title, .desk-threads { display: none; }
  .desk-stats { font-size: .74rem; display: inline; margin-right: .8rem; }
  .desk-hallmarks { display: inline-flex; gap: .3rem; margin: 0 .6rem 0 0; vertical-align: middle; }
  .desk-hallmarks .hallmark { width: 20px; height: 20px; font-size: .68rem; }
  .desk-note { display: inline; border-top: none; padding-top: 0; margin-top: 0; font-size: .88rem; }
  .wizard-main { padding-bottom: 9rem; }
  .wizard-brand { display: none; }
}

/* uploads step */
.up-item {
  display: flex; justify-content: space-between; align-items: baseline;
  background: rgba(255,255,255,.55); border: 1px solid var(--paper-line);
  padding: .6rem .9rem; margin-bottom: .5rem; font-size: .98rem;
}
.up-item span { color: var(--text-soft); font-size: .85rem; font-style: italic; }

/* reflection score (wizard finale) */
.score-card {
  max-width: 420px; margin: 0 auto 2.2rem;
  padding: 1.8rem 2rem;
  background: var(--ink); color: var(--text-on-ink);
  position: relative; text-align: center;
}
.score-card::before {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid rgba(216,185,124,.35); pointer-events: none;
}
.score-num {
  font-family: var(--serif); font-weight: 380;
  font-size: 3.2rem; line-height: 1.1; color: var(--gold-bright); margin: .4rem 0 .5rem;
}
.score-num span { font-size: 1.2rem; color: var(--text-on-ink-soft); }
.score-card p { font-size: .98rem; font-style: italic; color: var(--text-on-ink-soft); line-height: 1.5; }

/* generation screen */
.gen-wrap { text-align: center; padding: 5rem 1rem; }
.gen-book {
  width: 74px; height: 104px; margin: 0 auto 2.2rem;
  background: var(--ink); position: relative;
  box-shadow: 8px 8px 0 rgba(43,36,25,.12);
  animation: bookPulse 2.6s ease-in-out infinite;
}
.gen-book::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(216,185,124,.5);
}
.gen-book::after {
  content: '❦'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); color: var(--gold); font-size: 1.2rem;
}
@keyframes bookPulse {
  0%,100% { transform: translateY(0); box-shadow: 8px 8px 0 rgba(43,36,25,.12); }
  50% { transform: translateY(-7px); box-shadow: 10px 14px 0 rgba(43,36,25,.08); }
}
.gen-stage { font-family: var(--serif); font-style: italic; font-size: 1.3rem; min-height: 2em; }
.gen-note { color: var(--text-soft); max-width: 26em; margin: 1rem auto 0; font-size: .95rem; }

/* ── BOOK (reading experience) ────────────────────────────── */

body.reading { background: var(--paper); }

.book-cover-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 10%, #221b33 0%, var(--ink) 60%),
    var(--ink);
  color: var(--text-on-ink); text-align: center; padding: 2rem;
}
.bc-inner { max-width: 560px; }
.bc-frame {
  border: 1px solid rgba(216,185,124,.45);
  padding: 4rem 2.6rem 3.4rem;
  position: relative;
}
.bc-frame::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(216,185,124,.2); pointer-events: none;
}
.bc-title {
  font-family: var(--serif); font-weight: 380;
  font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.1; margin: 1.2rem 0 .8rem;
}
.bc-sub { font-style: italic; color: var(--text-on-ink-soft); font-size: 1.1rem; }
.bc-dedication { margin-top: 2.6rem; color: var(--gold); font-style: italic; font-size: .95rem; }

.book-shell { max-width: 660px; margin: 0 auto; padding: 4rem 1.5rem 8rem; }

.book-toc { margin: 3rem 0 4rem; }
.book-toc h3 {
  font-family: var(--serif); font-weight: 420; font-size: 1.4rem; margin-bottom: 1.4rem;
}
.toc-item {
  display: flex; align-items: baseline; gap: .8rem;
  padding: .55rem 0; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--body); font-size: 1.05rem;
  color: var(--text-on-paper);
}
.toc-item:hover .toc-title { color: var(--oxblood); }
.toc-num { font-family: var(--serif); font-style: italic; color: var(--oxblood); min-width: 1.6em; }
.toc-dots { flex: 1; border-bottom: 1px dotted var(--paper-line); transform: translateY(-4px); }

.chapter { padding-top: 2rem; }
.chapter-head { text-align: center; margin: 4.5rem 0 3rem; }
.chapter-head .ch-no {
  font-family: var(--serif); font-style: italic; color: var(--oxblood); font-size: 1rem;
}
.chapter-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin-top: .6rem;
}
.chapter-head .rule {
  width: 70px; height: 1px; margin: 1.6rem auto 0;
  background: linear-gradient(90deg, transparent, var(--oxblood), transparent);
}

.prose { font-size: 1.18rem; line-height: 1.78; }
.prose p { margin-bottom: 1.35em; }
.prose p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 500;
  font-size: 3.4em; line-height: .8; float: left;
  padding: .08em .12em 0 0; color: var(--oxblood);
}
.prose em { font-style: italic; }
.prose hr, .prose .break {
  border: none; text-align: center; margin: 2.4em 0; color: var(--oxblood);
}
.prose hr::after, .prose .break::after { content: '❦'; font-size: 1rem; }

.book-actions {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: linear-gradient(rgba(247,242,232,0), var(--paper) 40%);
  padding: 1.6rem 1.5rem 1.3rem; text-align: center;
}
.book-actions .btn { margin: 0 .4rem; padding: .8rem 1.6rem; font-size: .72rem; }

/* ── Book apparatus ───────────────────────────────────────── */

.part-divider {
  background: var(--ink); color: var(--text-on-ink);
  text-align: center; padding: 6.5rem 2rem;
  margin: 5rem -1.5rem 4rem; position: relative;
}
.part-divider::before {
  content: ''; position: absolute; inset: 14px;
  border: 1px solid rgba(216,185,124,.3); pointer-events: none;
}
.part-divider .eyebrow { color: var(--gold); }
.part-divider h2 {
  font-family: var(--serif); font-weight: 380;
  font-size: clamp(2rem, 5vw, 2.9rem); margin: .9rem 0 .6rem;
}
.part-whisper { font-style: italic; color: var(--text-on-ink-soft); }

.epigraph { text-align: center; max-width: 28em; margin: 0 auto 2.6rem; }
.epigraph p {
  font-family: var(--serif); font-style: italic; font-weight: 360;
  font-size: 1.25rem; line-height: 1.5;
}
.epigraph span { display: block; margin-top: .5rem; font-size: .85rem; color: var(--text-soft); font-style: italic; }

.pull-page {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 1rem; margin: 3rem 0;
  border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line);
}
.pull-page p {
  font-family: var(--serif); font-style: italic; font-weight: 360;
  font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.4;
  max-width: 18em; color: var(--oxblood);
}

.notes-page { margin: 3.5rem 0; }
.notes-page .eyebrow { color: var(--oxblood); }
.notes-q {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 420;
  margin: .6rem 0 1.6rem; line-height: 1.35;
}
.ruled {
  height: 13rem;
  background: repeating-linear-gradient(transparent, transparent 2.1em, var(--paper-line) 2.15em);
}

.diagram {
  margin: 2.8rem 0; padding: 2rem 1.6rem;
  border: 1px solid var(--paper-line); background: rgba(255,255,255,0.35);
}
.diagram figcaption {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 430;
  text-align: center; margin-bottom: 1.4rem;
}
.dg-label {
  display: block; font-weight: 600; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--oxblood);
  margin-bottom: .15rem;
}
.dg-text { font-size: 1.02rem; line-height: 1.45; }

.dg-loop-stage {
  border: 1px solid var(--paper-line); background: #fff;
  padding: .8rem 1.1rem; max-width: 24em; margin: 0 auto;
}
.dg-arrow { text-align: center; color: var(--oxblood); margin: .2rem 0; }
.dg-loopback { text-align: center; font-style: italic; color: var(--text-soft); margin-top: 1rem; font-size: .92rem; }

.dg-tension { display: flex; align-items: stretch; gap: .9rem; }
.dg-pole { flex: 1; border: 1px solid var(--paper-line); background: #fff; padding: .9rem 1.1rem; }
.dg-rope {
  width: 2.4rem; flex: none;
  background: linear-gradient(90deg, transparent 45%, var(--oxblood) 45%, var(--oxblood) 55%, transparent 55%);
}
.dg-truth { text-align: center; font-style: italic; margin-top: 1.2rem; color: var(--text-on-paper); }

.dg-step {
  border: 1px solid var(--paper-line); background: #fff;
  padding: .8rem 1.1rem; margin-bottom: .55rem; max-width: 78%;
}
.dg-step.here { border-color: var(--oxblood); box-shadow: inset 3px 0 0 var(--oxblood); }
.dg-step em { color: var(--oxblood); font-size: .85rem; text-transform: none; letter-spacing: 0; }

.dg-twolists { display: flex; gap: 1rem; }
.dg-list { flex: 1; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--paper-line); }
.dg-list.keep { border-top: 3px solid var(--gold); }
.dg-list.release { border-top: 3px solid var(--oxblood); }
.dg-list ul { margin: .6rem 0 0 1.1rem; padding: 0; }
.dg-list li { margin-bottom: .4rem; font-size: 1rem; }

.dg-milestone { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .6rem; }
.dg-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--oxblood); flex: none; transform: translateY(-.1rem); }
.dg-path .dg-label { display: inline; min-width: 4.5em; }

.sign-page {
  margin: 4rem 0; padding: 3rem 2rem;
  border: 1px solid var(--paper-line); text-align: center;
}
.sign-page .eyebrow { color: var(--oxblood); }
.sign-page h3 { font-family: var(--serif); font-weight: 420; font-size: 1.7rem; margin: .5rem 0 .3rem; }
.sign-note { font-style: italic; color: var(--text-soft); margin-bottom: 2.4rem; }
.sign-line {
  border-bottom: 1px solid var(--text-on-paper);
  margin: 2.4rem 2rem 0; text-align: left;
  font-family: var(--serif); font-style: italic; color: var(--oxblood);
  padding-bottom: .2rem;
}
.sign-row { display: flex; gap: 2rem; margin: 3.4rem 2rem 0; }
.sign-field {
  flex: 1; border-top: 1px solid var(--text-on-paper); padding-top: .45rem;
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-soft);
  text-align: left;
}

.return-index { margin-top: 4rem; }
.return-note { text-align: center; font-style: italic; color: var(--text-soft); margin-bottom: 2rem; }
.return-row { display: flex; align-items: baseline; gap: .8rem; padding: .55rem 0; font-size: 1.05rem; }
.return-when { max-width: 75%; }
.return-ch { font-family: var(--serif); font-style: italic; color: var(--oxblood); white-space: nowrap; }

@media (max-width: 560px) {
  .dg-tension, .dg-twolists { flex-direction: column; }
  .dg-rope { width: auto; height: 2rem; background: linear-gradient(transparent 45%, var(--oxblood) 45%, var(--oxblood) 55%, transparent 55%); }
  .dg-step { max-width: 100%; margin-left: 0 !important; }
}

/* ── Print approval panel ─────────────────────────────────── */

.approve-panel {
  margin-top: 4.5rem; padding: 2.6rem 2.2rem;
  border: 1px solid var(--paper-line); background: rgba(255,255,255,0.4);
}
.approve-panel h3 {
  font-family: var(--serif); font-weight: 420; font-size: 1.7rem; margin: .4rem 0 .8rem;
}
.approve-note { color: var(--text-soft); line-height: 1.6; margin-bottom: 1.6rem; }
.approve-check {
  display: flex; gap: .8rem; align-items: flex-start;
  margin-bottom: 1rem; cursor: pointer; line-height: 1.5;
}
.approve-check input { margin-top: .35rem; accent-color: var(--oxblood); width: 1.05rem; height: 1.05rem; flex: none; }
.approve-panel input[type="text"] { margin: .6rem 0 .4rem; font-style: italic; }
.approve-panel .err { color: var(--oxblood); font-size: .9rem; min-height: 1.2em; }
.approve-done { text-align: center; padding: 1rem 0; }
.approve-record { font-family: var(--serif); font-size: 1.2rem; margin: .8rem 0 .4rem; }
.approve-done .approve-note { margin-bottom: 0; }

/* ── Extras (book page upgrades) ──────────────────────────── */

.extras { margin-top: 5rem; padding-top: 3.5rem; border-top: 1px solid var(--paper-line); }
.extras-head { text-align: center; margin-bottom: 2.4rem; }
.extras-head h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin-top: .5rem;
}
.extras-grid { display: grid; gap: 1.4rem; }
@media (min-width: 720px) { .extras-grid { grid-template-columns: repeat(3, 1fr); } }

.extra-card {
  border: 1px solid var(--paper-line);
  background: rgba(255,255,255,0.45);
  padding: 1.8rem 1.6rem;
  display: flex; flex-direction: column; gap: .9rem;
}
.extra-card.unlocked { border-color: var(--gold); }
.extra-card h4 {
  font-family: var(--serif); font-weight: 450; font-size: 1.25rem; line-height: 1.25;
}
.extra-desc { font-size: .98rem; color: var(--text-soft); line-height: 1.55; flex: 1; }
.extra-card .btn { width: 100%; text-align: center; padding: .85rem 1rem; font-size: .72rem; }
.extra-card input { font-size: .98rem; padding: .7rem .9rem; }
.extra-card .err { color: var(--oxblood); font-size: .85rem; min-height: 1.1em; margin: -0.3rem 0; }
.extra-status { font-style: italic; color: var(--text-soft); }
.extra-status.working { color: var(--oxblood); }
.extra-links { font-size: .92rem; }
.extra-links a { color: var(--oxblood); }
.extra-note { font-size: .85rem; font-style: italic; color: var(--text-soft); }
.extra-card audio { width: 100%; }
.topic-opt { font-size: 1rem; }

@media (max-width: 600px) {
  .scale-dot { width: 42px; height: 42px; }
  .cover-points { gap: 1.4rem; }
}

@media print {
  .book-actions, .wizard-top { display: none !important; }
  body { background: white; }
}
