/* Night-only UI colors; invitation artwork and theme swatches keep their own palettes. */
html[data-theme="dark"] {
    --night-panel: #231e22;
    --night-raised: #2f272d;
    --night-inset: #1b171b;
    --night-border: #594854;
    --night-text: #f5edf1;
    --night-muted: #d2c2cc;
    --night-link: #f3b8c9;
    --night-green: #b6ddc7;
    --night-gold: #f4d49c;
    --night-shadow: 0 12px 32px #0c090d52;
}

html[data-theme="dark"] body > header nav > .nav-guest-create,
html[data-theme="dark"] body > header .nav-live-viewers {
    background: var(--night-raised) !important;
    border-color: var(--night-border) !important;
    color: var(--night-text) !important;
}
html[data-theme="dark"] body > header .nav-live-viewers { color: var(--night-green) !important; }
html[data-theme="dark"] .social-menu-panel > strong { color: var(--night-muted); }
html[data-theme="dark"] :is(.auth-panel, .card, .site-footer) a:not(.btn):not(.theme-tile):not(.sm-section-link) { color: var(--night-link); }
html[data-theme="dark"] :is(.landing-kicker, .eyebrow, .sm-kicker) { color: var(--night-link) !important; }
html[data-theme="dark"] :is(.card, .auth-panel, .social-admin-card, .dash-card, .review-card, .review-detail-card, .vendor-card, .vendor-cat-card, .vendor-contact-card, .feature-guide-card, .package-card, .hero-values-detail article, .sm-section-link) {
    background: linear-gradient(150deg, var(--night-raised), var(--night-panel)) !important;
    border-color: var(--night-border) !important;
    box-shadow: var(--night-shadow);
}
html[data-theme="dark"] :is(.card, .dash-card, .review-card, .vendor-card, .package-card, .feature-guide-card) hr { border-color: var(--night-border); }
html[data-theme="dark"] :is(.review-gallery, .feature-guide, .package-pricing, .hero-offer-strip, .home-faq, .home-faq details, .dash-top, .dash-stats article, .dash-wish-panel, .dash-wish-item, .dash-live-link, .dash-actions, .family-parent-group, .guest-initial-media, .guest-package-content, .section-transparency-setting, .full-preview-toolbar, .wish-table th, .help-faq, .sm-card) {
    background: var(--night-panel) !important;
    border-color: var(--night-border) !important;
    color: var(--night-text);
}
html[data-theme="dark"] main :is(.review-head, .feature-guide-head, .package-heading) { background: transparent !important; border-color: transparent !important; }
html[data-theme="dark"] :is(.hero-offer-strip, .hero-values-detail, .package-pricing, .feature-guide, .review-gallery, .review-detail, .home-faq, .dash-top, .dash-stats, .dash-wish-panel) :is(h1, h2, h3, summary, strong, .review-quote, .review-detail-quote) { color: var(--night-text); }
html[data-theme="dark"] :is(.hero-offer-copy p:not(.landing-kicker), .hero-offer-copy small, .hero-offer-steps small, .hero-values-detail span, .package-heading p:last-child, .package-description, .package-footnote, .package-compare, .package-price-caption, .feature-guide-head > p:last-child, .review-head p:last-child, .review-meta span, .review-note, .review-detail-meta, .review-detail-tags, .home-faq p, .dash-top-copy > p:not(.dash-eyebrow), .dash-stats article span, .dash-card-kicker, .dash-toolbar-note, .dash-footnote, .dash-meta, .dash-owner, .dash-wish-meta, .preview-hint, .sm-lead, .sm-crumb, .sm-vendors span, .sm-section-text small, .sm-empty) {
    color: var(--night-muted) !important;
}
html[data-theme="dark"] :is(.review-link, .review-back-link, .review-hint, .package-link, .dash-eyebrow, .dash-live-link a, .feature-guide-link, .sm-section-arrow, .sm-crumb a, .sm-vendors a) { color: var(--night-link) !important; }
html[data-theme="dark"] :is(.package-price, .package-mark, .dash-stats article strong) { color: var(--night-gold); }
html[data-theme="dark"] .feature-guide-card::before { color: var(--night-gold); background: #46352d; }
html[data-theme="dark"] .hero-offer-steps b { color: var(--night-gold); background: #46352d; }
html[data-theme="dark"] :is(.package-label, .review-count, .review-pager :is(a, .is-disabled), .review-back a, .review-detail-nav a, .feature-guide-link, .feature-guide-badge, .theme-total, .theme-arrow, .dash-tabs button, .sm-xml, .sm-chip, .sm-count, .sm-pager :is(a, .is-disabled), .tv-preview-open, .preview-full-open) {
    background: var(--night-raised) !important;
    border-color: var(--night-border) !important;
    color: var(--night-text) !important;
}
html[data-theme="dark"] :is(.review-pager .is-current, .sm-pager .is-current, .dash-tabs button.is-active) { background: #684952 !important; color: #fff !important; }
html[data-theme="dark"] :is(.sm-chip b, .review-page-info, .sm-page-info) { color: var(--night-muted) !important; }
html[data-theme="dark"] :is(.package-price-block, .review-meta, .review-detail-quote, .sm-vendors li, .dash-actions, .dash-live-link, .form-section, .studio-form section) { border-color: var(--night-border) !important; }
html[data-theme="dark"] .package-card::before { opacity: .2; }

/* Vendor directory keeps a sage accent without using light-mode text or panels. */
html[data-theme="dark"] :is(.vendor-directory, .vendor-profile, .vendor-map-page) {
    --vd-ink: var(--night-text);
    --vd-muted: var(--night-muted);
    --vd-line: var(--night-border);
    --vendor-line: var(--night-border);
    color: var(--night-text);
}
html[data-theme="dark"] :is(.discover-hero, .vendor-hero, .vendor-map-hero, .discover-search, .vendor-search, .discover-view-switch, .discover-map-teaser, .discover-note, .discover-empty, .vendor-empty, .vendor-note, .vendor-fact, .vendor-source, .map-toolbar, .map-meta, .map-vendor-list, .map-empty, .map-load-failure) {
    background: var(--night-panel);
    border-color: var(--night-border);
    color: var(--night-muted);
}
html[data-theme="dark"] .discover .discover-hero { background: linear-gradient(125deg, #24332d, var(--night-panel)); border-color: #4c6358; }
html[data-theme="dark"] :is(.discover .discover-search, .discover .discover-view-switch, .discover .discover-map-teaser, .discover .discover-note, .discover .discover-empty) { background: var(--night-panel); border-color: var(--night-border); color: var(--night-muted); }
html[data-theme="dark"] :is(.discover-hero h1, .discover-sidebar h2, .discover-result-head h2, .discover-stats strong, .vendor-fact strong, .vendor-map-hero h1, #vendor-map-count) { color: var(--night-text) !important; }
html[data-theme="dark"] :is(.discover-hero p, .discover-stats, .discover-result-head p, .discover-map-teaser p, .discover-categories a, .discover-view-switch a, .vendor-crumb, .vendor-card-subtitle, .vendor-card-foot small, .vendor-map-hero p, .vendor-hero p, .vendor-fact span, .map-disclaimer) { color: var(--night-muted) !important; }
html[data-theme="dark"] .map-disclaimer { background: #3b3127 !important; border-color: #665243 !important; }
html[data-theme="dark"] :is(.discover-top a, .discover-eyebrow, .discover-map-teaser a, .discover-note a, .discover-locations :is(a,summary), .vendor-card-actions a, .vendor-card-category, .vendor-kicker, .vendor-crumb a, .vendor-source a, .vendor-note a) { color: var(--night-green) !important; }
html[data-theme="dark"] :is(.discover-categories small, .discover-categories a:is(:hover,.active), .discover-view-switch a.active, .discover-pagination :is(a,span), .vendor-chip, .vendor-state-links a, .vendor-contact-list :is(a,span), .discover .discover-button.light) { background: #293931 !important; border-color: #486557 !important; color: var(--night-green) !important; }
html[data-theme="dark"] :is(.discover-locations, .discover .vendor-card-foot, .vendor-card-foot) { border-color: var(--night-border); }
html[data-theme="dark"] :is(.vendor-card-media, .review-media, .review-detail-media, .dash-cover, .feature-faq-image) { background: var(--night-inset); }
html[data-theme="dark"] :is(.vendor-unverified, .social-admin-state:not(.is-enabled)) { background: #403221 !important; color: var(--night-gold) !important; }
html[data-theme="dark"] .social-admin-state.is-enabled { background: #283b32; color: var(--night-green); }

/* Buttons, dialogs and form affordances that otherwise picked up the day palette. */
html[data-theme="dark"] :is(.feature-faq-dialog, .feature-faq-close, .social-callback, .map-search-result, .selected-location, .builder-draft-banner) { background: var(--night-raised) !important; border-color: var(--night-border) !important; color: var(--night-text) !important; }
html[data-theme="dark"] :is(.feature-faq-answer, .feature-faq-answer p, .guest-package-content > small, .form-section h2, .admin-package-row legend, .studio-song-list small, .builder-autosave-status, .social-login-divider, .map-search-result small) { color: var(--night-muted) !important; }
html[data-theme="dark"] .guest-package-content :is(b,strong) { color: var(--night-text); }
html[data-theme="dark"] .guest-package-option > input:checked + .guest-package-content { border-color: var(--night-link) !important; }
html[data-theme="dark"] .help-faq p { color: var(--night-muted) !important; }
html[data-theme="dark"] .help-nav a { background: var(--night-raised); border-color: var(--night-border); }
html[data-theme="dark"] :is(.auth-panel, .site-share, .review-gallery, .package-pricing, .feature-guide, .vendor-directory, .sm-page, body > header) :focus-visible { outline: 2px solid var(--night-gold); outline-offset: 2px; }
html[data-theme="dark"] .early-bird-home-offer { background: #3b3127; border-color: #665243; color: var(--night-text); }
html[data-theme="dark"] .early-bird-info-trigger { background: var(--night-raised); border-color: var(--night-border); color: var(--night-link); }
html[data-theme="dark"] .early-bird-dialog { background: #231e22; border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .early-bird-dialog-head h2, html[data-theme="dark"] .early-bird-dialog-period strong { color: var(--night-text); }
html[data-theme="dark"] .early-bird-dialog-period,.early-bird-tiers article { background: var(--night-raised); border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .early-bird-tiers article strong { color: var(--night-link); }
html[data-theme="dark"] .early-bird-dialog-policy { background: #3b3127; border-color: #665243; color: var(--night-text); }
html[data-theme="dark"] .early-bird-builder-indicator { background: var(--night-panel); border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .early-bird-builder-indicator strong { color: var(--night-link); }
html[data-theme="dark"] .early-bird-builder-indicator.is-eligible { background: #293931; border-color: #486557; }
html[data-theme="dark"] .early-bird-builder-indicator.is-ineligible, html[data-theme="dark"] .early-bird-builder-indicator.is-disabled { background: var(--night-raised); border-color: var(--night-border); color: var(--night-muted); }
html[data-theme="dark"] .early-bird-congrats { background: var(--night-panel); border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .early-bird-congrats h2 { color: var(--night-text); }
html[data-theme="dark"] .early-bird-congrats-kicker { color: var(--night-link); }
html[data-theme="dark"] .early-bird-congrats-percent { background: #3b3127; border-color: #665243; color: var(--night-gold); }
html[data-theme="dark"] .early-bird-congrats-note { background: var(--night-raised); color: var(--night-muted); }
html[data-theme="dark"] .early-bird-info-button { background: var(--night-raised); border-color: var(--night-border); color: var(--night-link); }
html[data-theme="dark"] .early-bird-info-dialog { background: var(--night-panel); border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .early-bird-info-dialog h2 { color: var(--night-text); }
html[data-theme="dark"] .early-bird-info-period { color: var(--night-link); }
html[data-theme="dark"] .payment-upgrade-offer { background: #3b3127 !important; border-color: #665243 !important; color: var(--night-text) !important; }
html[data-theme="dark"] .payment-info-trigger { background: var(--night-raised); border-color: var(--night-border); color: var(--night-gold); }
html[data-theme="dark"] .payment-info-dialog { background: var(--night-panel); border-color: var(--night-border); color: var(--night-text); }
html[data-theme="dark"] .payment-info-head h2 { color: var(--night-text); }

/* Keep preview artwork out of the global heading override in the shared layout. */
html[data-theme="dark"] :is(.theme-tile, .landing-card-rotator) { color: #46383d; }
html[data-theme="dark"] main .invite-page .invite-section h2 { color: var(--ti); }
