.cookie-consent {
  position: fixed;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 20;
  right: 5.2vw;
  bottom: 100px;
  width: 330px;
  max-width: calc(100vw - 32px);
  padding: 15px;
  border: 1px solid #69452d26;
  border-radius: 18px;
  background: #f7e9de;
  color: var(--ink);
  box-shadow: 0 10px 30px -18px #5b351f40;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-consent-copy p {
  margin: 0;
  text-wrap: pretty;
}

.cookie-details {
  display: inline-block;
  margin-top: 3px;
  color: #71675b;
  text-decoration: underline;
  text-decoration-color: #71675b66;
  text-underline-offset: 3px;
}

.cookie-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.cookie-consent-actions button {
  font-family: inherit;
  cursor: pointer;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #69452d35;
  border-radius: 10px;
  background: #fff7f059;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}

.cookie-consent-actions button:hover {
  background: #fff7f0;
  border-color: #69452d66;
}

.cookie-consent :is(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cookie-details:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.cookie-preferences {
  border: 0;
  cursor: pointer;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.cookie-preferences:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 800px), (max-width: 1100px) and (orientation: portrait) {
  .cookie-consent {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: min(360px, calc(100vw - 32px));
    padding: 12px;
    border-radius: 15px;
  }

  .cookie-consent-actions {
    margin-top: 8px;
  }

  body:has(.cookie-consent:not([hidden])) .desktop-orbit {
    bottom: calc(max(10%, 86px) + var(--cookie-consent-height, 134px) + 18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 800px) {
  body:has(.cookie-consent:not([hidden])) .settings-orbit {
    bottom: calc(11% + var(--cookie-consent-height, 134px) + 18px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent-actions button {
    transition: none;
  }
}

.cookie-consent[hidden] { display: none !important; }
.cookie-preferences:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
