.main{display:flex;flex-direction:column;min-height:100dvh}
.listing-editor-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}
@media(max-width:760px){
 .listing-editor-page .panel-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 .listing-editor-page .panel-grid>*{min-width:0}
 .listing-editor-page .card-pad{padding:18px 16px}
 .listing-editor-page .field{font-size:14px;line-height:1.5;margin-bottom:18px}
 .listing-editor-page .field input,.listing-editor-page .field select,.listing-editor-page .field textarea{width:100%;min-width:0;min-height:48px;border-radius:12px;padding:12px}
 .listing-editor-page .form-row{grid-template-columns:minmax(0,1fr);gap:0}
 .listing-editor-page #listing-description{min-height:180px;line-height:1.6;resize:vertical}
 .listing-editor-page .channel-choice{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .listing-editor-page .check-card{display:flex;align-items:center;gap:12px;padding:14px;min-height:52px;font-size:14px}
 .listing-editor-page .check-card input{width:20px;height:20px;flex:none}
 .listing-editor-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .listing-editor-actions button{width:100%;min-height:50px;font-size:14px;border-radius:12px}
 .listing-editor-page .listing-preview{padding:16px;overflow:hidden}
 .listing-editor-page .preview-photo{height:210px}
 .listing-editor-page .preview-photo img{width:100%;height:100%;object-fit:contain}
 .listing-editor-page .listing-photo-strip{scroll-snap-type:x proximity;padding-bottom:14px}
 .listing-editor-page .listing-photo-strip img{width:76px;height:76px;scroll-snap-align:start}
 .listing-editor-page .notice,.listing-editor-page .footer-note{font-size:12px;line-height:1.6}
}
.pull-refresh{height:0;opacity:0;flex:none;overflow:hidden;display:grid;place-items:center;pointer-events:none;transition:height .24s ease-out,opacity .2s ease-out}
.pull-refresh.is-pulling{transition:none}
.pull-refresh-spinner{width:26px;height:26px;border:3px solid #e9c6d4;border-top-color:#a53268;border-right-color:#a53268;border-radius:50%;transform:rotate(var(--pull-turn,0deg))}
.pull-refresh.is-refreshing .pull-refresh-spinner{animation:pull-refresh-spin .75s linear infinite}
@keyframes pull-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.pull-refresh{transition:none}.pull-refresh.is-refreshing .pull-refresh-spinner{animation-duration:1.5s}}
@media(max-width:760px){html,body{overscroll-behavior-y:none}}
.top-actions #account-logout{min-height:44px;padding:10px 16px;border-radius:999px;white-space:nowrap;font-size:12px}
#content{flex:1;min-width:0}
.portal-footer{padding:22px 20px;text-align:center;color:#738078;font-size:12px;border-top:1px solid var(--line);line-height:1.6}
.delivery-layout>*{min-width:0}
.item-row{flex-wrap:wrap}
.modal{max-height:94dvh}
@media(max-width:760px){
  .main{min-height:70dvh}
  .sidebar .brand{display:flex;padding:6px 8px 16px}
  .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:5px}
  .sidebar nav+nav{margin-top:5px}
  .sidebar nav button{min-width:0;min-height:44px;font-size:12px;padding:8px;white-space:normal;line-height:1.35}
  .sidebar nav button span{display:none}
  .topbar{height:auto;min-height:54px;gap:10px;flex-wrap:wrap;padding:8px 15px}
  .account-bar{padding:10px 15px;gap:8px}
  .account-bar span{flex-basis:100%;overflow-wrap:anywhere}
  .account-bar button,.account-bar a{min-height:44px;display:inline-flex;align-items:center}
  .page-head{display:flex;flex-direction:column;gap:12px}
  .head-actions{justify-content:flex-start;margin:0;gap:8px}
  button,.primary,.ghost,.delivery-actions a{min-height:44px}
  input,select,textarea,.form-grid input,.form-grid select,.form-grid textarea,.field input,.field select,.field textarea,.account-card input,.account-card textarea,#delivery-dialog.delivery-request input,#delivery-dialog.delivery-request textarea{font-size:16px!important;min-height:44px;max-width:100%}
  input[type=checkbox],input[type=radio]{min-height:auto}
  .search{min-width:0;flex-basis:100%}
  .toolbar>*{max-width:100%}
  .delivery-layout{grid-template-columns:minmax(0,1fr)}
  .delivery-actions{gap:8px}
  .delivery-actions>*{flex:1 1 auto;text-align:center}
  .delivery-messages{max-height:45dvh}
  .portal-metrics{gap:10px}
  .portal-metrics .card{padding:14px}
  .portal-metrics h2{font-size:28px}
  .modal-head{padding:14px 16px;gap:12px;align-items:center}
  .modal-head h2{font-size:20px}
  .modal-body{padding:16px;max-height:calc(94dvh - 145px);overscroll-behavior:contain}
  .modal-actions{padding:12px 16px;flex-wrap:wrap}
  .modal-actions button{flex:1}
  #delivery-dialog.delivery-request .form-grid{grid-template-columns:minmax(0,1fr)}
  #delivery-dialog.delivery-request .wide{grid-column:1/-1}
  #delivery-dialog.delivery-request .delivery-stops{grid-template-columns:minmax(0,1fr)}
  .account-gate{padding:16px!important;min-height:100dvh}
  .account-card{padding:24px!important}
  .account-card h1{font-size:27px}
  .account-card select{width:100%}
  .source-row{overflow-wrap:anywhere}
  #toast{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}
  .portal-footer{padding-bottom:max(22px,env(safe-area-inset-bottom))}
}
@media(max-width:360px){.sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-metrics{grid-template-columns:1fr}}

@media(max-width:760px){.radar-filter{display:flex;flex-wrap:wrap;max-width:100%}.radar-filter select{min-width:0;width:100%;max-width:100%}.radar-tabs{flex-wrap:wrap}}

body:has(dialog[open]){overflow:hidden}
.modal[open]{overflow:hidden}
.modal>form{display:flex;flex-direction:column;max-height:94dvh}
.modal-head,.modal-actions{flex-shrink:0}
.modal-body{min-height:0}
.personal-live-link{display:inline-flex;align-items:center;min-height:44px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){.modal-head .ghost{flex-shrink:0}.account-bar{padding:10px 15px!important}.mobile-brand{display:none}.radar-filter select{flex-basis:100%}}

.account-bar>button,.account-bar>a{display:none!important}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.settings-grid .setting-card{margin:0}.settings-grid p{overflow-wrap:anywhere}
.mobile-menu-toggle,.mobile-menu-close,.mobile-menu-backdrop{display:none}
@media(max-width:760px){
 .settings-grid{grid-template-columns:minmax(0,1fr)}
 .topbar{position:sticky;top:0;z-index:30;background:var(--bg);display:flex;flex-wrap:nowrap;justify-content:space-between;padding:10px 15px;border-bottom:1px solid var(--line)}
 .mobile-brand{display:block;font-size:19px;white-space:nowrap;margin-right:auto}
 .mobile-menu-toggle{display:grid;place-items:center;background:white;border:1px solid var(--line);border-radius:10px;width:44px;height:44px;flex-shrink:0;color:var(--forest);font-size:23px}
 .app-shell>.sidebar{display:flex;position:fixed;inset:0 auto 0 0;z-index:102;width:min(300px,86vw);height:100dvh;min-height:100dvh;padding:25px 16px max(20px,env(safe-area-inset-bottom));overflow-y:auto;transform:translateX(-105%);transition:transform .22s ease;box-shadow:12px 0 45px #0003}
 .drawer-open .sidebar{transform:translateX(0)}
 body.drawer-open{overflow:hidden}
 .sidebar .brand{display:flex;padding:4px 12px 25px;padding-right:30px}
 .sidebar .workspace-pill{display:flex;margin-bottom:24px}
 .sidebar .nav-label{display:block;margin:0 12px 10px}
 .sidebar .nav-label.space-top{margin-top:24px}
 .sidebar nav{display:flex;flex-direction:column;gap:5px;overflow:visible}
 .sidebar nav button{width:100%;font-size:13px;min-height:46px;padding:12px 14px;text-align:left;flex:none;border-radius:10px}
 .sidebar nav button span{display:inline-block;width:24px;font-size:17px}
 .sidebar nav b{display:inline-block}
 .sidebar .sidebar-bottom{display:block;margin-top:auto;padding-top:24px}
 .mobile-menu-close{display:grid;place-items:center;position:absolute;right:12px;top:14px;width:40px;height:40px;background:transparent;border:0;border-radius:8px;color:white;font-size:28px}
 .mobile-menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;width:100%;height:100dvh;background:#091b25aa;backdrop-filter:blur(3px);border:0;z-index:101;min-height:0}
 .main{min-height:100dvh}
}
@media(prefers-reduced-motion:reduce){.app-shell>.sidebar{transition:none}}

.workspace-pill .avatar,.profile-photo-preview{width:40px;height:40px;min-width:40px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.workspace-identity{min-width:0;overflow-wrap:anywhere}.workspace-identity strong{display:block}.brand small{letter-spacing:.04em}.profile-photo-preview{width:64px;height:64px;margin-bottom:12px}#identity-form{display:grid;gap:12px;margin:16px 0}#identity-form label{display:grid;gap:6px;font-size:13px}#identity-form input{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #edbdd0;border-radius:9px}.profile-name-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:480px){.profile-name-fields{grid-template-columns:1fr}#identity-form input{font-size:16px}}

.market-photo-option{display:flex;align-items:center;gap:10px;font-size:14px;margin:14px 0;line-height:1.5}.market-photo-option input{width:20px;height:20px;flex-shrink:0}

/* Keep account exit available outside Settings on every screen. */
.account-bar>#account-logout{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px}
.account-bar>#portal-switch{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px}
@media(max-width:760px){.dashboard-page>.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dashboard-page>.stats>.stat{padding:16px 12px}.dashboard-page .stat-top{gap:6px;min-height:29px}.dashboard-page .stat-icon{flex-shrink:0;width:25px;height:25px}.dashboard-page .stat-value{font-size:clamp(22px,6vw,26px);overflow-wrap:anywhere}.dashboard-page .stat-foot{line-height:1.4}}
