.smolc-stats-page {
    border: none;
    background-color: var(--smolc-paper-color);
    background-image: var(--smolc-graph-paper);
    background-size: 2lh 2lh;
    background-repeat: repeat;
    text-shadow: none;
    font-family: FT88-School;
    max-width: 45ch;
    overflow: visible;
    filter: drop-shadow(.2em 1em .4em black);
}

.smolc-stats-page.smolc-animated-page {
    animation-name: smolc-hello-stats-page;
    animation-duration: .5s;
    animation-iteration-count: 1;
    animation-direction: normal;
    animation-timing-function: ease-out;
    transform-origin: top center;
}

.smolc-stats-page nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 2em;
    margin-bottom: 0.5lh;
}

.smolc-stats-page nav h2 {
    font-family: FT88-Gothique;
    color: transparent;
    background-image: url(../assets/images/decorations/pen_filling.png);
    background-clip: text;
    background-position: center;
    background-size: 300px;
    text-align: center;
}

.smolc-left-button,
.smolc-right-button,
.smolc-close-button {
    border: none;
    background-color: transparent;
    font-size: inherit;
    width: 1em;
    height: 1em;
    padding: 0;
    flex-shrink: 0;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.smolc-left-button:hover,
.smolc-right-button:hover,
.smolc-close-button:hover {
    cursor: pointer;
    filter: var(--smolc-red-ink-filter);
}

.smolc-left-button:focus,
.smolc-right-button:focus,
.smolc-close-button:focus {
    outline: none;
}

.smolc-left-button:active,
.smolc-right-button:active,
.smolc-close-button:active {
    cursor: pointer;
    filter: var(--smolc-blue-ink-filter);
}

.smolc-left-button {
    background-image: url(../assets/images/ui/left_arrow.png);
}

.smolc-right-button {
    background-image: url(../assets/images/ui/right_arrow.png);
}

.smolc-close-button {
    background-image: url(../assets/images/ui/close_button.png);
}

.smolc-stats-page nav .smolc-stats-page-main-buttons-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0 1em;
}

.smolc-stats-page-level-skill-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1lh;
}

.smolc-stats-page-level-skill-container>div {
    display: flex;
    flex-direction: column;
}

.smolc-stats-page-gauge-descriptor {
    text-align: end;
    position: relative;
}

.smolc-stats-page-gauge-descriptor::after {
    content: " ";
    z-index: -1;
    background-image: url(../assets/images/decorations/circled.png);
    filter: var(--smolc-blue-ink-filter);
    top: -.7lh;
    left: -1.5lh;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 2em 1.5em;
}

.smolc-stats-page-portrait {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    z-index: -1;
    filter: var(--smolc-green-ink-filter);
    transform: scaleX(-1);
}

.smolc-stats-page table {
    width: 100%;
}

.smolc-stats-page table th {
    min-width: 6ch;
    border-bottom: 0.1em solid var(--smolc-red-ink-color);
}

.smolc-stats-page table tr {
    position: relative;
}

.smolc-stats-page table tr:not(:first-child)::after {
    --smolc-offset: 0.5em;
    content: "";
    background-image: url(../assets/images/ui/bar_filling.png);
    background-size: calc(100% + var(--smolc-offset)) calc(100% + var(--smolc-offset));
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: contrast(0) brightness(1.95);
    opacity: 0.85;
    border-radius: 0.15em;
}

.smolc-stats-page table tr td:not(:first-child),
.smolc-stats-page table tr th:not(:first-child) {
    text-align: center;
    border-left: 0.1em solid var(--smolc-red-ink-color);
}

.smolc-stats-page table .smolc-negative-amount::before {
    content: "-";
}

.smolc-stats-page table .smolc-positive-amount::before {
    content: "+";
}

.smolc-stats-page abbr[title] {
    position: relative;
    text-decoration: none;
}

.smolc-stats-page abbr[title]:hover {
    cursor: help;
}

.smolc-stats-page abbr[title]:hover::after,
.smolc-stats-page abbr[title]:focus::after {
    content: attr(title);
    text-align: left;
    padding: 1em;
    position: absolute;
    left: 2ch;
    bottom: 1.5lh;
    width: 30ch;
    text-wrap: auto;
    text-wrap: balance;
    background-color: var(--smolc-paper-color);
    background-image: linear-gradient(90deg,
            rgba(170, 164, 206, 0.6) .1em,
            transparent .1em), linear-gradient(rgba(170, 164, 206, 0.6) .1em,
            transparent .1em);
    background-size: 1lh 1lh;
    background-repeat: repeat;
    box-shadow: 0.1em 0.1em 0.25em black;
    border: none;
    font-size: inherit;
    font-family: inherit;
    z-index: 1;
    text-shadow: none;
}

.smolc-stats-page .smolc-stats-page-gauge-descriptor abbr[title]:hover::after,
.smolc-stats-page .smolc-stats-page-gauge-descriptor abbr[title]:focus::after {
    left: revert;
    right: 2ch;
    bottom: revert;
    top: 1.5lh;
}

.smolc-stats-page hr {
    color: inherit;
    border: none;
    border-top: 0.1em solid currentColor;
}

@keyframes smolc-hello-stats-page {
    0% {
        transform: translate(calc(-100vw), -50vh) rotate(100deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}