.fc-root {
    all: initial;
}

.fc-layer {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.fc-layer *, .fc-toggle * {
    box-sizing: border-box;
    pointer-events: none;
}

.fc-mark, .fc-sleep {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--fc-color);
    opacity: var(--fc-opacity);
    animation: fc-fade var(--fc-lifetime) linear forwards;
}

.fc-mark svg, .fc-toggle svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.fc-sleep {
    transform: translate(-50%, -50%);
    font: bold 18px/1 Georgia, serif;
    letter-spacing: 0;
}

.fc-toggle {
    all: initial;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 76px;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid #767676;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 6px #00000018;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
}

.fc-toggle svg {
    width: 22px;
    height: 22px;
}

.fc-toggle__track {
    display: block;
    position: relative;
    width: 28px;
    height: 16px;
    border: 1px solid #767676;
    border-radius: 10px;
    background: #eee;
}

.fc-toggle__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
}

.fc-toggle[aria-checked="true"] .fc-toggle__track {
    background: #167348;
    border-color: #167348;
}

.fc-toggle[aria-checked="true"] .fc-toggle__track::after {
    left: 14px;
    background: #fff;
}

.fc-toggle:focus-visible {
    outline: 3px solid #167348;
    outline-offset: 3px;
}

.fc-toggle:disabled {
    opacity: 0.6;
    cursor: default;
}

@keyframes fc-fade {
    from { opacity: var(--fc-opacity); }
    to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .fc-layer { display: none; }
}