/* Sous le Sapin 1.5 — Liquid Glass / mode clair et sombre.
   Overrides only the visual layer. No private information or API changes.
   The root theme attribute is applied before first paint by index.html. */
:root {
  --slp-text: #183d34;
  --slp-text-soft: #4c685b;
  --slp-subtle: #61776a;
  --slp-hairline: rgba(255, 255, 255, .79);
  --slp-glass: linear-gradient(120deg, rgba(255,255,255,.59), rgba(247,255,247,.32) 45%, rgba(216,239,222,.29) 100%);
  --slp-glass-inset: inset 0 1.4px rgba(255,255,255,.95), inset 1px 0 rgba(255,255,255,.42), inset 0 -1px rgba(65,114,83,.10);
  --slp-glass-shadow: 0 16px 44px rgba(31,65,49,.12), 0 4px 16px rgba(26,66,44,.055);
  --slp-input: rgba(255,255,255,.55);
  --slp-inner: rgba(255,255,255,.48);
  --slp-accent: #2b674e;
  color-scheme: light;
}
html[data-slp-theme="dark"] {
  --ink: #f0f7ed;
  --muted: #b3c9bb;
  --pine: #b4dfc2;
  --pine-deep: #102a23;
  --line: rgba(194,244,221,.19);
  --shadow: 0 14px 36px rgba(0,0,0,.31);
  --slp-text: #eef9f1;
  --slp-text-soft: #bcd0c4;
  --slp-subtle: #adc5b8;
  --slp-hairline: rgba(205,249,225,.23);
  --slp-glass: linear-gradient(124deg, rgba(39,81,70,.76), rgba(20,52,46,.68) 48%, rgba(15,36,35,.68) 100%);
  --slp-glass-inset: inset 0 1px rgba(235,255,247,.32), inset 1px 0 rgba(201,255,230,.09), inset 0 -1px rgba(0,10,8,.29);
  --slp-glass-shadow: 0 20px 55px rgba(0,9,8,.40), 0 5px 18px rgba(0,12,10,.2);
  --slp-input: rgba(8,31,28,.52);
  --slp-inner: rgba(149,211,175,.10);
  --slp-accent: #b4edcf;
  color-scheme: dark;
}
body {
  background:
    radial-gradient(ellipse 53vw 53vh at 95% 5%, rgba(145,194,162,.49), transparent 78%),
    radial-gradient(ellipse 48vw 58vh at 3% 90%, rgba(231,187,112,.28), transparent 78%),
    linear-gradient(135deg, #edf4eb 0%, #e3ede3 49%, #f6f0e5 100%);
  color: var(--slp-text);
  transition: background-color .25s ease, color .25s ease;
}
.app-shell { background: transparent; }
/* Luminous rims, refraction, and volume are intentionally visible on real cards. */
.glass,
#slp-family-root .slp-family-card {
  background: var(--slp-glass);
  border: 1px solid var(--slp-hairline);
  border-top-color: rgba(255,255,255,.95);
  box-shadow: var(--slp-glass-shadow), var(--slp-glass-inset);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  backdrop-filter: blur(28px) saturate(185%);
}
.glass { position: relative; }
/* Do not introduce pseudo-elements on data tables / interactive cards: no hit-target overlay. */
.site-header {
  background: linear-gradient(125deg,rgba(255,255,255,.57),rgba(229,245,231,.35),rgba(255,255,249,.26));
  border-bottom: 1px solid rgba(255,255,255,.83);
  box-shadow: 0 5px 26px rgba(16,52,32,.08), inset 0 1px rgba(255,255,255,.76);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  backdrop-filter: blur(32px) saturate(190%);
}
.desktop-nav button.active, .snow-toggle, .icon-button:hover:not(:disabled),
.site-header .slp-family-entry {
  background: linear-gradient(140deg,rgba(255,255,255,.75),rgba(213,237,220,.38));
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 1px rgba(255,255,255,.74), 0 3px 12px rgba(22,59,39,.055);
}
.welcome-hero, .dashboard-hero, #slp-family-root .slp-family-welcome {
  background:
    radial-gradient(ellipse at 100% 0%,rgba(117,177,126,.35),transparent 63%),
    linear-gradient(114deg,rgba(14,53,40,.92),rgba(26,80,56,.82) 64%,rgba(37,91,57,.75));
  border: 1px solid rgba(230,255,224,.46);
  box-shadow: 0 20px 44px rgba(19,52,35,.21), inset 0 1px rgba(248,255,231,.43), inset 0 -1px rgba(7,27,15,.25);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}
.welcome-hero::after, .dashboard-hero::after {
  background: linear-gradient(116deg,transparent 41%,rgba(255,255,255,.13) 51%,rgba(255,255,255,.025) 66%,transparent 72%);
}
.button, .slp-family-button {
  box-shadow: 0 7px 17px rgba(9,47,29,.16), inset 0 1px rgba(255,255,255,.23);
  transition: box-shadow .19s ease, transform .19s ease, background-color .19s ease;
}
.button-soft, .button-plain, .slp-family-button.secondary,
.site-header .slp-family-entry {
  background: linear-gradient(130deg,rgba(255,255,255,.60),rgba(216,239,220,.39));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 4px 12px rgba(36,76,52,.065),inset 0 1px rgba(255,255,255,.83);
  color: #244f3e;
  -webkit-backdrop-filter: blur(14px) saturate(175%);
  backdrop-filter: blur(14px) saturate(175%);
}
.privacy-banner, .notice:not(.notice-error), .draw-notification-status,
.slp-family-member, .slp-family-event, .slp-family-picker-row {
  background: linear-gradient(130deg,rgba(255,255,255,.50),rgba(221,238,224,.30));
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: inset 0 1px rgba(255,255,255,.60);
  -webkit-backdrop-filter: blur(15px) saturate(165%);
  backdrop-filter: blur(15px) saturate(165%);
}
.step-icon, .setting-icon, .setting-feature-icon, .privacy-icon,
.brand-mark, .gift-art, .slp-family-avatar {
  border: 1px solid rgba(255,255,255,.70);
  box-shadow: 0 4px 15px rgba(35,75,49,.07), inset 0 1px rgba(255,255,255,.55);
}
.field input, .field textarea, .field select,
#slp-family-root .slp-family-form input:not([type="checkbox"]),
#slp-family-root .slp-family-form textarea {
  background: var(--slp-input);
  border: 1px solid rgba(121,151,126,.3);
  box-shadow: inset 0 1px rgba(255,255,255,.53), 0 2px 9px rgba(31,69,43,.045);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}
.field input:focus, .field textarea:focus, .field select:focus,
#slp-family-root .slp-family-form input:focus,
#slp-family-root .slp-family-form textarea:focus {
  outline-color: #b7a36c;
  border-color: rgba(94,144,102,.8);
  box-shadow: 0 0 0 3px rgba(118,169,120,.17),inset 0 1px rgba(255,255,255,.6);
}
.modal, .install-dialog {
  background: linear-gradient(130deg,rgba(255,255,252,.84),rgba(229,246,230,.75) 55%,rgba(230,241,222,.81));
  border: 1px solid rgba(255,255,255,.97);
  box-shadow: 0 30px 90px rgba(6,39,25,.24), inset 0 2px rgba(255,255,255,.90), inset 1px 0 rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(42px) saturate(190%);
  backdrop-filter: blur(42px) saturate(190%);
}
.modal::backdrop { background: rgba(6,31,23,.30); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal .field input, .modal .field textarea, .modal .field select { background: rgba(255,255,255,.46); }
/* Soft elevated tabs, static alerts, and holiday badges. */
.event-chip, .soft-badge, .tiny-label, .invitation-badge, .recipient-badge,
#slp-family-root .slp-family-tag { border: 1px solid rgba(255,255,255,.56); box-shadow: inset 0 1px rgba(255,255,255,.32); }

/* Shared theme toggle in the React header and in the annual family carnet. */
.slp-theme-toggle {
  appearance: none;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 39px;
  min-height: 37px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.87);
  background: linear-gradient(135deg,rgba(255,255,255,.69),rgba(213,236,219,.39));
  color: #214c3b;
  font: 650 11px/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(28,62,40,.10), inset 0 1px 0 rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  backdrop-filter: blur(20px) saturate(185%);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .17s ease, background .17s ease, box-shadow .17s ease;
}
.slp-theme-toggle:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(24,64,46,.14),inset 0 1px rgba(255,255,255,.7); }
.slp-theme-toggle:focus-visible { outline: 3px solid #c8a96b; outline-offset: 3px; }
.slp-theme-toggle svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.slp-family-top > .slp-theme-toggle { margin-left: auto; align-self: flex-start; min-height: 42px; }
.slp-family-top > .slp-family-icon-button { flex: none; }
@media (max-width: 900px) {
  .site-header .slp-theme-toggle { width: 35px; min-width: 35px; height: 35px; min-height: 35px; border-radius: 50%; padding: 0; }
  .site-header .slp-theme-toggle span { display: none; }
}
@media (max-width: 520px) {
  .site-header .slp-theme-toggle { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
  .slp-family-top > .slp-theme-toggle { width: 37px; min-width: 37px; height: 37px; min-height: 37px; padding: 0; margin-left: auto; }
  .slp-family-top > .slp-theme-toggle span { display: none; }
}
/* Family backdrop lets the translucent material cast real depth, not plain white. */
#slp-family-root {
  color: var(--slp-text);
  background:
    radial-gradient(ellipse 630px 570px at 98% 0%,rgba(134,188,146,.43),transparent 79%),
    radial-gradient(ellipse 720px 620px at 0% 95%,rgba(230,199,151,.33),transparent 83%),
    linear-gradient(128deg,#eff6ee,#ecf4ed 59%,#f8f2e9);
}
#slp-family-root::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .46;
  background-image:
    repeating-linear-gradient(155deg,transparent 0 56px,rgba(71,133,100,.065) 57px,transparent 58px 118px),
    radial-gradient(circle at 76% 25%,rgba(255,255,255,.75) 0 2px,transparent 4px);
}
#slp-family-root .slp-family-page { position: relative; z-index: 1; }
#slp-family-root .slp-family-card { color: var(--slp-text); }
#slp-family-root .slp-family-welcome { border-radius: 26px; }
#slp-family-root .slp-family-head p,
#slp-family-root .slp-family-muted,
#slp-family-root .slp-family-help { color: var(--slp-text-soft); }
#slp-family-root .slp-family-member,
#slp-family-root .slp-family-event,
#slp-family-root .slp-family-picker-row { background: linear-gradient(125deg,rgba(255,255,255,.59),rgba(228,243,230,.29)); }
#slp-family-root .slp-family-avatar { background: rgba(192,223,204,.48); }
#slp-family-root .slp-family-icon-button { border-color: var(--slp-hairline); background: var(--slp-glass); box-shadow: var(--slp-glass-inset),0 3px 13px rgba(23,61,43,.12); }

/* NIGHT MODE: contrast is defined explicitly for text, input, list, and modal surfaces. */
html[data-slp-theme="dark"] body {
  background:
    radial-gradient(ellipse 70vw 65vh at 100% 0%,rgba(43,106,85,.42),transparent 80%),
    radial-gradient(ellipse 56vw 75vh at 0% 93%,rgba(115,81,50,.22),transparent 80%),
    linear-gradient(125deg,#091c18,#0c211e 60%,#061814);
  color: var(--slp-text);
}
html[data-slp-theme="dark"] .app-shell {
  background: radial-gradient(ellipse at 5% 10%,rgba(75,140,115,.12),transparent 52%);
}
html[data-slp-theme="dark"] .glass,
html[data-slp-theme="dark"] #slp-family-root .slp-family-card {
  background: var(--slp-glass);
  border: 1px solid var(--slp-hairline);
  border-top-color: rgba(224,255,238,.37);
  box-shadow: var(--slp-glass-shadow),var(--slp-glass-inset);
  -webkit-backdrop-filter: blur(30px) saturate(172%);
  backdrop-filter: blur(30px) saturate(172%);
}
html[data-slp-theme="dark"] .site-header {
  background: linear-gradient(120deg,rgba(15,49,42,.89),rgba(15,44,40,.77) 60%,rgba(11,32,31,.83));
  border-bottom: 1px solid rgba(202,251,220,.20);
  box-shadow: 0 6px 24px rgba(0,10,9,.22),inset 0 1px rgba(220,255,234,.15);
  -webkit-backdrop-filter: blur(32px) saturate(185%);
  backdrop-filter: blur(32px) saturate(185%);
}
html[data-slp-theme="dark"] .site-header .brand,
html[data-slp-theme="dark"] .site-header .brand>span:last-child,
html[data-slp-theme="dark"] .site-header .desktop-nav button.active,
html[data-slp-theme="dark"] .landing-nav,
html[data-slp-theme="dark"] .slp-family-page,
html[data-slp-theme="dark"] #slp-family-root { color: var(--slp-text); }
html[data-slp-theme="dark"] .desktop-nav button,
html[data-slp-theme="dark"] .brand-sub,
html[data-slp-theme="dark"] .landing-nav button,
html[data-slp-theme="dark"] .intro-strip>p,
html[data-slp-theme="dark"] .intro-strip>span,
html[data-slp-theme="dark"] .site-footer,
html[data-slp-theme="dark"] .muted,
html[data-slp-theme="dark"] .eyebrow,
html[data-slp-theme="dark"] .small,
html[data-slp-theme="dark"] .family-progress p,
html[data-slp-theme="dark"] .card-overline,
html[data-slp-theme="dark"] .page-intro p,
html[data-slp-theme="dark"] .step-card p,
html[data-slp-theme="dark"] .privacy-banner p,
html[data-slp-theme="dark"] .draw-center p,
html[data-slp-theme="dark"] .empty-page p,
html[data-slp-theme="dark"] .settings-option p,
html[data-slp-theme="dark"] .settings-side p,
html[data-slp-theme="dark"] .wish-card-content>p,
html[data-slp-theme="dark"] .field small,
html[data-slp-theme="dark"] .wish-mini p,
html[data-slp-theme="dark"] .person-status,
html[data-slp-theme="dark"] .bottom-tip,
html[data-slp-theme="dark"] .modal-copy,
html[data-slp-theme="dark"] .modal-top p,
html[data-slp-theme="dark"] .draw-notification-intro,
html[data-slp-theme="dark"] .draw-notification-status>p,
html[data-slp-theme="dark"] .draw-notification-count,
html[data-slp-theme="dark"] .draw-notification-note { color: var(--slp-text-soft); }
html[data-slp-theme="dark"] .desktop-nav button:hover,
html[data-slp-theme="dark"] .desktop-nav button.active,
html[data-slp-theme="dark"] .snow-toggle,
html[data-slp-theme="dark"] .icon-button:hover,
html[data-slp-theme="dark"] .site-header .slp-family-entry {
  background: linear-gradient(126deg,rgba(131,198,161,.24),rgba(89,155,134,.11));
  color: #e1f8e9;
  border: 1px solid rgba(205,255,231,.21);
  box-shadow: inset 0 1px rgba(237,255,246,.15);
}
html[data-slp-theme="dark"] .brand-mark:not(.brand-mark-app),
html[data-slp-theme="dark"] .avatar:not(.avatar-extra),
html[data-slp-theme="dark"] .step-icon,
html[data-slp-theme="dark"] .setting-icon,
html[data-slp-theme="dark"] .setting-feature-icon,
html[data-slp-theme="dark"] .privacy-icon {
  background: rgba(115,161,138,.16);
  color: #d4edd8;
  border-color: rgba(222,255,228,.20);
}
html[data-slp-theme="dark"] .soft-badge,
html[data-slp-theme="dark"] .event-chip,
html[data-slp-theme="dark"] .tiny-label,
html[data-slp-theme="dark"] .recipient-badge,
html[data-slp-theme="dark"] .invitation-badge,
html[data-slp-theme="dark"] .slp-family-tag,
html[data-slp-theme="dark"] .connection-status { background: rgba(112,178,143,.17); color: #d3f2dd; border: 1px solid rgba(183,235,202,.23); }
html[data-slp-theme="dark"] .invitation-badge.failed,
html[data-slp-theme="dark"] .notice-error { background: rgba(184,82,72,.18); color: #ffc2b7; border-color: rgba(238,155,140,.4); }
html[data-slp-theme="dark"] .invitation-badge.sent,
html[data-slp-theme="dark"] .invitation-badge.opened,
html[data-slp-theme="dark"] .soft-badge.green,
html[data-slp-theme="dark"] .connection-status.ready { color: #baf4cc; background: rgba(60,144,95,.19); }
html[data-slp-theme="dark"] .button { background: linear-gradient(120deg,#286a51,#154f3c); color: #f2fff2; border: 1px solid rgba(214,255,226,.17); box-shadow: 0 6px 20px rgba(0,12,9,.29),inset 0 1px rgba(233,255,240,.19); }
html[data-slp-theme="dark"] .button-gold { background: linear-gradient(120deg,#e8ca91,#bfa06b); color: #1b2d25; border-color: rgba(255,240,206,.42); }
html[data-slp-theme="dark"] .button-soft,
html[data-slp-theme="dark"] .button-plain,
html[data-slp-theme="dark"] .site-header .slp-family-entry {
  background: linear-gradient(126deg,rgba(128,197,157,.20),rgba(97,159,134,.08));
  border-color: rgba(191,255,215,.23);
  color: #e1f8e9;
  box-shadow: inset 0 1px rgba(240,255,245,.12),0 4px 15px rgba(0,10,9,.12);
}
html[data-slp-theme="dark"] .button-danger { background: #9e3e40; color: #fff9f3; border-color: rgba(255,204,203,.3); }
html[data-slp-theme="dark"] .text-link,
html[data-slp-theme="dark"] .inline-note,
html[data-slp-theme="dark"] .setting-icon,
html[data-slp-theme="dark"] .setting-feature-icon,
html[data-slp-theme="dark"] .settings-option h3,
html[data-slp-theme="dark"] .field>span { color: #bce9cd; }
html[data-slp-theme="dark"] .privacy-banner,
html[data-slp-theme="dark"] .notice:not(.notice-error),
html[data-slp-theme="dark"] .draw-notification-status,
html[data-slp-theme="dark"] .exclusions-list>div {
  background: rgba(117,181,148,.12); border: 1px solid rgba(203,254,222,.17); color: #d4eade; box-shadow: inset 0 1px rgba(228,255,234,.11);
}
html[data-slp-theme="dark"] .notice p,
html[data-slp-theme="dark"] .modal .notice p { color: #d2eadb; }
html[data-slp-theme="dark"] .notice-warm { background: rgba(225,173,98,.15); border-color: rgba(253,215,144,.24); color: #f1d7a6; }
html[data-slp-theme="dark"] .notice-warm p,
html[data-slp-theme="dark"] .modal .notice-warm p { color: #f1d7a6; }
html[data-slp-theme="dark"] .notice-error p,
html[data-slp-theme="dark"] .modal .notice-error p,
html[data-slp-theme="dark"] .form-error { color: #ffc1b6; }
html[data-slp-theme="dark"] .demo-banner { background: rgba(197,147,84,.19);color:#f3d5ac;border-color:rgba(255,213,159,.31); }
html[data-slp-theme="dark"] .gift-art { background: linear-gradient(140deg,rgba(132,193,150,.16),rgba(86,136,108,.09)); border-color: rgba(199,246,218,.12); }
html[data-slp-theme="dark"] .gift-art-1 { background: linear-gradient(135deg,rgba(166,107,94,.20),rgba(64,104,87,.14)); }
html[data-slp-theme="dark"] .gift-art-2 { background: linear-gradient(135deg,rgba(117,172,135,.22),rgba(52,102,83,.13)); }
html[data-slp-theme="dark"] .gift-art-3 { background: linear-gradient(135deg,rgba(187,154,98,.20),rgba(58,92,78,.13)); }
html[data-slp-theme="dark"] .add-wish-card { border-color: rgba(184,241,207,.30); background: rgba(64,126,92,.12); }
html[data-slp-theme="dark"] .add-wish-card strong,
html[data-slp-theme="dark"] .wish-title-row h3,
html[data-slp-theme="dark"] .settings-card h2,
html[data-slp-theme="dark"] .draw-center h2,
html[data-slp-theme="dark"] .person-card h3,
html[data-slp-theme="dark"] .page-intro h1 { color: #effaf0; }
html[data-slp-theme="dark"] .wish-price,
html[data-slp-theme="dark"] .family-progress strong,
html[data-slp-theme="dark"] .step-number,
html[data-slp-theme="dark"] .card-overline>span { color: #dbcd9b; }
html[data-slp-theme="dark"] .progress-track { background: rgba(202,242,210,.16); }
html[data-slp-theme="dark"] .toggle { background: rgba(194,224,200,.25); }
html[data-slp-theme="dark"] .toggle.on { background: #29835f; }
html[data-slp-theme="dark"] .field input,
html[data-slp-theme="dark"] .field textarea,
html[data-slp-theme="dark"] .field select,
html[data-slp-theme="dark"] .modal .field input,
html[data-slp-theme="dark"] .modal .field textarea,
html[data-slp-theme="dark"] .modal .field select,
html[data-slp-theme="dark"] #slp-family-root .slp-family-form input:not([type="checkbox"]),
html[data-slp-theme="dark"] #slp-family-root .slp-family-form textarea {
  color: #f2fbf4;
  background: rgba(6,28,25,.52);
  border-color: rgba(187,234,205,.29);
  box-shadow: inset 0 1px rgba(232,255,244,.10),0 2px 10px rgba(0,5,5,.12);
}
html[data-slp-theme="dark"] input::placeholder,
html[data-slp-theme="dark"] textarea::placeholder { color: #afc6b8; opacity: 1; }
html[data-slp-theme="dark"] select option,
html[data-slp-theme="dark"] .field select option { background: #18392f; color: #eff9f1; }
html[data-slp-theme="dark"] .field input:focus,
html[data-slp-theme="dark"] .field textarea:focus,
html[data-slp-theme="dark"] .field select:focus { background: rgba(11,42,34,.76);border-color:#90d1aa;box-shadow:0 0 0 3px rgba(137,223,167,.18); }
html[data-slp-theme="dark"] .modal,
html[data-slp-theme="dark"] .install-dialog {
  color: #f0f8ef;
  background: linear-gradient(130deg,rgba(31,70,59,.95),rgba(14,47,41,.94) 55%,rgba(10,34,33,.95));
  border: 1px solid rgba(204,250,222,.32);
  box-shadow: 0 30px 90px rgba(0,8,7,.61), inset 0 1px rgba(237,255,245,.26);
  -webkit-backdrop-filter: blur(40px) saturate(155%);
  backdrop-filter: blur(40px) saturate(155%);
}
html[data-slp-theme="dark"] .modal::backdrop { background: rgba(1,12,9,.62); }
html[data-slp-theme="dark"] .modal .modal-top h2,
html[data-slp-theme="dark"] .modal .field>span,
html[data-slp-theme="dark"] .modal .modal-copy,
html[data-slp-theme="dark"] .modal .modal-top p,
html[data-slp-theme="dark"] .modal .field small,
html[data-slp-theme="dark"] .modal .person-status { color: #e1f6e7; }
html[data-slp-theme="dark"] .modal-actions { border-top-color: rgba(232,255,233,.17); }
html[data-slp-theme="dark"] .wizard-steps b,
html[data-slp-theme="dark"] .person-number { color: #daecd9; border-color: rgba(187,231,202,.31); }
html[data-slp-theme="dark"] .wizard-steps .current b { color: #132e25; }
html[data-slp-theme="dark"] .install-trigger { color:#e2f7e8;background:rgba(126,193,151,.15);border-color:rgba(202,244,218,.28); }
html[data-slp-theme="dark"] .install-brand>p,
html[data-slp-theme="dark"] .install-dialog .install-steps p,
html[data-slp-theme="dark"] .install-dialog .install-steps strong,
html[data-slp-theme="dark"] .install-dialog .install-access>div,
html[data-slp-theme="dark"] .install-dialog .install-network-note,
html[data-slp-theme="dark"] .install-dialog .install-perks,
html[data-slp-theme="dark"] .install-dialog .install-platforms>button,
html[data-slp-theme="dark"] .install-callout p { color: #cde4d5; }
html[data-slp-theme="dark"] .install-platforms { background: rgba(0,21,16,.40); }
html[data-slp-theme="dark"] .install-platforms>button.selected { color:#f4f9ea;background:rgba(126,200,148,.21);border-color:rgba(222,255,226,.20); }
html[data-slp-theme="dark"] .connection-notice { color:#f8deaf;background:rgba(91,67,36,.95);border-color:rgba(246,216,156,.31); }
html[data-slp-theme="dark"] .site-footer { border-top-color: rgba(201,245,214,.19); }
html[data-slp-theme="dark"] .desktop-nav.mobile-open {
  background: linear-gradient(130deg,rgba(12,43,36,.97),rgba(20,64,47,.92));border:1px solid rgba(207,255,227,.24);box-shadow:0 23px 53px rgba(0,9,7,.55);
}
html[data-slp-theme="dark"] .desktop-nav.mobile-open button { color:#d8f0de; }
html[data-slp-theme="dark"] .desktop-nav.mobile-open button.active { color:#f6dda5; background:rgba(178,229,197,.13); }
html[data-slp-theme="dark"] .festive-backdrop__glow--pine { background:#2e8164;opacity:.35; }
html[data-slp-theme="dark"] .festive-backdrop__glow--gold { background:#926b3b;opacity:.2; }
html[data-slp-theme="dark"] .festive-backdrop__glow--mint { background:#36765b;opacity:.26; }
html[data-slp-theme="dark"] .festive-backdrop__bokeh { background:radial-gradient(circle at 30% 25%,rgba(151,216,170,.16),transparent 64%);border-color:rgba(167,224,190,.18); }
html[data-slp-theme="dark"] .festive-backdrop__trees { opacity:.095; }
html[data-slp-theme="dark"] .slp-theme-toggle {
  color:#d9f8e6;
  background:linear-gradient(135deg,rgba(113,189,145,.21),rgba(49,111,91,.14));
  border-color:rgba(200,255,224,.29);
  box-shadow:0 4px 16px rgba(0,8,6,.24),inset 0 1px rgba(238,255,241,.17);
}
html[data-slp-theme="dark"] #slp-family-root {
  background:
    radial-gradient(ellipse 750px 650px at 103% -10%,rgba(44,108,81,.45),transparent 82%),
    radial-gradient(ellipse 720px 680px at -11% 108%,rgba(137,94,59,.19),transparent 80%),
    linear-gradient(125deg,#0a1e1a,#0d2923 55%,#091c19);
  color:#eef9f1;
}
html[data-slp-theme="dark"] #slp-family-root::before { opacity:.38;background-image:repeating-linear-gradient(155deg,transparent 0 56px,rgba(148,217,179,.11) 57px,transparent 58px 118px); }
html[data-slp-theme="dark"] #slp-family-root h1,
html[data-slp-theme="dark"] #slp-family-root h2,
html[data-slp-theme="dark"] #slp-family-root h3,
html[data-slp-theme="dark"] #slp-family-root .slp-family-member-info strong,
html[data-slp-theme="dark"] #slp-family-root .slp-family-empty h3,
html[data-slp-theme="dark"] #slp-family-root .slp-family-form label:not(.slp-family-checkbox):not(.slp-family-picker-row),
html[data-slp-theme="dark"] #slp-family-root .slp-family-event strong { color: #f0fbef; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-head p,
html[data-slp-theme="dark"] #slp-family-root .slp-family-help,
html[data-slp-theme="dark"] #slp-family-root .slp-family-muted,
html[data-slp-theme="dark"] #slp-family-root .slp-family-checkbox,
html[data-slp-theme="dark"] #slp-family-root .slp-family-checkbox small,
html[data-slp-theme="dark"] #slp-family-root .slp-family-member-info span,
html[data-slp-theme="dark"] #slp-family-root .slp-family-event small,
html[data-slp-theme="dark"] #slp-family-root .slp-family-event-year,
html[data-slp-theme="dark"] #slp-family-root .slp-family-select-top,
html[data-slp-theme="dark"] #slp-family-root .slp-family-empty,
html[data-slp-theme="dark"] #slp-family-root footer { color: #b8d3c3; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-eyebrow { color:#a3cfb7; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-member,
html[data-slp-theme="dark"] #slp-family-root .slp-family-event,
html[data-slp-theme="dark"] #slp-family-root .slp-family-picker-row { background:rgba(105,168,135,.10);border-color:rgba(194,250,214,.18);box-shadow:inset 0 1px rgba(226,255,235,.10); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-picker-row:hover { background:rgba(111,191,150,.19); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-avatar,
html[data-slp-theme="dark"] #slp-family-root .slp-family-check { background:rgba(110,185,134,.17); color:#d1f5de;border-color:rgba(197,255,218,.17); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-tag { color:#d3f1dd; background:rgba(109,181,135,.15);border-color:rgba(187,241,204,.2); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-button { background:linear-gradient(128deg,#28694f,#18503d);color:#f2fff3;border:1px solid rgba(222,255,229,.21);box-shadow:0 4px 15px rgba(0,8,6,.24),inset 0 1px rgba(238,255,245,.16); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-button.secondary { background:linear-gradient(130deg,rgba(134,201,158,.19),rgba(82,154,129,.10));color:#e3f7e8;border-color:rgba(205,250,219,.24); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-button.gold { color:#183128;background:linear-gradient(130deg,#f2d497,#c7ab72);border-color:rgba(255,244,201,.41); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-button.danger { background:#a74749;color:#fff; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-text-btn { color:#b1eac6; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-rule { background:rgba(196,244,219,.21); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-new-person button { background:rgba(150,90,86,.16);color:#ffd1ca;border-color:rgba(238,172,160,.28); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-notice { background:rgba(83,170,112,.13);color:#c8f4d7;border:1px solid rgba(171,236,194,.24); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-notice.error { background:rgba(154,68,70,.21);color:#ffd0c9;border-color:rgba(255,173,154,.24); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-welcome { border-color:rgba(201,244,214,.25); }
html[data-slp-theme="dark"] #slp-family-root .slp-family-welcome h2,
html[data-slp-theme="dark"] #slp-family-root .slp-family-welcome p { color: #fff8ee !important; }
html[data-slp-theme="dark"] #slp-family-root .slp-family-icon-button { background:rgba(134,200,154,.14);color:#e6f9ed;border-color:rgba(209,255,220,.24); }
/* Legacy and accessibility: readable backgrounds if transparency is unavailable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .modal { background:#edf5eb; }
  #slp-family-root .slp-family-card { background:#f4f8f2; }
  html[data-slp-theme="dark"] .glass,
  html[data-slp-theme="dark"] .modal,
  html[data-slp-theme="dark"] #slp-family-root .slp-family-card { background:#193c32; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass,.modal,#slp-family-root .slp-family-card { background:#edf5eb; }
  html[data-slp-theme="dark"] .glass,html[data-slp-theme="dark"] .modal,html[data-slp-theme="dark"] #slp-family-root .slp-family-card { background:#193c32; }
}
@media (prefers-reduced-motion: reduce) {
  .slp-theme-toggle { transition: none; }
}
/* Final readability pass on legacy hard-coded colors and the create-event wizard. */
html[data-slp-theme="dark"] .main-content :is(h1,h2,h3),
html[data-slp-theme="dark"] .privacy-banner h3,
html[data-slp-theme="dark"] .step-card h3,
html[data-slp-theme="dark"] .intro-strip strong,
html[data-slp-theme="dark"] .wish-mini h3,
html[data-slp-theme="dark"] .person-card h3,
html[data-slp-theme="dark"] .empty-wishes h3,
html[data-slp-theme="dark"] .settings-option h3,
html[data-slp-theme="dark"] .family-summary h2 { color: #f0f9ef; }
html[data-slp-theme="dark"] .main-content .welcome-hero :is(h1,h2,h3),
html[data-slp-theme="dark"] .main-content .dashboard-hero :is(h1,h2,h3) { color: #fbf6e9; }
html[data-slp-theme="dark"] .wizard-steps,
html[data-slp-theme="dark"] .person-form-row { border-color: rgba(218,255,230,.19); }
html[data-slp-theme="dark"] .wizard-steps>span,
html[data-slp-theme="dark"] .wizard-steps .current { color: #c6e4d2; }
html[data-slp-theme="dark"] .wizard-steps b { border-color: rgba(195,237,209,.43);color:#daedde; }
html[data-slp-theme="dark"] .wizard-steps .current b { color:#fafbee;background:#357957;border-color:#7fc49a; }
html[data-slp-theme="dark"] .empty-doodle,
html[data-slp-theme="dark"] .reveal-confetti,
html[data-slp-theme="dark"] .add-wish-card>span { color:#cfe8da; }
html[data-slp-theme="dark"] .add-wish-card p,
html[data-slp-theme="dark"] .empty-wishes p,
html[data-slp-theme="dark"] .intro-strip strong,
html[data-slp-theme="dark"] .person-status>span,
html[data-slp-theme="dark"] .wish-mini>span,
html[data-slp-theme="dark"] .family-avatar-list>div>span:last-child,
html[data-slp-theme="dark"] .family-progress p { color:#bad3c3; }
html[data-slp-theme="dark"] .intro-strip .strip-divider { background:rgba(210,255,221,.21); }
html[data-slp-theme="dark"] .handwritten { color: #dbc892; }
/* The global Tailwind reset also targets unqualified buttons. Keep all family
   actions opaque and readable in LIGHT mode, even after switching from dark. */
#slp-family-root .slp-family-button:not(.secondary):not(.gold):not(.danger) {
  background: linear-gradient(130deg,#28674c,#194b38);
  color: #fffdf4;
  border: 1px solid rgba(255,255,255,.29);
}
#slp-family-root .slp-family-button.gold {
  background: linear-gradient(128deg,#f4d58f,#e3b965);
  color: #213c2d;
  border: 1px solid rgba(255,240,204,.87);
  box-shadow: 0 8px 18px rgba(10,37,20,.15),inset 0 1px rgba(255,255,244,.70);
}
#slp-family-root .slp-family-button.secondary {
  background: linear-gradient(125deg,rgba(255,255,255,.66),rgba(213,235,220,.46));
  color: #24513d;
  border: 1px solid rgba(255,255,255,.9);
}
#slp-family-root .slp-family-button.danger { background: #a74749;color:#fff;border:1px solid rgba(255,227,227,.33); }
/* Reassert dark-specific rules after the light-mode action defaults. */
html[data-slp-theme="dark"] #slp-family-root .slp-family-button:not(.secondary):not(.gold):not(.danger) {
  background:linear-gradient(128deg,#28694f,#18503d);color:#f2fff3;border-color:rgba(222,255,229,.21);
}
html[data-slp-theme="dark"] #slp-family-root .slp-family-button.gold {
  background:linear-gradient(130deg,#f2d497,#c7ab72);color:#183128;border-color:rgba(255,244,201,.41);
}
html[data-slp-theme="dark"] #slp-family-root .slp-family-button.secondary {
  background:linear-gradient(130deg,rgba(134,201,158,.19),rgba(82,154,129,.10));color:#e3f7e8;border-color:rgba(205,250,219,.24);
}
