/* Printable sudoku page. Sheets are drawn in container units (cqw of the
   sheet width), so the on-screen preview is an exact miniature of the
   printed A4 page. */
.pctl{background:var(--card);border-radius:22px;padding:18px 22px;box-shadow:var(--gloss);display:flex;flex-wrap:wrap;gap:16px 28px;align-items:flex-start}
.pctl .grp{display:flex;flex-direction:column;gap:6px;min-width:0}
.pctl .lab{font-weight:800;font-size:14px;color:var(--sub)}
.pctl .grp.off{opacity:.4;pointer-events:none}
.pctl .seg{box-shadow:none;background:var(--soft);align-self:flex-start}
.pctl .themes{flex-wrap:nowrap}
.pctl .themes button{background:var(--soft)}
.pctl .chk{display:flex;align-items:center;gap:8px;font-weight:700;cursor:pointer;color:var(--text)}
.pctl .chk input{width:20px;height:20px;accent-color:var(--blue)}
.pactions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 22px}
.pactions .btn{border:0;border-radius:16px;padding:14px 22px;font-weight:900;font-size:17px;cursor:pointer}
.pactions .pri{background:var(--blue);color:#fff;box-shadow:0 8px 22px rgba(36,107,253,.3)}
.pactions .sec{background:var(--card);color:var(--text);box-shadow:var(--gloss)}
.pactions .hintp{align-self:center;color:var(--sub);font-size:15px}

.sheets{display:flex;flex-direction:column;align-items:center;gap:22px}
.sheet{container-type:inline-size;width:min(100%,720px);aspect-ratio:180/247;background:#fff;color:#0B1450;box-shadow:0 10px 30px rgba(20,40,120,.15);border-radius:6px;padding:0;display:flex;flex-direction:column;overflow:hidden;font-family:Nunito,sans-serif}
.sheet .in{flex:1;display:flex;flex-direction:column;padding:4cqw 5cqw 3cqw}
.sh-head{display:flex;justify-content:space-between;align-items:flex-end;border-bottom:.3cqw solid #0B1450;padding-bottom:1.2cqw;margin-bottom:1.6cqw}
.sh-head .t{font-weight:900;font-size:3.6cqw;line-height:1.1}
.sh-head .t span{color:#246BFD}
.sh-head .m{font-size:2cqw;color:#5E6A8C;font-weight:700;text-align:right;line-height:1.5}
.sh-body{flex:1;display:grid;gap:3cqw 4cqw;align-content:space-evenly;justify-items:center}
.sh-body.c1{grid-template-columns:1fr}
.sh-body.c2{grid-template-columns:1fr}
.sh-body.c4,.sh-body.c6{grid-template-columns:1fr 1fr}
.sh-body.ans{grid-template-columns:repeat(4,1fr);align-content:start;gap:2cqw 2cqw}
.pz{display:flex;flex-direction:column;align-items:center;gap:1cqw}
.pz .cap{font-weight:800;color:#5E6A8C;font-size:1.9cqw;align-self:stretch;display:flex;justify-content:space-between}
.pz .legend{display:flex;justify-content:center;gap:.6cqw;align-items:center;font-size:1.7cqw;color:#5E6A8C;font-weight:700}
.pz .legend img{object-fit:contain}
.pb{position:relative;display:grid;background:#fff;border:.25cqw solid #0B1450;border-radius:1cqw;overflow:hidden}
.pb .c{display:flex;align-items:center;justify-content:center;border-right:.12cqw solid #9aa5c4;border-bottom:.12cqw solid #9aa5c4;font-weight:800;line-height:1;min-width:0;min-height:0}
.pb .c img{width:76%;height:76%;object-fit:contain}
.pb .bx{position:absolute;inset:0;display:grid;pointer-events:none}
.pb .bx i{border:.25cqw solid #0B1450}
.sh-foot{display:flex;align-items:center;gap:2cqw;border-top:.2cqw solid #d4dbee;padding-top:1.4cqw;margin-top:1.6cqw}
.sh-foot img{width:9cqw;height:9cqw}
.sh-foot .tx{flex:1;font-size:1.8cqw;color:#5E6A8C;line-height:1.35}
.sh-foot .tx b{color:#0B1450}
.sh-foot .pg{font-size:1.8cqw;color:#5E6A8C;font-weight:800}

@media (max-width:600px){.pctl{padding:14px;gap:12px 18px}.pctl .themes{flex-wrap:wrap}.pactions .btn{flex:1 1 100%}}

@page{margin:12mm} /* fits both A4 and US Letter */
@media print{
  html,body{background:#fff!important;margin:0}
  .top,.intro,.pctl,.pactions,section,footer{display:none!important}
  .wrap{max-width:none;padding:0;margin:0}
  .sheets{display:block}
  .sheet{width:180mm;height:247mm;margin:0 auto;aspect-ratio:auto;box-shadow:none;border-radius:0;break-inside:avoid;page-break-inside:avoid;break-after:page;page-break-after:always;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .sheet:last-child{break-after:auto;page-break-after:auto}
}
