:root{
    --game-width: 448px;
}
.unscrollable{
    overflow:hidden;
}
.game-container {
    max-width: var(--game-width);
    display: flex;
    flex-direction: column;
    margin: auto;
}
/*header*/
.header {
    display: grid;
    justify-content: start;
    grid-template-columns: 1.5fr 5.5fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.logo{
    grid-row-start:1;
    grid-row-end:3;
    grid-column:1;
}
.table-id {
    cursor: pointer;
    grid-row:1;
    grid-column:2;
}

    .table-id:hover::after {
        content: ' Copy';
        font-size: small;
        vertical-align: middle;
    }
    .table-id:active::after {
        content: ' Copied';
    }
.question {
    grid-row: 1;
    grid-column: 3;
    width: 2em;
    height: 2em;
    margin-inline: auto;
    margin-block:auto;
    border-radius:1ex;
}
.status-message {
    font-size: small;
    grid-row: 2;
    grid-column-start: 2;
    grid-column-end: 4;
}
/*chessboard*/
.highlight {
    background: linear-gradient(0deg, #ff08, #ff08);
}

.highlight1-32417, .highlight2-9c5d2 {
    box-shadow: inset 0 0 3px 3px #ff08 !important;
}

.locked {
    opacity: 0.5;
}

span {
}

    span.locked {
        opacity: 0.9;
    }

.destination {
    background-image: radial-gradient(#d1ae89 25%, transparent 28%);
}

    .destination.capture {
        background-image: radial-gradient(transparent 0%, transparent 50%, #d1ae89 53%,#d1ae89 68%, transparent 71%);
    }

.spare-pieces-7492f {
    display: inline-flex;
}

.piece-417db {
    touch-action: none;
}

.piece-cost {
    text-align: center;
    top: -50%;
    left: 62%;
    width: 50%;
    height: 50%;
    max-width: 21px;
    max-height: 21px;
    position: relative;
    border-radius: 50%;
    border: 2px solid;
    font-size: 14px;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    pointer-events: none;
}

    .piece-cost.piece-cost-white {
        color: black;
        background-color: white;
        border-color: black;
    }

    .piece-cost.piece-cost-black {
        color: white;
        background-color: black;
        border-color: white;
    }

    .piece-cost span {
        user-select: none;
    }

.mana-pool {
    text-align: center;
    top: calc(-100% - 0.5ex);
    left: 0%;
    height: 100%;
    position: relative;
    font-size: 16px;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
}

    .mana-pool.mana-pool-white {
        color: black;
    }

    .mana-pool.mana-pool-black {
        color: white;
    }

    .mana-pool span {
        user-select: none;
    }

/*dashboard*/
.dashboard {
    display: flex;
}

.buttons {
    flex: 5;
    display: flex;
    flex-direction: column;
}

.button {
        height: 4ex;
        margin: 3px;
        border-radius: 1ex;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
    }

.button.emphasis {
            background-color: #f0d9b5;
        }

.moves-border {
    margin-top: 4px;
    flex: 3;
    overflow-y: scroll;
    overflow-y: overlay;
    border: 2px solid black;
    border-radius: 1ex;
    height: 18ex;
    display: flex;
    flex-direction: column-reverse;
}
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #8888;
    border-radius:2px;
}
    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
.moves-wrapper {
    display: flex;
    flex-direction: column-reverse;
    align-content: flex-end;
}

.moves {
    font-family: monospace;
    display: grid;
    min-height: 3ex;
}
    .moves > span:nth-child(6n+1),
    .moves > span:nth-child(6n+2),
    .moves > span:nth-child(6n+3) {
        background-color: #f0d9b580;
    }
    .moves span {
        background-color: #b5886380;
    }

    .moves .number {
        grid-column: 1;
        min-width: 2em;
        padding-left: 4px;
    }

    .moves .half-move-white {
        grid-column: 2;
    }

    .moves .half-move-black {
        grid-column: 3;
    }

/*help*/
body:has(.help){
    overflow:hidden;
}
.help {
    max-height: 95vh;
    margin: 1em;
    position: fixed;
    left: auto;
    max-width: calc(var(--game-width) - 2em);
    z-index: 1;
    background-color: white;
    padding: 2em;
    border: 2px solid black;
    border-radius: 1ex;
    overflow-y: scroll;
    font-size: smaller;
    box-shadow: 4px 4px #0008;
}
.help .button {
float: right;
}
.help-innner{
    display:block;
}
.backdrop {
    background-color: #0008;
    width: 100vw;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1;
}

/*mobile*/

@media only screen and (max-width: 500px) {
    .dashboard {
        flex-direction: column;
        height: 36ex;
    }

    .buttons {
        flex: 1;
    }

    .moves-border {
        margin-top: 0;
        flex: 1;
    }

    .help {
        left: 0;
        top: 0;
    }
}
