/* ==================================================================
   RMCC — Commandes buvette
   Feuille de style partagée (client + écran bar + QR)
   Mobile-first, gros boutons, lisible en soirée.
================================================================== */

:root {
  --bg:        #0e1116;
  --surface:   #171c24;
  --surface-2: #1f2630;
  --line:      #2b3441;
  --text:      #eef2f7;
  --muted:     #96a3b4;

  --brand:     #2f7fd4;
  --brand-ink: #ffffff;
  --accent:    #f0a92b;
  --ok:        #2fa96a;
  --warn:      #d9822b;
  --danger:    #d9534f;

  --radius: 14px;
  --pad: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body { padding-bottom: calc(96px + var(--safe-b)); }
body.no-cart { padding-bottom: 24px; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
button { font: inherit; color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------------- En-tête ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 17, 22, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px; margin: 0 auto;
  padding: 12px var(--pad);
  display: flex; align-items: center; gap: 12px;
}
.logo {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; letter-spacing: .5px;
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.topbar .sub { color: var(--muted); font-size: 13px; }

/* ---------------- Bandeau table ---------------- */
.table-chip {
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.table-chip strong { color: var(--accent); }

/* ---------------- Onglets catégories ---------------- */
.tabs {
  position: sticky; top: 65px; z-index: 15;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex; gap: 8px;
  max-width: 760px; margin: 0 auto;
  padding: 10px var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.tab[aria-selected="true"] {
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
}

/* ---------------- Carte ---------------- */
.cat-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted);
  margin: 26px 0 10px;
}

.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.item.out { opacity: .45; }
.item-name { font-weight: 600; }
.item-price { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.item-info { flex: 1; min-width: 0; }

/* Stepper +/- */
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 40px; height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 20px; font-weight: 600;
  cursor: pointer;
  display: grid; place-items: center;
  touch-action: manipulation;
}
.stepper button:active { transform: scale(.94); }
.stepper .add { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stepper .qty {
  min-width: 30px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.stepper .minus[hidden], .stepper .qty[hidden] { display: none; }

/* ---------------- Barre panier ---------------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px var(--pad) calc(12px + var(--safe-b));
  box-shadow: var(--shadow);
  transform: translateY(130%);
  transition: transform .22s ease;
}
.cartbar.show { transform: none; }
.cartbar-inner { max-width: 760px; margin: 0 auto; }

/* ---------------- Boutons ---------------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand); color: var(--brand-ink);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ok { background: var(--ok); }
.btn-warn { background: var(--warn); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 10px 14px; font-size: 14px; width: auto; }
.btn .count {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px; padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}
.btn .price { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---------------- Modale / écrans pleins ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg);
  overflow-y: auto;
  padding: 0 0 calc(24px + var(--safe-b));
}
.sheet[hidden] { display: none; }
.sheet-head {
  position: sticky; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  max-width: 760px; margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; gap: 12px;
}

/* Le bandeau « mode démo » ne doit pas masquer la barre panier */
body.demo-on .cartbar { bottom: 21px; }
body.demo-on { padding-bottom: calc(117px + var(--safe-b)); }
body.demo-on.no-cart, body.demo-on.bar { padding-bottom: 45px; }
.sheet-head h2 { font-size: 17px; }
.close {
  margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--line);
  width: 36px; height: 36px; border-radius: 10px;
  font-size: 19px; cursor: pointer;
}

/* Lignes du panier */
.line {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.line-name { flex: 1; }
.line-total { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; }

.total-row {
  display: flex; align-items: baseline;
  padding: 18px 0 8px;
  font-size: 20px; font-weight: 800;
}
.total-row .price { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Choix livraison / retrait */
.choice { display: grid; gap: 10px; margin: 8px 0 4px; }
.choice label {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  cursor: pointer;
}
.choice input { accent-color: var(--brand); width: 20px; height: 20px; flex: none; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--surface-2); }
.choice .t { font-weight: 700; }
.choice .d { color: var(--muted); font-size: 13px; }

textarea, input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
}
textarea { resize: vertical; min-height: 76px; }
label.field { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 14px; }

/* ---------------- Suivi de commande ---------------- */
.track { text-align: center; padding: 32px var(--pad); }
.track .num {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.track .big { font-size: 30px; font-weight: 800; margin: 10px 0 6px; }
.track .msg { color: var(--muted); max-width: 34ch; margin: 0 auto; }
.badge {
  display: inline-block; margin: 18px 0;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
}
.badge.nouvelle      { background: #2a3646; color: #9dc4f0; }
.badge.en_preparation{ background: #4a3413; color: #f6c76b; }
.badge.prete         { background: #10402a; color: #6ee7a8; }
.badge.servie        { background: #24303d; color: var(--muted); }
.badge.annulee       { background: #401c1c; color: #f0a0a0; }

.track-items {
  list-style: none; margin: 22px auto 0; padding: 0;
  max-width: 340px; text-align: left;
}
.track-items li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.track-items li:last-child { border-bottom: none; }
.track-items .q { font-weight: 800; color: var(--accent); min-width: 28px; }
.track-items .n { flex: 1; }
.track-items .p { color: var(--muted); font-variant-numeric: tabular-nums; }

.pay-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  margin: 22px auto; max-width: 340px;
}
.pay-box .lbl { color: var(--muted); font-size: 13px; }
.pay-box .amt { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }

.steps { display: flex; gap: 6px; margin: 24px auto; max-width: 340px; }
.steps i {
  flex: 1; height: 5px; border-radius: 3px;
  background: var(--line);
}
.steps i.on { background: var(--ok); }

/* ---------------- Divers ---------------- */
.notice {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 14px;
  color: var(--muted); font-size: 14px;
  margin: 16px 0;
}
.notice.err { border-left-color: var(--danger); color: #f3b6b6; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ==================================================================
   ÉCRAN DU BAR (bar.html)
================================================================== */
body.bar { padding-bottom: 24px; }
.bar-wrap { max-width: 1500px; margin: 0 auto; padding: 0 var(--pad); }

.bar-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
}
.bar-top h1 { font-size: 18px; }
.bar-top .spacer { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 14px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(47,169,106,.7); animation: pulse 2s infinite; }
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(47,169,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,169,106,0); }
}

/* Bandeau d'alerte connexion / session */
.conn-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px;
  font-weight: 700;
  position: sticky; top: 66px; z-index: 19;
}
.conn-banner.hide { display: none; }
.conn-banner .btn { width: auto; flex: none; }
.conn-banner.session {
  background: var(--danger); color: #fff;
  animation: banner-in .25s ease-out;
}
.conn-banner.session .btn { background: #fff; color: var(--danger); }
.conn-banner.reseau {
  background: var(--warn); color: #241703;
  animation: banner-in .25s ease-out;
}
.conn-banner.reseau .btn { background: #241703; color: var(--accent); }
@keyframes banner-in { from { transform: translateY(-100%); } to { transform: none; } }

.columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0;
  align-items: start;
}
@media (max-width: 1250px) { .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .columns { grid-template-columns: 1fr; } }

/* Colonne « À encaisser » : l'argent qui manque doit sauter aux yeux */
.col-head.col-cash { color: var(--accent); border-bottom-color: var(--accent); }
.ticket.is-cash { border-left-color: var(--accent); background: #241d12; }
.pill.cash-due {
  background: var(--accent); border-color: var(--accent);
  color: #241703; font-weight: 800;
}

.col-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 12px;
}
.col-head .n {
  background: var(--surface-2); border-radius: 999px;
  padding: 1px 9px; font-size: 12px; color: var(--text);
}

.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.ticket.is-prete { border-left-color: var(--ok); }
.ticket.is-prep  { border-left-color: var(--warn); }
/* Commandes qui traînent */
.ticket.late      { border-left-color: var(--warn); background: #241d12; }
.ticket.late .ago { color: var(--accent); font-weight: 700; }
.ticket.very-late {
  border-left-color: var(--danger);
  background: #2a1618;
  box-shadow: 0 0 0 1px var(--danger) inset;
  animation: nudge 2.2s ease-in-out infinite;
}
.ticket.very-late .ago { color: #ff9b9b; font-weight: 800; }
@keyframes nudge {
  0%, 92%, 100% { transform: none; }
  95%           { transform: translateX(-3px); }
  98%           { transform: translateX(3px); }
}
.unpaid { color: var(--danger); font-weight: 700; }

.ticket.fresh { animation: flash 1.4s ease-out 3; }
@keyframes flash {
  0%, 100% { background: var(--surface); }
  50%      { background: #24405c; }
}

.ticket-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px;
}
.ticket-head .no { font-size: 20px; font-weight: 800; }
.ticket-head .tbl {
  background: var(--accent); color: #221703;
  border-radius: 8px; padding: 3px 11px;
  font-weight: 800; font-size: 15px;
}
.ticket-head .ago { margin-left: auto; color: var(--muted); font-size: 13px; }
.ticket .who {
  font-size: 17px; font-weight: 800;
  margin: 2px 0 3px;
}
.ticket .mode { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ticket .mode.livraison { color: #7fc0ff; }
.ticket .mode.retrait   { color: var(--accent); }

.ticket ul { list-style: none; margin: 0 0 10px; padding: 0; }
.ticket li {
  display: flex; gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}
.ticket li .q { font-weight: 800; min-width: 30px; color: var(--accent); }
.ticket li .p { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.ticket .note {
  background: var(--surface-2); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 10px;
  font-size: 14px; font-style: italic;
}
.ticket .tot {
  display: flex; align-items: baseline;
  font-weight: 800; font-size: 18px;
  padding: 8px 0 12px;
}
.ticket .tot .v { margin-left: auto; font-variant-numeric: tabular-nums; }
.ticket-actions { display: flex; gap: 8px; }
.ticket-actions .btn { padding: 12px; font-size: 14px; }

/* ---------------- Gestion de la carte (écran bar) ---------------- */
.menu-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.menu-row.out { border-left: 3px solid var(--warn); }
.menu-row.editing { border-color: var(--brand); background: var(--surface-2); }

.menu-info { display: flex; align-items: baseline; gap: 12px; flex: 1; min-width: 200px; }
.menu-name { font-weight: 600; }
.menu-price { color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-flag {
  background: var(--warn); color: #241703;
  border-radius: 999px; padding: 1px 9px;
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
}

.menu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-actions .btn { width: auto; padding: 9px 14px; font-size: 14px; }

.menu-fields { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; min-width: 240px; }
.menu-field { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 110px; }
.menu-field span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.menu-field input { padding: 9px 11px; }

.login-card {
  max-width: 380px; margin: 12vh auto; padding: 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px;
}

/* ==================================================================
   COMPTA (compta.html)
================================================================== */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 16px 0;
}
.toolbar .grow { flex: 1; }
.toolbar select, .toolbar input[type="date"] { width: auto; padding: 9px 12px; }
.toolbar .inline {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); font-size: 14px;
}

.report-head { padding: 6px 0 14px; }
.report-head h2 { font-size: 20px; }

.stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 10px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.stat.ok { border-left-color: var(--ok); }
.stat.warn { border-left-color: var(--warn); }
.stat-l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.stat-v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 3px 0; }
.stat-s { color: var(--muted); font-size: 12px; }

.section-title { font-size: 15px; margin: 26px 0 10px; }

.table-scroll { overflow-x: auto; }
.compta table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px;
}
.compta th, .compta td {
  padding: 9px 12px; text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.compta thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700;
}
.compta tfoot th { font-weight: 800; border-top: 2px solid var(--line); border-bottom: none; }
.compta .r { text-align: right; font-variant-numeric: tabular-nums; }
.compta tbody tr:last-child td { border-bottom: none; }
.compta .row-off { opacity: .5; text-decoration: line-through; }
.foot-note { font-size: 12px; margin-top: 22px; }

/* ---------- Feuille de caisse imprimée / PDF ---------- */
@media print {
  body.compta {
    background: #fff; color: #000; padding: 0;
    font-size: 11pt;
  }
  body.compta .noprint, body.compta #login { display: none !important; }
  body.compta .bar-wrap { max-width: none; padding: 0; }
  body.compta .report-head h2 { font-size: 16pt; }
  body.compta .muted { color: #444; }

  body.compta .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  body.compta .stat {
    background: #fff; border: 1px solid #bbb; border-left-width: 3px;
    break-inside: avoid; padding: 8px 10px;
  }
  body.compta .stat-v { font-size: 14pt; color: #000; }
  /* .stat-l et .stat-s utilisent var(--muted) : gris clair illisible sur papier */
  body.compta .stat-l, body.compta .stat-s,
  body.compta .foot-note, body.compta .compta td.muted { color: #333; }

  body.compta table { background: #fff; border-color: #999; }
  body.compta th, body.compta td { border-bottom-color: #ccc; padding: 5px 8px; }
  body.compta thead th { color: #000; border-bottom: 1.5px solid #666; }
  body.compta tfoot th { border-top: 1.5px solid #666; }
  body.compta thead { display: table-header-group; }
  body.compta tr { break-inside: avoid; }

  @page { margin: 14mm; }
}

/* ==================================================================
   FICHE BÉNÉVOLE (guide.html) — pensée pour le papier
================================================================== */
.guide-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto; padding: 18px var(--pad);
}
.guide-bar .btn { margin-left: auto; }

.sheet-a4 {
  max-width: 900px; margin: 0 auto 40px;
  background: #fff; color: #111;
  padding: 20mm 16mm;
  border-radius: 6px;
}

.guide-head {
  display: flex; align-items: center; gap: 14px;
  border-bottom: 2.5px solid #111;
  padding-bottom: 10px; margin-bottom: 14px;
}
.guide-head h1 { font-size: 22pt; letter-spacing: -.01em; }
.guide-head p { margin: 3px 0 0; font-size: 10pt; color: #444; }
.guide-head .logo { background: #111; color: #fff; }

.guide-cols { columns: 2; column-gap: 12mm; }

.guide .step { break-inside: avoid; margin-bottom: 5mm; }
.guide .step h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13pt; margin-bottom: 4px;
}
.guide .step .num {
  background: #111; color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 11pt; font-weight: 800; flex: none;
}
.guide .step p,
.guide .step li { font-size: 10pt; line-height: 1.4; margin: 3px 0; }
.guide .step ol,
.guide .step ul { margin: 3px 0; padding-left: 16px; }
.guide .step li { margin-bottom: 2px; }
.guide b, .guide strong { font-weight: 700; }

.guide .flow {
  background: #f0f0f0; border-radius: 4px;
  padding: 5px 8px; font-weight: 700; font-size: 10pt;
  text-align: center;
}
.guide .warn-line {
  border-left: 3px solid #111; padding-left: 8px;
  font-size: 9.5pt;
}
.guide .rouge { color: #c0392b; }
.guide .ambre { color: #b9770e; }

.guide-tab { width: 100%; border-collapse: collapse; margin: 4px 0; }
.guide-tab td {
  border-bottom: 1px solid #ddd;
  padding: 4px 6px 4px 0;
  font-size: 9.5pt; vertical-align: top;
}
.guide-tab td:first-child { white-space: nowrap; padding-right: 10px; font-weight: 700; }
.guide-tab td.ok   { color: #1e7a4d; }
.guide-tab td.cash { color: #a76a08; }

.guide-foot {
  border-top: 1px solid #bbb; margin-top: 6mm; padding-top: 5px;
  font-size: 8.5pt; color: #555; text-align: center;
}

@media print {
  body.guide { background: #fff; padding: 0; }
  body.guide .noprint { display: none !important; }
  .sheet-a4 { max-width: none; margin: 0; padding: 0; border-radius: 0; }
  @page { size: A4 portrait; margin: 12mm; }
}

@media (max-width: 700px) {
  .guide-cols { columns: 1; }
  .sheet-a4 { padding: 20px 16px; }
}

/* ---------------- QR (qr.html) ---------------- */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px; padding: 20px 0;
}
.qr-card {
  background: #fff; color: #111;
  border-radius: 14px; padding: 18px;
  text-align: center;
  break-inside: avoid;
}
.qr-card .qr { margin: 0 auto; width: 100%; max-width: 190px; }
.qr-card .qr svg { display: block; width: 100%; height: auto; }
.qr-card .t { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #666; }
.qr-card .n { font-size: 30px; font-weight: 800; margin: 2px 0 6px; }
.qr-card .c { font-size: 12px; color: #666; margin-top: 8px; }

@media print {
  body { background: #fff; padding: 0; }
  .noprint { display: none !important; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); }
  .qr-card { border: 1px solid #ddd; }
}
