/* Customer phone surfaces. Shared chrome and booking flows have separate sheets. */
@media (max-width: 768px) {
  body.customer-mode {
    --mobile-ink: #243b37;
    --mobile-muted: #5f726c;
    --mobile-line: #dde7e2;
    --mobile-mint: #edf7f2;
    --mobile-accent: #246b55;
  }

  /* Comfortable touch controls without stretching each card into a desktop panel. */
  .customer-mode :is(.discover-page, .salon-directory-page, .me-dashboard, .salon-public-profile, .tryon-coming-soon, .auth-screen) :is(button, a, input, select, textarea) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .customer-mode :is(.discover-page, .salon-directory-page, .me-dashboard, .salon-public-profile, .tryon-coming-soon) :is(.solid-button.customer, .outline-button.customer, .ghost-button, .text-button, .icon-button, .carousel-nav-button) {
    min-height: 44px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.3;
    padding: 10px 13px;
  }
  .customer-mode :is(.discover-page, .salon-directory-page, .me-dashboard, .tryon-coming-soon) .solid-button.customer {
    color: #fff;
    border-color: var(--mobile-accent);
    background: var(--mobile-accent);
    box-shadow: none;
  }
  .customer-mode :is(.discover-page, .salon-directory-page, .me-dashboard, .tryon-coming-soon) .outline-button.customer {
    color: var(--mobile-ink);
    border-color: #cfddd6;
    background: #fff;
    box-shadow: none;
  }
  .customer-mode :is(.salon-directory-page, .me-dashboard, .auth-screen) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-width: 0;
    min-height: 46px;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 10px;
  }
  .customer-mode :is(.discover-page, .salon-directory-page, .me-dashboard, .salon-public-profile, .tryon-coming-soon) .icon-button {
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 11px;
  }
  .customer-mode :is(.discover-page, .me-dashboard, .tryon-coming-soon) :is(h1, h2, h3) {
    font-family: var(--font-family, Inter, ui-sans-serif, system-ui, sans-serif);
    letter-spacing: -0.035em;
  }

  /* Discover: an editorial introduction followed immediately by salon cards. */
  .customer-mode .discover-page { gap: 24px; padding-top: 4px; }
  .customer-mode .discover-page .customer-main-grid {
    position: relative;
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: #eff7f3;
  }
  .customer-mode .discover-page .search-panel {
    position: relative;
    z-index: 1;
    min-height: 0;
    padding: 20px 16px 18px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, #eff7f3 48%, rgba(239,247,243,.96) 68%, rgba(239,247,243,.7));
    box-shadow: none;
  }
  .customer-mode .discover-page .search-copy { gap: 9px; }
  .customer-mode .discover-page .search-copy .eyebrow {
    max-width: 80%; margin: 0; color: #436e5e; font-size: 10px; letter-spacing: .075em; line-height: 1.5;
  }
  .customer-mode .discover-page .search-copy h1 {
    max-width: 14ch; margin: 0; color: #203f33; font-size: clamp(26px, 7vw, 31px); line-height: 1.08;
  }
  .customer-mode .discover-page .search-copy > p:last-child {
    max-width: 32ch; margin: 0; color: #526b60; font-size: 12px; line-height: 1.5;
  }
  .customer-mode .discover-page .visual-panel {
    position: absolute; inset: 0 0 0 auto; width: 48%; height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none;
  }
  .customer-mode .discover-page .visual-panel > img { height: 100%; object-position: 64% center; }
  .customer-mode .discover-page .floating-summary { display: none; }
  .customer-mode .discover-marketplace { gap: 16px; padding: 0; }
  .customer-mode .discover-marketplace-heading { display: flex; align-items: start; gap: 8px; padding: 0; }
  .customer-mode .discover-marketplace-heading .eyebrow { margin: 0 0 5px; color: var(--mobile-muted); font-size: 10px; }
  .customer-mode .discover-marketplace-heading h2 { margin: 0; font-size: 21px; line-height: 1.15; }
  .customer-mode .discover-marketplace-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
  .customer-mode .discover-marketplace-title-row .result-count { min-height: 24px; margin: 0; padding: 4px 8px; font-size: 10px; }
  .customer-mode .discover-salon-list { gap: 23px; }
  .customer-mode .discover-salon-section { gap: 6px; min-width: 0; }
  .customer-mode .discover-row-heading { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
  .customer-mode .discover-row-heading > div:first-child { min-width: 0; width: auto; flex: 1; gap: 2px; }
  .customer-mode .discover-row-heading h2 { font-size: 17px; line-height: 1.25; }
  .customer-mode .discover-row-heading p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
  .customer-mode .discover-row-heading .horizontal-scroll-controls { gap: 4px; }
  .customer-mode .discover-salon-track { grid-auto-columns: min(278px, 82vw); gap: 12px; padding: 5px 1px 10px; scroll-padding-inline: 1px; }
  .customer-mode .discover-salon-card { border: 1px solid var(--mobile-line); border-radius: 15px; box-shadow: 0 3px 9px #203f3308; }
  .customer-mode .discover-salon-image { height: 146px; min-height: 0; }
  .customer-mode .discover-salon-body { padding: 12px; gap: 9px; }
  .customer-mode .discover-salon-body .salon-save-button, .customer-mode .discover-salon-image .salon-save-button { min-width: 44px; min-height: 44px; }
  .customer-mode .discover-salon-card h3 { font-size: 17px; line-height: 1.2; }
  .customer-mode .discover-salon-card p { font-size: 12px; }
  .customer-mode .discover-card-footer { gap: 8px; }
  .customer-mode .discover-promos { gap: 12px; }
  .customer-mode .discover-promo { min-height: 172px; border-radius: 16px; }
  .customer-mode .discover-promo-copy { padding: 18px 15px; gap: 10px; }
  .customer-mode .discover-promo h2 { max-width: 16ch; font-size: 22px; line-height: 1.1; }
  .customer-mode .discover-promo .eyebrow { font-size: 10px; }
  .customer-mode .discover-reviews { gap: 12px; }
  .customer-mode .discover-review-track { padding-block: 4px 10px; }
  .customer-mode .discover-review-track .empty-state { min-height: 80px; padding: 20px 15px; }

  /* Directory results keep the photo, details, and both actions together. */
  .customer-mode .salon-directory-controls { padding: 10px 12px; border-radius: 0; background: #fff; }
  .customer-mode .directory-search-actions { min-height: 48px; border: 1px solid #dce5df; border-radius: 13px; box-shadow: 0 2px 6px #243b3705; }
  .customer-mode .directory-search { min-height: 46px; padding-inline: 10px 0; }
  .customer-mode .directory-search input { min-height: 46px; padding: 10px 0; font-size: 16px; }
  .customer-mode .directory-search-actions .discovery-filter-trigger { flex: 0 0 46px; min-width: 46px; min-height: 46px; padding: 10px; color: var(--mobile-ink); }
  .customer-mode .directory-search-actions .discovery-filter-trigger > span { display: none; }
  .customer-mode .salon-directory-panel { padding: 0 12px 12px; background: #f5f8f6; }
  .customer-mode .directory-list { gap: 10px; padding-top: 10px; padding-bottom: 68px; }
  .customer-mode .directory-salon-row {
    grid-template-columns: 78px minmax(0, 1fr) !important;
    gap: 10px 11px; padding: 12px; border: 1px solid var(--mobile-line); border-radius: 15px; background: #fff; box-shadow: none;
  }
  .customer-mode .directory-salon-media { width: 78px; height: 86px; }
  .customer-mode .directory-salon-row .salon-thumb { width: 78px !important; height: 86px !important; border-radius: 10px; }
  .customer-mode .directory-media-save { inset: auto 0 0 auto; min-width: 44px; width: 44px; height: 44px; min-height: 44px; padding: 12px; border-radius: 0 0 10px 0; }
  .customer-mode .directory-salon-heading { gap: 5px; }
  .customer-mode .directory-salon-heading h3 { font-size: 14px; line-height: 1.2; }
  .customer-mode .directory-salon-heading p { color: var(--mobile-muted); font-size: 11px; line-height: 1.4; }
  .customer-mode .directory-rating { font-size: 11px; }
  .customer-mode .directory-salon-row .tag-row { gap: 4px; margin: 0; }
  .customer-mode .directory-salon-row .tag-row span { padding: 3px 5px; color: #356653; background: #edf7f1; font-size: 10px; }
  .customer-mode .directory-meta { color: var(--mobile-muted); font-size: 10px; line-height: 1.5; }
  .customer-mode .directory-actions { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; }
  .customer-mode .directory-actions button { width: 100%; min-height: 44px; }
  .customer-mode .directory-mobile-view-switch { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); padding: 4px; border: 1px solid #d9e4dd; border-radius: 26px; background: #fff; box-shadow: 0 4px 18px #203f3324; }
  .customer-mode .directory-mobile-view-switch button { min-height: 44px; padding-inline: 17px; }
  .customer-mode .directory-mobile-view-switch button.active { color: #fff; background: #284c3f; }

  /* A bottom sheet leaves the result context visible and the action in reach. */
  .customer-mode .discovery-filter-scrim { inset: 0; z-index: 1200; background: #172b2359; backdrop-filter: blur(3px); }
  .customer-mode .discovery-filter-drawer {
    position: fixed; inset: auto 0 0; z-index: 1201; width: 100%; max-width: none;
    height: min(760px, calc(100dvh - 64px - env(safe-area-inset-top, 0px)));
    max-height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
    border: 1px solid #dce5df; border-radius: 24px 24px 0 0; background: #f9fbfa;
    box-shadow: 0 -12px 50px #18352a24; transform: translateY(105%);
    transition: transform 200ms cubic-bezier(.2,.8,.2,1), visibility 200ms;
  }
  .customer-mode .discovery-filter-drawer.is-open { transform: translateY(0); }
  .customer-mode .discovery-filter-drawer-header { padding: 18px 18px 12px; background: #f9fbfa; }
  .customer-mode .discovery-filter-drawer-header strong { font-family: inherit; font-size: 24px; letter-spacing: -.035em; }
  .customer-mode .discovery-filter-drawer-header > div > span { font-size: 10px; color: var(--mobile-muted); }
  .customer-mode .discovery-filter-fields { gap: 15px; padding: 4px 18px 20px; overscroll-behavior: contain; }
  .customer-mode .discovery-filter-fields > label { gap: 6px; font-size: 12px; }
  .customer-mode .discovery-filter-fields select { min-height: 46px; font-size: 16px; border-color: #dce5df; background-color: #fff; }
  .customer-mode .discovery-sort-options { gap: 8px; }
  .customer-mode .discovery-sort-option { min-height: 60px; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; }
  .customer-mode .discovery-sort-option.active { border-color: #508f72; color: #284c3f; background: #edf7f1; box-shadow: 0 0 0 1px #508f7226; }
  .customer-mode .discovery-sort-option.active .discovery-sort-icon { color: #246b55; background: #dcefe3; }
  .customer-mode .discovery-filter-drawer-actions { padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; border-top: 1px solid var(--mobile-line); background: #fff; }
  .customer-mode .discovery-filter-drawer-actions button { min-height: 48px; }

  /* My Hair uses one compact rail and a single scrolling content surface. */
  body.customer-mode.me-workspace-mode .me-dashboard { gap: 0; border: 0; border-radius: 0; background: #faf8f8; box-shadow: none; }
  body.customer-mode.me-workspace-mode .me-account-rail { position: static; top: auto; min-height: 0; max-height: none; padding: 8px 12px 0; gap: 4px; border: 0; border-bottom: 1px solid #e8e4ec; background: #fff; }
  .customer-mode .me-rail-profile { padding: 0 2px 4px; gap: 9px; }
  .customer-mode .me-dashboard .me-rail-avatar { width: 36px; height: 36px; min-width: 36px; }
  .customer-mode .me-rail-profile strong { font-size: 13px; }
  .customer-mode .me-rail-profile span { margin-top: 2px; font-size: 10px; color: var(--mobile-muted); }
  .customer-mode .me-rail-nav { display: flex; gap: 4px; min-width: 0; padding: 0 0 7px; scroll-padding-inline: 4px; overflow-x: auto; scrollbar-width: none; }
  .customer-mode .me-rail-nav::-webkit-scrollbar { display: none; }
  .customer-mode .me-rail-nav button { flex: 0 0 auto; min-height: 44px; padding: 9px 11px; gap: 7px; border: 0; border-radius: 10px; color: #696371; font-size: 12px; line-height: 1.2; }
  .customer-mode .me-rail-nav button.active { color: #6a48d0; background: #f6f3f9; box-shadow: none; }
  .customer-mode .me-rail-nav button b { color: #fff; background: #916be8; }
  .customer-mode .me-rail-footer { display: none; }
  body.customer-mode.me-workspace-mode .me-workspace { display: grid; gap: 16px; padding: 18px 12px 28px; background: #faf8f8; }
  .customer-mode .me-page-header { gap: 12px; margin: 0; padding: 0; }
  .customer-mode .me-page-header h1 { font-size: 24px; line-height: 1.1; }
  .customer-mode .me-page-header .eyebrow { margin: 0 0 4px; color: #4b4260; font-size: 10px; }
  .customer-mode .me-page-header > div > p:not(.eyebrow) { font-size: 12px; line-height: 1.45; }
  .customer-mode .me-page-header-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; width: 100%; }
  .customer-mode .me-page-header-actions button { width: 100%; min-width: 0; min-height: 46px; padding: 8px; font-size: 11px; white-space: normal; }
  .customer-mode .me-kpi-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; overflow: visible; padding: 0; }
  .customer-mode .me-kpi { min-width: 0; min-height: 72px; gap: 8px; padding: 11px; border: 1px solid var(--mobile-line); border-radius: 12px; box-shadow: none; background: #fff; }
  .customer-mode .me-kpi > span { width: 30px; height: 30px; color: #6a48d0; background: #f3eff8; }
  .customer-mode .me-kpi small { color: #696371; font-size: 9px; }
  .customer-mode .me-kpi strong { font-size: 19px; }
  .customer-mode .me-kpi em { color: #696371; font-size: 9px; }
  .customer-mode :is(.me-feature-grid,.me-overview-lower) { gap: 12px; }
  .customer-mode .me-booking-feature { display: grid; grid-template-columns: minmax(0,1fr) 62px; min-height: 0; border: 1px solid #e2d9ee; border-radius: 16px; background: #f6f3f9; }
  .customer-mode .me-feature-copy { min-width: 0; gap: 8px; padding: 16px 12px 16px 16px; color: #17131f; }
  .customer-mode .me-feature-copy .me-feature-label { color: #4b4260; font-size: 10px; }
  .customer-mode .me-feature-copy h2 { color: #17131f; font-size: 20px; line-height: 1.13; }
  .customer-mode .me-feature-copy > p { color: #5e566a; font-size: 12px; line-height: 1.45; }
  .customer-mode .me-feature-copy > strong { color: #5e566a; font-size: 11px; line-height: 1.45; }
  .customer-mode .me-feature-copy .button-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
  .customer-mode .me-feature-copy .button-row > button { flex: 1 1 auto; width: auto; padding: 9px 10px; font-size: 12px; }
  .customer-mode .me-feature-copy .ghost-button { color: #6a48d0; background: #fff; }
  .customer-mode .me-feature-date { grid-column: 2; grid-row: 1; min-height: 0; width: auto; gap: 4px; padding: 16px 7px; border: 0; border-left: 1px solid #e2d9ee; color: #6a48d0; background: #efe9f7; }
  .customer-mode .me-feature-date strong { color: #6a48d0; font-size: 30px; }
  .customer-mode .me-feature-date span { color: #6a48d0; font-size: 11px; }
  .customer-mode .me-feature-date b { color: #6a48d0; font-size: 8px; overflow-wrap: anywhere; }
  .customer-mode .me-booking-feature > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
  .customer-mode :is(.me-content-section,.me-profile-readiness,.me-looks-feature) { min-width: 0; padding: 15px; gap: 14px; border: 1px solid var(--mobile-line); border-radius: 15px; background: #fff; box-shadow: none; }
  .customer-mode .me-section-heading { gap: 8px; margin: 0; }
  .customer-mode .me-section-heading :is(h2,h3) { font-size: 17px; line-height: 1.2; }
  .customer-mode .me-section-heading .eyebrow { margin: 0 0 4px; color: var(--mobile-muted); font-size: 9px; }
  .customer-mode .profile-completion-list { gap: 5px 9px; }
  .customer-mode .profile-completion-list > span { font-size: 10px; }
  .customer-mode .me-profile-readiness > p { font-size: 12px; line-height: 1.5; }
  .customer-mode .profile-facts span { color: #4b4260; background: #f3eff8; font-size: 10px; }
  .customer-mode .me-salon-list { gap: 0; }
  .customer-mode .me-salon-row { gap: 8px 10px; padding-block: 12px; }
  .customer-mode .me-salon-row :is(p,small) { color: #696371; font-size: 11px; line-height: 1.4; }
  .customer-mode .me-salon-title span { color: #6a48d0; }
  .customer-mode .me-ai-empty-visual { height: 160px; min-height: 0; }
  .customer-mode .me-empty-showcase { gap: 18px; padding: 0; border-radius: 12px; }
  .customer-mode .me-empty-showcase > img { height: 170px; min-height: 0; object-fit: cover; }
  .customer-mode .me-empty-showcase > div { padding: 2px 8px 16px; }
  .customer-mode .me-empty-showcase h2 { font-size: 22px; }
  .customer-mode .me-empty-showcase p { font-size: 13px; line-height: 1.5; }
  .customer-mode .me-empty-state { min-height: 170px; padding: 22px 12px; gap: 10px; }
  .customer-mode .me-empty-state p { max-width: 32ch; font-size: 13px; line-height: 1.5; }
  .customer-mode .me-payment-summary { gap: 8px; }

  /* Appointment summary cards; editing and booking dialogs are styled separately. */
  .customer-mode .me-dashboard .customer-appointment-feature { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; overflow: hidden; border: 1px solid #e4dfe8; border-radius: 13px; box-shadow: none; }
  .customer-mode .me-dashboard .customer-appointment-feature-date { display: flex; flex-direction: row; justify-content: start; align-items: baseline; gap: 7px; padding: 10px 13px; min-height: 44px; color: #6a48d0; background: #f3eff8; border-bottom: 1px solid #e8e2ef; }
  .customer-mode .me-dashboard .customer-appointment-feature-date strong { color: #6a48d0; font-size: 22px; line-height: 1; }
  .customer-mode .me-dashboard .customer-appointment-feature-date :is(span,small) { color: #6a48d0; font-size: 11px; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy { gap: 8px; padding: 13px; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy h2 { font-size: 18px; line-height: 1.2; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy h3 { font-size: 15px; line-height: 1.3; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy p { color: var(--mobile-muted); font-size: 12px; }
  .customer-mode .me-dashboard .customer-appointment-feature-meta { gap: 6px; font-size: 12px; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy .button-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .customer-mode .me-dashboard .customer-appointment-feature-copy .button-row > button { width: 100%; min-width: 0; min-height: 44px; padding-inline: 7px; font-size: 11px; }
  .customer-mode .me-dashboard .customer-appointment-map { min-height: 130px; height: 150px; border-left: 0; border-top: 1px solid #e8e4ec; }
  .customer-mode .me-dashboard .customer-appointment-row { padding: 12px 0; gap: 10px; }
  .customer-mode .me-dashboard .appointment-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

  .customer-mode :is(.discovery-filter-fields,.me-settings-group) .prelook-select-trigger { min-height: 46px; border-radius: 10px; font-size: 16px; border-color: #e4dfe8; background: #fff; }
  .customer-mode .salon-profile-detail-link { display: inline-flex; align-items: center; min-height: 44px; }

  /* Profile forms stay readable at native zoom and keep secondary data compact. */
  .customer-mode .me-settings-panel { padding: 0; gap: 0; }
  .customer-mode .me-settings-panel > .me-section-heading { padding: 14px; }
  .customer-mode .me-settings-profile { grid-template-columns: 44px minmax(0,1fr); gap: 10px; padding: 14px; }
  .customer-mode .settings-photo-control { width: 44px; height: 44px; }
  .customer-mode .me-settings-profile > div span { overflow-wrap: anywhere; font-size: 12px; color: var(--mobile-muted); }
  .customer-mode .me-settings-profile .settings-photo-button { grid-column: 2; justify-self: start; min-height: 44px; }
  .customer-mode .me-settings-group { grid-template-columns: minmax(0,1fr); gap: 13px; padding: 18px 14px; }
  .customer-mode .me-settings-group > div:first-child h3 { font-size: 14px; }
  .customer-mode .me-settings-group > div:first-child p { margin-top: 4px; color: var(--mobile-muted); font-size: 12px; }
  .customer-mode .me-settings-group .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 10px; }
  .customer-mode .me-settings-group .profile-grid > label { gap: 5px; font-size: 12px; }
  .customer-mode .me-settings-group .profile-grid > label:has(input[type="email"],input[name="fullName"],input[name="name"],input[data-control="profile-name"],textarea),
  .customer-mode .me-settings-group .profile-grid .verified-phone-setting,
  .customer-mode .me-settings-group .profile-grid .full-field { grid-column: 1 / -1; }
  .customer-mode .me-settings-group .profile-grid :is(input,select,textarea) { margin: 0; padding: 11px 10px; border-color: #e4dfe8; background: #fff; }
  .customer-mode .verified-phone-setting { min-width: 0; }
  .customer-mode .verified-phone-setting button { min-height: 44px; white-space: normal; }
  .customer-mode .me-language-settings .language-picker { max-width: 100%; width: 100%; }
  .customer-mode .me-account-actions { gap: 8px; flex-wrap: wrap; }
  .customer-mode .me-account-actions button { min-height: 44px; white-space: normal; }
  .customer-mode .me-settings-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px; background: #fbfafc; }
  .customer-mode .me-settings-footer button { min-height: 48px; }

  /* A salon conversation uses the remaining viewport, including keyboard resizing. */
  .customer-mode .customer-chats { --chat-ink: #17131f; --chat-muted: #696371; --chat-line: #e4dfe8; --chat-purple: #6a48d0; --chat-soft: #f3eff8; height: max(260px, calc(var(--mobile-viewport-height, 100dvh) - 244px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))); min-height: 0; }
  body.customer-mode.me-workspace-mode .me-workspace:has(> .customer-chats) { display: flex; padding-top: 10px; padding-bottom: 12px; overflow: visible; }
  .customer-mode .customer-chats-layout { border: 1px solid #e4dfe8; border-radius: 14px; box-shadow: none; }
  .customer-mode .customer-chat-list > header { padding: 14px 14px 10px; }
  .customer-mode .customer-chat-search { margin: 0 12px 10px; min-height: 44px; }
  .customer-mode .customer-chat-search input { min-height: 44px; font-size: 16px; }
  .customer-mode .customer-chat-salon-list { padding-inline: 6px; }
  .customer-mode .customer-chat-salon-row { min-height: 76px !important; border-radius: 10px; padding: 12px 8px; }
  .customer-mode .customer-chat-row-heading strong { font-size: 14px; }
  .customer-mode .customer-chat-room-header { min-height: 64px; padding: 9px 10px; }
  .customer-mode .customer-chat-back { min-width: 44px; min-height: 44px; }
  .customer-mode .customer-chat-salon-link { min-width: 0; min-height: 44px; }
  .customer-mode .customer-chat-salon-link strong { font-size: 14px; }
  .customer-mode .customer-chat-salon-link small { color: #696371; font-size: 11px; }
  .customer-mode .customer-chat-stream.appointment-message-thread { padding: 14px 12px; background: #faf8fb; }
  .customer-mode .customer-chat-stream.appointment-message-thread article { max-width: 90%; font-size: 14px; }
  .customer-mode .customer-chat-composer.appointment-message-composer { gap: 6px; padding: 9px 10px; background: #fff; }
  .customer-mode .customer-chat-compose-top { font-size: 10px; }
  .customer-mode .customer-chat-compose-input { gap: 8px; }
  .customer-mode .customer-chat-compose-input textarea { min-height: 46px; font-size: 16px; border-color: #e4dfe8; }
  .customer-mode .customer-chat-compose-input button { min-height: 46px; min-width: 46px; }
  html.mobile-keyboard-open .customer-mode .customer-chats { height: max(240px, calc(var(--mobile-viewport-height, 100dvh) - 164px - env(safe-area-inset-top,0px))); }
  .customer-mode .customer-chat-empty { padding: 24px 16px; gap: 12px; }
  .customer-mode .customer-chat-empty p { font-size: 13px; line-height: 1.5; }

  /* Public storefront content is independent from the professional site editor. */
  .customer-mode .salon-public-profile {
    --salon-profile-ink: #253d33; --salon-profile-muted: #5e7267; --salon-profile-line: #dfe7e1;
    --salon-profile-violet: #357357; --salon-profile-violet-dark: #285c45; --salon-profile-violet-soft: #edf7ef;
  }
  .customer-mode .salon-profile-heading { position: relative; padding: 12px 0 14px; gap: 10px; }
  .customer-mode .salon-profile-heading > div:first-child { padding-right: 0; }
  .customer-mode .salon-profile-back { min-height: 44px; padding: 8px 0; font-size: 12px; }
  .customer-mode .salon-profile-heading h1 { max-width: 100%; margin-top: 8px; font-family: inherit; font-size: 29px; line-height: 1.04; letter-spacing: -.04em; }
  .customer-mode .salon-profile-heading-actions { top: 10px; right: 0; gap: 5px; }
  .customer-mode .salon-profile-heading-tagline { font-size: 14px; line-height: 1.4; }
  .customer-mode .salon-profile-heading-description { font-size: 13px; line-height: 1.5; }
  .customer-mode .salon-profile-heading-meta { gap: 4px 9px; padding: 0; font-size: 11px; }
  .customer-mode .salon-profile-heading-meta button { min-height: 44px; padding-block: 8px; }
  .customer-mode .salon-profile-gallery { grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2,minmax(0,1fr)); gap: 6px; height: 228px; padding-top: 0; }
  .customer-mode .salon-profile-gallery .salon-profile-gallery-1 { grid-column: 1; grid-row: 1 / -1; }
  .customer-mode .salon-profile-gallery .salon-profile-gallery-2 { grid-column: 2; grid-row: 1; }
  .customer-mode .salon-profile-gallery .salon-profile-gallery-3 { grid-column: 2; grid-row: 2; }
  .customer-mode .salon-profile-gallery.has-1-images { height: 228px; grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .customer-mode .salon-profile-gallery.has-2-images { height: 228px; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr; }
  .customer-mode .salon-profile-gallery.has-2-images .salon-profile-gallery-2 { grid-row: 1; }
  .customer-mode .salon-profile-gallery figure { border-radius: 12px; }
  .customer-mode .salon-profile-gallery-view-all { min-height: 44px; max-width: calc(100% - 8px); padding: 7px !important; font-size: 10px !important; white-space: normal; }
  .customer-mode .salon-profile-section-nav { top: calc(52px + env(safe-area-inset-top,0px)); min-height: 52px; margin-top: 8px; gap: 18px; padding-block: 0; background: #fff; }
  .customer-mode .salon-profile-section-nav button { flex-shrink: 0; min-height: 48px; padding-block: 10px; font-size: 13px; }
  .customer-mode .salon-profile-body { gap: 18px; padding-top: 18px; }
  .customer-mode .salon-profile-main { gap: 30px; }
  .customer-mode .salon-profile-section { gap: 18px; scroll-margin-top: calc(122px + env(safe-area-inset-top,0px)); }
  .customer-mode .salon-profile-section-heading { gap: 5px; }
  .customer-mode .salon-profile-section-heading h2 { font-family: inherit; font-size: 24px; line-height: 1.1; }
  .customer-mode .salon-profile-section-heading > span { font-size: 13px; line-height: 1.5; }
  .customer-mode .salon-profile-book-card { border-radius: 14px; }
  .customer-mode .salon-profile-book-card-heading { padding: 15px; }
  .customer-mode .salon-profile-book-card-heading h2 { font-size: 19px; }
  .customer-mode .salon-profile-book-button { min-height: 48px; margin: 0 14px 14px; width: calc(100% - 28px); border-radius: 11px; background: #2b694e; font-size: 14px; }
  .customer-mode .salon-profile-book-card dl > div { padding-block: 12px; }
  .customer-mode .salon-profile-card-actions button { min-height: 44px; }
  .customer-mode .salon-profile-service-groups { gap: 22px; }
  .customer-mode .salon-profile-service-group { gap: 9px; }
  .customer-mode .salon-profile-service-row { grid-template-columns: minmax(0,1fr) auto; min-height: 98px; gap: 12px; padding: 13px; border-radius: 12px; }
  .customer-mode .salon-profile-service-row h4 { font-size: 15px; }
  .customer-mode .salon-profile-service-row p { font-size: 12px; line-height: 1.45; }
  .customer-mode .salon-profile-service-row span { color: #5e7267; font-size: 11px; }
  .customer-mode .salon-profile-service-action { min-width: 66px; gap: 6px; }
  .customer-mode .salon-profile-service-action button { min-height: 44px; padding-inline: 11px; }
  .customer-mode .salon-profile-stylist-card { grid-template-columns: 52px minmax(0,1fr); gap: 10px; padding: 12px; border-radius: 12px; }
  .customer-mode .salon-profile-stylist-card > img { width: 52px; height: 62px; border-radius: 9px; }
  .customer-mode .salon-profile-stylist-card > .salon-profile-stylist-actions { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .customer-mode .salon-profile-stylist-actions button { min-height: 44px; font-size: 12px; }
  .customer-mode .salon-profile-chip-row { flex-wrap: wrap; }
  .customer-mode .salon-profile-review-summary { gap: 16px; padding: 16px; border-radius: 13px; background: #edf7ef; }
  .customer-mode .salon-profile-review-summary > strong { min-width: 65px; font-size: 45px; }
  .customer-mode .salon-profile-review-card { gap: 10px; padding: 18px 0; }
  .customer-mode .salon-profile-about-grid { gap: 10px; }
  .customer-mode .salon-profile-about-grid section { padding: 15px; border-radius: 12px; }
  .customer-mode .salon-profile-map-card { border-radius: 13px; }

  /* Public stylist detail keeps identity and booking within the first screen. */
  body.salon-site-mode .stylist-profile-modal-layer { padding-top: max(8px, env(safe-area-inset-top,0px)); }
  body.salon-site-mode .stylist-profile-modal-card { height: calc(100dvh - max(8px, env(safe-area-inset-top,0px))); border-radius: 22px 22px 0 0; color: #293f34; }
  body.salon-site-mode .stylist-profile-modal-header { position: relative; min-height: 64px; padding: 10px 14px; gap: 10px; border-bottom: 1px solid #e0e8e2; background: #fff; }
  body.salon-site-mode .stylist-profile-modal-header > div:first-child { display: flex; gap: 3px; }
  body.salon-site-mode .stylist-profile-modal-header > div:first-child span { font-size: 11px; color: #64776b; }
  body.salon-site-mode .stylist-profile-modal-header > div:first-child strong { font-size: 14px; }
  body.salon-site-mode .stylist-profile-modal-header > div:last-child { width: auto; gap: 6px; }
  body.salon-site-mode .stylist-profile-modal-header .icon-button { min-width: 44px; min-height: 44px; width: 44px; height: 44px; border: 1px solid #e0e8e2; border-radius: 11px; box-shadow: none; color: #42604d; background: #f7faf8; }
  body.salon-site-mode .stylist-profile-modal-scroll { padding-bottom: env(safe-area-inset-bottom,0px); overscroll-behavior: contain; }
  body.salon-site-mode .stylist-profile-modal-hero { gap: 12px; padding: 20px 18px 18px; background: #f0f7f2; }
  body.salon-site-mode .stylist-profile-modal-hero > img { width: 92px; height: 92px; border-width: 3px; }
  body.salon-site-mode .stylist-profile-modal-identity { gap: 6px; }
  body.salon-site-mode .stylist-profile-modal-identity > p { color: #496e57; font-size: 11px; line-height: 1.4; }
  body.salon-site-mode .stylist-profile-modal-identity h2 { font-size: 27px; line-height: 1.1; letter-spacing: -.04em; }
  body.salon-site-mode .stylist-profile-modal-identity > span { font-size: 13px; line-height: 1.45; color: #5d7064; }
  body.salon-site-mode .stylist-profile-modal-card .solid-button.customer { min-height: 48px; border: 0; border-radius: 11px; color: #fff; background: #286b53; box-shadow: none; font-size: 14px; }
  body.salon-site-mode .stylist-profile-modal-stats > div { padding: 13px 14px; gap: 3px; }
  body.salon-site-mode .stylist-profile-modal-stats strong { font-size: 20px; }
  body.salon-site-mode .stylist-profile-modal-stats span { color: #65776c; font-size: 11px; }
  body.salon-site-mode .stylist-profile-modal-section { padding: 18px 15px; }
  body.salon-site-mode .stylist-profile-section-heading { gap: 6px; }
  body.salon-site-mode .stylist-profile-section-heading h3 { font-size: 20px; }
  body.salon-site-mode .stylist-profile-about p { font-size: 13px; line-height: 1.6; }
  body.salon-site-mode .stylist-profile-facts { gap: 8px; }
  body.salon-site-mode .stylist-profile-facts article { gap: 10px; padding: 12px; border-radius: 12px; background: #f7faf8; }
  body.salon-site-mode .stylist-profile-modal-empty { padding: 22px 16px; border-radius: 12px; }

  /* Authentication remains a short, single-column form on a phone. */
  .customer-mode .auth-screen { --auth-accent: #286b53; --auth-accent-dark: #245c48; --auth-accent-soft: #eaf5ee; --auth-ink: #273c33; --auth-muted: #627368; --auth-line: #dce5df; display: block; min-height: 100dvh; background: #f6faf7; }
  .customer-mode .auth-screen .auth-visual-panel { display: none; }
  .customer-mode .auth-screen .auth-workspace { display: block; min-height: 100dvh; padding: calc(10px + env(safe-area-inset-top,0px)) 18px calc(24px + env(safe-area-inset-bottom,0px)); background: #f6faf7; }
  .customer-mode .auth-screen .auth-workspace-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 24px; }
  .customer-mode .auth-screen .auth-workspace-top button { width: auto; flex: 0 1 auto; min-height: 44px; border: 0; padding: 9px 4px; background: transparent; font-size: 12px; }
  .customer-mode .auth-screen .auth-panel[data-auth-surface="page"] { width: 100%; min-height: 0; max-height: none; margin: 0 auto; padding: 0; gap: 18px; overflow: visible; }
  .customer-mode .auth-screen .auth-panel-heading h1 { font-size: 29px; line-height: 1.1; }
  .customer-mode .auth-screen .auth-panel-heading > p:last-child { font-size: 14px; line-height: 1.45; }
  .customer-mode .auth-screen .auth-form { gap: 14px; }
  .customer-mode .auth-screen .auth-form label { gap: 6px; font-size: 12px; }
  .customer-mode .auth-screen .auth-form :is(input,select) { min-height: 48px; padding: 12px; font-size: 16px; background: #fff; }
  .customer-mode .auth-screen :is(.solid-button.customer,.oauth-button,.auth-social-button) { min-height: 48px; border-radius: 11px; }
  .customer-mode.auth-screen-mode .auth-screen .auth-panel[data-auth-surface] .solid-button.customer { min-height: 48px; color: #fff; background: #286b53; border-color: #286b53; box-shadow: none; }
  .customer-mode .auth-screen .auth-forgot-button { min-height: 44px; }
  .customer-mode .auth-screen .auth-grid { gap: 12px; }
  .customer-mode .auth-screen .phone-confirmation { min-height: 0; padding: 18px 0; }

  .customer-mode .tryon-coming-soon { height: auto; gap: 12px; padding: 4px 0 20px; }
  .customer-mode .tryon-coming-soon-hero { min-height: 0; border-radius: 18px; background: #edf6f0; box-shadow: none; }
  .customer-mode .tryon-coming-soon-copy { padding: 22px 18px; gap: 12px; }
  .customer-mode .tryon-coming-soon-copy h1 { max-width: 15ch; font-size: 30px; line-height: 1.06; }
  .customer-mode .tryon-coming-soon-copy > p:last-of-type { font-size: 13px; line-height: 1.55; }
  .customer-mode .tryon-coming-soon-actions { gap: 8px; width: 100%; }
  .customer-mode .tryon-coming-soon-actions button { width: 100%; min-height: 46px; }
  .customer-mode .tryon-coming-soon-visual { min-height: 238px; padding: 0 18px 18px; }
  .customer-mode .tryon-coming-soon-visual figure { width: 65%; }
  .customer-mode .tryon-coming-soon-visual figure img { height: 225px; }
  .customer-mode .tryon-coming-soon-visual > aside { right: 10px; bottom: 24px; width: 170px; padding: 12px; }
  .customer-mode .tryon-coming-soon-details { gap: 9px; }
  .customer-mode .tryon-coming-soon-details article { padding: 14px; border-radius: 13px; }
}

@media (max-width: 359px) {
  .customer-mode .discover-page .search-panel { padding: 17px 14px; }
  .customer-mode .discover-page .search-copy h1 { font-size: 27px; }
  .customer-mode .directory-salon-row { grid-template-columns: 66px minmax(0,1fr) !important; padding: 10px; gap: 9px; }
  .customer-mode .directory-salon-media { width: 66px; }
  .customer-mode .directory-salon-row .salon-thumb { width: 66px !important; }
  .customer-mode .directory-salon-heading { flex-wrap: wrap; }
  .customer-mode .me-settings-group .profile-grid { grid-template-columns: minmax(0,1fr); }
  .customer-mode .me-page-header h1 { font-size: 22px; }
  .customer-mode .salon-profile-heading h1 { font-size: 26px; }
  .customer-mode .salon-profile-gallery { height: 206px; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .customer-mode :is(.discover-page,.salon-directory-page,.me-dashboard,.salon-public-profile,.tryon-coming-soon,.auth-screen) *,
  .customer-mode .discovery-filter-drawer { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Search and results occupy separate rows; neither covers the other on a phone. */
@media (max-width: 760px) {
  body.customer-mode.salon-directory-mode .customer-shell { height: var(--mobile-viewport-height, 100dvh); }
  body.customer-mode.salon-directory-mode .customer-shell > .page-wrap { width: 100%; padding: 0 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  body.customer-mode.salon-directory-mode .salon-map-directory { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; border: 0; border-radius: 0; }
  body.customer-mode.salon-directory-mode .salon-directory-controls { position: relative; grid-column: 1; grid-row: 1; margin: 0; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--mobile-line); border-radius: 0; background: #fff; }
  body.customer-mode.salon-directory-mode .directory-search-actions { min-height: 46px; gap: 0; padding: 0; border-radius: 12px; box-shadow: none; background: #f8faf9; }
  body.customer-mode.salon-directory-mode .directory-search { min-height: 44px; padding-left: 12px; background: transparent; }
  body.customer-mode.salon-directory-mode .directory-search input { min-height: 44px; padding-block: 8px; }
  body.customer-mode.salon-directory-mode .discovery-filter-trigger { min-height: 44px; min-width: 44px; flex-basis: 44px; border: 0; border-left: 1px solid var(--mobile-line); border-radius: 0 11px 11px 0; background: transparent; }
  body.customer-mode.salon-directory-mode :is(.salon-directory-panel, .directory-map-panel) { grid-column: 1; grid-row: 2; border: 0; border-radius: 0; }
  body.customer-mode.salon-directory-mode .salon-directory-panel { padding: 0 12px; }
  body.customer-mode.salon-directory-mode .directory-list { padding: 10px 0 66px; gap: 9px; scroll-padding-bottom: 66px; scrollbar-gutter: auto; overscroll-behavior-y: contain; }
  .customer-mode .directory-salon-row { min-height: 0; grid-template-columns: 66px minmax(0, 1fr) !important; gap: 9px 10px; padding: 11px; border-radius: 13px; }
  .customer-mode .directory-salon-media { width: 66px; height: 76px; }
  .customer-mode .directory-salon-row .salon-thumb { width: 66px !important; height: 76px !important; }
  .customer-mode .directory-salon-heading h3 { font-weight: 650; }
  .customer-mode .directory-salon-row .tag-row { flex-wrap: wrap; }
  .customer-mode .directory-meta { flex-wrap: wrap; gap: 3px 8px; font-size: 11px; }
  .customer-mode .directory-actions button { padding: 8px; font-size: 13px; }
  .customer-mode .directory-mobile-view-switch { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 8px); padding: 3px; }
  .customer-mode .directory-mobile-view-switch button { min-height: 40px; padding: 7px 15px; gap: 6px; font-size: 13px; }
  .customer-mode .directory-mobile-view-switch .icon { width: 17px; height: 17px; }
}
