/* Mat calculator: the shared calculator shell gives the fields and presets; these rules are its own. */
.picture-mat [hidden]{display:none!important}
.picture-mat .picture-mat__choice{display:flex;flex-wrap:wrap;gap:8px 20px;margin:12px 0;padding:0;border:0}
.picture-mat .picture-mat__choice label,.picture-mat__check{flex-direction:row;align-items:center;gap:10px;min-height:44px}
.picture-mat input[type=radio],.picture-mat input[type=checkbox]{width:20px;height:20px;min-height:0;margin:0;padding:0}
.picture-mat__check{margin:12px 0}
.picture-mat__error{margin:16px 0;padding:12px 14px;border-left:4px solid #8a3b00;background:#fff4e5;font-weight:600}
.picture-mat__list{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:16px 0}
.picture-mat__list div{padding:12px 14px;background:#fff;border:1px solid #ccd5df;border-radius:12px}
.picture-mat__list dt{font-size:.9rem}
.picture-mat__list output{display:block;margin-top:4px;font-size:1.25rem;font-weight:700}
.picture-mat__preview{max-width:360px;margin:12px 0}
.picture-mat__preview svg,.picture-mat-cut svg{display:block;width:100%;height:auto}
.picture-mat__photo{margin:12px 0}
.picture-mat-cut{max-width:640px;margin:12px 0;background:#fff}
/* visibility:hidden would keep the hidden page's space, so the print was several pages long; display:none removes it,
   and the diagram and the elements around it are shown again. */
@media print{
  body *{display:none!important}
  body :is(*:has(.picture-mat-cut)),.picture-mat-cut,.picture-mat-cut *{display:revert!important}
  /* The page's own padding below the tool would push the diagram onto a second page. */
  body :is(*:has(.picture-mat-cut)){padding:0!important;margin:0!important}
  .picture-mat-cut{margin:0;border:0;max-width:none}
  /* 23 cm fits an A4 or US Letter page with the browser's default margins; the width stays 100% so the viewBox keeps its proportions. */
  .picture-mat-cut svg{max-height:23cm;break-inside:avoid}
}
