/* Planika · estilo pop de la app: tinta morada, bordes gruesos, sombras duras y cuatro colores de tarjeta. */
:root {
  color-scheme: light;
  --ink: #1a1033;            /* tinta: texto, bordes y sombras */
  --ink-2: #4a4263;          /* texto secundario */
  --page: #fbfaf9;           /* fondo de página */
  --white: #fff;
  --yellow: #ffd23f;
  --pink: #ff6fb5;
  --teal: #4fd6c8;
  --lilac: #a78bfa;
  --hot: #ff3d81;            /* acento: seleccionado y acción principal */
  --rainbow: linear-gradient(90deg, #ff3d81, #ff9f1c, #2ec4b6, #7b5cff);
  --b: 3px solid var(--ink);
  --b2: 2px solid var(--ink);
  --sh-lg: 6px 6px 0 var(--ink);
  --sh: 3px 3px 0 var(--ink);
  --sh-sm: 2px 2px 0 var(--ink);
  --r: 18px;
  --r-in: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--ink);
  background-color: var(--page);
  background-image: radial-gradient(#ffd23f55 2px, transparent 2px);
  background-size: 22px 22px;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.011em;
  overflow-x: clip;
}
a { color: var(--ink); text-underline-offset: 3px; }
img { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2 { letter-spacing: -.02em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }

/* ---------- botones: píldora blanca con borde y sombra dura */
.segmented button, .chip, .btn, .more button, .cal-head button {
  border: var(--b2); border-radius: 999px; background: var(--white); color: var(--ink);
  box-shadow: var(--sh); font-weight: 700; text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.segmented button:hover, .chip:hover, .btn:hover, .more button:hover, .cal-head button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.segmented button:active, .chip:active, .btn:active, .more button:active, .cal-head button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.segmented button.on, .chip.on, .btn.primary { background: var(--hot); color: var(--white); }

/* ---------- etiqueta amarilla (títulos de sección) */
.sticker, .tagline, .cal-head h2 {
  display: inline-block; width: fit-content; max-width: 100%;
  background: var(--yellow); color: var(--ink); border: var(--b); border-radius: var(--r-in);
  padding: 2px 12px; box-shadow: 4px 4px 0 var(--ink); line-height: 1.3; font-weight: 800;
}
.sticker { margin: 0 0 14px; font-size: 20px; }

/* ---------- cabecera */
.hero { padding: 28px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.hero-img { display: block; width: 100%; height: auto; border: var(--b); border-radius: var(--r); box-shadow: var(--sh-lg); order: -1; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 52px; height: 52px; flex: none; filter: drop-shadow(3px 3px 0 var(--ink)); }
.hero h1 {
  margin: 0; font-size: clamp(40px, 8vw, 72px); line-height: 1.05; font-weight: 900;
  background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
.tagline { margin: 14px 0 12px; font-size: clamp(17px, 2.4vw, 22px); }
.lead { margin: 0; max-width: 620px; font-size: 16px; font-weight: 600; }
.meta { margin: 10px 0 0; color: var(--ink-2); font-size: 13px; }
@media (min-width: 820px) {
  .hero { padding: 40px 0 12px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; }
  .hero-img { order: 0; transform: rotate(1.5deg); }
}

/* ---------- filtros */
.filters { background: var(--white); border: var(--b); border-radius: var(--r); padding: 18px; margin: 24px 0 18px; box-shadow: var(--sh-lg); }
.row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.row + .row { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; min-width: 0; }
.field.grow { flex: 1 1 260px; }
.field input, .field select {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--white);
  border: var(--b); border-radius: var(--r-in); padding: 8px 11px; min-width: 160px; min-height: 44px;
  box-shadow: var(--sh);
}
.field input::placeholder { color: #7a738c; }
.field input:focus, .field select:focus { outline: 3px solid var(--hot); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 10px 4px; font-size: 14px; font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--hot); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.segmented button { padding: 8px 14px; font-size: 14px; min-height: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 3px dashed var(--ink); }
.chip { padding: 7px 13px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; min-height: 38px; }
.chip small { font-weight: 800; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 12px; color: var(--ink); }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.count { font-size: 15px; font-weight: 600; background: var(--white); border: var(--b2); border-radius: 999px; padding: 6px 14px; box-shadow: var(--sh); }
.count strong { font-weight: 900; }

/* ---------- tarjetas: cuatro colores pop */
.pop0 { --c: var(--yellow); }
.pop1 { --c: var(--pink); }
.pop2 { --c: var(--teal); }
.pop3 { --c: var(--lilac); }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 24px; }
.card {
  background: var(--c, var(--yellow)); color: var(--ink); border: var(--b); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-lg); min-width: 0;
}
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--white); display: block; border-bottom: var(--b); }
.card .body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.badge { background: var(--white); color: var(--ink); border: var(--b2); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.badge.free { background: var(--ink); color: var(--white); }
.badge.ongoing { background: transparent; border-style: dashed; }
.card h3 { margin: 4px 0 0; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.when { font-weight: 700; font-size: 14.5px; }
.where, .desc { font-size: 14px; }
.desc { margin: 0; background: #fff8; border-radius: 10px; padding: 8px 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.btn { padding: 7px 13px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.src { font-size: 12px; margin-top: 4px; opacity: .8; }
.more { text-align: center; margin: 28px 0 44px; }
.more button { padding: 11px 24px; font-size: 15px; }
.empty { grid-column: 1/-1; text-align: center; font-weight: 600; padding: 40px 0; }

/* ---------- calendario */
.calendar { background: var(--white); border: var(--b); border-radius: var(--r); padding: 16px; margin-bottom: 22px; box-shadow: var(--sh-lg); }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { margin: 0 auto 0 0; font-size: 20px; order: -1; }
.cal-head button { width: 40px; height: 40px; font-size: 14px; padding: 0; }
.cal-head button.ghost { width: auto; padding: 0 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { text-align: center; font-size: 13px; font-weight: 800; padding: 4px 0; }
.day {
  min-height: 78px; border: var(--b2); border-radius: var(--r-in); padding: 6px; background: var(--white);
  box-shadow: var(--sh-sm); text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.day.has { background: var(--teal); }
.day.out { opacity: .35; box-shadow: none; }
.day.today { outline: 3px dashed var(--hot); outline-offset: 1px; }
.day.sel { background: var(--hot); color: var(--white); }
.day .n { font-size: 12px; font-weight: 700; }
.day .starts { font-size: 21px; font-weight: 900; line-height: 1; }
.day .ongoing { font-size: 11px; font-weight: 700; }
.day:disabled { cursor: default; }
.hint { color: var(--ink-2); font-size: 13px; margin: 12px 2px 0; }
.day-panel { margin-top: 16px; border-top: 3px dashed var(--ink); padding-top: 16px; }
.day-panel h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.day-panel h4 {
  display: inline-block; margin: 14px 0 12px; font-size: 15px; font-weight: 800;
  background: var(--white); border: var(--b); border-radius: 999px; padding: 3px 14px; box-shadow: var(--sh);
}
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px 22px; }

/* ---------- menú "añadir al calendario" */
.menu { position: absolute; z-index: 50; background: var(--white); border: var(--b); border-radius: var(--r-in); box-shadow: var(--sh-lg); padding: 6px; min-width: 230px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; }
.menu a:hover, .menu button:hover { background: var(--yellow); }

/* ---------- pie */
.foot { font-size: 14px; padding: 24px 20px 52px; border-top: 3px dashed var(--ink); margin-top: 34px; }
.brandfoot { margin: 0 0 16px; font-size: 16px; }
.foot .sticker { font-size: 16px; margin-bottom: 12px; }
.foot ul { margin: 0 0 12px; padding-left: 18px; }
.foot a { font-weight: 700; }
.linklike { border: 0; background: none; color: var(--ink); font-weight: 700; text-decoration: underline; padding: 0; font-size: inherit; }

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .filters { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .field { width: 100%; }
  .field input, .field select { min-width: 0; width: 100%; }
  .check { padding: 4px 0; }
  .list, .mini { grid-template-columns: 1fr; }
  .cal-grid { gap: 4px; }
  .calendar { padding: 10px; }
  .day { min-height: 54px; padding: 4px; align-items: center; text-align: center; }
  .day .starts { font-size: 16px; }
  .day .ongoing { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .hero-img { transform: none !important; }
}

/* ---------- novedades: mapa, ficha, favoritos, cobertura (mismo estilo pop) */
.barbtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 800; }
.pill:empty { display: none; }
#near select { border: var(--b2); border-radius: 999px; background: var(--white); box-shadow: var(--sh); font: inherit; font-weight: 700; padding: 6px 10px; min-height: 40px; color: var(--ink); }
#geoBtn.on { background: var(--teal); }
.mapview { background: var(--white); border: var(--b); border-radius: var(--r); padding: 14px; margin-bottom: 22px; box-shadow: var(--sh-lg); }
.map { height: 520px; border: var(--b2); border-radius: var(--r-in); overflow: hidden; background: #e9f6f4; }
@media (max-width: 640px) { .map { height: 380px; } }
.subh { display: inline-block; margin: 16px 0 10px; font-size: 15px; font-weight: 800; background: var(--white); border: var(--b); border-radius: 999px; padding: 3px 14px; box-shadow: var(--sh); }
.coverage { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; font-size: 13.5px; font-weight: 600; }
.coverage .row { display: grid; grid-template-columns: 120px 1fr 48px; gap: 8px; align-items: center; margin: 0; }
.coverage .bar { height: 10px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.coverage .bar i { display: block; height: 100%; background: var(--hot); }
.coverage .n { text-align: right; font-variant-numeric: tabular-nums; }
.coverage .zero { opacity: .5; }
.fav { border: var(--b2); background: var(--white); border-radius: 999px; padding: 6px 11px; font-size: 15px; box-shadow: var(--sh); min-height: 38px; }
.fav.on { background: var(--yellow); }
.badge.dist { background: var(--teal); }
.sessions { font-size: 13.5px; font-weight: 600; }
.modal { border: var(--b); border-radius: var(--r); padding: 0; max-width: 540px; width: calc(100% - 32px); background: var(--white); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.modal::backdrop { background: rgba(26,16,51,.55); }
.modal .close { position: absolute; right: 10px; top: 10px; z-index: 2; border: var(--b2); background: var(--white); border-radius: 999px; width: 34px; height: 34px; font-weight: 800; box-shadow: var(--sh-sm); }
.modal .card { border: 0; box-shadow: none; border-radius: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 10px 16px; border: var(--b2); border-radius: 999px; z-index: 100; font-size: 14px; font-weight: 700; box-shadow: 3px 3px 0 var(--yellow); }
.leaflet-container { font: 13px/1.4 inherit; }
.leaflet-popup-content-wrapper { border: var(--b2); border-radius: var(--r-in); box-shadow: var(--sh); }
.leaflet-popup-content a { color: var(--hot); font-weight: 700; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(26,16,51,.25); }
.marker-cluster-small div { background: var(--yellow); } .marker-cluster-medium div { background: var(--pink); } .marker-cluster-large div { background: var(--hot); color: #fff; }
.marker-cluster div { border: 2px solid var(--ink); font-weight: 800; }
/* Página propia de cada plan (site/e/) */
.evhero { padding-bottom: 0; }
.evbrand { font-size: clamp(30px, 6vw, 44px); font-weight: 900; letter-spacing: -.03em; line-height: 1; color: var(--ink); text-decoration: none; }
.evpage { max-width: 760px; margin: 18px auto 0; }
.evpage h1 { margin: 4px 0 0; font-size: clamp(22px, 4.4vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.evpage .when { font-size: 17px; }
.evpage .where { font-size: 15px; }
.evpage .desc { display: block; overflow: visible; font-size: 15.5px; line-height: 1.55; }
.evnav { max-width: 760px; margin-left: auto; margin-right: auto; }
.evnav li { margin-bottom: 6px; }
