/* ==============
   Tokens / base
============== */
:root {
  --ui-fast: 140ms ease;
  --ui-med: 220ms ease;
  --ui-slow: 320ms ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 15px;
  background: #f6f7f9;
  color: #111;
}

/* ==============
   Header
============== */
header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

header h1 {
  margin: 0;
  font-size: 17px;
}

header button {
  padding: 7px 11px;
  font-size: 14px;
  border: 1px solid #ddd;
  background: #111;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

header button#logoutBtn {
  background: #fff;
  color: #111;
}

/* ==============
   Generic sections / lists
============== */
body > section {
  max-width: 820px;
  margin: 16px auto;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
}

h2,
h3,
h4 {
  margin: 12px 0 8px;
}

hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 14px 0;
}

ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
}

li {
  padding: 7px 9px;
  margin: 6px 0;
  border: 1px solid #eee;
  border-radius: 9px;
  text-align: left;
  background: #fafafa;
  transition:
    transform var(--ui-fast),
    background-color var(--ui-fast),
    border-color var(--ui-fast),
    box-shadow var(--ui-fast);
}

li:hover {
  background: #fcfcfc;
  border-color: #e7e7e7;
}

/* ==============
   Inputs / buttons
============== */
input {
  width: 100%;
  max-width: 280px;
  padding: 9px 10px;
  margin: 6px 6px 6px 0;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition:
    border-color var(--ui-fast),
    box-shadow var(--ui-fast),
    background-color var(--ui-fast);
}

input:focus {
  border-color: #bdbdbd;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
  background: #fff;
}

button {
  padding: 8px 10px;
  margin: 6px 6px 6px 0;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition:
    transform var(--ui-fast),
    box-shadow var(--ui-fast),
    border-color var(--ui-fast),
    background-color var(--ui-fast),
    color var(--ui-fast),
    opacity var(--ui-fast);
}

button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

#publicView button,
#publicView input,
#adminView button,
#adminView input {
  vertical-align: middle;
}

/* ==============
   Public shell / cards
============== */
.pageShell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.topIntro {
  margin-bottom: 16px;
  animation: softRise 320ms ease;
}

.pageTitle {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.1;
}

.pageSubtitle {
  margin: 0;
  font-size: 14px;
  opacity: 0.72;
}

.controlsCard,
.panelCard,
.filtersBar,
.featuredBox,
.nearbyMaster,
.accordion,
.popupCard {
  transition:
    transform var(--ui-med),
    box-shadow var(--ui-med),
    border-color var(--ui-fast),
    background-color var(--ui-fast);
}

.controlsCard,
.panelCard {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.controlsCard {
  margin-bottom: 10px;
}

.controlsCard:hover,
.panelCard:hover,
.filtersBar:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.panelCard + .panelCard {
  margin-top: 16px;
}

.panelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.panelHeader h2 {
  margin: 0;
  font-size: 19px;
}

.panelHeader h3 {
  margin: 0;
  font-size: 16px;
}

.sectionTitle {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  opacity: 0.9;
}

.controlsTop {
  margin-bottom: 8px;
}

/* ==============
   Layout
============== */
.appLayout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.appLayout--leftSidebar {
  transition: grid-template-columns 220ms ease;
}

.mainColumn,
.sideColumn {
  min-width: 0;
  animation: softRise 320ms ease;
}

/* Mobile / tablet: primero contenido principal, después agenda */
.mainColumn {
  order: 1;
}

.sideColumn--left {
  order: 2;
}

.sideColumn--left .panelCard {
  position: relative;
  top: auto;
  padding: 14px;
}

.sideColumn--left .panelCard + .panelCard {
  margin-top: 16px;
}

.mainColumn .panelCard {
  padding: 16px 18px;
}

.panelCard--map {
  padding: 16px 16px 14px;
}

/* ==============
   Sidebar collapsible
============== */
.sidebarToolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.sidebarToggleBtn {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.sidebarToggleBtn:hover {
  transform: translateY(-1px);
  border-color: #cfcfcf;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebarPanel {
  transform-origin: top left;
  max-height: 1200px;
  overflow: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    height 180ms ease,
    max-height 240ms ease,
    margin 180ms ease,
    padding 180ms ease,
    border-width 180ms ease,
    box-shadow 180ms ease;
}

.appLayout--leftSidebar.isCollapsed .sidebarPanel {
  opacity: 0;
  transform: translateX(-8px) scale(0.98);
  pointer-events: none;
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  box-shadow: none;
}

.appLayout--leftSidebar.isCollapsed .sideColumn--left {
  min-width: 0;
}

.appLayout--leftSidebar.isCollapsed .sidebarToggleBtn {
  padding: 10px 8px;
  text-align: center;
}

/* ==============
   Filters / category chips
============== */
.filtersBar {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  background: #fff;
}

.filtersBar .categoryLabel {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filtersBar .chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.categoryBlock {
  margin-top: 0;
}

.categoryLabel {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.58;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.chip {
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  padding: 7px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.chip:hover {
  border-color: #cfcfcf;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
}

.chip.isActive {
  border-color: #111;
  background: #111;
  color: #fff;
  transform: none;
}

.chipRow--admin {
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.chipLabel {
  font-size: 14px;
  opacity: 0.8;
  margin-right: 6px;
}

.chip--sm {
  padding: 5px 7px;
  font-size: 13px;
}

.catTag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  margin-left: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-size: 0.78em;
  opacity: 0.85;
  white-space: nowrap;
}

.miniChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
  white-space: nowrap;
}

/* ==============
   Explore / map actions
============== */
.exploreActionsRow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.exploreActionsRow button {
  margin: 0;
}

.mapControls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mapActionBar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 8px;
}

.mapActionBar--insideNearby {
  margin: 10px 0 8px;
}

.mapActionBar button {
  margin: 0;
}

.primaryMapActionBtn {
  margin: 0;
  min-width: 220px;
  padding: 10px 16px;
  border-radius: 999px;

  background: #111;
  color: #fff;
  border: 1px solid #111;

  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.primaryMapActionBtn:hover {
  background: #000;
  transform: translateY(-1px);
}

/* ==============
   Nearby / featured
============== */
.nearbyCount {
  margin-top: 0;
  font-size: 13px;
  opacity: 0.78;
}

.nearbyBox {
  margin-top: 10px;
  text-align: left;
}

.nearbyHeader {
  font-weight: 600;
  margin-bottom: 6px;
}

.nearbyPlaceLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nearbyPlaceTitle {
  font-weight: 600;
}

.nearbyMeta,
.nearbySmall {
  opacity: 0.75;
  font-size: 0.9em;
}

.nearbyEventLine {
  padding: 6px 0;
  border-top: 1px solid #eee;
  transition:
    transform var(--ui-fast),
    background-color var(--ui-fast),
    border-color var(--ui-fast),
    box-shadow var(--ui-fast);
}

.nearbyEventLine:hover {
  background: #fcfcfc;
  border-color: #e7e7e7;
}

.nearbyMaster {
  margin-top: 10px;
  text-align: left;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.nearbyMaster > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 14px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    padding-left 160ms ease;
}

.nearbyMaster > summary::-webkit-details-marker {
  display: none;
}

.nearbyMaster > summary::after {
  content: "▾";
  opacity: 0.7;
  font-size: 16px;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}

.nearbyMaster[open] > summary::after {
  transform: rotate(180deg);
}

.nearbyMaster > summary:hover {
  background: rgba(0, 0, 0, 0.025);
  padding-left: 12px;
}

.nearbyMasterBody {
  padding: 8px 12px 12px;
  border-top: 1px solid #eee;
  animation: accordionFadeIn 220ms ease;
}

.nearbySummaryLeft {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#nearbySummaryBlock {
  padding: 0 0 8px;
  animation: accordionFadeIn 220ms ease;
}

.nearbyInlineHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
  font-size: 14px;
}

.nearbyInlineCount {
  font-weight: 700;
}

.nearbyInlineEmpty {
  padding: 8px 0 4px;
  font-size: 14px;
  opacity: 0.75;
}

#nearbyList {
  margin-top: 6px;
}

.featuredBox {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.featuredBox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0)
  );
}

.featuredTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.featuredKicker {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.featuredTitle {
  font-size: 14px;
  font-weight: 800;
}

.featuredMeta {
  font-size: 12px;
}

.featuredStack {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.featuredFire {
  margin-right: 4px;
}

.featuredAccordion {
  background: #fff7e8;
  border: 1px solid #f1d39a;
  border-radius: 10px;
  padding: 6px 10px;
}

.featuredAccordionSummary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.featuredAccordionSummary::-webkit-details-marker {
  display: none;
}

.featuredAccordionBody {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* ==============
   Calendar
============== */
#calendarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 8px;
}

#monthLabel {
  font-size: 15px;
  font-weight: 700;
}

#calendarDays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-weight: 700;
  max-width: none;
}

#calendarDays div {
  text-align: center;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 2px solid #eee;
}

/* Calendario: grilla estable */
#calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  max-width: none;
  margin-top: 8px;
}

/* Cada celda del día */
.day {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  min-width: 0;
  height: 130px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 6px;
  box-sizing: border-box;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.day.muted {
  opacity: 0.45;
}

/* Número del día */
.day-number {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 0.82em;
  margin-bottom: 4px;
}

/* Evento dentro del calendario */
.day .event,
.event {
  min-width: 0;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #e3f2fd;
  margin-top: 3px;
  margin-bottom: 4px;
  padding: 2px 4px;
  font-size: 0.82rem;
  line-height: 1.2;
  border-radius: 6px;
  transition:
    transform var(--ui-fast),
    background-color var(--ui-fast),
    border-color var(--ui-fast),
    box-shadow var(--ui-fast);
}


/* +N más */
.day .event-more {
  margin-top: auto;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event.event-more {
  cursor: pointer;
  font-weight: 600;
}
.event--favorite {
  border: 1px solid rgba(220, 20, 60, 0.22);
  background: #fff4f6;
}

.day--hasFavorite {
  box-shadow: inset 0 0 0 2px rgba(220, 20, 60, 0.12);
}

/* ==============
   Event list items
============== */
.eventItem {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  align-items: start;
}

.eventDate {
  font-weight: 600;
  font-size: 0.84em;
  opacity: 0.75;
  white-space: nowrap;
}

.eventMain {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eventTitle {
  font-weight: 500;
  font-size: 0.95em;
}

.eventPlace {
  font-size: 0.82em;
  opacity: 0.6;
}

.eventPlace div {
  opacity: 0.85;
}

.eventMiniCard {
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  padding: 10px 11px;
  margin-top: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition:
    transform var(--ui-fast),
    box-shadow var(--ui-fast),
    border-color var(--ui-fast),
    background-color var(--ui-fast);
}

.eventMiniCard:hover {
  transform: translateY(-1px);
  border-color: #dfdfdf;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  background: #fcfcfc;
}

.eventMiniCard__top {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.eventMiniCard__icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f7f9;
  border: 1px solid #e8e8e8;
  font-size: 16px;
  line-height: 1;
}

.eventMiniCard__main {
  min-width: 0;
}

.eventMiniCard__titleRow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.25;
}

.eventMiniCard__time {
  font-weight: 800;
  font-size: 0.9rem;
  opacity: 0.78;
}

.eventMiniCard__title {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 0;
  word-break: break-word;
}

.eventMiniCard__status {
  font-size: 0.8rem;
  opacity: 0.62;
}

.eventMiniCard__meta {
  margin-top: 4px;
  font-size: 0.88rem;
  opacity: 0.72;
}

.eventMiniCard__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* ==============
   Accordion
============== */
.accordion {
  margin: 12px 0;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.sideColumn .accordion {
  margin: 0;
}

.accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 10px;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    padding-left 160ms ease;
}

.sideColumn .accordion > summary {
  padding-left: 0;
  padding-right: 0;
}

.accordion > summary::-webkit-details-marker {
  display: none;
}

.accordion > summary::after {
  content: "▾";
  font-weight: 900;
  opacity: 0.7;
}

.accordion[open] > summary::after {
  content: "▴";
}

.accordion > summary:hover {
  background: rgba(0, 0, 0, 0.025);
  padding-left: 12px;
}

.accordion > ul {
  padding: 0 12px 12px;
  margin: 0;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  animation: accordionFadeIn 220ms ease;
  -webkit-overflow-scrolling: touch;
}

.sideColumn .accordion > ul {
  padding: 0 0 4px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
}

.accordion > ul::-webkit-scrollbar {
  width: 8px;
}

.accordion > ul::-webkit-scrollbar-thumb {
  background: #d6d6d6;
  border-radius: 999px;
}

.accordion > ul::-webkit-scrollbar-track {
  background: transparent;
}

/* ==============
   Admin
============== */
#adminView {
  max-width: none;
  margin: 16px 0 0;
}

.adminPanel {
  margin-top: 16px;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid #e3e6ea;
  border-radius: 12px;
}

.adminGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: start;
}

.adminGrid input,
.adminGrid .chipRow--admin {
  width: 100%;
  max-width: none;
  margin: 0;
}

.adminActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.adminActions button {
  margin: 0;
}

.placeSearchRow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.placeSearchRow input {
  flex: 1 1 260px;
  max-width: none;
  margin: 0;
}

.placeSearchRow button {
  margin: 0;
}

.debugHidden {
  display: none;
}

/* ==============
   Link buttons
============== */
.linkBtn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
  transition: opacity var(--ui-fast), color var(--ui-fast);
}

.linkBtn,
.linkBtn:visited,
.linkBtn:hover,
.linkBtn:active {
  color: inherit;
}

a.linkBtn {
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .linkBtn {
    min-height: 44px;
    padding: 8px 12px;
  }
}

@media (max-width: 768px) {
  .eventMiniCard__actions,
  .eventCardActions {
    gap: 10px;
  }
}

.linkBtn:hover {
  opacity: 1;
}

.deleteEventBtn {
  color: #8a2d2d;
}

/* ==============
   Map / Leaflet
============== */
#publicView {
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
  margin: 0;
}

#map {
  height: 540px;
  width: 100%;
  margin: 0;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  overflow: hidden;
  animation: mapFadeIn 380ms ease;
}

.leaflet-popup-pane {
  z-index: 2000;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.catMarker {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  font-size: 16px;
  line-height: 1;
}

.leaflet-div-icon {
  background: transparent;
  border: none;
}

.leaflet-popup-content {
  margin: 8px 10px;
  max-width: 220px;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-content {
  overflow: visible !important;
}

.popupCard {
  width: min(240px, 70vw);
  max-width: 70vw;
  min-width: 0;
}

.popupHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px 0;
  padding: 0;
  position: static;
  background: #fff;
}

.popupPlace {
  margin: 0;
  padding: 0;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
}

.popupSub {
  margin: 2px 0 0 0;
  padding: 0;
  font-size: 11px;
  opacity: 0.7;
  line-height: 1.2;
}

.popupActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px 0;
  padding: 0;
  align-items: center;
}


.popupBtn,
a.popupBtn,
button.popupBtn {
  margin: 0;
  padding: 5px 8px;
  font-size: 11.5px;
  line-height: 1;
  border-radius: 9px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-family: inherit;
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  vertical-align: middle;
}

.popupBtn:hover,
a.popupBtn:hover,
button.popupBtn:hover {
  border-color: #cfcfcf;
}

a.popupBtn:visited,
a.popupBtn:active {
  color: #111;
  text-decoration: none;
}

.popupActions .popupBtn,
.popupAddBtn {
  visibility: visible !important;
  opacity: 1 !important;
}

.popupBtnPrimary,
.popupAddBtn {
  background: #111;
  color: #fff;
  border-color: #111;
}

.popupDeleteBtn {
  border-color: #d9b3b3;
}

.popupDeleteBtn:hover {
  background: #fff5f5;
}

.popupList {
  margin: 0;
  padding: 0 2px 0 0;
  border-top: 1px solid #eee;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.popupItem {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.popupItem:first-child {
  border-top: none;
}

.popupItemTitle {
  margin: 0;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.22;
}

.popupItemMeta {
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.75;
}

.popupItemHighlight {
  outline: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  background: rgba(255, 235, 59, 0.25);
}

.popupList::-webkit-scrollbar {
  width: 8px;
}

.popupList::-webkit-scrollbar-thumb {
  background: #d6d6d6;
  border-radius: 999px;
}

.popupList::-webkit-scrollbar-track {
  background: transparent;
}

.leaflet-popup-content,
.popupCard,
.popupItem,
.popupItemTitle,
.popupItemMeta,
.popupPlace,
.popupSub {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Highlight marker */
@keyframes markerGlow {
  0% {
    filter: drop-shadow(0 0 0 rgba(33, 150, 243, 0));
  }
  35% {
    filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.65));
  }
  70% {
    filter: drop-shadow(0 0 14px rgba(33, 150, 243, 0.45));
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(33, 150, 243, 0));
  }
}

.leaflet-marker-icon.marker-highlight {
  animation: markerGlow 0.9s ease-out 1;
  z-index: 2000 !important;
}

/* ==============
   Calendar popovers
============== */
.calendarEventPopover {
  min-width: 220px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  padding: 12px;
}

.calendarEventPopover__title {
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.2;
}

.calendarEventPopover__meta {
  font-size: 0.92em;
  opacity: 0.9;
  display: grid;
  gap: 4px;
}

.calendarEventPopover__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.calendarEventPopover--dayList {
  min-width: 260px;
  max-width: 340px;
}

.calendarDayPopover__list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 4px;
}

.calendarDayPopover__item {
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.calendarDayPopover__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.calendarDayPopover__itemTitle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.calendarDayPopover__itemMeta {
  font-size: 0.92em;
  opacity: 0.9;
  display: grid;
  gap: 3px;
}

.calendarDayPopover__empty {
  font-size: 0.95em;
  opacity: 0.8;
}

.calendarEventIcon {
  flex: 0 0 auto;
}

.calendarEventTitleText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendarListFlash {
  animation: calendarListFlashAnim 0.9s ease;
}

@keyframes calendarListFlashAnim {
  0% {
    background: rgba(255, 230, 120, 0.55);
  }
  100% {
    background: transparent;
  }
}

/* ==============
   Animations
============== */
@keyframes mapFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes accordionFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============
   Responsive
============== */

@media (max-width: 1100px) {
  .panelCard--nearby {
    border-left: 4px solid #7bb6ff;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  }

  .panelCard--today {
    border-left: 4px solid #ffbf69;
    background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
  }

  .panelCard--future {
    border-left: 4px solid #b8b8ff;
    background: linear-gradient(180deg, #fafaff 0%, #ffffff 100%);
  }

  .panelCard--nearby .accordion > summary,
  .panelCard--today .accordion > summary,
  .panelCard--future .accordion > summary {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .panelCard--nearby .accordion > summary {
    background: rgba(123, 182, 255, 0.08);
  }

  .panelCard--today .accordion > summary {
    background: rgba(255, 191, 105, 0.10);
  }

  .panelCard--future .accordion > summary {
    background: rgba(184, 184, 255, 0.10);
  }

  .panelCard--nearby .accordion > summary:hover {
    background: rgba(123, 182, 255, 0.14);
  }

  .panelCard--today .accordion > summary:hover {
    background: rgba(255, 191, 105, 0.16);
  }

  .panelCard--future .accordion > summary:hover {
    background: rgba(184, 184, 255, 0.16);
  }

  .appLayout--leftSidebar.isCollapsed .sidebarPanel {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    margin: revert;
    padding-top: revert;
    padding-bottom: revert;
    border-width: revert;
    box-shadow: revert;
  }

  .sidebarToolbar {
    margin-bottom: 0;
  }

  #map {
    height: 500px;
  }
}

.agendaSection {
  margin: 0 0 14px;
}

.agendaSectionTitle {
  margin: 10px 0 6px;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.2;
}

.agendaSectionList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agendaSection--urgent {
  border: 1px solid #f2d7a6;
  background: #fff8ea;
  border-radius: 12px;
  padding: 8px 10px;
}

.agendaSectionTitle--urgent {
  font-weight: 700;
}

@media (max-width: 760px) {
  .pageShell {
    padding: 12px;
  }

  .pageTitle {
    font-size: 21px;
  }

  .controlsCard,
  .panelCard,
  .mainColumn .panelCard,
  .sideColumn--left .panelCard {
    padding: 12px;
  }

  .adminGrid {
    grid-template-columns: 1fr;
  }

  .exploreActionsRow,
  .mapActionBar,
  .placeSearchRow {
    flex-direction: column;
    align-items: stretch;
  }

  .exploreActionsRow button,
  .mapActionBar button,
  .placeSearchRow button,
  .primaryMapActionBtn {
    width: 100%;
    min-width: 0;
  }

  .placeSearchRow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }

  .placeSearchRow input {
    width: 100%;
    min-width: 0;
  }

  .placeSearchRow button {
    width: auto;
    margin: 0;
    white-space: nowrap;
  }

  #map {
    height: 56vh;
    min-height: 400px;
    max-height: none;
  }
}

@media (max-width: 520px) {
  .pageTitle {
    font-size: 22px;
  }

  .pageSubtitle {
    font-size: 14px;
  }

  .eventItem {
    grid-template-columns: 1fr;
  }

  .popupCard {
    min-width: 0;
    max-width: 100%;
  }

  #map {
    height: 52vh;
    min-height: 360px;
    max-height: none;
 
  }
}

@media (max-width: 768px) {
  .filtersBar {
    padding: 8px 8px;
  }

  .filtersBar .chipRow,
  .chipRow {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filtersBar .chipRow::-webkit-scrollbar,
  .chipRow::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    padding: 5px 7px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
}

.panelCard--map .filtersBar {
  margin: 0 0 12px;
  background: #fafafa;
}

#calendarDays,
#calendar,
#calendarHeader {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  #calendarDays,
  #calendar,
  #calendarHeader {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 768px) {
  .day {
    height: 110px;
  }
}

.calendarEventPopover,
.calendarDayPopover__item,
.calendarDayPopover__itemTitle,
.calendarEventTitleText {
  min-width: 0;
}

.calendarDayPopover__itemTitle {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  overflow: hidden;
}

.calendarEventTitleText {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

@media (max-width: 768px) {
  #calendarDays {
    gap: 4px;
  }

  #calendar {
    gap: 4px;
    margin-top: 6px;
  }

  #calendarDays div {
    font-size: 11px;
    padding: 2px 0;
  }

  .day {
    height: 96px;
    padding: 4px 3px;
    border-radius: 7px;
  }

  .day-number {
    font-size: 10.5px;
    margin-bottom: 2px;
  }

  .day .event,
  .event {
    margin-top: 2px;
    margin-bottom: 2px;
    padding: 2px 3px;
    font-size: 10px;
    line-height: 1.1;
    border-radius: 5px;
  }

  .day .event-more,
  .event.event-more {
    margin-top: auto;
    padding: 2px 3px;
    font-size: 9.5px;
    line-height: 1.05;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }
}

.eventMiniCard__icon--music {
  background: #eef7ff;
  border-color: #cfe4ff;
}

.eventMiniCard__icon--dance {
  background: #fff1f7;
  border-color: #f3cfe0;
}

.eventMiniCard__icon--theatre {
  background: #f7f2ff;
  border-color: #ddd0ff;
}

.eventMiniCard__icon--visual_arts {
  background: #fff8ec;
  border-color: #f1dfb8;
}

.eventMiniCard__icon--cinema {
  background: #eefaf1;
  border-color: #cfe7d5;
}

.eventMiniCard__icon--games {
  background: #fff4f0;
  border-color: #f2cfc2;
}

.eventMiniCard--games {
  border-left: 4px solid #f2cfc2;
}

.eventMiniCard--music {
  border-left: 4px solid #cfe4ff;
}

.eventMiniCard--dance {
  border-left: 4px solid #f3cfe0;
}

.eventMiniCard--theatre {
  border-left: 4px solid #ddd0ff;
}

.eventMiniCard--visual_arts {
  border-left: 4px solid #f1dfb8;
}

.eventMiniCard--cinema {
  border-left: 4px solid #cfe7d5;
}

@media (min-width: 1101px) {
  .appLayout {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.8fr);
    gap: 18px;
    align-items: start;
  }

  .appLayout--leftSidebar.isCollapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .mainColumn {
    order: 2;
  }

  .sideColumn--left {
    order: 1;
  }

  .sideColumn--left .panelCard {
    position: sticky;
    top: 16px;
  }
}
/* =========================
   MAPA MÁS GRANDE SIN COMERSE EL DESTACADO
========================= */

html,
body {
  min-height: 100%;
}

#publicView,
.pageShell {
  min-height: 100svh;
}

@media (min-width: 1101px) {
  .appLayout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .mainColumn {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .panelCard--map {
    display: flex;
    flex-direction: column;
    padding: 14px 14px 12px;
  }

  #map {
    height: 72vh;
    min-height: 620px;
    border-radius: 12px;
  }
}

@media (max-width: 1100px) {
  .pageShell {
    padding-bottom: 12px;
  }

  .panelCard--map {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  #map {
    height: 68svh;
    min-height: 460px;
  }
}

@media (max-width: 768px) {
  .pageShell {
    padding: 10px;
  }

  .panelCard--map {
    padding: 8px;
  }

  #map {
    height: 64svh;
    min-height: 400px;
  }
}

@media (max-width: 520px) {
  #map {
    height: 60svh;
    min-height: 360px;
  }
}

.calendarEventPopover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.calendarEventPopover__header .calendarEventPopover__title {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 2px;
}

.calendarPopoverXBtn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #444;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: -2px -2px 0 0;
  transition: background 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.calendarPopoverXBtn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.calendarPopoverXBtn:active {
  transform: scale(0.96);
}

.calendarPopoverXBtn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.25);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .calendarEventPopover__header {
    gap: 8px;
    margin-bottom: 8px;
  }

  .calendarEventPopover__header .calendarEventPopover__title {
    font-size: 15px;
    line-height: 1.25;
    padding-right: 4px;
  }

  .calendarPopoverXBtn {
    width: 36px;
    height: 36px;
    font-size: 26px;
    margin: -4px -4px 0 0;
  }
}

@media (max-width: 520px) {
  .calendarPopoverXBtn {
    width: 38px;
    height: 38px;
    font-size: 27px;
  }
}

/* =========================
   POPUP ESTILO APP
========================= */

.calendarEventPopover {
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 12px 12px 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);

  animation: popIn 160ms ease;
  transform-origin: top left;
}

/* animación suave */
@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* contenido interno un poco más respirado */
.calendarEventPopover__meta {
  font-size: 13.5px;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* botones más modernos */
.calendarEventPopover__actions .linkBtn {
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 12.5px;
}

/* hover más suave */
.calendarEventPopover__actions .linkBtn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* popup grande (lista de día) */
.calendarEventPopover--dayList {
  max-width: 340px;
}

/* items más separados */
.calendarDayPopover__item {
  padding: 8px 6px;
  border-radius: 10px;
}

.calendarDayPopover__item:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* mobile: un poco más grande y cómodo */
@media (max-width: 768px) {
  .calendarEventPopover {
    border-radius: 18px;
    padding: 14px 12px 12px;
  }

  .calendarEventPopover__meta {
    font-size: 14px;
  }

  .calendarEventPopover__actions .linkBtn {
    font-size: 13px;
    padding: 7px 10px;
  }
}

/* =========================
   MAP STAGE + DESTACADO FLOTANTE
========================= */

.panelCard--map {
  position: relative;
  overflow: hidden;
}

.mapStage {
  position: relative;
}

.mapStage #map {
  position: relative;
  z-index: 1;
}

.mapOverlay {
  position: absolute;
  z-index: 20;
  pointer-events: none;
}

.mapOverlay--top {
  top: 10px;
  left: 10px;
  right: 10px;
}

.mapOverlay .nearbyCount {
  margin: 0;
  pointer-events: auto;

  display: flex;
  flex-direction: column;
  gap: 6px;

  max-width: min(320px, calc(100vw - 24px));
}

.mapOverlay .featuredBox {
  width: fit-content;
  max-width: min(420px, calc(100vw - 36px));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.mapOverlay .nearbyCount > :not(.featuredBox) {
  width: fit-content;
  max-width: min(300px, calc(100vw - 24px));
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
  padding: 7px 9px;
}

@media (max-width: 768px) {
  .mapOverlay--top {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .mapOverlay .featuredBox {
    max-width: calc(100vw - 24px);
    border-radius: 14px;
  }

  .mapOverlay .nearbyCount > :not(.featuredBox) {
    max-width: calc(100vw - 24px);
    border-radius: 12px;
  }
}


/* =========================
   OVERLAY SUPERIOR: DESTACADO + FILTROS
========================= */

.panelCard--map {
  padding: 8px;
  border-radius: 18px;
}

.mapStage {
  border-radius: 16px;
  overflow: hidden;
}

.mapStage #map {
  position: relative;
  z-index: 1;
}

.mapOverlay {
  position: absolute;
  z-index: 20;
  pointer-events: none;
}

.mapOverlay--top {
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.mapOverlay .nearbyCount,
.mapOverlay .filtersBar--map {
  pointer-events: auto;
}

.mapOverlay .nearbyCount {
  margin: 0;
}

.mapOverlay .featuredBox {
  width: fit-content;
  max-width: min(420px, calc(100vw - 36px));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  backdrop-filter: blur(4px);
}

.mapOverlay .nearbyCount > :not(.featuredBox) {
  width: fit-content;
  max-width: min(360px, calc(100vw - 36px));
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
}

.mapOverlay .filtersBar--map {
  margin: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  max-width: min(760px, calc(100vw - 36px));
}

.mapOverlay .filtersBar--map .categoryLabel {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .mapOverlay--top {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 8px;
  }

  .mapOverlay .featuredBox,
  .mapOverlay .nearbyCount > :not(.featuredBox),
  .mapOverlay .filtersBar--map {
    max-width: calc(100vw - 24px);
    border-radius: 12px;
  }

  .mapOverlay .filtersBar--map {
    padding: 8px 10px;
  }
}
.mapOverlay .filtersBar--map {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  width: auto;
  max-width: none;
}

.mapFiltersToggleBtn {
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.mapFiltersPanel {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  width: min(280px, calc(100vw - 24px));
  max-height: min(52vh, 360px);
  overflow-y: auto;
}

.mapFiltersPanel .chipRow {
  gap: 6px;
}

.mapFiltersPanel .chip {
  font-size: 12px;
  padding: 5px 9px;
}

@media (max-width: 768px) {
  .mapFiltersToggleBtn {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 13px;
  }

  .mapFiltersPanel {
    width: min(280px, calc(100vw - 20px));
    padding: 8px 10px;
    border-radius: 12px;
  }

  .mapFiltersPanel .chip {
    font-size: 12px;
    padding: 6px 9px;
  }
}

.mapFiltersPanel[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .mapFiltersToggleBtn {
    width: auto;
    min-height: 40px;
    padding: 9px 11px;
    font-size: 13.5px;
  }

  .mapFiltersPanel {
    max-width: calc(100vw - 24px);
    padding: 8px 10px;
    border-radius: 12px;
  }
}

.mapLocateBtn {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 25;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mapLocateBtn:hover {
  background: #fff;
}

.mapLocateBtn:active {
  transform: scale(0.97);
}

.mapLocateBtn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.25);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .mapLocateBtn {
    right: 10px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
}

@media (min-width: 1101px) {
  #map {
    height: 78vh;
    min-height: 680px;
  }
}

@media (max-width: 1100px) {
  #map {
    height: 72svh;
    min-height: 520px;
  }
}

@media (max-width: 768px) {
  #map {
    height: 74svh;
    min-height: 480px;
  }
}

@media (max-width: 520px) {
  #map {
    height: 72svh;
    min-height: 420px;
  }
}

/* =========================
   OVERRIDES SEGUROS — MAPA PROTAGONISTA
========================= */

.mapOverlay .nearbyCount {
  margin: 0 !important;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(320px, calc(100vw - 24px));
}

.mapOverlay .nearbyCount > :not(.featuredBox) {
  width: fit-content;
  max-width: min(300px, calc(100vw - 24px));
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
  padding: 7px 9px;
}

.mapOverlay .featuredBox {
  max-width: min(340px, calc(100vw - 24px));
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.mapOverlay .filtersBar--map {
  margin: 0 !important;
  padding: 8px 10px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10) !important;
  max-width: min(300px, calc(100vw - 24px)) !important;
}

.mapFiltersPanel {
  max-height: min(50vh, 340px);
  overflow-y: auto;
}

.mapFiltersPanel .chip {
  font-size: 12px;
  padding: 5px 9px;
}

@media (max-width: 768px) {
  .mapOverlay--top {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 8px;
  }

  .mapOverlay .nearbyCount,
  .mapOverlay .featuredBox,
  .mapOverlay .filtersBar--map,
  .mapOverlay .nearbyCount > :not(.featuredBox) {
    max-width: calc(100vw - 24px) !important;
  }
}

.mapOverlay--top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.mapOverlayLeft,
.mapOverlayRight {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.mapOverlayRight {
  align-items: flex-end;
}

@media (max-width: 768px) {
  .mapOverlay--top {
    gap: 8px;
  }

  .mapOverlayLeft,
  .mapOverlayRight {
    max-width: calc(100vw - 24px);
  }
}

/* =========================
   FIX: overlay en fila (izq / der)
========================= */

.mapOverlay.mapOverlay--top {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 10px;
}

.mapOverlayLeft {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: auto;
}

.mapOverlayRight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.mapOverlay.is-dimmed {
  opacity: 0.35;
  transition: opacity 160ms ease;
}

.mapOverlay.is-dimmed:hover {
  opacity: 0.8;
}

/* =========================
   LIMPIAR FONDO FILTROS
========================= */

.mapOverlay .filtersBar--map {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mapFiltersToggleBtn {
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.featuredFloating {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.featuredToggleBtn {
  background: rgba(255, 248, 235, 0.95);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* =========================
   MOBILE: filtros del mapa hacia abajo
========================= */

@media (max-width: 768px) {
  .mapFiltersPanel {
    width: min(260px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .mapFiltersPanel .chipRow {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow: visible !important;
    flex-wrap: unset !important;
  }

  .mapFiltersPanel .chip {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }
}

/* =========================
   HEADER MÁS TIPO APP
========================= */

header {
  padding: 10px 14px !important;
  border-bottom: 1px solid #eee;
}

header h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

header button {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 8px;
}

/* =========================
   DESTACADOS: scroll interno
========================= */

.featuredDropdown {
  max-height: min(58vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.featuredDropdown::-webkit-scrollbar {
  width: 8px;
}

.featuredDropdown::-webkit-scrollbar-thumb {
  background: #d6d6d6;
  border-radius: 999px;
}

.featuredDropdown::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 768px) {
  .featuredDropdown {
    max-height: min(52vh, 360px);
  }
}
.featuredAccordionBody {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .event-more--mobile {
    margin-top: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.mapStage .mapOverlay,
.mapStage .mapLocateBtn {
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.mapStage.is-ready .mapOverlay,
.mapStage.is-ready .mapLocateBtn {
  opacity: 1;
  visibility: visible;
}

#map {
  animation: none;
}

.mapFiltersPanel .chipRow {
  gap: 6px;
}

.mapFiltersPanel .chip {
  font-size: 12px;
  padding: 6px 10px;
}

.eventMiniCard__icon--literature {
  background: #f4f1ff;
  border-color: #ddd6ff;
}

.eventMiniCard__icon--gastronomy {
  background: #fff6ee;
  border-color: #f3d8bf;
}

.eventMiniCard--literature {
  border-left: 4px solid #ddd6ff;
}

.eventMiniCard--gastronomy {
  border-left: 4px solid #f3d8bf;
}

.chipRow--favorites {
  margin-bottom: 8px;
}

.chipRow--favorites .chip {
  font-weight: 600;
}

@media (max-width: 768px) {
  .day {
    display: block !important;
  }

  .day-number {
    display: block !important;
    font-size: 10.5px !important;
    margin: 0 0 3px 0 !important;
    line-height: 1.1 !important;
  }

  .event-more--mobile {
    display: inline-block !important;
    margin-top: 2px !important;
    vertical-align: top !important;
  }
}

.discoveryCard {
  margin-top: 16px;
}

.discoveryIntro {
  margin: 0 0 10px;
  opacity: 0.74;
  font-size: 14px;
}

.discoveryActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.discoveryActions button {
  margin: 0;
}

#discoveryResult {
  min-height: 36px;
}
.brandTitle a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.brandIcon {
  font-size: 14px;
  line-height: 1;
}
.brandTitle a,
.brandTitle a:visited,
.brandTitle a:hover,
.brandTitle a:active {
  color: inherit;
  text-decoration: none;
}
.brandTitle a {
  -webkit-tap-highlight-color: transparent;
}
.brandTitle a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brandTitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brandInstagramLink,
.brandInstagramLink:visited,
.brandInstagramLink:hover,
.brandInstagramLink:active {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.brandInstagramLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brandIcon {
  font-size: 14px;
  line-height: 1;
}

.brandText {
  color: inherit;
}
.brandInstagramLink,
.brandInstagramLink:visited,
.brandInstagramLink:hover,
.brandInstagramLink:active {
  color: inherit;
  text-decoration: none;
}

.brandInstagramLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.brandIcon {
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}

.brandInstagramLink *,
.brandInstagramLink *:visited,
.brandInstagramLink *:hover,
.brandInstagramLink *:active {
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .discoveryCard {
    margin-top: 10px;
    padding: 10px;
  }

  .discoveryCard .panelHeader h2 {
    font-size: 17px;
  }

  .discoveryIntro {
    font-size: 13px;
    margin: 0 0 8px;
  }

  .discoveryActions {
    gap: 8px;
    margin-bottom: 8px;
  }

  .discoveryActions button {
    padding: 7px 9px;
    font-size: 13px;
    border-radius: 9px;
  }

  .discoveryActions .primaryMapActionBtn {
    min-width: 0;
    padding: 8px 11px;
    font-size: 13px;
  }

  #discoveryResult {
    min-height: 28px;
  }

  #discoveryResult .eventMiniCard {
    padding: 8px 9px;
    margin-top: 6px;
  }

  #discoveryResult .eventMiniCard__icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  #discoveryResult .eventMiniCard__title {
    font-size: 0.9rem;
  }

  #discoveryResult .eventMiniCard__meta,
  #discoveryResult .eventMiniCard__status {
    font-size: 0.8rem;
  }

  #discoveryResult .eventMiniCard__actions {
    gap: 10px;
    margin-top: 7px;
    padding-top: 7px;
  }
}

.contactMiniLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  font-size: 12.5px;
  opacity: 0.72;
}

.contactMiniLink,
.contactMiniLink:visited,
.contactMiniLink:hover,
.contactMiniLink:active {
  color: inherit;
  text-decoration: none;
}

.contactMiniLink {
  transition: opacity var(--ui-fast), color var(--ui-fast);
}

.contactMiniLink:hover {
  opacity: 1;
  text-decoration: underline;
}

.contactMiniSep {
  opacity: 0.45;
}

@media (max-width: 768px) {
  .contactMiniLinks {
    gap: 6px;
    font-size: 12px;
    margin: 12px 0 2px;
  }
}
.contactMiniText {
  opacity: 0.72;
}

.contactMiniLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 6px;
  font-size: 12.5px;
  opacity: 0.72;
}
.placesGuideCard {
  max-width: 760px;
  margin: 16px auto 0;
}

.placesGuideAccordion {
  margin: 0;
}

.placesGuideBody {
  padding: 0 12px 12px;
  border-top: 1px solid #eee;
}

.placesGuideIntro {
  margin: 12px 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.66;
}

.venuesGuideSection + .venuesGuideSection {
  margin-top: 16px;
}

.venuesGuideTitle {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.venuesGuideList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.venuesGuideItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid #eee;
}

.venuesGuideItem:first-child {
  border-top: 0;
}

.venuesGuideMain {
  min-width: 0;
}

.venuesGuidePlace {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.28;
  letter-spacing: 0.005em;
}

.venuesGuideMeta {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  opacity: 0.6;
}

.venuesGuideActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  align-self: center;
}

.venuesGuideActions .linkBtn {
  min-height: 0;
  padding: 0;
  font-size: 12px;
  opacity: 0.68;
  white-space: nowrap;
}

.venuesGuideActions .linkBtn:hover {
  opacity: 1;
}

.venuesGuideMapBtn {
  font-weight: 600;
  line-height: 1.1;
}

.popupSub--secondary {
  margin-top: 3px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .placesGuideCard {
    max-width: 760px;
    margin: 12px auto 0;
  }

  .placesGuideBody {
    padding: 0 10px 10px;
  }

  .venuesGuideItem {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .venuesGuideMain {
    min-width: 0;
  }

  .venuesGuidePlace {
    font-size: 13px;
  }

  .venuesGuideMeta {
    font-size: 11px;
  }

  .venuesGuideActions {
    gap: 6px;
  }

  .venuesGuideActions .linkBtn {
    font-size: 11.5px;
  }
}
.venuesGuideCategory {
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.venuesGuideCategory:first-child {
  border-top: 0;
  padding-top: 0;
}

.venuesGuideCategorySummary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

.venuesGuideCategorySummary::-webkit-details-marker {
  display: none;
}

.venuesGuideCategorySummary::after {
  content: "▾";
  margin-left: auto;
  opacity: 0.6;
}

.venuesGuideCategory[open] .venuesGuideCategorySummary::after {
  content: "▴";
}

.venuesGuideCategory .venuesGuideList {
  margin-top: 2px;
}
.discoveryAccordion > summary {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.72;
  letter-spacing: 0.01em;
}

.discoveryAccordion > summary:hover {
  background: transparent;
  padding-left: 0;
  opacity: 0.9;
}
.discoveryCard {
  margin-top: 10px;
  padding: 8px 10px;
}
.discoveryActions {
  gap: 6px;
  margin-bottom: 8px;
}

.discoveryActions .primaryMapActionBtn,
#discoveryNextBtn,
#discoveryResetBtn {
  min-width: 0;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 9px;
  box-shadow: none;
}

.discoveryActions .primaryMapActionBtn {
  font-weight: 600;
}

@media (max-width: 768px) {
  .discoveryActions {
    gap: 6px;
  }

  .discoveryActions .primaryMapActionBtn,
  #discoveryNextBtn,
  #discoveryResetBtn {
    width: auto;
    padding: 6px 9px;
    font-size: 11.5px;
  }
}

.discoveryActions {
  gap: 6px;
  margin-bottom: 8px;
}

.discoveryActions .primaryMapActionBtn,
#discoveryNextBtn,
#discoveryResetBtn {
  min-width: 0;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 9px;
  box-shadow: none;
}

.discoveryActions .primaryMapActionBtn {
  font-weight: 600;
}

.festivalHeroCard {
  margin-bottom: 14px;
  border: 1px solid #ead7b1;
  background: linear-gradient(180deg, #fff8ec 0%, #ffffff 100%);
}

.festivalHeroTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.festivalHeroKicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.62;
  margin-bottom: 4px;
}

.festivalHeroTitle {
  margin: 0 0 4px;
  font-size: 20px;
}

.festivalHeroText {
  margin: 0;
  font-size: 14px;
  opacity: 0.78;
}

.festivalHeroStats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.festivalStat {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #ead7b1;
  font-size: 12px;
  font-weight: 700;
}

.festivalHeroActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
}

.festivalChip {
  font-weight: 700;
}

.festivalHeroHint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.68;
}

.festivalTicker {
  margin-top: 10px;
  overflow: hidden;
  min-height: 22px;
}

.festivalTicker__item {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(0);
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.festivalTicker__item.is-leaving {
  opacity: 0;
  transform: translateX(16px);
}

.festivalTicker__item.is-entering {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .festivalHeroCard {
    padding: 10px 11px;
    margin-bottom: 8px;
    border-radius: 12px;
  }

  .festivalHeroTop {
    gap: 8px;
  }

  .festivalHeroKicker {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .festivalHeroTitle {
    font-size: 16px;
    margin: 0 0 2px;
    line-height: 1.15;
  }

  .festivalHeroText {
    font-size: 12px;
    line-height: 1.3;
  }

  .festivalHeroStats {
    gap: 6px;
  }

  .festivalStat {
    padding: 5px 8px;
    font-size: 11px;
  }

  .festivalHeroActions {
    margin-top: 8px;
    gap: 6px;
  }

  .festivalChip {
    padding: 5px 8px;
    font-size: 12px;
  }

  .festivalHeroHint {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.25;
  }

  .festivalTicker {
    margin-top: 8px;
    min-height: 18px;
  }

  .festivalTicker__item {
    font-size: 11.5px;
  }
}