:root {
  --bg-deep:       #0a0805;
  --bg-card:       #13100a;
  --bg-card-hover: #1a1610;
  --bg-section:    #0f0c08;
  --gold:          #c9a84c;
  --gold-light:    #e8c97a;
  --gold-pale:     #f5e6b8;
  --parchment:     #f0e0c0;
  --parchment-dim: #c8b48a;
  --text-body:     #e8dcc8;
  --text-muted:    #9a8a6a;
  --text-dim:      #6a5a3a;
  --border:        rgba(201,168,76,0.15);
  --border-strong: rgba(201,168,76,0.35);
  --shadow:        rgba(0,0,0,0.7);
  --red-accent:    #8b3a3a;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-body);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── OPENING SCREEN ─────────────────────────────────────────────────── */
#opening {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 2rem;
  text-align: center;
  transition: opacity 1.2s ease;
}
#opening.hidden { display: none !important; }
#opening.fade-out { opacity: 0; pointer-events: none; }

.opening-publisher-logo {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}
.opening-tagline {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}
.opening-hosea {
  font-style: italic;
  font-size: 1rem;
  color: var(--parchment-dim);
  max-width: 520px;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}
.opening-hosea-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.2s forwards;
}
.opening-divider {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2.8rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.5s forwards;
}
.opening-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--gold-light);
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.8s forwards;
}
.opening-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeUp 1s ease 2s forwards;
}
.opening-author {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--parchment-dim);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease 2.2s forwards;
}
.opening-word {
  max-width: 540px;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 0;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease 2.5s forwards;
}
.opening-enter {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border-strong);
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeUp 1s ease 3s forwards;
}
.opening-actions { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.opening-encounter { border-color: var(--gold); background: rgba(201,168,76,0.10); letter-spacing: 0.22em; }
/* Phones and shorter screens: tighter gaps so the whole opening, both buttons
   included, fits on one screen; if it still can't, it scrolls instead of
   being cut off. */
#opening { overflow-y: auto; justify-content: safe center; }
@media (max-width: 600px), (max-height: 940px) {
  #opening { padding: 1.25rem 1rem; }
  .opening-tagline { margin-bottom: 1.4rem; }
  .opening-hosea-ref { margin-bottom: 1.6rem; }
  .opening-divider { margin-bottom: 1.4rem; }
  .opening-author { margin-bottom: 1.4rem; }
  .opening-word { margin-bottom: 1.6rem; }
  .opening-enter { padding: 0.85rem 1.6rem; }
}
.opening-enter:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
  color: var(--gold-light);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MAIN APP ────────────────────────────────────────────────────────── */
#app {
  display: block;
  min-height: 100vh;
}
#app.visible { display: block; }

/* ── HEADER ─────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(180deg, #0f0b06 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 1.5rem;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.2rem;
}
.header-logo {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.header-title-block { flex: 1; }
.header-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(0.9rem, 2.5vw, 1.25rem);
  color: var(--gold-light);
  line-height: 1.2;
}
.header-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-top: 0.15rem;
}
.header-count {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── PAYMENT ISSUE BANNER (past_due grace period) ─────────────────────── */
.payment-issue-banner {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.7rem 1.5rem;
  background: #2a1f0c;
  border-bottom: 1px solid var(--border-strong);
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: var(--gold-light);
}
.payment-issue-banner[hidden] { display: none; }
.payment-issue-text { flex: 1 1 18rem; line-height: 1.4; }
.payment-issue-action {
  background: var(--gold); color: var(--bg-deep); border: none;
  font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.45rem 0.9rem; cursor: pointer; white-space: nowrap;
}
.payment-issue-close {
  background: none; border: none; color: var(--gold-light);
  font-size: 0.9rem; cursor: pointer; padding: 0.2rem 0.4rem;
}
@media (max-width: 600px) {
  .payment-issue-banner { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

/* ── CONTROLS ───────────────────────────────────────────────────────── */
.controls {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  /* --header-h is the header's live height, kept in sync by
     syncHeaderHeight() -- it changes with screen width and font loading. */
  position: sticky; top: var(--header-h, 73px); z-index: 200;
}
.controls-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center;
}
.search-wrap {
  flex: 1; min-width: 200px; position: relative;
}
.search-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--parchment);
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--gold); }
.search-wrap input::placeholder { color: var(--text-dim); }
.search-icon {
  position: absolute; left: 0.7rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.85rem;
  pointer-events: none;
}
.filter-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--parchment-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--gold); }
.filter-select option { background: #1a1610; }
/* Filters: inline on wide screens (the wrapper adds no box of its own);
   on phones they fold behind the Filter button -- see the 600px block. */
.filter-panel { display: contents; }
.btn-filter {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-filter.active, .btn-filter[aria-expanded="true"] { background: rgba(201,168,76,0.12); }
.btn-filter:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-about, .btn-guide, .btn-unvisited, .btn-nameofday {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
font-weight: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-nameofday:hover, .btn-about:hover, .btn-guide:hover: .btn-unvisited:hover { background: rgba(201,168,76,0.07); }
.btn-about, .btn-guide, .btn-unvisited {
    font-weight: 700 !important;
}


/* ── RESULTS META ───────────────────────────────────────────────────── */
.results-meta {
  max-width: 1200px; margin: 0 auto;
  padding: 0.8rem 1.5rem 0;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ── ENTRY GRID ─────────────────────────────────────────────────────── */
.entry-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 1.2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

/* ── ENTRY CARD ─────────────────────────────────────────────────────── */
.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, background 0.25s;
  cursor: pointer;
}
.entry-card:hover {
  border-color: rgba(201,168,76,0.3);
  background: var(--bg-card-hover);
}
.entry-card.open {
  border-color: var(--border-strong);
  grid-column: 1 / -1;
  cursor: default;
}

.card-header {
  padding: 1.2rem 1.4rem 1rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.card-person-bar {
  width: 3px; border-radius: 2px; flex-shrink: 0;
  align-self: stretch; margin-top: 2px;
}
.person-Father  { background: var(--gold); }
.person-Son     { background: #7a9fc0; }
.person-HolySpirit { background: #7a9a7a; }

.card-header-text { flex: 1; }
.card-name {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}
.card-original {
  font-size: 1.15rem;
  color: var(--parchment-dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.card-translit {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem;
}
.tag {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag-book { border-color: rgba(201,168,76,0.2); color: var(--gold); }
.tag-person-Father     { color: var(--gold); border-color: rgba(201,168,76,0.3); }
.tag-person-Son        { color: #7a9fc0; border-color: rgba(122,159,192,0.3); }
.tag-person-HolySpirit { color: #7a9a7a; border-color: rgba(122,154,122,0.3); }
.bookmark-btn {
  background: none; border: none; color: var(--text-dim);
  font-size: 1rem; cursor: pointer; padding: 0.1rem;
  flex-shrink: 0; transition: color 0.2s;
}
.bookmark-btn:hover, .bookmark-btn.active { color: var(--gold); }

/* ── VERSE PREVIEW ──────────────────────────────────────────────────── */
.card-verse-preview {
  padding: 0 1.4rem 1.2rem 1.4rem;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}
.verse-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

/* ── EXPANDED ENTRY ─────────────────────────────────────────────────── */
.entry-expanded {
  display: none;
  border-top: 1px solid var(--border-strong);
}
.entry-card.open .entry-expanded { display: block; }
.entry-card.open .card-verse-preview { display: none; }

.expanded-inner {
  padding: 2rem 1.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}
@media (max-width: 600px) {
  /* ── HEADER ── */
  .header-subtitle { display: none; }
  .header-logo { width: 34px; height: 34px; }
  .guide-btn { font-size: 0.5rem; padding: 0.3rem 0.5rem; }

  /* ── CONTROLS ── */
  .controls { padding: 0.7rem 1rem 0; }
  .controls-inner { gap: 0.5rem; }
  /* Row 1: search + Filter button. Below it (when open): the filters, two per
     row, with Theme (the fifth) full width. */
  /* Basis leaves room for the Filter button only, so nothing else joins row 1. */
  .search-wrap { flex: 1 1 calc(100% - 7rem); width: auto; min-width: 0; order: -2; }
  #search { font-size: 0.9rem; }
  .btn-filter { display: inline-flex; align-items: center; order: -1; align-self: stretch; }
  .filter-panel {
    display: none; order: -1; flex-basis: 100%; width: 100%;
    grid-template-columns: 1fr 1fr; gap: 0.5rem;
  }
  .filter-panel.open { display: grid; }
  .filter-select { font-size: 0.6rem; padding: 0.55rem 0.6rem; width: 100%; min-width: 0; }
  #filter-theme { grid-column: 1 / -1; }
  .shared-theme-names { gap: 0.4rem; }
  .shared-name, .shared-theme-all { font-size: 0.85rem; padding: 0.4rem 0.6rem; }
  .btn-planner { font-size: 0.52rem; padding: 0.45rem 0.6rem; }
  .btn-nameofday { font-size: 0.52rem; padding: 0.45rem 0.7rem; }

  /* ── PROGRESS BAR ── */
  .progress-bar-wrap { gap: 0.5rem; padding: 0.3rem 0 0.4rem; flex-wrap: wrap; }
  .progress-text { font-size: 0.52rem; }
  .btn-unread-only { font-size: 0.5rem; padding: 0.3rem 0.5rem; }

  /* ── ENTRY GRID ── */
  .entry-grid { padding: 0.8rem 0.8rem 4rem; gap: 0.8rem; }
  .card-name { font-size: 1.1rem; }
  .card-original { font-size: 1.3rem; }

  /* ── EXPANDED ENTRY ── */
  .expanded-inner { padding: 1rem; gap: 1.2rem; }
  .section-label { font-size: 0.52rem; }
  .section-revelation, .section-encounter { font-size: 0.95rem; }
  .section-prayer { font-size: 0.95rem; }
  .orig-script { font-size: 1.6rem; }
  .verse-translation { font-size: 0.95rem; }
  .close-expanded { padding: 0.7rem 1rem; }
  .btn-print { font-size: 0.52rem; padding: 0.35rem 0.6rem; }
  .btn-close { font-size: 0.52rem; padding: 0.35rem 0.6rem; }
  .plan-complete-btn { font-size: 0.48rem; padding: 0.2rem 0.5rem; }

  /* ── CROSSREFS ── */
  .crossref-list { grid-template-columns: 1fr; }
  .crossref-ref { font-size: 0.55rem; }
  .crossref-name { font-size: 0.9rem; }
  .crossref-connection { font-size: 0.85rem; }

  /* ── MODALS ── */
  .modal-overlay { padding: 0.5rem; align-items: flex-end; }
  .modal-box { max-height: 92vh; border-radius: 0; }
  .modal-title { font-size: 0.62rem; }
  .modal-controls { gap: 0.5rem; }
  .modal-select { font-size: 0.55rem; padding: 0.4rem 0.5rem; }
  .btn-generate { font-size: 0.55rem; padding: 0.4rem 0.8rem; }
  .plan-day-num { font-size: 0.55rem; }
  .plan-day-date { font-size: 0.5rem; }
  .plan-entry-link { font-size: 0.85rem; }

  /* ── OPENING SCREEN ── */
  .opening-publisher-logo { width: 80px; height: 80px; }
  .opening-content { padding: 1.5rem 1rem; }

  /* ── FOOTER ── */
  .footer-inner { flex-direction: column; gap: 0.8rem; text-align: center; }
  .footer-text { font-size: 0.5rem; }
}

@media (max-width: 800px) {
  .expanded-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* The Word */
.the-word { grid-column: 1 / -1; }
.verse-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .verse-block { grid-template-columns: 1fr; }
}
.verse-translation {
  font-style: italic;
  font-size: 1rem;
  color: var(--parchment);
  line-height: 1.75;
}
.translation-label {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}
.orig-block {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.orig-script {
  font-size: 2rem;
  color: var(--gold-pale);
  letter-spacing: 0.05em;
  direction: rtl;
  display: block;
  margin-bottom: 0.4rem;
}
.orig-translit-big {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Revelation, Encounter, Prayer */
.section-revelation,
.section-encounter,
.section-prayer {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-body);
}
.section-prayer {
  font-style: italic;
  color: var(--parchment-dim);
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}

/* Cross-References */
.crossrefs { grid-column: 1 / -1; }
.crossref-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 0.7rem; }
.crossref-item {
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  transition: border-color 0.2s;
}
.crossref-item:hover { border-color: rgba(201,168,76,0.3); }
.crossref-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  display: block;
}
.crossref-name {
  font-size: 0.9rem;
  color: var(--parchment-dim);
  margin-bottom: 0.2rem;
  font-style: italic;
}
.crossref-connection { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* Names That Share This: each of the Name's themes, with a few other Names */
.shared-themes { grid-column: 1 / -1; }
.shared-themes-note { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-bottom: 0.8rem; }
.shared-theme { border-left: 2px solid var(--border); padding: 0.2rem 0 0.2rem 0.9rem; margin-bottom: 0.9rem; }
.shared-theme-name {
  font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
}
.shared-theme-desc { font-size: 0.9rem; color: var(--parchment-dim); margin: 0.15rem 0 0.5rem; line-height: 1.45; }
.shared-theme-names { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.shared-name, .shared-theme-all {
  background: transparent; border: 1px solid var(--border); color: var(--parchment);
  font-family: 'EB Garamond', serif; font-size: 0.9rem; text-align: left;
  padding: 0.35rem 0.7rem; cursor: pointer; min-height: 2.2rem;
  transition: border-color 0.2s, background 0.2s;
}
.shared-theme-all { border-color: rgba(201,168,76,0.5); color: var(--gold); font-style: italic; }
.shared-name:hover, .shared-theme-all:hover { border-color: var(--gold); background: rgba(201,168,76,0.06); }
.shared-name:focus-visible, .shared-theme-all:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Cross-reference jump styles */
.crossref-item.xref-linked {
  cursor: pointer;
  position: relative;
}
.crossref-item.xref-linked:hover {
  border-color: rgba(201,168,76,0.5);
  background: rgba(201,168,76,0.04);
}
.xref-jump-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 0.6rem;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.crossref-item.xref-linked:hover .xref-jump-label {
  opacity: 1;
}

/* Close button */
.close-expanded {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.4rem;
  border-top: 1px solid var(--border);
}
.btn-close {
  background: none; border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-close:hover { border-color: var(--gold); color: var(--gold); }

/* ── TESTAMENT DIVIDER ─────────────────────────────────────────────── */
.testament-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0 0.5rem;
  margin: 0.5rem 0;
}
.testament-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.testament-divider-text {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
}

/* ── EMPTY STATE ────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}
.empty-state p { font-style: italic; font-size: 1.05rem; }

/* ── FOOTER ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.footer-inner {
  max-width: 600px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.footer-logos { display: flex; align-items: center; gap: 1.5rem; }
.footer-logo-ks { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(201,168,76,0.3); background: transparent; }
.footer-logo-je { width: 52px; height: 78px; border: none; background: transparent; }
.footer-text {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  line-height: 1.8;
}

/* ── SCROLLBAR ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ── HIGHLIGHT ──────────────────────────────────────────────────────── */
mark { background: rgba(201,168,76,0.18); color: var(--gold-light); padding: 0 1px; }

/* ── PERSONAL RESPONSE ──────────────────────────────────────────────────── */
.response-section {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}
.response-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.response-label span { opacity: 0.5; font-size: 0.52rem; }
.response-textarea {
  width: 100%;
  min-height: 90px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-body);
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.7;
  padding: 0.8rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.response-textarea:focus { border-color: rgba(201,168,76,0.4); }
.response-textarea::placeholder { color: var(--text-dim); font-style: italic; }
.response-saved {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.4s;
  margin-top: 0.3rem;
  display: block;
  text-transform: uppercase;
}
.response-saved.show { opacity: 1; }

/* ── PROGRESS TRACKER ───────────────────────────────────────────────────── */
.progress-bar-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0.3rem 0 0.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.progress-bar-track {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.progress-text {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.progress-text strong { color: var(--gold); }
.read-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
  opacity: 0.7;
}
.btn-unread-only {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-unread-only:hover,
.btn-unread-only.active { border-color: var(--gold); color: var(--gold); }

/* ── PRINT BUTTON ───────────────────────────────────────────────────────── */
.btn-print {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-print:hover { border-color: var(--gold); color: var(--gold); }

/* ── READING PLANNER ────────────────────────────────────────────────────── */
.btn-planner {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-planner:hover { background: rgba(201,168,76,0.07); }
.planner-selects {
  display: flex; gap: 0.5rem; align-items: center;
}
/* ── DEVOTIONAL PLANNER ────────────────────────────────────────────────────── */
.btn-devotional {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
/*  ── ACCESSIBILITY UTILITIES 
──────────────────────────────────────────────────────  */
.btn-util {
    background: transparent;
    border: 1px solid var(--border-strong, #bfa353);
    color: var(--gold, #c9a84c);
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 0.75rem;
    margin-left: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}
.btn-util:hover {
    background: rgba(201, 168, 76, 0.15);
}

/* Daytime Parchment Theme Changes */
body.parchment-mode {
    background-color: #f4ebd0 !important; /* Rich cream parchment */
    color: #1c160c !important; /* Dark charcoal text */
}
body.parchment-mode .entry-card, 
body.parchment-mode .modal-box,
body.parchment-mode #journey-overlay,
body.parchment-mode #devotional-modal .modal-box {
    background-color: #faf4e5 !important;
    color: #1c160c !important;
    border-color: #bfa353 !important;
}
body.parchment-mode h2,
body.parchment-mode h3,
body.parchment-mode h4,
body.parchment-mode p, 
body.parchment-mode .body-text,
body.parchment-mode .encounter-text,
body.parchment-mode .modal-body p, 
body.parchment-mode .entry-card *,
body.parchment-mode #journey-overlay * {
    color: #1c160c !important; /* Crisp readability for deep body text */
}
/* Universal override to force the entire top navigation section to remain gold */
/* Universal override to force the entire top navigation section to remain gold */
body.parchment-mode #journey-overlay > div:first-child,
body.parchment-mode #journey-overlay > div:first-child *,
body.parchment-mode #journey-overlay .journey-header *,
body.parchment-mode #journey-overlay button,
body.parchment-mode #journey-overlay span {
    color: #c9a84c !important;
    border-color: #c9a84c !important;
    stroke: #c9a84c !important;
    fill: #c9a84c !important;
}

/* ── DEVPLANS OVERLAY — PARCHMENT MODE ───────────────────────────────────── */
body.parchment-mode #devplans-overlay {
    background-color: #f4ebd0 !important;
    color: #1c160c !important;
}
body.parchment-mode .devplans-header {
    background-color: #ece0c4 !important;
    border-bottom-color: #bfa353 !important;
}
body.parchment-mode .devplans-body {
    background-color: #f4ebd0 !important;
}
body.parchment-mode .devplan-card {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
    color: #1c160c !important;
}
body.parchment-mode .devplan-card:hover {
    background-color: #f0e8d0 !important;
}
body.parchment-mode .devplan-card-title,
body.parchment-mode .devplan-opening-title,
body.parchment-mode .devplan-day-title {
    color: #2a1a06 !important;
}
body.parchment-mode .devplan-card-names,
body.parchment-mode .devplan-card-subtitle,
body.parchment-mode .devplan-opening-subtitle,
body.parchment-mode .devplan-opening-content,
body.parchment-mode .devplan-day-commentary,
body.parchment-mode .devplan-day-focus,
body.parchment-mode .devplan-day-scripture,
body.parchment-mode .devplan-day-prompt-text,
body.parchment-mode .devplan-journal-invite {
    color: #3a2a10 !important;
}
body.parchment-mode .devplan-day-scripture-box {
    background-color: rgba(191,163,83,0.12) !important;
    border-left-color: #bfa353 !important;
}
body.parchment-mode .devplan-day-prompt-box {
    background-color: rgba(191,163,83,0.08) !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .devplan-journal-textarea {
    background-color: rgba(255,255,255,0.5) !important;
    color: #1c160c !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .devplan-journal-textarea::placeholder {
    color: #8a7a5a !important;
}
body.parchment-mode .devplan-day-btn {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
    color: #3a2a10 !important;
}
body.parchment-mode .devplan-day-btn:hover {
    background-color: #f0e8d0 !important;
}
body.parchment-mode .devplan-day-btn.done {
    background-color: rgba(191,163,83,0.2) !important;
}
/* Keep header nav elements gold in parchment mode */
body.parchment-mode .devplans-header *,
body.parchment-mode .devplans-back,
body.parchment-mode .devplans-close-btn,
body.parchment-mode .devplans-header-title,
body.parchment-mode .devplan-card-duration,
body.parchment-mode .devplan-opening-label,
body.parchment-mode .devplan-opening-names,
body.parchment-mode .devplan-day-name-anchor,
body.parchment-mode .devplan-day-focus-label,
body.parchment-mode .devplan-day-prompt-label,
body.parchment-mode .devplan-journal-label,
body.parchment-mode .devplan-journal-saved,
body.parchment-mode #dp-theme-btn {
    color: #8a6a1a !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .devplan-begin-btn,
body.parchment-mode .devplan-day-nav-btn,
body.parchment-mode .devplan-mark-btn {
    color: #6a4a10 !important;
    border-color: #bfa353 !important;
    background: transparent !important;
}
body.parchment-mode .devplan-begin-btn:hover,
body.parchment-mode .devplan-day-nav-btn:hover,
body.parchment-mode .devplan-mark-btn:hover {
    background-color: rgba(191,163,83,0.15) !important;
}
body.parchment-mode .devplan-mark-btn.done {
    color: #5a3a08 !important;
    background-color: rgba(191,163,83,0.15) !important;
}

/* ── EXPLORE CONNECTIONS OVERLAY — PARCHMENT MODE ────────────────────────── */
body.parchment-mode .constellation-overlay {
    background-color: #f4ebd0 !important;
}
body.parchment-mode .constellation-header {
    background-color: #f4ebd0 !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .constellation-back,
body.parchment-mode .constellation-close,
body.parchment-mode .constellation-header-title {
    color: #8a6a1a !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .constellation-node circle {
    fill: #faf4e5 !important;
}
body.parchment-mode .constellation-node text {
    fill: #1c160c !important;
}
body.parchment-mode .constellation-node-center text {
    fill: #8a6a1a !important;
}
body.parchment-mode .constellation-detail {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .constellation-detail-name {
    color: #8a6a1a !important;
}
body.parchment-mode .constellation-detail-connection {
    color: #1c160c !important;
}
body.parchment-mode .constellation-detail-btn {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
    color: #3a2a10 !important;
}
body.parchment-mode .constellation-detail-btn:hover {
    background-color: #f0e8d0 !important;
}

/* ── CONFIRM DIALOG / TOAST — PARCHMENT MODE ─────────────────────────────── */
body.parchment-mode .confirm-box {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .confirm-title {
    color: #8a6a1a !important;
}
body.parchment-mode .confirm-message {
    color: #1c160c !important;
}
body.parchment-mode .confirm-btn {
    color: #6b5a3a !important;
    border-color: #bfa353 !important;
}
body.parchment-mode .confirm-btn:hover {
    color: #8a6a1a !important;
    border-color: #8a6a1a !important;
}
body.parchment-mode .confirm-btn.primary {
    background-color: #bfa353 !important;
    color: #f4ebd0 !important;
}
body.parchment-mode .app-toast {
    background-color: #faf4e5 !important;
    border-color: #bfa353 !important;
    border-left-color: #8a6a1a !important;
}
body.parchment-mode .app-toast-error {
    border-left-color: #8b3a3a !important;
}
body.parchment-mode .app-toast-message {
    color: #1c160c !important;
}
body.parchment-mode .app-toast-close {
    color: #6b5a3a !important;
}
body.parchment-mode .app-toast-close:hover {
    color: #8a6a1a !important;
}


/* ── PLANNER MODAL ──────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 8000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  max-width: 680px; width: 100%;
  max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-transform: uppercase;
}
.modal-close {
  background: none; border: none;
  color: var(--text-dim); font-size: 1.1rem;
  cursor: pointer; padding: 0;
}
.modal-close:hover { color: var(--gold); }

/* ── CONFIRM DIALOG (replaces native confirm()) ──────────────────────────── */
.confirm-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.confirm-overlay.open { display: flex; }
.confirm-overlay.open.show { opacity: 1; }
.confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  max-width: 420px; width: 100%;
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex; flex-direction: column; gap: 1rem;
  transform: scale(0.96) translateY(6px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.confirm-overlay.show .confirm-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.confirm-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  text-transform: uppercase;
}
.confirm-message {
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-body);
  white-space: pre-line;
}
.confirm-actions {
  display: flex; justify-content: flex-end; gap: 0.7rem;
  margin-top: 0.4rem;
}
.confirm-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
}
.confirm-btn:hover { border-color: var(--gold); color: var(--gold); }
.confirm-btn.primary {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}
.confirm-btn.primary:hover { background: var(--gold-light); border-color: var(--gold-light); }

/* ── TOAST NOTIFICATIONS (replaces native alert()) ───────────────────────── */
.app-toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9600;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 420px;
  padding: 0 1rem;
  pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 24px var(--shadow);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.app-toast.hide { opacity: 0; transform: translateY(-6px) scale(0.98); }
.app-toast-error { border-left-color: var(--red-accent); }
.app-toast-message {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-body);
  flex: 1;
  white-space: pre-line;
}
.app-toast-close {
  background: none; border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.1rem;
}
.app-toast-close:hover { color: var(--gold); }

.modal-body {
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem;
  flex: 1;
}
.modal-controls {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center;
}
.modal-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--parchment-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  outline: none; cursor: pointer;
}
.modal-select:focus { border-color: var(--gold); }
.modal-select option { background: #1a1610; }
.btn-generate {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-generate:hover { background: rgba(201,168,76,0.08); }
.plan-day {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}
.plan-day-header {
  background: rgba(201,168,76,0.05);
  padding: 0.5rem 0.9rem;
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.plan-day-num {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-day-date {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.plan-day.today .plan-day-header { background: rgba(201,168,76,0.12); }
.plan-day.today .plan-day-num { color: var(--gold-light); }
.plan-day-entries {
  padding: 0.5rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.plan-entry-link {
  font-size: 0.9rem;
  color: var(--parchment-dim);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.1rem 0;
  font-style: italic;
}
.plan-entry-link:hover { color: var(--gold-light); }
.plan-today-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
}

/* ── PRINT STYLES ───────────────────────────────────────────────────────── */
/* ── PLAN COMPLETION MARK ───────────────────────────────────────────────── */
.plan-complete-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-complete-btn:hover { border-color: var(--gold); color: var(--gold); }
.plan-complete-btn.done {
  border-color: rgba(201,168,76,0.5);
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}
.plan-entry-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.plan-day.plan-completed .plan-day-header {
  background: rgba(201,168,76,0.06);
}
.plan-progress-summary {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 0.6rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.plan-progress-bar-track {
  flex: 1; height: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
}
.plan-progress-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── CONTINUE THE JOURNEY BUTTON ───────────────────────────────────────── */
.journey-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 1.2rem 0 0.5rem;
}
.btn-journey {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}
.btn-journey-icon {
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.7;
  transition: all 0.3s ease;
  animation: pulse-door 3s ease-in-out infinite;
}
.btn-journey-text {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0.7;
  transition: all 0.3s ease;
}
.btn-journey-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  opacity: 0.6;
  transition: all 0.3s ease;
}
.btn-journey:hover .btn-journey-icon,
.btn-journey:hover .btn-journey-text,
.btn-journey:hover .btn-journey-sub {
  opacity: 1;
}
.btn-journey:hover .btn-journey-icon {
  transform: translateY(-3px);
}
@keyframes pulse-door {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ── FIRST APPEARANCE SECTION ───────────────────────────────────────────── */
.mansion-section {
  display: none;
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}
.mansion-section.open { display: block; }
.first-appearance {
  border: 1px solid rgba(201,168,76,0.2);
  background: rgba(201,168,76,0.03);
  padding: 1.4rem 1.6rem;
  position: relative;
  overflow: hidden;
}
.first-appearance::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.fa-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.fa-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201,168,76,0.3), transparent);
}
.fa-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.fa-context-label {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin: 0.8rem 0 0.3rem;
}
.fa-context {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--parchment-dim);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 0.3rem;
}
.fa-significance {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.75;
}

/* ── THEOLOGY DEPTH TOGGLE ──────────────────────────────────────────────── */
.theology-depth-section {
  border-top: 1px solid rgba(201,168,76,0.15);
  margin-top: 1.4rem;
  padding-top: 1.2rem;
}
.theology-depth-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.theology-depth-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201,168,76,0.3), transparent);
}
.theology-toggle-btns {
  display: flex;
  gap: 0;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 3px;
  overflow: hidden;
  width: fit-content;
}
.btn-theology {
  font-family: 'Cinzel', serif;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text-dim);
}
.btn-theology.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}
.btn-theology:hover:not(.active) {
  background: rgba(201,168,76,0.06);
  color: var(--parchment-dim);
}
.theology-simple, .theology-deep { display: none; }
.theology-simple.visible, .theology-deep.visible { display: block; }

.theology-simple-text {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.8;
}
.td-subsection {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(201,168,76,0.08);
}
.td-subsection:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.td-sub-label {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.td-sub-text .td-orig {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 0.85em;
}
.td-sub-text {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.78;
}

/* ── IDENTITY REFLECTION SECTION ───────────────────────────────────────── */
.identity-reflection {
  border-top: 1px solid rgba(201,168,76,0.15);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}
.ir-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ir-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201,168,76,0.3), transparent);
}
.ir-anchor {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  line-height: 1.75;
  margin-bottom: 0.9rem;
  font-style: italic;
}
.ir-depth {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 0.9rem;
}
.ir-prompt {
  font-family: 'EB Garamond', serif;
  font-size: 0.97rem;
  color: var(--parchment-dim);
  line-height: 1.7;
  font-style: italic;
  padding: 0.7rem 1rem;
  border-left: 2px solid rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.04);
}

/* ── GUIDE BUTTON ───────────────────────────────────────────────────────── */
.guide-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.guide-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Phone/tablet header: logo + title on the first row, buttons spread across
   a second row. Kept here, after .guide-btn, because the mobile rule in the
   main @media block above loses to this later desktop rule and never
   applied -- the header buttons were pushing phones to ~500px wide. The
   four buttons only fit beside the title above ~1180px. */
@media (max-width: 1180px) {
  .site-header { padding: 0.7rem 1rem; }
  .header-inner { flex-wrap: wrap; gap: 0.55rem 0.4rem; }
  .header-logo { width: 34px; height: 34px; }
  .header-subtitle { display: none; }
  .header-title-block { flex: 1 1 calc(100% - 68px - 0.8rem); min-width: 0; }
  .header-count { display: none; }
  .guide-btn { flex: 1 1 auto; font-size: 0.5rem; letter-spacing: 0.08em; padding: 0.4rem 0.3rem; }
}
@media (min-width: 601px) and (max-width: 1180px) {
  .guide-btn { font-size: 0.6rem; }
}

/* ── GUIDE MODAL ────────────────────────────────────────────────────────── */
.guide-section {
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}
.guide-section:last-child { border-bottom: none; margin-bottom: 0; }
.guide-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.guide-body {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--parchment-dim);
  line-height: 1.75;
}
.guide-body p { margin-bottom: 0.7rem; }
.guide-body p:last-child { margin-bottom: 0; }
.guide-tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  margin: 0 0.2rem;
  vertical-align: middle;
}
.guide-feature-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.guide-feature-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 120px;
}
.guide-note {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-style: normal;
  text-transform: uppercase;
}

/* Print handled via popup window — no @media print needed on main page */
#print-target { display: none; }


/* ── Journey Overlay Page ───────────────────────────────── */
.journey-overlay {
  position: fixed;
  inset: 0;
  background: #0a0805;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.journey-overlay.open {
  transform: translateX(0);
}
.journey-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  background: rgba(10,8,5,0.97);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.journey-back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid rgba(201,168,76,0.3);
  color: #c9a84c;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.journey-back-btn:hover {
  background: rgba(201,168,76,0.1);
  border-color: #c9a84c;
}
.journey-back-arrow { font-size: 1rem; line-height: 1; }
.journey-overlay-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.85rem;
  color: #e8c97a;
  letter-spacing: 0.1em;
  text-align: center;
  flex: 1;
}
.journey-overlay-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1.5rem 4rem;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .journey-overlay-body { padding: 1.2rem 1rem 3rem; }
  .journey-overlay-title { font-size: 0.7rem; }
}

/* ── EXPLORE CONNECTIONS OVERLAY ─────────────────────────────────────────── */
.constellation-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.constellation-overlay.open { transform: translateX(0); }
.constellation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,8,5,0.97);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.constellation-back, .constellation-close {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.constellation-back:hover, .constellation-close:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
}
.constellation-header-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.8rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  text-align: center;
  flex: 1;
}
.constellation-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.constellation-svg-wrap { width: 100%; max-width: 720px; }
.constellation-node-center circle {
  fill: rgba(201,168,76,0.16);
  stroke: var(--gold);
  stroke-width: 2;
}
.constellation-node-center text {
  fill: var(--gold-light);
  font-family: 'Cinzel Decorative', serif;
  text-anchor: middle;
  dominant-baseline: middle;
}
.constellation-node {
  cursor: pointer;
}
.constellation-node circle {
  fill: var(--bg-card);
  stroke: var(--border-strong);
  stroke-width: 1.5;
  transition: stroke 0.2s, fill 0.2s;
}
.constellation-node.person-Father circle { stroke: rgba(201,168,76,0.55); }
.constellation-node.person-Son circle { stroke: rgba(122,159,192,0.65); }
.constellation-node.person-HolySpirit circle { stroke: rgba(122,154,122,0.65); }
/* A cross-reference that is a Scripture passage, not one of the Names. */
.constellation-node.passage-only circle { stroke: var(--border-strong); stroke-dasharray: 4 3; }
.constellation-node.passage-only text { font-style: italic; }
.constellation-detail-actions[hidden] { display: none; }
.constellation-node:hover circle {
  stroke: var(--gold);
  fill: rgba(201,168,76,0.1);
}
.constellation-node text {
  fill: var(--text-body);
  font-family: 'EB Garamond', serif;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.constellation-line {
  stroke: var(--border-strong);
  stroke-width: 1;
}
.constellation-empty {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  padding: 3rem 1rem;
}
.constellation-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.constellation-legend span { display: flex; align-items: center; gap: 0.4rem; }
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid;
}
.legend-dot.person-Father { border-color: var(--gold); }
.legend-dot.person-Son { border-color: #7a9fc0; }
.legend-dot.person-HolySpirit { border-color: #7a9a7a; }
.legend-dot.passage-only { border-color: var(--border-strong); border-style: dashed; }
.constellation-detail {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 1.2rem 1.4rem;
  flex-direction: column;
  gap: 0.8rem;
  animation: constellationFadeIn 0.25s ease-out;
}
@keyframes constellationFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.constellation-detail-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}
.constellation-detail-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: -0.4rem;
}
.constellation-detail-connection {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--parchment-dim);
  line-height: 1.6;
}
.constellation-detail-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.constellation-detail-btn {
  flex: 1;
  min-width: 160px;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.constellation-detail-btn:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}
.constellation-detail-btn.primary {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}
.constellation-detail-btn.primary:hover {
  background: var(--gold-light);
}
@media (max-width: 600px) {
  .constellation-header-title { font-size: 0.65rem; }
  .constellation-legend { gap: 1rem; }
}
/* TD original language highlight */
.td-orig-term {
  color: #e8c97a;
  font-style: italic;
}

/* ── DEVOTIONAL PLANS FULL OVERLAY ───────────────────────────────────────── */
.devplans-overlay {
  position: fixed; inset: 0; background: #0a0805;
  z-index: 2100; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.devplans-overlay.open { transform: translateX(0); }
.devplans-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  background: rgba(10,8,5,0.97); flex-shrink: 0;
}
.devplans-back {
  display: flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid rgba(201,168,76,0.3);
  color: #c9a84c; font-family: 'Cinzel', serif;
  font-size: 0.7rem; letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem; cursor: pointer;
  transition: all 0.2s; text-transform: uppercase;
}
.devplans-back:hover { background: rgba(201,168,76,0.1); border-color: #c9a84c; }
.devplans-close-btn {
  background: none; border: 1px solid rgba(201,168,76,0.3);
  color: #c9a84c; font-size: 0.9rem;
  width: 36px; height: 36px; display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.devplans-close-btn:hover { background: rgba(201,168,76,0.1); border-color: #c9a84c; }
.devplans-header-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.8rem; color: #e8c97a;
  letter-spacing: 0.1em; text-align: center; flex: 1;
}
.devplans-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2rem 1.5rem 4rem;
  max-width: 860px; margin: 0 auto; width: 100%; box-sizing: border-box;
}
.devplans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem; margin-top: 1.5rem;
}
.devplan-card {
  background: #13100a; border: 1px solid rgba(201,168,76,0.15);
  padding: 1.4rem 1.5rem; cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.devplan-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, #c9a84c, transparent);
}
.devplan-card:hover { border-color: rgba(201,168,76,0.4); background: #1a1610; }
.devplan-card-duration {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 0.5rem;
}
.devplan-card-title {
  font-family: 'Cinzel', serif; font-size: 0.95rem;
  color: #e8c97a; margin-bottom: 0.5rem; line-height: 1.3;
}
.devplan-card-names {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 0.85rem; color: #9a8a6a; margin-bottom: 0.8rem; line-height: 1.4;
}
.devplan-card-subtitle {
  font-family: 'EB Garamond', serif; font-size: 0.82rem; color: #6a5a3a; line-height: 1.5;
}
.devplan-opening { max-width: 680px; margin: 0 auto; padding: 2rem 0 3rem; }
.devplan-opening-label {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 1rem;
}
.devplan-opening-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5rem; color: #e8c97a; margin-bottom: 0.5rem; line-height: 1.3;
}
.devplan-opening-subtitle {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 1rem; color: #9a8a6a; margin-bottom: 2rem;
}
.devplan-opening-names {
  font-family: 'Cinzel', serif; font-size: 0.65rem;
  letter-spacing: 0.2em; color: #c9a84c; text-transform: uppercase; margin-bottom: 2rem;
}
.devplan-opening-content {
  font-family: 'EB Garamond', serif; font-size: 1.05rem;
  line-height: 1.9; color: #e8dcc8; white-space: pre-line;
}
.devplan-begin-btn {
  display: block; margin: 2.5rem auto 0;
  background: none; border: 1px solid #c9a84c;
  color: #c9a84c; font-family: 'Cinzel', serif;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.8rem 2.5rem; cursor: pointer; transition: all 0.2s;
}
.devplan-begin-btn:hover { background: rgba(201,168,76,0.1); }
.devplan-day-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.5rem; margin-top: 1.5rem;
}
.devplan-day-btn {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: #13100a; border: 1px solid rgba(201,168,76,0.15);
  color: #9a8a6a; font-family: 'Cinzel', serif; font-size: 0.65rem;
  cursor: pointer; transition: all 0.2s;
}
.devplan-day-btn:hover { border-color: #c9a84c; color: #e8c97a; }
.devplan-day-btn.done { border-color: rgba(201,168,76,0.5); color: #c9a84c; background: rgba(201,168,76,0.06); }
.devplan-day-view { max-width: 680px; margin: 0 auto; padding: 2rem 0 4rem; }
.devplan-day-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem;
}
.devplan-day-nav-btn {
  background: none; border: 1px solid rgba(201,168,76,0.3);
  color: #c9a84c; font-family: 'Cinzel', serif; font-size: 0.6rem;
  letter-spacing: 0.1em; padding: 0.4rem 0.8rem; cursor: pointer;
  transition: all 0.2s; text-transform: uppercase;
}
.devplan-day-nav-btn:hover { border-color: #c9a84c; background: rgba(201,168,76,0.08); }
.devplan-day-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.devplan-day-counter {
  font-family: 'Cinzel', serif; font-size: 0.6rem;
  letter-spacing: 0.2em; color: #9a8a6a; text-transform: uppercase;
}
.devplan-day-name-anchor {
  font-family: 'Cinzel', serif; font-size: 0.55rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 0.6rem;
}
.devplan-day-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem; color: #e8c97a; margin-bottom: 1.5rem; line-height: 1.3;
}
.devplan-day-scripture-box {
  border-left: 3px solid #c9a84c; padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem; background: rgba(201,168,76,0.04);
}
.devplan-day-scripture {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 1rem; color: #e8dcc8; line-height: 1.7;
}
.devplan-day-focus-label {
  font-family: 'Cinzel', serif; font-size: 0.5rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 0.4rem;
}
.devplan-day-focus {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 0.9rem; color: #9a8a6a; margin-bottom: 1.8rem; line-height: 1.6;
}
.devplan-day-commentary {
  font-family: 'EB Garamond', serif; font-size: 1.05rem;
  line-height: 1.9; color: #e8dcc8; white-space: pre-line; margin-bottom: 2rem;
}
.devplan-day-prompt-box {
  border: 1px solid rgba(201,168,76,0.2); padding: 1.2rem 1.4rem;
  margin-bottom: 1.8rem; background: rgba(201,168,76,0.03);
}
.devplan-day-prompt-label {
  font-family: 'Cinzel', serif; font-size: 0.5rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 0.6rem;
}
.devplan-day-prompt-text {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 0.95rem; color: #c8b48a; line-height: 1.7;
}
.devplan-journal-section { margin-top: 0.5rem; }
.devplan-journal-label {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  letter-spacing: 0.25em; color: #c9a84c; text-transform: uppercase; margin-bottom: 0.6rem;
}
.devplan-journal-invite {
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 0.88rem; color: #6a5a3a; margin-bottom: 0.7rem; line-height: 1.5;
}
.devplan-journal-textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(201,168,76,0.15);
  color: #e8dcc8; font-family: 'EB Garamond', serif; font-size: 1rem;
  line-height: 1.8; padding: 1rem 1.1rem; resize: none;
  min-height: 120px; overflow: hidden; transition: border-color 0.2s;
}
.devplan-journal-textarea:focus { outline: none; border-color: rgba(201,168,76,0.4); }
.devplan-journal-textarea::placeholder { color: #4a3a2a; font-style: italic; }
.devplan-journal-saved {
  font-family: 'Cinzel', serif; font-size: 0.45rem; letter-spacing: 0.2em;
  color: #4a3a2a; text-transform: uppercase; margin-top: 0.4rem;
  text-align: right; transition: color 0.5s;
}
.devplan-journal-saved.flash { color: #c9a84c; }
.devplan-mark-btn {
  display: block; margin: 2rem auto 0;
  background: none; border: 1px solid rgba(201,168,76,0.3);
  color: #9a8a6a; font-family: 'Cinzel', serif; font-size: 0.6rem;
  letter-spacing: 0.15em; text-transform: uppercase; padding: 0.6rem 1.5rem;
  cursor: pointer; transition: all 0.2s;
}
.devplan-mark-btn:hover { border-color: #c9a84c; color: #c9a84c; }
.devplan-mark-btn.done { color: #c9a84c; border-color: #c9a84c; background: rgba(201,168,76,0.06); }

/* ── ENCOUNTER (js/encounter.js) ──────────────────────────────────────────
   One Name in five moments, full screen, one moment at a time. Phone first:
   a header (close, moment name, progress dots), a scrolling body, and Back /
   Next at the thumb. The Parchment theme overrides the colours below. */
.encounter-overlay {
  --enc-bg: #0a0805; --enc-ink: var(--parchment); --enc-dim: var(--parchment-dim);
  --enc-muted: var(--text-muted); --enc-gold: var(--gold); --enc-rule: rgba(201,168,76,0.22);
  position: fixed; inset: 0; z-index: 2200; background: var(--enc-bg); color: var(--enc-ink);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.encounter-overlay.open { opacity: 1; visibility: visible; }
body.parchment-mode .encounter-overlay {
  --enc-bg: #f4ebd0; --enc-ink: #1c160c; --enc-dim: #4a3c22; --enc-muted: #6b5a38; --enc-gold: #8a6a1c; --enc-rule: rgba(138,106,28,0.3);
}
.encounter-header {
  display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: center; gap: .5rem;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) .75rem max(1rem, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--enc-rule);
}
.encounter-close {
  width: 2.75rem; height: 2.75rem; background: none; border: 1px solid var(--enc-rule); border-radius: 50%;
  color: var(--enc-dim); font-size: 1rem; cursor: pointer;
}
.encounter-step-name {
  font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--enc-gold); text-align: center;
}
.encounter-dots { display: flex; gap: .35rem; }
.encounter-dots i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--enc-rule); display: block; }
.encounter-dots i.on { background: var(--enc-gold); }
.encounter-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 1.6rem max(1.25rem, env(safe-area-inset-right, 0px)) 2rem max(1.25rem, env(safe-area-inset-left, 0px));
}
.enc-step { max-width: 34rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.enc-loading { text-align: center; font-style: italic; color: var(--enc-muted); padding: 3rem 0; }
.enc-label { font-family: 'Cinzel', serif; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--enc-gold); }
.enc-label-src { color: var(--enc-muted); }
.enc-threshold { display: flex; flex-direction: column; gap: .6rem; min-height: 55vh; justify-content: center; }
.enc-name { font-family: 'Cinzel', serif; font-weight: 600; font-size: 1.9rem; line-height: 1.2; color: var(--enc-ink); text-wrap: balance; }
.enc-original { font-size: 1.8rem; color: var(--enc-gold); }
.enc-translit { font-style: italic; color: var(--enc-muted); }
.enc-still { font-size: 1.15rem; font-style: italic; color: var(--enc-dim); margin-top: 1rem; line-height: 1.6; }
.enc-seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--enc-rule); border-radius: 999px; overflow: hidden; }
.enc-seg button {
  background: none; border: 0; color: var(--enc-muted); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .75rem;
  padding: .45rem 1rem; min-height: 2.5rem; cursor: pointer;
}
.enc-seg button.on { background: var(--enc-gold); color: var(--enc-bg); }
.enc-verse { font-size: 1.35rem; font-style: italic; line-height: 1.6; color: var(--enc-ink); }
.enc-ref { font-family: 'Cinzel', serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--enc-gold); }
.enc-hint { font-style: italic; color: var(--enc-muted); margin-top: 1rem; }
.enc-text { font-size: 1.1rem; line-height: 1.7; color: var(--enc-ink); }
.enc-more { align-self: flex-start; background: none; border: 0; color: var(--enc-gold); font-family: inherit; font-size: 1rem; font-style: italic; cursor: pointer; padding: .3rem 0; min-height: 2.5rem; }
.enc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.enc-chips span { border: 1px solid var(--enc-rule); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; color: var(--enc-dim); }
.enc-source { font-size: .85rem; font-style: italic; color: var(--enc-muted); }
.enc-prayer { font-size: 1.1rem; font-style: italic; line-height: 1.7; color: var(--enc-ink); border-left: 2px solid var(--enc-gold); padding-left: 1rem; }
.enc-prompt { font-size: 1.05rem; line-height: 1.6; color: var(--enc-ink); }
.enc-response {
  width: 100%; background: transparent; color: var(--enc-ink); border: 1px solid var(--enc-rule); border-radius: 10px;
  padding: .8rem .9rem; font-family: 'EB Garamond', Georgia, serif; font-size: 1.05rem; line-height: 1.6; resize: vertical;
}
.enc-response:focus { outline: 2px solid var(--enc-gold); outline-offset: 1px; }
.enc-saved { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .72rem; color: var(--enc-muted); min-height: 1rem; }
.enc-anchor { font-size: 1.3rem; line-height: 1.6; color: var(--enc-ink); border-left: 2px solid var(--enc-gold); padding-left: 1rem; margin: .5rem 0 1rem; }
.enc-links { display: flex; flex-direction: column; }
.enc-links button {
  background: none; border: 0; border-bottom: 1px solid var(--enc-rule); color: var(--enc-dim); text-align: left;
  font-family: 'EB Garamond', Georgia, serif; font-size: 1.05rem; padding: .7rem 0; min-height: 2.75rem; cursor: pointer;
}
.encounter-nav {
  display: flex; gap: .75rem; border-top: 1px solid var(--enc-rule);
  padding: .75rem max(1rem, env(safe-area-inset-right, 0px)) calc(.75rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}
.encounter-nav .enc-btn { flex: 1; }
.encounter-nav .enc-btn[hidden] { display: none; }
.enc-btn {
  background: none; border: 1px solid var(--enc-gold, var(--gold)); color: var(--enc-gold, var(--gold)); border-radius: 8px;
  font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; padding: .8rem 1rem; min-height: 2.9rem; cursor: pointer;
}
.enc-btn-fill { background: var(--enc-gold, var(--gold)); color: var(--enc-bg, #0a0805); }
.enc-btn:disabled { opacity: .7; cursor: default; }
.enc-btn:focus-visible, .encounter-close:focus-visible, .enc-seg button:focus-visible, .enc-links button:focus-visible, .enc-more:focus-visible {
  outline: 2px solid var(--enc-gold, var(--gold)); outline-offset: 2px;
}

/* ── TODAY (js/today.js) ───────────────────────────────────────────────────
   The Daily Walk: Morning, Through the day, Evening. Uses the Encounter's
   full-screen look and sits just beneath it, so an Encounter opened from
   Today returns to Today when it closes. */
.today-overlay { z-index: 2050; } /* above the app; below Devotional Plans (2100) and the Encounter (2200) */
.today-overlay .encounter-header { grid-template-columns: 2.75rem 1fr 2.75rem; }
.today-overlay .encounter-step-name { text-align: center; }
.today-date { grid-column: 1 / -1; text-align: center; font-style: italic; color: var(--enc-muted); font-size: .95rem; margin-top: -.25rem; }
.today-step { gap: 0; }
.today-part { display: flex; flex-direction: column; gap: .7rem; padding: 1.4rem 0; border-top: 1px solid var(--enc-rule); }
.today-part:first-child { border-top: 0; padding-top: .4rem; }
.today-name { font-size: 1.7rem; }
.today-original { font-size: 1.15rem; color: var(--enc-dim); }
.today-original i { color: var(--enc-muted); }
.today-begin { margin-top: .4rem; }
.today-link {
  align-self: flex-start; background: none; border: 0; color: var(--enc-dim); font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem; padding: .3rem 0; min-height: 2.75rem; cursor: pointer;
}
.today-link:focus-visible { outline: 2px solid var(--enc-gold); outline-offset: 2px; }
.today-anchor { margin: 0; }
.today-quiet { font-style: italic; color: var(--enc-muted); line-height: 1.6; }
.today-note { font-size: .9rem; font-style: italic; color: var(--enc-muted); }
.today-plan { font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--enc-dim); }
.today-link-small { font-size: .9rem; color: var(--enc-muted); min-height: 2.5rem; }
.walk-row { margin-top: 1rem; display: flex; justify-content: center; }
.today-finished-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: .6rem; }
/* Walking a finished plan again (js/today.js): past journeys, kept. */
.journey-history { margin-top: 1rem; text-align: center; font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: .9rem; color: var(--text-dim); line-height: 1.6; }
.journey-prior { border-left: 2px solid rgba(201,168,76,0.35); padding: .2rem 0 .2rem .9rem; margin: .4rem 0 1rem; }
.journey-prior-label { font-family: 'Cinzel', serif; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: #c9a84c; opacity: .8; margin-bottom: .3rem; }
.journey-prior-text { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 1rem; line-height: 1.6; white-space: pre-line; color: var(--text-dim); }
.today-overlay .journey-prior-text { color: var(--enc-dim); }
.today-overlay .journey-prior-label { color: var(--enc-gold); }
@media (prefers-reduced-motion: reduce) { .encounter-overlay { transition: none; } }

/* ── MY WALK (js/mywalk.js) ────────────────────────────────────────────────
   Slides in from the left: the whole screen on phones, a 380px panel on
   wider screens with the app dimmed beside it. Uses the Encounter's colour
   variables, so Parchment applies. Below Today (2050) and the plans, which
   it closes before opening them. */
.mywalk-btn {
  width: 34px; height: 34px; flex-shrink: 0; display: inline-grid; place-items: center;
  background: none; border: 1px solid var(--border-strong); border-radius: 4px;
  color: var(--gold); font-size: 1.05rem; line-height: 1; cursor: pointer; transition: border-color .2s;
}
.mywalk-btn:hover, .mywalk-btn:focus-visible { border-color: var(--gold); outline: none; }
.mywalk-overlay { position: fixed; inset: 0; z-index: 1950; visibility: hidden; transition: visibility .3s; }
.mywalk-overlay.open { visibility: visible; }
.mywalk-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s ease; }
.mywalk-overlay.open .mywalk-backdrop { opacity: 1; }
.mywalk-panel {
  --enc-bg: #0a0805; --enc-ink: var(--parchment); --enc-dim: var(--parchment-dim);
  --enc-muted: var(--text-muted); --enc-gold: var(--gold); --enc-rule: rgba(201,168,76,0.22);
  position: absolute; top: 0; bottom: 0; left: 0; width: min(380px, 100%);
  background: var(--enc-bg); color: var(--enc-ink); border-right: 1px solid var(--enc-rule);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s ease;
}
body.parchment-mode .mywalk-panel {
  --enc-bg: #f4ebd0; --enc-ink: #1c160c; --enc-dim: #4a3c22; --enc-muted: #6b5a38; --enc-gold: #8a6a1c; --enc-rule: rgba(138,106,28,0.3);
}
.mywalk-overlay.open .mywalk-panel { transform: none; }
@media (max-width: 600px) { .mywalk-panel { width: 100%; border-right: 0; } }
.mywalk-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: calc(.9rem + env(safe-area-inset-top, 0px)) 1rem .6rem max(1rem, env(safe-area-inset-left, 0px));
}
.mywalk-title { font-family: 'Cinzel', serif; font-size: .9rem; letter-spacing: .22em; text-transform: uppercase; color: var(--enc-gold); }
.mywalk-progress { font-style: italic; color: var(--enc-muted); font-size: .95rem; margin-top: .15rem; }
.mywalk-tabs { display: flex; gap: .4rem; padding: .2rem 1rem .8rem max(1rem, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--enc-rule); }
.mywalk-tab, .mywalk-filter {
  flex: 1; background: none; border: 1px solid var(--enc-rule); border-radius: 4px; color: var(--enc-muted);
  font-family: 'Cinzel', serif; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .55rem .3rem; min-height: 2.6rem; cursor: pointer; white-space: nowrap;
}
.mywalk-tab.on, .mywalk-filter.on { border-color: var(--enc-gold); color: var(--enc-gold); background: rgba(201,168,76,.1); }
.mywalk-filters { display: flex; gap: .35rem; margin-bottom: .4rem; }
.mywalk-filter { font-size: .56rem; min-height: 2.3rem; }
.mywalk-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: .8rem 1rem 1rem max(1rem, env(safe-area-inset-left, 0px)); }
.mywalk-item { display: flex; align-items: flex-start; gap: .5rem; border-bottom: 1px solid var(--enc-rule); }
.mywalk-open {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; text-align: left;
  background: none; border: 0; color: var(--enc-ink); padding: .75rem 0; min-height: 2.75rem; cursor: pointer; font-family: 'EB Garamond', Georgia, serif;
}
.mywalk-name { font-family: 'Cinzel', serif; font-size: .82rem; letter-spacing: .05em; color: var(--enc-gold); }
.mywalk-meta { font-style: italic; font-size: .88rem; color: var(--enc-muted); }
.mywalk-text { font-size: 1rem; line-height: 1.5; color: var(--enc-dim); overflow-wrap: anywhere; }
.mywalk-star { background: none; border: 0; color: var(--enc-gold); font-size: 1.2rem; width: 2.75rem; height: 2.75rem; cursor: pointer; flex-shrink: 0; margin-top: .25rem; }
.mywalk-plan { flex-direction: column; gap: 0; }
.mywalk-plan .mywalk-open { width: 100%; }
.mywalk-walking {
  align-self: flex-start; margin: -.3rem 0 .75rem; background: none; border: 1px solid var(--enc-gold); border-radius: 4px; color: var(--enc-gold);
  font-family: 'Cinzel', serif; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; padding: .45rem .7rem; min-height: 2.4rem; cursor: pointer;
}
.mywalk-empty { font-style: italic; color: var(--enc-muted); line-height: 1.6; padding: 1rem 0; }
.mywalk-foot {
  border-top: 1px solid var(--enc-rule); display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}
.mywalk-foot-btn {
  flex: 1 1 auto; background: none; border: 1px solid var(--enc-rule); border-radius: 4px; color: var(--enc-dim); text-align: center;
  font-family: 'Cinzel', serif; font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; padding: .55rem .5rem; min-height: 2.5rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.mywalk-foot-btn:hover { border-color: var(--enc-gold); color: var(--enc-gold); }
.mywalk-foot-note { flex-basis: 100%; font-size: .8rem; font-style: italic; color: var(--enc-muted); line-height: 1.45; margin-top: .2rem; }
.mywalk-tab:focus-visible, .mywalk-filter:focus-visible, .mywalk-open:focus-visible, .mywalk-star:focus-visible,
.mywalk-walking:focus-visible, .mywalk-foot-btn:focus-visible, .mywalk-foot-btn:focus-within { outline: 2px solid var(--enc-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .mywalk-panel, .mywalk-backdrop { transition: none; } }
.mywalk-tabs { flex-wrap: wrap; }
.mywalk-tab { flex: 1 1 40%; }
@media (min-width: 340px) { .mywalk-tab { flex: 1 1 0; font-size: .54rem; letter-spacing: .06em; padding: .55rem .15rem; } }
.mywalk-quote { font-size: 1rem; line-height: 1.5; color: var(--enc-ink); overflow-wrap: anywhere; }
.mywalk-quote mark { background: rgba(201,168,76,.28); color: inherit; padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mywalk-note { font-size: .95rem; font-style: italic; color: var(--enc-dim); border-left: 2px solid var(--enc-gold); padding-left: .6rem; margin-top: .2rem; }
.mywalk-changed { font-size: .85rem; font-style: italic; color: var(--enc-muted); margin-top: .2rem; }
.mywalk-remove {
  background: none; border: 1px solid var(--enc-rule); border-radius: 4px; color: var(--enc-muted); cursor: pointer; flex-shrink: 0;
  font-family: 'Cinzel', serif; font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; padding: .4rem .6rem; min-height: 2.4rem; margin-top: .6rem;
}

/* ── HIGHLIGHTS (js/highlights.js) ─────────────────────────────────────────
   One soft gold, so the page stays calm. A highlight with a note carries a
   small mark after it. */
mark.hl-mark {
  background: rgba(201,168,76,.26); color: inherit; padding: 0; border-radius: 2px; cursor: pointer;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
body.parchment-mode mark.hl-mark { background: rgba(201,168,76,.38); }
mark.hl-mark.hl-has-note::after { content: '\270E'; font-size: .7em; margin-left: .15em; color: var(--gold); vertical-align: super; }
mark.hl-mark.hl-flash { outline: 2px solid var(--gold); outline-offset: 2px; }
.hl-bar {
  position: fixed; z-index: 9000; display: flex; gap: .4rem; padding: .35rem;
  background: #1a1610; border: 1px solid var(--gold); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.hl-bar[hidden] { display: none; }
.hl-bar button {
  background: none; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--gold);
  font-family: 'Cinzel', serif; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .55rem .75rem; min-height: 2.6rem; cursor: pointer; white-space: nowrap;
}
.hl-bar button:hover, .hl-bar button:focus-visible { border-color: var(--gold); background: rgba(201,168,76,.1); outline: none; }
.hl-dialog { position: fixed; inset: 0; z-index: 9100; display: none; align-items: center; justify-content: center; padding: 1rem; }
.hl-dialog.open { display: flex; }
.hl-dialog-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.hl-dialog-box {
  position: relative; width: min(30rem, 100%); max-height: 90vh; overflow-y: auto;
  background: #13100a; color: var(--parchment); border: 1px solid var(--border-strong); border-radius: 8px; padding: 1.2rem;
  display: flex; flex-direction: column; gap: .6rem;
}
body.parchment-mode .hl-dialog-box { background: #f4ebd0; color: #1c160c; border-color: rgba(138,106,28,.4); }
.hl-dialog-title { font-family: 'Cinzel', serif; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.hl-dialog-where { font-style: italic; color: var(--text-muted); font-size: .95rem; margin-top: -.3rem; }
.hl-dialog-quote { margin: 0; font-family: 'EB Garamond', Georgia, serif; font-size: 1.05rem; line-height: 1.6; border-left: 2px solid var(--gold); padding-left: .8rem; max-height: 9rem; overflow-y: auto; }
.hl-note-label { font-family: 'Cinzel', serif; font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-muted); margin-top: .3rem; }
.hl-note-label span { text-transform: none; letter-spacing: 0; font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: .85rem; }
.hl-note-input {
  width: 100%; background: transparent; color: inherit; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: .7rem .8rem; font-family: 'EB Garamond', Georgia, serif; font-size: 1.05rem;
}
.hl-note-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.hl-dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.hl-dialog-btn {
  flex: 1 1 auto; background: none; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--gold);
  font-family: 'Cinzel', serif; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; padding: .6rem .8rem; min-height: 2.6rem; cursor: pointer;
}
.hl-dialog-save { background: var(--gold); color: #0a0805; border-color: var(--gold); }
.hl-dialog-remove { color: var(--text-muted); flex-basis: 100%; }
.hl-dialog-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── READ THE WHOLE PASSAGE (js/passage.js) ────────────────────────────────
   The Encounter's full-screen look; above the Encounter (2200), so opening it
   from Behold returns there when it closes. */
.passage-overlay { z-index: 2250; }
.passage-overlay .encounter-header { grid-template-columns: 2.75rem 1fr 2.75rem; }
.passage-overlay .encounter-step-name { text-align: center; }
.passage-step { gap: .9rem; }
.passage-text { font-family: 'EB Garamond', Georgia, serif; font-size: 1.15rem; line-height: 1.85; color: var(--enc-ink); }
.passage-num { font-family: 'Cinzel', serif; font-size: .58rem; color: var(--enc-muted); margin-right: .2rem; vertical-align: super; line-height: 0; }
.passage-mine { background: rgba(201,168,76,.18); box-shadow: 0 0 0 .15rem rgba(201,168,76,.18); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.passage-mine .passage-num { color: var(--enc-gold); }
body.parchment-mode .passage-mine { background: rgba(201,168,76,.3); box-shadow: 0 0 0 .15rem rgba(201,168,76,.3); }
.passage-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.passage-link {
  display: inline-block; margin-top: 1rem; background: none; border: 0; padding: .4rem 0; min-height: 2.5rem; cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 1rem; color: var(--gold);
}
.passage-link:hover { text-decoration: underline; }
.passage-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
