
body.dispatch-detail-open{overflow:hidden}
#dispatch-detail{border:0;padding:0;width:min(1540px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 48px);border-radius:12px;background:#f7f3ed;color:#233a47;box-shadow:0 24px 90px #10212d55;overflow:auto}
#dispatch-detail::backdrop{background:#132531bd;backdrop-filter:blur(7px)}
.dispatch-detail-shell{padding:25px 28px 15px}
.dispatch-detail-header{display:flex;justify-content:space-between;align-items:center;padding:0 0 22px;border-bottom:1px solid #cfc9c0;background:none;position:static;height:auto;max-width:none;margin:0}
#close-dispatch-detail{font:inherit;font-size:14px;font-weight:600;display:flex;gap:13px;align-items:center;background:transparent;color:#233a47;border:0;padding:8px 2px;cursor:pointer}
#close-dispatch-detail span{font-size:21px}
.dispatch-detail-brand{font-size:13px;letter-spacing:.08em;color:#6e7b81}.dispatch-detail-brand i{font-style:normal;margin:0 8px;color:#afa99e}
.dispatch-detail-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:28px;padding-top:24px}
.dispatch-detail-map{min-width:0;background:#eee5dc;border:1px solid #ddd1c6;border-radius:8px;overflow:hidden;position:relative;display:flex;flex-direction:column}
.dispatch-detail-map-title{padding:23px 24px 0;position:relative;z-index:1}.dispatch-detail-map-title>span,.dispatch-detail-eyebrow{color:#9b5148;font-size:11px;font-weight:700;letter-spacing:.15em;margin:0 0 9px}
.dispatch-detail-map-title h2{font-size:clamp(20px,2vw,30px);font-weight:650;margin:8px 0 8px;letter-spacing:.03em}.dispatch-detail-map-title p{font-size:12px;margin:0;color:#667077}
.dispatch-detail-scene-frame{overflow:hidden;flex:1;display:flex;align-items:center;margin:0 0 -5px}.dispatch-detail-scene{display:block;width:100%;height:auto;max-height:58vh;filter:drop-shadow(0 8px 8px #6d5d4a12);animation:dispatch-scene-zoom .65s cubic-bezier(.2,.65,.2,1) both;transform-origin:65% 65%}
.dispatch-detail-legend{display:flex;gap:18px;flex-wrap:wrap;padding:16px 24px;border-top:1px solid #d7cbbf;font-size:12px;background:#f7f0e9}.dispatch-detail-legend span{display:flex;align-items:center;gap:7px}.dispatch-detail-legend i{font-style:normal;font-size:10px;border:1px solid #bba99a;border-radius:50%;display:inline-grid;place-items:center;width:23px;height:23px;color:#8f5148}
.dispatch-detail-work{min-width:0;padding:8px 0 0}.dispatch-detail-work h2{font-size:clamp(28px,3vw,42px);font-weight:650;letter-spacing:.12em;margin:3px 0 10px}.dispatch-detail-intro{font-size:13px;color:#67777e;margin:0 0 24px}.dispatch-detail-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}.dispatch-detail-cards article{min-width:0}.dispatch-detail-cards h3{font-size:14px;font-weight:650;margin:0 0 11px;white-space:nowrap}.dispatch-detail-cards h3>span{font-size:10px;margin-right:7px;color:#9a6256;letter-spacing:.05em}
.dispatch-detail-photo{padding:0;display:block;position:relative;width:100%;aspect-ratio:9/16;border:0;border-radius:6px;overflow:hidden;background:#d4cec8;box-shadow:0 5px 16px #26384615;cursor:zoom-in;text-align:left}.dispatch-detail-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:left;transition:transform .4s}.dispatch-detail-photo[data-photo="right"] img{object-position:right}.dispatch-detail-photo:hover img{transform:scale(1.035)}.dispatch-detail-photo:focus-visible{outline:3px solid #9e4d42;outline-offset:4px}.dispatch-detail-photo:after{content:"";position:absolute;inset:55% 0 0;background:linear-gradient(transparent,#15232c85);pointer-events:none}.dispatch-detail-image-badge{position:absolute;left:10px;top:10px;padding:4px 7px;border-radius:3px;background:#fffdf2e6;font-size:9px;color:#59615f}.dispatch-detail-expand{position:absolute;bottom:13px;left:12px;right:12px;color:white;font-size:11px;z-index:1;letter-spacing:.05em}.dispatch-detail-pending{font-size:10px;line-height:1.7;color:#7a7d7b;margin:15px 0 0}.dispatch-detail-footnote{font-size:10px;line-height:1.7;color:#7b817f;margin:15px 0 0;text-align:right}
@keyframes dispatch-scene-zoom{from{transform:scale(.76);opacity:.4}to{transform:scale(1);opacity:1}}
.dispatch-handheld{animation:handheld-scan 3.6s ease-in-out infinite;transform-origin:1330px 588px}.scanner-glint{animation:scan-flash 3.6s steps(1) infinite}.cargo-check-hand{animation:cargo-check 4.8s ease-in-out infinite;transform-origin:1330px 663px}
@keyframes handheld-scan{0%,100%{transform:rotate(0deg)}35%,60%{transform:rotate(-9deg)}}@keyframes scan-flash{0%,30%,70%,100%{opacity:0}40%,60%{opacity:.7}}@keyframes cargo-check{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-7deg)}}
@media(max-width:950px){#dispatch-detail{width:calc(100vw - 28px);max-height:calc(100dvh - 28px)}.dispatch-detail-shell{padding:17px}.dispatch-detail-grid{grid-template-columns:1.15fr 1fr;gap:18px}.dispatch-detail-map-title{padding:18px 16px 0}.dispatch-detail-map-title p{line-height:1.7}.dispatch-detail-legend{padding:13px;gap:8px;font-size:10px}.dispatch-detail-cards{gap:10px}.dispatch-detail-cards h3{font-size:12px}.dispatch-detail-cards h3>span{display:none}.dispatch-detail-brand{font-size:10px}.dispatch-detail-intro{margin-bottom:18px}}
@media(max-width:640px){#dispatch-detail{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:8px}.dispatch-detail-shell{padding:13px}.dispatch-detail-header{padding-bottom:12px}.dispatch-detail-brand{display:none}.dispatch-detail-grid{grid-template-columns:1fr;padding-top:15px;gap:22px}.dispatch-detail-map-title h2{font-size:22px}.dispatch-detail-scene{max-height:42vh}.dispatch-detail-work{padding:0 3px}.dispatch-detail-work h2{font-size:30px}.dispatch-detail-cards{gap:12px}.dispatch-detail-cards h3{font-size:13px}.dispatch-detail-footnote{text-align:left}.dispatch-detail-legend{font-size:10px;justify-content:center}.dispatch-detail-pending{font-size:10px}}
@media(prefers-reduced-motion:reduce){.dispatch-detail-scene,.dispatch-handheld,.scanner-glint,.cargo-check-hand{animation:none!important}.dispatch-detail-photo img{transition:none}}
#close-dispatch-detail{margin:0}.dispatch-detail-photo img{margin:0}.dispatch-detail-scene{max-height:47vh}.dispatch-detail-header{min-height:0}.dispatch-detail-header .dispatch-detail-brand{margin-left:auto}
@media(max-width:640px){.dispatch-detail-scene{max-height:42vh}}

.dispatch-mobile-break{display:none}@media(max-width:640px){.dispatch-mobile-break{display:block}}
/* Continuous camera movement of the original map, not a second cropped illustration. */
#dispatch-detail{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-height:none;border-radius:0;background:#eee6dd;box-shadow:none;overflow:hidden}
#dispatch-detail::backdrop{background:transparent;backdrop-filter:none}
.dispatch-camera{position:absolute;inset:0;overflow:hidden;pointer-events:none}
#wide-factory.dispatch-camera-map{position:absolute!important;left:0;top:0;width:1672px!important;height:941px!important;min-width:1672px!important;max-width:none!important;margin:0!important;transform-origin:0 0;will-change:transform}
.dispatch-camera-map [data-zone],.dispatch-camera-map .map-area{visibility:hidden!important}
.dispatch-detail-shell{position:relative;z-index:2;height:100%;padding:0;pointer-events:none}
.dispatch-detail-header{position:absolute;inset:22px 30px auto;border:0;padding:0;pointer-events:auto;z-index:3}
#close-dispatch-detail{background:#fffdf4ed;border-radius:30px;padding:12px 20px;box-shadow:0 3px 18px #35434c15}
.dispatch-detail-brand{display:none}
.dispatch-detail-grid{display:block;padding:0;height:100%}.dispatch-detail-map{display:none}
.dispatch-detail-work{position:absolute;right:0;top:0;width:39%;height:100%;box-sizing:border-box;padding:80px 30px 35px;background:linear-gradient(90deg,#f7f3eddf,#f7f3ed 13%);overflow:auto;pointer-events:auto;opacity:0;transform:translateX(30px);transition:opacity .35s,transform .5s}
.camera-ready .dispatch-detail-work{opacity:1;transform:none}.dispatch-detail-cards{gap:16px}.dispatch-detail-photo{max-height:58vh}.dispatch-detail-footnote{position:absolute;bottom:14px;left:25px;width:53%;text-align:left;margin:0;padding:8px;background:#f7f3edb8;font-size:10px}
@media(max-width:640px){.dispatch-detail-header{inset:14px 16px auto}#close-dispatch-detail{padding:8px 14px;font-size:12px}.dispatch-detail-work{top:53%;height:47%;width:100%;padding:18px 22px 25px;background:#f7f3edeb;transform:translateY(20px)}.dispatch-detail-work h2{font-size:25px}.dispatch-detail-intro{margin-bottom:12px}.dispatch-detail-eyebrow{display:none}.dispatch-detail-photo{max-height:none}.dispatch-detail-cards{max-width:400px;margin:auto}.dispatch-detail-footnote{display:none}.dispatch-detail-pending{font-size:10px}}
/* In-map HUD: floating information rather than a white side sheet. */
#dispatch-detail{background:#172d35 url('factory-clean-plate.png') center/cover no-repeat}
#dispatch-detail::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#293c4520 35%,#102c35e8 75%);backdrop-filter:blur(12px)}
.dispatch-camera{mask-image:linear-gradient(90deg,#000 51%,#000b 62%,transparent 79%)}
.dispatch-camera-map .motion-zone[data-motion="出荷"] *{animation-play-state:running!important}
.dispatch-detail-work{background:none;color:#f5f1df;padding:74px 27px 26px;overflow:auto;transform:translateY(24px) scale(.96);transform-origin:50% 60%;transition:opacity .35s,transform .6s cubic-bezier(.16,1.35,.4,1)}
.camera-ready .dispatch-detail-work{transform:translateY(0) scale(1)}
.dispatch-detail-eyebrow{color:#e4c484;font-size:10px;letter-spacing:.24em}.dispatch-detail-work h2{color:#fff6db;text-shadow:0 3px 20px #0005;letter-spacing:.16em}.dispatch-detail-intro{color:#c1d1cd}.dispatch-detail-cards{gap:16px}.dispatch-detail-cards article{background:linear-gradient(145deg,#284550e6,#142d35f5);border:1px solid #cebc8659;border-radius:15px;padding:10px;box-shadow:0 12px 30px #07161f55,inset 0 1px #fff2;transition:transform .25s,box-shadow .25s}.dispatch-detail-cards article:hover{transform:translateY(-6px);box-shadow:0 17px 32px #07161f88,0 0 0 1px #e2ca8a99}.dispatch-detail-cards h3{font-size:12px;color:#f1e4be;margin:4px 0 12px;letter-spacing:.02em}.dispatch-detail-cards h3>span{color:#dcbf7a}.dispatch-detail-photo{border-radius:9px;box-shadow:none}.dispatch-detail-expand{font-weight:600;letter-spacing:.02em}.dispatch-detail-pending{color:#afc1be;background:#0a232b77;border:1px solid #ffffff13;border-radius:8px;padding:10px 12px}.dispatch-detail-image-badge{background:#102b38d9;color:#e9e7d6;border:1px solid #e9dfac40}.dispatch-detail-footnote{background:#1730399e;color:#dae1d8;border-radius:6px}
@media(max-width:950px) and (min-width:641px){.dispatch-detail-work{padding:76px 16px 20px}.dispatch-detail-cards{gap:9px}.dispatch-detail-cards article{padding:7px}.dispatch-detail-cards h3{font-size:11px}}
@media(max-width:640px){.dispatch-camera{mask-image:linear-gradient(#000 40%,#000b 51%,transparent 65%)}.dispatch-detail-work{padding:18px 20px 25px;background:linear-gradient(#173039dd,#102a32f5);top:52%;height:48%}.dispatch-detail-intro{color:#c1d1cd}.dispatch-detail-cards h3{font-size:12px}.dispatch-detail-cards article{padding:8px}.dispatch-detail-cards{gap:12px}}
@media(prefers-reduced-motion:reduce){.dispatch-detail-work,.dispatch-detail-cards article{transition:none}}
/* Warm floating HUD frames, without a full-height side sheet. */
#dispatch-detail{background:#eee4da}
#dispatch-detail::before{background:radial-gradient(ellipse at 80% 45%,#fff9ed88,transparent 65%);backdrop-filter:none}
.dispatch-camera{mask-image:linear-gradient(90deg,#000 49%,#000d 58%,transparent 73%)}
.dispatch-detail-work{color:#39464b;background:none;padding:80px 27px 26px}
.dispatch-detail-work h2{color:#34454c;text-shadow:0 2px 0 #fff9}.dispatch-detail-eyebrow{color:#9a7653}.dispatch-detail-intro{color:#70746e}
.dispatch-detail-cards article{background:linear-gradient(145deg,#fffaf0ed,#e9dfd1f2);border:1px solid #af947158;border-radius:15px;box-shadow:0 12px 28px #6d59451c,inset 0 1px #fff;}
.dispatch-detail-cards article:hover{box-shadow:0 17px 30px #6d59452d,0 0 0 1px #b8996599}
.dispatch-detail-cards h3{color:#4d5149}.dispatch-detail-cards h3>span{color:#9c7c4f}
.dispatch-detail-pending{color:#777970;background:#fff9ee8c;border:1px solid #b4a28c3b;box-shadow:0 4px 15px #6d594509}
.dispatch-detail-image-badge{background:#fff9eee6;color:#646354;border:1px solid #ae94744d}
.dispatch-detail-footnote{background:#fff9eea6;color:#777970}
@media(max-width:640px){.dispatch-detail-work{padding:18px 20px 25px;background:none}.dispatch-detail-intro{color:#70746e}.dispatch-camera{mask-image:linear-gradient(#000 39%,#000c 49%,transparent 61%)}}

#dispatch-detail.camera-closing .dispatch-detail-work,#dispatch-detail.camera-closing .dispatch-detail-footnote{visibility:hidden;opacity:0;transition:none;pointer-events:none}
#dispatch-detail.camera-closing .dispatch-camera{mask-image:none}
/* One refined signboard around the complete shipping information. */
.dispatch-detail-work{top:6%;right:2%;width:37%;height:auto;max-height:88%;padding:27px 22px 22px;background:#eee5da;border:2px solid #9b8a714d;border-radius:7px;box-shadow:0 12px 28px #72604c19,inset 0 0 0 5px #f9f3e780,inset 0 0 0 6px #a894751f;}
.dispatch-detail-work::before{content:"";position:absolute;top:11px;left:11px;width:5px;height:5px;border-radius:50%;background:#a99a82;box-shadow:0 1px 1px #fff8}
.dispatch-detail-work h2{font-size:clamp(26px,3vw,40px)}
.dispatch-detail-photo{max-height:53vh}
@media(max-width:950px) and (min-width:641px){.dispatch-detail-work{right:1.5%;width:38%;padding:23px 14px 18px}.dispatch-detail-cards{gap:10px}}
@media(max-width:640px){.dispatch-detail-work{top:52%;right:3%;width:94%;height:46%;max-height:none;padding:18px 17px 22px;background:#eee5da}.dispatch-detail-photo{max-height:none}.dispatch-detail-work h2{font-size:25px}}
/* v56: sample the map's blush-beige ground, not an unrelated ivory panel. */
#dispatch-detail{--shipping-ground:#ecdad0;background:var(--shipping-ground)}
#dispatch-detail::before{background:none;backdrop-filter:none}
#dispatch-detail .dispatch-detail-work{background:var(--shipping-ground);border-color:#a78b78;box-shadow:0 12px 28px #72604c19,inset 0 0 0 5px #ecdad0,inset 0 0 0 6px #bfa38c66}
#dispatch-detail .dispatch-detail-cards article{background:#ead5c7;border-color:#b59a8580;box-shadow:0 8px 20px #6d594515,inset 0 1px #f6e8df}
#dispatch-detail .dispatch-detail-pending{background:#ecdad0;border-color:#b59a8550}

#dispatch-detail[data-active-zone="在庫"] .motion-zone[data-motion="在庫"] *{animation-play-state:running!important}
#dispatch-detail[data-active-zone="在庫"] .dispatch-detail-photo{aspect-ratio:3/4}
.inventory-worker-body{animation:inventory-check 6s ease-in-out infinite}
.inventory-phone-hand{transform-origin:1317px 366px;animation:inventory-phone-check 6s ease-in-out infinite}
.inventory-tapping-finger{animation:inventory-tap 6s ease-in-out infinite}
.inventory-app-confirm,.inventory-confirm-indicator{animation:inventory-saved 6s steps(1) infinite;opacity:0}
@keyframes inventory-check{0%,100%{transform:rotate(0deg)}25%,70%{transform:rotate(-1deg)}}
@keyframes inventory-phone-check{0%,100%{transform:rotate(3deg)}20%,75%{transform:rotate(-2deg)}}
@keyframes inventory-tap{0%,22%,43%,65%,100%{transform:rotate(-8deg)}29%,36%,52%,59%{transform:rotate(2deg)}}
@keyframes inventory-saved{0%,64%,91%,100%{opacity:0}65%,90%{opacity:1}}
@media(prefers-reduced-motion:reduce){.inventory-mobile-worker *{animation:none!important}.inventory-app-confirm{opacity:1}}

/* Enlarge only the phone UI at the user's marked size, not the worker. */
.inventory-phone-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="在庫"] .inventory-phone-preview{opacity:1}
.inventory-preview-saved{animation:inventory-saved 6s steps(1) infinite;opacity:0}
@media(prefers-reduced-motion:reduce){.inventory-phone-preview{transition:none}.inventory-preview-saved{opacity:0}}

#dispatch-detail[data-active-zone="検査"] .motion-zone[data-motion="検査"] *{animation-play-state:running!important}
#dispatch-detail[data-active-zone="検査"] .dispatch-detail-photo{aspect-ratio:3/4}
.inspection-typing-body{animation:inspection-type-body 5s ease-in-out infinite}
.inspection-typing-hands{animation:inspection-type-hands .6s ease-in-out infinite}
.inspection-screen-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="検査"] .inspection-screen-preview{opacity:1}
.inspection-entered-value{animation:inspection-input 5s steps(1) infinite}
@keyframes inspection-type-body{0%,100%{transform:rotate(0deg)}40%,70%{transform:rotate(-1deg)}}
@keyframes inspection-type-hands{0%,100%{transform:translateY(0)}50%{transform:translateY(1px)}}
@keyframes inspection-input{0%,28%,100%{opacity:0}29%,94%{opacity:1}}
@media(prefers-reduced-motion:reduce){.inspection-computer-worker *{animation:none!important}.inspection-screen-preview{transition:none}}

.shipping-phone-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="出荷"] .shipping-phone-preview{opacity:1}
.shipping-preview-saved{animation:shipping-phone-confirm 9s steps(1) infinite;opacity:0}
@keyframes shipping-phone-confirm{0%,66%,93%,100%{opacity:0}67%,92%{opacity:1}}
@media(prefers-reduced-motion:reduce){.shipping-phone-preview{transition:none}.shipping-preview-saved{animation:none!important;opacity:0}}

#dispatch-detail[data-active-zone="受注"] .motion-zone[data-motion="受注"] *{animation-play-state:running!important}
#dispatch-detail[data-active-zone="受注"] .dispatch-detail-photo{aspect-ratio:3/4}
.order-screen-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="受注"] .order-screen-preview{opacity:1}
.order-entered-value{animation:inspection-input 5s steps(1) infinite}
@media(prefers-reduced-motion:reduce){.order-screen-preview{transition:none}.order-entered-value{animation:none!important}}

#dispatch-detail[data-active-zone="見積"] .motion-zone[data-motion="見積"] *{animation-play-state:running!important}
#dispatch-detail[data-active-zone="見積"] .dispatch-detail-photo{aspect-ratio:3/4}
.quote-screen-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="見積"] .quote-screen-preview{opacity:1}
.quote-mouse-hand{animation:quote-mouse 5s ease-in-out infinite;transform-origin:186px 294px}
.quote-search-results{animation:quote-results 5s steps(1) infinite}
.quote-selected-drawing{animation:quote-select 5s steps(1) infinite}
@keyframes quote-mouse{0%,100%{transform:rotate(0deg)}35%,65%{transform:rotate(-4deg)}}
@keyframes quote-results{0%,18%,100%{opacity:.2}19%,96%{opacity:1}}
@keyframes quote-select{0%,54%,100%{opacity:0}55%,96%{opacity:1}}
@media(prefers-reduced-motion:reduce){.quote-screen-preview{transition:none}.quote-mouse-hand,.quote-search-results,.quote-selected-drawing{animation:none!important}}

#dispatch-detail[data-active-zone="工程"] .motion-zone[data-motion="工程"] *{animation-play-state:running!important}
.process-phone-preview{opacity:0;transition:opacity .25s}
#dispatch-detail.camera-ready:not(.camera-closing)[data-active-zone="工程"] .process-phone-preview{opacity:1}
.process-preview-saved{animation:inventory-saved 6s steps(1) infinite;opacity:0}
[data-process-worker="2"] *,[data-process-phone="2"] *{animation-delay:-2s}
[data-process-worker="3"] *,[data-process-phone="3"] *{animation-delay:-4s}
.dispatch-detail-cards article[hidden]{display:none!important}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards{grid-template-columns:1fr;gap:10px}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards article{display:grid;grid-template-columns:1fr 42%;align-items:center;gap:10px;padding:9px 12px}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards h3{white-space:normal;font-size:16px;line-height:1.6;margin:0}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards h3>span{display:block;font-size:11px}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-photo{aspect-ratio:4/3;max-height:132px}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-photo img{object-position:center 60%!important}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-work{top:3%;max-height:94%;padding-top:20px}
#dispatch-detail[data-active-zone="工程"] .dispatch-detail-intro{margin-bottom:14px}
@media(max-width:640px){#dispatch-detail[data-active-zone="工程"] .dispatch-detail-work{top:52%;height:46%;max-height:none}#dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards h3{font-size:14px}}
@media(prefers-reduced-motion:reduce){.process-phone-preview{transition:none}.process-mobile-worker *,.process-preview-saved{animation:none!important}}

/* Keep the enlarged rightmost phone clear before the information board begins. */
#dispatch-detail[data-active-zone="工程"] .dispatch-camera{mask-image:linear-gradient(90deg,#000 59%,#000e 61%,transparent 67%)}
@media(max-width:640px){#dispatch-detail[data-active-zone="工程"] .dispatch-camera{mask-image:linear-gradient(#000 43%,#000d 49%,transparent 54%)}}

/* Reference-matched information boards: generous full-height frames. */
@media(min-width:641px){
 #dispatch-detail .dispatch-detail-work{top:2%;right:1%;width:39%;height:92%;max-height:92%;display:flex;flex-direction:column;padding:25px 22px 20px;overflow:auto}
 #dispatch-detail[data-active-zone="在庫"] .dispatch-detail-work{width:41%;height:94%;max-height:94%;top:1%}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-work{top:1%;height:98%;max-height:98%;padding-top:22px}
 #dispatch-detail .dispatch-detail-cards{flex:1;min-height:0;align-items:stretch}
 #dispatch-detail .dispatch-detail-cards article{display:flex;flex-direction:column;min-height:0}
 #dispatch-detail .dispatch-detail-cards h3{flex:none}
 #dispatch-detail .dispatch-detail-photo{flex:1;min-height:100px;max-height:none;aspect-ratio:auto}
 #dispatch-detail .dispatch-detail-pending{flex:none;margin-top:15px}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards{grid-template-rows:repeat(3,minmax(0,1fr))}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards article{display:grid;grid-template-columns:1fr 44%;align-items:stretch}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards h3{align-self:center}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-photo{height:100%;min-height:95px;max-height:none;aspect-ratio:auto}
}
@media(min-width:641px) and (max-height:620px){
 #dispatch-detail .dispatch-detail-work{padding:18px 16px}
 #dispatch-detail .dispatch-detail-work h2{font-size:28px;margin-bottom:6px}
 #dispatch-detail .dispatch-detail-intro{margin-bottom:12px}
 #dispatch-detail .dispatch-detail-pending{font-size:9px;padding:6px;margin-top:10px}
 #dispatch-detail[data-active-zone="工程"] .dispatch-detail-cards{grid-template-rows:repeat(3,minmax(100px,1fr))}
}

/* Actual label-application clip. Other workflow cards stay unchanged. */
.dispatch-detail-photo.has-label-video>img{visibility:hidden}
.dispatch-detail-photo .shipping-label-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.dispatch-detail-photo .shipping-label-video[hidden]{display:none}
.shipping-video-dialog{padding:20px;background:#ecdad0;border:2px solid #b39a87;border-radius:16px;max-width:92vw;max-height:94vh}
.shipping-video-dialog::backdrop{background:#201c18b8}
.shipping-video-dialog video{display:block;width:auto;max-width:85vw;height:72vh;max-height:72vh;object-fit:contain;margin:12px auto;background:#28231f;border-radius:6px}
.shipping-video-close{display:block;margin-left:auto;padding:8px 18px;border:1px solid #b39a87;border-radius:7px;background:#f6e9df;cursor:pointer}
.shipping-video-dialog p{font-size:12px;color:#5a473b;margin:10px 0 0}

/* Keep the picker's face and torso in the narrow portrait card. */
#dispatch-detail[data-active-zone="出荷"] .dispatch-detail-photo[data-photo="left"] .shipping-label-video{object-position:85% center}

#dispatch-detail[data-active-zone="在庫"] .dispatch-detail-photo[data-photo="left"] .shipping-label-video{object-position:45% center}

#dispatch-detail[data-active-zone="工程"] .shipping-label-video{object-fit:contain;background:#d8c7bc}
