/* 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 { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: linear-gradient(160deg, #2a1f14, #171310); }
.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; }
