/* Fase 1: capa visual aislada. No contiene lógica de negocio. */
:root {
  --lb-forest: #19372f;
  --lb-pine: #2c4b40;
  --lb-moss: #697750;
  --lb-clay: #a85032;
  --lb-paper: #fffcf5;
  --lb-limestone: #f3f0e7;
  --lb-granite: #5e655f;
  --lb-line: #ded9cd;
  --lb-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --lb-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

/* Calendario: misma agenda y mismos estados, con una jerarquía de consulta más clara. */
.calendar-modern-page .calendar-modern-hero {
  background-color: var(--lb-forest);
  background-image: radial-gradient(ellipse at 82% 10%, rgba(197, 208, 174, .12), transparent 36%), linear-gradient(115deg, #19372f, #2c4b40 75%, #354c3c);
}
.calendar-modern-page .calendar-modern-hero:after {
  border-radius: 0;
  width: min(48vw, 650px);
  height: min(48vw, 650px);
  right: -12vw;
  bottom: -38vw;
  background: repeating-radial-gradient(ellipse at center, transparent 0 24px, rgba(243,240,231,.08) 25px 26px, transparent 27px 44px);
  transform: rotate(-18deg);
}
.calendar-modern-page .app-hero-inner { padding-block: clamp(48px, 7vw, 82px); }
.calendar-modern-page .app-kicker { color: #d7dfc7; letter-spacing: .2em; }
.calendar-modern-page .app-title { letter-spacing: .035em; }
.calendar-modern-page .calendar-page-content { width: min(1540px, calc(100% - clamp(24px, 5vw, 84px))); }
.calendar-modern-page .calendar-modern-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 18px 22px;
  padding: 26px 0 22px;
  border-bottom-color: var(--lb-line);
}
.calendar-modern-page .calendar-heading { min-width: 0; }
.calendar-modern-page .calendar-heading-kicker { color: var(--lb-moss); }
.calendar-modern-page .calendar-heading h2 { color: var(--lb-forest); font-size: clamp(34px, 4vw, 51px); }
.calendar-modern-page .calendar-view-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--lb-line);
  border-radius: 5px;
  background: #eeeadf;
}
.calendar-modern-page .calendar-view-switch .view-btn {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: .07em;
}
.calendar-modern-page .calendar-view-switch .view-btn.active { background: var(--lb-forest); color: white; }
.calendar-modern-page .month-nav { display: flex; gap: 7px; }
.calendar-modern-page .month-nav .app-btn,
.calendar-modern-page .month-picker .app-btn {
  min-height: 42px;
  border-radius: 4px;
}
.calendar-modern-page .month-nav .nav-arrow { width: 44px; font-size: 17px; }
.calendar-modern-page .month-nav .nav-today { min-width: 66px; }
.calendar-modern-page .month-picker {
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding-top: 2px;
}
.calendar-modern-page .month-picker label { color: var(--lb-granite); font-size: 12px; font-weight: 600; }
.calendar-modern-page .month-picker select {
  min-height: 40px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--lb-line);
  border-radius: 4px;
  color: var(--lb-forest);
  background: var(--lb-paper);
}
.calendar-modern-page .calendar-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.calendar-modern-page .calendar-filter {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  color: var(--lb-pine);
  background: var(--lb-paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.calendar-modern-page .calendar-filter.active { border-color: var(--lb-forest); color: #fff; background: var(--lb-forest); }
.calendar-modern-page .filter-dot { width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.calendar-modern-page .calendar {
  overflow: hidden;
  border: 1px solid var(--lb-line);
  border-radius: 8px;
  background: var(--lb-paper);
  box-shadow: 0 12px 36px rgba(25,55,47,.07);
}
.calendar-modern-page .calendar-head div {
  min-width: 0;
  padding: 12px 5px;
  color: #f8f5ec;
  background: var(--lb-forest);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}
.calendar-modern-page .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-modern-page .day {
  min-width: 0;
  min-height: 136px;
  padding: 10px;
  border-color: #e9e4d9;
  background: var(--lb-paper);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.calendar-modern-page .day:nth-child(7n),
.calendar-modern-page .day:nth-child(7n + 1) { background: #faf7f0; }
.calendar-modern-page .day:hover { background: #f1f1e8; }
.calendar-modern-page .day.today { background: #edf0e4; box-shadow: inset 0 0 0 2px #829065; }
.calendar-modern-page .day-num { display: flex; align-items: center; gap: 7px; color: var(--lb-forest); font: 600 17px/1 var(--lb-display); }
.calendar-modern-page .today-label { padding: 3px 6px; border-radius: 999px; color: #fff; background: var(--lb-moss); font: 700 8px/1.2 var(--lb-body); letter-spacing: .08em; }
.calendar-modern-page .day.blocked { background: #f0eee7; }
.calendar-modern-page .calendar-block-mark { border-radius: 4px; color: #64665c; background: #e6e3da; }
.calendar-modern-page .route-card {
  border-radius: 5px;
  box-shadow: 0 2px 7px rgba(25,55,47,.05);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.calendar-modern-page .route-card:hover,
.calendar-modern-page .route-card:focus-visible { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(25,55,47,.1); }
.calendar-modern-page .route-card:not(.private) { background: #edf0e4 !important; border-color: #d7ddc9 !important; border-left-color: var(--lb-moss) !important; color: #29382c; }
.calendar-modern-page .route-card.private { background: #f4e9e3 !important; border-color: #e4cfc4 !important; border-left-color: var(--lb-clay) !important; color: #57352d; }
.calendar-modern-page .route-card.article-calendar-card { background: #eaf0ed !important; border-color: #d1dfd9 !important; border-left-color: #58796c !important; color: #30473d; }
.calendar-modern-page .route-status { font-size: 9px; letter-spacing: .06em; }
.calendar-modern-page .route-tooltip { border-color: var(--lb-line); border-radius: 6px; color: var(--lb-forest); background: var(--lb-paper); }
.calendar-modern-page .calendar-legend { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 17px; color: var(--lb-granite); font-size: 12px; }
.calendar-modern-page .mobile-calendar-activity {
  margin-top: 20px;
  padding: clamp(17px, 3vw, 28px);
  border: 1px solid var(--lb-line);
  border-radius: 8px;
  background: var(--lb-paper);
  box-shadow: 0 12px 36px rgba(25,55,47,.06);
}
.calendar-modern-page .mobile-activity-head { gap: 14px; }
.calendar-modern-page .mobile-activity-head h3 { color: var(--lb-forest); font: 600 30px/1 var(--lb-display); }
.calendar-modern-page .mobile-activity-count { flex: 0 0 auto; color: var(--lb-moss); }
.calendar-modern-page .mobile-activity-hint { color: var(--lb-granite); }
.calendar-modern-page .mobile-activity-list { gap: 10px; }
.calendar-modern-page .mobile-activity-card {
  min-height: 96px;
  border: 1px solid #d7ddc9;
  border-radius: 6px;
  background: #edf0e4;
  box-shadow: 0 2px 8px rgba(25,55,47,.04);
  transition: transform .16s ease, box-shadow .16s ease;
}
.calendar-modern-page .mobile-activity-card:hover,
.calendar-modern-page .mobile-activity-card:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(25,55,47,.1); }
.calendar-modern-page .mobile-activity-card.article { border-color: #d1dfd9; background: #eaf0ed; }
.calendar-modern-page .mobile-activity-card .mobile-activity-type { color: var(--lb-moss); letter-spacing: .08em; }
.calendar-modern-page .mobile-activity-card.route .mobile-activity-type { color: var(--lb-forest); }
.calendar-modern-page .mobile-activity-card .mobile-activity-date-label { color: var(--lb-granite); }
.calendar-modern-page .calendar-load-warning { padding: 24px; color: #6c4135; background: #f4e9e3; }
.calendar-modern-page :focus-visible { outline: 3px solid #a85032; outline-offset: 3px; }

@media (min-width: 1100px) {
  .calendar-modern-page .calendar-modern-toolbar { grid-template-columns: minmax(240px, 1fr) auto auto; }
}
@media (max-width: 900px) {
  .calendar-modern-page .calendar-modern-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .calendar-modern-page .calendar-heading { grid-column: 1 / -1; }
  .calendar-modern-page .month-picker { justify-content: flex-start; }
  .calendar-modern-page .day { min-height: 110px; padding: 7px; }
}
@media (max-width: 700px) {
  .calendar-modern-page .calendar-page-content { width: calc(100% - 32px); padding-top: 22px; }
  .calendar-modern-page .calendar-modern-toolbar { grid-template-columns: 1fr; align-items: stretch; gap: 13px; }
  .calendar-modern-page .calendar-heading { grid-column: auto; }
  .calendar-modern-page .calendar-view-switch { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .calendar-modern-page .calendar-view-switch .view-btn { min-width: 0; padding-inline: 5px; }
  .calendar-modern-page .month-nav { display: grid; grid-template-columns: 1fr 1.25fr 1fr; }
  .calendar-modern-page .month-picker { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr) auto; gap: 6px; }
  .calendar-modern-page .month-picker label { font-size: 11px; }
  .calendar-modern-page .month-picker select { min-width: 0; width: 100%; }
  .calendar-modern-page .calendar { border-radius: 6px; }
  .calendar-modern-page .month-view { display: none; }
  .calendar-modern-page .calendar-filters { margin-top: 17px; }
  .calendar-modern-page .calendar-filter { min-height: 42px; flex: 1 1 auto; justify-content: center; }
  .calendar-modern-page .calendar-legend { gap: 10px 15px; font-size: 11px; }
  .calendar-modern-page .mobile-activity-card { grid-template-columns: 68px minmax(0,1fr) auto; padding: 8px; }
  .calendar-modern-page .mobile-activity-media { width: 68px; height: 68px; }
  .calendar-modern-page .mobile-activity-copy { min-width: 0; }
  .calendar-modern-page .mobile-activity-copy strong { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .calendar-modern-page .calendar-page-content { width: calc(100% - 24px); }
  .calendar-modern-page .month-picker { grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); }
  .calendar-modern-page .month-picker #goPeriod { grid-column: 1 / -1; }
  .calendar-modern-page .mobile-activity-card { grid-template-columns: 58px minmax(0,1fr); }
  .calendar-modern-page .mobile-activity-media { width: 58px; height: 58px; }
  .calendar-modern-page .mobile-activity-date-label { grid-column: 2; }
  .calendar-modern-page .mobile-activity-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .calendar-modern-page *, .calendar-modern-page *::before, .calendar-modern-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Ficha de ruta: tratamiento editorial con los datos y widgets existentes. */
.route-reference-page .route-hero {
  width: 100%;
  height: auto;
  min-height: clamp(450px, 56vw, 680px);
  margin: 0;
  align-items: flex-end;
  background: var(--lb-forest);
}
.route-reference-page .route-hero-image { z-index: 0; background-image: url('assets/guadarrama-panorama.webp'); background-position: center 48%; filter: saturate(.9) contrast(.96); }
.route-reference-page .route-cover-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(.9) contrast(.96);
}
.route-reference-page .route-cover-photo[hidden] { display: none; }
.route-reference-page .route-hero-overlay {
  display: block;
  z-index: 1;
  background: linear-gradient(90deg, rgba(13,31,25,.78), rgba(17,38,31,.35) 58%, rgba(17,38,31,.04)), linear-gradient(0deg, rgba(10,25,20,.78), transparent 75%);
}
.route-reference-page .route-hero-inner {
  z-index: 2;
  width: min(1240px, calc(100% - clamp(32px, 8vw, 120px)));
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(88px, 12vw, 150px) 0 clamp(42px, 6vw, 78px);
}
.route-reference-page .route-reference-kicker { color: #d6dfc7; letter-spacing: .2em; }
.route-reference-page .route-hero-title {
  max-width: 1050px;
  color: #fffefa;
  font-size: clamp(56px, 9vw, 112px);
  line-height: .88;
  letter-spacing: .005em;
  text-wrap: balance;
}
.route-reference-page .route-hero-rule { width: clamp(44px, 6vw, 78px); margin: 24px 0 14px; background: #cf967b; }
.route-reference-page .route-hero-lead { color: #eeeade; font-size: clamp(14px, 1.6vw, 18px); letter-spacing: .13em; }
.route-reference-page .route-anchor-wrap {
  position: sticky;
  top: 82px;
  z-index: 40;
  border-bottom: 1px solid rgba(25,55,47,.14);
  background: rgba(255,252,245,.97);
  box-shadow: 0 5px 17px rgba(25,55,47,.055);
  backdrop-filter: blur(10px);
}
.route-reference-page .route-anchor-inner {
  width: min(1240px, calc(100% - clamp(32px, 8vw, 120px)));
  min-height: 58px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(17px, 3vw, 36px);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #a7ad91 transparent;
}
.route-reference-page .route-anchor-inner a {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #425147;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.route-reference-page .route-anchor-inner a::after { position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; content: ''; background: var(--lb-clay); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.route-reference-page .route-anchor-inner a:hover,
.route-reference-page .route-anchor-inner a:focus-visible { color: var(--lb-clay); }
.route-reference-page .route-anchor-inner a:hover::after,
.route-reference-page .route-anchor-inner a:focus-visible::after { transform: scaleX(1); }
.route-reference-page .route-detail { width: 100%; max-width: none; padding: 0; background: var(--lb-paper); }
.route-reference-page .route-content-inner { width: min(1240px, calc(100% - clamp(32px, 8vw, 120px))); margin-inline: auto; padding: clamp(32px, 5vw, 65px) 0 clamp(64px, 8vw, 100px); }
.route-reference-page #content > .locked { width: min(900px, calc(100% - 36px)); margin: clamp(42px, 7vw, 82px) auto; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--lb-line); border-left: 4px solid var(--lb-moss); border-radius: 5px; color: var(--lb-forest); background: #f6f3ea; box-shadow: 0 8px 28px rgba(25,55,47,.055); }
.route-reference-page #content > .locked h2 { margin-top: 0; color: var(--lb-forest); font: 600 clamp(29px, 4vw, 42px)/1 var(--lb-display); }
.route-reference-page #content > .locked p { color: var(--lb-granite); line-height: 1.65; }
.route-reference-page .route-section { min-width: 0; margin: 0 0 clamp(54px, 8vw, 92px); scroll-margin-top: 155px; }
.route-reference-page .route-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin: 0 0 22px; }
.route-reference-page .route-section-heading h2 { margin: 0; color: var(--lb-forest); font: 600 clamp(34px, 4.4vw, 56px)/.94 var(--lb-display); letter-spacing: .01em; text-transform: uppercase; }
.route-reference-page .route-section-index { color: var(--lb-moss); font: 700 10px/1.4 var(--lb-body); letter-spacing: .14em; text-transform: uppercase; }
.route-reference-page .route-subheading { display: block; margin: 0 0 16px; }
.route-reference-page .route-subheading h3 { margin: 5px 0 0; color: var(--lb-forest); font: 600 30px/1 var(--lb-display); }
.route-reference-page .route-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 0 clamp(32px, 5vw, 56px);
  border: 1px solid var(--lb-line);
  border-radius: 7px;
  background: #f6f3ea;
  box-shadow: 0 7px 24px rgba(25,55,47,.045);
}
.route-reference-page .meta-item { min-width: 0; min-height: 108px; display: flex; align-items: center; gap: 12px; padding: 17px clamp(10px, 1.7vw, 23px); border-right: 1px solid var(--lb-line); background: transparent; }
.route-reference-page .meta-item:last-child { border-right: 0; }
.route-reference-page .meta-item > div { min-width: 0; }
.route-reference-page .meta-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: var(--lb-moss); background: #e9ecdf; border-radius: 50%; }
.route-reference-page .meta-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.route-reference-page .meta-item > div > span { display: block; color: var(--lb-granite); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.route-reference-page .meta-item strong { display: block; margin-top: 4px; color: var(--lb-forest); font: 600 clamp(19px, 2vw, 25px)/1.05 var(--lb-display); overflow-wrap: anywhere; }
.route-reference-page .meta-item small { display: block; margin-top: 4px; color: var(--lb-granite); font-size: 10px; }
.route-reference-page .difficulty-dots { margin-top: 5px; }
.route-reference-page .route-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .75fr); gap: clamp(28px, 6vw, 82px); align-items: start; }
.route-reference-page .route-story { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.route-reference-page .route-story .route-section-heading h3 { font-size: 30px; }
.route-reference-page .rich-public-content { color: #465249; font: 400 17px/1.78 var(--lb-body); }
.route-reference-page .rich-public-content p { margin: 0 0 1.1em; }
.route-reference-page .rich-public-content h2,
.route-reference-page .rich-public-content h3 { color: var(--lb-forest); font-family: var(--lb-display); line-height: 1.05; }
.route-reference-page .route-notes { margin-top: 22px; padding: 17px 19px; border-left: 3px solid var(--lb-moss); color: #4d574f; background: #f2f0e7; }
.route-reference-page .route-notes strong { color: var(--lb-forest); }
.route-reference-page .route-meeting-card { padding: clamp(21px, 3vw, 31px); border: 1px solid #d8d8c8; border-top: 3px solid var(--lb-moss); background: #f2f3e9; }
.route-reference-page .route-meeting-card h3 { margin: 12px 0 8px; color: var(--lb-forest); font: 600 28px/1 var(--lb-display); }
.route-reference-page .route-meeting-card p { margin: 0; color: #465249; font-size: 15px; line-height: 1.6; }
.route-reference-page .route-meeting-card .meeting-link { margin-top: 18px; border-radius: 4px; color: #fff; background: var(--lb-forest); font-size: 12px; }
.route-reference-page .route-meeting-card .meeting-link:hover { background: var(--lb-pine); }
.route-reference-page .route-anchor-target { scroll-margin-top: 155px; }
.route-reference-page .route-climate-hourly {
  margin: 0 0 clamp(54px, 8vw, 92px);
  overflow: hidden;
  border: 1px solid var(--lb-line);
  border-radius: 7px;
  background: #f3f0e7;
  box-shadow: 0 8px 28px rgba(25,55,47,.055);
  scroll-margin-top: 155px;
}
.route-reference-page .route-climate-hourly .climate-head { padding: 20px clamp(18px, 3vw, 30px) 15px; border-color: var(--lb-line); }
.route-reference-page .route-climate-hourly .climate-head h2 { color: var(--lb-forest); font: 600 29px/1 var(--lb-display); }
.route-reference-page .route-climate-hourly .climate-head p { color: var(--lb-granite); font: 600 12px/1.3 var(--lb-body); }
.route-reference-page .route-climate-hourly .climate-head time { color: var(--lb-granite); font-family: var(--lb-body); }
.route-reference-page .climate-hours-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
.route-reference-page .climate-hour-card { padding: 18px 10px; border-color: var(--lb-line); }
.route-reference-page .climate-hour-condition { color: var(--lb-moss); }
.route-reference-page .climate-hour-detail { border-color: rgba(25,55,47,.1); }
.route-reference-page .climate-hours-note { color: var(--lb-granite); border-color: var(--lb-line); }
.route-reference-page .climate-unavailable { color: var(--lb-granite); }
.route-reference-page .route-track-block { margin-top: 0; }
.route-reference-page .route-track-section { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 0; overflow: hidden; margin: 0 0 18px; padding: 0; border: 1px solid var(--lb-line); border-radius: 7px; background: #f6f3ea; box-shadow: 0 8px 28px rgba(25,55,47,.055); }
.route-reference-page .track-map-wrap { min-width: 0; height: auto; min-height: 430px; border: 0; border-right: 1px solid var(--lb-line); border-radius: 0; }
.route-reference-page .route-map { width: 100%; height: 100%; min-height: 430px; }
.route-reference-page .route-map .leaflet-control-zoom { margin: 14px 0 0 14px; }
.route-reference-page .map-google,
.route-reference-page .map-fullscreen { border-radius: 4px; color: var(--lb-forest); font-family: var(--lb-body); }
.route-reference-page .map-google { right: 13px; }
.route-reference-page .map-fullscreen { right: 13px; bottom: 13px; }
.route-reference-page .elevation-profile { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(18px, 2.5vw, 29px); border: 0; border-radius: 0; background: #f6f3ea; }
.route-reference-page .elevation-profile-heading { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.route-reference-page .elevation-profile-heading strong { color: var(--lb-forest); font: 600 28px/1 var(--lb-display); }
.route-reference-page .elevation-profile-chart { height: auto; min-height: 160px; padding: 0; }
.route-reference-page .elevation-profile-chart svg { width: 100%; height: auto; min-height: 145px; }
.route-reference-page .profile-line { stroke: var(--lb-moss); stroke-width: 3; }
.route-reference-page .profile-axis { padding-inline: 20px; color: var(--lb-granite); font-family: var(--lb-body); }
.route-reference-page .track-summary { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; margin-top: 12px; border-color: var(--lb-line); }
.route-reference-page .track-summary > div { min-height: 53px; padding: 8px; border-color: var(--lb-line); background: #f6f3ea; }
.route-reference-page .track-summary svg { stroke: var(--lb-moss); }
.route-reference-page .track-summary span { color: var(--lb-granite); }
.route-reference-page .track-summary strong { color: var(--lb-forest); }
.route-reference-page .route-gpx-box { margin: 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--lb-line); border-left: 3px solid var(--lb-clay); border-radius: 6px; background: #fbf8f0; }
.route-reference-page .route-gpx-box .route-subheading { margin-bottom: 14px; }
.route-reference-page .route-gpx-box .gpx-file-card { border-color: var(--lb-line); border-radius: 4px; background: var(--lb-paper); }
.route-reference-page .route-gpx-box .gpx-download { min-height: 46px; border-radius: 4px; background: var(--lb-forest); }
.route-reference-page .route-gpx-box .gpx-download:hover { background: var(--lb-pine); }
.route-reference-page .route-track-unavailable { padding: 18px 20px; border: 1px dashed #c8c4b8; color: var(--lb-granite); background: #f7f5ee; }
.route-reference-page .route-photos-full { margin-top: 0; }
.route-reference-page .photos-heading-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -9px 0 18px; color: var(--lb-granite); font-size: 13px; }
.route-reference-page .photo-nav-group { display: flex; gap: 7px; }
.route-reference-page .photo-nav { width: 42px; height: 42px; border: 1px solid var(--lb-line); border-radius: 50%; color: var(--lb-forest); background: var(--lb-paper); box-shadow: none; }
.route-reference-page .photo-nav:hover { border-color: var(--lb-moss); color: #fff; background: var(--lb-moss); }
.route-reference-page .photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; overflow: hidden; padding: 2px; }
.route-reference-page .photo-strip img { width: 100%; height: clamp(190px, 24vw, 300px); border: 1px solid rgba(25,55,47,.1); border-radius: 3px; object-fit: cover; }
.route-reference-page .route-video-section { padding: 0; border: 0; background: transparent; box-shadow: none; }
.route-reference-page .video-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.route-reference-page .video-card { min-width: 0; overflow: hidden; border: 1px solid var(--lb-line); border-radius: 5px; background: #f5f2e9; }
.route-reference-page .video-frame { aspect-ratio: 16 / 9; }
.route-reference-page .video-frame iframe { width: 100%; height: 100%; border: 0; }
.route-reference-page .video-link { display: inline-flex; min-height: 42px; align-items: center; padding: 10px 14px; color: var(--lb-forest); font-size: 12px; font-weight: 700; text-decoration: none; }
.route-reference-page .route-chronicle-full { max-width: 920px; margin: 0 auto clamp(54px, 8vw, 92px); padding: 0; border: 0; }
.route-reference-page .route-chronicle-full .rich-public-content { max-width: 800px; }
.route-reference-page .route-comments { margin: 0; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--lb-line); border-radius: 7px; background: #f4f1e8; }
.route-reference-page .comments-list { max-width: 960px; }
.route-reference-page .comment-card { border-color: var(--lb-line); border-radius: 4px; background: var(--lb-paper); }
.route-reference-page .comment-form { max-width: 960px; border-color: var(--lb-line); border-radius: 4px; background: #faf8f1; }
.route-reference-page .comment-form input,
.route-reference-page .comment-form textarea { border-color: #c9cbbf; border-radius: 3px; background: #fffefa; }
.route-reference-page .route-content-inner > .route-section { animation: lb-route-arrive .35s ease both; }
.route-reference-page .route-content-inner > .route-section:nth-of-type(2) { animation-delay: .03s; }
.route-reference-page .route-content-inner > .route-section:nth-of-type(3) { animation-delay: .06s; }
.route-reference-page .route-content-inner > .route-section:nth-of-type(4) { animation-delay: .09s; }
.route-reference-page :focus-visible { outline: 3px solid var(--lb-clay); outline-offset: 3px; }
@keyframes lb-route-arrive { from { opacity: .88; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* Explorador del mapa: los tracks, datos y destinos siguen viniendo de las rutas públicas existentes. */
.home-map-section { overflow: hidden; color: var(--lb-forest); background: #eeece3; }
.home-map-section .home-map-inner { width: min(1480px, calc(100% - clamp(28px, 6vw, 96px))); margin-inline: auto; }
.home-map-section .home-map-heading { margin-bottom: clamp(24px, 4vw, 40px); }
.home-map-section .home-map-heading h2 { color: var(--lb-forest); }
.home-map-section .home-map-heading p { color: var(--lb-granite); }
.home-map-section .home-map-layout { display: grid; grid-template-columns: minmax(255px, .34fr) minmax(0, .66fr); gap: 17px; align-items: stretch; }
.home-map-section .home-map-sidebar { min-width: 0; overflow: hidden; border: 1px solid #d8d5ca; border-radius: 6px; background: var(--lb-paper); box-shadow: 0 7px 24px rgba(25,55,47,.06); }
.home-map-section .home-map-controls { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 18px; border-bottom: 1px solid var(--lb-line); background: #f7f4ec; }
.home-map-section .home-map-controls label { margin-top: 4px; color: var(--lb-moss); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.home-map-section .home-map-controls input,
.home-map-section .home-map-controls select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #d4d1c4; border-radius: 3px; color: var(--lb-forest); background: #fffefa; }
.home-map-section .home-map-controls input:focus-visible,
.home-map-section .home-map-controls select:focus-visible { outline: 3px solid rgba(168,80,50,.35); border-color: var(--lb-clay); }
.home-map-section .home-map-list { max-height: 550px; overflow: auto; padding: 6px 10px 10px; scrollbar-color: #a7ad91 #f1eee6; }
.home-map-section .home-map-route { min-height: 61px; border-bottom: 1px solid #ece8df; color: var(--lb-forest); background: transparent; transition: background .16s ease, border-color .16s ease; }
.home-map-section .home-map-route:hover,
.home-map-section .home-map-route:focus-visible,
.home-map-section .home-map-route.active { border-radius: 3px; background: #eff1e7; }
.home-map-section .home-map-route.active { box-shadow: inset 3px 0 var(--lb-clay); }
.home-map-section .home-map-route-dot { border: 2px solid var(--lb-paper); box-shadow: 0 0 0 1px var(--route-color); }
.home-map-section .home-map-route-copy { min-width: 0; }
.home-map-section .home-map-route-copy strong { color: var(--lb-forest); font-size: 13px; line-height: 1.25; }
.home-map-section .home-map-route-copy small { color: var(--lb-granite); font-size: 10px; }
.home-map-section .home-map-main { min-width: 0; }
.home-map-section .home-route-map { min-height: clamp(440px, 48vw, 650px); border: 1px solid #d2d2c7; border-radius: 6px; box-shadow: 0 7px 24px rgba(25,55,47,.08); }
.home-map-section .leaflet-container { font-family: var(--lb-body); }
.home-map-section .leaflet-control-zoom { overflow: hidden; border: 1px solid #d6d2c6 !important; border-radius: 4px !important; box-shadow: 0 2px 12px rgba(25,55,47,.14) !important; }
.home-map-section .leaflet-control-zoom a { color: var(--lb-forest) !important; }
.home-map-section .leaflet-popup-content-wrapper,
.home-map-section .leaflet-popup-tip { color: var(--lb-forest); background: var(--lb-paper); }
.home-map-section .leaflet-popup-content { font-size: 12px; line-height: 1.55; }
.home-map-section .leaflet-popup-content a { color: var(--lb-clay); font-weight: 700; }
.home-map-section .home-map-track-tooltip { border: 1px solid var(--lb-line); border-radius: 3px; color: var(--lb-forest); background: var(--lb-paper); box-shadow: 0 3px 12px rgba(25,55,47,.15); font-weight: 700; }
.home-map-section .home-map-map-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 11px 3px 4px; }
.home-map-section .home-map-map-actions > span { display: inline-flex; align-items: center; gap: 8px; color: var(--lb-granite); font-size: 11px; }
.home-map-section .home-map-map-actions > span i { width: 9px; height: 9px; border-radius: 50%; background: var(--lb-moss); }
.home-map-section .home-map-toggle-tracks { min-height: 42px; padding: 9px 13px; border: 1px solid #bdc4b3; border-radius: 3px; color: var(--lb-forest); background: var(--lb-paper); font-size: 11px; font-weight: 700; cursor: pointer; }
.home-map-section .home-map-toggle-tracks:hover,
.home-map-section .home-map-toggle-tracks.is-hidden { border-color: var(--lb-forest); color: #fff; background: var(--lb-forest); }
.home-map-section .home-map-selected { position: relative; display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 0; overflow: hidden; margin-top: 12px; border: 1px solid var(--lb-line); border-radius: 5px; background: var(--lb-paper); box-shadow: 0 5px 18px rgba(25,55,47,.06); animation: lb-map-card-arrive .18s ease both; }
.home-map-section .home-map-selected[hidden] { display: none; }
.home-map-section .home-map-selected:not(.has-photo) { grid-template-columns: minmax(0,1fr); }
.home-map-section .home-map-selected-photo { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.home-map-section .home-map-selected-copy { min-width: 0; padding: 18px 22px; }
.home-map-section .home-map-selected-close { position: absolute; z-index: 1; top: 8px; right: 8px; width: 36px; height: 36px; border: 1px solid var(--lb-line); border-radius: 50%; color: var(--lb-forest); background: rgba(255,252,245,.95); font-size: 22px; cursor: pointer; }
.home-map-section .home-map-selected-kicker { color: var(--lb-moss); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.home-map-section .home-map-selected-copy h3 { max-width: calc(100% - 30px); margin: 5px 0 2px; color: var(--lb-forest); font: 600 28px/1 var(--lb-display); }
.home-map-section .home-map-selected-date { margin: 0; color: var(--lb-granite); font-size: 12px; }
.home-map-section .home-map-selected-copy dl { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 14px 0; }
.home-map-section .home-map-selected-copy dl div { display: grid; gap: 2px; }
.home-map-section .home-map-selected-copy dt { color: var(--lb-granite); font-size: 10px; }
.home-map-section .home-map-selected-copy dd { margin: 0; color: var(--lb-forest); font-size: 13px; font-weight: 700; }
.home-map-section .home-map-open-route { display: inline-flex; min-height: 42px; align-items: center; gap: 10px; padding: 10px 14px; color: #fff; background: var(--lb-forest); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-decoration: none; }
.home-map-section .home-map-open-route:hover { background: var(--lb-clay); }
.home-map-section .home-map-status { margin: 8px 2px 0; color: var(--lb-granite); font-size: 11px; }
@keyframes lb-map-card-arrive { from { opacity: .88; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
  .route-reference-page .route-meta { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .route-reference-page .meta-item:nth-child(3) { border-right: 0; }
  .route-reference-page .meta-item:nth-child(n+4) { border-top: 1px solid var(--lb-line); }
  .home-map-section .home-map-layout { grid-template-columns: minmax(0,1fr); }
  .home-map-section .home-map-list { max-height: 320px; }
}
@media (max-width: 760px) {
  .route-reference-page .route-anchor-wrap { top: 68px; }
  .route-reference-page .route-anchor-inner { width: calc(100% - 28px); min-height: 53px; gap: 21px; }
  .route-reference-page .route-content-inner { width: calc(100% - 36px); }
  .route-reference-page .route-overview-grid { grid-template-columns: 1fr; gap: 25px; }
  .route-reference-page .route-meeting-card { max-width: none; }
  .route-reference-page .route-track-section { grid-template-columns: 1fr; }
  .route-reference-page .track-map-wrap { min-height: 370px; border-right: 0; border-bottom: 1px solid var(--lb-line); }
  .route-reference-page .route-map { min-height: 370px; }
  .route-reference-page .climate-hours-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .route-reference-page .climate-hour-card:nth-child(3n) { border-right: 0; }
  .route-reference-page .climate-hour-card:nth-child(n+4) { border-top: 1px solid var(--lb-line); }
  .route-reference-page .video-grid { grid-template-columns: 1fr; }
  .route-reference-page .route-comments { padding: 20px; }
  .home-map-section .home-map-layout { grid-template-columns: 1fr; }
  .home-map-section .home-map-list { max-height: 320px; }
  .home-map-section .home-route-map { min-height: 430px; }
}
@media (max-width: 520px) {
  .route-reference-page .route-hero { min-height: 470px; }
  .route-reference-page .route-hero-inner { width: calc(100% - 34px); padding: 90px 0 37px; }
  .route-reference-page .route-hero-title { font-size: clamp(50px, 14vw, 72px); }
  .route-reference-page .route-hero-lead { font-size: 12px; letter-spacing: .1em; }
  .route-reference-page .route-section { margin-bottom: 54px; }
  .route-reference-page .route-section-heading { gap: 5px 11px; }
  .route-reference-page .route-section-heading h2 { font-size: 39px; }
  .route-reference-page .route-section-index { font-size: 9px; }
  .route-reference-page .route-meta { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .route-reference-page .meta-item { min-height: 86px; padding: 12px 9px; gap: 8px; }
  .route-reference-page .meta-item:nth-child(odd) { border-right: 1px solid var(--lb-line); }
  .route-reference-page .meta-item:nth-child(even) { border-right: 0; }
  .route-reference-page .meta-item:nth-child(n+3) { border-top: 1px solid var(--lb-line); }
  .route-reference-page .meta-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .route-reference-page .meta-icon svg { width: 16px; height: 16px; }
  .route-reference-page .meta-item strong { font-size: 20px; }
  .route-reference-page .rich-public-content { font-size: 16px; line-height: 1.7; }
  .route-reference-page .track-map-wrap,
  .route-reference-page .route-map { min-height: 330px; }
  .route-reference-page .elevation-profile { padding: 17px 13px; }
  .route-reference-page .track-summary > div { padding: 7px 5px; grid-template-columns: 19px 1fr; column-gap: 4px; }
  .route-reference-page .track-summary svg { width: 17px; height: 17px; }
  .route-reference-page .track-summary strong { font-size: 12px; }
  .route-reference-page .climate-hours-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .route-reference-page .climate-hour-card:nth-child(3n) { border-right: 1px solid var(--lb-line); }
  .route-reference-page .climate-hour-card:nth-child(2n) { border-right: 0; }
  .route-reference-page .climate-hour-card:nth-child(n+3) { border-top: 1px solid var(--lb-line); }
  .route-reference-page .photo-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .route-reference-page .photo-strip img { height: 220px; }
  .route-reference-page .route-comments { padding: 17px 13px; }
  .route-reference-page .comment-form { padding: 16px 12px; }
  .home-map-section .home-map-inner { width: calc(100% - 28px); }
  .home-map-section .home-map-controls { grid-template-columns: 1fr 1fr; gap: 7px 10px; padding: 14px; }
  .home-map-section .home-map-controls label { grid-column: 1 / -1; margin-top: 5px; }
  .home-map-section .home-map-controls input,
  .home-map-section .home-map-controls select { grid-column: 1 / -1; }
  .home-map-section .home-route-map { min-height: 360px; }
  .home-map-section .home-map-selected { grid-template-columns: 82px minmax(0,1fr); }
  .home-map-section .home-map-selected-photo { min-height: 100%; }
  .home-map-section .home-map-selected-copy { padding: 15px 13px; }
  .home-map-section .home-map-selected-copy h3 { font-size: 23px; }
  .home-map-section .home-map-selected-copy dl { gap: 8px 13px; }
  .home-map-section .home-map-selected-copy dt { font-size: 9px; }
  .home-map-section .home-map-selected-copy dd { font-size: 11px; }
  .home-map-section .home-map-selected:not(.has-photo) { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .route-reference-page .photo-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .route-reference-page *, .route-reference-page *::before, .route-reference-page *::after,
  .home-map-section *, .home-map-section *::before, .home-map-section *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Fase 1 · administración: presentación más clara sin cambiar controles ni flujos. */
body.admin-mode-main,
body.admin-mode-routes,
body.admin-mode-articles,
body.admin-mode-blocks {
  --lb-admin-forest: #19372f;
  --lb-admin-pine: #2c4b40;
  --lb-admin-moss: #697750;
  --lb-admin-clay: #a85032;
  --lb-admin-paper: #fffcf5;
  --lb-admin-stone: #e3dfd4;
  --lb-admin-ink: #27352f;
  background: #f2efe6;
  color: var(--lb-admin-ink);
}

body.admin-mode-main .topbar,
body.admin-mode-routes .topbar,
body.admin-mode-articles .topbar,
body.admin-mode-blocks .topbar {
  min-height: 78px;
  box-shadow: 0 5px 20px rgba(17, 38, 31, .14);
}

body.admin-mode-main .brand img,
body.admin-mode-routes .brand img,
body.admin-mode-articles .brand img,
body.admin-mode-blocks .brand img {
  width: auto;
  height: 48px;
  object-fit: contain;
  border-radius:50%;
}

body.admin-mode-main .app-hero,
body.admin-mode-routes .app-hero,
body.admin-mode-articles .app-hero,
body.admin-mode-blocks .app-hero {
  min-height: 0;
  padding: clamp(30px, 4.5vw, 60px) 24px clamp(34px, 5vw, 68px);
  background:
    radial-gradient(ellipse at 83% 16%, rgba(181, 153, 101, .17), transparent 34%),
    linear-gradient(118deg, #17362e 0%, #24483d 58%, #526342 100%);
  color: #fffdf6;
}

body.admin-mode-main .app-hero::after,
body.admin-mode-routes .app-hero::after,
body.admin-mode-articles .app-hero::after,
body.admin-mode-blocks .app-hero::after {
  opacity: .15;
  background-size: 340px 220px;
}

body.admin-mode-main .app-hero-inner,
body.admin-mode-routes .app-hero-inner,
body.admin-mode-articles .app-hero-inner,
body.admin-mode-blocks .app-hero-inner {
  width: min(1440px, 100%);
}

body.admin-mode-main .app-kicker,
body.admin-mode-routes .app-kicker,
body.admin-mode-articles .app-kicker,
body.admin-mode-blocks .app-kicker {
  color: #d7c7a1;
}

body.admin-mode-main .app-title,
body.admin-mode-routes .app-title,
body.admin-mode-articles .app-title,
body.admin-mode-blocks .app-title {
  max-width: 900px;
  color: #fffdf6;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .98;
}

body.admin-mode-main .app-lead,
body.admin-mode-routes .app-lead,
body.admin-mode-articles .app-lead,
body.admin-mode-blocks .app-lead {
  max-width: 700px;
  color: rgba(255, 253, 246, .8);
}

.admin-wrap {
  width: min(1500px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 0 82px;
}

.admin-wrap > #msg:empty { display: none; }
.admin-wrap > #msg:not(:empty),
.admin-msg,
.admin-error {
  border-radius: 12px;
  padding: 13px 16px;
  line-height: 1.5;
}

.admin-panel {
  margin-bottom: 20px;
  padding: clamp(19px, 2.5vw, 30px);
  border: 1px solid rgba(62, 81, 66, .14);
  border-radius: 18px;
  background: var(--lb-admin-paper, #fffcf5);
  box-shadow: 0 10px 30px rgba(35, 46, 38, .055);
}

.admin-panel h2 {
  margin: 0 0 20px;
  color: var(--lb-admin-forest, #19372f);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.05;
}

.admin-panel h2::after {
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--lb-admin-clay, #a85032);
  content: "";
}

.admin-login-panel {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: clamp(24px, 4vw, 40px);
}

.admin-login-panel h2 { font-size: 30px; }
.admin-login-panel .hint { margin: 12px 0; line-height: 1.55; }

.admin-hub {
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  padding: 12px 0 17px;
  border-bottom: 1px solid rgba(50, 75, 60, .2);
}

.admin-current-user {
  margin-right: auto;
  color: var(--lb-admin-forest, #19372f);
  font-size: 13px;
  font-weight: 750;
}

.admin-hub-btn {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(44, 75, 64, .2);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--lb-admin-forest, #19372f);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .055em;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.admin-hub-btn:hover {
  transform: translateY(-1px);
  border-color: var(--lb-admin-pine, #2c4b40);
  background: var(--lb-admin-forest, #19372f);
  color: #fffdf5;
}

.admin-dashboard { padding: 2px 0 12px; }
.admin-dashboard > .hint { font-size: 14px; }
.admin-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.admin-dashboard-card {
  min-height: 150px;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(49, 77, 63, .16);
  border-radius: 17px;
  background: linear-gradient(145deg, #fffdf8, #f6f2e8);
  box-shadow: 0 6px 18px rgba(29, 45, 36, .045);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.admin-dashboard-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44, 75, 64, .42);
  box-shadow: 0 12px 26px rgba(29, 45, 36, .1);
}

.admin-dashboard-card strong {
  color: var(--lb-admin-forest, #19372f);
  font-size: 17px;
  letter-spacing: .035em;
}

.admin-dashboard-card span { max-width: 38ch; color: #626a60; line-height: 1.5; }

.admin-route-workspace {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}

.admin-route-workspace .admin-panel { height: auto; }
.admin-media-editor { top: 18px; }

.form-grid { gap: 18px; }
.form-field { min-width: 0; gap: 7px; }
.form-field label {
  color: #425c4a;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .075em;
}

.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-field select,
.form-field textarea,
.admin-mode-main .article-editor,
.admin-mode-articles .article-editor {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d8d5c9;
  border-radius: 10px;
  background: #fffefa;
  color: #27352f;
  font: inherit;
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-field textarea { min-height: 128px; resize: vertical; line-height: 1.55; }
.form-field input[type="file"] { max-width: 100%; font: inherit; }

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible,
.article-editor:focus-visible,
.admin-mode-main button:focus-visible,
.admin-mode-routes button:focus-visible,
.admin-mode-articles button:focus-visible,
.admin-mode-blocks button:focus-visible,
.admin-mode-main a:focus-visible,
.admin-mode-routes a:focus-visible,
.admin-mode-articles a:focus-visible,
.admin-mode-blocks a:focus-visible {
  outline: 3px solid rgba(168, 80, 50, .34);
  outline-offset: 2px;
  border-color: var(--lb-admin-moss, #697750);
  box-shadow: 0 0 0 3px rgba(105, 119, 80, .12);
}

.form-field input[type="checkbox"],
.form-field input[type="radio"] { accent-color: var(--lb-admin-pine, #2c4b40); }
.form-field .hint, .hint { color: #687166; font-size: 12px; line-height: 1.5; }

.admin-actions { gap: 9px; flex-wrap: wrap; }
.admin-actions .app-btn,
.admin-route-actions .app-btn {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .055em;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.admin-actions .app-btn:hover,
.admin-route-actions .app-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(26, 45, 34, .12); }
.admin-actions .app-btn.primary { background: var(--lb-admin-forest, #19372f); color: #fffdf5; }
.admin-actions .app-btn.primary:hover { background: var(--lb-admin-pine, #2c4b40); }
.admin-actions .app-btn.danger,
.admin-route-actions .app-btn.danger { background: #fff7f2; color: #873d2b; border-color: #d7aa98; }

.admin-route-list > .form-field { max-width: 760px; }
.admin-list { gap: 10px; }
.admin-route {
  min-width: 0;
  padding: 16px;
  gap: 15px;
  border-color: rgba(49, 77, 63, .14);
  border-radius: 13px;
  background: #fffefa;
  box-shadow: 0 3px 10px rgba(29, 45, 36, .035);
}

.admin-route strong { color: var(--lb-admin-forest, #19372f); font-size: 15px; line-height: 1.4; }
.admin-route small { display: block; margin-top: 5px; color: #687166; line-height: 1.45; }
.admin-route-actions { gap: 7px; flex-wrap: wrap; }
.admin-route-actions .app-btn { min-width: 88px; }
.admin-route-actions.route-actions-grid { grid-template-columns: repeat(2, minmax(88px, auto)); }
.route-main { min-width: 0; }
.route-action-area, .route-feedback { min-width: 0; }

.admin-comment-card,
.block-admin { border-radius: 14px; background: #fffefa; box-shadow: 0 4px 14px rgba(29, 45, 36, .045); }
.admin-comment-meta { color: #626a60; }
.admin-confirm-modal { backdrop-filter: blur(3px); }
.admin-confirm-box { border: 1px solid rgba(44, 75, 64, .22); border-radius: 18px; box-shadow: 0 24px 70px rgba(13, 28, 22, .3); }

.photo-rights-note {
  margin: 10px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--lb-admin-clay, #a85032);
  border-radius: 0 10px 10px 0;
  background: #f8f0e7;
  color: #5d5146;
  font-size: 12px;
  line-height: 1.55;
}

.photo-rights-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #d7d8c9;
  border-radius: 10px;
  background: #f4f4eb;
  color: #35483c;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  line-height: 1.5;
  text-transform: none !important;
}

.photo-rights-confirm input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; }
.photo-rights-message { color: #873d2b; font-size: 12px; }
.file-list { display: grid; gap: 8px; overflow-wrap: anywhere; }
.file-list img, .article-current-cover, .article-admin-cover { max-width: 100%; border-radius: 10px; object-fit: cover; }
.article-admin-cover { width: 108px; height: 80px; }
.article-current-cover { max-height: 260px; object-fit: contain; background: #f3f0e7; }

.article-editor-toolbar,
.article-format-toolbar { gap: 7px; }
.article-format-toolbar .editor-tool { min-width: 42px; min-height: 40px; border-radius: 8px; }
.article-editor-toolbar > button { min-height: 42px; border-radius: 8px; }
.article-editor { min-height: 320px; padding: 18px; line-height: 1.7; }
.article-video-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.article-video-row .app-btn { min-height: 44px; }
.admin-block-editor .form-grid { align-items: end; }
.admin-block-editor .form-grid .form-field.full { grid-column: auto; }
.admin-periodos-nav { gap: 10px; }

.admin-users-layout { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .8fr); }
.admin-user-row { min-width: 0; border-radius: 13px; background: #fffefa; }
.admin-user-main { min-width: 0; overflow-wrap: anywhere; }
.admin-user-actions { gap: 7px; flex-wrap: wrap; }
.admin-user-table { min-width: 0; }
.admin-user-form-wrap { min-width: 0; }
.admin-role-pill { border-radius: 999px; }
.admin-login-history { overflow-x: auto; }

@media (max-width: 1100px) {
  .admin-route-workspace,
  .admin-users-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-media-editor { position: static; }
  .admin-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .admin-wrap { width: calc(100% - 30px); padding-top: 22px; }
  body.admin-mode-main .app-hero,
  body.admin-mode-routes .app-hero,
  body.admin-mode-articles .app-hero,
  body.admin-mode-blocks .app-hero { padding: 32px 16px 38px; }
  .admin-panel { padding: 19px 16px; border-radius: 15px; }
  .admin-hub { gap: 7px; }
  .admin-current-user { flex: 1 0 100%; margin: 0 0 3px; }
  .admin-hub-btn { min-height: 44px; padding: 10px 12px; font-size: 10px; }
  .admin-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .admin-dashboard-card { min-height: 112px; padding: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .form-field.full { grid-column: auto; }
  .admin-route { align-items: stretch; flex-direction: column; gap: 12px; }
  .admin-route-actions { justify-content: flex-start; }
  .admin-route-actions .app-btn { flex: 1 1 112px; }
  .admin-route-actions.route-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-user-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .admin-user-actions .app-btn { flex: 1 1 110px; }
  .article-video-row { grid-template-columns: minmax(0, 1fr); }
  .admin-block-editor .form-grid .form-field.full { grid-column: auto; }
  .admin-login-panel { margin-top: 0; }
  .admin-mode-main .admin-route-workspace,
  .admin-mode-articles .admin-route-workspace { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .admin-wrap { width: calc(100% - 22px); }
  .admin-panel { padding: 17px 13px; }
  .admin-route-actions.route-actions-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-actions .app-btn { flex: 1 1 130px; }
  .admin-login-panel .admin-actions .app-btn { flex: 1 1 auto; }
  .article-format-toolbar .editor-tool { min-width: 38px; padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  body.admin-mode-main *, body.admin-mode-main *::before, body.admin-mode-main *::after,
  body.admin-mode-routes *, body.admin-mode-routes *::before, body.admin-mode-routes *::after,
  body.admin-mode-articles *, body.admin-mode-articles *::before, body.admin-mode-articles *::after,
  body.admin-mode-blocks *, body.admin-mode-blocks *::before, body.admin-mode-blocks *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Ficha de ruta: jerarquía editorial del contenido. */
.route-reference-page .route-hero { min-height: clamp(410px, 43vw, 530px); }
.route-reference-page .route-hero-title { font-size: clamp(54px, 7vw, 92px); }
@media (min-width: 761px) {
  .route-reference-page .route-hero-inner { margin-left: clamp(22px, 3vw, 48px); margin-right: auto; }
}
.route-reference-page .route-content-inner { width: min(1180px, calc(100% - clamp(32px, 7vw, 104px))); padding-top: clamp(34px, 5vw, 58px); }
.route-reference-page .route-section { margin-bottom: clamp(52px, 7vw, 76px); }
.route-reference-page .route-section-heading { display: block; margin-bottom: 23px; }
.route-reference-page .route-section-heading h2 { margin-top: 7px; font-size: clamp(36px, 4vw, 52px); line-height: 1; }
.route-reference-page .route-subheading h3 { font-size: clamp(27px, 3vw, 34px); }
.route-reference-page .route-section-index { color: #62744c; letter-spacing: .17em; }

.route-reference-page .route-facts-layout { display: grid; grid-template-columns: minmax(215px, .78fr) minmax(0, 2.5fr); overflow: hidden; margin: 0 0 clamp(28px, 4vw, 42px); border: 1px solid #d8dccc; border-radius: 13px; background: #fffefa; box-shadow: 0 14px 35px rgba(25,55,47,.07); }
.route-reference-page .route-date-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(23px, 3vw, 34px); color: #fffefa; background: var(--lb-forest); }
.route-reference-page .route-date-card .route-section-index { color: #c5d2ac; }
.route-reference-page .route-date-card strong { display: block; margin-top: 13px; font: 600 clamp(33px, 3.5vw, 47px)/1 var(--lb-display); letter-spacing: .01em; white-space: nowrap; }
.route-reference-page .route-date-card small { margin-top: 9px; color: #e2e9d8; font-size: 15px; text-transform: capitalize; }
.route-reference-page .route-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.route-reference-page .meta-item { min-height: 100px; padding: 18px clamp(12px, 2vw, 25px); gap: 12px; border-top: 0; border-right: 1px solid #e5e6db; border-bottom: 1px solid #e5e6db; }
.route-reference-page .meta-item:nth-child(3n) { border-right: 0; }
.route-reference-page .meta-item:nth-child(n+4) { border-bottom: 0; border-top: 0; }
.route-reference-page .meta-icon { width: 36px; height: 36px; flex-basis: 36px; color: var(--lb-forest); background: #edf0e5; }
.route-reference-page .meta-item > div > span { color: #65705e; font-size: 10px; letter-spacing: .11em; }
.route-reference-page .meta-item strong { margin-top: 6px; font: 600 clamp(19px, 2vw, 25px)/1.1 var(--lb-display); }
.route-reference-page .meta-item:last-child strong { font-size: clamp(17px, 1.7vw, 22px); white-space: normal; overflow: visible; text-overflow: clip; }

.route-reference-page .route-overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(265px, .78fr); align-items: stretch; gap: clamp(16px, 2.5vw, 28px); }
.route-reference-page .route-story { padding: clamp(24px, 3vw, 37px); border: 1px solid var(--lb-line); border-radius: 11px; background: #fffefa; box-shadow: 0 8px 28px rgba(25,55,47,.035); }
.route-reference-page .route-story .route-section-heading { margin-bottom: 20px; }
.route-reference-page .route-story .rich-public-content { max-width: 68ch; }
.route-reference-page .route-meeting-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(25px, 3vw, 38px); border: 1px solid #d9dfce; border-radius: 11px; background: #eef1e7; }
.route-reference-page .route-meeting-card h3 { margin: 20px 0 13px; font-size: clamp(29px, 3vw, 36px); }
.route-reference-page .route-meeting-card p { font-size: 16px; line-height: 1.65; }
.route-reference-page .route-meeting-card .meeting-link { margin-top: auto; padding: 13px 15px; min-height: 47px; width: 100%; justify-content: center; gap: 8px; font-size: 12px; }

.route-reference-page .route-climate-hourly { margin-bottom: clamp(52px, 7vw, 76px); border-color: #d8dccc; border-radius: 11px; background: #fffefa; }
.route-reference-page .route-climate-hourly .climate-head { align-items: center; padding: 25px clamp(22px, 3vw, 34px); border: 0; background: var(--lb-forest); }
.route-reference-page .route-climate-hourly .climate-head .section-kicker { color: #c5d2ac; }
.route-reference-page .route-climate-hourly .climate-head h2 { margin-top: 5px; color: #fffefa; font: 600 clamp(26px, 3vw, 34px)/1.08 var(--lb-display); letter-spacing: .02em; }
.route-reference-page .route-climate-hourly .climate-head p { margin: 6px 0 0; color: #d9e3d4; font-size: 13px; font-weight: 400; }
.route-reference-page .route-climate-hourly .climate-head time { color: #d9e3d4; font-size: 12px; }
.route-reference-page .climate-hours-grid { background: #fffefa; }
.route-reference-page .climate-hour-card { padding: 22px 12px; border-color: #e6e5db; }
.route-reference-page .climate-hour-time { color: var(--lb-forest); }
.route-reference-page .climate-hour-condition { color: #5d704b; }
.route-reference-page .climate-hour-temp { color: var(--lb-forest); }
.route-reference-page .climate-hours-note { padding: 12px 20px; background: #f3f1e8; }
.route-reference-page .climate-unavailable { padding: 30px clamp(22px, 3vw, 34px); background: #fffefa; }

.route-reference-page .route-track-section { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); border-radius: 11px; background: #fffefa; }
.route-reference-page .track-map-wrap, .route-reference-page .route-map { min-height: 450px; }
.route-reference-page .elevation-profile { background: #f7f5ee; }
.route-reference-page .route-gpx-box { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, .9fr) auto; align-items: center; gap: 14px 24px; padding: 21px clamp(22px, 3vw, 32px); border: 1px solid #d8dccc; border-left: 4px solid var(--lb-moss); border-radius: 10px; background: #f1f3e9; }
.route-reference-page .route-gpx-box .route-subheading { margin: 0; }
.route-reference-page .route-gpx-box .route-subheading h3 { font-size: 28px; }
.route-reference-page .route-gpx-box .gpx-file-card { min-width: 0; background: #fffefa; }
.route-reference-page .route-gpx-box .gpx-download { margin: 0; padding-inline: 18px; white-space: nowrap; }
.route-reference-page .route-gpx-box .gpx-note { grid-column: 1 / -1; margin: 0; padding: 0; background: transparent; }
.route-reference-page .route-photos-full .photo-strip { gap: 14px; }
.route-reference-page .route-photos-full .photo-strip img { border-radius: 8px; }
.route-reference-page .route-comments { border-radius: 11px; }

@media (max-width: 900px) {
  .route-reference-page .route-facts-layout { grid-template-columns: minmax(0, 1fr); }
  .route-reference-page .route-date-card { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 12px 25px; flex-wrap: wrap; padding: 20px 25px; }
  .route-reference-page .route-date-card strong { margin: 0; font-size: 34px; }
  .route-reference-page .route-date-card small { margin: 0; }
  .route-reference-page .route-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .route-reference-page .route-meeting-card .meeting-link { margin-top: 20px; width: auto; }
  .route-reference-page .route-gpx-box { grid-template-columns: minmax(0, 1fr) auto; }
  .route-reference-page .route-gpx-box .route-subheading { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .route-reference-page .route-content-inner { width: calc(100% - 32px); }
  .route-reference-page .route-track-section { grid-template-columns: minmax(0, 1fr); }
  .route-reference-page .track-map-wrap { border-right: 0; border-bottom: 1px solid var(--lb-line); }
  .route-reference-page .route-climate-hourly .climate-head time { display: block; }
}
@media (max-width: 560px) {
  .route-reference-page .route-hero { min-height: 390px; }
  .route-reference-page .route-hero-title { font-size: clamp(42px, 11vw, 60px); }
  .route-reference-page .route-content-inner { width: calc(100% - 28px); }
  .route-reference-page .route-section-heading h2 { font-size: 39px; }
  .route-reference-page .route-date-card { gap: 5px 13px; padding: 20px; }
  .route-reference-page .route-date-card .route-section-index { flex-basis: 100%; }
  .route-reference-page .route-date-card strong { font-size: 34px; }
  .route-reference-page .route-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-reference-page .meta-item { min-height: 88px; padding: 12px; border-right: 1px solid #e5e6db; border-bottom: 1px solid #e5e6db; }
  .route-reference-page .meta-item:nth-child(3n) { border-right: 1px solid #e5e6db; }
  .route-reference-page .meta-item:nth-child(2n) { border-right: 0; }
  .route-reference-page .meta-item:nth-child(n+4) { border-bottom: 1px solid #e5e6db; }
  .route-reference-page .meta-item:nth-child(n+5) { border-bottom: 0; }
  .route-reference-page .meta-icon { width: 29px; height: 29px; flex-basis: 29px; display: grid; }
  .route-reference-page .meta-icon svg { width: 17px; height: 17px; }
  .route-reference-page .meta-item strong, .route-reference-page .meta-item:last-child strong { font-size: 19px; }
  .route-reference-page .route-story, .route-reference-page .route-meeting-card { padding: 22px; }
  .route-reference-page .route-climate-hourly .climate-head { gap: 6px; flex-wrap: wrap; }
  .route-reference-page .route-climate-hourly .climate-head time { padding: 0; }
  .route-reference-page .route-gpx-box { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .route-reference-page .route-gpx-box .route-subheading, .route-reference-page .route-gpx-box .gpx-note { grid-column: auto; }
  .route-reference-page .route-gpx-box .gpx-download { white-space: normal; }
}
