:root {
  --ink: #171418;
  --ink-soft: #211a22;
  --plum: #311e33;
  --plum-2: #4a2e4d;
  --plum-3: #6f4868;
  --gold: #eebd4a;
  --gold-light: #f7d985;
  --ivory: #f3e8d0;
  --paper: #fbf6ea;
  --paper-2: #efe3cc;
  --white: #fffdf9;
  --muted: #bfb2c2;
  --green: #4fc18b;
  --red: #e26d6d;
  --line: rgba(238, 189, 74, .23);
  --line-dark: rgba(49, 30, 51, .14);
  --shadow: 0 24px 70px rgba(20, 11, 21, .18);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(238, 189, 74, .55);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 15px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}
.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 30;
  min-height: 78px;
  padding: 10px max(18px, calc((100% - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #201321;
  color: var(--white);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: grid; line-height: 1; }
.brand strong { font-size: 18px; letter-spacing: .13em; }
.brand small { margin-top: 5px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .36em; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.sync-status { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: #968b99; }
.sync-status.is-synced i { background: var(--green); box-shadow: 0 0 0 5px rgba(79,193,139,.1); }
.sync-status.is-saving i { background: var(--gold); animation: pulse 1s infinite; }
.sync-status.is-error i { background: var(--red); }
.profile-button {
  min-height: 42px;
  padding: 5px 12px 5px 5px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  color: var(--white);
  cursor: pointer;
}
.header-sign-in {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.profile-button > span:first-of-type, .profile-button img {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  object-fit: cover;
  font-size: 12px;
  font-weight: 900;
}
#profile-name { color: var(--ivory); font-size: 11px; font-weight: 700; }

.journey-hero {
  position: relative;
  min-height: 720px;
  padding: 78px max(22px, calc((100% - 1180px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(290px, .64fr);
  align-items: center;
  gap: 70px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(28,17,29,.98), rgba(59,34,61,.96)),
    #241425;
  color: var(--ivory);
}
.journey-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .55;
}
.hero-glow { position: absolute; border: 1px solid rgba(238,189,74,.15); border-radius: 50%; pointer-events: none; }
.hero-glow-one { width: 410px; height: 410px; top: -220px; left: -110px; }
.hero-glow-two { width: 520px; height: 520px; right: -260px; bottom: -330px; }
.hero-copy, .hero-mark { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 13px; color: var(--plum-3); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.journey-hero .eyebrow { color: var(--gold); }
.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 86px);
  font-weight: 600;
  line-height: .86;
  letter-spacing: -.035em;
}
.hero-copy h1 em { color: var(--gold); font-weight: 500; }
.hero-intro { max-width: 760px; margin-top: 28px; display: grid; gap: 13px; }
.hero-intro p { margin: 0; color: rgba(243,232,208,.72); font-size: 12px; line-height: 1.78; }
.hero-intro strong { color: var(--white); }
.hero-intro em { color: var(--gold-light); font-style: normal; font-weight: 700; }
.hero-intro .hero-blessing { padding-left: 15px; border-left: 2px solid rgba(238,189,74,.6); color: rgba(243,232,208,.86); }
.hero-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats span { padding: 10px 13px; border: 1px solid rgba(238,189,74,.18); border-radius: 999px; color: rgba(243,232,208,.63); font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.hero-stats strong { color: var(--gold-light); font-size: 12px; }
.hero-mark {
  padding: 28px;
  border: 1px solid rgba(238,189,74,.25);
  border-radius: 24px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.hero-mark span { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.hero-mark strong { display: block; margin-top: 12px; color: var(--white); font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: .95; }
.hero-mark p { margin: 14px 0 0; color: rgba(243,232,208,.62); font-size: 11px; line-height: 1.7; }
.hero-book-list { margin-top: 20px; padding-top: 17px; border-top: 1px solid rgba(238,189,74,.18); }
.hero-book-list small { color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .16em; }
.hero-book-list ul { margin: 11px 0 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.hero-book-list li { position: relative; padding-left: 13px; color: rgba(243,232,208,.72); font-family: var(--serif); font-size: 15px; line-height: 1.15; }
.hero-book-list li::before { content: "·"; position: absolute; left: 0; color: var(--gold); }

.journey-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 0 max(16px, calc((100% - 1100px) / 2));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(251,246,234,.96);
  backdrop-filter: blur(15px);
}
.journey-nav button {
  min-height: 68px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #746a72;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.journey-nav button span { margin-right: 7px; color: #b6aab3; font-size: 8px; }
.journey-nav button:hover { color: var(--plum); }
.journey-nav button.active { border-bottom-color: var(--gold); color: var(--plum); }
.journey-nav button.active span { color: #a67821; }

#journey-main { min-height: 680px; }
#view-root { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 90px; }
.loading-state { min-height: 520px; display: grid; place-content: center; justify-items: center; gap: 15px; color: var(--plum); }
.loading-orb { width: 38px; height: 38px; border: 3px solid var(--paper-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }

.view-heading { margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.view-heading h2 { margin: 0; color: var(--plum); font-family: var(--serif); font-size: clamp(38px, 6vw, 64px); font-weight: 600; line-height: .95; }
.view-heading p:not(.eyebrow) { max-width: 600px; margin: 12px 0 0; color: #6f646c; font-size: 13px; line-height: 1.7; }
.reading-switcher { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: 50%; background: var(--white); color: var(--plum); cursor: pointer; font-size: 22px; }
.icon-button:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.reading-number { min-width: 110px; text-align: center; }
.reading-number strong { display: block; max-width: 175px; color: var(--plum); font-family: var(--serif); font-size: 18px; line-height: 1.08; }
.reading-number small { color: #877c84; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.chapter-heading { display: grid; gap: 7px; }
.chapter-heading > span { display: block; }

.readings-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 24px; align-items: start; }
.reading-stack { display: grid; gap: 17px; }
.reading-card { position: relative; overflow: hidden; padding: 30px; border-radius: 26px; box-shadow: var(--shadow); }
.scripture-card { min-height: 275px; background: linear-gradient(145deg, #311e33, #211522); color: var(--ivory); }
.scripture-card::before { content: "“"; position: absolute; right: 20px; bottom: -75px; color: rgba(238,189,74,.07); font-family: var(--serif); font-size: 280px; line-height: 1; }
.companion-card { border: 1px solid rgba(49,30,51,.1); background: var(--white); }
.card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.card-kicker span { font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.scripture-card .card-kicker span { color: var(--gold); }
.companion-card .card-kicker span { color: var(--plum-3); }
.source-order { padding: 5px 9px; border-radius: 999px; border: 1px solid currentColor; opacity: .7; }
.reading-card h3 { position: relative; margin: 22px 0 8px; font-family: var(--serif); font-size: clamp(32px, 5vw, 50px); font-weight: 600; line-height: .98; }
.scripture-card h3 { color: var(--white); }
.companion-card h3 { color: var(--plum); font-size: clamp(27px, 4vw, 39px); }
.companion-card.companion-only { min-height: 330px; }
.companion-chapters { position: relative; margin: 17px 0 10px; display: grid; gap: 8px; }
.companion-chapter { padding-left: 13px; border-left: 3px solid var(--gold); color: var(--plum); font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
.citation { position: relative; margin: 0 0 24px; font-size: 13px; line-height: 1.65; }
.scripture-card .citation { color: rgba(243,232,208,.66); }
.companion-card .citation { color: #746972; }
.reading-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.source-task-list { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.source-task { width: 100%; justify-content: space-between; text-align: left; line-height: 1.35; }
.journey-chapter-title { display: block; }
.journey-chapter-title + .journey-chapter-title { margin-top: 3px; }
.button {
  min-height: 46px;
  padding: 12px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.button-primary { background: var(--gold); color: #281b20; box-shadow: 0 10px 24px rgba(238,189,74,.18); }
.button-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.button-secondary { border-color: rgba(49,30,51,.2); background: transparent; color: var(--plum); }
.scripture-card .button-secondary { border-color: rgba(238,189,74,.4); color: var(--gold-light); }
.button:disabled, .button.is-disabled { opacity: .42; cursor: not-allowed; transform: none; }
.complete-toggle { min-height: 46px; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: inherit; font-size: 10px; font-weight: 800; }
.complete-toggle input { position: absolute; opacity: 0; }
.complete-toggle i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 8px; font-style: normal; }
.complete-toggle input:checked + i { border-color: var(--green); background: var(--green); color: var(--ink); }
.complete-toggle input:checked + i::after { content: "✓"; font-weight: 900; }
.source-flag { margin: 18px 0 0; padding: 11px 13px; display: flex; align-items: start; gap: 9px; border: 1px solid rgba(226,109,109,.26); border-radius: 12px; background: rgba(226,109,109,.08); color: #914b4b; font-size: 10px; line-height: 1.55; }
.scripture-card .source-flag { color: #ffd2cc; }
.source-exact { margin-top: 12px; }
.source-exact summary { color: #8a7f86; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.source-exact pre { margin: 10px 0 0; padding: 12px; overflow-x: auto; border-radius: 10px; background: rgba(49,30,51,.06); color: #635860; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.scripture-card .source-exact summary { color: rgba(243,232,208,.5); }
.scripture-card .source-exact pre { background: rgba(255,255,255,.05); color: rgba(243,232,208,.66); }

.principle-panel { position: sticky; top: 92px; padding: 25px; border: 1px solid var(--line-dark); border-radius: 24px; background: #efe3cc; }
.principle-panel h3 { margin: 0; color: var(--plum); font-family: var(--serif); font-size: 31px; font-weight: 600; line-height: 1; }
.principle-panel > p { margin: 10px 0 20px; color: #6c6268; font-size: 11px; line-height: 1.65; }
.principle-number { margin-bottom: 12px; display: inline-flex; align-items: center; gap: 7px; color: #8b6421; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.principle-number strong { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--plum); color: var(--gold); font-family: var(--serif); font-size: 15px; }
.field { display: grid; gap: 7px; margin-bottom: 12px; }
.field label { color: #5f555c; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.field textarea, .field input, .field select, .toolbar input, .toolbar select {
  width: 100%;
  border: 1px solid rgba(49,30,51,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
}
.field textarea { min-height: 126px; padding: 13px; resize: vertical; font-size: 13px; line-height: 1.6; }
.field input, .field select { min-height: 44px; padding: 10px 12px; font-size: 12px; }
.field small { color: #8a7e85; font-size: 9px; line-height: 1.5; }
.panel-actions { display: grid; gap: 9px; }
.principles-for-reading { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(49,30,51,.12); }
.principles-for-reading > strong { color: var(--plum); font-size: 10px; letter-spacing: .05em; }
.principle-mini { margin-top: 10px; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.62); }
.principle-mini b { color: #8b6421; font-size: 9px; letter-spacing: .08em; }
.principle-mini p { margin: 6px 0 0; color: #4c4449; font-size: 11px; line-height: 1.55; }
.reference-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.reference-chip { padding: 5px 8px; border: 0; border-radius: 999px; background: var(--plum); color: var(--gold-light); cursor: pointer; font-size: 9px; font-weight: 800; }

.book-grid { display: grid; gap: 16px; }
.book-section { overflow: hidden; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--white); }
.book-summary { width: 100%; padding: 22px 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.book-badge { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--plum); color: var(--gold); font-family: var(--serif); font-size: 18px; font-weight: 700; }
.book-summary h3 { margin: 0; color: var(--plum); font-family: var(--serif); font-size: 27px; font-weight: 600; }
.book-summary p { margin: 5px 0 0; color: #857980; font-size: 10px; }
.book-progress { min-width: 160px; text-align: right; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #ded3c2; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c9932f, var(--gold)); }
.book-progress small { display: block; margin-top: 6px; color: #766a72; font-size: 9px; font-weight: 800; }
.reading-list { padding: 8px 16px 18px; display: grid; gap: 7px; border-top: 1px solid var(--line-dark); }
.journey-reading { width: 100%; padding: 12px 13px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.journey-reading:hover { border-color: var(--line-dark); background: var(--paper); }
.journey-reading .reading-check { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #c9bfae; border-radius: 9px; color: transparent; font-weight: 900; }
.journey-reading.done .reading-check { border-color: var(--green); background: var(--green); color: #1d2722; }
.journey-reading strong { display: block; color: var(--plum); font-size: 11px; }
.journey-reading small { display: block; margin-top: 4px; color: #887d84; font-size: 9px; line-height: 1.4; }
.journey-reading > em { color: #9c8e97; font-size: 9px; font-style: normal; }

.toolbar { margin-bottom: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; min-height: 43px; padding: 9px 12px; background: var(--white); font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.stat-card { padding: 20px; border: 1px solid var(--line-dark); border-radius: 18px; background: var(--white); }
.stat-card strong { display: block; color: var(--plum); font-family: var(--serif); font-size: 38px; line-height: 1; }
.stat-card span { display: block; margin-top: 8px; color: #81767e; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.progress-layout { margin-top: 22px; display: grid; grid-template-columns: minmax(0, .75fr) minmax(360px, 1.25fr); gap: 20px; align-items: start; }
.progress-panel { padding: 23px; border: 1px solid var(--line-dark); border-radius: 20px; background: var(--white); }
.progress-panel h3 { margin: 0 0 17px; color: var(--plum); font-family: var(--serif); font-size: 27px; font-weight: 600; }
.book-progress-row { margin-bottom: 15px; }
.book-progress-row header { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 15px; color: #6b6067; font-size: 9px; font-weight: 800; }
.principle-index { display: grid; gap: 9px; }
.principle-index-card { padding: 15px; border: 1px solid #e3d9c8; border-radius: 14px; background: #fffdfa; }
.principle-index-card header { display: flex; justify-content: space-between; gap: 10px; }
.principle-index-card b { color: #9c6d1f; font-size: 9px; letter-spacing: .1em; }
.principle-index-card button { border: 0; background: transparent; color: #876d83; cursor: pointer; font-size: 9px; font-weight: 800; }
.principle-index-card p { margin: 8px 0 0; color: #4f474c; font-size: 11px; line-height: 1.6; }
.empty-card { padding: 30px; border: 1px dashed rgba(49,30,51,.2); border-radius: 16px; color: #7f747b; text-align: center; font-size: 11px; line-height: 1.65; }
.save-banner { margin-bottom: 22px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid rgba(166,114,31,.3); border-radius: 16px; background: #fff3d2; color: #5d4930; }
.save-banner strong { display: block; color: var(--plum); font-family: var(--serif); font-size: 20px; }
.save-banner span { display: block; margin-top: 3px; font-size: 9px; line-height: 1.5; }
.save-banner button { flex: 0 0 auto; }
.review-queue { margin-top: 20px; }
.review-queue summary { color: #8b5252; cursor: pointer; font-size: 10px; font-weight: 800; }
.review-item { margin-top: 10px; padding: 12px; border-left: 3px solid var(--red); background: rgba(226,109,109,.07); color: #6d5055; font-size: 10px; line-height: 1.55; }

.members-layout { display: grid; grid-template-columns: minmax(300px, .45fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.share-panel { position: sticky; top: 92px; padding: 23px; border-radius: 22px; background: var(--plum); color: var(--ivory); }
.share-panel .eyebrow { color: var(--gold); }
.share-panel h3 { margin: 0 0 8px; color: var(--white); font-family: var(--serif); font-size: 30px; font-weight: 600; }
.share-panel > p { margin: 0 0 20px; color: rgba(243,232,208,.65); font-size: 10px; line-height: 1.65; }
.share-panel .field label { color: var(--gold-light); }
.share-panel .field small { color: rgba(243,232,208,.5); }
.member-feed { display: grid; gap: 13px; }
.member-post { padding: 21px; border: 1px solid var(--line-dark); border-radius: 20px; background: var(--white); }
.post-author { display: flex; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--plum); color: var(--gold); object-fit: cover; font-size: 11px; font-weight: 900; }
.post-author strong { display: block; color: var(--plum); font-size: 11px; }
.post-author small { display: block; margin-top: 3px; color: #93868f; font-size: 8px; }
.post-principle { margin: 15px 0 0; padding: 13px; border-left: 3px solid var(--gold); background: var(--paper); color: #655b61; font-size: 10px; line-height: 1.55; }
.post-principle b { color: #93671c; }
.post-body { margin: 15px 0; color: #453e42; font-size: 12px; line-height: 1.72; white-space: pre-wrap; }
.reply-list { margin-top: 14px; display: grid; gap: 8px; }
.reply { padding: 11px 12px; border-radius: 12px; background: var(--paper); color: #574e53; font-size: 10px; line-height: 1.55; }
.reply b { color: var(--plum); }
.reply-form { margin-top: 12px; display: flex; gap: 8px; }
.reply-form input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--line-dark); border-radius: 10px; background: #fffdfa; font-size: 10px; }
.reply-form button { min-height: 38px; padding: 8px 11px; border: 0; border-radius: 10px; background: var(--plum); color: var(--gold-light); cursor: pointer; font-size: 9px; font-weight: 800; }

.auth-gate { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: center; overflow-y: auto; background: rgba(18,10,19,.85); backdrop-filter: blur(12px); }
.auth-card { width: min(480px, 100%); padding: 36px; border: 1px solid rgba(238,189,74,.3); border-radius: 28px; background: linear-gradient(145deg, #3b233d, #201421); color: var(--ivory); text-align: center; box-shadow: 0 35px 100px rgba(0,0,0,.45); }
.auth-card > img { object-fit: contain; }
.auth-card .eyebrow { margin-top: 18px; color: var(--gold); }
.auth-card h2 { margin: 0; color: var(--white); font-family: var(--serif); font-size: 43px; font-weight: 600; line-height: .95; }
.auth-card > p:not(.eyebrow) { color: rgba(243,232,208,.68); font-size: 11px; line-height: 1.7; }
.google-button { width: 100%; min-height: 52px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 11px; border: 0; border-radius: 13px; background: var(--white); color: #2b2529; cursor: pointer; font-size: 11px; font-weight: 800; }
.google-button svg { width: 20px; height: 20px; }
.guest-button { width: 100%; min-height: 48px; margin-top: 10px; border: 1px solid rgba(238,189,74,.34); border-radius: 13px; background: transparent; color: var(--gold-light); cursor: pointer; font-size: 10px; font-weight: 800; }
.auth-note { margin-bottom: 0; font-size: 9px !important; }
.auth-error { color: #ffb8b1 !important; }
.account-menu { position: fixed; z-index: 60; top: 70px; right: max(16px, calc((100% - 1240px) / 2)); width: min(290px, calc(100% - 32px)); padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #241725; color: var(--ivory); box-shadow: var(--shadow); }
.account-menu strong { display: block; overflow: hidden; color: rgba(243,232,208,.7); font-size: 9px; text-overflow: ellipsis; }
.account-menu button { width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--gold-light); cursor: pointer; font-size: 10px; font-weight: 800; }
.toast-region { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 340px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #281a29; color: var(--ivory); box-shadow: var(--shadow); font-size: 10px; line-height: 1.5; }
.toast.error { border-color: rgba(226,109,109,.5); }
.site-footer { padding: 40px max(20px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px 40px; background: var(--ink); color: var(--ivory); }
.footer-brand { grid-row: span 2; }
.site-footer p { margin: 0; color: rgba(243,232,208,.7); font-family: var(--serif); font-size: 20px; }
.site-footer > small { color: rgba(243,232,208,.4); font-size: 8px; line-height: 1.6; }
.noscript { padding: 15px; background: var(--red); color: #fff; text-align: center; font-weight: 800; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 900px) {
  .journey-hero { grid-template-columns: 1fr; gap: 35px; min-height: auto; padding-top: 58px; padding-bottom: 58px; }
  .hero-mark { max-width: 470px; }
  .readings-grid, .members-layout, .progress-layout { grid-template-columns: 1fr; }
  .principle-panel, .share-panel { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .site-header { min-height: 68px; padding: 8px 12px; }
  .brand img { width: 45px; height: 45px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 6px; }
  .sync-status, #profile-name { display: none; }
  .header-sign-in { padding-inline: 10px; font-size: 8px; }
  .profile-button { padding-right: 5px; }
  .journey-hero { padding: 46px 20px 50px; }
  .hero-copy h1 { font-size: clamp(44px, 15vw, 67px); }
  .hero-mark { padding: 22px; }
  .journey-nav { padding: 0 5px; }
  .journey-nav button { min-height: 60px; font-size: 9px; }
  .journey-nav button span { display: none; }
  #view-root { width: min(100% - 24px, 1180px); padding-top: 36px; }
  .view-heading { align-items: start; flex-direction: column; gap: 20px; }
  .view-heading h2 { font-size: 44px; }
  .reading-switcher { width: 100%; justify-content: space-between; }
  .reading-card { padding: 23px 20px; border-radius: 20px; }
  .reading-card h3 { font-size: 36px; }
  .principle-panel { padding: 20px; }
  .book-summary { grid-template-columns: auto 1fr; padding: 17px; }
  .book-progress { grid-column: 1 / -1; width: 100%; text-align: left; }
  .journey-reading { grid-template-columns: 31px 1fr; }
  .journey-reading > em { display: none; }
  .source-task-list { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 31px; }
  .members-layout { gap: 15px; }
  .auth-card { padding: 30px 22px; }
  .auth-card h2 { font-size: 37px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-self: center; grid-row: auto; }
  .toast-region { right: 10px; bottom: 10px; left: 10px; }
  .toast { max-width: none; }
  .save-banner { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
