/* Cookie notice and native preferences dialog, in the same palette as the site. */
.amath-consent {
    --consent-ink: #243c34;
    --consent-muted: #46574d;
    --consent-bg: #f8f3e9;
    --consent-panel: #f0e8d9;
    --consent-accent: #bf5947;
    --consent-border: #819084;
    color: var(--consent-ink);
    font: 14px/1.5 var(--body, Arial, sans-serif);
    text-align: left;
}
.amath-consent *, .amath-consent *::before, .amath-consent *::after { box-sizing: border-box; }
.amath-consent [hidden] { display: none !important; }
.amath-consent__banner {
    position: fixed;
    z-index: 10050;
    left: max(14px, env(safe-area-inset-left));
    right: max(17px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    margin-inline: auto;
    width: auto;
    max-width: 1080px;
    max-height: calc(100vh - 30px);
    max-height: calc(100dvh - max(30px, env(safe-area-inset-bottom) + 16px));
    overflow: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(14px, 2.1vw, 26px);
    border: 1px solid var(--consent-ink);
    border-radius: 2px;
    background: var(--consent-bg);
    box-shadow: 3px 3px 0 var(--consent-accent), 0 4px 20px rgb(29 48 40 / 13%);
    animation: amath-consent-enter .22s ease-out both;
}
.amath-consent .amath-consent__title {
    margin: 0 0 4px;
    color: var(--consent-ink);
    font: 600 clamp(20px, 2vw, 24px)/1.08 Georgia, serif;
    letter-spacing: -.035em;
    text-transform: none;
}
.amath-consent .amath-consent__description { max-width: 62ch; margin: 0; color: var(--consent-muted); font: 400 14px/1.4 var(--body, Arial, sans-serif); }
.amath-consent .amath-consent__hint { margin: 10px 0 0; color: var(--consent-muted); font-size: 12px; }
.amath-consent__side { min-width: 0; }
.amath-consent__actions { display: flex; gap: 8px; }
.amath-consent .amath-consent__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 0;
    padding: 6px 13px;
    border: 1px solid var(--consent-ink);
    border-radius: 2px;
    background: var(--consent-ink);
    color: #fffaf1;
    font: 600 13px/1.2 var(--body, Arial, sans-serif);
    text-align: center;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
}
.amath-consent__actions [data-consent-action="reject"],
.amath-consent__actions [data-consent-action="accept"] { flex: 1 1 0; }
.amath-consent .amath-consent__button--outline { background: transparent; color: var(--consent-ink); }
@media (hover: hover) {
    .amath-consent .amath-consent__button:hover { background: #395346; color: #fffaf1; }
    .amath-consent .amath-consent__button--outline:hover { background: #ebe1d0; color: var(--consent-ink); }
}
.amath-consent__legal { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 0 16px; margin: 4px 0 0; }
.amath-consent .amath-consent__legal a { display: inline-flex; align-items: center; min-height: 24px; color: var(--consent-muted); font: 400 12px/1.3 var(--body, Arial, sans-serif); text-decoration: underline; text-underline-offset: 3px; }
.amath-consent .amath-consent__legal a:hover { color: var(--consent-ink); }
.amath-consent__banner .amath-consent__legal { justify-content: flex-end; margin: 0; }
.amath-consent__reopen {
    appearance: none;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 12px 4px;
    min-height: 44px;
    cursor: pointer;
}
.amath-consent :focus-visible, .amath-consent__reopen:focus-visible { outline: 3px solid #9e493b; outline-offset: 4px; }
.amath-consent__dialog {
    position: fixed;
    inset: 0;
    width: min(640px, calc(100% - 32px));
    max-width: 640px;
    max-height: calc(100dvh - 32px);
    padding: 0;
    margin: auto;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--consent-border);
    border-radius: 3px;
    background: var(--consent-bg);
    color: var(--consent-ink);
    box-shadow: 4px 4px 0 #bd5846, 0 16px 60px rgb(29 48 40 / 25%);
}
.amath-consent__dialog::backdrop { background: rgb(22 43 35 / 56%); backdrop-filter: blur(3px); }
.amath-consent__dialog:not([open]) { display: none; }
.amath-consent__panel { padding: 28px 30px; }
.amath-consent__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.amath-consent .amath-consent__close {
    appearance: none;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--consent-ink);
    border: 1px solid var(--consent-border);
    border-radius: 50%;
    font: 25px/1 Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.amath-consent .amath-consent__close:hover { background: #eddfca; }
.amath-consent__category { background: var(--consent-panel); border: 1px solid var(--consent-border); border-radius: 2px; padding: 17px; margin-top: 18px; }
.amath-consent__category-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.amath-consent__category h3, .amath-consent__category-label { font: 600 14px/1.5 Arial, Helvetica, sans-serif; letter-spacing: 0; margin: 0; color: var(--consent-ink); }
.amath-consent__category-label { cursor: pointer; }
.amath-consent__category p { margin: 10px 0 0; font-size: 12px; line-height: 1.65; color: var(--consent-muted); }
.amath-consent__category p.amath-consent__details { font-size: 11px; }
.amath-consent__pill { flex: 0 0 auto; font-size: 10px; color: var(--consent-ink); border: 1px solid #899487; padding: 3px 9px; border-radius: 30px; }
.amath-consent input.amath-consent__switch {
    appearance: auto;
    width: 22px;
    height: 22px;
    min-width: 22px;
    accent-color: var(--consent-ink);
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.amath-consent input.amath-consent__switch:disabled { opacity: .5; cursor: not-allowed; }
.amath-consent__settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.amath-consent .amath-consent__notice { padding: 12px; border-left: 2px solid var(--consent-accent); margin-top: 14px; font-size: 12px; color: var(--consent-muted); }
.amath-consent__sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; margin: -1px !important; padding: 0 !important; border: 0 !important; }

.amath-consent__top { margin-bottom: 10px; }
.amath-consent__top .amath-consent__title { margin: 0; }
.amath-consent__reopen:focus-visible { outline-color: #d4ad62; }
@keyframes amath-consent-enter { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 740px) {
    .amath-consent__banner { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 12px 14px 8px; }
    .amath-consent__side { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; }
    .amath-consent__banner .amath-consent__legal { justify-content: start; }
    .amath-consent__actions { flex: 1 1 auto; }
}
@media (max-width: 520px) {
    .amath-consent__banner { left: max(8px, env(safe-area-inset-left)); right: max(11px, env(safe-area-inset-right)); bottom: max(9px, env(safe-area-inset-bottom)); }
    .amath-consent__side { display: grid; gap: 2px; }
    .amath-consent__actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
    .amath-consent__actions .amath-consent__button { padding-inline: 5px; }
    .amath-consent__actions:has([data-consent-action="accept"]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .amath-consent__actions:has([data-consent-action="accept"]) .amath-consent__button { overflow-wrap: anywhere; }
    .amath-consent__panel { padding: 16px; }
    .amath-consent__category { padding: 12px; margin-top: 12px; }
    .amath-consent__settings-actions { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .amath-consent__banner { animation: none; }
    .amath-consent * { transition: none !important; }
}
html[data-motion="off"] .amath-consent__banner { animation: none; }
/* Zusätzlicher technischer Datenschutzhinweis; bestehende Inhalts-IDs bleiben gleich. */
#datenschutz-cookie-auswahl .container { max-width: 900px; }
#datenschutz-cookie-auswahl h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 22px; }
#datenschutz-cookie-auswahl p { max-width: 78ch; margin-bottom: 20px; }
