/* ============================================================
   MANIFEST DAILY — Complete Design System
   Version: 3.1.0 — 2026-03-13
   Single CSS file. All tokens via custom properties.
   No backdrop-filter. No gradient-text. No opacity-0 animations.
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
   ---------------------------------------------------------- */
:root {
    /* Core palette — deep cosmic night */
    --bg:          #0e0e24;
    --bg-card:     #1e1c3c;
    --bg-input:    #2a264c;
    --bg-elevated: #1c1a38;
    --gold:        #ffc842;
    --gold-light:  #ffe082;
    --gold-dim:    rgba(255, 200, 66, 0.22);
    --gold-glow:   rgba(255, 200, 66, 0.45);
    --text:        #ffffff;
    --text-muted:  #d8cce8;
    --danger:      #e74c5f;
    --success:     #3ed8a0;

    /* Gradient accents */
    --gradient-gold:    linear-gradient(135deg, #d4a944, #f0d078, #e8b94a);
    --gradient-cosmic:  linear-gradient(135deg, #1e1248 0%, #100e34 50%, #161238 100%);
    --gradient-aurora:  linear-gradient(135deg, rgba(155, 111, 201, 0.2), rgba(201, 111, 142, 0.14), rgba(212, 169, 68, 0.16));
    --gradient-glow:    radial-gradient(ellipse at 50% 0%, rgba(155, 111, 201, 0.18) 0%, rgba(212, 169, 68, 0.1) 40%, transparent 70%);
    --gradient-card:    linear-gradient(160deg, #1a1636 0%, #100e26 100%);
    --gradient-btn:     linear-gradient(135deg, #e8b94a, #ffd366);
    --gradient-btn-hover: linear-gradient(135deg, #ffd366, #ffe082);

    /* Archetype colours */
    --archetype-visionary: #b07ee8;
    --archetype-scribe:    #d4a944;
    --archetype-feeler:    #e87ba0;
    --archetype-speaker:   #4cd9a0;

    /* Archetype gradients */
    --archetype-visionary-gradient: linear-gradient(135deg, #9b6fc9, #c98bff);
    --archetype-scribe-gradient:    linear-gradient(135deg, #d4a944, #f0d078);
    --archetype-feeler-gradient:    linear-gradient(135deg, #c96f8e, #f09cb8);
    --archetype-speaker-gradient:   linear-gradient(135deg, #4caf82, #6ee0b0);

    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body:    'DM Sans', sans-serif;

    /* Spacing */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;

    /* Borders */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 1px rgba(155, 111, 201, 0.1);
    --shadow-glow: 0 0 24px var(--gold-glow), 0 0 48px rgba(212, 169, 68, 0.1);
    --shadow-cosmic: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 1px rgba(155, 111, 201, 0.15);

    /* Layout */
    --nav-height:  64px;
    --max-width:   480px;
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

#app, .bottom-nav, .toast-container, .modal-overlay, .celebration-overlay {
    position: relative;
    z-index: 1;
}

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

/* ----------------------------------------------------------
   3. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }

.display-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
}

/* ----------------------------------------------------------
   4. Layout Utilities
   ---------------------------------------------------------- */
#app {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-md);
    min-height: 100vh;
    min-height: 100dvh;
}

.pb-nav {
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-lg));
}

.pt-safe {
    padding-top: calc(var(--safe-top) + var(--space-md));
}

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.gap-xs      { gap: var(--space-xs); }
.gap-sm      { gap: var(--space-sm); }
.gap-md      { gap: var(--space-md); }
.gap-lg      { gap: var(--space-lg); }

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }

/* ----------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient-btn);
    color: var(--bg);
    border: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: var(--gradient-btn-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(212, 169, 68, 0.4);
}

.btn-ghost:hover {
    background: var(--gold-dim);
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(212, 169, 68, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--gold);
}

/* ----------------------------------------------------------
   6. Cards
   ---------------------------------------------------------- */
.card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(155, 111, 201, 0.2);
}

.card--gold {
    border: 1px solid rgba(212, 169, 68, 0.35);
    background: linear-gradient(160deg, #221c3e 0%, #181430 100%);
}

.card--glow {
    border: 1px solid rgba(212, 169, 68, 0.5);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(160deg, #231c3a 0%, #141028 100%);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

/* ----------------------------------------------------------
   7. Forms
   ---------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-dim), 0 0 16px rgba(212, 169, 68, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #a899be;
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
}

/* ----------------------------------------------------------
   8. Bottom Navigation
   ---------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: #0a0816;
    border-top: 1px solid rgba(255, 200, 66, 0.15);
    display: none;
    align-items: center;
    justify-content: space-around;
    padding-bottom: var(--safe-bottom);
    z-index: 100;
}

.bottom-nav.active {
    display: flex;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.65rem;
    cursor: pointer;
    padding: var(--space-sm);
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-item.active,
.nav-item:hover {
    color: var(--gold);
}

.nav-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px var(--gold-glow)) drop-shadow(0 0 16px rgba(212, 169, 68, 0.15));
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: 1px;
}

/* ----------------------------------------------------------
   9. Toast Notifications
   ---------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: calc(var(--safe-top) + var(--space-md));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: #100e24;
    border: 1px solid rgba(155, 111, 201, 0.15);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
    pointer-events: auto;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: var(--shadow-cosmic);
}

.toast--success {
    border-color: rgba(62, 216, 160, 0.4);
    box-shadow: var(--shadow-card), 0 0 16px rgba(62, 216, 160, 0.1);
}
.toast--error {
    border-color: rgba(231, 76, 95, 0.4);
    box-shadow: var(--shadow-card), 0 0 16px rgba(231, 76, 95, 0.1);
}

/* ----------------------------------------------------------
   10. Modal
   ---------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 26, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: var(--space-lg);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 400px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-cosmic);
    border: 1px solid rgba(155, 111, 201, 0.12);
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* ----------------------------------------------------------
   11. Skeleton Loading
   ---------------------------------------------------------- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-input) 25%,
        var(--bg-elevated) 50%,
        var(--bg-input) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-sm);
    width: 80%;
}

.skeleton-title {
    height: 1.5em;
    margin-bottom: var(--space-md);
    width: 60%;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
}

/* ----------------------------------------------------------
   12. Streak Dots
   ---------------------------------------------------------- */
.streak-dots {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.streak-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(24, 20, 50, 0.8);
    border: 1px solid rgba(155, 111, 201, 0.15);
    transition: all 0.3s ease;
}

.streak-dot.filled {
    background: var(--gradient-btn);
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow), 0 0 20px rgba(212, 169, 68, 0.1);
}

.streak-dot.today {
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
    animation: pulse 2s infinite;
}

/* ----------------------------------------------------------
   13. Archetype Theming
   ---------------------------------------------------------- */
[data-archetype="visionary"] {
    --archetype-color: var(--archetype-visionary);
    --archetype-gradient: var(--archetype-visionary-gradient);
    --archetype-glow: rgba(176, 126, 232, 0.15);
}
[data-archetype="scribe"] {
    --archetype-color: var(--archetype-scribe);
    --archetype-gradient: var(--archetype-scribe-gradient);
    --archetype-glow: rgba(212, 169, 68, 0.15);
}
[data-archetype="feeler"] {
    --archetype-color: var(--archetype-feeler);
    --archetype-gradient: var(--archetype-feeler-gradient);
    --archetype-glow: rgba(232, 123, 160, 0.15);
}
[data-archetype="speaker"] {
    --archetype-color: var(--archetype-speaker);
    --archetype-gradient: var(--archetype-speaker-gradient);
    --archetype-glow: rgba(76, 217, 160, 0.15);
}

.archetype-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.75rem;
    background: var(--archetype-glow, rgba(212, 169, 68, 0.1));
    border: 1px solid var(--archetype-color, var(--gold));
    border-radius: var(--radius-xl);
    color: var(--archetype-color, var(--gold));
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    box-shadow: 0 0 12px var(--archetype-glow, rgba(212, 169, 68, 0.1));
}

/* ----------------------------------------------------------
   14. Evidence & Vision Board Grid
   ---------------------------------------------------------- */
.masonry-grid {
    columns: 2;
    column-gap: var(--space-md);
}

.masonry-grid > * {
    break-inside: avoid;
    margin-bottom: var(--space-md);
}

.vision-tile {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: grab;
    border: 1px solid rgba(155, 111, 201, 0.2);
    transition: box-shadow 0.3s, transform 0.3s;
}

.vision-tile:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(155, 111, 201, 0.06);
    transform: translateY(-2px);
}

.vision-tile img {
    width: 100%;
    display: block;
}

.vision-tile-label {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ----------------------------------------------------------
   15. Method Cards
   ---------------------------------------------------------- */
.method-card {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid rgba(155, 111, 201, 0.1);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.method-card:hover {
    border-color: rgba(212, 169, 68, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 169, 68, 0.08);
}

.method-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.method-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.method-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------------
   16. Counter (55x5)
   ---------------------------------------------------------- */
.counter-ring {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-full);
    border: 3px solid rgba(155, 111, 201, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    background: radial-gradient(circle at center, rgba(212, 169, 68, 0.03) 0%, transparent 70%);
}

.counter-ring-progress {
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-full);
    border: 3px solid transparent;
    border-top-color: var(--gold);
    transition: transform 0.3s;
    filter: drop-shadow(0 0 6px var(--gold-glow));
}

.counter-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    filter: drop-shadow(0 0 12px rgba(212, 169, 68, 0.2));
}

.counter-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: var(--space-sm);
}

/* ----------------------------------------------------------
   17. Onboarding
   ---------------------------------------------------------- */
.onboarding-step {
    text-align: center;
    padding: var(--space-xl) 0;
}

.onboarding-progress {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    transition: background 0.3s;
}

.onboarding-dot.active {
    background: var(--gradient-btn);
    box-shadow: 0 0 8px var(--gold-glow);
}

.archetype-option {
    background: var(--gradient-card);
    border: 2px solid rgba(155, 111, 201, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    text-align: left;
}

.archetype-option:hover {
    border-color: rgba(155, 111, 201, 0.3);
    transform: translateY(-2px);
}

.archetype-option.selected {
    border-color: var(--archetype-color, var(--gold));
    box-shadow: 0 0 20px var(--archetype-glow, rgba(212, 169, 68, 0.15));
}

.archetype-option .sigil {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

/* ----------------------------------------------------------
   18. Upgrade / Plan Cards
   ---------------------------------------------------------- */
.plan-card {
    background: var(--gradient-card);
    border: 1px solid rgba(155, 111, 201, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan-card:hover {
    transform: translateY(-2px);
}

.plan-card.recommended {
    border-color: rgba(212, 169, 68, 0.5);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(160deg, #231c3a 0%, #19142c 100%);
}

.plan-card-price {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
}

.plan-card-period {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    text-align: left;
    margin: var(--space-lg) 0;
}

.plan-features li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.plan-features li::before {
    content: '\2726 ';
    color: var(--gold);
}

/* ----------------------------------------------------------
   19. Journal
   ---------------------------------------------------------- */
.journal-editor {
    position: relative;
}

.journal-editor .form-textarea {
    min-height: 300px;
    font-size: 1rem;
    line-height: 1.8;
}

.journal-word-count {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.journal-entry-card {
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    border: 1px solid rgba(155, 111, 201, 0.2);
}

.journal-entry-card:hover {
    border-color: rgba(212, 169, 68, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.journal-entry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.journal-entry-preview {
    font-size: 0.9rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.journal-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, rgba(212, 169, 68, 0.12), rgba(155, 111, 201, 0.08));
    color: var(--gold-light);
    border: 1px solid rgba(212, 169, 68, 0.15);
}

/* ----------------------------------------------------------
   20. Analytics Charts (Pro)
   ---------------------------------------------------------- */
.chart-container {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(155, 111, 201, 0.2);
}

.chart-canvas {
    width: 100%;
    height: 200px;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background: rgba(24, 20, 50, 0.6);
    transition: background 0.3s, box-shadow 0.3s;
}

.heatmap-cell.level-1 { background: rgba(155, 111, 201, 0.2); }
.heatmap-cell.level-2 { background: rgba(186, 140, 212, 0.35); }
.heatmap-cell.level-3 { background: rgba(212, 169, 68, 0.5); }
.heatmap-cell.level-4 {
    background: var(--gradient-btn);
    box-shadow: 0 0 6px rgba(212, 169, 68, 0.3);
}

/* ----------------------------------------------------------
   21. Check-in Slider
   ---------------------------------------------------------- */
.checkin-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(155, 111, 201, 0.2), rgba(212, 169, 68, 0.2));
    outline: none;
}

.checkin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    cursor: pointer;
    box-shadow: 0 0 12px var(--gold-glow), 0 0 24px rgba(212, 169, 68, 0.1);
    transition: box-shadow 0.2s;
}

.checkin-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 16px var(--gold-glow), 0 0 32px rgba(212, 169, 68, 0.15);
}

.checkin-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px var(--gold-glow), 0 0 24px rgba(212, 169, 68, 0.1);
}

.checkin-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

/* ----------------------------------------------------------
   22. Profile / Settings
   ---------------------------------------------------------- */
.profile-header {
    text-align: center;
    padding: var(--space-xl) 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle at center, rgba(212, 169, 68, 0.15) 0%, rgba(155, 111, 201, 0.08) 100%);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    border: 2px solid var(--gold-dim);
    position: relative;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    z-index: -1;
    opacity: 0.7;
}

.settings-section {
    margin-bottom: var(--space-xl);
}

.settings-section-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(155, 111, 201, 0.06);
}

/* ----------------------------------------------------------
   23. Toggle Switch
   ---------------------------------------------------------- */
.toggle {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--text-muted);
    transition: transform 0.2s, background 0.2s;
}

.toggle input:checked + .toggle-track {
    background: var(--gold-dim);
}

.toggle input:checked + .toggle-track::after {
    transform: translateX(20px);
    background: var(--gold);
}

/* ----------------------------------------------------------
   24. Desire Pills
   ---------------------------------------------------------- */
.desire-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(24, 20, 50, 0.8), rgba(16, 14, 36, 0.9));
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    color: var(--text);
    border: 1px solid rgba(155, 111, 201, 0.12);
    transition: border-color 0.3s;
}

.desire-pill:hover {
    border-color: rgba(212, 169, 68, 0.25);
}

.desire-pill-progress {
    width: 32px;
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    overflow: hidden;
}

.desire-pill-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.3s;
}

/* ----------------------------------------------------------
   25. Empty States
   ---------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: var(--space-sm);
}

.empty-state-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

/* ----------------------------------------------------------
   26. Tier Gate Banner
   ---------------------------------------------------------- */
.tier-gate {
    background: linear-gradient(135deg, rgba(212, 169, 68, 0.08), rgba(155, 111, 201, 0.06));
    border: 1px solid rgba(212, 169, 68, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    margin: var(--space-md) 0;
    box-shadow: 0 0 24px rgba(212, 169, 68, 0.06);
}

.tier-gate-text {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

/* ----------------------------------------------------------
   27. Celebration Overlay
   ---------------------------------------------------------- */
.celebration-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(212, 169, 68, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 30% 30%, rgba(155, 111, 201, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(232, 123, 160, 0.06) 0%, transparent 40%),
        rgba(6, 6, 26, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
    animation: fadeIn 0.3s ease;
}

.celebration-content {
    text-align: center;
    padding: var(--space-xl);
}

.celebration-sigil {
    font-size: 4rem;
    animation: celebrationPulse 1s ease infinite;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 0 20px var(--gold-glow));
}

/* ----------------------------------------------------------
   28. Tabs
   ---------------------------------------------------------- */
.tabs {
    display: flex;
    border-bottom: 1px solid rgba(155, 111, 201, 0.1);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
}

.tab {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s, border-color 0.3s;
}

.tab.active {
    color: var(--gold);
    border-image: var(--gradient-gold) 1;
}

/* ----------------------------------------------------------
   29. Floating Action Button
   ---------------------------------------------------------- */
.fab {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-md));
    right: var(--space-lg);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    color: var(--bg);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-glow), var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 32px var(--gold-glow), 0 0 48px rgba(212, 169, 68, 0.15), var(--shadow-card);
}

/* ----------------------------------------------------------
   30. Animations
   ---------------------------------------------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
    50%      { box-shadow: 0 0 0 8px transparent; }
}

@keyframes celebrationPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 16px var(--gold-glow)); }
    50%      { transform: scale(1.2); filter: drop-shadow(0 0 32px var(--gold-glow)); }
}

/* .animate-in is intentionally a no-op — no opacity:0 start */
.animate-in {
    /* removed slideUp animation that caused invisible content */
}

/* ----------------------------------------------------------
   31. Scrollbar
   ---------------------------------------------------------- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

/* ----------------------------------------------------------
   32. Auth Screens
   ---------------------------------------------------------- */
.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--space-xl);
    text-align: center;
}

.auth-logo {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-xs);
}

.auth-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-2xl);
}

.auth-form {
    width: 100%;
    max-width: 340px;
    text-align: left;
}

.auth-toggle {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--gold);
    cursor: pointer;
}

/* ----------------------------------------------------------
   33. Moon Phase
   ---------------------------------------------------------- */
.moon-phase-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(212, 169, 68, 0.3));
}

/* ----------------------------------------------------------
   34. Horoscope
   ---------------------------------------------------------- */
.horoscope-sign-icon {
    font-size: 1.3rem;
    margin-right: var(--space-xs);
    vertical-align: middle;
}

.horoscope-text p {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ----------------------------------------------------------
   35. Oracle Cards
   ---------------------------------------------------------- */
.oracle-card-back {
    background: var(--gradient-cosmic);
    border: 2px solid rgba(212, 169, 68, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.oracle-card-back::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212, 169, 68, 0.2);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.oracle-card-back::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(155, 111, 201, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(212, 169, 68, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.oracle-card-back:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.oracle-card-back-inner {
    position: relative;
    z-index: 1;
}

.oracle-card-sigil {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: var(--space-md);
    filter: drop-shadow(0 0 20px var(--gold-glow));
    animation: pulse 2s infinite;
}

.oracle-card-flipping {
    animation: cardFlip 0.6s ease-in forwards;
}

.oracle-card {
    background: var(--gradient-card);
    border: 2px solid rgba(212, 169, 68, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-glow);
}

.oracle-card-inner {
    position: relative;
    z-index: 1;
}

.oracle-card-border {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(212, 169, 68, 0.15);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.oracle-card-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-md);
    filter: drop-shadow(0 0 12px rgba(212, 169, 68, 0.2));
}

.oracle-card-divider {
    width: 60px;
    height: 1px;
    background: var(--gradient-gold);
    margin: 0 auto var(--space-md);
    opacity: 0.5;
}

.oracle-card-meaning {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text);
    font-style: italic;
}

.oracle-card-reveal {
    animation: cardReveal 0.5s ease-out;
}

@keyframes cardFlip {
    0%   { transform: perspective(600px) rotateY(0); }
    100% { transform: perspective(600px) rotateY(90deg); opacity: 0; }
}

@keyframes cardReveal {
    0%   { transform: perspective(600px) rotateY(-90deg); opacity: 0; }
    100% { transform: perspective(600px) rotateY(0); opacity: 1; }
}

/* ----------------------------------------------------------
   36. Affirmations
   ---------------------------------------------------------- */
.affirmation-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.affirmation-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(155, 111, 201, 0.06);
    font-size: 0.9rem;
    line-height: 1.6;
}

.affirmation-bullet {
    color: var(--gold);
    font-size: 0.7rem;
    margin-top: 4px;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   37. Gratitude
   ---------------------------------------------------------- */
.gratitude-streak-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(62, 216, 160, 0.08);
    border: 1px solid rgba(62, 216, 160, 0.2);
    border-radius: var(--radius-xl);
    color: var(--success);
    font-family: var(--font-display);
}

.gratitude-streak-badge #streak-count {
    font-size: 1.3rem;
    font-weight: 700;
}

/* ----------------------------------------------------------
   38. Search
   ---------------------------------------------------------- */
.search-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* ----------------------------------------------------------
   39. Share Card
   ---------------------------------------------------------- */
.share-card {
    background: var(--gradient-cosmic);
    border: 2px solid rgba(212, 169, 68, 0.35);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.share-card-watermark {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-md);
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ----------------------------------------------------------
   40. Ritual Mode
   ---------------------------------------------------------- */
.ritual-step {
    text-align: center;
    padding: var(--space-xl) 0;
}

.ritual-breathing-circle {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    background: radial-gradient(circle at center, rgba(212, 169, 68, 0.05) 0%, transparent 70%);
}

.ritual-timer {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

/* ----------------------------------------------------------
   41. Spiritual Guide Chat
   ---------------------------------------------------------- */
.guide-screen {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.guide-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--bg);
    flex-shrink: 0;
}

.guide-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.guide-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guide-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.guide-bubble {
    display: flex;
    gap: var(--space-sm);
    max-width: 85%;
    animation: guideFadeIn 0.3s ease;
}

@keyframes guideFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.guide-bubble--guide {
    align-self: flex-start;
}

.guide-bubble--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.guide-bubble-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.guide-bubble-text {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text);
}

.guide-bubble--guide .guide-bubble-text {
    background: var(--bg-card);
    border-top-left-radius: var(--radius-xs);
}

.guide-bubble--user .guide-bubble-text {
    background: rgba(155, 111, 201, 0.2);
    border-top-right-radius: var(--radius-xs);
}

.guide-input-area {
    padding: var(--space-sm) var(--space-md);
    padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px) + 70px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.guide-input-form {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
}

.guide-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s;
}

.guide-input:focus {
    border-color: var(--gold-dim);
}

.guide-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.guide-send-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    border: none;
    color: var(--bg);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.guide-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.guide-send-btn:not(:disabled):hover {
    background: var(--gradient-btn-hover);
}

/* Typing indicator */
.guide-typing .typing-dots {
    display: inline-flex;
    gap: 3px;
}

.guide-typing .typing-dots span {
    font-size: 1.4rem;
    color: var(--text-muted);
    animation: typingBounce 1.4s infinite;
}

.guide-typing .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.guide-typing .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-4px); }
}
