.fiche {
  display: grid;
  grid-gap: 5px 20px;
  grid-auto-rows: 40px;
  grid-template-columns: 4fr 3fr 3fr;
}

section.meta {
  grid-column: 1/4;
  grid-row: 1/4;
}

section.caracteristics {
  grid-column: 1;
  grid-row: 5/12;
}

section.hp {
  grid-column: 2;
  grid-row: 5;
}

section.speed {
  grid-column: 3;
  grid-row: 5;
}

section.initiative {
  grid-column: 3;
  grid-row: 6;
}

section.ac {
  grid-column: 2;
  grid-row: 7;
}

section.contact {
  grid-column: 2;
  grid-row: 8;
}

section.surprise {
  grid-column: 2;
  grid-row: 9;
}

section.saving {
  grid-column: 3;
  grid-row: 7/11;
}

section.fight {
  grid-column: 1/4;
  grid-row: 12;
}

section.skills {
  grid-column: 3;
  grid-row: 20;
}

.d20 {
  background: url("assets/d20.svg") no-repeat;
  background-size: contain;
  height: 100%;
  width: 30px;
}

h2,
h3 {
  text-align: center;
  margin: 0;
  font-size: 1.2em;
  padding: 2px 0;
}

section > h2 {
  background: #95493b;
  color: #d6c086;
  border: 3px solid #d6c086;
  margin-bottom: 5px;
}

h3 {
  font-size: 1.1em;
  margin-bottom: 5px;
}

.num {
  font-family: sans;
}

.fiche {
  width: 100%;
  max-width: 1000px;
  height: 100%;
  margin: auto;
}
.fiche section.meta {
  display: flex;
  width: 100%;
}
.fiche section.meta .left {
  flex: 1;
  display: flex;
}
.fiche section.meta .left .logo {
  background-image: url("assets/pathfinder.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex: 1;
}
.fiche section.meta .left .logo span {
  text-align: center;
  width: 100%;
  align-self: flex-end;
  height: auto;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 15px;
}
.fiche section.meta .right {
  flex: 2;
  margin-top: 20px;
}
.fiche .field-line {
  display: flex;
  margin-bottom: 10px;
}
.fiche .field-line > * {
  flex: 10;
}
.fiche .field {
  margin-right: 15px;
  margin-left: 15px;
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
}
.fiche .field .value {
  font-weight: 600;
  border-bottom: 1px solid #a19887;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.fiche .field .value.mod {
  color: #95493b;
}
.fiche .field .label {
  font-size: 0.7em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  font-style: italic;
}
.fiche .field.l {
  flex: 20;
}
.fiche .field.s {
  flex: 5;
}
.fiche .field.xs {
  flex: 2;
}
.fiche .field.xs .label {
  text-align: center;
}
.fiche .field.xxs {
  flex: 1;
  min-width: 40px;
}
.fiche .field:has(+ .m-s) {
  margin-right: 0;
}
.fiche .field.m-s {
  margin-left: 5px;
}
.fiche section.caracteristics {
  display: flex;
  flex-direction: column;
}
.fiche section.caracteristics .carac {
  display: grid;
  grid-template-columns: 4fr 1fr 2fr;
  gap: 5px;
  margin-bottom: 5px;
}
.fiche section.caracteristics .carac div {
  padding: 3px;
  flex: 1;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
}
.fiche section.caracteristics .carac div.label {
  flex: 3;
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 3px;
  font-weight: 700;
  background: #d6c086;
  border-color: #95493b;
  font-size: 1em;
}
.fiche section.caracteristics .carac div.value {
  font-size: 0.8em;
}
.fiche section.caracteristics .carac div.mod {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 3px;
  color: #95493b;
  font-weight: bold;
  font-family: sans;
  font-size: 1.2em;
}
.fiche section.hp,
.fiche section.saving {
  display: flex;
  flex-direction: column;
}
.fiche section.hp div,
.fiche section.saving div,
.fiche section.fight > div,
.fiche section.speed,
.fiche section.initiative,
.fiche section.contact,
.fiche section.surprise,
.fiche section.ac {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-gap: 5px;
}
.fiche section.hp div .label,
.fiche section.saving div .label,
.fiche section.fight > div .label,
.fiche section.speed .label,
.fiche section.initiative .label,
.fiche section.contact .label,
.fiche section.surprise .label,
.fiche section.ac .label {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 3px;
  font-weight: 700;
  background: #d6c086;
  border-color: #95493b;
  flex: 1 1 0;
}
.fiche section.hp div .value,
.fiche section.saving div .value,
.fiche section.fight > div .value,
.fiche section.speed .value,
.fiche section.initiative .value,
.fiche section.contact .value,
.fiche section.surprise .value,
.fiche section.ac .value {
  display: flex;
  flex: 1 1 0;
}
.fiche section.hp div .value span.max,
.fiche section.saving div .value span.max,
.fiche section.fight > div .value span.max,
.fiche section.speed .value span.max,
.fiche section.initiative .value span.max,
.fiche section.contact .value span.max,
.fiche section.surprise .value span.max,
.fiche section.ac .value span.max {
  margin-left: 5px;
  flex: 1;
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 25px;
}
.fiche section.hp div .value span.current,
.fiche section.saving div .value span.current,
.fiche section.fight > div .value span.current,
.fiche section.speed .value span.current,
.fiche section.initiative .value span.current,
.fiche section.contact .value span.current,
.fiche section.surprise .value span.current,
.fiche section.ac .value span.current {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 25px;
  color: #95493b;
  font-weight: bold;
  font-family: sans;
  font-size: 1.2em;
  margin-right: 5px;
  flex: 1;
}
.fiche section.hp div .value span.separator,
.fiche section.saving div .value span.separator,
.fiche section.fight > div .value span.separator,
.fiche section.speed .value span.separator,
.fiche section.initiative .value span.separator,
.fiche section.contact .value span.separator,
.fiche section.surprise .value span.separator,
.fiche section.ac .value span.separator {
  display: flex;
  align-items: center;
}
.fiche section.hp div.non-lethal,
.fiche section.surprise,
.fiche section.contact {
  margin-top: 5px;
}
.fiche section.hp div.non-lethal .label,
.fiche section.surprise .label,
.fiche section.contact .label {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 3px;
  font-size: 0.7em;
  font-weight: normal;
  text-align: center;
}
.fiche section.initiative .value,
.fiche section.speed .value,
.fiche section.contact .value,
.fiche section.surprise .value,
.fiche section.saving div .value,
.fiche section.fight > div .value,
.fiche section.ac .value {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 25px;
  color: #95493b;
  font-weight: bold;
  font-family: sans;
  font-size: 1.2em;
  width: 100%;
}
.fiche section.saving > div {
  margin-top: 5px;
}
.fiche section.saving h2 {
  margin-top: 10px;
}
.fiche section.fight {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.fiche section.fight h2 {
  margin-top: 20px;
  margin-bottom: 0;
  grid-row: 1;
  grid-column: 1/4;
}
.fiche section.fight > div {
  grid-row: 2;
}
.fiche section.fight > div .label {
  text-align: center;
}
.fiche section.fight section.weapons {
  grid-column: 1/4;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fiche section.fight section.weapons .weapon {
  border: 3px solid #d6c086;
  background-color: #b8ae98;
  padding: 5px;
}
.fiche section.skills .skill {
  display: grid;
  grid-template-columns: 1fr 50px;
  margin-bottom: 2px;
  border-bottom: 1px solid #b0a896;
}
.fiche section.skills .skill .label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  padding-right: 10px;
}
.fiche section.skills .skill .value {
  font-size: 0.8em;
  border: 3px solid #b8ae98;
  background: #d7caaf;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3px 3px;
  color: #95493b;
  font-weight: bold;
  font-family: sans;
  font-size: 1.2em;
  font-size: 0.8rem;
  padding: 0;
}
.fiche section.skills .skill:has(.value:empty) {
  color: #7a7a7a;
}
.fiche section.skills .skill:has(.value:empty) .value {
  display: none;
}
.fiche section.skills .skill:has(.value:empty) {
  height: 25px;
}

@font-face {
  font-family: "medieval";
  src: url("assets/fonts/medievalsharp-bookoblique-webfont.woff2") format("woff2"), url("assets/fonts/medievalsharp-bookoblique-webfont.woff") format("woff");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "medieval";
  src: url("assets/fonts/medievalsharp-boldoblique-webfont.woff2") format("woff2"), url("assets/fonts/medievalsharp-boldoblique-webfont.woff") format("woff");
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: "medieval";
  src: url("assets/fonts/medievalsharp-bold-webfont.woff2") format("woff2"), url("assets/fonts/medievalsharp-bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "medieval";
  src: url("assets/fonts/medievalsharp-book-webfont.woff2") format("woff2"), url("assets/fonts/medievalsharp-book-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}
* {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  background-color: #e1d5bb;
  font-family: "medieval", serif;
}
