/* Декоративные слои не перехватывают тапы */
#donate > div.absolute,
section.relative > div.absolute.inset-0 {
  pointer-events: none !important;
}

/* Галерея: расширение только на устройствах с мышью */
@media (hover: hover) and (pointer: fine) {
  .mustang-gallery img:hover {
    width: 50% !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .mustang-gallery img {
    width: 33.333% !important;
  }
}

/* Кнопки и ссылки — быстрый отклик на тач */
a,
button,
[role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Мобильное меню */
#mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgb(140 98 57 / 0.3);
  border-radius: 12px;
  background: white;
  color: #2c4a3b;
  cursor: pointer;
}

@media (min-width: 768px) {
  #mobile-nav-toggle,
  #mobile-nav-drawer {
    display: none !important;
  }
}

#mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  visibility: hidden;
}

#mobile-nav-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

#mobile-nav-drawer .backdrop {
  position: absolute;
  inset: 0;
  background: rgb(26 47 37 / 0.45);
}

#mobile-nav-drawer .panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #fdfbf7;
  padding: 5rem 1.25rem 1.5rem;
  box-shadow: -8px 0 32px rgb(0 0 0 / 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

#mobile-nav-drawer.open .panel {
  transform: translateX(0);
}

#mobile-nav-drawer a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: #5e4024;
  font-weight: 600;
  text-decoration: none;
}

#mobile-nav-drawer a:active,
#mobile-nav-drawer a:hover {
  background: #f4efe6;
  color: #d97736;
}

#donate-custom-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(26 47 37 / 0.55);
}

#donate-custom-overlay[hidden] {
  display: none !important;
}

#donate-custom-overlay .card {
  width: min(400px, 100%);
  background: #fdfbf7;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.2);
}

#donate-custom-overlay .card .actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

#donate-custom-overlay .card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c4a3b;
  margin: 0 0 0.5rem;
  text-align: center;
}

#donate-custom-overlay #donate-overlay-cancel,
#donate-custom-overlay #donate-overlay-ok {
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}

#donate-custom-overlay #donate-overlay-cancel {
  background: white;
  border: 2px solid rgb(140 98 57 / 0.3);
  color: #8c6239;
}

#donate-custom-overlay #donate-overlay-ok {
  background: #d97736;
  color: white;
}

#donate-custom-overlay input {
  width: 100%;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  border: 2px solid rgb(140 98 57 / 0.3);
  border-radius: 12px;
  padding: 0.75rem;
  margin: 1rem 0;
  color: #2c4a3b;
}

#donate-currency-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

#donate-currency-bar button {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid rgb(140 98 57 / 0.3);
  background: white;
  color: #8c6239;
  cursor: pointer;
}

#donate-currency-bar button.active {
  background: #2c4a3b;
  border-color: #2c4a3b;
  color: #fdfbf7;
}
