:root {
    --os-consent-bg: #202026;
    --os-consent-raised: #292930;
    --os-consent-text: #f3f4f6;
    --os-consent-muted: #b8b8c0;
    --os-consent-cyan: #37dfe8;
    --os-consent-pink: #ff5b8f;
    --os-consent-yellow: #ffd400;
    --os-consent-ink: #121216;
    --os-consent-border: rgba(255,255,255,.13);
    --os-consent-radius: 6px;
}

.os-consent-root {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    pointer-events: none;
}

.os-consent-root[data-mode="banner"] {
    background: transparent;
}
.os-consent-root[data-mode="banner"] .os-consent-overlay {
    display: none;
}

.os-consent-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7,7,10,.55);
    pointer-events: auto;
}

.os-consent-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: min(86vh, 720px);
    overflow: auto;
    padding: 28px 24px 24px;
    color: var(--os-consent-text);
    background: var(--os-consent-bg);
    border: 1px solid var(--os-consent-border);
    border-radius: var(--os-consent-radius);
    box-shadow: 0 24px 48px rgba(0,0,0,.42);
    pointer-events: auto;
    font-family: 'DM Sans', system-ui, sans-serif;
}

.os-consent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--os-consent-muted);
    background: transparent;
    border: 0;
    border-radius: var(--os-consent-radius);
    font-size: 1.35rem;
    cursor: pointer;
}

.os-consent-close:hover,
.os-consent-close:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.06);
    outline: none;
}

.os-consent-kicker {
    margin: 0 0 8px;
    color: var(--os-consent-cyan);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.os-consent-panel h2 {
    margin: 0 0 12px;
    padding-right: 36px;
    font-family: 'Syne', system-ui, sans-serif;
    font-size: clamp(1.55rem, 4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
}

.os-consent-panel p {
    margin: 0 0 18px;
    color: var(--os-consent-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.os-consent-panel a {
    color: var(--os-consent-cyan);
    text-underline-offset: 3px;
}

.os-consent-actions {
    display: grid;
    gap: 10px;
}

.os-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--os-consent-radius);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: filter .2s ease, background-color .2s ease, color .2s ease;
}

.os-consent-btn:hover,
.os-consent-btn:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.os-consent-btn--accept {
    color: var(--os-consent-ink);
    background: #35c76f;
}

.os-consent-btn--reject {
    color: var(--os-consent-muted);
    background: transparent;
    border: 1px solid var(--os-consent-border);
}

.os-consent-btn--manage,
.os-consent-btn--save {
    color: var(--os-consent-ink);
    background: var(--os-consent-cyan);
}

.os-consent-btn--ghost {
    color: var(--os-consent-muted);
    background: var(--os-consent-raised);
    border: 1px solid var(--os-consent-border);
}

.os-consent-view[hidden] { display: none !important; }

.os-consent-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.os-consent-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    align-items: center;
    padding: 14px 16px;
    background: var(--os-consent-raised);
    border: 1px solid var(--os-consent-border);
    border-radius: var(--os-consent-radius);
}

.os-consent-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: .82rem;
}

.os-consent-item p {
    margin: 0;
    font-size: .78rem;
    line-height: 1.45;
}

.os-consent-lock {
    color: var(--os-consent-yellow);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.os-consent-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.os-consent-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.os-consent-switch span {
    display: block;
    width: 48px;
    height: 28px;
    background: #3a3a44;
    border-radius: 999px;
    transition: background .2s ease;
}

.os-consent-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.os-consent-switch input:checked + span { background: var(--os-consent-cyan); }
.os-consent-switch input:checked + span::after { transform: translateX(20px); }
.os-consent-switch input:focus-visible + span { outline: 2px solid var(--os-consent-cyan); outline-offset: 3px; }

@media (max-width: 620px) {
    .os-consent-root {
        align-items: flex-end;
        justify-content: stretch;
        padding: 12px;
    }
    .os-consent-panel {
        width: 100%;
        padding: 24px 18px 18px;
    }
}
