.consent-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.consent-banner,
.consent-dialog {
    color: #f7f7f5;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.consent-banner {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: min(940px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.15rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    pointer-events: auto;
}

.consent-copy strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.consent-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    line-height: 1.5;
}

.consent-copy a {
    color: #fff;
    text-underline-offset: 0.22em;
}

.consent-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 0.55rem;
}

.consent-button {
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid #fff;
    border-radius: 0;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 720;
    cursor: pointer;
}

.consent-button:hover {
    background: transparent;
    color: #fff;
}

.consent-button--settings {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 0.45rem;
    border-color: transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 550;
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

.consent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    pointer-events: auto;
}

.consent-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(580px, calc(100% - 2rem));
    max-height: min(720px, calc(100vh - 2rem));
    padding: clamp(1.25rem, 4vw, 2rem);
    overflow: auto;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.consent-dialog-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.consent-dialog h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    letter-spacing: -0.035em;
}

.consent-close {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.consent-intro {
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    line-height: 1.55;
}

.consent-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.consent-category strong,
.consent-category span {
    display: block;
}

.consent-category span {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    line-height: 1.45;
}

.consent-toggle {
    width: 46px;
    height: 26px;
    margin: 0;
    accent-color: #fff;
    cursor: pointer;
}

.consent-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.consent-dialog-actions .consent-button:first-child {
    grid-column: 1 / -1;
}

.consent-layer[hidden] {
    display: none;
}

@media (max-width: 720px) {
    .consent-banner {
        grid-template-columns: 1fr;
    }

    .consent-actions {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .consent-actions,
    .consent-dialog-actions {
        grid-template-columns: 1fr;
    }

    .consent-button--settings,
    .consent-dialog-actions .consent-button:first-child {
        grid-column: auto;
    }
}
