* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #100d05;
    color: #e5d6a2;
    font: 14px system-ui
}

main {
    min-height: 100svh;
    display: grid;
    place-content: center;
    justify-items: center;
    padding: 20px
}

canvas {
    width: min(80vw, 70vh, 620px);
    height: min(80vw, 70vh, 620px);
    touch-action: none;
    cursor: grab
}

canvas:active {
    cursor: grabbing;
    
}


p {
    color: #ac9b6c;
    font-size: 12px;
    text-align: center;
    line-height: 1.7
}

section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    max-width: 620px
}

button {
    background: transparent;
    border: 1px solid #62532a;
    color: #e8d69a;
    border-radius: 6px;
    padding: 9px 13px;
    cursor: pointer
}

button:hover {
    background: #302710
}

label {
    font-size: 12px;
    display: flex;
    gap: 8px;
    align-items: center
}

input {
    accent-color: #d4af37;
    width: 100px
}

button:focus-visible, canvas:focus-visible {
    outline: 2px solid #f1d377
}



body {
    background: var(--background, #100d05)
}

main {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    overflow: hidden
}


.stage {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden
}

canvas {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    max-width: none
}

section {
    flex: none;
    max-width: 900px;
    gap: 8px
}

p {
    flex: none;
    margin: 0
}

details {
    flex: none;
    width: min(100%, 780px);
    margin: 10px auto;
    border: 1px solid #62532a;
    border-radius: 8px;
    padding: 8px 12px;
    background: #1c180e;
    color: #e8d69a;
    max-height: 35dvh;
    overflow: auto
}

summary {
    cursor: pointer;
    font-size: 13px
}

.settings {
    display: flex;
    gap: 12px 20px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 12px
}

input[type=color] {
    width: 36px;
    height: 28px;
    padding: 2px;
    border: 1px solid #7d6b38;
    background: transparent;
    cursor: pointer
}

body.clean main {
    gap: 0
}

body.clean .stage {
    width: 100%;
    height: 100%
}

body.clean details {
    display: none
}

body.clean canvas {
    width: 100%;
    height: 100%
}

.exit {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    background: #1c180e
}

body.clean .exit {
    display: block
}

@media (max-height: 500px) {
    main {
        padding: 8px;
        gap: 6px
    }

    p {
        display: none
    }

    button {
        padding: 6px 10px
    }

    details {
        padding: 5px 10px
    }
}

@media (max-width: 480px) {
    main {
        padding: 10px
    }

    p {
        font-size: 10px
    }

    section {
        gap: 6px
    }

    button {
        font-size: 11px;
        padding: 7px 9px
    }

    .settings {
        gap: 10px
    }

    label {
        font-size: 11px
    }
}
