:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e7e9ee;
  --text: #1f2937;
  --muted: #8a919e;
  --hover: #f1f3f6;
  --accent: #2f7fe0;
  --accent-soft: #e8f1fc;
  --online: #3fb950;
  --busy: #e5534b;
  --away: #e3a008;
  --offline: #b8bec8;
  --danger: #d64545;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(20, 30, 50, .10);
  color-scheme: light;
}
/* Tema oscuro: automático (según el sistema) o forzado desde Apariencia */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]):not([data-theme=glass]):not([data-theme=zen]) {
    --bg: #111317; --panel: #181b20; --line: #262a31; --text: #e6e8ec; --muted: #8b929d;
    --hover: #20242a; --offline: #4a5059;
    --shadow: 0 8px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
    --bg: #111317; --panel: #181b20; --line: #262a31; --text: #e6e8ec; --muted: #8b929d;
    --hover: #20242a; --offline: #4a5059;
    --shadow: 0 8px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones e inputs ---------- */
.btn { padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { color: var(--muted); font-size: 12px; }
.link:hover { color: var(--accent); }
input[type=search], .field, .auth-card input, .auth-card select, .modal-card input, .modal-card select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Estados ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--offline); display: inline-block; flex: none; }
.dot.online { background: var(--online); }
.dot.busy, .dot.phone { background: var(--busy); }
.dot.away, .dot.brb, .dot.lunch { background: var(--away); }
.dot.invisible, .dot.offline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--offline); }

/* ---------- Avatar ---------- */
.avatar {
  flex: none; border-radius: 10px; background: var(--accent-soft) center/cover no-repeat;
  display: grid; place-items: center; color: var(--accent); font-weight: 700; position: relative;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--st, var(--offline));
}
.avatar.sm { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
.avatar.md { width: 40px; height: 40px; font-size: 15px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 12px; }
.avatar.xl { width: 96px; height: 96px; font-size: 36px; border-radius: 16px; }
.avatar[data-st=online] { --st: var(--online); }
.avatar[data-st=busy], .avatar[data-st=phone] { --st: var(--busy); }
.avatar[data-st=away], .avatar[data-st=brb], .avatar[data-st=lunch] { --st: var(--away); }

/* ---------- Muñequitos (guiño a MSN) ---------- */
.buddy { position: relative; width: 64px; height: 56px; margin: 0 auto 10px; }
.buddy span { position: absolute; bottom: 0; width: 34px; height: 46px; }
.buddy span::before { content: ""; position: absolute; left: 9px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: currentColor; }
.buddy span::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 26px; border-radius: 17px 17px 6px 6px; background: currentColor; }
.buddy .b1 { left: 2px; color: var(--online); z-index: 1; }
.buddy .b2 { right: 2px; color: var(--accent); transform: scale(.88); transform-origin: bottom; }

/* ---------- Auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); display: grid; gap: 12px; text-align: left; }
.auth-card h1 { margin: 0; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.auth-card > p { margin: 0; text-align: center; }
.auth-card label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.auth-card label.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.auth-card label.check input { width: auto; }
.auth-card a { color: var(--accent); text-decoration: none; }
.error { color: var(--danger); font-size: 13px; min-height: 0; margin: 0; }
.error:empty { display: none; }

/* ---------- Layout ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: 320px 1fr; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* Perfil */
.me { display: flex; gap: 14px; padding: 20px 18px 14px; align-items: flex-start; }
.me-info { min-width: 0; flex: 1; display: grid; gap: 2px; }
.me-name { text-align: left; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-name:hover { color: var(--accent); }
.status-pick { position: relative; }
.status-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; padding: 2px 0; }
.status-btn svg { width: 10px; height: 10px; }
.status-btn:hover { color: var(--text); }
.psm-input { border: 1px solid transparent; border-radius: 7px; padding: 4px 6px; margin-left: -6px; background: transparent; font-size: 13px; width: calc(100% + 6px); outline: none; color: var(--muted); }
.psm-input:hover { border-color: var(--line); }
.psm-input:focus { color: var(--text); background: var(--panel); }
.music { font-size: 12px; color: var(--muted); }
.music::before { content: "♪ "; color: var(--accent); }

/* Menús */
.menu { position: absolute; z-index: 30; top: 100%; left: 0; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); padding: 5px; }
.menu.right { left: auto; right: 0; }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.menu button:hover { background: var(--hover); }
.menu .danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.search-row { display: flex; gap: 6px; padding: 0 14px 10px; }
.search-row input { padding: 8px 11px; background: var(--bg); border-color: transparent; }

/* Lista de contactos */
.list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.group-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.group-h svg { width: 10px; height: 10px; transition: transform .15s; }
.group-h.closed svg { transform: rotate(-90deg); }
.contact { display: flex; align-items: center; gap: 11px; width: 100%; padding: 7px 8px; border-radius: 10px; text-align: left; position: relative; }
.contact:hover { background: var(--hover); }
.contact.active { background: var(--accent-soft); }
.contact .who { min-width: 0; flex: 1; }
.contact .nm { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact .ps { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact.off { opacity: .6; }
.badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.request { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 2px 0 6px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.request .who { flex: 1; min-width: 0; }
.request button { font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; }
.request .ok { background: var(--accent); color: #fff; }
.request .no { color: var(--muted); }
.list-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.side-foot { display: flex; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); }

/* Pestañas */
.tabs { display: flex; gap: 4px; padding: 10px 12px 0; overflow-x: auto; flex: none; scrollbar-width: none; }
.tabs:empty { display: none; }
.tab { display: flex; align-items: center; gap: 7px; padding: 7px 8px 7px 11px; border-radius: 9px 9px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; max-width: 180px; }
.tab span.t { overflow: hidden; text-overflow: ellipsis; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); clip-path: inset(-2px -2px 0 -2px); }
.tab.flash { color: var(--accent); font-weight: 600; animation: blink 1s steps(2) infinite; }
.tab .x { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; opacity: .5; }
.tab .x:hover { background: var(--hover); opacity: 1; }
.tab .x svg { width: 11px; height: 11px; }
@keyframes blink { 50% { opacity: .45; } }

/* Conversación */
.empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 24px; }
.empty p { max-width: 260px; margin: 6px auto 0; }
.conv { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--panel); margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); }
.conv.solo { border-radius: var(--radius); margin-top: 12px; }
.conv-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.conv-who { min-width: 0; flex: 1; }
.conv-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.conv-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-actions { position: relative; }
.back { display: none; }

.messages { flex: 1; overflow-y: auto; padding: 18px 20px 8px; }
.day { text-align: center; font-size: 11px; color: var(--muted); margin: 14px 0 8px; letter-spacing: .03em; }
.mgroup { margin: 12px 0 4px; }
.mhead { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.mhead b { font-weight: 600; color: var(--text); }
.mhead.mine b { color: var(--muted); }
.msg { padding: 1px 0 1px 12px; word-wrap: break-word; white-space: pre-wrap; position: relative; }
.msg .tm { position: absolute; right: 0; top: 2px; font-size: 11px; color: var(--muted); opacity: 0; }
.msg:hover .tm { opacity: 1; }
.msg .emo { font-size: 1.25em; line-height: 1; vertical-align: -2px; }
.msg.big { font-size: 34px; line-height: 1.15; }
.msg a { color: var(--accent); }
.sys { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0; }
.sys.nudge { color: var(--busy); font-weight: 600; }
.file { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 3px 0; text-decoration: none; color: var(--text); max-width: 100%; }
.file:hover { border-color: var(--accent); }
.file .fi { width: 32px; height: 32px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.file .fn { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-msg { display: block; max-width: min(320px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0; }
.typing { height: 22px; padding: 0 20px; font-size: 12px; color: var(--muted); font-style: italic; }

.composer { border-top: 1px solid var(--line); padding: 8px 12px 12px; }
.tools { display: flex; align-items: center; gap: 2px; position: relative; margin-bottom: 6px; }
.tool { width: 32px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); font-size: 17px; }
.tool:hover, .tool.on { background: var(--hover); color: var(--text); }
.tool.on { color: var(--accent); }
.tool b, .tool i { font-size: 14px; }
.tool.color { cursor: pointer; }
.tool.color input { position: absolute; opacity: 0; width: 0; height: 0; }
.tool.color span { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.input-row { display: flex; gap: 8px; align-items: flex-end; }
.input-row textarea { flex: 1; resize: none; max-height: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); outline: none; }
.emo-panel { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; z-index: 20; }
.emo-panel button { width: 34px; height: 34px; border-radius: 7px; font-size: 20px; }
.emo-panel button:hover { background: var(--hover); }

/* Zumbido */
.shake { animation: shake .55s linear 2; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-7px, 3px); } 20% { transform: translate(6px, -4px); } 30% { transform: translate(-6px, -2px); }
  40% { transform: translate(7px, 4px); } 50% { transform: translate(-4px, 4px); } 60% { transform: translate(5px, -3px); }
  70% { transform: translate(-6px, 2px); } 80% { transform: translate(4px, -4px); } 90% { transform: translate(-3px, 3px); }
}

/* Modales */
.modal { position: fixed; inset: 0; background: rgba(15, 20, 30, .35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 24px; width: 100%; max-width: 380px; display: grid; gap: 14px; max-height: 90dvh; overflow-y: auto; }
.modal-card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-card label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.modal-card .row { display: flex; gap: 8px; justify-content: flex-end; }
.modal-card .center { display: flex; align-items: center; gap: 14px; }
.check-row { display: flex !important; align-items: center; justify-content: space-between; font-size: 13px !important; color: var(--text) !important; }
.check-row input { width: auto; }

/* Avisos (toast) */
.toasts { position: fixed; right: 16px; bottom: 132px; display: grid; gap: 8px; z-index: 60; }
.toast { display: flex; gap: 11px; align-items: center; width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 13px; animation: up .25s ease-out; cursor: pointer; }
.toast .tx { min-width: 0; }
.toast .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .tx span { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .main { display: none; }
  .app.in-conv .side { display: none; }
  .app.in-conv .main { display: flex; }
  .tabs { display: none; }
  .conv, .conv.solo { margin: 0; border: 0; border-radius: 0; }
  .back { display: grid; margin-left: -8px; }
  .messages { padding: 14px 14px 6px; }
  .toasts { left: 12px; right: 12px; top: 12px; bottom: auto; }
  .toast { width: auto; }
}

/* Foto del contacto ampliada */
.avatar.zoomable { cursor: zoom-in; border: 0; padding: 0; }
.avatar.zoomable:hover { filter: brightness(.95); }
.avatar.xxl { width: 220px; height: 220px; font-size: 80px; border-radius: 22px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--st, var(--offline)); }
.photo-view { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 6px; }
.photo-view .avatar { margin-bottom: 10px; }
.pv-name { display: flex; align-items: center; gap: 7px; font-size: 17px; }
.pv-psm { font-size: 13px; color: var(--muted); max-width: 300px; overflow-wrap: anywhere; }

/* Mensajes de voz */
.voice { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border: 1px solid var(--line); border-radius: 22px; margin: 3px 0; max-width: 100%; white-space: normal; }
.vplay { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.vplay svg { width: 15px; height: 15px; fill: currentColor; }
.vplay .ic-pause, .voice.playing .ic-play { display: none; }
.voice.playing .ic-pause { display: block; stroke-width: 2.4; }
.vwave { display: flex; align-items: center; gap: 2px; height: 26px; width: 150px; cursor: pointer; }
.vwave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--offline); }
.vwave i.on { background: var(--accent); }
.vtime { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.rec-bar #recTime { font-variant-numeric: tabular-nums; flex: 1; color: var(--muted); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--busy); animation: blink 1s infinite; }
.rec-label { font-weight: 600; }

/* Fotos predeterminadas */
.presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.preset { aspect-ratio: 1; border-radius: 10px; background: center/cover no-repeat; box-shadow: 0 0 0 1px var(--line); transition: transform .12s; }
.preset:hover { transform: scale(1.06); }
.preset.sel { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
@media (max-width: 420px) { .presets { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Conversaciones de grupo ---------- */
.avatar[data-st=group] { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ff7ab6)); color: #fff; box-shadow: none; }
.avatar[data-st=group] .gicon { width: 62%; height: 62%; stroke: #fff; stroke-width: 1.8; }
.tab-g { display: grid; place-items: center; width: 14px; height: 14px; color: var(--accent); }
.tab-g .gicon { width: 14px; height: 14px; stroke-width: 2; }
.pick-list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; margin: 0 -6px; }
.pick { display: flex !important; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 14px !important; color: var(--text) !important; }
.pick:hover { background: var(--hover); }
.pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.pick .pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Guiños ---------- */
.conv { position: relative; }
.wink-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; border-radius: inherit; transition: opacity .4s; }
.wink-layer.fixed { position: fixed; }
.wink-layer.out { opacity: 0; }
.wink-layer.night { background: radial-gradient(ellipse at 50% 30%, rgba(28, 18, 78, .88), rgba(4, 4, 18, .95)); animation: wfade 3.2s both; }
.wink-layer.gloom { background: rgba(70, 90, 120, .28); animation: wfade 3.2s both; }
.wink-layer.disco { animation: disco 3.2s both; }
@keyframes wfade { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes disco {
  0% { background: transparent; } 10% { background: rgba(255, 0, 110, .18); } 25% { background: rgba(58, 134, 255, .18); }
  40% { background: rgba(255, 190, 11, .18); } 55% { background: rgba(131, 56, 236, .18); } 70% { background: rgba(6, 214, 160, .18); } 100% { background: transparent; }
}
.wk { position: absolute; line-height: 1; user-select: none; will-change: transform, opacity; }
.wk.center { transform: translate(-50%, -50%); }
.wk.conf { border-radius: 2px; }
.wk.spark { width: 9px; height: 9px; border-radius: 50%; }
.wk.wtext { font-weight: 800; letter-spacing: .02em; white-space: nowrap; text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 18px rgba(0, 0, 0, .25); }
.wink-panel { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; grid-template-columns: repeat(6, 76px); gap: 4px; z-index: 20; }
.wink-panel button { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 9px; font-size: 11px; color: var(--muted); line-height: 1.15; }
.wink-panel button span { font-size: 28px; }
.wink-panel button:hover { background: var(--hover); color: var(--text); }
.wink-line .wi { font-size: 16px; vertical-align: -2px; }
.wink-line .link { font-size: 12px; color: var(--accent); }
@media (max-width: 760px) { .wink-panel { grid-template-columns: repeat(4, 1fr); left: -4px; right: -4px; } }

/* ---------- Fondos de conversación ---------- */
.messages { background-color: transparent; background-attachment: local; }
.bg-cielo .messages { background-image: linear-gradient(180deg, color-mix(in srgb, #4fa3ff 16%, transparent), color-mix(in srgb, #4fa3ff 3%, transparent)); }
.bg-atardecer .messages { background-image: linear-gradient(160deg, color-mix(in srgb, #ff7a59 16%, transparent), color-mix(in srgb, #ffc371 12%, transparent) 60%, transparent); }
.bg-menta .messages { background-image: linear-gradient(180deg, color-mix(in srgb, #2ec4b6 16%, transparent), color-mix(in srgb, #cbf3f0 10%, transparent)); }
.bg-lavanda .messages { background-image: linear-gradient(200deg, color-mix(in srgb, #9b5de5 16%, transparent), color-mix(in srgb, #f15bb5 8%, transparent)); }
.bg-puntos .messages { background-image: radial-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1.4px, transparent 1.6px); background-size: 18px 18px; }
.bg-cuadricula .messages { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; }
.bg-corazones .messages { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M14 20c-3-4-9-2-8 3 1 4 8 8 8 8s7-4 8-8c1-5-5-7-8-3z' fill='%23ff5d8f' fill-opacity='.16'/%3E%3Cpath d='M42 46c-2-3-7-1-6 2 1 3 6 6 6 6s5-3 6-6c1-3-4-5-6-2z' fill='%23ff5d8f' fill-opacity='.12'/%3E%3C/svg%3E"); }
.bg-estrellas .messages { background-image: radial-gradient(1.5px 1.5px at 20px 30px, color-mix(in srgb, var(--text) 35%, transparent), transparent), radial-gradient(1px 1px at 90px 70px, color-mix(in srgb, var(--text) 30%, transparent), transparent), radial-gradient(2px 2px at 150px 20px, color-mix(in srgb, var(--accent) 50%, transparent), transparent), radial-gradient(1px 1px at 60px 140px, color-mix(in srgb, var(--text) 30%, transparent), transparent), linear-gradient(180deg, color-mix(in srgb, #3a0ca3 12%, transparent), transparent); background-size: 180px 180px, 180px 180px, 180px 180px, 180px 180px, 100% 100%; }
.bg-custom .messages { background-image: linear-gradient(var(--bg-veil), var(--bg-veil)), var(--bg-img); background-size: cover; background-position: center; }
:root { --bg-veil: rgba(255, 255, 255, .62); }
:root[data-dark] { --bg-veil: rgba(10, 12, 16, .58); }

/* ---------- Apariencia ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--hover); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { padding: 7px 4px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.swatch.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text); }
.bgs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bgopt { aspect-ratio: 1.2; border-radius: 10px; border: 1px solid var(--line); background-color: var(--panel); position: relative; overflow: hidden; font-size: 10px; color: var(--muted); display: grid; align-items: end; padding: 4px; text-align: center; }
.bgopt .messages { position: absolute; inset: 0; padding: 0; overflow: hidden; }
.bgopt span { position: relative; }
.bgopt.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.section-t { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }

.foot-l { display: flex; gap: 14px; }

/* ---------- Visto y mensajes temporales ---------- */
.receipt { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--muted); margin: 2px 0 0; padding-right: 2px; }
.receipt .ticks { width: 16px; height: 11px; stroke: var(--accent); stroke-width: 1.8; }
.eph-badge { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.msg .tm .eph { font-size: 10px; }

/* ---------- Lista: vista por grupos ---------- */
.view-sw { display: flex; align-items: center; gap: 4px; padding: 2px 8px 4px; font-size: 12px; color: var(--muted); }
.view-sw button { padding: 2px 8px; border-radius: 7px; font-size: 12px; color: var(--muted); }
.view-sw button.on { background: var(--hover); color: var(--text); font-weight: 600; }
.group-h { justify-content: space-between; padding-right: 4px; border-radius: 8px; }
.group-h .gh-t { display: flex; align-items: center; gap: 6px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; flex: 1; text-align: left; min-width: 0; }
.group-h .gh-t svg { width: 10px; height: 10px; transition: transform .15s; flex: none; }
.group-h.closed .gh-t svg { transform: rotate(-90deg); }
.group-h .gh-more { opacity: 0; font-size: 16px; line-height: 1; padding: 0 6px; color: var(--muted); border-radius: 6px; }
.group-h:hover .gh-more, .group-h .gh-more:focus { opacity: 1; }
@media (hover: none) { .group-h .gh-more { opacity: 1; } }
.group-h.drop { background: var(--accent-soft); color: var(--accent); }
.new-cat { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 8px; margin-top: 6px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.new-cat:hover { background: var(--hover); color: var(--accent); }
.new-cat svg { width: 16px; height: 16px; }

/* ---------- Tinta ---------- */
.modal-card.wide { max-width: 640px; }
.ink-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ink-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.ink-colors, .ink-sizes, .ink-acts { display: flex; gap: 6px; align-items: center; }
.swatch.sm { width: 22px; height: 22px; }
.ink-sizes button, .ink-acts button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.ink-sizes button i { display: block; border-radius: 50%; background: currentColor; }
.ink-sizes button.on, .ink-acts button:hover, .ink-sizes button:hover { background: var(--hover); color: var(--text); }
#inkCanvas { width: 100%; height: 320px; border-radius: 12px; border: 1px solid var(--line); background: #fff; touch-action: none; cursor: crosshair; display: block; }
@media (max-width: 600px) { #inkCanvas { height: 52dvh; } }
.img-msg.ink-msg { background: #fff; max-width: min(300px, 100%); padding: 2px; }

/* ---------- Exportar, cuenta, admin ---------- */
.export-opts { display: grid; gap: 8px; }
.exp { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.exp:hover { border-color: var(--accent); background: var(--accent-soft); }
.exp span { font-size: 12px; color: var(--muted); }
.acc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-btns .btn { font-size: 13px; padding: 7px 12px; }
.danger-btn { color: var(--danger); }
.btn.primary.danger-bg { background: var(--danger); border-color: var(--danger); }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-tabs { grid-template-columns: repeat(3, auto); }
.adm-tabs button { padding: 6px 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.stats b { font-size: 20px; font-weight: 700; }
.stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.adm-new { display: flex; gap: 8px; }
.adm-new input { flex: 1; min-width: 0; }
.adm-list { display: grid; gap: 2px; max-height: 52dvh; overflow-y: auto; margin: 0 -6px; }
.adm-user { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.adm-user:hover { background: var(--hover); }
.au-info { flex: 1; min-width: 0; }
.au-info .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; vertical-align: 1px; }
.on-txt { color: var(--online); }
.pw-box { display: flex; gap: 8px; align-items: center; }
.pw-box code { flex: 1; font-size: 18px; letter-spacing: .06em; background: var(--hover); padding: 10px 12px; border-radius: 9px; user-select: all; }
.side-foot { gap: 8px; }
.foot-l { gap: 12px; }

/* ---------- App instalable ---------- */
.pwa-card { display: flex; align-items: center; gap: 10px; margin: 0 14px 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.pwa-card .pc-ic { width: 36px; height: 36px; flex: none; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.pwa-card .pc-ic img { width: 100%; height: 100%; }
.pwa-card .pc-ic.bell { background: var(--accent); color: #fff; }
.pwa-card .pc-t { flex: 1; min-width: 0; display: grid; font-size: 13px; line-height: 1.3; }
.pwa-card .pc-t span { font-size: 12px; color: var(--muted); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.pc-x { width: 24px; height: 24px; border-radius: 6px; color: var(--muted); font-size: 18px; line-height: 1; flex: none; }
.pc-x:hover { background: var(--hover); }
.ios-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.45; }
svg.inl { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; text-align: center; font-size: 12px; font-weight: 600; padding: 6px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--away); color: #1f2937; }

/* Pantallas con muesca y app instalada: respetar las zonas seguras */
.side { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); }
.side-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .conv-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .composer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) { body { overscroll-behavior: none; } }

.splash { position: fixed; inset: 0; z-index: 65; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); color: var(--muted); font-size: 14px; }
.splash img { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .75; } }

.push-st { font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.push-st.ok b { color: var(--online); }
.push-st.ko { background: color-mix(in srgb, var(--away) 12%, transparent); }

/* ---------- Pie de la lista con iconos ---------- */
.foot-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; padding: 5px 6px; margin: -5px -6px; border-radius: 8px; }
.foot-btn svg { width: 16px; height: 16px; stroke-width: 1.6; flex: none; }
.foot-btn:hover { color: var(--accent); background: var(--hover); }
#logoutBtn:hover { color: var(--danger); }
.side-foot { align-items: center; }
.foot-l { display: flex; gap: 14px; }
@media (max-width: 400px) { .foot-l .foot-btn span { display: none; } .foot-l { gap: 18px; } }

/* ---------- Vista previa de enlaces ---------- */
.lp, .poll, .loc { white-space: normal; color: var(--text); font-weight: 400; font-style: normal; }
.lp:empty { display: none; }
.lp { margin: 6px 0 2px; max-width: 420px; }
.lp.web a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; background: var(--panel); }
.lp.web a:hover { border-color: var(--accent); }
.lp-img { width: 100%; max-height: 210px; object-fit: cover; display: block; background: var(--hover); }
.lp-txt { display: grid; gap: 3px; padding: 10px 12px 11px; min-width: 0; }
.lp-txt b { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-site { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lp-site img { width: 14px; height: 14px; border-radius: 3px; }
.lp-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp.yt { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.yt-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; background: #000 center/cover no-repeat; }
.yt-play { width: 58px; height: 40px; border-radius: 12px; background: rgba(230, 33, 23, .92); display: grid; place-items: center; transition: transform .15s; }
.yt-thumb:hover .yt-play { transform: scale(1.08); }
.yt-play svg { width: 22px; height: 22px; fill: #fff; stroke: none; }
.yt-box { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.yt-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- Encuestas ---------- */
.poll { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 4px 0; max-width: 380px; background: var(--panel); display: grid; gap: 6px; }
.poll-h { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.poll-h svg { width: 14px; height: 14px; stroke-width: 2; color: var(--accent); }
.poll-q { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.poll-o { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; text-align: left; overflow: hidden; font-size: 14px; }
.poll-o:not(:disabled):hover { border-color: var(--accent); }
.poll-o:disabled { cursor: default; }
.po-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); transition: width .3s; z-index: 0; }
.poll-o > span:not(.po-bar) { position: relative; z-index: 1; }
.po-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 11px; flex: none; }
.poll-o.mine { border-color: var(--accent); }
.poll-o.mine .po-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.po-t { flex: 1; min-width: 0; }
.po-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.poll-f { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pq-opts { display: grid; gap: 6px; }
.pq-row { display: flex; gap: 6px; align-items: center; }
.pq-row input { flex: 1; }

/* ---------- Ubicación ---------- */
.loc { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 340px; margin: 4px 0; background: var(--panel); }
.loc-map { position: relative; height: 150px; background: var(--hover); }
.loc-map.big { height: 240px; border-radius: 12px; overflow: hidden; }
.loc-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.loc .loc-map iframe { pointer-events: none; }
.loc-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; text-decoration: none; color: inherit; font-size: 13px; }
.loc-f span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.loc-f svg { width: 16px; height: 16px; color: var(--danger); }
.loc-f b { color: var(--accent); font-weight: 600; }
.loc-f:hover b { text-decoration: underline; }

/* ---------- Respuesta automática ---------- */
.auto-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--hover); padding: 1px 6px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.ar-text { resize: vertical; }
.ar-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex !important; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px !important; color: var(--text) !important; cursor: pointer; }
.chip input { width: auto; accent-color: var(--accent); }

/* ---------- Menú «Más» ---------- */
.menu.up { top: auto; bottom: 100%; margin-bottom: 8px; }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
#moreTools { left: 120px; }

/* ---------- Calendario compartido ---------- */
.modal-card.xwide { max-width: 920px; }
.cal { display: grid; gap: 14px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-title { display: grid; }
.cal-title h2 { margin: 0; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 0 4px; }
.cal-day { min-height: 72px; border-radius: 9px; border: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; overflow: hidden; position: relative; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.other { opacity: .45; }
.cal-day.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cd-n { font-size: 12px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cd-n { background: var(--accent); color: #fff; }
.cd-ev { font-size: 10.5px; line-height: 1.25; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 2.5px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-ev i { font-style: normal; color: var(--muted); }
.cd-more { font-size: 10px; color: var(--muted); padding-left: 4px; }
.cd-dots { display: none; gap: 2px; justify-content: center; margin-top: auto; }
.cd-dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-side { display: grid; gap: 10px; align-content: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 200px; }
.cal-side label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cal-side input, .cal-side textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); outline: none; }
.cs-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cs-list { display: grid; gap: 6px; }
.cs-ev { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border-radius: 9px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); }
.cs-ev:hover { background: color-mix(in srgb, var(--c) 16%, transparent); }
.cs-t { font-weight: 600; font-size: 14px; }
.cs-m { font-size: 12px; color: var(--muted); }
.cs-n { font-size: 12px; color: var(--muted); white-space: pre-wrap; }
.cs-empty { padding: 8px 2px; }
.ev-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-cols { gap: 8px; }
.ev-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .cal-body { grid-template-columns: 1fr; }
  .cal-day { min-height: 46px; }
  .cd-ev, .cd-more { display: none; }
  .cd-dots { display: flex; }
}

/* Pie como barra: icono encima y texto debajo, caben los cuatro */
.side-foot { display: flex; justify-content: space-around; align-items: stretch; padding: 8px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); gap: 2px; }
.side-foot .foot-l { display: contents; }
.foot-btn { flex: 1; flex-direction: column; gap: 3px; margin: 0; padding: 6px 2px; font-size: 11px; white-space: nowrap; border-radius: 10px; }
.foot-btn svg { width: 19px; height: 19px; }
@media (max-width: 400px) { .foot-l .foot-btn span { display: inline; } }

/* ---------- Imagen y descripción del grupo ---------- */
.avatar[data-st=group].has-img { background-color: var(--accent-soft); }
.ge-count { float: right; font-size: 11px; color: var(--muted); }
.photo-view .link { font-size: 13px; color: var(--accent); }

/* ---------- Visor de imágenes ---------- */
.img-msg { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(8, 10, 14, .97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; flex-direction: column; opacity: 0; transition: opacity .18s; color: #fff; }
.viewer.in { opacity: 1; }
.vw-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); flex: none; }
.vw-who { display: grid; min-width: 0; }
.vw-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-who span { font-size: 12px; opacity: .65; }
.vw-acts { display: flex; gap: 6px; }
.vw-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 600; }
.vw-btn:hover { background: rgba(255, 255, 255, .2); }
.vw-btn svg { width: 19px; height: 19px; stroke-width: 1.8; }
.vw-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 56px 40px; overflow: hidden; }
.vw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; animation: vwIn .2s ease-out; }
.vw-stage img.ink { background: #fff; padding: 8px; }
.vw-stage.zoom { overflow: auto; place-items: start; padding: 0; }
.vw-stage.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
@keyframes vwIn { from { transform: scale(.96); opacity: .4; } }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); }
.vw-nav:hover { background: rgba(255, 255, 255, .22); }
.vw-nav svg { width: 22px; height: 22px; stroke-width: 2; }
.vw-nav.prev { left: 10px; } .vw-nav.next { right: 10px; }
.vw-nav[hidden] { display: none; }
.vw-count { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 12px; opacity: .7; }
@media (max-width: 760px) { .vw-stage { padding: 4px 4px 36px; } .vw-nav { display: none; } .vw-btn span { display: none; } }

/* ---------- Marca ---------- */
.brand { letter-spacing: -.02em; }
.brand span { color: var(--accent); }

/* ---------- Acceso: repetir contraseña e invitación ---------- */
.pw-hint { font-size: 12px; min-height: 0; }
.pw-hint.ok { color: var(--online); }
.pw-hint.ko { color: var(--danger); }
.invite-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; line-height: 1.35; text-align: left; }
.invite-banner.bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.add-invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.add-invite .btn, .inv-share .btn, .inv-opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 7px 12px; }
.add-invite svg, .inv-share svg { width: 16px; height: 16px; }
.inv-link { display: flex; gap: 8px; }
.inv-link input { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.inv-share { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Fondo de la cabecera del perfil ---------- */
.me-wrap { position: relative; z-index: 2; }
.me-wrap > *:not(.me-cover-clip) { position: relative; z-index: 1; }
.me-cover-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); }
.me-cover { position: absolute; inset: 0; background: center/cover no-repeat; opacity: 0; transition: opacity .3s; }
.me-wrap.has-cover .me-cover { opacity: 1; }
.me-cover.blur { filter: blur(14px) saturate(1.15); transform: scale(1.12); }
.me-wrap.has-cover { padding-bottom: 8px; }
.me-wrap.has-cover .search-row input { border: 0; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.me-wrap.tone-dark { color: #fff; --muted: rgba(255, 255, 255, .78); --hover: rgba(255, 255, 255, .14); }
.me-wrap.tone-dark .me-name, .me-wrap.tone-dark .status-btn, .me-wrap.tone-dark .psm-input, .me-wrap.tone-dark .icon-btn { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.me-wrap.tone-dark .status-btn, .me-wrap.tone-dark .psm-input { color: rgba(255, 255, 255, .85); }
.me-wrap.tone-dark .psm-input::placeholder { color: rgba(255, 255, 255, .78); }
.me-wrap.tone-dark .search-row input { background: rgba(255, 255, 255, .16); color: #fff; }
.me-wrap.tone-dark .search-row input::placeholder { color: rgba(255, 255, 255, .78); }
.me-wrap.tone-dark .avatar { box-shadow: 0 0 0 2px rgba(0, 0, 0, .15), 0 0 0 3.5px var(--st, var(--offline)); }
.me-wrap.tone-light { color: #1f2937; --muted: rgba(31, 41, 55, .72); --hover: rgba(255, 255, 255, .45); }
.me-wrap.tone-light .me-name, .me-wrap.tone-light .icon-btn { color: #1f2937; }
.me-wrap.tone-light .status-btn, .me-wrap.tone-light .psm-input { color: rgba(31, 41, 55, .78); }
.me-wrap.tone-light .search-row input { background: rgba(255, 255, 255, .55); color: #1f2937; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.me-wrap.tone-light .search-row input::placeholder { color: rgba(31, 41, 55, .6); }
.me-wrap.tone-light .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 3.5px var(--st, var(--offline)); }
.me-wrap.has-cover .pwa-card { background: rgba(255, 255, 255, .5); color: #1f2937; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.me-wrap.has-cover .pwa-card .pc-t span { color: rgba(31, 41, 55, .7); }
.me-wrap .menu { color: var(--text); }
.covers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cov { aspect-ratio: 1.6; border-radius: 10px; background: center/cover no-repeat var(--hover); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.cov.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.cov.own:not([style*="background-image"]) span { text-align: center; }
.cov.own[style*="background-image"] span { background: rgba(0, 0, 0, .45); color: #fff; padding: 1px 6px; border-radius: 6px; }
.only-you { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 8px; margin-left: 6px; }
.me-wrap > .me { z-index: 3; }
.inv-share a.btn { color: var(--text); }
.inv-share a.btn:hover { border-color: var(--accent); }
#invReset { color: var(--accent); font-size: 12px; }

/* =====================================================================
   ADAPTACIÓN AUTOMÁTICA A MÓVILES Y TABLETS
   ===================================================================== */

/* Avisos: nunca más anchos que la pantalla */
.toast { min-width: 0; max-width: 100%; }
.toasts { max-width: calc(100vw - 24px); }
.btn.sm { white-space: nowrap; }
button, a, label, input, select, textarea { touch-action: manipulation; }

/* --- Pantallas táctiles (móviles y tablets) --- */
@media (pointer: coarse) {
  /* 16px en los campos: evita que el iPhone amplíe la página al tocarlos */
  input:not([type=checkbox]):not([type=radio]):not([type=color]), textarea, select,
  .input-row textarea, .psm-input, .search-row input { font-size: 16px !important; }
  /* Botones con tamaño cómodo para el dedo */
  .tool { width: 40px; height: 40px; font-size: 19px; }
  .tool svg { width: 20px; height: 20px; }
  .icon-btn { width: 40px; height: 40px; }
  .me-name { padding: 4px 0; }
  .status-btn { padding: 6px 0; font-size: 13px; }
  .view-sw button { padding: 7px 12px; font-size: 13px; }
  .group-h { min-height: 38px; }
  .group-h .gh-more { padding: 6px 10px; opacity: 1; }
  .contact { padding: 9px 8px; min-height: 52px; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
  .menu button { padding: 12px 12px; font-size: 15px; }
  .poll-f .link, #pqAdd, .link { padding: 8px 0; display: inline-block; }
  .pc-x { width: 36px; height: 36px; }
  .pq-row .pc-x { width: 40px; height: 40px; }
  .poll-o { padding: 12px 10px; }
  .check-row { min-height: 40px; }
  .check-row input { width: 22px; height: 22px; }
  .swatch.sm { width: 30px; height: 30px; }
  .tab .x { width: 26px; height: 26px; }
  /* Sin ratón no hay «pasar por encima»: la hora de cada mensaje se ve siempre */
  .msg .tm { opacity: .55; position: static; float: right; margin-left: 8px; font-size: 10px; }
  .emo-panel { grid-template-columns: repeat(8, 38px); }
  .emo-panel button { width: 38px; height: 38px; font-size: 22px; }
}

/* --- Móviles (hasta 760px): app a pantalla completa que sigue al teclado --- */
@media (max-width: 760px) {
  .app { height: var(--vvh, 100dvh); }
  /* En iPhone, al abrir el teclado la app se recoloca en la parte visible */
  html.kb-open .app { position: fixed; left: 0; right: 0; top: var(--vvt, 0); }
  .conv-head { padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
  .conv-name b { font-size: 16px; }
  .messages { padding: 12px 12px 6px; }
  .composer { padding: 6px 8px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .tools { gap: 0; justify-content: space-between; margin-bottom: 4px; }
  .sep { margin: 0 2px; }
  .input-row textarea { padding: 9px 12px; border-radius: 20px; }
  .input-row .btn.primary { border-radius: 20px; padding: 9px 16px; }
  .img-msg { max-width: min(260px, 100%); }
  .lp, .poll, .loc { max-width: 100%; }
  .me { padding: 14px 14px 10px; }
  .search-row { padding: 0 12px 8px; }
  .list { padding: 4px 6px 12px; }
}
/* Muy estrechos (320px): la barra de herramientas cabe sin saltar de línea */
@media (max-width: 360px) {
  .tool { width: 34px; }
  .tools .sep { display: none; }
  .input-row .btn.primary { padding: 9px 12px; }
  .me .avatar.lg { width: 48px; height: 48px; }
}

/* --- Ventanas como hoja que sube desde abajo en móviles --- */
@media (max-width: 600px) {
  .modal { align-items: end; padding: 0; top: var(--vvt, 0); bottom: auto; height: var(--vvh, 100dvh); }
  .modal-card, .modal-card.wide, .modal-card.xwide {
    max-width: 100%; width: 100%; border-radius: 18px 18px 0 0; max-height: 92%; padding: 22px 18px;
    padding-bottom: max(18px, env(safe-area-inset-bottom)); animation: sheetUp .22s cubic-bezier(.2, .8, .3, 1);
  }
  .modal-card::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: -10px auto 4px; }
  .modal-card .row { position: sticky; bottom: calc(-1 * max(18px, env(safe-area-inset-bottom))); background: var(--panel); padding: 10px 0 2px; margin-bottom: -2px; z-index: 2; }
  .modal-card .row .btn { flex: 1; justify-content: center; padding: 12px; }
  .cal-head { gap: 8px; }
  .presets { grid-template-columns: repeat(4, 1fr); }
  .covers { grid-template-columns: repeat(4, 1fr); }
  .bgs { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .adm-new { flex-direction: column; }
  .inv-share .btn { flex: 1; justify-content: center; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } }

/* --- Tablets (761px – 1100px): lista algo más estrecha para dejar sitio al chat --- */
@media (min-width: 761px) and (max-width: 1100px) {
  .app { grid-template-columns: 290px 1fr; }
  .conv { margin: 0 8px 8px; }
  .conv.solo { margin-top: 8px; }
  .foot-btn { font-size: 10.5px; }
}

/* --- Móvil en horizontal (poca altura): cabeceras compactas --- */
@media (max-height: 500px) and (pointer: coarse) {
  .me { padding: 8px 12px 6px; gap: 10px; }
  .me .avatar.lg { width: 42px; height: 42px; font-size: 18px; }
  .psm-input { display: none; }
  .music { display: none; }
  .search-row { padding-bottom: 6px; }
  .side-foot { padding: 4px 8px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .foot-btn { flex-direction: row; gap: 6px; padding: 6px 4px; }
  .conv-head { padding: 6px 12px; }
  .conv-head .avatar.md { width: 32px; height: 32px; }
  #cPsm { display: none; }
  .tools { margin-bottom: 2px; }
  .tool, .icon-btn { height: 34px; }
  .pwa-card { display: none !important; }
  .modal-card { max-height: 96%; }
}
@media (pointer: coarse) { .group-h .gh-t { align-self: stretch; min-height: 38px; } }
@media (pointer: coarse) { .chip { padding: 8px 14px; } }
@media (max-height: 500px) and (pointer: coarse) { .foot-btn span { display: none; } .foot-btn { justify-content: center; } }
.toast { transition: transform .15s, opacity .15s; touch-action: none; }
@media (max-width: 760px) { .toasts { top: max(10px, env(safe-area-inset-top)); } }

/* Menús flotantes (acciones de contacto, grupos y usuarios del panel de administración):
   siempre por encima de las ventanas y de los avisos */
.menu.float-menu { z-index: 85; }

/* ---------- Notas compartidas ---------- */
#notesBtn, .news-btn { position: relative; }
.notes-dot, .news-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--busy); box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
.news-dot { background: var(--accent); }
.notes-panel { position: absolute; right: 0; bottom: 0; top: 64px; width: 320px; z-index: 6; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); border-radius: 0 0 var(--radius) 0; box-shadow: -10px 0 30px rgba(20, 30, 50, .06);
  animation: npIn .18s ease-out; }
@keyframes npIn { from { transform: translateX(16px); opacity: 0; } }
.np-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 16px; border-bottom: 1px solid var(--line); }
.np-title { flex: 1; min-width: 0; display: grid; }
.np-title b { font-size: 15px; }
.np-body { flex: 1; overflow-y: auto; padding: 12px 16px 16px; display: grid; gap: 18px; align-content: start; overscroll-behavior: contain; }
.np-sec { display: grid; gap: 8px; }
.np-sec-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.np-saved, .np-count { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
#npText { width: 100%; min-height: 96px; resize: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--away) 7%, var(--panel));
  color: var(--text); font: inherit; line-height: 1.5; outline: none; }
#npText:focus { border-color: var(--accent); }
.np-conflict { display: grid; gap: 4px; font-size: 12.5px; padding: 8px 10px; border-radius: 9px; background: color-mix(in srgb, var(--away) 16%, var(--panel)); }
.np-cf-btns { display: flex; gap: 14px; }
.np-add { display: flex; gap: 6px; align-items: center; }
.np-add input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); outline: none; font: inherit; }
.np-add input:focus { border-color: var(--accent); }
.np-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.np-item { display: flex; align-items: flex-start; gap: 8px; padding: 5px 4px; border-radius: 8px; }
.np-item:hover { background: var(--hover); }
.np-check { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.6px solid var(--offline); display: grid; place-items: center; color: transparent; }
.np-check svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.np-check:hover { border-color: var(--accent); }
.np-item.done .np-check { background: var(--online); border-color: var(--online); color: #fff; }
.np-t { flex: 1; min-width: 0; overflow-wrap: anywhere; cursor: text; padding-top: 1px; }
.np-item.done .np-t { text-decoration: line-through; color: var(--muted); }
.np-edit { flex: 1; min-width: 0; padding: 2px 6px; margin: -2px 0; border: 1px solid var(--accent); border-radius: 6px; background: var(--panel); color: var(--text); font: inherit; outline: none; }
.np-del { flex: none; width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; opacity: 0; }
.np-del svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.np-item:hover .np-del, .np-del:focus-visible { opacity: 1; }
.np-del:hover { color: var(--danger); background: var(--hover); }
.np-empty { color: var(--muted); font-size: 12.5px; padding: 4px; }
#npClear { justify-self: start; }
@media (hover: none) { .np-del { opacity: .7; } }
@media (pointer: coarse) {
  .np-check { width: 24px; height: 24px; }
  .np-del { width: 32px; height: 32px; margin: -4px -4px -4px 0; }
  .np-item { padding: 8px 4px; }
  .np-add input, .np-edit, #npText { font-size: 16px; }
}
/* Pantallas anchas: el chat se estrecha para que las notas no tapen los mensajes */
@media (min-width: 1180px) {
  .conv.with-notes > .messages, .conv.with-notes > .typing, .conv.with-notes > .composer { margin-right: 320px; }
}
/* Móviles: las notas ocupan toda la conversación, por debajo de la cabecera */
@media (max-width: 760px) {
  .notes-panel { width: 100%; border-left: 0; border-radius: 0; box-shadow: none; animation-name: npUp; }
  .np-body { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  @keyframes npUp { from { transform: translateY(16px); opacity: 0; } }
}

/* ---------- Enlace en el mensaje personal ---------- */
.psm-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; font-weight: 500; cursor: pointer; vertical-align: bottom; }
.psm-link svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.psm-link:hover span { text-decoration: underline; }
.contact .ps .psm-link { padding: 0 2px; margin: 0 -2px; border-radius: 4px; }
.contact .ps .psm-link:hover { background: var(--accent-soft); }

/* ---------- Novedades ---------- */
.me-wrap > .news-btn { position: absolute; top: 10px; right: 10px; z-index: 4; }
.news-btn svg { fill: none; }
.news-head { display: flex; align-items: center; gap: 12px; }
.news-head h2 { margin: 0; }
.news-badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.news-badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.news-list { display: grid; gap: 12px; }
.news-entry { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.news-entry.fresh { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.ne-h { display: flex; align-items: center; gap: 8px; }
.ne-h b { font-size: 15px; }
.ne-new { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--accent); border-radius: 20px; padding: 2px 8px; }
.ne-meta { font-size: 12px; color: var(--muted); margin-top: -4px; }
.ne-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.ne-items li { display: flex; gap: 10px; align-items: flex-start; }
.ne-ic { width: 26px; text-align: center; font-size: 17px; line-height: 1.3; flex: none; }
.ne-items b { display: block; font-weight: 600; }
.ne-items span { color: var(--muted); font-size: 13px; }
.ne-body { margin: 0; overflow-wrap: anywhere; }
.news-post { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
.news-post summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.news-post[open] { display: grid; gap: 8px; }
.news-post input, .news-post textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; outline: none; resize: vertical; }
.news-post .btn { justify-self: start; }
.np-conflict .link, #npClear { color: var(--accent); }
#notesBtn.on { background: var(--accent-soft); color: var(--accent); }
.np-body, .np-sec { grid-template-columns: minmax(0, 1fr); }
.np-body { overflow-x: hidden; }

/* ---------- Gastos: icono de cabecera ---------- */
#expBtn svg { fill: none; }

/* ---------- Cuenta atrás fijada ---------- */
.cd-bar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; text-align: left; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel)); color: var(--text); }
.cd-bar:hover { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.cd-bar.done { background: linear-gradient(90deg, color-mix(in srgb, var(--online) 14%, var(--panel)), var(--panel)); }
.cd-emo { font-size: 22px; line-height: 1; flex: none; }
.cd-txt { flex: 1; min-width: 0; display: grid; }
.cd-txt b { font-weight: 600; font-size: 13.5px; }
.cd-when { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.cd-left { display: flex; gap: 6px; flex: none; }
.cd-u { display: grid; justify-items: center; min-width: 34px; padding: 3px 5px; border-radius: 8px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.cd-u b { font-size: 15px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cd-u i { font-style: normal; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cd-done { font-weight: 700; color: var(--online); }
.cd-emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-emojis button { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; box-shadow: 0 0 0 1px var(--line); }
.cd-emojis button.sel { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.cd-dt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .cd-u { min-width: 30px; padding: 2px 4px; } .cd-u b { font-size: 13.5px; } .cd-bar { gap: 8px; padding: 7px 12px; } }

/* ---------- Ver vídeos juntos ---------- */
.watch-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 20px; background: #e62117; color: #fff; font-size: 12.5px; font-weight: 600; flex: none; animation: up .25s; }
.watch-pill:hover { filter: brightness(1.08); }
.wp-dot, .wr-live { width: 7px; height: 7px; border-radius: 50%; background: #fff; display: inline-block; animation: blink 1.4s infinite; flex: none; }
.watch-room { border-bottom: 1px solid var(--line); background: #0b0d10; color: #fff; display: grid; }
.wr-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; }
.wr-head .wr-live { background: #ff4d4d; }
.wr-title { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; }
.watch-room .icon-btn { color: rgba(255, 255, 255, .75); width: 32px; height: 32px; }
.watch-room .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.wr-stage { position: relative; width: min(100%, calc(36vh * 16 / 9)); aspect-ratio: 16 / 9; justify-self: center; background: #000; }
.wr-stage iframe, .wr-stage > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wr-sync { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 30px;
  background: rgba(230, 33, 23, .95); color: #fff; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); z-index: 2; }
.wr-sync svg { width: 18px; height: 18px; fill: #fff; }
.wr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px 8px; }
.wr-foot .muted { color: rgba(255, 255, 255, .6) !important; }
.wr-foot .danger-btn { color: #ff8a80; font-size: 12px; }
.watch-room.min .wr-stage { height: 0; aspect-ratio: auto; overflow: hidden; }
.watch-room.min .wr-foot { display: none; }
.watch-room.min #wrMin svg { transform: rotate(180deg); }
.watch-card { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; max-width: 380px; background: var(--panel); white-space: normal; }
.wc-thumb { aspect-ratio: 16 / 9; border-radius: 8px; background: #000 center/cover; display: grid; place-items: center; cursor: pointer; }
.wc-thumb .yt-play { width: 40px; height: 28px; border-radius: 8px; }
.wc-thumb .yt-play svg { width: 16px; height: 16px; }
.wc-txt { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.wc-txt b { font-size: 13px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wc-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #e62117; display: inline-flex; align-items: center; gap: 6px; }
.wc-k .wr-live { background: #e62117; }
.wc-go { padding: 6px 12px; font-size: 12.5px; }
.wr-current { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.yt-together { color: #e62117 !important; font-weight: 600; justify-self: start; margin-top: 2px; }
@media (min-width: 1180px) { .conv.with-notes > .watch-room, .conv.with-notes > .cd-bar { margin-right: 320px; width: auto; } }
@media (max-width: 420px) { .watch-card { grid-template-columns: 96px 1fr; } }
@media (max-width: 760px) { .wr-stage { width: 100%; } .watch-pill .wp-t { display: none; } .watch-pill { padding: 0 10px; } }

/* ---------- Efectos de pantalla ---------- */
.wink-layer.fx { z-index: 39; }
.wink-layer.dusk { background: linear-gradient(180deg, rgba(20, 24, 70, .55), rgba(20, 24, 70, .15)); animation: wfade 3.4s both; }
.fx-replay { font-size: 11px; line-height: 1; padding: 0 3px 0 0; opacity: .75; vertical-align: baseline; }
.fx-replay:hover { opacity: 1; transform: scale(1.2); }

/* ---------- Cumpleaños ---------- */
.bday-banner { display: flex; align-items: center; gap: 10px; margin: 2px 4px 8px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(100deg, color-mix(in srgb, #ff006e 12%, var(--panel)), color-mix(in srgb, #ffbe0b 16%, var(--panel))); font-size: 13px; }
.bb-ic { font-size: 22px; line-height: 1; animation: bbw 2.4s ease-in-out infinite; }
@keyframes bbw { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.08); } }
.bb-t { flex: 1; min-width: 0; }
.bb-go { padding: 6px 12px; font-size: 12.5px; }
.bb-name { color: inherit; font-weight: 700; font-size: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.contact.bday .avatar { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #ff4d8d; }
.bday-cake { font-size: 13px; }
.pv-bday { font-size: 13px; margin-top: 4px; }
.bday-field { display: grid; gap: 6px; }
.bday-field .opt { font-size: 11.5px; }
.bday-sel { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.bday-sel select { width: 100%; }
.qr-open { justify-content: center; gap: 8px; }
.qr-open svg, .add-invite svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Efectos de voz ---------- */
.vfx-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.vfx-row::-webkit-scrollbar { display: none; }
.vfx-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); flex: none; margin-right: 2px; }
.vfx { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text); background: var(--panel); }
.vfx:hover { border-color: var(--accent); }
.vfx.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.vfx span { font-size: 15px; line-height: 1; }
.rec-bar.preview .rec-dot { display: none; }
#recPlay .ic-pause, .rec-bar.playing #recPlay .ic-play { display: none; }
.rec-bar.playing #recPlay .ic-pause { display: block; }
#recPlay { color: var(--accent); }
#recPlay svg { fill: currentColor; stroke: currentColor; }
.vfx-tag { font-size: 14px; line-height: 1; margin-left: -4px; }
@media (pointer: coarse) { .vfx { padding: 8px 13px; } }

/* ---------- Gastos compartidos ---------- */
.exp-head { display: flex; align-items: center; gap: 12px; }
.exp-head .cal-title { flex: 1; }
.exp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--online) 15%, var(--panel)); color: var(--online); flex: none; }
.exp-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.exp-body { display: grid; gap: 16px; }
.exp-sum { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: stretch; }
.exp-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.exp-card span { font-size: 12px; color: var(--muted); }
.exp-card b { font-size: 20px; font-variant-numeric: tabular-nums; }
.exp-card.pos b, .eb-v.pos { color: var(--online); }
.exp-card.neg b, .eb-v.neg { color: var(--danger); }
.exp-add { align-self: center; }
.exp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.exp-sec { display: grid; gap: 8px; min-width: 0; }
.exp-bal { display: grid; gap: 6px; }
.eb-row { display: grid; grid-template-columns: minmax(70px, 1fr) 1.2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.eb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-bar { position: relative; height: 8px; border-radius: 4px; background: var(--hover); }
.eb-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.eb-bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.eb-bar i.pos { left: 50%; background: var(--online); }
.eb-bar i.neg { right: 50%; background: var(--danger); }
.eb-v { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 74px; }
.exp-settle { display: grid; gap: 6px; }
.es-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.es-row .link { color: var(--accent); white-space: nowrap; }
.es-cf { display: flex; gap: 10px; align-items: center; flex: none; }
.es-cf .btn { padding: 5px 12px; }
.exp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 46vh; overflow-y: auto; }
.ei { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 10px; }
.ei:hover { background: var(--hover); }
.ei-ic { font-size: 18px; flex: none; }
.ei-t { flex: 1; min-width: 0; display: grid; }
.ei-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ei-a { font-weight: 600; font-variant-numeric: tabular-nums; }
.exp-form { display: grid; gap: 12px; max-width: 460px; }
.ex-amount { display: flex; align-items: center; gap: 8px; }
.ex-amount input { flex: 1; font-size: 18px; font-variant-numeric: tabular-nums; }
.ex-split { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-each { margin-top: 6px; }
@media (max-width: 720px) {
  .exp-cols { grid-template-columns: 1fr; }
  .exp-sum { grid-template-columns: 1fr 1fr; }
  .exp-add { grid-column: 1 / -1; justify-content: center; padding: 11px; }
  .exp-list { max-height: none; }
}

/* ---------- Código QR ---------- */
.qr-wrap { display: grid; gap: 10px; justify-items: center; text-align: center; }
.qr-wrap h2 { margin: 0; }
.qr-card { display: grid; justify-items: center; gap: 2px; padding: 16px 16px 14px; border-radius: 18px; background: #fff; color: #111827; box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(20, 30, 50, .08); width: min(300px, 100%); }
.qr-card .muted { color: #6b7280 !important; }
.qr-img { width: 100%; margin-bottom: 6px; }
.qr-img canvas { display: block; border-radius: 8px; }
.qr-help { margin: 0; max-width: 340px; }
.qr-row .btn { flex: 1; justify-content: center; }
#moreTools { overflow-y: auto; overscroll-behavior: contain; }
#moreTools.two { display: grid; grid-template-columns: 1fr 1fr; min-width: 400px; column-gap: 2px; }
.qr-open { display: inline-flex; align-items: center; }
.wr-foot .muted { min-width: 0; }

/* ---------- Ajustar y recortar imágenes ---------- */
.crop-ov { position: fixed; inset: 0; z-index: 95; background: rgba(8, 10, 14, .6); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .16s; }
.crop-ov.in { opacity: 1; }
.crop-card { width: min(560px, 100%); background: var(--panel); color: var(--text); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px; }
.crop-h { display: grid; gap: 2px; }
.crop-h b { font-size: 16px; }
.crop-stage { position: relative; height: min(56vh, 420px); border-radius: 12px; overflow: hidden; background: #0b0d10; }
.crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-tools { display: flex; align-items: center; gap: 8px; }
.crop-tools input[type=range] { flex: 1; accent-color: var(--accent); }
.crop-tools .link { margin-left: 4px; }
.crop-card .row { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 600px) {
  .crop-ov { padding: 0; align-items: end; }
  .crop-card { border-radius: 18px 18px 0 0; padding: 16px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .crop-stage { height: min(52vh, 380px); }
  .crop-card .row .btn { flex: 1; justify-content: center; padding: 12px; }
}

/* ---------- Tipografías de los mensajes ---------- */
@font-face { font-family: "MZ Redondeada"; src: url(fonts/nunito-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Redondeada"; src: url(fonts/nunito-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MZ Maquina"; src: url(fonts/courier-prime-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Maquina"; src: url(fonts/courier-prime-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MZ Manuscrita"; src: url(fonts/caveat-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Manuscrita"; src: url(fonts/caveat-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MZ Elegante"; src: url(fonts/playfair-display-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Elegante"; src: url(fonts/playfair-display-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MZ Comic"; src: url(fonts/comic-neue-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Comic"; src: url(fonts/comic-neue-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MZ Retro"; src: url(fonts/vt323-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Moderna"; src: url(fonts/space-grotesk-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MZ Moderna"; src: url(fonts/space-grotesk-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
.font-redondeada { font-family: "MZ Redondeada", system-ui, sans-serif; }
.font-maquina { font-family: "MZ Maquina", "Courier New", monospace; }
.font-manuscrita { font-family: "MZ Manuscrita", cursive; font-size: 1.32em; line-height: 1.25; }
.font-elegante { font-family: "MZ Elegante", Georgia, serif; font-size: 1.04em; }
.font-comic { font-family: "MZ Comic", "Comic Sans MS", cursive; font-size: 1.04em; }
.font-retro { font-family: "MZ Retro", monospace; font-size: 1.32em; line-height: 1.15; letter-spacing: .02em; }
.font-moderna { font-family: "MZ Moderna", system-ui, sans-serif; }
.msg.big[class*="font-"] { font-size: 2em; }
.font-tool { font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.font-tool.on { color: var(--accent); background: var(--accent-soft); }
#fontMenu { left: 170px; min-width: 250px; max-height: min(60vh, 420px); overflow-y: auto; }
.fm-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px 4px; }
#fontMenu button { display: grid; gap: 1px; padding: 7px 10px; }
#fontMenu button.on { background: var(--accent-soft); }
.fm-s { font-size: 16px; line-height: 1.25; color: var(--text); }
.fm-n { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { #fontMenu { left: auto; right: 0; } }

/* ---------- Tonos de aviso ---------- */
.tone-list { display: grid; gap: 4px; }
.tone-opt { display: flex !important; align-items: center; gap: 10px; padding: 6px 8px 6px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 14px !important; color: var(--text) !important; }
.tone-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tone-opt input { width: auto !important; accent-color: var(--accent); margin: 0; }
.to-ic { width: 22px; text-align: center; font-size: 17px; }
.to-n { flex: 1; }
.to-play svg { fill: currentColor; stroke: none; width: 14px; height: 14px; }
.pv-tone { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--hover); font-size: 13px; text-align: left; }
.pv-tone b { color: var(--accent); font-weight: 600; }
.pv-tone:hover { filter: brightness(.98); }
.photo-view .pv-tone { margin-top: 8px; max-width: 320px; }

/* ---------- Ficha de perfil ---------- */
.photo-view.person { gap: 4px; }
.pv-bio { font-size: 13.5px; max-width: 340px; line-height: 1.45; margin-top: 6px; overflow-wrap: anywhere; }
.pv-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pv-facts:empty { display: none; }
.pv-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.pv-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 12.5px; font-weight: 600; }
.pv-links a:hover { border-color: var(--accent); color: var(--accent); }
.p-links { display: grid; gap: 6px; }
.pick-person { cursor: pointer; border-radius: 8px; }
.pick-person:hover { background: var(--hover); }
.seg.seg-wrap { grid-template-columns: repeat(3, 1fr); }
.ap-glass-tip { margin-top: -4px; }

/* ---------- Tema Cristal (efecto «liquid glass») ---------- */
:root[data-theme^=glass] {
  --bg: #dfe7f5; --panel: rgba(255, 255, 255, .46); --line: rgba(255, 255, 255, .62); --text: #0f1420; --muted: rgba(15, 20, 32, .58);
  --hover: rgba(255, 255, 255, .42); --shadow: 0 12px 40px rgba(20, 30, 70, .18);
  --glass-blur: blur(26px) saturate(190%); --glass-edge: rgba(255, 255, 255, .85); --glass-sheen: rgba(255, 255, 255, .55);
  --g1: #7aa7ff; --g2: #b892ff; --g3: #63e6be; --g4: #ffa8c5;
  color-scheme: light;
}
:root[data-theme=glass-dark] {
  --bg: #0a0d16; --panel: rgba(26, 30, 44, .44); --line: rgba(255, 255, 255, .14); --text: #eef2fa; --muted: rgba(238, 242, 250, .6);
  --hover: rgba(255, 255, 255, .09); --shadow: 0 14px 44px rgba(0, 0, 0, .45);
  --glass-edge: rgba(255, 255, 255, .28); --glass-sheen: rgba(255, 255, 255, .12);
  color-scheme: dark;
}
:root[data-theme^=glass] body { background: var(--bg); }
/* El fondo de colores que se ve a través del cristal (se mueve muy despacio) */
:root[data-theme^=glass] body::before {
  content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 46% at 18% 22%, var(--g1), transparent 62%),
    radial-gradient(34% 42% at 82% 18%, var(--g2), transparent 62%),
    radial-gradient(42% 50% at 72% 82%, var(--g3), transparent 62%),
    radial-gradient(36% 46% at 22% 84%, var(--g4), transparent 62%);
  filter: saturate(1.15); animation: glassFlow 40s ease-in-out infinite alternate;
}
:root[data-theme=glass-dark] body::before { opacity: .8; }
@keyframes glassFlow { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(4%, -3%) rotate(8deg); } 100% { transform: translate(-3%, 4%) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { :root[data-theme^=glass] body::before { animation: none; } }
/* Superficies de vidrio: translúcidas, desenfocan lo de detrás, con borde de luz y brillo diagonal */
:root[data-theme^=glass] :is(.side, .conv, .modal-card, .menu, .toast, .emo-panel, .wink-panel, .auth-card, .crop-card, .tabs .tab.active) {
  background: linear-gradient(135deg, var(--glass-sheen), transparent 38%, transparent 70%, rgba(255, 255, 255, .06)), var(--panel);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 0 rgba(255, 255, 255, .08), var(--shadow);
}
:root[data-theme^=glass] .app { gap: 0; }
:root[data-theme^=glass] .side { margin: 12px 0 12px 12px; border-radius: 22px; overflow: hidden; }
:root[data-theme^=glass] .conv { border-radius: 22px; }
:root[data-theme^=glass] .conv:not(.solo) { border-top-left-radius: 0; }
:root[data-theme^=glass] .modal { background: rgba(10, 14, 24, .22); }
:root[data-theme^=glass] .modal-card { border-radius: 24px; }
:root[data-theme^=glass] .side-foot, :root[data-theme^=glass] .conv-head, :root[data-theme^=glass] .composer { border-color: var(--line); }
:root[data-theme^=glass] .notes-panel { background: var(--panel); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
/* Botones y campos tipo píldora de cristal */
:root[data-theme^=glass] .btn { background: rgba(255, 255, 255, .34); border-color: var(--line); box-shadow: inset 0 1px 0 var(--glass-edge); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
:root[data-theme=glass-dark] .btn { background: rgba(255, 255, 255, .08); }
:root[data-theme^=glass] .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 78%, #fff), var(--accent)); border-color: color-mix(in srgb, var(--accent) 70%, #fff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme^=glass] :is(input[type=search], .field, .modal-card input, .modal-card select, .input-row textarea, .np-add input, #npText) {
  background: rgba(255, 255, 255, .38); border-color: var(--line); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
}
:root[data-theme=glass-dark] :is(input[type=search], .field, .modal-card input, .modal-card select, .input-row textarea, .np-add input, #npText) { background: rgba(255, 255, 255, .07); }
:root[data-theme^=glass] .contact.active, :root[data-theme^=glass] .contact:hover { background: rgba(255, 255, 255, .42); box-shadow: inset 0 1px 0 var(--glass-edge); }
:root[data-theme=glass-dark] .contact.active, :root[data-theme=glass-dark] .contact:hover { background: rgba(255, 255, 255, .1); }
:root[data-theme^=glass] .seg { background: rgba(255, 255, 255, .25); }
:root[data-theme^=glass] .seg button.on { background: rgba(255, 255, 255, .7); }
:root[data-theme=glass-dark] .seg button.on { background: rgba(255, 255, 255, .16); }
:root[data-theme^=glass] .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 3.5px var(--st, var(--offline)); }
:root[data-theme^=glass] .cd-bar { background: linear-gradient(90deg, rgba(255, 255, 255, .3), transparent); }
@media (max-width: 760px) {
  :root[data-theme^=glass] .side { margin: 0; border-radius: 0; border: 0; }
  :root[data-theme^=glass] .conv { border-radius: 0; border: 0; }
  :root[data-theme^=glass] .modal-card { border-radius: 24px 24px 0 0; }
}
/* Si el navegador no sabe desenfocar, el cristal se vuelve más opaco para que se lea bien */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme^=glass] { --panel: rgba(255, 255, 255, .86); }
  :root[data-theme=glass-dark] { --panel: rgba(24, 28, 40, .9); }
}
:root[data-theme^=glass] .crop-card { background: linear-gradient(135deg, var(--glass-sheen), transparent 40%), rgba(255, 255, 255, .86); }
:root[data-theme=glass-dark] .crop-card { background: linear-gradient(135deg, var(--glass-sheen), transparent 40%), rgba(20, 24, 36, .9); }
.crop-ov { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
/* Los campos dentro de una etiqueta no heredan su color gris */
.modal-card label :is(input, textarea, select), .auth-card label :is(input, select) { color: var(--text); }

/* ---------- Cabecera del perfil: placa de cristal sobre la imagen (opción D) ---------- */
.me-wrap { padding: 14px 12px 12px; }
.me-wrap.has-cover { padding-bottom: 12px; }
.me-cover-clip { -webkit-mask-image: none !important; mask-image: none !important; } /* corte limpio, sin degradado */
.me-wrap .me { margin: 0 0 12px; padding: 14px 52px 14px 14px; gap: 14px; align-items: center; border-radius: 20px; background: var(--hover); }
.me-wrap.has-cover .me { -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); }
.me-wrap.tone-light .me { background: rgba(255, 255, 255, .55); color: #111827; --muted: rgba(17, 24, 39, .65); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 8px 24px rgba(20, 30, 50, .12); }
.me-wrap.tone-dark .me { background: rgba(10, 12, 22, .38); color: #fff; --muted: rgba(255, 255, 255, .78); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px rgba(0, 0, 0, .25); }
.me-wrap.has-cover .me :is(.me-name, .psm-input, .status-btn) { color: inherit; text-shadow: none; }
.me-wrap .me .avatar.lg { width: 80px; height: 80px; border-radius: 20px; font-size: 30px; }
.me-wrap .me-info { gap: 5px; }
.me-wrap .me-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; padding: 0; }
.me-wrap .status-pick { display: flex; }
.me-wrap .status-btn { padding: 4px 10px 4px 8px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--panel); color: var(--text); }
.me-wrap.tone-light .status-btn { background: rgba(255, 255, 255, .6); }
.me-wrap.tone-dark .status-btn { background: rgba(255, 255, 255, .14); }
.me-wrap .psm-input { font-size: 14.5px; margin-left: -6px; width: calc(100% + 6px); padding: 2px 6px; color: inherit; }
.me-wrap.tone-light .psm-input::placeholder { color: rgba(17, 24, 39, .55); }
.me-wrap .music { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-wrap .music::before { content: "♪"; color: inherit; }
.me-wrap > .news-btn { top: 22px; right: 20px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .72); color: #1f2937 !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); text-shadow: none !important; }
.me-wrap:not(.has-cover) > .news-btn { background: var(--panel); color: var(--muted) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.me-wrap .search-row { padding: 0; }
.me-wrap .pwa-card { margin: 0 0 12px; }
@media (max-width: 760px) { .me-wrap { padding: 12px 10px 10px; } .me-wrap .search-row { padding: 0; } }
@media (max-width: 360px) { .me-wrap .me .avatar.lg { width: 64px; height: 64px; } .me-wrap .me-name { font-size: 19px; } }
/* Móvil en horizontal: placa compacta */
@media (max-height: 500px) and (pointer: coarse) {
  .me-wrap { padding: 8px 10px 8px; }
  .me-wrap .me { padding: 8px 48px 8px 10px; margin-bottom: 8px; gap: 10px; }
  .me-wrap .me .avatar.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
  .me-wrap .me-name { font-size: 17px; }
  .me-wrap > .news-btn { top: 14px; right: 16px; width: 30px; height: 30px; }
}
/* Menús dentro de la placa: en el tema Cristal, casi opacos (la placa ya desenfoca y no dejaría ver bien lo de detrás) */
:root[data-theme^=glass] .me-wrap .menu { background: rgba(255, 255, 255, .95); }
:root[data-theme=glass-dark] .me-wrap .menu { background: rgba(24, 28, 40, .96); }
@media (pointer: coarse) {
  .me-wrap .status-btn { min-height: 32px; padding: 6px 12px 6px 10px; }
  .me-wrap .me-name { padding: 4px 0; }
}

/* ---------- Aviso legal y protección de datos ---------- */
.auth { grid-template-rows: 1fr auto; }
.auth-card { align-self: center; }
.auth-legal { display: flex; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--muted); padding: 14px 0 max(4px, env(safe-area-inset-bottom)); opacity: .8; }
.auth-legal a { color: inherit; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; color: var(--text); }
.auth-legal.in-app { padding: 4px 0 0; }
.auth-consent { margin: -4px 0 0; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; }
.lg-head { display: grid; gap: 10px; }
.lg-head h2 { margin: 0; }
.lg-tabs { grid-template-columns: 1fr 1fr; }
.lg-body { font-size: 13.5px; line-height: 1.55; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.lg-body h3 { font-size: 13.5px; margin: 16px 0 4px; }
.lg-body p { margin: 0 0 8px; }
.lg-body ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.lg-body a { color: var(--accent); }
.lg-note { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.lg-todo { background: color-mix(in srgb, var(--away) 25%, transparent); border-radius: 4px; padding: 0 4px; }
.lg-date { color: var(--muted); font-size: 12px; margin-top: 14px !important; }
@media (max-width: 600px) { .lg-body { max-height: none; } }

/* Aviso de correo pendiente */
.mail-banner { display: flex; align-items: center; gap: 10px; margin: 2px 4px 8px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px;
  background: color-mix(in srgb, var(--away) 16%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--away) 40%, transparent); }
.mb-ic { font-size: 20px; }
.mb-t { flex: 1; min-width: 0; display: grid; gap: 1px; color: var(--muted); }
.mb-t b { color: var(--text); font-size: 13px; }
.mail-banner .btn { padding: 6px 12px; font-size: 12.5px; }
.pf-mail { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--hover); }
.pf-mail > span:first-child { grid-column: 1 / -1; }
.pf-mail-v { overflow-wrap: anywhere; font-size: 14px; }
.pf-mail-v i { color: var(--danger); font-style: normal; }
.pf-mail .link { color: var(--accent); font-weight: 600; }
.no-mail { color: var(--danger); }
.adm-legal-btns { display: flex; align-items: center; gap: 14px; }
.adm-legal-btns .link { color: var(--accent); }

/* Aviso de borrado a las 48 h, al principio de cada chat */
.retention { text-align: center; font-size: 11.5px; color: var(--muted); margin: 0 auto 10px; padding: 6px 12px; border-radius: 20px; background: var(--hover); width: fit-content; max-width: 100%; }
.retention a { color: inherit; }

/* ---------- «Lo que estoy escuchando» con enlace de Spotify ---------- */
.me-wrap .music.linked { padding: 0; background: #1db954; }
.me-wrap .music.linked::before { content: none; }
.music.linked a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; color: #fff; text-decoration: none; min-width: 0; max-width: 100%; }
.music.linked a > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.music.linked .mz-cov { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.music.linked a:not(:has(.mz-cov)) { padding-left: 10px; }
.music.linked a:not(:has(.mz-cov))::before { content: "♪"; }
.sp-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgba(0, 0, 0, .18); border-radius: 10px; padding: 1px 6px; flex: none; }
.music.linked a:hover { filter: brightness(1.06); }
.music-link { gap: 5px; color: #1aa34a !important; }
:root[data-dark] .music-link { color: #3ddc7a !important; }
.music-link .mz-cov { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; flex: none; }
.music-link .mz-note { font-weight: 700; }
.music-link .mz-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.contact .ps .music-link { max-width: 100%; }
.pv-song { display: flex; align-items: center; gap: 12px; width: min(320px, 100%); margin-top: 8px; padding: 8px 12px 8px 8px; border-radius: 14px; text-decoration: none; text-align: left;
  background: linear-gradient(135deg, #1db954, #128a3e); color: #fff; box-shadow: 0 6px 18px rgba(29, 185, 84, .25); }
.pv-song img, .pv-song-n { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.pv-song-n { display: grid; place-items: center; background: rgba(0, 0, 0, .2); font-size: 22px; }
.pv-song-t { flex: 1; min-width: 0; display: grid; }
.pv-song-t small { font-size: 11px; opacity: .85; }
.pv-song-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-song-go { font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .2); padding: 5px 9px; border-radius: 14px; flex: none; }
.pv-song:hover { filter: brightness(1.05); }
.pv-song-t > span { font-size: 12px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-song-go { width: 34px; height: 34px; padding: 0 !important; border-radius: 50% !important; display: grid; place-items: center; background: #fff !important; }
.pv-song-go svg { width: 16px; height: 16px; fill: #128a3e; stroke: none; margin-left: 2px; }

/* ---------- Mensajes en bocadillos (estilo suave) ---------- */
.img-wrap { display: inline-block; max-width: 100%; vertical-align: top; }
.messages.bubbles .mgroup { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 14px 0 4px; }
.messages.bubbles .mgroup.mine { align-items: flex-end; }
.messages.bubbles .mhead { display: none; }
.messages.bubbles .mgroup.in-group:not(.mine) .mhead { display: block; margin: 0 0 1px 12px; font-size: 11.5px; }
.messages.bubbles .msg { max-width: min(78%, 560px); padding: 7px 12px 6px; border-radius: 18px; line-height: 1.4;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04); }
.messages.bubbles .mgroup.mine .msg { background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
/* El último bocadillo de cada tanda tiene la esquina del lado de quien habla más recta */
.messages.bubbles .mgroup:not(.mine) .msg { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.messages.bubbles .mgroup:not(.mine) .mhead + .msg { border-top-left-radius: 18px; }
.messages.bubbles .mgroup:not(.mine) .msg:last-child { border-bottom-left-radius: 4px; }
.messages.bubbles .mgroup.mine .msg { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.messages.bubbles .mgroup.mine .mhead + .msg { border-top-right-radius: 18px; }
.messages.bubbles .mgroup.mine .msg:last-of-type { border-bottom-right-radius: 4px; }
/* Hora dentro del bocadillo */
.messages.bubbles .msg .tm { position: static; opacity: .6; float: right; margin: 6px 0 -2px 10px; font-size: 10.5px; line-height: 1; }
/* Fotos, notas de voz, encuestas, ubicaciones… y emojis sueltos: sin fondo de bocadillo */
.messages.bubbles .msg.has-media, .messages.bubbles .msg.big { background: none !important; box-shadow: none !important; padding: 0; }
.messages.bubbles .msg.has-media .tm, .messages.bubbles .msg.big .tm { float: none; display: block; text-align: right; margin: 3px 6px 0; }
.messages.bubbles .mgroup:not(.mine) .msg.has-media .tm, .messages.bubbles .mgroup:not(.mine) .msg.big .tm { text-align: left; }
.messages.bubbles .msg .img-msg { border-radius: 16px; margin: 0; }
.messages.bubbles .msg .voice { background: var(--panel); margin: 0; }
.messages.bubbles .mgroup.mine .msg .voice { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.messages.bubbles .msg .lp { margin-top: 6px; }
.messages.bubbles .receipt { align-self: flex-end; margin-top: 1px; }
.messages.bubbles .msg .auto-tag { display: block; margin-bottom: 2px; }
@media (max-width: 760px) { .messages.bubbles .msg { max-width: 84%; } }
.seg.seg-two { grid-template-columns: 1fr 1fr; }

/* ---------- Visor de imágenes: la foto siempre centrada (también en Safari y en el navegador) ---------- */
.vw-stage { position: relative; display: block; }
.vw-stage img { position: absolute; top: 8px; bottom: 40px; left: 56px; right: 56px; margin: auto; width: auto; height: auto;
  max-width: calc(100% - 112px); max-height: calc(100% - 48px); }
.vw-stage.zoom img { position: static; margin: 0; max-width: none; max-height: none; }
@media (max-width: 760px) {
  .vw-stage img { top: 4px; bottom: 36px; left: 4px; right: 4px; max-width: calc(100% - 8px); max-height: calc(100% - 40px); }
}

/* ---------- La etiqueta de la canción y el estado nunca se salen de la placa del perfil ---------- */
.me-wrap .me-info { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.me-wrap .music { max-width: 100%; min-width: 0; overflow: hidden; }
.me-wrap .music.linked a { max-width: 100%; box-sizing: border-box; }
.me-wrap .music.linked a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.me-wrap .status-pick, .me-wrap .status-btn { max-width: 100%; min-width: 0; }
.me-wrap .status-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ===== Nota de voz: mantener pulsado para grabar ===== */
.composer.voice-mode .tools, .composer.voice-mode #inputRow { display: none !important; }
.voice-panel { display: grid; gap: 10px; padding: 4px 2px 6px; animation: vpIn .18s ease-out; }
.voice-panel.hidden { display: none; }
@keyframes vpIn { from { opacity: 0; transform: translateY(8px); } }
.vp-head { display: flex; align-items: center; gap: 10px; }
.vp-head b { flex: 1; font-size: 14px; }
.vp-time { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; color: var(--muted); }
.voice-panel.recording .vp-time { color: #e5383b; }
.voice-panel.recording .vp-time::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5383b; margin-right: 6px; vertical-align: 1px; animation: vpBlink 1s infinite; }
@keyframes vpBlink { 50% { opacity: .2; } }
.vp-rec { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; }
.vp-mic { --lvl: 0; position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ff6b6b, #e5383b 55%, #c1121f); color: #fff;
  box-shadow: 0 8px 22px rgba(229, 56, 59, .38), inset 0 -3px 8px rgba(0, 0, 0, .18);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease; }
.vp-mic svg { position: relative; width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.vp-mic .vp-ring { position: absolute; inset: -8px; border-radius: 50%; border: 3px solid rgba(229, 56, 59, .35); pointer-events: none;
  transform: scale(calc(1 + var(--lvl) * .35)); transition: transform .08s linear; animation: vpPulse 2s ease-in-out infinite; }
@keyframes vpPulse { 50% { opacity: .45; } }
.vp-mic:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.voice-panel.recording .vp-mic { transform: scale(1.12); }
.voice-panel.recording .vp-ring { animation: none; border-color: rgba(229, 56, 59, .55); background: rgba(229, 56, 59, .12); }
.vp-mic.nudge { animation: vpNudge .4s; }
@keyframes vpNudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.vp-hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.voice-panel.recording .vp-hint { color: #e5383b; font-weight: 600; }
.vp-review { display: grid; gap: 10px; }
.vp-review.hidden, .vp-rec.hidden { display: none; }
.vp-player { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--hover); }
.vp-play { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.vp-play svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.vp-play .ic-pause, .voice-panel.playing .vp-play .ic-play { display: none; }
.voice-panel.playing .vp-play .ic-pause { display: block; }
.vp-wave { flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; gap: 2px; }
.vp-wave i { flex: 1; min-height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 35%, transparent); transition: background .1s; }
.vp-wave i.on { background: var(--accent); }
.vp-wave.busy { opacity: .45; animation: vpBlink 1s infinite; }
.vp-dur { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); min-width: 34px; text-align: right; }
.vp-fx { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.vp-fx::-webkit-scrollbar { display: none; }
.vp-fx .vfx { justify-content: flex-start; }
@media (min-width: 900px) { .vp-fx { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); overflow: visible; } }
.vp-actions { display: flex; gap: 8px; }
.vp-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.vp-actions .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vp-actions .btn.primary { margin-left: auto; min-width: 110px; }
@media (max-width: 420px) { .vp-actions .btn:not(.primary) { padding-left: 10px; padding-right: 10px; } }
@media (orientation: landscape) and (max-height: 500px) { .vp-mic { width: 64px; height: 64px; } .vp-mic svg { width: 28px; height: 28px; } .vp-rec { padding: 0; gap: 6px; } }
.vp-fx .vfx { white-space: nowrap; padding: 6px 12px; }
.vp-fx { grid-auto-columns: max-content; }
@media (min-width: 900px) { .vp-fx { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

/* ===== Nick con estilo ===== */
.n-emo { margin-right: .28em; font-style: normal; }
.n-badge { margin-left: .3em; font-size: .88em; font-style: normal; }
.nsx[class*=ns-] { font-weight: 700; }
.ns-rojo { color: #e11d48; } .ns-naranja { color: #ea580c; } .ns-verde { color: #16a34a; } .ns-azul { color: #2563eb; } .ns-morado { color: #7c3aed; } .ns-rosa { color: #db2777; }
:root[data-dark] .ns-rojo { color: #fb7185; } :root[data-dark] .ns-naranja { color: #fb923c; } :root[data-dark] .ns-verde { color: #4ade80; }
:root[data-dark] .ns-azul { color: #60a5fa; } :root[data-dark] .ns-morado { color: #a78bfa; } :root[data-dark] .ns-rosa { color: #f472b6; }
.nsx:is(.ns-fuego, .ns-oceano, .ns-atardecer, .ns-menta, .ns-galaxia, .ns-oro, .ns-arcoiris, .ns-brillo) {
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.ns-fuego { background-image: linear-gradient(90deg, #ef4444, #f59e0b); }
.ns-oceano { background-image: linear-gradient(90deg, #0891b2, #2563eb); }
.ns-atardecer { background-image: linear-gradient(90deg, #f97316, #db2777, #7c3aed); }
.ns-menta { background-image: linear-gradient(90deg, #059669, #0891b2); }
.ns-galaxia { background-image: linear-gradient(90deg, #6366f1, #a855f7, #ec4899); }
.ns-oro { background-image: linear-gradient(90deg, #a16207, #eab308 50%, #a16207); }
:root[data-dark] .ns-oceano { background-image: linear-gradient(90deg, #22d3ee, #60a5fa); }
:root[data-dark] .ns-menta { background-image: linear-gradient(90deg, #34d399, #22d3ee); }
:root[data-dark] .ns-galaxia { background-image: linear-gradient(90deg, #818cf8, #c084fc, #f472b6); }
:root[data-dark] .ns-oro { background-image: linear-gradient(90deg, #ca8a04, #fde047 50%, #ca8a04); }
.ns-arcoiris { background-image: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #0ea5e9, #8b5cf6, #ec4899, #ef4444); background-size: 200% 100%; animation: nsSlide 4s linear infinite; }
.ns-brillo { background-image: linear-gradient(100deg, var(--accent) 40%, #fff 50%, var(--accent) 60%); background-size: 250% 100%; animation: nsShine 3s ease-in-out infinite; }
:root:not([data-dark]) .ns-brillo { background-image: linear-gradient(100deg, var(--accent) 40%, color-mix(in srgb, var(--accent) 30%, #fff) 50%, var(--accent) 60%); }
.ns-neon { color: #0891b2; text-shadow: 0 0 6px rgba(34, 211, 238, .55); animation: nsGlow 2.4s ease-in-out infinite; }
:root[data-dark] .ns-neon { color: #67e8f9; text-shadow: 0 0 8px rgba(34, 211, 238, .8), 0 0 16px rgba(34, 211, 238, .45); }
@keyframes nsSlide { to { background-position: -200% 0; } }
@keyframes nsShine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
@keyframes nsGlow { 50% { text-shadow: 0 0 2px rgba(34, 211, 238, .3); } }
@media (prefers-reduced-motion: reduce) { .ns-arcoiris, .ns-brillo, .ns-neon { animation: none; } }
/* Sobre fondos de foto (cabecera tipo cristal) el nick con estilo mantiene su color */
.me-wrap .me .me-name .nsx[class*=ns-] { text-shadow: none; }
.me-wrap.lay-d .me .me-name .ns-neon { text-shadow: 0 0 6px rgba(34, 211, 238, .55) !important; }

/* ===== Estilo de bocadillo ===== */
.messages.bubbles .mgroup[class*=bs-] .msg:not(.has-media):not(.big) { box-shadow: none; }
.messages.bubbles .mgroup.bs-soft .msg:not(.has-media):not(.big) { color: #1f2937; }
.messages.bubbles .mgroup.bs-strong .msg:not(.has-media):not(.big) { color: #fff; }
.messages.bubbles .mgroup.bs-strong .msg a { color: #fff; text-decoration: underline; }
.messages.bubbles .mgroup.bs-strong .msg .tm, .messages.bubbles .mgroup.bs-strong .msg .tm * { color: rgba(255, 255, 255, .85); }
.messages.bubbles .mgroup.bs-strong .msg .lp { color: var(--text); }
.messages.bubbles .mgroup[class*=bs-] .msg .auto-tag { opacity: .85; }
.messages.bubbles .mgroup.bs-cielo .msg:not(.has-media):not(.big), .bsw-cielo { background: #dbeafe; }
.messages.bubbles .mgroup.bs-menta .msg:not(.has-media):not(.big), .bsw-menta { background: #d1fae5; }
.messages.bubbles .mgroup.bs-limon .msg:not(.has-media):not(.big), .bsw-limon { background: #fef3c7; }
.messages.bubbles .mgroup.bs-melocoton .msg:not(.has-media):not(.big), .bsw-melocoton { background: #ffe1cc; }
.messages.bubbles .mgroup.bs-lila .msg:not(.has-media):not(.big), .bsw-lila { background: #ede9fe; }
.messages.bubbles .mgroup.bs-rosa .msg:not(.has-media):not(.big), .bsw-rosa { background: #fce7f3; }
.messages.bubbles .mgroup.bs-azul .msg:not(.has-media):not(.big), .bsw-azul { background: #2563eb; }
.messages.bubbles .mgroup.bs-verde .msg:not(.has-media):not(.big), .bsw-verde { background: #15803d; }
.messages.bubbles .mgroup.bs-coral .msg:not(.has-media):not(.big), .bsw-coral { background: #e8574b; }
.messages.bubbles .mgroup.bs-grafito .msg:not(.has-media):not(.big), .bsw-grafito { background: #374151; }
.messages.bubbles .mgroup.bs-atardecer .msg:not(.has-media):not(.big), .bsw-atardecer { background: linear-gradient(135deg, #f97316, #db2777); }
.messages.bubbles .mgroup.bs-oceano .msg:not(.has-media):not(.big), .bsw-oceano { background: linear-gradient(135deg, #0891b2, #2563eb); }
.messages.bubbles .mgroup.bs-aurora .msg:not(.has-media):not(.big), .bsw-aurora { background: linear-gradient(135deg, #059669, #6366f1); }
.messages.bubbles .mgroup.bs-fuego .msg:not(.has-media):not(.big), .bsw-fuego { background: linear-gradient(135deg, #dc2626, #ea580c); }
.messages.bubbles .mgroup.bs-noche .msg:not(.has-media):not(.big), .bsw-noche { background: linear-gradient(135deg, #1e1b4b, #5b21b6); }
.messages.bubbles .mgroup.bs-caramelo .msg:not(.has-media):not(.big), .bsw-caramelo { background: linear-gradient(135deg, #d97706, #92400e); }

/* ===== Emoticonos propios ===== */
.cemo { display: inline-block; height: 1.6em; width: auto; max-width: 4.5em; vertical-align: -0.45em; object-fit: contain; margin: 0 1px; cursor: pointer; }
.msg.big-cemo .cemo { height: 64px; max-width: 160px; vertical-align: middle; margin: 2px; }
.emo-view { display: grid; justify-items: center; gap: 6px; padding: 8px 0 2px; text-align: center; }
.emo-view .cemo { height: 112px; max-width: 220px; cursor: default; }
.emo-view .em-code-in { width: 100%; max-width: 280px; text-align: left; }
.emo-suggest { display: flex; gap: 4px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.emo-suggest.hidden { display: none; }
.emo-suggest button { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px 4px 5px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 12.5px; }
.emo-suggest button.on, .emo-suggest button:hover { border-color: var(--accent); background: var(--accent-soft); }
.emo-suggest .cemo { height: 26px; vertical-align: middle; cursor: inherit; }
/* Panel de emoticonos con pestañas */
.emo-panel { display: block; grid-template-columns: none; width: max-content; max-width: min(340px, calc(100vw - 24px)); }
.emo-panel.hidden { display: none; }
.ep-tabs { display: flex; gap: 4px; margin: -2px 0 6px; }
.emo-panel .ep-tabs button { width: auto; height: auto; flex: 1; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-radius: 8px; }
.emo-panel .ep-tabs button.on { background: var(--accent-soft); color: var(--accent); }
.ep-n { font-size: 10.5px; background: var(--accent); color: #fff; border-radius: 9px; padding: 0 5px; margin-left: 2px; }
.ep-body { display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; max-height: 240px; overflow-y: auto; }
.ep-body.mine { grid-template-columns: repeat(6, 46px); }
.emo-panel .ep-body.mine button { width: 46px; height: 46px; display: grid; place-items: center; }
.ep-body.mine .cemo { height: 36px; max-width: 42px; vertical-align: middle; cursor: inherit; margin: 0; }
.emo-panel .ep-add { border: 1.5px dashed var(--line); color: var(--muted); font-size: 18px; }
.ep-hint { grid-column: 2 / -1; align-self: center; font-size: 12px; color: var(--muted); padding-left: 6px; }
@media (pointer: coarse) { .ep-body { grid-template-columns: repeat(8, 38px); } .ep-body.mine { grid-template-columns: repeat(6, 48px); } }
/* Gestión */
.em-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.em-add #emPick span { font-size: 16px; margin-right: 4px; }
.em-new { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; width: 100%; padding: 10px; border-radius: 14px; background: var(--hover); }
.em-new.hidden { display: none; }
.em-new img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(rgba(127, 127, 127, .14) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.em-code-in { flex: 1; min-width: 140px; }
.em-colon { display: flex; align-items: center; gap: 2px; font-weight: 700; color: var(--muted); }
.em-colon input { flex: 1; min-width: 0; }
.em-head { display: flex; justify-content: space-between; align-items: baseline; }
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.em-item { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.em-item .cemo { height: 48px; max-width: 80px; cursor: default; margin: 0; }
.em-code { font-size: 12px; font-weight: 600; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 6px; border-radius: 6px; }
.em-code:hover { background: var(--hover); }
.em-ren { width: 100%; font-size: 12px; padding: 4px 6px; }
.em-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; color: var(--muted); opacity: .7; }
.em-del:hover { background: #e5484d; color: #fff; opacity: 1; }
.em-empty { grid-column: 1 / -1; padding: 14px; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; }

/* ===== Accesos desde Mi perfil ===== */
.pf-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-custom .btn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; padding: 10px 12px; height: auto; align-items: center; }
.pf-custom .btn span { grid-row: span 2; font-size: 22px; }
.pf-custom .btn small { font-weight: 400; font-size: 11.5px; color: var(--muted); }
@media (max-width: 420px) { .pf-custom { grid-template-columns: 1fr; } }

/* ===== Ventana «Mi estilo» ===== */
.sty-prev { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--hover); min-width: 0; }
.sty-names, .sty-bubbles, .sty-badges, .sty-emo { min-width: 0; }
.sp-card { display: flex; align-items: center; gap: 10px; }
.sp-who { display: grid; min-width: 0; }
.sp-name { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-msgs.messages { padding: 0 !important; overflow: visible; background: none !important; }
.sp-msgs .mgroup { margin: 0 !important; }
.sp-msgs .msg { background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.sty-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.sty-n, .sty-b { display: grid; justify-items: center; gap: 2px; padding: 9px 6px 7px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); min-width: 0; }
.sty-n .nsx { font-size: 14.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sty-n small, .sty-b small { font-size: 11px; color: var(--muted); }
.sty-n.on, .sty-b.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.sty-emo { display: grid; gap: 6px; }
.sty-emo-row { display: flex; gap: 8px; align-items: center; }
.sty-emo-row input { width: 52px; text-align: center; font-size: 20px; padding: 6px; flex: none; }
.sty-quick { min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sty-quick button { flex: none; width: 34px; height: 34px; border-radius: 8px; font-size: 19px; }
.sty-quick button:hover { background: var(--hover); }
.sty-quick .sty-none { font-size: 13px; color: var(--muted); }
.sty-bubbles { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.sb-sw { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 14px 14px 14px 5px; font-size: 12.5px; font-weight: 700; color: #1f2937; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.sty-b[data-b=""] .sb-sw { background: var(--accent-soft); }
.sb-sw:is(.bsw-azul, .bsw-verde, .bsw-coral, .bsw-grafito, .bsw-atardecer, .bsw-oceano, .bsw-aurora, .bsw-fuego, .bsw-noche, .bsw-caramelo) { color: #fff; }
.sty-b:not([data-b=""]) .sb-sw { box-shadow: none; }
.sty-b[data-b=""] .sb-sw { color: var(--text); }
.sty-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.sty-badge { position: relative; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); }
.sty-badge:not(.got) { opacity: .62; cursor: default; }
.sty-badge:not(.got) .bg-ic { filter: grayscale(1); }
.sty-badge.got { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.sty-badge.on { border-color: var(--accent); background: var(--accent-soft); }
.bg-ic { font-size: 24px; line-height: 1.1; }
.bg-t { display: grid; gap: 2px; min-width: 0; }
.bg-t b { font-size: 13.5px; }
.bg-t small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.bg-bar { display: block; height: 5px; border-radius: 3px; background: var(--hover); overflow: hidden; margin-top: 3px; }
.bg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bg-n { font-variant-numeric: tabular-nums; }
.bg-feat { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
/* Insignias en la ficha */
.pv-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.pv-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 20px; background: var(--hover); font-size: 12px; font-weight: 600; }
.pv-badge i { font-style: normal; font-size: 15px; }
.pv-badge.feat { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.sty-emo { grid-template-columns: minmax(0, 1fr); }
.sty-emo-row { min-width: 0; align-items: flex-start; }
.sty-quick { flex-wrap: wrap; overflow: visible; }
.emo-panel { width: min(318px, calc(100vw - 24px)); box-sizing: border-box; }
.ep-body { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
.ep-body.mine { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
@media (pointer: coarse) { .emo-panel { width: min(350px, calc(100vw - 24px)); } .ep-body { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); } .ep-body.mine { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); } }
.emo-panel .ep-body button { width: 100%; }

/* ===== Estado con estilo ===== */
.nsx .ej { -webkit-text-fill-color: #111; color: #111; }
.nsx[class*=ns-] .psm-link { -webkit-text-fill-color: var(--accent); color: var(--accent); }
.nsx.ns-neon .ej, .nsx.ns-neon .psm-link { text-shadow: none; }
.psm-view { font-size: 13px; padding: 4px 0; border-radius: 7px; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }
.psm-view.hidden { display: none; }
.me-wrap[class*=lay-] .psm-view { font-size: 14.5px; padding: 2px 0; }
.psm-view .nsx[class*=ns-] { font-weight: 600; }
.ps .nsx[class*=ns-], .pv-psm .nsx[class*=ns-], #cPsm .nsx[class*=ns-] { font-weight: 600; }
.sp-psm { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sty-n .nsx { max-width: 100%; }
@media (max-height: 500px) and (pointer: coarse) { .psm-view { display: none; } }

/* ===== 2.7 · Estilos exclusivos y de Halloween ===== */
.nsx.ns-diamante { background-image: linear-gradient(100deg, #60a5fa, #c4b5fd 30%, #f0abfc 45%, #fff 50%, #a5f3fc 55%, #60a5fa 75%, #818cf8); background-size: 250% 100%; animation: nsShine 3.2s ease-in-out infinite;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; filter: drop-shadow(0 0 4px rgba(147, 197, 253, .45)); }
:root:not([data-dark]) .nsx.ns-diamante { background-image: linear-gradient(100deg, #2563eb, #7c3aed 30%, #c026d3 45%, #93c5fd 50%, #0891b2 55%, #2563eb 75%, #6d28d9); }
.nsx.ns-calabaza { background-image: linear-gradient(90deg, #ea580c, #f59e0b 50%, #ea580c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; text-shadow: none; }
.ns-fantasma { color: #64748b; animation: nsGhost 3s ease-in-out infinite; }
:root[data-dark] .ns-fantasma { color: #e2e8f0; text-shadow: 0 0 10px rgba(226, 232, 240, .55); }
@keyframes nsGhost { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ns-diamante, .ns-fantasma { animation: none; } }
.nsx:is(.ns-diamante, .ns-calabaza) .ej { -webkit-text-fill-color: initial; color: initial; }
.messages.bubbles .mgroup.bs-diamante .msg:not(.has-media):not(.big), .bsw-diamante { background: linear-gradient(125deg, #6366f1, #8b5cf6 35%, #ec4899 65%, #06b6d4); background-size: 200% 200%; animation: bsShift 6s ease infinite; }
@keyframes bsShift { 50% { background-position: 100% 100%; } }
.messages.bubbles .mgroup.bs-telarana .msg:not(.has-media):not(.big), .bsw-telarana {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80' fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='1'%3E%3Cpath d='M0 0L80 80M80 0L0 80M40 0V80M0 40H80'/%3E%3Cpath d='M40 22L53 27 58 40 53 53 40 58 27 53 22 40 27 27Z'/%3E%3Cpath d='M40 8L62 18 72 40 62 62 40 72 18 62 8 40 18 18Z'/%3E%3C/svg%3E") center / 80px, linear-gradient(135deg, #1c1917, #431407 60%, #7c2d12); }
.sb-sw:is(.bsw-diamante, .bsw-telarana) { color: #fff; }
.sty-n.locked, .sty-b.locked { opacity: .55; border-style: dashed; }
.sty-n.ev, .sty-b.ev { border-color: #f59e0b66; background: linear-gradient(180deg, transparent, rgba(245, 158, 11, .08)); }
.pf-custom { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .pf-custom { grid-template-columns: 1fr; } }
/* Capa del efecto de Halloween */
.wink-layer.spooky { background: radial-gradient(ellipse at center, rgba(67, 20, 7, .25), rgba(10, 6, 20, .55)); animation: spookyIn .4s ease-out; }
@keyframes spookyIn { from { opacity: 0; } }

/* Aviso del evento */
.ev-banner { display: flex; gap: 10px; align-items: center; margin: 8px 10px; padding: 10px 10px 10px 12px; border-radius: 16px; color: #fff;
  background: radial-gradient(circle at 12% 30%, rgba(251, 146, 60, .45), transparent 55%), linear-gradient(135deg, #1c1917, #3b0764 70%, #7c2d12); box-shadow: 0 6px 18px rgba(59, 7, 100, .25); }
.ev-ic { font-size: 30px; animation: evBob 2.4s ease-in-out infinite; }
@keyframes evBob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.ev-t { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, .88); }
.ev-t b { display: block; font-size: 14px; color: #fdba74; margin-bottom: 1px; }
.ev-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ev-btns .btn { background: #f97316; border-color: #f97316; color: #fff; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.ev-x { color: rgba(255, 255, 255, .6) !important; width: 36px; height: 36px; font-size: 13px; }

/* ===== Ventana de novedades ===== */
.modal-card.wn-card { padding: 0; overflow: hidden; max-width: 460px; }
.wn { display: grid; }
.wn-head { position: relative; aspect-ratio: 2 / 1; background: linear-gradient(135deg, #2f7fe0, #7c4dff 55%, #e83e8c); overflow: hidden; }
.wn-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.wn-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.wn-fallback span { font-size: 54px; letter-spacing: 10px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.wn-body { padding: 18px 22px 4px; display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.wn-v { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.wn-body h2 { margin: 0 0 4px; }
.wn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wn-list li { display: flex; gap: 12px; align-items: flex-start; }
.wn-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; border-radius: 12px; background: var(--hover); }
.wn-list li > span:last-child { display: grid; gap: 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.wn-list b { color: var(--text); font-size: 14px; }
.wn .row { padding: 14px 22px 20px; margin: 0; }
.wn-ok { flex: 1; padding: 12px; font-size: 15px; }

/* ===== Juegos ===== */
.gm-list { display: grid; gap: 8px; }
.gm-pick { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); }
.gm-pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.gm-ic { font-size: 30px; }
.gm-pick b { display: block; font-size: 15px; }
.gm-pick small { color: var(--muted); font-size: 12.5px; }
.game { width: 260px; max-width: 100%; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); display: grid; gap: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.game.my-turn { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent), 0 4px 14px rgba(0, 0, 0, .06); }
.game-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 13.5px; }
.game-st { font-weight: 500; font-size: 12px; color: var(--muted); text-align: right; }
.game-st b { color: var(--accent); }
.game-pl { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; }
.gp { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 14px; background: var(--hover); max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp i { font-style: normal; font-weight: 800; }
.gp.p0 i { color: #e5484d; } .gp.p1 i { color: #2f7fe0; }
.gp b { margin-left: 2px; }
.gp.turn { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.gp.win { background: #fef3c7; color: #92400e; font-weight: 700; }
.gvs { font-size: 11px; color: var(--muted); }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tc { aspect-ratio: 1; border-radius: 12px; background: var(--hover); font-size: 34px; font-weight: 800; display: grid; place-items: center; color: var(--text); transition: transform .12s, background .12s; }
.tc:not(:disabled):hover { background: var(--accent-soft); transform: scale(1.04); }
.tc.p0 { color: #e5484d; } .tc.p1 { color: #2f7fe0; }
.tc.p0, .tc.p1 { animation: tcIn .22s ease-out; }
@keyframes tcIn { from { transform: scale(.4); opacity: 0; } }
.tc.line { background: #fef3c7; }
:root[data-dark] .tc.line { background: #78350f; }
.tc:disabled { cursor: default; }
.game:not(.my-turn) .tc:empty { opacity: .75; }
.mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; perspective: 600px; }
.mc { aspect-ratio: 1; padding: 0; border-radius: 10px; background: none; }
.mc-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.mc.up .mc-in { transform: rotateY(180deg); }
.mc-b, .mc-f { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mc-b { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .14) 0 6px, transparent 6px 12px), linear-gradient(135deg, var(--accent), #7c4dff); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.mem.th-halloween .mc-b { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 6px, transparent 6px 12px), linear-gradient(135deg, #f97316, #3b0764); }
.mc-f { transform: rotateY(180deg); background: var(--hover); font-size: 26px; }
.mc.ok.p0 .mc-f { background: #fee2e2; } .mc.ok.p1 .mc-f { background: #dbeafe; }
:root[data-dark] .mc.ok.p0 .mc-f { background: #7f1d1d; } :root[data-dark] .mc.ok.p1 .mc-f { background: #1e3a8a; }
.mc.miss .mc-f { box-shadow: inset 0 0 0 2px #e5484d; }
.mc:not(:disabled):hover .mc-b { filter: brightness(1.1); }
.mc:disabled { cursor: default; }
.game:not(.my-turn):not(.done) .mc:not(.up) { opacity: .8; }
.mc.busy .mc-in, .tc.busy { opacity: .6; }
.game-f { display: flex; justify-content: center; align-items: center; gap: 12px; }
.game-f:empty { display: none; }
.game-join { justify-self: center; }
.messages.bubbles .mgroup.mine .game { margin-left: auto; }

/* ===== Invitar ===== */
.inv-card { display: grid; gap: 4px; justify-items: center; }
.inv-card img { width: 100%; border-radius: 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--hover); }
.inv-reward { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 13px; background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(236, 72, 153, .12)); }
.inv-reward > span:first-child { font-size: 24px; }
.rw { display: grid; justify-items: center; text-align: center; gap: 6px; }
.rw-ic { font-size: 54px; animation: evBob 2.4s ease-in-out infinite; }
.rw h2 { margin: 0; }
.rw-prev { display: grid; gap: 8px; justify-items: center; padding: 12px 16px; border-radius: 16px; background: var(--hover); width: 100%; }
.rw-prev .nsx { font-size: 18px; font-weight: 700; }
.rw-prev .messages { padding: 0 !important; background: none !important; overflow: visible; }
.rw-prev .mgroup { margin: 0 !important; align-items: center !important; }

/* ===== Tu mes en MeZaje ===== */
.wr-offer { text-align: center; display: grid; gap: 4px; justify-items: center; }
.wr-offer-ic { font-size: 50px; }
.wr-offer h2 { margin: 0; }
.wrap-ov { position: fixed; inset: 0; z-index: 400; background: rgba(5, 8, 15, .82); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.wrap-ov.in { opacity: 1; }
.wrap-st { position: relative; width: min(420px, 100vw); height: min(760px, 100dvh); border-radius: 22px; overflow: hidden; color: #fff; display: grid;
  background: linear-gradient(160deg, #2f7fe0, #7c4dff 55%, #e83e8c); transition: background .4s; }
.wrap-st.w2 { background: linear-gradient(160deg, #0ea5e9, #2563eb 60%, #4338ca); }
.wrap-st.w3 { background: linear-gradient(160deg, #f97316, #db2777 60%, #7c3aed); }
.wrap-st.w4 { background: linear-gradient(160deg, #facc15, #f97316 55%, #dc2626); }
.wrap-st.w5 { background: linear-gradient(160deg, #10b981, #0891b2 60%, #1e40af); }
.wrap-st.w6 { background: linear-gradient(160deg, #1e1b4b, #5b21b6 60%, #be185d); }
.wrap-st.w7 { background: linear-gradient(160deg, #a16207, #ca8a04 50%, #f59e0b); }
@media (max-width: 480px) { .wrap-st { border-radius: 0; height: 100dvh; } }
.wrap-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
.wrap-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.wrap-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.wrap-bars i.done b { width: 100%; }
.wrap-bars i.now b { animation: wrBar linear forwards; }
@keyframes wrBar { to { width: 100%; } }
.wrap-x { position: absolute; top: 20px; right: 12px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 16px; background: rgba(0, 0, 0, .18); }
.wrap-prev, .wrap-next { position: absolute; top: 60px; bottom: 90px; z-index: 2; background: none; }
.wrap-prev { left: 0; width: 30%; } .wrap-next { right: 0; width: 70%; }
.wrap-slide { display: grid; place-items: center; padding: 60px 26px 30px; z-index: 1; }
.ws { display: grid; justify-items: center; text-align: center; gap: 10px; animation: wsIn .45s ease-out; width: 100%; }
@keyframes wsIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.ws-k { font-size: 17px; font-weight: 700; opacity: .9; }
.ws-k2 { font-size: 15px; opacity: .85; }
.ws-big { font-size: 34px; font-weight: 800; line-height: 1.1; word-break: break-word; }
.ws-num { font-size: 92px; font-weight: 900; line-height: 1; letter-spacing: -.03em; text-shadow: 0 6px 24px rgba(0, 0, 0, .2); }
.ws-s { font-size: 22px; font-weight: 700; }
.ws .avatar { width: 140px; height: 140px; border-radius: 34px; font-size: 52px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .85), 0 14px 30px rgba(0, 0, 0, .25); }
.ws-emo { font-size: 110px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .25)); }
.ws-emo .cemo { height: 120px; max-width: 220px; cursor: default; }
.ws-more { display: flex; gap: 18px; margin-top: 6px; }
.ws-more span { display: grid; justify-items: center; font-size: 40px; }
.ws-more .cemo { height: 44px; }
.ws-more small { font-size: 13px; font-weight: 700; opacity: .85; }
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ws-grid > div { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: rgba(255, 255, 255, .16); }
.wg-i { font-size: 30px; }
.ws-grid b { font-size: 32px; line-height: 1.1; }
.ws-grid span:not(.wg-i) { font-size: 13px; opacity: .9; }
.ws-grid small { font-size: 11.5px; opacity: .8; }
.ws-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ws-badges span { display: grid; justify-items: center; gap: 4px; padding: 14px 12px; min-width: 110px; border-radius: 18px; background: rgba(255, 255, 255, .18); font-weight: 700; font-size: 13.5px; }
.ws-badges i { font-style: normal; font-size: 44px; }
.ws-card { width: min(250px, 62vw); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, .15); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.ws-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-img:not([src]) { visibility: hidden; }
.ws-actions { position: relative; z-index: 5; }
.ws-share { background: #fff !important; color: #4338ca !important; border: 0; padding: 12px 26px; font-size: 15px; font-weight: 800; }
.wrap-st.w8 .wrap-next { display: none; }
.wrap-st.w8 .wrap-prev { width: 18%; }
.ev-banner { align-items: flex-start; position: relative; padding-right: 38px; }
.ev-btns { flex-direction: row; align-items: center; margin-top: 8px; }
.ev-x { position: absolute; top: 2px; right: 2px; }

/* ===== 2.8 · Conectar con gente ===== */
.request.rq-rich { align-items: flex-start; flex-wrap: wrap; margin: 4px 10px 6px; padding: 10px; border-radius: 14px; }
.request.rq-rich .who { cursor: pointer; flex: 1 1 140px; }
.request.rq-rich .who b { font-size: 14px; }
.rq-note { font-style: italic; color: var(--text); margin-top: 3px; overflow-wrap: anywhere; }
.request.rq-rich .ok, .request.rq-rich .no { align-self: center; padding: 7px 11px; }
.rq-head { display: flex; gap: 12px; align-items: center; }
.rq-head h2 { margin: 0 0 2px; }
.photo-view .rq-note { max-width: 320px; text-align: center; font-size: 15px; padding: 8px 14px; border-radius: 14px; background: var(--hover); margin-top: 8px; }
.rq-common, .pv-common { font-size: 12.5px; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 14px; margin-top: 8px; text-align: center; }
.pv-common { justify-self: center; margin: -4px auto 0; width: fit-content; max-width: 100%; }
.rq-common.muted { color: var(--muted); background: var(--hover); }
/* Quizá conozcas */
.sug { margin: 6px 10px 8px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.sug-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 2px 4px 6px; }
.sug-i { display: flex; align-items: center; gap: 8px; padding: 5px 2px; }
.sug-who { flex: 1; min-width: 0; display: grid; text-align: left; color: var(--text); }
.sug-who b, .sug-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-who b { font-size: 13.5px; font-weight: 600; }
.sug-add { padding: 5px 12px; font-size: 12.5px; background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 700; }
.sug-x { width: 36px; height: 36px; font-size: 12px; color: var(--muted); flex: none; }
/* Participantes del grupo */
.pk-add { margin-left: auto; flex: none; min-width: 36px; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 16px; }
.pk-add.in { font-size: 12.5px; background: var(--accent); color: #fff; }
.pk-add:hover { background: var(--accent); color: #fff; }
.pk-sent { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; padding: 0 10px; }
.pick .dot { margin-left: auto; }
.gl-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gl-open svg, .inv-share .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.qr-big { display: grid; place-items: center; padding: 6px 0; }
/* Tarjeta de contacto en el chat */
.ccard { width: 250px; max-width: 100%; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.cc-h { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 9px 12px 0; }
.cc-b { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; cursor: pointer; }
.cc-t { display: grid; min-width: 0; }
.cc-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-psm { font-style: italic; }
.cc-f { border-top: 1px solid var(--line); padding: 8px 12px; display: flex; justify-content: center; }
.cc-f .btn { width: 100%; padding: 8px; }
.cc-sent { color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px; }
.messages.bubbles .mgroup.mine .ccard { margin-left: auto; }
/* Privacidad */
.pol { display: grid; gap: 6px; }
.pol-o { display: flex !important; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; }
.pol-o:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pol-o input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.pol-o span { display: grid; }
.pol-o b { font-size: 14px; color: var(--text); }
.pol-o small { font-size: 12px; color: var(--muted); }
.request.rq-rich { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 8px; }
.request.rq-rich .rq-btns { grid-column: 2; display: flex; justify-content: flex-end; gap: 6px; }
.request.rq-rich .rq-btns .ok { padding: 7px 16px; }
.small.muted .link { color: var(--accent); font-size: inherit; }

/* ===== 2.9 · Modo fácil ===== */
.easy-head, .easy-bar, .easy-emo, .easy-only { display: none; }
.ez-open { display: grid !important; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px; height: auto; border-width: 2px; }
.ez-open > span { grid-row: span 2; font-size: 30px; }
.ez-open b { font-size: 15px; }
.ez-open small { font-weight: 400; font-size: 12px; color: var(--muted); }
.ez-intro { display: grid; justify-items: center; text-align: center; gap: 8px; }
.ez-big { font-size: 54px; line-height: 1; }
.ez-intro h2 { margin: 0; }
.ez-list { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; text-align: left; font-size: 15px; }

:root.easy { --ez: 20px; }
:root.easy.easy-xxl { --ez: 24px; }
/* Alto contraste: blanco y negro con bordes marcados */
:root.easy-hc { --bg: #ffffff !important; --panel: #ffffff !important; --text: #000000 !important; --muted: #2b2b2b !important; --line: #000000 !important; --hover: #eeeeee !important; --accent: #0047b3 !important; --accent-soft: #dbe7ff !important; }
:root.easy-hc body { background: #fff !important; }
:root.easy-hc body::before { display: none; }

/* Lo que se oculta */
:root.easy :is(#meWrap, .side-foot, #tabs, #pwaCard, #calBtn, #notesBtn, #expBtn, #watchPill, .conv-actions, #cNick, #ephBadge, #cdBar, #watchRoom, #notesPanel, .composer .tools, .emo-suggest, .fx-replay, .vfx-tag, .ev-banner, .sug, #vpFx, #vpRedo) { display: none !important; }
:root.easy .easy-only { display: inline; }

/* Cabecera «Hola, …» */
:root.easy .easy-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
:root.easy .eh-av .avatar { width: 58px; height: 58px; border-radius: 16px; cursor: pointer; }
:root.easy .eh-hi { flex: 1; display: grid; line-height: 1.15; min-width: 0; }
:root.easy .eh-hi small { font-size: calc(var(--ez) * .8); color: var(--muted); }
:root.easy .eh-hi b { font-size: calc(var(--ez) * 1.25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root.easy .eh-set { display: grid; justify-items: center; gap: 2px; padding: 8px 12px; border-radius: 16px; background: var(--hover); color: var(--text); font-size: calc(var(--ez) * .7); font-weight: 700; border: 2px solid var(--line); }
:root.easy .eh-set span { font-size: calc(var(--ez) * 1.3); line-height: 1; }

/* «Mis personas» */
:root.easy .list { padding: 6px 12px 20px; font-size: var(--ez); }
.ez-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { :root.easy .side .ez-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ez-tile { position: relative; display: grid; justify-items: center; gap: 8px; padding: 12px 10px 14px; border-radius: 22px; background: var(--panel); border: 2px solid var(--line); color: var(--text); text-align: center; min-height: 44px; }
.ez-tile:active { transform: scale(.98); }
.ez-tile.new { border-color: #e5383b; box-shadow: 0 0 0 3px rgba(229, 56, 59, .2); }
.ez-tile .ez-av { width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: 18px !important; font-size: 48px !important; box-shadow: none !important; }
.ez-tile b { font-size: var(--ez); line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; }
.ez-on { position: absolute; top: 18px; left: 18px; width: 22px; height: 22px; border-radius: 50%; background: #22c55e; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.ez-badge { position: absolute; top: 4px; right: 4px; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 20px; background: #e5383b; color: #fff; font-size: 22px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.ez-star { color: #f59e0b; margin-right: 4px; }
.ez-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 12px; font-size: var(--ez); }
.ez-empty span { color: var(--muted); }
:root.easy .request { font-size: calc(var(--ez) * .8); margin: 4px 0 10px; }
:root.easy .request button { font-size: calc(var(--ez) * .8); padding: 10px 16px; }
:root.easy :is(.mail-banner, .bday-banner) { font-size: calc(var(--ez) * .8); margin-left: 0; margin-right: 0; }

/* Conversación */
:root.easy .conv-head { padding: 10px 12px; gap: 10px; }
:root.easy #backBtn { width: auto; height: 52px; padding: 0 14px 0 8px; border-radius: 16px; background: var(--hover); border: 2px solid var(--line); display: inline-flex !important; align-items: center; gap: 4px; font-size: calc(var(--ez) * .85); font-weight: 700; color: var(--text); }
:root.easy #backBtn svg { width: 26px; height: 26px; }
@media (min-width: 761px) { :root.easy #backBtn { display: none !important; } }
:root.easy #cAvatar { width: 56px; height: 56px; border-radius: 16px; font-size: 22px; }
:root.easy .conv-name b { font-size: calc(var(--ez) * 1.1); }
:root.easy #cPsm { font-size: calc(var(--ez) * .7); }
:root.easy .conv-name .dot { width: 14px; height: 14px; }
:root.easy .messages { font-size: var(--ez); }
:root.easy .messages .msg { font-size: var(--ez) !important; line-height: 1.35; padding: 10px 14px 9px !important; }
:root.easy .messages .msg .tm { font-size: calc(var(--ez) * .6); }
:root.easy .messages .mhead { font-size: calc(var(--ez) * .75) !important; }
:root.easy .messages .sys, :root.easy .day-sep, :root.easy .receipt { font-size: calc(var(--ez) * .7); }
:root.easy .messages .img-msg { max-width: min(100%, 320px); max-height: 380px; }
:root.easy .voice { padding: 10px 16px 10px 10px; gap: 12px; border-width: 2px; }
:root.easy .vplay { width: 56px; height: 56px; }
:root.easy .vplay svg { width: 26px; height: 26px; }
:root.easy .vtime { font-size: calc(var(--ez) * .8); font-weight: 700; }
.say { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0 0 -10px 8px; border-radius: 50%; background: var(--accent-soft); font-size: 20px; vertical-align: middle; float: right; }
:root.easy .messages.bubbles .mgroup.bs-strong .say { background: rgba(255, 255, 255, .25); }
:root.easy-hc .messages.bubbles .msg:not(.has-media):not(.big) { background: #fff !important; color: #000 !important; box-shadow: 0 0 0 2px #000 !important; }
:root.easy-hc .messages.bubbles .mgroup.mine .msg:not(.has-media):not(.big) { background: #0047b3 !important; color: #fff !important; box-shadow: none !important; }
:root.easy-hc .messages.bubbles .mgroup.mine .msg .tm { color: rgba(255, 255, 255, .9); }
:root.easy .typing { font-size: calc(var(--ez) * .75); }

/* Botones de abajo: Audio, Foto y Escribir */
:root.easy .easy-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0 2px; }
:root.easy .composer.voice-mode .easy-bar { display: none; }
.eb { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; min-height: 92px; border-radius: 22px; font-size: calc(var(--ez, 20px) * .9); font-weight: 800; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.eb span { font-size: calc(var(--ez, 20px) * 1.6); line-height: 1; }
.eb-audio { background: #e5383b; } .eb-photo { background: #2563eb; } .eb-write { background: #16a34a; }
:root.easy-hc .eb { outline: 3px solid #000; }
:root.easy .composer.writing .eb-write { background: #0f5132; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); }
:root.easy .composer:not(.writing) #inputRow { display: none !important; }
:root.easy .composer.writing .easy-emo { display: flex; justify-content: space-between; gap: 4px; padding: 8px 0 2px; }
.easy-emo button { flex: 1; font-size: 30px; height: 52px; border-radius: 14px; background: var(--hover); }
:root.easy #inputRow { gap: 10px; padding-top: 8px; }
:root.easy #input { font-size: var(--ez); min-height: 58px; padding: 14px 16px; border-width: 2px; }
:root.easy #sendBtn { font-size: var(--ez); padding: 0 22px; min-height: 58px; border-radius: 18px; }

/* Grabar en modo fácil */
:root.easy .vp-mic { width: 120px; height: 120px; }
:root.easy .vp-mic svg { width: 52px; height: 52px; }
:root.easy .vp-hint { font-size: calc(var(--ez) * .9); font-weight: 700; color: var(--text); }
:root.easy .voice-panel.recording .vp-hint { color: #e5383b; }
:root.easy .vp-head b, :root.easy .vp-time { font-size: var(--ez); }
:root.easy .vp-play { width: 60px; height: 60px; }
:root.easy .vp-actions .btn { font-size: calc(var(--ez) * .9); padding: 14px 18px; min-height: 60px; }
:root.easy .vp-actions .btn.primary { flex: 1; }
:root.easy #vpClose { width: 48px; height: 48px; }

/* «✓ Enviado» */
.ez-sent { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9); z-index: 500; display: grid; justify-items: center; gap: 6px; padding: 22px 30px; border-radius: 26px; background: rgba(22, 163, 74, .95); color: #fff; font-size: 24px; font-weight: 800; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); animation: ezIn .2s ease-out forwards; pointer-events: none; }
.ez-sent span { font-size: 54px; line-height: 1; }
.ez-sent.out { opacity: 0; transition: opacity .35s; }
@keyframes ezIn { to { transform: translate(-50%, -50%) scale(1); } }

/* Avisos y ventanas más grandes */
:root.easy .toast { width: min(420px, calc(100vw - 24px)); font-size: calc(var(--ez) * .85); padding: 16px 18px; border-width: 2px; }
:root.easy .toast b { font-size: var(--ez); }
:root.easy .modal-card { font-size: calc(var(--ez) * .85); }
:root.easy .modal-card .btn { font-size: calc(var(--ez) * .85); min-height: 52px; }
/* Ajustes del modo fácil */
.ez-card h2.ez-h { font-size: 26px; margin: 0; }
.ez-sec { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
.ez-sec small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ez-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ez-seg button { padding: 14px; border-radius: 16px; border: 2px solid var(--line); font-weight: 800; font-size: 18px; color: var(--text); }
.ez-seg button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ez-check { display: flex !important; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); font-size: 18px; font-weight: 700; color: var(--text) !important; }
.ez-check input { width: 26px; height: 26px; accent-color: var(--accent); }
.ez-favs { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.ez-fav { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; border: 2px solid var(--line); color: var(--text); text-align: left; }
.ez-fav b { flex: 1; font-size: 18px; }
.ez-fav i { font-style: normal; font-size: 30px; color: var(--muted); }
.ez-fav.on { border-color: #f59e0b; background: rgba(245, 158, 11, .1); }
.ez-fav.on i { color: #f59e0b; }
.ez-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; font-size: 17px !important; border-width: 2px; }
.ez-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ez-exit { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 58px; border-radius: 16px; border: 2px dashed #e5383b; color: #b91c1c; font-weight: 800; font-size: 16px; user-select: none; -webkit-user-select: none; touch-action: none; }
.ez-exit i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(229, 56, 59, .18); }
.ez-exit.holding i { width: 100%; transition: width 2s linear; }
.ez-exit span { position: relative; }
.ez-done { flex: 1; min-height: 58px; font-size: 19px !important; }
:root.easy .vtime { white-space: nowrap; flex: none; }
:root.easy .vwave { min-width: 0; }
.say { float: none; margin: -4px 0 -6px 10px; }
:root.easy .eh-hi b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.1; }

/* ===== Novedades con portada ===== */
.news-entry.has-cover { padding-top: 0; overflow: hidden; }
.ne-cover { position: relative; margin: 0 -14px 4px; aspect-ratio: 2 / 1; background: linear-gradient(135deg, #2f7fe0, #7c4dff 55%, #e83e8c); overflow: hidden; }
.ne-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ne-ver { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ne-new.on-cover { position: absolute; right: 10px; top: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.news-entry.latest .ne-h b { font-size: 17px; }
/* Anteriores: portada en banda y plegadas */
.news-entry.folded { cursor: pointer; }
.news-entry.folded .ne-cover { aspect-ratio: 3.2 / 1; transition: aspect-ratio .3s; }
.news-entry.folded.open .ne-cover { aspect-ratio: 2 / 1; }
.news-entry.folded .ne-cover img { object-position: center 40%; }
.news-entry.folded:not(.open) .ne-items { display: none; }
.news-entry.folded .ne-h { display: flex; align-items: center; gap: 8px; }
.news-entry.folded .ne-h b { flex: 1; }
.ne-chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; flex: none; }
.news-entry.folded.open .ne-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.news-entry.folded:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.news-entry.folded:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== 3.0 · Cabecera: barra con la app y sus botones, foto más grande y filtro junto al buscador ===== */
.app-bar { position: relative; z-index: 4; display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; }
.ab-logo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.ab-logo img { width: 30px; height: 30px; border-radius: 9px; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.ab-logo b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ab-tools { display: flex; gap: 6px; flex: none; }
.ab-tools .icon-btn, .search-row .view-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--text); flex: none; }
.ab-tools .icon-btn svg, .search-row .view-btn svg { width: 20px; height: 20px; }
.ab-tools .icon-btn:hover, .search-row .view-btn:hover { background: var(--accent-soft); color: var(--accent); }
.me-wrap.has-cover .ab-tools .icon-btn, .me-wrap.has-cover .search-row .view-btn { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.me-wrap.tone-dark .ab-logo b { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.me-wrap.tone-dark :is(.ab-tools .icon-btn, .search-row .view-btn) { background: rgba(255, 255, 255, .18); color: #fff; }
.me-wrap.tone-light .ab-logo b { color: #111827; }
.me-wrap.tone-light :is(.ab-tools .icon-btn, .search-row .view-btn) { background: rgba(255, 255, 255, .6); color: #1f2937; }
.ab-tools .news-btn .news-dot { top: 6px; right: 6px; }
/* Placa del perfil: sin hueco a la derecha (el botón de novedades ya está arriba) y foto más grande */
.me-wrap .me { padding: 14px; gap: 16px; }
.me-wrap .me .avatar.lg { width: 104px; height: 104px; border-radius: 28px; font-size: 38px; }
.me-wrap .me-name { font-size: 22px; }
.me-wrap .me > .me-info { flex: 1; min-width: 0; }
/* El nombre y el mensaje personal pueden ocupar dos líneas antes de cortarse (en escritorio la columna es estrecha) */
.me-wrap .me-name { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.15; }
.me-wrap #mePsmView { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Buscador con el botón «Ver la lista por» */
.me-wrap .search-row { position: relative; align-items: center; gap: 8px; }
.me-wrap .search-row input { flex: 1; min-width: 0; height: 42px; border-radius: 14px; }
.search-row .view-btn.on { box-shadow: inset 0 0 0 2px var(--accent); }
.search-row .view-btn svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.view-menu { position: absolute; left: auto; right: 0; top: calc(100% + 6px); z-index: 40; width: 270px; max-width: calc(100vw - 32px); padding: 6px; border-radius: 16px; }
.view-menu .vm-t { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px 4px; }
.me-wrap .view-menu .vm-t { color: #6b7280; }
.view-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left; color: var(--text); }
.view-menu button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.view-menu button span { display: grid; flex: 1; }
.view-menu button b { font-size: 14px; }
.view-menu button small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.view-menu button.on { background: var(--accent-soft); color: var(--accent); }
.view-menu button.on::after { content: "✓"; font-weight: 800; }
.view-menu button:hover:not(.on) { background: var(--hover); }
.me-wrap .view-menu { color: var(--text); --muted: #6b7280; --hover: #f1f3f6; }
:root[data-dark] .me-wrap .view-menu { --muted: #9ca3af; --hover: rgba(255, 255, 255, .08); }
@media (max-width: 360px) { .me-wrap .me .avatar.lg { width: 84px; height: 84px; border-radius: 24px; } .ab-logo b { font-size: 18px; } .ab-tools .icon-btn { width: 36px; height: 36px; } }
@media (max-height: 500px) and (pointer: coarse) {
  .app-bar { margin-bottom: 6px; }
  .ab-logo img { width: 24px; height: 24px; } .ab-logo b { font-size: 17px; }
  .ab-tools .icon-btn, .search-row .view-btn { width: 34px; height: 34px; }
  .me-wrap .me { padding: 8px 10px; }
  .me-wrap .me .avatar.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }
  .me-wrap .search-row input { height: 36px; }
}
/* Pie de la lista: los cuatro botones caben también en móviles de 320 px */
.foot-btn { min-width: 0; }
.foot-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .foot-btn { font-size: 10px; letter-spacing: -.01em; } }
.side { min-width: 0; } /* sin esto, una canción o un estado muy largos ensanchaban la columna en móviles pequeños */

/* ===== 3.0 · Brillo de estado en la esquina de la placa del perfil ===== */
@property --stg { syntax: '<color>'; inherits: false; initial-value: rgba(0, 0, 0, 0); }
.me-wrap .me { position: relative; isolation: isolate; }
.me-wrap .me::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  --stg: var(--offline);
  background:
    radial-gradient(125% 100% at 0% 100%, color-mix(in srgb, var(--stg) 78%, transparent) 0%, color-mix(in srgb, var(--stg) 34%, transparent) 28%, transparent 56%);
  transition: --stg .6s ease;
}
.me-wrap .me[data-st=online]::before { --stg: var(--online); }
.me-wrap .me:is([data-st=busy], [data-st=phone])::before { --stg: var(--busy); }
.me-wrap .me:is([data-st=away], [data-st=brb], [data-st=lunch])::before { --stg: var(--away); }
.me-wrap .me[data-st=invisible]::before { --stg: color-mix(in srgb, var(--offline) 70%, transparent); }
.me-wrap.tone-light .me::before, .me-wrap:not(.has-cover) .me::before { opacity: .8; }
@media (max-height: 500px) and (pointer: coarse) { .me-wrap .me::before { background: radial-gradient(90% 140% at 0% 100%, color-mix(in srgb, var(--stg) 55%, transparent), transparent 55%); } }
:root.easy .me-wrap .me::before { display: none; }

/* ===== 3.0 · Foto de perfil animada ===== */
.avatar > .av-anim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; opacity: 0; transition: opacity .35s; pointer-events: none; }
.avatar > .av-anim.on { opacity: 1; }
.btn.an-open { display: flex; align-items: center; gap: 8px; }
.btn.an-open small { margin-left: auto; padding: 1px 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
#modalCard.an-card { width: min(440px, 100%); }
.an-wrap { display: grid; gap: 12px; }
.an-wrap h2 { margin-bottom: 0; }
.an-sub { margin: -6px 0 0; }
.an-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 26%; overflow: hidden; background: #0b0d10; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.an-stage > canvas, .an-stage > video, .an-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; touch-action: none; }
.an-stage > canvas { cursor: grab; }
.an-stage > canvas:active { cursor: grabbing; }
.an-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; text-align: center; color: #e5e7eb; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 45%, #111827), #0b0d10 70%); }
.an-empty span { font-size: 44px; }
.an-empty b { font-size: 15px; }
.an-empty small { font-size: 12.5px; opacity: .75; }
.an-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; font-weight: 800; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); background: rgba(0, 0, 0, .18); animation: an-pop .8s ease-out infinite; }
@keyframes an-pop { from { transform: scale(1.25); opacity: .4; } 30% { transform: scale(1); opacity: 1; } }
.an-prog { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.an-prog i { display: block; height: 100%; width: 0; background: #ef4444; border-radius: inherit; }
.an-src { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.an-src .btn { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 10px; font-weight: 600; }
.an-src .btn span { font-size: 18px; }
.an-rec { justify-self: center; display: flex; align-items: center; gap: 10px; padding: 10px 22px 10px 12px; border-radius: 40px; background: #ef4444; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 18px rgba(239, 68, 68, .4); }
.an-rec i { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 7px #ef4444, inset 0 0 0 9px #fff; }
.an-rec.busy { opacity: .7; pointer-events: none; }
.an-trim { display: grid; gap: 10px; }
.an-trim label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.an-trim label span { display: flex; justify-content: space-between; }
.an-trim label b { color: var(--accent); font-variant-numeric: tabular-nums; }
.an-trim input[type=range] { width: 100%; accent-color: var(--accent); }
.an-note:empty { display: none; }
.an-wrap .row { align-items: center; }
.an-wrap #anDel { margin-right: auto; }
@media (max-width: 380px) { .an-src { grid-template-columns: 1fr; } }

/* ===== 3.0 · Tinta: bote de pintura ===== */
#inkCanvas.tool-fill { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 20 20' fill='none' stroke='%231f2937' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 9.5l5.5-5.5 6 6-5.5 5.5a1.5 1.5 0 01-2.1 0L4.5 11.6a1.5 1.5 0 010-2.1z' fill='%23fff'/%3E%3Cpath d='M17 13.5s1.5 1.8 1.5 2.8a1.5 1.5 0 01-3 0c0-1 1.5-2.8 1.5-2.8z' fill='%231f2937'/%3E%3C/svg%3E") 17 18, cell; }
#inkCanvas.tool-erase { cursor: cell; }
.ink-sizes button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ink-sizes [data-fill].on { color: var(--accent); background: var(--accent-soft); }

/* ===== 3.0 · Cristal: el panel de notas va encima de la conversación, que ya tiene su propio desenfoque,
   y el navegador no puede desenfocar dos veces. Se le da un fondo casi opaco para que se lea bien. ===== */
:root[data-theme^=glass] .notes-panel { background: color-mix(in srgb, var(--bg) 97%, transparent); box-shadow: -10px 0 30px rgba(10, 20, 50, .14); }
:root[data-theme=glass-dark] .notes-panel { background: color-mix(in srgb, #121726 97%, transparent); box-shadow: -10px 0 30px rgba(0, 0, 0, .4); }
:root[data-theme^=glass] .notes-panel :is(#npText, .np-add input) { background: color-mix(in srgb, var(--panel) 70%, var(--bg)); }
:root[data-theme=glass-dark] .notes-panel :is(#npText, .np-add input) { background: rgba(255, 255, 255, .06); }

/* ===== 3.0 · Juegos: hasta 6 jugadores, tableros de memoria más grandes y cifras y letras ===== */
.game.wide { width: 300px; }
.game-pl.many { flex-wrap: wrap; gap: 5px; }
.game-pl.many .gp { max-width: calc(50% - 4px); }
.gp .gp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--muted)); flex: none; }
.gp.p0 { --pc: #e5484d; } .gp.p1 { --pc: #2f7fe0; } .gp.p2 { --pc: #2ea44f; } .gp.p3 { --pc: #f2711c; } .gp.p4 { --pc: #8e44ec; } .gp.p5 { --pc: #e83e8c; }
.gp.empty { background: none; border: 1px dashed var(--line); color: var(--muted); }
.gp.out { opacity: .45; text-decoration: line-through; }
.gp em { font-style: normal; color: var(--online); font-weight: 800; }
.mem { grid-template-columns: repeat(var(--cols, 4), 1fr); }
.mem[style*="--cols:6"] { gap: 4px; }
.mem[style*="--cols:6"] .mc-f { font-size: 20px; }
.mem[style*="--cols:6"] .mc, .mem[style*="--cols:6"] .mc-b, .mem[style*="--cols:6"] .mc-f { border-radius: 8px; }
.mc.ok.p2 .mc-f { background: #dcfce7; } .mc.ok.p3 .mc-f { background: #ffedd5; } .mc.ok.p4 .mc-f { background: #ede9fe; } .mc.ok.p5 .mc-f { background: #fce7f3; }
:root[data-dark] .mc.ok.p2 .mc-f { background: #14532d; } :root[data-dark] .mc.ok.p3 .mc-f { background: #7c2d12; } :root[data-dark] .mc.ok.p4 .mc-f { background: #4c1d95; } :root[data-dark] .mc.ok.p5 .mc-f { background: #831843; }
/* Opciones al retar */
.gm-seg { display: flex; gap: 6px; }
.gm-seg button { flex: 1; padding: 10px 0; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 800; font-size: 16px; }
.gm-seg button.on, .gm-sizes button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.gm-hint { margin: 4px 0 0; }
.gm-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gm-sizes button { display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 14px; border: 1.5px solid var(--line); }
.gm-sizes small { color: var(--muted); font-size: 11.5px; }
.gm-grid { display: grid; gap: 2px; margin-bottom: 6px; }
.gm-grid b { width: 7px; height: 7px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.gm-grid.g-s { grid-template-columns: repeat(4, 7px); } .gm-grid.g-m, .gm-grid.g-l { grid-template-columns: repeat(6, 7px); }
/* Cifras y letras */
.cyl-timer { position: relative; height: 22px; border-radius: 11px; background: var(--hover); overflow: hidden; }
.cyl-timer i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 30%, transparent); transition: width 1s linear; }
.cyl-timer.low i { background: color-mix(in srgb, var(--busy) 40%, transparent); }
.cyl-timer span { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 800; line-height: 22px; font-variant-numeric: tabular-nums; }
.cyl-letters { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.cyl-nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.cyl-t { aspect-ratio: 1 / 1.15; border-radius: 7px; background: linear-gradient(#fff, #eef2f7); color: #13203a; font-weight: 900; font-size: 17px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .12); display: grid; place-items: center; padding: 0; transition: transform .1s, opacity .15s; }
.cyl-t.num { aspect-ratio: auto; height: 38px; font-size: 16px; background: linear-gradient(#2f7fe0, #1f5fc4); color: #fff; }
.cyl-t:not(:disabled):active { transform: scale(.92); }
.cyl-t.used { opacity: .25; }
.cyl-t:disabled { cursor: default; }
.cyl-target { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.cyl-target small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cyl-target b { font-size: 34px; font-weight: 900; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--accent); }
.cyl-ops { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.cyl-op { height: 32px; border-radius: 8px; background: var(--hover); font-weight: 800; font-size: 16px; }
.cyl-op:active { transform: scale(.94); }
.cyl-line { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 4px 4px 12px; border-radius: 10px; border: 1.5px solid var(--line); }
.cyl-w { flex: 1; min-width: 0; font-weight: 800; letter-spacing: .06em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cyl-w.ph { font-weight: 400; letter-spacing: 0; color: var(--muted); font-size: 13px; }
.cyl-val { color: var(--accent); font-weight: 700; white-space: nowrap; }
.cyl-del { width: 34px; height: 32px; border-radius: 8px; font-size: 16px; color: var(--muted); }
.cyl-del:hover { background: var(--hover); color: var(--text); }
.cyl-acts { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.cyl-wait { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.cyl-wait b { color: var(--text); letter-spacing: .04em; }
.cyl-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cyl-res li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 9px; background: var(--hover); font-size: 12.5px; }
.cyl-res li b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.cyl-res li span { overflow-wrap: anywhere; letter-spacing: .02em; }
.cyl-res li em { font-style: normal; font-weight: 800; color: var(--muted); }
.cyl-res li.ok em { color: var(--online); }
.cyl-best { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.cyl-best b { color: var(--text); }
.game [data-cyl-next] { justify-self: center; }
.cyl-nx { font-variant-numeric: tabular-nums; }
/* 3.0 · Guiño Fuegote */
.wink-layer.hot { background: radial-gradient(ellipse at 50% 110%, rgba(255, 90, 20, .55), rgba(255, 40, 80, .18) 55%, transparent 80%); animation: wfade 3.2s both; }

/* ===== 3.0 · Editar y eliminar mensajes ===== */
.msg { position: relative; }
.m-more { position: absolute; top: 50%; transform: translateY(-50%); right: calc(100% + 4px); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--panel); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); opacity: 0; transition: opacity .15s; z-index: 2; }
.m-more svg { width: 16px; height: 16px; fill: currentColor; }
.msg.can-edit:hover .m-more, .m-more:focus-visible { opacity: 1; }
.m-more:hover { color: var(--text); }
@media (hover: none) { .m-more { display: none; } }
.messages:not(.bubbles) .m-more { right: auto; left: auto; position: static; transform: none; display: inline-grid; width: 22px; height: 22px; box-shadow: none; background: none; vertical-align: middle; margin-right: 2px; }
.msg.pressed { transform: scale(.97); transition: transform .15s; }
.msg.editing { outline: 2px solid var(--accent); outline-offset: 2px; }
.msg.deleted { font-style: italic; color: var(--muted) !important; background: none !important; border: 1px dashed var(--line) !important; box-shadow: none !important; }
.msg.deleted .del-txt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.msg.deleted .del-txt svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tm .edited { font-style: italic; }
.msg-menu { min-width: 210px; }
.msg-menu button svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.msg-menu .mm-note { padding: 6px 10px 4px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; }
.edit-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; margin: 0 12px; border-radius: 12px 12px 0 0; background: var(--accent-soft); color: var(--accent); border-left: 3px solid var(--accent); }
.edit-bar > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.edit-bar > span { flex: 1; min-width: 0; display: grid; font-size: 12.5px; }
.edit-bar .eb-txt { color: var(--text); opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-bar .icon-btn { width: 30px; height: 30px; color: var(--accent); }
.edit-bar .icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
:root.easy .edit-bar { display: none !important; }
@media (hover: none) { .msg.can-edit { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
/* Foto animada: la vista previa es el vídeo en directo; el lienzo de grabación va oculto detrás */
.an-stage > canvas.an-cv { opacity: 0; pointer-events: none; }
.an-stage > video.an-live { transform-origin: 50% 50%; will-change: transform; }
.an-stage.movable { cursor: grab; touch-action: none; }
.an-stage.movable:active { cursor: grabbing; }

/* ===== 3.1 · Tinta: selector de modo y modo artista ===== */
.ink-head { justify-content: space-between; align-items: center; }
.ink-mode { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--hover); }
.ink-mode button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ink-mode button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
#modalCard.art-card { max-width: none; width: min(1180px, 100%); height: min(860px, 94dvh); max-height: none; padding: 0; overflow: hidden; display: block; border-radius: 20px; }
.art { --art-desk: #e6eaf0; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; background: var(--panel); }
:root[data-dark] .art { --art-desk: #0d0f13; }
.art-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.art-sp { flex: 1; }
.art-ib { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--text); flex: none; }
.art-ib:hover:not(:disabled) { background: var(--hover); }
.art-ib:disabled { opacity: .35; }
.art-ib svg, .art-tools svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art-send { padding: 9px 18px; }
.art-stage { position: relative; overflow: hidden; background: var(--art-desk); }
.art-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.art-stage canvas[data-cur-tool="brush"], .art-stage canvas[data-cur-tool="erase"], .art-stage canvas[data-cur-tool="shape"] { cursor: crosshair; }
.art-stage canvas[data-cur-tool="hand"] { cursor: grab; }
.art-stage canvas[data-cur-tool="text"] { cursor: text; }
.art-stage canvas[data-cur-tool="pick"], .art-stage canvas[data-cur-tool="fill"], .art-stage canvas[data-cur-tool="sticker"] { cursor: cell; }
.art-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.art-zoom button { min-width: 32px; height: 30px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; padding: 0 6px; }
.art-zoom button:hover { background: var(--hover); }
.art-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 20px; background: rgba(17, 24, 39, .82); color: #fff; font-size: 12.5px; font-weight: 600; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.art-textin { position: absolute; z-index: 3; width: 220px; min-height: 44px; padding: 8px 10px; border: 2px dashed var(--accent); border-radius: 10px; background: rgba(255, 255, 255, .85); font-weight: 700; resize: none; outline: none; line-height: 1.15; }
.art-opts { min-height: 58px; padding: 8px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; align-content: center; }
.art-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.art-row::-webkit-scrollbar { display: none; }
.art-brushes button, .art-chips button, .art-pals button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 20px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); }
.art-brushes button span { font-size: 17px; }
.art-brushes button.on, .art-chips button.on, .art-pals button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.art-sls { gap: 18px; flex-wrap: wrap; overflow: visible; }
.art-sl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; flex: 1 1 180px; min-width: 0; }
.art-sl input { flex: 1; min-width: 70px; accent-color: var(--accent); }
.art-sl b { min-width: 34px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.art-note { color: var(--muted); font-size: 12px; }
.art-sws { gap: 7px; }
.art-sw { flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); position: relative; }
.art-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.art-more { display: grid; place-items: center; background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); cursor: pointer; overflow: hidden; }
.art-more span { color: #fff; font-weight: 800; font-size: 18px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); pointer-events: none; }
.art-more input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.art-rec small { flex: none; color: var(--muted); font-size: 11.5px; font-weight: 700; margin-right: 2px; }
.art-rec .art-sw { width: 24px; height: 24px; }
.art-stks button { flex: none; width: 42px; height: 42px; border-radius: 10px; font-size: 26px; display: grid; place-items: center; }
.art-stks button img { width: 30px; height: 30px; object-fit: contain; }
.art-stks button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.art-bgb i { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); background: #fff; }
.art-bgb.bg-cuaderno i { background: repeating-linear-gradient(#fffef6 0 4px, #c7d7ef 4px 5px); }
.art-bgb.bg-cuadricula i { background: #fff; background-image: linear-gradient(#dfe6f0 1px, transparent 1px), linear-gradient(90deg, #dfe6f0 1px, transparent 1px); background-size: 5px 5px; }
.art-bgb.bg-pizarra i { background: #22382e; }
.art-bgb.bg-negro i { background: #111318; }
.art-bgb.bg-foto i { background: linear-gradient(135deg, #f59e0b, #ec4899 60%, #6366f1); }
.art-tools { display: flex; gap: 2px; padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; justify-content: center; }
.art-tools::-webkit-scrollbar { display: none; }
.art-tools button { flex: none; display: grid; justify-items: center; gap: 3px; min-width: 62px; padding: 6px 4px; border-radius: 12px; font-size: 11px; font-weight: 600; color: var(--muted); }
.art-tools button:hover { background: var(--hover); color: var(--text); }
.art-tools button.on { background: var(--accent-soft); color: var(--accent); }
.art-tools button.act:not(.on) { color: var(--accent); }
.art-div { flex: none; width: 1px; margin: 6px 4px; background: var(--line); }
.art-colorbtn i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--line); }
.art-confirm { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(15, 20, 30, .35); padding: 16px; }
.art-confirm > div { width: min(340px, 100%); background: var(--panel); border-radius: 16px; padding: 20px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.art-confirm span { color: var(--muted); font-size: 13.5px; }
.art-confirm .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.art-confirm .danger-btn { background: var(--danger); border-color: var(--danger); }
@media (max-width: 760px) {
  #modalCard.art-card { width: 100%; height: var(--vvh, 100dvh); border-radius: 0; animation: none; }
  #modalCard.art-card::before { display: none; }
  .art-top { padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .art-top .ink-mode button { padding: 6px 9px; }
  .art-tools { justify-content: flex-start; }
  .art-tools button { min-width: 56px; }
  .art-opts { padding: 8px 10px; }
  .art-sls { gap: 10px; }
  .art-sl { flex-basis: 100%; }
}
/* «Ver cómo se dibujó» */
.img-wrap { position: relative; display: inline-block; }
.ink-play { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; border-radius: 16px; background: rgba(17, 24, 39, .78); color: #fff; font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ink-play svg { width: 14px; height: 14px; fill: currentColor; }
.ink-play:hover { background: rgba(17, 24, 39, .92); }
#modalCard.art-play-card { max-width: 720px; }
.art-play { display: grid; gap: 12px; }
.art-play-h { display: flex; align-items: center; justify-content: space-between; }
.art-play-st { position: relative; height: min(62dvh, 540px); display: grid; place-items: center; background: var(--hover); border-radius: 14px; overflow: hidden; }
.art-play-st canvas { border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.art-play-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px; }
.art-play-bar { display: flex; align-items: center; gap: 12px; }
.art-play-prog { flex: 1; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.art-play-prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.art .art-sl { display: flex; grid-template-columns: none; }
@media (max-width: 760px) {
  .art-tools { gap: 0; padding-left: 4px; padding-right: 4px; }
  .art-tools button { min-width: 46px; padding: 8px 4px; }
  .art-tools button span { display: none; }
  .art-tools .art-colorbtn { order: -2; }
  .art-tools .art-div { order: -1; }
  .art-sls { gap: 2px; }
  .art-sl { font-size: 12px; }
}

/* ===== 3.1 · MeZaje: el punto de la j es un punto de estado verde ===== */
.ab-logo .jd { position: relative; }
.ab-logo .jd::after { content: ''; position: absolute; left: .02em; top: .06em; width: .27em; height: .27em; border-radius: 50%; background: linear-gradient(#6ee07a, #2fa84a); box-shadow: 0 0 0 .045em var(--jd-ring, transparent); }

/* ===== 3.1 · Ayuda de instalación al llegar desde la web ===== */
.inst-land { text-align: center; }
.inst-land > img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 6px 20px rgba(31, 95, 196, .3); margin: 4px auto 6px; display: block; }
.inst-land h2 { margin: 6px 0 4px; }
.inst-land #ilText { margin: 0 0 12px; }
.inst-land .ios-steps { text-align: left; }
.inst-land .row { justify-content: center; }
.auth-card .auth-icon { width: 72px; height: 72px; border-radius: 19px; margin: 0 auto 4px; display: block; box-shadow: 0 8px 22px rgba(31, 95, 196, .3); }
.brand .jd { position: relative; font-weight: inherit; color: inherit; }
.brand .jd::after { content: ''; position: absolute; left: .02em; top: .06em; width: .27em; height: .27em; border-radius: 50%; background: linear-gradient(#6ee07a, #2fa84a); }

/* ===== 3.2 · Guiños nuevos ===== */
.wink-layer.dreamy { background: radial-gradient(ellipse at 50% 50%, rgba(255, 182, 230, .35), rgba(180, 140, 255, .18) 60%, transparent 85%); animation: wfade 3.2s both; }
.wink-layer.hack { background: rgba(0, 12, 6, .9); animation: wfade 3.2s both; }
.wink-layer.hack::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .35) 2px 4px); pointer-events: none; }
.wk.mtx { font-family: "Courier New", monospace; font-weight: 700; line-height: 1.05; color: #39ff88; text-shadow: 0 0 8px rgba(57, 255, 136, .8); transform-origin: top; }
.wk.glitch { left: 0 !important; width: 100%; }
.wk.hacktxt { font-family: "Courier New", monospace; color: #39ff88; text-align: center; line-height: 1.05; letter-spacing: .08em;
              text-shadow: 3px 0 rgba(255, 0, 90, .8), -3px 0 rgba(0, 200, 255, .8), 0 0 18px rgba(57, 255, 136, .7); z-index: 3; }
.wk.flashw { left: 0 !important; top: 0 !important; width: 100%; height: 100%; background: #fff; }
.wk.bfly { filter: drop-shadow(0 4px 8px rgba(120, 60, 160, .35)); }

/* ===== 3.2 · Vídeos y PDF ===== */
.toast .tbar { display: block; height: 4px; width: 0; margin-top: 7px; border-radius: 3px; background: var(--accent, #2f7fe0); transition: width .25s; }
.vid-wrap { position: relative; display: inline-block; max-width: 100%; }
.vid-msg { background: #000; object-fit: cover; min-width: 140px; min-height: 100px; }
video.vid-msg { width: min(320px, 100%); }
.vid-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center;
            background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; transition: transform .15s; }
.vid-play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.vid-wrap:hover .vid-play { transform: scale(1.08); }
.vid-dur { position: absolute; right: 8px; bottom: 12px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.vw-stage .vw-video { max-width: 100%; max-height: 100%; border-radius: 6px; background: #000; animation: vwIn .2s ease-out; }
.pdf-card { display: flex; flex-direction: column; width: min(280px, 100%); padding: 0; margin: 4px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
            background: var(--panel, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pdf-card:hover { border-color: var(--accent, #2f7fe0); }
.pdf-thumb { display: block; max-height: 190px; overflow: hidden; background: #f1f3f6; border-bottom: 1px solid var(--line); }
.pdf-thumb img { display: block; width: 100%; height: auto; }
.pdf-info { display: flex; align-items: center; gap: 10px; padding: 9px 11px; min-width: 0; }
.pdf-ic { flex: none; width: 34px; height: 40px; border-radius: 6px; display: grid; place-items: center; background: #e5484d; color: #fff; font: 800 11px/1 system-ui, sans-serif; letter-spacing: .03em; }
.pdf-tx { display: flex; flex-direction: column; min-width: 0; }
.pdf-tx .fn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer.pdfv .pdf-scroll { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; padding: 8px 12px 40px; }
.viewer.pdfv .pdf-pages { --z: 1; width: min(calc(var(--z) * 100%), calc(var(--z) * 860px)); margin: 0 auto; display: grid; gap: 12px; }
.viewer.pdfv .pdf-page { width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); overflow: hidden; }
.viewer.pdfv .pdf-page canvas { display: block; width: 100%; height: auto; }
.viewer.pdfv .pdf-msg { text-align: center; padding: 60px 20px; color: #cfd5e2; line-height: 1.8; }
.viewer.pdfv a.vw-btn { text-decoration: none; color: inherit; }

/* ===== 3.2 · Responder a un mensaje ===== */
.m-quote { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 150px; max-width: 320px; margin: 0 0 5px; padding: 5px 8px 5px 9px; border: 0; border-left: 3px solid var(--accent);
           border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.m-quote:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.m-quote .q-tx { flex: 1; min-width: 0; display: grid; font-size: 12.5px; line-height: 1.3; }
.m-quote .q-tx b { color: var(--accent); font-weight: 700; }
.m-quote .q-tx span { opacity: .8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.m-quote img { flex: none; width: 38px; height: 38px; object-fit: cover; border-radius: 6px; }
.msg.has-media .m-quote { max-width: min(320px, 100%); }
.msg.replying { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.msg.flash { animation: msgFlash 1.4s ease-out; }
@keyframes msgFlash { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.mgroup:not(.mine) .m-more { right: auto; left: calc(100% + 4px); }
.reply-bar + .composer, .composer.replying-msg { border-top-left-radius: 0; border-top-right-radius: 0; }

/* ===== 3.3 · Juegos nuevos ===== */
.game.xwide { width: min(360px, 100%); }
/* 4 en raya */
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 6px; border-radius: 12px; background: linear-gradient(#2f6fe0, #1f56b8); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.c4c { display: grid; grid-template-rows: repeat(6, 1fr); gap: 3px; padding: 2px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.c4c:not(:disabled):hover { background: rgba(255, 255, 255, .14); }
.c4c:disabled { cursor: default; }
.c4d { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--panel); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .25); }
.c4d.p0 { background: radial-gradient(circle at 35% 30%, #ff8a8a, #e5484d 60%, #b5262b); }
.c4d.p1 { background: radial-gradient(circle at 35% 30%, #ffe680, #f5c400 60%, #c79a00); }
.c4d.line { box-shadow: 0 0 0 3px #fff, 0 0 12px 3px rgba(255, 255, 255, .8); }
.c4d.drop { animation: c4drop .45s cubic-bezier(.3, 0, .5, 1.25) both; }
@keyframes c4drop { from { transform: translateY(calc(var(--r) * -112%)); } }
/* Hundir la flota */
.fl-boards { display: grid; gap: 10px; }
.fl-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.fl-t small { font-weight: 500; color: var(--muted); }
.fl-grid { display: grid; grid-template-columns: 14px repeat(10, 1fr); gap: 2px; }
.fl-grid.mine:not(.big) { grid-template-columns: 10px repeat(10, 1fr); gap: 1px; max-width: 220px; margin: 0 auto; }
.fl-h { font-style: normal; font-size: 9px; color: var(--muted); display: grid; place-items: center; }
.fl-c { aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; background: color-mix(in srgb, #3b8cf0 16%, var(--panel)); font: 700 11px/1 system-ui, sans-serif; color: #fff; display: grid; place-items: center; font-style: normal; }
button.fl-c { cursor: crosshair; }
button.fl-c:hover { background: color-mix(in srgb, #3b8cf0 40%, var(--panel)); box-shadow: inset 0 0 0 2px #2f7fe0; }
.fl-c.ship { background: #64748b; }
.fl-c.ship.ghost { background: color-mix(in srgb, #64748b 45%, var(--panel)); }
.fl-c.water { background: color-mix(in srgb, #3b8cf0 30%, var(--panel)); color: #1f5fc4; }
.fl-c.hit { background: #f97316; }
.fl-c.sunk { background: #b91c1c; }
.fl-c.ship.hit { background: #ea580c; }
.fl-place .fl-grid.big { max-width: 260px; margin: 0 auto; }
.fl-note { text-align: center; margin: 2px 0 0; }
.fl-last { margin: 0; text-align: center; font-size: 12.5px; font-weight: 600; padding: 5px 8px; border-radius: 10px; background: var(--hover); }
.fl-last.h { background: #ffedd5; color: #9a3412; } .fl-last.s { background: #fee2e2; color: #991b1b; }
@media (min-width: 900px) { .game.xwide[data-kind="flota"] { width: 460px; } .fl-boards { grid-template-columns: 1.25fr 1fr; align-items: start; } }
/* Bingo */
.bg-top { display: flex; align-items: center; gap: 10px; }
.bg-ball { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 900 24px/1 system-ui, sans-serif; color: #13203a;
           background: radial-gradient(circle at 35% 30%, #fff, #ffe680 45%, #f5b700); box-shadow: 0 4px 10px rgba(0, 0, 0, .2), inset 0 -3px 6px rgba(0, 0, 0, .15); animation: bgIn .5s cubic-bezier(.3, 1.5, .5, 1); }
.bg-ball.empty { background: var(--hover); color: var(--muted); animation: none; }
@keyframes bgIn { from { transform: scale(.2) rotate(-120deg); } }
.bg-info { flex: 1; min-width: 0; display: grid; gap: 5px; }
.bg-last { display: flex; gap: 4px; min-height: 24px; }
.bg-last i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--hover); }
.bg-timer { margin: 0; }
.bg-tag { font-size: 11.5px; font-weight: 700; color: #b45309; }
.bg-voice { flex: none; border: 0; background: var(--hover); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.bg-card { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; padding: 5px; border-radius: 10px; background: #fff7e0; border: 2px solid #f5b700; }
.bg-card i { font-style: normal; aspect-ratio: 1 / 1.05; display: grid; place-items: center; font: 700 12px/1 system-ui, sans-serif; color: #13203a; background: #fff; border-radius: 4px; }
.bg-card i.blank { background: #fde68a; }
.bg-card i.on { background: radial-gradient(circle, #e5484d 0 55%, #fff 57%); color: #fff; }
.bg-card i.last { animation: bgMark .6s ease-out; }
@keyframes bgMark { 50% { transform: scale(1.25); } }
.bg-acts .btn { flex: 1; }
.btn.hot { animation: bgHot 1s ease-in-out infinite; }
@keyframes bgHot { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent); } }
.bg-others { display: grid; gap: 4px; }
.bg-o { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; font-size: 11.5px; }
.bg-o i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--pc, var(--accent)) calc(var(--v) * 100%), var(--hover) 0); }
.bg-o.p0 { --pc: #e5484d; } .bg-o.p1 { --pc: #2f7fe0; } .bg-o.p2 { --pc: #2ea44f; } .bg-o.p3 { --pc: #f2711c; } .bg-o.p4 { --pc: #8e44ec; } .bg-o.p5 { --pc: #e83e8c; }
.bg-win { margin: 0; text-align: center; font-weight: 800; font-size: 15px; }
/* Quién es quién */
.qq-mine { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: var(--hover); }
.qq-mine small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.qq-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.qc { position: relative; display: grid; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--hover); cursor: pointer; font: inherit; color: inherit; transition: transform .2s, opacity .2s, filter .2s; }
.qc .qc-pic { display: block; aspect-ratio: 80 / 92; overflow: hidden; background: #e2e8f0; }
.qc .qc-pic svg, .qc .qc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qc .qc-pic b { display: grid; place-items: center; height: 100%; font-size: 22px; color: #fff; background: #94a3b8; }
.qc .qc-n { font-size: 9.5px; font-weight: 700; padding: 2px 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.qc.down { opacity: .28; filter: grayscale(1); transform: scale(.94); }
.qc.mine { box-shadow: 0 0 0 2px #f5b700; }
.qc.sm { width: 52px; flex: none; cursor: default; }
.qc.pick { animation: qcPick 1.2s ease-in-out infinite; }
@keyframes qcPick { 50% { box-shadow: 0 0 0 2px var(--accent); } }
.qc-tag { position: absolute; left: 2px; right: 2px; top: 2px; font-style: normal; font-size: 8.5px; font-weight: 800; color: #fff; background: var(--pc, #333); border-radius: 4px; padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-tag.p0 { --pc: #e5484d; } .qc-tag.p1 { --pc: #2f7fe0; } .qc-tag.p2 { --pc: #2ea44f; } .qc-tag.p3 { --pc: #f2711c; } .qc-tag.p4 { --pc: #8e44ec; } .qc-tag.p5 { --pc: #e83e8c; }
.qq-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 11.5px; }
.qq-log li { padding: 4px 7px; border-radius: 8px; background: var(--hover); }
.qq-log .si { color: #16a34a; } .qq-log .no { color: #dc2626; } .qq-log li.ok { background: #dcfce7; color: #14532d; } .qq-log li.ko { background: #fee2e2; color: #7f1d1d; }
.qq-ask { display: grid; gap: 6px; }
.qq-ask p { margin: 0; font-size: 12.5px; }
.qq-ask.in { padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.qq-sel, .qq-in { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 13px; }
.gm-modes { display: grid; grid-template-columns: 1fr 1fr; }
.gm-modes button { display: grid; gap: 2px; text-align: left; padding: 9px 10px; }
.gm-modes small { font-weight: 400; font-size: 11px; color: var(--muted); }
/* Zona de jugadores */
.gz-head { display: flex; align-items: center; gap: 12px; }
.gz-head > span { font-size: 40px; }
.gz-head h2 { margin: 0; } .gz-head small { color: var(--muted); }
.gz-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.gz-stats div { display: grid; text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--hover); }
.gz-stats b { font-size: 20px; } .gz-stats small { font-size: 11px; color: var(--muted); }
.gz-streak { margin: 8px 0 0; text-align: center; font-weight: 700; color: #ea580c; }
.gz-kinds, .gz-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gz-kinds li, .gz-rank li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.gz-kinds em, .gz-rank em { font-style: normal; font-weight: 700; }
.gz-kinds small, .gz-rank small { color: var(--muted); font-size: 11.5px; }
.gz-rank li { grid-template-columns: 26px auto 1fr auto auto; }
.gz-rank li.me { box-shadow: inset 0 0 0 2px var(--accent); }
.gz-pos { text-align: center; font-weight: 800; }
.gz-av { display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #94a3b8; color: #fff; font-weight: 700; }
.gz-av img { width: 100%; height: 100%; object-fit: cover; }
.gz-tros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gz-tro { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--hover); opacity: .45; filter: grayscale(1); }
.gz-tro.on { opacity: 1; filter: none; background: color-mix(in srgb, #f5b700 18%, var(--hover)); }
.gz-tro i { font-style: normal; font-size: 24px; } .gz-tro b { font-size: 11.5px; } .gz-tro small { font-size: 10px; color: var(--muted); line-height: 1.25; }
.gz-filter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.gz-filter button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 13px; color: inherit; }
.gz-filter button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.gz-open { margin-right: auto; }

/* ===== 3.3 · Más juegos ===== */
/* Piedra, papel o tijera */
.pp-info { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.pp-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-pick button { display: grid; justify-items: center; gap: 2px; padding: 12px 4px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card, var(--bg)); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pp-pick button i { font-style: normal; font-size: 34px; line-height: 1; }
.pp-pick button small { font-weight: 700; font-size: 12px; }
.pp-pick button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); }
.pp-pick button:disabled { opacity: .5; }
.pp-last { text-align: center; padding: 8px; border-radius: 12px; background: var(--hover); }
.pp-last small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pp-last p { margin: 4px 0 0; font-weight: 700; font-size: 13px; }
.pp-hands { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.pp-h { display: grid; justify-items: center; font-size: 11.5px; opacity: .75; }
.pp-h i { font-style: normal; font-size: 30px; line-height: 1.1; animation: ppShake .6s ease-out; }
.pp-h b { font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-h em { font-style: normal; font-weight: 800; color: var(--online); }
.pp-h.won { opacity: 1; } .pp-h.won b { font-weight: 800; }
@keyframes ppShake { 0% { transform: translateY(0) rotate(0); } 20%, 60% { transform: translateY(-6px) rotate(-12deg); } 40%, 80% { transform: translateY(0) rotate(0); } 100% { transform: scale(1.12); } }
.pp-hist { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pp-hist span { padding: 2px 7px; border-radius: 8px; background: var(--hover); font-size: 13px; letter-spacing: 1px; }

/* Preguntados */
.tv-top { display: flex; justify-content: space-between; align-items: center; }
.tv-cat { padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); font-weight: 800; font-size: 12px; }
.tv-top small { color: var(--muted); font-weight: 700; }
.tv-q { position: relative; margin: 0; font-weight: 800; font-size: 15px; line-height: 1.3; text-align: center; padding: 6px 4px; }
.tv-q.pre { color: transparent; text-shadow: 0 0 9px rgba(0,0,0,.35); user-select: none; }
.tv-cd { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: var(--accent); text-shadow: none; }
.tv-cd:empty { display: none; }
.tv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tv-opts.pre { visibility: hidden; }
.tv-o { position: relative; display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, var(--bg)); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; }
.tv-o b { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--hover); font-size: 11px; }
.tv-o span { overflow-wrap: anywhere; }
.tv-o:not(:disabled):hover { border-color: var(--accent); }
.tv-o:disabled { cursor: default; }
.tv-o.mine { border-color: var(--accent); background: var(--accent-soft); }
.tv-o.ok { border-color: var(--online); background: color-mix(in srgb, var(--online) 16%, transparent); font-weight: 700; }
.tv-o.ok b { background: var(--online); color: #fff; }
.tv-o.bad { border-color: var(--busy); background: color-mix(in srgb, var(--busy) 12%, transparent); }
.tv-who { position: absolute; right: 6px; bottom: 4px; display: flex; gap: 2px; font-style: normal; }
.tv-who .gp-dot { width: 8px; height: 8px; border-radius: 50%; display: block; }
.gp-dot.p0 { --pc: #e5484d; } .gp-dot.p1 { --pc: #2f7fe0; } .gp-dot.p2 { --pc: #2ea44f; } .gp-dot.p3 { --pc: #f2711c; } .gp-dot.p4 { --pc: #8e44ec; } .gp-dot.p5 { --pc: #e83e8c; }
.tv-pts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.tv-pts .gp { max-width: none; font-size: 12px; }
@media (max-width: 380px) { .tv-opts { grid-template-columns: 1fr; } }

/* Dibuja y adivina */
.px-top { display: grid; justify-items: center; gap: 4px; text-align: center; }
.px-top small { color: var(--muted); }
.px-word { font-size: 13px; } .px-word b { font-size: 17px; letter-spacing: .08em; color: var(--accent); }
.px-mask { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 4px; }
.px-mask i { width: 18px; height: 24px; border-bottom: 3px solid var(--text); font-style: normal; font-weight: 800; font-size: 16px; line-height: 22px; text-align: center; }
.px-mask i.sp { border: 0; width: 8px; }
.px-mask small { width: 100%; color: var(--muted); font-size: 11px; }
.px-wrap { border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: #fff; line-height: 0; }
.px-cv { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; }
.px-cv.can { touch-action: none; cursor: crosshair; }
.px-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.px-tools button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card, var(--bg)); display: grid; place-items: center; cursor: pointer; font-size: 14px; padding: 0; color: var(--text); }
.px-tools .px-c { background: var(--c); }
.px-tools .px-c[style*="#ffffff"] { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 50% / 10px 10px; }
.px-tools .on { box-shadow: 0 0 0 2px var(--card, var(--bg)), 0 0 0 4px var(--accent); }
.px-tools .px-w i { width: var(--s); height: var(--s); border-radius: 50%; background: var(--text); }
.px-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.px-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; max-height: 120px; overflow: auto; }
.px-feed li { padding: 3px 8px; border-radius: 8px; background: var(--hover); overflow-wrap: anywhere; }
.px-feed li.ok { background: color-mix(in srgb, var(--online) 16%, transparent); font-weight: 600; }
.px-feed li.close { background: color-mix(in srgb, #f2b01c 22%, transparent); }
.px-guess { display: flex; gap: 6px; }
.px-guess input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card, var(--bg)); color: var(--text); font: inherit; font-size: 16px; }

/* Dominó */
.dm-table { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px; padding: 10px; min-height: 52px; border-radius: 14px; background: radial-gradient(circle at 30% 20%, #2f8f5b, #1d6b42); box-shadow: inset 0 2px 8px rgba(0,0,0,.35); }
.dm-table p { margin: 0; color: rgba(255,255,255,.85) !important; text-align: center; }
.dm-t { --u: 15px; display: inline-flex; flex: none; background: linear-gradient(#fffdf6, #efe8d6); border-radius: 4px; box-shadow: 0 1px 0 #c9bea4, 0 2px 4px rgba(0,0,0,.3); padding: 1px; }
.dm-t.dbl { flex-direction: column; }
.dm-h { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: var(--u); height: var(--u); padding: 2px; gap: 1px; }
.dm-t:not(.dbl) .dm-h + .dm-h { border-left: 1px solid #b9ad92; }
.dm-t.dbl .dm-h + .dm-h { border-top: 1px solid #b9ad92; }
.dm-h b { border-radius: 50%; }
.dm-h b.on { background: #1b1f29; }
.dm-t.new { animation: dmIn .5s ease-out; box-shadow: 0 0 0 2px #ffd54a, 0 2px 4px rgba(0,0,0,.3); }
@keyframes dmIn { from { transform: scale(1.5); opacity: 0; } }
.dm-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.dm-info b { color: var(--text); }
.dm-last { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.dm-hand { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding: 4px 0; }
.dm-hand .dm-t { --u: 22px; }
.dm-hand .dm-t.no { opacity: .45; }
.dm-b { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; transition: transform .15s; }
.dm-b .dm-t { box-shadow: 0 0 0 2px var(--accent), 0 3px 6px rgba(0,0,0,.3); }
.dm-b:hover, .dm-b.sel { transform: translateY(-4px); }
.dm-b.sel .dm-t { box-shadow: 0 0 0 3px #ffd54a, 0 5px 8px rgba(0,0,0,.35); }
.dm-side { flex-wrap: wrap; justify-content: center; }
.dm-end { display: grid; gap: 6px; }
.dm-end > div { display: flex; align-items: center; flex-wrap: wrap; align-items: center; gap: 3px; font-size: 12.5px; }
.dm-end > div b { margin-right: 4px; }
.dm-end > div small { margin-left: auto; color: var(--muted); font-weight: 700; }
.dm-end .dm-t.sm { --u: 11px; }
@media (min-width: 900px) { .game.xwide[data-kind="pict"], .game.xwide[data-kind="domino"] { width: 420px; } }

/* ===== 3.4 ===== */
.avatar.xs { width: 24px; height: 24px; font-size: 10px; border-radius: 7px; flex: none; }
/* Silenciar */
.mute-ic { font-size: .8em; opacity: .7; margin-left: 2px; }
.badge.mute { background: var(--muted) !important; }
.mute-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mute-opts .btn { padding: 12px; font-weight: 700; }
.mute-now { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--hover); font-size: 13px; }
#convMenu button small { font-weight: 400; }
.bot-tag { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, #7c4dff 16%, transparent); color: #7c4dff; font-size: 10.5px; font-weight: 700; line-height: 16px; }
.gm-bot { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #7c4dff 10%, transparent); }
/* Menciones */
.composer { position: relative; }
.mention { font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0 3px; }
.mention.to-me, .mention.all { background: #fff1bf; color: #8a5a00; }
.msg.mention-me { box-shadow: inset 3px 0 0 #ffca28; }
#messages.bubbles .msg.mention-me { box-shadow: 0 0 0 2px #ffca28; }
.mention-pop { position: absolute; left: 10px; right: 10px; bottom: calc(100% - 4px); z-index: 30; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); padding: 5px; display: grid; gap: 2px; }
.mention-pop.hidden { display: none; }
.mp-it { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mp-it b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-it small { color: var(--muted); font-size: 12px; margin-left: auto; }
.mp-it.on, .mp-it:hover { background: var(--accent-soft); }
.mp-av { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
/* Sobre sorpresa */
.env-prev { display: grid; place-items: center; padding: 6px 0; }
.env-mini { position: relative; width: 120px; height: 80px; border-radius: 10px; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px -8px rgba(0,0,0,.45); overflow: hidden; }
.env-mini .em-flap { position: absolute; inset: 0 0 auto; height: 56%; background: var(--c2); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: brightness(.92); }
.env-mini b { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #d9534f, #8b1d1d); color: #ffd9d0; font-size: 14px; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.env-mini.pop { animation: envPop .35s ease-out; }
@keyframes envPop { 50% { transform: scale(1.08) rotate(-3deg); } }
.env-cols { display: flex; justify-content: center; gap: 10px; }
.env-cols button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: linear-gradient(160deg, var(--c1), var(--c2)); cursor: pointer; }
.env-cols button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.env { width: 250px; max-width: 100%; }
.env-closed { display: grid; gap: 8px; width: 100%; padding: 6px 4px 4px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center; }
.env-body { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; perspective: 600px; }
.env-body::before { content: ""; position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 10px 22px -10px rgba(0,0,0,.5); }
.env-paper { position: absolute; left: 8%; right: 8%; top: 8%; bottom: 6%; border-radius: 8px; background: #fffdf6; padding: 10px; font-size: 12px; color: #4b4130; overflow: hidden; filter: blur(3px); opacity: 0; transition: transform .6s .45s cubic-bezier(.2, .8, .3, 1.1), opacity .2s .4s, filter .4s .7s; }
.env-front { position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(160deg, var(--c1), var(--c2)); clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); filter: brightness(1.06); z-index: 2; }
.env-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 49.4%, rgba(0,0,0,.08) 50%, transparent 50.6%), linear-gradient(to top left, transparent 49.4%, rgba(0,0,0,.08) 50%, transparent 50.6%); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; background: var(--c2); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; z-index: 3; transition: transform .5s ease-in, z-index 0s .25s; border-radius: 12px 12px 0 0; }
.env-seal { position: absolute; left: 50%; top: 58%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; z-index: 4; display: grid; place-items: center; font: 700 20px Nunito, system-ui, sans-serif; color: #ffd9d0;
  background: radial-gradient(circle at 35% 30%, #e35d58, #8b1d1d 70%); box-shadow: 0 3px 6px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.12); transition: transform .3s, opacity .3s; }
.env-closed:hover .env-seal { transform: scale(1.08) rotate(-6deg); }
.env-closed:not(.opening) .env-body { animation: envWiggle 3.2s ease-in-out infinite; }
@keyframes envWiggle { 0%, 84%, 100% { transform: rotate(0); } 88% { transform: rotate(-3deg); } 92% { transform: rotate(3deg); } 96% { transform: rotate(-2deg); } }
.env-cap { display: grid; gap: 1px; }
.env-cap b { font-size: 13.5px; }
.env-cap small { color: var(--muted); font-size: 12px; }
.opening .env-seal { transform: scale(1.4); opacity: 0; }
.opening .env-flap { transform: rotateX(180deg); z-index: 1; }
.opening .env-paper { opacity: 1; filter: blur(0); transform: translateY(-48%); z-index: 1; }
.env-letter { border-radius: 14px; background: #fffdf6; color: #3f3628; box-shadow: 0 6px 16px -8px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.05); overflow: hidden; }
.env-tag { display: block; padding: 6px 12px; background: linear-gradient(160deg, var(--c1), var(--c2)); color: #fff; font-size: 12px; font-weight: 700; }
.env-text { padding: 12px 14px 6px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.env-st { display: block; padding: 0 14px 10px; color: #8b8170; font-size: 11.5px; }
.env-st.ok { color: #2e7d32; font-weight: 700; }
.env.just .env-letter { animation: envUnfold .6s cubic-bezier(.2, .8, .3, 1.2); transform-origin: top; }
@keyframes envUnfold { from { transform: scaleY(.3) translateY(20px); opacity: 0; } }
/* Compartir imágenes */
.share-prev { display: grid; place-items: center; }
.share-prev img { max-width: 100%; max-height: min(58vh, 520px); border-radius: 14px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
.share-row { flex-wrap: wrap; }
.game-f .btn.brag { background: linear-gradient(135deg, #ffca28, #ff9f43); color: #4a2a00; border: 0; font-weight: 800; }
.pf-custom { grid-template-columns: 1fr 1fr !important; }
/* Zumbido a distancia */
.zd-head { display: flex; align-items: center; gap: 12px; }
.zd-head h2 { margin: 0; }
.zd-head small { color: var(--muted); }
.zd-ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, #ff9f43, #ee5253); animation: zdBuzz 2.4s ease-in-out infinite; }
@keyframes zdBuzz { 0%, 80%, 100% { transform: none; } 84% { transform: translateX(-3px) rotate(-6deg); } 88% { transform: translateX(3px) rotate(6deg); } 92% { transform: translateX(-2px) rotate(-3deg); } }
.btn.zd-open { width: 100%; }
/* 3.4 · El lienzo de Dibuja y adivina no debe ensanchar la tarjeta en el móvil */
.game.xwide { grid-template-columns: minmax(0, 1fr); }
.px-wrap, .px-cv { min-width: 0; max-width: 100%; }

/* ===== 3.4 · Arreglos ===== */
/* Android: al abrir el teclado la pantalla baja de 500 px de alto y el diseño compacto ocultaba el mensaje personal mientras lo escribías */
.psm-input:focus { display: block !important; }
/* Los buscadores de las listas para elegir contactos no filtraban: la regla de .pick se imponía a .hidden */
.pick.hidden { display: none !important; }

/* ===== 3.4 · Llamadas de voz ===== */
.call-btn svg { fill: none; }
.call-ui { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(48px, env(safe-area-inset-top)) 24px max(40px, env(safe-area-inset-bottom));
  color: #fff; background: linear-gradient(160deg, #1d3f7a, #12224a 55%, #0b1530); overflow: hidden; animation: cuIn .3s ease-out; }
@keyframes cuIn { from { opacity: 0; transform: scale(1.04); } }
.call-ui.mini { display: none; }
.cu-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) saturate(1.2) brightness(.45); opacity: .9; }
.call-ui > *:not(.cu-bg) { position: relative; }
.cu-min { position: absolute !important; top: max(14px, env(safe-area-inset-top)); left: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.cu-min svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cu-who { display: grid; justify-items: center; gap: 6px; margin-top: 6vh; text-align: center; }
.cu-who h2 { margin: 14px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.cu-st { margin: 0; font-size: 16px; opacity: .85; min-height: 22px; }
.cu-timer { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.cu-tag { opacity: .55; font-size: 12px; margin-top: 6px; }
.cu-ring { position: relative; width: 140px; height: 140px; display: grid; place-items: center; }
.cu-ring i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(110, 224, 122, .7); opacity: 0; }
.call-ui:is([data-state=ringing], [data-state=incoming], [data-state=calling]) .cu-ring i { animation: cuRing 2s ease-out infinite; }
.cu-ring i + i { animation-delay: 1s !important; }
@keyframes cuRing { from { opacity: .9; transform: scale(.85); } to { opacity: 0; transform: scale(1.6); } }
.avatar.cu-avatar { width: 128px; height: 128px; border-radius: 50%; font-size: 48px; box-shadow: 0 0 0 4px rgba(255,255,255,.18), 0 20px 50px -10px rgba(0,0,0,.6); }
.call-ui[data-state=live] .avatar.cu-avatar { box-shadow: 0 0 0 4px #34c759, 0 20px 50px -10px rgba(0,0,0,.6); }
.cu-btns { display: flex; gap: clamp(18px, 7vw, 42px); justify-content: center; align-items: flex-start; }
.cu-b { display: grid; justify-items: center; gap: 8px; border: 0; background: none; color: #fff; cursor: pointer; font: inherit; padding: 0; }
.cu-b svg { width: 64px; height: 64px; padding: 19px; border-radius: 50%; background: rgba(255,255,255,.16); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; backdrop-filter: blur(10px); transition: transform .15s; }
.cu-b:active svg { transform: scale(.92); }
.cu-b small { font-size: 12.5px; opacity: .9; }
.cu-b.on svg { background: #fff; color: #12224a; }
.cu-b.red svg { background: #ff3b30; fill: #fff; stroke: none; transform: rotate(135deg); }
.cu-b.red:active svg { transform: rotate(135deg) scale(.92); }
.cu-b.green svg { background: #34c759; fill: #fff; stroke: none; }
.cu-b.green.pulse svg { animation: cuPulse 1.2s ease-in-out infinite; }
@keyframes cuPulse { 50% { transform: scale(1.1) rotate(-12deg); box-shadow: 0 0 0 12px rgba(52, 199, 89, .25); } }
.call-ui.ended .cu-btns { opacity: 0; pointer-events: none; transition: opacity .3s; }
.call-ui.ended .cu-st { font-weight: 700; opacity: 1; }
@media (min-width: 761px) { .call-ui { inset: 50% auto auto 50%; width: 380px; height: 560px; transform: translate(-50%, -50%); border-radius: 28px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.6); animation: none; } }
.call-pill { position: fixed; z-index: 390; top: calc(env(safe-area-inset-top) + 68px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 999px;
  background: #34c759; color: #fff; font: 700 14px/1 inherit; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); cursor: pointer; }
.cp-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: cpBlink 1.2s infinite; }
@keyframes cpBlink { 50% { opacity: .3; } }
.call-pill .cu-timer { font-size: 14px; }
.call-line { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.call-line .cl-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
.call-line.missed { color: #e5484d; font-weight: 600; }
.adm-turn { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.adm-turn summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.adm-turn .field { margin-top: 6px; }

/* ===== 3.4 · Reacciones ===== */
.mm-reacts { display: flex; gap: 2px; padding: 4px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mm-reacts button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 22px; cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .12s, background .12s; }
.mm-reacts button:hover { transform: scale(1.25); background: var(--hover); }
.mm-reacts button.on { background: var(--accent-soft); }
.msg.has-reacts { margin-bottom: 14px; padding-bottom: 12px !important; } /* hueco para que la reacción no tape el texto */
.m-reacts { position: absolute; left: 10px; bottom: -13px; display: flex; gap: 3px; z-index: 2; }
.msg { position: relative; }
.rx { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px -2px rgba(0,0,0,.2); color: var(--text); }
.rx b { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rx.me { border-color: var(--accent); background: var(--accent-soft); }
.rx.pop { animation: rxPop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rxPop { from { transform: scale(.3); } }
.heart-pop { position: absolute; left: 50%; top: 50%; font-size: 42px; pointer-events: none; z-index: 5; animation: heartPop .9s ease-out forwards; }
@keyframes heartPop { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; } 60% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -110%) scale(.9); opacity: 0; } }
/* 3.4 · La foto del grupo no se ajustaba: el degradado del icono de grupo anulaba «cubrir y centrar» */
.avatar[data-st=group].has-img { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* ================= 3.5 ================= */
/* Mensajes pendientes de enviar (sin conexión) */
.msg.pending { opacity: .62; }
.msg.pending .tm { display: inline-flex; align-items: center; gap: 4px; }
.msg.pending .pend-ic { animation: pendTick 2s steps(2) infinite; }
.msg.pending .pend-x { font-size: 11.5px; color: var(--danger); }
@keyframes pendTick { 50% { opacity: .35; } }
/* Diagnóstico del aviso de prueba */
.diag { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.diag li { padding: 8px 10px; border-radius: 10px; background: var(--hover); }
.diag li.ok { color: #1f7a37; } .diag li.ko { color: var(--danger); font-weight: 600; }
:root[data-theme$=dark] .diag li.ok { color: #6ee07a; }
/* Copias de seguridad */
.adm-bk { display: grid; gap: 4px; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.adm-hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
/* Registro: casilla de edad y condiciones; contraseña olvidada */
label.auth-consent { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12.5px; text-align: left; color: var(--text); line-height: 1.4; }
label.auth-consent input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
label.auth-consent.hidden { display: none; }
.auth-card .forgot { align-self: center; color: var(--accent); text-decoration: none; margin-top: -4px; }
.auth-card .forgot:hover { text-decoration: underline; }
/* Denuncias */
.rep-quote { padding: 8px 12px; border-left: 3px solid var(--danger); background: var(--hover); border-radius: 8px; font-size: 13.5px; white-space: pre-wrap; max-height: 90px; overflow: auto; }
.rep-reasons { max-height: none; }
.tag.ban { background: var(--danger); color: #fff; }
.adm-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.empty-adm { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 15px; }
.rp-list { display: grid; gap: 10px; }
.rp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.rp.open { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.rp.closed { opacity: .7; }
.rp-head { display: flex; align-items: center; gap: 10px; }
.rp-who { display: grid; gap: 1px; flex: 1; min-width: 0; }
.rp-note { font-size: 13.5px; font-style: italic; }
.rp-snap summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.rp-snap { display: grid; gap: 4px; }
.rp-line { font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.rp-hl .rp-line { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.rp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Sesiones abiertas */
.sess-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.sess { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.sess-ic { font-size: 22px; }
.sess-t { flex: 1; display: grid; min-width: 0; }
/* Estadísticas */
.st-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 6px 0 0; border-bottom: 1px solid var(--line); }
.st-bars span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.st-bars i { display: block; width: 100%; height: max(2px, var(--h)); border-radius: 4px 4px 0 0; background: var(--accent); opacity: .85; }
.st-bars span:last-child i { opacity: 1; }
.st-bars em { font-style: normal; font-size: 10.5px; color: var(--muted); margin-bottom: 2px; }
.st-bars.weeks i { background: #2fa84a; }
.st-axis { display: flex; justify-content: space-between; margin-top: 2px; }
.st-rows { display: grid; gap: 6px; }
.st-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 40px; align-items: center; gap: 10px; font-size: 13.5px; }
.st-row b { text-align: right; font-variant-numeric: tabular-nums; }
.st-meter { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.st-meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
/* Escalera de premios por invitar */
.inv-ladder { border-radius: 14px; background: var(--accent-soft); padding: 12px; display: grid; gap: 10px; }
.il-head { display: grid; gap: 1px; }
.il-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.il-step { display: grid; justify-items: center; text-align: center; gap: 1px; padding: 8px 4px; border-radius: 10px; background: var(--panel); opacity: .6; font-size: 13px; line-height: 1.2; }
.il-step.done { opacity: 1; box-shadow: inset 0 0 0 2px #2fa84a; }
.il-ic { font-size: 22px; }
.il-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.il-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f7fe0, #2fa84a); border-radius: 3px; }
/* Videollamadas */
.call-ui .cu-remote, .call-ui .cu-local { display: none; }
.call-ui.vid-remote .cu-remote { display: block; position: absolute !important; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-ui.vid-local .cu-local { display: block; position: absolute !important; z-index: 2; right: 14px; top: max(14px, env(safe-area-inset-top)); width: 104px; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; background: #111; box-shadow: 0 8px 24px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.7); }
.call-ui.mirror .cu-local { transform: scaleX(-1); }
.call-ui.vid-remote .cu-who { margin-top: auto; margin-bottom: 8px; }
.call-ui.vid-remote .cu-ring, .call-ui.vid-remote .cu-tag { display: none; }
.call-ui.vid-remote .cu-who h2 { font-size: 18px; margin: 0; }
.call-ui.vid-remote .cu-btns { padding: 14px 18px; border-radius: 26px; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.call-ui.vid .cu-btns { gap: clamp(10px, 4vw, 26px); }
.call-ui.vid .cu-b svg { width: 56px; height: 56px; padding: 16px; }
.cu-b[disabled] { opacity: .4; pointer-events: none; }
.call-ui .cu-min { z-index: 3; }
@media (min-width: 761px) { .call-ui.vid { width: min(860px, 92vw); height: min(620px, 88vh); } }
/* Llamadas de grupo */
.call-ui.group .cu-who { margin-top: 4vh; }
.gc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 130px)); gap: 14px; justify-content: center; margin-top: 18px; }
.gc-tile { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border-radius: 18px; background: rgba(255,255,255,.1); text-align: center; }
.gc-tile .avatar { width: 72px; height: 72px; font-size: 28px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.gc-tile.live .avatar { box-shadow: 0 0 0 3px #34c759; }
.gc-tile b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-tile small { font-size: 12px; opacity: .8; }
.room-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, #34c759 14%, var(--panel)); color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.room-bar .rb-dot { width: 9px; height: 9px; border-radius: 50%; background: #34c759; animation: rbPulse 1.4s ease-in-out infinite; flex: none; }
.room-bar .rb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-bar .rb-go { padding: 5px 14px; border-radius: 999px; background: #34c759; color: #fff; font-weight: 700; }
.room-bar[disabled] .rb-go { background: var(--muted); }
@keyframes rbPulse { 50% { box-shadow: 0 0 0 6px rgba(52,199,89,0); transform: scale(.85); } }
.in-call { font-size: 12px; }
/* Buscar en la conversación */
.conv-search { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.conv-search > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.conv-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); padding: 6px 4px; outline: none; }
.conv-search .cs-n { white-space: nowrap; }
.conv-search .icon-btn[disabled] { opacity: .35; }
.conv-search.hidden { display: none; }
.msg.cs-hit { outline: 2px solid color-mix(in srgb, #f5c400 55%, transparent); outline-offset: 1px; }
.msg.cs-cur { outline: 3px solid #f5c400; }
mark.cs-mark { background: #ffe066; color: #13203a; border-radius: 3px; padding: 0 1px; }
/* La palabra del día */
.daily-card { display: flex; align-items: center; gap: 10px; margin: 0 14px 10px; padding: 9px 10px 9px 12px; width: calc(100% - 28px); border: 0; border-radius: 12px; background: linear-gradient(110deg, color-mix(in srgb, #2fa84a 16%, var(--panel)), color-mix(in srgb, #f5c400 16%, var(--panel))); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.daily-card.hidden { display: none; }
.daily-card .dc-ic { font-size: 24px; }
.daily-card .dc-t { flex: 1; display: grid; min-width: 0; }
.daily-card .dc-t b { font-size: 14px; }
.daily-card .dc-t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-card .dc-go { padding: 5px 12px; border-radius: 999px; background: #2fa84a; color: #fff; font-weight: 700; font-size: 13px; }
.daily { display: grid; gap: 10px; }
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-head h2 { margin: 0; } .dl-head h2 small { font-size: 14px; color: var(--muted); font-weight: 600; }
.dl-streak { font-weight: 800; font-size: 15px; padding: 4px 10px; border-radius: 999px; background: var(--hover); }
.dl-help { margin: 0; }
.dl-board { display: grid; gap: 6px; justify-content: center; }
.dl-row { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; }
.dl-c { height: 52px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 8px; font-size: 24px; font-weight: 800; text-transform: uppercase; }
.dl-c.typed { border-color: var(--muted); animation: dlPop .12s; }
.dl-c.s-g, .dl-k.s-g { background: #3aa655; border-color: #3aa655; color: #fff; }
.dl-c.s-y, .dl-k.s-y { background: #d9a400; border-color: #d9a400; color: #fff; }
.dl-c.s-b, .dl-k.s-b { background: #6b7280; border-color: #6b7280; color: #fff; }
.dl-row.flip .dl-c { animation: dlFlip .5s calc(var(--i) * .12s) both; }
.dl-row.shake { animation: dlShake .35s; }
@keyframes dlPop { 50% { transform: scale(1.1); } }
@keyframes dlFlip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes dlShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.dl-err { min-height: 0; margin: 0; text-align: center; }
.dl-keys { display: grid; gap: 6px; }
.dl-kr { display: flex; gap: 4px; justify-content: center; }
.dl-k { flex: 1; max-width: 42px; height: 46px; border: 0; border-radius: 7px; background: var(--hover); color: var(--text); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; padding: 0; }
.dl-k.wide { max-width: 66px; flex: 1.5; font-size: 12.5px; }
.dl-res { text-align: center; font-size: 18px; font-weight: 800; padding: 6px; }
.dl-res.won { color: #2fa84a; }
.dl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.dl-stats div { display: grid; } .dl-stats b { font-size: 20px; } .dl-stats span { font-size: 11.5px; color: var(--muted); }
.dl-rank { display: grid; gap: 4px; }
.dl-rr { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.dl-rr.me { background: var(--accent-soft); }
.dl-pos { width: 24px; text-align: center; }
.dl-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-share { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 400px) { .dl-row { grid-template-columns: repeat(5, 46px); } .dl-c { height: 46px; font-size: 21px; } .dl-k { height: 42px; font-size: 13.5px; } }
/* 3.5 · Guiños nuevos */
.wink-layer .ufo-beam { width: 46%; height: 62%; transform-origin: top center; background: linear-gradient(180deg, rgba(140, 255, 190, .75), rgba(140, 255, 190, .12)); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); filter: blur(2px); }
.wink-layer.flamenco { background: radial-gradient(ellipse at 50% 60%, rgba(220, 20, 60, .38), rgba(255, 196, 0, .16) 60%, transparent 85%); animation: wfade 3.2s both; }
/* 3.5 · Juegos a pantalla completa */
.game-h { align-items: center; }
.game-h .game-st { margin-left: auto; }
.g-full { flex: none; width: 30px; height: 30px; margin: -4px -4px -4px 0; border: 0; border-radius: 9px; background: var(--hover); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.g-full svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-full:hover { background: var(--accent-soft); color: var(--accent); }
.game.full { position: fixed; inset: 0; z-index: 350; width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; overscroll-behavior: contain;
  padding: max(14px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); align-content: start; justify-content: center; grid-template-columns: minmax(0, 620px); background: var(--bg, var(--panel)); animation: gFullIn .22s ease-out; }
.game.full .game-h { position: sticky; top: calc(-1 * max(14px, env(safe-area-inset-top))); z-index: 2; margin: 0 -16px; padding: 10px 16px; font-size: 16px; background: inherit; border-bottom: 1px solid var(--line); }
.game.full .g-full { width: 38px; height: 38px; }
.game.full .game-pl { justify-content: center; }
body.game-full-on { overflow: hidden; }
body.game-full-on .msg:has(.game.full), body.game-full-on .mgroup:has(.game.full) { transform: none !important; animation: none !important; filter: none !important; }
@keyframes gFullIn { from { opacity: 0; transform: scale(.97); } }

/* 3.5 · Las ventanas y las opciones de Apariencia nunca se salen por los lados */
.seg > button, .bgs > *, .swatches > * { min-width: 0; }
.seg > button { overflow-wrap: anywhere; }
.modal-card { grid-template-columns: minmax(0, 1fr); }


/* ================= 3.5 · Tema Zen: blanco y negro, de línea, como un cuaderno de bocetos ================= */
/* Fondo gris muy claro, tarjetas blancas con contorno negro fino, cápsulas negras con letras blancas y solo lo esencial */
:root[data-theme=zen] {
  --ink: #161616; --paper: #ffffff; --stroke: 1.5px;
  --bg: #ececec; --panel: #ffffff; --line: #161616; --text: #161616; --muted: #7a7a7a; --hover: #f2f2f2;
  --accent: #161616; --accent-soft: #f0f0f0; --online: #3fae5a; --busy: #e0574b; --away: #e2a92b; --offline: #c4c4c4; --danger: #c0392b;
  --radius: 18px; --shadow: none; color-scheme: light;
}
:root[data-theme=zen] body { background: var(--bg); }
/* Paneles: tarjetas blancas redondeadas con contorno negro */
:root[data-theme=zen] .side { background: var(--paper); border-right: var(--stroke) solid var(--ink); }
:root[data-theme=zen] .conv { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 22px; margin: 0 14px 14px; box-shadow: none; }
:root[data-theme=zen] :is(.menu, .toast, .modal-card) { border: var(--stroke) solid var(--ink); box-shadow: 4px 4px 0 var(--ink) !important; }
:root[data-theme=zen] .modal-card { border-radius: 24px; }
:root[data-theme=zen] .modal { background: rgba(236, 236, 236, .8); backdrop-filter: none; }
:root[data-theme=zen] :is(.conv-head, .composer) { border-color: var(--ink); border-width: var(--stroke); }
:root[data-theme=zen] .side-foot { border-top: var(--stroke) solid var(--ink); }
:root[data-theme=zen] .tabs .tab { border: var(--stroke) solid var(--ink); border-bottom: 0; background: var(--paper); border-radius: 14px 14px 0 0; }
:root[data-theme=zen] .tabs .tab.active { background: var(--ink); color: #fff; }
/* Cápsulas negras: nombre de la app, títulos de las secciones y de las ventanas */
:root[data-theme=zen] .ab-logo img { display: none; }
:root[data-theme=zen] .ab-logo b { background: var(--ink); color: #fff !important; text-shadow: none !important; font-size: 13px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 7px 16px; border-radius: 999px; flex: none; }
:root[data-theme=zen] .ab-logo .jd::after { background: #fff; }
:root[data-theme=zen] .group-h { padding: 14px 4px 6px; color: var(--ink); }
:root[data-theme=zen] .group-h .gh-t { flex: 0 1 auto; background: var(--ink); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 10.5px; letter-spacing: .12em; }
:root[data-theme=zen] .group-h .gh-t svg { stroke: #fff; }
:root[data-theme=zen] .modal-card > h2:first-child, :root[data-theme=zen] .adm-head h2 { justify-self: start; background: var(--ink); color: #fff; padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
:root[data-theme=zen] .section-t { color: var(--ink); font-weight: 700; letter-spacing: .12em; }
/* Botones: negro sólido o blanco con contorno, en forma de cápsula */
:root[data-theme=zen] .btn { border: var(--stroke) solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; font-weight: 600; box-shadow: none; }
:root[data-theme=zen] .btn:hover { background: var(--hover); }
:root[data-theme=zen] .btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
:root[data-theme=zen] .btn.primary:hover { filter: none; background: #333; }
/* Iconos de línea negra; los de arriba, dentro de cuadritos con contorno (como los botones de abajo de las imágenes) */
:root[data-theme=zen] :is(.icon-btn, .tool, .foot-btn) { color: var(--ink); }
:root[data-theme=zen] :is(.icon-btn, .tool, .foot-btn) svg { stroke-width: 1.5; }
:root[data-theme=zen] :is(.ab-tools .icon-btn, .search-row .view-btn) { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 12px; }
:root[data-theme=zen] :is(.ab-tools .icon-btn, .search-row .view-btn):hover, :root[data-theme=zen] :is(.icon-btn, .tool):hover { background: var(--ink); color: #fff; }
:root[data-theme=zen] .foot-btn { border: var(--stroke) solid var(--ink); border-radius: 12px; padding: 6px 4px; }
:root[data-theme=zen] .foot-btn:hover { background: var(--ink); color: #fff; }
:root[data-theme=zen] .foot-btn span { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
:root[data-theme=zen] .news-dot { background: var(--ink) !important; box-shadow: 0 0 0 2px #fff; }
/* Campos con contorno negro, en cápsula */
:root[data-theme=zen] :is(input, textarea, select):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]) { background: var(--paper) !important; border: var(--stroke) solid var(--ink) !important; color: var(--ink) !important; box-shadow: none !important; }
:root[data-theme=zen] #search, :root[data-theme=zen] #input { border-radius: 999px !important; }
:root[data-theme=zen] ::placeholder { color: #9a9a9a !important; opacity: 1; }
:root[data-theme=zen] input[type=checkbox], :root[data-theme=zen] input[type=radio] { accent-color: var(--ink); }
:root[data-theme=zen] .seg { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 14px; }
:root[data-theme=zen] .seg button.on { background: var(--ink) !important; color: #fff !important; box-shadow: none !important; border-radius: 10px; }
/* Lista: el contacto abierto en una cápsula negra */
:root[data-theme=zen] .contact { border-radius: 14px; }
:root[data-theme=zen] .contact:hover { background: var(--hover); }
:root[data-theme=zen] .contact.active { background: var(--ink); color: #fff; }
:root[data-theme=zen] .contact.active :is(.nm, .ps, .ps *, small) { color: #fff !important; }
:root[data-theme=zen] .badge { background: var(--ink); color: #fff; }
:root[data-theme=zen] .bot-tag { background: none; border: 1px solid var(--ink); color: var(--ink); }
/* Fotos de perfil: cuadradas (esquinas suaves) con un marco fino del color del estado */
:root[data-theme=zen] .avatar { border-radius: 10px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--st, var(--offline)) !important; }
:root[data-theme=zen] .avatar.lg { border-radius: 14px; }
:root[data-theme=zen] .avatar.xl { border-radius: 18px; }
:root[data-theme=zen] .avatar[data-st=group] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink) !important; }
:root[data-theme=zen] .avatar[data-st=group]:not(.has-img) { background: var(--ink); }
/* Perfil propio: sin imagen de fondo ni brillos, en una tarjeta de contorno */
:root[data-theme=zen] :is(.me-cover, #meCover) { display: none !important; }
:root[data-theme=zen] .me-wrap { background: none !important; color: var(--ink) !important; --muted: #7a7a7a !important; }
:root[data-theme=zen] .me-wrap .me { background: var(--paper) !important; border: var(--stroke) solid var(--ink); border-radius: 22px; backdrop-filter: none !important; box-shadow: none !important; color: var(--ink) !important; }
:root[data-theme=zen] .me-wrap .me::before { display: none !important; }
:root[data-theme=zen] .me-wrap :is(.me-name, .status-btn, .psm-input, .psm-view, .icon-btn) { color: var(--ink) !important; text-shadow: none !important; }
:root[data-theme=zen] .me-wrap .status-btn { background: var(--paper) !important; border: var(--stroke) solid var(--ink); border-radius: 999px; }
:root[data-theme=zen] .me-wrap .music.linked, :root[data-theme=zen] .music.linked a { background: var(--ink) !important; color: #fff !important; border-radius: 999px; }
:root[data-theme=zen] .music::before { color: inherit; }
:root[data-theme=zen] .music-link { color: var(--ink) !important; }
:root[data-theme=zen] :is(.nsx, [class*="ns-"]) { background: none !important; -webkit-text-fill-color: currentColor !important; color: inherit !important; text-shadow: none !important; animation: none !important; }
/* Conversación: fondo blanco liso; los demás en blanco con contorno, lo tuyo en negro */
:root[data-theme=zen] .conv[class*=bg-], :root[data-theme=zen] .conv[class*=bg-] .messages { background-image: none !important; background-color: var(--paper) !important; }
:root[data-theme=zen] .messages.bubbles .msg { box-shadow: none !important; border: var(--stroke) solid var(--ink); border-radius: 18px !important; padding: 8px 14px 7px; }
:root[data-theme=zen] .messages.bubbles .mgroup .msg:not(.has-media):not(.big) { background: var(--paper) !important; color: var(--ink) !important; }
:root[data-theme=zen] .messages.bubbles .mgroup.mine .msg:not(.has-media):not(.big) { background: var(--ink) !important; color: #fff !important; }
:root[data-theme=zen] .messages.bubbles .mgroup.mine .msg:not(.has-media):not(.big) :is(.tm, .tm *, a) { color: rgba(255, 255, 255, .75) !important; }
:root[data-theme=zen] .messages.bubbles .msg.has-media, :root[data-theme=zen] .messages.bubbles .msg.big { border: 0; }
:root[data-theme=zen] .messages .day { display: table; margin-inline: auto; background: var(--ink); color: #fff; padding: 3px 12px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
:root[data-theme=zen] .retention { background: none; color: var(--muted); }
/* Tarjetas y barras de la app con el mismo dibujo */
:root[data-theme=zen] :is(.daily-card, .game, .room-bar, .conv-search, .inv-ladder, .rp, .sess, .bk-row, .stats div, .il-step) { background: var(--paper) !important; border: var(--stroke) solid var(--ink) !important; box-shadow: none !important; }
:root[data-theme=zen] .daily-card { border-radius: 18px; }
:root[data-theme=zen] .game { border-radius: 20px; }
:root[data-theme=zen] :is(.daily-card .dc-go, .room-bar .rb-go) { background: var(--ink); color: #fff; }
:root[data-theme=zen] .st-bars i, :root[data-theme=zen] .st-meter i, :root[data-theme=zen] .il-bar i { background: var(--ink) !important; }
/* Solo lo esencial: fuera el formato del texto, los avisos de eventos y la tarjeta de instalar */
:root[data-theme=zen] :is(#boldBtn, #italBtn, #fontBtn, .tool.color, .tools .sep) { display: none !important; }
:root[data-theme=zen] :is(.ev-banner, .pwa-card) { display: none !important; }
:root[data-theme=zen] ::-webkit-scrollbar { width: 8px; height: 8px; }
:root[data-theme=zen] ::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 8px; border: 3px solid var(--paper); }
:root[data-theme=zen] ::-webkit-scrollbar-track { background: transparent; }
:root[data-theme=zen] .splash { background: var(--paper); }
:root[data-theme=zen] .contact.active { opacity: 1 !important; }
:root[data-theme=zen] .contact.active * { opacity: 1 !important; }
:root[data-theme=zen] .foot-btn span { font-size: 9px; letter-spacing: .03em; }
@media (max-width: 760px) {
  :root[data-theme=zen] .conv { margin: 0; border: 0; border-radius: 0; }
  :root[data-theme=zen] .group-h .gh-t { letter-spacing: .08em; }
}
