/* Seasonal overlay is intentionally isolated from application layout. */
#medaran-winter-backdrop,
#medaran-winter-canvas {
    position: fixed;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100dvh;
    z-index: 1100;
    pointer-events: none;
    user-select: none;
    contain: strict;
}

/* This canvas lives behind cards, but above the page background.
   The front canvas carries accumulating drifts and falling chunks. */
#medaran-winter-backdrop {
    z-index: 1;
}

#medaran-winter-backdrop[hidden],
#medaran-winter-canvas[hidden] {
    display: none !important;
}

.medaran-winter-toggle {
    appearance: none;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 8px;
    background: rgba(255, 255, 255, .13);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease, transform .2s ease;
}

.medaran-winter-toggle:hover {
    background: rgba(255, 255, 255, .25);
    transform: translateY(-1px);
}

.medaran-winter-toggle.is-off {
    opacity: .48;
}

.medaran-winter-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body.dark .medaran-winter-toggle {
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .25);
}

@media (max-width: 420px) {
    .medaran-winter-toggle {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }
}
