/* Character record for the browser Print button. Same hierarchy as the jsPDF download. */

@font-face {
  font-family: "Donjon Sans";
  src: url("../vendor/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Donjon Sans";
  src: url("../vendor/fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Donjon Serif";
  src: url("../vendor/fonts/LiberationSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

#printout { display: none; }

@page { margin: 0.5in; }

@media print {
  html, body {
    background: #fff !important;
    color: #1c1917 !important;
    text-shadow: none !important;
    color-scheme: light;
  }
  #topbar, #desknav, #dicebar, #palette, #helpbox, #toast, #crt, #importfile, #printactions, #pdfhost { display: none !important; }
  #printout {
    display: block !important;
    position: static !important;
    width: auto !important;
    background: #fff !important;
    color: #1c1917 !important;
    color-scheme: light;
  }
  #printout * { text-shadow: none !important; -webkit-text-fill-color: currentColor; }
}

#printout .sheet {
  background: #fff;
  color: #1c1917;
  font-family: "Donjon Sans", Inter, "Liberation Sans", sans-serif;
  font-size: 9.5pt;
  line-height: 1.35;
}

.hero {
  border-top: 4px solid #7a2e2e;
  padding-top: 8px;
  margin: 0 0 12px;
  break-inside: avoid;
}
#printout .kicker {
  margin: 0;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a2e2e;
}
.hero h1 {
  margin: 2px 0 2px;
  font-family: "Donjon Serif", "Liberation Serif", Georgia, serif;
  font-size: 22pt;
  font-weight: 700;
  line-height: 1.05;
  color: #1c1917;
}
.meta, .person { margin: 0; }
.meta { font-weight: 600; font-size: 10.5pt; }
.person { color: #5c564f; font-size: 9pt; margin-top: 1px; }

.scores {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 0 0 10px;
}
.score {
  border: 1px solid #dcd4cc;
  border-top: 3px solid #7a2e2e;
  background: #fbf8f5;
  padding: 4px 6px 6px;
  break-inside: avoid;
}
.score .ab {
  display: block;
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a2e2e;
}
.score b {
  display: block;
  margin-top: 1px;
  font-family: "Donjon Serif", Georgia, serif;
  font-size: 16pt;
  line-height: 1.05;
  font-weight: 700;
}
.score .mods {
  display: block;
  margin-top: 2px;
  font-size: 7pt;
  line-height: 1.25;
  color: #5c564f;
}

.combat {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 0.9fr 1.8fr;
  gap: 6px;
  margin: 0 0 8px;
}
.stat {
  border: 1px solid #dcd4cc;
  padding: 4px 8px 6px;
  break-inside: avoid;
}
.stat span {
  display: block;
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c564f;
}
.stat b {
  display: block;
  margin-top: 1px;
  font-family: "Donjon Serif", Georgia, serif;
  font-size: 15pt;
  line-height: 1.1;
  font-weight: 700;
}
.stat.wide b {
  font-family: "Donjon Sans", sans-serif;
  font-size: 10pt;
  font-weight: 600;
  line-height: 1.25;
}
.loadout {
  display: grid;
  grid-template-columns: 2.2fr 0.85fr 1.2fr 1.35fr;
  gap: 6px;
  margin: 0 0 10px;
}
.loadout div {
  border: 1px solid #dcd4cc;
  background: #fbf8f5;
  padding: 4px 8px 5px;
  break-inside: avoid;
}
.loadout span {
  display: block;
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #5c564f;
}
.loadout b {
  display: block;
  margin-top: 2px;
  font-family: "Donjon Sans", sans-serif;
  font-size: 9.5pt;
  font-weight: 600;
  line-height: 1.25;
}

#printout h2 {
  margin: 8px 0 3px;
  padding-bottom: 2px;
  border-bottom: 1px solid #dcd4cc;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a2e2e;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.save {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #eee8e2;
  padding: 2px 0;
  break-inside: avoid;
}
.save b {
  color: #7a2e2e;
  font-family: "Donjon Serif", Georgia, serif;
  font-size: 11pt;
}
.wrap { margin: 0 0 4px; }
.thief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
ul.gear {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
ul.gear li { break-inside: avoid; }
.slots { margin: 0 0 4px; font-size: 8.5pt; color: #5c564f; }
.spell-level { margin: 0 0 3px; }
.notes { margin-top: 2px; }
.notes .rule { height: 12px; border-bottom: 1px solid #dcd4cc; }
.notes pre, .prose-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Donjon Sans", Inter, "Segoe UI", sans-serif;
  font-size: 9pt;
  line-height: 1.4;
}
.prose-sheet .prose-body { font-size: 11pt; line-height: 1.45; }
.prose-body .pl { margin: 0 0 1px; }
.prose-body .pl-title {
  font-family: "Donjon Serif", Georgia, serif;
  font-size: 14pt;
  line-height: 1.2;
  margin: 0 0 6px;
}
.prose-body .pl-title .k {
  display: block;
  font-family: "Donjon Sans", Inter, sans-serif;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c564f;
}
.prose-body .pl-section {
  margin: 8px 0 2px;
  font-weight: 600;
  font-size: 8.5pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a2e2e;
}
.prose-body .pl-creature { font-weight: 600; margin: 2px 0; }
.prose-body .pl-gap { height: 7px; }
.prose-body .k { font-weight: 600; color: #5c564f; }
