/* Shared day and evening controls, followed by the evening palette. */
:root { color-scheme: light; }
.header-actions { display: flex; align-items: center; gap: 18px; min-width: 0; }
.theme-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 13px; border: 2px solid #e8c9dd; border-radius: 100px; background: #fff8fd; color: #693c68; font: 800 12px/1.2 'Nunito','Trebuchet MS',system-ui,sans-serif; cursor: pointer; touch-action: manipulation; }
.theme-toggle:hover { background: #f9e6f2; }
.theme-toggle-icon { font: 24px/1 'Trebuchet MS',system-ui,sans-serif; width: 22px; text-align: center; }
.theme-toggle-text { white-space: nowrap; }
.theme-toggle:focus-visible { outline: 3px solid #8e477f; outline-offset: 4px; }
.site-header nav { gap: 22px; }
.admin-page .admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.admin-page .theme-toggle { margin: 0; }

html[data-theme='dark'] {
  color-scheme: dark;
  color: #fff1fa;
  background: #24182e;
  --ink: #fff1fa;
  --muted: #d2bdd7;
  --rose: #b33f77;
  --rose-dark: #ba477f;
  --cream: #24182e;
  --pink: #432b4b;
  --line: #76577f;
}
html[data-theme='dark'] body.invitation-page,
html[data-theme='dark'] body.admin-page { color: var(--ink); background: var(--cream); }
html[data-theme='dark'] a:focus-visible,
html[data-theme='dark'] button:focus-visible,
html[data-theme='dark'] input:focus-visible,
html[data-theme='dark'] textarea:focus-visible,
html[data-theme='dark'] select:focus-visible,
html[data-theme='dark'] summary:focus-visible { outline-color: #f5b6e3; }
html[data-theme='dark'] .theme-toggle,
html[data-theme='dark'] .admin-page .theme-toggle { background: #432b4e; color: #ffe9fa; border: 2px solid #8d659b; }
html[data-theme='dark'] .theme-toggle:hover,
html[data-theme='dark'] .admin-page .theme-toggle:hover { background: #583563; }
html[data-theme='dark'] .site-header { background: #24182e; border-color: #61406d; }
html[data-theme='dark'] .brand-flower { color: #f4a7d0; }
html[data-theme='dark'] .nav-rsvp { color: #ffe7f8; background: #432b4e; border-color: #916194; box-shadow: 0 3px 0 #110c17; }
html[data-theme='dark'] .nav-rsvp:hover { background: #593561; }
html[data-theme='dark'] .button-primary { color: #fff7fc; background: var(--rose); border-color: #d9a5c7; box-shadow: 0 5px 0 #672342; }
html[data-theme='dark'] .button-primary:hover { background: var(--rose-dark); }
html[data-theme='dark'] .button-primary:active { box-shadow: 0 1px 0 #672342; }
html[data-theme='dark'] .skip-link { background: #f0b9de; color: #28182f; }

/* The overlay is behind Olivia, so the real photos retain their natural colors. */
html[data-theme='dark'] .hero { background: #35213f; }
html[data-theme='dark'] .hero-illustration { background-color: #35213f; }
html[data-theme='dark'] .hero-illustration:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#291b423d,#25153359); }
html[data-theme='dark'] .hero:before { background: linear-gradient(90deg,#26182ff7 0%,#2d1d3de8 26%,#2d1d3d9c 44%,#2d1d3d28 64%,transparent 83%); }
html[data-theme='dark'] .hero h1 { color: #fff1fa; text-shadow: 0 4px 0 #23112b9c; }
html[data-theme='dark'] .hero h1 em { color: #ffb9df; text-shadow: 0 4px 0 #572448,0 8px 0 #23142d59; }
html[data-theme='dark'] .hero-copy .eyebrow { background: #4c324e; color: #f9e3cb; border-color: #b08aaf; box-shadow: 0 4px 0 #21112866; }
html[data-theme='dark'] .hero-copy .eyebrow span { color: #f4cf8a; }
html[data-theme='dark'] .hero-intro strong { color: #ffe1ef; background: #744265; }
html[data-theme='dark'] .hero-meta span { color: #e9abd9; }
html[data-theme='dark'] .hero-wish-link { color: #ffeaf9; background: #432b4eeb; border-color: #b28cb0; box-shadow: 0 3px 0 #21122766; }
html[data-theme='dark'] .hero-wish-link:hover { background: #614064; }
html[data-theme='dark'] .birthday-seal { background: #56374e; color: #ffe8cb; border-color: #d3b4cc; outline-color: #d8b385; box-shadow: 5px 7px 0 #21122766; }
html[data-theme='dark'] .birthday-seal strong { color: #ffc0e0; text-shadow: 0 3px 0 #38203e; }
html[data-theme='dark'] .scroll-note { color: #f9e2f4; background: #402849e8; }
html[data-theme='dark'] .celebration-message { color: #ffe7f9; }
html[data-theme='dark'] .celebration-message:not(:empty) { background: #503455; border-color: #b78cae; box-shadow: 0 5px 0 #21122766; }
html[data-theme='dark'] .olivia-storybook { filter: drop-shadow(3px 7px 0 #21102966); }
html[data-theme='dark'] .olivia-cloud { filter: drop-shadow(2px 6px 0 #24152f80); }
html[data-theme='dark'] .olivia-cloud path:first-child { fill: #705882; stroke: #c9b0dc; }
html[data-theme='dark'] .olivia-cloud path+path { stroke: #bfa3d0; }
html[data-theme='dark'] .hero-olivia figcaption { color: #ffe5f4; background: #543653; border-color: #c19bb8; }
html[data-theme='dark'] .hero-olivia figcaption span { color: #ffb8db; }
html[data-theme='dark'] .story-star { text-shadow: 2px 3px 0 #432447; }
html[data-theme='dark'] .story-ball { border-color: #cab0d9; }

html[data-theme='dark'] .quick-rsvp.rsvp-section { background: #36213f; }
html[data-theme='dark'] .quick-rsvp.rsvp-section:before { background-image: radial-gradient(#9c75b1 1.5px,transparent 2.5px); opacity: .2; }
html[data-theme='dark'] .quick-rsvp .reply-card { color: #fff1fa; background: #432d4d; border-color: #886390; box-shadow: 6px 9px 0 #1d112666; }
html[data-theme='dark'] .reply-card:after { background: #160e1b33; }
html[data-theme='dark'] .quick-reply-heading>p { color: #efb5df; }
html[data-theme='dark'] .saved-rsvp { background: #34213f; border-color: #886390; }
html[data-theme='dark'] .saved-rsvp:focus-visible { outline-color: #f5b6e3; }
html[data-theme='dark'] .saved-rsvp-attendance { color: #ffc2e6; }
html[data-theme='dark'] .saved-rsvp-count,
html[data-theme='dark'] .saved-rsvp-time,
html[data-theme='dark'] .original-invitation summary,
html[data-theme='dark'] .original-invitation .saved-rsvp-names { color: #d2bdd7; }
html[data-theme='dark'] .saved-rsvp-dietary { color: #fff1fa; background: #432d4d; }
html[data-theme='dark'] .original-invitation { border-color: #76577f; }
html[data-theme='dark'] .cancel-response { color: #ffe4f7; background: #5d3d67; border-color: #93759d; }
html[data-theme='dark'] .cancel-response:hover { background: #79527f; }
html[data-theme='dark'] .quick-rsvp .attendance-option>span { color: #ead8ed; background: #34213f; border-color: #93759d; }
html[data-theme='dark'] .quick-rsvp .attendance-option input:checked+span { color: #ffe9fa; background: #79456d; border-color: #f0b1db; box-shadow: 0 3px 0 #281930; }
html[data-theme='dark'] .quick-rsvp .attendance-option input:focus-visible+span { outline-color: #f5b6e3; }
html[data-theme='dark'] .count-field { background: #34213f; }
html[data-theme='dark'] .count-field .number-stepper { color: #fff1fa; background: #2b1c35; border-color: #93759d; }
html[data-theme='dark'] .number-stepper input { color: #fff1fa; }
html[data-theme='dark'] .number-stepper button { color: #ffe4f7; background: #5d3d67; }
html[data-theme='dark'] .number-stepper button:hover { background: #79527f; }
html[data-theme='dark'] .form-field input:not([type=number]),
html[data-theme='dark'] .form-field textarea,
html[data-theme='dark'] .dietary-details textarea { color: #fff1fa; background: #2b1c35; border-color: #93759d; caret-color: #ffc2e6; }
html[data-theme='dark'] .form-field input::placeholder,
html[data-theme='dark'] .form-field textarea::placeholder,
html[data-theme='dark'] .dietary-details textarea::placeholder { color: #c9b4d1; opacity: 1; }
html[data-theme='dark'] .guest-names-hint,
html[data-theme='dark'] .form-field small,
html[data-theme='dark'] .form-privacy { color: #d2bdd7; }
html[data-theme='dark'] .guest-name-row .remove-person { color: #ffe4f7; background: #5d3d67; border-color: #93759d; }
html[data-theme='dark'] .guest-name-row .remove-person:hover { background: #79527f; }
html[data-theme='dark'] .dietary-details summary { color: #f3c0e2; }
html[data-theme='dark'] .dietary-details summary>span { color: #d2bdd7; }
html[data-theme='dark'] .setup-notice { color: #f9dfc9; background: #544039; border-color: #ac8772; }
html[data-theme='dark'] .form-feedback { color: #ffd6e1; background: #61334e; border-color: #ca8ba9; }
html[data-theme='dark'] .rsvp-success>span { color: #ffb8df; }
html[data-theme='dark'] .rsvp-success .success-details { color: #ead8ed; background: #34213f; }

html[data-theme='dark'] .invitation h2 em,
html[data-theme='dark'] .world-heading h2>span { color: #ffb9df; }
html[data-theme='dark'] .olivia-world { background: #30233f; }
html[data-theme='dark'] .world-heading>p:last-child,
html[data-theme='dark'] .world-card>p { color: #d2bdd7; }
html[data-theme='dark'] .world-card { background: #44304f; border-color: #886390; box-shadow: 4px 6px 0 #190f2366; }
html[data-theme='dark'] .ball-card { background: #48333e; }
html[data-theme='dark'] .robot-card { background: #2d4545; }
html[data-theme='dark'] .sound-sticker { background: #6a3c5a; color: #ffdfed; border-color: #b685a4; box-shadow: 2px 3px 0 #21122766; }
html[data-theme='dark'] .ball-card .sound-sticker { background: #65513a; color: #ffebcd; border-color: #c2a17c; }
html[data-theme='dark'] .robot-card .sound-sticker { background: #35584d; color: #d4f8e7; border-color: #8abda5; }
html[data-theme='dark'] .ballpool-photo,
html[data-theme='dark'] .portrait-frame { background: #44304f; border-color: #886390; box-shadow: 5px 7px 0 #190f2366; }
html[data-theme='dark'] .ballpool-photo figcaption,
html[data-theme='dark'] .portrait-frame figcaption { color: #f0b8dd; }
html[data-theme='dark'] .detail-card { background: #493047; border-color: #886390; box-shadow: 4px 6px 0 #190f2366; }
html[data-theme='dark'] .detail-yellow { background: #473b39; }
html[data-theme='dark'] .detail-lilac { background: #403451; }
html[data-theme='dark'] .detail-icon,
html[data-theme='dark'] .detail-yellow .detail-icon,
html[data-theme='dark'] .detail-lilac .detail-icon { color: #f1bedc; background: #22152e7a; }
html[data-theme='dark'] .wishlist-section { background: #43303f; }
html[data-theme='dark'] .gift-flower { color: #efadd2; }
html[data-theme='dark'] .facebook-event-link>span:first-child { color: #c5dbff; background: #354161; }
html[data-theme='dark'] .closing { background: #24182e; }
html[data-theme='dark'] .closing>span { color: #e9c17d; }
html[data-theme='dark'] .site-footer { color: #cbb4cf; border-color: #63446e; }
html[data-theme='dark'] .site-footer .brand { color: #ead3e8; }
html[data-theme='dark'] ::selection { background: #956087; color: #fff; }

/* The organizer uses the same preference and palette, including editable fields. */
html[data-theme='dark'] .admin-page a { color: #f5badf; }
html[data-theme='dark'] .admin-page .card,
html[data-theme='dark'] .admin-page dialog { color: #fff1fa; background: #3c2946; border-color: #886390; box-shadow: 0 8px 32px #100a1759; }
html[data-theme='dark'] .admin-page .eyebrow,
html[data-theme='dark'] .admin-page .muted { color: #d2bdd7; }
html[data-theme='dark'] .admin-page .message { color: #ffc0de; }
html[data-theme='dark'] .admin-page input,
html[data-theme='dark'] .admin-page select,
html[data-theme='dark'] .admin-page textarea { color: #fff1fa; background: #291b33; border-color: #93759d; caret-color: #ffc2e6; }
html[data-theme='dark'] .admin-page input::placeholder,
html[data-theme='dark'] .admin-page textarea::placeholder { color: #c9b4d1; opacity: 1; }
html[data-theme='dark'] .admin-page .edit-panel [aria-invalid='true'] { border-color: #ffb0cd; }
html[data-theme='dark'] .admin-page button { color: #fff7fc; background: #a53c71; }
html[data-theme='dark'] .admin-page button:hover { background: #ba477f; }
html[data-theme='dark'] .admin-page button.secondary { color: #ffe4f7; background: #5b3b66; }
html[data-theme='dark'] .admin-page button.secondary:hover { background: #76507e; }
html[data-theme='dark'] .admin-page button.delete { color: #ffd4df; background: #623149; border-color: #a96b86; }
html[data-theme='dark'] .admin-page button.delete:hover { background: #7d3d57; }
html[data-theme='dark'] .admin-page th { color: #ead4e8; background: #2e1d38; }
html[data-theme='dark'] .admin-page th,
html[data-theme='dark'] .admin-page td { border-color: #72537b; }
html[data-theme='dark'] .admin-page .pill { color: #d6f7db; background: #34553d; }
html[data-theme='dark'] .admin-page .pill.no { color: #f6d0e4; background: #623d58; }
html[data-theme='dark'] .admin-page .edit-fields { border-color: #886390; }
html[data-theme='dark'] .admin-page dialog::backdrop { background: #160d1dc4; }

@media(max-width:1180px) {
  .site-header { gap: 16px; padding-left: 24px; padding-right: 24px; }
  .site-header nav { gap: 15px; }
  .header-actions { gap: 12px; }
  .site-header .theme-toggle-text { display: none; }
  .site-header .theme-toggle { padding: 8px; width: 44px; }
}
@media(max-width:900px) {
  .site-header .nav-link { display: none; }
  html[data-theme='dark'] .hero:before { background: linear-gradient(180deg,#291a35 0%,#291a35 31%,#291a35d9 41%,#291a3533 58%,transparent 75%); }
}
@media(max-width:760px) {
  html[data-theme='dark'] .hero:before { background: linear-gradient(180deg,#291a35b8 0%,#291a35b8 48%,#291a356b 68%,transparent 86%); }
  .site-header { min-height: 78px; height: auto; padding: 12px 18px; }
  .site-header .brand { min-width: 0; }
  .header-actions { gap: 8px; flex: 0 0 auto; }
  .site-header nav { gap: 0; }
  html[data-theme='dark'] .mobile-rsvp { color: #ffeaf8; background: #3b2948f7; border-color: #906a9d; box-shadow: 0 6px 25px #0e091759; }
  html[data-theme='dark'] .mobile-rsvp>strong { color: #fff7fc; background: #a83d73; }
}
@media(max-width:420px) {
  .site-header { gap: 10px; padding: 11px 12px; }
  .site-header .brand { font-size: 13px; gap: 5px; white-space: normal; line-height: 1.35; }
  .site-header .brand-flower { flex: 0 0 27px; font-size: 30px; }
  .site-header .brand>span:last-child { max-width: 104px; }
  .header-actions { gap: 6px; }
  .site-header .nav-rsvp { padding: 8px 9px; font-size: 10px; gap: 5px; }
  .admin-page .theme-toggle-text { display: none; }
  .admin-page .theme-toggle { padding: 8px; width: 44px; }
  .admin-page .admin-topbar { gap: 12px; }
}
