#cookie-banner {
  position: fixed; z-index: 80; left: 18px; right: 18px; bottom: 18px;
  max-width: 420px; padding: 18px 20px 16px;
  border: 1px solid var(--line, #ded5c8); border-radius: 18px;
  background: rgba(251, 249, 245, .97);
  box-shadow: 0 18px 40px rgba(60, 43, 28, .14);
  color: var(--ink, #292823);
  font-family: var(--body, 'DM Sans', system-ui, sans-serif);
}
#cookie-banner .cb-kicker {
  margin: 0 0 4px; color: var(--terra, #9b4f3f);
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
}
#cookie-banner .cb-title {
  margin: 0 0 8px; font-family: var(--display, Georgia, serif);
  font-size: 22px; font-weight: 600; line-height: 1.15;
}
#cookie-banner p { margin: 0 0 14px; color: var(--ink-muted, #736e64); font-size: 13px; line-height: 1.5; }
#cookie-banner a { color: var(--terra, #9b4f3f); text-decoration: underline; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-actions button {
  min-height: 36px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line, #ded5c8); background: #fff; color: var(--ink, #292823);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.cb-actions .cb-accept { border-color: transparent; background: var(--terra, #9b4f3f); color: var(--paper-soft); }

#cookie-prefs-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(41, 40, 35, .35);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
#cookie-prefs-overlay.is-open { opacity: 1; pointer-events: auto; }
#cookie-prefs {
  position: fixed; z-index: 91; left: 50%; top: 50%;
  width: min(460px, calc(100% - 32px));
  transform: translate(-50%, -48%);
  border: 1px solid var(--line, #ded5c8); border-radius: 20px;
  background: #fbf9f5; box-shadow: 0 24px 50px rgba(60, 43, 28, .18);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
#cookie-prefs.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.cp-head, .cp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.cp-head { border-bottom: 1px solid var(--line, #ded5c8); }
.cp-foot { border-top: 1px solid var(--line, #ded5c8); }
.cp-kicker { margin: 0; color: var(--terra, #9b4f3f); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.cp-title { margin: 2px 0 0; font-family: var(--display, Georgia, serif); font-size: 22px; }
.cp-close { width: 32px; height: 32px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.cp-body { padding: 16px 18px; }
.cp-lead { margin: 0 0 14px; color: var(--ink-muted, #736e64); font-size: 13px; }
.cp-row { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line, #ded5c8); }
.cp-row h4 { margin: 0 0 3px; font-size: 14px; }
.cp-row p { margin: 0; color: var(--ink-muted, #736e64); font-size: 12px; }
.cp-always { color: var(--sage, #78837a); font-size: 11px; font-weight: 600; }
.cp-toggle { position: relative; width: 42px; height: 24px; flex: 0 0 42px; }
.cp-toggle input { opacity: 0; width: 0; height: 0; }
.cp-toggle span {
  position: absolute; inset: 0; border-radius: 999px; background: #ddd6cb; cursor: pointer;
}
.cp-toggle span::after {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; transition: transform .2s ease;
}
.cp-toggle input:checked + span { background: var(--terra, #9b4f3f); }
.cp-toggle input:checked + span::after { transform: translateX(18px); }
.cp-foot button {
  min-height: 36px; padding: 8px 12px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.cp-essential { border: 1px solid var(--line, #ded5c8); background: #fff; }
.cp-save { border: 0; background: var(--terra, #9b4f3f); color: var(--paper-soft); }
@media (max-width: 640px) {
  #cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}
