.theme-options{display:flex;flex-wrap:wrap;gap:10px;border:0;padding:0;margin:16px 0}
.theme-options label{flex:1;min-width:120px;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid #d8cbed;border-radius:14px;padding:14px;cursor:pointer;background:#f8f5ff}
.theme-options input{width:20px;height:20px;min-height:20px;margin:0;accent-color:#7954e9}
.theme-options label:has(:checked){background:#eee5ff;border-color:#7954e9}
html[data-theme=dark]{--night-bg:#15131e;--night-card:#242130;--night-raised:#302b40;--night-line:#494058;--night-text:#f3edff;--night-muted:#bcb1ce;background:var(--night-bg)}
html[data-theme=dark] body{background:var(--night-bg);color:var(--night-text)}
html[data-theme=dark] :is(header,.parents-header,dialog,.family-card,.admin-card,.mission-row,.task,.pull-refresh){background:var(--night-card);color:var(--night-text);border-color:var(--night-line)}
html[data-theme=dark] :is(button,input,select){color:var(--night-text)}
html[data-theme=dark] button{background:var(--night-raised)}
html[data-theme=dark] :is(input,select){background:#1c1926;border-color:#5c506f;color-scheme:dark}
html[data-theme=dark] :is(.nav button,.close,.language-toggle,.language-menu,.language-menu button,.emoji-search,.emoji-tabs button,.compact-picker,.pin-digit,.admin-section){background:var(--night-raised);color:var(--night-text);border-color:var(--night-line)}
html[data-theme=dark] :is(.language-menu,.emoji-dialog,.task-options-dialog){border-color:var(--night-line)}
html[data-theme=dark] :is(.primary,.routine-picker [aria-pressed=true]){background:#8155df;color:#fff}
html[data-theme=dark] :is(.parents-nav [aria-current=page],.language-menu [aria-checked=true],.theme-options label:has(:checked)){background:#483365;color:#f3eaff;border-color:#a680f3}
html[data-theme=dark] :is(.parents-nav button,.child-progress,.kids button){background:transparent}
html[data-theme=dark] .child-progress:hover{background:#ffffff10}
html[data-theme=dark] .hero{background:#342847;border-color:#54406d;box-shadow:0 8px 18px #0003}
html[data-theme=dark] .hero[data-routine=retour]{background:#203e32;border-color:#345a49}
html[data-theme=dark] .hero[data-routine=soir]{background:#292c49;border-color:#44496b}
html[data-theme=dark] .routine-sticky{background:transparent}
html[data-theme=dark] :is(.mission-row,.task){box-shadow:0 3px 0 #100e18}
html[data-theme=dark] .mission-check{background:transparent}
html[data-theme=dark] .mission-check[aria-checked=true]{background:var(--kid);color:#fff}
html[data-theme=dark] .bar{background:#ffffff20}
html[data-theme=dark] :is(.child-rewards,.stats-metric,.shared-shop-wallet>.coin-value,.shop-wallet-total>.coin-value){background:#191622}
html[data-theme=dark] :is(.stats-profile,.shared-shop-wallet,.buyer-picker>button[aria-pressed=true]){background:color-mix(in srgb,var(--kid) 15%,#242130);border-color:color-mix(in srgb,var(--kid) 45%,#242130)}
html[data-theme=dark] :is(.coin-goals,.shop-wallet-total,.calendar-day,.redemption,.buyer-picker>button){background:var(--night-raised);color:var(--night-text)}
html[data-theme=dark] :is(.calendar-nav button,.month-nav button){background:var(--night-raised)}
html[data-theme=dark] :is(.calendar-day.is-future,.calendar-day.future){color:#aaa0bd}
html[data-theme=dark] :is(.day-bar,.goal-track){background:#534763}
html[data-theme=dark] :is(.bonus-block,.bonus-admin,.parent-wallet,.reward-card,.purchase-split){background:#322b1d;border-color:#6f5831;color:#fff1d1}
html[data-theme=dark] :is(.bonus-heading h1,.bonus-heading p,.reward-card small,.purchase-split>small){color:#f3d695}
html[data-theme=dark] :is(.bonus-sparkle,.bonus-coin-label,.reward-price){background:#53411a;color:#ffdc74}
html[data-theme=dark] .bonus-block .mission-row{box-shadow:0 3px 0 #211c14}
html[data-theme=dark] :is(.coin-value,.stats-metric .stats-coins){color:#ffd25c}
html[data-theme=dark] :is(.stats-metric .stats-streak,.child-rewards .streak-badge){color:#ffa329}
html[data-theme=dark] :is(.stats-metric .stats-ice,.freeze-count){color:#6ec9ef}
html[data-theme=dark] :is(.admin-title p,.admin-card>p,.muted,.shop-intro,.stats-metric>span,.coin-goals>p,.redemption small,.today-date,#family-name,.eyebrow){color:var(--night-muted)}
html[data-theme=dark] :is(.error,.danger-zone h3){color:#ff9da9}
html[data-theme=dark] :is(.danger-zone,.manual-adjustment.is-debit){background:#39242d;border-color:#74404c}
html[data-theme=dark] :is(.manual-adjustment.is-credit,.credit-buttons button){background:#203b30}
html[data-theme=dark] :is(.manual-adjustment .adjustment-amount,.credit-buttons button,.redemption-status.is-delivered){color:#79ddb0}
html[data-theme=dark] :is(.manual-adjustment.is-debit .adjustment-amount,.deduction-buttons:not(.credit-buttons) button,.reward-delete){color:#ff9aa6}
html[data-theme=dark] .danger-button{background:#b52c36;color:#fff}
html[data-theme=dark] :is(.reward-editor,.task-editor,.bedtime-settings){border-color:var(--night-line)}
html[data-theme=dark] :is(.parents-header #saved,.parents-header #translation-status){background:var(--night-card);border-color:var(--night-line);color:var(--night-text)}
html[data-theme=dark] :is(.theme-options label,.family-switch){background:var(--night-raised);border-color:var(--night-line)}
html[data-theme=dark] .routine-picker [data-admin=bonus]{background:#53411a;color:#ffdc74;border-color:#8e6c22}
html[data-theme=dark] .routine-picker [data-admin=bonus][aria-pressed=true]{background:#85651e;color:#fff4ca}
html[data-theme=dark] .redemption-status{color:#f3d695}
html[data-theme=dark] .reward-card{box-shadow:0 4px 0 #695126}
html[data-theme=dark] dialog::backdrop{background:#08060dbb}
/* Dark countdown surfaces preserve the configured progress highlight. */
html[data-theme=dark] .departure-timer{background:var(--night-card);border-top-color:var(--night-line);box-shadow:0 -8px 30px #0005}
html[data-theme=dark] .departure-timer .departure-track{background:var(--night-card)}
html[data-theme=dark] .departure-timer .departure-top>div,html[data-theme=dark] .departure-timer .departure-countdown{background:#15131ef2;color:#fff}
html[data-theme=dark] .departure-timer .departure-dismiss{background:var(--night-raised);color:var(--night-text);border-color:#756586;box-shadow:0 2px 6px #0004}
html[data-theme=dark] .departure-timer .departure-dismiss:hover{background:#443951}
html[data-theme=dark] .departure-announcement{color:#b83a20}
html[data-theme=dark] .bedtime-celebration .departure-announcement{color:#fff5d6}
html[data-theme=dark] .emoji-grid button{background:var(--night-raised)}
html[data-theme=dark] .emoji-grid button[aria-pressed=true]{background:#483365}
html[data-theme=dark] .calendar-day.is-today{background:#43345b;border-color:#a680f3}
html[data-theme=dark] .calendar-help{color:var(--night-muted)}
html[data-theme=dark] dialog.parents-page{background:var(--night-bg)}
html[data-theme=dark] .goal-markers span{color:#ffd25c}
html[data-theme=dark] .family-card .family-code{background:#1c1926;color:var(--night-text);border-color:#6a5684}
html[data-theme=dark] .profile-icon-grid button[aria-pressed=true]{background:color-mix(in srgb,var(--kid) 22%,#242130);border-color:var(--kid);color:#f3edff;box-shadow:inset 0 0 0 1px var(--kid)}
html[data-theme=dark] :is(.reward-editor>.reward-delete,.journal-delete,.kid-delete,.task-actions [data-remove-task]){background:#492b38;color:#ff9aa6}
html[data-theme=dark] :is(.reward-editor>.reward-delete,.journal-delete,.kid-delete,.task-actions [data-remove-task]):hover{background:#603444;color:#ffc3ca}
html[data-theme=dark] .mini-day{background:#1c1926;color:#bcb1ce;border:1px solid #62566f}
html[data-theme=dark] .mini-day.is-selected{background:#7950d4;color:#fff;border-color:#7950d4}
html[data-theme=dark] .option-choices label{background:#302b40;color:#f3edff}
html[data-theme=dark] .option-choices label:has(input:checked){background:#483365}
html[data-theme=dark] :is(#rewards svg,.progress-coins){color:#ffd25c}
html[data-theme=dark] .reward-card:not(:disabled):hover{background:#473a20;color:#fff1d1;border-color:#b68a34;box-shadow:0 4px 0 #8d6b26}
html[data-theme=dark] .mission-check[aria-checked=false] .check-initial{color:color-mix(in srgb,var(--kid) 80%,white);opacity:.65}
html[data-theme=dark] .routine-header-icon{color:#bfa0e0}html[data-theme=dark] .hero[data-routine=retour] .routine-header-icon{color:#8ac3a1}html[data-theme=dark] .hero[data-routine=soir] .routine-header-icon{color:#a8afe2}html[data-theme=dark] .bonus-sparkle{background:transparent;color:#eac16c}
html[data-theme=dark] :is(.routine-icon-picker summary,.routine-icon-options){background:#302b40;border-color:#62566f;color:#f3edff}html[data-theme=dark] .routine-icon-options button[aria-pressed=true]{background:#483365;color:#f3edff}
html[data-theme=dark] .routine-picker [data-admin=bonus]:not([aria-pressed=true]):hover{background:#6b5120;color:#ffe59a;border-color:#b68a34}
html[data-theme=dark] .switch-track{background:#62566f}html[data-theme=dark] .countdown-switch input:checked+.switch-track{background:#9265e8}

html[data-theme=dark] .task-editor .emoji-trigger{border-color:#5c506f}

html[data-theme=dark] .hero[style]{background:color-mix(in srgb,var(--routine-color) 24%,#1c1926);border-color:color-mix(in srgb,var(--routine-color) 40%,#1c1926)}
html[data-theme=dark] .hero[style] .routine-header-icon,html[data-theme=dark] .hero[style] .routine-heading h1,html[data-theme=dark] .hero[style] .routine-start-time{color:color-mix(in srgb,var(--routine-color) 65%,#fff)}

html[data-theme=dark] .shop-gift-icon{color:#ffd25c}

html[data-theme=dark] :is(.coin-pad-value,.coin-pad button,.routine-move-options button){background:var(--night-button,#302a40);color:var(--night-text)}html[data-theme=dark] .bonus-amount{background:#1c1926;border-color:#5c506f}

html[data-theme=dark] button.child-progress{--status-background:#191622;background:var(--status-background)}html[data-theme=dark] button.child-progress:hover{--status-background:#252032;background:var(--status-background)}html[data-theme=dark] .child-progress .child-rewards{background:transparent}html[data-theme=dark] .child-progress .bar{background:#ffffff26}

html[data-theme=dark] .parent-freezes button{background:#203e50;color:#8bdcff}html[data-theme=dark] .parent-freezes>span,html[data-theme=dark] .freeze-gift>strong{color:#8bdcff}

html[data-theme=dark] .treasure-chest{color:#ffd773}html[data-theme=dark] .chest-base,html[data-theme=dark] .chest-lid{fill:#61451a}

html[data-theme=dark] .parent-wallet{background:var(--night-raised);color:var(--night-text);border-color:var(--night-border)}
html[data-theme=dark] .streak-goal-row>.reward-delete{background:#492b38;color:#ff9aa6}
html[data-theme=dark] .routine-picker{background:#1c1926;border-color:var(--night-line)}
html[data-theme=dark] .routine-picker>button:not([aria-pressed=true]){background:transparent}
html[data-theme=dark] .routine-picker>button:not([aria-pressed=true]):hover{background:var(--night-raised)}
html[data-theme=dark] .routine-picker>[data-admin=bonus]{border:0}
html[data-theme=dark] .calendar-day.is-fire-day{background:#ffead5;color:#783e13}
html[data-theme=dark] .calendar-day.is-freeze-day{background:#dff2ff;color:#205975}
html[data-theme=dark] .routine-fold{background:var(--night-bg);border-color:var(--night-line)}
html[data-theme=dark] .routine-fold-toggle{background:var(--night-raised)}
html[data-theme=dark] .routine-fold-toggle[aria-expanded=true]{background:#483365;color:#f3eaff}
html[data-theme=dark] .routine-fold-bonus>.routine-fold-toggle{background:#53411a;color:#ffdc74}
html[data-theme=dark] .parent-wallet .parent-freezes>.parent-freeze-count{color:#7ed9ff}
html[data-theme=dark] .routine-fold-body>.routine-schedule{background:color-mix(in srgb,var(--routine-color) 10%,#1d1b25);border-color:var(--night-line)}
html[data-theme=dark] .routine-fold-bonus{background:#352e1d;border-color:#8e6c22}
html[data-theme=dark] .routine-fold-bonus>.routine-fold-toggle{background:transparent}
html[data-theme=dark] .routine-fold-bonus .bonus-admin{background:transparent;border:0;box-shadow:none}
html[data-theme=dark] .goal-reward-pair{background:#1c1926;border-color:var(--night-line)}
html[data-theme=dark] .goal-reward-arrow{color:var(--night-muted)}

html[data-theme=dark] .routine-fold:not(.routine-fold-bonus):not(.routine-fold-alarm)>.routine-fold-toggle[aria-expanded=true]{background:color-mix(in srgb,var(--routine-color) 35%,#252230);color:color-mix(in srgb,var(--routine-color) 20%,white)}

html[data-theme=dark] .reward-editor-grid>.reward-editor,html[data-theme=dark] .reward-editor.new-reward-editor{background:#302a1e;border-color:#65532a;box-shadow:0 3px 0 #493c22}

html[data-theme=dark] .streak-goals-intro p{color:var(--night-muted)}

html[data-theme=dark] :is(#leave-family,#edit-family-code,#change-code,#push-settings>button,[data-weather-controls]>button){background:#443454;border-color:#72578d;color:#f2e7ff;box-shadow:0 2px 0 #17111f}html[data-theme=dark] :is(#leave-family,#edit-family-code,#change-code,#push-settings>button,[data-weather-controls]>button):hover{background:#543e69}

html[data-theme=dark] .parents-content .emoji-trigger{background:transparent;border:0;box-shadow:none}

html[data-theme=dark] .day-progress-header{background:var(--night-bg);box-shadow:0 8px 14px #0002}
html[data-theme=dark] .day-progress-header .page-date{color:var(--night-muted)}

html[data-theme=dark] .countdown-celebration{background:#15131edc}html[data-theme=dark] .countdown-celebration .departure-announcement{background:var(--night-card);color:var(--night-text)}
html[data-theme=dark] .countdown-pulse{background:var(--night-raised)}


html[data-theme=dark] .countdown-divider{color:var(--night-muted)}
html[data-theme=dark] .countdown-divider-before::before,html[data-theme=dark] .countdown-divider-after::after{background:var(--night-line)}
html[data-theme=dark] .countdown-divider-icon{color:color-mix(in srgb,var(--countdown-highlight) 65%,white)}
html[data-theme=dark] .routine-fold-alarm{background:transparent;border-color:#51475d}
html[data-theme=dark] .routine-fold-alarm>.routine-fold-toggle{background:transparent;color:#c6bbd2}
html[data-theme=dark] .routine-fold-alarm>.routine-fold-toggle:hover,html[data-theme=dark] .routine-fold-alarm>.routine-fold-toggle[aria-expanded=true]{background:#292331;color:#ece4f6}
html[data-theme=dark] .routine-fold-alarm>.routine-fold-toggle>small{background:#342c3f;color:#c6bbd2}
html[data-theme=dark] .alarm-add-button{background:#342b46;border-color:#5c4a74;color:#e6d5fc}

html[data-theme=dark] .day-weather{color:var(--night-muted)}
html[data-theme=dark] .day-weather button{background:#302640;color:var(--night-text)}
html[data-theme=dark] .weather-current button{background:transparent}

/* Keep language hover and keyboard-focus states legible in both headers. */
html[data-theme=dark] .language-control .language-toggle:is(:hover,:focus-visible,[aria-expanded=true]){background:#443754;color:var(--night-text);border-color:#8d70b0}
html[data-theme=dark] .language-control .language-menu button:is(:hover,:focus-visible){background:#443754;color:var(--night-text)}
html[data-theme=dark] .language-control .language-menu button[aria-checked=true]:is(:hover,:focus-visible){background:#5a407b;color:#fff}

html[data-theme=dark] #app{--timeline-line:var(--night-line)}

html[data-theme=dark] .profile-icon-section-title{background:color-mix(in srgb,var(--kid,#6c46d9) 16%,#242130);color:var(--night-text)}

html[data-theme=dark] .routine-icon-trigger{background:#302b40;border-color:#62566f;color:#f3edff}
html[data-theme=dark] .routine-icon-dialog .routine-icon-options{background:transparent}
html[data-theme=dark] .product-landing{--lp-ink:#f2eaf9;--lp-muted:#bcaecb;--lp-paper:#242130;--lp-line:#463b54}
html[data-theme=dark] :is(.lp-feature-alarm,.lp-feature-rewards){background:#2b2533}
html[data-theme=dark] :is(.lp-parent-section,.lp-access){background:#2c2339}
html[data-theme=dark] .lp-nav .lp-nav-login{background:#30283d}
html[data-theme=dark] .lp-access .family-card{background:#242130}
html[data-theme=dark] .lp-access .family-card #code-help{color:var(--lp-muted)}

html[data-theme=dark] .deduction-buttons:not(.credit-buttons) button{background:#452b36;color:#ff9aa6}
html[data-theme=dark] .deduction-buttons:not(.credit-buttons) button:hover:not(:disabled){background:#593442}
