:root {
  color-scheme: light dark;
  --ink: #1c2722;
  --muted: #69766f;
  --paper: #f7faf5;
  --surface: #ffffff;
  --sage: #365f4b;
  --coral: #d76b4d;
  --sun: #f7b84b;
  --sky: #c7e5f3;
  --line: rgba(28, 39, 34, .13);
  --shadow: 0 24px 70px rgba(36, 57, 45, .18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at top left, #fff0d4, transparent 34%), var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }

.app { min-height: 100vh; }
.stage { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.phone { width: min(100%, 430px); min-height: min(860px, calc(100vh - 44px)); overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.stage:not(.compact) .phone { display: grid; grid-template-rows: minmax(280px, .92fr) auto; }

.hero-visual { position: relative; min-height: 330px; overflow: hidden; background: var(--sky); }
.hero-visual img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; display: block; }
.brand-pill { position: absolute; left: 18px; right: 18px; bottom: 18px; min-height: 38px; display: grid; place-items: center; border-radius: 999px; color: #23322b; background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); font-size: 13px; font-weight: 800; }
.hero-copy, .panel-screen, .success-screen, .prayer-screen { padding: 28px; }
.brand { margin: 0 0 12px; color: var(--coral); font-size: 13px; font-weight: 900; letter-spacing: 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-family: Georgia, serif; font-size: 42px; line-height: 1.02; letter-spacing: 0; }
h2 { margin: 0; font-family: Georgia, serif; font-size: 32px; line-height: 1.08; letter-spacing: 0; }
h3 { margin: 0; font-size: 20px; }
p { color: var(--muted); line-height: 1.55; }
.actions, .standalone-form { display: grid; gap: 12px; margin-top: 24px; }
.mechanism { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.mechanism span { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: rgba(255, 255, 255, .6); font-size: 13px; font-weight: 800; text-align: center; }

.primary, .secondary, .ghost { width: 100%; min-height: 54px; border-radius: 8px; padding: 0 18px; font-weight: 900; letter-spacing: 0; }
.primary { border: 0; color: white; background: var(--sage); }
.secondary { border: 1px solid var(--sage); color: var(--sage); background: transparent; }
.ghost { border: 0; color: var(--muted); background: transparent; }
.bright { color: #1c2722; background: var(--sun); }
.light { color: rgba(255, 255, 255, .78); }

.panel-screen { min-height: min(860px, calc(100vh - 44px)); display: grid; align-content: center; gap: 22px; }
.center { text-align: center; }
.faith-grid, .prayer-list, .app-grid { display: grid; gap: 12px; }
.faith-card, .prayer-card, .app-choice { min-height: 112px; display: grid; gap: 8px; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 18px; color: var(--ink); background: #fbfdf9; }
.faith-card span { font-size: 30px; }
.faith-card strong, .prayer-card strong { font-size: 20px; }
small { color: var(--muted); line-height: 1.45; }
.prayer-library { align-content: start; padding-top: 34px; }
.prayer-card { min-height: unset; padding: 0; overflow: hidden; }
.prayer-main { width: 100%; display: grid; gap: 6px; padding: 16px; border: 0; color: inherit; background: transparent; text-align: left; }
.category, .duration { color: var(--coral); font-size: 12px; font-weight: 900; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 16px 14px; color: var(--muted); font-size: 13px; }
.mini-button { min-width: 68px; min-height: 34px; border: 1px solid var(--sage); border-radius: 999px; color: var(--sage); background: transparent; font-weight: 900; }
.app-grid { grid-template-columns: 1fr 1fr; }
.app-choice { min-height: 92px; place-items: center; text-align: center; position: relative; }
.app-choice span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--app-color); font-weight: 900; }
.app-choice.selected { border-color: var(--sage); box-shadow: inset 0 0 0 2px rgba(54, 95, 75, .18); }
.app-choice.selected:after { content: "locked"; position: absolute; top: 9px; right: 9px; color: var(--coral); font-size: 11px; font-weight: 900; }
.demo-note { margin: 0; font-size: 13px; text-align: center; }
.blocked-preview { display: grid; gap: 12px; padding: 16px; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(54,95,75,.09), rgba(215,107,77,.08)); }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preview-top span { color: var(--coral); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.blocked-preview p { margin: 0; font-size: 13px; }

.alarm-screen, .setup-screen, .audio-screen { min-height: min(860px, calc(100vh - 44px)); display: grid; align-content: center; gap: 18px; padding: 30px; text-align: center; }
.alarm-screen { color: white; background: linear-gradient(180deg, #17231d, #365f4b 48%, #d76b4d); }
.alarm-screen p { color: rgba(255, 255, 255, .84); margin: 0; }
.alarm-screen .time, .countdown strong { color: white; font-family: Georgia, serif; font-size: 86px; line-height: 1; font-weight: 800; }
.countdown strong { font-size: 132px; }
.locked-strip, .lock-box { display: grid; gap: 8px; padding: 14px; border-radius: 8px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); }
.locked-strip > span, .lock-box > span, .unlock-list > span { min-height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .14); font-weight: 800; }
.locked-strip.quiet { background: rgba(54, 95, 75, .08); border-color: var(--line); }
.locked-strip.quiet > span { color: var(--ink); background: rgba(54, 95, 75, .1); }
.mock-phone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-tile { min-height: 86px; display: grid; grid-template-rows: 38px auto auto; place-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; color: var(--ink); background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .45); position: relative; overflow: hidden; }
.app-tile i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--app-color); font-style: normal; font-size: 13px; font-weight: 900; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.app-tile b { max-width: 100%; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-tile em { color: var(--coral); font-size: 10px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.app-tile.blocked { filter: grayscale(.85); }
.app-tile.blocked:after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(28,39,34,.18), rgba(28,39,34,.18) 1px, transparent 1px, transparent 8px); }
.app-tile.blocked:before { content: "DISABLED"; position: absolute; left: 7px; right: 7px; top: 30px; z-index: 2; min-height: 24px; display: grid; place-items: center; border-radius: 999px; color: white; background: rgba(20, 28, 24, .78); font-size: 10px; font-weight: 900; letter-spacing: 0; }
.app-tile.unlocked { animation: unlockPop .55s ease both; animation-delay: var(--delay); }
.app-tile.unlocked em { color: var(--sage); }

.setup-screen { background: linear-gradient(180deg, #fff7e7, #eef6ee); }
.setup-time { margin: 4px 0; font-family: Georgia, serif; font-size: 76px; line-height: 1; font-weight: 800; }
.setup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .68); text-align: left; }
.lock-box { color: var(--ink); background: rgba(54, 95, 75, .08); border-color: var(--line); text-align: left; }
.lock-box span { background: rgba(54, 95, 75, .1); }

.prayer-screen { min-height: min(860px, calc(100vh - 44px)); display: grid; align-content: center; gap: 28px; background: linear-gradient(180deg, #fffaf0, #eef6ee); }
.progress { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(54, 95, 75, .15); }
.progress span { display: block; height: 100%; background: var(--sage); transition: width .25s ease; }
.prayer-text { margin: 24px 0; color: var(--ink); font-family: Georgia, serif; font-size: 27px; line-height: 1.5; text-align: center; }
.audio-screen { background: linear-gradient(180deg, #eef6ee, #fff7e7); }
.artwork { width: 126px; height: 126px; margin: 0 auto; display: grid; place-items: center; border-radius: 28px; color: white; background: linear-gradient(145deg, var(--sage), var(--coral)); font-family: Georgia, serif; font-size: 36px; font-weight: 800; box-shadow: var(--shadow); }
.play-button { width: 150px; height: 54px; margin: auto; border: 0; border-radius: 999px; color: white; background: var(--coral); font-weight: 900; }
.audio-bar { display: grid; grid-template-columns: 45px 1fr 45px; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.audio-bar div { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(54, 95, 75, .15); }
.audio-bar i { display: block; width: 0; height: 100%; background: var(--sage); transition: width .2s linear; }
.prayer-copy { max-height: 230px; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .5); text-align: left; }
.prayer-copy p { margin: 6px 0 14px; }
.prayer-copy strong { color: var(--ink); }

.success-screen { min-height: min(860px, calc(100vh - 44px)); display: grid; align-content: center; gap: 16px; text-align: center; background: linear-gradient(180deg, #eff8ef, #fff6e6); }
.success-icon { font-size: 30px; font-weight: 900; color: var(--sage); animation: rise .7s ease both; }
.streak { display: block; color: var(--coral); font-size: 20px; animation: pop .55s .25s ease both; }
.unlock-list { display: grid; gap: 8px; }
.unlock-list > span { background: rgba(54, 95, 75, .12); color: var(--sage); animation: rise .55s ease both; }
.unlock-list .app-tile.unlocked { animation: unlockPop .55s ease both; animation-delay: var(--delay); }
.waitlist-card { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
form { display: grid; gap: 12px; }
input { min-height: 54px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; color: var(--ink); background: var(--surface); }
.status { min-height: 24px; margin: 10px 0 0; font-size: 14px; }

@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes unlockPop { from { transform: translateY(12px) scale(.94); filter: grayscale(1); opacity: .45; } to { transform: translateY(0) scale(1); filter: grayscale(0); opacity: 1; } }

@media (min-width: 900px) {
  .stage:not(.compact) .phone { width: min(100%, 1040px); grid-template-columns: 1fr 420px; grid-template-rows: 1fr; min-height: 720px; }
  .hero-visual { min-height: 720px; }
  .hero-visual img { min-height: 720px; }
  .hero-copy { align-self: center; padding: 42px; }
  h1 { font-size: 55px; }
}

@media (prefers-color-scheme: dark) {
  :root { --ink: #edf5ef; --muted: #b5c1b9; --paper: #121a16; --surface: #1e2822; --line: rgba(237, 245, 239, .13); --shadow: 0 24px 70px rgba(0, 0, 0, .34); }
  body { background: radial-gradient(circle at top left, rgba(247, 184, 75, .16), transparent 34%), var(--paper); }
  .faith-card, .prayer-card { background: #253229; }
  .app-tile { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
  .prayer-screen, .success-screen { background: linear-gradient(180deg, #1f2a24, #17201b); }
}

@media (max-width: 420px) {
  .stage { padding: 0; }
  .phone { min-height: 100vh; border: 0; border-radius: 0; }
  .hero-copy, .panel-screen, .success-screen, .prayer-screen { padding: 24px; }
  h1 { font-size: 38px; }
  h2 { font-size: 29px; }
  .alarm-screen .time { font-size: 76px; }
}
