/* =======================================================================
   UnderBro :: design system
   Identidad propia "glossy aqua" — claro, profundo, con energía.
   Mobile-first + full responsive. Microinteracciones por todas partes.
   ======================================================================= */
:root {
  /* marca — UnderBro: cian → índigo (del logo) */
  --blue:        #4d8df5;
  --blue-2:      #3a63ec;
  --blue-deep:   #2a4fd6;
  --aqua:        #27a9ff;
  --violet:      #6e2df5;
  --accent:      #3e57fc;
  --accent-grad: linear-gradient(120deg, #27a9ff 0%, #4060f5 52%, #6e2df5 100%);
  --aqua-grad:   linear-gradient(120deg, #27a9ff, #4060f5 55%, #6e2df5);
  --cover-grad:  linear-gradient(135deg, #27a9ff 0%, #4f5cf2 48%, #6e2df5 100%);

  /* tinta */
  --ink:         #2f3850;
  --ink-2:       #46506a;
  --ink-soft:    #8390a8;
  --ink-faint:   #aab4c8;

  /* superficies */
  --bg:          #eaeef5;
  --bg-2:        #e0e6f0;
  --panel:       #ffffff;
  --panel-2:     #f6f8fc;
  --glass:       rgba(255,255,255,.72);
  --line:        #dde3ee;
  --line-soft:   #e9edf4;

  /* señales */
  --like:        #ec5f78;
  --ok:          #3fb27f;
  --warn:        #e08a3c;
  --danger:      #d65a47;

  /* sombras */
  --sh-1: 0 1px 2px rgba(47,56,80,.06), 0 2px 6px rgba(47,56,80,.06);
  --sh-2: 0 2px 6px rgba(47,56,80,.07), 0 10px 28px rgba(47,56,80,.10);
  --sh-3: 0 8px 20px rgba(47,56,80,.12), 0 24px 60px rgba(47,56,80,.18);
  --sh-blue: 0 8px 22px rgba(62,87,252,.42);

  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 24px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Lucida Grande", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --topbar-h: 62px;
  --player-h: 80px;
  --nav-h: 60px;
}

/* ===================================================================== MODO OSCURO */
:root[data-theme="dark"] {
  --ink:         #e7ebf3;
  --ink-2:       #cdd5e4;
  --ink-soft:    #8a94aa;
  --ink-faint:   #5e6880;
  --bg:          #0a0d18;
  --bg-2:        #05060f;
  --panel:       #121726;
  --panel-2:     #1a2033;
  --glass:       rgba(10,13,24,.76);
  --line:        #232b40;
  --line-soft:   #1a2030;
  --blue:        #5f9bff;
  --blue-deep:   #7fb0ff;
  --sh-1: 0 1px 2px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4);
  --sh-2: 0 2px 6px rgba(0,0,0,.5), 0 10px 28px rgba(0,0,0,.58);
  --sh-3: 0 8px 20px rgba(0,0,0,.6), 0 24px 60px rgba(0,0,0,.7);
  --sh-blue: 0 8px 24px rgba(62,87,252,.5);
  color-scheme: dark;
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(1100px 520px at 80% -10%, rgba(110,45,245,.16), transparent 60%),
    radial-gradient(1000px 540px at 8% 0%, rgba(39,169,255,.12), transparent 55%),
    linear-gradient(180deg, #0b0f1c 0%, var(--bg) 44%, var(--bg-2) 100%);
}
:root[data-theme="dark"] .btn {
  background: linear-gradient(180deg, #242b37 0%, #1b212b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--sh-1);
  color: var(--ink-2);
}
:root[data-theme="dark"] .btn::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
:root[data-theme="dark"] .icon-btn { background: linear-gradient(180deg, #242b37, #1b212b); color: var(--ink-2); }
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] textarea:focus,
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .modal-body .field textarea:focus { background: var(--panel-2); }
:root[data-theme="dark"] .auth-tabs button.active,
:root[data-theme="dark"] .tabs button.active { background: var(--panel); color: var(--blue); }
:root[data-theme="dark"] .dm-bubble.them { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .t-genre { background: linear-gradient(180deg, #232c3d, #1b2230); border-color: #2c3550; color: #6fb6ff; }
:root[data-theme="dark"] .profile-back:hover { background: var(--panel-2); }
:root[data-theme="dark"] input[type=color] { background: var(--panel-2); }
:root[data-theme="dark"] ::selection { background: rgba(62,87,252,.4); }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(110,45,245,.12), transparent 60%),
    radial-gradient(1000px 520px at 12% 0%, rgba(39,169,255,.12), transparent 55%),
    linear-gradient(180deg, #f3f6fb 0%, var(--bg) 46%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* capa ambiental orgánica que deriva muy lentamente tras la app */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px);
  pointer-events: none; opacity: .5;
}
body::before { width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(39,169,255,.42), transparent 70%); animation: drift 26s ease-in-out infinite; }
body::after { width: 560px; height: 560px; bottom: -200px; right: -140px;
  background: radial-gradient(circle, rgba(110,45,245,.42), transparent 70%); animation: drift 32s ease-in-out infinite reverse; }

button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: var(--blue-deep); text-decoration: none; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--ink); }
img { display: block; }
::selection { background: rgba(111,143,198,.28); }
.hidden { display: none !important; }

/* scrollbars finos */
* { scrollbar-width: thin; scrollbar-color: #cdd6e6 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #cdd6e6; border-radius: 9px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #b7c2d8; background-clip: content-box; }

/* ------------------------------------------------------------ keyframes */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -480px 0; } 100% { background-position: 480px 0; } }
@keyframes blob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(28px,-22px) scale(1.12); } 66% { transform: translate(-22px,16px) scale(.94); } }
@keyframes eqbar { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes sheen { to { transform: translateX(220%) skewX(-18deg); } }
@keyframes wavebreath { 0%,100% { transform: scaleY(.62); } 50% { transform: scaleY(1.18); } }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.15); } 100% { transform: translate(-30px,20px) scale(.92); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===================================================================== LOGO */
.logo {
  position: relative; display: inline-block;
  font-weight: 800; letter-spacing: -.5px; line-height: 1;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; transition: transform .18s var(--ease), filter .18s;
}
.logo:hover { transform: translateY(-1px); }
.logo .u {
  background: linear-gradient(135deg, #27a9ff 0%, #3e57fc 55%, #6e2df5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===================================================================== BTN */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 16px; font-weight: 650; font-size: 13px; color: var(--ink-2);
  background: linear-gradient(180deg, #ffffff 0%, #eef2f8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--sh-1);
  transition: transform .14s var(--ease), box-shadow .18s var(--ease), filter .18s;
  white-space: nowrap;
}
.btn::after {
  content: ""; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-60%) skewX(-18deg); pointer-events: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--sh-2); }
.btn:hover::after { animation: sheen .7s var(--ease); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary {
  color: #fff; border-color: transparent; background: var(--accent-grad);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), var(--sh-blue);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary svg { stroke: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(62,87,252,.10); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.icon { padding: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ===================================================================== AUTH */
.auth-screen {
  position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 22px;
  overflow: hidden;
}
.auth-screen::before, .auth-screen::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  filter: blur(60px); opacity: .55; z-index: 0; animation: blob 16s var(--ease) infinite;
}
.auth-screen::before { background: radial-gradient(circle, rgba(39,169,255,.55), transparent 70%); top: -120px; left: -80px; }
.auth-screen::after  { background: radial-gradient(circle, rgba(110,45,245,.5), transparent 70%); bottom: -140px; right: -90px; animation-delay: -8s; }
.auth-card {
  position: relative; z-index: 1; width: min(430px, 100%);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); overflow: hidden; animation: fadeUp .5s var(--ease) both;
}
.auth-head {
  position: relative; overflow: hidden;
  text-align: center; padding: 40px 28px 26px;
  background:
    radial-gradient(420px 220px at 50% -20%, rgba(62,87,252,.32), transparent 70%),
    linear-gradient(165deg, #0c1226 0%, #070a16 60%, #05060f 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.auth-head .logo { font-size: 46px; }
.auth-logo { width: min(230px, 64%); height: auto; margin: 0 auto; filter: drop-shadow(0 10px 28px rgba(62,87,252,.4)); }
.auth-head p { color: #aeb8d6; }
.auth-head p { color: var(--ink-soft); font-size: 12px; margin-top: 6px; letter-spacing: 1.5px; text-transform: lowercase; }
.auth-body { padding: 26px 28px 30px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 13px; padding: 4px; }
.auth-tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: none; background: transparent;
  color: var(--ink-soft); font-weight: 650; font-size: 13px; transition: all .2s var(--ease);
}
.auth-tabs button.active { color: var(--blue-deep); background: #fff; box-shadow: var(--sh-1); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .2px; }
.field input, .modal-body .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--panel-2); transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .modal-body .field textarea:focus {
  outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(62,87,252,.18);
}
.auth-body .btn.primary { width: 100%; padding: 13px; margin-top: 8px; font-size: 14px; }
.auth-msg { font-size: 12.5px; margin-top: 13px; text-align: center; min-height: 16px; }
.auth-msg.error { color: var(--danger); }
.auth-msg.ok { color: var(--ok); }

/* ===================================================================== APP LAYOUT */
.app {
  display: grid;
  grid-template-columns: 244px 1fr 312px;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "brand topbar topbar" "side main right";
  height: 100dvh; max-width: 1560px; margin: 0 auto;
}
.brand {
  grid-area: brand; display: flex; align-items: center; padding: 0 20px;
  border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft);
  background: var(--glass); backdrop-filter: blur(10px);
}
.brand .logo { font-size: 27px; }

.topbar {
  grid-area: topbar; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--glass); backdrop-filter: blur(10px); position: relative; z-index: 20;
}
.tabs { display: flex; gap: 3px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 3px; }
.tabs button { border: none; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--ink-soft); transition: all .2s var(--ease); }
.tabs button.active { background: #fff; color: var(--blue-deep); box-shadow: var(--sh-1); }
.tabs button:not(.active):hover { color: var(--ink-2); }
.search { flex: 1; max-width: 440px; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 13px; width: 16px; height: 16px; stroke: var(--ink-soft); pointer-events: none; }
.search input { width: 100%; padding: 10px 14px 10px 38px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel-2); transition: border-color .18s, box-shadow .18s, background .18s; }
.search input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(62,87,252,.16); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: linear-gradient(180deg,#fff,#eef2f8);
  display: grid; place-items: center; color: var(--ink-2); transition: transform .14s var(--ease), box-shadow .18s;
  box-shadow: var(--sh-1);
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: linear-gradient(180deg,#f0826b,#e2674f); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(226,103,79,.5);
  animation: pop .3s var(--ease);
}
.avatar-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 30px; cursor: pointer; transition: background .18s; }
.avatar-chip:hover { background: rgba(62,87,252,.10); }
.avatar-chip .avatar { width: 34px; height: 34px; }
.avatar-chip .uname { font-weight: 650; font-size: 13px; }

/* ----------------------------------------------------------- SIDEBAR */
.sidebar {
  grid-area: side; border-right: 1px solid var(--line-soft); padding: 18px 14px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0));
}
.side-group h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-faint); padding: 0 12px 9px; font-weight: 700; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 11px; color: var(--ink-2); font-weight: 650; font-size: 13.5px; width: 100%;
  border: none; background: none; text-align: left; transition: background .16s, color .16s;
}
.nav-item svg { width: 18px; height: 18px; stroke: var(--ink-soft); transition: stroke .16s; }
.nav-item:hover { background: rgba(62,87,252,.08); }
.nav-item.active { color: var(--blue-deep); background: linear-gradient(90deg, rgba(111,143,198,.16), rgba(111,143,198,.05)); }
.nav-item.active svg { stroke: var(--blue-deep); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent-grad); }
.nav-item .count { margin-left: auto; font-size: 11px; color: var(--ink-faint); font-weight: 700; background: var(--panel-2); padding: 1px 7px; border-radius: 8px; }
.upload-cta { width: 100%; padding: 12px; font-size: 13.5px; }

/* ----------------------------------------------------------- MAIN */
.main { grid-area: main; overflow-y: auto; padding: 22px 26px calc(var(--player-h) + 30px); scroll-behavior: smooth; }
.main.swap { animation: fadeUp .32s var(--ease); }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.push-btn-wrap { flex-shrink: 0; }
.push-btn-wrap .btn { white-space: nowrap; }
.push-hint { font-size: 12.5px; color: var(--ink-soft); }
.main-head h2 { font-size: 21px; font-weight: 820; color: var(--ink); letter-spacing: -.3px; }
.main-head .sub { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }

/* ----------------------------------------------------------- TRACK CARD */
.track {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 15px; margin-bottom: 14px; box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), border-color .2s;
  animation: fadeUp .4s var(--ease) both;
}
.track > * { position: relative; z-index: 1; }
.track:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: #d2dcec; }
.track.playing { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--sh-2); }

/* carátula como fondo de toda la pill (detrás del texto y la onda) */
.track.has-bg { background-size: cover; background-position: center; border-color: transparent; }
.track.has-bg::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(16,20,36,.58), rgba(16,20,36,.74)); }
.track.has-bg.playing { box-shadow: 0 0 0 2px rgba(255,255,255,.55), var(--sh-2); }

/* feed compacto tipo lista */
.feed-list.compact .track { padding: 11px 14px; gap: 7px; border-radius: var(--r); margin-bottom: 9px; }
.feed-list.compact .track .t-title { font-size: 14px; }
.feed-list.compact .track .t-artist { font-size: 11.5px; }
.feed-list.compact .track .wave { height: 30px; }
.feed-list.compact .track .t-genre { padding: 2px 9px; font-size: 10px; }
.feed-list.compact .track .t-foot { gap: 2px; }
.feed-list.compact .track .act { padding: 5px 7px; }
.feed-list.compact .play-lg { width: 46px; height: 46px; }
.feed-list.compact .play-lg svg { width: 17px; height: 17px; }
@media (max-width: 720px) { .feed-list.compact .track .wave { height: 26px; } }
.feed-list .track:nth-child(1){animation-delay:.02s}.feed-list .track:nth-child(2){animation-delay:.06s}
.feed-list .track:nth-child(3){animation-delay:.10s}.feed-list .track:nth-child(4){animation-delay:.14s}
.feed-list .track:nth-child(5){animation-delay:.18s}.feed-list .track:nth-child(6){animation-delay:.22s}
.feed-list .track:nth-child(7){animation-delay:.26s}.feed-list .track:nth-child(8){animation-delay:.30s}

/* fila: botón de play (izquierda) + onda a lo ancho */
.wave-row { display: flex; align-items: center; gap: 13px; }
.wave-row .wave { flex: 1; margin: 0; }
.play-lg { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent-grad); box-shadow: var(--sh-blue); display: grid; place-items: center; padding: 0; transition: transform .14s var(--ease); }
.play-lg:hover { transform: scale(1.07); }
.play-lg:active { transform: scale(.93); }
.play-lg svg { width: 20px; height: 20px; fill: #fff; stroke: #fff; }
.play-lg .ci-play { margin-left: 2px; }
.play-lg .ci-pause { display: none; }
.track.playing .play-lg .ci-play { display: none; }
.track.playing .play-lg .ci-pause { display: inline; }
.track.has-bg .play-lg { border: 2px solid rgba(255,255,255,.85); }

.track .t-head { display: flex; align-items: flex-start; gap: 8px; }
.track .t-titles { flex: 1; min-width: 0; }
.track .t-title { font-weight: 750; font-size: 15.5px; color: var(--ink); letter-spacing: -.2px; }
.track .t-artist { font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.track .t-artist a { color: var(--blue-deep); font-weight: 600; cursor: pointer; }
.track .t-artist a:hover { text-decoration: underline; }
.t-genre { margin-left: auto; font-size: 10.5px; font-weight: 650; color: var(--blue-deep); background: linear-gradient(180deg,#f1f6fd,#e7eefb); border: 1px solid #dbe5f5; padding: 4px 11px; border-radius: 30px; white-space: nowrap; }

/* waveform real, simétrico y centrado */
.wave { position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; height: 50px; cursor: pointer; overflow: hidden; }
.wave .bar { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; }
.wave .bar::before { content: ""; width: 100%; max-width: 4px; margin: 0 auto; border-radius: 3px; background: #c7d2e6; transition: background .12s, transform .12s; height: var(--h,40%); }
.wave .bar.played::before { background: linear-gradient(180deg, var(--aqua), var(--blue-deep)); }
.wave:hover .bar::before { transform: scaleY(1.06); }
.track.playing .wave .bar::before { animation: wavebreath 1.2s var(--ease) infinite; animation-delay: var(--d); }

/* texto y onda sobre la carátula de fondo */
.track.has-bg .t-title { color: #fff; }
.track.has-bg .t-artist { color: rgba(255,255,255,.82); }
.track.has-bg .t-artist a { color: #fff; }
.track.has-bg .time { color: rgba(255,255,255,.85); }
.track.has-bg .act { color: rgba(255,255,255,.9); }
.track.has-bg .act svg { stroke: rgba(255,255,255,.9); }
.track.has-bg .act:hover { background: rgba(255,255,255,.16); color: #fff; }
.track.has-bg .act.like.on, .track.has-bg .act.like.on svg { color: #ff8aa0; stroke: #ff8aa0; fill: #ff8aa0; }
.track.has-bg .t-genre { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); color: #fff; }
.track.has-bg .wave .bar::before { background: rgba(255,255,255,.5); }
.track.has-bg .wave .bar.played::before { background: #fff; }
.track.has-bg .comments { border-top-color: rgba(255,255,255,.22); }
.track.has-bg .comment .c-name { color: #fff; }
.track.has-bg .comment .c-time { color: rgba(255,255,255,.6); }
.track.has-bg .comment .c-body p { color: rgba(255,255,255,.92); }
.track.has-bg .c-hint { color: rgba(255,255,255,.8); }
.track.has-bg .comment-form input { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.track.has-bg .comment-form input::placeholder { color: rgba(255,255,255,.7); }

.track .t-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.track .t-foot .time { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: auto; display: inline-flex; align-items: center; gap: 5px; }
.act { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; color: var(--ink-soft); font-size: 12px; font-weight: 650; padding: 6px 9px; border-radius: 9px; transition: background .15s, color .15s, transform .12s; }
.act svg { width: 15px; height: 15px; stroke: var(--ink-soft); transition: stroke .15s, fill .15s; }
.act:hover { background: rgba(62,87,252,.10); color: var(--ink-2); }
.act:active { transform: scale(.92); }
.act.like.on { color: var(--like); }
.act.like.on svg { stroke: var(--like); fill: var(--like); animation: pop .32s var(--ease); }
.act.repost.on { color: #2fa56f; }
.act.repost.on svg { stroke: #2fa56f; animation: pop .32s var(--ease); }
.track.has-bg .act.repost.on, .track.has-bg .act.repost.on svg { color: #7be0ad; stroke: #7be0ad; }
.repost-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.repost-badge svg { width: 14px; height: 14px; }
.repost-badge a { color: var(--accent); cursor: pointer; }
.track.has-bg .repost-badge { color: rgba(255,255,255,.85); }
.act.danger:hover { background: rgba(214,90,71,.12); color: var(--danger); }
.act.danger:hover svg { stroke: var(--danger); }

/* comments */
.comments { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; animation: fadeIn .25s; }
.comment { display: flex; gap: 10px; margin-bottom: 11px; font-size: 13px; align-items: flex-start; }
.comment .c-av { flex-shrink: 0; cursor: pointer; }
.comment .c-av .avatar { width: 32px; height: 32px; }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-line { display: flex; align-items: center; gap: 7px; }
.comment .c-name { color: var(--ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.comment .c-name:hover { text-decoration: underline; }
.comment .c-time { color: var(--ink-faint); font-size: 10.5px; }
.comment .c-del { margin-left: auto; border: none; background: none; color: var(--ink-faint); font-size: 13px; padding: 2px 6px; border-radius: 7px; flex-shrink: 0; }
.comment .c-del:hover { background: rgba(214,90,71,.12); color: var(--danger); }
.comment .c-body p { margin-top: 2px; color: var(--ink-2); word-wrap: break-word; overflow-wrap: anywhere; }
.c-hint { color: var(--ink-soft); font-size: 12.5px; margin-bottom: 8px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.comment-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--panel-2); }
.comment-form input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(62,87,252,.15); }
.comment-send { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--accent-grad); box-shadow: var(--sh-blue); display: grid; place-items: center; }
.comment-send svg { width: 17px; height: 17px; }
.comment-send:active { transform: scale(.92); }

/* chips de colaboradores */
.collab-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.collab-chips:empty { display: none; }
.collab-chips .chip { display: inline-flex; align-items: center; gap: 5px; background: #eef3fb; border: 1px solid #dbe5f5; color: var(--blue-deep); font-size: 12.5px; font-weight: 600; padding: 4px 6px 4px 11px; border-radius: 20px; }
.collab-chips .chip button { border: none; background: rgba(62,87,252,.18); color: var(--blue-deep); width: 18px; height: 18px; border-radius: 50%; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.collab-add { display: flex; gap: 8px; position: relative; }
.collab-sug { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); overflow: hidden auto; max-height: 246px; animation: fadeIn .15s; }
.collab-sug .cs-item { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; padding: 9px 12px; cursor: pointer; text-align: left; transition: background .14s; }
.collab-sug .cs-item:hover { background: var(--panel-2); }
.collab-sug .cs-item .avatar { width: 32px; height: 32px; flex-shrink: 0; }
.collab-sug .cs-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.collab-sug .cs-meta b { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collab-sug .cs-meta span { font-size: 11.5px; color: var(--ink-soft); }
.collab-sug .cs-empty { padding: 11px 12px; font-size: 12.5px; color: var(--ink-soft); }
.collab-add input { flex: 1; min-width: 0; padding: 10px 13px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--panel-2); }
.collab-add input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(62,87,252,.15); }
.t-artist a { cursor: pointer; }

/* avatar */
.avatar { border-radius: 50%; background: var(--cover-grad); display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 12px; overflow: hidden; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ----------------------------------------------------------- RIGHT */
.right { grid-area: right; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0)); }
.right-section { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.right-section h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-faint); margin-bottom: 13px; display: flex; align-items: center; gap: 7px; font-weight: 700; }
.online-list { display: flex; flex-direction: column; gap: 3px; max-height: 230px; overflow-y: auto; }
.online-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 11px; cursor: pointer; transition: background .15s; }
.online-item:hover { background: rgba(62,87,252,.08); }
.online-item .avatar { width: 32px; height: 32px; }
.online-item .meta { line-height: 1.25; min-width: 0; flex: 1; }
.online-item .meta .n { font-weight: 650; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-item .meta .s { font-size: 10.5px; color: var(--ok); }
.dot-online { width: 9px; height: 9px; border-radius: 50%; background: #54c98a; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(84,201,138,.3); }

/* chat */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 11px; }
.chat-msg { font-size: 13px; animation: fadeUp .25s var(--ease); }
.chat-msg .who { font-weight: 750; color: var(--blue-deep); font-size: 12px; cursor: pointer; }
.chat-msg .who:hover { text-decoration: underline; }
.chat-msg .when { color: var(--ink-faint); font-size: 10px; margin-left: 6px; }
.chat-msg p { color: var(--ink-2); margin-top: 2px; word-wrap: break-word; line-height: 1.4; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--glass); backdrop-filter: blur(8px); }
.chat-form input { flex: 1; padding: 10px 15px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--panel-2); }
.chat-form input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(62,87,252,.15); }
.chat-form button { border-radius: 50%; width: 40px; height: 40px; padding: 0; flex-shrink: 0; }

/* ===================================================================== PLAYER */
.player {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--player-h); z-index: 45;
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: var(--glass); backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(47,56,80,.10);
  animation: fadeUp .35s var(--ease);
}
.player.hidden { display: none !important; }
.player .now { display: flex; align-items: center; gap: 13px; width: 240px; min-width: 0; }
.player .now .cover { width: 54px; height: 54px; border-radius: 12px; background: var(--cover-grad); overflow: hidden; flex-shrink: 0; box-shadow: var(--sh-1); position: relative; }
.player .now .cover img { width: 100%; height: 100%; object-fit: cover; }
.player .now .cover { animation: floaty 4.5s ease-in-out infinite; }
.player .now .info { min-width: 0; }
.player .now .info .t { font-weight: 750; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .now .info .a { font-size: 11.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .controls { display: flex; align-items: center; gap: 10px; }
.player .controls button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: linear-gradient(180deg,#fff,#eef2f8); display: grid; place-items: center; transition: transform .14s var(--ease); }
.player .controls button:hover { transform: scale(1.06); }
.player .controls button:active { transform: scale(.94); }
.player .controls .play-big { width: 48px; height: 48px; border-color: transparent; background: var(--accent-grad); box-shadow: var(--sh-blue); }
.player .controls .play-big svg { fill: #fff; stroke: #fff; }
.player .controls svg { width: 16px; height: 16px; fill: var(--ink-2); }
.player .progress { flex: 1; display: flex; align-items: center; gap: 11px; }
.player .progress .time { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; width: 38px; text-align: center; }
.seek { flex: 1; height: 6px; border-radius: 6px; background: #d8dfec; position: relative; cursor: pointer; touch-action: none; transition: height .12s var(--ease); }
/* área de agarre ampliada (invisible) para arrastrar fácil */
.seek::before { content: ""; position: absolute; inset: -11px 0; }
.seek:hover, .seek.scrub { height: 9px; }
.seek .buffered { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: rgba(62,87,252,.22); width: 0; }
.seek .ghost { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: rgba(62,87,252,.30); width: 0; opacity: 0; transition: opacity .12s; }
.seek:hover .ghost, .seek.scrub .ghost { opacity: 1; }
.seek .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--accent-grad); width: 0; }
.seek .knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--blue-deep); transform: translate(-50%,-50%) scale(1); left: 0; box-shadow: var(--sh-1); transition: transform .12s var(--ease); }
.seek:hover .knob { transform: translate(-50%,-50%) scale(1.12); }
.seek.scrub .knob { transform: translate(-50%,-50%) scale(1.25); box-shadow: 0 0 0 6px rgba(62,87,252,.18), var(--sh-1); }
.seek .seek-tip {
  position: absolute; bottom: 18px; left: 0; transform: translateX(-50%);
  background: rgba(40,48,70,.94); color: #fff; font-size: 11px; font-weight: 650;
  padding: 3px 8px; border-radius: 7px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s; font-variant-numeric: tabular-nums;
}
.seek:hover .seek-tip, .seek.scrub .seek-tip { opacity: 1; }
.player .vol { display: flex; align-items: center; gap: 9px; width: 132px; }
.player .vol svg { width: 18px; height: 18px; stroke: var(--ink-soft); flex-shrink: 0; }
.vol-slider { flex: 1; height: 6px; border-radius: 6px; background: #d8dfec; position: relative; cursor: pointer; }
.vol-slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--accent-grad); }
.vol-slider .knob { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid var(--blue-deep); transform: translate(-50%,-50%); box-shadow: var(--sh-1); }

/* equalizer animado en la portada del player cuando suena */
.eq { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; background: rgba(47,56,80,.42); }
.eq span { width: 3px; height: 60%; background: #fff; border-radius: 2px; transform-origin: center; animation: eqbar .9s ease-in-out infinite; }
.eq span:nth-child(2){ animation-delay:.2s } .eq span:nth-child(3){ animation-delay:.4s } .eq span:nth-child(4){ animation-delay:.15s }

/* ===================================================================== NOW PLAYING */
.now-playing {
  position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .34s var(--ease), visibility .34s;
  background: linear-gradient(180deg, #f3f6fb 0%, var(--bg) 60%, var(--bg-2) 100%);
  visibility: hidden; pointer-events: none;   /* cerrado: no intercepta toques */
}
.now-playing.open { transform: none; visibility: visible; pointer-events: auto; }
.np-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(60px) saturate(1.3); opacity: .55; transform: scale(1.3); transition: background-image .3s; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(238,241,246,.85)); }
.np-inner {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center;
  width: min(440px, 100%); margin: 0 auto; padding: calc(env(safe-area-inset-top,0px) + 18px) 26px calc(env(safe-area-inset-bottom,0px) + 30px); gap: 18px;
}
.np-close { align-self: flex-start; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.6); display: grid; place-items: center; box-shadow: var(--sh-1); }
.np-close svg { width: 24px; height: 24px; stroke: var(--ink); }
.np-art {
  width: min(78vw, 340px); aspect-ratio: 1; border-radius: 22px; margin-top: auto;
  background: var(--cover-grad); overflow: hidden; display: grid; place-items: center; color: #fff;
  box-shadow: 0 24px 60px rgba(47,56,80,.35), inset 0 0 0 1px rgba(255,255,255,.25);
  animation: floaty 6s ease-in-out infinite;
}
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-art svg { width: 64px; height: 64px; }
.np-meta { text-align: center; width: 100%; }
.np-title { font-size: 22px; font-weight: 820; color: var(--ink); letter-spacing: -.3px; line-height: 1.2; }
.np-artist { font-size: 14px; color: var(--ink-soft); margin-top: 5px; }
.np-wave { display: flex; align-items: center; gap: 2px; height: 56px; width: 100%; cursor: pointer; }
.np-wave .bar { flex: 1; min-width: 2px; height: 100%; display: flex; align-items: center; }
.np-wave .bar::before { content: ""; width: 100%; border-radius: 3px; background: #cfd8ea; height: var(--h,40%); transition: background .1s; }
.np-wave .bar.played::before { background: linear-gradient(180deg, var(--blue), var(--blue-deep)); }
.np-times { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-top: -8px; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 26px; }
.np-controls button { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: linear-gradient(180deg,#fff,#eef2f8); display: grid; place-items: center; transition: transform .14s var(--ease); }
.np-controls button:active { transform: scale(.92); }
.np-controls button svg { width: 22px; height: 22px; fill: var(--ink-2); }
.np-controls .np-play { width: 72px; height: 72px; border-color: transparent; background: var(--accent-grad); box-shadow: var(--sh-blue); }
.np-controls .np-play svg { width: 28px; height: 28px; fill: #fff; stroke: #fff; }

/* ===================================================================== MENSAJES DIRECTOS */
/* ---- chat a pantalla completa ---- */
/* ===================== CHAT DIRECTO (DM) — rediseño tipo mensajería ===================== */
.dm-screen {
  position: fixed; inset: 0; z-index: 78; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(62,87,252,.07), transparent 60%),
    var(--bg);
  transform: translateX(100%); transition: transform .3s var(--ease), visibility .3s;
  visibility: hidden; pointer-events: none;
}
:root[data-theme="dark"] .dm-screen {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(62,87,252,.12), transparent 60%),
    linear-gradient(180deg, #0b0f1c, var(--bg) 55%, var(--bg-2));
}
.dm-screen.open { transform: none; visibility: visible; pointer-events: auto; }
.dm-screen-head {
  display: flex; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top,0px) + 9px) 10px 9px;
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.dm-back { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; flex-shrink: 0; transition: background .15s; }
.dm-back:hover { background: rgba(62,87,252,.12); }
.dm-back svg { width: 24px; height: 24px; stroke: var(--ink); }
.dm-screen .dm-peer { display: flex; align-items: center; gap: 11px; cursor: pointer; min-width: 0; flex: 1; }
.dm-peer .avatar { width: 40px; height: 40px; flex-shrink: 0; }
.dm-peer-meta { min-width: 0; }
.dm-peer .dm-name { font-weight: 800; font-size: 15.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.dm-status { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.dm-status.typing { color: var(--blue-deep); font-weight: 650; }
.dm-status .dot-online { width: 8px; height: 8px; }
.dm-head-actions { display: flex; gap: 2px; flex-shrink: 0; }
.dm-head-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; }
.dm-head-btn:hover { background: rgba(62,87,252,.12); }
.dm-head-btn svg { width: 21px; height: 21px; stroke: var(--ink-2); }

/* barra de búsqueda */
.dm-searchbar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--panel); border-bottom: 1px solid var(--line-soft); }
.dm-searchbar .dm-sb-ico { width: 17px; height: 17px; stroke: var(--ink-soft); flex-shrink: 0; }
.dm-searchbar input { flex: 1; border: none; background: transparent; font-size: 14px; color: var(--ink); outline: none; }
.dm-sb-count { font-size: 12px; color: var(--ink-soft); font-weight: 650; }
.dm-sb-x { border: none; background: var(--panel-2); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dm-sb-x svg { width: 15px; height: 15px; stroke: var(--ink-soft); }

.dm-thread-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.dm-thread {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3px; padding: 14px 14px 18px;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 820px; margin: 0 auto;
}
.dm-day { align-self: center; font-size: 11px; font-weight: 650; color: var(--ink-soft); background: var(--glass); backdrop-filter: blur(6px); padding: 4px 14px; border-radius: 20px; margin: 10px 0 6px; box-shadow: var(--sh-1); }

/* fila = burbuja + reacciones, alineadas al lado del emisor */
.dm-row { display: flex; flex-direction: column; max-width: 80%; gap: 3px; margin-top: 9px; animation: dmIn .22s var(--ease); }
.dm-row.me { align-self: flex-end; align-items: flex-end; }
.dm-row.them { align-self: flex-start; align-items: flex-start; }
.dm-row.cont { margin-top: 2px; }
@keyframes dmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dm-row.dm-flash .dm-bubble { animation: dmFlash 1.1s ease; }
@keyframes dmFlash { 0%,100% { box-shadow: var(--sh-1); } 30% { box-shadow: 0 0 0 3px rgba(62,87,252,.5); } }
.dm-row.dm-dim { opacity: .32; }
.dm-row.dm-hit .dm-bubble { outline: 2px solid rgba(62,87,252,.55); }

.dm-bubble {
  position: relative; max-width: 100%; padding: 6px 11px 5px; border-radius: 15px;
  font-size: 14px; line-height: 1.34; word-wrap: break-word; overflow-wrap: anywhere;
  overflow: hidden; box-shadow: var(--sh-1); touch-action: pan-y; transition: transform .05s linear;
}
.dm-bubble.reply-ready { opacity: .92; }
.dm-row.me .dm-bubble { background: var(--accent-grad); color: #fff; border-bottom-right-radius: 5px; }
.dm-row.them .dm-bubble { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; }
.dm-row.cont.me .dm-bubble { border-top-right-radius: 7px; border-bottom-right-radius: 16px; }
.dm-row.cont.them .dm-bubble { border-top-left-radius: 7px; border-bottom-left-radius: 16px; }

.dm-bubble .t { display: flex; justify-content: flex-end; align-items: center; gap: 3px; font-size: 9.5px; line-height: 1; opacity: .72; margin-top: 2px; }
.dm-bubble.has-media .t { padding: 0 5px; }
.dm-row.me .dm-bubble .t { color: rgba(255,255,255,.9); }
.dm-tick { width: 15px; height: 12px; stroke: rgba(255,255,255,.85); }
.dm-tick.read { stroke: #8fd0ff; }
.dm-edited { font-size: 9.5px; opacity: .7; font-style: italic; }
.dm-cap { white-space: pre-wrap; }

/* mensaje eliminado */
.dm-bubble.dm-deleted { font-style: italic; opacity: .85; display: flex; align-items: center; gap: 7px; }
.dm-bubble.dm-deleted i { font-style: italic; }
.dm-del-ico { width: 15px; height: 15px; stroke: currentColor; opacity: .7; flex-shrink: 0; }

/* cita / respuesta dentro de la burbuja */
.dm-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; box-sizing: border-box; text-align: left; border: none; cursor: pointer;
  border-left: 3px solid currentColor; border-radius: 9px; padding: 6px 10px; margin-bottom: 6px; overflow: hidden; }
.dm-row.me .dm-quote { background: rgba(255,255,255,.18); border-left-color: rgba(255,255,255,.85); }
.dm-row.them .dm-quote { background: rgba(62,87,252,.12); border-left-color: var(--accent); }
.dq-who { font-size: 11.5px; font-weight: 750; opacity: .95; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row.them .dq-who { color: var(--blue-deep); }
.dq-snip { font-size: 12px; opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* sin anillo de foco táctil (escapa al overflow de la burbuja); se mantiene en teclado */
.dm-quote:focus:not(:focus-visible),
.dm-react:focus:not(:focus-visible),
.dm-voice-play:focus:not(:focus-visible),
.dm-track-play:focus:not(:focus-visible),
.dm-img:focus:not(:focus-visible) { outline: none; }

.dm-bubble.has-media { padding: 5px 5px 6px; }
.dm-bubble.has-media .dm-cap { padding: 5px 7px 0; }
.dm-bubble.has-media .dm-quote { margin: 0 0 5px; }
.dm-img { display: block; max-width: 260px; width: 100%; border-radius: 12px; cursor: pointer; }
.dm-video { display: block; max-width: 280px; width: 100%; border-radius: 12px; background: #000; }
.dm-filechip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.18); text-decoration: none; min-width: 180px; color: inherit; }
.dm-row.them .dm-filechip { background: var(--panel-2); }
.dm-filechip svg { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; }
.dm-filechip .fn { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* nota de voz */
.dm-voice { display: flex; align-items: center; gap: 9px; padding: 3px 10px 3px 4px; min-width: 168px; }
.dm-voice-play { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: none; cursor: pointer; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.dm-row.them .dm-voice-play { background: var(--accent-grad); }
.dm-voice-play svg { width: 15px; height: 15px; fill: #fff; }
.dm-row.them .dm-voice-play svg { fill: #fff; }
.dm-voice-play .ci-pause { display: none; }
.dm-voice.playing .ci-play { display: none; }
.dm-voice.playing .ci-pause { display: inline; }
.dm-voice-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); position: relative; }
.dm-row.them .dm-voice-bar { background: var(--line); }
.dm-voice-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: #fff; }
.dm-row.them .dm-voice-fill { background: var(--accent); }
/* onda de audio congelada (se colorea al reproducir; tocar/arrastrar para saltar) */
.dm-voice-wave { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 24px; cursor: pointer; touch-action: none; }
.dm-voice-wave span { flex: 1; min-width: 2px; height: var(--h, 40%); min-height: 3px; border-radius: 3px; background: rgba(255,255,255,.38); transition: background .08s linear; }
.dm-voice-wave span.on { background: #fff; }
.dm-row.them .dm-voice-wave span { background: color-mix(in srgb, var(--ink-soft) 55%, transparent); }
.dm-row.them .dm-voice-wave span.on { background: var(--accent); }
.dm-voice-time { font-size: 11px; opacity: .8; min-width: 32px; text-align: right; flex-shrink: 0; }

/* pista compartida */
.dm-track { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 12px; min-width: 200px; background: rgba(255,255,255,.16); }
.dm-row.them .dm-track { background: var(--panel-2); }
.dm-track-cover { width: 42px; height: 42px; border-radius: 9px; background: #3e57fc; background-size: cover; background-position: center; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dm-track-cover svg { width: 20px; height: 20px; }
.dm-track-info { flex: 1; min-width: 0; }
.dm-track-title { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-track-artist { font-size: 11.5px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-track-play { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: none; background: #fff; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.dm-track-play:active { transform: scale(.9); }
.dm-track-play svg { width: 18px; height: 18px; fill: currentColor; }
.dm-track-play .ci-pause { display: none; }
.dm-track.playing .dm-track-play .ci-play { display: none; }
.dm-track.playing .dm-track-play .ci-pause { display: inline; }

/* reacciones */
.dm-reacts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px; }
.dm-reacts:empty { display: none; }
.dm-react { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; line-height: 1; padding: 3px 7px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--sh-1); cursor: pointer; transition: transform .12s var(--ease-spring); }
.dm-react:active { transform: scale(.88); }
.dm-react.mine { background: rgba(62,87,252,.16); border-color: rgba(62,87,252,.5); }
.dm-react .rc { font-size: 11px; font-weight: 700; opacity: .85; }

.dm-empty { margin: auto; text-align: center; color: var(--ink-soft); font-size: 13.5px; padding: 30px; }
.dm-empty svg { width: 42px; height: 42px; stroke: var(--ink-faint); margin-bottom: 8px; }

/* indicador escribiendo */
.dm-typing { position: absolute; left: 16px; bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 9px 13px; box-shadow: var(--sh-2); }
.dt-dots { display: flex; gap: 4px; }
.dt-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); animation: dtb 1.2s infinite ease-in-out; }
.dt-dots i:nth-child(2) { animation-delay: .18s; } .dt-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dtb { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* botón ir abajo */
.dm-scroll-fab { position: absolute; right: 16px; bottom: 12px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--sh-2); display: grid; place-items: center; z-index: 3; transition: transform .15s var(--ease-spring), opacity .15s; }
.dm-scroll-fab.hidden { opacity: 0; transform: scale(.6); pointer-events: none; display: grid; }
.dm-scroll-fab svg { width: 22px; height: 22px; stroke: var(--ink-2); }

/* barra de respuesta en el compositor */
.dm-reply-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--panel); border-top: 1px solid var(--line-soft); max-width: 820px; margin: 0 auto; width: 100%; }
.dm-reply-bar .rb-ico { width: 18px; height: 18px; stroke: var(--accent); flex-shrink: 0; }
.dm-reply-bar .rb-main { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding-left: 9px; }
.rb-who { font-size: 12px; font-weight: 750; color: var(--blue-deep); }
.rb-snip { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-reply-bar .rb-x { border: none; background: var(--panel-2); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dm-reply-bar .rb-x svg { width: 15px; height: 15px; stroke: var(--ink-soft); }

.dm-attach-preview { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-soft); background: var(--panel); max-width: 820px; margin: 0 auto; width: 100%; }
.dm-attach-preview img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; }
.dm-attach-preview .ap-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-attach-preview .ap-x { border: none; background: var(--panel-2); width: 30px; height: 30px; border-radius: 50%; font-size: 16px; color: var(--ink-soft); }

/* barra de grabación de voz */
.dm-rec { display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(env(safe-area-inset-bottom,0px) + 10px); border-top: 1px solid var(--line-soft); background: var(--panel); max-width: 820px; margin: 0 auto; width: 100%; }
.dm-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--like); animation: recPulse 1s infinite; }
@keyframes recPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.dm-rec-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); min-width: 38px; }
.dm-rec-wave { flex: 1; height: 34px; min-width: 0; display: block; }
.dm-rec-cancel, .dm-rec-send { width: 44px; height: 44px; border-radius: 50%; border: none; display: grid; place-items: center; flex-shrink: 0; }
.dm-rec-cancel { background: var(--panel-2); } .dm-rec-cancel svg { width: 20px; height: 20px; stroke: var(--danger); }
.dm-rec-send { background: var(--accent-grad); box-shadow: var(--sh-blue); } .dm-rec-send svg { width: 18px; height: 18px; stroke: #fff; }

.dm-form { display: flex; align-items: center; gap: 6px; padding: 9px 12px calc(env(safe-area-inset-bottom,0px) + 9px); border-top: 1px solid var(--line-soft); background: var(--panel); max-width: 820px; margin: 0 auto; width: 100%; }
.dm-form input[type=text] { flex: 1; padding: 11px 16px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--panel-2); min-width: 0; }
.dm-form input[type=text]:focus { outline: none; border-color: var(--blue); background: var(--panel); box-shadow: 0 0 0 3px rgba(62,87,252,.15); }
.dm-icbtn { border: none; background: transparent; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; transition: transform .12s, background .15s; }
.dm-icbtn:hover { background: rgba(62,87,252,.10); }
.dm-icbtn:active { transform: scale(.9); }
.dm-icbtn svg { width: 22px; height: 22px; stroke: var(--ink-soft); }
.dm-send { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex-shrink: 0; display: grid; place-items: center; border: none; background: var(--accent-grad); box-shadow: var(--sh-blue); transition: transform .12s; }
.dm-send:active { transform: scale(.9); }
.dm-send svg { width: 18px; height: 18px; stroke: #fff; }

/* panel de emojis */
.dm-emoji-panel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px 10px calc(env(safe-area-inset-bottom,0px) + 8px); max-height: 230px; overflow-y: auto; background: var(--panel); border-top: 1px solid var(--line-soft); max-width: 820px; margin: 0 auto; width: 100%; }
.dm-emoji-panel .em { border: none; background: transparent; font-size: 24px; line-height: 1; padding: 7px 0; border-radius: 9px; cursor: pointer; }
.dm-emoji-panel .em:hover { background: var(--panel-2); }

/* barra de reacciones rápida en la hoja de acciones */
.as-reactbar { display: flex; justify-content: space-around; gap: 4px; padding: 6px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.as-react { border: none; background: transparent; font-size: 28px; line-height: 1; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: transform .12s var(--ease-spring); }
.as-react:hover { background: var(--panel-2); } .as-react:active { transform: scale(1.2); }
.as-react.more svg { width: 22px; height: 22px; stroke: var(--ink-soft); }
.as-emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; max-height: 320px; overflow-y: auto; padding: 4px 2px 10px; }
.as-emoji-grid .em { border: none; background: transparent; font-size: 26px; line-height: 1; padding: 8px 0; border-radius: 9px; cursor: pointer; }
.as-emoji-grid .em:hover { background: var(--panel-2); }

/* visor de imagen a pantalla completa */
.img-viewer { position: fixed; inset: 0; z-index: 95; background: rgba(15,18,28,.92); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; }
.img-viewer img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* ---- tarjeta de persona (People) ---- */
.person { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px; box-shadow: var(--sh-1); animation: fadeUp .35s var(--ease) both; transition: transform .15s var(--ease), box-shadow .2s; }
.person:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.person-top { display: flex; align-items: center; gap: 13px; }
.person-top .avatar { width: 52px; height: 52px; flex-shrink: 0; }
.person-info { min-width: 0; flex: 1; }
.person-name { font-weight: 750; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.person-handle { font-size: 12.5px; color: var(--ink-soft); }
.person-bio { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.person-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.person-actions .btn { flex: 1; min-width: 84px; }
.person-actions .btn.icon-only { flex: 0 0 auto; min-width: 0; width: 40px; padding: 0; }

/* hoja de acciones (deslizar mensaje) */
.modal-backdrop.sheet { place-items: end center; padding: 0; }
.action-sheet { width: min(440px, 100%); background: var(--panel); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom,0px)); box-shadow: var(--sh-3); animation: fadeUp .25s var(--ease); }
.as-item { display: flex; align-items: center; gap: 13px; width: 100%; border: none; background: transparent; padding: 15px 16px; border-radius: 12px; font-size: 15px; font-weight: 650; color: var(--ink); text-align: left; }
.as-item svg { width: 20px; height: 20px; stroke: var(--ink-2); }
.as-item:hover { background: var(--panel-2); }
.as-item.danger { color: var(--danger); } .as-item.danger svg { stroke: var(--danger); }
.as-item.cancel { justify-content: center; color: var(--ink-soft); margin-top: 4px; border-top: 1px solid var(--line-soft); border-radius: 0; }

/* secciones de chats */
.convo-section { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink-faint); font-weight: 700; margin: 16px 4px 9px; display: flex; align-items: center; gap: 8px; }
.convo-section .dot-online { width: 8px; height: 8px; }
.convo-community { border: 1px solid #cfe0ef; background: linear-gradient(180deg,#ffffff,#eef5fc); }
.convo-community .avatar { background: var(--aqua-grad); }
.convo .conv-dot { width: 10px; height: 10px; border-radius: 50%; background: #54c98a; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(84,201,138,.3); flex-shrink: 0; }

/* lista de conversaciones (bandeja) */
.convo { display: flex; align-items: center; gap: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh-1); cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s; }
.convo:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.convo .avatar { width: 46px; height: 46px; }
.convo .c-main { flex: 1; min-width: 0; }
.convo .c-top { display: flex; justify-content: space-between; gap: 8px; }
.convo .c-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.convo .c-when { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }
.convo .c-snippet { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.convo .c-snippet.unread { color: var(--ink); font-weight: 650; }
.convo .c-unread { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-deep); flex-shrink: 0; }

.mail-btn { position: relative; }
@media (max-width: 720px) { .mail-btn { display: none; } }

/* banner de cookies */
.cookie-banner {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 96;
  width: min(680px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--sh-3); padding: 14px 16px; animation: fadeUp .35s var(--ease);
}
.cookie-banner .ck-text { font-size: 12.8px; color: var(--ink-2); line-height: 1.45; flex: 1; }
.cookie-banner .ck-text a { color: var(--blue-deep); font-weight: 650; cursor: pointer; text-decoration: underline; }
.cookie-banner .ck-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 720px) {
  .cookie-banner { flex-direction: column; align-items: stretch; bottom: 10px; gap: 10px; }
  .cookie-banner .ck-actions .btn { flex: 1; }
}

/* zona de peligro (ajustes) */
.danger-zone { margin-top: 24px; border: 1px solid #f0c9c1; background: #fdf3f1; border-radius: var(--r); padding: 16px; }
.danger-zone h4 { color: var(--danger); font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.danger-zone p { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.btn.danger-btn { color: #fff; border-color: transparent; background: linear-gradient(180deg,#e0705c,#cf5642); box-shadow: 0 4px 12px rgba(207,86,66,.35); }
.policy-body { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.policy-body h4 { color: var(--ink); font-size: 14px; margin: 16px 0 6px; }
.policy-body ul { margin: 6px 0 6px 18px; } .policy-body li { margin-bottom: 4px; }
.policy-body p { margin-bottom: 8px; }

/* selector de portada con vista previa (modal de subida) */
.cover-pick { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-2); cursor: pointer; transition: border-color .18s, background .18s; }
.cover-pick:hover, .cover-pick.drag { border-color: var(--blue); background: #eef4fc; }
.cover-prev { width: 56px; height: 56px; border-radius: 10px; background: var(--cover-grad); display: grid; place-items: center; color: #fff; overflow: hidden; flex-shrink: 0; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick-txt b { display: block; font-size: 13.5px; color: var(--ink); }
.cover-pick-txt span { font-size: 11.5px; color: var(--ink-soft); }

/* ===================================================================== MODAL */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(40,48,70,.5); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; }
.modal { width: min(490px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--sh-3); border: 1px solid var(--line); animation: fadeUp .3s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-head h3 { font-size: 17px; font-weight: 800; color: var(--ink); }
.modal-head .close { border: none; background: none; font-size: 24px; color: var(--ink-soft); line-height: 1; padding: 4px 8px; border-radius: 8px; transition: background .15s; }
.modal-head .close:hover { background: var(--panel-2); color: var(--ink); }
.modal-body { padding: 24px; }
.modal-body .field textarea { resize: vertical; min-height: 72px; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--r); padding: 28px; text-align: center; color: var(--ink-soft); background: var(--panel-2); cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eef4fc; color: var(--blue-deep); }
.dropzone svg { width: 32px; height: 32px; stroke: currentColor; margin-bottom: 8px; }
.dropzone .fname { color: var(--blue-deep); font-weight: 650; margin-top: 7px; }
.modal-body .btn.primary { width: 100%; padding: 13px; margin-top: 8px; }
.progress-bar { height: 7px; border-radius: 5px; background: #e2e8f2; overflow: hidden; margin-top: 14px; }
.progress-bar > div { height: 100%; width: 0; background: var(--accent-grad); transition: width .25s var(--ease); }

/* profile */
/* ---- Cabecera de perfil (estilo artista) ---- */
.profile-cover { height: 200px; border-radius: var(--r-lg); background-size: cover; background-position: center; position: relative; overflow: hidden; box-shadow: var(--sh-1); }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.30)); }
.profile-cover-grad { background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #3e57fc) 90%, #fff), color-mix(in srgb, var(--accent, #3e57fc) 45%, #6e2df5)); }
.profile-head { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin: -66px 0 22px; padding: 0 18px 24px; animation: fadeUp .4s var(--ease) both; }
.profile-head .ph-avatar { position: relative; z-index: 2; }
.profile-head .avatar { width: 120px; height: 120px; font-size: 42px; box-shadow: 0 0 0 5px var(--panel), 0 12px 28px rgba(47,56,80,.28); }
.profile-head .accent-name { font-size: 27px; font-weight: 820; color: var(--ink); letter-spacing: -.4px; line-height: 1.12; margin-top: 14px; }
.ph-handle { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.ph-bio { color: var(--ink-2); margin-top: 11px; max-width: 540px; line-height: 1.5; }
.profile-head .profile-badges { justify-content: center; margin-top: 10px; }
.profile-head .pstats { display: inline-flex; margin: 16px 0 2px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: 6px; box-shadow: var(--sh-1); }
.profile-head .pstats .pstat { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 22px; cursor: pointer; border-radius: 12px; position: relative; transition: background .15s; user-select: none; }
.profile-head .pstats .pstat + .pstat::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px; background: var(--line); }
.profile-head .pstats b { color: var(--ink); font-size: 19px; font-weight: 820; }
.profile-head .pstats i { color: var(--ink-soft); font-size: 11.5px; font-style: normal; letter-spacing: .2px; }
.profile-head .pstats .pstat:hover { background: rgba(62,87,252,.10); }
.follow-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.follow-row:hover { background: rgba(62,87,252,.10); }
.follow-row .avatar { width: 42px; height: 42px; font-size: 16px; flex-shrink: 0; }
.follow-row .fr-info { min-width: 0; flex: 1; }
.follow-row .fr-name { font-weight: 700; color: var(--ink); }
.follow-row .fr-handle { font-size: 12.5px; color: var(--ink-soft); }
.follow-row .fr-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* evitar que la regla .modal-body .btn.primary estire los botones de las filas */
.modal-body .follow-row .btn, .modal-body .follow-row .btn.primary { width: auto; margin-top: 0; padding: 8px 14px; }
/* ---- Menciones @usuario ---- */
.mention { color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.mention:hover { text-decoration: underline; }
.dm-bubble.me .mention { color: #fff; text-decoration: underline; }
.mention-dd { position: fixed; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.22); max-height: 240px; overflow-y: auto; z-index: 9999; padding: 5px; }
.mention-dd-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.mention-dd-item:hover { background: rgba(62,87,252,.14); }
.mention-dd-item .avatar { width: 30px !important; height: 30px !important; font-size: 12px !important; flex-shrink: 0; }
.mention-dd-item .mdd-txt { min-width: 0; line-height: 1.25; }
.mention-dd-item b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-dd-item span { font-size: 11px; color: var(--ink-soft); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-photo-prev { margin-bottom: 12px; text-align: center; }
.share-photo-prev img { max-height: 180px; max-width: 100%; border-radius: 12px; }
.share-meta { margin-bottom: 12px; font-size: 14px; }
.share-meta span { color: var(--ink-soft); }
.share-link { display: flex; gap: 8px; margin-bottom: 12px; }
.share-link input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--glass); color: var(--ink); font-size: 13px; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions .btn { flex: 1; justify-content: center; min-width: 130px; }
/* ---- Playlists ---- */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pl-card { cursor: pointer; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-soft); transition: transform .15s, box-shadow .15s; }
.pl-card:hover { transform: translateY(-3px); box-shadow: var(--sh-1); }
.pl-cover { aspect-ratio: 1 / 1; background-size: cover; background-position: center; background-color: #3e57fc; display: flex; align-items: center; justify-content: center; }
.pl-cover-empty svg { width: 38px; height: 38px; opacity: .85; }
.pl-cover-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; width: 100%; height: 100%; }
.pl-cover-grid > div { background-size: cover; background-position: center; background-color: #3e57fc; }
.pl-info { padding: 9px 11px; }
.pl-title { font-weight: 750; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-count { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.pl-head { display: flex; gap: 18px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.pl-head .pl-cover { width: 160px; height: 160px; border-radius: 14px; flex-shrink: 0; box-shadow: var(--sh-1); }
.pl-head-info { flex: 1; min-width: 220px; }
.pl-kicker { font-size: 11px; letter-spacing: 1.5px; color: var(--ink-soft); font-weight: 700; }
.pl-h2 { font-size: 28px; font-weight: 820; letter-spacing: -.5px; margin: 2px 0 6px; color: var(--ink); }
.pl-desc { color: var(--ink-soft); margin-bottom: 6px; }
.pl-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.pl-meta a { color: var(--accent); cursor: pointer; }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.main-head .btn.primary { flex-shrink: 0; }

/* ---- Historias: barra ---- */
.stories-bar { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 6px; scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-circle { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 70px; cursor: pointer; background: none; border: none; padding: 0; }
.story-ring { width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); display: flex; align-items: center; justify-content: center; position: relative; }
.story-ring.seen { background: var(--line); }
.story-av { width: 100%; height: 100%; border-radius: 50%; background: var(--panel); padding: 2px; display: flex; }
.story-circle .avatar { width: 100% !important; height: 100% !important; font-size: 20px !important; }
.story-add-badge { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent, #3e57fc); border: 2px solid var(--panel); display: flex; align-items: center; justify-content: center; }
.story-add-badge svg { width: 12px; height: 12px; }
.story-circle.add:not(.has-story) .story-ring { background: var(--line); }
.story-name { font-size: 11.5px; color: var(--ink-soft); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Historias: visor ---- */
.story-viewer { position: fixed; inset: 0; z-index: 200; background: #0b0d10; display: flex; flex-direction: column; align-items: center; }
.story-viewer .sv-bars { display: flex; gap: 4px; width: 100%; max-width: 520px; padding: 10px 12px 0; }
.sv-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; padding: 12px; color: #fff; z-index: 3; }
.sv-head .avatar { width: 34px !important; height: 34px !important; font-size: 14px !important; }
.sv-av { flex: 0 0 auto; }
.sv-who { flex: 1; min-width: 0; line-height: 1.2; }
.sv-who b { font-size: 14px; }
.sv-time { display: block; font-size: 11px; opacity: .8; }
.sv-x, .sv-del { background: none; border: none; color: #fff; cursor: pointer; font-size: 26px; line-height: 1; padding: 4px 8px; }
.sv-del { font-size: 18px; }
.sv-del svg { width: 20px; height: 20px; }
.sv-stage { flex: 1; width: 100%; max-width: 520px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.sv-music { position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%); max-width: 84%; display: flex; align-items: center; gap: 7px; background: rgba(0,0,0,.5); color: #fff; padding: 7px 14px; border-radius: 20px; font-size: 12.5px; backdrop-filter: blur(6px); z-index: 3; }
.sv-music:empty { display: none; }
.sv-music svg { width: 15px; height: 15px; flex-shrink: 0; }
.sv-music span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-links { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; z-index: 3; }
.sv-link { background: #fff; color: #16181c; font-weight: 700; padding: 11px 20px; border-radius: 24px; text-decoration: none; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.sv-tap { position: absolute; top: 64px; bottom: 0; background: none; border: none; cursor: pointer; z-index: 2; }
.sv-tap.left { left: 0; width: 32%; }
.sv-tap.right { right: 0; width: 68%; }

/* ---- Historias: modal de creación ---- */
.st-track-chip { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px; border: 1px solid var(--line-soft); border-radius: 10px; }
.st-tc-cover { width: 40px; height: 40px; border-radius: 8px; background: #3e57fc; background-size: cover; background-position: center; flex-shrink: 0; }
.st-tc-info { flex: 1; min-width: 0; }
.st-tc-info b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tc-info span { font-size: 11.5px; color: var(--ink-soft); }
.st-tc-x { background: none; border: none; font-size: 20px; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
.st-link-row { display: flex; gap: 6px; margin-bottom: 6px; }
.st-link-row .st-link-url { flex: 2; min-width: 0; }
.st-link-row .st-link-label { flex: 1.3; min-width: 0; }
.st-link-row input { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--glass); color: var(--ink); font-size: 13px; }
.st-link-x { background: none; border: none; font-size: 20px; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }

/* ---- Eventos ---- */
.ev-list { display: flex; flex-direction: column; gap: 14px; }
.ev-card { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: var(--sh-1); }
.ev-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.ev-flyer { width: 116px; flex-shrink: 0; background-size: cover; background-position: center; background-color: #3e57fc; }
.ev-flyer-empty { display: flex; align-items: center; justify-content: center; }
.ev-flyer-empty svg { width: 34px; height: 34px; opacity: .85; }
.ev-info { flex: 1; min-width: 0; padding: 12px 14px 12px 0; display: flex; flex-direction: column; gap: 4px; }
.ev-date { font-size: 12px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 6px; text-transform: capitalize; }
.ev-date svg, .ev-loc svg { width: 13px; height: 13px; flex-shrink: 0; }
.ev-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-loc { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ev-foot .btn svg { width: 14px; height: 14px; }
.ev-saves { font-size: 12px; color: var(--ink-soft); }
.ev-saves b { color: var(--ink); }
.ev-detail-flyer { margin: -4px 0 14px; text-align: center; }
.ev-detail-flyer img { max-width: 100%; max-height: 340px; border-radius: 12px; }
.ev-detail-title { font-size: 22px; font-weight: 820; margin-bottom: 12px; color: var(--ink); }
.ev-detail-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; }
.ev-detail-row svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-soft); }
.ev-detail-row a { color: var(--accent); cursor: pointer; }
.ev-detail-desc { margin: 10px 0 14px; color: var(--ink-2); white-space: pre-wrap; line-height: 1.5; }
.ev-detail-actions { display: flex; gap: 8px; }
.modal-body .ev-detail-actions .btn, .modal-body .ev-detail-actions .btn.primary { width: auto; margin-top: 0; }

.prof-ev-head { font-size: 13px; font-weight: 750; color: var(--ink-soft); margin: 6px 2px 10px; }
.prof-ev-head:not(:first-child) { margin-top: 18px; }
#profEvents .ev-list { margin-bottom: 4px; }

/* ---- Insignia verificado ---- */
.vbadge { width: 15px; height: 15px; color: var(--blue-2); vertical-align: -2px; display: inline-block; }
.person-name .vbadge, .fr-name .vbadge { width: 14px; height: 14px; }

/* ---- Insignias (badges): solo el símbolo, sin fondo (base inspirada en Alpha) ---- */
.bdg { display: inline-block; font-weight: 800; line-height: 1; font-size: 9px; letter-spacing: .2px; vertical-align: super; margin-left: -2px; }
.bdg-alpha  { color: rgba(0,0,0,.45); }
:root[data-theme="dark"] .bdg-alpha { color: rgba(255,255,255,.5); }
.bdg-tester { color: #f0a52e; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 2px; align-items: center; }
.profile-badges .bdg { vertical-align: middle; font-size: 16px; margin-left: 0; }
.profile-badges .bdg-txt { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-left: 3px; vertical-align: middle; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 15px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel-2); cursor: pointer; transition: transform .14s, box-shadow .14s, border-color .14s; color: inherit; }
.badge-item:not(.locked):hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.badge-item.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(62,87,252,.25); }
.badge-item.locked { opacity: .55; cursor: default; }
.badge-item.locked .bdg { filter: grayscale(1); }
.bi-name { font-weight: 750; font-size: 13px; color: var(--ink); }
.bi-state { font-size: 11px; color: var(--ink-soft); text-align: center; }
.bdg.big { font-size: 46px; vertical-align: baseline; margin-left: 0; }
.badge-toggle { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.badge-toggle input { width: auto; flex-shrink: 0; }
/* selector de encuadre de imagen (mover + zoom) */
.frame-pick { position: relative; overflow: hidden; cursor: grab; user-select: none; touch-action: none; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.frame-pick:active { cursor: grabbing; }
.frame-pick img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.frame-pick.is-banner { width: 100%; aspect-ratio: 16 / 6.4; border-radius: 12px; }
.frame-pick.is-avatar { width: 200px; height: 200px; border-radius: 50%; margin: 0 auto; }
.frame-zoom { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.frame-zoom svg { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0; }
.frame-zoom input[type=range] { flex: 1; }
.profile-cover .cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* animación de desbloqueo */
.badge-pop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(8,10,14,.66); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; overflow: hidden; }
.badge-pop.show { opacity: 1; }
.bp-card { position: relative; z-index: 2; text-align: center; padding: 30px 28px; transform: scale(.6); opacity: 0; transition: transform .45s cubic-bezier(.2,1.3,.4,1), opacity .3s; }
.badge-pop.show .bp-card { transform: scale(1); opacity: 1; }
.bp-badge { display: inline-block; font-size: 70px; line-height: 1; margin: 0 auto 16px; vertical-align: baseline; animation: bpFloat 2.4s ease-in-out infinite; }
.bp-badge.bdg-alpha { color: rgba(255,255,255,.85); }
.bp-badge.bdg-tester { filter: drop-shadow(0 8px 22px rgba(240,165,46,.55)); }
.bp-kicker { color: #cdd5e4; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 800; }
.bp-name { color: #fff; font-size: 30px; font-weight: 850; margin: 2px 0 8px; }
.bp-desc { color: #aeb7c8; font-size: 13px; max-width: 290px; margin: 0 auto; line-height: 1.45; }
.bp-tap { color: #7e8aa0; font-size: 11px; margin-top: 18px; }
@keyframes bpFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.bp-confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bp-confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; opacity: .92; animation: bpFall linear forwards; }
@keyframes bpFall { 0% { transform: translateY(-20px) rotate(0); } 100% { transform: translateY(106vh) rotate(560deg); } }
@media (prefers-reduced-motion: reduce) { .bp-badge { animation: none; } .bp-confetti { display: none; } }

/* ---- Estudio (panel del artista) ---- */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; box-shadow: var(--sh-1); }
.kpi-n { font-size: 26px; font-weight: 820; letter-spacing: -.5px; color: var(--ink); }
.kpi-l { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.kpi-l svg { width: 13px; height: 13px; }
.dash-section { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.dash-section h3 { font-size: 14px; font-weight: 750; color: var(--ink); margin-bottom: 14px; }
.dash-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-sec-head h3 { margin-bottom: 0; }
.dash-sec-head .btn { flex-shrink: 0; }
.spotify-embed { display: block; width: 100%; }
.dash-hint, .dash-note { color: var(--ink-soft); font-weight: 500; font-size: 12px; }
.dash-note { margin-top: 10px; line-height: 1.4; }
.dash-chart { display: flex; align-items: flex-end; gap: 5px; height: 120px; }
.dc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.dc-bar { width: 100%; max-width: 22px; background: var(--accent-grad); border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height .4s var(--ease); }
.dc-x { font-size: 9.5px; color: var(--ink-faint); }
.dash-income .inc-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; gap: 10px; }
.dash-income .inc-row input { width: 110px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--ink); text-align: right; }
.inc-card { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.inc-card.alt { background: linear-gradient(135deg, rgba(62,87,252,.14), rgba(110,45,245,.14)); }
.inc-big { font-size: 24px; font-weight: 820; color: var(--ink); }
.inc-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.dash-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.social-card { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 12px; text-decoration: none; color: inherit; background: var(--panel-2); transition: transform .14s, box-shadow .14s; }
.social-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.social-card.empty { opacity: .6; }
.sc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); flex-shrink: 0; }
.sc-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.sc-n { font-size: 11.5px; color: var(--ink-soft); }
.dash-top { display: flex; flex-direction: column; gap: 4px; }
.dt-row { display: flex; align-items: center; gap: 11px; padding: 7px 6px; border-radius: 10px; cursor: pointer; }
.dt-row:hover { background: rgba(62,87,252,.10); }
.dt-rank { width: 18px; text-align: center; font-weight: 800; color: var(--ink-faint); font-size: 13px; }
.dt-cover { width: 38px; height: 38px; border-radius: 8px; background: #3e57fc center/cover; flex-shrink: 0; }
.dt-title { flex: 1; min-width: 0; font-weight: 650; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-stat { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; }
.dt-stat svg { width: 12px; height: 12px; }
.modal-body .field input[data-su], .modal-body .field input[data-sf] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.profile-head .pactions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px auto 0; min-width: 0; max-width: 480px; }
.profile-head .pactions .btn { justify-content: center; min-width: 140px; flex: 0 1 auto; }
@media (max-width: 720px) {
  .profile-cover { height: 150px; }
  .profile-head { margin-top: -56px; padding-left: 12px; padding-right: 12px; }
  .profile-head .avatar { width: 104px; height: 104px; font-size: 36px; }
  .profile-head .accent-name { font-size: 23px; }
  .profile-head .pstats .pstat { padding: 6px 16px; }
  .profile-head .pactions { width: 100%; max-width: none; }
  .profile-head .pactions .btn { flex: 1 1 auto; min-width: 120px; }
}

/* ---- perfil personalizable ---- */
.profile-view { min-height: calc(100dvh - var(--topbar-h)); margin: -22px -26px calc(-1 * (var(--player-h) + 30px)); padding: 22px 26px calc(var(--player-h) + 30px); }
@media (max-width: 720px) { .profile-view { min-height: calc(100dvh - var(--topbar-h) - 14px); margin: -14px -13px calc(-1 * (var(--nav-h) + 94px + env(safe-area-inset-bottom,0px))); padding: 14px 13px calc(var(--nav-h) + 94px + env(safe-area-inset-bottom,0px)); } }
/* (banner antiguo sustituido por .profile-cover) */
.profile-head .btn.primary { background: var(--accent, var(--blue-2)); border-color: transparent; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--accent, var(--blue-deep)); background: color-mix(in srgb, var(--accent, #3e57fc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--accent, #3e57fc) 30%, #fff); padding: 6px 12px; border-radius: 30px; transition: transform .12s var(--ease); }
.profile-links a:hover { transform: translateY(-1px); }
.profile-links a svg { width: 14px; height: 14px; stroke: currentColor; }

/* personalizador de perfil */
.bg-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
input[type=color] { width: 48px; height: 38px; padding: 2px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.cz-select { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--panel-2); }
.link-row { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 7px 10px; margin-bottom: 7px; font-size: 12.5px; }
.link-row .lr-label { font-weight: 700; color: var(--ink); }
.link-row .lr-url { color: var(--ink-soft); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row button { border: none; background: none; color: var(--ink-soft); font-size: 16px; }
.link-add { display: flex; gap: 8px; }
.link-add select { flex: 0 0 40%; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel-2); }
.link-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel-2); }
.cz-banner { width: 92px; height: 52px; border-radius: 9px; }

/* ===== personalización avanzada: fuentes, frase, brillos, efectos, tarjetas ===== */
.profile-view { position: relative; }
.profile-view > .pfx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.profile-cover, .profile-head, .profile-view .main-head, .profile-view #feedList, .profile-view #postGrid, .profile-view #featList, .profile-view #profEvents, .profile-view .profile-tabs, .profile-tagline, .profile-back { position: relative; z-index: 1; }
.profile-back { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(8px); border-radius: 30px; padding: 8px 15px 8px 11px; font-weight: 650; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; box-shadow: var(--sh-1); transition: transform .14s var(--ease), box-shadow .18s; }
.profile-back:hover { background: #fff; transform: translateX(-2px); box-shadow: var(--sh-2); }
.profile-back:active { transform: scale(.96); }
.profile-back svg { width: 18px; height: 18px; stroke: var(--ink-2); }

/* fuente del perfil */
.profile-head, .profile-head h2, .profile-tagline { font-family: var(--pf-font, inherit); }

/* frase destacada */
.profile-tagline { font-size: 18px; font-weight: 700; color: var(--accent, var(--ink)); margin: 10px auto 0; max-width: 560px; line-height: 1.3; text-align: center; }

/* degradado animado */
.profile-view.bg-animated { background-size: 220% 220% !important; animation: bgshift 16s ease infinite; }
@keyframes bgshift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }

/* brillos */
.glow-soft .accent-name { color: var(--accent); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.glow-soft .profile-head .avatar { box-shadow: 0 0 0 4px var(--panel), 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.glow-neon .accent-name { color: var(--accent); text-shadow: 0 0 6px var(--accent), 0 0 18px var(--accent); animation: glowpulse 2.4s ease-in-out infinite; }
.glow-neon .profile-head .avatar { box-shadow: 0 0 0 3px var(--panel), 0 0 24px var(--accent); }
.glow-neon .profile-tagline { text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
@keyframes glowpulse { 0%,100%{ text-shadow: 0 0 6px var(--accent), 0 0 16px var(--accent); } 50%{ text-shadow: 0 0 12px var(--accent), 0 0 32px var(--accent); } }

/* efectos animados de fondo */
.pfx-aurora span { position: absolute; width: 55%; height: 55%; border-radius: 50%; filter: blur(70px); opacity: .45; }
.pfx-aurora span:nth-child(1){ background: var(--accent); top: -10%; left: -5%; animation: drift 20s ease-in-out infinite; }
.pfx-aurora span:nth-child(2){ background: color-mix(in srgb, var(--accent) 50%, #27a9ff); bottom: -15%; right: -5%; animation: drift 26s ease-in-out infinite reverse; }
.pfx-aurora span:nth-child(3){ background: color-mix(in srgb, var(--accent) 40%, #b3a9ee); top: 30%; left: 40%; animation: drift 32s ease-in-out infinite; }
.pfx-stars i { position: absolute; width: var(--sz,2px); height: var(--sz,2px); background: var(--accent); border-radius: 50%; box-shadow: 0 0 6px var(--accent); animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%,100%{ opacity:.12; transform: scale(.8);} 50%{ opacity:.95; transform: scale(1.2);} }
.pfx-notes i { position: absolute; bottom: -30px; color: var(--accent); opacity: .55; animation: rise linear infinite; font-style: normal; }
@keyframes rise { 0%{ transform: translateY(0) rotate(0); opacity:0;} 12%{opacity:.6;} 100%{ transform: translateY(-820px) rotate(40deg); opacity:0;} }

/* estilos de tarjeta */
.cards-glass .track { background: rgba(255,255,255,.5); backdrop-filter: blur(10px) saturate(1.25); border-color: rgba(255,255,255,.6); }
.cards-neon .track { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 32%, transparent); }
.cards-dark .track { background: #1b2030; border-color: #2c3550; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.cards-dark .t-title { color: #eef2fb; }
.cards-dark .t-artist, .cards-dark .time, .cards-dark .act { color: #9fb0cc; }
.cards-dark .t-artist a, .cards-dark .accent-name { color: var(--accent); }
.cards-dark .wave .bar::before { background: #39435f; }
.cards-dark .act svg { stroke: #9fb0cc; }
.cards-dark .comments { border-top-color: #2c3550; }
.cards-dark .comment .c-name { color: #eef2fb; }
.cards-dark .comment .c-body p { color: #c3cde0; }
.cards-dark .comment-form input, .cards-dark .t-genre { background: #232a3d; border-color: #2c3550; color: #c3cde0; }

.empty { text-align: center; color: var(--ink-soft); padding: 56px 20px; animation: fadeIn .3s; }
.empty svg { width: 50px; height: 50px; stroke: var(--ink-faint); margin-bottom: 14px; opacity: .6; animation: floaty 3.5s ease-in-out infinite; }
.empty p { font-size: 13.5px; }

.toast-wrap { position: fixed; bottom: calc(var(--player-h) + 16px); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(40,48,70,.94); color: #fff; padding: 11px 20px; border-radius: 13px; font-size: 13px; font-weight: 650; box-shadow: var(--sh-3); animation: toastin .3s var(--ease); max-width: 90vw; backdrop-filter: blur(6px); }

.notif-item { display: flex; gap: 11px; padding: 12px; border-radius: 12px; align-items: flex-start; cursor: pointer; transition: background .15s; animation: fadeUp .3s var(--ease) both; }
.notif-item:hover { background: rgba(62,87,252,.08); }
.notif-item .avatar { width: 36px; height: 36px; }
.notif-item .ntext { font-size: 13px; color: var(--ink-2); }
.notif-item .ntext b { color: var(--ink); }
.notif-item .ntext .when { color: var(--ink-faint); font-size: 11px; }

/* loading + skeletons */
.loading { display: grid; place-items: center; padding: 56px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--blue-deep); border-radius: 50%; animation: spin .8s linear infinite; }
.skeleton { display: flex; gap: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px; margin-bottom: 14px; }
.sk { background: linear-gradient(90deg, #edf0f6 25%, #f6f8fc 37%, #edf0f6 63%); background-size: 480px 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px; }
.sk-cover { width: 92px; height: 92px; border-radius: var(--r); flex-shrink: 0; }
.sk-line { height: 13px; margin-bottom: 9px; }

/* ===================================================================== MOBILE NAV */
.bottom-nav { display: none; }
.drawer-backdrop { display: none; }
.menu-toggle { display: none; }
.drawer-only { display: none; }
.topbar-logo { display: none; }
.search-toggle { display: none; }
@media (max-width: 1024px) { .drawer-only { display: grid; } }
@media (max-width: 720px) { .drawer-only { display: none; } }

/* ===================================================================== RESPONSIVE */
@media (max-width: 1180px) {
  .app { grid-template-columns: 220px 1fr 280px; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 216px 1fr; grid-template-areas: "brand topbar" "side main"; }
  .right {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); z-index: 60;
    border-left: 1px solid var(--line); background: var(--panel); box-shadow: var(--sh-3);
    transform: translateX(102%); transition: transform .28s var(--ease);
  }
  .right.open { transform: none; }
  .drawer-backdrop { position: fixed; inset: 0; background: rgba(40,48,70,.4); backdrop-filter: blur(2px); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .drawer-backdrop.show { display: block; opacity: 1; pointer-events: auto; }
}
@media (max-width: 720px) {
  /* inputs a 16px: evita el zoom automático de iOS al enfocar */
  input, textarea, select { font-size: 16px; }

  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "topbar" "main"; }
  .brand { display: none; }
  .menu-toggle { display: grid; }
  .search-toggle { display: grid; }

  /* TOPBAR en dos filas: [☰ · UnderBro · 🔍 🔔 avatar] / [tabs] */
  .topbar { flex-wrap: wrap; align-items: center; gap: 8px 8px; padding: 9px 12px; }
  .topbar-logo { display: block; font-size: 22px; margin-right: auto; }
  .icon-btn { width: 42px; height: 42px; }
  .topbar-right { gap: 6px; }
  .avatar-chip { padding: 2px; }
  .avatar-chip .uname { display: none; }
  .avatar-chip .avatar { width: 38px; height: 38px; }
  .search { display: none; }
  .topbar.search-open .search { display: flex; order: 4; flex-basis: 100%; max-width: none; }
  .topbar .tabs { order: 5; flex-basis: 100%; width: 100%; }
  .topbar .tabs button { flex: 1; padding: 10px 8px; font-size: 13px; }

  /* SIDEBAR drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 280px); z-index: 70;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom,0px)); background: var(--panel);
    transform: translateX(-102%); transition: transform .28s var(--ease); box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: none; }
  .nav-item { padding: 12px; font-size: 14.5px; }
  .upload-cta { padding: 14px; }

  /* MAIN: hueco para reproductor + nav + safe-area, así nada queda tapado */
  .main { padding: 14px 13px calc(var(--nav-h) + 94px + env(safe-area-inset-bottom,0px)); }
  .main-head h2 { font-size: 19px; }
  .track { padding: 13px; gap: 12px; border-radius: var(--r); }
  .track .cover { width: 78px; height: 78px; }
  .track .t-foot { gap: 1px; }
  .act { padding: 9px 9px; }

  /* PLAYER: tarjeta flotante con márgenes, barra de tiempo integrada abajo */
  .player {
    left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom,0px) + 8px);
    height: 66px; gap: 12px; padding: 0 10px 11px; border-radius: 18px;
    border: 1px solid var(--line); box-shadow: var(--sh-3); z-index: 46;
    background: rgba(255,255,255,.92); backdrop-filter: blur(18px) saturate(1.5); overflow: visible;
  }
  .player .now { width: auto; flex: 1; gap: 11px; min-width: 0; }
  .player .now .cover { width: 44px; height: 44px; border-radius: 11px; animation: none; }
  .player .controls { gap: 8px; }
  .player .controls #pPrev, .player .controls #pNext { display: none; }
  .player .controls .play-big { width: 46px; height: 46px; }
  .player .vol { display: none; }
  /* barra de tiempo fina integrada en el borde inferior de la tarjeta, con margen interior */
  .player .progress { position: absolute; left: 14px; right: 14px; bottom: 7px; gap: 0; padding: 0; }
  .player .progress .time { display: none; }
  .player .seek { height: 4px; border-radius: 4px; background: #d3dbe9; }
  .player .seek::before { inset: -13px 0 -9px; }      /* zona de agarre cómoda */
  .player .seek .knob { width: 13px; height: 13px; }
  .player .seek:hover, .player .seek.scrub { height: 5px; }
  .player .seek .seek-tip { bottom: 15px; }

  .toast-wrap { bottom: calc(var(--nav-h) + 92px + env(safe-area-inset-bottom,0px)); }

  /* BOTTOM NAV con safe-area */
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom,0px));
    padding: 0 6px env(safe-area-inset-bottom,0px);
    background: var(--glass); backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid var(--line);
    justify-content: space-around; align-items: center;
  }
  /* sin sesión (app oculta) no debe verse la barra inferior */
  #app.hidden ~ .bottom-nav { display: none; }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border: none; background: none; color: var(--ink-soft); font-size: 10px; font-weight: 650; padding: 7px 0; position: relative; min-width: 0; }
  .bottom-nav button svg { width: 23px; height: 23px; stroke: var(--ink-soft); transition: stroke .15s, transform .15s var(--ease); }
  .bottom-nav button.active { color: var(--blue-deep); }
  .bottom-nav button.active svg { stroke: var(--blue-deep); transform: translateY(-1px); }
  /* Orbe central "Yo" — bola mágica */
  .bottom-nav .nav-orb { margin-top: -26px; overflow: visible; }
  .bottom-nav .nav-orb .orb { width: 58px; height: 58px; border-radius: 50%; position: relative; display: grid; place-items: center; animation: orbFloat 3.4s ease-in-out infinite; }
  .bottom-nav .nav-orb .orb-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #27a9ff, #6e2df5, #4060f5, #27a9ff, #6e2df5, #27a9ff); animation: orbSpin 5s linear infinite; box-shadow: 0 8px 24px rgba(62,87,252,.5); }
  .bottom-nav .nav-orb .orb-ring::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: radial-gradient(circle, rgba(111,143,198,.5), transparent 70%); animation: orbGlow 2.6s ease-in-out infinite; z-index: -1; }
  .bottom-nav .nav-orb .orb-av { position: relative; z-index: 1; width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--panel); background: var(--panel-2) center/cover no-repeat; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--blue-2); overflow: hidden; }
  .bottom-nav .nav-orb .orb-label { font-size: 10px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
  .bottom-nav .nav-orb.active .orb-label { color: var(--blue-deep); }
  .bottom-nav .nav-orb.active .orb-av { border-color: var(--blue); }
  .bottom-nav .nav-orb:active .orb { transform: scale(.92); }
  @keyframes orbSpin { to { transform: rotate(360deg); } }
  @keyframes orbFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
  @keyframes orbGlow { 0%,100% { opacity: .45; transform: scale(1); } 50% { opacity: .9; transform: scale(1.15); } }
  @media (prefers-reduced-motion: reduce) { .bottom-nav .nav-orb .orb, .bottom-nav .nav-orb .orb-ring, .bottom-nav .nav-orb .orb-ring::after { animation: none; } }
  .bottom-nav button .badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e2674f; color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }

  /* DRAWERS por encima de la nav, con safe-area */
  .right { width: min(86vw, 360px); z-index: 70; }
  .right .chat-form { padding-bottom: calc(12px + env(safe-area-inset-bottom,0px)); }
  .drawer-backdrop { z-index: 66; }

  /* MODAL como hoja inferior, respetando safe-area */
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; align-self: flex-end; max-height: 90vh; width: 100%; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal-body { padding-bottom: calc(24px + env(safe-area-inset-bottom,0px)); }
}
@media (max-width: 380px) {
  .track .t-foot .act:not(.like) span { display: none; }
  .track .t-foot .act.like .ln { display: none; }
  .topbar-logo { font-size: 20px; }
}

/* ===================== POSTS / FOTOS ===================== */
.post-list { animation: fadeIn .3s; }
.post .post-head { display: flex; align-items: center; gap: 10px; }
.post .post-av { flex-shrink: 0; cursor: pointer; }
.post .post-av .avatar { width: 38px; height: 38px; }
.post .post-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.post .post-who b { font-size: 13.5px; font-weight: 720; color: var(--ink); cursor: pointer; }
.post .post-who b:hover { text-decoration: underline; }
.post .post-time { font-size: 11px; color: var(--ink-faint); }
.post .post-tools { margin-left: auto; display: inline-flex; gap: 2px; flex-shrink: 0; }
.post .post-tool { border: none; background: none; color: var(--ink-faint); padding: 5px 7px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; transition: background .15s, color .15s; }
.post .post-tool svg { width: 16px; height: 16px; stroke: currentColor; }
.post .post-tool:hover { background: rgba(62,87,252,.10); color: var(--ink-2); }
.post .post-tool.danger:hover { background: rgba(214,90,71,.12); color: var(--danger); }
.post .post-img { margin: 3px -15px 0; background: #0c1020; max-height: 620px; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.post .post-img img { width: 100%; max-height: 620px; object-fit: contain; cursor: zoom-in; display: block; }
.post .post-caption { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.post .post-caption b { color: var(--blue-deep); font-weight: 700; margin-right: 4px; cursor: pointer; }
.post .t-foot .time { color: var(--ink-soft); }

/* selector: pista o foto */
.create-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--panel-2); color: var(--ink-2); cursor: pointer; transition: border-color .18s, background .18s, transform .12s; }
.create-choice:hover { border-color: var(--blue); background: #eef4fc; transform: translateY(-2px); }
.create-choice .cc-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); margin-bottom: 4px; }
.create-choice .cc-ic svg { width: 24px; height: 24px; stroke: #fff; }
.create-choice b { font-size: 15px; font-weight: 750; color: var(--ink); }
.create-choice .cc-sub { font-size: 11.5px; color: var(--ink-soft); }

/* previsualización de la foto en el modal de subida */
.post-photo-prev { margin-top: 10px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.post-photo-prev img { width: 100%; max-height: 320px; object-fit: cover; display: block; }

/* pestañas del perfil (Pistas / Fotos) — control segmentado, legible sobre cualquier tema */
.profile-tabs { display: inline-flex; gap: 4px; margin: 6px 0 16px; padding: 4px; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--sh-1); }
.profile-tabs button { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--ink-soft); border-radius: 24px; cursor: pointer; transition: background .16s, color .16s; }
.profile-tabs button svg { width: 15px; height: 15px; stroke: currentColor; }
.profile-tabs button:not(.active):hover { color: var(--ink-2); background: rgba(62,87,252,.10); }
.profile-tabs button.active { background: var(--accent-grad); color: #fff; box-shadow: 0 2px 8px rgba(62,87,252,.32); }
.profile-tabs button.active svg { stroke: #fff; }
.profile-tabs .ptab-n { font-size: 11px; opacity: .82; font-weight: 700; }
@media (max-width: 460px) {
  .profile-tabs { display: flex; width: 100%; border-radius: 16px; }
  .profile-tabs button { flex: 1; justify-content: center; padding: 9px 6px; gap: 5px; }
  .profile-tabs button svg { width: 14px; height: 14px; }
}

/* resultados de búsqueda: personas */
.search-section { font-size: 12px; font-weight: 750; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; margin: 4px 2px 10px; }
.search-people { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.search-person { display: flex; align-items: center; gap: 11px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color .16s, transform .12s, box-shadow .18s; animation: fadeUp .35s var(--ease) both; }
.search-person:hover { border-color: #d2dcec; transform: translateY(-1px); box-shadow: var(--sh-1); }
.search-person .avatar { width: 42px; height: 42px; flex-shrink: 0; }
.search-person .sp-meta { flex: 1; min-width: 0; }
.search-person .sp-name { font-size: 14px; font-weight: 720; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-person .sp-handle { font-size: 12px; color: var(--ink-soft); }
.search-person .btn { flex-shrink: 0; }

/* cuadrícula de fotos (estilo Instagram) */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pg-item { position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; background: #0c1020; border-radius: 6px; animation: fadeIn .3s; }
.pg-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s var(--ease); }
.pg-item:hover img { transform: scale(1.06); }
.pg-stats { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; background: rgba(12,16,32,.42); color: #fff; font-weight: 750; font-size: 13px; opacity: 0; transition: opacity .2s; }
.pg-item:hover .pg-stats { opacity: 1; }
.pg-stats span { display: inline-flex; align-items: center; gap: 5px; }
.pg-stats svg { width: 16px; height: 16px; fill: #fff; stroke: #fff; }
@media (max-width: 480px) { .post-grid { gap: 3px; } }

/* ======================================================================
   JUICE — microinteracciones, feedback táctil (minimal premium)
   ====================================================================== */
.btn, .icon-btn, .nav-item, .tabs button, .bottom-nav button, .profile-tabs button,
.pl-card, .ev-card, .social-card, .badge-item, .story-circle, .pstat, .convo,
.person, .follow-row, .dm-track-play, .kpi, .dt-row, .link-card, .pg-item {
  transition: transform .16s var(--ease-spring), box-shadow .2s var(--ease), background-color .15s, border-color .15s, color .15s;
}
.btn:active, .icon-btn:active, .nav-item:active, .tabs button:active, .bottom-nav button:active,
.profile-tabs button:active, .pstat:active, .convo:active, .person:active, .follow-row:active,
.social-card:active, .badge-item:not(.locked):active, .dm-track-play:active, .kpi:active { transform: scale(.95); }
.pl-card:active, .ev-card:active, .story-circle:active, .dt-row:active, .pg-item:active { transform: scale(.97); }
.track:active { transform: scale(.993); }
@media (hover: hover) {
  .track:hover { box-shadow: var(--sh-2); }
  .kpi:hover, .dash-section:hover { box-shadow: var(--sh-2); }
}

/* "me gusta" satisfactorio: latido + onda */
.act.like { position: relative; }
.act.like.on svg { border-radius: 50%; animation: heartPop .45s var(--ease-spring), likeBurst .55s var(--ease); }
@keyframes heartPop { 0% { transform: scale(.55); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes likeBurst { 0% { box-shadow: 0 0 0 0 rgba(236,95,120,.45); } 100% { box-shadow: 0 0 0 11px rgba(236,95,120,0); } }
.act.repost.on svg { animation: heartPop .45s var(--ease-spring); }

/* toast con entrada elástica */
.toast { animation: toastIn .42s var(--ease-spring); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }

/* botón primario: realce sutil al pulsar */
.btn.primary:active { filter: brightness(.97); }
.play-lg:active { transform: scale(.9); }

/* ===================== REPORTAR / MODERACIÓN ===================== */
.rep-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-reason { border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink-2); border-radius: 20px; padding: 8px 14px; font-size: 13px; font-weight: 650; cursor: pointer; transition: all .15s var(--ease); }
.rep-reason:hover { border-color: var(--blue); }
.rep-reason.on { background: var(--accent-grad); color: #fff; border-color: transparent; }
.rep-card { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; margin-bottom: 12px; background: var(--panel-2); }
.rep-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rep-type { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .4px; color: #fff; background: var(--accent-grad); padding: 2px 9px; border-radius: 20px; }
.rep-when { font-size: 11.5px; color: var(--ink-soft); }
.rep-reason-l { font-weight: 700; font-size: 14px; color: var(--ink); }
.rep-details { font-size: 13px; color: var(--ink-2); margin-top: 4px; background: var(--panel); border-radius: 9px; padding: 8px 10px; }
.rep-meta { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.rep-meta b { color: var(--blue-deep); cursor: pointer; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
