/* Printable sheet; sizes come from CSS variables in mm set on the container. */
.sheet-pages { display: block; }
.page {
  position: relative;
  box-sizing: border-box;
  width: var(--page-w);
  height: var(--page-h);
  overflow: hidden;
  background: #fff;
  color: #0f1e36;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.page:last-child { break-after: auto; page-break-after: auto; }
.page-head {
  flex: none;
  box-sizing: border-box;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 2mm;
  border-bottom: 0.5pt solid #0f1e36;
  padding-bottom: 1mm;
}
.page-logo { width: 7mm; height: 7mm; flex: none; }
.page-title { font-weight: 800; font-size: 4.6mm; line-height: 1; }
.page-no { margin-left: auto; font-size: 3mm; font-weight: 700; color: #4a5a72; }
.page-date { margin-left: auto; font-size: 3.2mm; font-weight: 700; color: #4a5a72; }
.page-no + .page-date { margin-left: 2mm; }
.page-foot {
  flex: none;
  height: var(--foot-h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 7pt;
  font-weight: 600;
  color: #4a5a72;
}
.grid {
  flex: none;
  height: var(--body-h);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows), var(--row-h));
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-content: start;
}
.row {
  box-sizing: border-box;
  height: var(--row-h);
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: 0.4mm 0;
  border-top: 0.5pt solid #8a97a8;
  break-inside: avoid;
}
.row.first { border-top-color: transparent; }
.row.group { border-top: 1pt solid #64748b; }
.box {
  flex: none;
  box-sizing: border-box;
  width: var(--box);
  height: var(--box);
  margin: 0;
  border: 0.7mm solid #24324d;
  border-radius: 1.5mm;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: block;
}
input.box:checked::after {
  content: "";
  position: absolute;
  left: 28%;
  top: 8%;
  width: 28%;
  height: 56%;
  border: solid #1f9d63;
  border-width: 0 0.9mm 0.9mm 0;
  transform: rotate(45deg);
}
.pic {
  flex: none;
  width: var(--pic-w, var(--pic));
  height: var(--pic);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pic.emoji { font-size: calc(var(--pic) * 0.78); line-height: 1; }
.pic.none span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--pic) * 0.82);
  height: calc(var(--pic) * 0.82);
  border-radius: 50%;
  background: #eef2f7;
  color: #8190a5;
  font-weight: 800;
  font-size: calc(var(--pic) * 0.4);
}
.qty {
  flex: none;
  width: var(--qty-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8mm;
}
.qty.inline { flex-direction: row; justify-content: flex-start; gap: var(--gap); }
.pill {
  box-sizing: border-box;
  min-width: var(--pill);
  height: var(--pill);
  padding: 0 1mm;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  font-weight: 800;
  font-size: calc(var(--pill) * 0.9);
  line-height: 1;
}
.dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--dot-gap);
}
.dots.dense { flex: none; flex-direction: row; justify-content: flex-start; gap: var(--ddot-gap); margin-top: var(--ddot-gap); }
.dots.dense .dot { width: var(--ddot); height: var(--ddot); }
.dots.dense .dot:nth-child(6) { margin-left: var(--ddot-group); }
.dotrow { display: flex; justify-content: center; gap: var(--dot-gap); }
.dot { width: var(--dot); height: var(--dot); border-radius: 50%; background: #0f1e36; }
.txt { flex: none; box-sizing: border-box; padding-right: 1mm; width: var(--txt-w); min-width: 0; min-height: 0; max-height: 100%; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.name {
  font-weight: 800;
  font-size: var(--name-fs);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.orig {
  flex: none;
  font-size: max(2.8mm, calc(var(--name-fs) * 0.45));
  line-height: 1.1;
  color: #4a5a72;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
