:root {
        --bg: #fff6da;
        --bg-grad: linear-gradient(180deg, #fff3bf 0%, #ffeeda 42%, #ffe4ef 100%);
        --surface: #ffffff;
        --surface-2: #ffedbe;
        --ink: #3d2333;
        --ink-soft: #75566a;
        --ink-faint: #ab8b9c;
        --line: #f7cf9d;
        --teal: #00a896;
        --teal-deep: #00796b;
        --teal-soft: #d3f5ec;
        --amber: #ed8b00;
        --amber-soft: #ffedb8;
        --sage: #2fbf71;
        --rose: #ff5e78;
        --rose-soft: #ffe0e7;
        --cta: linear-gradient(135deg, #ffb703 0%, #ff7a59 55%, #ff5e78 100%);
        --shadow: 0 12px 30px rgba(255, 122, 89, 0.16);
        --radius: 18px;
      }
      @media (prefers-color-scheme: dark) {
        :root {
          --bg: #221233;
          --bg-grad: linear-gradient(180deg, #2a1545 0%, #221233 55%, #33152b 100%);
          --surface: #2e1c4d;
          --surface-2: #3a2560;
          --ink: #fff7ea;
          --ink-soft: #e6d7f7;
          --ink-faint: #b39ddb;
          --line: #523a7d;
          --teal: #2fe6c8;
          --teal-deep: #0b3d3a;
          --teal-soft: #14423e;
          --amber: #ffc233;
          --amber-soft: #4d3608;
          --sage: #5fe08a;
          --rose: #ff87a3;
          --rose-soft: #4d2438;
          --cta: linear-gradient(135deg, #ffb703 0%, #ff7a59 55%, #ff5e78 100%);
          --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
        }
      }
      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      body {
        margin: 0;
        background: var(--bg-grad);
        background-attachment: fixed;
        color: var(--ink);
        font-family: "Public Sans", system-ui, sans-serif;
        font-size: 16px;
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
      }
      h1, h2, h3, .serif { font-family: "Fraunces", Georgia, serif; }
      button { font-family: inherit; cursor: pointer; }
      input { font-family: inherit; }
      .lucide { width: 20px; height: 20px; stroke-width: 1.9; }

      .wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px 90px; }

      /* ---------- Header / greeting ---------- */
      .topbar {
        display: flex; align-items: center; justify-content: space-between;
        padding: 18px 0 6px;
      }
      .brand { display: flex; align-items: center; gap: 10px; }
      .brand-mark {
        width: 38px; height: 38px; border-radius: 12px;
        background: var(--cta); color: #fff;
        display: grid; place-items: center;
      }
      .brand-mark .lucide { width: 21px; height: 21px; }
      .brand-name { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.25rem; line-height: 1; }
      .brand-sub { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }
      .date-chip {
        display: inline-flex; align-items: center; gap: 7px;
        background: var(--surface); border: 1px solid var(--line);
        border-radius: 999px; padding: 7px 14px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
      }
      .date-chip .lucide { width: 16px; height: 16px; color: var(--amber); }

      .greeting { padding: 14px 0 4px; max-width: 720px; }
      .greeting h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 600; line-height: 1.12; margin: 0 0 8px; }
      .greeting p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

      /* ---------- Today at a glance ---------- */
      .glance {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 6px;
      }
      .glance-item {
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 14px 16px; box-shadow: var(--shadow);
      }
      .glance-item .g-label { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
      .glance-item .g-label .lucide { width: 16px; height: 16px; }
      .glance-item .g-value { font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; font-weight: 600; margin-top: 5px; line-height: 1.1; }
      .glance-item .g-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
      .g-teal .g-label .lucide { color: var(--teal); }
      .g-amber .g-label .lucide { color: var(--amber); }
      .g-sage .g-label .lucide { color: var(--sage); }
      .g-rose .g-label .lucide { color: var(--rose); }

      /* ---------- Cards & grid ---------- */
      .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
      .card {
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); padding: 24px; overflow: hidden;
      }
      .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
      .card-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
      .card-kicker .icon-chip {
        width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
      }
      .card-kicker .icon-chip .lucide { width: 17px; height: 17px; }
      .chip-teal { background: var(--teal-soft); color: var(--teal); }
      .chip-amber { background: var(--amber-soft); color: var(--amber); }
      .chip-rose { background: var(--rose-soft); color: var(--rose); }
      .chip-sage { background: var(--teal-soft); color: var(--sage); }
      .card h2 { font-size: 1.45rem; font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
      .card h3 { font-size: 1.12rem; font-weight: 600; margin: 0 0 6px; }
      .card p { margin: 0 0 10px; color: var(--ink-soft); }
      .card p:last-child { margin-bottom: 0; }
      .card .strong { color: var(--ink); }

      /* Devotional */
      .devotional { grid-column: 1 / -1; padding: 0; display: grid; grid-template-columns: 42% 58%; }
      .devotional-img { position: relative; min-height: 320px; }
      .devotional-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
      .devotional-body { padding: 28px 30px; }
      .verse {
        border-left: 3px solid var(--amber);
        padding: 4px 0 4px 16px; margin: 14px 0;
        font-family: "Fraunces", Georgia, serif; font-size: 1.12rem; font-style: italic; color: var(--ink);
      }
      .verse-ref { display: block; font-style: normal; font-family: "Public Sans", sans-serif; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; color: var(--amber); margin-top: 6px; }
      .prayer-box {
        background: var(--teal-soft); border-radius: 12px; padding: 14px 16px; margin-top: 14px;
        font-size: 0.95rem; color: var(--ink);
      }
      .prayer-box .prayer-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 4px; }
      .tag {
        display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700;
        background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 5px 11px; white-space: nowrap;
      }
      .tag .lucide { width: 13px; height: 13px; }

      .try-it {
        background: var(--surface-2); border-radius: 12px; padding: 13px 15px; font-size: 0.93rem; color: var(--ink);
        margin-top: 12px;
      }
      .try-it .t-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); display: block; margin-bottom: 3px; }
      .save-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
      .btn {
        display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line);
        background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.9rem; padding: 9px 16px;
        transition: background 0.15s ease, border-color 0.15s ease;
      }
      .btn .lucide { width: 16px; height: 16px; }
      .btn:hover { border-color: var(--teal); }
      .btn.primary { background: var(--cta); border-color: transparent; color: #fff; }
      .btn.primary:hover { background: var(--cta); filter: brightness(1.06); }
      .btn.saved { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); }

      /* Mood */
      .mood-scale { display: flex; justify-content: space-between; gap: 6px; margin: 6px 0 10px; }
      .mood-btn {
        flex: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px;
        padding: 12px 2px 9px; display: flex; flex-direction: column; align-items: center; gap: 5px;
        font-size: 0.7rem; font-weight: 600; color: var(--ink-soft);
      }
      .mood-btn .lucide { width: 27px; height: 27px; stroke-width: 1.7; }
      .mood-btn[data-mood="rough"] { color: #e4572e; }
      .mood-btn[data-mood="low"] { color: #f08c00; }
      .mood-btn[data-mood="okay"] { color: #d9a404; }
      .mood-btn[data-mood="good"] { color: #2fbf71; }
      .mood-btn[data-mood="great"] { color: #00a896; }
      .mood-btn.selected { border-color: currentColor; background: var(--surface-2); box-shadow: inset 0 0 0 1px currentColor; }
      .mood-note-input, .text-input {
        width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
        font-size: 0.93rem; background: var(--surface); color: var(--ink);
      }
      .mood-note-input:focus, .text-input:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: transparent; }
      .mood-logged { display: none; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--teal); margin-top: 10px; }
      .mood-logged .lucide { width: 17px; height: 17px; }
      .week-strip { display: flex; gap: 6px; margin-top: 16px; }
      .week-day { flex: 1; text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
      .week-dot {
        width: 30px; height: 30px; margin: 0 auto 5px; border-radius: 50%;
        background: var(--surface-2); border: 1.5px dashed var(--line);
        display: grid; place-items: center; color: var(--ink-faint);
      }
      .week-dot .lucide { width: 17px; height: 17px; }
      .week-dot.filled { border-style: solid; }
      .week-day.today .week-dot { outline: 2px solid var(--amber); outline-offset: 2px; }

      /* Health */
      .metric { padding: 13px 0; border-top: 1px solid var(--line); }
      .metric:first-of-type { border-top: none; padding-top: 2px; }
      .metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
      .metric-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.95rem; }
      .metric-name .lucide { width: 18px; height: 18px; }
      .metric-val { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 600; }
      .metric-val small { font-family: "Public Sans", sans-serif; font-size: 0.78rem; color: var(--ink-faint); font-weight: 500; }
      .bar { height: 8px; background: var(--surface-2); border-radius: 99px; margin-top: 9px; overflow: hidden; }
      .bar-fill { height: 100%; border-radius: 99px; transition: width 0.35s ease; }
      .stepper { display: flex; align-items: center; gap: 8px; }
      .step-btn {
        width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
        display: grid; place-items: center; color: var(--ink);
      }
      .step-btn .lucide { width: 15px; height: 15px; }
      .step-btn:hover { border-color: var(--teal); color: var(--teal); }
      .energy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; }
      .energy-dots { display: flex; gap: 6px; }
      .energy-dot {
        width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
        font-weight: 700; font-size: 0.85rem; color: var(--ink-soft);
      }
      .energy-dot.selected { background: var(--amber); border-color: var(--amber); color: #fff; }

      /* Prayer */
      .prayer-progress { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
      .prayer-list { list-style: none; margin: 6px 0 0; padding: 0; }
      .prayer-item {
        display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line);
      }
      .prayer-item:first-child { border-top: none; }
      .prayer-check {
        flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line);
        background: var(--surface); display: grid; place-items: center; color: transparent;
      }
      .prayer-check .lucide { width: 15px; height: 15px; }
      .prayer-item.done .prayer-check { background: var(--rose); border-color: var(--rose); color: #fff; }
      .prayer-item.done .prayer-text { color: var(--ink-faint); }
      .prayer-text { font-size: 0.95rem; }
      .prayer-when { font-size: 0.78rem; color: var(--ink-faint); }
      .add-row { display: flex; gap: 8px; margin-top: 14px; }
      .add-row .text-input { flex: 1; }
      .add-btn {
        flex: none; width: 42px; height: 42px; border-radius: 10px; border: none;
        background: var(--cta); color: #fff; display: grid; place-items: center;
      }
      .add-btn .lucide { width: 19px; height: 19px; }

      /* To-do */
      .todo-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
      .todo-progress-wrap .bar { flex: 1; margin-top: 0; }
      .todo-count { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
      .todo-list { list-style: none; margin: 4px 0 0; padding: 0; }
      .todo-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
      .todo-item:first-child { border-top: none; }
      .todo-check {
        flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line);
        background: var(--surface); display: grid; place-items: center; color: transparent;
      }
      .todo-check .lucide { width: 15px; height: 15px; }
      .todo-item.done .todo-check { background: var(--teal); border-color: var(--teal); color: #fff; }
      .todo-main { flex: 1; min-width: 0; }
      .todo-text { font-size: 0.96rem; }
      .todo-item.done .todo-text { text-decoration: line-through; color: var(--ink-faint); }
      .todo-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
      .todo-time { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--ink-faint); font-weight: 600; }
      .todo-time .lucide { width: 12px; height: 12px; }
      .pri { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; }
      .pri-high { background: var(--rose-soft); color: var(--rose); }
      .pri-med { background: var(--amber-soft); color: var(--amber); }
      .pri-low { background: var(--teal-soft); color: var(--teal); }
      .todo-del { flex: none; border: none; background: none; color: var(--ink-faint); padding: 3px; border-radius: 6px; }
      .todo-del .lucide { width: 16px; height: 16px; }
      .todo-del:hover { color: var(--rose); }
      .todo-empty { padding: 18px 0 6px; text-align: center; color: var(--ink-faint); font-size: 0.92rem; }

      /* Weekly PD */
      .pd { grid-column: 1 / -1; padding: 0; display: grid; grid-template-columns: 58% 42%; }
      .pd-body { padding: 28px 30px; order: 1; }
      .pd-img { order: 2; position: relative; min-height: 300px; }
      .pd-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
      .pd-body h2 { font-size: 1.6rem; }
      .pd-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
      .pd h3 { margin-top: 18px; color: var(--teal); font-size: 1.02rem; }
      .reflection {
        background: var(--amber-soft); border-radius: 12px; padding: 15px 17px; margin-top: 18px; color: var(--ink);
      }
      .reflection .r-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); display: block; margin-bottom: 4px; }
      .reflection p { color: var(--ink); font-style: italic; margin: 0; }

      /* Week ahead strip */
      .week-ahead { grid-column: 1 / -1; }
      .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
      .day-cell {
        border: 1px solid var(--line); border-radius: 14px; padding: 13px 12px; background: var(--surface);
      }
      .day-cell .d-name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
      .day-cell .d-theme { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1rem; margin: 4px 0 3px; line-height: 1.25; }
      .day-cell .d-focus { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.4; }
      .day-cell.today { border-color: var(--amber); background: var(--amber-soft); }
      .day-cell.today .d-name { color: var(--amber); }

      /* Roadmap / app store */
      .roadmap { margin-top: 34px; background: linear-gradient(120deg, #ff8a3d 0%, #ff5e78 60%, #ff4d8d 100%); color: #fff7ec; border-radius: 22px; padding: 34px 32px; }
      .roadmap h2 { color: #fff; font-size: 1.7rem; margin: 0 0 8px; }
      .roadmap > p { color: #ffe3d3; max-width: 640px; margin: 0 0 24px; }
      .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
      .step { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 14px; padding: 18px; }
      .step .s-num {
        width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #ff5e78;
        display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; margin-bottom: 10px;
      }
      .step h3 { color: #fff; font-size: 1rem; margin: 0 0 5px; font-family: "Public Sans", sans-serif; }
      .step p { color: #ffe9db; font-size: 0.86rem; margin: 0; line-height: 1.5; }
      .step .s-status { display: inline-block; margin-top: 10px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ffec8a; }
      .store-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
      .store-badge {
        display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 12px; padding: 9px 16px; color: #fff; font-size: 0.88rem; font-weight: 600;
      }
      .store-badge .lucide { width: 19px; height: 19px; }
      .store-badge small { display: block; font-size: 0.68rem; font-weight: 500; color: #ffe3d3; letter-spacing: 0.04em; }

      footer { text-align: center; color: var(--ink-faint); font-size: 0.85rem; margin-top: 30px; }
      footer .f-verse { font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1rem; color: var(--ink-soft); }
      footer .f-copyright { font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
      footer .f-rights { max-width: 620px; margin: 0 auto 10px; font-size: 0.8rem; line-height: 1.5; }

      /* Per-content copyright mark */
      .content-rights {
        display: flex; align-items: center; gap: 6px; margin-top: 16px;
        font-size: 0.75rem; font-weight: 600; color: var(--ink-faint);
      }
      .content-rights .lucide { width: 13px; height: 13px; flex: none; }

      /* ---------- Onboarding gate (sign-in → name → paywall) ---------- */
      body.gated { overflow: hidden; }
      .gate {
        position: fixed; inset: 0; z-index: 200; overflow-y: auto;
        background: var(--bg-grad); padding: 26px 16px 48px;
        display: flex; justify-content: center; align-items: flex-start;
      }
      .gate.done { display: none; }
      .gate-card {
        width: 100%; max-width: 440px; margin-top: 3vh;
        background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
        box-shadow: 0 24px 60px rgba(255, 94, 120, 0.22); padding: 30px 28px 26px;
      }
      .gate-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
      .gate-dots { display: flex; gap: 7px; margin-bottom: 20px; }
      .gate-dots span { width: 26px; height: 6px; border-radius: 99px; background: var(--surface-2); }
      .gate-dots span.on { background: var(--cta); }
      .gate-step { display: none; }
      .gate-step.active { display: block; }
      .gate-step h2 { font-size: 1.65rem; font-weight: 600; line-height: 1.2; margin: 0 0 8px; }
      .gate-step .gate-sub { color: var(--ink-soft); margin: 0 0 20px; font-size: 0.97rem; }
      .gate-field { margin-bottom: 14px; }
      .gate-field label { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
      .gate-field .text-input { padding: 13px 14px; font-size: 1rem; border-radius: 12px; }
      .gate-btn {
        width: 100%; border: none; border-radius: 999px; padding: 14px 18px; margin-top: 6px;
        background: var(--cta); color: #fff; font-weight: 700; font-size: 1rem;
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      }
      .gate-btn .lucide { width: 18px; height: 18px; }
      .gate-btn:hover { filter: brightness(1.06); }
      .gate-btn.ghost { background: var(--surface); color: var(--ink-soft); border: 1.5px solid var(--line); margin-top: 10px; }
      .gate-error { display: none; color: var(--rose); font-size: 0.87rem; font-weight: 600; margin: 2px 0 10px; }
      .gate-link { background: none; border: none; color: var(--teal); font-weight: 700; font-size: 0.85rem; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
      .gate-note { font-size: 0.8rem; color: var(--ink-faint); text-align: center; margin: 14px 0 0; line-height: 1.5; }
      .plan {
        border: 2px solid var(--amber); background: var(--amber-soft); border-radius: 18px;
        padding: 20px; margin-bottom: 16px; position: relative;
      }
      .plan .plan-pill {
        position: absolute; top: -11px; right: 16px; background: var(--rose); color: #fff;
        font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
        border-radius: 999px; padding: 4px 10px;
      }
      .plan .plan-name { font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
      .plan .plan-price { font-family: "Fraunces", Georgia, serif; font-size: 2.9rem; font-weight: 700; line-height: 1.05; color: var(--ink); }
      .plan .plan-price small { font-family: "Public Sans", sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
      .plan ul { list-style: none; margin: 14px 0 0; padding: 0; }
      .plan li { display: flex; gap: 9px; align-items: flex-start; padding: 5px 0; font-size: 0.94rem; color: var(--ink); }
      .plan li .lucide { width: 17px; height: 17px; color: var(--teal); flex: none; margin-top: 3px; }

      /* Signed-in user chip */
      .user-chip {
        display: inline-flex; align-items: center; gap: 8px;
        background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
        padding: 5px 13px 5px 5px; font-size: 0.87rem; font-weight: 700; color: var(--ink);
      }
      .user-chip .user-avatar {
        width: 28px; height: 28px; border-radius: 50%; background: var(--cta); color: #fff;
        display: grid; place-items: center; font-size: 0.82rem; font-weight: 800;
      }
      .user-chip .lucide { width: 15px; height: 15px; color: var(--ink-faint); }
      .user-chip[hidden] { display: none; }

      /* Bottom nav (mobile app feel) */
      .tabbar {
        position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 50;
        display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line);
        border-radius: 999px; padding: 6px; box-shadow: 0 14px 34px rgba(20, 40, 34, 0.18);
      }
      .tabbar a {
        display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
        color: var(--ink-faint); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em;
        padding: 7px 13px; border-radius: 999px;
      }
      .tabbar a .lucide { width: 19px; height: 19px; }
      .tabbar a.active { background: var(--cta); color: #fff; }

      @media (max-width: 900px) {
        .glance { grid-template-columns: repeat(2, 1fr); }
        .grid { grid-template-columns: 1fr; }
        .devotional, .pd { grid-template-columns: 1fr; }
        .devotional-img { min-height: 210px; position: relative; height: 210px; }
        .pd-img { order: 1; min-height: 200px; height: 200px; }
        .pd-body { order: 2; }
        .days { grid-template-columns: repeat(2, 1fr); }
        .steps { grid-template-columns: 1fr 1fr; }
        .date-chip { display: none; }
      }
      @media (max-width: 480px) {
        .steps { grid-template-columns: 1fr; }
        .card { padding: 20px; }
        .devotional, .pd { padding: 0; }
        .devotional-body, .pd-body { padding: 22px 20px; }
        .tabbar a { padding: 7px 10px; }
      }
      /* ---------- Landing hub, pillars & streak ---------- */
      @keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
      @keyframes fadeSlide { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
      @keyframes popIn { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
      @keyframes fall { to { transform: translateY(105vh) rotate(560deg); opacity: 0.9; } }
      .brand-mark { animation: floaty 5s ease-in-out infinite; }
      .view-enter { animation: fadeSlide 0.38s ease both; }

      .streak-banner {
        margin-top: 20px; border-radius: 22px; padding: 22px 24px; color: #fff;
        background: linear-gradient(120deg, #ff8a3d 0%, #ff5e78 60%, #ff4d8d 100%);
        display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
        box-shadow: 0 16px 36px rgba(255, 94, 120, 0.3);
      }
      .streak-flame {
        width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.22);
        display: grid; place-items: center; flex: none; animation: floaty 4s ease-in-out infinite;
      }
      .streak-flame .lucide { width: 34px; height: 34px; }
      .streak-num-big { font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; font-weight: 700; line-height: 1; }
      .streak-banner .s-label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.92; }
      .streak-banner .s-text { font-size: 0.94rem; opacity: 0.95; max-width: 520px; }
      .streak-banner .s-text strong { color: #ffec8a; }
      .streak-inline { display: flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 700; color: var(--rose); margin: 0 0 10px; }
      .streak-inline .lucide { width: 17px; height: 17px; }

      .pillar-group { margin-top: 30px; }
      .pillar-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
      .pillar-badge {
        width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none;
      }
      .pillar-badge .lucide { width: 21px; height: 21px; }
      .pillar-head h2 { font-size: 1.5rem; font-weight: 600; margin: 0; line-height: 1.1; }
      .pillar-head .p-tag { font-size: 0.86rem; color: var(--ink-soft); }
      .p-faith { background: #ff5e78; } .p-mind { background: #ed8b00; } .p-body { background: #00a896; }
      .p-heart { background: #ff4d8d; } .p-craft { background: #2fbf71; }
      .home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 12px; }
      .nav-card {
        text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px;
        padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 7px;
        transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; width: 100%;
      }
      .nav-card:hover { transform: translateY(-3px); border-color: var(--amber); }
      .nav-card .nc-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
      .nav-card .nc-icon .lucide { width: 23px; height: 23px; }
      .nav-card .nc-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.13rem; color: var(--ink); line-height: 1.2; }
      .nav-card .nc-desc { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45; }
      .nav-card .nc-pillar { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); margin-top: auto; }
      .nc-faith { background: #ff5e78; } .nc-mind { background: #ed8b00; } .nc-body { background: #00a896; }
      .nc-heart { background: #ff4d8d; } .nc-craft { background: #2fbf71; } .nc-about { background: #7c5cd6; }
      .about-card-home { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
      .about-card-home .nc-desc { flex: 1; }

      .section-bar {
        display: flex; align-items: center; gap: 14px; margin: 20px 0 4px; flex-wrap: wrap;
      }
      .back-btn {
        display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; border: 1.5px solid var(--line);
        background: var(--surface); color: var(--ink); font-weight: 700; font-size: 0.9rem; padding: 9px 16px;
      }
      .back-btn .lucide { width: 16px; height: 16px; }
      .back-btn:hover { border-color: var(--amber); }
      .section-bar .sb-pillar { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); }
      .section-bar .sb-title { font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; font-weight: 600; }
      .section-bar .sb-streak { margin-left: auto; }

      /* ---------- New sections ---------- */
      .wide { grid-column: 1 / -1; }
      .grat-list { list-style: none; margin: 12px 0 0; padding: 0; }
      .grat-item { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: flex-start; }
      .grat-item:first-child { border-top: none; }
      .grat-item .lucide { width: 18px; height: 18px; color: var(--rose); flex: none; margin-top: 3px; }
      .grat-date { font-size: 0.75rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
      .grat-text { font-size: 0.97rem; }

      .breath-stage { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 0 4px; }
      .breath-circle {
        width: 150px; height: 150px; border-radius: 50%; margin: 10px 0 16px;
        background: radial-gradient(circle at 35% 30%, #7ef0dd, var(--teal) 70%);
        display: grid; place-items: center; color: #fff; transition: transform 1s ease-in-out;
        box-shadow: 0 14px 34px rgba(0, 168, 150, 0.35);
      }
      .breath-circle .b-count { font-family: "Fraunces", Georgia, serif; font-size: 2rem; font-weight: 700; }
      .breath-phase { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 600; }
      .breath-prompt { color: var(--ink-soft); font-style: italic; min-height: 1.6em; margin: 4px 0 12px; }

      .seg-row { display: flex; gap: 7px; flex-wrap: wrap; }
      .seg-btn {
        border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
        border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 0.85rem;
      }
      .seg-btn.selected { background: var(--cta); border-color: transparent; color: #fff; }
      .scale-row { display: flex; gap: 6px; margin: 8px 0 4px; }
      .scale-btn {
        flex: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 11px;
        padding: 9px 2px; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft);
      }
      .scale-btn.selected { background: var(--cta); border-color: transparent; color: #fff; }
      .burnout-q { padding: 13px 0; border-top: 1px solid var(--line); }
      .burnout-q:first-of-type { border-top: none; }
      .burnout-q .bq-text { font-weight: 600; font-size: 0.97rem; }
      .result-box { display: none; border-radius: 14px; padding: 16px 18px; margin-top: 16px; background: var(--teal-soft); color: var(--ink); }
      .result-box.show { display: block; animation: fadeSlide 0.35s ease both; }
      .result-box .r-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.15rem; margin-bottom: 4px; }

      .reflect-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 6px 0 16px; }
      .reflect-stat { background: var(--surface-2); border-radius: 13px; padding: 13px; text-align: center; }
      .reflect-stat .rs-num { font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
      .reflect-stat .rs-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
      .reflect-q { margin-top: 16px; }
      .reflect-q label { display: block; font-weight: 600; margin-bottom: 6px; }
      textarea.text-input { resize: vertical; min-height: 64px; font-family: inherit; line-height: 1.5; }

      .entry-card { border: 1.5px solid var(--line); border-radius: 15px; padding: 16px; margin-top: 12px; background: var(--surface); }
      .entry-card .e-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
      .entry-card .e-name { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.1rem; }
      .entry-card .e-meta { font-size: 0.8rem; color: var(--ink-faint); font-weight: 600; }
      .entry-card .e-notes { font-size: 0.92rem; color: var(--ink-soft); margin-top: 6px; }
      .status-pill { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
      .st-not { background: var(--rose-soft); color: var(--rose); }
      .st-getting { background: var(--amber-soft); color: var(--amber); }
      .st-working { background: var(--teal-soft); color: var(--teal); }
      .mini-btn {
        border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
        padding: 6px 12px; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
      }
      .mini-btn.selected { background: var(--cta); color: #fff; border-color: transparent; }
      .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
      .form-grid .full { grid-column: 1 / -1; }
      .form-field label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
      select.text-input { appearance: none; }

      .goal-ms { list-style: none; margin: 10px 0 0; padding: 0; }
      .goal-ms li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
      .goal-ms .todo-check { margin-top: 0; }
      .goal-ms li.done .ms-text { text-decoration: line-through; color: var(--ink-faint); }
      .goal-done-badge { background: var(--cta); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; }

      .routine { border: 1.5px solid var(--line); border-radius: 15px; padding: 17px; margin-top: 13px; }
      .routine .r-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
      .routine .r-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.12rem; }
      .routine ol { margin: 10px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.93rem; }
      .routine ol li { padding: 3px 0; }
      .routine ol li.now { color: var(--ink); font-weight: 700; }
      .routine .r-time { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 700; }

      .about-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
      .about-links a { text-decoration: none; }

      /* ---------- Admin dashboard ---------- */
      .nc-owner { background: var(--cta); }
      .preview-banner {
        display: flex; gap: 12px; align-items: flex-start;
        background: var(--rose-soft); border: 1.5px dashed var(--rose); border-radius: 14px;
        padding: 14px 16px; margin-bottom: 18px; color: var(--ink);
      }
      .preview-banner .lucide { width: 22px; height: 22px; color: var(--rose); flex: none; margin-top: 1px; }
      .preview-banner .pb-title { font-weight: 800; letter-spacing: 0.07em; font-size: 0.85rem; color: var(--rose); text-transform: uppercase; }
      .preview-banner p { margin: 2px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
      .admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 4px 0 18px; }
      .admin-stat { background: var(--surface-2); border-radius: 13px; padding: 14px; text-align: center; }
      .admin-stat .as-num { font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
      .admin-stat .as-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
      .users-table { width: 100%; border-collapse: collapse; }
      .users-table th {
        text-align: left; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
        color: var(--ink-faint); padding: 8px 10px; border-bottom: 2px solid var(--line);
      }
      .users-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.94rem; vertical-align: middle; }
      .users-table tbody tr:last-child td { border-bottom: none; }
      .users-table .u-name { font-weight: 700; }
      .users-table .u-email { color: var(--ink-soft); }
      .users-table .u-date { color: var(--ink-soft); white-space: nowrap; }
      .st-free { background: var(--surface-2); color: var(--ink-soft); }
      @media (max-width: 640px) {
        .admin-stats { grid-template-columns: repeat(2, 1fr); }
        .users-table thead { display: none; }
        .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
        .users-table tbody tr { border: 1.5px solid var(--line); border-radius: 13px; padding: 10px 12px; margin-bottom: 10px; }
        .users-table td { border-bottom: none; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
        .users-table td::before { content: attr(data-label); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); text-align: left; }
      }

      /* ---------- Trends ---------- */
      .trend-block { margin-top: 22px; }
      .trend-block .t-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
      .trend-block .t-title { font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; gap: 8px; }
      .trend-block .t-title .lucide { width: 18px; height: 18px; }
      .trend-block .t-avg { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
      .trend-chart { background: var(--surface-2); border-radius: 14px; padding: 16px 14px 10px; }
      .trend-chart svg { width: 100%; height: auto; display: block; }
      .trend-empty { color: var(--ink-faint); font-size: 0.92rem; text-align: center; padding: 22px 10px; margin: 0; }
      .trend-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 14px; }
      .burnout-hist { list-style: none; margin: 4px 0 0; padding: 0; }
      .burnout-hist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
      .burnout-hist li:first-child { border-top: none; }

      /* ---------- Celebration overlay ---------- */
      .celebrate {
        position: fixed; inset: 0; z-index: 300; display: none; place-items: center;
        background: rgba(61, 35, 51, 0.45); padding: 20px; overflow: hidden;
      }
      .celebrate.show { display: grid; }
      .celebrate .cel-card {
        background: var(--surface); border-radius: 22px; padding: 30px 28px; text-align: center;
        max-width: 400px; width: 100%; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3); animation: popIn 0.45s ease both; position: relative; z-index: 2;
      }
      .celebrate .cel-icon {
        width: 66px; height: 66px; margin: 0 auto 12px; border-radius: 50%; background: var(--cta);
        display: grid; place-items: center; color: #fff;
      }
      .celebrate .cel-icon .lucide { width: 32px; height: 32px; }
      .celebrate h2 { margin: 0 0 6px; font-size: 1.55rem; }
      .celebrate p { color: var(--ink-soft); margin: 0 0 18px; }
      .confetti { position: absolute; top: -12px; width: 9px; height: 15px; border-radius: 2px; z-index: 1; animation: fall linear forwards; }

      @media (max-width: 900px) {
        .home-grid { grid-template-columns: repeat(2, 1fr); }
        .about-card-home { flex-direction: column; align-items: flex-start; }
        .reflect-stats { grid-template-columns: repeat(3, 1fr); }
      }
      @media (max-width: 480px) {
        .home-grid { grid-template-columns: 1fr; }
        .form-grid { grid-template-columns: 1fr; }
        .streak-banner { padding: 18px; gap: 14px; }
      }
      @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        .bar-fill { transition: none; }
        .brand-mark, .streak-flame { animation: none; }
        .view-enter, .celebrate .cel-card, .result-box.show { animation: none; }
        .confetti { display: none; }
        .nav-card { transition: none; }
        .breath-circle { transition: none; }
      }

/* ---------- Production additions (real backend) ---------- */
.inline-error {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--rose-soft); border: 1.5px solid var(--rose); border-radius: 12px;
  padding: 11px 14px; margin: 0 0 14px; font-size: 0.9rem; font-weight: 600; color: var(--ink);
}
.inline-error .lucide { width: 18px; height: 18px; color: var(--rose); flex: none; margin-top: 1px; }
.inline-error button { margin-left: auto; background: none; border: none; color: var(--ink-faint); font-weight: 700; font-size: 0.8rem; }
.billing-note {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; margin-top: 12px; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5;
}
.billing-note strong { color: var(--ink); }
.gate-sub-status {
  display: flex; gap: 9px; align-items: center; justify-content: center;
  background: var(--teal-soft); color: var(--ink); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 0.88rem; font-weight: 600;
}
.gate-sub-status .lucide { width: 17px; height: 17px; color: var(--teal); flex: none; }
.dev-grant {
  width: 100%; margin-top: 10px; background: none; border: 1.5px dashed var(--line);
  border-radius: 999px; padding: 10px 14px; color: var(--ink-faint); font-size: 0.82rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.dev-grant .lucide { width: 15px; height: 15px; }
.dev-grant:hover { border-color: var(--teal); color: var(--teal); }
.gate-signout {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--ink-faint); font-size: 0.83rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.gate-btn:disabled, .btn:disabled { opacity: 0.6; cursor: wait; }
.prayer-del {
  flex: none; border: none; background: none; color: var(--ink-faint);
  padding: 3px; border-radius: 6px; margin-left: auto;
}
.prayer-del .lucide { width: 15px; height: 15px; }
.prayer-del:hover { color: var(--rose); }
.admin-banner-live {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--teal-soft); border: 1.5px solid var(--teal); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 18px; color: var(--ink);
}
.admin-banner-live .lucide { width: 22px; height: 22px; color: var(--teal); flex: none; margin-top: 1px; }
.admin-banner-live .pb-title { font-weight: 800; letter-spacing: 0.07em; font-size: 0.85rem; color: var(--teal); text-transform: uppercase; }
.admin-banner-live p { margin: 2px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.admin-content-editor {
  border-top: 2px solid var(--line); margin-top: 24px; padding-top: 22px;
}
.admin-content-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.admin-content-head h3 { margin: 0 0 5px; font-size: 1.25rem; }
.admin-content-head p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.admin-content-controls {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 12px;
}
.admin-content-json {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem; min-height: 320px; width: 100%;
}
.admin-content-status { min-height: 1.5em; color: var(--ink-soft); font-size: 0.9rem; }
.admin-content-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .admin-content-controls { grid-template-columns: 1fr; }
  .admin-content-head { flex-direction: column; }
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
