/* Character Book PDF / paper layout. In the print dialog choose Save as PDF,
   A4, and enable Background graphics to preserve the parchment colours. */
@page { size: A4; margin: 4mm; }
@media print {
  :root { color-scheme: light; }
  html, body { width: auto !important; min-width: 0 !important; background: #f9f3e8 !important; }
  body { font-size: 9.5pt !important; color: #382e24 !important;
    print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .topbar, button, .info-button, .info-popover, .info-popover-floating,
  .section-help, .spell-panel-caption, .journal-search-bar, .journal-search-controls,
  #journal-search, #journal-search-clear, #journal-search-count,
  #inventory-add, #journal-add, .inventory-item-actions,
  .inventory-editor, .journal-editor, .inventory-image-controls,
  .inventory-upload, .rest-controls, .rest-action,
  .conditions-add, .conditions-reference, .concentration-tracker button {
    display: none !important;
  }
  .book { display: block !important; width: 100% !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important; background: #f9f3e8 !important;
    border: 0 !important; box-shadow: none !important; }
  .page, .page.active { display: block !important; width: 100% !important;
    min-height: 0 !important; height: auto !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    box-shadow: none !important; overflow: visible !important; background: #f9f3e8 !important;
    break-before: page; page-break-before: always; }
  .page:first-child { break-before: auto; page-break-before: auto; }
  .page:last-child { break-after: auto; }
  .page h1 { font-size: 23pt !important; margin-top: 0 !important; }
  .page h2 { font-size: 13pt !important; margin-top: 12pt !important; }
  h1, h2, h3, .spell-group-heading { break-after: avoid; page-break-after: avoid; }
  .stat-card, .ability-card, .spell-detail, .inventory-item, .journal-entry,
  .spell-panel, .combat-health-panel, .combat-primary-grid > *,
  .spell-resource-row, .feature-entry, .profile-details, .spell-detail-body,
  .coin-card { break-inside: avoid; page-break-inside: avoid; }
  #page-spellbook details, #page-spells details { display: block !important;
    height: auto !important; max-height: none !important; overflow: visible !important; }
  #page-spellbook details > :not(summary), #page-spells details > :not(summary) {
    display: block !important; visibility: visible !important;
    height: auto !important; max-height: none !important; overflow: visible !important; }
  #page-spellbook summary, #page-spells summary { list-style: none !important; cursor: default !important; }
  #page-spellbook summary::marker, #page-spells summary::marker,
  #page-spellbook summary::-webkit-details-marker { display: none !important; }
  .spell-detail-body { display: block !important; }
  .spell-detail { margin-bottom: 9pt !important; }
  input, select, textarea { color: #382e24 !important; background: transparent !important;
    border-color: #b5a38b !important; box-shadow: none !important;
    print-color-adjust: exact; }
  input[type=checkbox] { appearance: auto !important; -webkit-appearance: checkbox !important; }
  input[type=number] { appearance: textfield; -moz-appearance: textfield; }
  input[type=number]::-webkit-inner-spin-button { display: none; }
  .inventory-item.editing.pdf-saved-view .inventory-item-details,
  .journal-entry.editing.pdf-saved-view .journal-entry-display { display: block !important; }
  .inventory-item.editing.pdf-saved-view .inventory-editor,
  .journal-entry.editing.pdf-saved-view .journal-editor { display: none !important; }
  .inventory-picture { max-width: 25mm !important; max-height: 25mm !important; object-fit: cover; }
  .journal-entries, #journal-entries { display: block !important; }
  .journal-entry { margin-bottom: 10pt !important; }
  .journal-entry p { orphans: 3; widows: 3; }
  .profile-art { max-height: 70mm !important; }
  .spell-dashboard, .combat-overview { break-inside: auto !important; }
  a { color: inherit !important; text-decoration: none !important; }
}
