.shelf-label-modal{width:min(1180px,96vw);max-width:1180px;max-height:calc(100dvh - 28px);display:flex;flex-direction:column;overflow:hidden;border-radius:16px}
.shelf-label-modal .modal-head,.shelf-label-modal .modal-foot{flex:none;padding:18px 24px}
.shelf-label-modal [hidden]{display:none!important}
.shelf-label-modal .modal-body{display:grid;grid-template-columns:minmax(260px,330px) minmax(300px,1fr);gap:28px;padding:22px 24px;min-height:0;max-height:76vh;overflow:auto;background:#0e1b24}
.shelf-label-editor{min-width:0;align-self:start;max-height:calc(76vh - 44px);overflow-y:auto;padding-right:4px;scrollbar-gutter:stable}
.shelf-label-editor>p:first-child{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 18px}
.shelf-label-editor label{display:block;font-size:12px;font-weight:700;line-height:1.4;margin:16px 0 7px}
.shelf-label-modal .shelf-label-editor input.field-control{box-sizing:border-box;display:block;width:100%;height:44px;min-height:44px;padding:10px 12px;font-size:14px;line-height:20px;border-radius:9px}
.shelf-label-modal .shelf-label-editor select.field-control{box-sizing:border-box;display:block;width:100%;height:44px;min-height:44px;padding:0 34px 0 12px;font-size:14px;line-height:normal;vertical-align:middle;border-radius:9px;color-scheme:dark}
.shelf-label-results{max-height:220px;overflow:auto;margin:10px 0}
.shelf-label-result{display:block;width:100%;text-align:left;padding:11px 12px;background:var(--panel2,#172832);color:inherit;border:1px solid var(--line,#314654);border-radius:9px;margin:6px 0;cursor:pointer}
.shelf-label-result strong{font-size:13px;line-height:1.4}
.shelf-label-result small{display:block;color:var(--muted);margin-top:4px;font-size:11px}
.shelf-label-result:hover,.shelf-label-result:focus-visible{border-color:#f97316}
.shelf-label-selection{border:1px solid #334a59;border-left:3px solid #f97316;border-radius:9px;background:#172b38;padding:12px 14px;margin:14px 0}
.shelf-label-selection strong{display:block;font-size:13px;line-height:1.45}
.shelf-label-selection small{display:block;margin-top:5px;font-size:11px;color:var(--muted)}
.shelf-printname-help{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin:7px 0}
.shelf-selected-quantity{border:1px solid #496474;background:#172b38;border-radius:9px;padding:12px 14px;margin:16px 0}
.shelf-selected-quantity small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}
.shelf-selected-quantity strong{display:block;font-size:20px;line-height:1.4}
.shelf-selected-quantity strong span{font-size:12px;color:var(--muted);font-weight:400}
.shelf-label-editor #shelf-label-add{width:100%;max-width:100%;min-height:42px;height:auto;padding:11px 12px;white-space:normal;line-height:1.4;margin-top:14px}
.shelf-label-error{color:#ff8790;min-height:18px;font-size:12px;line-height:1.5;margin-top:10px}
.shelf-label-editor>p.muted{font-size:12px;line-height:1.6}
.shelf-label-preview{min-width:0}
.shelf-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;width:min(100%,calc(58vh * 210 / 297));margin:0 auto 12px}
.shelf-sheet-heading strong{display:block;font-size:14px}
.shelf-sheet-heading div>span{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.shelf-dimension{font-size:10px;color:#b7c6cf;border:1px solid #354955;border-radius:6px;padding:5px 7px;white-space:nowrap}
.shelf-label-paper{display:block;position:relative;isolation:isolate;aspect-ratio:210/297;width:min(100%,calc(58vh * 210 / 297));padding:0;margin:0 auto;background:#fff;color:#14212b;border:1px solid #d6dce1;box-shadow:0 12px 34px #0004}
.shelf-label-grid{position:absolute;inset:4.54545% 2.38095%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr))}
.shelf-label-slot{position:relative;min-width:0;min-height:0;padding:0;background:#fff;cursor:zoom-in}
.shelf-label-artwork{display:block;width:100%;height:100%;object-fit:contain;background:#fff}
.shelf-label-slot.is-empty{border:1px dashed #d6dfe6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#fbfcfd;cursor:pointer;transition:background .15s}
.shelf-label-slot.is-empty:hover{background:#fff7ed}
.shelf-label-slot.is-target{box-shadow:inset 0 0 0 1.5px #ed7b25;background:#fffaf4}
.shelf-empty-number{position:absolute;top:5px;left:6px;font:8px monospace;color:#aeb9c2}
.shelf-empty-plus{font-size:20px;color:#bec9d1;font-weight:300}
.shelf-empty-text{font-size:8px;color:#a0adb7}
.shelf-label-remove{position:absolute;z-index:2;right:3px;top:3px;display:grid;place-items:center;width:21px;height:21px;padding:0;border:1px solid #687e8e;border-radius:5px;background:#142632;color:#fff;cursor:pointer;font-size:16px;line-height:1;opacity:0;transition:opacity .12s}
.shelf-label-slot:hover .shelf-label-remove,.shelf-label-slot:focus-within .shelf-label-remove{opacity:1}
.shelf-label-caption{font-size:11px;color:var(--muted);text-align:center;line-height:1.5;max-width:450px;margin:11px auto 0}
.shelf-label-summary{font-size:12px;margin-right:auto;color:var(--muted)}
.shelf-label-added{animation:shelf-label-arrive .25s ease-out}
.shelf-label-zoom{position:fixed;z-index:1200;inset:0;display:grid;place-items:center;background:#000b;padding:18px}
.shelf-label-zoom-card{width:min(850px,94vw);border:1px solid #415765;border-radius:14px;background:#12212c;color:#f1f5f8;box-shadow:0 20px 80px #0008;padding:18px}
.shelf-label-zoom-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:15px}
.shelf-label-zoom-head strong{font-size:16px}
.shelf-label-zoom-card img{display:block;width:100%;aspect-ratio:100/45;object-fit:contain;background:#fff}
.shelf-label-zoom-card p{font-size:12px;line-height:1.6;color:var(--muted);margin:13px 0 0}
@keyframes shelf-label-arrive{from{opacity:.3;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.shelf-label-added{animation:none}}
@media(max-width:850px){.shelf-label-modal .modal-body{display:block;padding:18px}.shelf-label-editor{margin-bottom:24px;max-height:none;overflow:visible;padding-right:0;scrollbar-gutter:auto}.shelf-label-paper,.shelf-sheet-heading{width:min(100%,410px)}.shelf-label-remove{opacity:1}.shelf-label-modal .modal-foot{flex-wrap:wrap}}
