*, *::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,.75);
  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,.75);
}
.header-admin-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: rgba(255,255,255,.55);
  text-decoration: none; transition: color .15s, background .15s;
}
.header-admin-btn:hover, .header-admin-btn:focus {
  color: #fff; background: rgba(255,255,255,.12); outline: none;
}

/* ── 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,.75);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-top: none; border-left: none; border-right: none;
  background: none; font-family: inherit;
  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);
}

.section-label.today-label span:first-child {
  color: var(--accent);
  font-weight: 600;
}

/* Collapsible sections — rendered as <button> for keyboard/screen reader access */
.section-label.collapsible {
  cursor: pointer; user-select: none; width: 100%;
  background: none; border: none; font: inherit; text-align: left;
}
.section-label.collapsible::after { flex: 1; }
.section-chevron {
  width: 15px; height: 15px; flex-shrink: 0; margin-left: 4px;
  stroke: var(--text-mid); transition: transform .2s ease;
}
.section-label.collapsible.collapsed .section-chevron { transform: rotate(-90deg); }
.section-body.collapsed { display: none; }

/* ── 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);
}

/* ── NEXT UP STRIP ── */
.next-up-card {
  margin: 0 16px 20px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  animation: fadeUp .4s ease both .05s;
}

.next-up-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--cream-dark);
}

.next-up-title {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.next-up-more {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  letter-spacing: .02em;
  touch-action: manipulation;
}

.next-up-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--cream-dark);
}

.next-up-item:last-child { border-bottom: none; }
.next-up-item.now { background: rgba(201,147,58,.05); }

.next-up-time {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-mid);
  min-width: 40px;
  flex-shrink: 0;
  letter-spacing: .02em;
}

.now-pill {
  background: var(--accent);
  color: var(--primary);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 8px;
  border-radius: 10px;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.next-up-name {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
}

.next-up-item.now .next-up-name { font-weight: 600; }

/* ── 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:last-child:nth-child(odd) { grid-column: 1 / -1; }

.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-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  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;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: 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;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  touch-action: manipulation;
}

.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; }
.question-card   { animation: fadeUp .4s ease both .28s; }
.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;
}

/* ── SKELETON SCREEN ── */
.skeleton-screen { padding-bottom: 80px; }

.skel-hero {
  height: 200px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-mid) 50%, var(--primary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

.skel-section {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skel-row {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--cream-dark) 0%, #e6dcc8 50%, var(--cream-dark) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.skel-row.wide   { width: 100%; }
.skel-row.medium { width: 68%; }
.skel-row.short  { width: 38%; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── ANONYMOUS LANDING ── */
.anon-landing {
  text-align: center;
  padding: 4rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.anon-landing-icon {
  font-size: 3.5rem;
  margin-bottom: .25rem;
}

.anon-landing-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.anon-landing-body {
  font-size: .9rem;
  color: var(--text-mid);
  line-height: 1.65;
  max-width: 280px;
}

/* ── HELP FAB ── */
.help-fab {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
  letter-spacing: .03em;
  transition: transform .1s, box-shadow .1s;
  touch-action: manipulation;
}

.help-fab:active {
  transform: scale(.94);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── ERROR STATE ── */
.error-state {
  text-align: center;
  padding: 4rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-icon { font-size: 2.5rem; }

.error-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
}

.error-body {
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.retry-btn {
  margin-top: .5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
}

/* ── Stake Messages ─────────────────────────────────────────────────────── */
.stake-messages-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.stake-message-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid var(--accent, #c9933a);
  border-radius: 12px;
  padding: 14px 16px;
}

.stake-msg-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }

.stake-msg-body {
  font-size: .93rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
}

/* ── Section label sub-text ─────────────────────────────────────────────── */
.section-label-sub {
  font-size: .72rem;
  color: var(--accent, #c9933a);
  font-weight: 500;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

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

.question-prompt-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  padding: 14px 18px;
}

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

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

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

.question-textarea {
  width: 100%;
  box-sizing: border-box;
  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;
}

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

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

.question-private-note {
  font-size: .7rem;
  color: var(--text-light);
  line-height: 1.3;
  max-width: 180px;
}

.question-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;
  touch-action: manipulation;
  transition: background .2s, transform .1s;
}

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

/* ── QUIZLETS ── */
.quizlets-stack { display: flex; flex-direction: column; gap: 8px; }

.quizlet-card {
  margin: 0 16px;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.quizlet-card.answered {
  opacity: .85;
}

.quizlet-question {
  background: linear-gradient(135deg, #3a2060 0%, #261444 100%);
  padding: 16px 18px;
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--white);
  line-height: 1.45;
}

.quizlet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

.quizlet-option {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: var(--text-dark);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .15s, background .15s;
  line-height: 1.4;
}

.quizlet-option:active { transform: scale(.98); }

.quizlet-option.selected {
  background: #ede8f7;
  border-color: #7c4dbd;
  color: #3a1a80;
  font-weight: 500;
}

.quizlet-input {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
  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);
  outline: none;
  transition: border-color .2s;
}

.quizlet-input:focus { border-color: #7c4dbd; }
.quizlet-input::placeholder { color: rgba(74,74,106,.45); }

.quizlet-submit-btn {
  display: block;
  margin: 12px 16px 16px;
  background: #3a2060;
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .2s, transform .1s;
}

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

.quizlet-msg {
  margin: 0 16px 12px;
  font-size: .78rem;
  color: #c0392b;
}

.quizlet-submitted {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quizlet-result-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 12px;
  border-radius: 20px;
  align-self: flex-start;
}

.quizlet-result-badge.qz-correct {
  background: rgba(46,125,94,.12);
  color: var(--green);
}

.quizlet-result-badge.qz-wrong {
  background: rgba(192,57,43,.1);
  color: #c0392b;
}

.quizlet-your-answer {
  font-size: .82rem;
  color: var(--text-mid);
}

.quizlet-correct-answer {
  font-size: .82rem;
  color: var(--green);
  font-weight: 500;
}

/* ── STANDINGS ── */
.standings-list { padding: 0 16px 100px; }
.standing-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  margin-bottom: 10px; background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e8e8e8);
  transition: background .15s;
}
.standing-row.my-company {
  border-color: var(--accent, #9b72cf);
  background: color-mix(in srgb, var(--accent, #9b72cf) 8%, #fff);
}
.standing-medal { font-size: 1.4rem; width: 2rem; text-align: center; flex-shrink: 0; }
.standing-emoji { font-size: 1.3rem; flex-shrink: 0; }
.standing-name  { flex: 1; font-weight: 500; font-size: .95rem; }
.standing-pts   { font-size: 1.2rem; font-weight: 700; color: var(--primary, #1a2744); }
.standing-pts-label { font-size: .7rem; font-weight: 400; color: #888; }
