/* Journale web — mismos colores y letra que journale.app */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --line: #ececec;
  --text: #303030;
  --muted: #6f6f6f;
  --primary: #b82ea8;
  --primary-soft: #f0f0f2;
  --like: #e0245e;
  --peligro: #c62828;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --sidebar: 340px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
button[disabled] { cursor: default; }
input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
a { color: #005fcc; }
.oculto { display: none !important; }
.ico { display: inline-flex; flex: 0 0 auto; }
.ico svg { width: 22px; height: 22px; }
.centrado { text-align: center; justify-content: center; }
.nota { font-size: 13px; color: var(--muted); }

/* ---------- Entrar con QR ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-card {
  width: min(920px, 100%);
  background: var(--bg);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.login-logo { height: 56px; width: auto; margin-bottom: 28px; }
.login h1 { font-size: 30px; line-height: 1.2; font-weight: 800; margin-bottom: 28px; }
.login ol { list-style: none; counter-reset: paso; display: grid; gap: 18px; }
.login li { counter-increment: paso; display: flex; gap: 14px; align-items: flex-start; font-size: 17px; color: #333; }
.login li::before {
  content: counter(paso);
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.login-nota { margin-top: 28px; font-size: 14px; color: var(--muted); }
.login-nota a { color: var(--primary); font-weight: 600; text-decoration: none; }
.qr {
  width: 284px; height: 284px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
  position: relative;
  background: #fff;
}
.qr svg { width: 100%; height: 100%; display: block; }
.qr-cubierta {
  position: absolute; inset: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 20px; font-weight: 600;
}
.qr-cubierta .boton { margin-top: 4px; }
.qr-estado { margin-top: 14px; text-align: center; font-size: 14px; color: var(--muted); min-height: 20px; }

/* ---------- Botones y campos ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; min-height: 44px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; text-align: center;
}
.boton:hover { filter: brightness(1.05); }
.boton[disabled] { opacity: 0.55; filter: none; }
.boton.secundario { background: var(--bg-soft); color: var(--text); }
.boton.oscuro { background: #303030; color: #fff; }
.boton.peligro { background: var(--primary); }
.boton .ico svg { width: 20px; height: 20px; }
.botones { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.icono-boton { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #515151; flex: 0 0 auto; }
.icono-boton:hover { background: var(--bg-soft); }
.icono-boton[disabled] { opacity: 0.3; }
.icono-boton.activo { background: var(--primary-soft); color: var(--primary); width: auto; padding: 0 12px; }
.icono-boton .listo { font-weight: 700; font-size: 14px; }
.agregar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.agregar:hover { filter: brightness(1.07); }
.redondo { width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.redondo .ico svg { width: 17px; height: 17px; }
.redondo.grande { width: 44px; height: 44px; background: var(--primary); }
.redondo.grande .ico svg { width: 20px; height: 20px; }
.enlace-boton { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; padding: 8px 4px; }
.enlace-boton .ico svg { width: 18px; height: 18px; }
.enlace-boton.centrado { display: flex; margin: 16px auto 0; text-align: center; }
.enlace-boton.peligro { color: var(--peligro); margin-top: 10px; }
.girando {
  width: 28px; height: 28px; border-radius: 50%; margin: 12px auto;
  border: 3px solid var(--primary-soft); border-top-color: var(--primary);
  animation: girar 0.9s linear infinite;
}
.girando.chico { width: 18px; height: 18px; border-width: 2px; margin: 0; }
@keyframes girar { to { transform: rotate(360deg); } }

.campo { display: block; position: relative; margin-bottom: 14px; }
.campo .etiqueta, p.etiqueta, .dato .etiqueta { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.campo input, .campo textarea, .modal input[type=text], .formulario input {
  width: 100%; border: 1px solid #ccc; border-radius: 8px; padding: 10px 12px; background: var(--bg); outline: none; resize: vertical;
}
.campo input:focus, .campo textarea:focus, .modal input:focus, .formulario input:focus { border-color: var(--primary); }
.campo .contador { position: absolute; right: 2px; top: 0; font-size: 11px; color: var(--muted); }
.buscador {
  width: 100%; border: 0; border-radius: 12px; padding: 10px 14px; background: var(--bg-soft); outline: none; font-size: 14px;
}
.buscador:focus { box-shadow: 0 0 0 2px var(--primary-soft); }
.progreso { height: 8px; border-radius: 4px; background: var(--primary-soft); overflow: hidden; margin: 10px 0 16px; }
.progreso span { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }

/* ---------- App ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; height: 100dvh; }
.lateral { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lateral-cabecera { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.lateral-cabecera .logo { height: 36px; width: auto; }
.lateral-cabecera .espacio { flex: 1; }
.yo { display: flex; align-items: center; padding: 4px; border-radius: 50%; }
.yo:hover, .yo.activo { box-shadow: 0 0 0 2px var(--primary); }
.pestanas { display: flex; gap: 4px; padding: 12px 12px 4px; }
.pestana { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.pestana.activa { background: var(--primary-soft); color: var(--primary); }
.lista-cabecera { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.lista-cabecera h2 { text-align: center; font-size: 18px; font-weight: 800; }
.lista-cabecera .icono-boton { color: var(--primary); }
.lista-cabecera .icono-boton.activo { width: auto; justify-self: start; }
.lista-buscar { padding: 4px 14px 8px; }
.lista-buscar.ancho { max-width: 620px; margin: 0 auto 12px; padding: 0 16px; }
.lista { overflow-y: auto; flex: 1; padding: 4px 8px 16px; }
.journal {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px; border-radius: 14px; text-align: left;
}
.journal:hover { background: var(--bg-soft); }
.journal.activo { background: var(--primary-soft); }
.portada { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--bg-soft); flex: 0 0 52px; }
.portada.vacia { display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 800; font-size: 20px; }
.journal .nombre, .fila-orden .nombre { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal .detalle, .fila-orden .detalle { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal > div { min-width: 0; }
.fila-orden {
  display: flex; align-items: center; gap: 10px; padding: 8px; margin: 4px 2px;
  border: 1px solid #ececec; border-radius: 10px; background: var(--bg); cursor: grab;
}
.fila-orden:focus-visible, .fila-orden.encima { border-color: var(--primary); outline: none; }
.fila-orden.arrastrando { opacity: 0.5; }
.fila-orden .fila-texto { flex: 1; min-width: 0; }
.fila-orden .asa { color: #9a9a9a; display: inline-flex; }
.vacio { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.no-cargo { display: flex; flex-direction: column; align-items: center; padding-bottom: 24px; }
.no-cargo .vacio { padding-bottom: 12px; }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); flex: 0 0 40px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); font-size: 14px; }
.avatar.chico { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
.avatar.grande { width: 140px; height: 140px; flex-basis: 140px; font-size: 40px; }

.principal { display: flex; min-width: 0; min-height: 0; position: relative; }
.columna { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-soft); }
.cabecera {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.cabecera h2 { font-size: 18px; font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.volver { display: none; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; flex: 0 0 auto; }
.volver:hover { background: var(--bg-soft); }
.contenido { flex: 1; overflow-y: auto; padding: 24px 16px 48px; }
.feed { max-width: 620px; margin: 0 auto; display: grid; gap: 24px; }
.bienvenida { margin: auto; text-align: center; color: var(--muted); padding: 40px 20px; max-width: 420px; }
.bienvenida img { height: 64px; width: auto; margin: 0 auto 20px; opacity: 0.9; }
.bienvenida h2 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.bienvenida .boton { margin-top: 20px; }

/* Encabezado del Journal: título centrado, ruedita y +, y debajo el selector Posts / Chat. */
.cabecera-journal { background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cabecera-fila { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; gap: 8px; }
.cabecera-fila .volver { justify-self: start; }
.cabecera-titulo { font-size: 20px; font-weight: 800; text-align: center; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 8px; border-radius: 10px; grid-column: 2; }
.cabecera-titulo:hover { background: var(--bg-soft); }
.cabecera-acciones { display: flex; align-items: center; gap: 4px; justify-self: end; grid-column: 3; }
.cabecera-buscar { width: 100%; max-width: 620px; }

/* ---------- Posts ---------- */
.post { background: var(--bg); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); }
.post-autor { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; width: 100%; }
.post-autor .nombre { font-weight: 400; font-size: 12px; color: #8e8e8e; }  /* igual que la fecha */
.post-autor .fecha { font-size: 12px; color: #8e8e8e; }
.reenvio { font-size: 12px; color: var(--primary); font-weight: 600; }
.media { position: relative; background: #f0ece6; }
.media img, .media video { width: 100%; max-height: 720px; object-fit: contain; margin: 0 auto; background: #f0ece6; cursor: zoom-in; }
.media video { cursor: auto; }
.carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel img { flex: 0 0 100%; scroll-snap-align: center; }
.flecha {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; color: #111;
  background: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.flecha.izq { left: 10px; } .flecha.der { right: 10px; }
.puntos { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.puntos span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); }
.puntos span.activo { background: #fff; }
.post-info { padding: 12px 16px 0; }
.post-titulo { font-size: 30px; line-height: 1.25; font-weight: 700; margin-bottom: 8px; color: #303030; word-wrap: break-word; }
.post-texto { padding: 0 0 4px; }
.post-parrafo { font-size: 16px; color: #303030; white-space: pre-wrap; word-wrap: break-word; }
.post-parrafo.recortado { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.leer-mas { color: var(--muted); font-weight: 600; font-size: 14px; padding: 4px 0; }
.acciones { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px 10px; }
.accion { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #1c1c1ccc; }
.accion:hover { background: var(--bg-soft); }
.accion .ico svg { width: 23px; height: 23px; }
.accion.like.activa { color: var(--like); }
.accion.fav.activa { color: var(--primary); }
.accion[disabled] { opacity: 0.5; }
.mas { display: flex; justify-content: center; padding: 8px 0; }

/* Tema Oscuro (y Artista) */
.tema-oscuro, .tema-oscuro .cabecera-journal { background: #000; color: #e5e5e5; border-color: #1b1b1b; }
.tema-oscuro .cabecera-titulo:hover, .tema-oscuro .icono-boton:hover, .tema-oscuro .volver:hover { background: #1b1b1b; }
.tema-oscuro .icono-boton, .tema-oscuro .volver { color: #b5b5b5; }
.tema-oscuro .buscador { background: #1b1b1b; }
.tema-oscuro .selector { background: #000; }
.tema-oscuro .selector-lado { color: #fff; }
.tema-oscuro .post { background: #000; box-shadow: none; border: 1px solid #1b1b1b; }
.tema-oscuro .post-autor .nombre { color: #8e8e8e; }
.tema-oscuro .post-titulo { color: #e5e5e5; }
.tema-oscuro .post-parrafo { color: #b5b5b5; }
.tema-oscuro .post-parrafo a { color: #66b2ff; }
.tema-oscuro .accion { color: #b5b5b5; }
.tema-oscuro .accion:hover { background: #1b1b1b; }
.tema-oscuro .media, .tema-oscuro .media img, .tema-oscuro .media video { background: #000; }
.tema-oscuro .vacio { color: #8a8a8a; }
.tema-oscuro.chat .chat-lista, .tema-oscuro .chat-pie { background: #000; }
.tema-oscuro .chat-pie { border-color: #1b1b1b; }
.tema-oscuro .mensaje .burbuja { background: #1b1b1b; color: #e5e5e5; box-shadow: none; }
.tema-oscuro .mensaje.mio .burbuja { background: #1f3a52; }
.tema-oscuro .pastilla { background: #1b1b1b; border-color: #2a2a2a; }

/* Tema Magazine: título grande arriba, "Por usuario" centrado y el texto en letra liviana. */
.post.magazine { padding-top: 16px; }
.post.magazine .post-titulo { font-family: 'Josefin Sans', 'Montserrat', sans-serif; font-weight: 500; font-size: 35px; letter-spacing: -1.5px; text-align: center; padding: 0 16px; margin-bottom: 4px; }
.post.magazine .post-autor { justify-content: center; text-align: center; padding-top: 4px; }
.post.magazine .post-texto { padding: 12px 16px 0; }
.post.magazine .post-parrafo { font-family: 'Barlow Semi Condensed', 'Montserrat', sans-serif; font-weight: 300; font-size: 19px; }
.post.magazine .acciones { padding: 6px 12px 12px; }

/* Tema Reel: cada post ocupa todo el alto, con la foto de fondo y los íconos en columna. */
.reel-contenedor { padding: 0; scroll-snap-type: y mandatory; background: #000; }
.reel-contenedor .feed { max-width: 560px; gap: 0; }
.reel-contenedor .vacio { color: #bbb; }
.post.reel {
  position: relative; border-radius: 0; height: var(--alto-reel, calc(100dvh - 140px)); scroll-snap-align: start; scroll-snap-stop: always;
  background: #000; color: #fff; box-shadow: none;
}
.post.reel .media { position: absolute; inset: 0; background: #000; }
.post.reel .media img, .post.reel .media video { width: 100%; height: 100%; max-height: none; object-fit: cover; background: #000; }
.post.reel .carrusel { height: 100%; }
.post.reel .flecha { top: 45%; }
.reel-autor { position: absolute; top: 12px; left: 8px; right: 70px; z-index: 2; }
.reel-autor .post-autor { padding: 4px 8px; width: auto; }
.reel-autor .nombre, .reel-autor .fecha { color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.7); }
.reel-iconos { position: absolute; right: 8px; bottom: 150px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reel-iconos .accion { flex-direction: column; gap: 2px; color: #fff; padding: 6px; filter: drop-shadow(0 0 1.5px #000); }
.reel-iconos .accion:hover { background: rgba(255, 255, 255, 0.12); }
.reel-iconos .accion .ico svg { width: 28px; height: 28px; }
.reel-pie { position: absolute; left: 0; right: 60px; bottom: 0; padding: 16px 16px 22px; z-index: 2; }
.reel-pie .puntos { position: static; justify-content: flex-start; margin-bottom: 10px; }
.reel-titulo { font-size: 28px; line-height: 1.2; font-weight: 800; color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, 0.55); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-leer { margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); color: #fff; font-weight: 600; font-size: 14px; }
.reel-leer .ico svg { width: 16px; height: 16px; }
.post.reel.claro .reel-titulo { color: #000; text-shadow: none; }
.post.reel.claro .reel-autor .nombre, .post.reel.claro .reel-autor .fecha { color: #333; text-shadow: none; }
.post.reel.claro .reel-iconos .accion { color: #000; filter: none; }
.post.reel.claro .reel-leer { background: rgba(255, 255, 255, 0.6); color: #000; }
.post.reel.claro .reel-pie .puntos span { background: rgba(0, 0, 0, 0.3); }
.post.reel.claro .reel-pie .puntos span.activo { background: #000; }
.reel-panel { position: absolute; inset: 0; z-index: 3; background: rgba(0, 0, 0, 0.78); display: flex; flex-direction: column; padding: 60px 22px 22px; }
.reel-panel-texto { flex: 1; overflow-y: auto; }
.reel-panel h3 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.reel-panel p { font-size: 16px; white-space: pre-wrap; word-wrap: break-word; }
.reel-panel a { color: #66b2ff; }
.reel-panel .reel-leer { align-self: flex-start; }

/* ---------- Chat ---------- */
.contenido-chat { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-lista { flex: 1; overflow-y: auto; }
.mensajes { padding: 16px; display: flex; flex-direction: column; gap: 3px; max-width: 760px; width: 100%; margin: 0 auto; }
.mensajes.en-detalle { padding: 8px 0; max-height: 50vh; overflow-y: auto; gap: 8px; }
.mensaje { display: flex; gap: 8px; align-items: flex-end; max-width: 80%; }
.mensaje.primero { margin-top: 10px; }
.mensaje .avatar-espacio { width: 30px; flex: 0 0 30px; }
.mensaje .avatar { align-self: flex-start; }
.mensaje .burbuja { display: block; background: var(--bg); border-radius: 16px; padding: 7px 12px; min-width: 0; max-width: 100%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); text-align: left; }
.mensaje .burbuja.cola { border-bottom-left-radius: 4px; }
.mensaje .burbuja.tocable:hover { box-shadow: 0 0 0 2px var(--primary-soft); }
.mensaje.mio { align-self: flex-end; flex-direction: row-reverse; }
.mensaje.mio .burbuja { background: var(--primary-soft); }
.mensaje.mio .burbuja.cola { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.mensaje .quien { font-size: 12px; font-weight: 700; color: var(--primary); }
.mensaje .texto { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.mensaje .meta { font-size: 11px; color: var(--muted); margin-top: 2px; text-align: right; }
.etiqueta-post { display: block; font-size: 11px; font-weight: 700; color: #8e8e8e; margin-bottom: 1px; }
.chat-pie { background: var(--bg); border-top: 1px solid var(--line); position: relative; }
.chat-fuente { display: flex; align-items: center; gap: 6px; max-width: 760px; margin: 0 auto; padding: 8px 16px 0; font-size: 13px; font-weight: 600; color: #8e8e8e; }
.chat-fuente span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quitar-fuente { display: inline-flex; color: #8e8e8e; }
.quitar-fuente .ico svg { width: 16px; height: 16px; }
.escribir { display: flex; gap: 8px; padding: 8px 12px 12px; align-items: flex-end; max-width: 760px; margin: 0 auto; }
.pastilla { flex: 1; display: flex; align-items: flex-end; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); padding: 0 4px 0 0; }
.pastilla:focus-within { border-color: var(--primary); }
.escribir textarea {
  flex: 1; resize: none; border: 0; border-radius: 22px; padding: 11px 14px;
  max-height: 140px; min-height: 44px; outline: none; font-size: 14px; background: transparent;
}
.escribir .boton { height: 44px; border-radius: 22px; }
.escribir .icono-boton { height: 42px; }
.emojis { position: absolute; bottom: 100%; right: 12px; margin-bottom: 6px; z-index: 5; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: grid; grid-template-columns: repeat(10, 34px); gap: 2px; }
.emoji { width: 34px; height: 34px; border-radius: 8px; font-size: 20px; text-align: center; }
.emoji:hover { background: var(--bg-soft); }

/* ---------- Ventanas ---------- */
.modal-fondo { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 20px; width: min(480px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.modal.ancho { width: min(640px, 100%); }
.modal.chico { width: min(400px, 100%); }
.modal-cabecera { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px 22px; }
.modal-cabecera h2 { flex: 1; font-size: 18px; font-weight: 800; text-align: center; padding-left: 36px; }
.modal-cuerpo { padding: 6px 22px 22px; overflow-y: auto; }
.confirmar-texto { font-size: 16px; font-weight: 600; text-align: center; margin: 6px 0 4px; }
.modal .nota { text-align: center; margin: 6px 0; }
.nombre-confirmar { text-align: center; font-weight: 800; font-size: 17px; margin: 8px 0 12px; }
.cerrar { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cerrar:hover { background: var(--bg-soft); }
.perfil-modal { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 6px; text-align: center; }
.perfil-modal .avatar { margin-bottom: 12px; }
.perfil-usuario { font-size: 20px; font-weight: 800; }
.perfil-nombre { color: var(--muted); }
.detalle-post .post { box-shadow: none; border: 1px solid var(--line); }
.subtitulo { font-size: 17px; font-weight: 800; margin: 18px 0 8px; }
.subtitulo.centrado { text-align: center; }

/* Editor de fotos y video */
.editor-zona { border: 2px dashed var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; text-align: center; }
.editor-zona.encima { border-color: var(--primary); background: var(--primary-soft); }
.editor-zona .nota { margin: 4px 0 0; }
.editor-zona .botones { margin-top: 10px; }
.editor-zona.con-media .nota { display: none; }
.editor-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.editor-rejilla:empty { display: none; }
.editor-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.editor-item.video { grid-column: 1 / -1; aspect-ratio: auto; background: #000; }
.editor-item img { width: 100%; height: 100%; object-fit: cover; }
.editor-item video { width: 100%; max-height: 320px; margin: 0 auto; }
.editor-num { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.editor-quitar { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.editor-quitar .ico svg { width: 16px; height: 16px; }

/* Listas de opciones (configuración, reenviar, tema, perfil) */
.lista-opciones { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.opcion { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid #ececec; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; text-align: left; }
.opcion:hover { border-color: var(--primary); }
.opcion > .ico:first-child { color: var(--primary); }
.opcion > .ico:last-child { color: #9a9a9a; }
.opcion-texto { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.opcion-estado { color: var(--primary); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.opcion-estado.hecho { color: #2e9e5b; }
.opcion.elegida { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.opcion.elegida > .ico:last-child { color: var(--primary); }
.modal .opcion { background: var(--bg); }

/* Configuración del Journal */
.ajustes { max-width: 620px; width: 100%; margin: 0 auto; }
.ajustes-info { text-align: center; padding: 6px 10px 14px; }
.ajustes-desc { font-size: 16px; margin-bottom: 6px; white-space: pre-wrap; }
.seccion-cabecera { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 8px; }
.personas { display: flex; flex-direction: column; gap: 8px; }
.persona { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; background: #f5f7fa; text-align: left; }
.persona:hover { box-shadow: 0 0 0 2px var(--primary-soft); }
.persona-nombre { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.persona > .ico:last-child { color: #9a9a9a; }
.formulario { background: var(--bg); border-radius: 20px; padding: 22px; }
.formulario .nota.centrado { margin-bottom: 16px; }
.tarjeta-resultado { margin-top: 20px; padding: 18px; border-radius: 16px; background: var(--primary-soft); }
.tarjeta-resultado h4 { font-size: 16px; margin-bottom: 4px; }
.tarjeta-resultado .codigo { font-size: 30px; font-weight: 800; letter-spacing: 3px; color: var(--primary); margin: 4px 0 8px; }
.tarjeta-resultado .etiqueta { margin: 0; }
.mensaje-compartir { margin-top: 12px; }
.mensaje-texto { white-space: pre-wrap; word-wrap: break-word; font: inherit; font-size: 14px; background: var(--bg); border-radius: 12px; padding: 12px; text-align: left; }
.aviso-caja { background: #fff6e5; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.opciones-fila { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; font-size: 14px; }
.chip.elegida { border-color: var(--primary); background: var(--primary); color: #fff; }

/* Compartir */
.compartir-tarjeta { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.compartir-tarjeta img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.compartir-tarjeta h3 { font-size: 20px; font-weight: 800; padding: 12px 14px 4px; }
.compartir-tarjeta p { font-size: 14px; padding: 0 14px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.compartir-fuente { text-align: right; font-size: 12px; color: #8e8e8e; padding: 10px 14px 12px; }
.modal .enlace-boton { display: flex; margin: 12px auto 0; }

/* Mis posts y Favoritos */
.filas { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.fila-post { display: flex; gap: 12px; background: var(--bg); border-radius: 12px; padding: 8px; align-items: stretch; }
.fila-mini { position: relative; width: 120px; height: 120px; flex: 0 0 120px; border-radius: 8px; overflow: hidden; background: #e1e1e1; }
.fila-mini img { width: 100%; height: 100%; object-fit: cover; }
.fila-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fila-play svg { width: 40px; height: 40px; }
.fila-texto { flex: 1; min-width: 0; text-align: left; padding: 4px 0; }
.fila-texto .fecha { font-size: 12px; color: #666; }
.fila-titulo { font-weight: 700; font-size: 17px; line-height: 1.25; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila-comentario { font-size: 14px; color: #303030; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila-acciones { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }

/* Perfil */
.perfil { max-width: 520px; width: 100%; margin: 0 auto; }
.perfil-cabeza { display: flex; justify-content: center; padding: 10px 0 20px; }
.perfil-foto { position: relative; border-radius: 50%; }
.perfil-camara { position: absolute; right: 4px; bottom: 4px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.perfil-datos { background: var(--bg); border-radius: 20px; padding: 18px 20px; margin-bottom: 14px; }
.dato { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.dato:last-of-type { border-bottom: 0; }
.dato .etiqueta { margin-bottom: 2px; }
.dato .valor { font-size: 16px; font-weight: 600; word-wrap: break-word; }
.perfil > .nota { margin-top: 14px; }
.copyright { text-align: center; color: #b0b0b0; font-size: 12px; margin-top: 20px; }

/* Visor de fotos */
.visor { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; outline: none; }
.visor img { max-width: 94vw; max-height: 92vh; object-fit: contain; }
.visor-cerrar { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; display: flex; align-items: center; justify-content: center; }
.visor-contador { position: absolute; top: 24px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #222; color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; z-index: 70;
  box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}

/* Selector Posts / Chat: igual al de la app (borde fucsia, el lado activo con fondo fucsia que se desliza). */
.selector {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  width: min(360px, 100%); height: 44px; border: 2px solid var(--primary); border-radius: 22px;
  background: var(--bg); overflow: hidden; flex: 0 0 auto;
}
.selector-fondo {
  position: absolute; top: 0; bottom: 0; left: 0; width: 50%;
  border-radius: 22px; background: var(--primary);
  transition: transform 0.22s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.selector-fondo.der { transform: translateX(100%); }
.selector-lado { position: relative; font-weight: 700; font-size: 16px; letter-spacing: 0.2px; color: var(--primary); transition: color 0.22s; text-align: center; }
.selector-lado.activo { color: #fff; }
.selector-contador { font-weight: 400; font-size: 13px; }
.selector-lado:focus-visible { outline: 2px solid var(--primary); outline-offset: -6px; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .selector-fondo, .selector-lado, .progreso span { transition: none; } }

/* ---------- Pantallas angostas ---------- */
@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; padding: 28px 20px; gap: 28px; }
  .login h1 { font-size: 24px; }
  .qr { margin: 0 auto; width: min(284px, 100%); height: auto; aspect-ratio: 1; }
  .app { grid-template-columns: 1fr; }
  .app.con-journal .lateral { display: none; }
  .app:not(.con-journal) .principal { display: none; }
  .volver { display: inline-flex; }
  .cabecera { padding: 12px 16px; }
  .cabecera-journal { padding: 8px 12px 12px; }
  .cabecera-titulo { font-size: 17px; max-width: 44vw; }
  .contenido { padding: 16px 0 40px; }
  .post { border-radius: 0; }
  .post-titulo { font-size: 26px; }
  .filas, .ajustes, .perfil { padding: 0 12px; }
  .fila-mini { width: 96px; height: 96px; flex-basis: 96px; }
  .modal-fondo { padding: 0; align-items: flex-end; }
  .modal, .modal.ancho, .modal.chico { width: 100%; border-radius: 20px 20px 0 0; max-height: 94dvh; }
  .emojis { grid-template-columns: repeat(8, 34px); }
  .pestana { padding: 8px 10px; font-size: 13px; }
}

/* ---------- Journal como revista (referencia: portada de un periódico digital) ----------
   Nombre del Journal en serif cursiva al centro, rejilla de posts con líneas finas entre columnas,
   foto arriba, fecha en letra pequeña, título y bajada grandes y el autor en mayúsculas.
   Las letras son las del tema del Journal en la app. */
.columna.vista-journal { background: var(--bg); --f-titulo: 'Playfair Display', Georgia, serif; --p-titulo: 700; --e-titulo: normal; --f-texto: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --p-texto: 400; }
.vista-journal.fuentes-magazine .revista-titulo { letter-spacing: -0.5px; }
.vista-journal.fuentes-magazine { --f-titulo: 'Josefin Sans', 'Montserrat', sans-serif; --p-titulo: 500; --f-texto: 'Barlow Semi Condensed', 'Montserrat', sans-serif; --p-texto: 300; }
.vista-journal.fuentes-editorial { --f-titulo: 'Libre Baskerville', Georgia, serif; --p-titulo: 700; }
.vista-journal.fuentes-artista { --f-titulo: 'Montserrat', sans-serif; --p-titulo: 700; --f-texto: 'Montserrat', sans-serif; --p-texto: 500; }
.vista-journal.fuentes-social { --f-titulo: 'Montserrat', sans-serif; --p-titulo: 700; --e-titulo: italic; --f-texto: 'Montserrat', sans-serif; --p-texto: 500; }
.columna.vista-journal .cabecera-journal { border-top: 5px solid #111; border-bottom: 1px solid #111; padding: 12px 24px 14px; }
.cabecera-izq { display: flex; align-items: center; gap: 4px; justify-self: start; }
.cabecera-titulo {
  font-family: var(--f-titulo); font-style: var(--e-titulo); font-weight: var(--p-titulo);
  font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; max-width: 52vw;
}
.boton.publicar { min-height: 40px; padding: 8px 16px; border-radius: 4px; font-size: 15px; }
.boton.publicar .ico svg { width: 18px; height: 18px; }
.contenido:has(> .revista-rejilla) { padding: 0 24px 48px; }
.revista-rejilla {
  max-width: 1320px; display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden; /* esconde la línea izquierda de la primera columna */
}
.revista-rejilla > .vacio { grid-column: 1 / -1; }
.post.revista {
  background: none; border-radius: 0; box-shadow: none; overflow: visible;
  margin-left: -1px; border-left: 1px solid #dcdcdc; border-bottom: 1px solid #dcdcdc;
  padding: 22px 20px 20px; display: flex; flex-direction: column;
}
.revista-media { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #eee; }
.revista-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.revista-media:hover img { opacity: 0.9; }
.revista-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.revista-cuenta { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; font: 700 12px var(--f-texto); padding: 2px 7px; }
.revista-credito { font-family: var(--f-texto); font-weight: var(--p-texto); font-size: 13px; color: #767676; margin: 12px 0 14px; letter-spacing: 0.3px; }
.revista-titulo { font-family: var(--f-titulo); font-style: var(--e-titulo); font-weight: var(--p-titulo); font-size: 23px; line-height: 1.22; color: #111; margin-bottom: 10px; }
.revista-titulo button { text-align: left; line-height: inherit; }
.revista-titulo button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.revista-bajada {
  font-family: var(--f-texto); font-weight: var(--p-texto); font-size: 16px; line-height: 1.5; color: #222; margin-bottom: 14px;
  white-space: pre-wrap; word-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.revista-autor { align-self: flex-start; font-family: var(--f-texto); font-weight: 700; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #111; }
.revista-autor:hover { color: var(--primary); }
.post.revista .acciones { margin-top: auto; padding: 12px 0 0; gap: 0; flex-wrap: nowrap; }
.post.revista .accion { padding: 6px 6px 6px 0; margin-right: 2px; color: #8a8a8a; font-size: 13px; }
.post.revista .accion:hover { background: none; color: #111; }
.post.revista .accion .ico svg { width: 20px; height: 20px; }
.post.revista .accion.like.activa { color: var(--like); }
.post.revista .accion.fav.activa { color: var(--primary); }

/* Oscuro: la misma revista en negro. */
.tema-oscuro.columna.vista-journal { background: #000; }
.tema-oscuro.columna.vista-journal .cabecera-journal { border-top-color: #fff; border-bottom-color: #333; }
.tema-oscuro .post.revista { border: 0; border-left: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; background: none; }
.tema-oscuro .revista-titulo, .tema-oscuro .revista-autor { color: #f2f2f2; }
.tema-oscuro .revista-bajada { color: #c8c8c8; }
.tema-oscuro .revista-credito { color: #8a8a8a; }
.tema-oscuro .revista-media { background: #1b1b1b; }
.tema-oscuro .post.revista .accion:hover { color: #fff; }

@media (max-width: 760px) {
  .columna.vista-journal .cabecera-journal { padding: 8px 12px 12px; }
  .cabecera-titulo { font-size: 26px; max-width: 46vw; }
  .boton.publicar { padding: 0; width: 40px; justify-content: center; }
  .boton.publicar span:not(.ico) { display: none; }
  .contenido:has(> .revista-rejilla) { padding: 0 16px 40px; }
  .revista-rejilla { grid-template-columns: 1fr; }
  .post.revista { border-left: 0; margin-left: 0; padding: 20px 0; }
  .revista-titulo { font-size: 26px; }
}

/* Posts / Chat en la barra de Journals (computador); en el celular sigue en el encabezado del Journal. */
.lateral-modo { padding: 10px 14px 4px; }
.lateral-modo .selector { width: 100%; }
@media (min-width: 761px) { .cabecera-journal .selector { display: none; } }
/* Cuatro posts lado a lado; menos columnas cuando la pantalla es más angosta. */
@media (max-width: 1180px) { .revista-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .revista-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .revista-rejilla { grid-template-columns: 1fr; } }

/* La barra izquierda funciona como la app en el celular: lista, bloque del Journal abierto,
   configuración, mis posts, favoritos y perfil. La ventana grande solo muestra el Journal o el chat. */
.lateral-inicio { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lateral-panel { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 8px; }
.lateral-panel > .columna.panel { flex: 1; background: var(--bg); min-height: auto; }
.lateral-panel .contenido { overflow: visible; padding: 16px 14px 32px; }
.lateral-panel .lista-buscar.ancho { padding: 0; margin: 0 0 12px; }
.bloque-journal { margin: 8px 14px 4px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; }
.bloque-fila { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bloque-nombre { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.bloque-nombre span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-nombre .portada { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto; }
.bloque-buscar { flex: 1; min-width: 0; }
.bloque-buscar .buscador { width: 100%; }
.bloque-journal .boton.publicar { min-height: 40px; padding: 8px 14px; }
.bloque-journal .icono-boton { color: var(--primary); }
@media (min-width: 761px) {
  .vista-journal .cabecera-izq, .vista-journal .cabecera-acciones { visibility: hidden; }
  .vista-journal .cabecera-buscar { display: none; }
}
.lateral-panel .volver { display: inline-flex; }

/* ===== Barra izquierda = la app en el celular =====
   Letras de la app: títulos en Playfair Display Bold ("Bold" en la app) y el resto con la letra del sistema.
   Fucsia #b82ea8, textos #303030, líneas #ececec, buscador con borde gris y esquinas de 10px. */
:root { --sidebar: 400px; }
.lateral {
  --f-app: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-app-titulo: 'Playfair Display', Georgia, serif;
  font-family: var(--f-app); color: #303030; background: #fff;
}
.lateral .boton, .lateral .selector-lado { font-family: var(--f-app); }

/* Menú principal de la app (abajo en el celular), aquí arriba. */
.lateral .pestanas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 6px 0 4px; border-bottom: 1px solid #ececec; background: #fff; }
.lateral .pestana { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 0; background: none; color: gray; font-weight: 500; font-size: 11px; }
.lateral .pestana .ico svg { width: 24px; height: 24px; }
.lateral .pestana .lleno { display: none; }
.lateral .pestana.activa { background: none; color: #b82ea8; }
.lateral .pestana.activa .lleno { display: inline-flex; }
.lateral .pestana.activa .normal { display: none; }
.lateral .pestana:hover { color: #b82ea8; }

/* Encabezados (TopBar de la app): título grande centrado, botones redondos de 42px. */
.lateral .lista-cabecera { grid-template-columns: 42px 1fr 42px; padding: 14px 16px 6px; gap: 6px; }
.lateral .lista-cabecera h2 { font-family: var(--f-app-titulo); font-weight: 700; font-size: 25px; color: #303030; }
.lateral .lista-cabecera .icono-boton { width: 42px; height: 42px; border-radius: 21px; border: 1.5px solid #b82ea8; color: #b82ea8; }
.lateral .lista-cabecera .icono-boton.activo { width: 56px; background: #b82ea8; color: #fff; padding: 0; }
.lateral .agregar { width: 42px; height: 42px; border-radius: 21px; background: #b82ea8; }
.lateral .agregar .ico svg { width: 26px; height: 26px; }
.lateral .lista-buscar { padding: 5px 16px 10px; }
.lateral .buscador {
  border: 1px solid rgb(190, 190, 190); border-radius: 10px; background: #fff; color: #000; font-size: 15px;
  padding: 10px 12px 10px 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23303030' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; background-size: 18px;
}
.lateral .buscador:focus { box-shadow: none; border-color: #b82ea8; }

/* Lista de Journals (ItemGroup): foto de 120px, nombre, "Creado por", descripción y posts nuevos. */
.lateral .lista { padding: 0 6px 16px; }
.lateral .journal { align-items: stretch; gap: 0; padding: 6px 0 16px; margin: 6px 0 0; border-radius: 0; border-bottom: 1px solid #ececec; }
.lateral .journal:hover { background: none; }
.lateral .journal:hover .nombre { color: #b82ea8; }
.lateral .journal.activo { background: #f2f2f2; border-radius: 8px; }
.lateral .journal .portada { width: 120px; height: 120px; flex: 0 0 120px; border-radius: 8px; background: #c8c8c8; }
.lateral .journal-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 10px; }
.lateral .journal .nombre { font-family: var(--f-app-titulo); font-weight: 700; font-size: 18px; line-height: 1.25; color: #303030; white-space: normal; }
.lateral .journal .detalle { font-size: 12px; color: #8f8f8f; margin-bottom: 8px; }
.lateral .journal .descripcion { font-size: 14px; line-height: 18px; color: #303030; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lateral .journal .nuevos { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #8f8f8f; margin-top: 4px; }
.lateral .journal .nuevos .punto { width: 10px; height: 10px; border-radius: 5px; background: #b82ea8; }

/* Journal abierto (encabezado del Journal en la app): atrás, nombre centrado, ruedita y +; debajo Posts / Chat. */
.lateral .bloque-journal { margin: 0; padding: 12px 10px 12px; border: 0; border-bottom: 1px solid #ececec; border-radius: 0; gap: 10px; }
.barra-fila { display: grid; grid-template-columns: 96px 1fr 96px; align-items: center; }
.barra-lado { display: flex; align-items: center; gap: 4px; }
.barra-lado.der { justify-content: flex-end; }
.barra-titulo { font-family: var(--f-app-titulo); font-weight: 700; font-size: 25px; line-height: 26px; color: #303030; text-align: center; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lateral .bloque-journal .icono-boton { color: #515151; border-radius: 50%; }
.lateral .bloque-journal .icono-boton .ico svg { width: 24px; height: 24px; }
.lateral .bloque-journal .lateral-modo { padding: 0 10px; }
.lateral .bloque-journal .lista-buscar { padding: 0 6px; }

/* Pantallas dentro de la barra (configuración, mis posts, favoritos, perfil). */
.lateral .lateral-panel { margin-top: 0; border-top: 0; }
.lateral .lateral-panel .cabecera { display: grid; grid-template-columns: 50px 1fr 50px; padding: 14px 6px 10px; border-bottom: 1px solid #ececec; }
.lateral .lateral-panel .cabecera h2 { font-family: var(--f-app-titulo); font-weight: 700; font-size: 25px; line-height: 1.1; text-align: center; color: #303030; white-space: normal; }
.lateral .lateral-panel .cabecera .volver { color: #515151; }
.lateral .lateral-panel.es-pestana .cabecera .volver { visibility: hidden; }
.lateral .lateral-panel .contenido { padding: 12px 10px 32px; }
.lateral .lateral-panel .lista-buscar.ancho { padding: 0 6px; }
/* Opciones de configuración (BotonConfig): ícono fucsia, texto y flecha, sin cajas. */
.lateral .lista-opciones { gap: 2px; }
.lateral .opcion { border: 0; border-radius: 10px; padding: 10px; min-height: 48px; font-weight: 400; font-size: 16px; color: #303030; background: #fff; }
.lateral .opcion:hover { background: #f5f5f5; }
.lateral .opcion > .ico:first-child svg { width: 25px; height: 25px; }
.lateral .opcion > .ico:last-child { color: #606060; }
.lateral .ajustes-info { font-size: 18px; }
/* Mis posts y Favoritos (ItemUserPost / ItemFavPost): foto de 120px y botones redondos grises. */
.lateral .filas { gap: 0; }
.lateral .fila-post { border-radius: 0; padding: 6px 0 10px; margin: 6px 0 0; gap: 0; border-bottom: 1px solid #ececec; }
.lateral .fila-mini { width: 120px; height: 120px; flex: 0 0 120px; border-radius: 8px; overflow: hidden; background: #e1e1e1; }
.lateral .fila-texto { padding: 0 10px; }
.lateral .fila-titulo { font-family: var(--f-app-titulo); font-weight: 700; font-size: 18px; line-height: 20px; color: #303030; padding-top: 6px; }
.lateral .fila-comentario { color: #303030; line-height: 20px; padding-top: 5px; }
.lateral .fila-post .fecha { color: #666; font-size: 12px; }
.lateral .fila-acciones { flex-direction: row; align-self: flex-end; gap: 10px; padding: 5px; }
.lateral .fila-acciones .redondo { width: 30px; height: 30px; border-radius: 15px; background: rgba(0, 0, 0, 0.5); color: #fff; }
.lateral .fila-acciones .redondo .ico svg { width: 15px; height: 15px; }
.lateral .persona { background: #fff; border-bottom: 1px solid #ececec; border-radius: 0; }

/* Debajo del nombre del Journal: descripción y quién lo creó, centrados (con las letras del tema). */
.cabecera-desc { font-family: var(--f-texto, inherit); font-weight: var(--p-texto, 400); font-size: 17px; line-height: 1.4; color: #303030; text-align: center; max-width: 720px; margin: -2px auto 0; white-space: pre-wrap; }
.cabecera-autor { font-family: var(--f-texto, inherit); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #767676; text-align: center; margin: 0 auto; }
@media (max-width: 760px) { .cabecera-desc { font-size: 15px; } }

/* ===== Barra tipo app más delgada: la misma pantalla del celular (unos 388px) en 330px, en proporción. ===== */
:root { --sidebar: 330px; }
.lateral > * { zoom: 0.85; }

/* ===== Periódico con más aire: más margen, columnas más cómodas y texto más fácil de leer. ===== */
.columna.vista-journal .cabecera-journal { padding: 26px 40px 22px; gap: 12px; }
.contenido:has(> .revista-rejilla) { padding: 12px 48px 80px; }
.revista-rejilla { max-width: 1400px; margin: 0 auto; }
.post.revista { padding: 32px 28px 28px; }
.revista-credito { margin: 18px 0 12px; }
.revista-titulo { font-size: 24px; line-height: 1.25; margin-bottom: 14px; }
.revista-bajada { font-size: 16.5px; line-height: 1.7; margin-bottom: 18px; color: #3a3a3a; }
.revista-autor { margin-bottom: 4px; }
.post.revista .acciones { padding-top: 18px; }
@media (max-width: 1180px) { .contenido:has(> .revista-rejilla) { padding: 8px 28px 64px; } }
@media (max-width: 760px) {
  .columna.vista-journal .cabecera-journal { padding: 10px 14px 14px; }
  .contenido:has(> .revista-rejilla) { padding: 0 18px 48px; }
  .post.revista { padding: 26px 0; }
}

/* ===== Post abierto en toda la ventana (como una nota de periódico). ===== */
.lectura {
  position: fixed; top: 0; bottom: 0; right: 0; left: var(--sidebar); z-index: 40; overflow-y: auto; background: #fff;
  --f-titulo: 'Playfair Display', Georgia, serif; --p-titulo: 700; --e-titulo: normal;
  --f-texto: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --p-texto: 400;
  animation: lectura-entra 0.18s ease-out;
}
@keyframes lectura-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lectura { animation: none; } }
.lectura.fuentes-magazine { --f-titulo: 'Josefin Sans', 'Montserrat', sans-serif; --p-titulo: 500; --f-texto: 'Barlow Semi Condensed', 'Montserrat', sans-serif; --p-texto: 300; }
.lectura.fuentes-editorial { --f-titulo: 'Libre Baskerville', Georgia, serif; --p-titulo: 700; }
.lectura.fuentes-artista { --f-titulo: 'Montserrat', sans-serif; --p-titulo: 700; --f-texto: 'Montserrat', sans-serif; --p-texto: 500; }
.lectura.fuentes-social { --f-titulo: 'Montserrat', sans-serif; --p-titulo: 700; --e-titulo: italic; --f-texto: 'Montserrat', sans-serif; --p-texto: 500; }
.lectura-barra { position: sticky; top: 0; z-index: 2; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid #ececec; padding: 10px 24px; }
.lectura-volver { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 4px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #303030; }
.lectura-volver:hover { background: #f5f5f5; }
.lectura-art { max-width: 1040px; margin: 0 auto; padding: 48px 32px 96px; }
.lectura-cabecera { text-align: center; max-width: 820px; margin: 0 auto 36px; }
.lectura-titulo { font-family: var(--f-titulo); font-weight: var(--p-titulo); font-style: var(--e-titulo); font-size: 46px; line-height: 1.15; letter-spacing: -0.3px; color: #111; margin-bottom: 18px; }
.lectura-autor { font-family: var(--f-texto); font-weight: 700; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; color: #111; }
.lectura-autor:hover { color: var(--primary); }
.lectura-credito { font-family: var(--f-texto); font-size: 14px; color: #767676; margin-top: 6px; }
.lectura-media { margin: 0 auto 44px; }
.lectura-media .media { background: #f4f4f4; }
.lectura-media .media img, .lectura-media .media video { max-height: 64vh; background: #f4f4f4; }
.lectura-media .flecha { width: 46px; height: 46px; }
.lectura-texto {
  font-family: var(--f-texto); font-weight: var(--p-texto); font-size: 20px; line-height: 1.85; color: #222;
  max-width: 680px; margin: 0 auto; white-space: pre-wrap; word-wrap: break-word;
}
.lectura-texto a { color: var(--primary); }
.lectura-acciones { max-width: 680px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid #ececec; justify-content: center; }
.lectura .subtitulo, .lectura .mensajes { max-width: 680px; margin-left: auto; margin-right: auto; }
.lectura .subtitulo { margin-top: 40px; }
@media (max-width: 760px) {
  .lateral > * { zoom: 1; }
  .lectura { left: 0; }
  .lectura-art { padding: 28px 18px 64px; }
  .lectura-titulo { font-size: 32px; }
  .lectura-texto { font-size: 18px; line-height: 1.75; }
  .lectura-media { margin: 0 -18px 28px; }
}

/* Ajustes: raya gris bajo el título, "Creado por" como en la app, sin tonos fucsia, colores de la app */
.columna.vista-journal .cabecera-journal, .tema-oscuro.columna.vista-journal .cabecera-journal { border-top: 0; border-bottom: 0; }
.columna.vista-journal .cabecera-journal::after { content: ''; display: block; width: 160px; max-width: 40%; height: 1px; background: #dcdcdc; margin: 8px auto 0; }
.cabecera-autor { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #8f8f8f; }
.columna.vista-journal, .columna.vista-journal .contenido, .lectura { background: #fff; color: #303030; }
.revista-titulo, .lectura-titulo { color: #303030; }
.revista-titulo { margin-bottom: 8px; }
.revista-autor { font-weight: 700; font-size: 13px; letter-spacing: 1.2px; color: #303030; margin: 0 0 4px; }
.revista-autor:hover, .lectura-autor:hover { color: #303030; text-decoration: underline; text-underline-offset: 3px; }
.revista-credito { font-size: 13px; color: #8f8f8f; margin: 0 0 14px; letter-spacing: 0.2px; }
.revista-media + .revista-titulo { margin-top: 18px; }
.lectura-autor { color: #303030; }
.lectura-credito { color: #8f8f8f; }
/* Chat con los colores de la app */
.columna.chat .chat-lista, .chat-lista { background: #fff; }
.mensaje .burbuja { background: #ececf0; border-radius: 18px; padding: 8px 14px; box-shadow: none; }
.mensaje .burbuja.cola { border-bottom-left-radius: 4px; }
.mensaje.mio .burbuja { background: #cfe8fb; }
.mensaje.mio .burbuja.cola { border-bottom-left-radius: 18px; border-bottom-right-radius: 4px; }
.mensaje .burbuja.tocable:hover { box-shadow: 0 0 0 2px #dcdcdc; }
.mensaje .quien { font-size: 13px; color: #b82ea8; }
.mensaje .texto { font-size: 15px; line-height: 20px; color: #1f1f1f; }
.mensaje .meta { font-size: 10px; color: #7a7a7a; }
.chat-pie { background: #f6f5f3; border-top: 1px solid #eee; }
.chat-pie .pastilla { background: #fff; border-color: #d6d6d6; min-height: 44px; }
.tema-oscuro .chat-pie .pastilla { background: #1c1c1e; border-color: #333; }

/* Botón para ocultar / mostrar la barra izquierda: arriba a la izquierda, en el menú de la barra; con la barra
   oculta, en un riel delgado a la izquierda (así no tapa nada del Journal ni del post abierto). */
.boton-barra { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #808080; background: none; flex: 0 0 auto; }
.boton-barra:hover { background: #f2f2f2; color: #303030; }
.boton-barra svg { width: 22px; height: 22px; }
.lateral .pestanas { grid-template-columns: 48px repeat(4, 1fr); align-items: center; }
.lateral .pestanas .boton-barra { justify-self: center; }
.riel-lateral { display: none; }
body.sin-lateral .app { grid-template-columns: 56px 1fr; }
body.sin-lateral .lateral { display: none; }
body.sin-lateral .riel-lateral { display: flex; flex-direction: column; align-items: center; padding-top: 14px; border-right: 1px solid #ececec; background: #fff; }
body.sin-lateral .lectura { left: 56px; }
@media (max-width: 760px) {
  .boton-barra, .riel-lateral, body.sin-lateral .riel-lateral { display: none; }
  .lateral .pestanas { grid-template-columns: repeat(4, 1fr); }
  body.sin-lateral .app { grid-template-columns: 1fr; }
  body.sin-lateral .lateral { display: flex; }
  body.sin-lateral .app.con-journal .lateral { display: none; }
  body.sin-lateral .lectura { left: 0; }
}
}

/* Íconos de los posts como en la app: todos del mismo color; el like y el favorito solo se rellenan */
.accion.like.activa, .accion.fav.activa,
.post.revista .accion.like.activa, .post.revista .accion.fav.activa { color: inherit; }
.post.revista .accion { color: #1c1c1ccc; }
.post.revista .accion:hover { color: #000; }
.post.revista .accion.like.activa, .post.revista .accion.fav.activa { color: #1c1c1ccc; }
.tema-oscuro .accion.like.activa, .tema-oscuro .accion.fav.activa { color: #b5b5b5; }
.reel-iconos .accion.like.activa, .reel-iconos .accion.fav.activa { color: #fff; }
.post.reel.claro .reel-iconos .accion.like.activa, .post.reel.claro .reel-iconos .accion.fav.activa { color: #000; }

/* Página del QR con el diseño de journale.app: fondo crema, titular grande y botones redondeados */
.login { background: #f5f3f0; color: #111; }
.login:has(> .login-barra) { flex-direction: column; justify-content: flex-start; padding: 16px 20px 48px; }
.login-barra {
  width: min(1200px, 100%); display: flex; align-items: center; padding: 18px 24px; border-radius: 24px;
  background: rgba(245, 243, 240, 0.92); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.login-barra a { display: inline-flex; }
.login-barra .login-logo { height: 72px; margin: 0; }
.login-card {
  width: min(1200px, 100%); margin: auto 0; padding: 64px 0; background: none; border-radius: 0; box-shadow: none;
  grid-template-columns: 1.05fr 0.95fr; gap: 40px;
}
.login h1 { font-size: clamp(2.8rem, 6vw, 5rem); line-height: 0.95; letter-spacing: -0.04em; font-weight: 800; color: #111; margin-bottom: 36px; max-width: 620px; }
.login ol { gap: 20px; }
.login li { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.4; color: #6f6f6f; align-items: center; }
.login li::before { flex: 0 0 36px; height: 36px; background: #b82ea8; color: #fff; font-size: 16px; }
.login-nota { margin-top: 36px; font-size: 1rem; color: #6f6f6f; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.login-nota a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 12px 24px; border-radius: 999px;
  background: #fff; color: #b82ea8; border: 1px solid rgba(184, 46, 168, 0.25); font-weight: 700;
}
.login-nota a:hover { opacity: 0.95; transform: translateY(-1px); }
.login-card > div:last-child { justify-self: center; background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.login .qr { border: 0; padding: 0; width: 300px; height: 300px; }
.qr-estado { font-size: 15px; color: #6f6f6f; margin-top: 16px; }
.login .boton { border-radius: 999px; }
@media (max-width: 860px) {
  .login:has(> .login-barra) { padding: 12px 16px 32px; }
  .login-barra { padding: 12px 16px; }
  .login-barra .login-logo { height: 48px; }
  .login-card { grid-template-columns: 1fr; padding: 32px 0; gap: 32px; }
  .login h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); margin-bottom: 24px; }
  .login-card > div:last-child { padding: 20px; width: 100%; max-width: 340px; }
  .login .qr { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Itálica del texto cuando la fuente elegida en el administrador lo pide */
.revista-bajada, .lectura-texto, .cabecera-desc { font-style: var(--e-texto, normal); }

/* Íconos del encabezado (configuración, volver, buscar, barra) en el mismo gris del menú de arriba. */
.icono-boton { color: #808080; }
.lateral .bloque-journal .icono-boton,
.lateral .lateral-panel .cabecera .volver,
.volver { color: #808080; }

/* La barra izquierda se desliza al ocultarla o mostrarla (solo en computador). Se dejan tres columnas
   (barra, riel, Journal) y se anima su ancho; la barra se desvanece y se esconde al terminar. */
@media (min-width: 761px) {
  .app { grid-template-columns: var(--sidebar) 0 1fr; transition: grid-template-columns 0.26s cubic-bezier(0.4, 0, 0.2, 1); }
  .lateral { display: flex; min-width: 0; overflow: hidden; opacity: 1; visibility: visible; transition: opacity 0.2s ease 0.04s, visibility 0s; }
  /* Ancho fijo para que no se aplaste al deslizarse. Se divide entre 0.85 porque el contenido de la barra
     va con zoom: 0.85 (arriba); así ocupa la barra completa y no deja una franja vacía a la derecha. */
  .lateral > * { width: calc(var(--sidebar) / 0.85); flex-shrink: 0; }
  .riel-lateral { display: flex; flex-direction: column; align-items: center; padding-top: 14px; border-right: 1px solid #ececec; background: #fff; min-width: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 0.18s ease, visibility 0s linear 0.26s; }
  .lectura { transition: left 0.26s cubic-bezier(0.4, 0, 0.2, 1); }
  body.sin-lateral .app { grid-template-columns: 0 56px 1fr; }
  body.sin-lateral .lateral { display: flex; opacity: 0; visibility: hidden; transition: opacity 0.16s ease, visibility 0s linear 0.26s; }
  body.sin-lateral .riel-lateral { display: flex; opacity: 1; visibility: visible; transition: opacity 0.2s ease 0.08s, visibility 0s; }
}
@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .app, .lateral, .riel-lateral, .lectura, body.sin-lateral .lateral, body.sin-lateral .riel-lateral { transition: none; }
}

/* Comentarios sin leer: el número en fucsia y en negrilla, como en la app. */
.accion .sin-leer, .post.revista .accion .sin-leer, .tema-oscuro .accion .sin-leer { color: var(--primary); font-weight: 800; }

/* Aviso para quien tiene una versión de la app que todavía no abre el QR. */
.login-actualizar { margin-top: 14px; font-size: 14px; line-height: 1.45; color: #8a8a8a; max-width: 46ch; }

/* El autor de cada post con la misma letra, tamaño y color que la fecha de debajo
   (en la tarjeta del Journal y en el post abierto). */
.revista-autor, .lectura-autor { font-family: var(--f-texto); text-transform: none; }
.revista-autor { font-weight: var(--p-texto, 400); }
.lectura-autor { font-weight: 400; }
.revista-autor { font-size: 13px; letter-spacing: 0.2px; color: #8f8f8f; }
.lectura-autor { font-size: 14px; letter-spacing: normal; color: #8f8f8f; }
.revista-autor:hover, .lectura-autor:hover { color: #8f8f8f; text-decoration: underline; text-underline-offset: 3px; }
.tema-oscuro .revista-autor { color: #8a8a8a; }
