body.map-page { min-height: 100vh; color: var(--ink); background: #dad4c6; }
.map-page [hidden] { display: none !important; }
.map-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px max(24px, calc((100% - 1240px) / 2)); background: var(--cream); border-bottom: 1px solid var(--line); }
.map-brand { display: flex; align-items: center; gap: 13px; }
.map-brand img { width: 57px; height: 57px; object-fit: cover; border-radius: 50%; }
.map-brand span { display: grid; gap: 3px; }
.map-brand small { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.map-brand b { color: var(--forest); font: 500 1.15rem Impact, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.map-home { color: var(--olive); font-size: .7rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }

.map-loading { min-height: calc(100vh - 91px); display: grid; place-content: center; justify-items: center; gap: 17px; color: var(--muted); background: var(--night); }
.map-loading span { width: 42px; height: 42px; border: 3px solid rgba(216,186,121,.2); border-top-color: var(--gold); border-radius: 50%; animation: map-spin .8s linear infinite; }
.map-loading p { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
@keyframes map-spin { to { transform: rotate(360deg); } }

.access-gate { min-height: calc(100vh - 91px); display: grid; grid-template-columns: 1.15fr .85fr; background: var(--night); }
.access-image { position: relative; overflow: hidden; min-height: 620px; background: url('/assets/gallery/leopard-movimiento.jpg') center/cover; }
.access-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,14,7,.15), rgba(9,14,7,.86)); }
.access-image::after { content: ""; position: absolute; inset: 36px; border: 1px solid rgba(216,186,121,.28); background-image: linear-gradient(rgba(216,186,121,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(216,186,121,.07) 1px, transparent 1px); background-size: 46px 46px; }
.access-image span { position: absolute; z-index: 1; left: 70px; bottom: 60px; color: rgba(216,186,121,.35); font: 500 clamp(7rem, 15vw, 14rem)/1 Impact, sans-serif; }
.access-card { align-self: center; max-width: 570px; padding: 70px 70px 70px 45px; color: white; }
.access-card .kicker, .map-console-heading .kicker { color: var(--sand); }
.access-card h1, .map-console-heading h1 { color: white; font-size: clamp(3.6rem, 7vw, 6.8rem); }
.access-card > p:not(.kicker), .map-console-heading > div > p:not(.kicker) { color: rgba(255,255,255,.6); line-height: 1.7; }
.access-card form { display: grid; gap: 12px; margin-top: 32px; }
.access-card label { color: var(--sand); font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.access-card input { min-height: 54px; padding: 0 16px; border: 1px solid rgba(255,255,255,.2); color: white; background: rgba(255,255,255,.07); font: 700 1rem monospace; letter-spacing: .08em; text-transform: uppercase; outline: none; }
.access-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,162,75,.15); }
.access-card button { width: 100%; min-height: 50px; }
.access-card button:disabled { opacity: .55; cursor: wait; }
.access-message { min-height: 20px; margin: 0; color: #ef9e87; font-size: .76rem; }
.access-note { display: block; margin-top: 20px; color: rgba(255,255,255,.35); line-height: 1.5; }

.map-console-hero { position: relative; overflow: hidden; padding: 70px 0; color: white; background: var(--night) url('/assets/gallery/conduccion.jpg') center 44%/cover; }
.map-console-hero::before { content: ""; position: absolute; inset: 0; background: rgba(9,14,7,.78); }
.map-console-heading { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 60px; }
.map-console-heading > div:first-child { max-width: 760px; }
.map-console-heading h1 { margin-bottom: 18px; }
.map-session-card { min-width: 230px; display: grid; gap: 9px; padding: 23px; color: white; background: rgba(15,24,13,.88); border: 1px solid rgba(216,186,121,.4); }
.map-session-card span { color: var(--sand); font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
.map-session-card b { font: 500 2.5rem Impact, sans-serif; letter-spacing: .08em; }
.map-session-card button { justify-self: start; padding: 0; border: 0; color: rgba(255,255,255,.58); background: transparent; font-size: .65rem; font-weight: 900; text-transform: uppercase; cursor: pointer; }

.map-console-content { padding: 38px 0 90px; }
.map-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 28px; background: rgba(23,36,19,.16); border: 1px solid rgba(23,36,19,.16); }
.map-summary article { min-height: 112px; display: grid; align-content: center; gap: 7px; padding: 20px; background: var(--cream); }
.map-summary b { color: var(--olive); font: 500 2.25rem Impact, sans-serif; }
.map-summary span { color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.earth-days { margin-bottom: 28px; padding: 30px; color: white; background: var(--night); border-top: 4px solid var(--gold); }
.earth-days-heading { display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; gap: 45px; margin-bottom: 24px; }
.earth-days-heading .kicker { margin: 0 0 9px; color: var(--sand); }
.earth-days-heading h2 { color: white; font-size: clamp(2rem, 4vw, 3.5rem); }
.earth-days-heading > p { margin: 0; color: rgba(255,255,255,.58); font-size: .82rem; line-height: 1.65; }
.earth-day-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.earth-day-card { position: relative; min-height: 185px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; overflow: hidden; color: white; background: #1e2b1a; border: 1px solid rgba(216,186,121,.22); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.earth-day-card::after { content: ""; position: absolute; right: -19px; top: -17px; width: 82px; height: 82px; border: 1px solid rgba(216,186,121,.16); border-radius: 50%; }
.earth-day-card:hover { transform: translateY(-3px); border-color: var(--gold); background: #293922; }
.earth-day-card > span { display: grid; gap: 5px; }
.earth-day-card > span small { color: rgba(255,255,255,.45); font-size: .56rem; font-weight: 900; letter-spacing: .12em; }
.earth-day-card > span b { color: var(--sand); font: 500 1.65rem Impact, sans-serif; letter-spacing: .05em; }
.earth-day-card strong { display: flex; align-items: baseline; gap: 7px; font: 500 2.8rem Impact, sans-serif; }
.earth-day-card strong small { color: rgba(255,255,255,.5); font: 800 .61rem "Segoe UI", sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.earth-day-card .earth-window { color: rgba(255,255,255,.48); font-size: .58rem; font-weight: 900; letter-spacing: .08em; }
.earth-day-card em { color: var(--sand); font-size: .61rem; font-style: normal; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.earth-help { margin: 18px 0 0; color: rgba(255,255,255,.42); font-size: .67rem; line-height: 1.55; }
.map-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 24px; padding: 19px; background: var(--cream); border-left: 4px solid var(--gold); }
.day-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.day-filters button, .kml-button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-size: .66rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; }
.day-filters button.active { color: white; background: var(--olive); border-color: var(--olive); }
.map-toolbar-actions { display: flex; align-items: end; gap: 10px; }
.map-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: .6rem; font-weight: 900; text-transform: uppercase; }
.map-toolbar input { width: 250px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); background: white; }
.kml-button { display: grid; place-items: center; color: white; background: var(--forest); border-color: var(--forest); }
.location-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.location-card { --area-color: var(--olive); min-height: 340px; display: flex; flex-direction: column; padding: 22px; background: var(--cream); border-top: 5px solid var(--area-color); box-shadow: 0 15px 34px rgba(25,32,20,.08); scroll-margin-top: 30px; }
.location-card[data-area="Técnica"] { --area-color: #178184; }
.location-card[data-area="Física"] { --area-color: #c54743; }
.location-card[data-area="Combate"] { --area-color: #61758f; }
.location-card[data-area="Mantenimiento"] { --area-color: #5d8a39; }
.location-card[data-area="Colimación"] { --area-color: var(--gold); }
.location-card:target { outline: 4px solid var(--gold); outline-offset: 4px; }
.location-card-top { display: flex; align-items: center; justify-content: space-between; }
.location-card-top span { color: var(--gold); font: 500 1.5rem Impact, sans-serif; }
.location-card-top b { color: var(--muted); font-size: .62rem; letter-spacing: .12em; }
.location-card > p { margin: 24px 0 7px; color: var(--area-color); font-size: .65rem; font-weight: 900; letter-spacing: .1em; }
.location-card h2 { font-size: 1.8rem; line-height: 1.05; }
.location-time { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; color: var(--forest); font: 500 1.45rem Impact, sans-serif; letter-spacing: .04em; }
.location-time small { color: var(--muted); font: 900 .57rem "Segoe UI", sans-serif; letter-spacing: .1em; }
.location-card dl { display: grid; gap: 12px; margin: 25px 0; }
.location-card dl div { display: grid; grid-template-columns: 82px 1fr; gap: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.location-card dt { color: var(--muted); font-size: .58rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.location-card dd { margin: 0; font-size: .76rem; font-weight: 800; }
.location-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.location-actions a, .location-actions button { color: var(--olive); font-size: .61rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.location-actions button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.map-empty { grid-column: 1 / -1; padding: 35px; color: var(--muted); background: var(--cream); text-align: center; }

@media (max-width: 900px) {
  .access-gate { grid-template-columns: 1fr; }
  .access-image { min-height: 320px; }
  .access-card { max-width: none; padding: 55px max(24px, 8vw); }
  .map-console-heading { grid-template-columns: 1fr; align-items: start; }
  .map-summary { grid-template-columns: 1fr 1fr; }
  .earth-days-heading { grid-template-columns: 1fr; gap: 18px; }
  .earth-day-grid { grid-template-columns: 1fr 1fr; }
  .location-grid { grid-template-columns: 1fr 1fr; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .map-toolbar-actions { justify-content: space-between; }
}

@media (max-width: 620px) {
  .map-header { min-height: 76px; padding-inline: 14px; }
  .map-brand img { width: 48px; height: 48px; }
  .map-brand small { display: none; }
  .map-home { font-size: .58rem; }
  .access-image { min-height: 220px; }
  .access-image span { left: 28px; bottom: 22px; font-size: 6rem; }
  .access-image::after { inset: 18px; }
  .map-console-heading h1 { font-size: 4.2rem; }
  .map-summary { grid-template-columns: 1fr 1fr; }
  .map-summary article { min-height: 98px; padding: 15px; }
  .earth-days { padding: 23px 18px; }
  .earth-day-grid { grid-template-columns: 1fr; }
  .earth-day-card { min-height: 148px; }
  .map-toolbar-actions { align-items: stretch; flex-direction: column; }
  .map-toolbar input, .kml-button { width: 100%; }
  .location-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
