/* One persistent progress band after the homepage. The intake dialog retains
   its own top-layer chapter header; both use flow-chapters.js for state. */
.main-chapter-header{display:block;position:relative;z-index:2;padding:12px 24px 0}
body:has(#ritual-screen:not([hidden])) .main-chapter-header{display:block;position:fixed;inset:0 0 auto;z-index:800;padding:12px 24px 14px;background:#171815f7;border-bottom:1px solid var(--line)}
.main-chapter-header .chapter-status{max-width:760px;margin:0 auto 8px;font-size:12px;line-height:18px}
.main-chapter-header .chapter-nav{max-width:760px;margin:0 auto}
.main-chapter-header .chapter-nav li{padding-bottom:10px}
body:has(#ritual-screen:not([hidden])) .topbar{display:none}
body:has(#ritual-screen:not([hidden])) main{padding-top:108px}
#ritual-screen,#reading{scroll-margin-top:108px}
body:has(#intake-dialog[open]) .main-chapter-header{visibility:hidden}
.payment-chapter-header{padding:0 0 14px;margin:0 0 20px;border-bottom:1px solid var(--line)}
.payment-chapter-header .chapter-status{margin:0 0 8px;font-size:11px}
.payment-chapter-header .chapter-nav{margin:0}
.payment-chapter-header .chapter-nav li{font-size:11px;gap:3px}
@media(min-width:761px){
  /* Completion already starts below the fixed progress band; do not reserve
     the old pre-band header gap again above multi-row spreads. */
  body.is-ritual:not(.is-reading) .full-deck-table.is-selection-complete .ritual-stage-header{padding-top:0}
  /* Desktop selection is already viewport-sized. Reserve its existing top
     clearance for the band instead of pushing fixed card controls offscreen. */
  body.is-ritual:not(.is-reading):has(#table:not(.is-locked):not(.is-revealed):is(:not(.is-selection-complete),[data-count="3"])) main{padding-top:0}
  body.is-ritual:not(.is-reading):has(#table:not(.is-locked):not(.is-revealed):is(:not(.is-selection-complete),[data-count="3"])) .ritual-stage-header .table-head{inset:0 30px auto!important}
  body.is-ritual:not(.is-reading):has(#table:not(.is-locked):not(.is-revealed):is(:not(.is-selection-complete),[data-count="3"])) .ritual-sidebar{top:30px}
  body.is-ritual:not(.is-reading):has(#table:not(.is-locked):not(.is-revealed):is(:not(.is-selection-complete),[data-count="3"])) .orbit-star{visibility:hidden}
}
@media(max-width:760px){
  body:has(#ritual-screen:not([hidden])) .main-chapter-header{padding:8px 16px 12px}
  .main-chapter-header .chapter-status{font-size:11px;line-height:16px;margin-bottom:5px}
  .main-chapter-header .chapter-nav li{font-size:11px;gap:3px}
  body:has(#ritual-screen:not([hidden])) main{padding-top:98px}
  #ritual-screen,#reading{scroll-margin-top:98px}
}

/* Revisitable journey controls */
.chapter-nav .chapter-link{display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;padding:0 2px;border:0;background:transparent;color:inherit;font:inherit;line-height:inherit;cursor:pointer}
.chapter-nav .chapter-link:disabled{cursor:not-allowed;opacity:.42}
.chapter-nav .chapter-link:focus-visible,.chapter-controls button:focus-visible{outline:2px solid var(--gold-light);outline-offset:3px}
.chapter-controls{display:flex;justify-content:space-between;gap:1rem;max-width:820px;margin:28px auto 18px}
.chapter-controls button{border:1px solid #c4a47766;border-radius:999px;background:#151718;color:var(--text);padding:.55rem 1rem;font:500 12px/1.3 var(--body);cursor:pointer}
.chapter-controls button:disabled{opacity:.38;cursor:not-allowed}
#intake-dialog.journey-review #intake-back{visibility:hidden}
@media(max-width:760px){.chapter-nav .chapter-link{gap:4px;padding-inline:0}.chapter-controls{margin:24px 0 14px}.chapter-controls button{padding:.45rem .75rem}}
.journey-review-panel{max-width:820px;min-height:36vh;margin:0 auto 2rem;padding:clamp(1.25rem,4vw,3rem);border:1px solid #c4a47755;border-radius:14px;background:linear-gradient(145deg,#191b1c,#111314);color:var(--text)}
.journey-review-panel[hidden]{display:none!important}
.journey-review-panel h1{margin:0 0 1.5rem;color:var(--gold-light);font:500 clamp(1.3rem,3vw,2rem)/1.25 var(--display)}
.journey-review-panel p{margin:.8rem 0;line-height:1.65;overflow-wrap:anywhere}
.journey-review-panel p strong{color:var(--gold-light);font-weight:600}
.journey-review-panel .journey-review-note{margin-top:2rem;color:#afa99d;font-size:.85rem}
.journey-review-panel .chapter-controls{margin:2rem 0 0}

#reading>.chapter-controls{width:100%;grid-column:1/-1;flex-basis:100%;margin:32px 0 16px;position:static}
