*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #1a2744;
  --primary-mid: #243358;
  --primary-light: #2e4070;
  --accent: #c9933a;
  --accent-light: #e8b563;
  --cream: #f5f0e8;
  --cream-dark: #ede5d4;
  --white: #fdfaf5;
  --text-dark: #1a1a2e;
  --text-mid: #4a4a6a;
  --green: #2e7d5e;
}

html { font-size: 16px; }

body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: 'DM Sans', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── DEBUG BAR ── */
#debug-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #f59e0b;
  color: #1a1a1a;
  padding: .4rem .75rem;
  font-size: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  z-index: 9999;
  font-family: 'SF Mono', monospace;
}
.debug-item b { font-weight: 700; }
.debug-spacer { flex: 1; }
.debug-btn {
  padding: .2rem .6rem;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.2);
  background: white;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
}
.debug-btn.danger { background: #fee2e2; color: #991b1b; }

/* ── HEADER ── */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
}

.conf-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--accent-light);
  letter-spacing: .02em;
  line-height: 1.1;
}

.conf-subtitle {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 300;
  margin-top: 2px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.header-badge {
  background: var(--accent);
  color: var(--primary);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

.header-greeting {
  font-size: .65rem;
  color: rgba(255,255,255,.45);
}

/* ── DAY NAV ── */
.day-nav {
  display: flex;
  border-top: 1px solid rgba(255,255,255,.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.day-nav::-webkit-scrollbar { display: none; }

.day-tab {
  flex: 1;
  min-width: 70px;
  padding: 10px 8px;
  text-align: center;
  color: rgba(255,255,255,.45);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  user-select: none;
}

.day-tab.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.day-tab.locked { opacity: .35; cursor: not-allowed; }

.day-tab .day-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

/* ── PANELS ── */
#app { padding-bottom: 80px; }
.panel { display: none; }
.panel.active { display: block; }

/* ── HERO BANNER ── */
.day-hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 28px 24px 24px;
  position: relative;
  overflow: hidden;
}

.day-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(201,147,58,.18) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-eyebrow {
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.hero-day-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-theme {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.hero-scripture {
  background: rgba(255,255,255,.07);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: .82rem;
  color: rgba(255,255,255,.8);
  line-height: 1.55;
  font-style: italic;
}

.hero-scripture cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .06em;
  font-weight: 500;
}

/* ── CONTENT FEED ── */
.content-feed { padding: 0 0 8px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 10px;
}

.section-label span {
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mid);
  font-weight: 500;
  white-space: nowrap;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

/* ── ANNOUNCEMENT BANNER ── */
.announcements-stack {
  padding-bottom: 12px;
}

.announcement-banner {
  margin: 12px 16px 0;
  background: var(--primary);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ann-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.ann-body {
  font-size: .85rem;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
}

.ann-time {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  margin-top: 3px;
}

/* ── DEVOTIONAL CARD ── */
.devotional-card {
  margin: 0 16px 8px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.devotional-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.leader-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--accent-light);
}

.leader-info .leader-name {
  font-size: .9rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 2px;
}

.leader-info .leader-role {
  font-size: .68rem;
  color: var(--accent-light);
  letter-spacing: .04em;
}

.devotional-body { padding: 20px; }

.devotional-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.devotional-text {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text-mid);
  white-space: pre-wrap;
}

/* ── SCHEDULE CARD ── */
.schedule-card {
  margin: 0 16px 8px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.schedule-header {
  padding: 14px 18px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-header-title {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: .04em;
}

.schedule-header-date {
  font-size: .7rem;
  color: var(--text-mid);
  font-weight: 500;
}

.schedule-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream-dark);
  position: relative;
}

.schedule-item:last-child { border-bottom: none; }

.schedule-item.now::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.sched-time {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-mid);
  min-width: 42px;
  padding-top: 1px;
  letter-spacing: .02em;
}

.schedule-item.now .sched-time { color: var(--accent); }

.sched-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cream-dark);
  margin-top: 4px;
  flex-shrink: 0;
}

.schedule-item.now .sched-dot { background: var(--accent); }
.schedule-item.done .sched-dot { background: var(--green); }

.sched-name {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.schedule-item.done .sched-name {
  color: var(--text-mid);
  text-decoration: line-through;
}

.sched-detail {
  font-size: .72rem;
  color: var(--text-mid);
}

/* ── HISTORY FACT ── */
.fact-card {
  margin: 0 16px 8px;
  background: linear-gradient(135deg, #2e4a2e 0%, #1a3a1a 100%);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,.1);
  position: relative;
  overflow: hidden;
}

.fact-card::before {
  content: '"';
  position: absolute;
  top: -10px; right: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  color: rgba(255,255,255,.05);
  line-height: 1;
}

.fact-eyebrow {
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fact-eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}

.fact-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.fact-text {
  font-size: .83rem;
  line-height: 1.65;
  color: rgba(255,255,255,.75);
}

.fact-tag {
  display: inline-block;
  margin-top: 14px;
  background: rgba(201,147,58,.2);
  color: var(--accent-light);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(201,147,58,.3);
}

/* ── REFLECTION SECTION ── */
.reflection-card {
  margin: 0 16px 8px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.reflection-prompt-bar {
  background: linear-gradient(135deg, var(--accent) 0%, #b07d28 100%);
  padding: 14px 18px;
}

.reflection-prompt-label {
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(0,0,0,.5);
  font-weight: 500;
  margin-bottom: 4px;
}

.reflection-prompt-text {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: .95rem;
  color: var(--primary);
  line-height: 1.4;
}

.reflection-input-area { padding: 16px; }

.reflection-textarea {
  width: 100%;
  min-height: 90px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: var(--text-dark);
  background: var(--cream);
  resize: none;
  outline: none;
  transition: border-color .2s;
  line-height: 1.6;
}

.reflection-textarea:focus { border-color: var(--accent); }
.reflection-textarea::placeholder { color: rgba(74,74,106,.45); }

.reflection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.anon-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.anon-label {
  display: block;
  font-size: .78rem;
  color: var(--text-mid);
  font-weight: 500;
  line-height: 1.3;
}
.anon-note {
  display: block;
  font-size: .7rem;
  color: var(--text-light);
  line-height: 1.3;
  margin-top: 1px;
}

.toggle-switch {
  width: 32px; height: 18px;
  background: var(--cream-dark);
  border-radius: 9px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

.toggle-switch.on { background: var(--green); }

.toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-switch.on .toggle-knob { left: 16px; }

.submit-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .1s;
}

.submit-btn:active { transform: scale(.97); }
.submit-btn:disabled { opacity: .5; cursor: default; }

/* ── REFLECTION BUBBLES (feed) ── */
.featured-reflections {
  margin: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reflection-bubble {
  background: var(--white);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  border-left: 3px solid var(--cream-dark);
}

.reflection-bubble.featured {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, var(--white) 0%, #fdf8ef 100%);
}

.reflection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.reflection-author {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: .04em;
}

.featured-badge {
  background: var(--accent);
  color: var(--text-dark);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
}

.reflection-content {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-mid);
  font-style: italic;
}

/* ── HELP SECTION ── */
.help-card {
  margin: 0 16px 8px;
  background: var(--primary);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,.15);
}

.help-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 4px;
}

.help-card-sub {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 14px;
}

.help-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cat-btn {
  padding: .65rem;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}

.cat-btn.selected {
  border-color: var(--accent);
  background: rgba(201,147,58,.15);
  color: var(--accent-light);
}

.help-textarea {
  width: 100%;
  min-height: 70px;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  color: var(--white);
  background: rgba(255,255,255,.07);
  resize: none;
  outline: none;
  margin-top: 10px;
  line-height: 1.5;
}

.help-textarea::placeholder { color: rgba(255,255,255,.25); }
.help-textarea:focus { border-color: var(--accent); }

.help-submit-btn {
  width: 100%;
  margin-top: 12px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: .04em;
  transition: opacity .15s;
}

.help-submit-btn:hover { opacity: .88; }
.help-submit-btn:disabled { opacity: .5; cursor: default; }

/* ── LEADERS PANEL ── */
.people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.person-card {
  background: var(--white);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.person-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--accent-light);
  margin: 0 auto 10px;
  border: 2px solid var(--cream-dark);
}

.person-name {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.person-role {
  font-size: .68rem;
  color: var(--text-mid);
  line-height: 1.3;
}

/* ── VOICES PANEL ── */
.voices-feed { padding: 0 16px 8px; }

.voices-day-label {
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mid);
  font-weight: 500;
  padding: 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.voices-day-label::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

.scope-toggle {
  display: flex;
  gap: 6px;
  padding: 16px 0 4px;
}

.scope-btn {
  padding: .3rem .9rem;
  border-radius: 20px;
  border: 1.5px solid var(--cream-dark);
  background: var(--white);
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-mid);
  transition: all .15s;
}

.scope-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  display: flex;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  cursor: pointer;
  color: var(--text-mid);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .15s;
}

.nav-item.active { color: var(--primary); }

.nav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .15s;
}

.nav-item.active svg { stroke: var(--accent); }

/* ── LOCKED STATE ── */
.locked-state {
  text-align: center;
  padding: 4rem 2rem;
}

.locked-icon {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--cream-dark);
  margin-bottom: 1rem;
}

.locked-text {
  font-size: .95rem;
  color: var(--text-mid);
  font-family: 'DM Serif Display', serif;
  font-style: italic;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-mid);
  font-size: .88rem;
  font-style: italic;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.devotional-card { animation: fadeUp .4s ease both .05s; }
.schedule-card   { animation: fadeUp .4s ease both .10s; }
.fact-card       { animation: fadeUp .4s ease both .15s; }
.reflection-card { animation: fadeUp .4s ease both .20s; }
.featured-reflections { animation: fadeUp .4s ease both .25s; }
.help-card       { animation: fadeUp .4s ease both .30s; }

/* ── LOADING ── */
#loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  color: var(--text-mid);
  font-size: 1rem;
  font-style: italic;
}

.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2px solid var(--cream-dark);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin-right: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── WELCOME SPLASH ── */
.welcome-inner {
  text-align: center;
  color: white;
  padding: 2rem;
  animation: welcomeIn .4s ease both;
}
@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.welcome-emoji {
  font-size: 4rem;
  margin-bottom: 1.25rem;
  display: block;
}
.welcome-greeting {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  opacity: .75;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.welcome-name {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: .5rem;
}
.welcome-company {
  font-size: .85rem;
  font-weight: 500;
  color: var(--welcome-accent, rgba(255,255,255,.7));
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.welcome-tap {
  font-size: .75rem;
  opacity: .4;
  letter-spacing: .06em;
}
