/* The First Light Chant app: black and gold. Mobile first. */
:root {
  --bg: #0a0806; --bg2: #14100b; --card: #1a140d; --line: #2c2317;
  --gold: #d8b25a; --gold2: #f3d27a; --gold-deep: #a87b2c;
  --text: #f4eee2; --muted: #b6aa95; --dim: #7d7262;
  --ok: #6fbf73; --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); font-family: 'Montserrat', Arial, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--gold2); }
.wrap { max-width: 560px; margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(96px + var(--safe-bottom)); }
.hidden { display: none !important; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { font-family: 'Cinzel', serif; font-size: 15px; letter-spacing: 1px; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--gold); flex: 0 0 38px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 0; }

/* Home banner */
.hero { border-radius: 20px; padding: 26px 20px; text-align: center; margin-bottom: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(243,210,122,.28), transparent 65%), linear-gradient(180deg, #1d160d, #0f0b07);
  border: 1px solid #3a2d17; overflow: hidden; }
/* Sunrise strip at the top of the banner (Unsplash) */
.hero-img { position: relative; height: 150px; margin: -26px -20px 16px; background: #1d160d url(img/hero.jpg) center 55% / cover; }
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29,22,13,0) 45%, #1c150c 100%); }
.hero h1 { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(24px, 7vw, 32px); letter-spacing: 2px; color: var(--gold2); line-height: 1.15; }
.hero p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.streak { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: rgba(0,0,0,.25); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pill.on { border-color: var(--gold-deep); color: var(--gold2); }
.cta { display: block; width: 100%; margin-top: 16px; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 15px;
  background: linear-gradient(180deg, var(--gold2), var(--gold-deep)); color: #1b1305; }

/* Card grid */
.section-title { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 2px; color: var(--gold); margin: 22px 2px 10px; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); text-align: left; display: flex; flex-direction: column; min-height: 190px; }
.cover { position: relative; flex: 1; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.cover svg { width: 46%; max-width: 86px; height: auto; opacity: .95; }
.card .meta { padding: 10px 12px 12px; }
.card .meta small { display: block; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--gold); font-weight: 700; opacity: .85; }
.card .meta b { display: block; margin-top: 3px; font-family: 'Cinzel', serif; font-size: 15px; line-height: 1.25; color: var(--text); }
.card .bar { height: 3px; background: var(--line); margin-top: 8px; border-radius: 3px; overflow: hidden; }
.card .bar i { display: block; height: 100%; background: var(--gold); }
.card.locked .cover { filter: grayscale(.55) brightness(.55); }
.lock { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; color: var(--gold2); }
.card.wide { grid-column: span 2; min-height: 150px; flex-direction: row; }
.card.wide .cover { flex: 0 0 42%; }
.card.wide .meta { display: flex; flex-direction: column; justify-content: center; }

/* Cover photos (Unsplash License) */
.cover.photo { background: #120d08; overflow: hidden; min-height: 128px; }
.cover.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,20,13,0) 60%, rgba(26,20,13,.55) 100%); }
.card.wide .cover.photo::after { background: linear-gradient(90deg, rgba(26,20,13,0) 62%, rgba(26,20,13,.75) 100%); }
.card .lock { z-index: 2; }
.mhead { position: relative; height: 210px; border-radius: 18px; overflow: hidden; margin: 4px 0 18px; border: 1px solid var(--line); background: #120d08; }
.mhead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mhead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,6,0) 35%, rgba(10,8,6,.9) 100%); }
.mhead .mtxt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.mhead small { color: var(--gold2); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.mhead h2 { font-family: 'Cinzel', serif; font-size: clamp(22px, 6vw, 28px); line-height: 1.2; margin-top: 4px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.mhead.locked img { filter: grayscale(.5) brightness(.6); }
.mhead .lock { z-index: 2; }

/* Cover themes (used when a card has no photo) */
.t-gate   { background: radial-gradient(circle at 50% 35%, #f8e3a3 0, #a77a2a 28%, #2a1d0c 62%, #120c06 100%); }
.t-harp   { background: radial-gradient(circle at 50% 40%, #ffe7b0 0, #c88f3d 25%, #4a2a1a 60%, #160d08 100%); }
.t-stone  { background: radial-gradient(circle at 50% 50%, #e8c66f 0, #6b5a3a 26%, #2b2620 58%, #0f0d0b 100%); }
.t-roots  { background: radial-gradient(circle at 50% 30%, #f6e2a0 0, #8b6b2c 30%, #1f1a0e 70%); }
.t-dawn   { background: linear-gradient(180deg, #2b1b33 0%, #a2583a 45%, #f2c46c 70%, #1a120a 100%); }
.t-diary  { background: radial-gradient(circle at 50% 40%, #cfe0f6 0, #4a6a9a 30%, #18233a 68%, #0b0f18 100%); }
.t-crown  { background: radial-gradient(circle at 50% 40%, #b9f0c9 0, #2f7a52 30%, #10261a 70%); }
.t-chalice{ background: radial-gradient(circle at 50% 40%, #fff1d1 0, #c76b4b 30%, #4a1810 65%, #170806 100%); }
.t-hearts { background: radial-gradient(circle at 50% 40%, #ffd6ea 0, #a45394 30%, #3b1645 65%, #140716 100%); }
.t-throne { background: radial-gradient(circle at 50% 40%, #f1dcff 0, #7d4bb3 30%, #2a1446 65%, #0e0717 100%); }

/* Item list */
.page-head { margin: 6px 0 16px; }
.page-head small { color: var(--gold); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.page-head h2 { font-family: 'Cinzel', serif; font-size: clamp(22px, 6vw, 28px); line-height: 1.2; margin-top: 4px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.5; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.row .num { flex: 0 0 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold-deep); color: var(--gold2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.row.done .num { background: var(--gold-deep); color: #1b1305; }
.row .info { flex: 1; min-width: 0; }
.row .info b { display: block; font-size: 15px; line-height: 1.3; }
.row .info small { color: var(--dim); font-size: 12px; }
.row .chev { color: var(--dim); }

/* Item page (lesson, prayer, e-book) */
.player { border-radius: 18px; padding: 18px; border: 1px solid #3a2d17; background: linear-gradient(180deg, #1d160d, #110d08); margin-bottom: 16px; }
.player audio { width: 100%; margin-top: 10px; }
.player .soon { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; line-height: 1.5; }
.player .tip { margin-top: 10px; color: var(--dim); font-size: 12px; }
.prose { font-family: 'Lora', Georgia, serif; font-size: 18px; line-height: 1.75; color: #ece4d3; }
.prose p { margin: 0 0 16px; }
.prose h3 { font-family: 'Cinzel', serif; font-size: 18px; color: var(--gold2); margin: 26px 0 10px; line-height: 1.3; }
.prose strong { color: #fff6e4; }
details.read { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; background: var(--bg2); }
details.read summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--gold); font-size: 14px; list-style: none; }
details.read summary::-webkit-details-marker { display: none; }
details.read[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.task { margin-top: 16px; border-radius: 14px; padding: 16px; border: 1px dashed var(--gold-deep); background: rgba(216,178,90,.07); }
.task small { color: var(--gold); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; }
.task div { margin-top: 6px; font-family: 'Lora', serif; font-size: 16px; line-height: 1.6; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.btn { flex: 1; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 14px; border: 1px solid var(--gold-deep); color: var(--gold2); }
.btn.solid { background: linear-gradient(180deg, var(--gold2), var(--gold-deep)); color: #1b1305; border: 0; }
.btn.ok { background: rgba(111,191,115,.12); border-color: var(--ok); color: var(--ok); }

/* Journal */
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.goal { border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 14px 8px; text-align: center; }
.goal b { display: block; font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold2); }
.goal small { color: var(--muted); font-size: 11px; }
.goal.on { border-color: var(--gold-deep); background: rgba(216,178,90,.1); }
.form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.form label { font-size: 13px; color: var(--muted); font-weight: 600; }
.form textarea, .form input { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 12px; font: 16px/1.5 'Lora', serif; }
.form textarea { min-height: 90px; resize: vertical; }
.entry { border-left: 2px solid var(--gold-deep); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.entry small { color: var(--gold); font-size: 12px; font-weight: 700; }
.entry p { font-family: 'Lora', serif; font-size: 15px; line-height: 1.55; margin-top: 4px; color: #e6dccb; }

/* Entry screen and locked pages */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.gate-box { width: 100%; max-width: 420px; text-align: center; }
.gate-box img { width: 74px; height: 74px; border-radius: 18px; }
.gate-box h1 { font-family: 'Cinzel', serif; color: var(--gold2); font-size: 26px; margin-top: 16px; letter-spacing: 1.5px; }
.gate-box p { color: var(--muted); margin-top: 10px; line-height: 1.5; font-size: 15px; }
.gate-box input { width: 100%; margin-top: 20px; padding: 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 16px; }
.gate-box .err { color: #e6847a; font-size: 13px; margin-top: 8px; min-height: 18px; }
.sheet { border-radius: 18px; padding: 22px 18px; border: 1px solid #3a2d17; background: linear-gradient(180deg, #1d160d, #110d08); text-align: center; }
.sheet p { color: var(--muted); line-height: 1.6; font-size: 15px; margin-top: 8px; }

/* Bottom bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(10,8,6,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar button { padding: 10px 0 9px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--dim); }
.tabbar button.on { color: var(--gold2); }
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-bottom)); transform: translateX(-50%); background: #2a2014; color: var(--gold2); border: 1px solid var(--gold-deep); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 30; max-width: 90vw; }
@media (min-width: 520px) { .grid { gap: 14px; } .card { min-height: 220px; } }

/* Ritual in 3 steps, prayer of the day */
.t-candle { background: radial-gradient(circle at 50% 38%, #fff4cf 0, #e0a548 22%, #5a3216 55%, #140b06 100%); }
.t-shield { background: radial-gradient(circle at 50% 40%, #e3ecff 0, #4f6fa8 30%, #1a2440 66%, #0a0e18 100%); }
.t-star   { background: radial-gradient(circle at 50% 38%, #fff7da 0, #c9a24a 24%, #2b2347 60%, #0c0a16 100%); }
.player.chant .count { font-family: 'Cinzel', serif; color: var(--gold2); font-size: 15px; letter-spacing: 1px; text-align: center; }
.step { border-radius: 16px; border: 1px solid var(--line); background: var(--card); padding: 14px; margin-bottom: 12px; }
.step.on { border-color: var(--gold-deep); background: linear-gradient(180deg, #1d160d, #110d08); }
.step.next { opacity: .5; }
.step .player { margin: 14px 0 0; }
.step-head { display: flex; gap: 12px; align-items: center; }
.step-head .step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold-deep); color: var(--gold2); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step.done .step-n { background: var(--gold-deep); color: #1b1305; }
.step-head b { display: block; font-family: 'Cinzel', serif; font-size: 16px; color: var(--text); }
.step-head small { color: var(--muted); font-size: 12px; }
.step .prose.prayer, .prose.prayer { font-size: 17px; margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 12px; }
.row.today { border-color: var(--gold-deep); }
.row.today .info small { color: var(--gold2); font-weight: 700; }
.done-box { margin-top: 6px; }

/* Upsell cards while the audios are being recorded */
.intro { color: var(--muted); font-size: 15px; line-height: 1.6; margin: -4px 2px 16px; }
.soon-note { margin-bottom: 14px; padding: 14px 16px; text-align: left; }
.soon-note p { margin-top: 0; font-size: 14px; }
.soon-row { cursor: default; }
.soon-row .info small { line-height: 1.45; margin-top: 3px; }
.bonus-locked { opacity: .6; }
.lock.inline { position: static; width: auto; height: auto; background: none; }

/* Kate's photo: above the audio players and on the profile page */
.voice { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.voice img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(216,178,90,.18); flex: 0 0 52px; }
.voice b { display: block; font-family: 'Cinzel', serif; font-size: 15px; color: var(--gold2); }
.voice small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.guide { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 14px; border-radius: 16px; border: 1px solid #3a2d17; background: linear-gradient(180deg, #1d160d, #110d08); }
.guide img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(216,178,90,.18); flex: 0 0 76px; }
.guide small { display: block; color: var(--gold); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.guide b { display: block; font-family: 'Cinzel', serif; font-size: 19px; color: var(--text); margin-top: 2px; }
.guide em { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; font-style: italic; }

/* Item covers (upsell lessons and prayers) */
.row .thumb { position: relative; flex: 0 0 58px; height: 58px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #120d08; }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row .thumb i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(168,123,44,.75); color: #1b1305; font-style: normal; font-weight: 700; font-size: 20px; }
.mhead.item { height: 190px; }
