.cookie-preferences [hidden] { display: none !important; }
.cookie-notice, .cookie-dialog, .cookie-feedback {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow-raised);
  overflow-wrap: anywhere;
}
.cookie-notice {
  position: fixed;
  z-index: 150;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  width: min(35rem, calc(100% - 2.5rem));
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  padding: 1.5rem;
}
.cookie-notice__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cookie-notice__heading h2 { font-size: 1.35rem; line-height: 1.35; letter-spacing: -.025em; padding-top: .5rem; }
.cookie-close { flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: transparent; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cookie-close:hover { background: var(--surface-violet); }
.cookie-notice p, .cookie-dialog p { color: var(--text-soft); font-size: .95rem; line-height: 1.7; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.cookie-actions .button { flex: 1 1 12rem; min-width: 0; min-height: 2.75rem; white-space: normal; text-align: center; font-size: .9rem; }
.cookie-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; font-size: .85rem; color: var(--text-soft); }
.cookie-links a { padding-block: .25rem; text-underline-offset: .2em; }
.cookie-dialog { width: min(38rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 1.75rem; overscroll-behavior: contain; }
.cookie-dialog::backdrop { background: rgba(2, 1, 6, .8); }
html:has(.cookie-dialog[open]) { overflow: hidden; }
.cookie-categories { display: grid; gap: 1rem; margin-block: 1.5rem; }
.cookie-categories li { padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.cookie-category__heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.cookie-category__heading h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -.01em; }
.cookie-category__heading span { color: var(--cyan-soft); font-size: .8rem; }
.cookie-dialog .cookie-storage-status { font-size: .85rem; }
.cookie-dialog .cookie-hosting { margin-top: 1.25rem; font-size: .85rem; color: var(--muted); }
.cookie-feedback { position: fixed; z-index: 151; right: 1.25rem; bottom: max(1.25rem, env(safe-area-inset-bottom)); width: min(35rem, calc(100% - 2.5rem)); padding: 1rem 1.25rem; font-size: .9rem; line-height: 1.6; pointer-events: none; }
.cookie-inventory { display: grid; grid-template-columns: minmax(8rem, .4fr) 1fr; gap: .75rem 1.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); line-height: 1.8; }
.cookie-inventory dt { font-weight: 600; }
.cookie-inventory dd { margin: 0; color: var(--text-soft); }
.cookie-inventory code { font-size: .9em; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .cookie-notice { right: max(.75rem, env(safe-area-inset-right)); bottom: max(.75rem, env(safe-area-inset-bottom)); width: calc(100% - 1.5rem); padding: 1rem; }
  .cookie-dialog { padding: 1.25rem; }
  .cookie-actions { flex-direction: column; }
  .cookie-actions .button { flex-basis: auto; }
  .cookie-inventory { grid-template-columns: 1fr; gap: .25rem; padding: 1rem; }
  .cookie-inventory dd + dt { margin-top: .75rem; }
}
@media print {
  .cookie-preferences, [data-cookie-settings-open] { display: none !important; }
  .cookie-inventory dd { color: #111; }
}
