/* V121: print-only 9x9 non-table geometry, fully isolated from screen preview. */
@media print {
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-geometry-v121 {
    display:grid!important;
    grid-template-columns:repeat(9,minmax(0,1fr))!important;
    grid-template-rows:repeat(9,minmax(0,1fr))!important;
    width:var(--print-board-mm)!important;
    height:var(--print-board-mm)!important;
    min-width:0!important;max-width:100%!important;
    min-height:0!important;max-height:none!important;
    aspect-ratio:1 / 1!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    margin:0 auto!important;padding:0!important;
    background:#fff!important;color:#173b63!important;
    direction:ltr!important;
    border-top:0.7mm solid #204c77!important;
    border-left:0.7mm solid #204c77!important;
    break-inside:avoid!important;
    print-color-adjust:exact!important;
    -webkit-print-color-adjust:exact!important;
  }
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-cell-v121 {
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:100%!important;
    min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
    box-sizing:border-box!important;
    background:#fff!important;color:#102f54!important;
    border:0!important;
    border-right:0.27mm solid #9baabb!important;
    border-bottom:0.27mm solid #9baabb!important;
    text-align:center!important;vertical-align:middle!important;
    font-family:Arial,system-ui,sans-serif!important;
    font-weight:750!important;
    font-size:clamp(9pt,calc(var(--print-board-mm) / 34),17pt)!important;
    line-height:1!important;
    padding:0!important;margin:0!important;
    white-space:nowrap!important;
    direction:ltr!important;
    overflow:hidden!important;
    print-color-adjust:exact!important;
    -webkit-print-color-adjust:exact!important;
  }
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-cell-v121:nth-child(3n) {
    border-right-width:0.7mm!important;
    border-right-color:#204c77!important;
  }
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-cell-v121:nth-child(n+19):nth-child(-n+27),
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-cell-v121:nth-child(n+46):nth-child(-n+54),
  body:has(#printSheetsV119) #printSheetsV119 .print-grid-cell-v121:nth-child(n+73):nth-child(-n+81) {
    border-bottom-width:0.7mm!important;
    border-bottom-color:#204c77!important;
  }
}
/* The screen preview continues to use the existing, separately styled HTML table. */
@media screen {
  #printSheetsV119 .print-grid-geometry-v121 {display:none!important;}
}

/* Old V115/V116 rules forcibly re-show #printPreview in print. The original
   screen preview MUST remain hidden: it is not the paper output. */
@media print {
 html body:has(#printSheetsV119) main.wrap > #printPreview,
 html body:has(#printSheetsV119) main.wrap > #printPreview[data-count],
 html body:has(#printSheetsV119) main.wrap > div#printPreview.print-preview[data-count] {
   display:none!important;visibility:hidden!important;
   width:0!important;height:0!important;margin:0!important;padding:0!important;
 }
 html body:has(#printSheetsV119) main.wrap > #printSheetsV119 {
   display:block!important;visibility:visible!important;
 }
}
