@page{
  size: A4;
  margin: 10mm;
}

@media print{
  :root{
    --bg: #ffffff;
    --panel: #ffffff;
    --ink: #000000;
    --muted: #111827;
    --line: #9ca3af;
    --accent: #111827;
    --accent-weak: #ffffff;
  }

  *{
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html, body{
    background: #ffffff !important;
  }

  .container{
    max-width: none !important;
    padding: 0 !important;
  }

  .layout{
    padding: 12px 0 0 !important;
  }

  .no-print,
  .screen-only,
  .appendix-overlay,
  .appendix-drawer,
  .lightbox{
    display: none !important;
  }

  .print-only{
    display: block !important;
  }

  a{
    color: inherit !important;
    text-decoration: none !important;
  }

  .topbar{
    background: transparent !important;
    border-bottom: 1px solid var(--line);
  }

  .nav{
    display: none !important;
  }

  .card{
    box-shadow: none !important;
    border-color: var(--line) !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  table, tr, td, th{
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .table-scroll{
    overflow: visible !important;
  }

  .table-scroll::before,
  .table-scroll::after{
    display: none !important;
  }

  thead{
    display: table-header-group;
  }

  img{
    max-width: 100% !important;
    height: auto !important;
    max-height: 150mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .img-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .thumb-bg{
    display: none !important;
  }

  .img-grid .thumb,
  .img-grid > img{
    box-shadow: none !important;
    border-color: var(--line) !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .img-grid .thumb{
    aspect-ratio: auto !important;
  }

  .img-grid .thumb img{
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 55mm !important;
    padding: 0 !important;
    object-fit: contain !important;
    cursor: default !important;
  }

  .img-grid > img{
    max-height: 55mm !important;
    padding: 0 !important;
    cursor: default !important;
  }

  .img-grid > *:nth-child(n+7){
    display: none !important;
  }

  .page-break{
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
    break-after: page;
    page-break-after: always;
  }
}
