.cookie-notice {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 100;
    width: min(34rem, calc(100% - 1.5rem));
    max-height: calc(100% - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    margin: auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(1.05rem, 3.5vw, 2rem);
    border: 1px solid var(--theme-border);
    border-top: 4px solid #166534;
    border-radius: 1rem;
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 1.25rem 3.75rem #092c2340;
    transition: opacity 220ms ease, transform 220ms ease;
}
.cookie-notice::backdrop {
    background: rgb(9 44 35 / 53%);
    transition: opacity 220ms ease;
}
.cookie-notice.is-dismissing { opacity: 0; transform: translateY(.5rem); }
.cookie-notice.is-dismissing::backdrop { opacity: 0; }
.cookie-notice h2 {
    margin: 0 0 .6rem;
    font: 600 clamp(1.35rem, 4vw, 1.8rem)/1.2 "Playfair Display", Georgia, serif;
}
.cookie-notice h2:focus { outline: none; }
.cookie-notice-description { font-size: .925rem; line-height: 1.5; }
.cookie-notice-policy {
    margin-top: .9rem;
    padding-top: .75rem;
    border-top: 1px solid var(--theme-border);
    color: var(--theme-muted, #57534e);
    font-size: .8rem;
    line-height: 1.5;
}
.cookie-notice-policy a { font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
.cookie-choices {
    --cookie-action-text: #fff;
    --cookie-action-surface: #166534;
    --cookie-action-hover: #14532d;
    --cookie-accent: #166534;
    display: grid;
    gap: .55rem;
    margin-top: 1rem;
    color: var(--theme-text);
}
.cookie-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.cookie-action, .cookie-customize summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .5rem .65rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}
.cookie-action { background: var(--cookie-action-surface); color: var(--cookie-action-text); }
.cookie-action:hover:enabled { background: var(--cookie-action-hover); }
.cookie-action:disabled { cursor: wait; opacity: .7; }
.cookie-customize summary {
    gap: .5rem;
    list-style: none;
    cursor: pointer;
    border-color: var(--theme-border);
}
.cookie-customize summary::-webkit-details-marker { display: none; }
.cookie-customize summary::after {
    content: "";
    width: .45rem;
    height: .45rem;
    border: solid currentColor;
    border-width: 0 1px 1px 0;
    transform: translateY(-.1rem) rotate(45deg);
}
.cookie-customize[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
.cookie-customize summary:hover { background: var(--theme-raised, #f0fdf4); }
.cookie-preference-list { display: grid; margin: .55rem 0; border: 1px solid var(--theme-border); border-radius: .55rem; }
.cookie-preference { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .75rem; font-size: .875rem; line-height: 1.35; }
.cookie-preference + .cookie-preference { border-top: 1px solid var(--theme-border); }
.cookie-preference small { display: block; margin-top: .2rem; }
.cookie-preference small, .cookie-necessary-help, .cookie-result { color: var(--theme-muted, #57534e); font-size: .8rem; }
.cookie-required { color: var(--cookie-accent); font-size: .75rem; font-weight: 600; text-align: right; }
.cookie-preference:has(input) { cursor: pointer; }
.cookie-preference input { appearance: auto; flex: 0 0 auto; width: 1.2rem; height: 1.2rem; accent-color: var(--cookie-accent); }
.cookie-save { width: 100%; }
.cookie-choices :is(button, summary, input):focus-visible, .cookie-notice a:focus-visible { outline: 2px solid var(--hc-focus, #22c55e); outline-offset: 2px; }
html[data-theme="dark"] .cookie-choices {
    --cookie-action-text: #07251a;
    --cookie-action-surface: #86efac;
    --cookie-action-hover: #bbf7d0;
    --cookie-accent: #86efac;
}
html[data-theme="high-contrast"] .cookie-notice { background: #000; color: var(--hc-text); }
html[data-theme="high-contrast"] .cookie-customize summary { border: 2px solid var(--hc-action); }
@media (prefers-reduced-motion: reduce) {
    .cookie-notice, .cookie-notice::backdrop { transition: none; }
}
