/* Reference-driven registration: shared by first-floor and fourth-floor reference modals. */
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog { width:min(1080px,calc(100vw - 48px)); max-width:none; border-radius:32px; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > header { position:relative; justify-content:center; min-height:56px; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > header h2 { font-size:16px; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > header > button { position:absolute; right:12px; top:8px; border:0; border-radius:50%; width:40px; height:40px; background:#f5f5f7; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-split { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,1fr); gap:0; min-height:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-production-pane,
#shippingReplenishmentRegistrationModal .shipping-reference-shortage-pane { min-width:0; }
#shippingReplenishmentRegistrationModal .shipping-host-production { font-size:13px; line-height:1.5; }
#shippingReplenishmentRegistrationModal .shipping-production-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
#shippingReplenishmentRegistrationModal .shipping-production-heading h3 { margin:0; font-size:14px; }
#shippingReplenishmentRegistrationModal .shipping-production-heading > span,
#shippingReplenishmentRegistrationModal .is-different,
#shippingReplenishmentRegistrationModal .shipping-production-difference { color:#ff3b30; font-size:12px; }
#shippingReplenishmentRegistrationModal .shipping-production-tabs { display:flex; gap:3px; padding:3px; margin-bottom:16px; border-radius:20px; background:#f5f5f7; overflow-x:auto; }
#shippingReplenishmentRegistrationModal .shipping-production-tabs > button { flex:1 0 auto; border:1px solid transparent; border-radius:17px; background:transparent; padding:10px 12px; height:auto; color:#7b7b82; font:inherit; }
#shippingReplenishmentRegistrationModal .shipping-production-tabs > button[aria-selected="true"] { background:white; color:#222; border-color:#e3e3e7; box-shadow:0 1px 3px #00000008; }
#shippingReplenishmentRegistrationModal .shipping-production-tabs small { font-size:11px; }
#shippingReplenishmentRegistrationModal .shipping-production-cards { padding:4px; background:#f5f5f7; border-radius:20px; }
#shippingReplenishmentRegistrationModal .shipping-production-card { display:flex; align-items:center; gap:10px; width:100%; min-height:62px; height:auto; max-height:none; padding:10px 8px; border:1px solid transparent; border-radius:17px; background:white; text-align:left; font-size:13px; color:#252529; white-space:normal; }
#shippingReplenishmentRegistrationModal .shipping-production-card + .shipping-production-card { margin-top:4px; }
#shippingReplenishmentRegistrationModal .shipping-production-card:hover,
#shippingReplenishmentRegistrationModal .shipping-production-card.is-selected { background:white; border-color:#e0e0e5; }
#shippingReplenishmentRegistrationModal .shipping-production-card:disabled { opacity:1; cursor:default; }
#shippingReplenishmentRegistrationModal .shipping-production-card img,
#shippingReplenishmentRegistrationModal .shipping-production-image-empty { flex:none; width:44px; height:44px; border-radius:11px; object-fit:contain; background:#e8e8eb; }
#shippingReplenishmentRegistrationModal .shipping-production-image-empty { display:grid; place-items:center; color:#a0a0a6; }
#shippingReplenishmentRegistrationModal .shipping-production-card-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
#shippingReplenishmentRegistrationModal .shipping-production-card-copy strong { font-weight:500; display:block; }
#shippingReplenishmentRegistrationModal .shipping-production-card-copy small { display:block; font-size:12px; color:#85858c; }
#shippingReplenishmentRegistrationModal .shipping-production-difference,
#shippingReplenishmentRegistrationModal .shipping-production-difference span { display:block; }
#shippingReplenishmentRegistrationModal .shipping-production-amount { flex:none; font-variant-numeric:tabular-nums; }
#shippingReplenishmentRegistrationModal .shipping-reference-shortage-pane h3 { font-size:14px; margin:10px 0 16px; }
#shippingReplenishmentRegistrationModal .shipping-reference-shortage-pane h4 { color:#85858c; font-size:12px; margin:26px 0 8px; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor { padding:12px; border:0; border-radius:16px; background:#f5f5f7; display:block; box-sizing:border-box; }
#shippingReplenishmentRegistrationModal .shipping-reference-shortage-pane [hidden] { display:none !important; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-type-picker { display:flex; padding:3px; gap:3px; border-radius:13px; background:#f5f5f7; margin:0 0 16px; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-type-label { display:none; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-type-picker button { flex:1; color:#7d7d85; border:1px solid transparent; border-radius:10px; background:transparent; min-height:35px; font-size:13px; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-type-picker button.is-active { color:#222; background:white; border-color:#e3e3e8; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor label { display:block; min-width:0; font-size:12px; color:#7c7c84; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor input:not([type="hidden"]),
#shippingReplenishmentRegistrationModal .shipping-reference-editor select { display:block; width:100%; min-width:0; box-sizing:border-box; height:var(--reference-control-height,44px); padding:var(--reference-control-padding,10px 12px); border:1px solid #e8e8ec; border-radius:var(--reference-control-radius,13px); background:white; color:#27272b; font-size:var(--reference-control-font-size,14px); margin-top:var(--reference-label-gap,4px); }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor input:focus { outline:none !important; border-color:#e8e8ec !important; box-shadow:none !important; }
#shippingReplenishmentRegistrationModal .shipping-reference-name-row { display:flex; gap:var(--reference-name-gap,8px); align-items:center; }
#shippingReplenishmentRegistrationModal .shipping-reference-name-field { flex:1; min-width:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-name-caption { display:flex; align-items:center; justify-content:space-between; gap:8px; height:22px; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker { position:relative; flex:none; font-size:12px; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:66px; height:22px; padding:0 6px; border:0; border-radius:6px; color:#0071e3; list-style:none; cursor:pointer; box-sizing:border-box; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker > summary::-webkit-details-marker { display:none; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker > summary:hover,
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker[open] > summary { background:#eaeaec; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker[data-disabled] > summary { opacity:.5; cursor:default; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-menu { position:absolute; top:calc(100% + 6px); right:0; z-index:20; width:128px; padding:5px; border:1px solid #e8e8ec; border-radius:12px; background:#fff; box-shadow:0 6px 24px #00000018,0 2px 6px #00000008; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-category-menu > button { display:block; width:100%; height:32px; min-height:32px; padding:0 10px; margin:0; border:0; border-radius:7px; background:transparent; color:#27272b; font:inherit; font-size:13px; text-align:left; box-shadow:none; cursor:pointer; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-category-menu > button[aria-checked="true"] { background:#f5f5f7; color:#0071e3; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-category-menu > button:hover,
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-category-menu > button:focus-visible { background:#ededf0; }
#shippingReplenishmentRegistrationModal .shipping-reference-category-picker :focus-visible { outline:1px solid #85858c; outline-offset:1px; }
@media(max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-category-menu > button { height:40px; min-height:40px; }
}
#shippingReplenishmentRegistrationModal .shipping-reference-editor-meta { display:grid; grid-template-columns:1.2fr 1.1fr .9fr; gap:10px; margin-top:var(--reference-editor-row-gap,12px); }
#shippingReplenishmentRegistrationModal .shipping-reference-editor-meta.without-price { grid-template-columns:1fr 1fr; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor-quantity { display:grid; grid-template-columns:minmax(0,1fr) 112px; gap:10px; margin-top:var(--reference-editor-row-gap,12px); }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-control { width:var(--reference-upload-size,44px); min-width:var(--reference-upload-size,44px); flex:none; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-upload { display:flex; align-items:center; justify-content:center; width:var(--reference-upload-size,44px) !important; min-width:var(--reference-upload-size,44px) !important; max-width:var(--reference-upload-size,44px) !important; height:var(--reference-upload-size,44px) !important; min-height:var(--reference-upload-size,44px) !important; max-height:var(--reference-upload-size,44px) !important; border:1px solid #e0e0e5; border-radius:var(--reference-upload-radius,11px); background:#f6f6f8; padding:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-upload img { width:100%; height:100%; object-fit:contain; border-radius:var(--reference-upload-radius,10px); }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-upload > span:not(:first-child),
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-upload small,
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-actions > span { display:none; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-actions { display:flex; flex-wrap:wrap; font-size:10px; }
#shippingReplenishmentRegistrationModal .shipping-reference-editor .shipping-replenishment-detail-image-actions button { font-size:10px; border:0; padding:0; min-height:16px; }
#shippingReplenishmentRegistrationModal .shipping-reference-add { display:block; margin:12px auto 0; padding:6px; background:transparent; border:0; color:#0071e3; font-size:14px; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-list { border-radius:20px; background:#f5f5f7; padding:4px; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item { display:flex; align-items:center; gap:8px; min-width:0; padding:8px; font-size:12px; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item > button[data-reference-edit-draft] { flex:none; text-align:left; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item button { background:transparent; border:0; height:auto; padding:0; color:#808088; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item img,
#shippingReplenishmentRegistrationModal .shipping-reference-summary-placeholder { width:42px; height:42px; border-radius:10px; object-fit:contain; background:#e9e9ec; flex:none; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item > span:not(.shipping-reference-summary-placeholder),
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item button > span:not(.shipping-reference-summary-placeholder) { flex:1; min-width:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item strong { display:block; color:#333; font-weight:400; overflow-wrap:anywhere; }
#shippingReplenishmentRegistrationModal .shipping-reference-summary-item small { display:block; color:#888; }
#shippingReplenishmentRegistrationModal .shipping-reference-total { margin-right:auto; font-size:13px; color:#85858d; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer { justify-content:flex-end; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer button { min-height:40px; padding:8px 18px; border-radius:13px; }
@media(min-width:769px) {
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] { --reference-control-height:34px; --reference-control-padding:6px 10px; --reference-control-radius:8px; --reference-control-font-size:13px; --reference-control-line-height:20px; --reference-label-gap:4px; --reference-upload-size:34px; --reference-upload-radius:8px; --reference-name-gap:10px; --reference-editor-row-gap:10px; --reference-join-width:104px; --reference-join-margin:10px 0 0 auto; --reference-join-radius:8px; --reference-join-weight:400; }
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-name-field { line-height:18px; }
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-name-field input { height:var(--reference-control-height) !important; min-height:var(--reference-control-height) !important; max-height:var(--reference-control-height) !important; line-height:var(--reference-control-line-height); }
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer { padding:10px 20px; }
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer button { height:38px; min-height:38px; padding:0 16px; border-radius:10px; font-size:14px; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog { height:min(668px,calc(100vh - 40px)); }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-body { display:flex; flex-direction:column; overflow:hidden; padding-bottom:0; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-product-summary { flex:none; margin-bottom:16px; border:0; padding-bottom:0; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-split { flex:1; overflow:hidden; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-production-pane { overflow-y:auto; padding-right:18px; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-shortage-pane { overflow-y:auto; border-left:1px solid #e8e8ed; padding:0 0 18px 24px; }
 #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-message:empty { display:none; }
}
@media(max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-split { grid-template-columns:minmax(0,1fr); gap:20px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-type-picker { display:flex; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-editor-meta { grid-template-columns:1fr 1fr .85fr; }
}

@media(max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-editor { display:block; min-width:0; padding:12px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-new { border:0; padding:0; background:transparent; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-production-card { display:flex; height:auto; max-height:none; min-height:64px; font-size:13px; font-weight:400; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-name-row { display:flex; width:100%; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-name-row input { flex:1; width:100%; min-width:0; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-editor-meta label { min-width:0; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-summary-item { font-weight:400; }
}

/* The reference design uses a quiet white selection, without the legacy tick. */
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-type-picker button[aria-pressed="true"] { background:#fff !important; color:#252529 !important; -webkit-text-fill-color:#252529 !important; border-color:#e3e3e8 !important; font-weight:400; box-shadow:none; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-type-picker button::before { content:none; display:none; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-production-cards { display:block; height:auto; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-production-card { flex-shrink:0; line-height:1.5; }
#shippingReplenishmentRegistrationModal .shipping-production-source-status { padding:16px; color:#85858c; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer [data-shipping-replenishment-close] { background:#e9e9ee !important; border-color:#e9e9ee !important; color:#252529 !important; }
html body #shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > footer [data-shipping-replenishment-submit] { background:#0071e3 !important; border-color:#0071e3 !important; color:white !important; }

/* Legacy modal controls impose a fixed 40px height; content cards must grow. */
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-production-card,
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-summary-item button { height:auto !important; min-height:0 !important; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-production-card { min-height:64px !important; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-detail-image-actions button { height:auto !important; min-height:16px !important; font-size:10px; line-height:16px; }

/* Shared palette and neutral backdrop from the supplied reference. */
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] { background:transparent; backdrop-filter:none; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-backdrop { background:rgba(0,0,0,.28); }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > :is(header,footer),
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-body { background:#fff; color:#252529; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-name-row { align-items:flex-start; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-detail-image-actions button { font-size:10px !important; font-weight:400 !important; line-height:16px !important; color:#85858c; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-field { color:#7c7c84; font-size:12px; min-width:0; display:block; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker { position:relative; margin-top:4px; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker > summary { display:flex; align-items:center; justify-content:space-between; box-sizing:border-box; height:var(--reference-control-height,44px); padding:var(--reference-control-padding,10px 12px); border:1px solid #e8e8ec; border-radius:var(--reference-control-radius,13px); font-size:var(--reference-control-font-size,14px); color:#252529; list-style:none; cursor:pointer; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker > summary::-webkit-details-marker { display:none; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker > summary::after { content:''; width:6px; height:6px; border-right:1px solid #85858c; border-bottom:1px solid #85858c; transform:rotate(45deg); margin:-3px 0 0 7px; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-desktop-menu-check { display:none !important; }

@media(min-width:1025px) {
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] { zoom:calc(1 / var(--tg-scale,1)); }
 html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog { width:1000px; max-width:calc(100vw - 40px); height:min(668px,calc(100vh - 40px)); max-height:calc(100vh - 40px); }
}

/* Modal may be portalled to body on desktop; repeated ID specificity keeps legacy shipping-panel rules contained without relying on parent placement. */

html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-summary-item > button[data-reference-edit-draft] { flex:none; width:auto; min-width:0; max-width:none; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-summary-item > .shipping-reference-summary-amount { flex:none; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker > summary { background-image:none !important; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-editor .shipping-replenishment-unit-picker > summary::before { content:none !important; display:none !important; }

/* Metadata shares one row; quantity and unit share a second aligned row. */
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] :is(.shipping-reference-editor-meta,.shipping-reference-editor-quantity) > :is(label,.shipping-replenishment-unit-field) { display:flex; flex-direction:column; gap:var(--reference-label-gap,4px); line-height:18px; margin:0; padding:0; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] :is(.shipping-reference-editor-meta,.shipping-reference-editor-quantity) :is(input,.shipping-replenishment-unit-picker) { margin:0 !important; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] :is(.shipping-reference-editor-meta,.shipping-reference-editor-quantity) :is(input:not([type="hidden"]),.shipping-replenishment-unit-picker > summary) { height:var(--reference-control-height,44px) !important; min-height:var(--reference-control-height,44px) !important; max-height:var(--reference-control-height,44px) !important; box-sizing:border-box; line-height:var(--reference-control-line-height,22px); }
/* Compact internal-tool composer and top-layer category menu. */
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] { font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","PingFang SC","Microsoft YaHei",sans-serif; }
#shippingReplenishmentRegistrationModal .shipping-production-heading .shipping-production-shop-label { color:#85858c; }
#shippingReplenishmentRegistrationModal .shipping-production-plus { flex:none; width:32px; height:32px; min-height:32px; padding:0; border:0; border-radius:50%; color:#0071e3; background:transparent; font-size:20px; font-weight:400; line-height:32px; }
#shippingReplenishmentRegistrationModal .shipping-production-plus:is(:hover,[aria-expanded="true"]) { background:#f5f5f7; }
#shippingReplenishmentRegistrationModal .shipping-production-category-menu { position:fixed; inset:auto; margin:0; padding:0; width:136px; max-width:calc(100vw - 16px); border:1px solid #e3e3e8; border-radius:18px; background:white; box-shadow:0 8px 28px #00000024; overflow:hidden; }
#shippingReplenishmentRegistrationModal .shipping-production-category-menu button { display:block; width:100%; height:42px; min-height:42px; padding:0 14px; text-align:left; border:0; border-radius:0; color:#252529; background:white; font-size:13px; font-weight:400; }
#shippingReplenishmentRegistrationModal .shipping-production-category-menu button+button { border-top:1px solid #e8e8ec; }
#shippingReplenishmentRegistrationModal .shipping-production-category-menu button:is(:hover,:focus-visible) { background:#f5f5f7; outline:none; }
#shippingReplenishmentRegistrationModal .shipping-production-hint { color:#85858c; font-size:12px; margin:12px 0; }
#shippingReplenishmentRegistrationModal .shipping-reference-form-heading { display:flex; align-items:center; justify-content:space-between; margin:0 0 12px; }
#shippingReplenishmentRegistrationModal .shipping-reference-form-heading h3 { margin:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-form-heading > span { font-size:12px; color:#85858c; }
#shippingReplenishmentRegistrationModal .shipping-reference-form-heading button { border:0; background:none; color:#ff3b30; font-size:12px; padding:0; height:auto; min-height:0; }
#shippingReplenishmentRegistrationModal .shipping-reference-form-heading [data-reference-finished-product] { margin-left:auto; margin-right:12px; color:#0071e3; }
html body #shippingReplenishmentRegistrationModal:is(#shippingReplenishmentRegistrationModal)[data-shipping-reference-enabled="true"] .shipping-reference-join { display:block; width:var(--reference-join-width,100%); height:var(--reference-control-height,42px); min-height:var(--reference-control-height,42px); padding:0 12px; margin:var(--reference-join-margin,10px 0 0); border:0; border-radius:var(--reference-join-radius,11px); color:white; background:#0071e3; font-size:var(--reference-control-font-size,14px); font-weight:var(--reference-join-weight,500); }
#shippingReplenishmentRegistrationModal .shipping-reference-join:disabled { opacity:.4; cursor:default; }

#shippingReplenishmentRegistrationModal .shipping-reference-legacy-category { position:relative; margin:0; font-size:13px; }
#shippingReplenishmentRegistrationModal .shipping-reference-legacy-category summary { display:block; list-style:none; width:32px; height:32px; text-align:center; line-height:32px; cursor:pointer; color:#0071e3; font-size:20px; }
#shippingReplenishmentRegistrationModal .shipping-reference-legacy-category [role="menu"] { position:absolute; z-index:2; top:100%; right:0; width:136px; border:1px solid #e3e3e8; border-radius:14px; overflow:hidden; background:white; box-shadow:0 8px 24px #00000020; }
#shippingReplenishmentRegistrationModal .shipping-reference-legacy-category button { display:block; width:100%; height:40px; padding:0 12px; text-align:left; border:0; border-radius:0; background:white; color:#252529; }

#shippingReplenishmentRegistrationModal .shipping-reference-legacy-source { display:flex; align-items:center; justify-content:space-between; margin:0 0 12px; padding:8px 12px; border-radius:16px; background:#f5f5f7; font-size:13px; }
#shippingReplenishmentRegistrationModal .shipping-reference-legacy-category summary::-webkit-details-marker { display:none; }

/* Same-code source records share one item; only confirmed differing fields are red. */
#shippingReplenishmentRegistrationModal .shipping-production-thumbnail { display:block; flex:none; width:44px; height:44px; border:0; padding:0; border-radius:11px; background:transparent; }
#shippingReplenishmentRegistrationModal .shipping-production-thumbnail img { display:block; }
#shippingReplenishmentRegistrationModal .shipping-production-grouped { align-items:flex-start; }
#shippingReplenishmentRegistrationModal .shipping-production-grouped > .shipping-production-plus { align-self:center; }
#shippingReplenishmentRegistrationModal .shipping-production-record { display:flex; align-items:center; gap:7px; margin-top:5px; font-size:12px; color:#85858c; }
#shippingReplenishmentRegistrationModal .shipping-production-record-copy { min-width:0; overflow-wrap:anywhere; }
#shippingReplenishmentRegistrationModal .shipping-production-record-copy > span { margin-right:3px; }
#shippingReplenishmentRegistrationModal .shipping-production-record .shipping-production-thumbnail,
#shippingReplenishmentRegistrationModal .shipping-production-record img,
#shippingReplenishmentRegistrationModal .shipping-production-record .shipping-production-image-empty { width:32px; height:32px; border-radius:8px; }
#shippingReplenishmentRegistrationModal .shipping-production-record .is-different { color:#ff3b30; }
#shippingReplenishmentRegistrationModal .shipping-reference-category { margin:0; font-size:12px; font-weight:400; }

#shippingReplenishmentRegistrationModal .shipping-reference-price-note { display:block; color:#85858c; font-size:12px; margin:8px 0; }

/* Compact Figma editor: image/name, metadata, then quantity inside one group. */
#shippingReplenishmentRegistrationModal .shipping-reference-product-code { color:#85858c; font-size:12px; font-weight:400; overflow-wrap:anywhere; }
#shippingReplenishmentRegistrationModal[data-shipping-reference-enabled="true"] .shipping-replenishment-modal-dialog > header h2 { margin-right:44px; margin-left:44px; }
#shippingReplenishmentRegistrationModal .shipping-reference-name-row .shipping-replenishment-detail-image-control { margin-top:calc(22px + var(--reference-label-gap,4px)); }
#shippingReplenishmentRegistrationModal .shipping-reference-list-heading { display:flex; align-items:center; justify-content:space-between; }
#shippingReplenishmentRegistrationModal .shipping-reference-list-heading > span { font-weight:400; }
#shippingReplenishmentRegistrationModal .shipping-reference-staged-list { max-height:200px; overflow-y:auto; overscroll-behavior:contain; }
#shippingReplenishmentRegistrationModal .shipping-reference-staged-list :is(img,.shipping-reference-summary-placeholder) { width:36px; height:36px; }
#shippingReplenishmentRegistrationModal .shipping-reference-staged-list .shipping-reference-summary-item + .shipping-reference-summary-item { border-top:1px solid #e8e8ec; }
#shippingReplenishmentRegistrationModal .shipping-production-card-copy .shipping-production-related { display:inline-block; padding:2px 0; margin:3px 0 0; min-height:24px; border:0; background:transparent; color:#0071e3; font-size:12px; font-weight:400; cursor:pointer; box-shadow:none; }
#shippingReferenceRelatedProductsDialog { box-sizing:border-box; width:min(920px,calc(100vw - 48px)); max-width:none; max-height:calc(100dvh - 48px); padding:0; border:1px solid #e5e5eb; border-radius:20px; background:#fff; color:#25252a; overflow:hidden; box-shadow:0 18px 70px #0003; }
#shippingReferenceRelatedProductsDialog::backdrop { background:#0005; }
#shippingReferenceRelatedProductsDialog[open] { display:flex; flex-direction:column; }
#shippingReferenceRelatedProductsDialog header { display:flex; flex:none; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid #e9e9ee; }
#shippingReferenceRelatedProductsDialog h2 { font-size:18px; margin:0; font-weight:600; }
#shippingReferenceRelatedProductsDialog h2 small { font-size:13px; font-weight:400; color:#777780; }
#shippingReferenceRelatedProductsDialog header p { font-size:13px; color:#777780; margin:6px 0 0; overflow-wrap:anywhere; }
#shippingReferenceRelatedProductsDialog button { border:1px solid #e5e5eb; border-radius:8px; background:#fff; color:#33333a; padding:7px 12px; min-height:32px; font-size:13px; cursor:pointer; }
#shippingReferenceRelatedProductsDialog button:disabled { opacity:.45; cursor:default; }
html body #shippingReferenceRelatedProductsDialog :is(button,input),
html body #shippingReferenceRelatedProductsDialog :is(button,input):is(:hover,:focus,:focus-visible,:active) { box-shadow:none !important; filter:none !important; }
html body #shippingReferenceRelatedProductsDialog :is(button,input):focus-visible { outline:2px solid #8b8b93; outline-offset:2px; }
#shippingReferenceRelatedProductsDialog [data-related-close] { flex:none; width:36px; height:36px; padding:0; background:#f5f5f7; border:0; font-size:22px; border-radius:50%; }
#shippingReferenceRelatedProductsDialog .shipping-related-search { flex:none; display:flex; gap:10px; padding:14px 24px; }
#shippingReferenceRelatedProductsDialog input { flex:1; min-width:0; border:1px solid #e5e5eb; padding:10px 12px; border-radius:9px; font-size:14px; background:#fff; color:#25252a; }
#shippingReferenceRelatedProductsDialog .shipping-related-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:92px; align-content:start; column-gap:20px; height:380px; min-height:92px; overflow-y:auto; overscroll-behavior:contain; padding:0 24px; }
#shippingReferenceRelatedProductsDialog .shipping-related-product { display:flex; align-items:center; gap:10px; min-width:0; padding:9px 0; border-bottom:1px solid #eeeef2; }
#shippingReferenceRelatedProductsDialog .shipping-related-product img,
#shippingReferenceRelatedProductsDialog .shipping-related-no-image { width:72px; height:72px; flex:none; border-radius:8px; object-fit:contain; background:#f5f5f7; }
#shippingReferenceRelatedProductsDialog .shipping-related-no-image { display:flex; align-items:center; justify-content:center; text-align:center; color:#85858c; font-size:11px; }
#shippingReferenceRelatedProductsDialog [data-related-image-slot] { flex:none; width:72px; height:72px; }
#shippingReferenceRelatedProductsDialog button.shipping-related-thumbnail { display:block; width:72px; height:72px; min-height:0; padding:0; border:0; background:#f5f5f7; cursor:zoom-in; overflow:hidden; }
#shippingReferenceRelatedImageDialog { box-sizing:border-box; width:min(560px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); padding:48px 20px 18px; border:1px solid #e5e5eb; border-radius:18px; background:#fff; color:#25252a; overflow:auto; box-shadow:0 18px 70px #0003; }
#shippingReferenceRelatedImageDialog::backdrop { background:#0006; }
#shippingReferenceRelatedImageDialog img { display:block; width:480px; max-width:100%; max-height:calc(100dvh - 160px); height:auto; object-fit:contain; margin:0 auto; }
#shippingReferenceRelatedImageDialog p { margin:14px 0 0; font-size:13px; text-align:center; overflow-wrap:anywhere; }
html body #shippingReferenceRelatedImageDialog button { position:absolute; right:10px; top:10px; width:32px; height:32px; min-height:0; padding:0; border:0; border-radius:50%; background:#f5f5f7; color:#33333a; font-size:22px; cursor:pointer; box-shadow:none !important; filter:none !important; }
html body #shippingReferenceRelatedImageDialog button:focus-visible { outline:2px solid #8b8b93; outline-offset:2px; }
#shippingReferenceRelatedProductsDialog .shipping-related-copy { flex:1; min-width:0; }
#shippingReferenceRelatedProductsDialog .shipping-related-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:0; font-size:14px; }
#shippingReferenceRelatedProductsDialog .shipping-related-code { margin:6px 0 0; font-size:12px; color:#777780; overflow-wrap:anywhere; }
#shippingReferenceRelatedProductsDialog .shipping-related-message { grid-column:1 / -1; margin:0; padding:24px 0; color:#777780; font-size:14px; text-align:center; }
#shippingReferenceRelatedProductsDialog .shipping-related-message button { margin-left:10px; }
#shippingReferenceRelatedProductsDialog footer { flex:none; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:14px 24px; border-top:1px solid #e9e9ee; color:#777780; font-size:12px; }
#shippingReferenceRelatedProductsDialog footer div { display:flex; align-items:center; gap:10px; }
@media(max-width:768px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); border-radius:16px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog .shipping-related-grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 14px; column-gap:12px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog header,
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog footer { padding:14px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog .shipping-related-search { padding:12px 14px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog input { font-size:16px; }
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog button { min-height:40px; }
}
@media(max-width:389px) {
 html body.is-mobile-viewport:not(.is-dashboard-login-page) #shippingReferenceRelatedProductsDialog .shipping-related-grid { grid-template-columns:minmax(0,1fr); }
}
