/* Warehouse staff use touch screens. Keep desktop/admin density unchanged. */
@media(max-width:1023px){
 .receiver-shell{font-size:17px;line-height:1.5;padding-bottom:calc(124px + env(safe-area-inset-bottom))}
 .receiver-content{padding:16px 14px}
 .receiver-top{padding:10px 14px;gap:12px}
 .receiver-top>div:first-child{min-width:0;flex:1}
 .receiver-top small{font-size:13px;color:#50675b}
 .receiver-top strong{font-size:24px;line-height:1.25}
 .receiver-top-actions{gap:8px;flex-shrink:0}
 .receiver-top-actions>button,.receiver-top-actions>details>summary{width:48px;height:48px;min-width:48px;border:1px solid #cfddd2;border-radius:12px;background:#f7faf5}
 .receiver-top-actions>button{position:relative;padding:8px}
 .receiver-top-actions>button svg{width:24px;height:24px;flex-shrink:0}
 .receiver-top-actions [data-notification-count]:not(:empty){position:absolute;top:2px;right:2px;min-width:18px;height:18px;display:grid;place-items:center;font-size:12px;line-height:1;border-radius:9px;background:#1c6a4c;color:#fff;padding:1px 4px}
 .receiver-top-actions summary svg{width:24px;height:24px}
 .receiver-top-actions [data-notification-count]:empty{display:none}
 .receiver-settings{width:min(300px,calc(100vw - 28px));top:54px;padding:16px;gap:12px;max-height:calc(100dvh - 125px);overflow:auto}
 .receiver-settings .language-control{display:grid;gap:6px;font-size:15px}
 .receiver-settings button,.receiver-settings select{width:100%;min-height:48px;font-size:16px}
 .receiver-settings .reminder-trigger{justify-content:center}
 .receiver-content :is(h1,.receiver-title h1){font-size:28px;line-height:1.2}
 .receiver-content h2{font-size:23px;line-height:1.3}
 .receiver-content h3,.receiver-content .arrival-card h3{font-size:20px;line-height:1.35}
 .receiver-content :is(.subtitle,.callout,.notice,.wf-status,.arrival-card small,.wf-wage small,.feed-receipt-number small){font-size:15px;line-height:1.5;color:#4d6557}
 .receiver-content button{min-width:44px;min-height:48px;font-size:17px;line-height:1.3;padding:11px 14px;white-space:normal}
 .receiver-content :is(button.primary,.wf-actions button,.arrival-card>.primary,.receiver-content>.wide){min-height:56px;font-size:18px;font-weight:700}
 .receiver-content :is(button.small,button.subtle){min-height:44px;font-size:15px}
 .receiver-content :where(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:52px;font-size:18px;padding:12px;max-width:100%}
 .receiver-content :is(label,.form-field,.sb-filters label){font-size:16px;line-height:1.4}
 .receiver-content .search{min-height:54px;font-size:18px;margin-bottom:14px}
 .receiver-content .page-head{gap:12px;margin-bottom:16px}
 .receiver-content .page-head>.small{padding:9px 12px}
 .receiver-intake-actions{gap:12px;margin:16px 0}
 .receiver-intake-actions .receiver-intake-action{min-height:128px;padding:16px 8px;gap:10px}
 .receiver-intake-actions .receiver-intake-action strong{font-size:21px;line-height:1.25;font-weight:750}
 .receiver-intake-actions .receiver-intake-action svg{width:44px;height:44px}
 .receiver-content .receipt-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;margin:12px 0 16px}
 .receiver-content .receipt-tabs button{width:100%;min-width:0;min-height:50px;padding:10px 6px;font-size:16px;white-space:normal;display:flex;gap:5px;justify-content:center;align-items:center}
 .receiver-content .receipt-tabs button b{font-size:15px;flex-shrink:0}
 .receiver-content .work-status-strip{gap:10px;padding:12px}
 .receiver-content .work-status-strip span{font-size:17px;line-height:1.4}
 .receiver-content .work-status-strip small{font-size:14px;color:#4d6557}
 .receiver-content .work-status-strip button{min-height:54px;font-size:17px;padding:10px}
 .receiver-content .wf-actions{gap:10px}
 .receiver-content .wf-actions button{padding:13px 10px}
 .receiver-content .wf-panel{padding:14px}
 .receiver-content .wf-panel .eyebrow{font-size:12px;letter-spacing:.7px}
 .receiver-content .arrival-card{padding:14px}
 .receiver-content .arrival-stage,.receiver-content .payment-state{font-size:14px;line-height:1.35;white-space:normal}
 .receiver-content .arrival-top{flex-wrap:wrap;gap:10px}
 .receiver-content .arrival-top>strong{font-size:20px}
 .receiver-content .receiver-metrics button{font-size:17px;padding:16px 14px}
 .receiver-content .receiver-metrics strong{font-size:25px;padding:14px}
 .receiver-shell .warehouse-bottom{padding:6px 6px calc(6px + env(safe-area-inset-bottom));gap:4px}
 .receiver-shell .warehouse-bottom button{min-height:64px;min-width:0;padding:7px 2px;gap:5px}
 .receiver-shell .warehouse-bottom button span{font-size:clamp(13px,3.3vw,14px);font-weight:650;line-height:1.2;white-space:nowrap}
 .receiver-shell .warehouse-bottom svg{width:26px;height:26px}
 /* Shipment work comes before filters; all four statuses remain directly visible. */
 .receiver-content .sb-header .actions button{min-height:44px;font-size:15px;padding:10px 12px}
 .receiver-content .sb-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .receiver-content .sb-tabs button{font-size:16px;min-height:50px;flex-direction:row;gap:7px;white-space:normal;padding:10px 7px}
 .receiver-content .sb-tabs button span{font-size:14px;flex-shrink:0}
 .receiver-content .sb-filters{padding:12px}
 .receiver-content .sb-filter-main,.receiver-content .sb-filter-extra{gap:10px}
 .receiver-content .sb-filter-more summary{min-height:44px;padding:10px 0;font-size:16px}
 .receiver-content .sb-card{padding:15px}
 .receiver-content .sb-card h2{font-size:21px;margin-top:14px}
 .receiver-content .sb-status,.receiver-content .sb-reference,.receiver-content .sb-facts dt,.receiver-content .sb-summary{font-size:14px}
 .receiver-content .sb-route,.receiver-content .sb-facts dd,.receiver-content .sb-vehicle{font-size:17px;line-height:1.4}
 .receiver-content .sb-quantity dd{font-size:27px}
 .receiver-content .sb-card-actions{display:flex;gap:10px;flex-wrap:wrap}
 .receiver-content .sb-card-actions .primary{min-height:56px;flex:1 1 100%;font-size:18px}
 /* Staff dialogs and the separate receiving workspace retain their own scroll areas. */
 body:has(.receiver-shell) :is(dialog:not(.photo-viewer),.receiving-app){font-size:17px;line-height:1.5}
 body:has(.receiver-shell) dialog:not(.photo-viewer){width:760px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px);border-radius:16px}
 body:has(.receiver-shell) dialog .modal-head{padding:14px;gap:8px}
 body:has(.receiver-shell) dialog .modal-head h2{font-size:21px;flex:1;min-width:0;overflow-wrap:anywhere}
 body:has(.receiver-shell) dialog .modal-body{padding:16px 14px}
 body:has(.receiver-shell) :is(dialog,.receiving-app) button{min-height:44px;min-width:44px;font-size:17px;line-height:1.3}
 body:has(.receiver-shell) dialog :where(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){min-height:52px;font-size:18px;padding:11px;max-width:100%}
 body:has(.receiver-shell) :is(dialog,.receiving-app) :is(.form-field,label){font-size:16px;line-height:1.4}
 body:has(.receiver-shell) :is(dialog,.receiving-app) :is(.muted,.subtitle,.callout,.error,.detail-label){font-size:15px;line-height:1.5}
 body:has(.receiver-shell) dialog .modal-foot{padding:12px 14px max(12px,env(safe-area-inset-bottom));gap:10px;align-items:stretch}
 body:has(.receiver-shell) dialog .modal-foot>button{min-height:52px;padding:12px 14px;font-size:17px}
 body:has(.receiver-shell) dialog .modal-foot>button.primary{flex:1;min-height:56px;font-size:19px;font-weight:700}
 body:has(.receiver-shell) dialog :is(.wf-check,.wf-repair-check label,label.check){min-height:48px;padding:8px 0;gap:12px;align-items:center}
 body:has(.receiver-shell) dialog :is(input[type=checkbox],input[type=radio]){width:24px;height:24px;min-width:24px;flex-shrink:0}
 body:has(.receiver-shell) dialog .load-detail .badge{font-size:14px;line-height:1.4}
 body:has(.receiver-shell) dialog .loading-line{gap:12px;padding:16px 0}
 body:has(.receiver-shell) dialog .loading-line strong{font-size:18px;line-height:1.4}
 body:has(.receiver-shell) dialog .loading-line small{font-size:14px}
 body:has(.receiver-shell) dialog .loading-line label{width:104px;flex-shrink:0}
 body:has(.receiver-shell) dialog .loading-line input{font-size:26px;font-weight:700;min-height:56px;padding:9px;text-align:center}
 body:has(.receiver-shell) dialog :is(.camera-button,.gallery-button){min-height:54px;font-size:18px;padding:14px 16px;justify-content:center}
 body:has(.receiver-shell) dialog .capture-actions{gap:10px}
 body:has(.receiver-shell) dialog .wf-loading{padding:14px}
 body:has(.receiver-shell) dialog .wf-loading legend{font-size:18px}
 body:has(.receiver-shell) dialog .repair-calculator-tabs{display:flex;gap:8px;flex-wrap:wrap}
 body:has(.receiver-shell) dialog .repair-calculator-tabs button{flex:1 0 108px;min-height:48px;padding:10px;font-size:18px;white-space:nowrap}
 body:has(.receiver-shell) dialog .repair-calculator-card{padding:14px}
 body:has(.receiver-shell) dialog .repair-calculator-inputs{gap:10px}
 body:has(.receiver-shell) dialog .repair-calculator-inputs input{font-size:24px;padding:10px 6px;min-height:56px;font-weight:700}
 body:has(.receiver-shell) dialog .repair-calculator-total{font-size:18px}
 body:has(.receiver-shell) .receiving-app .receiving-header{padding:8px 12px;gap:10px}
 body:has(.receiver-shell) .receiving-app .receiving-header strong{font-size:21px;line-height:1.2}
 body:has(.receiver-shell) .receiving-app .receiving-back{width:48px;min-width:48px;height:48px}
 body:has(.receiver-shell) .receiving-app .modal-body{padding-left:12px;padding-right:12px}
 body:has(.receiver-shell) .receiving-app:not(.thumb-mode) .modal-body{padding-top:16px}
 body:has(.receiver-shell) .receiving-app .modal-foot>button.primary{min-height:56px;font-size:19px;font-weight:700}
 body:has(.receiver-shell) .receiving-app :is(.step-heading p,.capture-tip,.photo-count,.client-search-hint){font-size:16px;line-height:1.5;color:#4b6554}
 body:has(.receiver-shell) .receiving-app:not(.thumb-mode) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select){min-height:52px;font-size:18px}
 body:has(.receiver-shell) .receiving-app .thumb-types button{font-size:19px}
 body:has(.receiver-shell) .receiving-app .thumb-grades strong{font-size:21px}
 body:has(.receiver-shell) .receiving-app .thumb-grades small{font-size:12px;color:#4b6554}
 body:has(.receiver-shell) .receiving-app .thumb-keypad button{font-size:28px}
 body:has(.receiver-shell) .receiving-app :is(.thumb-add,.thumb-next){font-size:18px;font-weight:700}
 body:has(.receiver-shell) .receiving-app :is(.camera-button,.gallery-button){min-height:56px;font-size:18px}
 body:has(.receiver-shell) .receiving-app:not(.thumb-mode) .wizard-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 body:has(.receiver-shell) .receiving-app .wizard-progress button{min-width:0;min-height:48px;font-size:16px;padding:8px 4px;white-space:normal}
 body:has(.receiver-shell) .receiving-app:not(.thumb-mode) .wizard-nav button.primary{min-height:56px;font-size:19px;font-weight:700}
 body:has(.receiver-shell) .receiving-app .wizard-nav .park-arrival{min-height:48px;font-size:16px}
 body:has(.receiver-shell) .receiving-app .receipt-extras>summary{min-height:48px;font-size:16px}
 @media(max-width:359px){
  .receiver-content{padding-left:12px;padding-right:12px}
  body:has(.receiver-shell) .receiving-app.exchange-mode .receiving-header .exchange-tabs strong{font-size:15px!important}
  .receiver-content .wf-actions{grid-template-columns:minmax(0,1fr)}
  .receiver-intake-actions .receiver-intake-action strong{font-size:20px}
  .receiver-content .sb-filter-main,.receiver-content .sb-filter-extra{grid-template-columns:minmax(0,1fr)}
  .receiver-content .sb-search,.receiver-content .sb-filter-extra>*{grid-column:auto}
  body:has(.receiver-shell) dialog .loading-line{gap:8px}
  body:has(.receiver-shell) dialog .loading-line label{width:88px}
  body:has(.receiver-shell) dialog .capture-actions>*{flex:1 1 100%}
 }
}
/* Secondary receiving tools live behind one accessible menu, not beside the title. */
.receiving-app .receiving-tools{position:relative;flex-shrink:0;margin:0;padding:0;border:0;background:transparent}
.receiving-tools>summary{display:grid;place-items:center;list-style:none;cursor:pointer;width:44px;height:44px;border:1px solid #cbded0;border-radius:12px;background:#f3f8f0}
.receiving-tools>summary::-webkit-details-marker{display:none}
.receiving-tools>summary svg{width:24px;height:24px}
.receiving-tools-menu{position:absolute;right:0;top:52px;width:min(270px,calc(100vw - 32px));z-index:20;display:grid;gap:10px;background:#fff;padding:14px;border:1px solid #c7dbcb;border-radius:14px;box-shadow:0 12px 28px #173c2b24}
.receiving-tools-menu>button{width:100%;min-height:48px!important;font-size:16px!important;justify-content:center}
.receiving-tools-menu .receiving-discard{color:#9a352c;background:#fff7f3;border-color:#e8c7bf}
@media(prefers-reduced-motion:no-preference){
 .receiving-tools[open]>.receiving-tools-menu{animation:workspace-appear 140ms ease-out}
}

@media(max-width:1023px) and (orientation:portrait){
 body:has(.receiver-shell) #live-calculator,body:has(.receiver-shell):has(#workplace-connection) #live-calculator{--ledger-height:clamp(96px,calc(100dvh - 594px),360px)}
}

.receiving-app .receiving-tools[open]>summary{margin-bottom:0}

@media(max-width:1023px) and (orientation:portrait){
 body:has(.receiver-shell) .receiving-app.exchange-mode #live-calculator,body:has(.receiver-shell):has(#workplace-connection) .receiving-app.exchange-mode #live-calculator{--ledger-height:clamp(64px,calc(100dvh - 625px),329px)}
}

/* Recipient details stay inside the loading form, preserving the employee's draft. */
.load-detail .shipment-recipient{margin:16px 0;border:1px solid #b9d4c9;border-radius:16px;background:var(--surface,#fff);overflow:hidden}
.load-detail .shipment-recipient>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;min-height:64px;cursor:pointer;list-style:none;background:#eaf5ef;color:#173e32;font-size:19px;font-weight:700}
.shipment-recipient>summary::-webkit-details-marker{display:none}
.shipment-recipient>summary:after{content:'⌄';font-size:25px}
.shipment-recipient[open]>summary:after{content:'⌃'}
.shipment-recipient summary small{display:block;font-size:14px;font-weight:400;margin-top:4px}
.recipient-body{padding:16px;overflow-wrap:anywhere;font-size:17px;line-height:1.5}
.recipient-company{display:block;font-size:18px}
.recipient-destination{margin:16px 0;padding:14px;border-left:4px solid #24705a;background:#f1f8f4;border-radius:8px}
.recipient-destination h3{font-size:16px!important;margin:0 0 8px!important}
.recipient-destination p{margin:0 0 10px;font-weight:600}
.recipient-destination small,.recipient-hint{color:#51665e}
.recipient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.recipient-field{min-width:0}
.recipient-field dt{font-size:14px;color:#51665e;margin-bottom:5px}
.recipient-field dd{margin:0;white-space:pre-wrap;user-select:text}
.recipient-phones{display:flex;flex-direction:column;gap:8px}
.recipient-phone,.recipient-map{display:inline-flex;align-items:center;min-height:48px;padding:8px 12px;border:1px solid #bad7c9;border-radius:10px;background:#edf7f1;color:#174c3a;font-weight:650;text-decoration:underline;width:fit-content;max-width:100%}
.load-detail .recipient-body [data-copy-recipient]{min-height:52px!important;width:100%;font-size:17px;white-space:normal}
.recipient-copy-status{font-size:15px;color:#245c45;margin:8px 0 0;min-height:0}
.recipient-copy-status:empty{display:none}
.recipient-copy-status textarea{display:block;width:100%;min-height:180px;font-size:16px}
@media(max-width:600px){.recipient-grid{grid-template-columns:minmax(0,1fr)}.recipient-body{padding:14px}}
