@page {
  size: A4 portrait;
  margin: 6mm;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: #000000 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Nur der Heldenbogen wird gedruckt */

.app-header,
.editor-column,
.editor-panel,
.column-intro,
.dice-showcase,
.print-button,
.warnings,
.mobile-notice {
  display: none !important;
}

.layout {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sheet-panel {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sheet {
  position: static !important;
  top: auto !important;
  width: 198mm !important;
  min-height: auto !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 3.5mm !important;
  border: 3px double #000000 !important;
  box-shadow: none !important;
  background: #ffffff !important;
  color: #000000 !important;
  overflow: visible !important;
  font-size: 7.2pt !important;
  line-height: 1.08 !important;
}

/* Kopfbereich */

.sheet-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 4mm !important;
  border-bottom: 2px solid #000000 !important;
  padding-bottom: 1.8mm !important;
  margin-bottom: 2mm !important;
}

.sheet-header h2 {
  margin: 0 !important;
  font-size: 16pt !important;
  line-height: 1 !important;
}

.sheet-header p {
  margin: 0.8mm 0 0 !important;
  font-size: 7.2pt !important;
  line-height: 1.05 !important;
  color: #555555 !important;
}

.sheet-logo {
  border: 1.5px solid #000000 !important;
  padding: 1.5mm 2mm !important;
  font-size: 9pt !important;
  line-height: 1 !important;
}

/* Abschnitte */

.sheet-section {
  padding: 1.4mm 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #c0c0c0 !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.sheet-section h3 {
  margin: 0 0 1mm !important;
  font-size: 10pt !important;
  line-height: 1 !important;
}

.sheet-section h4 {
  margin: 0 0 0.8mm !important;
  font-size: 8pt !important;
  line-height: 1 !important;
}

/* Raster im Druck */

.info-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1.2mm !important;
}

.attribute-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.2mm !important;
}

.derived-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.2mm !important;
}

.two-columns {
  display: grid !important;
  grid-template-columns: 0.8fr 1.6fr !important;
  gap: 3mm !important;
}

/* Boxen */

.info-box,
.attribute-box,
.derived-box {
  min-height: 0 !important;
  padding: 1mm !important;
  border: 1px solid #000000 !important;
  background: #ffffff !important;
}

.attribute-box {
  height: 12mm !important;
}

.derived-box {
  height: 13mm !important;
}

.info-box span,
.attribute-box span,
.derived-box span {
  display: block !important;
  font-size: 6.5pt !important;
  line-height: 1 !important;
  color: #555555 !important;
}

.info-box strong,
.attribute-box strong,
.derived-box strong {
  display: block !important;
  margin-top: 0.5mm !important;
  font-size: 8pt !important;
  line-height: 1.05 !important;
}

/* Boxen mit Würfeln: Titel oben, Würfelinhalt mittig */

.info-box:has(.die),
.attribute-box,
.derived-box {
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  align-items: stretch !important;
}

.info-box:has(.die) > span,
.attribute-box > span,
.derived-box > span {
  align-self: start !important;
}

/* Stufe und Attribute: Symbol über Wert, gemeinsam zentriert */

.info-box:has(.die) > strong,
.attribute-box > strong {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  align-self: center !important;
  width: max-content !important;
  gap: 0.2mm !important;
  margin-top: 0 !important;
  line-height: 1 !important;
}

/* Abwehr, Gewandtheit, Zähigkeit, Zuversicht: Würfelreihe zentriert */

.derived-box > strong.dice-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  align-self: center !important;
  gap: 1mm !important;
  margin-top: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.info-box:has(.die) .die,
.attribute-box .die,
.derived-box .die {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.info-box:has(.die) .die .symbol,
.attribute-box .die .symbol,
.derived-box .die .symbol {
  line-height: 1 !important;
}

.money-breakdown {
  display: block !important;
  margin-top: 0.4mm !important;
  color: #555555 !important;
  font-size: 6pt !important;
  line-height: 1 !important;
  font-weight: normal !important;
}

/* Würfelsymbole im Druck.
   Farben und Font kommen aus /css/zdh-dice.css. */

.die {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  overflow: visible !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}

.die .symbol {
  font-family: "ZdH Symbols", Georgia, serif !important;
  display: inline-block !important;
  font-size: 10pt !important;
  line-height: 1 !important;
  text-align: center !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--die-color) !important;
  -webkit-text-fill-color: var(--die-color) !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: var(--die-outline) !important;
}

.die-feuer .symbol,
.die-frost .symbol,
.die-gold .symbol {
  color: var(--die-color) !important;
  -webkit-text-fill-color: var(--die-color) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: var(--zdh-die-outline-dark) !important;
}

.die-weiss .symbol,
.die-gelb .symbol,
.die-rosa .symbol,
.die-feuer .symbol,
.die-frost .symbol,
.die-gold .symbol {
  text-shadow: var(--zdh-die-outline-dark) !important;
}

/* Tags und Listen */

.tag-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.8mm !important;
}

.tag-list span {
  padding: 0.5mm 0.9mm !important;
  border: 1px solid #000000 !important;
  background: #ffffff !important;
  font-size: 6.7pt !important;
  line-height: 1 !important;
}

.rules-list {
  margin: 0 !important;
  padding-left: 3.5mm !important;
  font-size: 6.6pt !important;
  line-height: 1.06 !important;
}

.rules-list li {
  margin: 0 0 0.45mm !important;
}

.small-note {
  margin: 0.8mm 0 0 !important;
  color: #555555 !important;
  font-size: 6.3pt !important;
  line-height: 1.05 !important;
}

p {
  margin-top: 0 !important;
  margin-bottom: 0.8mm !important;
}

/* Hinweise unter Kompetenzen und Fertigkeiten */

.competence-note {
  margin: 0.8mm 0 0 !important;
  color: #555555 !important;
  font-size: 5.8pt !important;
  line-height: 1.05 !important;
}

.competence-note p {
  margin: 0.2mm 0 !important;
}

.competence-note .die {
  margin: 0 0.03em !important;
  vertical-align: 0.04em !important;
}

.competence-note .die .symbol {
  font-size: 0.9em !important;
}

/* Regeltext-Symbole kleiner */

.rules-list .die,
.hint .die {
  margin: 0 0.04em !important;
  vertical-align: 0.04em !important;
}

.rules-list .die .symbol,
.hint .die .symbol {
  font-size: 0.9em !important;
}

/* Seitenumbrüche möglichst vermeiden */

.sheet,
.sheet-header,
.sheet-section,
.info-grid,
.attribute-grid,
.derived-grid,
.two-columns {
  break-before: auto !important;
  break-after: auto !important;
}

/* Internetadresse auf dem gedruckten Heldenbogen */

.sheet::before {
  content: "www.zeitalterderhelden.de";
  display: block !important;
  margin: 0 0 1.2mm !important;
  text-align: center !important;
  color: #555555 !important;
  font-size: 6.5pt !important;
  line-height: 1 !important;
}

/* Version 070: Internetadresse auf dem gedruckten Heldenbogen */
.generator-footer {
  display: none !important;
}

.sheet::before {
  content: "www.zeitalterderhelden.de";
  display: block !important;
  margin: 0 0 1.2mm !important;
  text-align: center !important;
  color: #555555 !important;
  font-size: 6.4pt !important;
  line-height: 1 !important;
}
