:root {
  --fondo: #0d0b17;
  --panel: #171329;
  --borde: #2b2450;
  --texto: #ece8f6;
  --suave: #a39cc0;
  --rosa: #ff4fa3;
  --naranja: #ff9f45;
  --cian: #4cc9f0;
  --radio: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--cian); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 16px; }
h2 { margin-top: 32px; }

/* cabecera */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 12px 16px; border-bottom: 1px solid var(--borde);
  background: linear-gradient(90deg, rgba(255,79,163,.12), rgba(255,159,69,.08));
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(8px);
}
.logo {
  font-weight: 800; font-size: 1.2rem; text-decoration: none;
  background: linear-gradient(90deg, var(--rosa), var(--naranja));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; }
.top nav a { color: var(--suave); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--texto); }
.top .lang { color: var(--suave); font-size: .9rem; border: 1px solid var(--borde); padding: 2px 10px; border-radius: 99px; text-decoration: none; }

/* inicio */
.hero { padding: 32px 0 8px; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  background: linear-gradient(90deg, var(--rosa), var(--naranja));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--suave); font-size: 1.15rem; max-width: 60ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  display: block; padding: 20px; border-radius: var(--radio); text-decoration: none; color: var(--texto);
  background: var(--panel); border: 1px solid var(--borde); transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--rosa); transform: translateY(-2px); }
.card h2 { margin: 0 0 6px; font-size: 1.2rem; display: flex; justify-content: space-between; }
.card p { margin: 0; color: var(--suave); }
.num { color: var(--naranja); font-variant-numeric: tabular-nums; }

/* listas */
.lista { list-style: none; padding: 0; }
.lista li { padding: 10px 0; border-bottom: 1px solid var(--borde); }
.lista p { margin: 4px 0 0; color: var(--suave); }
time, .meta { color: var(--suave); font-size: .9rem; }
.vacio { color: var(--suave); background: var(--panel); border: 1px dashed var(--borde); border-radius: var(--radio); padding: 16px; }
.badge { font-size: .75rem; color: var(--naranja); border: 1px solid var(--naranja); border-radius: 99px; padding: 0 8px; vertical-align: middle; }
.fuentes { font-size: .85rem; }
.mini { font-size: .85rem; }

/* checklist */
.progreso { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.barra { flex: 1; min-width: 160px; height: 10px; background: var(--panel); border-radius: 99px; overflow: hidden; border: 1px solid var(--borde); }
#progreso-barra { height: 100%; width: 0; background: linear-gradient(90deg, var(--rosa), var(--naranja)); transition: width .2s; }
button {
  background: var(--panel); color: var(--texto); border: 1px solid var(--borde);
  border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer;
}
button:hover { border-color: var(--rosa); }
input[type=search] {
  width: 100%; max-width: 420px; padding: 10px 12px; border-radius: 8px; font: inherit;
  background: var(--panel); color: var(--texto); border: 1px solid var(--borde);
}
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 8px 0; border-bottom: 1px solid var(--borde); }
.checklist label { cursor: pointer; }
.checklist input { accent-color: var(--rosa); width: 18px; height: 18px; vertical-align: -3px; }
.checklist input:checked + .nom { color: var(--suave); text-decoration: line-through; }
.checklist details { margin: 4px 0 0 28px; color: var(--suave); }
.checklist summary { cursor: pointer; font-size: .85rem; }

/* tablas */
.tabla { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { color: var(--suave); font-weight: 600; }

/* guías */
.guia { max-width: 75ch; }
.guia img { max-width: 100%; border-radius: var(--radio); }
.guia ol, .guia ul { padding-left: 1.4em; }

/* mapa */
.pagina-mapa main { max-width: none; }
.mapa { height: calc(100vh - 220px); min-height: 420px; border-radius: var(--radio); border: 1px solid var(--borde); background: var(--panel); }
.coords { color: var(--suave); font-size: .85rem; font-variant-numeric: tabular-nums; }
iframe.mapa { display: block; width: 100%; padding: 0; }
.credito { color: var(--suave); font-size: .85rem; }
.lugares { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lugar { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 16px; }
.lugar:target { outline: 2px solid var(--naranja); }
.lugar h3 { margin: 0 0 4px; font-size: 1rem; }
.lugar .zona { color: var(--suave); font-size: .85rem; margin: 0; }
.punto { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: 8px; }
.leaflet-container { font: inherit; background: var(--fondo); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--texto); }
.leaflet-popup-content p { margin: 6px 0; }
.leaflet-control-layers { background: var(--panel); color: var(--texto); border: 1px solid var(--borde) !important; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.etiqueta-mapa { color: var(--suave); font-size: 1.2rem; white-space: nowrap; text-align: center; }

/* comunidad */
.cuenta { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.cuenta .link { background: none; border: 0; color: var(--suave); cursor: pointer; font: inherit; padding: 0; }
.form-aporte { display: grid; gap: 12px; max-width: 640px; }
.form-aporte .campo { display: grid; gap: 4px; }
.form-aporte input, .form-aporte select, .form-aporte textarea, .lugar textarea {
  font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 8px 10px; width: 100%; box-sizing: border-box; }
.form-aporte button, .acciones button { justify-self: start; font: inherit; cursor: pointer; padding: 8px 14px; border-radius: var(--radio); border: 1px solid var(--borde); background: var(--panel); color: inherit; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.btn-aprobado { border-color: #06d6a0 !important; }
.btn-rechazado { border-color: #ef476f !important; }
.msg.ok { color: #06d6a0; }
.msg.error { color: #ef476f; }
.estado-aprobado { color: #06d6a0; border-color: #06d6a0; }
.estado-rechazado { color: #ef476f; border-color: #ef476f; }
.lugar .nota { font-style: italic; color: var(--suave); }

footer { border-top: 1px solid var(--borde); padding: 20px 16px; text-align: center; color: var(--suave); font-size: .85rem; }

@media (max-width: 600px) {
  .top { position: static; }
  .mapa { height: 70vh; }
}
