/* ============================================================
   Strumento etichette — /etichette-alimentari
   Caricato solo da questa pagina (slot head). Classi dello
   strumento con prefisso lt-; il foglio dell'etichetta è
   .label-sheet e ha font, colori e misure propri (em e %),
   perché in stampa vive fuori dalla pagina, figlio di <body>.
   ============================================================ */

/* ============================================================
   Contenitore, barra della bozza, colonne
   ============================================================ */

.lt-root {
  --lt-danger: #B91C1C;
  --lt-line: rgba(15, 23, 42, 0.12);
  --lt-surface: rgba(255, 255, 255, 0.82);
  --lt-soft: rgba(241, 245, 249, 0.9);
  width: min(1240px, calc(100% - var(--sp-4)));
  margin: 0 auto var(--sp-10);
  color: var(--ink);
}

.lt-root [hidden] { display: none !important; }

/* la nav è fissa: arrivandoci da un'ancora non si deve finirci sotto */
.lt-root,
.lt-form { scroll-margin-top: var(--sp-12); }

/* hero compatto: al primo schermo, sotto il titolo, si vede già lo strumento */
.hero-copy.lt-hero {
  width: min(920px, calc(100% - var(--sp-6)));
  padding-top: calc(var(--sp-12) + var(--sp-3));
  padding-bottom: var(--sp-3);
}

.hero-copy.lt-hero .eyebrow { margin: 0 0 var(--sp-1); }

.hero-copy.lt-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: var(--sp-1); }

.hero-copy.lt-hero .lede { max-width: 72ch; margin-bottom: 0; font-size: 1.05rem; line-height: 1.55; }

@media (max-width: 600px) {
  .hero-copy.lt-hero { padding-top: calc(var(--sp-10) + var(--sp-1)); padding-bottom: var(--sp-2); }
  .hero-copy.lt-hero .lede { font-size: 0.95rem; line-height: 1.45; }
}

.lt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-2);
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--lt-line);
  border-radius: var(--r-l);
  background: var(--lt-surface);
}

.lt-toolbar-copy { min-width: 0; }

.lt-toolbar-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; line-height: 1.3; color: var(--ink); }

.lt-toolbar-text { font-size: 0.88rem; color: var(--ink-2); }

.lt-toolbar-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.lt-status { flex-basis: 100%; font-size: 0.88rem; font-weight: 600; color: var(--teal-deep); overflow-wrap: anywhere; }

.lt-status:empty { display: none; }

.lt-status.is-error { color: var(--lt-danger); }

.lt-noscript {
  margin-bottom: var(--sp-3);
  font-weight: 600;
  color: var(--lt-danger);
}

/* avvertenza nell'anteprima, subito sotto il bottone di stampa
   (sul desktop il pannello è sticky e resta in vista): aiuta a
   comporre, non controlla */
.lt-disclaimer {
  padding: var(--sp-05) var(--sp-1) var(--sp-05) var(--sp-2);
  border-left: 3px solid var(--teal-deep);
  border-radius: 4px;
  background: var(--lt-soft);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-2);
}

.lt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}

@media (min-width: 1024px) {
  .lt-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
    gap: var(--sp-4);
  }
}

/* ============================================================
   Gruppi del modulo
   ============================================================ */

.lt-form { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }

.lt-card,
.lt-preview {
  min-width: 0;
  padding: var(--sp-3);
  border: 1px solid var(--lt-line);
  border-radius: var(--r-l);
  background: var(--lt-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.lt-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-2);
  align-items: start;
  margin-bottom: var(--sp-3);
}

.lt-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--lt-line);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
}

.lt-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.lt-card-sub { margin-top: var(--sp-05); font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }

.lt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); }

@media (min-width: 600px) {
  .lt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .lt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.lt-field { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }

.lt-field--wide { grid-column: 1 / -1; }

.lt-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  min-height: 20px;
}

.lt-label { font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--ink); }

.lt-required { margin-left: 2px; color: var(--lt-danger); }

.lt-badge {
  flex: none;
  padding: 2px var(--sp-1);
  border-radius: var(--r-full);
  background: rgba(13, 148, 136, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal-deep);
}

.lt-hint { font-size: 0.8rem; line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }

.lt-hint:empty { display: none; }

.lt-hint--strong { font-weight: 600; color: var(--ink-2); }

.lt-error,
.lt-error-list { font-size: 0.82rem; font-weight: 600; line-height: 1.45; color: var(--lt-danger); overflow-wrap: anywhere; }

.lt-error:empty,
.lt-error-list:empty { display: none; }

.lt-error-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-05); }

.lt-note {
  margin-top: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-m);
  background: var(--lt-soft);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.lt-note:empty { display: none; }

/* nota in testa a un gruppo, sotto il titolo */
.lt-note--top { margin: 0 0 var(--sp-3); }

/* link alle fonti negli aiuti: stesso colore del testo, sottolineati */
.lt-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.lt-link:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.lt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Controlli
   ============================================================ */

.lt-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

textarea.lt-input { resize: vertical; min-height: 64px; }

select.lt-input { cursor: pointer; }

.lt-input::placeholder { color: var(--ink-3); }

.lt-input:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
  border-color: transparent;
}

.lt-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

.lt-unit { position: relative; }

.lt-unit > span {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 12px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ink-3);
  pointer-events: none;
}

.lt-unit > .lt-input { padding-right: 44px; font-variant-numeric: tabular-nums; }

.lt-unit--left > span { right: auto; left: 12px; }

.lt-unit--left > .lt-input { padding-right: 12px; padding-left: 32px; }

.lt-btn { cursor: pointer; font-family: var(--font-body); line-height: 1.2; min-height: 44px; }

button.pill-cta { border: none; }

.lt-btn-sm { min-height: 36px; padding: 6px var(--sp-2); font-size: 0.85rem; }

.lt-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.lt-btn:disabled { cursor: not-allowed; opacity: 0.5; transform: none; box-shadow: none; }

.lt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.lt-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.lt-icon-btn:hover { background: rgba(15, 23, 42, 0.06); color: var(--lt-danger); }

.lt-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; color: var(--ink-3); }

.lt-icon-btn:focus-visible,
.lt-back:focus-visible,
.lt-check input:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.lt-inline { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.lt-inline > .lt-input { flex: 1 1 180px; min-width: 0; width: auto; }

.lt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: var(--sp-2); }

.lt-check { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: 0.9rem; cursor: pointer; }

.lt-check input { width: 18px; height: 18px; flex: none; accent-color: var(--violet); cursor: pointer; }

.lt-check--box {
  padding: 10px 12px;
  border: 1px solid var(--lt-line);
  border-radius: 12px;
  background: #fff;
}

.lt-check--box:has(input:checked) { border-color: rgba(107, 70, 193, 0.45); background: rgba(107, 70, 193, 0.06); }

.lt-check--block { display: flex; align-items: flex-start; margin-top: var(--sp-2); }

.lt-check--block > span { display: flex; flex-direction: column; gap: var(--sp-05); }

.lt-check--block input { margin-top: 2px; }

.lt-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-1); margin-top: var(--sp-1); }

.lt-fieldset { min-width: 0; border: none; display: flex; flex-direction: column; gap: var(--sp-1); }

.lt-fieldset > .lt-grid { margin-top: var(--sp-1); }

.lt-panel {
  min-width: 0;
  padding: var(--sp-2);
  border: 1px solid var(--lt-line);
  border-radius: var(--r-m);
  background: var(--lt-soft);
}

.lt-panel + .lt-actions { margin-top: var(--sp-2); }

.lt-panel-title { margin-bottom: var(--sp-05); font-size: 0.95rem; font-weight: 600; }

.lt-panel > .lt-hint + .lt-hint,
.lt-panel > .lt-actions + .lt-hint,
.lt-panel > .lt-error { margin-top: var(--sp-1); }

.lt-panel > .lt-inline { margin-top: var(--sp-1); }

/* ---------- liste dinamiche: pesi, marchi, riciclo ---------- */

.lt-rows { list-style: none; display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); }

.lt-rows:empty { display: none; }

.lt-component {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px auto 44px;
  gap: var(--sp-1);
  align-items: center;
}

.lt-component-quid { white-space: nowrap; font-weight: 600; }

.lt-component-pct { min-width: 4.5ch; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.lt-mark-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 120px 44px;
  gap: var(--sp-1) var(--sp-2);
  align-items: end;
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--lt-line);
  border-radius: var(--r-m);
  background: #fff;
}

.lt-mark-thumb {
  width: 64px;
  height: 64px;
  padding: var(--sp-05);
  border: 1px solid var(--lt-line);
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
  align-self: center;
}

.lt-recycling-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 104px 44px;
  gap: var(--sp-1) var(--sp-2);
  align-items: end;
}

.lt-logo { display: flex; }

.lt-panel > .lt-finished-weight { max-width: 320px; margin-top: var(--sp-2); }

/* il peso in grammi ha una sola lettera di unità: meno spazio a destra, più cifre visibili */
.lt-component-weight > .lt-input { padding-right: 28px; }

@media (max-width: 600px) {
  /* nome e bottone sulla prima riga, peso e QUID sulla seconda: il peso prende tutto
     lo spazio che resta e un numero di quattro o cinque cifre (1000 g di farina) si legge intero */
  .lt-component { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .lt-component-name { grid-column: 1 / 3; grid-row: 1; }
  .lt-component > .lt-icon-btn { grid-column: 3; grid-row: 1; }
  .lt-component-weight { grid-column: 1; grid-row: 2; }
  .lt-component-quid { grid-column: 2 / 4; grid-row: 2; }
  .lt-mark-row { grid-template-columns: 64px minmax(0, 1fr) 44px; }
  .lt-mark-row > .lt-field:not(.lt-mark-width) { grid-column: 2 / 4; }
  .lt-mark-row > .lt-mark-width { grid-column: 1 / 3; }
  .lt-recycling-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .lt-recycling-row > .lt-field { grid-column: 1 / 2; }
  .lt-recycling-row > .lt-icon-btn { grid-row: 1 / 4; grid-column: 2; align-self: center; }
  .lt-card,
  .lt-preview { padding: var(--sp-2); }
  .lt-toolbar { padding: var(--sp-2); }
}

/* ============================================================
   Anteprima
   ============================================================ */

/* sopra il foglio titolo, bottoni e avvertenza, sotto la scala; sul desktop il
   pannello è sticky: il foglio si rimpicciolisce (preview.ts, fit) fino
   al 70% in altezza per stare nell'area che scorre, e oltre scorre solo quella;
   gli avvisi sotto restano in vista */
.lt-preview { display: flex; flex-direction: column; gap: var(--sp-2); scroll-margin-top: var(--sp-12); }

.lt-preview:focus { outline: none; }

/* col max-height del pannello sticky si schiaccia solo l'area del foglio */
.lt-preview > * { flex-shrink: 0; }

.lt-preview-scroll { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }

.lt-preview-scroll > * { flex-shrink: 0; }

/* contenitore del messaggio «Mancano ancora»: annuncia il testo quando compare, senza occupare posto */
.lt-live { display: contents; }

@media (min-width: 1024px) {
  .lt-preview {
    position: sticky;
    top: var(--sp-12);
    max-height: calc(100vh - var(--sp-12) - var(--sp-2));
    /* ultima risorsa, con finestre bassissime: di norma scorre solo l'area del foglio */
    overflow-y: auto;
  }

  .lt-preview > .lt-preview-scroll {
    flex-shrink: 1;
    min-height: min(var(--sp-15), 30vh);
    overflow-y: auto;
  }
}

/* scala dell'anteprima e controllo «Adatta» / «100%» */
.lt-scale-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1); }

/* ink-2 su bianco: 7,6:1 */
.lt-stage-scale { flex: 1 1 180px; font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); }

.lt-zoom {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--lt-line);
  border-radius: var(--r-full);
  background: #fff;
}

.lt-zoom-btn {
  min-height: 32px;
  padding: 0 var(--sp-2);
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.lt-zoom-btn[aria-pressed="true"] { background: var(--teal-deep); color: #fff; }

.lt-zoom-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.lt-preview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-1); }

.lt-preview .lt-preview-actions { margin-top: 0; }

/* avvisi sotto il foglio: cambio di formato col layout manuale;
   compatti, perché sul desktop restano in vista accanto all'area del foglio */
.lt-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-05) var(--sp-1) var(--sp-05) var(--sp-2);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  background: rgba(217, 119, 6, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* un solo riquadro: campi che mancano («Mancano ancora»), poi «Da controllare (N)» */
.lt-checks-box {
  padding: var(--sp-05) var(--sp-1) var(--sp-05) var(--sp-2);
  border-left: 3px solid var(--teal-deep);
  border-radius: 4px;
  background: var(--lt-soft);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.lt-checks-box.has-missing { border-left-color: var(--amber); }

.lt-missing { font-weight: 600; }

.lt-missing:not([hidden]) + .lt-checks-title:not([hidden]) { margin-top: var(--sp-05); }

.lt-checks-title { font-weight: 700; }

.lt-checks-list { margin: 2px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 2px; }

.lt-checks-list:empty { display: none; }

.lt-checks-more {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--teal-deep);
  text-decoration: underline;
  cursor: pointer;
}

.lt-checks-more:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

/* sul desktop il pannello è sticky: si vedono i primi due avvisi e il numero nel titolo,
   «Mostra tutti» allarga il riquadro (l'area del foglio scorre, il foglio non si rimpicciolisce) */
@media (min-width: 1024px) {
  .lt-checks-box:not(.is-expanded) .lt-checks-list > li:nth-child(n + 3) { display: none; }
}

@media (max-width: 1023px) {
  .lt-checks-more { display: none; }
}

.lt-notice > p { flex: 1 1 220px; }

.lt-badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.lt-badges li {
  padding: 2px 10px;
  border: 1px solid var(--lt-line);
  border-radius: var(--r-full);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.lt-badges .is-alert { border-color: var(--lt-danger); background: var(--lt-danger); color: #fff; }

.lt-badges .is-dashed { border-style: dashed; }

.lt-stage {
  padding: var(--sp-2);
  border-radius: var(--r-m);
  background: #E8EDF3;
  overflow: auto;
}

.lt-stage-note,
.lt-stage-sheet { width: max-content; margin-inline: auto; }

/* ink-2 sul grigio del riquadro: 6,6:1 */
.lt-stage-note { max-width: 100%; margin-bottom: 6px; font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); text-align: center; }

.lt-stage-note:empty { display: none; }

.lt-preview-msg { text-align: center; }

.lt-back { display: none; align-self: center; font-size: 0.9rem; font-weight: 600; color: var(--violet); }

.lt-jump {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sp-2) + env(safe-area-inset-bottom, 0px) + var(--wa-lift, 0px));
  z-index: 100;
  transform: translateX(-50%);
  min-height: 48px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.lt-jump:hover { transform: translateX(-50%) translateY(-2px); }

@media (max-width: 1023px) {
  .lt-back { display: inline-block; }
}

@media (min-width: 1024px) {
  .lt-root .lt-jump { display: none !important; }
}

/* ============================================================
   Foglio dell'etichetta (anteprima e stampa)
   Misure in em e %: l'anteprima ha la scala fissa di metrics.ts,
   la stampa riporta tutto in millimetri (buildPrintCss).
   Caratteri: Arial, Helvetica, Liberation Sans (x a 0,519 del
   corpo); metrics.ts conta 0,5, o meno se il carattere misurato
   all'avvio (main.ts) ha la x più bassa. I blocchi con un'indicazione
   obbligatoria restano a 1em o più: lo spazio si recupera con
   interlinea e margini (vedi strumento-etichette.md).
   ============================================================ */

.label-sheet {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  color: #0A0A0A;
  font-family: Arial, Helvetica, "Liberation Sans", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.label-sheet *,
.label-sheet *::before,
.label-sheet *::after { box-sizing: border-box; margin: 0; padding: 0; }

.label-sheet strong { font-weight: 700; }

.label-sheet[data-editing] { overflow: visible; touch-action: none; }

.lt-sheet-auto { display: flex; flex-direction: column; gap: 0.6em; height: 100%; padding: 1.67em; }

.lt-sheet-auto > * { flex-shrink: 0; }

.lt-sheet-header { text-align: center; }

.label-sheet .lt-sheet-logo { margin: 0 auto 0.44em; }

.label-sheet .lt-sheet-image { display: block; width: 100%; height: auto; object-fit: contain; }

.label-sheet .lt-sheet-title {
  font-size: 2.74em;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.label-sheet .lt-sheet-title--large { font-size: 3.4em; }

.label-sheet .lt-sheet-placeholder { color: #A3A3A3; }

.label-sheet .lt-sheet-desc { font-size: 0.93em; line-height: 1.375; color: #525252; text-align: center; overflow-wrap: anywhere; }

.label-sheet .lt-sheet-desc--small { font-size: 0.8em; }

.label-sheet .lt-sheet-desc--spaced { margin-top: 0.37em; }

.lt-sheet-marks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6em; }

.lt-sheet-mark { flex: 0 0 auto; }

.lt-sheet-rule { border-top: 1px solid #D4D4D4; }

/* ---------- blocchi obbligatori: 1em, mai meno ---------- */

.label-sheet .lt-sheet-ingredients { font-size: 1em; line-height: 1.25; overflow-wrap: anywhere; }

.label-sheet .lt-sheet-may { margin-top: 0.25em; font-size: 1em; font-weight: 600; line-height: 1.25; }

.lt-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8em; }

.lt-sheet-grid--table { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }

.lt-sheet-stack { display: flex; flex-direction: column; gap: 0.4em; min-width: 0; }

.lt-sheet-nutrition { font-size: 1em; line-height: 1.2; }

.label-sheet .lt-sheet-nutrition-title { font-weight: 700; text-transform: uppercase; }

.label-sheet .lt-sheet-nutrition table { width: 100%; margin-top: 0.3em; border-collapse: collapse; }

.label-sheet .lt-sheet-nutrition td { padding: 0.1em 0.35em; border: 1px solid #D4D4D4; vertical-align: top; }

.label-sheet .lt-sheet-nutrition td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* le cifre della quantità e il ℮ hanno il corpo in em scritto da render-label.ts (metrics.ts) */
.label-sheet .lt-sheet-weight { font-size: 1em; line-height: 1.2; }

.label-sheet .lt-sheet-qty { line-height: 1; }

.lt-sheet-nowrap { white-space: nowrap; }

.label-sheet .lt-sheet-e { margin-left: 0.12em; font-weight: 400; line-height: 1; }

.label-sheet .lt-sheet-line { font-size: 1em; line-height: 1.25; overflow-wrap: anywhere; }

/* prezzo: informazione volontaria (il testo aggiuntivo, che può portare le istruzioni d'uso, sta a 1em) */
.label-sheet .lt-sheet-small { font-size: 0.84em; line-height: 1.3; overflow-wrap: anywhere; }

.label-sheet .lt-sheet-recycling { margin-top: 0.3em; border: 1px solid #D4D4D4; font-size: 0.88em; line-height: 1.25; }

.lt-sheet-recycling-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid #D4D4D4; }

.label-sheet .lt-sheet-recycling-row > span { padding: 0.3em 0.5em; overflow-wrap: anywhere; hyphens: auto; }

.lt-sheet-recycling-row > span:first-child { border-right: 1px solid #D4D4D4; }

.lt-sheet-recycling-head { font-weight: 600; }

.label-sheet .lt-sheet-recycling-foot {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.25em 0.5em;
  font-weight: 600;
  text-transform: uppercase;
}

.lt-sheet-icon { flex: none; width: 1em; height: 1em; }

.label-sheet .lt-sheet-recycling-rows { margin-top: 0.3em; font-size: 0.8em; line-height: 1.25; }

.label-sheet .lt-sheet-recycling-rows p + p { margin-top: 0.12em; }

.label-sheet .lt-sheet-recycling-note { padding: 0 0.5em 0.25em; }

.label-sheet .lt-sheet-recycling-rows .lt-sheet-recycling-note { padding: 0; }

.lt-sheet-recycling-title { display: flex; align-items: center; gap: 0.3em; font-weight: 600; text-transform: uppercase; }

.lt-sheet-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8em;
  padding-top: 0.6em;
  border-top: 1px solid #D4D4D4;
}

.lt-sheet-footer-barcode { width: 42%; min-width: 0; }

.lt-sheet-footer-producers { max-width: 54%; margin-left: auto; }

.lt-sheet-bars { display: block; width: 100%; height: 2.96em; }

.label-sheet .lt-sheet-barcode-digits {
  margin-top: 0.26em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78em;
  letter-spacing: 0.28em;
  text-align: center;
  overflow-wrap: anywhere;
}

.label-sheet .lt-sheet-producers { font-size: 1em; line-height: 1.25; text-align: right; overflow-wrap: anywhere; }

/* ---------- layout manuale ---------- */

.lt-sheet-canvas { position: absolute; inset: 0; }

.lt-sheet-block { position: absolute; border-radius: 1px; user-select: none; -webkit-user-select: none; }

.label-sheet[data-editing] .lt-sheet-block { cursor: grab; outline: 1px dashed rgba(107, 70, 193, 0.6); }

.label-sheet[data-editing] .lt-sheet-block:focus-visible { outline: 2px solid var(--violet, #6B46C1); }

.label-sheet[data-editing] .lt-sheet-block.is-active {
  cursor: grabbing;
  outline: 2px solid var(--violet, #6B46C1);
  background: rgba(107, 70, 193, 0.05);
}

.lt-sheet-resize {
  position: absolute;
  top: 50%;
  right: 0;
  width: 0.85em;
  height: 1.8em;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(107, 70, 193, 0.85);
  transform: translateY(-50%);
  cursor: ew-resize;
  touch-action: none;
}

.lt-sheet-resize::before { content: ""; position: absolute; inset: -8px -6px; }

.lt-sheet-resize:focus-visible { outline: 2px solid var(--navy, #1E293B); outline-offset: 1px; }

@media print {
  .label-sheet .lt-sheet-placeholder { visibility: hidden; }
}
