@font-face {
    font-family: 'variablecase';
    src: url('Variablecase2020-CaseVF.ttf');
}

:root {
    --rownum: 2;
    --txtarea_fontsz: 4;
    --ratio: calc(var(--txtarea_fontsz) / 4);
}

html {
    font-size: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    padding: 20px;
    background-color: white;
}

.flex,
h1,
#textbox {
    font-weight: normal;
    font-family: variablecase;
    font-size: 2rem;
    line-height: 2.5rem;
    position: relative;
    margin-bottom: 20px;
}

p {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
    font-size: 1rem;
    line-height: 1.25rem;
    position: relative;
    margin-bottom: 20px;
    max-width: 800px;
}

#cover {
    width: 100%;
    height: max-content;
    padding: 10px 1px;
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-rows: repeat(
        var(--rownum),
        calc(var(--txtarea_fontsz) * 1rem)
    );
    grid-template-columns: 100%;
    justify-items: stretch;
    align-items: end;
    pointer-events: none;
    opacity: 100%;
    transition: opacity 0.5s;
}

#cover * {
    background-color: white;
    position: relative;
    top: calc(0.09rem * var(--txtarea_fontsz) / 3);
    height: calc(1rem * var(--txtarea_fontsz) / 3);
    box-shadow: 0px calc(var(--ratio) * -0.5rem) calc(var(--ratio) * 0.65rem)
        calc(var(--ratio) * -0.5rem) rgba(0, 0, 0, 0.6);
}

#textarea {
    font-size: calc(var(--txtarea_fontsz) * (2 / 3) * 1rem);
    line-height: calc(var(--txtarea_fontsz) * 1rem);
    padding: 10px;
    outline: 1px black solid;
}

#textarea:hover ~ #cover {
    opacity: 50%;
}

#textarea ~ #cover.off {
    opacity: 0%;
}

#textarea span {
    transition: font-variation-settings 1s, background-color 1s;
    font-variation-settings: 'case' 0;
    background-color: rgb(255, 224, 243);
}

#textarea span.cap {
    font-variation-settings: 'case' 102;
    background-color: white;
}

.flex {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.flex > * {
    padding: 0.75rem;
    padding-top: 0;
    background-color: rgb(123, 255, 0);
}

#capcheck {
    background-color: rgb(255, 224, 243);
    color: rgb(255, 113, 201);
    padding-top: 0.55rem;
    transition: background-color 0.5s, color 0.5s;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
}

#capcheck.ready.on {
    background-color: rgb(255, 0, 157);
    color: rgb(255, 255, 255);
}

#capcheck.ready > :first-child,
#capcheck > :nth-child(2) {
    display: none;
}

#capcheck > :first-child,
#capcheck.ready > :nth-child(2) {
    display: block;
}

#capcheck.on.ready > div,
#capcheck > div {
    font-variation-settings: 'case' 0;
}

#capcheck.ready > div > span,
#capcheck.ready > div,
#capcheck > div > span,
h1 span:hover {
    font-variation-settings: 'case' 102;
}

#capcheck > :nth-child(2) > span:last-child:after {
    content: 'FF';
    font-variation-settings: 'case' 0;
}

#capcheck.on > :nth-child(2) > span:last-child::after {
    content: 'N';
    font-variation-settings: 'case' 102;
}

.togglebutton,
.flex a {
    cursor: pointer;
    transition: padding-top 0.5s;
    box-shadow: 0px -0.2rem 0.4rem 0.125rem rgba(0, 0, 0, 0.192) inset;
    border-radius: 0.4rem;
}

.togglebutton:active,
.flex a:active {
    box-shadow: 0px 0.2rem 0.4rem 0.125rem rgba(0, 0, 0, 0.192) inset;
    padding-bottom: 0.25rem;
}

.togglebutton:active > div,
.flex a:active > div {
    padding-top: 0.5rem;
}

.togglebutton span {
    font-variation-settings: 'case' 0;
}

.togglebutton.off {
    padding-top: 0.55rem;
}

.togglebutton.off span.cap {
    font-variation-settings: 'case' 102;
}

.togglebutton #onoff::after {
    content: 'FF';
}

.togglebutton.off #onoff::after {
    content: 'N';
}

.togglebutton #notes::after {
    content: 'SHOW';
}

.togglebutton.off #notes::after {
    content: 'HIDE';
}

.flex a {
    background-color: rgb(255, 230, 0);
    color: black;
    text-decoration: none;
}

#slidecontainer {
    background-color: rgb(136, 1, 255);
    color: white;
    position: relative;
    width: max-content;
    padding-top: 0.55rem;
    font-variation-settings: 'case' 0;
}

#slidecontainer input {
    position: absolute;
    left: 0.75rem;
    top: 0;
    width: calc(100% - 0.75rem * 2);
    height: 100%;
    -webkit-appearance: none; /* Override default CSS styles */
    appearance: none;
    background: transparent;
    outline: none;
}

#slidecontainer input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12.5%;
    height: 100%;
    opacity: 0%;
}

#slidecontainer input:focus {
    outline: none;
}

#slidecontainer input::-moz-range-thumb {
    appearance: none;
    width: 12.5%;
    height: 100%;
    opacity: 0%;
}

.trans_font_variation,
.trans_font_variation *,
#capcheck > :nth-child(2) > span:last-child:after {
    transition: font-variation-settings 0.5s;
}

#slidecontainer span.cap {
    font-variation-settings: 'case' 102;
}

#turnonnotes {
    background-color: rgb(0, 251, 255);
}

body p {
    display: none;
}

body.shownotes p {
    display: block;
}

#slidecontainer span.cap {
    box-shadow: 0px -0.2rem 0.4rem 0.125rem rgba(0, 0, 0, 0.516) inset;
    border-radius: 0.4rem;
    padding: 0 4px;
}
h1 span:hover {
    box-shadow: 0px -0.2rem 0.4rem 0.125rem rgba(0, 0, 0, 0.199) inset;
    border-radius: 0.4rem;
    padding: 0 4px;
}

@media only screen and (max-width: 700px) {
    html {
        font-size: 15px;
    }
}

@media only screen and (max-width: 400px) {
    html {
        font-size: 12px;
    }
}
