.cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 1000;
  width: 100%;
  max-height: 100dvh;
  overflow-y: auto;
  border-top: 3px solid var(--accent);
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  color: var(--ink);
  box-shadow: 0 -12px 36px rgba(58,42,28,.18);
  overscroll-behavior: contain;
}
.cookie-banner[hidden], .cookie-modal-layer[hidden] { display: none; }
.cookie-banner__inner { width: 100%; max-width: 1600px; margin-inline: auto; padding: 24px 28px; }
.cookie-banner__copy { width: 100%; max-width: none; min-width: 0; }
.cookie-banner h2, .cookie-modal h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.cookie-banner__copy p { width: 100%; max-width: none; margin: 8px 0 0; font-size: 18px; line-height: 1.55; }
.cookie-banner a { color: var(--accent-text); font-weight: 700; text-underline-offset: 3px; }
.cookie-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; width: 100%; margin-top: 20px; }
.cookie-actions button { min-height: 48px; width: 100%; padding: 12px 16px; border: 2px solid var(--accent); border-radius: var(--rad); background: var(--accent); color: var(--accent-ink); font: 700 16px/1.25 "Geologica",sans-serif; cursor: pointer; }
.cookie-actions button:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.cookie-actions button:focus-visible, .cookie-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cookie-modal-layer { position: fixed; inset: 0; z-index: 1010; background: rgba(28,19,12,.72); }
.cookie-modal { position: fixed; top: 50%; left: 50%; display: grid; grid-template-rows: minmax(0,1fr) auto; width: min(calc(100% - 32px),760px); max-height: calc(100dvh - 32px); margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); transform: translate(-50%, -50%); box-shadow: 0 24px 64px rgba(28,19,12,.35); }
.cookie-modal__scroll { min-height: 0; padding: clamp(20px,4vw,32px); overflow-y: auto; }
.cookie-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cookie-modal__header p { margin: 8px 0 0; color: var(--muted); }
.cookie-close { display: inline-flex; flex: 0 0 48px; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 28px; cursor: pointer; }
.cookie-options { display: grid; gap: 12px; margin-top: 24px; }
.cookie-option { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--rad); }
.cookie-option > div { flex: 1; min-width: 0; }
.cookie-option h3 { margin: 0; font-size: 16px; }
.cookie-option p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
label.cookie-option { cursor: pointer; }
.cookie-toggle { position: relative; flex: 0 0 52px; width: 52px; height: 32px; margin: 0; appearance: none; border: 0; outline: 0; border-radius: 999px; background: #766a5e; cursor: pointer; transition: background-color .17s; }
.cookie-toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28,19,12,.3); transition: transform .17s; }
.cookie-toggle:checked { background: var(--accent); }
.cookie-toggle:checked::after { transform: translateX(20px); }
.cookie-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cookie-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
@supports selector(.cookie-option:has(input:focus-visible)) {
  .cookie-option:has(input:focus-visible) .cookie-toggle { outline: 0; }
}
.cookie-toggle:disabled { cursor: not-allowed; opacity: .72; }
.cookie-modal__actions { position: sticky; bottom: 0; margin: 0; padding: 16px clamp(20px,4vw,32px); border-top: 1px solid var(--line); background: var(--panel); }
[data-cookie-settings] { min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--accent-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
body.cookie-modal-open { overflow: hidden; }
@media (hover: hover) {
  label.cookie-option:hover { border-color: var(--accent); }
}
@media (max-width:760px) {
  .cookie-banner__inner { padding: 16px; }
  .cookie-actions { grid-template-columns: 1fr; }
  .cookie-modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .cookie-modal__actions { position: static; }
}
