.cookie-consent {
  /* Above page content and Telegram promo; below navigation and modals. */
  position: fixed;
  z-index: 90;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: 460px;
  max-width: calc(100% - 48px);
  max-height: calc(100vh - 48px - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 48px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-wrap: anywhere;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .16);
  background: #fff;
  color: #222;
  border-top: 2px solid #1976b9;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent__content { flex: 1 1 100%; min-width: 0; }
.cookie-consent h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.cookie-consent a { color: #14669f; text-decoration: underline; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cookie-consent button {
  background: #fff;
  color: #14669f;
  border: 1px solid #14669f;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}
.cookie-consent button:first-child { background: #14669f; color: #fff; }
.cookie-consent button[hidden] { display: none; }
.cookie-consent button:focus-visible, .cookie-consent a:focus-visible { outline: 2px solid #14669f; outline-offset: 3px; }
@media (max-width: 540px) {
  .cookie-consent {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .cookie-consent__actions { width: 100%; }
  .cookie-consent button { flex: 1 1 160px; min-width: 0; }
}
