/* Print sheet: screen-hidden helpers + print layout (light paper, no UI chrome) */
.print-head, .print-only, .print-byline { display: none; }
.hint { color: var(--muted); font-size: .8rem; }

@media print {
  @page { margin: 12mm; }
  :root {
    --bg: #fff; --bg-2: #fff; --panel: #fff; --line: #999; --text: #000; --muted: #444;
    --stone: #f0ece4; --stone-dark: #ddd; --wall: #222; --wall-edge: #222;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #000; min-height: 0; display: block; }

  .site-header, .site-footer, .toolbar, .status-bar, .error, .sidebar, .gate, .viewer-actions,
  .dialog, .drag-ghost, #expansion-gate { display: none !important; }

  .editor { display: block !important; }
  .editor-body { display: block; }
  .canvas-scroll { overflow: visible; padding: 0; }
  .print-head { display: block; }
  .print-only { display: block; }
  .legend.print-only { display: flex; }
  .print-byline { display: block; margin: 0 0 .5rem; color: #444; font-size: 10pt; }
  .print-head h1, .viewer-head h1 { font-size: 20pt; margin: 0 0 .2rem; }
  .print-head p { margin: 0 0 .6rem; color: #444; }
  .viewer { padding: 0; }
  .viewer-head .byline, .viewer-desc { color: #333; }

  /* the board itself: fixed physical size, ink-friendly colours */
  .board-canvas, .viewer-page .board-canvas { --cell: 22mm; --slot: 3.2mm; --label: 7mm; gap: 8mm; width: auto; max-width: none; }
  .board-canvas[data-mode="dual"] { --cell: 17mm; }
  .field { background: #fff; box-shadow: none; border-color: #222; }
  .cell { background: var(--stone); border: .2mm solid #bbb; }
  .coord { color: #aaa; }
  .axis-label, .board-title { color: #000; }
  .slot.has-wall::after { background: #222; box-shadow: none; }
  .slot.has-wall.special::after { background-color: #fff; background-image: repeating-linear-gradient(45deg, #222 0 .6mm, #fff .6mm 1.4mm); outline: .3mm solid #222; }
  .post { background: #222; box-shadow: none; }
  .tile { box-shadow: none; text-shadow: none; border: .4mm solid #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .swatch { border: .3mm solid #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .legend { color: #000; margin-top: 6mm; }
  .legend .swatch { color: #fff; }
  .board-canvas, .board-wrap, .legend { break-inside: avoid; }
}
