:root {
    --main-max-width: auto;
    --ranks-top: 0px;
    --files-left: 0px;
    --pocketMargin: 0px;
}
body {
    overflow-y: auto;
}
.embed-app {
    grid-area: main;
    display: grid;
    --board-scale: calc((var(--zoom) / 100));
}

.embed-app {
    grid-template-columns: minmax(200px, calc(100vh - 2.5rem)) minmax(200px, 1fr);
    grid-template-rows: min-content 1fr;
    grid-template-areas: 'board pocket-top' 'board tools' 'board tools' 'board pocket-bot' 'board move-controls';
}

.embed-app.study-embed-preview {
    position: relative;
}
.embed-app.study-embed-preview :is(.analysis-tools, #move-controls) {
    visibility: hidden;
}
.embed-app.study-embed-preview :is(#mainboard, .pocket-top, .pocket-bot) {
    pointer-events: none;
}
.study-embed-preview__open {
    z-index: 10;
    position: absolute;
    inset: 0;
    margin: auto;
    display: block;
    width: fit-content;
    height: fit-content;
    max-width: calc(100% - 2rem);
    padding: clamp(.75em, 4vw, 1.5em) clamp(1.25em, 8vw, 3em);
    border: 0;
    border-radius: 3px;
    background: var(--link-color-blue);
    color: #fff;
    font: inherit;
    font-size: 1.5em;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: break-word;
    box-shadow: 0 2px 10px rgb(0 0 0 / 35%);
}
.study-embed-preview__open:hover {
    filter: brightness(1.1);
}
.study-embed-preview__open:focus-visible {
    outline: 2px solid var(--link-color-blue);
    outline-offset: 3px;
}
.cg-wrap coords.side, .cg-wrap coords.bottom, .cg-wrap coords.top {
    display: none;
}
#result {
    background-color: var(--bg-color2);
}
.movelist-block{
    grid-area: moves;
    flex: 2 1 0;
    overflow-y: auto;
    justify-content: initial;
    border-bottom: 1px solid var(--border-color);
    border: 1px solid var(--border-color);
}
#movelist {
    display: flex;
    height: auto;
    max-height: none;
}
@media (max-width: 799px) and (orientation: portrait) {
    .movelist-block {
        flex: initial;
        height: var(--movelist-max-height);
        max-height: var(--movelist-max-height);
    }
}
.analysis-tools {
    grid-area: tools;
    display: flex;
    flex-flow: column;
}
.footer {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    border-top: none;
    height: 2.5rem;
    padding: 0 1vw;
}
.gamelink {
    color: var(--link-color-blue);
}
