.app-cookie-consent {
    position: fixed;
    z-index: 1200;
    right: 20px;
    bottom: 84px;
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: min(880px, calc(100vw - 40px));
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 20px 22px;
    border: 1px solid var(--border-color, #dedede);
    border-radius: 16px;
    background: var(--surface, #fff);
    color: var(--text-main, #222);
    box-shadow: 0 18px 60px rgba(20, 33, 61, .24);
}

.app-cookie-consent[hidden] {
    display: none !important;
}

.app-cookie-copy strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main, #222);
    font-size: 1rem;
}

.app-cookie-copy p {
    margin: 0;
    color: var(--text-muted, #666);
    font-size: .82rem;
    line-height: 1.5;
}

.app-cookie-copy a {
    color: var(--primary, #c5964e);
    font-weight: 700;
}

.app-cookie-error {
    margin-top: 8px !important;
    color: #c62828 !important;
    font-weight: 600;
}

.app-cookie-details summary {
    color: var(--text-main, #222);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.app-cookie-categories {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.app-cookie-categories label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--text-muted, #666);
    font-size: .75rem;
    line-height: 1.4;
}

.app-cookie-categories input {
    flex: 0 0 auto;
    margin: 2px 0 0;
    accent-color: var(--primary, #c5964e);
}

.app-cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 145px;
}

.app-cookie-consent button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--primary, #c5964e);
    border-radius: 8px;
    background: var(--primary, #c5964e);
    color: #111;
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
}

.app-cookie-consent .app-cookie-necessary,
.app-cookie-consent .app-cookie-save {
    border-color: var(--border-color, #dedede);
    background: var(--surface, #fff);
    color: var(--text-main, #222);
}

.app-cookie-preferences {
    position: fixed;
    z-index: 1201;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border-color, #dedede);
    border-radius: 50%;
    background: var(--surface, #fff);
    color: var(--text-main, #222);
    box-shadow: 0 8px 24px rgba(20, 33, 61, .2);
    font-size: 23px;
    cursor: pointer;
}

.app-cookie-preferences:hover {
    transform: translateY(-2px);
}

.app-cookie-preferences:focus-visible,
.app-cookie-consent button:focus-visible {
    outline: 3px solid var(--primary, #c5964e);
    outline-offset: 3px;
}

.app-cookie-policy {
    width: min(760px, calc(100% - 32px));
    margin: 48px auto;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--border-color, #dedede);
    border-radius: 18px;
    background: var(--surface, #fff);
    color: var(--text-main, #222);
    box-shadow: 0 18px 60px rgba(20, 33, 61, .12);
    line-height: 1.65;
}

.app-cookie-policy h1,
.app-cookie-policy h2 {
    color: var(--text-main, #222);
}

.app-cookie-policy a {
    color: var(--primary, #c5964e);
    font-weight: 700;
}

@media (max-width: 760px) {
    .app-cookie-consent {
        right: 10px;
        bottom: 70px;
        grid-template-columns: 1fr;
        gap: 13px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 90px);
        padding: 17px;
    }

    .app-cookie-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .app-cookie-actions .app-cookie-necessary {
        grid-column: 1 / -1;
    }

    .app-cookie-preferences {
        right: 12px;
        bottom: 12px;
        width: 46px;
        height: 46px;
    }
}
