/* ================================================================
   SUNDAY HUSH - Coastal Theme
   Shared palette layer for sundayhush.com
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

:root {
    /* Primary - the sea */
    --deep-sea: #1d4f48;
    --sea-green: #26665f;
    --tide: #3d8479;
    --aquamarine: #6dafa3;
    --sea-mist: #b7d8d1;

    /* Neutrals - pearl and sand */
    --pearl: #faf6ec;
    --cream: #f4efe3;
    --sand: #e8e0cf;
    --ink-soft: #5a6b65;
    --ink: #2a3a36;

    /* Accents - gold and abalone shimmer */
    --gold: #c9a14a;
    --gold-soft: #dcc48a;
    --shell-pink: #e8c5d4;
    --lavender: #d4c5e8;
    --sky-shimmer: #c5dde8;

    /* Typography aliases */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Jost', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radius aliases */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-pill: 999px;
    --radius-full: 9999px;

    /* Shadow aliases */
    --shadow-soft: 0 4px 20px rgba(40, 70, 64, 0.08);
    --shadow-card: 0 8px 30px rgba(40, 70, 64, 0.12);
    --shadow-deep: 0 16px 50px rgba(40, 70, 64, 0.18);

    /* Legacy Sunday Hush bridge */
    --parchment: var(--pearl);
    --parchment-light: #fffaf0;
    --sage-deep: var(--deep-sea);
    --sage: var(--sea-green);
    --sage-medium: var(--tide);
    --sage-light: var(--aquamarine);
    --sage-muted: #8fbdb4;
    --sage-soft: var(--sea-mist);
    --sage-whisper: rgba(183, 216, 209, 0.38);
    --mist: rgba(183, 216, 209, 0.22);
    --sand-accent: var(--gold-soft);
    --taupe: #bfae92;
    --cocoa: #8a5f4d;
    --charcoal: var(--ink);
    --stone: var(--ink-soft);
    --warm-gray: #82918c;

    /* Semantic bridge */
    --bg-primary: var(--pearl);
    --bg-secondary: var(--sand);
    --bg-accent: var(--cream);
    --bg-sage: rgba(183, 216, 209, 0.2);
    --card-bg: var(--cream);
    --card-bg-soft: rgba(244, 239, 227, 0.82);
    --card-bg-strong: rgba(250, 246, 236, 0.94);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-muted: #7b8984;
    --accent-primary: var(--sea-green);
    --accent-secondary: var(--deep-sea);
    --accent-glow: rgba(109, 175, 163, 0.24);
    --border-color: rgba(38, 102, 95, 0.18);
    --border-sage: rgba(38, 102, 95, 0.28);
    --card-shadow: var(--shadow-card);
    --card-shadow-lg: var(--shadow-deep);
    --glass-shadow: 0 24px 64px -34px rgba(29, 79, 72, 0.28);
    --shadow-sm: var(--shadow-soft);
    --shadow-md: var(--shadow-card);
    --shadow-lg: var(--shadow-deep);
    --shadow-sage: 0 14px 32px -18px rgba(29, 79, 72, 0.42);
    --shadow-glow: 0 0 44px rgba(109, 175, 163, 0.28);

    --font-display: var(--font-serif);
    --font-body: var(--font-sans);
}

body {
    background: var(--pearl);
    color: var(--ink);
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.footer-logo,
.section-title,
.hero-title {
    color: var(--ink);
}

p,
li,
.section-subtitle,
.article-excerpt,
.footer-description {
    color: var(--ink-soft);
}

a {
    color: var(--sea-green);
}

a:hover {
    color: var(--tide);
}

.card,
.article-card,
.blog-card,
.feature-card,
.tool-card,
.continuity-banner,
.journal-card,
.mood-card,
.memory-card {
    background: var(--cream);
    color: var(--ink);
    border-color: rgba(38, 102, 95, 0.18);
    box-shadow: var(--shadow-card);
}

.btn,
.hero-btn-primary,
.primary-btn,
.cta-button,
button[type="submit"] {
    background: var(--deep-sea);
    color: var(--pearl);
    border-color: var(--deep-sea);
}

.btn:hover,
.hero-btn-primary:hover,
.primary-btn:hover,
.cta-button:hover,
button[type="submit"]:hover {
    background: var(--tide);
    border-color: var(--tide);
}

.hero-btn-secondary,
.secondary-btn {
    color: var(--deep-sea);
    border-color: rgba(38, 102, 95, 0.4);
}

.section-eyebrow,
.article-meta,
.nav-link:hover {
    color: var(--sea-green);
}

.featured .article-card {
    background: var(--cream);
    color: var(--ink);
}

.featured .article-title {
    color: var(--ink);
}

.featured .article-excerpt {
    color: var(--ink-soft);
}

.featured .article-meta {
    color: var(--sea-green);
}

body.late-night .featured {
    background: #1f3f38;
}

body.late-night .featured .section-eyebrow,
body.late-night .featured .article-meta {
    color: #e6c98a;
}

body.late-night .featured .section-title,
body.late-night .featured .article-title {
    color: #f1ece0;
}

body.late-night .featured .section-intro,
body.late-night .featured .article-excerpt {
    color: #b8b3a4;
}

body.late-night .featured .article-card {
    background: #16302b;
    color: #f1ece0;
    border-color: rgba(214, 179, 94, 0.2);
}

body.late-night .featured .article-card:hover .article-title {
    color: #e6c98a;
}

body.late-night .featured .btn,
body.late-night .featured .btn-outline {
    background: #d6b35e;
    color: #0d1f1c;
    border-color: #d6b35e;
}

.header.scrolled {
    background: rgba(250, 246, 236, 0.86);
    border-bottom-color: rgba(38, 102, 95, 0.14);
}

.footer {
    background: linear-gradient(180deg, rgba(244, 239, 227, 0.94), rgba(232, 224, 207, 0.98));
    color: var(--ink);
    border-top-color: rgba(38, 102, 95, 0.16);
}

.footer a {
    color: var(--ink-soft);
}

.footer a:hover {
    color: var(--sea-green);
}

.breath-orb,
.breathing-circle,
.orb-core {
    border-color: rgba(201, 161, 74, 0.55);
    box-shadow:
        0 0 0 1px rgba(109, 175, 163, 0.18),
        0 18px 48px rgba(29, 79, 72, 0.18),
        inset 0 0 34px rgba(109, 175, 163, 0.2);
}

.feeling-chip,
.chip {
    background: rgba(250, 246, 236, 0.84);
    color: var(--ink);
    border-color: rgba(38, 102, 95, 0.28);
}

.feeling-chip:hover,
.chip:hover {
    background: rgba(183, 216, 209, 0.34);
    border-color: rgba(61, 132, 121, 0.42);
}

.sera-interface,
.sera-shell,
.sera-chat-demo {
    --ink: #f1ece0;
    --ink-soft: rgba(241, 236, 224, 0.82);
}

@media (prefers-color-scheme: dark) {
    :root {
        --pearl: #0d1f1c;
        --cream: #16302b;
        --sand: #1f3f38;
        --ink: #f1ece0;
        --ink-soft: #b8b3a4;
        --gold: #d6b35e;
        --gold-soft: #e6c98a;

        --parchment: var(--pearl);
        --parchment-light: #142b26;
        --sage-deep: #9cc9c0;
        --sage: #7fb7ac;
        --sage-medium: #6dafa3;
        --sage-light: #8fc8be;
        --sage-muted: #5b8f86;
        --sage-soft: rgba(183, 216, 209, 0.18);
        --sage-whisper: rgba(183, 216, 209, 0.1);
        --mist: rgba(183, 216, 209, 0.08);
        --charcoal: var(--ink);
        --stone: var(--ink-soft);
        --warm-gray: rgba(241, 236, 224, 0.56);
        --bg-primary: var(--pearl);
        --bg-secondary: var(--sand);
        --bg-accent: var(--cream);
        --bg-sage: #173630;
        --card-bg: var(--cream);
        --card-bg-soft: rgba(22, 48, 43, 0.74);
        --card-bg-strong: rgba(22, 48, 43, 0.92);
        --text-primary: var(--ink);
        --text-secondary: var(--ink-soft);
        --text-muted: rgba(241, 236, 224, 0.56);
        --accent-primary: var(--aquamarine);
        --accent-secondary: var(--gold-soft);
        --accent-glow: rgba(109, 175, 163, 0.18);
        --border-color: rgba(214, 179, 94, 0.2);
        --border-sage: rgba(183, 216, 209, 0.22);
        --card-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.42);
        --card-shadow-lg: 0 24px 64px -32px rgba(0, 0, 0, 0.56);
        --glass-shadow: 0 28px 72px -36px rgba(0, 0, 0, 0.58);
    }

    body {
        background: var(--pearl);
        color: var(--ink);
    }

    .card,
    .article-card,
    .blog-card,
    .feature-card,
    .tool-card {
        background: var(--cream);
        color: var(--ink);
        border: 1px solid rgba(214, 179, 94, 0.2);
    }

    .featured .article-card {
        background: var(--cream);
        color: var(--ink);
    }

    .featured .section-title,
    .featured .article-title {
        color: var(--ink);
    }

    .featured .section-intro,
    .featured .article-excerpt {
        color: var(--ink-soft);
    }

    .featured .section-eyebrow,
    .featured .article-meta {
        color: var(--gold-soft);
    }

    .featured .article-card:hover .article-title {
        color: var(--gold-soft);
    }

    .header.scrolled {
        background: rgba(13, 31, 28, 0.84);
        border-bottom-color: rgba(214, 179, 94, 0.14);
    }

    .footer {
        background: linear-gradient(180deg, rgba(13, 31, 28, 0.98), rgba(22, 48, 43, 0.95));
        border-top-color: rgba(214, 179, 94, 0.14);
    }

    .sera-interface,
    .sera-shell,
    .sera-chat-demo,
    .solace-preview {
        color-scheme: light;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================
   Site-wide Navigation
   ================================================================ */

body {
    scroll-padding-top: 96px;
}

body.nav-open {
    overflow: hidden;
}

body .header.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 5000 !important;
    height: 80px !important;
    min-height: 80px !important;
    background: rgba(31, 58, 52, 0.85) !important;
    border-bottom: 1px solid rgba(214, 196, 138, 0.22) !important;
    box-shadow: 0 18px 46px -32px rgba(13, 31, 28, 0.72) !important;
    backdrop-filter: blur(18px) saturate(132%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(132%) !important;
    transform: translateY(0) !important;
    transition:
        transform 260ms ease,
        background-color 260ms ease,
        box-shadow 260ms ease !important;
}

body .header.site-header.nav-hidden {
    transform: translateY(calc(-100% - 12px)) !important;
}

body .header.site-header .header-container {
    width: min(100% - 48px, 1440px) !important;
    height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: clamp(18px, 3vw, 42px) !important;
}

body .header.site-header .nav {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
}

body .header.site-header .nav-left {
    justify-content: flex-end !important;
}

body .header.site-header .nav-right {
    justify-content: flex-start !important;
}

body .header.site-header .nav-list {
    display: flex !important;
    align-items: center !important;
    gap: clamp(18px, 2.2vw, 34px) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    white-space: nowrap !important;
}

body .header.site-header .logo {
    display: block !important;
    justify-self: center !important;
    min-width: max-content !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--font-serif) !important;
    font-size: clamp(1.55rem, 2.2vw, 2.35rem) !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    color: var(--cream) !important;
    text-decoration: none !important;
    letter-spacing: 0.02em !important;
    text-shadow: 0 1px 16px rgba(13, 31, 28, 0.5) !important;
}

body .header.site-header .nav-link,
body .header.site-header .mobile-nav-link {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 44px !important;
    color: rgba(250, 246, 236, 0.88) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 12px rgba(13, 31, 28, 0.45) !important;
}

body .header.site-header .nav-link:hover,
body .header.site-header .nav-link.active,
body .header.site-header .mobile-nav-link:hover,
body .header.site-header .mobile-nav-link.active {
    color: var(--gold-soft) !important;
}

body .header.site-header .nav-link::after {
    background: var(--gold-soft) !important;
}

body .header.site-header.over-hero {
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body .header.site-header.over-hero .logo,
body .header.site-header.over-hero .nav-link {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

body .header.site-header.over-hero .nav-link:hover,
body .header.site-header.over-hero .nav-link.active {
    color: #ffffff !important;
}

body .header.site-header.over-hero .menu-bar {
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

body .header.site-header .menu-toggle {
    display: none !important;
    position: relative !important;
    z-index: 5002 !important;
    justify-self: end !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 1px solid rgba(250, 246, 236, 0.22) !important;
    border-radius: var(--radius-pill) !important;
    background: rgba(250, 246, 236, 0.08) !important;
}

body .header.site-header .menu-bar {
    display: block !important;
    width: 18px !important;
    height: 2px !important;
    margin: 4px auto !important;
    border-radius: 2px !important;
    background: var(--cream) !important;
    transition: transform 240ms ease, opacity 240ms ease !important;
}

body .header.site-header .menu-toggle.active .menu-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg) !important;
}

body .header.site-header .menu-toggle.active .menu-bar:nth-child(2) {
    opacity: 0 !important;
}

body .header.site-header .menu-toggle.active .menu-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg) !important;
}

body .header.site-header .mobile-menu {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5001 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px !important;
    padding: 96px 24px 40px !important;
    background: rgba(13, 31, 28, 0.94) !important;
    backdrop-filter: blur(20px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
}

body .header.site-header .mobile-menu.active {
    display: flex !important;
}

@media (max-width: 900px) {
    body .header.site-header .header-container {
        width: min(100% - 32px, 760px) !important;
        grid-template-columns: 44px 1fr 44px !important;
    }

    body .header.site-header .nav {
        display: none !important;
    }

    body .header.site-header .logo {
        grid-column: 2 !important;
        font-size: clamp(1.6rem, 8vw, 2.15rem) !important;
    }

    body .header.site-header .menu-toggle {
        display: block !important;
        grid-column: 3 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .header.site-header {
        transition: none !important;
    }
}

/* App Store legal review: keep shared nav readable in dark mode. */
:root {
    --nav-logo-color: #f4efe3;
    --nav-link-color: rgba(250, 246, 236, 0.9);
    --nav-icon-color: #f4efe3;
}

@media (prefers-color-scheme: dark) {
    :root {
        --nav-logo-color: #f1ece0;
        --nav-link-color: rgba(241, 236, 224, 0.92);
        --nav-icon-color: #f1ece0;
    }
}

body .header.site-header .logo {
    color: var(--nav-logo-color) !important;
}

body .header.site-header .nav-link,
body .header.site-header .mobile-nav-link {
    color: var(--nav-link-color) !important;
}

body .header.site-header .menu-bar {
    background: var(--nav-icon-color) !important;
}

@media (prefers-color-scheme: dark) {
    .legal-kicker,
    .section-label,
    body.late-night .legal-kicker,
    body.late-night .section-label {
        color: var(--gold-soft, #e6c98a) !important;
    }

    .legal-summary,
    body.late-night .legal-summary {
        color: rgba(241, 236, 224, 0.74) !important;
    }

    .legal-lede,
    .legal-text,
    .legal-list li,
    .legal-notice p,
    .legal-table td,
    body.late-night .legal-lede,
    body.late-night .legal-text,
    body.late-night .legal-list li,
    body.late-night .legal-notice p,
    body.late-night .legal-table td {
        color: rgba(241, 236, 224, 0.84) !important;
    }

    .legal-title,
    .legal-section h2,
    .legal-table th,
    body.late-night .legal-title,
    body.late-night .legal-section h2,
    body.late-night .legal-table th {
        color: var(--ink, #f1ece0) !important;
    }
}


/* Day 2 dark-mode audit: shared footer and contrast system. */
.footer.site-footer {
    padding: clamp(36px, 6vw, 64px) 0 24px;
    background: linear-gradient(180deg, rgba(244, 239, 227, 0.96), rgba(232, 224, 207, 0.98));
    border-top: 1px solid rgba(38, 102, 95, 0.16);
}

.footer.site-footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.footer.site-footer .footer-logo {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 12px;
}

.footer.site-footer .footer-tagline,
.footer.site-footer .footer-description,
.footer.site-footer .footer-bottom p {
    color: var(--ink-soft);
}

.footer.site-footer .footer-description {
    max-width: 280px;
    margin-top: 8px;
}

.footer.site-footer .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 36px);
}

.footer.site-footer .footer-nav-column h4 {
    margin-bottom: 12px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sea-green);
}

.footer.site-footer .footer-nav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer.site-footer .footer-nav-column li + li {
    margin-top: 8px;
}

.footer.site-footer .footer-nav-column a {
    color: var(--ink-soft);
    text-decoration: none;
}

.footer.site-footer .footer-nav-column a:hover {
    color: var(--sea-green);
}

.footer.site-footer .footer-bottom {
    margin-top: clamp(28px, 4vw, 44px);
    padding-top: 18px;
    border-top: 1px solid rgba(38, 102, 95, 0.14);
}

@media (max-width: 760px) {
    .footer.site-footer .footer-grid,
    .footer.site-footer .footer-nav {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    .footer.site-footer,
    body.late-night .footer.site-footer,
    html.late-night body .footer.site-footer {
        background: linear-gradient(180deg, rgba(13, 31, 28, 0.98), rgba(22, 48, 43, 0.96)) !important;
        border-top-color: rgba(214, 179, 94, 0.2) !important;
    }

    .footer.site-footer .footer-logo,
    body.late-night .footer.site-footer .footer-logo,
    html.late-night body .footer.site-footer .footer-logo {
        color: #f1ece0 !important;
    }

    .footer.site-footer .footer-tagline,
    .footer.site-footer .footer-description,
    .footer.site-footer .footer-bottom p,
    .footer.site-footer .footer-nav-column a,
    body.late-night .footer.site-footer .footer-tagline,
    body.late-night .footer.site-footer .footer-description,
    body.late-night .footer.site-footer .footer-bottom p,
    body.late-night .footer.site-footer .footer-nav-column a,
    html.late-night body .footer.site-footer .footer-tagline,
    html.late-night body .footer.site-footer .footer-description,
    html.late-night body .footer.site-footer .footer-bottom p,
    html.late-night body .footer.site-footer .footer-nav-column a {
        color: rgba(241, 236, 224, 0.78) !important;
    }

    .footer.site-footer .footer-nav-column h4,
    .footer.site-footer .footer-nav-column a:hover,
    body.late-night .footer.site-footer .footer-nav-column h4,
    body.late-night .footer.site-footer .footer-nav-column a:hover,
    html.late-night body .footer.site-footer .footer-nav-column h4,
    html.late-night body .footer.site-footer .footer-nav-column a:hover {
        color: #e6c98a !important;
    }
}

/* Day 2 audit: low-contrast shared accent/button fixes. */
body.late-night .skip-link,
html.late-night body .skip-link {
    background: #d6b35e !important;
    color: #0d1f1c !important;
}

body.late-night .btn,
body.late-night .btn-primary,
body.late-night .hero-btn-primary,
body.late-night .primary-btn,
body.late-night .cta-button,
html.late-night body .btn,
html.late-night body .btn-primary,
html.late-night body .hero-btn-primary,
html.late-night body .primary-btn,
html.late-night body .cta-button {
    background: #d6b35e !important;
    border-color: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night .btn-outline,
body.late-night .hero-btn-secondary,
html.late-night body .btn-outline,
html.late-night body .hero-btn-secondary {
    background: rgba(244, 239, 227, 0.12) !important;
    border-color: rgba(230, 201, 138, 0.48) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night a,
html.late-night body a {
    color: #e6c98a;
}

body.late-night a:hover,
html.late-night body a:hover {
    color: #f1ece0;
}

/* Day 2 audit: blog article contrast. */
body.late-night .blog-post,
html.late-night body .blog-post {
    background: #0d1f1c !important;
    color: #f1ece0 !important;
}

body.late-night .post-header,
body.late-night .post-content,
body.late-night .post-footer,
html.late-night body .post-header,
html.late-night body .post-content,
html.late-night body .post-footer {
    color: #f1ece0 !important;
}

body.late-night .post-title,
body.late-night .post-content h1,
body.late-night .post-content h2,
body.late-night .post-content h3,
body.late-night .post-content h4,
body.late-night .post-content strong,
html.late-night body .post-title,
html.late-night body .post-content h1,
html.late-night body .post-content h2,
html.late-night body .post-content h3,
html.late-night body .post-content h4,
html.late-night body .post-content strong {
    color: #f1ece0 !important;
}

body.late-night .post-subtitle,
body.late-night .post-content p,
body.late-night .post-content li,
body.late-night .post-meta,
body.late-night .reading-time,
body.late-night .post-content em,
html.late-night body .post-subtitle,
html.late-night body .post-content p,
html.late-night body .post-content li,
html.late-night body .post-meta,
html.late-night body .reading-time,
html.late-night body .post-content em {
    color: rgba(241, 236, 224, 0.82) !important;
}

body.late-night .post-category,
html.late-night body .post-category {
    color: #e6c98a !important;
}

body.late-night .callout,
body.late-night .ritual-card,
body.late-night .breathe-break,
body.late-night blockquote,
html.late-night body .callout,
html.late-night body .ritual-card,
html.late-night body .breathe-break,
html.late-night body blockquote {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
    color: #f1ece0 !important;
}

body.late-night .callout *,
body.late-night .ritual-card *,
body.late-night .breathe-break *,
body.late-night blockquote *,
html.late-night body .callout *,
html.late-night body .ritual-card *,
html.late-night body .breathe-break *,
html.late-night body blockquote * {
    color: inherit !important;
}

body.late-night .blog-card-meta,
html.late-night body .blog-card-meta {
    color: rgba(241, 236, 224, 0.72) !important;
}

/* Day 2 audit: tool pages and older local components. */
body.late-night .tool-main,
body.late-night .tool-intro,
body.late-night .tool-header,
body.late-night .tool-footer,
body.late-night .sanctuary-main,
body.late-night .sanctuary-hero,
html.late-night body .tool-main,
html.late-night body .tool-intro,
html.late-night body .tool-header,
html.late-night body .tool-footer,
html.late-night body .sanctuary-main,
html.late-night body .sanctuary-hero {
    color: #f1ece0 !important;
}

body.late-night .tool-title,
body.late-night .step-title,
body.late-night .sanctuary-title,
body.late-night .selection-prompt,
body.late-night .input-prompt,
body.late-night .value-prompt,
body.late-night .tool-main h1,
body.late-night .tool-main h2,
body.late-night .tool-main h3,
body.late-night .tool-main h4,
html.late-night body .tool-title,
html.late-night body .step-title,
html.late-night body .sanctuary-title,
html.late-night body .selection-prompt,
html.late-night body .input-prompt,
html.late-night body .value-prompt,
html.late-night body .tool-main h1,
html.late-night body .tool-main h2,
html.late-night body .tool-main h3,
html.late-night body .tool-main h4 {
    color: #f1ece0 !important;
}

body.late-night .tool-subtitle,
body.late-night .step-subtitle,
body.late-night .sanctuary-subtitle,
body.late-night .footer-note,
body.late-night .footer-note-text,
body.late-night .footer-note-subtext,
body.late-night .tool-main p,
body.late-night .tool-main li,
body.late-night .footer-note,
html.late-night body .tool-subtitle,
html.late-night body .step-subtitle,
html.late-night body .sanctuary-subtitle,
html.late-night body .footer-note,
html.late-night body .footer-note-text,
html.late-night body .footer-note-subtext,
html.late-night body .tool-main p,
html.late-night body .tool-main li {
    color: rgba(241, 236, 224, 0.8) !important;
}

body.late-night .tool-logo,
body.late-night .back-link,
body.late-night .step-label,
body.late-night .cycle-count,
html.late-night body .tool-logo,
html.late-night body .back-link,
html.late-night body .step-label,
html.late-night body .cycle-count {
    color: #e6c98a !important;
}

body.late-night .menu-builder,
body.late-night .input-card,
body.late-night #inputCard,
body.late-night .value-card,
body.late-night .selection-card,
body.late-night .ritual-option,
body.late-night .duration-btn,
body.late-night .choice-btn,
body.late-night .category-card,
body.late-night .stone-card,
body.late-night .sound-card,
body.late-night .game-card,
body.late-night .tool-card,
body.late-night .quick-action-card,
body.late-night .feature-card,
html.late-night body .menu-builder,
html.late-night body .input-card,
html.late-night body #inputCard,
html.late-night body .value-card,
html.late-night body .selection-card,
html.late-night body .ritual-option,
html.late-night body .duration-btn,
html.late-night body .choice-btn,
html.late-night body .category-card,
html.late-night body .stone-card,
html.late-night body .sound-card,
html.late-night body .game-card,
html.late-night body .tool-card,
html.late-night body .quick-action-card,
html.late-night body .feature-card {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
    color: #f1ece0 !important;
}

body.late-night .menu-builder *,
body.late-night .input-card *,
body.late-night #inputCard *,
body.late-night .value-card *,
body.late-night .selection-card *,
body.late-night .ritual-option *,
body.late-night .duration-btn *,
body.late-night .choice-btn *,
body.late-night .category-card *,
body.late-night .stone-card *,
body.late-night .sound-card *,
body.late-night .game-card *,
body.late-night .tool-card *,
body.late-night .quick-action-card *,
body.late-night .feature-card *,
html.late-night body .menu-builder *,
html.late-night body .input-card *,
html.late-night body #inputCard *,
html.late-night body .value-card *,
html.late-night body .selection-card *,
html.late-night body .ritual-option *,
html.late-night body .duration-btn *,
html.late-night body .choice-btn *,
html.late-night body .category-card *,
html.late-night body .stone-card *,
html.late-night body .sound-card *,
html.late-night body .game-card *,
html.late-night body .tool-card *,
html.late-night body .quick-action-card *,
html.late-night body .feature-card * {
    color: inherit !important;
}

body.late-night button:not(.menu-toggle):not(.voice-btn):not(.icon-btn),
html.late-night body button:not(.menu-toggle):not(.voice-btn):not(.icon-btn) {
    border-color: rgba(230, 201, 138, 0.32);
}

body.late-night button.active,
body.late-night .active:not(.nav-link):not(.mobile-nav-link),
html.late-night body button.active,
html.late-night body .active:not(.nav-link):not(.mobile-nav-link) {
    background: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night input,
body.late-night textarea,
html.late-night body input,
html.late-night body textarea {
    color: #2a3a36;
    caret-color: #2a3a36;
}

/* Day 2 audit: features/Meet Sera page should be coastal-dark, not black/white drift. */
html.late-night body.features-page,
body.late-night.features-page,
body.features-page.late-night {
    background: linear-gradient(180deg, #0d1f1c 0%, #16302b 48%, #1d4f48 100%) !important;
    color: #f1ece0 !important;
}

html.late-night body.features-page .features-hero h1,
html.late-night body.features-page .features-hero h2,
html.late-night body.features-page .features-hero h3,
html.late-night body.features-page .features-section h2,
html.late-night body.features-page .features-section h3,
body.late-night.features-page .features-hero h1,
body.late-night.features-page .features-section h2,
body.late-night.features-page .features-section h3 {
    color: #f1ece0 !important;
}

html.late-night body.features-page .features-hero p,
html.late-night body.features-page .features-section p,
html.late-night body.features-page .section-subtitle,
body.late-night.features-page .features-hero p,
body.late-night.features-page .features-section p,
body.late-night.features-page .section-subtitle {
    color: rgba(241, 236, 224, 0.82) !important;
}

html.late-night body.features-page .eyebrow,
body.late-night.features-page .eyebrow {
    color: #e6c98a !important;
}

/* Day 2 audit: homepage Sera side cards are light surfaces and must keep dark text. */
body.late-night .solace-preview .sera-side-card,
body.late-night .solace-preview .sera-side-card p,
body.late-night .solace-preview .sera-card-kicker,
body.late-night .solace-preview .sera-card-copy,
body.late-night .solace-preview .sera-breath-phase,
body.late-night .solace-preview .sera-breath-count,
body.late-night .solace-preview .sera-breath-seconds,
body.late-night .solace-preview .sera-breath-caption,
body.late-night .solace-preview .sera-mood-note,
body.late-night .solace-preview .affirm-kicker,
body.late-night .solace-preview .affirm-text,
body.late-night .solace-preview .affirm-hint {
    color: #172724 !important;
}

/* Day 2 follow-up: narrow selected-state fixes so full panels do not turn gold. */
body.late-night .step.active,
body.late-night .tool-step.active,
body.late-night .screen.active,
body.late-night .page.active,
body.late-night .section.active,
html.late-night body .step.active,
html.late-night body .tool-step.active,
html.late-night body .screen.active,
html.late-night body .page.active,
html.late-night body .section.active {
    background: transparent !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

body.late-night .duration-btn:not(.selected),
body.late-night .time-btn:not(.active),
body.late-night .prompt-chip,
body.late-night .choice-btn,
body.late-night .brush-style-btn,
body.late-night .grief-type,
html.late-night body .duration-btn:not(.selected),
html.late-night body .time-btn:not(.active),
html.late-night body .prompt-chip,
html.late-night body .choice-btn,
html.late-night body .brush-style-btn,
html.late-night body .grief-type {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .duration-btn.selected,
body.late-night .time-btn.active,
body.late-night .choice-btn.selected,
body.late-night .choice-btn.choice-yes,
body.late-night .brush-style-btn.active,
body.late-night #shuffleBtn,
html.late-night body .duration-btn.selected,
html.late-night body .time-btn.active,
html.late-night body .choice-btn.selected,
html.late-night body .choice-btn.choice-yes,
html.late-night body .brush-style-btn.active,
html.late-night body #shuffleBtn {
    background: #d6b35e !important;
    border-color: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night .grief-type *,
html.late-night body .grief-type * {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* Day 2 follow-up: light chips/tags in older sanctuary/tool surfaces. */
body.late-night .category-emoji,
body.late-night .tool-tag,
body.late-night .quick-action-hint,
body.late-night .presence-text,
body.late-night .section-label,
body.late-night #progressText,
html.late-night body .category-emoji,
html.late-night body .tool-tag,
html.late-night body .quick-action-hint,
html.late-night body .presence-text,
html.late-night body .section-label,
html.late-night body #progressText {
    background: rgba(22, 48, 43, 0.9) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
}

body.late-night #collectiveCount,
html.late-night body #collectiveCount {
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
}

/* Day 2 follow-up: blog labels and index metadata. */
body.late-night .post-category,
html.late-night body .post-category {
    background: rgba(22, 48, 43, 0.9) !important;
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
}

body.late-night .blog-card-meta,
html.late-night body .blog-card-meta {
    color: rgba(241, 236, 224, 0.76) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.76) !important;
}

/* Day 2 follow-up: tool intro/finish panels that remain light must keep dark text. */
body.late-night .completion-affirmation,
body.late-night .prompt-text,
html.late-night body .completion-affirmation,
html.late-night body .prompt-text {
    background: #16302b !important;
    color: rgba(241, 236, 224, 0.84) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.84) !important;
}

body.late-night #mandalaIntro,
body.late-night #mandalaIntro .intro-content,
body.late-night #controlsPanel,
body.late-night #controlsPanel .controls-inner,
body.late-night .brush-styles,
html.late-night body #mandalaIntro,
html.late-night body #mandalaIntro .intro-content,
html.late-night body #controlsPanel,
html.late-night body #controlsPanel .controls-inner,
html.late-night body .brush-styles {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night #mandalaIntro p,
body.late-night #controlsPanel p,
body.late-night .symmetry-toggle,
body.late-night #symmetrySelect,
html.late-night body #mandalaIntro p,
html.late-night body #controlsPanel p,
html.late-night body .symmetry-toggle,
html.late-night body #symmetrySelect {
    color: rgba(241, 236, 224, 0.84) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.84) !important;
}

/* Day 2 follow-up: shared nav inherited color and outline buttons. */
body .header.site-header,
body .header.site-header .header-container,
body .header.site-header .nav,
body .header.site-header .nav-list {
    color: var(--nav-logo-color, #f4efe3) !important;
}

body.late-night .btn-outline,
body.late-night a.btn.btn-outline,
html.late-night body .btn-outline,
html.late-night body a.btn.btn-outline {
    background: #16302b !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

/* Day 2 follow-up: homepage Sera side cards are intentionally light cards in dark mode. */
body.late-night .solace-preview .sera-side-card,
html.late-night body .solace-preview .sera-side-card {
    background: rgba(244, 239, 227, 0.9) !important;
    border-color: rgba(217, 195, 154, 0.48) !important;
    color: #172724 !important;
}

body.late-night .solace-preview .sera-side-card *,
html.late-night body .solace-preview .sera-side-card * {
    color: #172724 !important;
    -webkit-text-fill-color: #172724 !important;
}


/* Day 2 final residual contrast pass: older inline dark-mode styles and active tool panels. */
body.late-night.blog-page .blog-card .blog-card-meta,
html.late-night body.blog-page .blog-card .blog-card-meta,
body.late-night .blog-card .blog-card-content .blog-card-meta,
html.late-night body .blog-card .blog-card-content .blog-card-meta {
    color: rgba(241, 236, 224, 0.82) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.82) !important;
}

body.late-night .tool-main .tool-title,
body.late-night .tool-main .tool-subtitle,
body.late-night .tool-main .step-label,
body.late-night .tool-main .step-title,
body.late-night .tool-main .step-subtitle,
body.late-night .step-content .step-label,
body.late-night .step-content .step-title,
body.late-night .step-content .step-subtitle,
body.late-night .journey-container .step-label,
body.late-night .journey-container .step-title,
body.late-night .journey-container .step-subtitle,
html.late-night body .tool-main .tool-title,
html.late-night body .tool-main .tool-subtitle,
html.late-night body .tool-main .step-label,
html.late-night body .tool-main .step-title,
html.late-night body .tool-main .step-subtitle,
html.late-night body .step-content .step-label,
html.late-night body .step-content .step-title,
html.late-night body .step-content .step-subtitle,
html.late-night body .journey-container .step-label,
html.late-night body .journey-container .step-title,
html.late-night body .journey-container .step-subtitle {
    background: rgba(13, 31, 28, 0.76) !important;
    border-radius: 6px !important;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .tool-main .step-label,
body.late-night .step-content .step-label,
body.late-night .journey-container .step-label,
html.late-night body .tool-main .step-label,
html.late-night body .step-content .step-label,
html.late-night body .journey-container .step-label {
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
}

body.late-night .tool-main > p,
body.late-night .tool-main .active > p,
body.late-night .tool-main [class*="step"].active > p,
html.late-night body .tool-main > p,
html.late-night body .tool-main .active > p,
html.late-night body .tool-main [class*="step"].active > p {
    background: rgba(13, 31, 28, 0.68) !important;
    border-radius: 6px !important;
    color: rgba(241, 236, 224, 0.86) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.86) !important;
}

body.late-night [class*="step"].active,
body.late-night [class*="screen"].active,
body.late-night [class*="panel"].active,
html.late-night body [class*="step"].active,
html.late-night body [class*="screen"].active,
html.late-night body [class*="panel"].active {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

body.late-night .action-btn-secondary,
html.late-night body .action-btn-secondary,
body.late-night button.action-btn.action-btn-secondary,
html.late-night body button.action-btn.action-btn-secondary {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.32) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .hero-btn-secondary,
html.late-night body .hero-btn-secondary {
    background: rgba(13, 31, 28, 0.78) !important;
    border-color: rgba(241, 236, 224, 0.48) !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
}

body.late-night .solace-preview .sera-mood-btn,
html.late-night body .solace-preview .sera-mood-btn {
    background: rgba(244, 239, 227, 0.94) !important;
    border-color: rgba(42, 58, 54, 0.18) !important;
    color: #172724 !important;
    -webkit-text-fill-color: #172724 !important;
}

body.late-night .solace-preview .sera-mood-btn:hover,
body.late-night .solace-preview .sera-mood-btn.is-selected,
html.late-night body .solace-preview .sera-mood-btn:hover,
html.late-night body .solace-preview .sera-mood-btn.is-selected {
    background: #d6b35e !important;
    border-color: #d6b35e !important;
    color: #102622 !important;
    -webkit-text-fill-color: #102622 !important;
}

body.late-night .sera-app-persistent,
body.late-night .sera-app-persistent > .sera-app-persistent-copy,
body.late-night .sera-app-persistent > .sera-app-device-row,
html.late-night body .sera-app-persistent,
html.late-night body .sera-app-persistent > .sera-app-persistent-copy,
html.late-night body .sera-app-persistent > .sera-app-device-row {
    color: #243833 !important;
    -webkit-text-fill-color: #243833 !important;
}

body.late-night .sera-app-persistent h3,
body.late-night .sera-app-persistent p,
body.late-night .sera-app-persistent .sera-app-kicker,
body.late-night .sera-app-persistent .sera-app-qr-caption,
body.late-night .sera-app-persistent .sera-app-qr-subcopy,
html.late-night body .sera-app-persistent h3,
html.late-night body .sera-app-persistent p,
html.late-night body .sera-app-persistent .sera-app-kicker,
html.late-night body .sera-app-persistent .sera-app-qr-caption,
html.late-night body .sera-app-persistent .sera-app-qr-subcopy {
    color: #243833 !important;
    -webkit-text-fill-color: #243833 !important;
}

body.late-night .sera-app-persistent .sera-app-button,
html.late-night body .sera-app-persistent .sera-app-button {
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
}

body.late-night .messy-middle-note,
html.late-night body .messy-middle-note {
    background: rgba(13, 31, 28, 0.88) !important;
    border-color: rgba(230, 201, 138, 0.28) !important;
}

body.late-night .messy-middle-note p,
html.late-night body .messy-middle-note p {
    color: rgba(241, 236, 224, 0.9) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.9) !important;
}

body.late-night #mandalaIntro h2,
body.late-night .palette-tab,
html.late-night body #mandalaIntro h2,
html.late-night body .palette-tab {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.28) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .palette-tab.active,
html.late-night body .palette-tab.active {
    background: #d6b35e !important;
    border-color: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night #soundLabel,
body.late-night #timerLabel,
body.late-night .master-volume-label,
body.late-night .sound-controls span,
html.late-night body #soundLabel,
html.late-night body #timerLabel,
html.late-night body .master-volume-label,
html.late-night body .sound-controls span {
    background: rgba(13, 31, 28, 0.76) !important;
    border-radius: 4px !important;
    color: rgba(241, 236, 224, 0.88) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.88) !important;
}

body.late-night .quick-btn.secondary,
html.late-night body .quick-btn.secondary,
body.late-night button.quick-btn.secondary,
html.late-night body button.quick-btn.secondary {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.32) !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night nav:not(.nav):not(.site-nav),
html.late-night body nav:not(.nav):not(.site-nav) {
    background: rgba(13, 31, 28, 0.94) !important;
    color: #f1ece0 !important;
}

body.late-night nav:not(.nav):not(.site-nav) .nav-link,
body.late-night nav:not(.nav):not(.site-nav) .logo,
html.late-night body nav:not(.nav):not(.site-nav) .nav-link,
html.late-night body nav:not(.nav):not(.site-nav) .logo {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}


/* Day 2 class-based late-night pass: applies even when system preference is light. */
body.late-night .footer.site-footer,
html.late-night body .footer.site-footer {
    background: linear-gradient(180deg, rgba(13, 31, 28, 0.98), rgba(22, 48, 43, 0.96)) !important;
    border-top-color: rgba(214, 179, 94, 0.24) !important;
    color: #f1ece0 !important;
}

body.late-night .footer.site-footer .footer-logo,
html.late-night body .footer.site-footer .footer-logo {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .footer.site-footer .footer-tagline,
body.late-night .footer.site-footer .footer-description,
body.late-night .footer.site-footer .footer-bottom p,
body.late-night .footer.site-footer .footer-nav-column a,
html.late-night body .footer.site-footer .footer-tagline,
html.late-night body .footer.site-footer .footer-description,
html.late-night body .footer.site-footer .footer-bottom p,
html.late-night body .footer.site-footer .footer-nav-column a {
    color: rgba(241, 236, 224, 0.86) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.86) !important;
}

body.late-night .footer.site-footer .footer-nav-column h4,
body.late-night .footer.site-footer .footer-nav-column a:hover,
html.late-night body .footer.site-footer .footer-nav-column h4,
html.late-night body .footer.site-footer .footer-nav-column a:hover {
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
}

body.late-night.about-page .about-section p,
body.late-night.about-page .about-section em,
body.late-night .about-content p,
body.late-night .about-content em,
html.late-night body.about-page .about-section p,
html.late-night body.about-page .about-section em,
html.late-night body .about-content p,
html.late-night body .about-content em {
    color: rgba(241, 236, 224, 0.88) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.88) !important;
}

body.late-night .legal-shell,
body.late-night .legal-page,
body.late-night .legal-hero,
body.late-night .playground-hero,
body.late-night .playground-intro,
body.late-night .game-shell,
body.late-night .game-container,
html.late-night body .legal-shell,
html.late-night body .legal-page,
html.late-night body .legal-hero,
html.late-night body .playground-hero,
html.late-night body .playground-intro,
html.late-night body .game-shell,
html.late-night body .game-container {
    background-color: #0d1f1c !important;
}

body.late-night .legal-kicker,
body.late-night .legal-title,
body.late-night .legal-lede,
body.late-night .legal-summary,
body.late-night .playground-eyebrow,
body.late-night .playground-title,
body.late-night .playground-subtitle,
body.late-night .playground-intro p,
body.late-night .game-title,
body.late-night .game-subtitle,
body.late-night .move-counter,
body.late-night .difficulty-btn,
html.late-night body .legal-kicker,
html.late-night body .legal-title,
html.late-night body .legal-lede,
html.late-night body .legal-summary,
html.late-night body .playground-eyebrow,
html.late-night body .playground-title,
html.late-night body .playground-subtitle,
html.late-night body .playground-intro p,
html.late-night body .game-title,
html.late-night body .game-subtitle,
html.late-night body .move-counter,
html.late-night body .difficulty-btn {
    background-color: rgba(13, 31, 28, 0.74) !important;
    border-radius: 6px !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .legal-kicker,
body.late-night .playground-eyebrow,
html.late-night body .legal-kicker,
html.late-night body .playground-eyebrow {
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
}

body.late-night .playground-tagline,
html.late-night body .playground-tagline {
    background: #16302b !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
    border-color: rgba(230, 201, 138, 0.28) !important;
}

body.late-night .card,
body.late-night .tools-section,
html.late-night body .card,
html.late-night body .tools-section {
    background: #16302b !important;
    border-color: rgba(230, 201, 138, 0.24) !important;
    color: #f1ece0 !important;
}

body.late-night .card h2,
body.late-night .card-description,
body.late-night .tools-label,
body.late-night .tool-link,
body.late-night .tool-link span,
html.late-night body .card h2,
html.late-night body .card-description,
html.late-night body .tools-label,
html.late-night body .tool-link,
html.late-night body .tool-link span {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .tools-label,
body.late-night .tool-link .arrow,
html.late-night body .tools-label,
html.late-night body .tool-link .arrow {
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
}

body.late-night .arrival-title,
body.late-night .checkin-question,
body.late-night .mood-card h3,
body.late-night .checkin-card h3,
html.late-night body .arrival-title,
html.late-night body .checkin-question,
html.late-night body .mood-card h3,
html.late-night body .checkin-card h3 {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .release-btn,
html.late-night body .release-btn {
    background: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
    border-color: #d6b35e !important;
}

body.late-night .safe-space-tool p,
body.late-night .tool-main .step.active p,
body.late-night .step.active p,
html.late-night body .safe-space-tool p,
html.late-night body .tool-main .step.active p,
html.late-night body .step.active p {
    background: rgba(13, 31, 28, 0.76) !important;
    border-radius: 6px !important;
    color: rgba(241, 236, 224, 0.9) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.9) !important;
}

body.late-night .presets-title,
body.late-night .evening-mode span,
body.late-night .sound-toggle span,
html.late-night body .presets-title,
html.late-night body .evening-mode span,
html.late-night body .sound-toggle span {
    background: rgba(13, 31, 28, 0.76) !important;
    border-radius: 4px !important;
    color: rgba(241, 236, 224, 0.9) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.9) !important;
}

body.late-night .tool-label,
html.late-night body .tool-label {
    background: #16302b !important;
    color: #e6c98a !important;
    -webkit-text-fill-color: #e6c98a !important;
    border-color: rgba(230, 201, 138, 0.28) !important;
}

body.late-night .scroll-text,
body.late-night .sera-trust-row span,
html.late-night body .scroll-text,
html.late-night body .sera-trust-row span {
    background: rgba(13, 31, 28, 0.62) !important;
    border-radius: 999px !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}


/* Day 2 final clean-scan fixes. */
body.late-night .footer.site-footer,
html.late-night body .footer.site-footer {
    background-color: #0d1f1c !important;
}

body.late-night .content p,
body.late-night .content em,
body.late-night .solace-section p,
html.late-night body .content p,
html.late-night body .content em,
html.late-night body .solace-section p {
    color: rgba(241, 236, 224, 0.9) !important;
    -webkit-text-fill-color: rgba(241, 236, 224, 0.9) !important;
}

body.late-night .completion-modal h2,
body.late-night .completion-content h2,
body.late-night #completionModal h2,
html.late-night body .completion-modal h2,
html.late-night body .completion-content h2,
html.late-night body #completionModal h2 {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night #releaseBtn.release-btn,
body.late-night .lantern-controls .release-btn,
html.late-night body #releaseBtn.release-btn,
html.late-night body .lantern-controls .release-btn {
    background: #d6b35e !important;
    border-color: #d6b35e !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night .header.site-header.over-hero .logo,
html.late-night body .header.site-header.over-hero .logo {
    background: rgba(13, 31, 28, 0.58) !important;
    border-radius: 999px !important;
    padding: 0.18rem 0.7rem !important;
    color: #fffaf1 !important;
    -webkit-text-fill-color: #fffaf1 !important;
}

body.late-night .hero-emoji,
html.late-night body .hero-emoji {
    background: #d6b35e !important;
    border-radius: 999px !important;
    color: #0d1f1c !important;
    -webkit-text-fill-color: #0d1f1c !important;
}

body.late-night .checkin-option h3,
body.late-night .mood-option h3,
body.late-night .state-option h3,
body.late-night .zone-card h3,
html.late-night body .checkin-option h3,
html.late-night body .mood-option h3,
html.late-night body .state-option h3,
html.late-night body .zone-card h3 {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .trust-row span,
html.late-night body .trust-row span,
body.late-night .sera-trust-row span,
html.late-night body .sera-trust-row span {
    background: rgba(13, 31, 28, 0.72) !important;
    border-radius: 999px !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night .evening-mode span,
body.late-night label.evening-mode span,
html.late-night body .evening-mode span,
html.late-night body label.evening-mode span {
    background: rgba(13, 31, 28, 0.8) !important;
    border-radius: 4px !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}


/* Day 2 last two legacy selectors. */
body.late-night .completion-message h2,
html.late-night body .completion-message h2 {
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}

body.late-night #eveningModeBtn span,
html.late-night body #eveningModeBtn span,
body.evening-mode #eveningModeBtn span,
html.late-night body.evening-mode #eveningModeBtn span {
    background: rgba(13, 31, 28, 0.8) !important;
    border-radius: 4px !important;
    color: #f1ece0 !important;
    -webkit-text-fill-color: #f1ece0 !important;
}
