@media print {
  /* Force every :target-hidden spread/page visible and stack them for print,
     instead of only the currently open one. */
  .spread,
  [id$="-content"],
  .page {
    display:    block !important;
    height:     auto !important;
    width:      100% !important;
    page-break-after: always;
  }
  .leftpage, .rightpage {
    display:    block !important;
    height:     auto !important;
    overflow-y: visible !important;
  }
  #cover { height: auto !important; }
  body::before,
  body::after             { display: none !important; }
  #sidebar::before        { display: none !important; }
  #sidebar-container,
  #skip,
  #mobile-hide,
  nav,
  .ascii-art-label,
  .graveyard-stage,
  .graveyard-scroll,
  .page-turn,
  .page-footer,
  .divider,
  .half::before,
  main hr,
  .page-content hr        { display: none; }
  @page { margin: 0.5in; }
  * {
    background:  #fff !important;
    color:       #222 !important;
    opacity:     1 !important;
    box-shadow:  none !important;
    text-shadow: none !important;
  }
  body, p, li, td, th, blockquote, a, span, summary {
    font-family: Helvetica, sans-serif;
    font-size:   11pt;
  }
  body {
    display:    block !important;
    padding:    0 !important;
    min-height: auto;
  }
  main {
    position:   static !important;
    transform:  none !important;
    height:     auto !important;
    overflow-y: visible !important;
    display:    block;
    width:      100%;
    max-width:  100%;
    padding:    0;
    margin:     0;
  }
  #container { display: block; }
  main section,
  main section.half,
  main section.third,
  main section.twothird,
  main section.quarter,
  main section.threequarter,
  main section.full,
  .flexcontainer,
  .full, .half, .twothird,
  .third, .quarter, .threequarter {
    display: block;
    width:   100%;
    flex:    none;
    margin:  0;
    padding: 0;
  }
  #cover {
    border:        none;
    border-radius: 0;
    padding:       0;
  }
  #page3 {
    height:         auto !important;
    flex-direction: column;
    border:         none;
    border-radius:  0;
  }
  .leftpage,
  .rightpage {
    height:     auto !important;
    overflow-y: visible !important;
  }
  .page-content {
    overflow-y: visible !important;
    padding:    0;
  }
  .epitaph        { padding: 0; margin: 0; }
  #ep-default     { padding: 0; margin: 0; }
  main h1, main h2, main h3,
  main h4, main h5, main h6,
  h1, h2, h3, h4, h5, h6,
  .page-content h1,
  .page-content h2,
  h2.monster-name {
    font-size:        14pt;
    page-break-after: avoid;
    border:           none;
    text-align:       left;
    padding:          0;
    margin:           0.4em 0;
  }
  main h1::before, main h1::after,
  main h2::after,  main h3::after,
  #sidebar header::before { display: none; }
  p, li, blockquote, figure, img { page-break-inside: avoid; }
  main blockquote {
    max-width:   100%;
    border-left: 2px solid #555;
    border-top:  none;
    border-right:none;
    border-bottom:none;
  }
  section > p:first-of-type::first-letter,
  .page-content h1 + p::first-letter {
    font-size:   inherit;
    font-family: inherit;
    border:      none;
    padding:     0;
    margin:      0;
    float:       none;
    line-height: inherit;
  }
  img {
    filter:    none;
    max-width: 100%;
    height:    auto;
  }
  figure img {
    max-height: 35vh;
    max-width:  90vw;
  } 
  thead { display: table-header-group; }
  tr    { display: table-row; }
  td    { display: table-cell; }
  code, pre {
    font-family:  Courier, "Courier New", monospace;
    word-break:   break-all;
    word-wrap:    break-word;
    white-space:  pre-wrap;
    overflow:     initial;
    border:       1pt dotted #666;
    padding:      0.6em;
    border-radius: 0;
  }
  pre code { border: none; padding: 0; }
  a::after {
    content:     " (" attr(href) ") ";
    font-size:   9pt;
    color:       #555;
    font-family: Helvetica, sans-serif;
  }
  a[href^="#"]::after,
  a[href^="javascript"]::after { content: none; }
}