.cn-four-fours-clock {
    position: relative;
    display: grid;
    min-height: clamp(34rem, 82svh, 58rem);
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: #2b2118;
    isolation: isolate;
}

.cn-four-fours-clock.is-day {
    background: #d7c59d;
}

.cn-four-fours-clock__controls {
    position: absolute;
    z-index: 3;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cn-four-fours-clock__controls .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 0.4rem 1rem rgb(0 0 0 / 20%);
}

.cn-four-fours-clock__controls .btn:focus-visible,
.cn-four-fours-clock__item:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.cn-four-fours-clock__canvas {
    display: grid;
    width: 100%;
    height: 100%;
    padding: clamp(4.5rem, 8vw, 6rem) clamp(0.5rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
    place-items: center;
}

.cn-four-fours-clock__face {
    display: block;
    width: min(100%, 48rem, 74svh);
    height: auto;
    overflow: visible;
    font-family: Georgia, "Times New Roman", serif;
}

.cn-four-fours-clock__background {
    stroke: #6b4a2f;
    stroke-width: 28;
}

.cn-four-fours-clock.is-day .cn-four-fours-clock__background {
    stroke: #9b7040;
}

.cn-four-fours-clock__ring {
    fill: none;
    stroke: #4b321e;
    stroke-width: 3;
}

.cn-four-fours-clock__dot,
.cn-four-fours-clock__center {
    fill: #2a1a0d;
}

.cn-four-fours-clock__box {
    fill: rgb(230 210 165 / 95%);
    stroke: #4a321e;
    stroke-width: 1;
    transition: fill 140ms ease, stroke-width 140ms ease;
}

.cn-four-fours-clock__number,
.cn-four-fours-clock__formula {
    fill: #2a1a0d;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
}

.cn-four-fours-clock__number {
    font-size: 16px;
}

.cn-four-fours-clock__formula {
    font-size: 14px;
}

.cn-four-fours-clock__item {
    cursor: pointer;
    outline: none;
}

.cn-four-fours-clock__item:hover .cn-four-fours-clock__box,
.cn-four-fours-clock__item:focus-visible .cn-four-fours-clock__box {
    fill: #ffe9a8;
}

.cn-four-fours-clock__item.is-selected .cn-four-fours-clock__box {
    fill: #ffd54d;
    stroke-width: 3;
}

.cn-four-fours-clock__hand {
    stroke: #24170c;
    stroke-linecap: round;
    pointer-events: none;
}

.cn-four-fours-clock__hand--hour {
    stroke-width: 12;
}

.cn-four-fours-clock__hand--minute {
    stroke-width: 8;
}

.cn-four-fours-clock__hand--second {
    stroke: #8b1e16;
    stroke-width: 3;
}

.cn-four-fours-clock__center {
    stroke: #c89b5a;
    stroke-width: 5;
    pointer-events: none;
}

.cn-four-fours-clock__info {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    min-width: min(18rem, calc(100% - 2rem));
    padding: 0.75rem 1rem;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 0.65rem;
    color: #fff;
    background: rgb(0 0 0 / 78%);
    box-shadow: 0 1rem 2rem rgb(0 0 0 / 28%);
    font-size: 0.95rem;
    text-align: center;
    transform: translate(-50%, -50%);
}

.cn-four-fours-clock__info[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    .cn-four-fours-clock {
        min-height: 32rem;
    }

    .cn-four-fours-clock__controls {
        right: 0.75rem;
        justify-content: center;
    }

    .cn-four-fours-clock__canvas {
        padding-top: 5.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cn-four-fours-clock__box {
        transition: none;
    }
}
