/* Phone surfaces share the phone palette, even when a desktop theme is active. */
@media (max-width:760px), (max-width:1100px) and (max-height:600px) {
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] {
  --pf-panel:var(--hm-card,#fff);--pf-field:var(--hd-soft);--pf-error:#a5264c;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance=dark] {--pf-error:#ffacc6}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance=bubbles] {--hd-secondary:#484d5c!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(input[type=date],input[type=time],select) {color-scheme:light!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance=dark] :is(input[type=date],input[type=time],select) {color-scheme:dark!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hz-onboarding-banner:not(:has(button)) {display:block;font-size:13px;line-height:1.5}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hc-customer-preview {display:none!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hc-contact-row,.hc-notes-card,.hc-records,.hc-record-row,.hc-record-tabs,.hn-note-tab) {background:var(--pf-panel)!important;color:var(--hd-fg)!important;border-color:var(--hd-line)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hd-customer-profile :is(dd,pre,.hn-note-tab) {color:var(--hd-fg)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hd-customer-profile .hc-card-empty {color:var(--hd-secondary)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hn-note-tab[aria-selected=true] {background:var(--hm-tint)!important;color:var(--hd-action)!important;border-color:var(--hd-action)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hd-page :is(h1,h2,h3,h4,legend,.hd-label) {color:var(--hd-fg)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hd-page label {color:var(--hd-fg)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hm-more :is(h2,h3,label,legend) {color:var(--hd-fg)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :where(.hd-page) :is(p,small,.hd-demo-note):not([role=alert]):not(.is-error):not(.hn-note-status) {color:var(--hd-secondary)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hs-price-boundary,.hs-save-bar,.hmp-map .hmp-style-control) {background:var(--pf-field)!important;color:var(--hd-fg)!important;border-color:var(--hd-line)!important}

 /* Old invoice styling used fixed dark backgrounds with inherited dark labels. */
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hi-invoice-row,.hi-calendar,.hi-catalogue-panel,.hwk-note,.hwk-link,.hwk-discard,.hwk-dialog,.hs-card,.hd-report-card,.hd-settings-card,.hd-customer-profile,.hd-customer-item,.hm-call-dialog) {
  background:var(--pf-panel)!important;background-image:none!important;color:var(--hd-fg)!important;border-color:var(--hd-line)!important;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(#hd-page-invoices,.hq-quotes-page) {
  background:var(--hm-canvas)!important;color:var(--hd-fg)!important;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hq-quotes-page {
  --q-surface:var(--pf-panel);--q-field:var(--pf-field);padding:16px;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hi-calendar,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card,.hd-settings-card,.hd-report-card,.hd-customer-profile) :is(h2,h3,h4,label,legend,summary,dt) {
  color:var(--hd-fg)!important;opacity:1;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card,.hd-customer-profile) :is(p,small,.hd-demo-note,.hwk-catalogue-hint,.hi-stock-info,.hi-picker-count,.hi-catalogue-count,.hi-stock-import-note) {
  color:var(--hd-secondary);opacity:1;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hi-catalogue,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card,.hd-customer-profile) :is(.hd-field,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {
  box-sizing:border-box;min-width:0;max-width:100%;min-height:48px;padding:11px 12px;font:400 16px/1.45 'Segoe UI',system-ui,sans-serif;
  background:var(--pf-field)!important;color:var(--hd-fg)!important;-webkit-text-fill-color:var(--hd-fg);border:1px solid var(--hd-line)!important;border-radius:10px;box-shadow:none!important;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card,.hd-customer-profile) :is(input,textarea)::placeholder {
  color:var(--hd-secondary);-webkit-text-fill-color:var(--hd-secondary);opacity:1;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card,.hd-customer-profile) :is(input,select,textarea,button,a):focus-visible {
  outline:2px solid var(--hd-action)!important;outline-offset:3px;
 }
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] input::-webkit-date-and-time-value {text-align:left;color:inherit}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] select option {background:var(--pf-panel);color:var(--hd-fg)}

 /* Consistent invoice hierarchy and labels, without squeezing quantity/price rows. */
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-workspace {gap:20px;grid-template-columns:minmax(0,1fr)}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-editor {padding:18px 16px;border-radius:16px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-invoice-row {padding:16px;border-radius:14px;font-size:16px;line-height:1.45}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-invoice-row small {font-size:13px;line-height:1.5;color:var(--hd-secondary)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-invoice-row[aria-pressed=true] {border-color:var(--hd-action)!important;box-shadow:inset 3px 0 var(--hd-action)}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-editor-heading {flex-wrap:wrap;align-items:start;gap:12px;margin-bottom:20px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-editor-heading h3 {font-size:20px;line-height:1.35;margin:0 0 6px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-editor-heading p {font-size:13px;line-height:1.5}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card) label:not(.hwk-check):not(.hi-confirm):not(.hz-check) {font-size:14px;line-height:1.45;font-weight:600}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-editor .hd-label {display:grid;gap:7px;margin:0}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-charge-grid {grid-template-columns:minmax(0,1fr);gap:18px;margin:20px 0}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-payment-terms,.hi-product-categories fieldset) {min-width:0;padding:16px 12px;border-color:var(--hd-line);background:var(--pf-field);border-radius:12px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-payment-terms legend {font-size:14px;line-height:1.5;font-weight:650;max-width:100%;white-space:normal}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-breakdown,.hd-invoice-totals,.hm-quote-total) {color:var(--hd-fg)!important;font-size:16px;line-height:1.55}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hd-invoice-totals,.hm-quote-total) {background:var(--pf-field)!important;border-color:var(--hd-line)!important;border-radius:10px;padding:14px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-parts,.hi-parts>.hi-part-row) {--hi-part-background:var(--pf-field);--hi-part-alternate:var(--pf-field)}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-part-suggestions,.hc-search-list,.hwk-item-suggestions) {background:var(--pf-panel)!important;color:var(--hd-fg)!important;border-color:var(--hd-line)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-part-suggestion,.hc-search-option,.hwk-item-suggestions button,.hi-picker-item) {color:var(--hd-fg)!important;min-height:48px;font-size:15px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-picker-item strong,.hi-part-suggestions strong,.hwk-item-suggestions strong,.hi-outstanding) {color:var(--hd-fg)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-filters,.hi-engineer-filter,.hwk-tabs) button[aria-pressed=true] {background:var(--hm-tint)!important;color:var(--hd-action)!important;border-color:var(--hd-action)!important;font-weight:650}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hq-quotes-page .hwk-line {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:18px 0}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hq-quotes-page .hwk-line>label:first-child {grid-column:1/-1}

 /* Explicit day-button ink prevents generic phone button rules hiding the dates. */
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-date-filter {width:100%}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-date-filter .hi-calendar {position:static;flex-basis:100%;width:min(360px,calc(100vw - 40px));max-width:calc(100vw - 40px);max-height:calc(100dvh - 180px);overflow:auto;padding:12px;border-radius:14px;box-shadow:0 4px 14px #11132214}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-heading {gap:8px;min-height:46px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-heading strong {font-size:16px;line-height:1.35;color:var(--hd-fg)!important;text-align:center}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-heading button {min-width:44px;min-height:44px;padding:4px;font-size:26px!important;background:var(--pf-field)!important;color:var(--hd-fg)!important;border:1px solid var(--hd-line)!important;border-radius:10px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-calendar-week,.hi-calendar-days) {gap:3px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-week {color:var(--hd-secondary)!important;font-size:12px;font-weight:600;line-height:1.5;margin:12px 0 6px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-days .hi-calendar-day {display:grid;place-items:center;box-sizing:border-box;width:100%;min-width:0;min-height:40px;height:40px;margin:0;padding:0 0 3px;border:1px solid transparent!important;border-radius:8px;background:transparent!important;color:var(--hd-fg)!important;font:600 14px/1 system-ui!important;opacity:1;box-shadow:none!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-days .hi-calendar-day[aria-current=date] {border-color:var(--hd-action)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-days .hi-calendar-day[aria-pressed=true] {background:var(--hd-action)!important;color:var(--hd-actiontext)!important;border-color:var(--hd-action)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-day.has-invoices:after {background:var(--hd-action);bottom:3px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-day[aria-pressed=true]:after {background:var(--hd-actiontext)}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-selection {gap:8px;margin-top:12px}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar-selection button {min-height:44px;padding:9px 12px;font-size:13px;background:var(--pf-field)!important;color:var(--hd-fg)!important;border-color:var(--hd-line)!important}
 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] .hi-calendar small {color:var(--hd-secondary)!important;font-size:12px;line-height:1.5}

 html[data-hq-theme] body #horizon-booking-demo[data-phone-workspace=true][data-phone-appearance] :is(.hi-editor,.hwk-dialog,.hq-quotes-page,.hm-inline-work,.hz-setup,.hs-card) :is(.is-error,.hi-editor-notice,.hi-preview-error,.hi-catalogue-error,.hi-delete-error,.hi-delete-draft,.hi-stock-negative,.hwk-warning,.hm-note-error) {color:var(--pf-error)!important}
}
