/* world-barcelona.css — Barcelona (Dynamic Kids). Mobile-first, tema oscuro.
   Paleta: fondo casi negro, azul eléctrico, cian y rosa de acento. Fuentes del sistema (sin CDNs).
   Todos los selectores empiezan con .bcn para no afectar a ninguna otra sesión del sitio. */

.bcn {
  --bg: #07080f;
  --surface: #11132080;
  --surface-solid: #111320;
  --surface-2: #1a1d31;
  --line: #2a2e4a;
  --text: #f3f5ff;
  --muted: #a9afcf;
  --blue: #2d5bff;
  --blue-press: #2348d6;
  --cyan: #22e1ff;
  --pink: #ff3d9a;
  --danger: #ff7a8a;
  --radius: 16px;
  --tap: 48px;
  --gutter: 20px;

  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 0% 0%, #2d5bff33 0%, transparent 60%),
    radial-gradient(90% 50% at 100% 12%, #ff3d9a26 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
.bcn *, .bcn *::before, .bcn *::after { box-sizing: border-box; }

.bcn :focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.bcn-brand {
  margin: 0;
  font-weight: 800;
  letter-spacing: .18em;
  font-size: .8rem;
  color: var(--text);
}
.bcn-brand span { color: var(--cyan); }

/* ── pantalla de acceso: collage juvenil (referencia Instagram Barcelona) ── */
.bcn--gate {
  --ink: #0b0d18;
  --blue: #1f6fff;
  --blue-deep: #1658e0;
  --cyan: #4fd8ff;
  --pink: #ff2f9a;
  --paper: #eaf6ff;
  --slate: #4b5f88;
  background:
    radial-gradient(120% 70% at 15% 0%, #4fd8ff 0%, transparent 60%),
    linear-gradient(160deg, #2a7bff 0%, #1658e0 55%, #0f3fb8 100%);
  color: var(--ink);
  background-color: #1658e0;
}
.bcn--gate .bcn-gate {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
}

/* decoración: texturas y stickers de los recursos entregados (no reciben foco ni clic) */
.bcn-collage { position: absolute; inset: 0; z-index: 0; pointer-events: none; user-select: none; }
.bcn-layer {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  /* los PNG/WEBP de texturas son rectángulos opacos: se funden en los bordes con máscara */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}
.bcn-layer--cuadricula { top: -4%; left: -6%; right: -6%; height: 44%; background-image: url("/assets/img/barcelona/textures/cuadricula-azul.webp"); }
.bcn-layer--celeste { top: 33%; left: -12%; width: 124%; height: 30%; background-image: url("/assets/img/barcelona/textures/papel-celeste-rasgado.webp"); transform: rotate(-2deg); }
.bcn-layer--azul { bottom: -3%; left: -8%; right: -8%; height: 26%; background-image: url("/assets/img/barcelona/textures/papel-azul-texturado.webp"); }
.bcn-layer--blanco { top: 58%; right: -10%; width: 60%; height: 22%; background-image: url("/assets/img/barcelona/textures/papel-blanco-arrugado.webp"); transform: rotate(4deg); }
.bcn-layer--puntos { top: 46%; right: 0; width: 34%; height: 26%; background-image: url("/assets/img/barcelona/textures/puntos-azules.webp"); }
.bcn-layer--pincel { bottom: 16%; left: -20%; width: 120%; height: 18%; background-image: url("/assets/img/barcelona/textures/pincelada-rosa.webp"); transform: rotate(-16deg); opacity: .9; }
.bcn-layer--cinta { top: 1%; right: -2%; width: 26%; height: 9%; background-image: url("/assets/img/barcelona/textures/cintas-azul-y-rosa.webp"); transform: rotate(8deg); }
.bcn-polaroid {
  position: absolute;
  margin: 0;
  padding: 10px 10px 34px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 14px 28px #0a1a4d59;
}
.bcn-polaroid img { display: block; width: 100%; height: auto; border-radius: 2px; }
.bcn-polaroid--grupo { width: 46vw; max-width: 300px; top: 4%; left: -40px; transform: rotate(-8deg); }
.bcn-polaroid--lago { width: 44vw; max-width: 280px; bottom: 3%; right: -48px; transform: rotate(7deg); }
.bcn-sticker { position: absolute; width: auto; height: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 4px 6px #0a1a4d40); }
.bcn-sticker--sol { width: 96px; top: 46%; left: -18px; transform: rotate(-8deg); }
.bcn-sticker--camara { width: 112px; top: 3%; right: 2%; transform: rotate(10deg); }
.bcn-sticker--corona { width: 84px; top: 24%; right: 6px; transform: rotate(6deg); }
.bcn-sticker--estrella { width: 62px; bottom: 26%; left: 14%; transform: rotate(-12deg); }
.bcn-sticker--corazon { width: 72px; top: 34%; left: 6%; transform: rotate(-10deg); }
.bcn-sticker--carita { width: 56px; bottom: 8%; left: 44%; }

.bcn-logo {
  position: relative; z-index: 1;
  display: block;
  width: min(90vw, 420px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* panel de ingreso */
.bcn-panel {
  position: relative; z-index: 2;
  width: min(100%, 400px);
  padding: 26px 22px 22px;
  text-align: center;
  background: #fbfdff;
  border-radius: 28px;
  box-shadow: 0 24px 56px #0a1a4d59;
}
.bcn-title {
  margin: 0;
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(1.35rem, 6.2vw, 2rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--ink);
}
.bcn-lead { margin: 6px 0 18px; color: var(--slate); font-size: 1rem; }
.bcn-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.bcn-form { display: grid; gap: 12px; }
.bcn-code { position: relative; height: 54px; }
.bcn-cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 12px repeat(4, minmax(0, 1fr));
  gap: 6px;
  height: 100%;
  pointer-events: none;
}
.bcn-cells__sep { align-self: center; height: 4px; border-radius: 4px; background: var(--ink); }
.bcn-cell {
  display: grid; place-items: center;
  min-width: 0;
  background: #fff;
  border: 2px solid #c9dcff;
  border-radius: 12px;
  box-shadow: inset 0 -3px 0 #e3eeff;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
  border-radius: 10px;
  text-transform: uppercase;
}
.bcn-cell.is-active { border-color: var(--blue); box-shadow: 0 0 0 4px #1f6fff26; }
/* un único campo real, superpuesto y transparente; así el teclado y el envío no cambian */
.bcn-code__input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0;
  opacity: 0;
  font-size: 16px; /* iOS no hace zoom al enfocar */
  text-transform: uppercase;
  caret-color: transparent;
  cursor: text;
}
.bcn-help { margin: 0; color: #5b6b8f; font-size: .9rem; }
.bcn-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--pink);
  border-radius: 12px;
  background: #ffe6f1;
  color: #a0105c;
  font-weight: 700;
  text-align: left;
}
.bcn-error[hidden] { display: none; }
.bcn--gate .bcn-btn--primary {
  width: 100%;
  min-height: 60px;
  justify-content: space-between;
  padding: 0 22px 0 26px;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .06em;
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 10px 22px #1f6fff59;
}
.bcn--gate .bcn-btn--primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.bcn--gate .bcn-btn--primary svg { width: 26px; height: 26px; flex: none; }
.bcn-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #c9dcff;
  color: #5b6b8f;
}
.bcn-foot__q { margin: 0 0 2px; font-size: .85rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.bcn-foot__a { margin: 0; font-size: .9rem; }

@media (min-width: 720px) {
  .bcn--gate .bcn-gate { gap: 18px; }
  .bcn-logo { width: 520px; }
  .bcn-panel { width: 460px; padding: 32px 30px 26px; }
  .bcn-polaroid--grupo { width: 300px; left: 3%; top: 8%; }
  .bcn-polaroid--lago { width: 290px; right: 3%; bottom: 6%; }
  .bcn-sticker--sol { width: 130px; top: 40%; left: 4%; }
  .bcn-sticker--camara { width: 150px; top: 6%; right: 6%; }
  .bcn-sticker--corona { width: 110px; top: 42%; right: 10%; }
  .bcn-sticker--estrella { width: 84px; bottom: 16%; left: 18%; }
  .bcn-sticker--corazon { width: 96px; top: 16%; left: 26%; }
  .bcn-sticker--carita { width: 74px; bottom: 6%; right: 26%; }
  .bcn-cell { font-size: 1.6rem; }
}

/* escritorio: el collage completo viene en la imagen de fondo (los stickers y fotos ya están incluidos).
   Solo aplica desde 900 px; móvil y tablet conservan sus capas y posiciones. */
@media (min-width: 900px) {
  .bcn--gate {
    background-color: #1658e0;
    background-image: url("/assets/img/barcelona/fondos/fondo-horizontal.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  .bcn--gate .bcn-collage { display: none; }
  .bcn--gate .bcn-gate { justify-content: center; gap: 22px; }
  .bcn--gate .bcn-logo { width: 340px; }
  .bcn--gate .bcn-panel { width: 480px; }
  .bcn--gate .bcn-title { font-size: 1.75rem; white-space: nowrap; }
}

/* ── botones (objetivo táctil >= 48 px) ─────────────────────────── */
.bcn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 22px;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.bcn-btn:active { transform: scale(.98); }
.bcn-btn[disabled], .bcn-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.bcn-btn--primary { width: 100%; min-height: 56px; background: var(--blue); border-color: var(--blue); }
.bcn-btn--primary:hover { background: var(--blue-press); border-color: var(--blue-press); }

.bcn-link {
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  color: var(--cyan);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── página de grupo ────────────────────────────────────────────── */
.bcn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 6px;
  max-width: 920px;
  margin: 0 auto;
}
.bcn-top form { margin: 0; }
.bcn-wrap { max-width: 920px; margin: 0 auto; padding: 8px var(--gutter) max(40px, env(safe-area-inset-bottom)); }
.bcn-eyebrow { margin: 18px 0 0; font-weight: 800; letter-spacing: .24em; font-size: .78rem; color: var(--pink); }
.bcn-h1 { margin: 4px 0 6px; font-size: clamp(1.7rem, 7vw, 2.6rem); line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.bcn-meta { margin: 0 0 26px; color: var(--muted); }
.bcn-empty { padding: 22px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

.bcn-day { margin: 0 0 26px; }
.bcn-day__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 1.1rem; }
.bcn-day__date { font-weight: 800; color: var(--cyan); }
.bcn-day__label { color: var(--muted); font-weight: 600; }
.bcn-exc { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bcn-exc__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bcn-exc__item--empty { color: var(--muted); justify-content: center; border-style: dashed; }
.bcn-exc__name { font-weight: 700; overflow-wrap: anywhere; }
.bcn-exc__count { color: var(--muted); font-size: .875rem; white-space: nowrap; margin-left: 12px; }
.bcn-exc__item:has(.bcn-exc__link) { padding: 0; }
.bcn-exc__link { display: flex; flex: 1; align-items: center; justify-content: space-between; min-height: 60px; padding: 12px 16px; color: inherit; text-decoration: none; border-radius: var(--radius); }
.bcn-exc__link:active { background: var(--surface-2); }

.bcn-wrap--wide { max-width: 1100px; }
.bcn-btn--ghost { background: transparent; border-color: var(--line); }
.bcn-grid { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bcn-grid__cell { margin: 0; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.bcn-grid__link { display: block; width: 100%; height: 100%; }
.bcn-grid__link img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcn-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0 8px; }
.bcn-pager__n { color: var(--muted); }
@media (min-width: 560px) { .bcn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .bcn-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } }

@media (min-width: 720px) {
  .bcn { --gutter: 32px; }
  .bcn-exc { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bcn *, .bcn *::before, .bcn *::after { transition: none !important; animation: none !important; }
}

/* ── galería: barra, selección, visor y panel de descargas ───────── */
.bcn [hidden] { display: none !important; }
.bcn-btn--go { background: var(--blue); border-color: var(--blue); }
.bcn-btn--go:hover { background: var(--blue-press); border-color: var(--blue-press); }
.bcn-btn--go[disabled] { background: var(--surface-2); border-color: var(--line); }
.bcn-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.bcn-bar .bcn-btn { flex: 1 1 0; padding: 0 12px; font-size: 1rem; white-space: nowrap; }
.bcn-day__dl { margin: 12px 0 0; width: 100%; }

.bcn-grid__cell { position: relative; }
.bcn-grid__link { position: relative; -webkit-tap-highlight-color: transparent; }
.bcn-grid.is-selecting .bcn-grid__cell::after {
  content: "";
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border-radius: 50%; border: 2px solid #fff; background: #0008;
  pointer-events: none;
}
.bcn-grid .is-selected { outline: 3px solid var(--cyan); outline-offset: -3px; }
.bcn-grid .is-selected::after {
  background: var(--cyan) !important; border-color: var(--cyan) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%2307080f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-size: 18px; background-position: center; background-repeat: no-repeat;
}
.bcn-grid.is-selecting .bcn-grid__link img { opacity: .9; }
.bcn-grid .is-selected img { opacity: .72 !important; }

.bcn-selbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  padding: 10px var(--gutter) max(12px, env(safe-area-inset-bottom));
  background: #0b0d18f2; border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.bcn-selbar__count { flex: 1 1 100%; font-weight: 800; }
.bcn-selbar .bcn-btn { margin-left: auto; min-width: 140px; }
.bcn-selecting .bcn-wrap { padding-bottom: 130px; }

.bcn-lock { overflow: hidden; }
.bcn-viewer {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: #05060bf5;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.bcn-viewer__top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.bcn-viewer__pos { flex: 1 1 auto; color: var(--muted); font-size: .9rem; min-width: 0; }
.bcn-viewer__top .bcn-btn { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.bcn-viewer__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px 12px; }
.bcn-viewer__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: var(--surface-2); }
.bcn-viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 72px; font-size: 2.6rem; line-height: 1; color: #fff;
  background: #0b0d18b3; border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
}
.bcn-viewer__nav--prev { left: 6px; }
.bcn-viewer__nav--next { right: 6px; }

.bcn-dlp-open .bcn-selbar { display: none; }
.bcn-dlp {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 82dvh; overflow-y: auto;
  padding: 16px var(--gutter) max(18px, env(safe-area-inset-bottom));
  background: var(--surface-solid); border-top: 2px solid var(--blue);
  border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px #000a;
}
.bcn-dlp__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bcn-dlp__title { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.bcn-dlp__msg { margin: 8px 0 12px; color: var(--muted); }
.bcn-dlp__msg--err { color: var(--danger); font-weight: 700; }
.bcn-dlp__note { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.bcn-dlp__parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bcn-dlp__part { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.bcn-dlp__part--done { opacity: .75; }
.bcn-dlp__info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bcn-dlp__sub { color: var(--muted); font-size: .875rem; }
.bcn-dlp__status { font-size: .9rem; overflow-wrap: anywhere; }
.bcn-dlp__status--err { color: var(--danger); font-weight: 700; }
.bcn-dlp__bar { height: 8px; margin-top: 6px; border-radius: 99px; background: #ffffff1f; overflow: hidden; }
.bcn-dlp__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width .3s; }
.bcn-dlp__act .bcn-btn { min-height: 48px; white-space: nowrap; }
@media (min-width: 720px) {
  .bcn-dlp { left: auto; right: 24px; bottom: 24px; width: 460px; border: 2px solid var(--blue); border-radius: 20px; }
  .bcn-selbar { padding-left: 32px; padding-right: 32px; }
  .bcn-selbar__count { flex: 0 0 auto; margin-right: auto; }
  .bcn-selbar .bcn-btn { margin-left: 0; }
}

/* ── galería (grupo y excursión): fondo de Barcelona, panel claro, miniaturas protagonistas ── */
.bcn--group, .bcn--gallery {
  --ink: #0b0d18;
  --blue: #1f6fff;
  --blue-deep: #1658e0;
  --cyan: #4fd8ff;
  --pink: #ff2f9a;
  --slate: #4b5f88;
  background: none;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
}
/* el fondo va fijo detrás de todo: no se estira ni se repite al crecer el contenido */
.bcn--group::before, .bcn--gallery::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background: #1658e0 url("/assets/img/barcelona/fondos/fondo-galeria.webp") center / cover no-repeat;
}

/* encabezado: logo a la izquierda, nombre y fechas, Salir a la derecha */
.bcn--group .bcn-top, .bcn--gallery .bcn-top {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 6px;
  color: #fff;
}
.bcn-top__brand { display: inline-flex; flex: none; }
.bcn-top__logo { display: block; width: 92px; height: auto; filter: drop-shadow(0 4px 8px #0a1a4d66); }
.bcn-top__title { flex: 1 1 auto; min-width: 0; text-shadow: 0 2px 6px #0b0d18b3; }
.bcn-top__name {
  margin: 0;
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(1.25rem, 5.6vw, 1.8rem); line-height: 1.1;
  overflow-wrap: anywhere;
}
.bcn-top__dates { margin: 2px 0 0; font-size: .92rem; font-weight: 700; color: #eaf4ff; }
.bcn-top__back { margin-left: auto; min-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 46vw; }
/* enlaces del encabezado sobre el fondo: píldoras oscuras para leerse en cualquier zona */
.bcn--group .bcn-top .bcn-link, .bcn--gallery .bcn-top .bcn-link {
  color: #fff;
  background: #0b0d18b3;
  border-radius: 999px;
  padding: 0 14px;
  min-height: 40px;
  text-decoration: none;
  font-weight: 800;
  flex: none;
}
.bcn--group .bcn-top form { flex: none; margin: 0; }

/* panel de contenido: papel claro sobre el fondo azul */
.bcn--group .bcn-wrap, .bcn--gallery .bcn-wrap {
  max-width: 1040px;
  margin: 8px auto 0;
  padding: 16px 12px 24px;
  background: rgba(247, 251, 255, .97);
  border-radius: 22px;
  box-shadow: 0 20px 50px #0a1a4d59;
}
.bcn--group .bcn-empty, .bcn--gallery .bcn-empty { color: var(--slate); background: #eef5ff; border: 2px dashed #cfe1ff; border-radius: 16px; }

/* jornadas: fecha destacada, estadísticas y descarga compacta */
.bcn--group .bcn-day { margin: 0; padding: 14px 4px 16px; }
.bcn--group .bcn-day + .bcn-day { border-top: 2px dashed #cfe1ff; }
.bcn--group .bcn-day__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.bcn--group .bcn-day__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 1rem; }
.bcn--group .bcn-day__date {
  font-family: "Arial Black", "Segoe UI Black", Arial, sans-serif;
  font-weight: 900; font-size: 1.3rem; color: var(--ink);
  background: linear-gradient(transparent 62%, #1f6fff59 62%, #1f6fff59 92%, transparent 92%);
  padding: 0 2px;
}
.bcn--group .bcn-day__label { color: var(--slate); font-weight: 700; }
.bcn--group .bcn-day__stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; color: var(--slate); font-size: .9rem; font-weight: 700; }
.bcn--group .bcn-day__dl { width: auto; min-height: 40px; margin: 0; padding: 0 14px; font-size: .9rem; }

/* actividades con su fila de miniaturas */
.bcn-exc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bcn-exc {
  min-width: 0;
  padding: 10px 10px 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 14px #0a1a4d1a;
}
.bcn-exc--empty { background: transparent; box-shadow: none; border: 2px dashed #cfe1ff; color: var(--slate); }
.bcn-exc__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bcn-exc__name { font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; min-width: 0; }
.bcn-exc__count { color: var(--blue-deep); font-weight: 800; font-size: .85rem; background: #eef5ff; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.bcn-exc__open { margin-left: auto; min-height: 40px; padding: 0 14px; font-size: .9rem; }

/* miniaturas de cada actividad: grilla uniforme en escritorio; en móvil, deslizable sin barra visible */
.bcn--group .bcn-exc { display: block; grid-template-columns: none; }
.bcn-strip {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.bcn-strip::-webkit-scrollbar { display: none; }
.bcn-strip__item, .bcn-strip__more { flex: 0 0 auto; width: 118px; scroll-snap-align: start; }
.bcn-strip__item a { display: block; border-radius: 12px; overflow: hidden; background: #dbeaff; }
.bcn-strip__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.bcn-strip__more a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 100%; min-height: 0; aspect-ratio: 4 / 3; padding: 8px; border-radius: 12px;
  background: #eef5ff; color: var(--blue-deep); text-decoration: none; text-align: center;
  border: 2px dashed #9fc2ff; box-sizing: border-box;
}
.bcn-strip__more-t { font-weight: 900; font-size: .95rem; }
.bcn-strip__more-n { font-size: .8rem; font-weight: 700; color: var(--slate); }
@media (min-width: 720px) {
  .bcn-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    overflow: visible;
  }
  .bcn-strip__item, .bcn-strip__more { width: auto; }
  .bcn-strip__item a { border: 0; box-shadow: 0 3px 8px #0a1a4d26; }
}

/* botones de jornada y actividad con color legible sobre el papel claro */
.bcn--group .bcn-btn--ghost, .bcn--group .bcn-day__dl { color: var(--blue-deep); background: #fff; border: 2px solid var(--blue); }
.bcn--group .bcn-exc__open { color: #fff; }

/* galería de excursión */
.bcn--gallery .bcn-h1 {
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(1.5rem, 6.4vw, 2.2rem); color: var(--ink);
}
.bcn--gallery .bcn-eyebrow { color: var(--pink); margin-top: 0; }
.bcn--gallery .bcn-meta { color: var(--slate); margin: 0 0 12px; }
.bcn--gallery .bcn-bar .bcn-btn { min-height: 44px; font-size: .95rem; }
.bcn--gallery .bcn-btn--ghost { color: var(--blue-deep); background: #fff; border: 2px solid #9fc2ff; }
.bcn--gallery .bcn-btn--go { background: var(--blue); border-color: var(--blue); color: #fff; }
.bcn--gallery .bcn-grid { gap: 8px; margin: 12px 0 0; }
.bcn--gallery .bcn-grid__cell { border-radius: 14px; background: #dbeaff; box-shadow: 0 4px 10px #0a1a4d2e; border: 2px solid #fff; }
.bcn--gallery .bcn-grid .is-selected { outline-color: var(--pink); }
.bcn--gallery .bcn-grid.is-selecting .bcn-grid__cell::after { border-color: #fff; }
.bcn--gallery .bcn-grid .is-selected::after { background-color: var(--pink) !important; border-color: var(--pink) !important; }
.bcn--gallery .bcn-pager .bcn-btn--ghost { min-height: 44px; }
.bcn--gallery .bcn-pager__n { color: var(--slate); }

/* barra de selección y visor: mismo lenguaje */
.bcn--gallery .bcn-selbar { background: #fff; border-top: 3px solid var(--pink); color: var(--ink); backdrop-filter: none; }
.bcn--gallery .bcn-selbar .bcn-link { color: var(--blue-deep); }
.bcn--gallery .bcn-selbar__count { color: var(--ink); }
.bcn--gallery .bcn-selbar .bcn-btn--go { background: var(--blue); border-color: var(--blue); color: #fff; }
.bcn--gallery .bcn-viewer .bcn-btn--go { background: var(--pink); border-color: var(--pink); }

@media (min-width: 720px) {
  .bcn-top__logo { width: 130px; }
  .bcn-top__dates { font-size: 1rem; }
  .bcn--group .bcn-wrap, .bcn--gallery .bcn-wrap { padding: 24px 26px 30px; }
  .bcn-exc { padding: 14px 14px 16px; }
  .bcn--gallery .bcn-h1 { font-size: 2.4rem; }
}
@media (min-width: 1000px) {
  .bcn-top__name { font-size: 2.3rem; }
}

/* retoques de revisión: encabezado alineado con el panel, menos aire arriba, acento rosa y panel más opaco */
.bcn--group .bcn-top { max-width: 1040px; padding-left: 16px; padding-right: 16px; }
.bcn--group .bcn-wrap { background: #f7fbff; }
.bcn--group .bcn-day:first-child { padding-top: 6px; }
.bcn--group .bcn-day__head { margin-bottom: 8px; }
.bcn--group .bcn-exc__open { background: var(--pink); border-color: var(--pink); color: #fff; }

/* acordeón de jornadas: la fecha es el botón del encabezado; el cuerpo se contrae con grid (sin medir alturas) */
.bcn--group .bcn-day__title { flex: 1 1 auto; min-width: 0; }
.bcn--group .bcn-day__toggle {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 48px; padding: 4px 0; margin: 0;
  background: none; border: 0; border-radius: 12px;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bcn--group .bcn-day__toggle:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.bcn--group .bcn-day__heading { display: block; min-width: 0; flex: 1 1 auto; }
.bcn--group .bcn-day__heading .bcn-day__date, .bcn--group .bcn-day__heading .bcn-day__label { display: inline; }
.bcn--group .bcn-day__heading .bcn-day__label { margin-left: 8px; }
.bcn--group .bcn-day__stats { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; }
.bcn-day__chev {
  flex: none; width: 10px; height: 10px; margin: 0 6px 0 4px;
  border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue);
  transform: rotate(45deg); transition: transform .2s ease;
}
.bcn--group .bcn-day.is-open .bcn-day__chev { transform: rotate(-135deg); margin-top: 4px; }
.bcn--group .bcn-day__head { flex-wrap: nowrap; align-items: flex-start; }
.bcn--group .bcn-day__dl { flex: none; margin-top: 6px; }

/* cuerpo colapsable: solo con JS; sin JS todas las jornadas quedan visibles */
.bcn-day__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
.bcn-day__inner { min-height: 0; overflow: hidden; }
.bcn--js .bcn-day:not(.is-open) > .bcn-day__body { grid-template-rows: 0fr; }
.bcn--js .bcn-day:not(.is-open) .bcn-day__head { margin-bottom: 0; }
@media (max-width: 719px) {
  .bcn--group .bcn-day__dl { margin-top: 0; min-height: 44px; }
  .bcn--group .bcn-day__head { flex-wrap: wrap; }
  .bcn--group .bcn-day__toggle { min-height: 52px; }
}

/* panel de descargas: títulos y estados legibles sobre el fondo oscuro del panel */
.bcn-dlp__title { color: #fff; }
.bcn-dlp__status { color: #fff; font-weight: 800; }
.bcn-dlp__sub { color: #c9d6f2; }
.bcn-dlp__msg { color: #eef5ff; }
.bcn-dlp__note { color: #c9d6f2; }

/* panel de descargas (rediseño): tarjeta blanca centrada, indicador lateral y lotes con estado */
.bcn-dlp-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(11, 13, 24, .3); }
.bcn .bcn-dlp {
  position: fixed; top: 50%; left: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 24px)); max-width: none; max-height: min(78dvh, 640px); overflow-y: auto;
  margin: 0; padding: 18px 18px 16px; z-index: 40;
  background: #fff; color: var(--ink);
  border: 1px solid #d7e6ff; border-radius: 20px;
  box-shadow: 0 18px 44px #0a1a4d40;
  font-size: .95rem;
}
.bcn .bcn-dlp:focus { outline: none; }
.bcn .bcn-dlp__head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.bcn .bcn-dlp__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #eaf2ff; color: var(--blue); display: grid; place-items: center; }
.bcn .bcn-dlp__icon svg { width: 22px; height: 22px; }
.bcn .bcn-dlp__headtext { flex: 1 1 auto; min-width: 0; }
.bcn .bcn-dlp__title { margin: 0; font-family: "Arial Black", "Segoe UI Black", Arial, sans-serif; font-size: 1.05rem; font-weight: 900; color: var(--ink); }
.bcn .bcn-dlp__count { margin: 2px 0 0; color: var(--slate); font-size: .85rem; font-weight: 700; }
.bcn .bcn-dlp__iconbtn { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid #d7e6ff; background: #fff; color: var(--blue-deep); display: grid; place-items: center; cursor: pointer; }
.bcn .bcn-dlp__iconbtn svg { width: 20px; height: 20px; }
.bcn .bcn-dlp__iconbtn:hover { background: #eef5ff; }
.bcn .bcn-dlp__progress { margin: 0 0 10px; }
.bcn .bcn-dlp__bar { height: 8px; border-radius: 999px; background: #e3edff; overflow: hidden; }
.bcn .bcn-dlp__fill { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 999px; transition: width .25s ease; }
.bcn .bcn-dlp__row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .85rem; font-weight: 700; color: var(--slate); }
.bcn .bcn-dlp__lote { color: var(--ink); }
.bcn .bcn-dlp__msg { margin: 0 0 10px; color: var(--ink); font-size: .88rem; }
.bcn .bcn-dlp__msg--err { color: #a0105c; font-weight: 700; }
.bcn .bcn-dlp__parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bcn .bcn-dlp__part { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid #dbe8ff; border-radius: 12px; background: #f7fbff; }
.bcn .bcn-dlp__part--done { background: #eef7ff; border-color: #bfe0ff; }
.bcn .bcn-dlp__part--error { background: #fff4f9; border-color: #ffb7d6; }
.bcn .bcn-dlp__info { display: grid; gap: 0; min-width: 0; flex: 1 1 auto; }
.bcn .bcn-dlp__status { color: var(--ink); font-weight: 800; font-size: .9rem; }
.bcn .bcn-dlp__part--done .bcn-dlp__status::before { content: "✓ "; color: var(--blue-deep); }
.bcn .bcn-dlp__part--error .bcn-dlp__status::before { content: "! "; color: #a0105c; }
.bcn .bcn-dlp__sub { color: var(--slate); font-size: .8rem; }
.bcn .bcn-dlp__part .bcn-btn { min-height: 40px; padding: 0 14px; font-size: .85rem; flex: none; }
.bcn .bcn-dlp__note { margin: 10px 0 0; font-size: .8rem; color: var(--slate); }
.bcn .bcn-dlp__foot { position: sticky; bottom: -16px; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin: 12px -18px -16px; padding: 12px 18px 16px; background: #fff; border-top: 1px solid #e3edff; }
.bcn .bcn-dlp__foot .bcn-btn { min-height: 44px; font-size: .9rem; }
.bcn .bcn-dlp__confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink); font-size: .88rem; font-weight: 700; }
.bcn .bcn-dlp__confirm .bcn-btn { min-height: 44px; }

/* indicador minimizado: borde derecho, siempre visible mientras haya descargas */
.bcn .bcn-dlp-pill {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 38;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 74px; padding: 10px 10px 10px 12px;
  background: #fff; color: var(--blue-deep);
  border: 1px solid #bcd6ff; border-right: 0; border-radius: 16px 0 0 16px;
  box-shadow: 0 10px 28px #0a1a4d33; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 800; text-align: center;
}
.bcn .bcn-dlp-pill:hover { background: #eef5ff; }
.bcn .bcn-dlp-pill:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.bcn .bcn-dlp-pill__arrow { font-size: 1.1rem; line-height: 1; }
.bcn .bcn-dlp-pill__n { color: var(--ink); font-size: .78rem; font-weight: 700; }
.bcn .bcn-dlp-pill__err { background: #ffe6f1; color: #a0105c; border-radius: 999px; padding: 1px 8px; font-size: .72rem; }
@media (max-width: 719px) {
  .bcn .bcn-dlp { width: calc(100vw - 24px); padding: 16px 14px 14px; max-height: 84dvh; }
  .bcn .bcn-dlp-pill { min-width: 64px; padding: 8px 8px 8px 10px; }
}

/* lotes de foto en foto: encabezado de lote, botón de la siguiente foto y estado de cada foto */
.bcn .bcn-dlp__next { list-style: none; margin: 0 0 4px; }
.bcn .bcn-dlp__next .bcn-btn { width: 100%; min-height: 48px; font-size: .95rem; }
.bcn .bcn-dlp__batch { list-style: none; margin: 8px 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.bcn .bcn-dlp__part .bcn-btn--go { background: var(--blue); border-color: var(--blue); color: #fff; }
.bcn .bcn-dlp__part .bcn-btn:disabled { opacity: .5; cursor: not-allowed; }
.bcn .bcn-dlp__part--error .bcn-dlp__sub { color: #a0105c; font-weight: 700; overflow-wrap: anywhere; }

/* barra inferior de selección: compacta, fija, con área segura de iOS; progreso de preparación */
.bcn--gallery .bcn-selbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff; color: var(--ink);
  border-top: 2px solid var(--pink); box-shadow: 0 -6px 20px #0a1a4d1f;
  backdrop-filter: none;
}
.bcn--gallery .bcn-selbar[hidden] { display: none; }
.bcn--gallery .bcn-selbar .bcn-selbar__count { flex: none; font-size: .88rem; font-weight: 700; color: var(--slate); }
.bcn--gallery .bcn-selbar .bcn-selbar__count strong { color: var(--pink); font-size: 1.05rem; font-weight: 900; margin-right: 2px; }
.bcn--gallery .bcn-selbar .bcn-selbar__row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bcn--gallery .bcn-selbar .bcn-selbar__sec {
  min-height: 40px; padding: 0 14px; border: 1.5px solid #bcd6ff; border-radius: 999px; background: #fff;
  color: var(--blue-deep); font: inherit; font-size: .86rem; font-weight: 800;
  cursor: pointer; white-space: nowrap;
}
.bcn--gallery .bcn-selbar .bcn-selbar__sec:hover { background: #eef5ff; }
.bcn--gallery .bcn-selbar .bcn-selbar__sec:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.bcn--gallery .bcn-selbar .bcn-selbar__main {
  margin-left: auto; min-height: 42px; min-width: 0; padding: 0 16px;
  font-size: .92rem; font-weight: 900; border-radius: 999px;
  background: var(--blue); border: 0; color: #fff; box-shadow: 0 6px 14px #1f6fff40; white-space: nowrap;
}
.bcn--gallery .bcn-selbar .bcn-selbar__main:disabled { opacity: .5; box-shadow: none; }
.bcn--gallery.bcn-selecting .bcn-wrap { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) {
  .bcn--gallery .bcn-selbar {
    flex-direction: row; align-items: center; gap: 16px;
    padding: 10px 28px calc(10px + env(safe-area-inset-bottom));
  }
  .bcn--gallery .bcn-selbar .bcn-selbar__count { margin-right: auto; }
  .bcn--gallery .bcn-selbar .bcn-selbar__row { flex: 0 0 auto; }
  .bcn--gallery .bcn-selbar .bcn-selbar__main { margin-left: 8px; min-width: 150px; }
}
.bcn--gallery .bcn-dlp__prep {
  list-style: none; display: grid; gap: 4px;
  padding: 10px 12px; margin: 0 0 8px; border: 1px solid #dbe8ff; border-radius: 14px; background: #f7fbff;
}
.bcn--gallery .bcn-dlp__prep-t { font-weight: 800; color: var(--ink); font-size: .92rem; }
.bcn--gallery .bcn-dlp__prep-n { font-weight: 800; color: var(--blue-deep); font-size: .88rem; }
.bcn--gallery .bcn-dlp__prep .bcn-dlp__bar { margin: 4px 0; }
/* ajuste de ancho a 375 px: la barra no debe desbordar */
.bcn--gallery .bcn-selbar .bcn-selbar__sec { padding: 0 10px; font-size: .8rem; }
.bcn--gallery .bcn-selbar .bcn-selbar__row { gap: 2px; }
.bcn--gallery .bcn-selbar .bcn-selbar__main { padding: 0 12px; font-size: .86rem; }
@media (max-width: 400px) { .bcn--gallery .bcn-selbar { padding-left: 10px; padding-right: 10px; } }
