/* 8.0.13 semantic palette layer. Values come only from BRAND_THEMES.
   Keep component layout, behavior, per-pet calendar colors and brand artwork intact. */
html[data-theme] { color-scheme:light; --card:var(--paper); }
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme] body,
html[data-theme] body :is(.app-shell,.workspace-scroll,#workspaceScroll) { background:var(--cream)!important; color:var(--charcoal); }
html[data-theme] body .topbar { background:var(--cream)!important; color:var(--charcoal); border-color:var(--line)!important; }
html[data-theme] body :is(.card,.section-card,.client-card,.message-card,.quick-button,.task,.meta-box,.service-row,.contact-btn,.icon-btn,.calendar-card,details,.setting-row,.regular-card,.regular-add-card,.request-import-home,.messages-hero,.message-booking-card,.messages-tools,.more-group,.more-plan-card,.home-menu-card,.home-week-dogs,.home-week-dog,.home-promise,.home-start-action,.home-open-grid,.real-setup-card,.setup-step,.today-section-card,.today-empty-card,.booking-detail-card,.finish-check,.message-hero,.media-update-panel,.quick-client-intro,.contact-import-card,.contact-support-note,.pet-photo-panel,.reference-panel,.client-basics-card,.client-form-section,.client-profile-modal .timeline-item,.manager-row,.template-card,.onboarding-path,.repeat-series-card,.repeat-series-summary,.schedule-mode-option,.trip-schedule-card,.trip-slot-row,.trip-preview-list li,.scout-panel,.scout-prompt,.hunter-ask,.hunter-reply,.request-paste-panel,.request-review-section,.request-new-client,.request-reply-panel,.quick-add-choice,.request-options,.request-private-rate,.storage-total,.storage-breakdown,.storage-tools,.day-focus-card,.calendar-mini-stat,.availability-share-card,.availability-modal-preview,.calendar-week-head,.calendar-week-day,.calendar-selected-booking,.visit-profile-card,.visit-profile-schedule>div,.visit-duty-card,.visit-note-card,.visit-agenda,.dog-directory-card) {
  background:var(--paper)!important; color:var(--charcoal)!important; border-color:var(--line)!important; box-shadow:none;
}
html[data-theme] body :is(.modal,.modal-head,.photo-editor,.photo-editor-topbar,.client-save-bar,.request-action-stack) { background:var(--cream)!important; color:var(--charcoal)!important; border-color:var(--line)!important; }
html[data-theme] body :is(.field input,.field select,.field textarea,.service-row select,.appearance-grid select,.voice-controls select,.setting-row select,.client-search,.message-preview,.hunter-ask-input,.request-textarea,.request-service,.simple-booking input,.simple-booking select) {
  background:var(--surface-raised)!important; color:var(--charcoal)!important; -webkit-text-fill-color:var(--charcoal)!important; border-color:var(--line)!important; color-scheme:inherit; box-shadow:none;
}
html[data-theme] body :is(input,textarea)::placeholder { color:var(--muted)!important; -webkit-text-fill-color:var(--muted)!important; opacity:1; }
html[data-theme] body :is(h1,h2,h3,h4,h5,.booking-name,.dog-directory-name,.home-welcome-copy p,.home-open-copy strong,.home-start-copy strong,.message-booking-copy strong,.calendar-selected-copy strong,.calendar-week-main strong,.calendar-week-open strong,.media-preview-info,.media-update-head strong,.storage-total>strong,.storage-breakdown strong,.storage-tools summary,.request-options>summary,.request-reply-details>summary,.regular-card-body strong,.regular-add-card strong,.more-group-copy strong,.visit-profile-client,.visit-profile-schedule strong) { color:var(--charcoal)!important; }
html[data-theme] body :is(.small,.hint,.metric-label,.metric-foot,.screen-subtitle,.field label,.field .label,.detail-item span,.meta-box span,.setting-row span,.more-group-copy span,.visit-profile-heading span,.visit-profile-schedule span,.visit-profile-photo-hint,.sprint-note,.visit-delete-note,.home-start-copy span,.home-open-copy span,.home-hunter-shortcut small,.visit-agenda-copy>span,.visit-agenda-copy small,.regular-owner,.regular-count,.dog-directory-owner,.dog-directory-last,.dog-directory-stats,.messages-hero p,.message-booking-card .small,.messages-tools span,.media-update-head span,.media-note,.request-paste-panel p,.request-reply-panel p,.request-review-title p,.request-options>summary span,.request-reply-details>summary span,.quick-add-choice span,.scout-panel p,.hunter-ask-help,.storage-total>span,.storage-total>p,.storage-breakdown span,.real-setup-card>p,.setup-step span,.onboarding-path span,.onboarding-safety,.repeat-series-heading p,.schedule-mode-option span span,.trip-preview-list li span,.trip-positioning-note,.calendar-page-intro,.calendar-selected-copy span,.calendar-selected-copy small,.calendar-week-date-copy span,.calendar-week-main span,.calendar-week-fact,.calendar-week-open p,.weekday) { color:var(--muted)!important; opacity:1; }
html[data-theme] body :is(.secondary-btn,.mini-btn,.message-type-btn,.message-tab,.calendar-today-btn,.personal-time-btn,.photo-editor-cancel,.photo-editor-toolbar button,.photo-zoom-stepper button,.photo-zoom-status,.photo-editor-secondary-actions button,.photo-editor-secondary-actions label,.field-action-btn,.photo-source-label.library,.client-form-shortcuts button,.calendar-week-actions a,.calendar-week-actions button,.calendar-week-open,.calendar-week-booking,.simple-clients button,.simple-client-choice,.booking-new-client-btn,.booking-length-field .length-chip,.hunter-reply-action.secondary,.hunter-read-reply,.home-feature-strip-actions button,.home-photo-tools button,.home-open-link,.hero-actions .secondary) {
  background:var(--surface-raised)!important; color:var(--charcoal)!important; -webkit-text-fill-color:var(--charcoal); border-color:var(--line)!important; box-shadow:none;
}
html[data-theme] body :is(.primary-btn,.calendar-quickbar .primary-btn,.hunter-ask-submit,.hunter-reply-action:not(.secondary),.request-import-home button,.photo-editor-apply,.request-step,.request-paste-step,.visit-map-action:not(.missing),.more-quick-actions button:first-child,.messages-tools button,.message-booking-card .message-type-btn:first-child,.calendar-month-nav,.day-focus-primary,.calendar-week-actions .calendar-open-visit,.visit-duty-empty .secondary-btn,.client-contact-import,.home-brief-btn) {
  background:var(--button-fill)!important; color:var(--button-ink)!important; -webkit-text-fill-color:var(--button-ink)!important; border-color:var(--button-fill)!important; box-shadow:none;
}
html[data-theme] body :is(.primary-btn,.home-brief-btn,.client-contact-import,.hunter-ask-submit,.day-focus-primary,.calendar-month-nav) :is(strong,span,small) { color:inherit!important; opacity:1; }
html[data-theme] body :is(.home-overview,.hero-card,.workflow-hero,.calendar-hero,.client-hero-card,.booking-hero-detail,.today-hero,.more-page-intro,.home-feature-strip,.home-welcome,.home-hunter-shortcut,.visit-agenda-row,.more-group>summary,.total-box,.booking-date-guidance,.client-profile-status,.review-demo-banner,.focus-pill,.service-summary-item,.task-section-count,.version-badge,.build-proof,.client-form-section-heading>strong) {
  background:var(--sage-soft)!important; color:var(--charcoal)!important; border-color:var(--line)!important; box-shadow:none;
}
html[data-theme] body :is(.home-overview,.hero-card,.booking-hero-detail,.today-hero,.home-feature-strip) :is(p,span,strong,h2,h3) { color:var(--charcoal)!important; opacity:1; }
html[data-theme] body :is(.home-logo-script,.home-name-script,.hunter-tribute,.brand-tag,.visit-profile-kicker,.today-next-visit-copy span,.home-view-detail,.section-title button,.total-box span,.total-box strong,.photo-zoom-status strong,.request-private-rate strong) { color:var(--sage-dark)!important; }
html[data-theme] body :is(.home-welcome-wave,.home-photo-fade) { background:var(--cream)!important; }
html[data-theme] body :is(.home-start-icon,.home-open-icon,.home-start-arrow,.more-group-icon,.regular-card-photo,.dog-directory-photo,.avatar,.regular-book-pill,.dog-rate-chip,.availability-chip,.today-next-visit,.client-form-shortcuts,.message-tab.active) { background:var(--sage-soft)!important; color:var(--sage-dark)!important; border-color:var(--line)!important; }
html[data-theme] body :is(.home-start-action.booking .home-start-icon,.regular-add-card .plus,.media-update-icon,.messages-import,.more-quick-actions button:last-child) { background:var(--coral-soft)!important; color:var(--coral)!important; border-color:var(--coral)!important; }
html[data-theme] body .home-start-action::before { background:var(--sage)!important; }
html[data-theme] body .home-start-action.booking::before { background:var(--coral)!important; }
html[data-theme] body .home-start-action.import::before { background:var(--sage-dark)!important; }
/* The navigation has a palette-specific surface and an explicit selected treatment. */
html[data-theme] body .bottom-nav { background:var(--nav-surface)!important; border-color:var(--line)!important; box-shadow:none; }
html[data-theme] body :is(.nav-btn,.nav-add-label) { color:var(--charcoal)!important; opacity:1; }
html[data-theme] body .nav-btn.active { background:var(--sage-soft)!important; color:var(--sage-dark)!important; box-shadow:inset 0 -3px var(--sage); }
html[data-theme] body .nav-add { background:var(--secondary-fill)!important; color:var(--secondary-ink)!important; border-color:var(--coral)!important; box-shadow:none; }
/* Month/week cells retain per-dog colors as semantic data, not brand accents. */
html[data-theme] body :is(.calendar-view-switch,.calendar-legend) { background:var(--cream)!important; color:var(--muted)!important; border-color:var(--line)!important; }
html[data-theme] body :is(.calendar-dog-key,.calendar-block-key,.day) { background:var(--paper)!important; color:var(--charcoal)!important; border-color:var(--line)!important; }
html[data-theme] body .day .day-number { color:var(--charcoal)!important; }
html[data-theme] body .day.outside { background:var(--cream)!important; opacity:1; }
html[data-theme] body .day.outside .day-number { color:var(--muted)!important; }
html[data-theme] body .day.has-pet-care { background:color-mix(in srgb,var(--dog-color) 10%,var(--paper))!important; }
html[data-theme] body :is(.day.selected,.day.has-pet-care.selected) { background:var(--sage-soft)!important; outline-color:var(--sage)!important; }
html[data-theme] body .day-today-label { color:var(--coral)!important; }
html[data-theme] body .calendar-view-switch button { color:var(--muted)!important; }
html[data-theme] body :is(.calendar-view-switch button[aria-pressed="true"],.booking-length-field .length-chip.active,.message-tab.active,.schedule-mode-option:has(input:checked)) { background:var(--button-fill)!important; color:var(--button-ink)!important; border-color:var(--sage)!important; }
html[data-theme] body .schedule-mode-option:has(input:checked) span { color:var(--button-ink)!important; }
html[data-theme] body :is(.badge,.badge.due,.badge.pending,.calendar-selected-status,.calendar-selected-status.pending,.notice,.notice.success,.request-inline-status,.request-match-note,.request-missing-item,.request-conflict.clear,.request-conflict.blocked) { background:var(--sage-soft)!important; color:var(--sage-dark)!important; border-color:var(--sage)!important; }
html[data-theme] body :is(.notice.error,.danger-btn,.photo-editor-secondary-actions .remove) { background:var(--danger-soft)!important; color:var(--danger)!important; border-color:var(--danger)!important; }
html[data-theme] body :is(.task input,.finish-check input,.service-row input[type="checkbox"],.schedule-mode-option input,.trip-slot-row input[type="checkbox"]) { accent-color:var(--sage); }
html[data-theme] body :is(button,a,input,select,textarea,summary):focus-visible { outline-color:var(--sage)!important; }
/* Preview tiles show each candidate background, even before it is selected. */
html[data-theme] body #businessProfileSection { --custom-ink:var(--charcoal); --custom-muted:var(--muted); --custom-surface:var(--paper); --custom-field:var(--surface-raised); --custom-line:var(--line); }
html[data-theme] body .brand-theme-card { --card-ink:var(--choice-ink); --card-muted:var(--choice-muted); background:var(--card-background)!important; color:var(--card-ink)!important; }
html[data-theme="dark"] body .brand-theme-card { --card-ink:var(--choice-dark-ink); --card-muted:var(--choice-dark-muted); }
html[data-theme] body #businessProfileSection .brand-theme-card-copy strong { color:var(--card-ink)!important; font-size:calc(15px * var(--native-text-scale,1)); }
html[data-theme] body .brand-theme-card-copy small { color:var(--card-muted)!important; font-size:calc(12px * var(--native-text-scale,1)); }
html[data-theme] body .brand-theme-swatches { width:64px; height:48px; border-radius:12px; padding:8px; gap:3px; border-color:var(--card-muted); }
html[data-theme] body .brand-theme-swatches i { width:18px; height:24px; border:0; border-radius:5px; box-shadow:none; flex-shrink:0; }
html[data-theme] body .brand-theme-swatches i:nth-child(2) { margin:0; }
html[data-theme] body .brand-theme-swatches i:nth-child(3) { display:none; }
html[data-theme] body .brand-theme-card:has(input:checked) { border-color:var(--card-primary); box-shadow:0 0 0 2px var(--card-primary); }
html[data-theme] body .brand-theme-card-check { border-color:var(--card-muted); }
html[data-theme] body #businessProfileSection [data-save-business-profile] { background:var(--button-fill)!important; color:var(--button-ink)!important; border-color:var(--button-fill)!important; }
html[data-theme] body .business-preview { background:var(--sage-soft); }
/* Subscription and account screens share the same accessible surfaces. */
html[data-theme] body #screen .subscription-gate { color:var(--charcoal); }
html[data-theme] body #screen .subscription-gate :is(p,.subscription-account) { color:var(--muted)!important; }
html[data-theme] body #screen .subscription-gate :is(.subscription-status,.subscription-backups summary) { color:var(--charcoal)!important; }
html[data-theme] body #screen .subscription-choice { background:var(--sage-soft)!important; color:var(--charcoal)!important; border-color:var(--sage)!important; }
html[data-theme] body #screen .subscription-choice span { color:var(--muted); }
html[data-theme] body #screen :is(.subscription-links button,.subscription-manage,.subscription-backups a) { color:var(--sage-dark); }
/* Leave the calendar/checkmark brand asset itself completely untouched. */
html[data-theme] body .brand-mark { background:transparent!important; box-shadow:none; }
html[data-theme] body .home-notification-count { background:var(--secondary-fill)!important; color:var(--secondary-ink)!important; }
html[data-theme] body .booking-pet-photo { background:var(--sage-soft)!important; color:var(--sage-dark)!important; border-color:var(--line)!important; }
html[data-theme] body .messages-tools strong { color:var(--charcoal)!important; }
html[data-theme] body .message-booking-card::before { background:var(--sage)!important; }
html[data-theme] body .message-booking-card:nth-child(3n+2)::before { background:var(--coral)!important; }
html[data-theme] body .message-booking-card:nth-child(3n)::before { background:var(--sage-dark)!important; }
html[data-theme] body .real-setup-hero { background:var(--sage-soft)!important; color:var(--charcoal)!important; }
html[data-theme] body .real-setup-hero p { color:var(--muted)!important; }
html[data-theme] body .real-setup-logo { background:var(--paper)!important; color:var(--sage-dark)!important; border-color:var(--line)!important; }
html[data-theme] body .close-btn { background:var(--button-fill)!important; color:var(--button-ink)!important; border-color:var(--sage)!important; box-shadow:none; }
html[data-theme] body .modal-handle { background:var(--muted)!important; }
html[data-theme] body .calendar-legend-title { color:var(--charcoal)!important; }
html[data-theme] body .more-quick-actions button { background:var(--surface-raised)!important; color:var(--charcoal)!important; border-color:var(--line)!important; }
html[data-theme] body .toast { background:var(--button-fill)!important; color:var(--button-ink)!important; }
/* More uses the same token surfaces for simple sync status and support details. */
.workspace-sync-card { display:grid; gap:12px; margin-block:16px; padding:18px; }
.workspace-sync-card h2 { margin:0; font-size:calc(17px * var(--native-text-scale,1)); }
.workspace-sync-copy { display:grid; gap:6px; min-width:0; }
.workspace-sync-copy strong { font-size:calc(20px * var(--native-text-scale,1)); color:var(--charcoal); }
.workspace-sync-copy p { margin:0; color:var(--muted); line-height:1.45; overflow-wrap:anywhere; }
.workspace-sync-card .button-row { display:flex; flex-wrap:wrap; gap:10px; }
.workspace-sync-card .button-row button { flex:1 1 140px; min-height:48px; }
.workspace-sync-card [hidden] { display:none!important; }
.support-sync-details { display:grid; gap:12px; }
.support-sync-details>div { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.support-sync-details dt { color:var(--muted); }
.support-sync-details dd { margin:4px 0 0; color:var(--charcoal); overflow-wrap:anywhere; }
[data-support-diagnostics-trigger] { cursor:pointer; }
/* Keep advanced reset secondary and unmistakably destructive in every palette. */
html[data-theme] body .more-group.more-group-danger > summary {
  background:var(--paper)!important; border-left:0!important; min-height:64px; padding:12px 16px; grid-template-columns:32px minmax(0,1fr) auto; box-shadow:none;
}
html[data-theme] body .more-group.more-group-danger > summary .more-group-copy strong {
  color:var(--danger)!important; font-size:calc(15px * var(--native-text-scale,1)); font-weight:600;
}
html[data-theme] body .more-group.more-group-danger > summary :is(.more-group-icon,.more-group-chevron) {
  background:transparent!important; color:var(--danger)!important;
}
html[data-theme] body .more-group.more-group-danger > summary .more-group-icon { width:32px; height:32px; font-size:20px; }

/* Business web icons use SVG; no native symbol injection is required. */
.web-icon { display:inline-block; width:24px; height:24px; flex-shrink:0; vertical-align:middle; }
.nav-add .web-icon { width:32px; height:32px; }
html[data-theme] body .more-quick-actions button[data-send-feedback]:first-child { background:var(--surface-raised)!important; color:var(--charcoal)!important; -webkit-text-fill-color:var(--charcoal)!important; border-color:var(--line)!important; }

/* Classic dark buttons: visible actions against charcoal; other palettes unchanged. */
html[data-theme="dark"][data-brand-theme="minimal"] body :is(.primary-btn,.hunter-ask-submit,.home-brief-btn,.day-focus-primary,.client-contact-import) {
 background:#80caff!important; color:#10283b!important; -webkit-text-fill-color:#10283b!important;
 border:2px solid #c7e8ff!important; box-shadow:0 3px 0 #34566c!important;
}
html[data-theme="dark"][data-brand-theme="minimal"] body :is(.secondary-btn,.mini-btn,.calendar-today-btn,.hunter-reply-action.secondary,.hunter-read-reply) {
 background:#233d50!important; color:#e7f5ff!important; -webkit-text-fill-color:#e7f5ff!important;
 border:2px solid #80caff!important; box-shadow:none!important;
}
html[data-theme="dark"][data-brand-theme="minimal"] body .home-hunter-shortcut {
 background:#233d50!important; border:2px solid #80caff!important; box-shadow:inset 4px 0 #80caff!important;
}
html[data-theme="dark"][data-brand-theme="minimal"] body :is(.primary-btn,.secondary-btn,.mini-btn,.home-hunter-shortcut,.hunter-ask-submit,.home-brief-btn):focus-visible {
 outline:3px solid #ffffff!important; outline-offset:4px;
}
html[data-theme="dark"][data-brand-theme="minimal"] body :is(.primary-btn,.secondary-btn,.mini-btn,.hunter-ask-submit):disabled {
 background:#353a40!important; color:#b4bdc6!important; -webkit-text-fill-color:#b4bdc6!important; border-color:#65717b!important; box-shadow:none!important;
}
