/* Stand Up & Math · shared print rules for every activity QR card (qr-card.html)
   Loaded after each card's own <style>, so these rules win.
   The sheet used to be a fixed 277mm-tall grid: two rows of the taller cards only just fitted A4 at
   exactly 100%, so any print zoom, "fit to page" or Letter paper clipped the cards, split them across
   pages or printed a blank page. Now the sheet has no fixed height and qr-print.js sizes the cards
   (CSS variables below) so the chosen number per page always fits inside a safe 186 × 250 mm box,
   which suits both A4 and Letter. */
@media print {
  @page { size: A4; margin: 10mm; }
  html body { background: #fff !important; padding: 0 !important; margin: 0 !important; display: block !important; min-height: 0 !important; }
  html body .print-sheet {
    display: grid !important;
    height: auto !important; min-height: 0 !important; width: auto !important;
    grid-template-columns: repeat(var(--qcols, 2), max-content) !important;
    justify-content: center !important; align-content: start !important;
    column-gap: 8mm !important; row-gap: 8mm !important;
    padding-top: var(--qtop, 0mm) !important;
  }
  html body .print-sheet .card {
    zoom: var(--qz, 1);
    box-shadow: none !important;
    break-inside: avoid !important; page-break-inside: avoid !important;
  }
  /* The soft glow behind the title is a semi-transparent gradient; printers often draw it as a solid disc */
  html body .print-sheet .card-top::before,
  html body .print-sheet .card-top::after { display: none !important; }
  html body[data-qper="1"] .print-sheet .card:nth-child(n+2) { display: none !important; }
  .qr-per { display: none !important; }
}

/* On-screen "Cards per page" picker (added by qr-print.js) */
.qr-per { display: inline-flex; align-items: center; gap: 6px; font: 11px 'IBM Plex Mono', monospace; color: #6b7280; }
.qr-per button {
  border: 1px solid #c9c3b8; background: #fff; color: #1a1a2e; border-radius: 6px;
  padding: 5px 10px; font: 11px 'IBM Plex Mono', monospace; cursor: pointer;
}
.qr-per button.on { background: #1a1a2e; color: #a78bfa; border-color: #1a1a2e; }
