/* Praykin — mockup reskin (Oct 2026).
   Auth: warm ivory light theme. App: deep warm black + brushed gold. */
:root {
  --bg: #0D0B08;
  --card: #171310;
  --card-2: #201915;
  --gold: #E9B44C;
  --ember: #E2703A;
  --gold-grad: linear-gradient(135deg, #E9B44C, #E2703A);
  --ink: #F5EDE2;
  --muted: #A89B8A;
  --line: rgba(233, 180, 76, 0.16);
  --cream: #FFF9F2;
  --cream-ink: #2A2118;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #000;
  color: var(--ink);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
#phone {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
}
.view { display: flex; flex-direction: column; flex: 1; min-height: 100vh; }
[hidden] { display: none !important; }

/* ---------- Splash / auth (light ivory, per mockup) ---------- */
#view-auth { background: var(--cream); color: var(--cream-ink); }
.splash { padding: 48px 28px 32px; text-align: center; }
.logo-img { width: 120px; height: 120px; object-fit: contain; margin: 16px auto 4px; display: block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.wordmark { font-size: 44px; font-weight: 900; margin: 4px 0; letter-spacing: -1px; color: var(--cream-ink); }
.wordmark.small { font-size: 24px; color: var(--gold); }
.tagline { color: #6B5D4F; font-weight: 700; margin: 0 0 24px; }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 18px rgba(42,33,24,.08); padding: 20px; text-align: left; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab { flex: 1; border: none; background: #F7EDE0; padding: 10px; border-radius: 12px; font-weight: 800; font-family: inherit; cursor: pointer; color: #6B5D4F; }
.auth-tab.active { background: var(--gold-grad); color: #fff; }
#view-auth input, #view-auth textarea {
  width: 100%; border: 2px solid #F7EDE0; border-radius: 12px;
  padding: 12px; font-family: inherit; font-size: 15px; margin-bottom: 10px;
  background: #fff; color: var(--cream-ink);
}
#view-auth input:focus, #view-auth textarea:focus { outline: none; border-color: var(--ember); }
.error { color: #C0392B; font-weight: 700; }
.demo-hint { font-size: 12px; color: #6B5D4F; text-align: center; margin: 12px 0 0; }

/* ---------- Shared controls (dark app) ---------- */
input, textarea {
  width: 100%; border: 2px solid #2c241c; border-radius: 12px;
  padding: 12px; font-family: inherit; font-size: 15px; margin-bottom: 10px;
  background: #100d0a; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--ember); }
input::placeholder, textarea::placeholder { color: #6f6355; }
textarea { resize: vertical; }
.btn-primary {
  background: var(--gold-grad); color: #241a08; border: none; border-radius: 14px;
  padding: 13px 20px; font-weight: 900; font-family: inherit; font-size: 16px;
  cursor: pointer; width: 100%;
}
.btn-primary.sm, .btn-ghost.sm { width: auto; padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: transparent; border: 2px solid #2c241c; border-radius: 14px; padding: 11px 18px; font-weight: 800; font-family: inherit; cursor: pointer; color: var(--muted); }
.btn-danger { background: #C0392B; color: #fff; border: none; border-radius: 14px; padding: 10px 18px; font-weight: 800; font-family: inherit; cursor: pointer; }

/* ---------- App shell ---------- */
#app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(13, 11, 8, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.logo-small { display: flex; align-items: center; gap: 8px; }
.logo-small img { border-radius: 8px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.btn-live { background: transparent; border: 2px solid #C0392B; color: #e88; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-family: inherit; cursor: pointer; font-size: 13px; }
.icon-btn { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 18px; cursor: pointer; font-family: inherit; color: var(--ink); position: relative; }
.icon-btn.dark { background: var(--card-2); }
.icon-btn.big { font-size: 26px; }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  background: var(--ember); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.tab { padding: 14px 14px 96px; flex: 1; }
.tab h2 { margin: 4px 0 12px; color: var(--ink); }
.tab h3.rail-title { margin: 0; color: var(--ink); font-size: 17px; }
#bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex;
  background: rgba(16, 13, 10, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0,0,0,.5);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
  backdrop-filter: blur(8px);
}
.nav-btn { flex: 1; background: none; border: none; font-family: inherit; cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 20px; padding: 4px 2px; min-width: 0; }
.nav-btn small { font-size: 10px; font-weight: 800; text-align: center; line-height: 1.25; }
.nav-btn.active { color: var(--gold); }

/* ---------- Following / Global pills ---------- */
.feed-toggle { display: flex; gap: 10px; margin-bottom: 14px; }
.scope-pill {
  border: none; border-radius: 999px; padding: 10px 26px;
  font-family: inherit; font-weight: 900; font-size: 15px; cursor: pointer;
  background: transparent; color: var(--muted);
}
.scope-pill.active { background: var(--gold-grad); color: #241a08; box-shadow: 0 2px 12px rgba(233, 180, 76, 0.35); }

/* ---------- Cards / feed ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 12px; border: 1px solid rgba(233, 180, 76, 0.08);
  position: relative;
}
.card.post::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(233,180,76,.55), transparent);
  border-radius: 2px; pointer-events: none;
}
.verse { border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.verse .ref { display: block; margin-top: 6px; color: var(--gold); font-size: 13px; }
.verse-full { text-align: center; padding: 40px 24px; border: 1px solid var(--line); }
.verse-full .vtext { font-size: 24px; line-height: 1.6; font-weight: 700; }
.verse-full .vref { display: block; margin-top: 16px; color: var(--gold); font-weight: 900; font-size: 18px; }
.center { text-align: center; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex-shrink: 0; border: 1px solid var(--line); }
.avatar.sm { width: 32px; height: 32px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .name { font-weight: 800; font-size: 15px; color: var(--ink); }
.post-head .time { color: var(--muted); font-size: 12px; }
.demo-tag { font-size: 10px; background: var(--card-2); color: var(--muted); border-radius: 6px; padding: 2px 6px; font-weight: 800; }
.post-body { font-size: 16px; line-height: 1.55; margin: 6px 0 10px; white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.post-media { width: 100%; border-radius: 12px; margin-bottom: 10px; max-height: 520px; object-fit: cover; display: block; }
video.post-media { background: #000; }

/* Mockup-style 3-column action row */
.post-actions3 { display: flex; gap: 8px; margin-top: 6px; }
.pa-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pa-btn {
  width: 100%; background: var(--card-2); border: 1px solid #2c241c; border-radius: 14px;
  padding: 10px 0; font-size: 22px; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: transform .1s;
}
.pa-btn:active { transform: scale(1.08); }
.pa-btn.on { border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(233, 180, 76, 0.35); background: #241b0e; }
.pa-label { font-size: 12px; font-weight: 800; color: var(--gold); text-align: center; line-height: 1.3; }
.comments-link { background: none; border: none; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 8px; padding: 4px 0; }
.repost-box { border-left: 3px solid var(--gold); margin: 8px 0; background: var(--card-2); border-radius: 0 10px 10px 0; padding: 8px 10px 8px 12px; }
.comments { margin-top: 8px; border-top: 1px dashed #2c241c; padding-top: 8px; }
.comment { display: flex; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.comment .cbody { background: var(--card-2); border-radius: 12px; padding: 8px 12px; flex: 1; }
.comment .cbody b { font-size: 13px; }
.comment-form { display: flex; gap: 8px; margin-top: 6px; }
.comment-form input { margin-bottom: 0; }

/* ---------- Stories ---------- */
.stories-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; }
.story-circle { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; font-family: inherit; cursor: pointer; min-width: 64px; }
.story-ring { width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: var(--gold-grad); }
.story-ring.viewed { background: #2c241c; }
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); display: block; }
.story-circle small { font-size: 11px; font-weight: 700; color: var(--muted); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-add { width: 62px; height: 62px; border-radius: 50%; background: var(--card-2); border: 2px dashed var(--muted); font-size: 24px; color: var(--muted); cursor: pointer; font-family: inherit; }

/* ---------- Clips rail ---------- */
.clips-rail-wrap { margin-bottom: 6px; }
.clips-rail { display: flex; gap: 10px; overflow-x: auto; padding: 10px 2px 12px; }
.clip-tile {
  min-width: 96px; width: 96px; border-radius: 14px; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--line);
  cursor: pointer; font-family: inherit; padding: 0; color: var(--ink);
}
.clip-thumb { position: relative; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: linear-gradient(160deg, #2a1f14, #171310); }
.clip-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-play { position: relative; z-index: 1; font-size: 18px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.clip-share { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.clip-tile small { display: block; padding: 6px 8px; font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-tile.add .clip-thumb { font-size: 34px; color: var(--gold); }

/* ---------- Watch ---------- */
.watch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.clip { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: #1c1510; aspect-ratio: 9/14; max-height: 72vh; box-shadow: var(--shadow); }
.clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-demo-bg { position: absolute; inset: 0; background: linear-gradient(160deg, #E2703A, #7C5CBF 55%, #2A2118); background-size: 200% 200%; animation: drift 8s ease-in-out infinite; display: flex; align-items: center; justify-content: center; }
@keyframes drift { 0%,100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.clip-demo-bg .big { font-size: 64px; }
.clip-rail { position: absolute; right: 8px; bottom: 70px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.rail-btn { background: rgba(0,0,0,.45); border: none; border-radius: 50%; width: 48px; height: 48px; font-size: 20px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: inherit; }
.rail-btn small { font-size: 10px; font-weight: 800; }
.rail-btn.on { color: var(--gold); }
.clip-caption { position: absolute; left: 12px; right: 70px; bottom: 12px; color: #fff; z-index: 3; text-shadow: 0 1px 6px rgba(0,0,0,.6); font-size: 14px; }
.clip-caption .who { font-weight: 800; margin-bottom: 4px; }

/* ---------- Prayer ---------- */
.chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { border: 2px solid #2c241c; background: var(--card); border-radius: 999px; padding: 7px 16px; font-weight: 800; font-family: inherit; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--gold-grad); color: #241a08; border-color: transparent; }
.pray-btn { background: var(--gold-grad); color: #241a08; border: none; border-radius: 999px; padding: 9px 20px; font-weight: 900; font-family: inherit; cursor: pointer; font-size: 15px; }
.pray-btn.off { background: var(--card-2); color: var(--muted); }
.answered-banner { background: linear-gradient(135deg, #E9B44C, #E2703A); color: #241a08; border-radius: 12px; padding: 10px 14px; font-weight: 900; margin-bottom: 8px; }
.testimony { background: #241b0e; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-style: italic; margin: 8px 0; font-size: 14px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.check input { width: auto; margin: 0; }
.composer-actions { display: flex; align-items: center; gap: 10px; }
.file-hint { font-size: 12px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; }
.space-between { justify-content: space-between; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- Groups ---------- */
.group-card { cursor: pointer; }
.group-card .gname { font-weight: 900; font-size: 17px; color: var(--ink); }
.group-card .gmeta { color: var(--gold); font-size: 13px; font-weight: 800; margin: 2px 0 6px; }
.group-card .gdesc { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #241d15; }
.member-row .mname { font-weight: 800; font-size: 14px; }
.member-row .mhandle { color: var(--muted); font-size: 12px; }

/* ---------- Story viewer / live ---------- */
#story-viewer, #live-overlay { position: fixed; inset: 0; background: #000; z-index: 100; display: flex; align-items: center; justify-content: center; }
#story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; z-index: 102; }
.seg { flex: 1; height: 4px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.seg > i { display: block; height: 100%; width: 0; background: #fff; }
#story-close { position: absolute; top: 24px; right: 14px; z-index: 102; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
#story-media img, #story-media video { max-width: 100%; max-height: 100vh; display: block; }
.story-nav { position: absolute; top: 0; bottom: 0; width: 30%; background: none; border: none; color: transparent; z-index: 101; cursor: pointer; }
#story-prev { left: 0; } #story-next { right: 0; }
#story-user { position: absolute; top: 34px; left: 14px; color: #fff; font-weight: 800; z-index: 102; text-shadow: 0 1px 4px #000; }
.live-setup { max-width: 340px; margin: 20px; text-align: center; }
.live-setup h3, .live-setup p { color: var(--ink); }
.demo-badge { background: var(--gold); color: #241a08; font-size: 11px; border-radius: 6px; padding: 2px 8px; vertical-align: middle; }
#live-stage { position: absolute; inset: 0; }
#live-video { width: 100%; height: 100%; object-fit: cover; }
.live-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; color: #fff; z-index: 2; }
.live-badge { background: #C0392B; border-radius: 8px; padding: 4px 12px; font-weight: 800; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
#live-comments { position: absolute; left: 14px; bottom: 90px; right: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 2; pointer-events: none; }
.live-comment { background: rgba(0,0,0,.55); color: #fff; border-radius: 12px; padding: 6px 12px; font-size: 13px; width: fit-content; max-width: 90%; }
.live-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; display: flex; gap: 8px; z-index: 2; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.live-bottom input { margin-bottom: 0; }
.heart-float { position: absolute; bottom: 80px; font-size: 28px; animation: rise 2.2s ease-out forwards; z-index: 3; pointer-events: none; }
@keyframes rise { to { transform: translateY(-220px); opacity: 0; } }

#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #241a08; padding: 10px 20px; border-radius: 999px; font-weight: 800; z-index: 200; font-size: 14px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.profile-top .avatar { width: 72px; height: 72px; }
.profile-top .name { font-weight: 900; font-size: 20px; }
.stat-row { display: flex; gap: 18px; margin: 10px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 18px; color: var(--gold); }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------- Settings ---------- */
#settings-card { margin-bottom: 12px; }
.settings-title { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
a.settings-row, button.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 4px; border-bottom: 1px solid #241d15;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px;
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .chev { color: var(--gold); font-size: 22px; }
.settings-row.danger span:first-child { color: #e88; }
.set-section { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin: 18px 4px 8px; }
.set-group { padding: 4px 14px; }
.set-profile { display: flex; gap: 12px; align-items: center; }
.set-profile .name { font-weight: 900; font-size: 17px; }
.terms-note { font-size: 12px; color: #6B5D4F; text-align: center; margin: 10px 0 0; }
.terms-note a { color: #E2703A; font-weight: 800; }

/* ---------- Live rooms ---------- */
#live-lobby { max-width: 380px; width: calc(100% - 40px); margin: 20px; }
#live-lobby h3 { color: var(--ink); margin: 0 0 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#live-lobby h3 .live-badge { font-size: 12px; }
#live-lobby .btn-ghost { width: 100%; margin-top: 8px; }
#live-room-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 46vh; overflow-y: auto; }
.live-room-row { display: flex; align-items: center; gap: 10px; margin-bottom: 0; padding: 10px 12px; }
.live-room-info { flex: 1; min-width: 0; }
.live-room-title { font-weight: 900; color: var(--ink); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-room-host { color: var(--muted); font-size: 12px; font-weight: 700; }
#live-grid {
  position: absolute; inset: 0;
  display: grid; gap: 6px;
  padding: 54px 10px 160px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-content: center;
}
#live-grid[data-count="1"] { grid-template-columns: minmax(0, 320px); justify-content: center; }
#live-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-tile {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #1c1510; aspect-ratio: 3/4;
  border: 1px solid var(--line);
}
.live-tile video.tile-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-tile video.mirror { transform: scaleX(-1); }
.tile-name {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px; max-width: calc(100% - 16px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile-controls { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; z-index: 3; }
.tile-ctl {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font-size: 15px; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.live-tile.tile-muted::after {
  content: "🔇 muted"; position: absolute; top: 6px; left: 6px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
#live-requests {
  position: absolute; top: 56px; right: 10px; z-index: 4;
  width: min(250px, 60vw); padding: 10px 12px; margin: 0;
  max-height: 40vh; overflow-y: auto;
}
#live-requests h4 { margin: 0 0 8px; color: var(--gold); font-size: 14px; }
.req-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.req-name { flex: 1; font-weight: 800; font-size: 13px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#live-request-join { flex-shrink: 0; }

/* ---------- bible hub (additive) ---------- */
.memory-prompt { font-size: 19px; line-height: 2.1; font-weight: 600; }
.memory-prompt .blank {
  display: inline-block; width: 110px; max-width: 32vw;
  font: inherit; text-align: center; color: var(--ink);
  background: var(--card-2); border: 2px solid var(--line); border-radius: 8px;
  padding: 2px 6px; margin: 0 2px;
}
.memory-prompt .blank:focus { outline: none; border-color: var(--gold); }
.memory-prompt .blank.right { border-color: #4caf7d; background: rgba(76,175,125,.12); }
.memory-prompt .blank.wrong { border-color: #c65d5d; background: rgba(198,93,93,.12); }
.plan-card { cursor: default; }
.progress { height: 8px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s; }
.day-row.done { opacity: .75; }
.done-badge { color: #4caf7d; font-weight: 800; }
.row.center { justify-content: center; }

/* ---------- Bible reader (cream/espresso/ember theme) ---------- */
.verse-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.verse-row:last-child { border-bottom: none; }
.verse-row .vnum { flex: 0 0 auto; min-width: 30px; color: var(--gold); font-weight: 900; font-size: 13px; padding-top: 3px; }
.verse-row .vtext-sm { flex: 1; line-height: 1.65; font-size: 15px; }
.verse-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.verse-actions .btn-ghost { padding: 4px 8px; }
select#bible-translation {
  width: auto; margin: 0 0 0 6px; padding: 6px 10px; font-size: 14px; font-weight: 800;
  border: 2px solid #2c241c; border-radius: 999px; background: var(--card); color: var(--ink);
  font-family: inherit; cursor: pointer;
}
select#bible-translation:focus { outline: none; border-color: var(--ember); }

/* ---------- LIVE discovery (v9): badges, tab, nudge ---------- */
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.avatar-wrap .avatar { display: block; }
.avatar-wrap.avatar-live .avatar { box-shadow: 0 0 0 2px #C0392B, 0 0 0 4px rgba(192,57,43,.30); }
.avatar-wrap.avatar-live::after {
  content: 'LIVE'; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  background: #C0392B; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .6px;
  padding: 1px 6px; border-radius: 5px; line-height: 1.5; white-space: nowrap; z-index: 2;
}
.story-circle { position: relative; }
.story-circle.story-live .story-ring { box-shadow: 0 0 0 2px #C0392B; }
.story-circle.story-live::after {
  content: 'LIVE'; position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: #C0392B; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .6px;
  padding: 1px 6px; border-radius: 5px; line-height: 1.5; z-index: 2;
}
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #C0392B; margin-right: 6px; animation: pulse 1.5s infinite; }
.live-tab-card {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 10px; cursor: pointer; font-family: inherit; color: var(--ink);
}
.live-tab-avatar { position: relative; flex-shrink: 0; }
.live-tab-avatar .avatar { width: 64px; height: 64px; box-shadow: 0 0 0 2px #C0392B; }
.live-pill-big {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  background: #C0392B; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .8px;
  padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.live-tab-info { flex: 1; min-width: 0; }
.live-tab-title { font-weight: 900; font-size: 16px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-tab-host { color: var(--muted); font-size: 13px; }
#live-nudge {
  position: fixed; left: 12px; right: 12px; bottom: 78px; z-index: 90;
  background: var(--card); border: 2px solid #C0392B; border-radius: 14px;
  padding: 12px 14px; font-size: 14px; color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.35); display: flex; align-items: center; gap: 8px;
}
#live-nudge[hidden] { display: none; }

/* ---------- Responsive: adapt the layout to each device ---------- */
/* Tablet: a wider column than phones */
@media (min-width: 700px) {
  #phone, #bottom-nav { max-width: 700px; }
}
/* Desktop / wide screens: full-bleed app shell, readable content column */
@media (min-width: 1100px) {
  #phone { max-width: none; box-shadow: none; }
  #bottom-nav { max-width: none; left: 0; transform: none; justify-content: center; }
  #bottom-nav .nav-btn { flex: 0 1 132px; }
  #app-header { padding-left: 28px; padding-right: 28px; }
  .tab { width: 100%; max-width: 1060px; margin-left: auto; margin-right: auto; }
  .splash { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
  /* Live hub becomes a card grid on wide screens */
  #live-tab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
}

/* PK logo as the Home nav icon */
.nav-logo img { width: 24px; height: 24px; border-radius: 7px; display: block; }

/* Header logo acts as a Home button */
.logo-home { cursor: pointer; }

/* ---------- Profile avatar camera badge (v11) ---------- */
.profile-avatar-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.avatar-cam-badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--gold-grad); border: 2px solid var(--bg);
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
}

/* ---------- Story photo cards (v11, Facebook-style, Praykin identity) ---------- */
.story-card {
  position: relative; width: 112px; min-width: 112px; height: 190px;
  border-radius: 14px; overflow: hidden; border: none; padding: 0;
  cursor: pointer; font-family: inherit; text-align: left;
  background: var(--card-2); box-shadow: 0 0 0 2px var(--gold);
}
.story-card.viewed { box-shadow: 0 0 0 2px #2c241c; }
.story-card.is-live { box-shadow: 0 0 0 2px #C0392B; }
.story-card-media { position: absolute; inset: 0; display: block; }
.story-card-media img, .story-card-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.story-card-initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #241a08; font-weight: 900; font-size: 42px;
}
/* bottom scrim so the name stays legible over any photo */
.story-card::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent 45%);
}
.story-card-avatar { position: absolute; top: 8px; left: 8px; z-index: 2; }
.story-card-avatar .avatar { width: 32px; height: 32px; border: 2px solid rgba(0,0,0,.35); }
.story-card-play {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none;
}
.story-card-name {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; margin: 0;
  color: #fff; font-size: 12px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story-add-card { box-shadow: none; border: 2px dashed var(--gold); background: var(--card-2); }
.story-add-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; width: 100%; height: 100%; cursor: pointer; color: var(--muted);
  position: relative; z-index: 2;
}
.story-add-label small { font-size: 12px; font-weight: 800; }
.story-add-plus {
  width: 44px; height: 44px; border-radius: 50%; background: var(--gold-grad);
  color: #241a08; font-size: 26px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
/* Slightly larger cards on desktop where the row shows more */
@media (min-width: 1100px) {
  .story-card { width: 128px; min-width: 128px; height: 208px; }
}

/* Username field in Edit profile */
.handle-row { display: flex; align-items: center; gap: 8px; }
.handle-row .at { font-weight: 900; color: var(--muted); font-size: 15px; }
.handle-row input { flex: 1; min-width: 0; }

/* ---------- password recovery ---------- */
.forgot-row { text-align: right; margin: 8px 0 0; }
.linklike { background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--gold); cursor: pointer; text-decoration: underline; }
#forgot-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
#forgot-box[hidden] { display: none; }
.ok-note { color: #2e7d32; font-size: 13px; font-weight: 700; }
#reset-card h2 { margin: 0 0 14px; font-size: 20px; color: #3E2A18; }
#reset-card form { display: flex; flex-direction: column; gap: 10px; }
#ar-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #241a08; color: #ffe9c9; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 9999; max-width: 90vw; text-align: center; }
#ar-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Report + block (App Store Guideline 1.2) ---------- */
.card.post { position: relative; }
.post-menu-btn { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; font-family: inherit; align-self: flex-start; }
.post-menu-btn:hover { background: var(--card-2); color: var(--ink); }
.post-menu { position: absolute; top: 46px; right: 12px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); overflow: hidden; min-width: 180px; }
.post-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.post-menu button:hover { background: var(--card-2); }
.comment { position: relative; }
.comment-menu-btn { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; font-family: inherit; flex-shrink: 0; align-self: flex-start; }
.comment-menu-btn:hover { background: var(--card-2); color: var(--ink); }
.report-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.report-card { width: 100%; max-width: 420px; padding: 20px; }
.report-card h3 { margin: 0 0 12px; font-size: 17px; }
.report-reasons { display: grid; gap: 6px; margin-bottom: 12px; }
.report-reasons label { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 4px; }
.report-reasons input[type="radio"] { accent-color: var(--gold); width: 16px; height: 16px; }
.report-card textarea { width: 100%; box-sizing: border-box; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-family: inherit; font-size: 14px; padding: 10px 12px; margin-bottom: 12px; resize: vertical; }
.report-card textarea:focus { outline: none; border-color: var(--gold); }
.report-card .row { justify-content: flex-end; }
.story-report-btn { position: absolute; bottom: 22px; right: 14px; z-index: 102; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; }
.edited-mark { color: var(--muted); font-weight: 600; }
.share-preview { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.share-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.share-rows { display: grid; gap: 6px; margin-bottom: 12px; }
.share-section { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 2px 0; }
.share-row { display: block; width: 100%; text-align: left; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.share-row:hover { border-color: var(--gold); }
.blocked-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.blocked-row .who { flex: 1; min-width: 0; }
.blocked-row .name { font-weight: 800; font-size: 14px; }
.blocked-row .time { color: var(--muted); font-size: 12px; }

/* Composer media preview */
.composer-preview { position: relative; margin-top: 10px; display: inline-block; max-width: 100%; }
.composer-preview[hidden] { display: none; }
.composer-preview img, .composer-preview video { display: block; max-width: 220px; max-height: 160px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; }
.composer-preview-x { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--ember); color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; line-height: 1; }
/* v21: while a picked file stages on the server for its still preview. */
.composer-preview-loading { display: flex; align-items: center; justify-content: center; width: 220px; max-width: 60vw; height: 120px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; font-weight: 700; }

/* ---------- Post options: feelings, audience, share-to-story ---------- */
.composer-actions { flex-wrap: wrap; }
.feeling-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.feeling-row::-webkit-scrollbar { display: none; }
.feeling-row:empty { display: none; }
.feeling-chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }
.feeling-chip.active { border-color: var(--gold); background: var(--gold-grad); color: #241a08; }
.aud-pills { display: flex; gap: 6px; }
.aud-pill { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; font-family: inherit; cursor: pointer; white-space: nowrap; }
.aud-pill.active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,.12); }
.story-toggle { border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; font-family: inherit; cursor: pointer; white-space: nowrap; }
.story-toggle.active { border-style: solid; border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,.12); }
.story-toggle:disabled { opacity: .4; cursor: not-allowed; }
.composer-feeling-tag { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--gold); }
.post-feeling { font-weight: 700; color: var(--gold); font-size: 13px; }
.aud-icon { font-size: 11px; }

/* ---------- v16: live upgrade ---------- */
/* Prominent Stop Live button (host only) */
#live-end.stop-live-big {
  background: #D63A2F; color: #fff; border: none; border-radius: 16px;
  font-size: 17px; font-weight: 900; font-family: inherit;
  padding: 12px 26px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(214, 58, 47, .5);
}
/* Video filter picker (lobby + in-room) */
.filter-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.filter-label { font-weight: 800; color: var(--muted); font-size: 13px; white-space: nowrap; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; flex: 1; }
.filter-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card-2);
  color: var(--ink); border-radius: 999px; padding: 7px 14px;
  font-weight: 800; font-size: 13px; font-family: inherit; cursor: pointer;
}
.filter-chip.active { background: var(--gold-grad); color: #241a08; border-color: transparent; }
#live-filter-panel { position: absolute; bottom: 76px; left: 14px; right: 14px; z-index: 3; padding: 10px 12px; }
#live-filter-panel[hidden] { display: none; }
/* Replays */
#live-recordings-list { display: grid; gap: 12px; margin-top: 4px; }
.replay-card { padding: 10px; }
.replay-video { width: 100%; border-radius: 12px; background: #000; max-height: 320px; }
.replay-info { padding: 8px 4px 2px; }
.replay-title { font-weight: 800; }
.replay-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (min-width: 1100px) {
  #live-recordings-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* ---------- Direct messages + notification options (v24) ---------- */
/* Seven nav items now: anchor the unread badge and slim the labels to fit. */
#bottom-nav .nav-btn { position: relative; }
#bottom-nav .nav-btn small { font-size: 9px; }
.conv-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.conv-main { flex: 1; min-width: 0; }
.conv-snippet { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-unread { background: var(--ember); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.search-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.msg-row { display: flex; margin: 6px 2px; }
.msg-row.mine { justify-content: flex-end; }
.msg-bubble { max-width: 78%; padding: 9px 12px; border-radius: 16px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.msg-bubble.mine { background: var(--gold-grad); color: #241a08; border-bottom-right-radius: 6px; }
.msg-bubble.theirs { background: var(--cream); color: var(--cream-ink); border-bottom-left-radius: 6px; }
.msg-time { font-size: 10px; opacity: .65; margin-top: 3px; text-align: right; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; cursor: pointer; }
.pref-row:first-child { border-top: none; }
.pref-row input { width: auto; margin: 0; transform: scale(1.25); }
#notif-feed [data-msg-conv] { cursor: pointer; }
