/*====================================================================================================================
//
//      enigma.css: Main css file
//
//      Copyright Michael F.C. Crick 2014-2023 All Rights Reserved
//
//*====================================================================================================================*/

html,
body {
    width: 100%;
    background-color: white;
    margin: 0;
    padding: 0;
    touch-action: manipulation;

    /* Disable selection on the UI */
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

* {
    box-sizing: border-box;
}

html {
    /* 1rem = 16px at 480px width */
    font-size: calc(100vw * 16 / 480);
}

@media (min-aspect-ratio: 9/16) {
    /* 1rem = 16px at 853.3333px height */
    html {
        font-size: calc(100vh * 16 / 853.3333);
    }
}

body {
    height: 100vh;
    padding-top: calc(50vh - 26.6666rem);
}

@supports (height: 100svh) {
    body {
        height: 100svh;
        padding-top: calc(50svh - 26.6666rem);
    }

    @media (min-aspect-ratio: 9/16) {
        /* 1rem = 16px at 853.3333px height */
        html {
            font-size: calc(100svh * 16 / 853.3333);
        }
    }
}

#content {
    background-color: white;
    color: black;
    font-family: system-ui, serif;
    width: 30rem;
    height: 53.3333rem;
    font-size: 1rem;
    margin: 0 auto;
    rotate: 0deg;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


#menubar {
    height: 4rem;
    padding: 0 0.5rem;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
}

#menubar .icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.overlay {
    display: block;
    background-color: white;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 14rem;
    z-index: 2;
}

.overlay img {
    max-width: 100%;
    height: auto;
}

div #msgRect {
    position: absolute;
    opacity: 1;
    visibility: hidden;
    padding: 1rem;
    top: -4rem;    /* use to adjust message position */
    left: -2rem;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#msgText {
    border-radius: 0.5rem;
    background: black;
    text-align: center;
    color: white;
    font-size: 110%;
    padding: 1.5rem;
}


#chartName {
    display: flex;
    flex-direction: row;
    font-size: 100%;
    font-weight: bold;
    padding-bottom: 0.3rem;
}

#scoreKey {
    display: flex;
    flex-direction: column;
}

#infoIcon {
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.65;
}

#infoIcon2 {
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.65;
}


div #progress {
    font-family: system-ui, sans-serif;
}

#progress .line {
    display: grid;
    grid-template-columns: repeat(12, 2fr);
}

#progress .line > div {
    padding: 0.125rem;
    height: 3.5rem;
}

#progress .line > div:first-child {
    grid-column-start: 0;
}

#progress .line > div p {
    margin: 0;
    height: 100%;
    border: 0.125rem solid black;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

#underGrid {
    display: flex;
    width: 100%;
    height: 3.9rem;
}

#underGrid div {
    width: 12%;
    height: 3.5rem;
}

#freqText {
    display: flex;
    flex-grow: 1;
    width: 235%;
    margin-top: 1.1rem;
    font-weight: bold;
    font-size: 90%;
}

#lets {
    display: flex;
    flex-grow: 1.3;
    height: 3.5rem;
}

.letButtons {
    display: flex;
    flex-grow: 1.3;
    justify-content: center;
    margin-top: 0.7rem;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
    font-size: 160%;
    font-weight: normal;
    background-color: lightgray;
    padding-top: 6.1%;
    border-radius: 0.4rem;
}

#livesText {
    display: flex;
    flex-grow: 3;
    justify-content: right;
    margin-top: 1.4rem;
    font-weight: bold;
    font-size: 90%;
}

#lives {
    display: flex;
    right: 5%;
    margin-top: -0.3rem;
    font-size: 130%;
}


p.cellTop {
    color: black;
    font-size: 1.3rem;
}

p.keyTop:hover {
    cursor: pointer;
}

#key {
    width: 80%;
    margin-top:13%;
    margin-left: 10%;
}

.quoteArea {
    font-size: 210%;
    line-height: 1.16em;
    color: black;
    font-family: "Times New Roman", Times, serif;
    flex-grow: 1;
    white-space: nowrap;

    padding-bottom: 0rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

.quoteArea.locked {
    font-family: system-ui, sans-serif;
}

#pQuoteArea {
    margin: 0;
}

.italics {
    font-style: italic;
}

.open {
    background-color: GRAY;
}

#cmdArea {
    font-family: system-ui, sans-serif;
    font-size: 188%;
    display: flex;
    justify-content: center;
}

.cmdText {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
}

.cmdBut {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
    border-radius: 0.8rem;
    border: 0.15rem solid black;
    padding: 0.1rem;
    width: 3rem;
    height: 3rem;
        /*control the font here*/
    text-align: center;
    font-size: 95%;
    font-weight: bold;
    color: black;
    background-color: white;
}

#lockKey {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
    border-radius: 0.8rem;
    border: 0.15rem solid black;
    padding: 0.2rem;
    width: 5.5rem;
    height: 4.7rem;
    text-align: center;
    font-size: 75%;
    color: black;
    /*background-color: wheat;*/
}

div #rows {
    font-family: system-ui, sans-serif;
    display: flex;
    flex-direction: column-reverse;
    padding-top: 0rem;
    padding-bottom: 0rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}

#rows > div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

#rows > div > div {
    flex-basis: 10%;
    padding-left: 0.5rem;
    padding-bottom: 0.7rem;
}

#rows > div > div.wide {
    flex-basis: 15%;
}

#rows > div > div p {
    background-size: cover;
    color: black;
    width: 100%;
    height: 4rem;
    border-radius: 0.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

p.keyTop {
    font-size: 1.5rem;
}

p.keySwap {
    background-color: wheat;
    font-size: 2.0rem;
    text-align: center;
}

/* these are the same */

.title-group {
    margin-top: -1.2rem;
    margin-left: -2.2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#Quotzi {
    position: absolute;
    margin-left: 0.01rem;
    font-family: serif;
    font-weight: bold;
    font-size: 220%;
}

#tm {
    margin-left: -.4rem;
    font-size: 40%;
    vertical-align: super;
}

#version {
    margin-top: 2.8rem;
    padding-left: 3.0rem;
    text-align: center;
    font-style: italic;
    font-size: 95%;
    color: brown;
    opacity: 0;
}

#numBack {
    position: absolute;
    height: 6%;
    margin-top: -1.6rem;
    margin-left: -1em;
    opacity: 1%;
}

#menubar #puzNum {
    visibility: visible;
    font-family: serif;
    font-weight: bold;
    font-size: 140%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menubar #puz-num-wrapper {
    width: 4rem;
}

.icon-group {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.icon-wrapper {
    text-align: center;
    width: 3rem;
    overflow: visible;
    line-height: 0;
}

.icon-wrapper .tip {
    margin: 0.25rem -100% 0;
    line-height: 0.7;
    overflow: visible;
    font-weight: bold;
    opacity: 0;
}

.icon-wrapper.left-aligned {
    text-align: left;
    width: 4rem;
}

.icon-wrapper.left-aligned .tip {
    margin-left: 0;
}

.icon:hover + .tip {
    opacity: 1;
}

#moreGames {
    display: block;
    width: 100%;
    visibility: hidden;
}

#howtoplay {
    display: block;
    width: 112%;
    visibility: visible;
}

#settings {
    visibility: hidden;
    text-align: left;
    display: block;
}

.settings-table .row {
    display: grid;
    grid-template-rows: 1fr;
    grid-auto-flow: column;
    column-gap: 1rem;
}

.settings-table .col {
    min-height: 2rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.rectLine {
    margin: 0.75rem 0;
    border: 0;
    height: 0.08rem;
    background-color: darkgray;
    border: 0.08rem solid;
}

#premName {
    font-weight: bold;
    text-align: left;
}

.slider {
    width: 3rem;
    display: inline-block;
}

#quotziTips {
    visibility: hidden;
    width: 100%;
}

.topHalf {
    border: 0.2rem solid gray;
    border-radius: 1rem;
    margin: 0.5rem;
    padding: 1rem;
    display: block;
    font-family: system-ui, sans-serif;
    font-size: 95%;
}

#setName {
    margin-top: 0;
    font-size: 115%;
    font-weight: bold;
    text-align: center;
}

#statName {
    margin-top: 0;
    font-size: 110%;
    font-weight: bold;
    text-align: center;
}

#statPlayed {
    font-size: 155%;
    line-height: 10%;
}

#stats {
    text-align: center;
    font-weight: normal;
}

#stats table {
    width: 100%;
}

#stats table+table {
    margin-top: 0.1rem;
}

#stats table td {
    width: 20%;
    text-align: center;
}

#stats .label {
    font-size: 130%;
    font-weight: 500;
    text-align: left;
    width: 30%;
}

#statSolved {
    color: green;
}

#statLabels21 {
    font-size: 90%;
    line-height: 95%;
}

#statLabels22 {
    font-size: 70%;
    line-height: 95%;
}

#statLabels23 {
    font-size: 70%;
    line-height: 95%;
}

/*top top numbers*/
#statWinsScore {
    font-size: 155%;
    text-align: right;
}

#statWinsPC {
    font-size: 125%;
}

#statCurrent {
    font-size: 155%;
}

#statMax {
    font-size: 155%;
}

/*bottom row numbers*/
#statVictory {
    color: darkred;
}

#statVictoryScore {
    font-size: 155%;
}

#statVictoryPC {
    font-size: 125%;
}

#statCurrent2 {
    font-size: 155%;
}

#statMax2 {
    font-size: 155%;
}

#statGD {    /*score distribution + chart*/
    grid-column-start: 2;
    display: block;
    font-weight: bold;
    text-align: left;
    line-height: 125%;
    margin-left: 10%;
    margin-bottom: 0.25rem;
}

#chart-wrapper {
    margin: 1rem 0;
}

#chart {
    margin-top: 0.1rem;
    font-size: 0.18em;
    font-weight: 350;
    text-anchor: end;
}

#chart-line2 {
    transform: translateY(6px);
}

#chart-line3 {
    transform: translateY(12px);
}

#chart-line4 {
    transform: translateY(18px);
}

#chart-line5 {
    transform: translateY(24px);
}

#chart-line6 {
    transform: translateY(30px);
}

.chart-num {
    fill: black;
    font-size: 130%;
    font-weight: bold;
    /* Center on point (5, 2.5) */
    transform: translate(5px, 2.5px);
    text-anchor: middle;
    dominant-baseline: central;
}

.chart-bar {
    fill: gray;
    height: 5px;
    width: calc(90px * var(--width, 0));
    x: 10px;
    y: 0;
}

.chart-score {
    fill: white;
    transform: translate(calc(8px + 90px * var(--width, 0)), 2.5px);
    text-anchor: end;
    dominant-baseline: central;
}

#StatButtons {    /*Tips and Hints + Share*/
    margin-top: 0.1rem;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    gap: 0.1rem;
}

#StatButtons img {
    margin-left: 1.0rem;
    display: block;
    width: 82%;
    height: auto;
}

#statNext {    /*NEXT QUOTZI IN*/
    margin-top: 1.4rem;
    display: block;
    font-size: 95%;
    line-height: 0%;
    font-weight: bold;
    text-align: center;
}

#statTime {
    margin-bottom: -0.3rem;
    display: block;
    font-size: 65%;
    text-align: center;
}
