body {
    background-color: white;
    src: url(fonts/EBGaramond08-Regular.otf);
    margin: auto;
}

@font-face {
    font-family: Garamond08;
    src: url(fonts/EBGaramond08-Regular.otf);
}
@font-face {
    font-family: Garamond12Italic;
    src: url(fonts/EBGaramond12-Italic.ttf);
}

.page-grid {
    display: flex;
    flex-wrap: wrap-reverse;
    max-width: 1100px;
    margin: auto;
    padding: 0px 20px 0px 20px;
    line-height: 1;
}

.sheet-controls {
    margin: auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1;
    align-content: start;
    margin-top: 30px;
    background-color: white;
    padding: 10px;
    max-width: 272px;
    box-shadow: 0px 12px;
}

.sheet-controls p{
font-size: 14pt;
font-family: "EB Garamond", serif;
line-height: 1.2;
}

.main-grid {
    max-width: 564px;
    min-width: 564px;
    margin-inline: auto;
    margin-top: 30px;
    height: 880px;
    width: 100%;
    background-color: white;
    padding: 40px;
    /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);*/
    box-shadow: 0px 12px;
    display: grid;
    grid-template-columns: 200px 200px 70px;
    grid-template-rows: 100px 210px 396px 70px;
    gap: 8px;
}

.title-grid {
    grid-area: 1 / 1 / 2 / 4;
    justify-items: start;
}

.stats-grid {
    grid-area: 2 / 1 / 3 / 3; 
    display: grid;
    grid-template-columns: 1;
}


.single-stat-grid {
    display: grid;
    grid-template-columns: 120px 32px 216px 32px;
    grid-template-rows: 32px 32px;
    justify-content: start;
}

.stat-title-p {
    grid-area: 1/1/2/2;
    line-height: 0;
    text-transform: uppercase;
    font-size: 16pt;
}

.base-stat {
    width: 33px;
    height: 34px;
    margin: 0px;
    border-width: 2px 1px 2px 2px;
    grid-area: 1/2/2/3;
    text-align: center;
    font-family: "EB Garamond", serif;
    font-style: italic;
}

.weapon-stat {
    margin: 0px;
    height: 34px;
    border-width: 2px 0px 2px 0px;
    grid-area: 1/3/2/4;
}

.total-stat {
    width: 33px;
    height: 34px;
    margin: 0px;
    border-width: 2px 2px 2px 1px;
    grid-area: 1/4/2/5;
    text-align: center;
    font-family: "EB Garamond", serif;
    font-style: italic;
}

.base-p {
    grid-area: 2/2/3/4;
    line-height: 0;
    margin-top: -2px;
}

.total-p {
    grid-area: 2/4/3/5;
    line-height: 0;
    margin-top: -2px;
}

.tracker-grid {
    grid-area: 2 / 3 / 4 / 3;
    display: flex;
    flex-wrap: wrap;
}

.tracker-holder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
}

.tracker-grid-you {
    display: grid;
    grid-template-columns: 1;
}

.tracker-grid-foe {
    display: grid;
    grid-template-columns: 1;
}

.experience-grid {
    grid-area:  3/1/4/2;
    display: grid;
    grid-template-columns: 1;
    align-content: start;
}

.radio-title-xp{
    margin-bottom: -14px;
    display: flex;
}

.radio-title{
    display: flex;
}

.xp-radio-grid{
    display:flex;
    flex-wrap: wrap;
    gap: 1px;
    background-color: black;
    border-style: solid;
    border-width: 2px;
    width: 193px;
}

.consumables-grid {
    grid-area: 3/2/4/3;
}

.con-radio-grid{
    display:flex;
    flex-wrap: wrap;
    gap: 1px;
    background-color: black;
    border-style: solid;
    border-width: 2px;
    width: 189px;
}

.pack-grid{
    grid-area: 4/1/5/4;
    display: flex;
    flex-wrap: wrap;
}

.pack-grid p {
    margin-top: -14px;
}
.pack-grid input{
    margin: 0;
    border-width: 2px;
    height: 34px;
    margin-top: -10px;
    width: 50%;
}

.pack-grid input::placeholder{
        color: black;
}

#pack-input-left{
    border-width: 2px 1px 2px 2px;
}

#pack-input-right {
    border-width: 2px 2px 2px 0px;
}

/* basic  */

p {
    font-family: Garamond08;
    font-size: 12pt;
    line-height: 1;
    margin-bottom: 6px;
    font-family: Garamond08;
}

.title {
    font-family: Garamond08;
    text-transform: uppercase;
    letter-spacing: 2%;
    margin-bottom: 9px;
    padding-top: 0px;
    margin-top: 0px;
    justify-self: left;
    font-size: 26pt;
    padding-left: 0px;
    align-self: start;
}

.title span {
    justify-self: left;
}

#leading-r1 {
    letter-spacing: -2pt;
}

h2 {
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: -16px;
    margin-top: -2px;
    font-size: 16pt;
    letter-spacing: 2%;
    font-family: Garamond08;
}

label {
    font-family: Garamond08;
    text-transform: uppercase;
    font-size: 16pt;
    letter-spacing: 2%;
}

input {
    font-family: Garamond12Italic;
    line-height: 1;
    font-size: 14pt;
    padding: 4px;
    margin: 2px;;
    border-style: solid;
    border-color: black;
    border-width: 0px 2px 2px 2px;
}

input[type=text]:focus {
    outline: 0;
}

#reset-radio {
    background-color: rgb(211, 211, 211);
    margin: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-right: 2px;
}
#reset-tracker-radio {
    background-color: white;
    margin: 0;
    width: 36px;
    height: 44px;
    display: flex;
    cursor: pointer;
    border-style: solid;
    border-width: 0px 1px 1px 0px;
}

#reset-radio-tracker:after {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: rgb(211, 211, 211);
    position: absolute;
    z-index: 0;
    transform: translate(15%, 35%);
}

#reset-radio-tracker-right:after {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: rgb(211, 211, 211);
    position: absolute;
    z-index: 0;
    transform: translate(-14%, 35%);
}

.xp-radio {
    background-color: white;
    margin: 0;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.xp-radio .checkmark {
    width: 10px;
    height: 10px;
    rotate: 45deg;
    background-color: rgb(212, 0, 0);
    display: none;
    z-index: 2;
}

.xp-radio input:checked + .checkmark{
    display: inline-block;
}

.xp-radio input{
    display: none;
}

.xp-radio-lvl {
    background-color: rgb(255, 255, 255);
    margin: 0;
    border-style: solid;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.xp-radio-lvl .checkmark {
    width: 10px;
    height: 10px;
    rotate: 45deg;
    background-color: rgb(212, 0, 0);
    display: none;
    z-index: 2;
}

.xp-radio-lvl input:checked + .checkmark{
    display: inline-block;
}

.xp-radio-lvl input{
    display: none;
}

.con-radio {
    background-color: white;
    margin: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.con-radio .checkmark {
    width: 16px;
    height: 16px;
    rotate: 45deg;
    background-color: rgb(212, 0, 0);
    display: none;
    z-index: 2;
}

.con-radio input:checked + .checkmark{
    display: inline-block;
}

.con-radio input{
    display: none;
}
.tracker-radio {
    background-color: white;
    margin: 0;
    width: 36px;
    height: 45px;
    display: flex;
    cursor: pointer;
    border-style: solid;
    border-width: 0px 1px 1px 0px;
}

.tracker-radio .checkmark {
    width: 16px;
    height: 16px;
    rotate: 45deg;
    background-color: rgb(212, 0, 0);
    display: none;
    align-self: center;
    justify-self: center;
    margin-left: 9px;
    z-index: 2;
}

.tracker-radio input:checked + .checkmark{
    display: inline-block;
}

.tracker-radio input{
    display: none;
}

.tracker-radio-right {
    background-color: white;
    margin: 0;
    width: 35px;
    height: 45px;
    display: flex;
    cursor: pointer;
    justify-content: right;
    border-style: solid;
    border-width: 0px 0px 1px 0px;

}

.tracker-radio-right .checkmark {
    width: 16px;
    height: 16px;
    rotate: 45deg;
    background-color: rgb(212, 0, 0);
    display: none;
    align-self: center;
    justify-self: center;
    margin-right: 9px;
    z-index: 2;
}

.tracker-radio-right input:checked + .checkmark{
    display: inline-block;
}

.tracker-radio-right input{
    display: none;
}

select {
    appearance: none;
    font-family: Garamond12Italic;
    color: black;
    font-size: 14pt;
    cursor: pointer;
    border-bottom: 2px solid black;
    border-left: 2px solid black;
    border-right: 2px solid black;
    padding: 4px;
    background-color: white;
    overflow: visible;
    width: 103px;
    height: 32px;
}

option::before {
   font-family: Garamond12Italic;
    color: black;
    font-size: 14pt;
}

select::-ms-expand {
 display: none;
}

.p-margin{
    margin-top: -16px;
}

#radio-title-gold {
    margin-bottom: 4px;
}

.dot {
    background-color: black;
    border-radius: 100%;
    width: 4px;
    height: 4px;
    align-self: center;
    position: absolute;
}

.you-health {
    position: absolute;
    align-self: flex-start;
    font-family: "EB Garamond", serif;
    font-size: 11pt;
    margin-top: 2px;
}

.foe-health {
    position: absolute;
    align-self: flex-start;
    font-family: "EB Garamond", serif;
    font-size: 11pt;
    margin-top: 2px;
}

.p-health-tracker{
    text-align: center;
    margin-left: -2px;
    margin-bottom: -8px;
    margin-top: -12px;
}

.p-foe {
    text-align: right;
    margin-top: -8px;
}

.p-you {
    margin-top: -8px;
}

#character-name {
    width: 220px;
    margin-right: 20px;
}

#class-select {
    width: 110px;
    color: black;
    line-height: 1;
}

#class-select option{
    font-family: EBGaramond;
    color: black;
    line-height: 1;
}

.title-line {
    margin-top: 30px;
    width: 72px;
}

#page-number-label {
    font-family: EB Garamond;
    text-transform: unset;
    font-size: 14pt;
}

#riddle-answers-label {
    font-family: EB Garamond;
    text-transform: unset;
    font-size: 14pt;
}

#page-number {
    width: 30px;
    height: 30px;
    border-width: 0px 0px 2px 0px;
    margin-bottom: 14pt;
}

iframe {
    border-style:hidden;
    width: 200px;
    height: 55px;
    overflow: hidden;
}

#cagesoffear-link::before {
    visibility: visible;
}

#cagesoffear-link::after {
    visibility: visible;
}

#home-link::before {
    visibility: hidden;
}

#home-link::after {
    visibility: hidden;
}

textarea {
    border: 1px solid black;
    padding: 4px;
    font-family: Garamond12Italic;
    font-size: 14pt;
    line-height: 1.2;
    max-width: 252px;
}

.xp-p {
    margin-bottom: 0px;
}

#h2-abilities {
    margin: 10px 0px -15px 0px;
}

#magister-p {
    margin-top: -10px;
}

#magister-p::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: black;
    margin: 7px 0px 0px 4px;
    position: absolute;
}

#lvl-icon {
background-color: white;
border: 3px solid black ;
position: absolute;
width: 12px;
height: 12px;
margin: 2px 0px 0px 2px;
}

.custom-select {
    position: relative;
    display: inline-block;
}

.select-selected {
    background-color: white;
    color: black;
    padding: 5px 5px;
    cursor: pointer;
    font-size: 14pt;
    font-family: Garamond12Italic;
    border: 2px solid black;
    border-width: 0px 2px 2px 2px;
    height: 32px;
    width: 110px;
    margin-left: 1px;
    transition-duration: 0.2s;
}

.select-selected:hover{
opacity: 50%;
   
}

/* Style the dropdown items */
.select-items {
    position: absolute;
    display: none;
    background-color:white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    width: 100%;
    font-size: 14pt;
    font-family: Garamond12Italic;
    z-index: 3;
}

/* Style the dropdown items */
.select-items div {
    padding: 10px;
    cursor: pointer;
    border: solid black;
    border-width: 0px 0px 1px 0px;
}

/* Style the dropdown items on hover */
.select-items div:hover {
    opacity: 50%;
        transition-duration: 0.2s;
}

#you-health{
    width: 52px;
    border-width: 0px;
    text-align: center;
    font-family: "EB Garamond", serif;
    padding-right: 6px;
    margin: -4px 0px 0px -8px;
    display: none;
}

#foe-health{
    width: 52px;
    border-width: 0px;
    text-align: center;
    font-family: "EB Garamond", serif;
    padding-right: 6px;
    margin: -4px 0px 0px -8px;
    display: none;
}

.health-tracker-label {
    font-family: Garamond08;
    letter-spacing: normal;
    text-transform: capitalize;
    font-size: 12pt;
    display: none;
}

.iframe-holder {
display: grid;
grid-template-columns: 50px 100px;
gap: 10px;
margin: 20px 0px -10px 0px;
}

#sheet-controls-warning {
margin-bottom: 10px;
}


@media (max-width:900px){
    .page-grid{
        justify-content: center;
    }
.sheet-controls {
    max-width: 100%;
    margin: 0px 0px 40px 0px;
    max-width: 564px;
    padding: 20px 20px 20px 20px;

}
.sheet-controls img{
display: none;
}

.sheet-controls textarea{
    width: 100%;
    max-width: 100%;
    height: 100px;
}
}

@media (max-width: 580px) {
    .main-grid{
    max-width: auto;
    min-width: auto;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    margin-top: 0px;
    justify-content: center;
    justify-items: center;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    box-shadow: 0px 0px;
    }
    .page-grid {padding: 0px;}
    .title-grid {grid-area: auto;}
    .title-grid label {display: none;}
    .stats-grid {grid-template-columns:1; grid-area: auto; display: block; margin-top: -10px;}
    .single-stat-grid {grid-template-columns:1; grid-template-rows:auto; grid-area: auto; display: block;}
    .stat-title-p {grid-area: auto; margin-bottom: 14px;}
    .base-stat {grid-area: auto;}
    .weapon-stat {grid-area: auto;}
    .total-stat  {grid-area: auto;}
    .tracker-grid {grid-area: auto; display: none;}
    .experience-grid {grid-area: auto; gap: 18px;}
    .experience-grid p {display: none;}
    .consumables-grid {grid-area: auto;}
    .consumables-grid p {display: none;}
    .pack-grid {grid-area: auto; margin-top: 18px;}
    .pack-grid p {display: none;}
    .pack-grid h2 {display: none;}
    .pack-grid input {width: 140px;}
    .base-p {display: none;}
    .total-p {display: none;}
    .weapon-stat {width: 212px;}
    .title {line-height: 1;}
    #h2-abilities {display: none;}
    #character-name {width: 200px; margin: 0px;}
    .select-selected {width: 112px; margin: 2px; }
    .radio-title {margin: -8px 0px 4px 0px;}
    #radio-title-gold {margin-top: 0px;}
    #you-health{display: inline;}
    #foe-health{display: inline;}
    .health-tracker-label {display: inline;}
    .base-stat{overflow: hidden;}
    .total-stat{overflow: hidden;}
    .weapon-stat{margin-top: 1px;}
    .iframe-holder{margin: 5px 0px 10px 0px; justify-content: center;}
}
