/* Tingingly: audio-first social. Brand: deep purple + coral (from the logo). Light + dark via tokens. */
:root {
  --bg: #f7f5fb; --surface: #ffffff; --surface-2: #f0ecf8; --line: #e3ddef; --text: #1b1030; --muted: #6d6584;
  --ink: #34106e; --coral: #ff6a5c; --violet: #5b2bc4;
  --brand: var(--coral); --brand-2: var(--violet); --brand-grad: linear-gradient(135deg, #ff6a5c, #6b2fd6);
  --word: var(--ink); --on-brand: #fff; --like: #ff4a6a; --warn: #b7791f; --danger: #d93a4a;
  --shadow: 0 1px 2px rgba(30, 10, 60, .06), 0 6px 24px rgba(30, 10, 60, .07);
  --radius: 18px; --top-h: 56px; --bottom-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100b1a; --surface: #181224; --surface-2: #231b33; --line: #2f2642; --text: #f3effa; --muted: #a39bb8;
    --violet: #a98bff; --word: #f3effa; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #100b1a; --surface: #181224; --surface-2: #231b33; --line: #2f2642; --text: #f3effa; --muted: #a39bb8;
  --violet: #a98bff; --word: #f3effa; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p a, .muted a { color: var(--violet); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 16px 0; }
.err { color: var(--danger); font-size: 14px; margin: 4px 0; }
.err:empty, .warn:empty { display: none; }
.warn { color: var(--warn); font-size: 14px; margin: 6px 0 0; }

/* ---------- brand ---------- */
.mark { display: inline-flex; width: 34px; height: 34px; flex: none; }
.mark svg, .mark img { width: 100%; height: 100%; display: block; }
.mark.big { width: 64px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.word { font-family: "Nunito", system-ui, sans-serif; font-weight: 900; font-size: 25px; letter-spacing: -.01em; color: var(--word); line-height: 1; }
.word i { font-style: normal; color: var(--coral); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 260px minmax(0, 620px) 340px; justify-content: center; gap: 0 24px; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 12px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.side .brand { padding: 4px 12px 10px; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.sitem { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 14px; font-size: 17px; font-weight: 500; position: relative; background: none; border: 0; text-align: left; }
.sitem:hover { background: var(--surface-2); }
.sitem.on { font-weight: 800; }
.sitem.on .ic { color: var(--coral); }
.ic { display: inline-flex; width: 24px; height: 24px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.dot { position: absolute; left: 30px; top: 6px; background: var(--coral); color: #fff; font: 700 11px/16px system-ui; font-style: normal; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; text-align: center; }
.recbig { margin-top: 4px; }
.meline { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; }
.meline:hover { background: var(--surface-2); }
.meline b, .meline small { display: block; }
.meline small { color: var(--muted); }
.joincard { margin-top: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.joincard p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

main { min-width: 0; padding: 0 0 100px; outline: none; }
.right { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel h3 { margin: 0 0 8px; font-size: 18px; }
.panel .more { display: block; color: var(--violet); font-weight: 600; padding-top: 8px; font-size: 14px; }
.trend { display: block; padding: 8px 0; border-top: 1px solid var(--line); }
.trend:first-of-type { border-top: 0; }
.trend b, .trend small { display: block; }
.trend b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot { padding: 0 8px; }
.mtop, .bottomnav { display: none; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 15px; background: var(--surface-2); line-height: 1.1; white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--brand-grad); color: var(--on-brand); box-shadow: 0 4px 14px rgba(255, 106, 92, .25); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; padding: 8px; position: relative; flex: none; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.bordered { border: 1px solid var(--line); }
.iconbtn.light { color: #fff; }
.iconbtn.light:hover { background: rgba(255, 255, 255, .15); }
.iconbtn .dot { left: auto; right: 2px; top: 2px; }
.field, .search { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; }
.field:focus, .search:focus { border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 20%, transparent); }
.field.sm { padding: 8px 10px; font-size: 14px; }
textarea.field { resize: vertical; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form label > .field { color: var(--text); font-weight: 400; font-size: 15px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-weight: 500; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--coral); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.searchbar { position: relative; display: flex; align-items: center; }
.searchbar .ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); }
.searchbar .search { padding-left: 42px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.searchbar .search:focus { background: var(--surface); }

/* ---------- avatars, badges, chips ---------- */
.av { --h: 260; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 40) 68% 46%)); background-size: cover; background-position: center; }
.av.img { background-color: var(--surface-2); }
.av.sm { width: 32px; height: 32px; font-size: 14px; }
.av.lg { width: 64px; height: 64px; font-size: 24px; }
.av.xl { width: 104px; height: 104px; font-size: 40px; border: 4px solid var(--bg); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.cat { color: var(--text); }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip small { color: var(--muted); font-weight: 500; }
.chip.on small { color: inherit; opacity: .7; }

/* ---------- player + sound-wave ripple ---------- */
.player { display: flex; align-items: center; gap: 12px; }
.play { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 11px; flex: none; box-shadow: 0 4px 12px rgba(91, 43, 196, .3); }
.play .pi { display: flex; width: 100%; height: 100%; position: relative; z-index: 1; }
.play svg { width: 100%; height: 100%; }
.play:hover { transform: scale(1.05); }
.play.big { width: 84px; height: 84px; padding: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); background: #fff; color: var(--ink); }
/* waves spread outward when a Voice starts playing */
.ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--coral); pointer-events: none; animation: ripple 1.25s cubic-bezier(.2, .6, .3, 1) forwards; opacity: 0; }
.ripple:nth-of-type(2) { border-color: var(--violet); }
.ripple:nth-of-type(4) { border-color: #3b82f6; }
.play.big .ripple { border-color: rgba(255, 255, 255, .9); border-width: 3px; }
@keyframes ripple { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(2.7); opacity: 0; } }
/* and keep breathing softly while the Voice plays in the Stream */
.play.big.on::before, .play.big.on::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); animation: breathe 2.6s ease-out infinite; }
.play.big.on::after { animation-delay: 1.3s; }
@keyframes breathe { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.9); opacity: 0; } }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 40px; cursor: pointer; min-width: 0; }
.wave i { flex: 1; min-width: 2px; background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 2px; transition: background .15s; }
.wave i.on { background: var(--coral); }
.wave.big { height: 64px; gap: 3px; }
.wave.big i { background: rgba(255, 255, 255, .35); }
.wave.big i.on { background: #fff; }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* ---------- Voice card (list) ---------- */
.page { padding: 8px 0 24px; }
.page.narrow { max-width: 560px; }
.ptitle { font-size: 26px; margin: 18px 0 14px; letter-spacing: -.02em; }
.sect { font-size: 18px; margin: 26px 0 12px; display: flex; align-items: center; gap: 6px; }
.sect .ic { width: 18px; height: 18px; }
.list { display: grid; gap: 12px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 10px; display: grid; gap: 10px; box-shadow: var(--shadow); position: relative; }
.vcard + .vcard { margin-top: 12px; }
.list > .vcard + .vcard { margin-top: 0; }
.vcard.ting { box-shadow: none; }
.vcard .rank { position: absolute; left: -10px; top: -10px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vwho { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vwho b { display: block; }
.vwho b:hover { text-decoration: underline; }
.vwho small { display: block; color: var(--muted); font-size: 13px; }
.vbody { display: flex; gap: 12px; align-items: flex-start; }
.thumb { width: 72px; height: 72px; border-radius: 12px; background-size: cover; background-position: center; flex: none; }
.vtext { display: grid; gap: 6px; min-width: 0; }
.vtitle { font-weight: 700; font-size: 17px; line-height: 1.3; }
.vtitle:hover { text-decoration: underline; }
.vdesc { margin: 0; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.acts { display: flex; align-items: center; gap: 2px; margin: 0 -8px; }
.act { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 9px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; }
.act .ic { width: 20px; height: 20px; }
.act:hover { background: var(--surface-2); color: var(--text); }
.act.on { color: var(--violet); }
.act.on.like { color: var(--like); }
.acts .spacer { flex: 1; }
.plays { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.plays .ic { width: 16px; height: 16px; }
.hero-card { margin-top: 8px; }
.hero-card .vtitle { font-size: 22px; }
.draftbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.back { background: none; border: 0; padding: 14px 0 6px; color: var(--muted); font-weight: 600; display: inline-block; }
.replyto { display: flex; align-items: center; gap: 8px; color: var(--violet); font-weight: 600; margin: 4px 0 8px; }
.replyto .ic { width: 18px; height: 18px; }

/* ---------- Tings ---------- */
.tingbox { margin-top: 18px; }
.tings-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.tings-head h3 { margin: 0; font-size: 18px; }
.tings { display: grid; gap: 10px; padding-left: 14px; border-left: 3px solid color-mix(in srgb, var(--coral) 45%, transparent); }
.tings .vcard + .vcard { margin-top: 0; }

/* ---------- the Stream (one Voice at a time) ---------- */
body.streammode main { padding-bottom: 0; }
.stream { position: relative; height: 100vh; display: flex; flex-direction: column; }
.shead { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 12px 14px 8px; display: grid; gap: 8px;
  background: linear-gradient(to bottom, rgba(16, 6, 34, .72), rgba(16, 6, 34, 0)); pointer-events: none; }
.shead > * { pointer-events: auto; }
.stabs { display: flex; justify-content: center; gap: 4px; }
.stab { border: 0; background: none; color: rgba(255, 255, 255, .7); font-weight: 700; font-size: 16px; padding: 6px 12px; border-radius: 999px; }
.stab.on { color: #fff; background: rgba(255, 255, 255, .16); }
.filters { display: flex; gap: 8px; align-items: center; min-width: 0; }
.filters .chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px 0; }
.filters .chips::-webkit-scrollbar { display: none; }
.langsel { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 10px; font-weight: 600; font-size: 14px; max-width: 160px; flex: none; }
.filters.dark .chip, .filters.dark .langsel { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(10px); }
.filters.dark .langsel option { color: #111; }
.filters.dark .chip.on { background: #fff; color: var(--ink); }
.hero { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .96); color: #1b1030; border-radius: 16px; padding: 10px 10px 10px 14px; box-shadow: var(--shadow); }
.hero > div { flex: 1; min-width: 0; font-size: 13px; }
.hero b { display: block; font-size: 15px; }
.hero .iconbtn { width: 30px; height: 30px; padding: 6px; }
.hero .iconbtn:hover { background: rgba(0, 0, 0, .06); }

.snap { flex: 1; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.snap::-webkit-scrollbar { display: none; }
.snap > * { scroll-snap-align: start; scroll-snap-stop: always; }
.scard { --h: 260; position: relative; height: 100vh; padding: 140px 76px 26px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; color: #fff; overflow: hidden; outline: none;
  background:
    radial-gradient(120% 70% at 20% 10%, hsl(var(--h) 80% 60% / .9), transparent 60%),
    radial-gradient(90% 60% at 90% 80%, hsl(calc(var(--h) + 50) 78% 50% / .85), transparent 60%),
    linear-gradient(160deg, hsl(var(--h) 60% 22%), hsl(calc(var(--h) + 30) 55% 12%)); }
.scard.has-cover { background: linear-gradient(to top, rgba(10, 4, 24, .92), rgba(10, 4, 24, .25) 55%, rgba(10, 4, 24, .55)), var(--cover) center/cover no-repeat, #111; }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s-top .badge { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }
.s-dur { font-weight: 700; font-size: 13px; background: rgba(0, 0, 0, .3); padding: 3px 9px; border-radius: 999px; }
.s-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; min-height: 0; }
.s-title { font-size: clamp(22px, 4.4vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); max-width: 30ch; }
.s-desc { margin: 0; color: rgba(255, 255, 255, .85); max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.s-wave { display: flex; align-items: center; gap: 10px; }
.s-wave .time { color: rgba(255, 255, 255, .85); min-width: 84px; }
.s-foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.s-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s-who b, .s-who small { display: block; }
.s-who small { color: rgba(255, 255, 255, .75); font-size: 13px; }
.s-foot .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.s-foot .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.rail { position: absolute; right: 12px; bottom: 120px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #fff; font-size: 12px; font-weight: 700; }
.rail-btn .ic { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); transition: transform .12s; }
.rail-btn:hover .ic { transform: scale(1.08); background: rgba(255, 255, 255, .26); }
.rail-btn.on .ic { color: var(--like); background: #fff; }
.hint { background: rgba(0, 0, 0, .55); padding: 8px 14px; border-radius: 12px; font-size: 13px; max-width: 80%; text-align: center; pointer-events: none; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.s-end, .snap > .empty { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 140px 24px 24px; }
.snap > .loading { height: 100vh; }

/* ---------- mini player ---------- */
.mini { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(560px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; overflow: hidden; }
body.streammode .mini { display: none !important; }
.mini-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--surface-2); }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--brand-grad); }
.mini-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand-grad); color: #fff; padding: 10px; display: flex; flex: none; }
.mini-play svg { width: 100%; height: 100%; }
.mini-info { flex: 1; min-width: 0; }
.mini-info b, .mini-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-info small { color: var(--muted); font-size: 12px; }

/* ---------- explore ---------- */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cattile { --h: 260; text-align: left; border: 0; border-radius: 16px; padding: 14px; color: #fff; display: grid; gap: 2px; min-height: 96px; align-content: end;
  background: linear-gradient(135deg, hsl(var(--h) 72% 56%), hsl(calc(var(--h) + 40) 68% 38%)); box-shadow: var(--shadow); transition: transform .12s; }
.cattile:hover { transform: translateY(-2px); }
.cattile .ce { font-size: 26px; }
.cattile small { opacity: .85; font-size: 12px; }
.langchips, .pickchips { display: flex; flex-wrap: wrap; gap: 8px; }
.creators { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.ccard { flex: none; width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ccard b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ccard small { font-size: 12px; color: var(--muted); }
.ccard .btn { margin-top: 8px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.book { display: grid; gap: 4px; }
.book small { color: var(--muted); font-size: 12px; }
.bcover { --h: 260; aspect-ratio: 3 / 4; border-radius: 12px; background: linear-gradient(160deg, hsl(var(--h) 60% 45%), hsl(calc(var(--h) + 40) 60% 22%)) center/cover; box-shadow: var(--shadow); display: flex; align-items: flex-end; padding: 10px; color: #fff; font-weight: 800; }
.bookhead { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: end; margin: 10px 0 18px; }
.bookhead h1 { margin: 0 0 4px; font-size: 26px; }
.bookhead p { margin: 6px 0 12px; }
.people { display: grid; gap: 4px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.pinfo { flex: 1; min-width: 0; }
.pinfo b, .pinfo small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo small { font-size: 13px; color: var(--muted); }
.filters-row { margin-top: 10px; }

/* ---------- profile ---------- */
.profile .pbanner { --h: 260; height: 150px; border-radius: 0 0 var(--radius) var(--radius); margin: 0 0 -52px;
  background: radial-gradient(80% 120% at 10% 0%, hsl(var(--h) 80% 60%), transparent 60%), radial-gradient(80% 120% at 100% 100%, hsl(calc(var(--h) + 60) 78% 55%), transparent 60%), hsl(calc(var(--h) + 20) 50% 28%); }
.phead { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; }
.pactions { display: flex; gap: 8px; align-items: center; padding-bottom: 8px; }
.pinfo-main { padding: 10px 16px 0; }
.pinfo-main h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.bio { margin: 10px 0 0; white-space: pre-wrap; }
.stats { display: flex; gap: 18px; margin-top: 12px; color: var(--muted); flex-wrap: wrap; }
.stats b { color: var(--text); }
.ptabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ptab { padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ptab.on { color: var(--text); border-color: var(--coral); }
.avedit { display: flex; align-items: center; gap: 16px; }
.avedit .av.xl { border-color: var(--surface-2); }
.rel { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- notifications ---------- */
.notifs { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notif { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif > span:not(.av):not(.ic) { flex: 1; }
.notif .ic { color: var(--violet); width: 20px; height: 20px; }
.notif.new { background: color-mix(in srgb, var(--coral) 8%, var(--surface)); }

/* ---------- auth ---------- */
.auth { max-width: 380px; margin: 8vh auto 0; padding: 0 16px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-brand .word { font-size: 36px; }
.auth .tag { text-align: center; color: var(--muted); margin: 8px 0 22px; font-size: 16px; }

/* ---------- empty + loading ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 46px; }
.empty h3 { color: var(--text); margin: 8px 0 4px; font-size: 19px; }
.empty p { margin: 0 auto 16px; max-width: 36ch; }
.stream .empty h3, .stream .empty p, .s-end { color: #fff; }
.stream .empty, .s-end { background: linear-gradient(160deg, #34106e, #140a26); }
.s-end .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 40px; }
.loading i { width: 6px; height: 24px; border-radius: 3px; background: var(--brand-grad); animation: eq 1s ease-in-out infinite; }
.loading i:nth-child(2) { animation-delay: .15s; }
.loading i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 50% { transform: scaleY(.35); } }

/* ---------- modal + sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(16, 6, 34, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.mcard { background: var(--surface); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 8px 20px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.mcard.small { width: min(400px, 100%); }
.mcard.tall { min-height: min(640px, calc(100vh - 32px)); }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -8px; background: var(--surface); padding: 8px 0; z-index: 2; }
.mhead h3 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mhead .iconbtn { margin-right: -8px; }
.sheetlist { display: grid; }
.sheetitem { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 14px 4px; font-weight: 600; }
.sheetitem:first-child { border-top: 0; }
.sheetitem:hover { color: var(--violet); }
.sheetitem.danger { color: var(--danger); }
.join { display: grid; gap: 10px; text-align: center; padding-bottom: 6px; }
.join h2 { margin: 6px 0 0; }
.join p { margin: 0 0 8px; }
.join-mark { display: flex; justify-content: center; }

/* ---------- recorder ---------- */
.rec { display: grid; gap: 14px; padding-top: 4px; }
.livewave { display: flex; align-items: center; gap: 3px; height: 90px; padding: 0 6px; background: var(--surface-2); border-radius: 16px; }
.livewave i { flex: 1; height: 6%; background: var(--brand-grad); border-radius: 3px; transition: height .08s; }
.rtime { text-align: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.recrow { display: flex; align-items: center; justify-content: center; gap: 18px; }
.bigmic { width: 86px; height: 86px; border-radius: 50%; border: 0; background: var(--brand-grad); color: #fff; padding: 24px; box-shadow: 0 10px 30px rgba(255, 106, 92, .35); }
.bigmic svg { width: 100%; height: 100%; }
.bigmic.on { animation: ring 1.4s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 92, .55); } 100% { box-shadow: 0 0 0 22px rgba(255, 106, 92, 0); } }
.rec p { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.trim { display: grid; gap: 10px; background: var(--surface-2); border-radius: 16px; padding: 14px; }
.trimwave { position: relative; display: flex; align-items: center; gap: 2px; height: 74px; }
.trimwave i { flex: 1; background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 2px; }
.trimwave i.in { background: var(--coral); }
.playhead { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); left: 0; border-radius: 1px; }
.trimranges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trimranges label { display: grid; gap: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.trimranges input { width: 100%; accent-color: var(--coral); }
.trimbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.triminfo { flex: 1; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 140px; }
.rights { background: color-mix(in srgb, var(--warn) 10%, transparent); padding: 10px; border-radius: 12px; }

/* ---------- sound touches: equalizer, like burst, drifting waves, wave headings ---------- */
.eq { display: none; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--coral); transform-origin: bottom; animation: eqb .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; background: var(--violet); }
.eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.15s; background: #3b82f6; }
@keyframes eqb { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.play.on ~ .eq, .mini.on .eq, .scard:has(.play.on) .s-wave .eq { display: flex; }
.player.big .eq i, .s-wave .eq i { background: #fff; }

.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.burst b { position: absolute; left: -5px; top: -10px; font-size: 14px; color: var(--like); animation: note .95s ease-out forwards; opacity: 0; }
.burst b:nth-child(2) { color: var(--violet); font-size: 16px; }
.burst .ring { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--like); animation: ripple .8s ease-out forwards; opacity: 0; }
@keyframes note { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(var(--dx), -38px) scale(1.1) rotate(12deg); opacity: 0; } }
.rail-btn .burst b { color: #fff; font-size: 18px; }
.rail-btn .burst .ring { border-color: #fff; }

.bgwaves { position: fixed; z-index: -1; left: 0; right: 0; bottom: 0; height: 220px; overflow: hidden; pointer-events: none; opacity: .5; }
.bgwaves svg { width: 200%; height: 100%; animation: drift 38s linear infinite; }
.bgwaves path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.bgwaves .w1 { stroke: color-mix(in srgb, var(--coral) 35%, transparent); }
.bgwaves .w2 { stroke: color-mix(in srgb, var(--violet) 30%, transparent); }
.bgwaves .w3 { stroke: color-mix(in srgb, #3b82f6 22%, transparent); animation: drift 60s linear infinite reverse; }
@keyframes drift { to { transform: translateX(-50%); } }

.sect::after { content: ""; width: 34px; height: 10px; margin-left: 4px; opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 10'%3E%3Cpath d='M1 5q4-6 8 0t8 0 8 0 8 0' fill='none' stroke='%23ff6a5c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain; }
.plays .ic { width: 18px; height: 18px; }

/* ---------- mobile app (installed PWA) ---------- */
html { -webkit-tap-highlight-color: transparent; }
button, .btn, .chip, .rail-btn, .bitem, .sitem { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.installbar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 8px 10px 12px; box-shadow: 0 10px 40px rgba(30, 10, 60, .25); animation: fade .3s; }
.installbar > span:not(.mark) { flex: 1; min-width: 0; }
.installbar b, .installbar small { display: block; }
.installbar small { color: var(--muted); font-size: 12px; }
.installbar .mark { width: 40px; height: 40px; }
.netbar { position: fixed; z-index: 45; top: 0; left: 0; right: 0; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; text-align: center; font-size: 13px; font-weight: 600; background: var(--ink); color: #fff; }
.netbar a { color: var(--coral); text-decoration: underline; }
.steps { text-align: left; margin: 4px auto 6px; padding-left: 22px; display: grid; gap: 8px; max-width: 320px; }
.join .mark.big { margin: 0 auto; }
.offline-note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.offline-note .ic { width: 18px; height: 18px; color: var(--violet); }
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  .mtop { padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); }
}
@media (display-mode: standalone) and (max-width: 640px) {
  body { padding-top: calc(var(--top-h) + env(safe-area-inset-top)); }
  .stream, .scard, .s-end, .snap > .empty, .snap > .loading { height: calc(100dvh - var(--top-h) - env(safe-area-inset-top) - var(--bottom-h) - env(safe-area-inset-bottom)); }
}

/* ---------- review status + moderation ---------- */
.badge.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn.danger { background: var(--danger); color: #fff; }
.reviewnote { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 12%, transparent); }
.reviewnote.rejected, .reviewnote.removed { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.reviewnote .ic { width: 20px; height: 20px; color: var(--warn); }
.reviewnote.rejected .ic, .reviewnote.removed .ic { color: var(--danger); }
.guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.guide summary { cursor: pointer; font-weight: 700; }
.guide ul { margin: 10px 0 2px; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
.qitem { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); transition: opacity .25s, transform .25s; }
.qitem.done { opacity: 0; transform: translateX(30px); }
.qmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.qmeta a { color: var(--violet); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.qactions { margin-top: 0; }
.ptab .count { font-style: normal; margin-left: 6px; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 12px; }
.av.tile { background: none; }
.av.tile .mark { width: 100%; height: 100%; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 240px minmax(0, 620px); }
  .right { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); gap: 0 16px; padding-right: 16px; }
  .side { padding: 16px 8px; align-items: center; }
  .side .brand .word, .sitem span:not(.ic), .meline span:not(.av), .joincard p, .joincard b { display: none; }
  .side .brand { padding: 4px 0 10px; }
  .sitem { padding: 12px; }
  .recbig { width: 52px; height: 52px; padding: 0; font-size: 0; gap: 0; }
  .recbig .ic { width: 24px; height: 24px; }
  .joincard { padding: 8px; border: 0; background: none; }
  .joincard .btn { font-size: 0; padding: 0; width: 44px; height: 44px; }
  .joincard .btn.ghost { display: none; }
  .joincard .btn.primary::before { content: "+"; font-size: 22px; }
}
@media (max-width: 640px) {
  body { padding-top: var(--top-h); }
  .shell { display: block; padding: 0 16px; }
  .side { display: none; }
  .mtop { display: flex; position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--top-h); align-items: center; justify-content: space-between; padding: 0 12px 0 16px;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .mtop .word { font-size: 22px; }
  .mtop .mark { width: 30px; height: 30px; }
  .mtop-r { display: flex; align-items: center; gap: 4px; }
  .bottomnav { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bitem { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; }
  .bitem .ic { width: 24px; height: 24px; }
  .bitem.on { color: var(--text); }
  .bitem.on .ic { color: var(--coral); }
  .bitem.rec-nav .ic { width: 48px; height: 34px; padding: 6px 13px; border-radius: 12px; background: var(--brand-grad); color: #fff; }
  .bitem.rec-nav span:not(.ic) { display: none; }
  main { padding-bottom: calc(var(--bottom-h) + 90px); }
  .mini { bottom: calc(var(--bottom-h) + 10px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--bottom-h) + 80px); }
  body.streammode .shell { padding: 0; }
  body.streammode main { padding: 0; }
  .stream, .scard, .s-end, .snap > .empty, .snap > .loading { height: calc(100dvh - var(--top-h) - var(--bottom-h) - env(safe-area-inset-bottom)); }
  .scard { padding: 128px 70px 18px 16px; gap: 14px; }
  .rail { right: 8px; bottom: 96px; gap: 10px; }
  .rail-btn .ic { width: 42px; height: 42px; padding: 10px; }
  .play.big { width: 72px; height: 72px; padding: 19px; }
  .wave.big { height: 52px; }
  .s-wave .time { min-width: 70px; font-size: 12px; }
  .s-wave .iconbtn { display: none; }
  .shead { padding: 8px 10px; }
  .two { grid-template-columns: 1fr; }
  .bookhead { grid-template-columns: 110px 1fr; gap: 14px; }
  .modal { align-items: flex-end; padding: 0; }
  .mcard { border-radius: 22px 22px 0 0; max-height: 92vh; width: 100%; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .mcard.tall { min-height: 70vh; }
  .profile .pbanner { margin-left: -16px; margin-right: -16px; border-radius: 0; height: 120px; }
  .av.xl { width: 88px; height: 88px; font-size: 34px; }
  .catgrid, .books { grid-template-columns: repeat(2, 1fr); }
  .vcard { padding: 12px 14px 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
