/* Color Challenge — viewport-adaptive palettes */

@media screen and (max-height: 640px) {
    #ccPlayShell .container.container-single {
        padding-top: 3px !important;
    }
}

#ccPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
}

#ccPlayShell.game-worlds-play-shell:not([data-casual-sized]) {
    height: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

#ccPlayShell .casual-outer-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-worlds-body #ccPlayShell #gamebox.cc-gamebox,
#ccPlayShell #gamebox.cc-gamebox {
    --cc-cell: 56px;
    --cc-gap: 4px;
    --cc-palette-gap: 30px;
    --cc-inset: 12px;
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #000;
}

#ccPlayShell #timer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 28px;
    margin: 0;
    padding: 10px 16px 0;
    box-sizing: border-box;
    font-size: clamp(13px, 1.6vw, 16px);
    position: relative;
}

#ccPlayShell #timer span#plta,
#ccPlayShell #timer span#pltb,
#ccPlayShell #timer span#tdesc,
#ccPlayShell #timer span#time,
#ccPlayShell #timer span#cdesc,
#ccPlayShell #timer span#check {
    position: static;
    left: auto;
    top: auto;
}

#ccPlayShell #timer span#plta,
#ccPlayShell #timer span#pltb {
    color: #aaa;
    min-width: 5.5em;
}

#ccPlayShell #timer span#pltb {
    text-align: right;
}

#ccPlayShell .cc-timer-mid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #fff;
}

#ccPlayShell #timer span#tdesc,
#ccPlayShell #timer span#cdesc {
    color: #fff;
}

#ccPlayShell #timer span#time,
#ccPlayShell #timer span#check {
    color: red;
    font-weight: bold;
    font-size: clamp(15px, 1.9vw, 18px);
}

#ccPlayShell .cc-playfield {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    width: 100%;
    padding: 12px 16px 16px;
    box-sizing: border-box;
}

#ccPlayShell .game-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--cc-palette-gap);
    max-width: 100%;
}

#ccPlayShell .image-grid {
    display: grid;
    grid-template-columns: repeat(6, var(--cc-cell));
    grid-template-rows: repeat(6, var(--cc-cell));
    gap: var(--cc-gap);
}

#ccPlayShell .block {
    width: var(--cc-cell);
    height: var(--cc-cell);
    background-color: grey;
    cursor: pointer;
    box-sizing: border-box;
}

#ccPlayShell .changed {
    -webkit-box-shadow: inset 0 0 0 var(--cc-inset) #000;
    -moz-box-shadow: inset 0 0 0 var(--cc-inset) #000;
    box-shadow: inset 0 0 0 var(--cc-inset) #000;
}

#ccPlayShell .hidden {
    display: none;
}

#ccPlayShell #overlay {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#ccPlayShell #overlay.hidden {
    display: none;
}

#ccPlayShell #overlayMessage {
    margin: 0;
    text-align: center;
    font-size: clamp(20px, 3vw, 26px);
    font-weight: bold;
    color: red;
}

#ccPlayShell #restartButton {
    margin: 20px 0 0;
    font-size: 20px;
    padding: 8px 20px;
    cursor: pointer;
}
