/* ============================================================
   PIANORADAR — Sistema de diseño "Programa de Recital"
   Materiales del piano: marfil (fondo) · ébano (tinta) ·
   fieltro carmesí (acento funcional) · latón (ornamentos)
   Tipografía: Fraunces (display) · Archivo (cuerpo)
   Firma: franja de octava real bajo la cabecera
   ============================================================ */
:root {
  --ivory: #f5f1e6;        /* marfil envejecido: fondo de página */
  --paper: #fbf8f0;        /* papel del programa: superficies/tarjetas */
  --ebony: #14110e;        /* ébano cálido: tinta principal */
  --ink: var(--ebony);
  --ink-soft: #2a2622;
  --muted: #7d7466;        /* tinta desvanecida */
  --hairline: #ddd3be;     /* filetes */
  --hairline-strong: #c9bda1;
  --felt: #a6182e;         /* fieltro de macillos: acento funcional */
  --felt-soft: #f3e2dd;
  --brass: #9c7c3c;        /* latón de pedales: ornamentos */
  --olive: #55622a;        /* confirmaciones */
  --bg: var(--ivory);
  --bg-soft: #efe9da;
  --line: var(--hairline);
  --white: var(--paper);
  --radius: 2px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(20, 17, 14, .05), 0 10px 28px rgba(20, 17, 14, .08);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar a cualquier display de las clases (p. ej. .field) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; }

h1, h2, h3, .serif { font-family: var(--serif); color: var(--ink); }

img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--felt); outline-offset: 3px; }

::selection { background: var(--ebony); color: var(--ivory); }

/* ---------- Header / Nav ---------- */
.site-header, .admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; background: var(--ivory); z-index: 500;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 19px; color: var(--brass); }
.brand-name { font-weight: 600; font-size: 20px; letter-spacing: 1.5px; }
.brand-thin { font-weight: 400; font-style: italic; }
.brand-center { justify-content: center; }
.site-nav, .admin-nav { display: flex; align-items: center; gap: 20px; font-size: 12.5px; }
.site-nav a, .admin-nav a {
  color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 500;
}
.site-nav a:hover, .admin-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-admin, .admin-nav .is-active { color: var(--ink); font-weight: 600; }
/* CTA global: «Añade un piano» — el único botón lleno de la cabecera */
.site-nav .nav-cta {
  background: var(--ebony); color: var(--ivory) !important;
  padding: 8px 14px; border-radius: var(--radius); font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--felt); text-decoration: none; }
.admin-nav .is-active { border-bottom: 2px solid var(--felt); padding-bottom: 2px; }
.admin-tag {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 1px;
  background: var(--ebony); color: var(--ivory); padding: 2px 6px; border-radius: 2px; margin-left: 4px;
}
/* Contador de pendientes en el menú del panel */
.nav-count {
  display: inline-block; min-width: 17px; text-align: center;
  background: var(--felt); color: var(--ivory);
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 999px;
}

/* Firma: una octava dibujada (teclas de 24px; negras tras Do,Re,Fa,Sol,La) */
.key-strip {
  height: 30px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 17px,  var(--ebony) 17px 31px,
      transparent 31px 41px, var(--ebony) 41px 55px,
      transparent 55px 89px, var(--ebony) 89px 103px,
      transparent 103px 113px, var(--ebony) 113px 127px,
      transparent 127px 137px, var(--ebony) 137px 151px,
      transparent 151px 168px) top left / 168px 62% repeat-x,
    repeating-linear-gradient(90deg,
      var(--hairline-strong) 0 1px, transparent 1px 24px) top left / 24px 100% repeat-x,
    var(--paper);
  border-bottom: 1px solid var(--hairline-strong);
}

.site-main { min-height: 60vh; }
.site-footer {
  border-top: 4px double var(--hairline-strong); margin-top: 56px; padding: 26px 20px 30px;
  text-align: center; color: var(--muted); font-size: 13px;
}
.site-footer p { font-family: var(--serif); font-style: italic; font-size: 14px; }

/* ---------- Botones / CTA ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ebony); color: var(--ivory);
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 1.6px; text-transform: uppercase;
  padding: 13px 24px; border: 1px solid var(--ebony); border-radius: var(--radius);
  cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .05s ease;
}
.btn:hover { background: var(--felt); border-color: var(--felt); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ebony); color: var(--ivory); border-color: var(--ebony); }
.pin { font-size: 15px; }

/* Barra fija inferior (móvil): buscar cerca + piano más cercano */
.fixed-bar {
  display: none;
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 600;
  gap: 8px;
}
.fixed-bar .btn {
  flex: 1 1 0; padding: 12px 8px; font-size: 10.5px; letter-spacing: 1px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.fixed-bar .btn-outline { background: var(--paper); }
.fixed-bar .btn-outline:hover { background: var(--ebony); color: var(--ivory); }

.link-btn {
  background: none; border: none; padding: 0; margin: 0;
  color: var(--ink); font-family: var(--sans); font-size: 14px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--felt); }
.link-btn.danger { color: var(--felt); }
.inline-form { display: inline; }

/* ---------- Home: el mapa es la portada ---------- */
.page-detail .site-main {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 80px;
}
/* A sangre: el mapa llega a los bordes; el resto se centra con .home-inner */
.page-home .site-main { max-width: none; margin: 0; padding: 0 0 80px; }
.home-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 0; }

/* Franja de cabecera: la identidad, comprimida a tres líneas */
.home-band {
  text-align: center; padding: 20px 20px 18px;
  border-bottom: 1px solid var(--hairline);
}
.band-overline {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 0 6px; color: var(--brass);
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
}
.band-overline .rule { display: inline-block; width: 44px; height: 1px; background: var(--hairline-strong); }
.band-title {
  font-size: clamp(26px, 3.6vw, 38px); margin: 0;
  font-weight: 600; letter-spacing: -0.4px; line-height: 1.1;
}
.band-sub { color: var(--muted); margin: 5px auto 0; font-size: 14.5px; max-width: 620px; }

@media (prefers-reduced-motion: no-preference) {
  .home-band > * { animation: rise .5s ease both; }
  .home-band > *:nth-child(2) { animation-delay: .07s; }
  .home-band > *:nth-child(3) { animation-delay: .14s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Escenario: mapa a pantalla casi completa con el buscador flotando encima */
.home-stage { position: relative; }
.search-float {
  position: absolute; top: 18px; left: 18px; z-index: 400;
  width: min(350px, calc(100% - 36px));
  max-height: calc(100% - 36px); overflow-y: auto;
  background: var(--paper); border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: 0 2px 6px rgba(20, 17, 14, .10), 0 14px 40px rgba(20, 17, 14, .18);
}
/* El plegado solo tiene sentido en móvil; en escritorio el panel va siempre abierto */
.search-toggle { display: none; }
.search-float.is-collapsed .search-form { display: none; }

/* ---------- Buscador ---------- */
.search-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--brass);
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 15px; padding: 11px 12px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--ivory); color: var(--ink);
  width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: #a89d8b; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ebony); background: var(--paper);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-cta { justify-content: flex-end; }
.field-cta .btn { height: 45px; margin-top: auto; }

/* Slider de radio: la cuerda tensada.
   (mecánica intacta: .range-wrap relativo, burbuja posicionada por JS) */
.radius-control { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
/* Los dos botones de búsqueda por ubicación van emparejados */
.nearest-inline { margin-top: -6px; }
.range-wrap { position: relative; flex: 1 1 auto; display: flex; align-items: center; min-height: 48px; }
.geo-inline { height: 48px; white-space: nowrap; flex: 0 0 auto; }

/* Chips de tipo de acceso: filetes de latón que se invierten al activarse */
.field-access { gap: 8px; }
.access-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.access-chip {
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: 1.1px; text-transform: uppercase;
  padding: 6px 11px; cursor: pointer;
  background: var(--ivory); color: var(--muted);
  border: 1px solid var(--hairline-strong); border-radius: 999px;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.access-chip:hover { border-color: var(--brass); color: var(--ink); }
.access-chip.is-active { background: var(--ebony); border-color: var(--ebony); color: var(--ivory); }

/* País y ciudad, plegados: con radio y geolocalización casi nunca hacen falta */
.more-filters { border-top: 1px solid var(--hairline); padding-top: 10px; }
.more-filters > summary {
  cursor: pointer; list-style: none;
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--brass);
}
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary::before { content: "+"; margin-right: 7px; font-weight: 700; }
.more-filters[open] > summary::before { content: "\2212"; }
.more-filters > summary:hover { color: var(--ink); }
.more-filters .field-row { margin-top: 12px; }

/* Valor actual: compuesto como indicación de tempo, bajo la bolita */
.range-bubble {
  position: absolute; top: calc(50% + 13px); left: 0; transform: translateX(-50%);
  font-family: var(--serif); font-style: italic; font-size: 14.5px; font-weight: 500;
  color: var(--felt); white-space: nowrap; pointer-events: none;
}
/* Extremos sobre la cuerda, como marcas de afinación (la burbuja va debajo) */
.range-ends {
  position: absolute; left: 0; right: 0; top: calc(50% - 26px);
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted);
}

/* Línea gruesa de ébano, sin caja alrededor */
.field-radius .range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; padding: 0; border: none; border-radius: 999px;
  background: var(--ebony); outline: none; cursor: pointer;
}
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--ebony); }
.range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--ebony); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; margin-top: -9px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--ebony);
  border: 4px solid var(--paper); box-shadow: 0 1px 5px rgba(20, 17, 14, .45); cursor: grab;
}
.range::-webkit-slider-thumb:active { cursor: grabbing; }
.range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ebony);
  border: 4px solid var(--paper); box-shadow: 0 1px 5px rgba(20, 17, 14, .45); cursor: grab;
}
.range:focus-visible { outline: 2px solid var(--felt); outline-offset: 6px; }
.geo-status { font-size: 13px; color: var(--muted); margin: 0; min-height: 18px; }
.geo-status.error { color: var(--felt); }

/* ---------- Mapa (portada: Leaflet/OSM, open source) ---------- */
.map { width: 100%; z-index: 1; background: var(--bg-soft); }
/* Protagonista de la portada: alto, a sangre, acotado en pantallas extremas */
.home-stage .map {
  height: clamp(420px, 68vh, 720px);
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}
/* Teselas viradas a grabado: se integran con el papel */
.map .leaflet-tile { filter: grayscale(.85) sepia(.14) saturate(.85) contrast(1.02); }
/* Mini-tarjeta del mapa (patrón Booking): foto a sangre, datos y botón */
.leaflet-popup-content { font-family: var(--sans); margin: 0; line-height: 1.45; }
.leaflet-popup-content-wrapper {
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 4px; padding: 0; overflow: hidden;
}
.leaflet-popup-tip { background: var(--paper); }
.map-pop { width: 240px; }
.map-pop img { display: block; width: 100%; height: 128px; object-fit: cover; margin: 0; }
.pop-body { padding: 10px 12px 12px; }
.map-pop strong { display: block; font-family: var(--serif); font-size: 15.5px; line-height: 1.25; color: var(--ink); }
.map-pop .pop-loc { color: var(--muted); font-size: 12px; margin-top: 1px; }
.pop-tags { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 5px; }
.pop-tags:empty { display: none; }
.map-pop .pop-access { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); font-weight: 600; border-left: 2px solid var(--brass); padding-left: 6px; }
.map-pop .pop-verified { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--muted); }
.map-pop .pop-dist { font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--felt); margin-top: 3px; }
.map-pop .pop-btn {
  display: block; margin-top: 9px; text-align: center;
  background: var(--ebony); color: var(--ivory); border-radius: 2px;
  padding: 8px 10px; font-size: 11px; font-weight: 600;
  letter-spacing: 1.3px; text-transform: uppercase;
}
.map-pop .pop-btn:hover { background: var(--felt); color: var(--ivory); text-decoration: none; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ivory); text-shadow: 0 1px 3px rgba(20,17,14,.6); }

/* Pines: gota de ébano con la nota. Se tiñen de fieltro al señalar su tarjeta. */
.piano-pin .pin-body {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--ebony); color: var(--ivory);
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(20, 17, 14, .40);
  transition: background .16s ease, transform .16s ease;
}
.piano-pin .pin-note { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.piano-pin.is-hot { z-index: 800 !important; }
.piano-pin.is-hot .pin-body {
  background: var(--felt); transform: rotate(-45deg) scale(1.22);
  box-shadow: 0 4px 12px rgba(166, 24, 46, .45);
}
.user-pin .user-dot {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ebony);
  box-shadow: 0 0 0 4px rgba(20, 17, 14, .15);
}

/* ---------- Resultados: el programa ---------- */
.results-head {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--hairline-strong); padding-bottom: 10px; margin-bottom: 20px;
}
.section-title { font-size: 25px; margin: 0; font-weight: 600; }
.section-title::before { content: "\266A"; color: var(--brass); font-size: 16px; margin-right: 10px; vertical-align: 2px; }
.results-count { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 15px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.results-empty { color: var(--muted); text-align: center; padding: 30px; font-family: var(--serif); font-style: italic; }

.card {
  border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--paper);
  display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .12s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--hairline-strong); text-decoration: none; }
.card-img { aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.placeholder { display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--hairline-strong); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
/* Título: siempre 2 líneas de alto (recorta con puntos suspensivos si es más largo) */
.card-title {
  font-family: var(--serif); font-size: 18.5px; font-weight: 600; line-height: 1.25; color: var(--ink); margin: 0 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.25em * 2);
}
/* Cada campo reserva una línea fija, aunque venga vacío, para mantener la alineación */
.card-est {
  font-size: 11px; color: var(--brass); font-weight: 600; min-height: 1.5em;
  text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-addr, .card-city {
  font-size: 13px; color: var(--muted); min-height: 1.35em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-city { margin-bottom: 4px; }
/* Línea del directorio: acceso (izquierda) y verificación (derecha).
   Reserva su alto aunque falten los dos datos, para no romper la alineación. */
.card-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  min-height: 1.7em; padding-bottom: 2px;
}
.card-access {
  font-size: 10px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-access:not(:empty) { border-left: 2px solid var(--brass); padding-left: 7px; }
.card-verified {
  font-family: var(--serif); font-style: italic; font-size: 12.5px;
  color: var(--muted); white-space: nowrap; flex: 0 0 auto;
}
/* Pie anclado abajo: distancia como indicación de tempo + país en versalitas */
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hairline); min-height: 1.2em;
}
.card-dist { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 15px; color: var(--felt); }
.card-country { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }

/* ---------- Ficha de detalle ---------- */
.back-link { display: inline-block; margin: 22px 0 12px; color: var(--muted); font-size: 14px; }

/* Lámina de catálogo: foto contenida y nítida, nunca estirada a sangre */
.plate { margin: 4px 0 28px; max-width: 460px; }
.plate-img {
  aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--bg-soft);
}
.plate-img img { width: 100%; height: 100%; object-fit: cover; }
.plate-caption {
  margin: 8px 0 0; font-family: var(--serif); font-style: italic;
  font-size: 13.5px; color: var(--muted);
}
.gallery { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex: 0 0 auto; width: 64px; height: 48px; border: 1px solid var(--hairline); border-radius: 2px; overflow: hidden; padding: 0; background: none; cursor: pointer; opacity: .75; transition: opacity .15s ease, border-color .15s ease; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.is-active { border-color: var(--ebony); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; }
.detail-title { font-size: clamp(28px, 4vw, 44px); font-weight: 600; margin: 0 0 6px; line-height: 1.1; }
.detail-establishment {
  font-size: 12px; font-weight: 600; color: var(--brass); margin: 0 0 14px;
  text-transform: uppercase; letter-spacing: 1.6px;
}
/* Datos del directorio. Solo aparecen si constan: la ficha nunca dice que
   algo falta, solo lo que sabe. */
.detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; }
.badge-access {
  font-size: 11px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--hairline-strong); border-left: 3px solid var(--brass);
  padding: 6px 12px; border-radius: var(--radius);
}
.badge-verified { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }
.badge-verified::before { content: "\2713"; color: var(--olive); font-style: normal; margin-right: 6px; font-weight: 700; }

/* Banda de verificación: la llamada a la acción de la ficha.
   La fecha vive aquí; cualquier visitante puede ponerla al día. */
.verify-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 22px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--hairline-strong);
  border-left: 4px solid var(--brass); border-radius: var(--radius);
  padding: 15px 18px; margin: 0 0 24px; box-shadow: var(--shadow);
}
.verify-copy { flex: 1 1 260px; }
.verify-q { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); }
.verify-last { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.verify-last em { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--felt); }
.verify-err { margin: 6px 0 0; font-size: 13px; color: var(--felt); }
.verify-form { flex: 0 0 auto; margin: 0; }
.verify-form .btn { white-space: nowrap; }
.verify-thanks, .verify-done { margin: 0; font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--olive); }

/* Honeypot: invisible para humanos, apetecible para bots (nunca display:none) */
.hp-field {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* Libro de visitas */
.guestbook {
  margin-top: 46px; padding-top: 26px; max-width: 760px;
  border-top: 4px double var(--hairline-strong);
}
.guestbook-title { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 18px; }
.guestbook-title::before { content: "\270D"; color: var(--brass); font-size: 20px; margin-right: 10px; }
.guestbook-empty { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 0 0 26px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment { border-bottom: 1px solid var(--hairline); padding: 15px 0; }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.comment-name { font-family: var(--serif); font-weight: 600; font-size: 16.5px; color: var(--ink); }
.comment-date { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--muted); }
.comment-body { margin: 6px 0 0; font-size: 15px; line-height: 1.65; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.guestbook-intro { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15.5px; }
.comment-form .btn { align-self: flex-start; }
.alert-err { background: var(--felt-soft); border: 1px solid #e0bcbc; color: var(--felt); }
.detail-description { color: var(--ink-soft); margin: 0 0 26px; font-size: 16.5px; line-height: 1.75; }

.block-title {
  font-size: 18px; font-weight: 600; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline-strong);
}
.block-title::before { content: "\266A"; color: var(--brass); font-size: 13px; margin-right: 8px; vertical-align: 1px; }
.tech-card, .scores-card, .videos-card, .location-card { margin-bottom: 28px; }
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.tech-grid dt { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.tech-grid dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; font-family: var(--serif); }

/* Barras de puntuación */
.score-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.score-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.score-name { font-size: 14px; font-weight: 500; }
.score-val { font-family: var(--serif); font-size: 16.5px; font-weight: 600; }
.score-max { color: var(--muted); font-size: 12px; font-weight: 400; }
.score-bar { height: 6px; background: var(--hairline); border-radius: 999px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--ebony); border-radius: 999px; }

/* Vídeos */
.video-frame { position: relative; padding-top: 56.25%; margin-bottom: 14px; border: 1px solid var(--hairline-strong); border-radius: var(--radius); overflow: hidden; background: var(--ebony); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: inline-block; margin-bottom: 8px; font-weight: 600; }

/* Aside ubicación (mapa de Google embebido, sin API) */
.detail-aside .location-card {
  position: sticky; top: 90px; border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 18px; background: var(--paper); box-shadow: var(--shadow);
}
.address { font-style: normal; display: flex; flex-direction: column; gap: 2px; color: var(--ink-soft); margin-bottom: 14px; font-size: 15px; }
.detail-map {
  display: block; width: 100%; height: 240px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius); margin-bottom: 14px; background: var(--bg-soft);
}

/* ---------- Login ---------- */
.page-login { background: var(--ivory); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 36px 30px; width: 100%; max-width: 380px; text-align: center; box-shadow: var(--shadow); }
.login-title { font-size: 22px; margin: 18px 0 4px; }
.login-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.login-form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { margin-top: 6px; }
.login-back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; }
.form-error { background: var(--felt-soft); color: var(--felt); border: 1px solid #e0bcbc; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.form-ok { background: #edf1e0; color: var(--olive); border: 1px solid #cdd6ac; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }

/* ---------- Admin ---------- */
.page-admin { background: var(--ivory); }
.admin-wrap { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 80px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; }
.admin-title { font-size: 27px; margin: 0 0 16px; }
.logout-form { display: inline; }

.status-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip { background: var(--paper); border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--muted); }
.chip b { color: var(--ink); margin-left: 4px; }
.chip.is-active { background: var(--ebony); color: var(--ivory); border-color: var(--ebony); }
.chip.is-active b { color: var(--ivory); }
.chip:hover { text-decoration: none; border-color: var(--ebony); }

.table-wrap { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--hairline); font-size: 14px; vertical-align: middle; }
.admin-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); background: var(--ivory); }
.admin-table tr:last-child td { border-bottom: none; }
.row-title { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.row-sub { font-size: 12px; color: var(--muted); }
.row-loc { color: var(--muted); }
.col-actions { white-space: nowrap; }
.col-actions .link-btn { margin-right: 10px; }

.status-select { border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600; background: var(--paper); }
.status-draft { color: var(--muted); }
.status-pending { color: var(--brass); }
.status-approved { color: var(--olive); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); background: var(--paper); border: 1px dashed var(--hairline-strong); border-radius: var(--radius); }
.empty-state .btn { margin-top: 14px; }

/* Formulario piano */
.form-wrap { max-width: 1000px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form-col { display: flex; flex-direction: column; gap: 20px; }
.fs { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--paper); padding: 16px 18px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fs legend { font-family: var(--serif); font-size: 16px; font-weight: 600; padding: 0 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.hint.after-form { margin-top: 20px; }
.admin-map { height: 320px; border: 1px solid var(--hairline-strong); border-radius: var(--radius); background: var(--bg-soft); }
.form-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; }

/* Fecha de verificación: campo editable con dos atajos */
.verify-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verify-row input[type="date"] { flex: 1 1 160px; width: auto; }
.btn-small { padding: 9px 14px; font-size: 11px; letter-spacing: 1.2px; }

.score-field { display: flex; flex-direction: column; gap: 6px; }
.score-field-head { display: flex; justify-content: space-between; font-size: 14px; }
.score-field-head output { font-family: var(--serif); font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--ebony); }

/* Multimedia */
.media-section { margin-top: 40px; border-top: 1px solid var(--hairline-strong); padding-top: 26px; }
.media-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.media-block { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.media-item { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.media-item.is-primary { border-color: var(--felt); border-width: 2px; }
.media-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.media-item-actions { padding: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.badge { background: var(--ebony); color: var(--ivory); font-size: 11px; padding: 2px 8px; border-radius: 999px; align-self: flex-start; }
.upload-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.video-admin-list { list-style: none; margin: 0 0 14px; padding: 0; }
.video-admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }

/* Atributos */
.attr-add { display: flex; gap: 10px; margin: 18px 0 24px; }
.attr-add input { flex: 1; font-family: var(--sans); font-size: 15px; padding: 11px 12px; border: 1px solid var(--hairline-strong); border-radius: var(--radius); background: var(--paper); }
.attr-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius); }
.attr-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--hairline); }
.attr-item:last-child { border-bottom: none; }
.attr-item.is-inactive { opacity: .5; }
.attr-name { font-family: var(--serif); font-weight: 600; flex: 1; }
.attr-meta { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.attr-actions { display: flex; gap: 12px; }

/* ---------- Responsive (Mobile-first refinements) ---------- */
@media (max-width: 860px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-aside .location-card { position: static; }
  .form-grid, .media-cols { grid-template-columns: 1fr; }
}
/* Buscador plegable: por debajo de 720 px ocupa el ancho y arranca cerrado */
@media (max-width: 720px) {
  .home-stage .map { height: 60vh; min-height: 360px; }
  .search-float {
    top: 12px; left: 12px; right: 12px; width: auto;
    max-height: calc(100% - 24px); padding: 12px 14px;
  }
  .search-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 4px 0; background: none; border: none; cursor: pointer;
    font-family: var(--sans); font-size: 12px; font-weight: 600;
    letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink);
  }
  .search-toggle-arrow { color: var(--brass); transition: transform .18s ease; }
  .search-float.is-collapsed .search-toggle-arrow { transform: rotate(-90deg); }
  .search-float:not(.is-collapsed) .search-toggle { border-bottom: 1px solid var(--hairline); margin-bottom: 12px; padding-bottom: 10px; }
  /* Con el buscador a todo el ancho, el zoom baja a la esquina libre
     (la atribución de OpenStreetMap ocupa la de la derecha). */
  .home-stage .leaflet-top.leaflet-right { top: auto; right: auto; bottom: 0; left: 0; }
  .home-stage .leaflet-top.leaflet-right .leaflet-control { margin: 0 0 14px 12px; }
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .home-band { padding: 14px 16px 12px; }
  .band-overline { letter-spacing: 2px; gap: 10px; font-size: 10px; }
  .band-overline .rule { width: 26px; }
  .band-sub { display: none; }
  .key-strip { height: 22px; }
  /* CTA fija en la zona del pulgar */
  .fixed-bar { display: flex; }
  .geo-inline, .nearest-inline { display: none; } /* en móvil se usa la barra fija inferior */
  .page-home .site-main { padding-bottom: 90px; }
  .site-footer { margin-bottom: 70px; }
  .site-nav { gap: 10px 14px; flex-wrap: wrap; justify-content: flex-end; font-size: 11px; }
  .detail-body { grid-template-columns: 1fr; }
}

/* ---------- Directorio por ciudades (SEO local) ---------- */
.page-city .site-main, .page-cities .site-main {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 80px;
}
.crumbs { margin: 22px 0 6px; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 6px; color: var(--hairline-strong); }
.city-head { margin: 6px 0 20px; }
.city-title { font-size: clamp(28px, 4.5vw, 44px); font-weight: 600; margin: 0 0 8px; line-height: 1.1; }
.city-intro { color: var(--muted); margin: 0; font-size: 15.5px; max-width: 640px; }
.city-map { height: clamp(300px, 42vh, 460px); border: 1px solid var(--hairline-strong); border-radius: var(--radius); margin-bottom: 26px; }
.city-grid { margin-bottom: 10px; }

/* Índice de ciudades: lista de programa */
.city-list { list-style: none; margin: 0; padding: 0; }
.city-item { border-bottom: 1px solid var(--hairline); }
.city-item-link {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 16px 4px; text-decoration: none;
}
.city-item-link:hover { background: var(--paper); text-decoration: none; }
.city-item-name { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); }
.city-item-link:hover .city-item-name { color: var(--felt); }
.city-item-country { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.city-item-count { margin-left: auto; font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--felt); }

/* Enlace de la ficha a su ciudad */
.city-link {
  display: block; margin-top: 12px; text-align: center;
  font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--brass);
}
.city-link:hover { color: var(--felt); text-decoration: none; }

/* ---------- Selector de idioma ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.lang-opt { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .5px; }
.lang-opt.is-active { color: var(--felt); border-bottom: 2px solid var(--felt); text-decoration: none; }
.lang-opt.is-active:hover { text-decoration: none; }
.lang-sep { color: var(--hairline-strong); font-size: 11px; }
.nav-admin { font-weight: 600; }

/* ---------- Footer con enlaces legales ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-bottom: 8px; }
.footer-links a { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Páginas de contenido (CMS) y contacto ---------- */
.cms { max-width: 820px; margin: 0 auto; padding: 0 20px 60px; }
.cms-narrow { max-width: 600px; }
.cms-title { font-family: var(--serif); font-size: clamp(30px, 5vw, 42px); font-weight: 600; margin: 6px 0 22px; }
.cms-intro { color: var(--muted); margin: 0 0 22px; font-size: 16.5px; font-family: var(--serif); font-style: italic; }
.cms-body { font-size: 16.5px; line-height: 1.75; }
.cms-body h2 { font-family: var(--serif); font-size: 25px; margin: 28px 0 10px; }
.cms-body h3 { font-family: var(--serif); font-size: 19px; margin: 22px 0 8px; }
.cms-body p { margin: 0 0 14px; }
.cms-body ul { margin: 0 0 14px 20px; }
.cms-body img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--hairline); margin: 14px 0; }
.cms-body a { color: var(--felt); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formularios en columna ---------- */
.stack-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.stack-form textarea { resize: vertical; }
.stack-form .btn { align-self: flex-start; }

/* ---------- Avisos ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-ok { background: #edf1e0; border: 1px solid #cdd6ac; color: var(--olive); }

/* ---------- Editor enriquecido (admin) ---------- */
.editor { border: 1px solid var(--hairline-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--hairline); background: var(--ivory); }
.editor-toolbar button { font-size: 13px; padding: 5px 9px; border: 1px solid var(--hairline-strong); background: var(--paper); border-radius: 2px; cursor: pointer; color: var(--ink); }
.editor-toolbar button:hover { background: var(--ebony); color: var(--ivory); border-color: var(--ebony); }
.editor-area { min-height: 260px; padding: 16px; font-size: 15px; line-height: 1.7; outline: none; }
.editor-area:focus { box-shadow: inset 0 0 0 2px rgba(166, 24, 46, .15); }
.editor-area img { max-width: 100%; height: auto; border-radius: 2px; margin: 8px 0; }
.editor-area h2, .editor-area h3 { font-family: var(--serif); }

/* ---------- Traducciones de piano (admin) ---------- */
.tag-lang { font-size: 10px; font-weight: 700; letter-spacing: .5px; background: var(--ivory); border: 1px solid var(--hairline-strong); color: var(--muted); padding: 1px 6px; border-radius: 2px; vertical-align: middle; }
.tr-block { padding: 14px 0; border-top: 1px dashed var(--hairline-strong); }
.tr-block:first-of-type { border-top: none; }
.tr-title { margin: 0 0 10px; font-size: 15px; }

/* ---------- Consentimiento de cookies (RGPD) ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 4px double var(--hairline-strong);
  box-shadow: 0 -8px 30px rgba(20, 17, 14, .12);
}
.cookie-bar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.cookie-bar-text { flex: 1 1 420px; }
.cookie-bar-text h2 { font-size: 17px; margin: 0 0 4px; }
.cookie-bar-text p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.cookie-bar-text a { text-decoration: underline; text-underline-offset: 3px; }
.cookie-bar-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-bar-actions .btn { padding: 11px 20px; font-size: 12px; }

.footer-manage {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-family: var(--sans); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1.2px;
}
.footer-manage:hover { color: var(--ink); }

/* Aviso en lugar de un contenido de terceros aún sin consentimiento */
.embed-consent {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 22px 18px;
  background: var(--ivory); border: 1px dashed var(--hairline-strong); border-radius: var(--radius);
}
.embed-consent h3 { font-size: 17px; margin: 0; }
.embed-consent h3::before { content: "\266A"; color: var(--brass); font-size: 13px; margin-right: 8px; }
.embed-consent p { margin: 0; font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.embed-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.embed-actions .btn { padding: 10px 18px; font-size: 11.5px; }
.embed-note { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; }
.embed-note a { text-decoration: underline; text-underline-offset: 2px; }
.embed-consent.detail-map { height: auto; min-height: 240px; margin-bottom: 14px; }
.video-frame-off { margin-bottom: 14px; min-height: 200px; }

@media (max-width: 560px) {
  .cookie-bar-actions { width: 100%; }
  .cookie-bar-actions .btn { flex: 1; }
  /* El banner queda por encima del CTA fijo hasta que se decide */
  .cookie-bar { z-index: 900; }
}

/* ---------- Contenidos y mensajes (admin) ---------- */
.page-slug { display: flex; flex-direction: column; gap: 2px; }
.hint-link { font-size: 11px; color: var(--muted); }
.msg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.msg-item { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px 16px; background: var(--paper); }
.msg-item.is-unread { border-left: 3px solid var(--felt); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.msg-meta { color: var(--muted); font-size: 12px; }
.msg-actions { display: flex; gap: 12px; }
.msg-body { margin: 8px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
