/* The label card is the real printed artifact. Screen previews scale the
   physical artwork as one piece so desktop, mobile, and print stay aligned. */
:root{
  /* Real sticker size — matches the A4 sheet slots in the PDF (the standard). */
  --label-physical-width:70mm;
  --label-physical-height:110mm;
  --label-preview-scale:1.3889;
  --label-preview-width:calc(var(--label-physical-width) * var(--label-preview-scale));
  --label-preview-height:calc(var(--label-physical-height) * var(--label-preview-scale));
  --label-watermark-angle:-59deg;
  --label-watermark-opacity:.22;
  --label-watermark-font-scale:.357;
  --label-watermark-nudge-x:-1.5mm;
  --label-watermark-nudge-y:1.1mm;
}

.label-preview-shell{
  position:relative;
  width:var(--label-preview-width);
  height:var(--label-preview-height);
  /* The watermark is preview chrome, not printed sticker artwork. Keep its
     rotated ends visible beyond the paper while the containing panel prevents
     page-level overflow at unusually narrow desktop widths. */
  overflow:visible;
  isolation:isolate;
}

.label-preview-stage{
  position:relative;
  width:var(--label-physical-width);
  height:var(--label-physical-height);
  overflow:visible;
  transform:scale(var(--label-preview-scale));
  transform-origin:top left;
}

.label{
  position:relative;
  z-index:1;
  box-sizing:border-box;
  background:#fff;
  width:var(--label-physical-width);
  height:var(--label-physical-height);
  overflow:hidden;
  padding:6mm 5.3mm;
  font-family:var(--font-mono);
  text-align:center;
}

.preview-watermark{
  position:absolute;
  left:50%;
  top:50%;
  z-index:3;
  transform:translate(calc(-50% + var(--label-watermark-nudge-x)),calc(-50% + var(--label-watermark-nudge-y))) rotate(var(--label-watermark-angle));
  pointer-events:none;
  user-select:none;
  white-space:nowrap;
  font-family:Arial,sans-serif;
  font-size:calc(var(--label-physical-width) * var(--label-watermark-font-scale));
  font-weight:900;
  line-height:1;
  color:rgba(95,95,95,var(--label-watermark-opacity));
  text-transform:uppercase;
}

/* Top-of-sticker company logo. Fixed-height band keeps the layout stable;
   the image is scaled to fit (no distortion, no overflow). Blank when unset. */
.label .logo-space{height:6.5mm;margin-bottom:var(--label-logo-gap,2.4mm);display:flex;align-items:center;justify-content:center}
.label .logo-space[data-align="left"]{justify-content:flex-start}
.label .logo-space[data-align="left-center"]{justify-content:flex-start}
.label .logo-space[data-align="left-center"] .logo-group{margin-left:12.5%}
.label .logo-space[data-align="center"]{justify-content:center}
.label .logo-space[data-align="right-center"]{justify-content:flex-end}
.label .logo-space[data-align="right-center"] .logo-group{margin-right:12.5%}
.label .logo-space[data-align="right"]{justify-content:flex-end}
.label .logo-group{--logo-text-scale:0.75;display:flex;align-items:center;gap:1.5mm;height:100%}
.label .logo-group img{max-height:100%;object-fit:contain;display:block}
.label .logo-group .logo-text-img{max-height:calc(100% * var(--logo-text-scale))}

.label .name{
  font-family:var(--font-display);
  font-size:24pt;
  line-height:1.1;
  color:var(--ink);
  margin-bottom:0;
  word-break:break-word;
}
.label .name[data-len="long"]{font-size:24pt;line-height:1.05}
.label .name.placeholder{color:var(--muted-strong);font-style:italic}

.label .divider{border-top:.35mm solid var(--ink);margin:var(--label-space-divider,2.7mm) 0 var(--label-space-divider,2.7mm)}
.label .divider-title{margin:var(--label-space-title-divider-top,1.7mm) 0 var(--label-space-title-divider-bottom,1.7mm)}
.label .divider-tight{margin:var(--label-space-tight-top,1.2mm) 0 var(--label-space-tight-bottom,2.5mm);border-top:.35mm solid var(--ink)}
.label .divider-bottle{margin-bottom:var(--label-space-bottle-divider,2.5mm)}
.label.label-no-break-lines .divider,
.label.label-no-break-lines .divider-tight{border-top-color:transparent}

.label .recipe-lines{margin-bottom:var(--label-space-recipe,1.3mm)}
.label .recipe-method{
  font-family:var(--font-mono);
  font-size:var(--label-font-body,8.5pt);
  font-weight:400;
  color:var(--ink);
  line-height:1.25;
}
.label .recipe-glass{
  font-family:var(--font-mono);
  font-size:var(--label-font-body,8.5pt);
  color:var(--muted-strong);
  line-height:1.25;
  margin-top:var(--label-space-small,.4mm);
}
.label .recipe-garnish{
  font-family:var(--font-mono);
  font-size:var(--label-font-body,8.5pt);
  font-style:italic;
  color:var(--muted-strong);
  line-height:1.25;
  margin-top:var(--label-space-small,.4mm);
}

.label .sect{
  font-size:var(--label-font-sect,6pt);
  letter-spacing:var(--label-letter-sect,.45mm);
  text-transform:uppercase;
  color:var(--muted-strong);
  margin-bottom:var(--label-space-sect,1.7mm);
}

.label .pour-num{
  font-family:var(--font-display);
  font-size:var(--label-font-pour,20pt);
  color:var(--ink);
  line-height:1;
  margin-top:0;
}

.label .serve-size{
  display:flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  margin:0 auto;
  color:var(--ink);
  line-height:1;
}
.label .serve-kicker{
  display:none;
  font-family:var(--font-mono);
  font-size:var(--label-font-sect,6pt);
  letter-spacing:var(--label-letter-sect,.45mm);
  text-transform:uppercase;
  color:var(--muted-strong);
}
.label .serve-value{
  display:inline-flex;
  align-items:baseline;
  justify-content:center;
  font-family:var(--font-display);
  font-size:var(--label-font-serve-split-large,24pt);
  line-height:1;
}
.label .serve-number,
.label .serve-unit{display:inline-block}

.label.serve-style-rules-split .serve-size{
  flex-direction:column;
  gap:.65mm;
}
.label.serve-style-rules-split .serve-size::before,
.label.serve-style-rules-split .serve-size::after{
  content:"";
  width:21mm;
  border-top:.2mm solid rgba(15,14,12,.55);
}
.label.serve-style-rules-split .serve-value{
  font-size:var(--label-font-serve-split-large,24pt);
}
.label.serve-style-rules-split .serve-unit{
  font-family:var(--font-mono);
  font-size:.36em;
  margin-left:.45mm;
  transform:translateY(-.22em);
}

.label .empty-batch{
  font-size:var(--label-font-body,8.5pt);
  color:var(--muted-strong);
  font-style:italic;
  line-height:1.35;
}

.label .sect.sect-fresh{
  color:var(--ink);
  font-weight:400;
  font-size:var(--label-font-sect,6pt);
  margin-bottom:var(--label-space-row,.65mm);
}
.label .sect.sect-bottle{
  font-style:italic;
  font-size:var(--label-font-sect,6pt);
  margin-bottom:var(--label-space-bottle,1mm);
}
.label .fresh-glass-art{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 0 var(--label-glass-art-space,1.8mm);
}
.label .fresh-glass-art img{
  display:block;
  width:var(--label-glass-art-size,24mm);
  height:var(--label-glass-art-size,24mm);
  object-fit:contain;
}
.label .fresh-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  justify-content:center;
  width:var(--label-fresh-row-width,68mm);
  font-size:var(--label-font-body,8.5pt);
  color:var(--ink);
  margin:var(--label-space-row,.65mm) auto;
  font-weight:400;
  column-gap:var(--label-space-fresh-gap,2.4mm);
}
.label .fresh-row span:first-child{min-width:0;word-break:break-word;text-align:left}
.label .fresh-row span:last-child{font-weight:400;text-align:right}
.label.label-center-all .fresh-row{display:block;width:auto;text-align:center}
.label.label-center-all .fresh-row span{display:inline;flex:none;text-align:center}
.label.label-center-all .fresh-row span:first-child::after{content:"  "}

.label .bottle-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  justify-content:center;
  width:var(--label-bottle-row-width,68mm);
  font-size:var(--label-font-bottle,8pt);
  color:var(--muted-strong);
  margin:var(--label-space-bottle-row,.7mm) auto;
  font-style:italic;
  column-gap:var(--label-space-bottle-gap,2.4mm);
}
.label .bottle-row span:first-child{min-width:0;word-break:break-word;text-align:left}
.label .bottle-row span:last-child{text-align:right}
.label.label-center-all .bottle-row{display:block;width:auto;text-align:center}
.label.label-center-all .bottle-row span{display:inline;flex:none;text-align:center}
.label.label-center-all .bottle-row span:first-child::after{content:"  "}

.label .footer{
  position:absolute;
  left:5.3mm;
  right:5.3mm;
  bottom:5mm;
  font-size:var(--label-font-sect,6pt);
  color:var(--muted-strong);
  text-align:center;
  text-transform:uppercase;
  letter-spacing:.2mm;
  margin-top:0;
  font-family:var(--font-ui);
}

.label-overflow-warning{
  width:var(--label-preview-width);
  margin-top:1rem;
  padding:.75rem 1rem;
  border:1px solid var(--amber-mid);
  background:var(--amber-light);
  color:#5a4010;
  font-size:.78rem;
  line-height:1.45;
}
.label-overflow-warning[hidden]{display:none}
