@font-face {
    font-family: "Pf2eFiraSans";
    font-style: normal;
    font-weight: normal;
    src: url("fonts/FiraSans-Regular.ttf");
}

@font-face {
    font-family: "Pf2eFiraSans";
    font-style: italic;
    font-weight: normal;
    src: url("fonts/FiraSans-Italic.ttf");
}

@font-face {
    font-family: "Pf2eFiraSans";
    font-style: normal;
    font-weight: bold;
    src: url("fonts/FiraSans-Bold.ttf");
}

@font-face {
    font-family: "Pf2eFiraSans";
    font-style: italic;
    font-weight: bold;
    src: url("fonts/FiraSans-BoldItalic.ttf");
}

@font-face {
    font-family: "Pf2eFiraSansCondensed";
    font-style: normal;
    font-weight: normal;
    src: url("fonts/FiraSansCondensed-Regular.ttf");
}

@font-face {
    font-family: "Pf2eFiraSansCondensed";
    font-style: italic;
    font-weight: normal;
    src: url("fonts/FiraSansCondensed-Italic.ttf");
}

@font-face {
    font-family: "Pf2eFiraSansCondensed";
    font-style: normal;
    font-weight: bold;
    src: url("fonts/FiraSansCondensed-Bold.ttf");
}

@font-face {
    font-family: "Pf2eFiraSansCondensed";
    font-style: italic;
    font-weight: bold;
    src: url("fonts/FiraSansCondensed-BoldItalic.ttf");
}

* {
    border: none;
    border-collapse: collapse;
    box-sizing: border-box;
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
    padding: 0;
    text-align: inherit;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #ddd;
    font-family: "Pf2eFiraSans", sans-serif;
    line-height: 1.3;
    margin-top: 230px;
}

#header {
    background: white;
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: row;
    font-size: 10pt;
    gap: 5px;
    height: 230px;
    overflow-x: auto;
    padding: 5px 10px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
}

#banner {
    width: 220px;
}

#banner > * {
    margin-bottom: 10px;
}

#banner h1 {
    font-size: 14pt;
    font-weight: bold;
}

#banner button {
    background: rgba(94, 0, 0, 0.8);
    border: 2px #5e0000 solid;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    padding: 2px 10px;
    text-decoration: none;
}

#banner a {
    color: inherit;
}

#filters {
    display: flex;
    flex-direction: row;
}

#filters > div {
    padding: 0 1em;
    height: 100%;
    overflow-y: auto;
    min-width: fit-content;
}

#filters h3 {
    font-weight: bold;
    margin-bottom: 0.2em;
}

input[type="checkbox"] + label {
    padding-left: 0.5em;
}

#main {
    padding: 2mm;
    transform: scale(1.2);
    transform-origin: top left;
    width: calc(100% / 1.2);
}

img.action {
    height: 0.8em;
    vertical-align: central 0.25em;
}

.card {
    margin: 1mm;
    position: relative;
    display: inline-block;
}

.card > div {
    background: #ffffff;
    border-radius: 3.9mm;
    border: 1mm solid #ccc;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    height: 120mm;
    padding: 2mm;
    width: 70mm;
}

.card.pinned > div {
    border-color: #004316;
}

.title {
    border-bottom: 0.5pt #000000 solid;
    font-family: "Pf2eFiraSansCondensed", sans-serif;
    font-size: 8pt;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 3pt;
    text-transform: uppercase;
}

.title .type {
    float: right;
    margin-left: 2mm;
}

.copyright {
    font-size: 6pt;
    margin-top: 3pt;
}

.traits {
    font-size: 6.5pt;
    margin-bottom: 1pt;
    text-transform: uppercase;
}

.traits > div {
    background: #5e0000;
    border: 1.2pt #d9c484 solid;
    color: #ffffff;
    display: inline-block;
    font-weight: bold;
    padding: 1pt 3pt 0 3pt;
}

.traits > div.uncommon {
    background: #98503c;
}

.traits > div.rare {
    background: #0c1466;
}

.description {
    flex-grow: 1;
    font-size: 7pt;
    line-height: 1.3;
    overflow: hidden;
}

.description + *:first-child {
    margin-top: 0;
}

.description + *:last-child {
    margin-bottom: 0;
}

p + p:not(.hanging-indent) {
    text-indent: 1.5em;
}

p.hanging-indent {
    padding-left: 1.5em;
    text-indent: -1.5em;
}

p.indent {
    margin-left: 1.5em;
}

li {
    display: list-item;
    margin-left: 1.5em;
    list-style: disc;
    text-indent: 0;
}

strong {
    font-weight: bold;
}

table {
    margin-top: 0.5em;
}

th {
    font-weight: bold;
}

th,
td {
    border: 0.5pt #000000 solid;
    padding: 0 0.2em;
    text-align: center;
    vertical-align: top;
}

hr {
    border-bottom: 0.5pt #000000 solid;
    margin: 2pt 0;
}

hr:first-child {
    display: none;
}

hr:last-child {
    display: none;
}

table + hr {
    border-color: transparent;
}

h3 {
    font-weight: bold;
}

@media print {
    body {
        background: none;
        margin-top: 0;
    }

    #header {
        display: none;
    }

    #main {
        padding: 0;
        transform: none;
        width: auto;
    }

    main > div {
        break-inside: avoid;
    }

    .card {
        background-color: #004316;
        margin: 5mm;
    }

    .card > div {
        border-color: #004316;
    }

    .card::before,
    .card::after {
        position: absolute;
        content: " ";
        z-index: -1;
    }
    .card::before {
        top: 0;
        bottom: 0;
        left: -5mm;
        right: -5mm;
        border-top: 1pt solid black;
        border-bottom: 1pt solid black;
    }
    .card::after {
        top: -5mm;
        bottom: -5mm;
        left: 0;
        right: 0;
        border-left: 1pt solid black;
        border-right: 1pt solid black;
    }
}
