*{box-sizing:border-box;}

html,body{height:100%;}

body{
  margin:0;
  color:var(--text);
  font-family:"Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  background: radial-gradient(900px 520px at 20% 70%, var(--seafoam), transparent 55%),
              radial-gradient(900px 520px at 80% 30%, var(--blush), transparent 55%),
              var(--bg);
}

#app{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 32px 18px;
}

.screen{display:none; width:100%;}
.screen.active{display:block;}

.card{
  max-width: 720px;
  margin: 0 auto;
  padding: 26px 22px;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.home-card{ max-width: 760px; }

.brand-row{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 44px;
}

.brand-row .brand{
  width: 100%;
  text-align: center;
}

.brand-row .icon-btn{
  position: absolute;
  left: 0;
  top: 0;
}

.icon-btn{
  width:44px;
  height:44px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  box-shadow: 0 10px 22px rgba(46,46,46,0.10);
  cursor:pointer;
}

.brand-title{
  font-family:"Playfair Display", serif;
  font-weight:500;
  font-size: 40px;
  margin: 0;
  text-align:center;
}

.brand-sub{
  margin: 6px 0 0;
  opacity:0.8;
  text-align:center;
}

.welcome-title{
  animation: welcomeFadeIn 1.1s ease-out forwards;
  animation-delay: 0.35s;
  opacity: 0;
}

.welcome-sub{
  animation: welcomeFadeIn 1.1s ease-out forwards;
  animation-delay: 0.55s;
  opacity: 0;
}
.welcome-sub{
  font-style: italic;
  opacity: 0.78;
}

.welcome{
  max-width: 520px;
  margin: 18px auto;
}

.welcome-title,
.welcome-sub{
  display: block;
  text-align: center;
}
.welcome-title{
  font-weight: 650;
  letter-spacing: 0.15px;
}

.primary-btn{
  width:100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.65);
  background: linear-gradient(180deg, #7AB6B0 0%, var(--accent) 45%, var(--accent-dark) 100%);
  color:#fff;
  font-size: 16px;
  font-weight:600;
  cursor:pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.primary-btn:hover{ filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 18px 36px rgba(46,46,46,0.18); }
.primary-btn:active{ transform: translateY(0); box-shadow: 0 10px 20px rgba(46,46,46,0.14); }
.primary-btn:focus-visible{ outline:none; box-shadow: 0 0 0 6px var(--ring), var(--shadow-btn); }

.ghost-btn{
  width:100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.75);
  color: var(--text);
  font-size: 15px;
  font-weight:600;
  cursor:pointer;
  margin-top: 12px;
  box-shadow: 0 12px 24px rgba(46,46,46,0.08);
}


.gentle{
  margin: 14px 0 0;
  text-align:center;
  opacity:0.78;
}

.topnav{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-bottom: 12px;
}

.nav-btn{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.78);
  cursor:pointer;
  font-weight:600;
}

.days-title{
  font-family:"Playfair Display", serif;
  font-weight:500;
  margin: 6px 0 4px;
  font-size: 34px;
}

.days-sub{
  margin: 0 0 18px;
  opacity:0.75;
}

.months-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.month-tile{
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  text-align:left;
  cursor:pointer;
  box-shadow: 0 14px 30px rgba(46,46,46,0.10);
}

.month-tile .m-name{ font-weight:700; }
.month-tile .m-sub{ margin-top:6px; font-size: 13px; opacity:0.78; }
.lock-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  margin-top: 10px;
}

.days-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.day-tile{
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  cursor:pointer;
  text-align:left;
  min-height: 78px;
  box-shadow: 0 14px 30px rgba(46,46,46,0.10);
  position:relative;
}

.day-num{ font-weight:800; }
.day-sub{ margin-top:6px; font-size: 12px; opacity:0.75; min-height: 14px; }

.pill-done{
  position:absolute;
  right:10px;
  top:10px;
  font-size:12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(196,227,221,0.55);
  border: 1px solid rgba(0,0,0,0.06);
  font-weight:700;
}

.scripture{
  font-style: italic;
  opacity: 0.92;
  margin: 10px 0 18px;
  line-height: 1.55;
}

.field{ margin: 14px 0; }
.label{ display:block; font-weight:700; margin-bottom: 8px; opacity:0.9; }

textarea{
  width:100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.65);
  font-size: 15px;
  min-height: 90px;
  outline:none;
}
textarea:focus{ box-shadow: 0 0 0 6px var(--ring); }

.prayer-title{
  font-family:"Playfair Display", serif;
  font-weight:500;
  font-size: 18px;
}

.closing-prayer{
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(242,193,204,0.18), rgba(196,227,221,0.18));
  border: 1px solid rgba(0,0,0,0.05);
  font-style: italic;
  line-height: 1.55;
}

.sticker-title{
  font-family:"Playfair Display", serif;
  font-weight:500;
  margin: 18px 0 8px;
}

.sticker-tray{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.sticker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
  font-weight:700;
}

.selected-stickers{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}

.sel-sticker{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.8);
  padding: 8px 10px;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}

.sel-sticker img{
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
}

.sticker-subtitle{
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
}

.sticker-hint{
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.75;
}

.sticker.sticker-img{
  padding: 8px;
}

.sticker.sticker-img img{
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
}

.sticker.locked{
  opacity: 0.45;
  filter: grayscale(1);
  cursor: not-allowed;
}

.row{ display:flex; align-items:center; gap:12px; margin-top: 12px; flex-wrap:wrap; }
.hint{ margin: 0; opacity:0.75; font-size: 13px; }

/* Tiny toast message (used for sticker limits / upload issues) */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  max-width: min(520px, calc(100vw - 28px));
  text-align: center;
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vip-card{ max-width: 560px; }
.vip-list{ margin: 12px 0 16px; padding-left: 18px; }
.vip-label{ display:block; font-weight:700; margin: 10px 0 8px; }
#vipInput{
  width:100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.75);
  font-size: 15px;
}
.vip-msg{ text-align:center; min-height: 1.2em; margin-top: 10px; opacity:0.85; }

#confettiLayer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow:hidden;
  z-index: 9999;
}

.confetti{
  position:absolute;
  bottom: -20px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  opacity: 0.95;
  animation: pop 1150ms ease-out forwards;
}

@keyframes pop{
  0%{ transform: translateY(0) rotate(0deg); opacity: 0; }
  10%{ opacity: 1; }
  100%{ transform: translateY(-560px) rotate(280deg); opacity: 0; }
}

@media (max-width: 720px){
  .card{ padding: 22px 18px; }
  .brand-title{ font-size: 34px; }
  .months-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .days-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media print{
  body{ background:#fff; }
  #confettiLayer{ display:none !important; }
  .topnav, .primary-btn, .ghost-btn, .icon-btn, #printHint{ display:none !important; }
  .card{ box-shadow:none; background:#fff; }
}

/* =========================
   VIP Gate – Button Styling
========================= */

.vip-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* Continue in Faith (primary action) */
#continueFaithBtn {
  background: linear-gradient(135deg, #6FA8A3, #8EC7C2);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
}

#continueFaithBtn:hover {
  opacity: 0.95;
}

/* Will come back later (soft secondary action) */
#comeBackLaterBtn{
  background: rgba(242, 193, 204, 0.32);
  border: 1px solid rgba(242, 193, 204, 0.55);
  color: var(--text);

  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
}
#comeBackLaterBtn:hover{ opacity: 0.95; }

/* Back button under VIP gate */
#vipBackBtn{ padding: 0.6rem 1.1rem; }

/* =========================
   Name Setup — Soft Elegant
========================= */

#nameSetup .card {
  max-width: 520px;
  width: min(92vw, 520px);
  margin: 0 auto;
  padding: 2rem 1.9rem;
  text-align: center;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(242, 193, 204, 0.35);
}

#nameSetup h2 {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
}

#nameSetup .gentle {
  margin: 0 0 1.1rem;
  line-height: 1.35;
  opacity: 0.9;
}

/* Input */
#nameInput {
  width: 100%;
  max-width: 420px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(111, 168, 163, 0.35);
  background: rgba(248, 246, 242, 0.75);
  outline: none;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(46, 46, 46, 0.06);
  margin: 0 auto 1rem;
  display: block;
}

#nameInput:focus {
  border-color: rgba(242, 193, 204, 0.75);
  box-shadow: 0 0 0 6px rgba(242, 193, 204, 0.18);
}

/* Button */
#saveNameBtn {
  width: 100%;
  max-width: 420px;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font-weight: 650;
  letter-spacing: 0.2px;
  box-shadow: 0 14px 30px rgba(46, 46, 46, 0.10);
}

/* Make the screen feel more “welcoming” */
#nameSetup {
  position: relative;
}

#nameSetup::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(242, 193, 204, 0.22), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(111, 168, 163, 0.22), transparent 48%);
  opacity: 0.9;
}

/* Always hide the real file input (some browsers can still show the raw control) */
#stickerUpload{ display:none !important; }
input[type="file"][hidden]{ display:none !important; }

/* =========================
   Home Hero Illustration (CLEAN)
========================= */

#home .card{
  position: relative;
  overflow: hidden;
}

/* Background image */
#home .card::before{
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("assets/home-hero.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 70%;

  opacity: 0.18;
  filter: blur(0.3px);

  pointer-events: none;
  z-index: 0;
}

/* Keep content ABOVE the image + mask */
#home .card > *{
  position: relative;
  z-index: 2;
}

/* =========================
   SAFETY: Ensure core vars exist
   (Remove if already defined)
========================= */
:root{
  --bg: #F8F6F2;
  --text: #2E2E2E;
  --card: rgba(255,255,255,0.88);

  /* Men edition palette: grounded, calm, strong */
  --accent: #2E4A62;       /* slate navy */
  --accent-dark: #233A4E;  /* deeper slate */

  --seafoam: rgba(176, 196, 186, 0.50); /* olive-mist */
  --blush: rgba(235, 222, 198, 0.60);   /* sand */

  --ring: rgba(46, 74, 98, 0.22);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-btn: 0 10px 22px rgba(46,46,46,0.10);
}

/* =========================
   Backdrop filter support
========================= */
.card{
  -webkit-backdrop-filter: blur(10px);
}

/* =========================
   VIP buttons: keep same look, but add the nice interactions
========================= */
#continueFaithBtn,
#comeBackLaterBtn{
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

#continueFaithBtn:hover,
#comeBackLaterBtn:hover{
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(46,46,46,0.14);
}

#continueFaithBtn:active,
#comeBackLaterBtn:active{
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(46,46,46,0.10);
}

#continueFaithBtn:focus-visible,
#comeBackLaterBtn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 6px var(--ring), 0 18px 36px rgba(46,46,46,0.14);
}



.primary-btn{
  background: linear-gradient(
    180deg,
    #7AB6B0 0%,
    var(--accent) 45%,
    var(--accent-dark) 100%
  );
  color: #ffffff;

  /* NEW: isolate from background image */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ghost-btn{
  background: #ffffff; /* solid, not translucent */
  color: var(--text);

  /* remove see-through effect */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.primary-btn,
.ghost-btn{
  position: relative;
  isolation: isolate; /* prevents background bleed */
}

.primary-btn::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  pointer-events:none;
}

/* Home hero fade mask: keeps text area clean, art stronger at bottom */
#home .card{
  position: relative;
  overflow: hidden;
}

/* Soft fade mask (top protection, bottom visibility) */
#home .card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.92) 0%,
    rgba(255,255,255,0.70) 28%,
    rgba(255,255,255,0.28) 55%,
    rgba(255,255,255,0.00) 78%,
    rgba(255,255,255,0.00) 100%
  );

  z-index: 1;
}

/* Settings button: soft glass + calmer shadow */
#settingsBtn.icon-btn{
  border: 1px solid rgba(111, 168, 163, 0.22);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

#settingsBtn.icon-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
  filter: brightness(1.02);
}

#settingsBtn.icon-btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#settingsBtn.icon-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 6px rgba(111, 168, 163, 0.22), 0 16px 34px rgba(15, 23, 42, 0.10);
}

/* =========================
   HOME HERO (ONE SOURCE OF TRUTH)
========================= */

#home .card{
  position: relative;
  overflow: hidden;
}

/* Hero background image */
#home .card::before{
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("assets/home-hero.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 70%;

  /* make her visible */
  opacity: 0.28;
  filter: blur(0.15px);

  pointer-events: none;
  z-index: 0;
}

/* Fade mask: protects text at top, clears out at bottom */
#home .card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.86) 0%,
    rgba(255,255,255,0.62) 26%,
    rgba(255,255,255,0.22) 52%,
    rgba(255,255,255,0.00) 76%,
    rgba(255,255,255,0.00) 100%
  );

  z-index: 1;
}

/* Content above everything */
#home .card > *{
  position: relative;
  z-index: 2;
}

/* Soft fade + rise */
@keyframes welcomeFadeIn {
  0%{
    opacity: 0;
    transform: translateY(6px);
  }
  100%{
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Daily Verse Reveal
========================= */

@keyframes verseReveal {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* default scripture style + reveal-ready */
#dayScripture {
  opacity: 0;                 /* start hidden until revealed */
  transform: translateY(8px);
  filter: blur(2px);
}

/* when we toggle this class, the verse reveals */
#dayScripture.reveal {
  animation: verseReveal 900ms ease-out forwards;
}

/* Respect accessibility */
@media (prefers-reduced-motion: reduce) {
  #dayScripture,
  #dayScripture.reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
}

/* Settings: name input fix */
#settingsNameInput{
  width: 100%;
  max-width: 420px;
  margin: 6px auto 12px;
  display: block;

  padding: 12px 16px;
  font-size: 16px;
  font-family: "Inter", system-ui, sans-serif;

  border-radius: 999px;
  border: 1px solid rgba(111, 168, 163, 0.35);

  background: rgba(255,255,255,0.85);
  color: var(--text);

  box-shadow: 0 10px 22px rgba(46,46,46,0.08);
  outline: none;
}

#settingsNameInput::placeholder{
  opacity: 0.6;
}

#settingsNameInput:focus{
  border-color: rgba(111,168,163,0.65);
  box-shadow:
    0 0 0 6px rgba(111,168,163,0.18),
    0 12px 28px rgba(46,46,46,0.10);
}

#saveSettingsNameBtn{
  max-width: 420px;
  margin: 0 auto;
}

/* SETTINGS: Name block alignment */
.settings-block{
  max-width: 520px;
  margin: 0 auto;
}

.settings-block .field-label{
  display:block;
  margin: 0 0 8px;
  font-weight: 700;
  opacity: 0.9;
}

/* Make input + button match width and sit centered */
#settingsNameInput,
#saveSettingsNameBtn{
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  display:block;
}

/* Slightly tighter vertical rhythm */
#settingsNameInput{ margin-top: 6px; margin-bottom: 12px; }
#saveSettingsNameBtn{ margin-top: 0; }

#nameSavedMsg{
  text-align: center;
}

#nameSavedMsg{
  text-align: center;
  font-style: italic;
  opacity: 0.75;
}

.vip-back-soft {
  margin-top: 1.2rem;
  font-weight: 500;
}

/* Ensure buttons stay above any soft overlays */
.primary-btn,
.ghost-btn,
.nav-btn,
.icon-btn {
  position: relative;
  z-index: 5;
}

/* --- Fix: invisible overlay stealing clicks --- */
#confettiLayer{
  pointer-events: none !important;
}

/* Keep cards/buttons above any decorative layers */
.card, .topnav{
  position: relative;
  z-index: 2;
}

.bg-overlay,
.overlay,
.hero-art{
  pointer-events: none !important;
}

.app-credit{
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  opacity: 0.6;
  margin-top: 10px;
  padding-bottom: 10px;
}

