.m-label-intro { max-width: 760px; }
.m-label-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 15px 0; }
.m-label-actions .btn { min-height: 44px; }
.m-label-range { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.m-label-range label { width: 100px; margin: 0; font-size: 13px; }
.m-label-range input { margin: 4px 0 0; padding: 10px; }
.m-label-status { min-height: 1.5em; color: #bce4fa; }
.m-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110mm), 1fr)); gap: 20px; align-items: start; }
.m-sheet-wrap { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.m-sheet-caption { color: #d8e9fb; font-weight: 700; }
.m-sheet { width: 100mm; height: 100mm; max-width: 100%; display: grid; grid-template-rows: 50mm 50mm; background: #fff; color: #000; box-shadow: 0 3px 14px #0006; overflow: hidden; }
.m-label-half { box-sizing: border-box; width: 100%; height: 50mm; min-height: 0; padding: 2mm 3mm; display: grid; grid-template-columns: minmax(0, 1fr) 32mm; gap: 2mm; background: #fff; color: #000; font: 9pt/1.1 Arial, Helvetica, sans-serif; overflow: hidden; }
.m-label-half:first-child { border-bottom: .35mm dashed #000; }
.m-label-copy { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: start; gap: .7mm; overflow: hidden; }
.m-label-project { width: 100%; font-size: 8pt; font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; max-height: 9mm; overflow: hidden; }
.m-label-kind { font-size: 7pt; font-weight: 700; line-height: 1.05; }
.m-label-code { display: block; max-width: 100%; font-size: 25pt; line-height: .95; font-weight: 900; letter-spacing: -.035em; overflow-wrap: anywhere; }
.m-label-code.medium { font-size: 15pt; line-height: 1; }
.m-label-code.long { font-size: 10.5pt; line-height: 1.05; letter-spacing: 0; }
.m-label-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; max-width: 100%; font-size: 9pt; line-height: 1.08; font-weight: 700; overflow-wrap: anywhere; }
.m-label-quantity { margin-top: auto; border-top: .25mm solid #000; width: 100%; padding-top: .8mm; font-size: 9pt; font-weight: 800; }
.m-label-qr { align-self: center; justify-self: end; box-sizing: border-box; width: 32mm; height: 32mm; background: #fff; }
.m-label-qr img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.m-label-empty { grid-template-columns: 1fr; align-items: center; justify-items: center; color: #444; font-size: 8pt; }
.m-label-empty span { border: .25mm dashed #888; padding: 2mm 4mm; }
.m-sheet-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.m-sheet-tools .btn { font-size: 13px; padding: 9px 12px; }

@page { size: 100mm 100mm; margin: 0; }
@media print {
  html, body, main.wrap, .m-root { box-sizing: border-box !important; width: 100mm !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .m-root > :not(.m-sheet-grid) { display: none !important; }
  .m-sheet-grid { display: block !important; width: 100mm !important; margin: 0 !important; padding: 0 !important; gap: 0 !important; }
  .m-sheet-wrap { display: block !important; width: 100mm !important; margin: 0 !important; padding: 0 !important; break-inside: avoid !important; page-break-inside: avoid !important; }
  body.m-print-selection .m-sheet-wrap:not(.m-print-selected) { display: none !important; }
  .m-sheet-wrap:not(:first-child) { break-before: page; page-break-before: always; }
  .m-sheet-wrap.m-print-first { break-before: auto !important; page-break-before: auto !important; }
  .m-sheet-caption, .m-sheet-tools { display: none !important; }
  .m-sheet { width: 100mm !important; max-width: none !important; height: 100mm !important; box-shadow: none !important; break-inside: avoid !important; page-break-inside: avoid !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .m-label-half { width: 100mm !important; }
}
