@media print {
  @page { margin: 10mm; }
  @page ap-modal { size: A4 portrait; margin: 10mm; }
  html.fd, html.fd.light {
    color-scheme: light;
    --ap-white: #fff;
    --ap-black: #000;
    --ap-text-primary: #000;
    --ap-text-display: #000;
    --ap-text-secondary: #333;
    --ap-text-tertiary: #555;
    --ap-text-primary-rgb: 0,0,0;
    --ap-text-display-rgb: 0,0,0;
    --ap-text-secondary-rgb: 51,51,51;
    --ap-text-tertiary-rgb: 85,85,85;
    --fd-ink: var(--ap-text-primary);
    --fd-ink-2: var(--ap-text-secondary);
    --fd-ink-3: var(--ap-text-tertiary);
    --fd-page: var(--ap-white);
    --fd-panel: var(--ap-white);
    --fd-panel-2: var(--ap-white);
    --fd-panel-3: var(--ap-white);
  }
  html.fd, html.fd body {
    background: var(--ap-white) !important;
    color: var(--ap-text-primary) !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  html.fd body .fd-appbar,
  html.fd body .fd-footer,
  html.fd body .fd-embed-header,
  html.fd body .ap-backtop-group,
  html.fd body .ap-audio-chip,
  html.fd body .al-bottom-nav,
  html.fd body #apFooter,
  html.fd body #stationAudio,
  html.fd body .ap-guide-modal,
  html.fd body #apSysModal,
  html.fd body #apDetailModal { display: none !important; }

  html.fd body .fd-main {
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  html.fd body main,
  html.fd body main *,
  html.fd body .ap-print-banner,
  html.fd body .ap-print-banner * {
    background-color: var(--ap-white) !important;
    background-image: none !important;
    color: var(--ap-text-primary) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html.fd body table { width: 100% !important; border-collapse: collapse; }
  html.fd body th, html.fd body td {
    border-bottom: 0.5pt solid var(--ap-gray-300) !important;
  }
  html.fd body thead { display: table-header-group; }
  html.fd body tr { break-inside: avoid; }
  html.fd body .ap-audit-table-wrap,
  html.fd body .al-table-wrap { overflow: visible !important; }
  html.fd body th { position: static !important; }
  html.fd body .apLogo { filter: brightness(0) !important; }
  html.fd body .ap-print-chart { display: block; max-width: 100%; height: auto; }
  html.fd body .pp-chart,
  html.fd body .tp-chart { break-inside: avoid; }
  html.fd body.ap-print-detail > :not(#apPrintDetail) { display: none !important; }
  html.fd body #apPrintDetail {
    page: ap-modal;
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  html.fd body #apPrintDetail main {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}
