.theme-toggle{display:inline-grid;place-items:center;flex-shrink:0;width:32px;height:32px;padding:6px;border:1px solid var(--line);border-radius:50%;background:transparent;color:inherit}
[data-theme-toggle][hidden]{display:none!important}
html[data-theme="dark"] .admin-preview-bar{background:#262626;color:#f5f5f5;border-color:#3d3d3d}
html[data-theme="dark"]{color-scheme:dark;--ink:#f5f5f5;--muted:#bdbdbd;--paper:#000000;--line:#3d3d3d;--accent:#ffffff;--green:#ffffff;--night-surface:#141414;--night-raised:#262626;background:var(--paper)}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
/* Only app chrome and content surfaces; raster/canvas/iframe design previews keep their colors. */
html[data-theme="dark"] :is(.panel,.category-section,.bottom-nav,.product,.rank-card,.empty,.stat,.directory-list,.directory-subcategories>.text-btn,.chat-list button,.chat-manage-menu>summary,.chat-manage-options,.chat-manage-options>button,.diary-welcome,.diary-home-community,.diary-find-link,.diary-quick button,.finder-options>button,.finder-options>article,.journey-panel,.friend-selection-note,.benefit-category,.benefit-design,.thankyou-tile,.notice,.chip,.bubble,.session-loading,dialog){background:var(--night-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(input:not([type="color"]),select,textarea,.btn.secondary,.btn.outline,.location,.badge,.rank-reason,.chat-compose input){background:var(--night-raised)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.btn,.bubble.mine,.feature){background:#333333;color:#f5f5f5}
html[data-theme="dark"] .btn.light{background:#ffffff;color:#111111}
html[data-theme="dark"] :is(.nav-item.active,.chip:has(input:checked),[data-chat-status-filter][aria-pressed="true"]){background:#333333!important;color:#f0f0f0!important}
html[data-theme="dark"] :is(.nav-item,.muted,.eyebrow,.small,.footer-note,.back,.demo-line,.hero p,.hero-side,.page-title p,.field small,.checkline,.empty p,.request p,.quote dt,.summary-strip,.how p,.how b,.feature p,.diary-welcome p,.diary-welcome small,.diary-quick small,.diary-home-community p,.finder-options p,.finder-options>button>span:last-child,.benefit-category small,.benefit-design small,.chat-list .chat-open small,.chat-manage-options>p,.chat-manage-options>small){color:var(--muted)!important}
html[data-theme="dark"] :is(.directory-row,.topbar,.how article){border-color:var(--line)}
html[data-theme="dark"] :is(.cat-icon,.directory-cat-icon){background:#333333;color:#f0f0f0}
html[data-theme="dark"] ::placeholder{color:#bdbdbd;opacity:1}
html[data-theme="dark"] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #ffffff;outline-offset:3px}
html[data-theme="dark"] dialog::backdrop{background:#000a}
html[data-theme="dark"] .guest-diary{--guest-ink:#f5f5f5;--guest-sage:#262626;--guest-line:#3d3d3d}
html[data-theme="dark"] :is(.community-related>button,.community-related>a,.community-filters button,.community-card-open,.community-topic,.community-empty,.couple-tabs,.couple-avatar,.couple-dates>div,.couple-progress,.couple-stage,.log-diary-shortcut,.wedding-log-card,.guest-category,.guest-category-icon,.guest-other-categories,.guest-other-categories button,.guest-stage-picker,.guest-stage-options button,.guest-record-count,.guest-diary-row,.guest-diary-save,.guest-diary-summary){background:var(--night-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.guest-diary-intro p,.guest-diary-intro .eyebrow,.guest-diary small,.guest-diary p,.couple-tabs button,.community-card-open p,.community-card-open small){color:var(--muted)!important}
html[data-theme="dark"] :is(.couple-tabs button.active,.community-filters button[aria-pressed=true],.guest-stage-options button[aria-pressed=true]){background:#333333!important;color:#f0f0f0!important}
html[data-theme="dark"] :is(.guest-record-card,.guest-record-actions button,.guest-add-record,.guest-diary-retry,.guest-amount-input,.notification-list,.notification-list .notification-row,.prep-check-progress){background:var(--night-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] .notification-list .notification-row.is-unread{background:#333333!important}
html[data-theme="dark"] :is(.diary-tile,.diary-note,.chat-list .chat-row,.inv-filters button,.request-consent,.disclosure-details,.chat-quotes-entry,.quote-total,.consult-intro,.consult-intro-note,.after-task,.after-gift,.gift-sheet-head,.gift-search-result,.thankyou-sides button,.guest-save-first,.preparation-choice){background:var(--night-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(.home-tiles-heading p,.community-related span,.community-empty p,.community-post-actions .text-btn,.community-comment small,.chat-remove,.consult-intro-kicker,.consult-intro-venue,.consult-intro-steps p,.consult-intro-login,.after-task small,.after-gift small,.gift-row-foot,.gift-read-row small,.gift-reciprocity,.thankyou-tile small,.thankyou-tile span){color:var(--muted)!important}
/* HTML design samples keep the same inherited palette as the light app. */
html[data-theme="dark"] :is(.inv-tile,.invitation-entry-art,.invitation-photo-art,.figurine-type-art,.thankyou-design){--ink:#202322;--muted:#79807c;--paper:#f6f7f4;--line:#e4e7e0;--accent:#dbe9b5;--green:#43553a;color:#202322;color-scheme:light}
html[data-theme="dark"] .topbar .brand{color:#f5f5f5}
html[data-theme="dark"] .log-diary-shortcut small,html[data-theme="dark"] .directory-category,html[data-theme="dark"] .directory-location,html[data-theme="dark"] .directory-favorite span,html[data-theme="dark"] .vendor-saved-toggle span,html[data-theme="dark"] .app-shell[data-screen="invitations"] p{color:#b0b0b0}
html[data-theme="dark"] .vendor-save-star:not(.is-saved){color:#b0b0b0}

html[data-theme="dark"] .topbar .top-actions [data-action="login"]{background:#ffffff;color:#111111}
html[data-theme="dark"] .app-install-card{background:#141414;border-color:#3d3d3d}
html[data-theme="dark"] .app-install-card :is(h2,p,.eyebrow){color:#f5f5f5}
html[data-theme="dark"] .account-avatar{background:#333333;color:#f5f5f5}
html[data-theme="dark"] :is(.inline-error,[role="alert"]){color:#ff9a85}
html[data-theme="dark"] .vendor-saved-entry-actions b{color:#f5f5f5}
html[data-theme="dark"] .invitation-account>p{color:#b0b0b0}
html[data-theme="dark"] .app-shell small{color:#b0b0b0}
html[data-theme="dark"] .app-download-strip{background:#141414;color:#f5f5f5;border-bottom-color:#3d3d3d}
html[data-theme="dark"] .app-download-strip :is(strong,button){color:#f5f5f5}
