/* Lozzy · estilo «Coleccionista y social» (v2). Móvil primero. */
:root {
  --fondo: #0B0C10;
  --tarjeta: #14161D;
  --tarjeta-2: #1A1D26;
  --borde: #262935;
  --borde-2: #2E3240;
  --acento: #E8DFC9;
  --acento-hover: #F3ECDB;
  --texto: #F2F3F7;
  --texto-2: #C9CCD6;
  --texto-3: #8E93A3;
  --legendario: #D6B46A;
  --epico: #A398D4;
  --raro: #8FB8C9;
  --comun: #8E93A3;
  --peligro: #E39A8F;
  --serif: Fraunces, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--acento); }
a:hover { color: var(--acento-hover); }
button { font-family: inherit; }
img { display: block; }
[hidden] { display: none !important; }

.pagina {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.pagina.sin-nav { padding-bottom: 32px; }

/* ---------- cabecera ---------- */
.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  gap: 12px;
}
.marca {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -1px;
  color: var(--texto);
  text-decoration: none;
}
.marca span { color: var(--acento); }
.cabecera h1, .titulo-pag {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
}
h2.seccion {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
}
.seccion-cab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 8px;
}
.nota { font-size: 12px; color: var(--texto-3); }

/* ---------- botones ---------- */
.boton-redondo {
  width: 44px; height: 44px;
  border-radius: 22px;
  border: 1px solid var(--borde);
  background: var(--tarjeta);
  color: var(--texto);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex: none;
  text-decoration: none;
}
.boton {
  height: 56px;
  border-radius: 28px;
  border: 0;
  background: var(--acento);
  color: var(--fondo);
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  width: 100%;
  padding: 0 20px;
}
.boton:hover { background: var(--acento-hover); }
.boton:disabled { opacity: .55; cursor: progress; }
.boton.secundario {
  height: 52px;
  background: transparent;
  border: 1px solid var(--borde-2);
  color: var(--texto);
  font-weight: 600;
  font-size: 15px;
}
.boton.secundario:hover { background: var(--tarjeta); }
.boton.pequeno {
  height: 36px;
  width: auto;
  border-radius: 18px;
  font-size: 13px;
  padding: 0 14px;
}
.boton.peligro { color: var(--peligro); border-color: #4A2E2B; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 2px;
}

/* ---------- tarjetas ---------- */
.tarjeta {
  border-radius: 22px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
}
.lista { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }

.aviso {
  margin: 12px 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #2A1A18;
  border: 1px solid #4A2E2B;
  color: #F1C9C2;
  font-size: 14px;
}
.vacio {
  margin: 24px 16px;
  padding: 24px 20px;
  border-radius: 22px;
  border: 1.5px dashed var(--borde-2);
  color: var(--texto-2);
  text-align: center;
  font-size: 14px;
}
.vacio h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0 0 6px; color: var(--texto); }
.vacio .boton { margin-top: 16px; }

/* ---------- muro ---------- */
.ev-logro { overflow: hidden; }
.ev-logro .fondo {
  height: 170px;
  position: relative;
  background: repeating-linear-gradient(135deg, #1B1E28 0 14px, #171922 14px 28px);
  overflow: hidden;
}
.ev-logro .fondo img.portada {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
}
.banda {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: flex; gap: 10px; align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(11, 12, 16, .84);
  border: 1px solid var(--c, var(--comun));
  box-shadow: 0 0 22px var(--brillo, transparent);
}
.banda .icono {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--fondo-r, #1A1D26);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  overflow: hidden;
}
.banda .icono img { width: 100%; height: 100%; object-fit: cover; }
.banda .texto { min-width: 0; flex: 1; }
.etiqueta-r {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--c, var(--comun));
  text-transform: uppercase;
}
.banda .nombre {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-pie { padding: 12px 14px 14px; font-size: 14px; }
.ev-pie .gris, .gris { color: var(--texto-3); }
.ev-pie .desc { color: var(--texto-2); margin-top: 4px; }
.ev-fila {
  padding: 14px;
  display: flex; gap: 12px; align-items: center;
  text-decoration: none;
  color: var(--texto);
}
.ev-fila:hover { color: var(--texto); border-color: var(--borde-2); }
.ev-fila .mini {
  width: 44px; height: 58px;
  border-radius: 8px;
  background: #23324A;
  flex: none;
  overflow: hidden;
}
.ev-fila .mini img { width: 100%; height: 100%; object-fit: cover; }
.ev-fila .cuerpo { flex: 1; min-width: 0; font-size: 14px; }
.ev-fila .sub { font-size: 13px; color: var(--texto-2); }
.ev-acabado { background: #191816; border-color: #34312A; }
.ev-acabado .medalla {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--acento);
  color: var(--fondo);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.chip {
  font-size: 12px; font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  background: #23324A; color: #B5C8DE;
  flex: none;
}
.mas { margin: 16px; }

/* ---------- navegación inferior ---------- */
.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  background: rgba(11, 12, 16, .96);
  border-top: 1px solid #1C1F29;
  padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
}
.nav div {
  max-width: 560px;
  margin: 0 auto;
  display: flex; justify-content: space-around; align-items: center;
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 64px;
  padding: 6px 0;
  color: var(--texto-3);
  text-decoration: none;
  font-size: 11px;
}
.nav a[aria-current="page"] { color: var(--acento); font-weight: 600; }

/* ---------- perfil ---------- */
.carta {
  margin: 8px 20px 0;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(140deg, #E8DFC9, #3A372F 35%, #2A2925 65%, #D6B46A);
}
.carta-in {
  border-radius: 24px;
  background: #12141B;
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.carta-cab { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--av, var(--epico));
  color: var(--fondo);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.carta-nombre { font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: -.5px; line-height: 1.15; }
.carta-titulo { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--acento); text-transform: uppercase; }
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.cifras div { padding: 8px 0; border-radius: 12px; background: var(--tarjeta-2); }
.cifras b { display: block; font-family: var(--serif); font-weight: 600; font-size: 18px; }
.cifras span { font-size: 11px; color: var(--texto-3); }

.bloque { padding: 22px 20px 0; }
.vitrina { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pieza {
  aspect-ratio: .78;
  border-radius: 14px;
  background: var(--fondo-r, #1A1D26);
  border: 1.5px solid var(--c, var(--comun));
  box-shadow: 0 0 16px var(--brillo, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 6px;
  text-decoration: none;
  overflow: hidden;
}
.pieza img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.pieza .pct { font-size: 10px; font-weight: 700; color: var(--c-claro, var(--c)); }
.pieza.libre { border: 1.5px dashed var(--borde-2); background: none; box-shadow: none; color: var(--texto-3); }
.leyenda { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--texto-3); }
.leyenda span { display: flex; gap: 4px; align-items: center; }
.leyenda i { width: 8px; height: 8px; border-radius: 4px; background: var(--c); }

.filtros { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.filtros button {
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid var(--borde);
  background: transparent;
  color: var(--texto-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.filtros button[aria-pressed="true"] { background: var(--acento); color: var(--fondo); border-color: var(--acento); font-weight: 600; }
.estanteria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.caja { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--texto); min-width: 0; }
.caja .tapa {
  aspect-ratio: .75;
  border-radius: 10px;
  background: #23211C;
  overflow: hidden;
  display: flex; align-items: flex-end;
  border: 2px solid transparent;
}
.caja.jugando .tapa { border-color: var(--acento); }
.caja .tapa img { width: 100%; height: 100%; object-fit: cover; }
.caja .tapa .sin {
  padding: 8px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--texto-2);
  line-height: 1.2;
}
.caja .t { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caja .e { font-size: 11px; color: var(--texto-3); }
.caja.jugando .e { color: var(--acento); font-weight: 600; }
.ajustes { display: flex; flex-direction: column; gap: 10px; }

/* ---------- juego ---------- */
.heroe {
  height: 250px;
  position: relative;
  background: repeating-linear-gradient(135deg, #2A1616 0 16px, #241313 16px 32px);
  overflow: hidden;
}
.heroe img.arte { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.heroe .volver { position: absolute; top: 16px; left: 12px; background: rgba(11, 12, 16, .7); border: 0; }
.heroe .pie {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 48px 20px 16px;
  background: linear-gradient(transparent, var(--fondo));
}
.heroe h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 32px; letter-spacing: -.5px; line-height: 1.1; }
.heroe .meta { margin-top: 6px; font-size: 13px; color: var(--texto-2); }
.progreso { padding: 8px 16px 0; }
.barra { height: 8px; border-radius: 4px; background: var(--tarjeta-2); overflow: hidden; margin-top: 8px; }
.barra i { display: block; height: 100%; background: var(--acento); border-radius: 4px; }
.logros { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 0; }
.logro {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
}
.logro.conseguido { border-color: color-mix(in srgb, var(--c) 45%, var(--borde)); }
.logro .icono {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--fondo-r, #1A1D26);
  border: 1.5px solid var(--c);
  flex: none;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.logro .icono img { width: 100%; height: 100%; object-fit: cover; }
.logro .cuerpo { flex: 1; min-width: 0; }
.logro .n { font-weight: 600; font-size: 14px; }
.logro .d { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.logro .f { font-size: 12px; color: var(--texto-3); margin-top: 4px; }
.logro.pendiente { opacity: .55; }
.logro.pendiente .icono img { filter: grayscale(1); }

/* ---------- entrar / emparejar ---------- */
.pantalla {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 48px 24px calc(28px + env(safe-area-inset-bottom));
}
.pantalla h1 {
  margin: 20px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -.5px;
}
.pantalla p.intro { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texto-2); }
.pantalla .hueco { flex: 1; min-height: 24px; }
.pantalla label { margin-top: 28px; font-size: 13px; font-weight: 600; }
.pantalla input[type="text"] {
  margin-top: 8px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--borde-2);
  background: var(--tarjeta);
  color: var(--texto);
  font-size: 16px;
  padding: 0 16px;
  font-family: inherit;
  width: 100%;
}
.pantalla input[type="text"]:focus { border-color: var(--acento); outline: none; }
.caja-info {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; line-height: 1.5; color: var(--texto-2);
}
.caja-info svg { flex: none; margin-top: 1px; color: var(--acento); }
.caja-info b { color: var(--texto); }
.pantalla .letra { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--texto-3); }
.medallon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  display: flex; align-items: center; justify-content: center;
  color: var(--acento);
}

.emparejar { padding: 8px 20px 0; }
.emparejar h1 { margin: 16px 0 8px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -.5px; }
.solicitud { padding: 18px; margin-top: 16px; }
.solicitud h2 { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.codigo { margin-top: 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.codigo span {
  height: 60px;
  border-radius: 12px;
  background: var(--fondo);
  border: 1px solid var(--borde-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.datos { margin-top: 18px; border-radius: 16px; background: var(--fondo); border: 1px solid var(--borde); padding: 4px 14px; }
.datos div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.datos div + div { border-top: 1px solid #1E212B; }
.datos span:first-child { color: var(--texto-3); flex: none; }
.datos span:last-child { text-align: right; overflow-wrap: anywhere; }
.permisos { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.permisos li { display: flex; gap: 8px; align-items: center; }
.permisos li.no { color: var(--texto-3); }
.acciones { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.equipo { display: flex; gap: 12px; align-items: center; padding: 14px; }
.equipo .cuerpo { flex: 1; min-width: 0; }
.equipo .n { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.equipo .sub { font-size: 12px; color: var(--texto-3); }

/* ---------- escritorio ---------- */
@media (min-width: 720px) {
  .pagina { max-width: 720px; }
  .estanteria { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lista { padding: 0 20px; }
  .ev-logro .fondo { height: 220px; }
  .heroe { height: 320px; border-radius: 0 0 26px 26px; }
  .acciones { flex-direction: row; }
}

@media (prefers-reduced-motion: no-preference) {
  .tarjeta, .boton, .caja .tapa { transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
  .caja:hover .tapa { transform: translateY(-2px); }
}
.marca.pequena { font-size: 22px; }
.hueco-10 { height: 10px; }
.lista-pcs { display: flex; flex-direction: column; gap: 10px; }
.medallon.pc-mini { width: 44px; height: 44px; border-radius: 14px; flex: none; }
.bloque.sin-lado { padding: 28px 0 0; }

/* ================================================================ fase 2: amigos */
:root { --rival: #D9A58A; --rival-claro: #E2BBA6; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* avatares de varios tamaños (el color sale de --av) */
.avatar.mini { width: 28px; height: 28px; border-radius: 14px; font-family: var(--sans); font-weight: 700; font-size: 11px; }
.avatar.medio { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; }
.avatar.grande { width: 72px; height: 72px; border-radius: 22px; font-size: 26px; }
.avatar.bolita { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--fondo); font-family: var(--sans); font-weight: 700; font-size: 9px; }

/* muro común */
.ev-quien { display: flex; gap: 8px; align-items: center; }
a.autor { color: var(--texto); font-weight: 700; text-decoration: none; }
a.autor:hover { text-decoration: underline; color: var(--texto); }
.ev-acciones { display: flex; gap: 8px; margin-top: 12px; }
.ev-fila .sub a { color: var(--texto-2); }
.ev-fila a.mini { display: block; }
.gg {
  height: 36px; min-width: 56px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--borde);
  background: transparent;
  color: var(--texto);
  font-weight: 700; font-size: 13px;
  cursor: pointer;
  flex: none;
}
.gg[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--fondo); }
.gg:disabled { opacity: .6; cursor: progress; }

/* amigos */
.lista-amigos { display: flex; flex-direction: column; gap: 10px; }
.amigo { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.amigo-enlace { display: flex; gap: 12px; align-items: center; color: var(--texto); text-decoration: none; }
.amigo-enlace:hover { color: var(--texto); }
.amigo .cuerpo { flex: 1; min-width: 0; }
.amigo .n { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.amigo .sub { font-size: 12px; color: var(--texto-3); }
.amigo-cifras { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--texto-2); }
.amigo-cifras b { font-family: var(--serif); font-weight: 600; color: var(--texto); }
.amigo-acciones { display: flex; justify-content: flex-end; }
.chip.suave { background: var(--tarjeta-2); color: var(--acento); font-size: 11px; padding: 2px 8px; }
.invitar { display: flex; flex-direction: column; gap: 10px; }
.invitar label { font-size: 13px; font-weight: 600; }
.campo {
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--borde-2);
  background: var(--tarjeta);
  color: var(--texto);
  font-size: 16px;
  padding: 0 16px;
  font-family: inherit;
  width: 100%;
}
.campo:focus { border-color: var(--acento); outline: none; }
.campo[readonly] { font-size: 13px; color: var(--texto-2); }
.invitacion { padding: 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.invitacion h3, .subseccion { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 17px; }
.invitacion .acciones { margin-top: 4px; }
.seccion-cab.separado { margin-top: 22px; }

/* perfil de un amigo */
.icono-ev {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--fondo-r, var(--tarjeta-2));
  border: 1.5px solid var(--c, var(--borde-2));
  color: var(--texto-2);
  display: flex; align-items: center; justify-content: center;
  flex: none; overflow: hidden;
}
.icono-ev img { width: 100%; height: 100%; object-fit: cover; }
.icono-ev.acabado { background: var(--acento); border-color: var(--acento); color: var(--fondo); }
.equipo .sub .etiqueta-r { font-size: 10px; }
.equipo a.n { color: var(--texto); text-decoration: none; display: block; }
.equipo a.n:hover { text-decoration: underline; }

/* juego: quién más lo tiene */
.bloque.sin-lado-h { padding: 22px 16px 0; }
.heroe .meta.copia { color: var(--texto); }
.quienes { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--texto-2); }
.pila { display: flex; }
.pila .avatar + .avatar { margin-left: -8px; }
.barra.fina { height: 4px; margin-top: 6px; }

/* duelo */
.titulo-pag.crece { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marcador {
  position: relative;
  margin: 4px 16px 0;
  height: 220px;
  border-radius: 26px;
  overflow: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.marcador .lado { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; min-width: 0; }
.marcador .lado.yo { background: #1C1B18; }
.marcador .lado.otro { background: #221C18; }
.marcador .lado a { text-decoration: none; }
.marcador .lado.yo .avatar { box-shadow: 0 0 0 3px var(--acento); }
.marcador .lado.otro .avatar { box-shadow: 0 0 0 3px var(--rival); }
.marcador .quien { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marcador .puntos { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1; }
.marcador .lado.yo .puntos { color: var(--acento); }
.marcador .lado.otro .puntos { color: var(--rival-claro); }
.marcador .vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 28px;
  background: var(--fondo); border: 2px solid var(--borde-2);
  font-family: var(--serif); font-weight: 600; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.categorias { margin: 16px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.comparativa .fila { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; gap: 8px; }
.comparativa b.yo { color: var(--acento); }
.comparativa b.otro { color: var(--rival-claro); }
.barras { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #1C1F29; }
.barras span { flex: 1; }
.barras i.yo { background: var(--acento); }
.barras i.otro { background: var(--rival); }
.ventaja { margin: 18px 16px 0; padding: 14px; border-radius: 20px; }
.etiqueta-sec { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--texto-3); margin-bottom: 10px; text-transform: uppercase; }
.fila-logro { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.quienes-logro { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.marca-quien {
  display: inline-flex; gap: 6px; align-items: center;
  height: 26px; padding: 0 10px 0 3px;
  border-radius: 13px;
  font-size: 12px; font-weight: 600;
  background: var(--tarjeta-2);
  color: var(--texto);
}
.marca-quien i {
  width: 20px; height: 20px; border-radius: 10px;
  font-style: normal; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--fondo);
}
.marca-quien.yo i { background: var(--acento); }
.marca-quien.otro i { background: var(--rival); }
.marca-quien.no { color: var(--texto-3); background: transparent; border: 1px dashed var(--borde-2); }
.marca-quien.no i { opacity: .45; }
.duelo-logro.pendiente { opacity: .6; }

/* ajustes */
.interruptores { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.opcion { display: flex; gap: 12px; align-items: center; padding: 14px; }
.opcion label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.opcion .n { font-weight: 600; font-size: 14px; }
.opcion .sub { font-size: 12px; color: var(--texto-3); }
.interruptor {
  appearance: none; -webkit-appearance: none;
  width: 48px; height: 28px; border-radius: 14px;
  background: var(--borde-2);
  position: relative; cursor: pointer; flex: none; margin: 0;
}
.interruptor::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 11px;
  background: var(--texto-2);
}
.interruptor:checked { background: var(--acento); }
.interruptor:checked::after { left: 23px; background: var(--fondo); }
.interruptor:disabled { opacity: .6; }
.interruptor:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
a.boton { text-decoration: none; }
a.boton.secundario { color: var(--texto); }

/* emparejar con código escrito */
.codigo-campo {
  margin-top: 14px;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 24px; font-weight: 600; letter-spacing: 6px;
  text-transform: uppercase;
  height: 60px;
}

@media (prefers-reduced-motion: no-preference) {
  .gg, .interruptor, .interruptor::after { transition: background-color .15s ease, left .15s ease, border-color .15s ease; }
}

/* ================================================================ fase 4: momentos */
.ev-momento { overflow: hidden; }
.ev-momento > a { display: block; }
.foto {
  position: relative;
  max-height: 420px;
  min-height: 140px;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(135deg, #1B1E28 0 14px, #171922 14px 28px);
  overflow: hidden;
}
.foto img { width: 100%; height: 100%; object-fit: cover; }
.texto-momento { margin-top: 6px; color: var(--texto); white-space: pre-line; overflow-wrap: anywhere; }
.texto-momento.grande { font-size: 16px; }
.ev-acciones { flex-wrap: wrap; align-items: center; }
.ev-acciones .boton.pequeno { gap: 6px; }
.ev-quien .chip { margin-left: auto; }

.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.foto-mini {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tarjeta-2);
  border: 1px solid var(--borde);
}
.foto-mini img { width: 100%; height: 100%; object-fit: cover; }
.foto-mini:hover { border-color: var(--acento); }
.foto-mini .privado {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 12px;
  background: rgba(11, 12, 16, .8); color: var(--texto);
  display: flex; align-items: center; justify-content: center;
}
.galeria-mas { display: flex; justify-content: center; margin-top: 10px; }
.icono-ev.momento { padding: 0; }

.momento-grande {
  margin: 0 0 4px;
  background: #07080B;
  display: flex; justify-content: center;
}
.momento-grande img { max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; }
.momento-info { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.momento-info .desc { color: var(--texto-2); }
.momento-logro .etiqueta-r { display: block; }
.editar-momento { margin-top: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.editar-momento .etiqueta-sec { margin-bottom: 0; }
.campo.area { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.4; font-size: 15px; }
.editar-momento fieldset.ver { border: 0; margin: 6px 0 0; padding: 0; }
.opciones-ver { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.opcion-ver {
  height: 36px; padding: 0 14px;
  border-radius: 18px; border: 1px solid var(--borde-2);
  display: flex; gap: 6px; align-items: center;
  font-size: 13px; cursor: pointer;
}
.opcion-ver:has(input:checked) { background: var(--texto); color: var(--fondo); border-color: var(--texto); font-weight: 600; }
.opcion-ver input { margin: 0; accent-color: var(--fondo); }
.fila-acciones { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

@media (min-width: 720px) {
  .galeria { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .momento-grande { border-radius: 0 0 22px 22px; overflow: hidden; }
}

/* Clips de vídeo (momentos con .mp4) */
.foto.video { background: #000; }
.foto.video video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.banda-clip { display: block; padding: 10px 12px 0; }
.banda-clip .banda { position: static; }
.momento-grande video { max-width: 100%; max-height: 78vh; width: 100%; background: #000; }
.foto-mini .clip {
  position: absolute; left: 6px; bottom: 6px;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: rgba(11, 12, 16, .8); color: var(--texto); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
