/* ─── Comunidad: chat de grupo con el aspecto de WhatsApp ─────────────────── */
:root {
  --wa-verde: #008069; --wa-acento: #00a884; --wa-fondo: #efeae2; --wa-sal: #d9fdd3; --wa-ent: #fff;
  --wa-tx: #111b21; --wa-gris: #667781; --wa-gris2: #8696a0; --wa-linea: #e9edef; --wa-panel: #f0f2f5; --wa-azul: #53bdeb;
  --wa-sombra: 0 1px .5px rgba(11,20,26,.13);
  --wa-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
body.en-com { overflow: hidden; }
body.en-com nav, body.en-com .tirar { display: none !important; }
nav .badge.wa { background: #25d366; }
nav.seis button span { font-size: 8.6px; letter-spacing: .01em; }

#com { position: fixed; left: 0; right: 0; top: 0; margin: 0 auto; width: 100%; max-width: 480px; height: 100dvh; z-index: 8; display: flex; flex-direction: column; overflow: hidden;
  background: var(--wa-fondo); color: var(--wa-tx); font: 400 14.2px/1.38 var(--wa-font); letter-spacing: 0; animation: desdeDer .26s ease-out both; box-shadow: 0 0 0 100vmax rgba(11,20,26,.35); }
#com button { font-family: var(--wa-font); -webkit-tap-highlight-color: transparent; }
#com svg { flex: none; }
.cm-ic { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0; }
.cm-ic:active { background: rgba(255,255,255,.15); }

/* Encabezado */
.cm-cab { flex: none; display: flex; align-items: center; gap: 2px; padding: calc(6px + env(safe-area-inset-top)) 4px 6px 2px; min-height: 60px; background: var(--wa-verde); color: #fff; position: relative; z-index: 3; }
.cm-cab .cm-atras { display: flex; align-items: center; gap: 0; border: 0; background: none; color: #fff; padding: 4px 2px 4px 2px; border-radius: 24px; cursor: pointer; flex: none; }
.cm-cab .cm-atras:active { background: rgba(255,255,255,.15); }
.cm-gfoto { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.cm-tit { flex: 1; min-width: 0; padding: 4px 8px; cursor: pointer; border: 0; background: none; color: #fff; text-align: left; }
.cm-tit b { display: block; font: 500 17px/1.25 var(--wa-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-tit small { display: block; font-size: 13px; line-height: 1.3; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-cab.sel { background: var(--wa-verde); }
.cm-cab.sel .cm-num { flex: 1; font: 500 19px/1 var(--wa-font); padding-left: 14px; }

/* Lista de mensajes */
.cm-lista { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 4px 0 10px; position: relative; background-color: var(--wa-fondo); background-size: 300px; -webkit-overflow-scrolling: touch; }
.cm-dia { display: flex; flex-direction: column; }
.cm-fecha { position: sticky; top: 8px; z-index: 2; align-self: center; margin: 10px 0 6px; padding: 5px 12px 6px; border-radius: 7.5px; background: #fff; color: #54656f; font-size: 12.5px; line-height: 1.2; box-shadow: var(--wa-sombra); text-transform: none; transition: opacity .3s; }
.cm-fecha.flota { opacity: 0; }
.cm-lista.moviendo .cm-fecha.flota { opacity: 1; transition: none; }
.cm-sys { align-self: center; max-width: min(88%, 380px); margin: 8px auto 8px; padding: 6px 12px 7px; border-radius: 7.5px; background: #ffeecd; color: #54656f; font-size: 12.5px; line-height: 1.4; text-align: center; box-shadow: var(--wa-sombra); }
.cm-sys svg { vertical-align: -2px; margin-right: 3px; }
.cm-noleidos { margin: 10px 0 6px; padding: 5px; background: rgba(255,255,255,.72); text-align: center; color: #54656f; font-size: 12.5px; font-weight: 500; }
.cm-cargando { display: flex; justify-content: center; padding: 30px 0; }
.cm-cargando i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(0,168,132,.25); border-top-color: var(--wa-acento); animation: girar .8s linear infinite; }
.cm-mas { display: flex; justify-content: center; padding: 10px 0 4px; }
.cm-mas i { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(0,168,132,.25); border-top-color: var(--wa-acento); animation: girar .8s linear infinite; }

.cm-m { display: flex; align-items: flex-start; padding: 1px 52px 1px 8px; position: relative; transition: background .2s; }
.cm-m.out { justify-content: flex-end; padding: 1px 10px 1px 52px; }
.cm-m.primero { margin-top: 7px; }
.cm-m.con-reac { margin-bottom: 16px; }
.cm-m.sel { background: rgba(0,168,132,.18); }
.cm-m.brilla { animation: cmBrilla 1.6s ease; }
@keyframes cmBrilla { 0%, 60% { background: rgba(0,168,132,.22); } 100% { background: transparent; } }
.cm-av, .cm-av-esp { width: 28px; height: 28px; flex: none; margin-right: 6px; }
.cm-av { border-radius: 50%; overflow: hidden; border: 0; padding: 0; background: #dfe5e7; color: #fff; font: 500 11px/28px var(--wa-font); text-align: center; cursor: pointer; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-b { position: relative; min-width: 0; max-width: 100%; background: var(--wa-ent); border-radius: 7.5px; padding: 6px 7px 8px 9px; box-shadow: var(--wa-sombra); overflow-wrap: anywhere; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.out .cm-b { background: var(--wa-sal); }
.primero.in .cm-b { border-top-left-radius: 0; }
.primero.out .cm-b { border-top-right-radius: 0; }
.cm-cola { position: absolute; top: 0; width: 8px; height: 13px; display: block; }
.in .cm-cola { left: -8px; } .out .cm-cola { right: -8px; }
.cm-n { display: flex; align-items: baseline; gap: 8px; font-size: 12.8px; font-weight: 500; line-height: 1.45; margin-bottom: 1px; padding-right: 2px; }
.cm-n span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-n small { color: var(--wa-gris); font-weight: 400; font-size: 11.5px; white-space: nowrap; margin-left: auto; }
.cm-t { white-space: pre-wrap; font-size: 14.2px; line-height: 19px; }
.cm-t.jumbo { font-size: 40px; line-height: 1.15; }
.cm-t a { color: #027eb5; text-decoration: none; }
.cm-t code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; background: rgba(11,20,26,.06); border-radius: 4px; padding: 0 3px; }
.cm-t code.cm-pre { display: block; white-space: pre-wrap; background: none; padding: 0; }
.cm-t ul, .cm-t ol { margin: 0; padding-left: 20px; }
.cm-t .cm-cita { display: block; border-left: 3px solid rgba(11,20,26,.25); padding-left: 8px; color: #54656f; }
.cm-sp { display: inline-block; width: 58px; height: 1px; vertical-align: bottom; }
.out .cm-sp { width: 74px; }
.cm-h { position: absolute; right: 7px; bottom: 3px; display: flex; align-items: center; gap: 3px; font-size: 11px; line-height: 15px; color: var(--wa-gris); white-space: nowrap; pointer-events: none; }
.cm-h .tick { color: var(--wa-gris2); display: inline-flex; }
.cm-h .tick.azul { color: var(--wa-azul); }
.cm-borr { color: var(--wa-gris); font-style: italic; display: inline-flex; align-items: center; gap: 5px; }
.cm-vencido { display: flex; align-items: center; gap: 8px; color: var(--wa-gris); font-style: italic; padding: 2px 0; }

/* Cita de respuesta */
.cm-q { display: flex; gap: 8px; border-radius: 6px; background: rgba(11,20,26,.05); overflow: hidden; margin: 0 0 5px; cursor: pointer; min-height: 42px; position: relative; }
.out .cm-q { background: rgba(11,20,26,.06); }
.cm-q::before { content: ''; width: 4px; flex: none; background: var(--c, var(--wa-acento)); }
.cm-q > div { flex: 1; min-width: 0; padding: 5px 8px 6px 0; }
.cm-q b { display: block; font-size: 12.8px; font-weight: 500; color: var(--c, var(--wa-acento)); line-height: 1.4; }
.cm-q span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: #54656f; line-height: 1.35; }
.cm-q img { width: 52px; height: auto; align-self: stretch; object-fit: cover; flex: none; }

/* Reacciones */
.cm-reac { position: absolute; bottom: -15px; display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 5px; min-height: 22px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(11,20,26,.22); font-size: 14px; line-height: 20px; border: 0; cursor: pointer; z-index: 1; color: var(--wa-gris); }
.in .cm-reac { left: 8px; } .out .cm-reac { right: 8px; }
.out .cm-reac { background: #fff; }
.cm-reac small { font-size: 12px; margin-left: 3px; }

/* Fotos y videos */
.cm-b.media { padding: 3px; width: min-content; }
.cm-b.media .cm-n { padding: 3px 6px 0; }
.cm-b.media .cm-q { margin: 0 0 3px; }
.cm-img { display: block; width: min(260px, 64vw); min-height: 120px; max-height: 340px; object-fit: cover; border-radius: 6px; background: #d1d7db; cursor: pointer; }
.cm-vid { position: relative; display: block; width: min(260px, 64vw); border-radius: 6px; overflow: hidden; background: #0b141a; cursor: pointer; border: 0; padding: 0; }
.cm-vid video { display: block; width: 100%; max-height: 340px; min-height: 140px; object-fit: cover; pointer-events: none; }
.cm-vid .play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(11,20,26,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.cm-vid .dur { position: absolute; left: 8px; bottom: 6px; color: #fff; font-size: 11px; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cm-cap { padding: 5px 5px 3px 6px; }
.cm-b.media.sin-cap .cm-h { color: #fff; right: 10px; bottom: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.cm-b.media.sin-cap .cm-h .tick { color: #fff; }
.cm-b.media.sin-cap::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 110px; height: 28px; border-radius: 0 0 6px 0; background: radial-gradient(at 100% 100%, rgba(11,20,26,.45), transparent 70%); pointer-events: none; }
.cm-sube { position: absolute; inset: 3px; border-radius: 6px; background: rgba(11,20,26,.35); display: flex; align-items: center; justify-content: center; }
.cm-sube i { width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p, 0) * 1%), rgba(255,255,255,.25) 0); -webkit-mask: radial-gradient(circle, transparent 18px, #000 19px); mask: radial-gradient(circle, transparent 18px, #000 19px); animation: girar 1.4s linear infinite; }

/* Notas de voz y audios */
.cm-voz { display: flex; align-items: center; gap: 6px; width: min(260px, 66vw); padding: 2px 0 13px; position: relative; }
.cm-voz .foto { width: 48px; height: 48px; border-radius: 50%; position: relative; flex: none; background: #dfe5e7; color: #fff; font: 500 16px/48px var(--wa-font); text-align: center; }
.cm-voz .foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.cm-voz .foto .mic { position: absolute; right: -4px; bottom: -2px; color: var(--wa-acento); display: flex; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.cm-voz.oido .foto .mic { color: var(--wa-azul); }
.cm-voz .foto.aud { background: #ff6b2e; display: flex; align-items: center; justify-content: center; }
.out .cm-voz { flex-direction: row-reverse; }
.out .cm-voz .ctl { flex-direction: row; }
.cm-voz .ctl { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; }
.cm-voz .k-pl { width: 34px; height: 34px; border: 0; background: none; color: #8696a0; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.cm-voz .onda { flex: 1; height: 30px; display: flex; align-items: center; justify-content: space-between; position: relative; cursor: pointer; min-width: 0; }
.cm-voz .onda i { width: 2.5px; border-radius: 2px; background: #c5cbcf; flex: none; }
.out .cm-voz .onda i { background: #b2c8ae; }
.cm-voz .onda i.on { background: #4fc3f7; }
.in .cm-voz .onda i.on { background: var(--wa-acento); }
.cm-voz .bola { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--wa-acento); left: calc(var(--p, 0) * 1%); }
.out .cm-voz .bola { background: #4fc3f7; }
.cm-voz .dur { position: absolute; bottom: 0; font-size: 11px; color: var(--wa-gris); }
.in .cm-voz .dur { left: 94px; } .out .cm-voz .dur { left: 40px; }
.cm-voz .vel { border: 0; border-radius: 12px; background: rgba(11,20,26,.35); color: #fff; font: 600 12px/1 var(--wa-font); padding: 5px 7px; cursor: pointer; flex: none; }

/* Documentos */
.cm-doc { display: flex; align-items: center; gap: 10px; width: min(260px, 66vw); padding: 10px 10px; border-radius: 6px; background: rgba(11,20,26,.045); text-decoration: none; color: inherit; margin-bottom: 2px; }
.out .cm-doc { background: rgba(11,20,26,.05); }
.cm-doc .ext { width: 30px; height: 38px; flex: none; border-radius: 3px; background: var(--c, #8696a0); color: #fff; font: 700 8.5px/1 var(--wa-font); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; clip-path: polygon(0 0, 68% 0, 100% 24%, 100% 100%, 0 100%); text-transform: uppercase; }
.cm-doc div { flex: 1; min-width: 0; }
.cm-doc b { display: block; font-weight: 400; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-doc small { display: block; color: var(--wa-gris); font-size: 12px; margin-top: 2px; }
.cm-doc .baj { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #8696a0; color: #8696a0; display: flex; align-items: center; justify-content: center; flex: none; }

/* Encuestas */
.cm-enc { width: min(270px, 68vw); padding: 2px 2px 16px; }
.cm-enc h5 { margin: 2px 0 3px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.cm-enc .tip { font-size: 12.5px; color: var(--wa-gris); display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.cm-op { display: grid; grid-template-columns: 22px 1fr auto; column-gap: 10px; row-gap: 7px; align-items: center; padding: 9px 0 6px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; color: inherit; font-size: 14.2px; }
.cm-op .ck { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #8696a0; display: flex; align-items: center; justify-content: center; color: #fff; }
.cm-enc.multi .cm-op .ck { border-radius: 4px; }
.cm-op.si .ck { background: var(--wa-acento); border-color: var(--wa-acento); }
.cm-op .lab { min-width: 0; overflow-wrap: anywhere; }
.cm-op .cnt { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.cm-op .cnt img, .cm-op .cnt em { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; margin-left: -8px; box-shadow: 0 0 0 1.5px #fff; background: #dfe5e7; display: inline-block; }
.out .cm-op .cnt img, .out .cm-op .cnt em { box-shadow: 0 0 0 1.5px var(--wa-sal); }
.cm-op .k-barra { grid-column: 2 / 4; height: 6px; border-radius: 3px; background: rgba(11,20,26,.1); overflow: hidden; }
.cm-op .k-barra span { display: block; height: 100%; border-radius: 3px; background: var(--wa-acento); transition: width .4s; }
.cm-enc .ver, .cm-evt .ver { display: block; width: 100%; border: 0; border-top: 1px solid rgba(11,20,26,.1); background: none; margin-top: 8px; padding: 11px 0 0; text-align: center; color: var(--wa-verde); font-size: 14px; font-weight: 500; cursor: pointer; }

/* Ubicación, contacto y evento */
.cm-ubi { display: block; width: min(256px, 64vw); border-radius: 6px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; }
.cm-mapa { position: relative; height: 150px; overflow: hidden; background: #e5e3df; }
.cm-mapa img { position: absolute; width: 256px; height: 256px; max-width: none; }
.cm-mapa .pin { position: absolute; left: 50%; top: 50%; margin: -34px 0 0 -14px; color: #ea4335; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.cm-mapa .osm { position: absolute; right: 2px; bottom: 1px; font-size: 9px; background: rgba(255,255,255,.75); padding: 0 3px; color: #54656f; }
.cm-ubi .k-nom { padding: 7px 8px 2px; font-size: 13.5px; }
.cm-ubi .k-nom small { display: block; color: var(--wa-gris); font-size: 12px; }
.cm-con { width: min(250px, 64vw); }
.cm-con .k-top { display: flex; align-items: center; gap: 12px; padding: 6px 4px 22px; }
.cm-b.con-b .cm-h { bottom: 37px; }
.cm-con .k-top i { width: 46px; height: 46px; border-radius: 50%; background: #dfe5e7; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.cm-con .k-top b { font-size: 15.5px; font-weight: 500; overflow-wrap: anywhere; }
.cm-btns { display: flex; border-top: 1px solid rgba(11,20,26,.1); margin: 0 -7px -2px -9px; }
.cm-btns > * { flex: 1; padding: 11px 4px 3px; border: 0; background: none; color: var(--wa-verde); font: 500 14px/1 var(--wa-font); text-align: center; text-decoration: none; cursor: pointer; }
.cm-btns > * + * { border-left: 1px solid rgba(11,20,26,.1); }
.cm-evt { width: min(262px, 66vw); padding: 2px 2px 16px; }
.cm-evt .k-top { display: flex; gap: 12px; align-items: flex-start; }
.cm-evt .cal { width: 46px; flex: none; border-radius: 8px; overflow: hidden; background: #fff; text-align: center; box-shadow: 0 0 0 1px rgba(11,20,26,.12); }
.cm-evt .cal small { display: block; background: #ea4335; color: #fff; font: 600 10px/16px var(--wa-font); text-transform: uppercase; }
.cm-evt .cal b { display: block; font: 500 21px/30px var(--wa-font); }
.cm-evt h5 { margin: 0 0 3px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.cm-evt .k-det { font-size: 13px; color: #54656f; line-height: 1.45; }
.cm-evt .desc { font-size: 13.5px; margin-top: 8px; white-space: pre-wrap; }
.cm-evt .asis { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: #54656f; }
.cm-evt .asis img, .cm-evt .asis em { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; margin-left: -8px; box-shadow: 0 0 0 1.5px #fff; display: inline-block; background: #dfe5e7; }
.cm-evt .asis img:first-child, .cm-evt .asis em:first-child { margin-left: 0; }
.cm-evt .bts { display: flex; gap: 8px; margin-top: 10px; }
.cm-evt .bts > * { flex: 1; border-radius: 18px; padding: 9px 6px; font: 500 13px/1 var(--wa-font); text-align: center; border: 1px solid rgba(11,20,26,.15); color: var(--wa-verde); background: rgba(255,255,255,.6); cursor: pointer; text-decoration: none; }
.cm-evt .bts .si { background: var(--wa-acento); border-color: var(--wa-acento); color: #fff; }

/* Tarjetas de promoción y paquete */
.cm-ref { display: block; width: min(262px, 66vw); border-radius: 6px; overflow: hidden; background: #fff; text-align: left; }
.out .cm-ref { background: rgba(255,255,255,.7); }
.cm-ref img { display: block; width: 100%; max-height: 300px; object-fit: cover; background: #e7e1d9; }
.cm-ref .cu { padding: 9px 10px 10px; }
.cm-ref .k-et { font: 600 10.5px/1 var(--wa-font); letter-spacing: .08em; color: #B4382A; text-transform: uppercase; }
.cm-ref b { display: block; font: italic 600 18px/1.2 'Playfair Display', Georgia, serif; color: #6d1f17; margin-top: 4px; }
.cm-ref p { margin: 4px 0 0; font-size: 13px; color: #54656f; line-height: 1.4; }
.cm-ref .k-bt { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 18px; padding: 10px; background: linear-gradient(150deg, #B4382A, #7c2018); color: #fff; font: 600 13.5px/1 var(--wa-font); cursor: pointer; }
.cm-paq { display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: var(--bg, #EFC9C3); }
.cm-paq .n { font: 600 34px/1 'Playfair Display', Georgia, serif; color: #6d1f17; text-align: center; min-width: 44px; }
.cm-paq .n small { display: block; font: 600 9px/1 var(--wa-font); letter-spacing: .1em; margin-top: 3px; }
.cm-paq b { margin-top: 0; }
.cm-paq .pr { font: 600 15px/1.2 var(--wa-font); color: #6d1f17; margin-top: 3px; }
.cm-prevref { display: flex; justify-content: center; }
.cm-auto { width: 100%; min-height: 120px; border-radius: 18px; border: 1px solid rgba(184,138,46,.6); background: var(--arena, #fff); color: var(--vino, #111); padding: 12px 14px; font: 400 15px/1.45 var(--sans, sans-serif); resize: vertical; outline: none; }

/* Stickers (dibujados con CSS: emoji recortado + frase) */
.cm-b.stk-b { background: none !important; box-shadow: none; padding: 0 0 18px; }
.cm-b.stk-b .cm-cola { display: none; }
.cm-b.stk-b .cm-h { right: 2px; bottom: 0; background: rgba(255,255,255,.85); border-radius: 8px; padding: 0 6px; }
.stk { width: 140px; height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transform: rotate(var(--r, -4deg)); pointer-events: none; }
.stk .e { font-size: 70px; line-height: 1; filter: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.stk b { font: italic 700 19px/1.05 'Playfair Display', Georgia, serif; color: var(--c, #B4382A); text-align: center; max-width: 140px;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1.5px 1.5px #fff, -1.5px -1.5px #fff, 1.5px -1.5px #fff, -1.5px 1.5px #fff, 0 3px 5px rgba(0,0,0,.25); }

/* Botón para bajar */
.cm-abajo { position: absolute; right: 12px; bottom: 76px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #54656f; box-shadow: 0 1px 4px rgba(11,20,26,.25); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 4; animation: pop .2s ease both; }
.cm-abajo b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #25d366; color: #fff; font: 600 11.5px/20px var(--wa-font); }

/* Barra para escribir */
.cm-pie { flex: none; display: flex; align-items: flex-end; gap: 5px; padding: 5px 6px calc(6px + env(safe-area-inset-bottom)); position: relative; z-index: 3; }
.cm-pie.con-emo { padding-bottom: 6px; }
.cm-caja { flex: 1; min-width: 0; background: #fff; border-radius: 24px; display: flex; flex-direction: column; box-shadow: var(--wa-sombra); overflow: hidden; }
.cm-fila { display: flex; align-items: flex-end; min-height: 48px; padding: 0 2px 0 4px; }
.cm-fila .cm-ic { color: #54656f; height: 48px; width: 40px; border-radius: 0; }
.cm-fila .cm-ic:active { background: none; color: var(--wa-acento); }
.cm-fila textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; font: 400 16px/21px var(--wa-font); padding: 13px 4px 14px; height: 48px; max-height: 132px; background: transparent; color: var(--wa-tx); letter-spacing: 0; }
.cm-fila textarea::placeholder { color: #8696a0; }
.cm-env { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--wa-acento); color: #fff; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--wa-sombra); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s; }
.cm-env.grabando { transform: scale(1.35); }
.cm-env:disabled { opacity: .5; }
.cm-resp { display: flex; margin: 5px 5px 0; border-radius: 8px; background: var(--wa-panel); overflow: hidden; position: relative; }
.cm-resp::before { content: ''; width: 4px; flex: none; background: var(--c, var(--wa-acento)); }
.cm-resp > div { flex: 1; min-width: 0; padding: 6px 34px 7px 8px; }
.cm-resp b { display: block; color: var(--c, var(--wa-acento)); font-size: 12.8px; font-weight: 500; }
.cm-resp span { display: block; color: #54656f; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-resp img { width: 48px; object-fit: cover; flex: none; }
.cm-resp .cm-ic { position: absolute; right: 2px; top: 2px; width: 30px; height: 30px; color: #54656f; }
.cm-grab { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 48px; color: #54656f; font-size: 15px; }
.cm-grab .pt { width: 10px; height: 10px; border-radius: 50%; background: #ea0038; animation: cmLate 1s infinite; }
.cm-grab .t { min-width: 40px; font-variant-numeric: tabular-nums; }
.cm-grab .des { flex: 1; text-align: center; color: #8696a0; font-size: 14px; white-space: nowrap; overflow: hidden; }
@keyframes cmLate { 50% { opacity: .2; } }
.cm-fmt { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 22px; background: #fff; box-shadow: 0 2px 10px rgba(11,20,26,.2); animation: pop .15s ease both; z-index: 5; }
.cm-fmt button { width: 40px; height: 34px; border: 0; border-radius: 17px; background: none; color: var(--wa-tx); font-size: 16px; cursor: pointer; }
.cm-fmt button:active { background: var(--wa-panel); }
.cm-bloq-pie { flex: none; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--wa-panel); text-align: center; color: #54656f; font-size: 13.5px; }

/* Menú para adjuntar */
.cm-adj { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 2px); background: #fff; border-radius: 16px; padding: 20px 6px 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 2px; box-shadow: 0 4px 24px rgba(11,20,26,.2); transform-origin: 80% 100%; animation: cmAbre .2s ease-out both; z-index: 6; }
@keyframes cmAbre { from { opacity: 0; transform: scale(.6) translateY(30px); } to { opacity: 1; transform: none; } }
.cm-adj button { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: none; color: #3b4a54; font-size: 12.5px; cursor: pointer; padding: 0; }
.cm-adj i { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c); color: #fff; }

/* Emojis y stickers */
.cm-emo { flex: none; height: min(300px, 42vh); background: #fff; display: flex; flex-direction: column; border-top: 1px solid var(--wa-linea); padding-bottom: env(safe-area-inset-bottom); z-index: 3; }
.cm-emo .cats { display: flex; justify-content: space-around; border-bottom: 1px solid var(--wa-linea); flex: none; }
.cm-emo .cats button { flex: 1; border: 0; background: none; font-size: 19px; padding: 9px 0 7px; cursor: pointer; filter: grayscale(1); opacity: .6; border-bottom: 2px solid transparent; }
.cm-emo .cats button.on { filter: none; opacity: 1; border-bottom-color: var(--wa-acento); }
.cm-emo .grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); align-content: start; padding: 4px 6px; overscroll-behavior: contain; }
.cm-emo .grid h6 { grid-column: 1 / -1; margin: 8px 4px 4px; font: 500 12.5px/1 var(--wa-font); color: var(--wa-gris); }
.cm-emo .grid button { border: 0; background: none; font-size: 27px; line-height: 1; padding: 6px 0; cursor: pointer; border-radius: 8px; }
.cm-emo .grid button:active { background: var(--wa-panel); }
.cm-emo .grid.stks { grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px; }
.cm-emo .grid.stks button { padding: 0; height: 112px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cm-emo .grid.stks .stk { transform: scale(.74) rotate(var(--r, -4deg)); }
.cm-emo .tabs { display: flex; justify-content: center; gap: 6px; border-top: 1px solid var(--wa-linea); padding: 5px; flex: none; }
.cm-emo .tabs button { border: 0; background: none; border-radius: 16px; padding: 7px 16px; font: 500 13.5px/1 var(--wa-font); color: #54656f; cursor: pointer; }
.cm-emo .tabs button.on { background: #e7fce3; color: var(--wa-verde); }

/* Selección de un mensaje: barra de reacciones */
.cm-rbar { position: absolute; z-index: 7; display: flex; align-items: center; gap: 2px; padding: 5px 7px; border-radius: 28px; background: #fff; box-shadow: 0 4px 18px rgba(11,20,26,.25); animation: pop .18s ease both; }
.cm-rbar button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 26px; line-height: 1; cursor: pointer; padding: 0; transition: transform .15s; }
.cm-rbar button:active { transform: scale(1.3); }
.cm-rbar button.mia { background: var(--wa-panel); }
.cm-rbar .mas { font-size: 0; background: var(--wa-panel); color: #54656f; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 2px; }

/* Hojas propias del chat */
.cm-hoja { position: absolute; inset: 0; z-index: 20; background: rgba(11,20,26,.4); display: flex; align-items: flex-end; animation: funde .2s both; }
.cm-hoja > div { width: 100%; max-height: 88%; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: subeHoja .3s cubic-bezier(.2,.8,.2,1) both; }
.cm-hoja > div::before { content: ''; width: 34px; height: 4px; border-radius: 2px; background: #d1d7db; align-self: center; flex: none; }
.cm-hoja h3 { margin: 2px 0 0; font: 500 18px/1.3 var(--wa-font); color: var(--wa-tx); }
.cm-hoja p { margin: 0; color: #54656f; font-size: 14px; line-height: 1.45; }
.cm-hoja label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--wa-verde); font-weight: 500; }
.cm-hoja .cm-in { width: 100%; padding: 8px 2px; border: 0; border-bottom: 2px solid var(--wa-acento); border-radius: 0; background: none; color: var(--wa-tx); font: 400 16px/1.3 var(--wa-font); letter-spacing: 0; outline: none; box-shadow: none; }
.cm-hoja textarea.cm-in { resize: none; min-height: 40px; }
.cm-hoja .fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cm-hoja .cm-sw { flex-direction: row; align-items: center; justify-content: space-between; color: var(--wa-tx); font-size: 15px; font-weight: 400; cursor: pointer; }
.cm-hoja .cm-sw input { width: 40px; height: 22px; accent-color: var(--wa-acento); padding: 0; border: 0; background: none; box-shadow: none; }
.cm-hoja .ok { border: 0; border-radius: 24px; padding: 13px; background: var(--wa-acento); color: #fff; font: 500 15px/1 var(--wa-font); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cm-hoja .ok:disabled { opacity: .5; }
.cm-hoja .ok.rojo { background: #ea0038; }
.cm-hoja .no { border: 0; background: none; color: var(--wa-verde); font: 500 14.5px/1 var(--wa-font); padding: 10px; cursor: pointer; }
.cm-hoja .op-x { display: flex; align-items: center; gap: 6px; }
.cm-hoja .op-x .cm-in { flex: 1; }
.cm-hoja .op-x button { color: #8696a0; }
.cm-filas { display: flex; flex-direction: column; margin: 0 -20px; }
.cm-pers { display: flex; align-items: center; gap: 12px; padding: 9px 20px; border: 0; background: none; width: 100%; text-align: left; color: inherit; font: inherit; cursor: default; }
.cm-pers.toca { cursor: pointer; }
.cm-pers:active.toca { background: var(--wa-panel); }
.cm-pers .k-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; background: #dfe5e7; color: #fff; font: 500 15px/42px var(--wa-font); text-align: center; border: 0; padding: 0; cursor: pointer; }
.cm-pers .k-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-pers > div { flex: 1; min-width: 0; }
.cm-pers b { display: block; font-size: 16px; font-weight: 400; color: var(--wa-tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-pers small { display: block; font-size: 13.5px; color: var(--wa-gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-pers .der { font-size: 22px; flex: none; }
.cm-pill { flex: none; font-size: 11.5px; font-weight: 500; color: var(--wa-verde); background: #e7fce3; border-radius: 6px; padding: 3px 6px; }
.cm-pill.ia { color: #7f66ff; background: #efeaff; }
.cm-pill.coach { color: #c4532d; background: #fdeee8; }
.cm-tabs { display: flex; gap: 6px; overflow-x: auto; }
.cm-tabs button { border: 0; border-radius: 16px; padding: 7px 12px; background: var(--wa-panel); color: #54656f; font: 500 14px/1 var(--wa-font); white-space: nowrap; cursor: pointer; }
.cm-tabs button.on { background: #e7fce3; color: var(--wa-verde); }
.cm-emogrid { display: grid; grid-template-columns: repeat(8, 1fr); max-height: 50vh; overflow-y: auto; }
.cm-emogrid button { border: 0; background: none; font-size: 27px; padding: 6px 0; cursor: pointer; }
.cm-elige { display: flex; flex-direction: column; gap: 8px; }
.cm-elige button { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; background: var(--wa-panel); padding: 10px; text-align: left; cursor: pointer; font: 400 15px/1.3 var(--wa-font); color: var(--wa-tx); }
.cm-elige img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.cm-elige i { width: 48px; height: 48px; border-radius: 8px; flex: none; background: var(--bg, #EFC9C3); display: flex; align-items: center; justify-content: center; font: 600 18px/1 'Playfair Display', Georgia, serif; color: #6d1f17; font-style: normal; }
.cm-elige small { display: block; color: var(--wa-gris); font-size: 13px; }

/* Info del grupo */
.cm-info { position: absolute; inset: 0; z-index: 15; background: var(--wa-panel); overflow-y: auto; animation: desdeDer .22s ease-out both; }
.cm-info .k-cab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 6px 6px; background: #fff; color: var(--wa-tx); box-shadow: 0 1px 0 var(--wa-linea); min-height: 56px; }
.cm-info .k-cab b { font: 500 18px/1 var(--wa-font); }
.cm-info .hero { background: #fff; text-align: center; padding: 20px 20px 18px; margin-bottom: 9px; }
.cm-info .hero img { width: 124px; height: 124px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--wa-linea); cursor: pointer; }
.cm-info .hero h2 { margin: 14px 0 4px; font: 400 23px/1.25 var(--wa-font); color: var(--wa-tx); }
.cm-info .hero p { margin: 0; color: var(--wa-gris); font-size: 15px; }
.cm-info .blq { background: #fff; padding: 14px 20px; margin-bottom: 9px; }
.cm-info .blq h4 { margin: 0 0 6px; font: 400 14px/1.3 var(--wa-font); color: var(--wa-gris); }
.cm-info .blq p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--wa-tx); white-space: pre-line; }
.cm-info .blq .cm-filas { margin: 0 -20px -6px; }

/* Visor de fotos y videos */
.cm-visor { position: fixed; inset: 0; z-index: 50; background: #0b141a; display: flex; flex-direction: column; animation: funde .2s both; font-family: var(--wa-font); }
.cm-visor .k-cab { display: flex; align-items: center; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 6px 6px; color: #fff; background: rgba(11,20,26,.6); }
.cm-visor .k-cab div { flex: 1; min-width: 0; }
.cm-visor .k-cab b { display: block; font-size: 16px; font-weight: 500; }
.cm-visor .k-cab small { display: block; font-size: 13px; opacity: .75; }
.cm-visor .k-cab a { color: #fff; }
.cm-visor .med { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.cm-visor .med img, .cm-visor .med video { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-visor .pie { color: #e9edef; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); text-align: center; background: rgba(11,20,26,.6); max-height: 30vh; overflow-y: auto; }
.cm-visor .pie .cm-t a { color: #53bdeb; }
.visor .tit-visor { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom)); text-align: center; color: #fff; font: 500 16px/1.3 var(--sans); letter-spacing: .04em; text-shadow: 0 1px 4px rgba(0,0,0,.6); padding: 0 20px; }

/* Vista previa antes de enviar fotos y videos */
.cm-prev { position: absolute; inset: 0; z-index: 18; background: #0b141a; display: flex; flex-direction: column; animation: funde .2s both; }
.cm-prev .k-cab { display: flex; padding: calc(6px + env(safe-area-inset-top)) 6px 6px; color: #fff; }
.cm-prev .med { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.cm-prev .med img, .cm-prev .med video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.cm-prev .k-mini { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; flex: none; }
.cm-prev .k-mini button { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; padding: 0; flex: none; cursor: pointer; background: #222; }
.cm-prev .k-mini button.on { border-color: var(--wa-acento); }
.cm-prev .k-mini img, .cm-prev .k-mini video { width: 100%; height: 100%; object-fit: cover; }
.cm-prev .pie { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
.cm-prev .pie textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; border-radius: 24px; padding: 12px 16px; height: 46px; max-height: 120px; background: #1f2c34; color: #e9edef; font: 400 16px/22px var(--wa-font); }
.cm-prev .pie textarea::placeholder { color: #8696a0; }

/* Comunidad en pausa o sin sesión */
.cm-bloq { margin: 26px 16px; padding: 24px 20px 20px; border-radius: 14px; background: #fff; box-shadow: var(--wa-sombra); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cm-bloq .ico { width: 64px; height: 64px; border-radius: 50%; background: #e7fce3; color: var(--wa-verde); display: flex; align-items: center; justify-content: center; }
.cm-bloq h3 { margin: 4px 0 0; font: 500 19px/1.3 var(--wa-font); color: var(--wa-tx); }
.cm-bloq p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #54656f; }
.cm-bloq .ok { margin-top: 6px; border: 0; border-radius: 24px; padding: 12px 22px; background: var(--wa-acento); color: #fff; font: 500 15px/1 var(--wa-font); cursor: pointer; }
.cm-bloq .lista-ej { display: flex; justify-content: center; margin: 4px 0; }
.cm-bloq .lista-ej span { width: 34px; height: 34px; border-radius: 50%; margin-left: -9px; box-shadow: 0 0 0 2px #fff; background: #dfe5e7; overflow: hidden; display: inline-block; }
.cm-bloq .lista-ej img { width: 100%; height: 100%; object-fit: cover; }
.cm-voz .vel { display: none; }
.cm-voz.sonando .vel { display: block; }
.cm-voz.sonando .foto { display: none; }
.pq > button.com-paq { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); color: var(--wa-acento); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
#com input::placeholder, #com textarea::placeholder { color: #8696a0; }

/* Menciones al asistente (@Coach Ale) */
.cm-men { color: #7f66ff; font-weight: 500; }
.cm-sug { position: absolute; left: 6px; right: 62px; bottom: calc(100% + 2px); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 2px 12px rgba(11,20,26,.22); cursor: pointer; animation: pop .15s ease both; z-index: 5; text-align: left; }
.cm-sug:active { background: var(--wa-panel); }
.cm-sug-av { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font: 500 15px/40px var(--wa-font); text-align: center; }
.cm-sug-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-sug b { display: block; font: 500 15.5px/1.3 var(--wa-font); color: var(--wa-tx); }
.cm-sug small { display: block; font-size: 12.8px; color: #667781; }
.cm-tit small.cm-escribe { opacity: 1; font-style: italic; }

/* Fotos de las coaches: la marca de agua cubre la foto o el video del visor. */
.cm-visor .med.pv-med { position: relative; }
