* {
    box-sizing: border-box;
}
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Trebuchet MS", sans-serif;
}
#input {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 300x;
    padding: 0 10px;
    border-radius: 0 0 10px 0;
    background-color: white;
    box-shadow: 1px 1px 1px white;
    z-index: 100;
}
#input > div {
    margin: 10px 0;
}
input[type="range"] {
    cursor: ew-resize;
    min-width: 100px;
    width: calc(100% - 80px);
    color-scheme: light;
}
input[data-color="r"][type="range"] {
    accent-color: rgb(255, 0, 0);
}
input[data-color="g"][type="range"] {
    accent-color: rgb(0, 255, 0);
}
input[data-color="b"][type="range"] {
    accent-color: rgb(0, 0, 255);
}
input[data-color="h"][type="range"] {
    accent-color: hsl(0, 100%, 50%);
}
input[data-color="s"][type="range"] {
    accent-color: hsl(0, 0%, 50%);
}
input[data-color="l"][type="range"] {
    accent-color: hsl(0, 0%, 100%);
}

input[data-color="c"][type="range"] {
    accent-color: rgb(0, 255, 255);
}
input[data-color="m"][type="range"] {
    accent-color: rgb(255, 0, 255);
}
input[data-color="y"][type="range"] {
    accent-color: rgb(255, 255, 0);
}
input[data-color="k"][type="range"] {
    accent-color: rgb(0, 0, 0);
}

select,
input#hex,
input[type="number"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #555;
    background-color: #fff;
}
input#hex,
input[type="number"] {
    width: 45px;
}
select:focus,
input#hex:focus,
input[type="number"]:focus {
    border: 1px solid #bbb;
    outline: 0;
}
input#hex {
    width: 60px;
}
label {
    font-weight: bold;
}
label:has(#hex:valid)::after {
    content: "✓";
    color: green;
    font-weight: 900;
    position: relative;
    left: 3px;
    top: 3px;
}
label:has(#hex:invalid)::after {
    content: "✗";
    color: red;
    font-weight: normal;
    position: relative;
    left: 3px;
    top: 3px;
}
#palate-output {
    position: absolute;
    top: 0;
    right: 0;
    left: 300px;
    margin: 10px auto;
    text-align: center;
}
p {
    margin: 0;
    text-align: center;
    font-size: 1.75rem;
}
p.show-color {
    display: flex;
    overflow: hidden;
    border: 1px solid #ddd;
    padding: 0px;
    border-radius: 10px;
    margin: 10px auto;
    max-width: 500px;
}
p.show-color span {
    flex: 1;
    display: inline-block;
    line-height: 60px;
    font-size: 1rem;
    text-align: center;
}

.align-center {
    text-align: center;
}

@media screen and (max-width: 820px) {
    #input {
        width: 200px;
    }
    #palate-output {
        left: 200px;
    }
}

@media screen and (max-width: 720px) {
    #palate-output {
        padding: 0 10px;
    }
    p.show-color {
        max-width: 500px;
    }
}

@media screen and (max-width: 620px) {
    #input {
        width: 100%;
        border-radius: 0px;
    }
    #palate-output {
        left: 0;
        margin: 310px auto 40px;
        padding: 0;
    }
}

@media screen and (max-width: 520px) {
    #palate-output {
        width: auto;
    }
    p.show-color {
        max-width: 520px;
        border-radius: 0;
        margin: 15px 0;
        border-width: 1px 0;
    }
}

@media screen and (max-width: 365px) {
    .color-lite,
    .color-dark {
        display: none !important;
    }
}
