/* Mensajes privados entre jugadores (mensajes.js) */
.dm-btn { margin-left: auto; position: relative; border: 1px solid #c9d2da; background: #fff; border-radius: 99px; padding: 3px 10px; font-size: 15px; cursor: pointer; }
.dm-btn.nuevo { background: #ffd54a; border-color: #e0b300; }
.dm-btn.nuevo::after { content: attr(data-n); position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 99px; background: #d32f2f; color: #fff; font: 800 10px/16px Nunito, sans-serif; text-align: center; }
.dm-panel { position: fixed; z-index: 1500; right: 10px; bottom: 10px; width: min(340px, calc(100vw - 20px)); max-height: min(460px, 80vh);
  display: flex; flex-direction: column; background: #fff; color: #1d2a33; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); overflow: hidden; }
.dm-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #0b8fb3; color: #fff; font-size: 16px; }
.dm-x { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.dm-log { flex: 1; min-height: 120px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #f3f6f8; }
.dm-m { align-self: flex-start; max-width: 80%; background: #fff; border-radius: 14px 14px 14px 4px; padding: 6px 10px; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.dm-m.mio { align-self: flex-end; background: #0b8fb3; color: #fff; border-radius: 14px 14px 4px 14px; }
.dm-m small { display: block; font-size: 10px; opacity: .65; text-align: right; }
.dm-vacio { color: #6b7a85; font-size: 13px; text-align: center; padding: 18px 6px; }
.dm-rapidos { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px; scrollbar-width: none; }
.dm-rapidos button { flex: none; border: 1px solid #c9d2da; background: #fff; border-radius: 99px; padding: 5px 10px; font: 700 12px Nunito, sans-serif; cursor: pointer; }
.dm-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #e3e8eb; }
.dm-form input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #c9d2da; border-radius: 10px; font-size: 15px; }
.dm-form button { border: 0; background: #0b8fb3; color: #fff; border-radius: 10px; padding: 0 14px; font-weight: 800; cursor: pointer; }
/* Aviso de mensaje nuevo (arriba al centro) */
.dm-aviso { position: fixed; z-index: 1600; left: 50%; top: calc(48px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(340px, calc(100vw - 20px));
  background: #fff; color: #1d2a33; border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); display: grid; gap: 4px; animation: dmEntra .25s ease-out; }
.dm-aviso span { font-size: 14px; }
.dm-aviso div { display: flex; gap: 8px; justify-content: flex-end; }
.dm-aviso button { border: 0; border-radius: 10px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.dm-aviso .dm-resp { background: #0b8fb3; color: #fff; }
.dm-aviso .dm-luego { background: #eef1f4; color: #1d2a33; }
@keyframes dmEntra { from { transform: translate(-50%, -12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dm-aviso { animation: none; } }

/* Nombre que abre la tarjeta del jugador; corazón de amigo */
.nm-ficha { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; }
.prow .amigo { font-size: 13px; }
.dm-quien { border: 0; background: none; color: #fff; font: 800 16px Nunito, sans-serif; cursor: pointer; padding: 0; }
/* Tarjeta del jugador */
.pf-back { position: fixed; inset: 0; z-index: 1400; background: rgba(10,20,25,.45); display: flex; align-items: center; justify-content: center; padding: 12px; }
.pf { width: min(380px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; color: #1d2a33; border-radius: 18px; box-shadow: 0 12px 34px rgba(0,0,0,.35); display: grid; gap: 10px; padding: 14px; }
.pf-head { display: flex; align-items: center; gap: 10px; }
.pf-head div { flex: 1; min-width: 0; }
.pf-head b { display: block; font-size: 19px; font-weight: 900; }
.pf-head small { color: #6b7a85; font-weight: 700; }
.pf-x { background: #eef1f4; color: #1d2a33; }
.pf-caritas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pf-car { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border: 2px solid #e3e8eb; border-radius: 12px; background: #f6f8f9; cursor: pointer; }
.pf-car span { font-size: 26px; line-height: 1; }
.pf-car small { font: 700 10.5px Nunito, sans-serif; color: #4b5a63; text-align: center; line-height: 1.15; }
.pf-car.on { border-color: #0b8fb3; background: #e3f3f8; }
.pf-car[data-car="mala"].on, .pf-car[data-car="bloquear"].on { border-color: #c4553d; background: #fbe7e1; }
.pf-am, .pf-sec { background: #f6f8f9; border-radius: 12px; padding: 9px 11px; font-size: 14px; line-height: 1.4; }
.pf-sec small { color: #6b7a85; }
.pf-sec.muted { color: #6b7a85; }
.pf-link { border: 0; background: none; color: #0b8fb3; font: 800 13px Nunito, sans-serif; cursor: pointer; text-decoration: underline; padding: 0 0 0 6px; }
.pf-btn { border: 0; background: #0b8fb3; color: #fff; border-radius: 10px; padding: 5px 11px; font: 800 13px Nunito, sans-serif; cursor: pointer; margin-left: 6px; }
.pf-btn.grande { width: 100%; margin: 0; padding: 11px; font-size: 15px; }
.pf-acc { display: grid; }
#tbSonido[aria-pressed="true"] { background: #ffe0dc; }
