#printMasthead,#printFooter{display:none}

@media print{
  @page{size:A4 portrait;margin:14mm 12mm 18mm}
  html,body{width:auto!important;min-width:0!important;background:#fff!important;
    -webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  #printMasthead{display:flex!important;position:fixed;top:-10mm;left:0;right:0;
    align-items:center;justify-content:space-between;gap:8mm;padding-bottom:2mm;
    border-bottom:.3mm solid #b8afa7;color:#4a4340;font-size:8.5pt;line-height:1.3;z-index:9999}
  #printMasthead strong{color:#1a1614;font-size:9pt}
  #printFooter{display:flex!important;position:fixed;left:0;right:0;bottom:-13mm;
    align-items:center;justify-content:space-between;gap:8mm;padding-top:2mm;
    border-top:.3mm solid #b8afa7;color:#6d635d;font-size:7.5pt;line-height:1.3;z-index:9999}
  #printFooter .print-source{max-width:62%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #bar,#toc,#tocMask,#uiDock,#uiBanner,#uiMask,.ui-modal,#uiTour,#uiHist,
  #fxProgress,#fxGlow,#fxRing,#fxTop,#fxBoot,.fx-dot,.fx-ripple,#hideprint{display:none!important}
  #wrap{padding:0!important;margin:0!important;max-width:none!important;display:block!important}
  #doc{border:0!important;box-shadow:none!important;border-radius:0!important;background:#fff!important;padding-bottom:0!important}
  .cover{border-radius:0!important;min-height:235mm!important;padding:24mm 12mm!important;
    break-after:page!important;page-break-after:always!important}
  section{padding:0!important;break-inside:auto!important;page-break-inside:auto!important}
  section+section{break-before:page;page-break-before:always}
  h2{margin-top:0!important;break-before:auto!important;page-break-before:auto!important;
    break-after:avoid-page!important;page-break-after:avoid!important}
  h3,h4,h5,h6{break-after:avoid-page!important;page-break-after:avoid!important}
  p,li{orphans:3;widows:3}
  table{break-inside:auto!important;page-break-inside:auto!important}
  thead{display:table-header-group}
  tfoot{display:table-footer-group}
  tr,img,svg{break-inside:avoid-page!important;page-break-inside:avoid!important}
  .phase,.card,.box,.say,.tl li{break-inside:avoid-page!important;page-break-inside:avoid!important}
  .lesson,.soc{break-inside:auto!important;page-break-inside:auto!important}
  .lesson>header,.soc>h3{break-after:avoid-page!important;page-break-after:avoid!important}
  .tw{overflow:visible!important;background:none!important;margin:3mm 0!important}
  .tw table,.soc .tw table{min-width:0!important;width:100%!important}
  .ph:not(:has(img)){display:none!important}
  .ph:has(img){display:block!important;border:0!important;min-height:0!important;padding:0!important}
  .vid{display:block!important}
  .vid input{display:none!important}
  .vid a[href]{display:inline!important;color:#1a1614!important;text-decoration:none!important}
  .vid a[href]::after{content:" (" attr(href) ")";font-size:8pt;color:#6d635d}
  .hub{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hub a{break-inside:avoid-page!important;page-break-inside:avoid!important;color:#1a1614!important;text-decoration:none!important}
  .hub a[href]::after{content:"文件路徑：" attr(href);display:block;margin-top:2mm;
    color:#6d635d;font-size:7.5pt;font-weight:400}
  a{color:inherit}
}
