/* Tour Lab 3.3.160 — shared spacing and responsive layout refinements.
   This is the last presentation layer on each host page. Layout rules are
   screen-only so proposal/print exports retain their existing styles. */
:root{
 --tl-space-1:4px;--tl-space-2:8px;--tl-space-3:12px;--tl-space-4:16px;
 --tl-space-5:20px;--tl-space-6:24px;--tl-space-8:32px;
}
@media screen {
/* ===== cards-dialogs.css ===== */
/* Home-card density follows available space; content keeps its natural height. */
body #mainContent #page-tour#page-tour .ct-unit-rows{gap:8px!important}
body #mainContent #page-tour#page-tour .ct-home-row.ct-home-card{
 --tl-card-inset:14px;--tl-card-heading:1.5rem;--tl-card-gap:10px;
 flex:none!important;min-height:0!important;max-height:none!important;height:auto!important;
 grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;
 gap:var(--tl-card-gap) 16px!important;padding:var(--tl-card-inset)!important;margin:0!important;
}
body #mainContent #page-tour#page-tour .ct-card-identity{gap:5px 8px;align-content:start}
body #mainContent #page-tour#page-tour .ct-card-eyebrow{display:none}
body #mainContent #page-tour#page-tour .ct-card-unit{font-size:var(--tl-card-heading)!important;line-height:1.15}
body #mainContent #page-tour#page-tour .ct-card-status{font-size:.8125rem;padding:3px 6px;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-identity>small{line-height:1.4;font-size:.875rem}
body #mainContent #page-tour#page-tour .ct-card-timing{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:3px 6px;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-timing>small{font-size:.875rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-timing>strong{font-size:.9375rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-timing>span{flex-basis:100%;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-features{max-width:none;margin-top:0;font-size:.875rem}
body #mainContent #page-tour#page-tour .ct-card-pricing{gap:4px;align-items:flex-start;text-align:left;font-size:.875rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-rate{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 8px;max-width:100%}
body #mainContent #page-tour#page-tour .ct-card-price-label{font-size:.875rem;color:#617084;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-rate>strong{font-size:var(--tl-card-heading);font-weight:700;line-height:1.2;letter-spacing:-.035em;color:#26364b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body #mainContent #page-tour#page-tour .ct-card-rate>strong>small{font-size:.875rem;font-weight:500;letter-spacing:0;color:#617084;margin-left:3px}
body #mainContent #page-tour#page-tour .ct-card-lease{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-pricing .ct-card-offer{margin:0;padding:3px 6px;font-size:.8125rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-twelve{font-size:.8125rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-effective{margin-top:1px;font-size:.9375rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-effective>small{font-size:.8125rem;line-height:1.4}
body #mainContent #page-tour#page-tour .ct-card-actions{gap:8px;padding-top:10px}
body #mainContent #page-tour#page-tour .ct-card-actions>button{height:auto!important;min-height:44px!important;padding:8px 10px!important;font-size:.875rem!important;line-height:1.4;white-space:normal}
body #mainContent #page-tour#page-tour .ct-card-restrictions{margin:0;padding:8px 10px;font-size:.875rem;line-height:1.4}
@container tour-homes (min-width:640px){
 body #mainContent #page-tour#page-tour .ct-home-row.ct-home-card{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) 144px!important;grid-template-rows:auto auto!important;gap:8px 14px!important}
 body #mainContent #page-tour#page-tour .ct-card-actions{grid-column:3!important;grid-row:1/3!important;flex-direction:column!important;align-self:center;border:0;padding-top:0}
 body #mainContent #page-tour#page-tour .ct-card-restrictions{grid-row:3!important}
}
@media(max-height:780px){
 body #mainContent #page-tour#page-tour .ct-home-row.ct-home-card{--tl-card-inset:10px 12px;--tl-card-heading:1.375rem;--tl-card-gap:7px}
 body #mainContent #page-tour#page-tour .ct-card-identity{gap:4px 7px}
 body #mainContent #page-tour#page-tour .ct-card-pricing{gap:3px}
}
@media(max-width:540px){
 body #mainContent #page-tour#page-tour .ct-home-row.ct-home-card{--tl-card-inset:12px;--tl-card-heading:1.375rem;gap:10px 12px!important}
 body #mainContent #page-tour#page-tour .ct-card-rate{align-items:flex-start;flex-direction:column;gap:2px}
 body #mainContent #page-tour#page-tour .ct-card-actions>button{padding-inline:8px!important}
}
@media(max-width:540px) and (max-height:780px){
 body #mainContent #page-tour#page-tour .ct-home-row.ct-home-card{--tl-card-inset:10px 12px}
}

/* The home dialog uses the same compact rhythm without changing its sections. */
body #unitEditDialog .unit-edit-head,body.compact-experience #unitEditDialog .unit-edit-head{padding:var(--tl-space-5)!important;gap:var(--tl-space-3)}
body #unitEditDialog .unit-edit-head h2{font-size:1.625rem;margin-bottom:6px}
body #unitEditDialog .unit-home-status{padding:var(--tl-space-4) var(--tl-space-5) var(--tl-space-3);gap:8px 12px}
body #unitEditDialog .unit-website-pricing,body.compact-experience #unitEditDialog .unit-website-pricing{margin:0 var(--tl-space-5) var(--tl-space-4)!important;padding:var(--tl-space-4)!important}
body #unitEditDialog .unit-price-top{gap:var(--tl-space-4)}
body #unitEditDialog .unit-price-base>strong{font-size:1.875rem}
body #unitEditDialog .unit-price-net{padding-left:var(--tl-space-4)}
body #unitEditDialog .unit-price-net>strong{font-size:1.5rem}
body #unitEditDialog .unit-price-offer{margin-top:var(--tl-space-3);padding-top:var(--tl-space-3);gap:8px}
body #unitEditDialog .unit-home-overview,body.compact-experience #unitEditDialog .unit-home-overview,body #unitEditDialog #unitFloorplanMeasurements{padding:0 var(--tl-space-5) var(--tl-space-4)!important}
body #unitEditDialog .unit-overview-grid,body.compact-experience #unitEditDialog .unit-overview-grid{gap:var(--tl-space-3)!important}
body #unitEditDialog .unit-overview-grid small,body.compact-experience #unitEditDialog .unit-overview-grid small{font-size:.875rem!important}
body #unitEditDialog .preview-home-disclosure>summary,body.compact-experience #unitEditDialog .preview-home-disclosure>summary{padding:14px var(--tl-space-5)!important;min-height:52px!important;gap:4px 12px}
body #unitEditDialog .unit-pricing-section{padding:0 var(--tl-space-5) var(--tl-space-4)}
body #unitEditDialog .unit-edit-grid{padding:var(--tl-space-3) var(--tl-space-5) 0;gap:var(--tl-space-3)}
body #unitEditDialog .unit-notes-access,body #unitEditDialog .unit-edit-warning,body #unitEditDialog .unit-note-field,body #unitEditDialog .unit-edit-status-message{margin-inline:var(--tl-space-5)}
body #unitEditDialog .unit-staff-actions{padding:var(--tl-space-3) var(--tl-space-5) 0;gap:var(--tl-space-2)}
body #unitEditDialog .unit-edit-actions{padding:var(--tl-space-3) var(--tl-space-5) calc(var(--tl-space-3) + env(safe-area-inset-bottom,0px));gap:var(--tl-space-3)}
@media(max-width:600px){
 body #unitEditDialog,body.compact-experience #unitEditDialog{--tl-space-5:16px;max-width:100%!important}
 body #unitEditDialog .unit-edit-head,body.compact-experience #unitEditDialog .unit-edit-head{padding-block:16px!important}
 body #unitEditDialog .unit-price-base>strong{font-size:1.625rem}
 body #unitEditDialog .unit-price-top{gap:12px}
 body #unitEditDialog .unit-price-net{padding-left:12px}
 body #unitEditDialog .unit-price-net>strong{font-size:1.375rem}
}
@media(max-width:360px){
 body #unitEditDialog .unit-price-top{grid-template-columns:minmax(0,1fr)}
 body #unitEditDialog .unit-price-net{border-left:0;border-top:1px solid #e1dbe9;padding-left:0;padding-top:12px}
}

/* Secondary inventory, specials and administration keep the same spacing scale. */
body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data)>.page-heading{margin-bottom:var(--tl-space-4);gap:var(--tl-space-4);flex-wrap:wrap}
body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data) .page-heading h1{font-size:clamp(1.5rem,2.4vw,1.875rem);margin:0 0 6px}
body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data) .panel{padding:var(--tl-space-4);margin-bottom:var(--tl-space-4);min-width:0}
body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data) .panel-head{gap:var(--tl-space-3);margin-bottom:var(--tl-space-3);flex-wrap:wrap}
body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data) .section-callout{padding:var(--tl-space-4);gap:var(--tl-space-3);margin-block:var(--tl-space-3)}
body #mainContent :is(#page-availability,#page-vacancies,#page-potential) .workflow-next{gap:var(--tl-space-2);padding-top:var(--tl-space-4);flex-wrap:wrap}
body #page-availability .filter-bar{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:var(--tl-space-3);padding:var(--tl-space-3);align-items:end}
body #page-availability .filter-bar>label{min-width:0}
body #page-availability .filter-bar :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:44px;font-size:1rem}
body #page-availability .filter-bar>.button{min-height:44px;white-space:normal;margin:0}
body #page-specials .specials-standard-control{gap:var(--tl-space-3)}
body #page-specials .specials-standard-control>label{flex:1 1 140px;min-width:0}
body #page-specials .specials-standard-control input{width:100%;min-height:44px}
body #page-specials .specials-step{margin-bottom:var(--tl-space-3);gap:var(--tl-space-2)}
body #page-specials .specials-savebar{padding:var(--tl-space-3) var(--tl-space-4);gap:var(--tl-space-3)}
body #page-specials .specials-savebar .specials-step{margin:0}
body #page-specials .specials-savebar :is(input,button){min-height:44px}
body #page-specials .specials-extra-check{min-height:44px}
body .app-dialog .app-dialog-head{padding:var(--tl-space-4) var(--tl-space-5);gap:var(--tl-space-3);align-items:flex-start}
body .app-dialog .app-dialog-head h2{font-size:1.25rem;line-height:1.35}
body .app-dialog .dialog-close{flex:none;min-width:44px;min-height:44px}
body .app-dialog .app-dialog-body{padding:var(--tl-space-4) var(--tl-space-5)}
body .app-dialog .app-dialog-actions{gap:var(--tl-space-2);padding:var(--tl-space-3) var(--tl-space-5);flex-wrap:wrap}
body .app-dialog .app-dialog-actions .button{min-height:44px;height:auto;white-space:normal}
body #bulkSpecialDialog .bulk-special-shell{width:100%;max-width:100%;box-sizing:border-box}
body #bulkSpecialDialog .bulk-special-units,body #bulkSpecialDialog .bulk-special-offer{padding:var(--tl-space-4)}
body #bulkSpecialDialog .bulk-special-unit-tools{gap:var(--tl-space-3);margin-bottom:var(--tl-space-3)}
body #bulkSpecialDialog .bulk-special-unit-tools :is(input,select){min-height:44px;font-size:1rem;min-width:0;max-width:100%}
body #bulkSpecialDialog .bulk-special-unit{min-height:48px;gap:var(--tl-space-2);padding:10px 12px}
body #bulkSpecialDialog .bulk-special-unit small{white-space:normal;overflow-wrap:anywhere}
body #bulkSpecialDialog .bulk-special-actions{gap:var(--tl-space-2);flex-wrap:wrap}
body #bulkSpecialDialog .bulk-special-actions .button{height:auto;min-height:44px;white-space:normal}
body #pricingHistoryDialog .pricing-history-body{padding:var(--tl-space-4) var(--tl-space-5) var(--tl-space-2)}
body #pricingHistoryDialog .pricing-history-footer{padding:var(--tl-space-3) var(--tl-space-5);gap:var(--tl-space-3);flex-wrap:wrap}
@media(max-width:600px){
 body .app-dialog{--tl-space-5:16px}
 body #mainContent :is(#page-availability,#page-vacancies,#page-potential,#page-specials,#page-data) .panel{padding:var(--tl-space-3)}
 body #mainContent :is(#page-availability,#page-vacancies,#page-potential) .workflow-next>.button{flex:1 1 140px;min-height:44px;white-space:normal}
 body #page-specials .specials-savebar>label{flex:1 1 100%;min-width:0}
 body #page-specials .specials-savebar>label input{flex:1;min-width:0}
 body #pricingHistoryDialog .pricing-history-body{padding-inline:16px}
}

/* ===== tour-workspace.css ===== */
/* Tour workspace spacing. Loaded after the legacy layout layers.
   Home-card density, gateway, dialogs and measurement surfaces are owned separately.
   Keep native hidden/open hooks and the accordion controller authoritative. */

/* Named header controls keep their hit area without increasing the logo row. */
body #tlWorkspaceHeader {
  gap:var(--tl-space-2)!important;
  padding-block:var(--tl-space-1)!important;
  min-height:56px!important;
  max-height:none!important;
}
body #tlWorkspaceHeader>.tl-header-actions { gap:var(--tl-space-1)!important; }
body #tlWorkspaceHeader #tourLabBrand .leaselabs-logo-frame { max-width:100%!important; }
body #tlWorkspaceHeader :is(#tlWorkspaceBack,#showModeTop,#compactHeaderToggle) {
  min-height:44px!important;
  height:auto!important;
  line-height:1.35!important;
}
body #tlWorkspaceHeader :is(#tlWorkspaceBack,#showModeTop) {
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:14px!important;
}
body #tlWorkspaceHeader #compactHeaderToggle { width:44px!important; min-width:44px!important; }
body #tlWorkspaceHeader>.team-profile { min-width:0!important; margin:0!important; }
body #tlWorkspaceHeader>.team-profile select {
  height:44px!important;
  min-height:44px!important;
  max-height:none!important;
  font-size:16px!important;
  line-height:1.25!important;
}
body.compact-experience #tlWorkspaceHeader #tourHeaderTools {
  gap:var(--tl-space-1)!important;
  padding:var(--tl-space-2)!important;
  scroll-padding-block:var(--tl-space-2);
}
body.compact-experience #tlWorkspaceHeader #tourHeaderTools :is(button,a,summary) {
  flex-shrink:0!important;
  min-height:44px!important;
  height:auto!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:14px!important;
  line-height:1.45!important;
}
body.compact-experience #tlWorkspaceHeader #tourHeaderTools :is(#tourSyncStatus,#syncSummary) {
  min-height:44px!important;
  font-size:14px!important;
}

/* Stage headers stay compact at one line, then grow when their text wraps. */
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-accordion-stage {
  margin-bottom:var(--tl-space-1)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-accordion-stage>.ct-step-toggle {
  height:auto!important;
  min-height:44px!important;
  max-height:none!important;
  flex:0 0 auto!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  gap:var(--tl-space-2)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-toggle .ct-step-copy {
  min-width:0!important;
  gap:var(--tl-space-1) var(--tl-space-3)!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-toggle .ct-step-copy>strong {
  position:static!important;
  inset:auto!important;
  transform:none!important;
  flex:0 1 auto!important;
  width:auto!important;
  margin:0!important;
  font-size:14px!important;
  line-height:1.4!important;
  letter-spacing:0!important;
  text-transform:none!important;
  text-align:left!important;
  white-space:normal!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-toggle .ct-step-copy>small {
  flex:0 1 auto!important;
  max-width:100%!important;
  margin-left:auto!important;
  font-size:14px!important;
  line-height:1.4!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  text-align:right!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-num,
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-arrow { flex-shrink:0!important; }
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourFlow>.ns-followup-shortcut {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:44px!important;
  max-height:none!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  margin:0 0 var(--tl-space-2)!important;
  line-height:1.4!important;
  white-space:normal!important;
}

/* Intake uses one 12px panel rhythm and 8px related-field spacing. */
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details:not([hidden]) {
  gap:var(--tl-space-3)!important;
  padding:var(--tl-space-2) 0!important;
  scroll-padding-block:var(--tl-space-3);
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details>.tour-setup-panel { gap:var(--tl-space-3)!important; }
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-setup-section,.tl-inline-preferences,.tl-inline-notes) {
  padding:var(--tl-space-3)!important;
  min-width:0!important;
  max-width:100%!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-setup-section-title,.tl-inline-preferences h3,.tl-inline-notes h3) {
  height:auto!important;
  min-height:0!important;
  margin:0 0 var(--tl-space-2)!important;
  padding:0 0 var(--tl-space-2)!important;
  font-size:14px!important;
  line-height:1.4!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details .tour-setup-section-title strong {
  font-size:14px!important;
  line-height:1.4!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-preference-stack,.tour-core-preferences) { gap:var(--tl-space-2)!important; }
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details .two-fields {
  min-width:0!important;
  gap:var(--tl-space-2)!important;
  margin:0 0 var(--tl-space-2)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-setup-section,.tl-inline-preferences,.tl-inline-notes) label {
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  gap:var(--tl-space-1)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-setup-section,.tl-inline-preferences,.tl-inline-notes) :is(label>span,.field-label) {
  min-height:0!important;
  margin:0!important;
  font-size:14px!important;
  line-height:1.4!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details :is(.tour-setup-section,.tl-inline-preferences) :is(input:not([type=checkbox]):not([type=radio]),select) {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:44px!important;
  min-height:44px!important;
  max-height:none!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:16px!important;
  line-height:1.25!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details .chip-select {
  gap:var(--tl-space-1)!important;
  margin-block:var(--tl-space-1)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details .chip-select button {
  min-height:44px!important;
  height:auto!important;
  max-height:none!important;
  padding:var(--tl-space-2)!important;
  font-size:14px!important;
  line-height:1.35!important;
  white-space:normal!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #resetTourPrefsBtn {
  min-height:44px!important;
  padding:var(--tl-space-2)!important;
  font-size:14px!important;
  line-height:1.35!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #tour-details .tl-inline-notes #tourGeneralNotes {
  min-height:88px!important;
  height:88px!important;
  max-height:none!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:16px!important;
  line-height:1.5!important;
  resize:vertical!important;
}

/* Filters never shrink or clip beneath their own 44px controls. */
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-body:not([hidden]) { gap:var(--tl-space-1)!important; }
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour :is(.ns-group-tabs,.ct-type-picker) {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  gap:var(--tl-space-1)!important;
  padding:var(--tl-space-1)!important;
  margin:0 0 var(--tl-space-1)!important;
  align-items:stretch!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour :is(.ns-group-tabs>.ns-group-btn,.ct-type-picker>button) {
  min-height:44px!important;
  height:auto!important;
  max-height:none!important;
  padding:var(--tl-space-2)!important;
  gap:var(--tl-space-1)!important;
  font-size:14px!important;
  line-height:1.35!important;
  white-space:normal!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour :is(.ns-group-btn>small,.ct-bedroom-count) {
  font-size:14px!important;
  line-height:1.25!important;
  flex-shrink:0!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list>.ct-floorplan:not([open]):not([data-compact-hidden]) {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-floorplan>summary {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:48px!important;
  max-height:none!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  gap:var(--tl-space-2)!important;
  line-height:1.4!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-compact-pager:not([hidden]) {
  flex:0 0 auto!important;
  height:auto!important;
  min-height:44px!important;
  max-height:none!important;
  gap:var(--tl-space-2)!important;
  margin-top:var(--tl-space-1)!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-compact-pager>button {
  min-height:44px!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:14px!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-no-results {
  margin:0!important;
  padding:var(--tl-space-4) var(--tl-space-3)!important;
  font-size:14px!important;
  line-height:1.5!important;
}

/* One list scroll owner on the fixed-height workspace; no nested list scrolls. */
@media screen and (min-width:601px) and (min-height:561px) {
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list:not(:has(>.ct-floorplan[open])) {
    gap:var(--tl-space-1)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scroll-padding-block:var(--tl-space-2);
  }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list:has(>.ct-floorplan[open]) { overflow:hidden!important; }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list:has(>.ct-floorplan[open])>.ct-floorplan[open] {
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-floorplan[open] .ct-unit-rows {
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    scroll-padding-block:var(--tl-space-2);
  }
}

/* Selected-home drawers reserve only their actual measured height. */
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar {
  padding:var(--tl-space-2) max(var(--tl-space-3),env(safe-area-inset-right)) calc(var(--tl-space-2) + env(safe-area-inset-bottom)) max(var(--tl-space-3),env(safe-area-inset-left))!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar .ct-bar-inner { gap:0 var(--tl-space-2)!important; }
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar .ct-bar-expand {
  min-height:44px!important;
  height:auto!important;
  padding:var(--tl-space-2) var(--tl-space-3)!important;
  font-size:14px!important;
  line-height:1.4!important;
  white-space:normal!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar .ct-bar-chips {
  gap:var(--tl-space-2)!important;
  max-height:none!important;
  padding:var(--tl-space-2) 0 0!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar :is(.ct-bar-chip,.ct-bar-chips>small) {
  flex-shrink:0!important;
  font-size:14px!important;
  line-height:1.4!important;
}
body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourBar .ct-bar-chip small { font-size:14px!important; }

/* Live tour is a document; spacing and wrapping do not cap any stop's height. */
body.workspace-on #mainContent #page-live-tour .live-tour-heading { gap:var(--tl-space-3); margin-bottom:var(--tl-space-4); }
body.workspace-on #mainContent #page-live-tour :is(.live-tour-heading-actions,.live-current-actions) { gap:var(--tl-space-2); }
body.workspace-on #mainContent #page-live-tour .live-tour-summary { gap:var(--tl-space-2); margin-bottom:var(--tl-space-4); }
body.workspace-on #mainContent #page-live-tour .live-tour-summary>div { min-width:0; gap:var(--tl-space-1); padding:var(--tl-space-3); }
body.workspace-on #mainContent #page-live-tour :is(.live-summary-label,.live-tour-summary strong,.live-current-meta,.live-stop-main small,.live-stop-ready,.live-current-note>span,.live-stop-note>span) {
  font-size:14px!important;
  line-height:1.45!important;
  overflow-wrap:anywhere;
}
body.workspace-on #mainContent #page-live-tour .live-summary-label { letter-spacing:0; text-transform:none; }
body.workspace-on #mainContent #page-live-tour :is(.live-current-panel>.panel-head,.live-tour-route-panel>.panel-head,.live-current-card,.live-tour-stop) { padding:var(--tl-space-4)!important; }
body.workspace-on #mainContent #page-live-tour :is(.live-current-panel>.panel-head,.live-tour-route-panel>.panel-head) { gap:var(--tl-space-3); flex-wrap:wrap; }
body.workspace-on #mainContent #page-live-tour .live-stop-select { min-height:44px; height:auto; gap:var(--tl-space-2); }
body.workspace-on #mainContent #page-live-tour .live-stop-main { gap:var(--tl-space-1); }
body.workspace-on #mainContent #page-live-tour .live-stop-main strong { font-size:16px; line-height:1.4; }
body.workspace-on #mainContent #page-live-tour .live-stop-ready { white-space:normal; }
body.workspace-on #mainContent #page-live-tour .tour-critical-grid { gap:var(--tl-space-2)!important; margin-block:var(--tl-space-3)!important; }
body.workspace-on #mainContent #page-live-tour .tour-critical-grid>span { padding:var(--tl-space-3)!important; gap:var(--tl-space-1)!important; }
body.workspace-on #mainContent #page-live-tour :is(.tour-critical-grid>span>small,.tour-critical-grid>span strong,.tour-nlr-button em,.staff-tour-estimate small,.price-compare-item>b) {
  font-size:14px!important;
  line-height:1.45!important;
  letter-spacing:0!important;
}
body.workspace-on #mainContent #page-live-tour :is(.live-current-note,.live-stop-note) { gap:var(--tl-space-1); margin-top:var(--tl-space-3); }
body.workspace-on #mainContent #page-live-tour :is(.live-current-note textarea,.live-stop-note textarea) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  min-height:88px;
  padding:var(--tl-space-2) var(--tl-space-3);
  font-size:16px;
  line-height:1.5;
  resize:vertical;
}
body.workspace-on #mainContent #page-live-tour .live-stop-note textarea { min-height:72px; }
body.workspace-on #mainContent #page-live-tour :is(.live-tour-heading-actions>.button,.live-current-actions>.button,.live-current-card>a.button) {
  min-height:44px;
  height:auto;
  padding:var(--tl-space-2) var(--tl-space-3);
  font-size:14px;
  line-height:1.4;
  white-space:normal;
}

@media screen and (max-width:600px) {
  body #tlWorkspaceHeader { gap:var(--tl-space-1) var(--tl-space-2)!important; }
  body #tlWorkspaceHeader :is(#tlWorkspaceBack,#showModeTop) { padding-inline:var(--tl-space-2)!important; }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-step-toggle { top:0!important; }
  body.workspace-on.ns-fit-active:not(.tl-gateway-open) #mainContent.shell {
    padding:var(--tl-space-2) var(--tl-space-3) calc(var(--ct-dock-height,64px) + var(--tl-space-3))!important;
  }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-accordion-stage { margin-bottom:0!important; }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour #compactTourFlow { gap:var(--tl-space-2)!important; }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-floorplan>summary { padding-inline:var(--tl-space-2)!important; gap:var(--tl-space-1)!important; }
  body.workspace-on #mainContent #page-live-tour :is(.live-stop-pricing,.live-stop-note) { margin-left:0; }
}

/* In short landscape windows, a single document scroll keeps every control reachable.
   This follows the phone strategy; nothing scales text or suppresses content. */
@media screen and (min-width:601px) and (max-height:560px) {
  html:has(body.workspace-on.ns-fit-active:not(.tl-gateway-open)) { height:auto!important; overflow-x:hidden!important; overflow-y:auto!important; }
  body.workspace-on.ns-fit-active:not(.tl-gateway-open) {
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
  }
  body.workspace-on.ns-fit-active:not(.tl-gateway-open) #mainContent.shell {
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:var(--tl-space-2) var(--tl-space-3) calc(var(--ct-dock-height,64px) + var(--tl-space-3))!important;
  }
  body.workspace-on.ns-fit-active:not(.tl-gateway-open) #mainContent #page-tour#page-tour.active {
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.workspace-on.ns-fit-active:not(.ns-accordion-running) #mainContent #page-tour#page-tour :is(#ctIntakeStage,#compactTourFlow,#ctAvailableStage,#ctVacantsStage) {
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  body.workspace-on.ns-fit-active:not(.ns-accordion-running) #mainContent #page-tour#page-tour #ctIntakeStage.ct-current #tour-details:not([hidden]),
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour :is(.ct-step-body:not([hidden]),.ct-section[open],.ct-group-content,.ct-type:not([data-compact-hidden]),.ct-plan-list,.ct-floorplan[open],.ct-unit-rows) {
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list:has(>.ct-floorplan[open]),
  body.workspace-on.ns-fit-active #mainContent #page-tour#page-tour .ct-plan-list:has(>.ct-floorplan[open])>.ct-floorplan[open] { flex:0 0 auto!important; overflow:visible!important; }
}

body.workspace-on.ns-fit-active.keyboard-open #mainContent.shell { padding-bottom:var(--tl-space-2)!important; }

/* ===== followup-prospects.css ===== */
/* 3.3.160 — follow-up and prospect spacing.
   Load after the existing presentation layers. Keep pane visibility and email
   document styles with their current owners. The few !important declarations
   below replace reviewed, older !important size/grid rules in styles.css and
   prospects-polish.css; they do not change sending or selection behavior. */

/* Shared text-like controls within these workspaces and the prospect editor.
   Keep native checkbox/radio, slider, color, and file controls outside this rule. */
:is(#page-followup, #page-prospects, #prospectEditDialog)
  :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"],
    input[type="tel"], input[type="number"], input[type="date"], select, textarea):not([hidden]) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  line-height: 1.4;
}
:is(#page-followup, #page-prospects, #prospectEditDialog) label > span:first-child {
  margin: 0 0 var(--tl-space-2, 8px);
  font-size: 12px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}
:is(#page-followup, #page-prospects) .two-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tl-space-3, 12px);
}
:is(#page-followup, #page-prospects) .three-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tl-space-3, 12px);
}
:is(#page-followup, #page-prospects) :is(.panel-head, .page-heading) {
  gap: var(--tl-space-3, 12px);
}
:is(#page-followup, #page-prospects) .panel-head,
body.compact-experience #page-followup .panel-head {
  padding: var(--tl-space-4, 16px);
}
:is(#page-followup, #page-prospects) .panel-sub {
  margin: var(--tl-space-1, 4px) 0 0;
  line-height: 1.5;
}
:is(#page-followup, #prospectEditDialog) .checkbox-card {
  min-height: 44px;
  gap: var(--tl-space-2, 8px);
  padding: var(--tl-space-3, 12px);
}
:is(#page-followup, #prospectEditDialog) .checkbox-card input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
}
:is(#page-followup, #prospectEditDialog) .checkbox-card small {
  margin-top: var(--tl-space-1, 4px);
  line-height: 1.45;
}

/* Follow-up setup: consistent panel rhythm in both split and tabbed layouts. */
#page-followup .followup-page-heading,
body.compact-experience #page-followup .followup-page-heading {
  margin-bottom: var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#page-followup > #openShortlist {
  max-width: 100%;
  min-height: 44px;
  margin-bottom: var(--tl-space-3, 12px);
  white-space: normal;
}
#page-followup .mailbox-badge {
  max-width: 100%;
  overflow-wrap: anywhere;
}
#page-followup .rich-followup-layout {
  grid-template-columns: minmax(300px, .9fr) minmax(0, 1.35fr);
  gap: var(--tl-space-4, 16px);
}
#page-followup .followup-builder {
  gap: 0;
}
#page-followup .followup-builder > .panel {
  margin: 0;
}
#page-followup .followup-builder > :not(:first-child) {
  margin-top: var(--tl-space-4, 16px);
}
#page-followup .form-panel {
  padding-bottom: var(--tl-space-4, 16px);
}
#page-followup .form-panel > :is(.two-fields, .three-fields, label, .selected-summary) {
  margin-inline: var(--tl-space-4, 16px);
  margin-top: var(--tl-space-3, 12px);
}
#page-followup .form-panel > .followup-available-picker {
  gap: 0;
  margin-bottom: var(--tl-space-3, 12px);
}
#page-followup .followup-available-picker small {
  margin-top: var(--tl-space-2, 8px);
  line-height: 1.45;
}
#page-followup .sender-lock {
  min-width: 0;
  min-height: 0;
  padding: var(--tl-space-3, 12px);
  overflow-wrap: anywhere;
}
#page-followup .sender-lock > strong {
  margin-top: var(--tl-space-1, 4px);
}
#page-followup .note-safety {
  margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px) 0;
  padding: var(--tl-space-3, 12px);
}
#page-followup .note-safety > label {
  margin-top: var(--tl-space-3, 12px);
}
#page-followup .note-safety-head {
  gap: var(--tl-space-2, 8px);
}
body.compact-experience #page-followup #followupNotesDisclosure > summary {
  min-height: 44px;
}
body.compact-experience #page-followup #followupNotesDisclosure[open] > summary {
  margin-bottom: 0;
}
body.compact-experience #page-followup #followupNotesDisclosure:not([open]) {
  padding-block: var(--tl-space-1, 4px);
}
#page-followup .note-safety-copy {
  margin-top: var(--tl-space-2, 8px);
}
#page-followup .internal-unit-notes {
  margin-top: var(--tl-space-3, 12px);
  padding-top: var(--tl-space-2, 8px);
}
#page-followup .internal-unit-note {
  gap: var(--tl-space-2, 8px);
  padding-block: var(--tl-space-2, 8px);
  overflow-wrap: anywhere;
}
#page-followup .followup-options > summary {
  min-height: 44px;
  gap: var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
}
#page-followup .followup-options-body {
  padding: var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#page-followup .followup-options-body > :is(p, small) {
  margin: 0;
  line-height: 1.5;
}
#page-followup .followup-options-body label > span:first-child {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
#page-followup .selected-summary {
  padding: var(--tl-space-3, 12px);
}
#page-followup .followup-selection-head {
  gap: var(--tl-space-1, 4px);
}
#page-followup .followup-selection-head span,
#page-followup .followup-email-summary-row.compact small {
  font-size: 12px;
  line-height: 1.45;
}
#page-followup .followup-selected-details {
  margin-top: var(--tl-space-3, 12px);
}
#page-followup .followup-selected-details > summary {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  font-size: 12px;
}
#page-followup .followup-selected-details-body {
  padding: var(--tl-space-3, 12px);
  gap: var(--tl-space-3, 12px);
}
#page-followup .followup-home-group {
  gap: var(--tl-space-2, 8px);
}
#page-followup .followup-email-summary-row.compact {
  gap: var(--tl-space-3, 12px);
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
}
#page-followup .followup-email-summary-row.compact strong {
  font-size: 13px;
}
#page-followup .followup-email-summary-row > span {
  overflow-wrap: anywhere;
}
#page-followup .followup-email-summary-row [data-remove-email-unit] {
  flex: 0 0 auto;
  min-height: 44px;
}

/* Layout choices use the same rhythm without making every chip a large card. */
#page-followup .potential-floorplan-panel {
  padding: var(--tl-space-4, 16px) !important;
}
#page-followup .potential-floorplan-heading p {
  margin-bottom: var(--tl-space-3, 12px);
}
#page-followup .floorplan-multiselect > summary {
  min-height: 44px;
  padding: var(--tl-space-3, 12px);
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
}
#page-followup .floorplan-dropdown-body {
  padding-inline: var(--tl-space-3, 12px);
  padding-bottom: var(--tl-space-3, 12px);
  scroll-padding-block: var(--tl-space-3, 12px);
}
#page-followup .floorplan-option-heading {
  flex-wrap: wrap;
  margin: var(--tl-space-3, 12px) 0 var(--tl-space-2, 8px);
}
#page-followup :is(.floorplan-option-grid, .quote-unit-picker) {
  gap: var(--tl-space-2, 8px);
}
#page-followup :is(.floorplan-choice, .quote-unit-star, .waitlist-floorplan-choice,
  .selected-floorplan-chips button, .floorplan-option-heading button, .potential-settings-link) {
  min-height: 44px;
  padding: var(--tl-space-2, 8px);
  line-height: 1.35;
}
#page-followup .floorplan-choice {
  min-width: 0;
  overflow-wrap: anywhere;
}
#page-followup .selected-floorplan-chips {
  margin-block: var(--tl-space-3, 12px);
  gap: var(--tl-space-2, 8px);
}
#page-followup .potential-floorplan-footer {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
  padding-top: var(--tl-space-2, 8px);
}
#page-followup .pricing-star-intro {
  line-height: 1.5;
}
#page-followup .quote-unit-picker {
  margin-top: 0;
}
#page-followup .quote-unit-star strong {
  font-size: 12px;
}
#page-followup .quote-unit-star small {
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#page-followup .waitlist-followup-panel {
  margin-top: 0;
  padding-top: var(--tl-space-3, 12px);
}
#page-followup .waitlist-followup-panel > div:first-child {
  gap: var(--tl-space-1, 4px);
}
#page-followup .waitlist-followup-panel > div:first-child span {
  font-size: 12px;
  line-height: 1.45;
}
#page-followup .waitlist-floorplan-choice-grid.compact {
  margin-top: var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px);
  gap: var(--tl-space-3, 12px);
}
#page-followup .waitlist-floorplan-choice-group > div {
  gap: var(--tl-space-2, 8px);
}
#page-followup .waitlist-floorplan-choice strong {
  font-size: 12px;
}
#page-followup .waitlist-floorplan-choice small {
  font-size: 10px;
  line-height: 1.35;
}
#page-followup .waitlist-followup-save {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
  margin-top: var(--tl-space-3, 12px);
}
#page-followup .waitlist-followup-save > span {
  flex: 1 1 160px;
  font-size: 12px;
  line-height: 1.4;
}
#page-followup #saveFollowupWaitlistBtn {
  min-height: 44px;
}

/* Review controls stay outside the editable email document. */
#page-followup .email-view-switch,
body.compact-experience #page-followup .email-view-switch {
  margin: 0 0 var(--tl-space-4, 16px);
  gap: var(--tl-space-1, 4px);
}
#page-followup .email-view-switch button,
body.compact-experience #page-followup .email-view-switch button {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  white-space: normal;
  line-height: 1.4;
}
#page-followup .email-next-button {
  min-height: 44px;
}
#page-followup #emailPreviewPane,
#page-followup #followupPreview {
  min-height: 0;
  max-height: none;
  height: auto;
}
#page-followup #followupPreview {
  padding: var(--tl-space-4, 16px);
  overflow-x: auto;
}
#page-followup #emailPreviewPane > .small-note {
  margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  line-height: 1.5;
}
#page-followup .followup-send-actions {
  gap: var(--tl-space-2, 8px);
}
#page-followup .followup-send-actions .button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}
#page-followup .preview-state-row {
  flex-wrap: wrap;
  padding: var(--tl-space-2, 8px) var(--tl-space-4, 16px);
  gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  line-height: 1.5;
}
#page-followup #sendStatusText {
  min-width: 0;
  overflow-wrap: anywhere;
}
#page-followup .preview-backups {
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  gap: var(--tl-space-2, 8px);
}
#page-followup .preview-backups .button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}

/* Prospect overview, audience, and filters. */
#page-prospects .prospect-workspace-heading {
  margin-bottom: var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#page-prospects .prospect-heading-actions {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
}
#page-prospects .prospect-heading-actions .button {
  min-height: 44px;
  white-space: normal;
}
#page-prospects .prospect-overview-grid {
  gap: var(--tl-space-3, 12px);
  margin-bottom: var(--tl-space-4, 16px);
}
#page-prospects .prospect-overview-card {
  min-height: 44px !important;
  padding: var(--tl-space-3, 12px) !important;
  gap: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
  grid-template-columns: minmax(0, 1fr) auto;
}
#page-prospects .prospect-overview-card > span {
  font-size: 12px !important;
  line-height: 1.4;
}
#page-prospects .prospect-overview-card > strong {
  font-size: 22px !important;
  line-height: 1.2;
}
#page-prospects .prospect-secondary-views {
  margin-bottom: var(--tl-space-4, 16px);
}
#page-prospects .prospect-secondary-views > summary {
  min-height: 44px;
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
}
#page-prospects .prospect-secondary-views .prospect-overview-grid {
  padding: 0 var(--tl-space-3, 12px) var(--tl-space-3, 12px);
}
#page-prospects .prospect-secondary-views > p {
  padding: 0 var(--tl-space-4, 16px) var(--tl-space-3, 12px);
  line-height: 1.5;
}
#page-prospects .prospect-audience-panel {
  margin-bottom: var(--tl-space-4, 16px);
}
#page-prospects .prospect-audience-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr));
  gap: var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px) var(--tl-space-4, 16px);
}
#page-prospects .prospect-audience-card {
  min-height: 44px;
  padding: var(--tl-space-3, 12px);
  gap: var(--tl-space-1, 4px);
}
#page-prospects .prospect-template-shortcuts {
  margin: 0 0 var(--tl-space-4, 16px);
  padding: var(--tl-space-4, 16px);
}
#page-prospects .prospect-template-shortcut-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tl-space-3, 12px);
  margin-bottom: var(--tl-space-3, 12px);
}
#page-prospects .prospect-template-current {
  max-width: 100%;
  margin: 0;
  white-space: normal;
}
#page-prospects .prospect-template-shortcut-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: var(--tl-space-2, 8px);
}
#page-prospects .prospect-template-shortcut {
  min-height: 44px;
  padding: var(--tl-space-3, 12px);
}
#page-prospects .prospect-simple-tabs {
  flex-wrap: wrap;
  gap: var(--tl-space-1, 4px);
  margin: 0 0 var(--tl-space-3, 12px);
  padding: var(--tl-space-1, 4px);
}
#page-prospects .prospect-simple-tabs button {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  white-space: normal;
}
#page-prospects .prospect-command-panel {
  margin-bottom: var(--tl-space-4, 16px) !important;
}
#page-prospects .prospect-commandbar {
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)) auto !important;
  gap: var(--tl-space-3, 12px);
  padding: var(--tl-space-4, 16px);
}
#page-prospects .prospect-commandbar > * {
  min-width: 0;
}
#page-prospects .prospect-clear-filters {
  min-height: 44px;
}
#page-prospects .prospect-more-filters > summary {
  min-height: 44px;
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
}
#page-prospects .prospect-more-filters > summary span {
  flex-wrap: wrap;
  gap: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
}
#page-prospects .prospect-more-filters > summary small {
  font-size: 12px;
  line-height: 1.4;
}
#page-prospects .prospect-advanced-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  padding: var(--tl-space-4, 16px) !important;
  gap: var(--tl-space-3, 12px);
}
#page-prospects .prospect-inline-check,
#page-prospects .email-special-toggle {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) 0;
  gap: var(--tl-space-2, 8px);
}
#page-prospects :is(.prospect-inline-check, .email-special-toggle) input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
#page-prospects :is(.prospect-inline-check, .email-special-toggle) > span {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}
#page-prospects .prospect-command-meta {
  flex-wrap: wrap;
  gap: var(--tl-space-1, 4px) var(--tl-space-3, 12px);
  padding: var(--tl-space-2, 8px) var(--tl-space-4, 16px);
  line-height: 1.45;
}

/* Natural-height rows: remove the old forced row minimum and timing overlap.
   Named areas also neutralize earlier mobile grid-column !important rules. */
#page-prospects .prospect-results-meta {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px) !important;
}
#page-prospects .prospect-results-meta > div {
  flex-wrap: wrap;
  gap: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
}
#page-prospects .prospect-select-tools .button {
  min-height: 44px;
  white-space: normal;
}
#page-prospects .prospect-workspace-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.1fr) auto !important;
  grid-template-areas: "main preference matches actions" "main timing matches actions";
  gap: var(--tl-space-2, 8px) var(--tl-space-4, 16px) !important;
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px) !important;
  min-height: 0 !important;
  align-items: start;
}
#page-prospects.prospect-bulk-mode .prospect-workspace-row {
  grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.1fr) auto !important;
  grid-template-areas: "check main preference matches actions" "check main timing matches actions";
}
#page-prospects .prospect-workspace-row > .prospect-main {
  grid-area: main !important;
}
#page-prospects .prospect-workspace-row > .prospect-preference-cell {
  grid-area: preference !important;
}
#page-prospects .prospect-workspace-row > .prospect-timing-cell {
  grid-area: timing !important;
  display: block !important;
  margin-top: 0;
}
#page-prospects .prospect-workspace-row > .prospect-match-cell {
  grid-area: matches !important;
}
#page-prospects .prospect-workspace-row > .prospect-row-actions {
  grid-area: actions !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: var(--tl-space-2, 8px);
  width: auto;
}
#page-prospects .prospect-workspace-row > .prospect-check {
  grid-area: check !important;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  margin: var(--tl-space-2, 8px) 0 0;
  justify-self: center;
}
#page-prospects .prospect-row-actions :is(.button, .unit-edit-button) {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}
#page-prospects .prospect-name-line {
  gap: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
}
#page-prospects .prospect-name-button {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
#page-prospects :is(.prospect-contact-line, .prospect-preference-cell > span,
  .prospect-timing-cell > span, .prospect-match-summary span, .prospect-followup-line,
  .prospect-contact-safety, .prospect-saved-units) {
  font-size: 12px !important;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
#page-prospects :is(.prospect-preference-cell, .prospect-timing-cell) > strong,
#page-prospects .prospect-match-summary strong {
  font-size: 13px !important;
  line-height: 1.4;
}
#page-prospects :is(.prospect-stage-badge, .prospect-ph-badge, .prospect-legacy-badge) {
  min-height: 0;
  padding: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
  font-size: 10px !important;
  line-height: 1.35;
}
#page-prospects .prospect-match-summary {
  gap: var(--tl-space-1, 4px);
}
#page-prospects .prospect-waitlist-alert {
  padding: var(--tl-space-2, 8px);
  margin-bottom: var(--tl-space-2, 8px);
}
#page-prospects .prospect-optout-label {
  position: static;
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0;
  line-height: 1.4;
}
#page-prospects .prospect-load-more {
  padding: var(--tl-space-3, 12px);
}
#page-prospects #prospectLoadMoreBtn {
  min-height: 44px;
}
#page-prospects .prospect-selection-tray {
  gap: var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  margin-top: var(--tl-space-3, 12px);
  bottom: var(--tl-space-3, 12px);
}
#page-prospects .prospect-selection-tray small {
  font-size: 12px;
  line-height: 1.4;
}
#page-prospects .prospect-selection-actions {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
}
#page-prospects .prospect-selection-actions .button {
  min-height: 44px;
  white-space: normal;
}

/* Prospect email composition and review: the page owns vertical scrolling. */
#page-prospects .prospect-bulk-panel {
  margin-top: var(--tl-space-4, 16px);
}
#page-prospects .prospect-bulk-panel > .button[data-manage-email-templates] {
  min-height: 44px;
  margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px) 0;
  max-width: calc(100% - 2 * var(--tl-space-4, 16px));
  white-space: normal;
}
#page-prospects .prospect-signature-choice {
  margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px) 0;
  max-width: min(380px, calc(100% - 2 * var(--tl-space-4, 16px)));
}
#page-prospects .prospect-mailer-compose {
  gap: var(--tl-space-4, 16px);
  padding: var(--tl-space-4, 16px);
}
#page-prospects .prospect-compose-options {
  padding: 0 var(--tl-space-3, 12px);
}
#page-prospects .prospect-compose-options > summary {
  min-height: 44px;
  padding-block: var(--tl-space-3, 12px);
  line-height: 1.5;
}
#page-prospects .prospect-compose-options[open] > div {
  display: grid;
  gap: var(--tl-space-3, 12px);
  padding: 0 0 var(--tl-space-3, 12px);
}
#page-prospects .email-special-offer {
  padding: var(--tl-space-3, 12px);
  margin: 0;
}
#page-prospects .email-special-toggle {
  margin-bottom: var(--tl-space-2, 8px);
}
#page-prospects #prospectSpecialFields > label {
  margin-top: var(--tl-space-3, 12px);
}
#page-prospects .resident-facing-field > small {
  display: block;
  margin-top: var(--tl-space-2, 8px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#page-prospects .ph-feature-picker label {
  /* The shared label margin supplies the gap; the legacy grid adds another 5px. */
  gap: 0;
}
#page-prospects .prospect-bulk-summary {
  min-height: 0;
  max-height: none;
  overflow: visible;
}
#page-prospects .prospect-review-head {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px);
  padding: var(--tl-space-3, 12px);
}
#page-prospects .prospect-email-review {
  margin-top: var(--tl-space-3, 12px);
}
#page-prospects .prospect-email-review > summary {
  min-height: 44px;
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#page-prospects .prospect-email-review > summary strong {
  font-size: 13px;
}
#page-prospects .prospect-email-review > summary small {
  margin-top: var(--tl-space-1, 4px);
  font-size: 12px;
  line-height: 1.4;
}
#page-prospects .prospect-personalized-preview {
  width: 100%;
  min-width: 0;
  padding: var(--tl-space-4, 16px);
  overflow-x: auto;
}
#page-prospects .prospect-preview-meta {
  margin-top: var(--tl-space-3, 12px) !important;
  padding-top: var(--tl-space-3, 12px);
  font-size: 12px !important;
  line-height: 1.5;
}
#page-prospects .prospect-bulk-panel > .small-note {
  margin: 0 var(--tl-space-4, 16px) var(--tl-space-3, 12px);
  line-height: 1.5;
}
#page-prospects .prospect-bulk-panel > .panel-footer-actions {
  flex-wrap: wrap;
  gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
}
#page-prospects .prospect-bulk-panel > .panel-footer-actions .button {
  min-height: 44px;
  white-space: normal;
}
#page-prospects #prospectBulkStatus {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The dialog scrolls; its form must fit that dialog instead of creating a
   second, wider scrollport. Sticky actions are released on short viewports. */
#prospectEditDialog {
  width: min(800px, calc(100vw - 2 * var(--tl-space-3, 12px)));
  max-height: calc(var(--visual-height, 100dvh) - 2 * var(--tl-space-3, 12px));
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: var(--tl-space-4, 16px);
}
#prospectEditDialog .prospect-edit-shell {
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow: visible;
}
#prospectEditDialog .unit-edit-head {
  padding: var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#prospectEditDialog .unit-edit-head > div {
  min-width: 0;
}
#prospectEditDialog .unit-edit-head h2 {
  margin: var(--tl-space-1, 4px) 0;
  font-size: 22px;
  line-height: 1.25;
}
#prospectEditDialog .unit-edit-head p {
  line-height: 1.45;
}
#prospectEditDialog .dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
#prospectEditDialog .prospect-editor-body {
  padding: var(--tl-space-4, 16px);
  gap: var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-section-head {
  flex-wrap: wrap;
  padding: var(--tl-space-3, 12px);
  gap: var(--tl-space-1, 4px) var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-section-head strong {
  font-size: 13px;
}
#prospectEditDialog .prospect-editor-section-head span {
  font-size: 12px;
  line-height: 1.45;
}
#prospectEditDialog .prospect-editor-section .unit-edit-grid {
  padding: var(--tl-space-3, 12px);
  gap: var(--tl-space-3, 12px);
}
#prospectEditDialog :is(.unit-edit-grid label, .unit-note-field) {
  min-width: 0;
  gap: 0;
}
#prospectEditDialog .prospect-editor-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#prospectEditDialog .prospect-editor-search-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#prospectEditDialog .prospect-edit-types {
  padding: var(--tl-space-3, 12px) var(--tl-space-3, 12px) 0;
}
#prospectEditDialog #prospectEditTypes {
  gap: var(--tl-space-2, 8px);
}
#prospectEditDialog #prospectEditTypes button {
  min-height: 44px;
  padding: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-toggles {
  padding: 0 var(--tl-space-3, 12px) var(--tl-space-3, 12px);
  gap: var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-unit-grid {
  margin-top: 0;
}
#prospectEditDialog .prospect-unit-helper {
  margin: 0 var(--tl-space-3, 12px) var(--tl-space-3, 12px);
  font-size: 12px;
  line-height: 1.45;
}
#prospectEditDialog .prospect-editor-notes {
  padding: var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-notes small {
  margin-top: var(--tl-space-2, 8px);
  line-height: 1.45;
}
#prospectEditDialog .prospect-edit-history {
  margin: 0 var(--tl-space-3, 12px) var(--tl-space-3, 12px);
}
#prospectEditDialog .prospect-editor-safety .optout-card {
  margin: var(--tl-space-3, 12px);
}
#prospectEditDialog .unit-edit-status-message {
  margin: 0 var(--tl-space-4, 16px) var(--tl-space-3, 12px);
  overflow-wrap: anywhere;
}
#prospectEditDialog .prospect-edit-actions {
  margin-top: 0;
  padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  gap: var(--tl-space-2, 8px);
}
#prospectEditDialog .prospect-edit-actions .button {
  grid-column: auto;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
}

/* A reduced visual viewport can be shorter than the layout media query when
   the on-screen keyboard is open. Use the app's existing keyboard state. */
body.keyboard-open #prospectEditDialog :is(.unit-edit-head, .unit-edit-actions),
body.keyboard-open #page-followup > .compact-back-to-tour,
body.keyboard-open #page-prospects .prospect-selection-tray {
  position: static;
}

@media (max-width: 1100px) {
  #page-prospects .prospect-commandbar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #page-prospects .prospect-search-primary {
    grid-column: 1 / -1;
  }
  #page-prospects .prospect-clear-filters {
    grid-column: 2;
    justify-self: end;
  }
  #page-prospects .prospect-advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #page-prospects .prospect-workspace-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto !important;
    grid-template-areas: "main preference actions" "timing matches actions";
  }
  #page-prospects.prospect-bulk-mode .prospect-workspace-row {
    grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1fr) auto !important;
    grid-template-areas: "check main preference actions" "check timing matches actions";
  }
  #page-prospects .prospect-workspace-row > .prospect-row-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 860px) {
  #prospectEditDialog .prospect-editor-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #page-prospects {
    /* The selection tray is in normal flow; the shell already clears navigation. */
    padding-bottom: 0;
  }
  :is(#page-followup, #page-prospects) :is(.two-fields, .three-fields) {
    grid-template-columns: minmax(0, 1fr);
  }
  #page-followup .form-panel > :is(.two-fields, .three-fields, label, .selected-summary),
  #page-followup .note-safety {
    margin-inline: var(--tl-space-3, 12px);
  }
  #page-followup .followup-options-body,
  #page-followup #followupPreview {
    padding: var(--tl-space-3, 12px);
  }
  #page-followup .preview-backups > span {
    flex-basis: 100%;
  }
  #page-followup .preview-backups .button {
    flex: 1 1 140px;
  }
  #page-followup .preview-state-row {
    align-items: flex-start;
  }
  #page-followup #sendStatusText {
    text-align: left;
  }
  #page-prospects .prospect-overview-grid {
    gap: var(--tl-space-2, 8px);
  }
  #page-prospects .prospect-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: var(--tl-space-2, 8px) !important;
  }
  #page-prospects .prospect-overview-card > strong {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }
  #page-prospects .prospect-commandbar,
  #page-prospects .prospect-advanced-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #page-prospects .prospect-clear-filters {
    grid-column: auto;
    width: 100%;
  }
  #page-prospects .prospect-workspace-row {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "main" "preference" "timing" "matches" "actions";
    gap: var(--tl-space-3, 12px) !important;
    padding: var(--tl-space-3, 12px) !important;
  }
  #page-prospects.prospect-bulk-mode .prospect-workspace-row {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    grid-template-areas: "check main" ". preference" ". timing" ". matches" ". actions";
  }
  #page-prospects .prospect-workspace-row > .prospect-row-actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }
  #page-prospects .prospect-row-actions :is(.button, .unit-edit-button) {
    flex: 1 1 auto;
  }
  #page-prospects .prospect-selection-tray {
    position: static;
    margin-inline: 0;
  }
  #page-prospects .prospect-bulk-panel > .panel-footer-actions .button {
    flex: 1 1 180px;
  }
  #page-prospects #prospectBulkStatus {
    flex-basis: 100%;
  }
  #prospectEditDialog .prospect-editor-body {
    padding: var(--tl-space-3, 12px);
  }
  #prospectEditDialog :is(.prospect-editor-contact-grid, .prospect-editor-search-grid,
    .prospect-editor-toggles, .prospect-editor-unit-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #prospectEditDialog .prospect-edit-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #prospectEditDialog .prospect-edit-actions > span {
    display: none;
  }
}

@media (max-height: 600px) {
  #page-followup .followup-selected-details-body,
  #page-followup .floorplan-dropdown-body {
    max-height: none;
    overflow: visible;
  }
  #page-followup .sticky-preview-head,
  body.workspace-on #page-followup > .compact-back-to-tour,
  #page-prospects .prospect-selection-tray,
  #prospectEditDialog :is(.unit-edit-head, .unit-edit-actions) {
    position: static;
  }
  #prospectEditDialog .unit-edit-head,
  #prospectEditDialog .prospect-edit-actions {
    padding-block: var(--tl-space-3, 12px);
  }
}

/* ===== tools.css ===== */
/* TourLab 3.3.160 — spacing for proposal tools and measurement controls.
   Load after each tool's existing styles. Standalone hosts opt in with:
   tl-proposal-page / tl-proposal-studio-page / tl-measurement-page.
   Measurement canvas, SVG, iframe dimensions and print layouts stay in their
   existing stylesheets. The ren-* rules style only the surrounding chrome. */
@media screen {
  /* Proposal: consistent panel insets, natural labels and useful tablet rows. */
  body.tl-proposal-page main {
    padding: var(--tl-space-6, 24px);
  }
  body.tl-proposal-page .app-header {
    padding-inline: var(--tl-space-6, 24px);
    gap: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .page-heading {
    gap: var(--tl-space-4, 16px);
    margin: 0 0 var(--tl-space-5, 20px);
    flex-wrap: wrap;
  }
  body.tl-proposal-page .studio-grid {
    gap: var(--tl-space-5, 20px);
  }
  body.tl-proposal-page :is(.input-rail, .results-rail, .input-block, .field-grid > label, .offer-adjust-field) {
    min-width: 0;
  }
  body.tl-proposal-page .input-rail {
    padding-inline: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .input-block {
    padding-block: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .input-heading {
    gap: var(--tl-space-2, 8px);
    margin-bottom: var(--tl-space-3, 12px);
    align-items: baseline;
  }
  body.tl-proposal-page :is(.field-grid, .offer-adjustments) {
    gap: var(--tl-space-3, 12px);
    align-items: end;
  }
  body.tl-proposal-page :is(.input-block label, .notes-label, .support-grid label, .builder-target label) {
    min-width: 0;
    height: auto;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.tl-proposal-page .input-block :where(input:not([type="range"]):not([type="checkbox"]), select) {
    min-height: 44px;
    padding: var(--tl-space-2, 8px);
  }
  body.tl-proposal-page .input-block .currency-field input {
    padding-left: 30px;
  }
  body.tl-proposal-page :is(.field-hint, .mini-total) {
    margin-top: var(--tl-space-2, 8px);
  }
  body.tl-proposal-page .mini-total {
    gap: var(--tl-space-2, 8px);
    flex-wrap: wrap;
  }
  body.tl-proposal-page .budget-label {
    margin-bottom: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .results-panel {
    padding: var(--tl-space-4, 16px) var(--tl-space-4, 16px) 0;
  }
  body.tl-proposal-page :is(.panel-heading, .context-panel .bar, .support-grid .bar) {
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
    align-items: flex-start;
  }
  body.tl-proposal-page .results-panel .matrix-scroll {
    margin: var(--tl-space-4, 16px) 0 0;
    max-width: 100%;
  }
  body.tl-proposal-page .offer-matrix :is(th, td) {
    padding: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .offer-matrix :is(th, td):first-child {
    padding-left: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .offer-matrix :is(th, td):last-child {
    padding-right: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .fine-tune {
    margin: 0;
    padding: var(--tl-space-3, 12px) 0;
  }
  body.tl-proposal-page .fine-tune > summary {
    min-height: 32px;
    gap: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .builder-target {
    gap: var(--tl-space-3, 12px);
    margin-bottom: var(--tl-space-4, 16px);
    flex-wrap: wrap;
  }
  body.tl-proposal-page .builder-target label {
    flex: 1 1 160px;
  }
  body.tl-proposal-page :is(.context-panel, .export-panel) {
    margin-top: var(--tl-space-4, 16px);
    padding: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .saved-panel {
    margin-top: var(--tl-space-5, 20px);
  }
  body.tl-proposal-page :is(.saved-panel, .export-panel) .panel-heading {
    margin-bottom: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page :is(.export-actions, .term-actions) {
    gap: var(--tl-space-2, 8px);
    margin-top: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page :is(.export-actions, .term-actions) button {
    min-height: 44px;
    white-space: normal;
  }
  body.tl-proposal-page .support-drawer {
    margin-top: var(--tl-space-5, 20px);
    padding-top: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .support-grid {
    padding-top: var(--tl-space-2, 8px);
  }
  body.tl-proposal-page .support-grid > details {
    padding-block: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .support-grid :is(.facts, .editgrid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tl-space-3, 12px);
    margin-top: var(--tl-space-3, 12px);
  }
  body.tl-proposal-page .support-grid .divider {
    margin-block: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .staff-session-bar {
    gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
    margin-block: var(--tl-space-2, 8px) var(--tl-space-4, 16px);
  }
  body.tl-proposal-page #connectionPanel[open] {
    padding: var(--tl-space-4, 16px);
    margin-bottom: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page #unitChooser {
    padding: var(--tl-space-5, 20px);
  }
  body.tl-proposal-page footer {
    margin-top: var(--tl-space-6, 24px);
    padding-top: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }

  /* Proposal Studio: the accordion provides the section spacing once. */
  body.tl-proposal-studio-page .app-shell {
    padding-inline: var(--tl-space-6, 24px);
  }
  body.tl-proposal-studio-page.phone-mode .app-shell {
    padding-inline: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .hero {
    padding-block: var(--tl-space-3, 12px) var(--tl-space-5, 20px);
    gap: var(--tl-space-6, 24px);
  }
  body.tl-proposal-studio-page .back {
    margin-bottom: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .home-select {
    padding: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .workspace-bar {
    margin-bottom: var(--tl-space-4, 16px);
    padding-block: var(--tl-space-3, 12px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .workspace-bar nav {
    gap: var(--tl-space-3, 12px) var(--tl-space-5, 20px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .workflow-step {
    margin-block: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .workflow-header {
    padding: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
    align-items: flex-start;
  }
  body.tl-proposal-studio-page .workflow-header > span:not(.workflow-number):not(.workflow-chevron) {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.tl-proposal-studio-page :is(.workflow-number, .workflow-chevron) {
    flex-shrink: 0;
  }
  body.tl-proposal-studio-page .workflow-inner {
    padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px) var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .workflow-inner > :is(.comparison-section, .builder-section, .selected-section) {
    margin-block: 0;
  }
  body.tl-proposal-studio-page .workflow-inner > .reported-section {
    margin-block: var(--tl-space-4, 16px) 0;
  }
  body.tl-proposal-studio-page .section-heading {
    margin-bottom: var(--tl-space-3, 12px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
    align-items: flex-start;
  }
  body.tl-proposal-studio-page :is(.card-heading, .card-foot, .offer-card-foot, .dialog-section-heading, .email-bottom) {
    gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page :is(.baseline, .offer-card) {
    padding: var(--tl-space-4, 16px) var(--tl-space-4, 16px) 0;
  }
  body.tl-proposal-studio-page .baseline-total {
    gap: var(--tl-space-3, 12px);
    margin-block: var(--tl-space-4, 16px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .current-net-summary {
    margin: calc(-1 * var(--tl-space-2, 8px)) 0 var(--tl-space-4, 16px);
    gap: var(--tl-space-1, 4px) var(--tl-space-2, 8px);
  }
  body.tl-proposal-studio-page :is(.input-grid, .slider-grid, .selected-grid, .baseline-grid) {
    gap: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page :is(.input-grid, .goal-bar) {
    align-items: end;
  }
  body.tl-proposal-studio-page :is(.input-grid, .goal-bar, .slider-grid, .source-dialog-grid) > * {
    min-width: 0;
  }
  body.tl-proposal-studio-page :is(.input-grid, .goal-bar, .slider-grid, .counter-panel) label,
  body.tl-proposal-studio-page :is(.unit-lookup, .email-panel > label) {
    min-width: 0;
    height: auto;
    gap: var(--tl-space-2, 8px);
    font-size: 12px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.tl-proposal-studio-page :is(.input-grid, .goal-bar, .counter-panel, .unit-lookup) :is(input:not([type="range"]):not([type="checkbox"]), select) {
    min-height: 44px;
  }
  body.tl-proposal-studio-page .card-foot {
    margin-top: var(--tl-space-4, 16px);
    padding-block: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .goal-bar {
    padding: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .goal-summary {
    padding-left: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .goal-middle-bar {
    margin-inline: var(--tl-space-4, 16px);
    padding-block: var(--tl-space-3, 12px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .matrix-heading {
    padding: var(--tl-space-4, 16px) var(--tl-space-4, 16px) var(--tl-space-3, 12px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .offer-matrix {
    padding-inline: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .matrix-colhead {
    height: auto;
    min-height: 48px;
    padding-block: var(--tl-space-1, 4px);
    white-space: normal;
  }
  body.tl-proposal-studio-page .matrix-note {
    margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px) var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .custom-details summary {
    padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
    min-height: 44px;
    gap: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .custom-editor {
    padding: var(--tl-space-1, 4px) var(--tl-space-4, 16px) var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .custom-footer {
    padding-top: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page :is(.button, .analysis-actions button) {
    min-height: 44px;
    padding: var(--tl-space-2, 8px) var(--tl-space-4, 16px);
    white-space: normal;
  }
  body.tl-proposal-studio-page .comparison-card {
    padding: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .analysis-top {
    padding-bottom: var(--tl-space-3, 12px);
    gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .analysis-actions {
    padding-block: var(--tl-space-3, 12px);
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .analysis-digest {
    padding: var(--tl-space-4, 16px);
    margin-bottom: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .analysis-digest-title {
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .analysis-metrics {
    margin-block: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .include-comps {
    padding: 0;
    gap: var(--tl-space-2, 8px);
    line-height: 1.5;
  }
  body.tl-proposal-studio-page .include-comps input {
    min-height: 16px;
    flex-shrink: 0;
  }
  body.tl-proposal-studio-page .counter-panel {
    padding: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
    margin-bottom: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .email-section {
    padding: var(--tl-space-4, 16px);
    gap: var(--tl-space-4, 16px);
    margin-top: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .email-actions {
    gap: var(--tl-space-2, 8px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .email-panel {
    padding-top: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page :is(.source-dialog, .version-dialog) {
    padding: var(--tl-space-6, 24px);
  }
  body.tl-proposal-studio-page.phone-mode :is(.source-dialog, .version-dialog) {
    padding: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page .dialog-header {
    margin-bottom: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .unit-lookup {
    margin-bottom: var(--tl-space-3, 12px);
  }
  body.tl-proposal-studio-page .source-dialog-grid {
    gap: var(--tl-space-5, 20px);
  }
  body.tl-proposal-studio-page .source-rate-matrix {
    margin-block: var(--tl-space-3, 12px) var(--tl-space-2, 8px);
    gap: var(--tl-space-2, 8px);
  }
  body.tl-proposal-studio-page :is(.source-rate, .source-prior) {
    padding: var(--tl-space-3, 12px);
    min-width: 0;
  }
  body.tl-proposal-studio-page .source-prior {
    margin-block: var(--tl-space-3, 12px) var(--tl-space-2, 8px);
  }
  body.tl-proposal-studio-page .confirmation {
    margin-top: var(--tl-space-5, 20px);
    padding-top: var(--tl-space-4, 16px);
    gap: var(--tl-space-4, 16px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .confirmation > div:last-child {
    gap: var(--tl-space-2, 8px);
    flex-wrap: wrap;
  }
  body.tl-proposal-studio-page .page-footer {
    padding-block: var(--tl-space-5, 20px);
    gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }

  /* Measurements: control spacing only; drawing coordinate surfaces untouched. */
  body.tl-measurement-page .planpick {
    gap: var(--tl-space-2, 8px);
    white-space: normal;
    line-height: 1.4;
  }
  body.tl-measurement-page .measurement-tools button {
    height: auto;
    white-space: normal;
    line-height: 1.4;
  }
  body.tl-measurement-page .side .card {
    padding: var(--tl-space-4, 16px);
  }
  body.tl-measurement-page .side .card.main {
    gap: var(--tl-space-2, 8px) var(--tl-space-3, 12px);
  }
  body.tl-measurement-page .side :is(.subtitle, .field, .furniture-dimensions label) {
    min-width: 0;
    height: auto;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.tl-measurement-page .side .field {
    display: grid;
    grid-template-columns: minmax(68px, .7fr) minmax(0, 1.3fr);
    gap: var(--tl-space-2, 8px);
    align-items: center;
  }
  body.tl-measurement-page .side .field :is(input, select) {
    width: 100%;
    min-width: 0;
  }
  body.tl-measurement-page .side :is(.object-panel, .furniture-tools, .furniture-dimensions) {
    gap: var(--tl-space-3, 12px);
  }
  body.tl-measurement-page .side .object-panel {
    padding-top: var(--tl-space-3, 12px);
  }
  body.tl-measurement-page .side .furniture-dimensions input {
    margin-top: var(--tl-space-1, 4px);
  }
  body.tl-measurement-page .side :is(.furniture-actions, .measurement-actions, .snaprow) {
    gap: var(--tl-space-2, 8px);
  }
  body.tl-measurement-page .side .switch {
    gap: var(--tl-space-2, 8px);
    line-height: 1.45;
  }
  body.tl-measurement-page .side .switch input {
    flex-shrink: 0;
  }
  body.tl-measurement-page .side .btn {
    height: auto;
    white-space: normal;
  }
  body.tl-measurement-page .side .card.saved {
    padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
  }
  body.tl-measurement-page .side .saved-head {
    gap: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  body.tl-measurement-page .side .saved.open .savedlist {
    margin-top: var(--tl-space-3, 12px);
  }
  body.tl-measurement-page .side .entry {
    gap: var(--tl-space-2, 8px);
    padding: var(--tl-space-2, 8px);
  }
  body.tl-measurement-page .side .entry b {
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }
  body.tl-measurement-page .side .entry .delete {
    flex-shrink: 0;
  }
  body.tl-measurement-page .side .calibration {
    padding-bottom: var(--tl-space-3, 12px);
  }

  /* Embedded panel and plan-library chrome also appear on the main tour page. */
  .ren-measurements {
    margin-block: var(--tl-space-3, 12px);
  }
  .ren-measurements > summary {
    min-height: 48px;
    padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
    gap: var(--tl-space-2, 8px);
    white-space: normal;
    line-height: 1.45;
  }
  .ren-measurements .ren-measure-tabs {
    margin: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
    gap: var(--tl-space-1, 4px);
  }
  .ren-measurements .ren-measure-tabs button {
    min-width: 0;
    height: auto;
    white-space: normal;
    line-height: 1.4;
  }
  .ren-plan-library .ren-library-head {
    padding-block: var(--tl-space-4, 16px);
    gap: var(--tl-space-3, 12px);
  }
  .ren-plan-library .ren-library-head label {
    gap: var(--tl-space-2, 8px);
    min-width: 0;
    line-height: 1.45;
  }
  .ren-plan-library .ren-library-tabs {
    gap: var(--tl-space-2, 8px);
    margin-top: var(--tl-space-3, 12px);
    flex-wrap: wrap;
  }
  .ren-plan-library .ren-library-tabs button {
    padding: var(--tl-space-3, 12px) var(--tl-space-4, 16px);
    white-space: normal;
    line-height: 1.4;
  }
}

@media screen and (min-width: 681px) and (max-width: 920px) {
  body.tl-proposal-page .input-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--tl-space-4, 16px);
    row-gap: 0;
  }
  body.tl-proposal-page .input-block + .input-block {
    padding-left: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .input-rail > .budget-block {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }
  body.tl-proposal-page .input-heading h2 {
    font-size: 14px;
  }
}

@media screen and (max-width: 680px) {
  body.tl-proposal-page main {
    padding: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .app-header {
    padding-inline: var(--tl-space-4, 16px);
  }
  body.tl-proposal-page .input-rail {
    display: block;
  }
  body.tl-proposal-page .input-block + .input-block {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  body.tl-proposal-page .input-block :where(input:not([type="range"]):not([type="checkbox"]), select) {
    font-size: 16px;
  }
  body.tl-proposal-page .input-block .currency-field input {
    font-size: 26px;
  }
  body.tl-proposal-page .offer-adjustments {
    grid-template-columns: minmax(0, 1fr);
  }
  body.tl-proposal-studio-page .app-shell {
    padding-inline: var(--tl-space-4, 16px);
  }
  body.tl-proposal-studio-page :is(.source-dialog, .version-dialog) {
    padding: var(--tl-space-4, 16px);
  }
}

/* Container queries keep Studio's existing Phone view consistent with mobile. */
@media screen {
  @container studio (max-width: 920px) {
    body.tl-proposal-studio-page .goal-bar {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.tl-proposal-studio-page .goal-summary {
      grid-column: 1 / -1;
      border-left: 0;
      border-top: 1px solid var(--line);
      padding: var(--tl-space-3, 12px) 0 0;
      flex-direction: row;
      align-items: baseline;
      justify-content: space-between;
      gap: var(--tl-space-2, 8px);
      flex-wrap: wrap;
    }
  }
  @container studio (max-width: 650px) {
    body.tl-proposal-studio-page .home-select {
      margin-top: var(--tl-space-4, 16px);
    }
    body.tl-proposal-studio-page .workflow-header {
      padding: var(--tl-space-3, 12px);
    }
    body.tl-proposal-studio-page .workflow-inner {
      padding: var(--tl-space-3, 12px);
    }
    body.tl-proposal-studio-page .baseline .input-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.tl-proposal-studio-page .baseline .input-grid > label:first-child {
      grid-column: 1 / -1;
    }
    body.tl-proposal-studio-page .goal-bar select {
      font-size: 16px;
    }
    body.tl-proposal-studio-page .offer-matrix {
      padding-inline: var(--tl-space-2, 8px);
    }
    body.tl-proposal-studio-page .analysis-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.tl-proposal-studio-page .source-dialog-grid {
      gap: var(--tl-space-4, 16px);
    }
  }
  @container studio (max-width: 420px) {
    body.tl-proposal-studio-page .goal-bar > label:nth-child(-n + 2) {
      grid-column: 1 / -1;
    }
  }
}

@media screen and (max-width: 420px) {
  body.tl-proposal-page .budget-block .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 540px) {
  .ren-measurements > summary {
    padding-inline: var(--tl-space-3, 12px);
  }
  .ren-measurements .ren-measure-tabs {
    margin: var(--tl-space-3, 12px);
  }
  .ren-plan-library .ren-library-head {
    padding-block: var(--tl-space-3, 12px);
  }
}
}


/* Keep the activity wheel native. On wider screens only the appointment
   list scrolls inside the card. On phones the opening screen scrolls as one. */
@media screen {
  #tlGateway.tl-gateway { overflow-x:hidden!important; overflow-y:auto!important; justify-content:flex-start; }
  #tlGateway #tlLaunchNav, #tlGateway>.staff-session-bar { flex-shrink:0; }
  #tlGateway #tlEntryHome { align-items:stretch; }
  #tlGateway #selectionPanel { min-height:0; }
  #tlGateway #scheduleSlot { min-width:0; min-height:0; overflow:visible; container:scheduled / inline-size; }
  #tlGateway #scheduleSlot[hidden], #tlGateway #selectionContent[hidden],
  #tlGateway .direct-note[hidden] { display:none!important; }
  #tlGateway #scheduleSlot .tl-launch-picker {
    width:100%; max-width:none; max-height:none; padding:0;
    background:transparent; border:0; box-shadow:none; overflow:visible; gap:12px;
  }
  #tlGateway #tlPickerNewControls:not([hidden]) {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 8px;
  }
  #tlGateway #tlPickerNewControls label { grid-column:1 / -1; }
  #tlGateway #tlPickerNewControls input { width:100%; min-width:0; box-sizing:border-box; }
  #tlGateway #tlPickerNewControls [data-tl-picker="walkin"] { grid-column:1 / -1; }
  @container scheduled (min-width:23rem) {
    #tlGateway #tlPickerNewControls:not([hidden]) {grid-template-columns:minmax(8.5rem,1fr) auto auto;}
    #tlGateway #tlPickerNewControls [data-tl-picker="walkin"] {grid-column:auto;}
  }
  #tlGateway #scheduleSlot .tl-picker-list {
    min-height:0; max-height:clamp(12rem,42dvh,23rem); overflow:auto; overscroll-behavior-y:auto;
    gap:8px; padding:3px; scrollbar-width:thin;
  }
  #tlGateway #scheduleSlot [data-tl-pick="scheduled"] {
    display:grid; grid-template-columns:7.75ch minmax(0,1fr); align-items:center;
    flex:none; min-height:54px; row-gap:3px; column-gap:12px; padding:10px 12px;
  }
  #tlGateway #scheduleSlot [data-tl-pick="scheduled"] time { grid-row:span 2; white-space:nowrap; font-variant-numeric:tabular-nums; }
  #tlGateway #scheduleSlot [data-tl-pick="scheduled"] :is(small,strong) { min-width:0; overflow-wrap:anywhere; line-height:1.35; }
  #tlGateway #scheduleSlot .tl-picker-list[aria-busy="true"] { min-height:var(--previous-list-height,0); }
  #tlGateway>.tl-version {position:fixed!important;right:max(7px,env(safe-area-inset-right))!important;top:max(5px,env(safe-area-inset-top))!important;font-size:10px!important;min-height:32px!important;}
  #tlGateway .tl-picker-head button { align-self:flex-start; }
  #tlGateway #tlPickerTitle { overflow-wrap:anywhere; }
  #tlGateway #scheduleSlot .tl-launch-picker[hidden], #tlGateway #tlPickerList[hidden] {display:none!important;}

  /* The header uses combined Tour Lab and REN artwork. */
  #tlWorkspaceHeader #tourLabBrand .tour-ren-divider {display:none!important;}
  body #tlWorkspaceHeader>.tl-version {font-size:10px!important; min-height:32px!important;}
  body #tlWorkspaceHeader>.team-profile select {width:10.5rem!important; min-width:0!important; max-width:100%!important;}
  body #tlWorkspaceHeader #tourHeaderTools {min-width:0!important;max-width:calc(100% - 24px)!important;}
  :is(#page-availability,#page-vacancies) [data-set-match-preferences] {justify-self:start;min-height:44px;}
  :is(#page-availability,#page-vacancies) .tour-match-panel:has([data-set-match-preferences]) .relevant-note {margin-block:8px;}
  :is(#page-availability,#page-vacancies) .relevant-home-stack > .empty-state {min-height:0; padding:12px 16px;}
}
@media screen and (max-width:650px) {
  #tlGateway.tl-gateway {padding-inline:clamp(12px,4vw,18px); padding-bottom:max(14px,env(safe-area-inset-bottom));}
  #tlGateway #tlEntryLogo {padding-block:6px 12px;}
  #tlGateway .activity-panel {--picker-height:148px; padding:16px 18px 12px;}
  #tlGateway .rail-footer {padding-top:10px;}
  #tlGateway .selection-panel {padding:16px 18px 18px;}
  #tlGateway #scheduleSlot .tl-picker-list {max-height:none;overflow:visible;}
  #tlGateway #scheduleSlot .tl-picker-list[aria-busy="true"] {min-height:min(var(--previous-list-height,0px),65dvh);}
  #tlGateway .staff-session-bar {margin-top:4px;}
}
@media screen and (min-width:651px) and (max-height:520px) {
  #tlGateway .activity-panel {--picker-height:clamp(9rem,42dvh,14rem);--row-height:44px;}
  #tlGateway .activity-panel, #tlGateway .selection-panel {padding:16px 20px;}
  #tlGateway .activity-name {font-size:30px;}
  #tlGateway #scheduleSlot .tl-picker-list {max-height:42dvh;}
}
@media screen and (max-width:600px) {
  body #tlWorkspaceHeader>.team-profile {width:100%; justify-self:stretch!important;}
  body #tlWorkspaceHeader>.team-profile select {width:100%!important; max-width:12rem!important;}
  body #tlWorkspaceHeader #tourLabBrand .leaselabs-logo-frame {width:min(100%,112px)!important;}
  body #tlWorkspaceHeader #tourLabBrand .leaselabs-logo {width:100%!important; max-width:112px!important;}
  #page-prospects .prospect-overview-card {grid-template-rows:minmax(2.6em,auto) auto; align-content:stretch;}
  #page-prospects .prospect-overview-card > strong {align-self:end;}
}

@media screen and (min-width:1120px) {
  body #tlWorkspaceHeader {width:100%; max-width:1120px!important; box-sizing:border-box;}
}
@media screen and (max-width:359px) {
  body #tlWorkspaceHeader #showModeTop {font-size:13px!important;padding-inline:7px!important;}
}
