/* esc-phone.css -- phone-sized controls, every app (2026-11-08).
   Ron: "The buttons on the app are way too big, they take over the whole screen, take up the whole page, needs to be phone
   like buttons." And: "it can't just be that site moved to the app, it needs to be app created."
   Loaded LAST on the admin / agent desk (esc-ops-9x4k.html), the broker + landlord page (broker.html) and the iOS app
   (app.html). Every rule is inside max-width:768px, so the desktop is untouched.
   The standard on a phone:
     filter / segment chips   32px, 14px sentence-case text, ONE row that scrolls sideways (no wrapping)
     buttons                  36px, 15px text, compact padding (a form's single main action may stay full width)
     icon buttons             36px square
     text inputs              16px text (iOS does not zoom); the app bars and sheet buttons keep their 44px
   The bottom tab bars (#adm-tabbar, #tab-bar) are left as they are.
   `html:not(#z) body` lifts every selector over the pages' own id-scoped !important rules (one id + two elements). */

@media (max-width:768px){

  /* ── chip rows: one line, sideways scroll, no scroll bar ───────────────────────────────── */
  html:not(#z) body :is(.focus-periods, .crm-contact-lanes, .focus-queues [role=group], [data-queue-sec] [role=group], .filter-bar,
      #brk-status-filters, #crm-pipe-intents, .pnav, .li-nav, .li-category-tabs, .li-ws-nav, [aria-label="Property tools"],
      .ll-sections, .ll-detail-tabs, .ll-categories, .ui-chips, .ui-seg-scroll, .esc-phone-chips){
    display:flex !important; flex-wrap:nowrap !important; overflow-x:auto !important; overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch; scrollbar-width:none; overscroll-behavior-x:contain; scroll-padding-inline:12px;
    gap:6px !important; max-width:100%; min-width:0; align-items:center;
  }
  html:not(#z) body :is(.focus-periods, .crm-contact-lanes, .filter-bar, .pnav, .li-nav, .li-category-tabs, .li-ws-nav,
      [aria-label="Property tools"], .ll-sections, .ll-detail-tabs, .ll-categories, .esc-phone-chips)::-webkit-scrollbar{ display:none; }
  html:not(#z) body :is(.focus-periods, .crm-contact-lanes, .focus-queues [role=group], [data-queue-sec] [role=group], .filter-bar,
      #brk-status-filters, #crm-pipe-intents, .pnav, .li-nav, .li-category-tabs, .li-ws-nav, [aria-label="Property tools"],
      .ll-sections, .ll-detail-tabs, .ll-categories, .esc-phone-chips) > :is(button, a, .filter-btn, .po-pill){
    flex:0 0 auto !important; min-height:32px !important; height:32px !important; padding:0 12px !important;
    font-size:14px !important; font-weight:600; line-height:1 !important; text-transform:none !important; letter-spacing:0 !important;
    border-radius:999px !important; white-space:nowrap !important; display:inline-flex !important; align-items:center; gap:4px;
    min-width:0 !important; width:auto !important; box-shadow:none;
  }
  html:not(#z) body :is(.filter-bar, #brk-status-filters, .ll-categories) > * small,
  html:not(#z) body .filter-btn .count{ font-size:12px !important; letter-spacing:0 !important; }
  /* a chip row inside a padded box: no extra box around it */
  html:not(#z) body :is(.li-category-tabs, [data-li-nav]){ padding:4px 0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; margin:0 0 10px !important; }
  html:not(#z) body .crm-contact-lanes button .lane-count{ margin-left:4px; }

  /* ── the workspace switch (Group · CRM · Capital): a compact segmented control ──────────── */
  html:not(#z) body .adm-workspaces{ gap:0 !important; padding:6px 12px !important; }
  html:not(#z) body.ui-shell.mcrm-on .adm-workspaces{ padding-top:calc(6px + var(--ui-safe-top, 0px)) !important; }
  html:not(#z) body .adm-workspaces button{ min-height:32px !important; height:32px; padding:0 6px !important; border-radius:0 !important; flex-direction:row !important; margin:0 !important; }
  html:not(#z) body .adm-workspaces button:not([hidden]) ~ button:not([hidden]){ border-left-width:0 !important; }
  html:not(#z) body .adm-workspaces button:first-of-type{ border-radius:9px 0 0 9px !important; }
  html:not(#z) body .adm-workspaces button:last-of-type{ border-radius:0 9px 9px 0 !important; }
  html:not(#z) body .adm-workspaces button b{ font-size:14px !important; font-weight:600 !important; letter-spacing:0 !important; }
  html:not(#z) body .adm-workspaces button small{ display:none !important; }

  /* ── buttons ──────────────────────────────────────────────────────────────────────────── */
  html:not(#z) body :is(.btn, .crm-btn, .action-btn, .t-btn, .fd-btn, .fd-open, .fd-chip, .lp-btn, .doc-action, .commit-contact-btn,
      .calc-toggle-btn, .commit-toggle-opt, .nav-btn, .dm-close, .ll-button, [data-pk-lp-open], .focus-toolbar button, .focus-navigation button,
      .focus-queues button, [data-queue-sec] .t-btn, .crm-tab, .crm-section-btn, .ptab-sm, .hw-board,
      [data-li-view] button, [data-li-view] .btn, .li-geo-bar .btn, .li-ctx-list button, .seg button){
    min-height:36px !important; padding-top:6px !important; padding-bottom:6px !important; padding-left:12px !important; padding-right:12px !important;
    font-size:15px !important; line-height:1.2 !important; text-transform:none !important; letter-spacing:0 !important;
  }
  html:not(#z) body :is(.btn.small, .t-btn, .crm-phone-cell .crm-btn){ font-size:14px !important; }
  html:not(#z) body :is(.crm-btn, .action-btn){ white-space:nowrap; }
  /* icon buttons: 36px square */
  html:not(#z) body :is(.t-btn.icon, .t-more-btn, .focus-navigation button:first-child, .focus-navigation button:last-child, .modal-x){
    min-width:36px !important; width:36px; min-height:36px !important; height:36px; padding:0 !important; justify-content:center;
  }
  html:not(#z) body .focus-navigation{ gap:8px !important; margin:0 0 10px !important; }
  html:not(#z) body .focus-navigation button:nth-child(2){ height:36px; border-radius:999px; }
  html:not(#z) body .focus-periods{ padding:4px 0 8px !important; }
  html:not(#z) body .focus-periods + .focus-periods{ padding-top:0 !important; }
  html:not(#z) body .crm-toolbar{ gap:8px !important; }
  html:not(#z) body .crm-toolbar > .crm-btn{ flex:0 0 auto !important; width:auto !important; }
  html:not(#z) body .crm-toolbar > .filter-btn{ min-height:32px !important; height:32px; padding:0 12px !important; font-size:14px !important; text-transform:none !important; letter-spacing:0 !important; border-radius:999px !important; }
  html:not(#z) body .fd-acts .fd-btn{ width:auto !important; flex:1 1 0; }

  /* ── text inputs: 16px (no iOS zoom) ──────────────────────────────────────────────── */
  html:not(#z) body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=range]), select, textarea){ font-size:16px !important; }

  /* ── broker / landlord page: an app header, not a website masthead ─────────────────────── */
  html:not(#z) body.landlord-client .wrap{ padding:0 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important; }
  html:not(#z) body.landlord-client .wrap > header{ position:sticky; top:0; z-index:20; margin:0 -16px 12px !important; padding:calc(8px + env(safe-area-inset-top, 0px)) 16px 8px !important;
    min-height:52px; gap:8px; background:var(--ll-bg, #071321); border-bottom:1px solid var(--ll-border, #29445c) !important; }
  html:not(#z) body.landlord-client .brand{ font:650 17px/1.2 Inter, system-ui, sans-serif !important; letter-spacing:-.3px !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  html:not(#z) body.landlord-client .brand small{ display:none !important; }
  html:not(#z) body.landlord-client .wrap > header .btn{ min-height:32px !important; padding:0 12px !important; font-size:14px !important; border-radius:999px !important; }
  html:not(#z) body.landlord-client .foot{ margin-top:24px !important; font-size:11px !important; line-height:1.5 !important; opacity:.8; }
  html:not(#z) body.landlord-client h1{ font-size:22px !important; letter-spacing:-.4px !important; margin:8px 0 6px !important; }
  html:not(#z) body.landlord-client .sub{ font-size:14px; margin-bottom:12px !important; }
  html:not(#z) body.landlord-client .pnav{ margin:0 0 10px !important; }

  /* ── the landlord workspace (esc-landlord-inventory.js) ─────────────────────────────────── */
  html:not(#z) body [data-li-view]{ padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; }
  html:not(#z) body [data-li-view] .card{ padding:14px !important; border-radius:12px !important; margin:0 0 12px !important; }
  html:not(#z) body [data-li-company-header]{ padding:10px 12px !important; gap:10px !important; margin-bottom:10px !important; }
  html:not(#z) body [data-li-company-header] :is(h1, h2){ font-size:17px !important; margin:0 !important; }
  html:not(#z) body [data-li-company-header] :is([data-li-greeting], [data-li-company-name] + .muted){ display:none !important; }
  html:not(#z) body [data-li-company-logo]{ width:36px !important; height:36px !important; }
  html:not(#z) body *:has(> [data-li-company-pick]) > [data-li-company-header]{ display:none !important; }
  html:not(#z) body .li-banner{ padding:8px 12px !important; font-size:14px !important; margin-bottom:10px !important; display:flex !important; flex-wrap:wrap; align-items:center; gap:6px 8px; }
  html:not(#z) body .li-banner select{ flex:1 1 160px !important; width:auto !important; min-width:0 !important; margin:0 !important; }
  html:not(#z) body .li-banner .li-chip{ font-size:10px !important; }
  /* the top-level sections stay in reach while the page scrolls */
  html:not(#z) body [data-li-nav]{ position:sticky; top:calc(52px + env(safe-area-inset-top, 0px)); z-index:15; background:var(--ll-bg, #071321) !important; margin:0 -16px 10px !important; padding:6px 16px !important; max-width:none !important; width:auto !important; border-bottom:1px solid var(--ll-border, #29445c) !important; }
  html:not(#z) body [data-li-nav] button.on, html:not(#z) body .li-category-tabs button.on, html:not(#z) body .pnav button.on{ background:var(--ll-active, #64d7f0) !important; color:var(--ll-on-active, #062131) !important; border-color:transparent !important; }
  html:not(#z) body [data-li-view] .section-title{ padding:8px 12px !important; margin:16px 0 8px !important; font-size:13px !important; }
  html:not(#z) body [data-li-view] .section-title .btn{ min-height:32px !important; padding:0 10px !important; font-size:13px !important; }
  html:not(#z) body [data-li-view] .stats{ gap:8px !important; margin-bottom:12px !important; }
  html:not(#z) body [data-li-view] .stat{ padding:10px 12px !important; }
  html:not(#z) body [data-li-view] .stat b{ font-size:18px !important; }

  /* This week: one compact row per item -- badge, date, suite, chevron; the whole row opens the suite */
  html:not(#z) body .li-brief h2{ font-size:17px !important; }
  html:not(#z) body .li-brief h3{ font-size:13px !important; margin:12px 0 2px !important; text-transform:uppercase; letter-spacing:.04em; opacity:.8; }
  html:not(#z) body .li-brief li{ position:relative; display:flex !important; flex-wrap:wrap; align-items:center; gap:2px 8px !important; min-height:52px; padding:8px 28px 8px 0 !important; font-size:14px !important; }
  html:not(#z) body .li-brief li > .muted{ font-size:13px !important; }
  html:not(#z) body .li-brief li > .muted ~ .muted{ display:none; }
  html:not(#z) body .li-brief li > span:not(.muted):not(.li-chip){ flex:1 0 100%; order:5; }
  html:not(#z) body .li-brief li > .li-chip{ font-size:10px !important; padding:2px 7px !important; }
  html:not(#z) body .li-brief [data-li-brief-open]{ position:absolute !important; inset:0; min-height:0 !important; height:auto !important; padding:0 !important; margin:0 !important; border:0 !important; background:transparent !important;
    font-size:0 !important; color:transparent !important; border-radius:0 !important; display:block !important; align-self:stretch !important; max-width:none !important; }
  html:not(#z) body .li-brief [data-li-brief-open]::after{ content:'\203A'; position:absolute; right:4px; top:50%; transform:translateY(-50%); font-size:24px; line-height:1; color:var(--ll-secondary, #acc4d8); }
  html:not(#z) body .li-brief li > [data-li-brief-open] ~ .muted{ order:6; }

  /* the map: a small control strip -- the map type and "More"; the rest opens below */
  html:not(#z) body .li-geo-bar[data-li-geo-bar]{ flex-wrap:nowrap !important; gap:6px !important; padding:6px !important; overflow:hidden; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar] > *{ display:none !important; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar] > :is(.li-seg, [data-li-geo-more]){ display:inline-flex !important; flex:0 0 auto; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar] > [data-li-geo-more]{ margin-left:auto !important; order:9; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar].li-geo-open{ flex-wrap:wrap !important; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar].li-geo-open > *:not(div){ display:inline-flex !important; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar].li-geo-open > div{ display:block !important; flex:1 0 100%; }
  html:not(#z) body .li-geo-bar[data-li-geo-bar].li-geo-open > .muted{ flex:1 0 100%; font-size:12px; }
  html:not(#z) body .li-geo-bar .btn, html:not(#z) body .li-geo-bar button{ min-height:32px !important; padding:0 10px !important; font-size:13px !important; margin:0 !important; }
  html:not(#z) body .li-seg .btn{ border-radius:0 !important; }
  html:not(#z) body .li-seg .btn:first-child{ border-radius:999px 0 0 999px !important; }
  html:not(#z) body .li-seg .btn:last-child{ border-radius:0 999px 999px 0 !important; }
  html:not(#z) body [data-li-map-identity]{ font-size:13px; padding:4px 0 !important; }
  html:not(#z) body .li-ws-detail{ padding:10px 12px !important; }

  /* the buildings list: a tappable row (photo, name + address, one line of counts, chevron) */
  html:not(#z) body [data-li-buildings] tbody tr[data-li-building]{ display:grid !important; grid-template-columns:auto 44px minmax(0,1fr) 36px !important;
    grid-template-areas:"chk photo name open" "chk photo occ open" !important; gap:0 10px !important; padding:10px 8px 10px 10px !important; margin:0 0 8px !important; border-radius:12px !important; align-items:center; }
  html:not(#z) body [data-li-buildings] tbody tr[data-li-building] > td{ padding:0 !important; }
  html:not(#z) body [data-li-buildings] tbody tr[data-li-building] > td::before{ display:none !important; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > td:first-child{ grid-area:chk; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > .li-photo-col{ grid-area:photo; width:44px !important; min-width:44px !important; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] .li-thumb{ width:44px; height:44px; border-radius:8px; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > [data-li-property-name]{ grid-area:name; font-size:15px; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > [data-li-property-name] small{ display:none; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > [data-li-count-occupied]{ grid-area:occ; text-align:left !important; font-size:13px; color:var(--ll-secondary, #acc4d8); }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > [data-li-count-occupied]::after{ content:' occupied'; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > td:not(:first-child):not(.li-photo-col):not([data-li-property-name]):not([data-li-count-occupied]):not(:last-child){ display:none !important; }
  html:not(#z) body [data-li-buildings] tr[data-li-building] > td:last-child{ grid-area:open; }
  html:not(#z) body [data-li-buildings] [data-li-open-building]{ width:36px !important; min-width:36px !important; height:36px; padding:0 !important; font-size:0 !important; border:0 !important; background:transparent !important; }
  html:not(#z) body [data-li-buildings] [data-li-open-building]::after{ content:'\203A'; font-size:26px; line-height:1; color:var(--ll-secondary, #acc4d8); }

  html:not(#z) body [data-li-buildings] tr[data-li-building] > [data-li-property-name] :is(b, .li-inv-sub){ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  /* the occupancy filter tiles (Available / Occupied / Unknown / Source review): number and label on one line */
  html:not(#z) body [data-li-occupancy-pick]{ flex-direction:row !important; align-items:center !important; justify-content:flex-start !important; gap:8px !important; text-align:left; }
  html:not(#z) body [data-li-occupancy-pick] strong{ font-size:18px !important; }
  html:not(#z) body [data-li-view] .btn{ white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; align-self:center; }

  /* the stacking plan's suite blocks are cells of a plan, not buttons: they keep their 44px */
  html:not(#z):not(#y) body [data-li-view] .li-suite{ min-height:44px !important; }

  /* spaces, parcels and the vacancy planner: one card per suite, inputs labelled inside it */
  html:not(#z) body [data-li-plan]{ min-width:0 !important; display:block !important; background:transparent !important; border:0 !important; }
  html:not(#z) body [data-li-plan] thead{ display:none !important; }
  html:not(#z) body [data-li-plan] tbody{ display:grid !important; gap:10px; }
  html:not(#z) body [data-li-plan] tbody tr{ display:grid !important; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px 12px; padding:12px !important; border:1px solid var(--ll-border, #29445c); border-radius:12px; background:var(--ll-surface, #102438); }
  html:not(#z) body [data-li-plan] td{ display:block; padding:0 !important; border:0 !important; background:transparent !important; text-align:left !important; min-width:0; font-size:14px; }
  html:not(#z) body [data-li-plan] td:first-child{ grid-column:1 / -1; font-weight:700; font-size:15px; }
  html:not(#z) body [data-li-plan] td::before{ content:attr(data-li-column); display:block; font-size:11px; font-weight:600; color:var(--ll-secondary, #acc4d8); margin-bottom:2px; }
  html:not(#z) body [data-li-plan] td:first-child::before{ display:none; }
  html:not(#z) body [data-li-plan] input{ width:100% !important; min-width:0 !important; }
  html:not(#z) body [data-li-plan-wrap]{ overflow:visible !important; }
  html:not(#z) body :is([data-li-spaces], [data-li-parcels]) tbody tr{ padding:8px !important; gap:2px 8px !important; border-radius:12px !important; }
  html:not(#z) body :is([data-li-spaces], [data-li-parcels]) td{ padding:4px !important; font-size:14px; }

  /* the building is a detail screen: Back and its actions on one compact row; the company card and picker step aside */
  html:not(#z) body .li-bld-bar{ flex-wrap:nowrap !important; overflow-x:auto; scrollbar-width:none; gap:6px !important; margin:0 0 4px; }
  html:not(#z) body .li-bld-bar::-webkit-scrollbar{ display:none; }
  html:not(#z) body .li-bld-bar > .btn{ flex:0 0 auto; min-height:32px !important; padding:0 12px !important; font-size:14px !important; border-radius:999px !important; margin:0 !important; white-space:nowrap; }
  html:not(#z) body .li-bld-bar > [data-li-back]{ border:0 !important; background:transparent !important; padding-left:0 !important; font-weight:600; color:var(--ll-active, #64d7f0) !important; }
  html:not(#z) body *:has(> [data-li-body] [data-li-view="building"]) > :is([data-li-company-header], [data-li-company-pick]){ display:none !important; }
  html:not(#z):not(#y) body.landlord-client:has([data-li-view="building"]) .pnav{ display:none !important; }
  html:not(#z) body [data-li-view] .section-title{ flex-wrap:wrap; gap:6px 10px; }
  html:not(#z) body [data-li-view] .section-title .btn{ white-space:nowrap; }
  /* the building's sections: a compact tool row */
  html:not(#z) body [aria-label="Property tools"]{ position:sticky; top:calc(52px + env(safe-area-inset-top, 0px)); z-index:14; background:var(--ll-bg, #071321); padding:6px 0 !important; margin:0 0 10px !important; border-bottom:1px solid var(--ll-border, #29445c); }
  html:not(#z) body [aria-label="Property tools"] > button[aria-selected="true"], html:not(#z) body [aria-label="Property tools"] > button.on{ background:var(--ll-active, #64d7f0) !important; color:var(--ll-on-active, #062131) !important; }
  html:not(#z) body :is(.pe-seg > button, .li-ctx-bar .btn, [data-li-ctx-toggle]){ min-height:32px !important; padding:0 10px !important; font-size:13px !important; }
  html:not(#z) body .leaflet-touch .leaflet-bar a{ width:36px !important; height:36px !important; line-height:36px !important; }
  html:not(#z) body .maplibregl-ctrl-group button{ width:36px !important; height:36px !important; }
  html:not(#z) body [data-li-view] input[type=checkbox], html:not(#z) body [data-li-view] input[type=radio]{ width:20px !important; height:20px !important; min-width:20px !important; min-height:20px !important; }
  html:not(#z) body [data-li-view] summary{ min-height:40px !important; display:flex; align-items:center; }

  /* the app's own landlord tab (esc-app-landlord.js) */
  html:not(#z) body .ll-head{ margin-bottom:8px !important; }
  html:not(#z) body .ll-head h1{ font-size:24px !important; margin:0 !important; }
  html:not(#z) body .ll-head small{ display:none !important; }
  html:not(#z) body .ll-head-acts{ flex-wrap:nowrap !important; gap:6px !important; }
  html:not(#z) body .ll-head-acts .ll-button{ min-height:32px !important; padding:0 12px !important; font-size:14px !important; border-radius:999px !important; white-space:nowrap; }
  html:not(#z) body .ll-app{ padding-top:12px !important; }
  html:not(#z) body .ll-app h2{ font-size:18px !important; margin:16px 0 8px !important; }
  html:not(#z) body .ll-metrics button{ min-height:64px !important; padding:12px !important; border-radius:14px !important; }
  html:not(#z) body .ll-metrics b{ font-size:22px !important; }
  html:not(#z) body .ll-categories [aria-selected=true]{ box-shadow:none !important; }
  html:not(#z) body .ll-property{ min-height:72px !important; }

  /* Capital Calls (#p-capital): the deal picker on its own line, the two actions beside each other, the numbers two across */
  html:not(#z) body #p-capital .sec-header > div:last-child{ flex-wrap:wrap !important; width:100%; }
  html:not(#z) body #p-capital #cc-deal-picker{ flex:1 1 100% !important; min-width:0 !important; }
  html:not(#z) body #p-capital .sec-header > div:last-child > .btn{ flex:1 1 0; white-space:nowrap; }
  html:not(#z) body #cc-summary > div[style*="1fr 1fr 1fr 160px"]{ grid-template-columns:1fr 1fr !important; }
  /* Finder: its type chips are chips */
  html:not(#z) body .fd-chip{ min-height:32px !important; height:32px; padding:0 12px !important; font-size:14px !important; border-radius:999px !important; }
}
