/* RESET & FONTS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  background: linear-gradient(180deg, #5f8f7b 0%, #9fc3b2 50%, #f6f1ea 100%);
  background-attachment: fixed;
  color: #2a3b36;
  min-height: 100vh;
}

/* HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  position: relative;
  min-height: 64px;
}

.app-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

.back {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

/* GRID PRINCIPAL */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 20px;
}

/* CARDS & FIX PARA SAFARI */
.card {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease;
  cursor: pointer;
  pointer-events: auto; /* El botón recibe el clic */
}

.card * {
  pointer-events: none; /* Los hijos (svg, span) no roban el clic en Safari */
}

.card:active {
  transform: scale(0.95);
  background: rgba(0, 0, 0, 0.5);
}

.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-icon {
  width: 28px;
  height: 28px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

.card.emergency .svg-icon { stroke: #ff4d4d; }

/* CONTENIDO HÍBRIDO (TARJETA BLANCA) */
.content {
  margin: 16px;
  padding: 24px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rules-list li, .content ul li {
  list-style: none;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.rules-list li strong {
  display: block;
  font-size: 1rem;
  color: #2a3b36;
  margin-bottom: 4px;
}

/* MAP MODAL (ACTION SHEET) */
.map-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 9999;
}

.map-modal.hidden { display: none; }

.map-sheet {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px;
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.map-sheet a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-bottom: 12px;
  background: #f2f5f4;
  border-radius: 14px;
  text-decoration: none;
  color: #2a3b36;
  font-weight: 600;
}

#btnCancelar {
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 16px;
  font-weight: 600;
}
/* Texto de los botones (todos iguales, todos los navegadores) */
.card span {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
}

/* Reset especfico para <button.card> */
button.card {
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-family: inherit;
  padding: 20px;
}
