/* Cartel A4 para imprimir. Fondo blanco para gastar poca tinta y la misma
   tipografía del sistema que la app. */

:root {
  --ink: #1b1b1a;
  --ink-2: #4f4d48;
  --ink-3: #75726b;
  --line: #e2ded7;
  --soft: #f4f2ee;
  --orange: #ef8732;
  --orange-text: #b05410;
  --orange-soft: #fdf0e4;
  --red: #d93a2f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fit: 1;
}

* { box-sizing: border-box; }
html { background: #e9e7e3; }
body {
  margin: 0;
  padding: 72px 16px 40px;
  color: var(--ink);
  font: 400 16px/1.4 var(--font);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
h1, h2, p, ol, figure { margin: 0; }

/* ---------- Barra de herramientas (no se imprime) ---------- */

.toolbar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.1);
}
.seg button, .print-btn {
  border: 0;
  font: 500 15px/1 var(--font);
  cursor: pointer;
}
.seg button { padding: 9px 14px; border-radius: 9px; background: none; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--soft); color: var(--ink); font-weight: 600; }
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--orange);
  color: #1d1206;
  font-weight: 600;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.1);
}
.print-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hoja ---------- */

.sheet {
  zoom: var(--fit);
  width: 210mm;
  height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.15);
}

.p-head { display: flex; align-items: center; gap: 6mm; }
.p-patch { width: 26mm; height: 26mm; border-radius: 50%; box-shadow: 0 0 0 0.3mm var(--line); }
.p-word { font-size: 13mm; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.p-unit { margin-top: 1.5mm; font-size: 4.6mm; color: var(--ink-2); }
.p-icon { width: 20mm; height: 20mm; margin-left: auto; border-radius: 22%; }

.p-title {
  margin-top: 16mm;
  font-size: 14mm;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.p-lead { margin-top: 5mm; max-width: 165mm; font-size: 5.4mm; line-height: 1.4; color: var(--ink-2); }

.p-main {
  display: grid;
  grid-template-columns: 84mm 1fr;
  gap: 12mm;
  align-items: start;
  margin: 14mm 0 9mm;
}

.p-qr { display: grid; gap: 4mm; }
.p-qr-box { padding: 5mm; border: 0.5mm solid var(--line); border-radius: 6mm; }
#qr svg { display: block; width: 100%; height: auto; }
.p-qr figcaption { display: grid; gap: 1mm; text-align: center; }
.p-qr strong { font-size: 4.6mm; font-weight: 600; }
.p-url { font-size: 4mm; color: var(--ink-3); word-break: break-all; font-variant-numeric: tabular-nums; }

.p-steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 8mm; margin-top: 2mm; }
.p-steps li { counter-increment: s; position: relative; padding-left: 14mm; }
.p-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -0.5mm;
  width: 9.5mm;
  height: 9.5mm;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #1d1206;
  font-size: 5mm;
  font-weight: 700;
}
.p-steps h2 { font-size: 6.4mm; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.p-steps p { margin-top: 1.5mm; font-size: 4.6mm; line-height: 1.4; color: var(--ink-2); }

.p-tip {
  display: flex;
  align-items: center;
  gap: 4mm;
  margin-top: auto;
  padding: 5mm 6mm;
  border-radius: 4mm;
  background: var(--orange-soft);
  font-size: 5mm;
  font-weight: 600;
}
.p-tip svg { width: 8mm; height: 8mm; flex: none; fill: none; stroke: var(--orange-text); stroke-width: 2; stroke-linecap: round; }
.p-tip circle { fill: var(--orange-text); stroke: none; }

.p-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6mm;
  margin-top: 7mm;
  padding-top: 5mm;
  border-top: 0.3mm solid var(--line);
  font-size: 4mm;
  color: var(--ink-3);
}
.p-112 {
  display: inline-flex;
  align-items: baseline;
  gap: 2mm;
  padding: 2mm 4.5mm;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 4.2mm;
  font-weight: 600;
}
.p-112 strong { font-size: 5.6mm; font-weight: 800; }

/* ---------- Impresión ---------- */

@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff; padding: 0; }
  .toolbar { display: none; }
  .sheet { zoom: 1; margin: 0; box-shadow: none; }
}
