/* Mibé · estilos compartidos por el chat y la cámara */
:root, [data-theme="durazno"] {
  --bg: #fff6ef; --bg2: #ffe9dc; --card: #ffffff; --ink: #3b2a22; --muted: #8a7266;
  --accent: #f08a5d; --accent-ink: #ffffff; --accent-soft: #ffd8c2;
  --mine: #ffd9c4; --theirs: #ffffff; --line: #f1d6c6; --sun: #f7b801; --danger: #c8443a;
}
[data-theme="jade"] {
  --bg: #eef7f3; --bg2: #d9efe6; --card: #ffffff; --ink: #1f3a32; --muted: #5f7f75;
  --accent: #2f9e7e; --accent-ink: #ffffff; --accent-soft: #c3e7da;
  --mine: #c9ebde; --theirs: #ffffff; --line: #cfe5dc; --sun: #f7b801; --danger: #b8443a;
}
[data-theme="lavanda"] {
  --bg: #f5f2fb; --bg2: #e8e1f6; --card: #ffffff; --ink: #2f2843; --muted: #756c8f;
  --accent: #8a6fd1; --accent-ink: #ffffff; --accent-soft: #ddd3f5;
  --mine: #e0d7f7; --theirs: #ffffff; --line: #e0d9ef; --sun: #f7b801; --danger: #b8443a;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.btn { border: 0; border-radius: 999px; padding: .55rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: .35rem .75rem; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; color: var(--ink); border-radius: 12px; padding: .45rem .45rem; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.icon-btn:hover, .icon-btn[aria-pressed="true"] { background: var(--accent-soft); }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, var(--bg2), var(--bg)); }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: 24px; padding: 2rem 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; }
.brand { margin: 0; }
.brand .wordmark { width: 100%; height: auto; display: block; border-radius: 16px; }
.cam-title { display: flex; align-items: center; gap: .4rem; }
.cam-title .logo { display: block; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.avatar.small { width: 34px; height: 34px; border: 2px solid var(--accent-soft); padding: 0; font-size: .9rem; }
.login-card p { color: var(--muted); margin: .4rem 0 1.4rem; }
.field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.field label { font-size: .85rem; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; background: var(--bg); }
.error { color: var(--danger); font-size: .9rem; min-height: 1.2em; }
.lang-switch { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1rem; }

/* ---------- chat layout ---------- */
.app { height: var(--app-h, 100dvh); display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 860px; margin: 0 auto; background: var(--bg); }
@media (min-width: 900px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.topbar { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; background: var(--card); border-bottom: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 0; display: flex; align-items: center; gap: .65rem; color: inherit; cursor: pointer; }
.avatar.head { width: 42px; height: 42px; font-size: 1.1rem; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent-soft); }
.who-text { min-width: 0; display: block; }
.who strong { display: block; font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .sub { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; font-size: 12px; }
.notice { margin: 0; padding: .2rem .3rem .2rem .9rem; min-height: 30px; font-size: .78rem; line-height: 1.25; background: var(--bg2); color: var(--muted); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .4rem; }
.notice[hidden] { display: none; }
.notice #noticeText { flex: 1; min-width: 0; }
.notice-close { flex: none; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer; }
.notice-close .ico { width: 16px; height: 16px; }
.notice.offline { background: #fde2e0; color: var(--danger); }

.messages { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.messages::-webkit-scrollbar { width: 6px; } .messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; } .messages::-webkit-scrollbar-track { background: transparent; }
.messages-inner { padding: 1rem .8rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.day { align-self: center; font-size: 12px; color: var(--muted); background: var(--card); padding: .2rem .7rem; border-radius: 999px; margin: .6rem 0; }
.msg { max-width: min(78%, 520px); display: flex; flex-direction: column; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.bubble { padding: .4rem .7rem; border-radius: 16px; font-size: var(--msg-font, 15px); background: var(--theirs); box-shadow: 0 1px 2px rgba(0,0,0,.06); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.msg.mine .bubble { background: var(--mine); border-bottom-right-radius: 6px; }
.msg.theirs .bubble { border-bottom-left-radius: 6px; }
.msg .bubble.media-only { background: transparent; box-shadow: none; padding: 0; line-height: 0; }
.bubble .photo { display: block; max-width: 100%; max-height: 320px; border-radius: 14px; margin-bottom: .3rem; cursor: zoom-in; background: var(--bg2); }
.bubble.media-only .photo { margin: 0; }
.bubble .alt-text { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.sticker-wrap { position: relative; display: inline-flex; align-items: flex-end; gap: .4rem; }
.msg.mine .sticker-wrap.has-sound { flex-direction: row-reverse; }
.sticker { width: 112px; height: 112px; object-fit: contain; display: block; }
.sound-btn .ico { width: 18px; height: 18px; }
.sound-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: .9rem; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.meta { display: flex; gap: .5rem; align-items: center; font-size: 11px; color: var(--muted); margin: .15rem .3rem 0; flex-wrap: wrap; }
.meta button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: underline; }
.tstatus { font-style: italic; }
.msg.sending .bubble { opacity: .65; }
.msg.failed .meta { color: var(--danger); }

/* ---------- composer ---------- */
.composer { background: var(--card); border-top: 1px solid var(--line); padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom)); position: relative; }
.compose-row { display: flex; gap: .5rem; align-items: flex-end; }
.compose-row textarea { overflow-y: hidden; flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); border-radius: 20px; padding: .6rem .9rem; background: var(--bg); max-height: 140px; min-height: 40px; line-height: 1.35; font-size: 15px; }
/* En iPhone un campo con menos de 16 px hace zoom al tocarlo. */
@media (pointer: coarse) { .compose-row textarea { font-size: 16px; } }
.send { width: 44px; height: 44px; border-radius: 50%; padding: 0; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.tools { display: flex; gap: .25rem; margin-top: .35rem; }
.tools .icon-btn { font-size: 13px; color: var(--ink); }
.tools .icon-btn .ico { width: 22px; height: 22px; color: var(--accent); }
.preview { display: flex; align-items: center; gap: .6rem; background: var(--bg2); border-radius: 14px; padding: .4rem; margin-bottom: .45rem; }
.preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.preview .info { flex: 1; font-size: .85rem; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel { position: absolute; left: .6rem; right: .6rem; bottom: calc(100% + .4rem); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.12); max-height: min(50dvh, 360px); display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.panel-tabs { display: flex; gap: .3rem; padding: .45rem; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.panel-tabs button { border: 0; border-radius: 999px; padding: .3rem .75rem; background: var(--bg); white-space: nowrap; }
.panel-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.panel-body { overflow-y: auto; padding: .5rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
.emoji-grid button { border: 0; background: none; font-size: 1.6rem; padding: .25rem; border-radius: 10px; }
.emoji-grid button:hover { background: var(--bg2); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .3rem; }
.sticker-grid button { border: 0; background: none; padding: .3rem; border-radius: 12px; position: relative; aspect-ratio: 1; }
.sticker-grid button:hover { background: var(--bg2); }
.sticker-grid img { width: 100%; height: 100%; object-fit: contain; }
.sticker-grid .badge { position: absolute; right: 2px; top: 2px; font-size: .75rem; }
.attribution { font-size: .72rem; color: var(--muted); padding: .3rem .6rem .5rem; flex: none; }

/* ---------- dialogs ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, 94vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(30,20,15,.45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .4rem; }
.dialog-head h2 { margin: 0; font-size: 1.15rem; }
.dialog-body { padding: .4rem 1.2rem 1.2rem; max-height: 75dvh; overflow-y: auto; }
.profile-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.profile-photo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-photo .avatar { width: 96px; height: 96px; font-size: 2rem; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent-soft); }
.profile-view dt { font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.profile-view dd { margin: .1rem 0 0; white-space: pre-wrap; }
.viewer { background: rgba(0,0,0,.9); width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; display: none; }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-width: 96vw; max-height: 90dvh; }
.viewer button { position: absolute; top: 1rem; right: 1rem; }
.hint { font-size: .8rem; color: var(--muted); }

.theme-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.notif-row { display: flex; align-items: center; gap: .6rem; }
.notif-row .hint { flex: 1; min-width: 0; margin: 0; }
.notif-row .btn { flex: none; }
.theme-chip { border: 2px solid var(--line); border-radius: 999px; padding: .35rem .8rem .35rem .4rem; background: var(--card); display: inline-flex; align-items: center; gap: .4rem; }
.theme-chip i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.theme-chip[aria-checked="true"] { border-color: var(--accent); font-weight: 700; }
.field .label { font-size: .85rem; color: var(--muted); }
.row-end { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-top: .4rem; }

/* ---------- reacciones ---------- */
.bubble-row { display: flex; align-items: center; gap: .25rem; max-width: 100%; }
.msg.mine .bubble-row { flex-direction: row-reverse; }
.react-btn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--card); color: var(--muted); display: grid; place-items: center; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.react-btn .ico { width: 18px; height: 18px; }
@media (hover: hover) { .msg:hover .react-btn { opacity: 1; } }
.react-btn:focus-visible { opacity: 1; }
body.reacting .react-btn { opacity: 0 !important; }
@media (pointer: coarse) { .react-btn { display: none; } .bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.reactions { display: flex; gap: .25rem; margin: -.45rem .5rem 0; position: relative; z-index: 1; flex-wrap: wrap; }
.msg.mine .reactions { justify-content: flex-end; }
.reaction { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .05rem .4rem; font-size: 14px; line-height: 1.4; display: inline-flex; align-items: center; gap: .15rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.reaction.mine { border-color: var(--accent); background: var(--accent-soft); }
.reaction .count { font-size: .75rem; color: var(--muted); }
.react-bar { position: fixed; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: .3rem; width: max-content; max-width: calc(100vw - 16px); }
.react-quick { display: flex; gap: .1rem; align-items: center; }
.react-quick button, .react-more button { border: 0; background: none; font-size: 1.55rem; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s; }
.react-quick button:hover, .react-more button:hover { background: var(--bg2); transform: scale(1.12); }
.react-quick button.chosen, .react-more button.chosen { background: var(--accent-soft); }
.react-quick .more { font-size: 1.3rem; color: var(--muted); background: var(--bg); }
.react-more { display: grid; grid-template-columns: repeat(7, 42px); max-height: 210px; overflow-y: auto; margin-top: .3rem; border-top: 1px solid var(--line); padding-top: .3rem; scrollbar-width: thin; }
@media (prefers-reduced-motion: reduce) { .react-quick button, .react-more button { transition: none; } }

/* ---------- recorte de foto de perfil ---------- */
.photo-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.crop-dialog { width: min(420px, 94vw); }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; touch-action: none; cursor: grab; background: #000; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { width: 100%; height: 100%; display: block; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle closest-side, transparent calc(100% - 3px), rgba(255,255,255,.9) calc(100% - 3px), rgba(255,255,255,.9) 100%, rgba(0,0,0,.62) 100%); }
.crop-zoom { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .8rem; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }

/* ---------- estado: palomitas, en línea, escribiendo ---------- */
.ticks { width: 20px; height: 13px; fill: none; stroke: #a08b80; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ticks .heart { stroke-width: 1.5; }
.ticks.read { stroke: #e0457b; }
body[data-rel]:not([data-rel="pareja"]) .ticks.read { stroke: #1f8f7f; stroke-width: 2.4; }
.rel-chip { padding: .35rem .8rem; }
.ticks.read .heart { fill: #e0457b; animation: beat .5s ease-out; transform-origin: 16.5px 8px; }
@keyframes beat { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.meta .edited { font-style: italic; }
.name-line { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.streak-chip { flex: none; font-size: 12px; font-weight: 700; background: var(--bg2); color: var(--ink); border-radius: 999px; padding: 0 .45rem; line-height: 1.5; }
.avatar.head { position: relative; overflow: visible; }
.avatar.head img { border-radius: 50%; }
.avatar.head.online::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #3dbb6b; border: 2px solid var(--card); }
.who .sub.typing { color: var(--accent); font-weight: 600; }
.typing-bubble { display: inline-flex; gap: 4px; padding: .65rem .8rem; }
.typing-bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing-bubble i:nth-child(2) { animation-delay: .15s; } .typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- responder, editar, eliminar ---------- */
.quote { display: grid; gap: 1px; text-align: left; width: 100%; border: 0; border-left: 3px solid var(--accent); background: rgba(0,0,0,.05); border-radius: 8px; padding: .3rem .5rem; margin-bottom: .3rem; font-size: 13px; line-height: 1.3; white-space: normal; }
.quote strong { color: var(--accent); font-size: 12px; }
.quote span { color: var(--ink); opacity: .8; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bubble { transition: transform .15s; touch-action: pan-y; }
.msg.flash .bubble { animation: flash 1.2s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 1px 2px rgba(0,0,0,.06); } }
.bubble.deleted { background: transparent !important; box-shadow: none; border: 1px dashed var(--line); color: var(--muted); font-style: italic; font-size: 13px; }
.compose-bar { display: flex; align-items: center; gap: .5rem; background: var(--bg2); border-left: 3px solid var(--accent); border-radius: 10px; padding: .3rem .3rem .3rem .6rem; margin-bottom: .4rem; }
.compose-bar-text { flex: 1; min-width: 0; display: grid; font-size: 13px; }
.compose-bar-text strong { color: var(--accent); font-size: 12px; }
.compose-bar-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.msg-actions { display: flex; gap: .2rem; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; flex-wrap: wrap; }
.msg-actions button { border: 0; background: var(--bg); border-radius: 999px; padding: .35rem .75rem; font-size: 13px; font-weight: 600; }
.msg-actions button:hover { background: var(--bg2); }
.msg-actions .danger { color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: .45rem .9rem; border-radius: 999px; font-size: 13px; z-index: 40; }
.pop-emoji { position: fixed; z-index: 30; font-size: 56px; pointer-events: none; transform: translate(-50%, -50%); animation: pop .9s ease-out forwards; }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -110%) scale(1); opacity: 0; } }

/* ---------- notas de voz ---------- */
.voice { display: flex; align-items: center; gap: .55rem; min-width: 210px; padding: .15rem 0; white-space: normal; }
.voice audio { display: none; }
.voice-play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 12px; display: grid; place-items: center; }
.voice-wave { flex: 1; height: 22px; position: relative; cursor: pointer; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 6px); }
.voice-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 6px); }
.voice-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.record-bar { display: flex; align-items: center; gap: .5rem; padding: .1rem 0; font-size: 14px; }
.record-bar .btn.send { margin-left: auto; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
#micBtn .ico { width: 22px; height: 22px; }

/* ---------- efectos ---------- */
.tools { position: relative; align-items: center; }
.effect-menu { position: absolute; bottom: calc(100% + .3rem); left: 0; z-index: 6; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem; display: grid; min-width: 190px; }
.effect-menu button { border: 0; background: none; text-align: left; padding: .45rem .6rem; border-radius: 10px; font-size: 14px; }
.effect-menu button:hover, .effect-menu button.chosen { background: var(--bg2); }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 35; overflow: hidden; }
.fx { position: absolute; top: -50px; animation: fall 2.8s ease-in forwards; }
.fx.hearts { top: auto; bottom: -50px; animation-name: rise; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(260deg); opacity: .9; } }
@keyframes rise { 0% { opacity: 0; } 15% { opacity: 1; } to { transform: translate(var(--drift), -110vh); opacity: 0; } }

/* ---------- buscar y «Nosotros» ---------- */
.search-dialog { align-self: start; margin-top: 8vh; }
.search-input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .9rem; background: var(--bg); margin-right: .4rem; }
.search-hit { display: grid; gap: .15rem; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: .55rem .2rem; }
.search-hit:hover { background: var(--bg); }
.search-hit .who-line { font-size: 12px; color: var(--muted); }
.search-hit .hit-text { font-size: 14px; }
.search-hit mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.us-card { display: flex; gap: .8rem; align-items: flex-start; background: var(--bg); border-radius: 16px; padding: .75rem .9rem; margin-bottom: .55rem; }
.us-icon { font-size: 26px; line-height: 1; }
.us-body { display: grid; gap: .2rem; flex: 1; min-width: 0; }
.us-body strong { font-size: 13px; color: var(--muted); font-weight: 600; }
.us-body .big { font-size: 17px; font-weight: 800; }
.us-body input[type=date] { border: 1px solid var(--line); border-radius: 10px; padding: .35rem .5rem; background: var(--card); max-width: 190px; }
.clocks { display: grid; gap: .1rem; font-size: 14px; }
.emoji-choice { display: flex; gap: .25rem; flex-wrap: wrap; }
.emoji-choice button { border: 2px solid transparent; background: var(--bg); border-radius: 12px; font-size: 22px; width: 44px; height: 44px; }
.emoji-choice button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.gallery button { border: 0; padding: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .typing-bubble i, .rec-dot, .pop-emoji { animation: none; } }

/* En teléfonos la barra de herramientas muestra solo íconos (el nombre aparece al mantener o pasar el mouse). */
.tools .icon-btn { white-space: nowrap; }
@media (max-width: 520px) {
  .tools { justify-content: space-around; }
  .tools .icon-btn > span:not(.sr-only) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tools .icon-btn .ico { width: 24px; height: 24px; }
  .tools .icon-btn[aria-pressed="true"] .fx-label { position: static; width: auto; height: auto; clip: auto; font-size: 12px; }
}

.compose-bar.fx { border-left-color: #e0457b; }
.compose-bar.fx strong { color: #e0457b; }
.compose-bar.fx span { white-space: normal; }

/* grabación: barras de volumen y texto en vivo */
.rec-level { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.rec-level i { flex: 1; min-width: 2px; max-width: 5px; height: 8%; border-radius: 2px; background: var(--accent); transition: height .08s; }
.rec-text { font-size: 14px; line-height: 1.35; background: var(--bg); border-radius: 12px; padding: .45rem .7rem; margin-top: .35rem; max-height: 90px; overflow-y: auto; }
.rec-text.muted { color: var(--muted); font-style: italic; font-size: 13px; }
.record-bar .btn.send { margin-left: 0; }
.bubble .voice-text { margin-top: .3rem; padding-top: .3rem; border-top: 1px dashed var(--line); }

.rec-bubble { align-items: center; gap: 6px !important; font-size: 15px; }
.rec-bubble .rec-dot { width: 8px; height: 8px; }
.rec-wave { display: inline-flex; gap: 2px; align-items: center; height: 16px; }
.rec-wave i { width: 3px; height: 40%; border-radius: 2px; background: var(--accent); animation: wave 1s infinite ease-in-out; }
.rec-wave i:nth-child(2) { animation-delay: .15s; } .rec-wave i:nth-child(3) { animation-delay: .3s; } .rec-wave i:nth-child(4) { animation-delay: .45s; } .rec-wave i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { height: 30%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .rec-wave i { animation: none; height: 60%; } }

/* ---------- inicio: estados y lista de chats ---------- */
.home { height: var(--app-h, 100dvh); display: flex; flex-direction: column; width: 100%; max-width: 860px; margin: 0 auto; background: var(--bg); }
@media (min-width: 900px) { .home { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.home-top { gap: .3rem; }
.home-logo { height: 34px; width: auto; }
.spacer { flex: 1; }
.home-top .avatar.small { width: 32px; height: 32px; }
.stories { display: flex; gap: .9rem; overflow-x: auto; padding: .8rem .9rem .7rem; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; flex: none; }
.stories::-webkit-scrollbar { display: none; }
.story { position: relative; flex: none; width: 68px; }
.story-btn { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%; }
.story-av { width: 60px; height: 60px; font-size: 1.4rem; }
.story-av.ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--accent); }
.story-av.ring.seen { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--line); }
.story-name { font-size: .75rem; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.story-plus { position: absolute; top: 40px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); background: var(--accent); color: var(--accent-ink); font-weight: 800; line-height: 1; padding: 0; display: grid; place-items: center; font-size: 15px; }
.chat-list { flex: 1; overflow-y: auto; padding: .3rem 0 1rem; }
.chat-item { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; background: none; padding: .65rem .95rem; text-align: left; }
.chat-item:hover, .chat-item:focus-visible { background: var(--bg2); }
.chat-av { width: 52px; height: 52px; font-size: 1.25rem; position: relative; overflow: visible; }
.chat-av img { border-radius: 50%; }
.chat-av.has-status { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.chat-av.online::after { content: ''; position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #3dbb6b; border: 2px solid var(--bg); }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.ci-top, .ci-bottom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ci-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.ci-time { color: var(--muted); font-size: .75rem; flex: none; }
.chat-item.unread .ci-time { color: var(--accent); font-weight: 700; }
.ci-bottom > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .9rem; }
.ci-text .ticks { width: 18px; height: 12px; vertical-align: -1px; }
.ci-typing { color: var(--accent) !important; font-style: italic; }
.chat-item.unread .ci-text { color: var(--ink); font-weight: 600; }
.badge { flex: none; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.chats-empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.back-btn { position: relative; padding: .45rem .2rem; margin-right: -.3rem; }
.back-btn .ico { width: 24px; height: 24px; }
.unread-total { font-size: .75rem; font-weight: 800; color: var(--accent); }

/* nuevo chat */
.nc-card { align-items: flex-start; }
.nc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.nc-main .hint { margin: 0; }
.us-ico { font-size: 1.3rem; font-weight: 800; color: var(--accent); width: 1.6rem; text-align: center; }
.invite-out { width: 100%; display: flex; flex-direction: column; gap: .4rem; }
.invite-out input, .lookup-row input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .7rem; background: var(--card); }
.lookup-row { display: flex; gap: .4rem; width: 100%; }
.lookup-hit { display: flex; align-items: center; gap: .6rem; width: 100%; background: var(--card); border-radius: 14px; padding: .5rem .6rem; }

/* crear estado */
.status-card { border-radius: 18px; min-height: 220px; display: grid; place-items: center; padding: 1rem; }
.status-card textarea { width: 100%; border: 0; background: transparent; color: inherit; text-align: center; font-size: 1.4rem; font-weight: 700; resize: none; outline: none; }
.status-card textarea::placeholder { color: inherit; opacity: .6; }
[data-bg="durazno"] { background: linear-gradient(135deg, #f7a072, #f0627a); color: #fff; }
[data-bg="jade"] { background: linear-gradient(135deg, #3fb68b, #1f7a6a); color: #fff; }
[data-bg="lavanda"] { background: linear-gradient(135deg, #a58be0, #6c55c1); color: #fff; }
[data-bg="noche"] { background: linear-gradient(135deg, #2b2d42, #1b1c2b); color: #fff; }
[data-bg="cielo"] { background: linear-gradient(135deg, #6ec3f4, #3a7bd5); color: #fff; }
.bg-chips { display: flex; gap: .5rem; margin: .7rem 0 .3rem; }
.bg-chip { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--card); padding: 0; box-shadow: 0 0 0 1px var(--line); }
.bg-chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.sc-photo { display: block; width: 100%; max-height: 50dvh; object-fit: contain; border-radius: 14px; margin-top: .5rem; background: #000; }

/* ver estados */
.status-viewer { width: min(480px, 100vw); height: min(860px, 100dvh); max-height: 100dvh; max-width: 100vw; border-radius: 0; background: #111; color: #fff; padding: 0; overflow: hidden; }
.status-viewer[open] { display: flex; flex-direction: column; }
@media (min-width: 520px) { .status-viewer { border-radius: 20px; } }
.sv-bars { display: flex; gap: 4px; padding: .6rem .7rem 0; z-index: 2; }
.sv-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-bar.run i { animation: svfill var(--dur, 5s) linear forwards; }
.sv-bar.run.paused i { animation-play-state: paused; }
@keyframes svfill { to { width: 100%; } }
.sv-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; z-index: 2; }
.sv-head .icon-btn { color: #fff; }
.sv-head .icon-btn:hover { background: rgba(255,255,255,.15); }
.sv-who { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.sv-who small { opacity: .75; }
.sv-body { flex: 1; display: grid; place-items: center; min-height: 0; position: relative; }
.sv-text { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; }
.sv-text p { font-size: 1.6rem; font-weight: 700; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sv-orig { margin-top: 1rem; opacity: .8; }
.sv-photo { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-caption { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: .8rem 1rem; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: center; }
.sv-nav { position: absolute; top: 90px; bottom: 70px; width: 35%; border: 0; background: transparent; z-index: 1; }
.sv-nav.prev { left: 0; } .sv-nav.next { right: 0; }
.sv-foot { display: flex; justify-content: center; gap: .6rem; padding: .7rem; z-index: 2; }
.sv-foot .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.sv-viewers { position: absolute; left: 0; right: 0; bottom: 0; max-height: 50%; overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 18px 18px 0 0; padding: 1rem 1.2rem; z-index: 3; }
.sv-viewer { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); }

/* invitación */
.inv-title { font-size: 1.25rem; margin: 1rem 0 .3rem; }
.invite-card .lang-switch label { display: inline-flex; align-items: center; gap: .35rem; }
.invite-card .lang-switch input { accent-color: var(--accent); }
.invite-card small.hint { display: block; margin-top: .25rem; }
.invite-card .lang-switch label { white-space: nowrap; }

/* «Mi ánimo» */
.mood-q { margin: 0 0 .4rem; font-weight: 700; }
.mood-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-bottom: .8rem; }
.mood-chips.nudge { animation: nudge .5s; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mood-opt { display: flex; flex-direction: column; align-items: center; gap: .1rem; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: .4rem .2rem; font-size: .7rem; color: var(--muted); }
.mood-opt .mood-e { font-size: 1.5rem; line-height: 1.2; }
.mood-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.mood-opt .mood-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mood-badge { position: absolute; top: -4px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 15px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.15); z-index: 1; }
.story-av { position: relative; overflow: visible; }
.story-av img { border-radius: 50%; }
.mood-chip { margin-left: .3rem; font-size: 1rem; line-height: 1; }
.sv-mood { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-weight: 700; font-size: 1.05rem; margin-bottom: .8rem; }
.sv-mood-e { font-size: 4rem; line-height: 1.1; }
.sv-caption .sv-mood { flex-direction: row; justify-content: center; margin: 0 0 .3rem; }
.sv-caption .sv-mood-e { font-size: 1.6rem; }
.sv-caption p { margin: 0; }

/* ---------- tema Noche (oscuro) ---------- */
[data-theme="noche"] {
  --bg: #16121d; --bg2: #221b2d; --card: #211a2b; --ink: #f2ecfb; --muted: #a99fbe;
  --accent: #ec6f8c; --accent-ink: #ffffff; --accent-soft: #46283f;
  --mine: #4a2c4f; --theirs: #2a2236; --line: #3a3049; --sun: #f7b801; --danger: #ff7a70;
  color-scheme: dark;
}
[data-theme="noche"] .login { background: radial-gradient(circle at 20% 10%, #2a2036, var(--bg)); }
[data-theme="noche"] .invite-out input, [data-theme="noche"] .lookup-row input, [data-theme="noche"] .search-input { color: var(--ink); }

/* ---------- ajustes de este dispositivo ---------- */
[data-font="s"] { --msg-font: 13.5px; }
[data-font="l"] { --msg-font: 17.5px; }
[data-font="xl"] { --msg-font: 20px; }
[data-font="l"] .ci-name, [data-font="xl"] .ci-name { font-size: 1.1rem; }
[data-chatbg="puntos"] .messages, .wp-tile[data-wp="puntos"] .wp-bg { background-image: radial-gradient(var(--line) 1.4px, transparent 1.5px); background-size: 22px 22px; }
[data-chatbg="corazones"] .messages, .wp-tile[data-wp="corazones"] .wp-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M18 26c-1-1-6-3.5-6-7a3.2 3.2 0 0 1 6-1.6A3.2 3.2 0 0 1 24 19c0 3.5-5 6-6 7z' fill='%23e5607e' fill-opacity='.12'/%3E%3Cpath d='M44 50c-.7-.7-4-2.4-4-4.7a2.2 2.2 0 0 1 4-1.1 2.2 2.2 0 0 1 4 1.1c0 2.3-3.3 4-4 4.7z' fill='%238f4fc8' fill-opacity='.12'/%3E%3C/svg%3E"); }
[data-chatbg="estrellas"] .messages, .wp-tile[data-wp="estrellas"] .wp-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M15 8l1.6 3.4 3.7.5-2.7 2.6.7 3.7L15 16.4l-3.3 1.8.7-3.7-2.7-2.6 3.7-.5z' fill='%23f7b801' fill-opacity='.18'/%3E%3Ccircle cx='45' cy='42' r='1.6' fill='%238f4fc8' fill-opacity='.25'/%3E%3Ccircle cx='38' cy='14' r='1' fill='%23e5607e' fill-opacity='.3'/%3E%3C/svg%3E"); }
[data-chatbg="degradado"] .messages, .wp-tile[data-wp="degradado"] .wp-bg { background-image: linear-gradient(170deg, var(--bg) 0%, var(--accent-soft) 100%); background-attachment: local; }
[data-bubble="nube"] .bubble { border-radius: 22px; }
[data-bubble="nube"] .msg.mine .bubble { border-bottom-right-radius: 22px; }
[data-bubble="cuadrada"] .bubble { border-radius: 8px; }
[data-bubble="cuadrada"] .msg.mine .bubble { border-bottom-right-radius: 2px; }

/* ---------- pantalla de ajustes ---------- */
.settings-dialog { width: min(560px, 100vw); max-height: 100dvh; }
.settings-dialog .dialog-body { max-height: calc(100dvh - 90px); }
.set-me { display: flex; align-items: center; gap: .8rem; padding: .4rem 0 .8rem; }
.set-me .avatar { width: 62px; height: 62px; font-size: 1.5rem; }
.set-me .ci-main { gap: 0; }
.set-sec { margin: .9rem 0 .3rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.set-card { background: var(--bg); border-radius: 16px; padding: .3rem .9rem; }
.set-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .set-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row .set-txt small { color: var(--muted); font-size: .8rem; }
.set-block { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.set-block:last-child { border-bottom: 0; }
.set-block > span { display: block; margin-bottom: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .35rem .8rem; font-size: .88rem; display: inline-flex; align-items: center; gap: .35rem; }
.chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.chip i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.switch { position: relative; width: 46px; height: 28px; flex: none; border: 0; border-radius: 999px; background: var(--line); padding: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.set-form { display: flex; flex-direction: column; gap: .45rem; padding: .5rem 0 .2rem; }
.set-form input { border: 1px solid var(--line); border-radius: 12px; padding: .5rem .7rem; background: var(--card); color: var(--ink); }
.set-card .field { margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.set-card .row-end { justify-content: flex-start; }

/* ---------- bloqueo con PIN ---------- */
.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, var(--bg2), var(--bg)); padding: 1.5rem; }
.lock-card { text-align: center; display: flex; flex-direction: column; gap: .7rem; align-items: center; }
.lock-logo { border-radius: 18px; }
.lock-card input { width: 12ch; text-align: center; font-size: 1.6rem; letter-spacing: .4em; border: 1px solid var(--line); border-radius: 14px; padding: .4rem; background: var(--card); color: var(--ink); }
[data-bubble="nube"] .msg.theirs .bubble { border-bottom-left-radius: 22px; }
[data-bubble="cuadrada"] .msg.theirs .bubble { border-bottom-left-radius: 2px; }

/* ---------- ajustes (estilo lista, sobrio) ---------- */
.settings-dialog { --set-bg: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.settings-dialog .dialog-body { background: var(--set-bg); padding-top: .6rem; }
.settings-dialog .dialog-head { position: relative; justify-content: center; }
.settings-dialog .dialog-head h2 { font-size: 1.05rem; font-weight: 700; }
.settings-dialog #settingsClose { position: absolute; right: .6rem; }
.set-back { position: absolute; left: .4rem; color: var(--accent); }
.set-group { margin: 0 0 1.1rem; }
.set-group h3 { margin: 0 .9rem .35rem; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.set-list { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.set-item { width: 100%; display: flex; align-items: center; gap: .75rem; min-height: 50px; padding: .55rem .9rem; background: none; border: 0; border-top: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); text-align: left; font: inherit; font-size: .95rem; }
.set-list > .set-item:first-child { border-top: 0; }
button.set-item:active, .set-me:active { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.set-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.set-label small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.set-value { color: var(--muted); font-size: .9rem; }
.set-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; }
.set-ico svg { width: 18px; height: 18px; }
.set-item[data-page="notif"] .set-ico { background: #e5607e; }
.set-item[data-page="privacy"] .set-ico { background: #5b6b8c; }
.set-item[data-page="security"] .set-ico { background: #2f9e7e; }
.set-item[data-page="account"] .set-ico { background: #8a8f98; }
.set-item[data-page="appearance"] .set-ico { background: #8f4fc8; }
.set-chev { color: color-mix(in srgb, var(--ink) 30%, transparent); display: grid; flex: none; }
.set-chev svg { width: 18px; height: 18px; }
.set-check { color: var(--accent); display: grid; flex: none; }
.set-check svg { width: 20px; height: 20px; }
.set-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.opt[aria-checked="true"] .set-label { font-weight: 600; }
.set-me { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .8rem .9rem; margin-bottom: 1.1rem; background: var(--card); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 12px; color: var(--ink); text-align: left; font: inherit; }
.set-me .avatar { width: 58px; height: 58px; font-size: 1.4rem; flex: none; }
.set-me strong { font-size: 1.08rem; }
.set-link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: .3rem 0; flex: none; }
.set-field { display: block; }
.set-field .field { margin: 0; border: 0; padding: .2rem 0; }
.set-danger #logoutBtn { background: none; border: 0; color: #d64545; font: inherit; font-weight: 600; padding: 0; width: 100%; text-align: left; }
.set-hero { text-align: center; padding: .6rem 1rem 1rem; }
.set-hero-ico { width: 54px; height: 54px; margin: 0 auto .5rem; border-radius: 14px; display: grid; place-items: center; background: #2f9e7e; color: #fff; }
.set-hero-ico svg { width: 30px; height: 30px; }
.set-hero p { margin: 0; color: var(--muted); }
.set-preview { border-radius: 12px; padding: .8rem; margin-bottom: 1.1rem; background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); display: flex; flex-direction: column; gap: .4rem; }
.set-preview .msg { display: flex; }
.set-preview .msg.mine { justify-content: flex-end; }
.set-preview .msg.mine .bubble { background: var(--mine); }
.switch { width: 50px; height: 30px; }
.switch::after { width: 26px; height: 26px; top: 2px; left: 2px; }
.switch[aria-checked="true"] { background: #34c759; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ---------- fondo de cada chat (en «Nosotros») ---------- */
.wp-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.wp-tile { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--ink); font: inherit; }
.wp-tile small { font-size: .74rem; color: var(--muted); }
.wp-bg { width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; background-color: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 6px; }
.wp-bg i { display: block; height: 9px; border-radius: 5px; }
.wp-b1 { width: 60%; background: var(--theirs); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.wp-b2 { width: 55%; margin-left: auto; background: var(--mine); }
.wp-tile[aria-checked="true"] .wp-bg { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.wp-tile[aria-checked="true"] small { color: var(--ink); font-weight: 700; }
.wp-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wp-tile { min-width: 0; }
.wp-tile small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.wp-bg { height: auto; aspect-ratio: 3 / 4; box-sizing: border-box; }
.set-foot { text-align: center; color: var(--muted); font-size: .8rem; margin: .2rem 0 .6rem; }
.wp-tile small { white-space: normal; overflow: visible; text-overflow: clip; font-size: .66rem; letter-spacing: -.01em; text-align: center; line-height: 1.15; }

/* =====================================================================
   Mibé Premium · capa visual (colores neutros, degradado de marca solo
   donde importa, tipografía más fina, vidrio esmerilado y sombras suaves)
   ===================================================================== */
:root, [data-theme="durazno"] {
  --bg: #f7f5f3; --bg2: #efebe7; --card: #ffffff; --ink: #1c1917; --muted: #7a716b;
  --accent: #e8604f; --accent-ink: #ffffff; --accent-soft: #fbe3dd;
  --grad: linear-gradient(135deg, #ff7a5c 0%, #ec5f78 100%);
  --mine: #ef6a63; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(28, 25, 23, .09);
  --shadow-1: 0 1px 2px rgba(28, 25, 23, .06), 0 1px 1px rgba(28, 25, 23, .03);
  --shadow-2: 0 8px 24px rgba(28, 25, 23, .08), 0 2px 6px rgba(28, 25, 23, .05);
  --shadow-3: 0 24px 60px rgba(28, 25, 23, .18), 0 6px 18px rgba(28, 25, 23, .08);
  --glass: rgba(255, 255, 255, .78);
}
[data-theme="jade"] {
  --bg: #f3f6f5; --bg2: #e7eeeb; --card: #ffffff; --ink: #10201b; --muted: #61736d;
  --accent: #178a6b; --accent-ink: #ffffff; --accent-soft: #d5ede5;
  --grad: linear-gradient(135deg, #27b48c 0%, #137a62 100%);
  --mine: #1c9a77; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(16, 32, 27, .09);
  --glass: rgba(255, 255, 255, .78);
}
[data-theme="lavanda"] {
  --bg: #f5f4f9; --bg2: #eae7f3; --card: #ffffff; --ink: #1a1730; --muted: #6d6886;
  --accent: #7356d1; --accent-ink: #ffffff; --accent-soft: #e5ddfa;
  --grad: linear-gradient(135deg, #9a7bf0 0%, #6448c6 100%);
  --mine: #7f60dc; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(26, 23, 48, .09);
  --glass: rgba(255, 255, 255, .78);
}
[data-theme="noche"] {
  --bg: #0d0c11; --bg2: #18161f; --card: #16141c; --ink: #f3f1f7; --muted: #9b96aa;
  --accent: #ff6f8e; --accent-ink: #ffffff; --accent-soft: #3a2131;
  --grad: linear-gradient(135deg, #ff7a5c 0%, #e5607e 55%, #8f4fc8 100%);
  --mine: #e5607e; --mine-ink: #ffffff; --theirs: #211e29; --line: rgba(255, 255, 255, .08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .6);
  --glass: rgba(22, 20, 28, .78);
}

/* tipografía */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em;
}
h1, h2, h3, strong, .ci-name, .who strong { letter-spacing: -.015em; }
.who strong { font-weight: 650; font-size: 16.5px; }
.dialog-head h2 { font-weight: 650; }

/* botones */
.btn { background: var(--grad); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); font-weight: 600; letter-spacing: -.005em; transition: transform .12s, box-shadow .2s, filter .2s; }
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.icon-btn { border-radius: 50%; padding: .5rem; transition: background .15s; }
.icon-btn:hover, .icon-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ico { stroke-width: 1.7; }

/* barras superiores de vidrio */
.topbar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.notice { background: color-mix(in srgb, var(--accent) 7%, var(--card)); border-bottom: 1px solid var(--line); }

/* avatares */
.avatar { background: linear-gradient(135deg, var(--accent-soft), var(--bg2)); color: var(--accent); font-weight: 650; }
.avatar.head { box-shadow: none; }
.avatar.head.online::after, .chat-av.online::after { background: #30c46c; }

/* mensajes */
.messages-inner { padding: 1rem .9rem 1.4rem; gap: .3rem; }
.day { background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-1); font-weight: 600; font-size: 11.5px; letter-spacing: .02em; padding: .25rem .8rem; }
.bubble { border-radius: 20px; padding: .5rem .8rem; line-height: 1.4; box-shadow: var(--shadow-1); }
.msg.theirs .bubble { border-bottom-left-radius: 6px; }
.msg.mine .bubble { background: var(--grad); color: var(--mine-ink); border-bottom-right-radius: 6px; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 22%, transparent); }
.msg.mine .bubble.media-only, .msg.mine .bubble.deleted { background: transparent; color: var(--muted); box-shadow: none; }
.msg.mine .bubble .quote { background: rgba(255, 255, 255, .18); border-left-color: rgba(255, 255, 255, .85); }
.msg.mine .bubble .quote strong, .msg.mine .bubble .quote span { color: #fff; }
.msg.mine .bubble .alt-text, .msg.mine .bubble .voice-text { border-top-color: rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .88); }
.msg.mine .voice-play { background: #fff; color: var(--accent); }
.msg.mine .voice-wave { background: repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 3px, transparent 3px 6px); }
.msg.mine .voice-fill { background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 6px); }
.msg.mine .voice-time { color: rgba(255, 255, 255, .85); }
.msg.mine .bubble a { color: #fff; }
.bubble .photo { border-radius: 16px; max-height: 360px; image-rendering: auto; }
.meta { font-size: 10.5px; letter-spacing: .01em; }
.meta button { text-decoration: none; font-weight: 650; }
.reaction { box-shadow: var(--shadow-1); border-color: var(--line); }
.react-bar, .effect-menu, .panel { box-shadow: var(--shadow-3); border-color: var(--line); border-radius: 22px; }
.react-bar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.toast { background: color-mix(in srgb, var(--ink) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-2); font-weight: 500; padding: .55rem 1rem; }
[data-bubble="nube"] .bubble { border-radius: 24px; }
[data-bubble="nube"] .msg.mine .bubble, [data-bubble="nube"] .msg.theirs .bubble { border-radius: 24px; }
[data-bubble="cuadrada"] .bubble { border-radius: 10px; }

/* barra de escribir flotante */
.composer { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); padding: .55rem .7rem calc(.45rem + env(safe-area-inset-bottom)); }
.compose-row textarea { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: .62rem 1rem; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.compose-row textarea:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.send { width: 42px; height: 42px; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.tools .icon-btn .ico { color: var(--muted); }
.tools .icon-btn:hover .ico, .tools .icon-btn[aria-pressed="true"] .ico { color: var(--accent); }
.panel-tabs button { background: transparent; font-weight: 550; color: var(--muted); }
.panel-tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }

/* diálogos */
dialog { border-radius: 24px; box-shadow: var(--shadow-3); }
dialog::backdrop { background: rgba(12, 10, 14, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: dlg-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.field input, .field textarea, .field select { background: var(--card); border-color: var(--line); border-radius: 14px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.us-card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
#usDialog .dialog-body, #profileDialog .dialog-body, #newChatDialog .dialog-body { background: var(--bg); }
.theme-chip { border-width: 1px; border-color: var(--line); }
.theme-chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* inicio */
.home { background: var(--bg); }
.home-top { padding: .7rem .9rem; }
.home-logo { height: 30px; }
.stories { background: transparent; border-bottom: 0; padding: .9rem .9rem .5rem; gap: 1rem; }
.story-av { width: 62px; height: 62px; }
.story-av.ring, .story-av.ring.seen { box-shadow: none; }
.story-av.ring::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--grad); z-index: -1;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px)); }
.story-av.ring.seen::before { background: color-mix(in srgb, var(--ink) 18%, transparent); }
.story-plus { background: var(--grad); box-shadow: var(--shadow-1); border-color: var(--bg); }
.story-name { font-size: .72rem; color: var(--muted); }
.chat-list { background: var(--card); border-radius: 22px 22px 0 0; margin-top: .4rem; padding: .4rem 0 1rem; box-shadow: 0 -1px 0 var(--line); }
.chat-item { padding: .7rem 1rem; position: relative; transition: background .15s; }
.chat-item + .chat-item::before { content: ''; position: absolute; top: 0; left: calc(1rem + 54px + .8rem); right: 1rem; border-top: 1px solid var(--line); }
.chat-item:hover, .chat-item:focus-visible { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.chat-av { width: 54px; height: 54px; }
.chat-av.has-status { box-shadow: none; }
.chat-av.has-status::before { content: ''; position: absolute; inset: -3.5px; border-radius: 50%; background: var(--grad);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 2.2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.2px), #000 calc(100% - 2.2px)); }
.chat-av.online::after { border-color: var(--card); }
.ci-name { font-weight: 600; font-size: 1rem; }
.chat-item.unread .ci-name { font-weight: 700; }
.ci-bottom > :first-child { font-size: .88rem; }
.badge { background: var(--grad); box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 30%, transparent); font-weight: 700; }
.mood-badge { box-shadow: var(--shadow-2); }

/* ánimo y estados */
.mood-opt { border-color: var(--line); border-radius: 16px; box-shadow: var(--shadow-1); }
.mood-opt[aria-checked="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }

/* login */
.login { background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(143, 79, 200, .12), transparent 60%), var(--bg); }
.login-card { border-radius: 28px; box-shadow: var(--shadow-3); border: 1px solid var(--line); }

/* ajustes: más fino */
.set-list, .set-me { border-color: var(--line); box-shadow: var(--shadow-1); }
.switch[aria-checked="true"] { background: var(--accent); }
.set-preview .msg.mine .bubble { background: var(--grad); color: var(--mine-ink); }
.story-av, .chat-av { isolation: isolate; }
.wp-b2 { background: var(--grad); }
.composer { position: relative; z-index: 4; }

/* encabezado del chat: más aire para el nombre */
.topbar { gap: .35rem; padding: .55rem .6rem; }
.topbar .icon-btn { padding: .45rem; }
.who { gap: .6rem; }
.who strong { font-size: 16px; }

/* lista de chats: línea divisoria fina y elegante */
.chat-list { padding-top: .25rem; }
.chat-item { padding: .8rem 1rem; }
.chat-item + .chat-item::before { left: calc(1rem + 54px + .85rem); right: 0; border-top: 0; height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 11%, transparent), color-mix(in srgb, var(--ink) 11%, transparent) 70%, color-mix(in srgb, var(--ink) 0%, transparent)); }
.chat-item:hover::before, .chat-item:hover + .chat-item::before { opacity: 0; }
.ci-main { gap: .2rem; }

/* ---------- más colores ---------- */
[data-theme="rosa"] {
  --bg: #faf5f7; --bg2: #f3e8ed; --card: #ffffff; --ink: #24131b; --muted: #85707b;
  --accent: #e0457b; --accent-ink: #ffffff; --accent-soft: #fbdbe7;
  --grad: linear-gradient(135deg, #ff8fb1 0%, #e0457b 100%); --mine: #e8578a; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(36, 19, 27, .09);
}
[data-theme="cereza"] {
  --bg: #f8f4f4; --bg2: #efe6e7; --card: #ffffff; --ink: #221315; --muted: #806c6f;
  --accent: #b3304d; --accent-ink: #ffffff; --accent-soft: #f5d9df;
  --grad: linear-gradient(135deg, #d6455d 0%, #8e1f3c 100%); --mine: #b3304d; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(34, 19, 21, .09);
}
[data-theme="ambar"] {
  --bg: #f9f6f0; --bg2: #f1eadc; --card: #ffffff; --ink: #231b0f; --muted: #7f725f;
  --accent: #c9761f; --accent-ink: #ffffff; --accent-soft: #f8e5c8;
  --grad: linear-gradient(135deg, #f6b44a 0%, #d9822b 100%); --mine: #e0952f; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(35, 27, 15, .09);
}
[data-theme="oceano"] {
  --bg: #f3f6fa; --bg2: #e5ecf5; --card: #ffffff; --ink: #0f1b2b; --muted: #627086;
  --accent: #2563c9; --accent-ink: #ffffff; --accent-soft: #d8e6fb;
  --grad: linear-gradient(135deg, #3ba7f0 0%, #2563c9 100%); --mine: #2f7fe0; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(15, 27, 43, .09);
}
[data-theme="grafito"] {
  --bg: #f4f4f5; --bg2: #e9e9eb; --card: #ffffff; --ink: #141518; --muted: #6c6e75;
  --accent: #2f3238; --accent-ink: #ffffff; --accent-soft: #e2e3e6;
  --grad: linear-gradient(135deg, #5b5e66 0%, #25272c 100%); --mine: #33363c; --mine-ink: #ffffff; --theirs: #ffffff; --line: rgba(20, 21, 24, .1);
}
[data-theme="grafito"] .ticks.read { stroke: #e0457b; }

/* ---------- forma «hoja» ---------- */
[data-bubble="hoja"] .msg.mine .bubble { border-radius: 22px 4px 22px 22px; }
[data-bubble="hoja"] .msg.theirs .bubble { border-radius: 4px 22px 22px 22px; }

/* ---------- estilo de mis burbujas ---------- */
[data-bstyle="solido"] .msg.mine .bubble:not(.media-only):not(.deleted) { background: var(--mine); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .bubble:not(.media-only):not(.deleted) { color: var(--ink); box-shadow: var(--shadow-1); }
[data-bstyle="suave"] .msg.mine .bubble:not(.media-only):not(.deleted) { background: var(--accent-soft); }
[data-bstyle="contorno"] .msg.mine .bubble:not(.media-only):not(.deleted) { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
[data-bstyle="cristal"] .msg.mine .bubble:not(.media-only):not(.deleted) { background: color-mix(in srgb, var(--accent) 16%, var(--glass)); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow-1); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .bubble .quote { background: color-mix(in srgb, var(--ink) 6%, transparent); border-left-color: var(--accent); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .bubble .quote strong { color: var(--accent); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .bubble .quote span { color: var(--ink); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .bubble :is(.alt-text, .voice-text) { color: var(--muted); border-top-color: var(--line); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .voice-play { background: var(--accent); color: #fff; }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .voice-wave { background: repeating-linear-gradient(90deg, var(--line) 0 3px, transparent 3px 6px); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .voice-fill { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 6px); }
:is([data-bstyle="suave"], [data-bstyle="contorno"], [data-bstyle="cristal"]) .msg.mine .voice-time { color: var(--muted); }

/* muestras en Ajustes */
.set-bub { width: 34px; height: 22px; flex: none; border-radius: 11px 11px 3px 11px; background: var(--grad); }
.set-bub[data-bs="solido"] { background: var(--mine); }
.set-bub[data-bs="suave"] { background: var(--accent-soft); }
.set-bub[data-bs="contorno"] { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
.set-bub[data-bs="cristal"] { background: color-mix(in srgb, var(--accent) 22%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.set-bub.bk { background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.set-bub[data-bk="redonda"] { border-radius: 11px 11px 3px 11px; }
.set-bub[data-bk="nube"] { border-radius: 12px; }
.set-bub[data-bk="hoja"] { border-radius: 11px 3px 11px 11px; }
.set-bub[data-bk="cuadrada"] { border-radius: 4px 4px 1px 4px; }

/* registro: aviso de @usuario disponible */
#rUserCheck.ok { color: #1f9d55; font-weight: 600; }
#rUserCheck.bad { color: var(--danger); font-weight: 600; }

/* foto: HD o estándar */
.preview .info { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.hd-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; padding: .2rem .6rem .2rem .25rem; font-size: .78rem; box-shadow: var(--shadow-1); }
.hd-toggle b { font-size: .68rem; letter-spacing: .04em; padding: .1rem .4rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--muted); }
.hd-toggle[aria-pressed="true"] { color: var(--ink); }
.hd-toggle[aria-pressed="true"] b { background: var(--grad); color: #fff; }

/* Ojito para ver la contraseña */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 2.9rem !important; }
.pw-eye { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--accent); }
.pw-eye:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.pw-match.ok { color: #1f9d55; font-weight: 600; }
.pw-match.bad { color: var(--danger); font-weight: 600; }
.pw-match:empty { display: none; }
.set-note { color: var(--muted); font-size: .88rem; margin: .2rem .4rem .8rem; line-height: 1.4; }

/* Aviso para instalar la app */
.install-banner { display: flex; align-items: center; gap: .75rem; margin: .4rem .9rem .6rem; padding: .7rem .7rem .7rem .8rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1, 0 2px 10px rgba(0,0,0,.06)); }
.install-banner[hidden] { display: none; }
.install-banner img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.install-banner .ib-text { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.install-banner .ib-text strong { font-size: .95rem; }
.install-banner .ib-text small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.install-banner .btn { flex: none; }
.install-banner .ib-close { flex: none; width: 2rem; height: 2rem; border: 0; background: transparent; color: var(--muted); border-radius: 50%; cursor: pointer; font-size: .9rem; }
.my-user-row { box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: .25rem; margin: .2rem 0 .8rem; padding: .3rem .3rem .3rem .9rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.my-user { flex: 1; min-width: 0; font-weight: 700; font-size: 1.02rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.mu-btn { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--card); color: var(--accent); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.mu-btn[hidden] { display: none; }
.mu-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mu-btn:active { transform: scale(.94); }

/* Elegir idioma al registrarse: chips (el círculo de radio se oculta; en iPhone se estiraba a todo el ancho) */
.invite-card .lang-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; margin-top: .5rem; }
.invite-card .lang-switch label { position: relative; justify-content: center; gap: .4rem; padding: .7rem .8rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; min-width: 0; box-shadow: none; }
.invite-card .lang-switch input[type="radio"] { position: absolute; opacity: 0; width: 1px !important; height: 1px; margin: 0; padding: 0; pointer-events: none; }
.invite-card .lang-switch label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent); }
.invite-card .lang-switch label:has(input:checked)::before { content: '✓'; font-weight: 800; }
.invite-card .lang-switch label:has(input:focus-visible) { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 2px; }
.install-banner .nb-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--grad, linear-gradient(135deg,#ff7a5c,#e5607e)); color: #fff; }
.install-banner .nb-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* Permisos */
.perm-all { width: 100%; margin: .2rem 0 .9rem; }
.perm-done { width: 100%; margin-top: .4rem; }
.perm-item .set-label small { white-space: normal; }
.perm-ok { display: inline-flex; align-items: center; gap: .2rem; color: #1f9d55; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.perm-ok .set-check { color: #1f9d55; }
.perm-bad { color: var(--danger); font-size: .8rem; font-weight: 600; max-width: 9rem; text-align: right; }

/* reenviar */
.fwd-label { display: block; font-size: 12px; font-style: italic; opacity: .7; margin-bottom: .2rem; }
.fwd-list { display: flex; flex-direction: column; }
.fwd-item { width: 100%; }
.fwd-item .fwd-state { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; }
.fwd-item.sent { opacity: .75; }
#forwardDialog .dialog-body { background: var(--bg); }

/* Sin recuadro azul al tocar (Android/Chrome); el foco con teclado sigue visible. */
html { -webkit-tap-highlight-color: transparent; }
.sv-nav, .sv-nav:focus, .sv-nav:active { outline: none; background: transparent; box-shadow: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.sv-nav:focus-visible { outline: none; }
.status-viewer, .status-viewer * { -webkit-tap-highlight-color: transparent; }
/* Canción del ánimo: se busca en Mibé y se abre en la app de música (no se reproduce aquí) */
.sc-song { margin-top: .7rem; }
.song-chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .25rem .3rem .25rem .8rem; border-radius: 999px; background: var(--accent-soft, rgba(0,0,0,.06)); border: 1px solid var(--line); }
.song-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.song-chip .icon-btn { width: 28px; height: 28px; font-size: .85rem; }
.song-pane .search-input { width: 100%; margin: 0; }
.song-results { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: .4rem; }
.song-opt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: transparent; color: inherit; padding: .5rem .6rem; border-radius: 10px; cursor: pointer; font: inherit; }
.song-opt:hover, .song-opt:focus-visible { background: var(--accent-soft, rgba(0,0,0,.06)); }
.song-opt .song-t { font-weight: 600; }
.song-opt .song-a { font-size: .85rem; opacity: .7; }
.song-opt.own .song-t { font-weight: 400; font-style: italic; }
.sv-song { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .45rem; max-width: 85%; margin-top: 1rem; padding: .4rem .9rem; border-radius: 999px; border: 0; background: rgba(0,0,0,.45); color: #fff; font: inherit; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); }
.sv-body > .sv-song { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); margin: 0; }
.sv-song-sheet { display: flex; flex-direction: column; gap: .5rem; }
.song-sheet-head { display: flex; flex-direction: column; }
.song-link { text-align: center; text-decoration: none; }

/* Avisos propios (confirmar) */
.confirm-dialog { width: min(340px, 86vw); padding: 1.3rem 1.3rem 1rem; }
.confirm-dialog p { margin: 0 0 1.2rem; font-size: 1.02rem; line-height: 1.4; }
.confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.btn.danger { background: var(--danger); background-image: none; color: #fff; box-shadow: none; }
/* Sin menú del navegador al mantener presionado ni selección accidental en listas e imágenes */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
.chat-item, .story-btn, .status-viewer, .sv-body { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html { touch-action: pan-x pan-y; }
.sv-body.loading::after { content: ''; position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: sv-spin .8s linear infinite; }
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* ===== Publicar ánimo: diseño sobrio ===== */
.status-compose { width: min(480px, 96vw); max-height: 94dvh; display: none; flex-direction: column; overflow: hidden; }
.status-compose[open] { display: flex; }
.status-compose .dialog-body { overflow-y: auto; padding: .2rem 1.1rem .6rem; flex: 1; min-height: 0; }
.sc-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem .5rem; }
.sc-head h2 { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--bg2); margin-bottom: .8rem; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; padding: .45rem; border-radius: 9px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.status-compose .status-card { min-height: 150px; border-radius: 16px; }
.status-compose .status-card textarea { font-size: 1.2rem; font-weight: 600; }
.status-compose .bg-chips { margin: .55rem 0 .2rem; }
.status-compose .bg-chip { width: 24px; height: 24px; border-width: 2px; }
.sc-section { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .7rem; }
.sc-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .45rem; }
.status-compose .mood-chips { display: flex; grid-template-columns: none; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1rem; padding: 0 1.1rem 2px; }
.status-compose .mood-chips::-webkit-scrollbar { display: none; }
.status-compose .mood-opt { flex: none; flex-direction: row; gap: .35rem; padding: .32rem .7rem .32rem .5rem; border-radius: 999px; font-size: .82rem; color: var(--ink); box-shadow: none; border: 1px solid var(--line); background: transparent; }
.status-compose .mood-opt .mood-e { font-size: 1.05rem; line-height: 1; }
.status-compose .mood-opt[aria-checked="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); box-shadow: none; font-weight: 600; }
.sc-row-btn { display: flex; align-items: center; gap: .5rem; width: 100%; border: 1px dashed var(--line); background: transparent; color: var(--ink); font: inherit; font-size: .92rem; padding: .6rem .8rem; border-radius: 12px; cursor: pointer; }
.sc-field { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; background: var(--bg); color: var(--ink); font: inherit; font-size: .95rem; margin-top: .6rem; }
.song-pane .sc-field { margin-top: .5rem; }
.song-chip { display: flex; width: 100%; padding: .35rem .3rem .35rem .8rem; border-radius: 12px; background: var(--bg2); border: 0; }
.song-chip .song-label { flex: 1; font-size: .92rem; font-weight: 600; }
.song-listen { border: 0; background: var(--card); color: var(--ink); font: inherit; font-size: .8rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; cursor: pointer; }
.song-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .45rem; font-size: .85rem; }
.song-links small { color: var(--muted); }
.song-links a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.sc-photo-empty { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sc-photo-empty.nudge { animation: nudge .5s; }
.sc-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 120px; border: 1px dashed var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.sc-pick span:first-child { font-size: 1.6rem; }
.sc-photo-wrap { position: relative; }
.sc-photo-wrap .sc-photo { margin: 0; max-height: 42dvh; }
.sc-photo-actions { position: absolute; left: .5rem; right: .5rem; bottom: .5rem; display: flex; justify-content: space-between; }
.sc-photo-actions .btn { box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.sc-photo-actions .btn.ghost { background: rgba(0,0,0,.5); color: #fff; border-color: transparent; }
.sc-foot { padding: .6rem 1.1rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sc-foot .hint { margin: 0 0 .5rem; font-size: .78rem; text-align: center; }
.sc-publish { width: 100%; }

/* ===== Editor de fotos ===== */
.photo-editor { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: #0b0b0d; color: #fff; padding: 0; display: none; flex-direction: column; }
.photo-editor[open] { display: flex; animation: none; }
.pe-top { display: flex; align-items: center; gap: .3rem; padding: calc(.5rem + env(safe-area-inset-top)) .5rem .5rem; }
.pe-tools { flex: 1; display: flex; justify-content: center; gap: .1rem; overflow-x: auto; scrollbar-width: none; }
.pe-tool { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.pe-tool.on { background: #fff; color: #111; }
.pe-ico { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pe-done { flex: none; }
.pe-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; touch-action: none; overflow: hidden; }
.pe-canvas { display: block; border-radius: 4px; }
.pe-crop { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: auto; }
.pe-crop i { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; }
.pe-crop i[data-h="nw"] { left: -5px; top: -5px; border-right: 0; border-bottom: 0; }
.pe-crop i[data-h="ne"] { right: -5px; top: -5px; border-left: 0; border-bottom: 0; }
.pe-crop i[data-h="sw"] { left: -5px; bottom: -5px; border-right: 0; border-top: 0; }
.pe-crop i[data-h="se"] { right: -5px; bottom: -5px; border-left: 0; border-top: 0; }
.pe-bottom { min-height: 64px; padding: .5rem .8rem calc(.7rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.pe-bottom > .btn { margin: 0 .3rem; }
.pe-bottom:has(> .btn) { flex-direction: row; justify-content: center; }
.pe-hint { margin: 0; font-size: .8rem; opacity: .7; text-align: center; }
.pe-colors { display: flex; gap: .45rem; justify-content: center; }
.pe-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); padding: 0; cursor: pointer; }
.pe-color.on { border-color: #fff; transform: scale(1.18); }
.pe-selbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.pe-selbar .btn.ghost, .pe-bottom .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.pe-del { display: inline-flex; align-items: center; gap: .3rem; }
.pe-del .pe-ico { width: 16px; height: 16px; }
.pe-text-box { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: .5rem; }
.pe-text-in { width: 100%; border: 0; border-radius: 12px; padding: .6rem .8rem; font: inherit; font-size: 1.05rem; background: rgba(255,255,255,.12); color: #fff; resize: none; }
.pe-row { display: flex; justify-content: flex-end; gap: .5rem; }
.pe-stickers { width: 100%; max-height: 30dvh; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .3rem; }
.pe-emoji, .pe-st { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; padding: .3rem; border-radius: 10px; cursor: pointer; }
.pe-st img { width: 40px; height: 40px; object-fit: contain; }
.pe-emoji:active, .pe-st:active { background: rgba(255,255,255,.12); }
/* Buscar canción: ocupa el diálogo completo para que el teclado no tape los resultados */
.status-compose.song-mode { height: 94dvh; }
.status-compose.song-mode .sc-head, .status-compose.song-mode .seg, .status-compose.song-mode #scTextPane, .status-compose.song-mode #scPhotoPane,
.status-compose.song-mode .sc-section:not(.sc-song), .status-compose.song-mode .sc-foot, .status-compose.song-mode .sc-song > .sc-label { display: none; }
.status-compose.song-mode .sc-song { border: 0; margin: 0; padding-top: .8rem; display: flex; flex-direction: column; min-height: 100%; }
.status-compose.song-mode .song-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.status-compose.song-mode .song-results { max-height: none; flex: 1; }
.song-search-row { display: flex; align-items: center; gap: .3rem; }
.song-search-row .sc-field { margin: 0; flex: 1; }
.song-search-row .icon-btn { font-size: 1.6rem; line-height: 1; }
.status-compose:not(.song-mode) #scSongBack { display: none; }
/* Reaccionar y responder a un ánimo */
.sv-reply { position: relative; z-index: 2; padding: .4rem .7rem calc(.7rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .45rem; }
.sv-reacts { display: flex; justify-content: space-around; }
.sv-react { border: 0; background: transparent; font-size: 1.7rem; line-height: 1; padding: .2rem; cursor: pointer; transition: transform .15s; }
.sv-react:active, .sv-react.pop { transform: scale(1.35); }
.sv-reply-form { display: flex; gap: .4rem; }
.sv-reply-form input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.35); color: #fff; border-radius: 999px; padding: .6rem 1rem; font: inherit; }
.sv-reply-form input::placeholder { color: rgba(255,255,255,.7); }
.sv-send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 1.05rem; cursor: pointer; }
.status-viewer .sv-reply:not([hidden]) ~ .sv-foot { display: none; }
.sref { display: flex; align-items: center; gap: .6rem; border-left: 3px solid var(--accent); background: rgba(0,0,0,.05); border-radius: 8px; padding: .35rem .5rem; margin-bottom: .35rem; font-size: 13px; line-height: 1.3; }
.msg.mine .bubble .sref { background: rgba(255,255,255,.18); border-left-color: rgba(255,255,255,.85); }
.sref-info { flex: 1; display: grid; min-width: 0; }
.sref-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.sref-thumb { flex: none; width: 40px; height: 52px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; padding: 0; font-size: 1.3rem; }
/* Menú del chat (mantener presionado) */
.chat-menu { width: min(360px, 90vw); padding: .4rem 0; }
.cm-title { margin: .5rem 1.1rem .4rem; font-weight: 700; color: var(--muted); font-size: .85rem; }
.cm-item { display: flex; align-items: center; gap: .8rem; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; padding: .8rem 1.1rem; text-align: left; cursor: pointer; }
.cm-item:hover, .cm-item:focus-visible { background: var(--bg2); }
.cm-item.danger { color: var(--danger); }
.cm-cancel { justify-content: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: .3rem; }
.cm-ico { width: 1.4rem; text-align: center; }
.ci-mute-ico { font-size: .8rem; margin-left: .3rem; opacity: .7; }
.chat-archived-row { display: flex; align-items: center; gap: .8rem; width: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; padding: .75rem 1rem; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.chat-archived-row strong { flex: 1; font-weight: 600; }
.chat-archived-row small { color: var(--accent); font-weight: 700; }
.car-ico { width: 48px; display: grid; place-items: center; color: var(--muted); font-size: 1.4rem; }
.chat-av.has-status.seen::before { background: var(--line); }
.chat-av.has-status { cursor: pointer; }
.profile-photo .avatar.tappable { cursor: zoom-in; }

/* aviso con varias opciones (eliminar para mí / para todos) */
.confirm-actions.stacked { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; }
.confirm-actions.stacked .btn { width: 100%; justify-content: center; }
.sv-react { border-radius: 50%; width: 46px; height: 46px; display: grid; place-items: center; }
.sv-react.on { background: rgba(255,255,255,.22); box-shadow: 0 0 0 2px rgba(255,255,255,.85); transform: scale(1.12); }
.sv-burst { position: absolute; left: 50%; bottom: 140px; z-index: 5; font-size: 5rem; line-height: 1; pointer-events: none; animation: sv-burst 1.05s ease-out forwards; }
@keyframes sv-burst { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 25% { transform: translate(-50%, -40px) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -260px) scale(1); opacity: 0; } }
/* Deslizar un chat para ver sus acciones */
.chat-row { position: relative; overflow: hidden; }
.chat-row > .chat-item { position: relative; z-index: 1; background: var(--card); touch-action: pan-y; will-change: transform; }
.sw-acts { position: absolute; top: 0; bottom: 0; display: flex; width: 156px; }
.sw-acts.left { left: 0; } .sw-acts.right { right: 0; }
.chat-row:not([data-open="left"]) .sw-acts.left { visibility: hidden; }
.chat-row:not([data-open="right"]) .sw-acts.right { visibility: hidden; }
.chat-row[data-open=""] .sw-acts, .chat-row:not([data-open]) .sw-acts { visibility: hidden; }
.sw-act { flex: 1; border: 0; color: #fff; font: inherit; font-size: .72rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; cursor: pointer; padding: 0 .2rem; }
.sw-ico { font-size: 1.2rem; }
.sw-mute { background: #7a716b; } .sw-archive { background: #5b7fb8; } .sw-del { background: var(--danger); }
/* Reproductor de Deezer (muestra de 30 s) */
.dz-player { display: block; width: 100%; height: 92px; border: 0; border-radius: 12px; background: transparent; }
.song-links .dz-player { flex-basis: 100%; margin-bottom: .2rem; }
.sv-player { position: relative; z-index: 2; padding: 0 .7rem .3rem; }
.song-opt { flex-direction: row; align-items: center; gap: .6rem; }
.song-cover { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: var(--bg2); }
.song-txt { display: flex; flex-direction: column; min-width: 0; }
