@page sudokuA4{size:A4 portrait;margin:5mm}
@page mazeA4{size:A4 portrait;margin:5mm}
@page{size:A4 portrait;margin:10mm}
@media print{
  *{box-sizing:border-box!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  html,body{height:auto!important;overflow:visible!important;background:#fff!important;color:#111!important;width:auto!important;margin:0!important;padding:0!important;font-family:Nunito,"Segoe UI",Arial,sans-serif!important}
  #app{display:none!important}
  #print-root{display:block!important}
  .print-sheet{width:190mm;height:277mm;max-height:277mm;page-break-after:always;break-after:page;display:flex;flex-direction:column;overflow:hidden;padding:0!important;margin:0!important;background:#fff}
  .print-sheet:last-child{page-break-after:auto;break-after:auto}
  .sheet-head{height:29mm;flex-shrink:0;border-bottom:.35mm solid #222;display:grid;align-content:start;grid-template-columns:1fr auto;gap:2mm;}
  .sheet-head h1{font-size:20pt;line-height:1.15;letter-spacing:.3px;margin:0!important;font-weight:900;grid-column:1}
  .sheet-meta{font-size:10pt;text-align:right;font-weight:800;grid-column:2;align-self:start;margin-top:2mm}
  .sheet-head p{font-size:9.5pt;grid-column:1/-1;margin:0!important;line-height:1.35}
  .sheet-body{min-height:0;flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8mm;row-gap:1mm;align-content:stretch}
  .sheet-body.n4{grid-template-rows:repeat(4,minmax(0,1fr))}
  .sheet-body.n6{grid-template-rows:repeat(3,minmax(0,1fr))}
  .print-card{min-width:0;min-height:0;break-inside:avoid;display:flex;flex-direction:column;align-items:center;justify-content:center}
  .card-heading{width:100%;text-align:left;padding-left:11mm;font-size:9pt;font-weight:800;margin-bottom:2mm}
  .print-grid{--n:4;display:grid;grid-template-columns:repeat(var(--n),1fr);aspect-ratio:1;width:52mm;border:.75mm solid #24374b;flex-shrink:0}
  .n6 .print-grid{width:65mm}
  .print-cell{border-right:.18mm solid #8d99a8;border-bottom:.18mm solid #8d99a8;display:flex;align-items:center;justify-content:center;font-size:18pt;font-weight:850;line-height:1;color:#111;background:#fff}
  .n6 .print-cell{font-size:17pt}
  .print-cell.given-cell{font-weight:900}
  .print-cell.box-right{border-right:.75mm solid #24374b}
  .print-cell.box-bottom{border-bottom:.75mm solid #24374b}
  .sheet-body.n4 .print-cell:nth-child(4n),.sheet-body.n6 .print-cell:nth-child(6n){border-right:0}
  .sheet-body.n4 .print-cell:nth-last-child(-n+4),.sheet-body.n6 .print-cell:nth-last-child(-n+6){border-bottom:0}
  .sheet-footer{height:8mm;position:relative;display:flex;align-items:end;justify-content:center;flex-shrink:0;border-top:.25mm solid #999;font-size:9pt;color:#444}
  .sheet-footer strong{font-weight:800;text-align:center}
  .sheet-footer span{position:absolute;right:0;bottom:0}
}

/* 3 x 3 Sudoku: named A4 page with 5mm printer-safe margins;
   leave the already approved labyrinth print geometry unchanged. */
@media print{
 .sudoku-print-sheet{page:sudokuA4;width:200mm!important;height:287mm!important;max-height:287mm!important;}
 .sudoku-sheet-head{height:22mm!important;min-height:22mm!important;padding-top:.25mm;grid-template-columns:minmax(0,1fr) auto;gap:0!important;}
 .sudoku-sheet-head h1{font-size:18pt!important;line-height:1.15;letter-spacing:0;}
 .sudoku-sheet-head .sheet-meta{font-size:8.2pt;margin-top:1.4mm}
 .sudoku-sheet-head .print-howto{font-size:8.5pt!important;font-weight:850;line-height:1.1!important;margin-top:1.1mm!important;}
 .sudoku-sheet-head .print-rule{display:flex;flex-direction:column;gap:.5mm;font-size:9.5pt!important;line-height:1.25!important;margin-top:.45mm!important}
 .sudoku-sheet-head .print-rule span{display:block}
 .sudoku-sheet-body{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:1.5mm 1.5mm!important;}
 .sudoku-print-sheet .print-card{justify-content:center;}
 .sudoku-print-sheet .print-grid,.sudoku-print-sheet .n6 .print-grid{width:64mm!important;max-width:100%;border:.82mm solid #141414;}
 .sudoku-print-sheet .print-cell{font-size:19pt!important;color:#111;background:#fff!important;border-right:.19mm solid #858585;border-bottom:.19mm solid #858585}
 .sudoku-print-sheet .n6 .print-cell{font-size:16pt!important}
 .sudoku-print-sheet .print-cell.box-right{border-right:.85mm solid #141414}
 .sudoku-print-sheet .print-cell.box-bottom{border-bottom:.85mm solid #141414}
 .sudoku-print-sheet .sheet-footer{height:8mm}
}

/* Shared 5mm-safe A4 standard for all printable game modules (maze here). */
@media print{
 .maze-print-sheet{page:mazeA4;width:200mm!important;height:287mm!important;max-height:287mm!important;}
 .maze-print-sheet .sheet-head{height:25mm!important;min-height:25mm!important;padding-top:.25mm;grid-template-columns:minmax(0,1fr) auto;gap:0!important;}
 .maze-print-sheet .sheet-head h1{font-size:18pt!important;line-height:1.15;letter-spacing:0;}
 .maze-print-sheet .sheet-head .sheet-meta{font-size:8.2pt;margin-top:1.4mm;}
 .maze-print-sheet .sheet-head .print-howto{font-size:8.5pt!important;font-weight:850;line-height:1.1!important;margin-top:1.1mm!important;}
 .maze-print-sheet .sheet-head .print-rule{font-size:9.2pt!important;line-height:1.2!important;margin-top:.45mm!important;}
 .maze-print-sheet .sheet-head .print-rule span{display:block;}
 .maze-print-sheet .maze-print-body{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));column-gap:1.5mm;row-gap:1.5mm;}
 .maze-print-sheet .maze-paper-card{gap:0;padding:0;justify-content:center;}
 .maze-print-sheet .maze-paper-grid{width:63mm!important;max-width:100%;max-height:63mm!important;aspect-ratio:1;}
 .maze-print-sheet .sheet-footer{height:8mm;}
}

/* v0.1.65 — Native browser print parity with 300 DPI PDF branding.
   Footer is moved UP and made 25–30% larger without changing sheet height.
   All printer text stays ~9 mm or more from the physical page edge. */
@media print{
  .print-sheet .sheet-footer{
    height:8mm!important;min-height:8mm!important;
    box-sizing:border-box!important;
    align-items:flex-start!important;
    padding-top:.35mm!important;
    font-size:11.5pt!important;
    line-height:1.15!important;
    color:#232323!important;
  }
  .print-sheet .sheet-footer strong{line-height:1.15!important;font-weight:900!important;}
  .print-sheet .sheet-footer span{top:.8mm!important;bottom:auto!important;font-size:8pt!important;}
  .print-sheet .sheet-head{
    position:relative!important;
    grid-template-columns:minmax(0,1fr) 43mm!important;
  }
  .print-sheet .sheet-head .sheet-meta{visibility:hidden!important;}
  .print-sheet .sheet-head::after{
    content:"İLKOKUL DİJİTAL\A ZEKÂ OYUNLARI ATÖLYESİ";
    display:block;position:absolute;top:0;right:0;
    text-align:right;white-space:pre;
    color:#333;line-height:1.25;
    font:800 8pt/1.3 Arial,Helvetica,sans-serif;
  }
}
