/* El álbum de fotos y vídeos de los invitados. Va con el diseño de la web de cada pareja: usa sus variables (--b-fondo, --b-texto, --b-acento…) y sus
   letras; aquí solo está lo propio del álbum. Móvil primero (390 px), cómodo también en ordenador. Hecho para el nivel AA: contrastes sobre el fondo de
   cada estilo, zonas táctiles de 48 px y foco visible. */
body { margin: 0; }
.album { --al-borde: var(--b-borde, #cfc6b6); --al-tarjeta: var(--b-tarjeta, rgb(255 255 255 / .7)); --al-error: #8a1c1c; min-height: 100vh; display: flex; flex-direction: column; }
.album > .al-principal { flex: 1; }
.album a { color: var(--b-acento-texto, currentColor); text-underline-offset: .2em; }
.album a:focus-visible, .album button:focus-visible, .album input:focus-visible, .album textarea:focus-visible { outline: 3px solid var(--b-acento, #1a4fb4); outline-offset: 3px; }

/* ---- cabecera ---- */
.al-cabecera { display: grid; justify-items: center; text-align: center; gap: .6rem; padding: 3.25rem 1.25rem 1.25rem; }
.al-nombres { margin: 0; font-family: var(--b-letra-nombres, var(--b-letra-titulo)); font-style: var(--b-estilo-nombres, normal); font-weight: 400; font-size: clamp(2.1rem, 9vw, 3.6rem); line-height: 1.1; color: var(--b-acento-texto); text-wrap: balance; }
.al-volver { font-size: .98rem; display: inline-flex; align-items: center; min-height: 44px; }

/* ---- subir ---- */
.al-subir.b-seccion { padding-block: 1rem 2rem; }
.al-form { display: grid; gap: 1rem; background: var(--al-tarjeta); border: 1px solid var(--al-borde); border-radius: var(--b-radio, 2px); padding: 1.25rem 1.1rem 1.4rem; }
.al-pasos { margin: 0; text-align: center; color: var(--b-suave); }
.al-campo { display: grid; gap: .4rem; }
.al-campo label, .al-form fieldset legend { font-weight: 500; }
.al-opcional { font-weight: 400; color: var(--b-suave); }
.album input[type="text"], .album input[type="email"], .album textarea {
  font: inherit; color: var(--b-texto); background: var(--b-fondo); border: 1px solid var(--al-borde); border-radius: var(--b-radio, 2px); padding: .75rem; width: 100%; min-height: 48px; box-sizing: border-box;
}
.album textarea { min-height: 6rem; resize: vertical; }
.al-casilla, .al-opcion { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 400; }
.al-casilla input, .al-opcion input { width: 1.4rem; height: 1.4rem; flex: none; accent-color: var(--b-acento); }

.album .al-boton { display: inline-flex; align-items: center; justify-content: center; text-align: center; width: 100%; min-height: 52px; padding: .9rem 1.2rem; box-sizing: border-box; text-decoration: none; cursor: pointer; }
.album .al-boton:disabled { opacity: .55; cursor: not-allowed; }
.album .al-boton--claro { background: transparent; color: var(--b-acento-texto); border: 1.5px solid var(--b-acento); }
.al-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.al-oculto:focus-visible + .al-boton { outline: 3px solid var(--b-texto); outline-offset: 3px; }
.al-elegir { display: grid; }
.al-aviso, .al-limite { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--b-suave); }
.al-limite { font-weight: 500; color: var(--b-texto); }
.al-contador { margin: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.al-contador:empty { display: none; }
.al-error, .al-error-linea { color: var(--al-error); }
.al-error { margin: 0; padding: .7rem .9rem; border: 1px solid currentColor; border-radius: var(--b-radio, 2px); display: grid; gap: .3rem; background: var(--b-fondo); }
.al-error[hidden] { display: none; }
.al-error-linea { display: block; }
.al-resultado { margin: 0; text-align: center; font-size: 1.05rem; line-height: 1.5; }
.al-resultado:empty { display: none; }
.al-resultado:focus { outline: none; }
.al-enlace { font-weight: 600; }
.al-pendientes { display: grid; gap: .7rem; background: var(--al-tarjeta); border: 1.5px solid var(--b-acento); border-radius: var(--b-radio, 2px); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.al-pendientes p { margin: 0; }
.al-pendientes[hidden] { display: none; }
.al-suave { color: var(--b-suave); font-size: .95rem; }
.al-reintentar { margin: 0; }

.al-elegidos { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.al-elegidos:empty { display: none; }
.al-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: .75rem; padding: .5rem; background: var(--b-fondo); border: 1px solid var(--al-borde); border-radius: var(--b-radio, 2px); }
.al-item--lista { border-color: var(--b-acento); }
.al-item--fallo .al-item-detalle { color: var(--al-error); font-weight: 500; }
.al-mini { width: 48px; height: 48px; object-fit: cover; border-radius: var(--b-radio, 2px); display: grid; place-items: center; background: var(--al-tarjeta); color: var(--b-acento-texto); font-weight: 700; }
.al-item-texto { display: grid; gap: .1rem; min-width: 0; }
.al-nombre-archivo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.al-item-detalle { font-size: .9rem; color: var(--b-suave); }
.al-progreso { width: 100%; height: .6rem; accent-color: var(--b-acento); }
.al-quitar { font: inherit; min-height: 44px; min-width: 44px; padding: 0 .6rem; background: none; border: 0; color: var(--b-acento-texto); text-decoration: underline; cursor: pointer; }

/* ---- el álbum ---- */
.al-galeria .al-vacio { margin: 0; text-align: center; color: var(--b-suave); }
.al-vacio[hidden] { display: none; }
.al-rejilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.al-celda { margin: 0; }
.al-foto { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--al-tarjeta); cursor: pointer; overflow: hidden; border-radius: var(--b-radio, 2px); isolation: isolate; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.al-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* las miniaturas aparecen suaves cuando llegan (sin saltos) */
.al-foto .al-img { opacity: 0; transform: scale(1.02); transition: opacity .45s ease, transform .6s ease; }
.al-foto .al-img--lista { opacity: 1; transform: none; }
/* mientras no hay imagen: una tarjeta con el color y el aire de la web (nunca un gris plano) */
.al-tarjeta-vista { display: block; width: 100%; height: 100%; background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--b-acento, #888) 22%, var(--b-fondo, #fff)), color-mix(in srgb, var(--b-acento, #888) 10%, var(--b-fondo, #fff)) 70%); }
.al-tarjeta-vista::after { content: ''; position: absolute; inset: .45rem; border: 1px solid color-mix(in srgb, var(--b-acento, #888) 35%, transparent); border-radius: calc(var(--b-radio, 2px) / 1.5); pointer-events: none; }
.al-sin-vista { display: grid; place-items: center; width: 100%; height: 100%; color: var(--b-suave); font-size: .9rem; text-align: center; }
.al-sin-vista--grande { padding: 2rem; color: #f1f1f1; font-size: 1.05rem; }
/* el primer fotograma sacado del propio vídeo: no ocupa sitio hasta que está listo */
.al-fotograma { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; z-index: 0; transition: opacity .45s ease; }
.al-fotograma--lista, .al-fotograma--listo { opacity: 1; }
/* el play: un círculo con un triángulo dibujado en CSS, en el color del estilo de la web, sobre el fotograma */
.al-play { position: absolute; inset: 0; margin: auto; width: 2.9rem; height: 2.9rem; display: block; border-radius: 50%; background: rgb(255 255 255 / .9); box-shadow: 0 2px 10px rgb(0 0 0 / .28); pointer-events: none; z-index: 1; }
.al-play::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-36%, -50%); border-style: solid; border-width: .55rem 0 .55rem .9rem; border-color: transparent transparent transparent var(--b-acento-texto, var(--b-acento, #333)); }
@media (prefers-reduced-motion: reduce) { .al-foto .al-img, .al-fotograma { transition: none; transform: none; } }
.al-mas { text-align: center; margin: 1rem 0 0; }
.al-mas .al-boton { width: auto; min-width: 14rem; }
.al-mas [hidden] { display: none; }
.al-cerrado p { margin: 0; text-align: center; }
.al-pie { padding: 1.5rem 1.25rem 2.5rem; text-align: center; font-size: .95rem; }

/* ---- visor y diálogos ---- */
.al-visor { padding: 0; border: 0; width: min(100vw, 72rem); max-width: 100vw; height: 100dvh; max-height: 100dvh; background: #151515; color: #f3f3f3; margin: auto; box-sizing: border-box; overflow: hidden; }
.al-visor[open] { display: grid; grid-template-rows: auto 1fr auto auto; }
.al-visor::backdrop, .al-dlg::backdrop { background: rgb(0 0 0 / .82); }
.al-visor-cab { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; }
.al-visor-titulo { margin: 0; font-size: .98rem; }
.al-icono { font: inherit; min-height: 44px; padding: 0 1rem; background: #f3f3f3; color: #151515; border: 0; border-radius: var(--b-radio, 2px); cursor: pointer; font-weight: 600; }
.al-visor-cuerpo { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .25rem; min-height: 0; padding-inline: .25rem; }
.al-visor-figura { margin: 0; min-height: 0; height: 100%; display: grid; place-items: center; }
.al-visor-figura img, .al-visor-figura video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.al-flecha { font: inherit; font-size: 2rem; line-height: 1; width: 44px; min-height: 64px; background: rgb(255 255 255 / .12); color: #fff; border: 0; border-radius: var(--b-radio, 2px); cursor: pointer; }
.al-flecha:disabled { opacity: .3; cursor: default; }
.al-visor-acciones { display: grid; gap: .6rem; padding: .8rem .9rem .4rem; }
.al-visor .b-boton { background: #f3f3f3; color: #151515; }
.al-visor .al-boton--claro { background: transparent; color: #f3f3f3; border-color: #f3f3f3; }
.al-visor a, .al-visor .al-enlace-boton { color: #f3f3f3; }
.al-visor-menos { margin: 0; padding: .2rem .9rem 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.2rem; font-size: .92rem; color: #d6d6d6; }
.al-enlace-boton { font: inherit; min-height: 44px; padding: 0 .4rem; background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--b-acento-texto); }
.al-visor :focus-visible { outline-color: #fff; }

.al-dlg { max-width: min(32rem, calc(100vw - 2rem)); width: 100%; padding: 1.4rem 1.25rem; border: 1px solid var(--al-borde); border-radius: var(--b-radio, 2px); background: var(--b-fondo); color: var(--b-texto); font-family: var(--b-letra-texto); box-sizing: border-box; max-height: calc(100dvh - 2rem); overflow: auto; }
.al-dlg h2 { margin: 0 0 .8rem; font-family: var(--b-letra-titulo); font-weight: 400; font-size: 1.45rem; color: var(--b-acento-texto); }
.al-dlg p { margin: 0 0 .8rem; }
.al-dlg fieldset { border: 0; padding: 0; margin: 0 0 .5rem; display: grid; gap: .1rem; }
.al-form-dlg { display: grid; gap: .6rem; }
.al-botones { display: grid; gap: .6rem; margin-top: .4rem; }
.al-toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 100; max-width: calc(100vw - 2rem); margin: 0; padding: .8rem 1.1rem; background: #1b1b1b; color: #fff; border-radius: var(--b-radio, 4px); font-size: .98rem; }
.al-toast[hidden] { display: none; }

@media (min-width: 40rem) {
  .al-rejilla { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .5rem; }
  .album .al-boton { width: auto; min-width: 16rem; }
  .al-elegir, .al-botones { justify-items: start; }
  .al-form { padding: 1.6rem 1.8rem 1.8rem; }
  .al-form > .al-boton, .al-form > .al-elegir { justify-self: center; }
  .al-visor-acciones { grid-template-columns: auto auto; justify-content: center; }
  .al-botones { display: flex; flex-wrap: wrap; }
  .al-visor-cuerpo { padding-inline: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .al-foto img { transition: transform .25s ease; }
  .al-foto:hover img { transform: scale(1.04); }
}
@media print { .al-toast { display: none; } }

/* ---- cambio del 15/10/2026: antes de la apertura, el álbum de muestra y la pareja probando ---- */
.al-pronto h2 { text-wrap: balance; }
.al-probando { margin: 0 1rem 1rem; padding: .9rem 1rem; border: 1px dashed var(--al-borde); border-radius: var(--b-radio, 2px); background: var(--al-tarjeta); line-height: 1.5; }
.al-muestra { margin: .5rem 1rem 0; text-align: center; color: var(--b-suave); }
.album--muestra .al-foto { cursor: default; }

/* un vídeo con su fotograma ya puesto no enseña la tarjeta de debajo */
.al-foto--con-vista .al-tarjeta-vista { visibility: hidden; }

/* el álbum «vivo»: lo nuevo aparece suave arriba, y si se está mirando más abajo sale una píldora fija para ir a verlo */
@keyframes al-aparece { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.al-celda--nueva { animation: al-aparece .5s ease both; }
.al-pildora-caja { position: fixed; left: 0; right: 0; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.al-pildora { pointer-events: auto; min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 999px; background: var(--b-acento, #1a4fb4); color: var(--b-fondo, #fff); font: 600 1rem/1 var(--b-letra-texto, inherit); box-shadow: 0 6px 20px rgb(0 0 0 / .3); cursor: pointer; animation: al-aparece .35s ease both; }
.al-pildora:focus-visible { outline: 3px solid var(--b-acento-texto, #fff); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .al-celda--nueva, .al-pildora { animation: none; } }
