.cookie-consent {
  position: fixed;
  left: auto;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 650;
  display: block;
  width: min(calc(100vw - 36px), 460px);
  padding: 16px;
  color: #1A1A18;
  background: linear-gradient(135deg, rgba(250, 250, 246, .5), rgba(250, 250, 246, .3));
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    inset 0 -1px 0 rgba(255, 255, 255, .28),
    0 20px 62px rgba(26, 26, 24, .14);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 28px));
  transition: opacity .35s ease, transform .45s cubic-bezier(.62, .05, .01, .99);
}

.cookie-consent.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-consent__label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  line-height: 1.35;
  text-transform: uppercase;
  color: rgba(26, 26, 24, .48);
}

.cookie-consent__label::before {
  content: "";
  width: .46em;
  height: .46em;
  border-radius: 50%;
  background: #4FD68C;
  flex: 0 0 auto;
}

.cookie-consent__text {
  margin: 0;
  color: rgba(26, 26, 24, .68);
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}

.cookie-consent__links {
  margin: 12px 0 0;
  color: rgba(26, 26, 24, .5);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.cookie-consent__links a {
  color: #1E9C5B;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .32em;
}

.cookie-consent__actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}

.cookie-consent__button {
  min-width: 94px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(26, 26, 24, .2);
  border-radius: 999px;
  color: #1A1A18;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
  border-color: #1E9C5B;
  background: rgba(255, 255, 255, .3);
  outline: none;
}

.cookie-consent__button--accept {
  border-color: #4FD68C;
  background: rgba(79, 214, 140, .72);
}

.cookie-consent__button--accept:hover,
.cookie-consent__button--accept:focus-visible {
  border-color: #1E9C5B;
  background: rgba(69, 199, 126, .86);
}

.cookie-settings-link {
  appearance: none;
  display: inline;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.cookie-settings-link:hover,
.cookie-settings-link:focus-visible {
  color: #1E9C5B;
  outline: none;
}

/* Bottom-sheet layout: small viewports, plus any touch device up to 1100px
   (covers phones with Safari page zoom < 100% and in-app webviews, where the
   layout viewport can report 2x the device width). */
@media (max-width: 720px), (pointer: coarse) and (max-width: 1100px) {
  .cookie-consent {
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: auto;
    padding: 15px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cookie-consent__button {
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 0 14px;
  }
}

/* Browsers without backdrop-filter (older in-app webviews) would otherwise
   render a near-transparent banner with page text bleeding through. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cookie-consent {
    background: rgba(250, 250, 246, .96);
  }
}

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