/* ── Bible Nightly — App Styles ───────────────────────────────────────────── */
:root {
  --bg:          #0c0e14;
  --bg2:         #121520;
  --bg3:         #1a1e2e;
  --border:      #252a3a;
  --gold:        #c9933a;
  --gold-light:  #e8b86d;
  --bronze:      #8b6914;
  --blue-deep:   #1a2540;
  --blue-mid:    #253761;
  --text:        #dce4f0;
  --text-dim:    #8a94a8;
  --text-muted:  #555d70;
  --accent:      #4a7fcb;
  --green:       #3a8a5c;
  --red:         #a03030;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Georgia", serif; font-size: 16px; line-height: 1.6; }
a { color: var(--gold); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; min-height: 100vh; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.screen { display: none; flex-direction: column; flex: 1; padding: 24px 0 80px; }
.screen.active { display: flex; }

/* ── Nav ───────────────────────────────────────────────────────────────────── */
#nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 680px; background: var(--bg2); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 8px 0 12px; z-index: 100; }
#nav.hidden { display: none; }
.nav-btn { background: none; border: none; color: var(--text-muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 12px; transition: color .2s; }
.nav-btn .nav-icon { font-size: 20px; }
.nav-btn.active { color: var(--gold); }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; font-weight: 600; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.passage-ref { font-size: .85rem; color: var(--gold); font-style: italic; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.card + .card { margin-top: 12px; }
.card-gold { border-color: var(--bronze); background: linear-gradient(135deg, var(--bg2) 0%, #1c1a0e 100%); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 8px; padding: 13px 24px; font-size: .95rem; font-weight: 600; transition: all .15s; }
.btn-primary { background: var(--gold); color: #0c0e14; }
.btn-primary:hover { background: var(--gold-light); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost { background: none; color: var(--text-dim); border: 1px solid var(--border); }
.btn-block { width: 100%; }
.btn + .btn { margin-top: 10px; }

/* ── Progress Bar ──────────────────────────────────────────────────────────── */
.progress-track { background: var(--bg3); border-radius: 99px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bronze), var(--gold)); transition: width .4s ease; }
.progress-fill.blue { background: linear-gradient(90deg, #253761, var(--accent)); }

/* ── Onboarding ────────────────────────────────────────────────────────────── */
#screen-onboard { justify-content: center; gap: 28px; padding: 40px 0; }
.onboard-step { display: none; flex-direction: column; gap: 20px; }
.onboard-step.active { display: flex; }
.onboard-logo { font-size: 2.8rem; text-align: center; }
.onboard-title { text-align: center; }
.onboard-subtitle { text-align: center; color: var(--text-dim); font-size: .95rem; }
.option-grid { display: flex; flex-direction: column; gap: 10px; }
.option-btn { background: var(--bg3); border: 2px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-align: left; color: var(--text); font-size: .95rem; transition: all .2s; }
.option-btn:hover, .option-btn.selected { border-color: var(--gold); color: var(--gold-light); background: #1a1606; }
.option-btn .opt-title { font-weight: 600; display: block; }
.option-btn .opt-desc { font-size: .8rem; color: var(--text-dim); margin-top: 2px; display: block; }

/* ── Home ──────────────────────────────────────────────────────────────────── */
.home-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 4px; }
.streak-badge { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: .8rem; color: var(--gold); display: flex; align-items: center; gap: 5px; }
.continue-card { background: linear-gradient(135deg, var(--blue-deep), var(--bg2)); border: 1px solid var(--blue-mid); }
.continue-card .journey-name { color: var(--gold); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.continue-card h2 { font-size: 1.4rem; margin: 6px 0 4px; }
.continue-card .meta { font-size: .82rem; color: var(--text-dim); margin-bottom: 16px; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat-card .stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.stat-card .stat-sub { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }
.prayer-prompt { background: var(--bg2); border-left: 3px solid var(--blue-mid); border-radius: var(--radius); padding: 14px 16px; font-size: .88rem; font-style: italic; color: var(--text-dim); }
.catchup-card { background: var(--bg2); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: 18px; }

/* ── Reading ───────────────────────────────────────────────────────────────── */
.reading-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.back-btn { background: none; border: none; color: var(--text-dim); font-size: 1.3rem; padding: 4px; }
.reading-meta { flex: 1; }
.reading-mode-toggle { display: flex; background: var(--bg3); border-radius: 8px; padding: 3px; gap: 3px; margin-bottom: 20px; }
.mode-btn { flex: 1; background: none; border: none; color: var(--text-dim); padding: 7px 4px; font-size: .78rem; border-radius: 6px; transition: all .2s; }
.mode-btn.active { background: var(--bg); color: var(--gold); }
.story-content { font-size: 1.05rem; line-height: 1.85; color: var(--text); }
.story-content p { margin-bottom: 1.2em; }
.scripture-block { background: var(--bg3); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 16px 18px; margin: 24px 0; font-size: .92rem; font-style: italic; color: var(--text-dim); line-height: 1.7; }
.scripture-ref { display: block; margin-top: 8px; font-size: .78rem; color: var(--gold); font-style: normal; }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ── End of Night ──────────────────────────────────────────────────────────── */
.eon-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.eon-section h3 { color: var(--gold); margin-bottom: 10px; font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; }
.question-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.question-list li { padding: 12px 14px; background: var(--bg3); border-radius: 8px; font-size: .92rem; border-left: 2px solid var(--border); }
.reflection-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: inherit; font-size: .92rem; padding: 12px; resize: vertical; min-height: 80px; }
.reflection-input:focus { outline: none; border-color: var(--gold); }
.prayer-text { font-style: italic; color: var(--text-dim); line-height: 1.75; font-size: .95rem; }

/* ── Armor ─────────────────────────────────────────────────────────────────── */
.armor-piece { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.armor-piece:last-child { border-bottom: none; }
.armor-icon { font-size: 1.6rem; width: 36px; text-align: center; }
.armor-info { flex: 1; }
.armor-name { font-size: .92rem; font-weight: 600; }
.armor-verse { font-size: .72rem; color: var(--text-muted); margin-top: 2px; font-style: italic; }
.armor-pct { font-size: .85rem; color: var(--gold); font-weight: 700; min-width: 36px; text-align: right; }
.armor-bar { margin-top: 6px; height: 4px; }
.armor-weakest .armor-name { color: var(--gold); }
.weekly-challenge { background: linear-gradient(135deg, #111820, #0c1218); border: 1px solid var(--blue-mid); border-radius: var(--radius); padding: 16px; margin-top: 14px; }

/* ── Levels ────────────────────────────────────────────────────────────────── */
.level-hero { text-align: center; padding: 20px 0; }
.level-badge { display: inline-flex; flex-direction: column; align-items: center; background: var(--bg3); border: 2px solid var(--gold); border-radius: 50%; width: 90px; height: 90px; justify-content: center; margin-bottom: 12px; }
.level-num { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.level-name { font-size: .72rem; color: var(--text-dim); }
.level-ladder { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ladder-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; opacity: .5; }
.ladder-item.reached { opacity: 1; }
.ladder-item.current { border-color: var(--gold); background: #1a1606; opacity: 1; }
.ladder-num { font-size: .8rem; font-weight: 700; color: var(--text-muted); min-width: 22px; }
.ladder-name { font-size: .92rem; font-weight: 600; flex: 1; }
.ladder-check { color: var(--gold); font-size: 1.1rem; }

/* ── Journeys ──────────────────────────────────────────────────────────────── */
.journey-card { padding: 16px; cursor: pointer; }
.journey-card:hover { border-color: var(--gold); }
.journey-type { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 4px; }
.journey-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.journey-desc { font-size: .82rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 12px; }
.journey-meta { display: flex; gap: 10px; font-size: .75rem; color: var(--text-muted); }
.journey-badge { background: var(--bg3); border-radius: 4px; padding: 2px 7px; }
.journey-badge.active { background: var(--blue-deep); color: var(--gold); }
.journey-badge.paused { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Notes ─────────────────────────────────────────────────────────────────── */
.note-card { padding: 14px; margin-bottom: 10px; }
.note-type { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.note-content { font-size: .9rem; color: var(--text); line-height: 1.6; }
.note-meta { font-size: .72rem; color: var(--text-muted); margin-top: 8px; }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }
.text-sm { font-size: .85rem; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.spinner { text-align: center; padding: 40px; color: var(--text-muted); font-size: .9rem; }

/* ── Auth Screen ──────────────────────────────────────────────────────────── */
.auth-container { max-width: 340px; margin: 0 auto; padding-top: 60px; }
.auth-field { margin-bottom: 16px; }
.auth-field .label { margin-bottom: 6px; display: block; }
.auth-input {
  width: 100%; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius); font-size: 1rem; font-family: inherit;
  outline: none; transition: border-color .2s;
}
.auth-input:focus { border-color: var(--gold); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-error { color: var(--red); font-size: .85rem; margin-bottom: 12px; padding: 8px 12px; background: rgba(160,48,48,.15); border-radius: var(--radius); }
