/* Text on light cabinet surfaces is black. Placeholders remain distinguishable.
   Keep accent/background tokens intact: they also draw status markers and icons. */
:root:not([data-theme=dark]),html[data-theme=light],html:not([data-theme=dark]) body[data-workspace]{
 --ui-text:#000;--ui-ink:#000;--ui-muted:#000;
 --text:#000;--text-muted:#000;--muted:#000;
 --admin-ink:#000;--admin-muted:#000;--apple-ink:#000;
 --ws-ink:#000;--ws-muted:#000;
 --messenger-text:#000;--messenger-muted:#000;--chat-muted:#000;
 --control-ink:#000;--control-disabled-ink:#000;
 --booking-ink:#000;--booking-muted:#000;
 --cabinet-text:#000;--cabinet-secondary:#000;
 --cabinet-placeholder:#6b7280;
}
html:not([data-theme=dark]) body[data-workspace]{color:var(--cabinet-text)!important}

/* Text inherits the surface's foreground, including white on dark controls.
   Do not reset SVG, image, pseudo-element or button colors globally. */
html:not([data-theme=dark]) body[data-workspace] :is(p,small,time,label,legend,dt,dd,h1,h2,h3,h4,h5,h6,th,td,pre,strong,b,em,summary){color:inherit!important}

/* Secondary information is content, not an empty-field hint. */
html:not([data-theme=dark]) body[data-workspace] :is(
 .muted,.hint,.small,.field-help,.optional,.record-id,.receipt-state,.booking-note,
 .offer-help,.offer-purpose-preview,.offer-expiry,.offer-conditions-intro,
 .compact-price-equation,.compact-price,.offer-preset-note,.guest-subtitle,
 .chat-preview-text,.chat-bookings,.chat-meta,.chat-empty,.chat-dictation-note,
 .request-card-time,.request-card-meta,.request-card-menu-hint,.request-detail-note,
 .admin-chat-id,.admin-chat-contact,.admin-name-comparison,.admin-name-mismatch,
 .directory-contacts,.directory-note,.todo-created,.todo-cell,.todo-stage,.todo-importance,
 .journey-hint,.guest-payment-note,.guest-contract-hint,.payment-document-date,
 .guest-legal-note,.guest-stay-note,.booking-created,.offer-gallery-count,
 .request-card-status,.status-badge,.guest-rating,.guest-rating-value,
 .progress-label,.progress-note,.guest-booking-progress,.guest-trip-summary,
 .note,.error,.success,.form-message,.request-overdue,.request-response-alert,
 .connection-notice,.request-queue-alert,.client-status,.pioneer-reminder,
 .guest-next,.calendar-booking,.calendar-legend,.today-note,.micro-confirmation,.payment-badge,.stay-badge,
 .rating-chip,.booking-preview-heading,.booking-preview-line,.badge,.payment-attention
){color:var(--cabinet-text)!important}

/* Existing admin rules deliberately use more specific selectors. */
html:not([data-theme=dark]) body#admin-workspace[data-workspace] :is(
 #chat-inbox .admin-chat-id,#chat-inbox .admin-chat-contact,
 #chat-inbox .chat-attention-reason,#admin-todos .todo-group h2,
 .todo-detail .todo-source,.todo-editor .todo-report header small,
 .admin-profile-menu :is(p,.note),.admin-context-dialog>button.danger
){color:var(--cabinet-text)!important}

/* Light controls and links keep the same readable foreground. Primary controls
   retain their existing white foreground and unchanged accent background. */
html:not([data-theme=dark]) body[data-workspace] :is(a:not(.button):not(.primary):not(.empty-catalog-button),button.danger,.button.danger,.account-footer-trigger,.guest-rating-trigger,.chat-profile-link){color:#000!important}
html:not([data-theme=dark]) body[data-workspace] :is(.workspace-views button,.workflow-tabs button):not(:hover){color:#000!important}
html:not([data-theme=dark]) body[data-workspace] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]){color:var(--cabinet-text)!important;caret-color:var(--cabinet-text)}
html:not([data-theme=dark]) body[data-workspace] :is(button,input,select,textarea):disabled{color:var(--cabinet-text)!important}
html:not([data-theme=dark]) body[data-workspace] :is(input,textarea)::placeholder{color:var(--cabinet-placeholder)!important;opacity:1}

/* A code field draws its digits in separate cells. Preserve the transparent
   real input so that entered digits are never painted twice. */
html:not([data-theme=dark]) body[data-workspace] :is(.admin-code-field input,.guest-code-field input){color:transparent!important;caret-color:transparent!important}

/* Captions and document labels over photographs/dark tiles stay light. */
html:not([data-theme=dark]) body[data-workspace] .hotel-attachment-image :is(strong,small,time,.hotel-attachment-caption,a){color:#fff!important}
html:not([data-theme=dark]) body[data-workspace] .hotel-attachment-type{color:#fff!important}

/* Compact mobile surfaces intentionally use light filled controls. Override
   their historical fixed blue/gray text without touching dark task actions. */
@media(max-width:760px){
html:not([data-theme=dark]) body[data-workspace].compact-mobile-admin:not(:has(.compact-offer-dialog[open])){
 --admin-ink:#000;--admin-muted:#000;--ui-on-accent:#000;--control-accent-ink:#000;
}
html:not([data-theme=dark]) body[data-workspace].compact-mobile-admin:not(:has(.compact-offer-dialog[open])) :is(button,.primary,button[aria-pressed=true],.active-booking-mini,.active-booking-mini small){color:#000!important}
}
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest][data-guest-main=compact]{--ui-on-accent:#000;--control-accent-ink:#000}
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest][data-guest-main=compact] main #account .guest-main-actions>:is(button,.guest-main-apartment),
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest][data-guest-main=compact] main button,
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest][data-guest-main=compact] dialog :is(button,button.edge,button.selected,.request-selected,header){color:#000!important}
html:not([data-theme=dark]) body[data-workspace] :is(.connection-indicator,#guest-presence,.feedback-stat,.guest-booking-progress b){color:#000!important}
html:not([data-theme=dark]) body[data-workspace] .guest-rating-trigger[data-rating-tier]{color:#000!important}
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest][data-guest-main=compact] #guest-presence,
html:not([data-theme=dark]) body[data-workspace] .payment-badge[data-payment],
html:not([data-theme=dark]) body[data-workspace] #feedback [data-tone]{color:#000!important}
@media(max-width:760px){html:not([data-theme=dark]) body[data-workspace].compact-mobile-admin:not(:has(.compact-offer-dialog[open])) .workspace-views>button[aria-pressed=true]{color:#000!important}}

/* Light guest request dialogs and booking disclosures have older fixed colors. */
html:not([data-theme=dark]) body[data-workspace] #guest-main-apartment-dialog :is(button,label,legend,h3,strong,.request-selected){color:#000!important}
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] :is(summary,.progress-dot,.status-badge,button.secondary,.chat-new-request,[data-guest-feedback] button,.workflow-tabs button[aria-selected],.workflow-tabs button:not(:disabled)){color:#000!important}
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] #guest-chat .chat-message-head{color:#000!important}
html:not([data-theme=dark]) body#admin-workspace[data-workspace] .record-filter-popover{color:#000!important}
html:not([data-theme=dark]) body[data-workspace][data-cabinet=guest] #guest-main-apartment-dialog :is(button,label,legend,h3,strong,.request-selected){color:#000!important}
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] .booking-progress :is(.is-current,.is-done) .progress-dot,
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] .workflow-tabs button[aria-selected=true]:not(:disabled),
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] .guest-legal-head{color:#000!important}
html:not([data-theme=dark]) body[data-workspace].compact-mobile-admin:not(:has(.compact-offer-dialog[open])) .active-booking-mini{color:#000!important}
html:not([data-theme=dark]) body[data-workspace] .chat-profile-link{background:transparent!important}
/* Keep each stage word intact when five steps share a narrow phone screen. */
html:not([data-theme=dark]) body[data-workspace][data-booking-design=calm] #guest-workspace[data-calm=true] .booking-progress .progress-label{overflow-wrap:normal;word-break:normal;hyphens:none}
html:not([data-theme=dark]) body#admin-workspace[data-workspace] :is(input,textarea)::placeholder{color:var(--cabinet-placeholder)!important;opacity:1}
html:not([data-theme=dark]) body[data-workspace] #admin-chat .chat-profile-link{background:transparent!important}
