/* ============================================
   SUNO RADIO — Global Design System v2.0
   Dark-first, premium, mobile-optimized
   Fully responsive + bug fixes
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand Colors */
  --p: #8b5cf6;
  --p2: #7c3aed;
  --acc: #f472b6;
  --gold: #fbbf24;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad2: linear-gradient(135deg, #6d28d9 0%, #be185d 100%);
  --neon: #a78bfa;

  /* Surfaces */
  --bg: #09090f;
  --srf: #111118;
  --srf2: #1a1a26;
  --srf3: #22222f;
  --bdr: rgba(255,255,255,0.07);
  --bdr2: rgba(255,255,255,0.12);

  /* Text */
  --txt: #f0f0f8;
  --txt2: #a0a0bc;
  --muted: #5a5a78;

  /* Shadows */
  --shd: 0 4px 24px rgba(0,0,0,0.5);
  --shd2: 0 8px 40px rgba(0,0,0,0.6);
  --glow: 0 0 24px rgba(139,92,246,0.3);
  --glow2: 0 0 40px rgba(139,92,246,0.2);

  /* Layout */
  --r: 18px;
  --rs: 12px;
  --nh: 64px;
  --ph: 70px;

  /* Fonts */
  --ff: 'DM Sans', sans-serif;
  --fh: 'Syne', sans-serif;

  /* Transitions */
  --t: 0.18s ease;
  --ts: 0.25s cubic-bezier(.4,0,.2,1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--txt);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Mobile body padding - fixed nav + mini player */
  padding-top: 65px;
  padding-bottom: calc(var(--nh) + var(--ph) + 8px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body { padding-bottom: 50px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bdr2); border-radius: 99px; }

/* Smooth touch scrolling */
* { -webkit-overflow-scrolling: touch; }

/* ===== TOAST ===== */
.toast-wrap {
  position: fixed; top: 76px; right: 14px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 7px;
  pointer-events: none;
}
.toast-pop {
  background: var(--srf2);
  color: var(--txt);
  border-radius: 13px;
  padding: 11px 15px;
  box-shadow: var(--shd2);
  display: flex; align-items: center; gap: 9px;
  font-size: .84rem; font-weight: 500;
  min-width: 210px; max-width: 290px;
  border-left: 4px solid var(--p);
  animation: tIn .28s ease, tOut .28s ease 2.72s forwards;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}
.toast-pop.ok { border-color: #22c55e; }
.toast-pop.err { border-color: #ef4444; }
@keyframes tIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes tOut { to { transform: translateX(110%); opacity: 0; } }

/* ===== TOP NAV ===== */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 65px;
  background: rgba(9,9,15,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center;
  padding: 0 1.2rem; gap: .4rem;
  z-index: 1030;
}

.nav-brand {
  font-family: var(--fh);
  font-size: 1.4rem; font-weight: 800;
  color: #fff; text-decoration: none;
  letter-spacing: -.5px;
  margin-right: auto;
}
.nav-brand span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-ico {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .85rem; transition: var(--t);
  text-decoration: none; position: relative;
}
.nav-ico:hover { background: rgba(255,255,255,.2); }

.notif-badge {
  position: absolute; top: -3px; right: -3px;
  background: #ff3860; color: #fff;
  border-radius: 50%; width: 17px; height: 17px;
  font-size: .58rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  border: 2px solid rgba(9,9,15,.94);
}
.notif-badge.show { display: flex; }

.nav-pill {
  color: rgba(255,255,255,.75); text-decoration: none;
  padding: 6px 13px; border-radius: 20px;
  font-size: .8rem; font-weight: 500;
  transition: var(--t); background: transparent; border: none; cursor: pointer;
}
.nav-pill:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-pill.prim { background: var(--grad); color: #fff; }

.coin-nav {
  background: rgba(255,193,7,.15);
  color: #ffc107;
  border: 1px solid rgba(255,193,7,.3);
  border-radius: 20px; padding: 4px 12px;
  font-size: .78rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}

/* Hide top nav on mobile */
@media (max-width: 767px) { .top-nav { display: none !important; } }

/* ===== BOTTOM NAV ===== */
.bot-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nh) + env(safe-area-inset-bottom, 0px));
  background: rgba(9,9,15,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--bdr);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bni {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 8px 4px 6px;
  border-radius: 12px; text-decoration: none;
  color: rgba(255,255,255,.42);
  font-size: .59rem; font-weight: 600;
  transition: var(--ts); cursor: pointer;
  background: none; border: none; position: relative;
  font-family: var(--ff);
}
.bni i { font-size: 1.18rem; transition: transform var(--t); }
.bni.active {
  color: #fff;
  background: rgba(139,92,246,.18);
  border-radius: 14px;
}
.bni.active i { transform: scale(1.1); color: var(--neon); }
.bni.active::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  background: var(--grad); border-radius: 3px 3px 0 0;
}
.bni:active i { transform: scale(.88); }

.bni-badge {
  position: absolute; top: 4px; right: 50%; margin-right: -18px;
  background: #ff3860; color: #fff;
  border-radius: 99px; min-width: 15px; height: 15px;
  font-size: .5rem; font-weight: 700;
  display: none; align-items: center; justify-content: center; padding: 0 3px;
}
.bni-badge.show { display: flex; }

@media (min-width: 768px) { .bot-nav { display: none !important; } }

/* ===== MINI PLAYER ===== */
.mini-player {
  position: fixed;
  bottom: calc(var(--nh) + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  height: var(--ph);
  background: rgba(14,14,32,.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center;
  padding: 0 1rem; gap: .75rem;
  z-index: 1025;
}

.wave-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 22px; flex-shrink: 0;
}
.wb {
  width: 3px; border-radius: 2px;
  background: var(--grad);
  animation: wv .8s ease-in-out infinite;
}
.wb:nth-child(1){height:8px;animation-delay:0s}
.wb:nth-child(2){height:18px;animation-delay:.1s}
.wb:nth-child(3){height:12px;animation-delay:.2s}
.wb:nth-child(4){height:18px;animation-delay:.1s}
.wb:nth-child(5){height:8px;animation-delay:0s}
@keyframes wv { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(.25)} }
.wave-bars.paused .wb { animation-play-state: paused; }

.ptxt { flex: 1; min-width: 0; }
.ptxt .sn {
  color: #fff; font-weight: 700; font-size: .87rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-badge {
  background: #ff3860; color: #fff;
  font-size: .57rem; font-weight: 700;
  padding: 1px 5px; border-radius: 8px;
  margin-left: 4px;
  animation: blk 1.6s infinite;
  vertical-align: middle;
}
@keyframes blk { 0%,100%{opacity:1} 50%{opacity:.35} }
.ptxt .sub { font-size: .63rem; color: rgba(255,255,255,.48); margin-top: 1px; }

.pctrls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vic { color: rgba(255,255,255,.58); font-size: .88rem; cursor: pointer; }
.vr { width: 54px; accent-color: var(--p); cursor: pointer; }
.play-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: var(--t);
  box-shadow: 0 4px 14px rgba(139,92,246,.4);
}
.play-btn:active { transform: scale(.9); }

@media (min-width: 768px) { .mini-player { display: none !important; } }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(150deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
  color: #fff;
  padding: 2rem 1rem 1.8rem;
  margin-bottom: 1.2rem;
  border-radius: 0 0 28px 28px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(139,92,246,.12);
  top: -90px; right: -50px;
  animation: fl 6s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: rgba(236,72,153,.08);
  bottom: -65px; left: -25px;
  animation: fl 8s ease-in-out infinite reverse;
}
@keyframes fl { 0%,100%{transform:translate(0,0)} 50%{transform:translate(8px,-13px)} }

.hero-in { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-family: var(--fh); font-size: 1.9rem; font-weight: 800; margin-bottom: .2rem; }
.gtxt {
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { opacity: .84; font-size: .87rem; margin-bottom: .8rem; }

.hero-stats { display: flex; justify-content: center; gap: 1.8rem; margin: .6rem 0; }
.hstat .v { font-size: 1.3rem; font-weight: 800; color: #fff; }
.hstat .l { font-size: .58rem; opacity: .6; text-transform: uppercase; letter-spacing: .5px; }

.hero-pills {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem; margin-top: 1rem;
}
.hpill {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; border-radius: 20px; padding: 7px 16px;
  font-size: .78rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: var(--t); font-family: var(--ff);
  min-height: 36px; display: inline-flex; align-items: center;
}
.hpill:hover { background: rgba(255,255,255,.22); color: #fff; }
.hpill.gold { background: rgba(255,193,7,.2); border-color: rgba(255,193,7,.4); color: #ffd60a; }

.checkin-bar {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px; padding: .7rem 1.1rem;
  display: flex; align-items: center; gap: .8rem;
  margin-top: 1rem; cursor: pointer; transition: var(--t);
}
.checkin-bar:hover { background: rgba(255,255,255,.16); }
.checkin-bar .ci { font-size: 1.5rem; }
.checkin-bar .ct { flex: 1; text-align: left; }
.checkin-bar .ct strong { display: block; font-size: .86rem; color: #fff; }
.checkin-bar .ct small { font-size: .7rem; color: rgba(255,255,255,.65); }
.cb-btn {
  background: #ffd60a; color: #1a1a2e; border: none;
  border-radius: 12px; padding: 7px 14px;
  font-size: .78rem; font-weight: 700;
  cursor: pointer; font-family: var(--ff); white-space: nowrap;
  transition: var(--t);
}
.cb-btn:active { transform: scale(.95); }

.desk-player {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 17px; padding: .85rem 1.35rem;
  display: flex; align-items: center; gap: .9rem;
  max-width: 480px; margin: .9rem auto 0;
}
.dp-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad); color: #fff; border: none;
  font-size: 1.08rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t); flex-shrink: 0;
}
.dp-btn:hover { transform: scale(1.06); }
.dpi .dt { color: #fff; font-weight: 700; font-size: .93rem; }
.dpi .ds { font-size: .68rem; opacity: .63; margin-top: 2px; }
.dpv { display: flex; align-items: center; gap: 6px; }
.dpv i { color: rgba(255,255,255,.62); font-size: .88rem; }
.dpv input { width: 68px; accent-color: #fff; }

@media (max-width: 380px) {
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { gap: 1.1rem; }
  .hstat .v { font-size: 1.1rem; }
}

/* ===== SECTION TABS ===== */
.sec { display: none; animation: fu .22s ease; }
.sec.active { display: block; }
@keyframes fu { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: calc(var(--nh) + var(--ph) + 10px + env(safe-area-inset-bottom, 0px));
  right: 14px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.28rem;
  box-shadow: 0 6px 20px rgba(139,92,246,.5);
  z-index: 1020; border: none; cursor: pointer; transition: var(--t);
}
.fab:active { transform: scale(.9); }
@media (min-width: 768px) { .fab { display: none !important; } }

.scr-top {
  position: fixed;
  bottom: calc(var(--nh) + var(--ph) + 68px + env(safe-area-inset-bottom, 0px));
  right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--srf); color: var(--p);
  border: 1px solid var(--bdr);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; font-size: .8rem;
  box-shadow: var(--shd); z-index: 1010; transition: var(--t);
}
.scr-top.show { display: flex; }
@media (min-width: 768px) { .scr-top { bottom: 80px; } }

/* ===== INSTALL BANNER ===== */
.inst-banner {
  background: linear-gradient(135deg, #0f0c29, #302b63);
  color: #fff; border-radius: var(--r);
  padding: .95rem 1.1rem; margin-bottom: 1rem;
  display: none; align-items: center; gap: .8rem;
  box-shadow: var(--shd2); border: 1px solid rgba(139,92,246,.3);
}
.inst-banner.show { display: flex; }
.inst-banner .ibt .ibt strong { display: block; font-size: .88rem; }
.inst-banner .ibt small { opacity: .68; font-size: .7rem; }
.inst-do {
  background: var(--grad); color: #fff; border: none;
  border-radius: 20px; padding: 7px 14px;
  font-size: .77rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.inst-x { color: rgba(255,255,255,.42); background: none; border: none; font-size: .83rem; cursor: pointer; }

/* ===== STORIES STRIP ===== */
.stories-strip {
  display: flex; gap: .7rem;
  overflow-x: auto; padding: .2rem 0 .9rem;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.stories-strip::-webkit-scrollbar { display: none; }

.story-bubble {
  flex-shrink: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer;
}
.story-ring {
  width: 58px; height: 58px; border-radius: 50%; padding: 2px;
  background: var(--grad); transition: var(--t);
}
.story-ring.viewed { background: var(--srf3); }
.story-ring:active { transform: scale(.93); }
.story-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--srf); border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: #fff; overflow: hidden;
}
.story-name {
  font-size: .6rem; color: var(--muted);
  max-width: 60px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.add-story-ring {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--srf2); border: 2px dashed var(--p);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--p); transition: var(--t);
}
.add-story-ring:active { transform: scale(.93); }

/* Story viewer overlay */
.story-overlay {
  position: fixed; inset: 0; background: #000;
  z-index: 9000; display: none; flex-direction: column;
}
.story-overlay.open { display: flex; }
.story-view {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; color: #fff;
}
.sv-bg { position: absolute; inset: 0; }
.sv-content { position: relative; z-index: 1; text-align: center; padding: 2rem; }
.sv-user { font-size: .82rem; opacity: .8; margin-bottom: .5rem; }
.sv-text { font-size: 1.3rem; font-weight: 700; line-height: 1.4; }
.story-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem; z-index: 10;
}
.story-nav { display: flex; gap: .5rem; padding: .5rem; background: rgba(0,0,0,.5); }
.story-nav-btn {
  flex: 1; background: rgba(255,255,255,.3); border: none; color: #fff;
  border-radius: 20px; padding: 12px; font-size: .82rem; font-weight: 600;
  cursor: pointer; font-family: var(--ff); min-height: 44px;
}

/* ===== POLL WIDGET ===== */
.poll-widget {
  background: var(--srf); border-radius: var(--r);
  box-shadow: var(--shd); border: 1px solid var(--bdr);
  padding: 1.1rem; margin-bottom: 1rem;
}
.poll-widget .pw-hd {
  font-weight: 700; font-size: .92rem; margin-bottom: .7rem;
  display: flex; align-items: center; gap: 6px;
}
.pw-hd i { color: var(--p); }
.pw-q { font-size: .88rem; color: var(--txt); margin-bottom: .8rem; }

.poll-opt {
  width: 100%; background: var(--srf2); border: 2px solid var(--bdr);
  border-radius: 12px; padding: .65rem 1rem;
  font-family: var(--ff); font-size: .84rem; color: var(--txt);
  cursor: pointer; text-align: left; transition: var(--t);
  margin-bottom: .45rem; position: relative; overflow: hidden;
  min-height: 44px;
}
.poll-opt:hover { border-color: var(--p); }
.poll-opt.voted { border-color: var(--p); background: rgba(139,92,246,.1); }
.poll-opt.winner { border-color: #22c55e; background: rgba(34,197,94,.08); }
.poll-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(139,92,246,.12); transition: width .5s ease; border-radius: 10px;
}
.poll-opt-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.poll-pct { font-size: .72rem; font-weight: 700; color: var(--p); }

/* ===== SEARCH ===== */
.search-box { position: relative; margin-bottom: 1rem; }
.search-box input {
  width: 100%; padding: .75rem 1rem .75rem 2.6rem;
  border-radius: 24px; border: 2px solid var(--bdr);
  background: var(--srf); color: var(--txt);
  font-family: var(--ff); font-size: .87rem; outline: none; transition: var(--t);
  height: 48px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.search-box .si { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .83rem; }

/* ===== SECTION HEAD ===== */
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sec-ti { font-weight: 700; font-size: 1.02rem; color: var(--txt); display: flex; align-items: center; gap: 6px; }
.sec-ti i { color: var(--p); }
.btn-np {
  background: var(--grad); color: #fff; border: none;
  border-radius: 20px; padding: 6px 15px;
  font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: var(--t); font-family: var(--ff);
  display: inline-flex; align-items: center; gap: .3rem;
}
.btn-np:hover { transform: translateY(-1px); }

/* ===== POST CARDS ===== */
.posts-feed { display: flex; flex-direction: column; gap: .9rem; }
.post-card {
  background: var(--srf); border-radius: var(--r);
  box-shadow: var(--shd); border: 1px solid var(--bdr);
  overflow: hidden; transition: transform var(--t), box-shadow var(--t);
}
.post-card:active { transform: scale(.99); }
.post-card:hover { box-shadow: var(--shd2), var(--glow); }

.pc-hd { padding: .85rem 1rem .4rem; display: flex; align-items: center; gap: .6rem; }
.pc-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .93rem; flex-shrink: 0;
  text-decoration: none; cursor: pointer;
}
.pc-ui .pc-un {
  font-weight: 700; color: var(--txt); font-size: .86rem;
  text-decoration: none; cursor: pointer; display: block;
}
.pc-ui .pc-un:hover { color: var(--p); }
.pc-ui .pc-tm { font-size: .67rem; color: var(--muted); margin-top: 1px; }
.pc-oa { margin-left: auto; display: flex; gap: 5px; }
.ib {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .7rem; transition: var(--t);
}
.ib.e { background: rgba(139,92,246,.1); color: var(--p); }
.ib.d { background: rgba(220,53,69,.1); color: #dc3545; }
.ib:hover { transform: scale(1.1); }

.pc-bd { padding: .15rem 1rem .55rem; }
.pc-tt { font-weight: 700; color: var(--txt); font-size: .93rem; margin-bottom: .22rem; }
.pc-ct {
  color: var(--muted); font-size: .83rem; line-height: 1.58;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-ct.exp { display: block; }
.rm-btn { background: none; border: none; color: var(--p); font-size: .77rem; font-weight: 600; cursor: pointer; padding: 2px 0; margin-top: 2px; }

.pc-ft {
  padding: .45rem 1rem .72rem;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--bdr); margin-top: .4rem;
}
.acts { display: flex; gap: .3rem; flex-wrap: wrap; }
.ap {
  background: var(--srf2); border: 1px solid var(--bdr);
  border-radius: 20px; padding: 6px 10px;
  font-size: .77rem; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  cursor: pointer; transition: var(--t); user-select: none;
  min-height: 34px;
}
.ap:hover { border-color: var(--p); color: var(--p); }
.ap.lk { background: rgba(139,92,246,.1); color: var(--p); border-color: var(--p); }
.ap.dl { background: rgba(220,53,69,.08); color: #dc3545; border-color: #dc3545; }
.rpt {
  background: none; border: none; color: var(--muted);
  font-size: .71rem; cursor: pointer;
  display: flex; align-items: center; gap: 3px;
  padding: 5px 7px; border-radius: 10px; transition: var(--t);
}
.rpt:hover { color: #dc3545; background: rgba(220,53,69,.06); }

@media (max-width: 360px) {
  .pc-ft .acts { gap: .2rem; }
  .ap { padding: 5px 7px; font-size: .72rem; }
}

/* ===== CHAT ===== */
.chat-wrap {
  background: var(--srf); border-radius: var(--r);
  box-shadow: var(--shd); border: 1px solid var(--bdr);
  display: flex; flex-direction: column; height: 460px;
}
@media (max-height: 600px) { .chat-wrap { height: 340px; } }

.chat-hd {
  background: var(--grad); color: #fff; padding: .85rem 1.15rem;
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  border-radius: var(--r) var(--r) 0 0;
}
.dot-on {
  width: 8px; height: 8px; background: #2ecc71; border-radius: 50%;
  animation: blk 2s infinite; margin-left: auto;
}

.chat-msgs {
  flex: 1; overflow-y: auto; padding: .95rem;
  background: var(--srf2); display: flex; flex-direction: column;
  gap: .42rem; scroll-behavior: smooth;
}
.chat-msgs::-webkit-scrollbar { width: 3px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--bdr); border-radius: 3px; }

.msg { max-width: 78%; align-self: flex-start; }
.msg.own { align-self: flex-end; }
.msg-meta { font-size: .63rem; color: var(--muted); margin-bottom: 2px; padding: 0 3px; }
.msg.own .msg-meta { text-align: right; }
.bubble {
  padding: 8px 13px; border-radius: 16px 16px 16px 4px;
  background: var(--srf); box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-size: .85rem; color: var(--txt); word-break: break-word; line-height: 1.5;
}
.msg.own .bubble { background: var(--grad); color: #fff; border-radius: 16px 16px 4px 16px; }

.chat-ft {
  padding: .68rem .82rem;
  padding-bottom: calc(.68rem + env(safe-area-inset-bottom, 0px));
  background: var(--srf); border-top: 1px solid var(--bdr); flex-shrink: 0;
}
.emoji-tray { display: none; flex-wrap: wrap; gap: 4px; padding: 5px 0 4px; }
.emoji-tray.open { display: flex; }
.eb { font-size: 1.18rem; cursor: pointer; border: none; background: none; padding: 2px; border-radius: 6px; transition: var(--t); }
.eb:hover { background: var(--bdr); }
.chat-row { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.etog {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--bdr); background: var(--srf2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.03rem; flex-shrink: 0; transition: var(--t);
}
.etog:hover { background: var(--bdr); }
.chat-in {
  flex: 1; padding: 10px 15px; border-radius: 22px;
  border: 2px solid var(--bdr); background: var(--srf2);
  color: var(--txt); font-family: var(--ff); font-size: .85rem;
  outline: none; transition: var(--t); height: 44px;
}
.chat-in:focus { border-color: var(--p); }
.chat-in::placeholder { color: var(--muted); }
.snd-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .86rem; flex-shrink: 0; transition: var(--t);
}
.snd-btn:hover { transform: scale(1.07); }
.snd-btn:active { transform: scale(.92); }
.chat-login { padding: 1.5rem; text-align: center; color: var(--muted); }
.chat-login i { font-size: 1.5rem; margin-bottom: .5rem; display: block; opacity: .4; }
.chat-login a { color: var(--p); font-weight: 600; text-decoration: none; }

/* ===== SUB-PAGE TOP NAV (s-nav) ===== */
.s-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(9,9,15,0.94);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center;
  padding: 0 1.2rem; gap: .6rem; z-index: 1030;
  padding-top: env(safe-area-inset-top, 0px);
}
.s-nav-brand {
  font-family: var(--fh); font-size: 1.35rem; font-weight: 800;
  color: #fff; text-decoration: none;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-right: auto;
}
.s-nav-back {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--srf2); border: 1px solid var(--bdr);
  color: var(--txt2); display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: .88rem; cursor: pointer; transition: var(--t);
}
.s-nav-back:hover { background: var(--srf3); color: var(--txt); }
.s-nav-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--srf2); border: 1px solid var(--bdr);
  color: var(--txt2); display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: .85rem; cursor: pointer; transition: var(--t); position: relative;
}
.s-nav-ico:hover { background: var(--srf3); color: var(--txt); }

/* ===== HERO (sub-pages) ===== */
.page-hero {
  background: linear-gradient(160deg, #1a0533 0%, #2d1050 60%, #0f0f1e 100%);
  padding: 5rem 1.2rem 3rem;
  text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,.18) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--fh); font-size: 1.8rem; font-weight: 800;
  color: #fff; margin: 0 0 .4rem; line-height: 1.15;
}
.page-hero p { color: rgba(255,255,255,.6); font-size: .88rem; margin: 0; }

.hero-back {
  position: absolute; top: 1rem; left: 1rem;
  display: flex; align-items: center; gap: .4rem;
  color: rgba(255,255,255,.65); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 7px 13px;
  font-size: .82rem; font-weight: 600; text-decoration: none; transition: var(--t);
}
.hero-back:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ===== HAS NAV (sub-page body padding) ===== */
.has-nav {
  padding-top: 60px;
  padding-bottom: calc(var(--nh) + env(safe-area-inset-bottom, 0px) + 12px);
}
@media (min-width: 768px) { .has-nav { padding-bottom: 50px; } }

/* ===== CARDS ===== */
.card {
  background: var(--srf); border-radius: var(--r);
  border: 1px solid var(--bdr); overflow: hidden;
}
.card-header {
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--bdr);
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; gap: 7px; color: var(--txt);
}
.card-header i { color: var(--p); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--grad); color: #fff; border: none;
  border-radius: var(--rs); padding: 13px 24px;
  font-family: var(--ff); font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: var(--t);
  display: inline-flex; align-items: center; gap: .45rem;
  box-shadow: 0 4px 16px rgba(139,92,246,.35);
  min-height: 48px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(139,92,246,.45); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--srf2); color: var(--txt2); border: 1px solid var(--bdr);
  border-radius: var(--rs); padding: 11px 20px;
  font-family: var(--ff); font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: var(--t);
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px;
}
.btn-ghost:hover { background: var(--srf3); color: var(--txt); }

/* ===== FORM INPUTS ===== */
.inp-grp {
  display: flex; align-items: center;
  background: var(--srf2); border: 1.5px solid var(--bdr);
  border-radius: var(--rs); overflow: hidden; transition: var(--t);
}
.inp-grp:focus-within {
  border-color: var(--p); box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.inp-grp .ico {
  width: 48px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .85rem; flex-shrink: 0;
  border-right: 1px solid var(--bdr);
}
.inp-grp input, .inp-grp textarea {
  flex: 1; border: none; outline: none; background: transparent;
  color: var(--txt); font-family: var(--ff); font-size: .9rem;
  padding: 0 1rem; height: 52px;
}
.inp-grp input::placeholder { color: var(--muted); }
.inp-grp .show-pwd {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 0 .8rem; font-size: .85rem; transition: var(--t);
}
.inp-grp .show-pwd:hover { color: var(--p); }

/* ===== SUB BOTTOM NAV ===== */
.sub-bot-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nh);
  background: rgba(9,9,15,0.96);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--bdr);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sbn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; text-decoration: none;
  color: var(--muted); font-size: .58rem; font-weight: 600;
  padding: 8px 4px; border-radius: 12px; transition: var(--t);
  position: relative; cursor: pointer; background: none; border: none;
  font-family: var(--ff);
}
.sbn-item i { font-size: 1.18rem; }
.sbn-item.active { color: var(--neon); background: rgba(139,92,246,.12); }
.sbn-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 20px; height: 2px;
  background: var(--p); border-radius: 99px;
}
.sbn-badge {
  position: absolute; top: 5px; right: 50%; margin-right: -18px;
  background: #ec4899; color: #fff; border-radius: 99px;
  min-width: 15px; height: 15px; font-size: .5rem; font-weight: 700;
  display: none; align-items: center; justify-content: center; padding: 0 3px;
}
.sbn-badge.show { display: flex; }

@media (min-width: 768px) { .sub-bot-nav { display: none !important; } }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--srf); border-radius: var(--r);
  border: 1px solid var(--bdr); text-align: center;
  margin: -2.5rem 1rem 1.2rem; box-shadow: var(--shd);
}
.stat-cell { padding: .9rem .3rem; position: relative; }
.stat-cell + .stat-cell::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 1px; background: var(--bdr);
}
.stat-cell .sv { font-family: var(--fh); font-size: 1.15rem; font-weight: 800; color: var(--txt); line-height: 1; }
.stat-cell .sl { font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

/* ===== ALERTS ===== */
.alert { border-radius: var(--rs); padding: .75rem 1rem; font-size: .82rem; display: flex; align-items: flex-start; gap: .5rem; margin-bottom: 1rem; }
.alert-err { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #fca5a5; }
.alert-ok  { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #86efac; }
.alert-info{ background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.25); color: #c4b5fd; }

/* ===== EMPTY STATE ===== */
.empty-st { text-align: center; padding: 2.8rem 1rem; color: var(--muted); }
.empty-st i { font-size: 2.6rem; opacity: .2; display: block; margin-bottom: .6rem; }
.empty-st p, .empty-st h6 { margin: 0; font-size: .88rem; }

/* ===== AVATAR ===== */
.av {
  border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--fh); flex-shrink: 0; overflow: hidden;
}

/* ===== MODALS ===== */
.modal-content { background: var(--srf); color: var(--txt); border: 1px solid var(--bdr); border-radius: var(--r); }
.m-hdr {
  background: var(--grad); color: #fff;
  border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0;
  padding: .92rem 1.15rem;
  display: flex; align-items: center; justify-content: space-between;
}
.form-control, .form-select {
  background: var(--srf2) !important; border: 2px solid var(--bdr) !important;
  color: var(--txt) !important; border-radius: var(--rs) !important;
  font-family: var(--ff); min-height: 48px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--p) !important; box-shadow: none !important;
}
.char-c { font-size: .7rem; color: var(--muted); text-align: right; margin-top: 3px; }
.char-c.warn { color: #f59e0b; }
.char-c.over { color: #ef4444; }

@media (max-width: 480px) {
  .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
  .modal-content { border-radius: 16px; }
  .modal-body { max-height: 80vh; overflow-y: auto; }
}

/* ===== SHARE GRID ===== */
.share-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; margin-top: .5rem; }
.si-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; text-decoration: none; padding: .75rem .4rem;
  border-radius: 13px; transition: var(--t);
  background: var(--srf2); border: 1px solid var(--bdr); color: var(--muted);
}
.si-item:hover { transform: translateY(-2px); box-shadow: var(--shd); }
.sic { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.12rem; color: #fff; }
.si-item span { font-size: .66rem; font-weight: 500; }

/* ===== COMMENT ===== */
.cmt-item { padding: .65rem; border-radius: 11px; background: var(--srf2); margin-bottom: .55rem; }
.cmt-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.cmt-av { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; flex-shrink: 0; }
.cmt-un { font-weight: 700; font-size: .8rem; color: var(--txt); }
.cmt-tm { font-size: .63rem; color: var(--muted); }
.cmt-tx { font-size: .81rem; color: var(--txt); line-height: 1.5; margin-bottom: 3px; }
.rep-btn { background: none; border: none; color: var(--p); font-size: .7rem; cursor: pointer; padding: 0; }

/* ===== NOTIF DROPDOWN ===== */
.notif-dropdown {
  position: fixed; top: 65px; right: 8px;
  width: 300px; max-height: 380px;
  background: var(--srf); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  border: 1px solid var(--bdr); z-index: 2000;
  display: none; overflow: hidden;
  backdrop-filter: blur(20px);
}
.notif-dropdown.open { display: block; animation: fu .18s ease; }
.notif-dd-hd {
  padding: .8rem 1.1rem; font-weight: 700; font-size: .88rem;
  border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center; justify-content: space-between;
}
.notif-dd-body { max-height: 320px; overflow-y: auto; }

@media (max-width: 360px) { .notif-dropdown { width: 260px; right: 4px; } }

/* ===== SONG REQUESTS ===== */
.req-list { max-height: 280px; overflow-y: auto; border-radius: var(--rs); border: 1px solid var(--bdr); margin-bottom: .8rem; }
.req-count-badge { background: rgba(139,92,246,.15); color: var(--p); border-radius: 20px; padding: 3px 10px; font-size: .73rem; font-weight: 600; }

/* ===== UTILITY ===== */
@media (max-width: 767px) { .d-sm-none { display: none !important; } }
@media (min-width: 768px) { .d-md-none { display: none !important; } }

/* MOBILE: Better tap targets across app */
a, button { touch-action: manipulation; }

/* Padding for pages with sub bottom nav */
.has-nav-only { padding-top: 60px; padding-bottom: calc(var(--nh) + 12px + env(safe-area-inset-bottom, 0px)); }
