/* Shared gallery consent panel: independent of the parallax typography/reset. */
#cookie-banner,
#cookie-banner * {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

#cookie-banner {
  position: fixed;
  z-index: 99999;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  width: calc(100% - 32px);
  max-width: 960px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 20px 24px;
  margin: 0;
  border: 1px solid #dce3d7;
  border-radius: 18px;
  background: #fdfcf8;
  box-shadow: 0 12px 48px #132a2533;
  color: #35483e;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  animation: gallery-cookie-enter .28s ease-out both;
}

#cookie-banner p {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#cookie-banner a {
  color: #2f563e;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#cookie-banner a:hover {
  color: #182e22;
}

#cookie-banner .cookie-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

#cookie-banner button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  margin: 0;
  border: 1px solid #aebcaa;
  border-radius: 10px;
  background: transparent;
  color: #2e4938;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, transform .18s;
}

#cookie-banner .btn-accept {
  border-color: #304f3c;
  background: #304f3c;
  color: #fff;
}

#cookie-banner .btn-accept:hover {
  border-color: #203b2b;
  background: #203b2b;
}

#cookie-banner .btn-reject:hover {
  border-color: #6f866a;
  background: #edf1e7;
}

#cookie-banner :is(a, button):focus-visible {
  outline: 3px solid #78956c;
  outline-offset: 3px;
}

#cookie-banner button:active {
  transform: translateY(1px);
}

#cookie-banner button:disabled {
  cursor: wait;
  opacity: .65;
}

#cookie-banner .cookie-consent-error {
  flex: 1 0 100%;
  color: #8a3f24;
  font-size: 13px;
}

@keyframes gallery-cookie-enter {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 700px) {
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: calc(100% - 24px);
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 18px;
    border-radius: 15px;
  }

  #cookie-banner .cookie-buttons {
    width: 100%;
  }

  #cookie-banner button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cookie-banner { animation: none; }
  #cookie-banner button { transition: none; }
}
