/* PodYap. Late-night radio: warm near-black, coral accent, each friend's color does the rest. */

:root {
  --bg: #121014;
  --bg-2: #1b181e;
  --bg-3: #26222a;
  --bg-glass: rgb(27 24 30 / 0.82);
  --line: #342f39;
  --text: #f4eee6;
  --muted: #a39aa6;
  --faint: #6f6773;
  --accent: #ff6b4a;
  --accent-ink: #1a0c07;
  --accent-soft: rgb(255 107 74 / 0.14);
  --danger: #ff5a6a;
  --ok: #3ec28f;
  --shadow: 0 18px 50px rgb(0 0 0 / 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Gloock', ui-serif, Georgia, 'Times New Roman', serif;
  --col: 720px;
  --mini-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #f7f2ea;
    --bg-2: #fffaf3;
    --bg-3: #efe6d8;
    --bg-glass: rgb(255 250 243 / 0.86);
    --line: #e3d8c8;
    --text: #1d1a1f;
    --muted: #6d6570;
    --faint: #a59ca6;
    --accent: #e8502f;
    --accent-ink: #fff;
    --accent-soft: rgb(232 80 47 / 0.1);
    --shadow: 0 18px 50px rgb(60 40 20 / 0.16);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-bottom: calc(24px + var(--safe-b));
  overflow-x: hidden;
}
body.has-mini { padding-bottom: calc(var(--mini-h) + 32px + var(--safe-b)); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(28px, 6vw, 40px); }
h2 { font-size: 22px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }
input, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-3);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus { border-color: var(--accent); background: var(--bg-2); }
textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.pad { padding: 24px 20px; }
.hint { color: var(--faint); font-size: 14px; margin-top: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.error:empty { display: none; }
.label, .eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { color: var(--accent); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.center-col { max-width: 420px; margin: 0 auto; display: grid; gap: 18px; }
.desc { color: var(--muted); white-space: pre-line; font-size: 15px; }

.icon { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none; }
.icon svg { width: 100%; height: 100%; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  transition: transform 0.12s, filter 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn.small { padding: 7px 13px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.ghost { background: var(--bg-3); color: var(--text); }
.btn .icon { width: 1.1em; height: 1.1em; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.15s, transform 0.12s;
}
.icon-btn:hover { background: var(--bg-3); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .icon { width: 16px; height: 16px; }
.icon-btn.lg { width: 52px; height: 52px; }
.icon-btn.lg .icon { width: 30px; height: 30px; }
.icon-btn.ghost { background: var(--bg-3); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 0;
}
.link:hover { color: var(--text); }
.link .icon { width: 15px; height: 15px; }
.link.danger:hover, .danger { color: var(--danger); }

.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text);
}

/* ---------- top bar ---------- */

#topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(16px, calc(50% - var(--col) / 2 - 4px)) 10px;
  background: linear-gradient(var(--bg) 55%, transparent);
}
#topbar.bare { position: absolute; left: 0; right: 0; background: none; }
#topbar.bare .title, #topbar.bare .wordmark { visibility: hidden; }
#topbar .title {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}
#topbar .me { border-radius: 50%; }
#topbar .back .icon { width: 26px; height: 26px; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 23px; letter-spacing: -0.01em; }
.logo-text b { color: var(--accent); font-weight: 400; font-style: normal; }
.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 26px;
  padding: 0 6px;
  border-radius: 9px 9px 9px 3px;
  background: var(--accent);
}
.logo-mark i { width: 3px; border-radius: 2px; background: var(--accent-ink); }
.logo-mark i:nth-child(1) { height: 8px; }
.logo-mark i:nth-child(2) { height: 14px; }
.logo-mark i:nth-child(3) { height: 10px; }

/* ---------- avatars ---------- */

.avatar {
  --c: var(--accent);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  color: #15110f;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 0 0 2px var(--bg);
}
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; }
.stack { display: flex; }
.stack .avatar + .avatar { margin-left: -8px; }

.art {
  display: block;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-3), var(--line));
  flex: none;
}
.art.broken { content: ''; }
.art.xs { width: 40px; border-radius: 8px; }
.art.sm { width: 48px; border-radius: 9px; }
.art.lg { width: 120px; border-radius: 16px; box-shadow: var(--shadow); }
.art.xl { width: min(220px, 56vw); border-radius: 22px; box-shadow: var(--shadow); }

.dots { display: inline-flex; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg-2); }
.dots i + i { margin-left: -3px; }

.bar { height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar.thin { height: 3px; margin-top: 8px; max-width: 220px; }

/* ---------- layout ---------- */

#view { max-width: calc(var(--col) + 40px); margin: 0 auto; padding: 8px 20px 0; transition: opacity 0.2s; }
#view.loading { opacity: 0.35; pointer-events: none; }
#view.loading:empty::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: 30vh auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
section { margin-top: 34px; }
.section-title { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.section-title span { color: var(--text); }
.section-title .count:not(:empty) { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.empty { text-align: center; padding: 30px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); display: grid; gap: 6px; }
.empty .big { font-family: var(--display); font-size: 26px; }
.empty.pad { border: 0; margin-top: 12vh; gap: 12px; justify-items: center; }

.spinner {
  width: 26px;
  height: 26px;
  margin: 24px auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth ---------- */

.auth {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 70px 0 30px;
  max-width: 460px;
  margin: 0 auto;
}
.auth-hero { display: grid; gap: 16px; }
.auth-logo .logo { font-size: 30px; }
.auth-logo .logo-mark { height: 36px; padding: 0 9px; gap: 3.5px; }
.auth-logo .logo-mark i { width: 4px; }
.auth-logo .logo-mark i:nth-child(1) { height: 11px; }
.auth-logo .logo-mark i:nth-child(2) { height: 20px; }
.auth-logo .logo-mark i:nth-child(3) { height: 14px; }
.auth h1 { font-size: clamp(32px, 8vw, 44px); }
.lede { color: var(--muted); font-size: 17px; }
.auth-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; }
.auth-form label span { font-size: 14px; font-weight: 600; color: var(--muted); }
.auth-form .link { justify-self: center; }

.demo { position: relative; height: 64px; margin-top: 8px; }
.demo-track { position: absolute; left: 0; right: 0; top: 40px; height: 6px; border-radius: 6px; background: var(--bg-3); }
.demo-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); animation: demo-fill 9s linear infinite; }
.demo-pin {
  position: absolute;
  bottom: 12px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 6px;
  border-radius: 9px 9px 9px 3px;
  background: var(--c);
  color: #15110f;
  font-size: 13px;
  font-weight: 800;
  animation: demo-pin 9s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.6s + 0.9s);
}
@keyframes demo-fill { from { width: 0; } to { width: 100%; } }
@keyframes demo-pin {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  3% { transform: translateX(-50%) translateY(-8px) scale(1.18); }
  8% { transform: translateX(-50%) translateY(0) scale(1); }
}

@media (min-width: 900px) {
  #view:has(> .auth) { max-width: 1060px; }
  .auth { max-width: 1000px; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 64px; }
  .auth-card { padding: 28px; }
}

.invite-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; }
.invite-card h2 { font-size: 30px; }

/* ---------- home ---------- */

.hello { padding-top: 12px; display: grid; gap: 8px; }
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.resume { flex: none; width: 168px; display: grid; gap: 8px; scroll-snap-align: start; }
.resume .art { width: 100%; border-radius: 14px; }
.resume-text { display: grid; gap: 1px; }
.resume-text b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-text small { color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.resume small.muted { font-size: 12px; }

.groups { display: grid; gap: 10px; }
.group-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color 0.15s, transform 0.12s;
}
.group-card:hover { border-color: var(--faint); }
.group-card:active { transform: scale(0.99); }
.group-card b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.group-card small { font-size: 13px; }
.group-card .dots { margin-bottom: 4px; }
.group-card .dots i { width: 14px; height: 14px; }
.new-group { margin-top: 18px; display: grid; gap: 8px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }

/* ---------- group ---------- */

.group-head { display: grid; gap: 14px; padding-top: 8px; }
.member-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 10px; align-items: center; }

.live-strip { display: grid; gap: 8px; margin-top: 16px; }
.live-strip:empty { display: none; }
.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  font-size: 14px;
  white-space: nowrap;
  min-width: 0;
}
.live-pill small { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); padding-left: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 18px 14px; }
.shelf-item { display: grid; gap: 6px; align-content: start; min-width: 0; }
.shelf-item .art { width: 100%; border-radius: 14px; transition: transform 0.15s; }
.shelf-item:hover .art { transform: translateY(-2px); }
.shelf-item b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-item small { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shelf-add { display: grid; gap: 6px; align-content: start; text-align: left; }
.shelf-add > span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1.5px dashed var(--line);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.shelf-add > span .icon { width: 30px; height: 30px; }
.shelf-add:hover > span { border-color: var(--accent); color: var(--accent); }
.shelf-add b { font-size: 14px; color: var(--muted); }

.feed { display: grid; gap: 4px; }
.activity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  margin: 0 -12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.activity:hover { background: var(--bg-2); }
.activity-main { display: grid; gap: 4px; min-width: 0; }
.activity-top { display: flex; gap: 8px; align-items: baseline; }
.activity-top small { font-size: 12px; }
.activity-body { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.activity-body.emoji { font-size: 26px; line-height: 1.1; }
.activity-body.voice { display: flex; align-items: center; gap: 4px; color: var(--c); font-weight: 600; }
.activity-body.voice .icon { width: 16px; height: 16px; }
.activity-where { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; min-width: 0; }

/* ---------- sheets ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgb(0 0 0 / 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.25s;
}
.scrim.open { background: rgb(0 0 0 / 0.5); }
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-2);
  border-radius: 24px 24px 0 0;
  padding: 8px 0 calc(20px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: var(--shadow);
}
.sheet.tall { height: 88dvh; }
.scrim.open .sheet { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 10px; }
.sheet-body { padding: 4px 20px 0; display: grid; gap: 14px; }
.sheet-body h2 { margin-bottom: 2px; }
@media (min-width: 760px) {
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; transform: translateY(30px) scale(0.98); opacity: 0; transition: transform 0.25s, opacity 0.2s; padding-bottom: 22px; }
  .scrim.open .sheet { opacity: 1; }
  .sheet.tall { height: min(720px, 88dvh); }
  .grabber { visibility: hidden; }
}

.menu-item { display: flex; align-items: center; gap: 10px; padding: 14px 4px; font-weight: 600; border-top: 1px solid var(--line); text-align: left; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; }

.search { position: relative; }
.search > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; }
.results { display: grid; gap: 2px; }
.result { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.result-text { display: grid; min-width: 0; }
.result-text b, .result-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* settings */
.me-head { display: flex; gap: 14px; align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #15110f; display: grid; place-items: center; transition: transform 0.12s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--c); }
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.voice-opt { display: flex; align-items: center; border-radius: var(--radius-sm); background: var(--bg-3); border: 1.5px solid transparent; padding-right: 6px; }
.voice-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.voice-pick { flex: 1; display: grid; text-align: left; padding: 10px 12px; }
.voice-pick small { font-size: 12px; }
.settings .label { margin-top: 6px; }
.toggle, .radio { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 15px; }
.toggle input, .radio input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.mode-list { display: grid; gap: 10px; }

/* ---------- podcast page ---------- */

.pod-head { display: flex; gap: 18px; align-items: center; padding-top: 8px; margin-bottom: 16px; }
.pod-head h1 { font-size: clamp(24px, 5vw, 32px); }
.episodes { display: grid; margin-bottom: 18px; }
.episode-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.episode-row:hover b { color: var(--accent); }
.ep-main { display: grid; gap: 3px; min-width: 0; }
.ep-main small { font-size: 12px; }
.ep-main b { font-size: 17px; line-height: 1.3; transition: color 0.15s; }
.ep-main p { font-size: 14px; }
.ep-side { display: grid; align-content: start; justify-items: end; gap: 6px; }
.note-count { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 4px 9px 4px 6px; border-radius: 999px; background: var(--bg-3); }

/* ---------- episode page ---------- */

.episode { position: relative; }
.ep-backdrop {
  position: absolute;
  z-index: -1;
  top: -80px;
  left: 50%;
  width: 100vw;
  height: 520px;
  transform: translateX(-50%);
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.3);
  opacity: 0.32;
  mask-image: linear-gradient(black, transparent);
  -webkit-mask-image: linear-gradient(black, transparent);
  pointer-events: none;
}
.ep-head { display: grid; justify-items: center; text-align: center; gap: 18px; padding-top: 6px; }
.ep-titles { display: grid; gap: 6px; justify-items: center; }
.ep-titles h1 { font-size: clamp(22px, 5vw, 30px); max-width: 30ch; }

.controls-wrap { margin-top: 26px; }
.timeline { position: relative; height: 70px; touch-action: none; }
.tl-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 26px;
  cursor: pointer;
  outline-offset: 4px;
}
.tl-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 6px;
  border-radius: 6px;
  background: var(--bg-3);
}
.tl-fill { position: absolute; left: 0; top: 10px; height: 6px; border-radius: 6px; background: var(--accent); }
.tl-head {
  position: absolute;
  top: 5px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
  transition: transform 0.12s;
}
.tl-track:active .tl-head { transform: scale(1.3); }
.tl-pins { position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none; }
.pin {
  position: absolute;
  bottom: 2px;
  transform: translateX(-50%);
  pointer-events: auto;
  width: 12px;
  height: 16px;
  border-radius: 6px 6px 6px 2px;
  background: var(--c);
  transition: transform 0.15s;
  box-shadow: 0 0 0 2px var(--bg);
}
.pin:hover { transform: translateX(-50%) scale(1.3); z-index: 2; }
.pin.react { width: auto; height: auto; background: none; box-shadow: none; font-size: 13px; line-height: 1; bottom: 4px; }
.pin.voice::after { content: ''; position: absolute; inset: 5px 4px; border-radius: 2px; background: rgb(0 0 0 / 0.35); }
.tl-friends { position: absolute; left: 0; right: 0; top: 50px; height: 20px; }
.friend {
  position: absolute;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #15110f;
  background: var(--c);
  box-shadow: 0 0 0 2px var(--bg);
  transition: left 1s linear;
}
.friend::before { content: ''; position: absolute; top: -8px; left: 50%; width: 2px; height: 7px; margin-left: -1px; background: var(--c); border-radius: 2px; }
.friend.live { animation: pulse 1.6s ease-out infinite; }
.tl-bubble {
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -4px; }

.controls { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 14px; margin: 12px 0 8px; justify-items: center; }
.rate { justify-self: start; font-weight: 800; font-size: 14px; padding: 8px 12px; border-radius: 999px; background: var(--bg-3); min-width: 52px; font-variant-numeric: tabular-nums; }
.play-big {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  transition: transform 0.12s, background 0.2s;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
}
.play-big .icon { width: 32px; height: 32px; }
.play-big:not(.on) .icon { transform: translateX(2px); }
.play-big:active { transform: scale(0.94); }

.mode-wrap { display: grid; justify-items: center; gap: 8px; margin: 18px 0 20px; }
.modes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-3);
  width: min(100%, 360px);
}
.modes button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.modes button .icon { width: 16px; height: 16px; }
.modes button[aria-checked='true'] { color: var(--accent-ink); }
.modes-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.28s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.modes[data-mode='chime'] .modes-thumb { transform: translateX(100%); }
.modes[data-mode='inline'] .modes-thumb { transform: translateX(200%); }
.mode-help { font-size: 13px; color: var(--muted); text-align: center; min-height: 1.4em; }

.say { display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); }
.note-btn { padding: 15px 18px; font-size: 17px; }
.note-btn .icon { width: 20px; height: 20px; }
.reactions { display: flex; justify-content: space-between; gap: 2px; }
.react {
  flex: 1;
  font-size: 24px;
  line-height: 1;
  padding: 8px 0;
  border-radius: 12px;
  transition: background 0.15s, transform 0.1s;
}
.react:hover { background: var(--bg-3); }
.react:active { transform: scale(0.85); }
.react.burst { animation: burst 0.5s ease-out; }
@keyframes burst {
  0% { transform: scale(1); }
  30% { transform: scale(1.45) rotate(-8deg); }
  100% { transform: scale(1); }
}

.preview-box { display: grid; gap: 12px; margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); text-align: center; }

/* notes list */

.notes { display: grid; gap: 10px; }
.note {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.note::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--c);
}
.note.speaking { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.note .time { align-self: start; margin-top: 2px; }
.note-main { display: grid; gap: 8px; min-width: 0; }
.note-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.note-top b { font-size: 15px; }
.note-top small { font-size: 12px; }
.note-text { font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.replies { display: grid; gap: 10px; padding-left: 12px; border-left: 2px solid var(--line); }
.reply { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.reply .note-text { font-size: 15px; }

.note-content { display: grid; gap: 8px; transition: filter 0.25s, opacity 0.25s; }
.peek, .spoiler-hint { display: none; }
.note.ahead .note-content { filter: blur(7px); opacity: 0.6; pointer-events: none; user-select: none; max-height: 64px; overflow: hidden; }
.note.ahead .peek {
  display: inline-block;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--muted);
}
.note.ahead .peek:hover { color: var(--text); }
.note.ahead .spoiler-hint { display: block; font-size: 12px; color: var(--faint); margin-top: -34px; position: relative; text-align: center; }

.voice-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 18%, var(--bg-3));
  color: var(--text);
}
.voice-chip .icon { width: 16px; height: 16px; color: var(--c); }
.voice-chip small { font-weight: 700; font-variant-numeric: tabular-nums; }

.wave { display: inline-flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
.wave i { width: 3px; height: var(--h); border-radius: 2px; background: var(--c, var(--accent)); opacity: 0.85; }
.wave.tiny { height: 18px; flex: none; }
.wave.tiny i { width: 2px; }
.wave.live i { animation: bounce 0.9s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes bounce { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }

.react-row { display: flex; align-items: center; gap: 12px; padding: 2px 0 2px 2px; }
.react-bubbles { display: flex; flex-wrap: wrap; gap: 6px; }
.react-bubble {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 18px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 16%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
}
.react-bubble button { font-size: 14px; color: var(--muted); padding: 0 2px; }

/* ---------- composer ---------- */

.compose-head { display: flex; align-items: center; gap: 6px; font-weight: 600; justify-content: center; }
.compose-head .when { font-family: var(--display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--bg-3); }
.tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected='true'] { background: var(--bg-2); color: var(--text); box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); }
.tabs .icon { width: 17px; height: 17px; }
.compose-body { min-height: 230px; }
.pane { display: grid; gap: 12px; }
.voice-pane { justify-items: center; align-content: center; min-height: 230px; text-align: center; }
.rec-btn {
  --level: 0;
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.12s;
}
.rec-btn:active { transform: scale(0.95); }
.rec-btn .icon { position: relative; width: 40px; height: 40px; }
.rec-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.25;
  transform: scale(calc(1 + var(--level) * 0.6));
  transition: transform 0.08s;
}
.rec-btn.recording { background: var(--danger); }
.rec-btn.recording .rec-ring { background: var(--danger); }
.rec-timer { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; }
.review { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-3); }
.review small { font-variant-numeric: tabular-nums; font-weight: 700; }
.voice-pane .row-between { width: 100%; }
.voice-pane .row-between .btn { flex: 1; }

/* ---------- mini player ---------- */

#mini {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 560px);
  height: var(--mini-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
#mini[hidden] { display: none; }
.mini-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.mini-progress i { display: block; height: 100%; background: var(--accent); }
.mini-main { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-text { display: grid; min-width: 0; }
.mini-text b, .mini-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text b { font-size: 14px; }
.mini-text small { font-size: 12px; color: var(--muted); }
#mini .play .icon { width: 24px; height: 24px; }

/* ---------- note card ---------- */

#notecard {
  --c: var(--accent);
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  width: min(calc(100% - 24px), 520px);
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: var(--shadow), 0 0 40px color-mix(in srgb, var(--c) 20%, transparent);
  transform: translate(-50%, 140%);
  transition: transform 0.35s cubic-bezier(0.2, 1.2, 0.4, 1);
}
body.has-mini #notecard { bottom: calc(var(--mini-h) + 22px + var(--safe-b)); }
#notecard.show { transform: translate(-50%, 0); }
#notecard[hidden] { display: none; }
.nc-head { display: flex; align-items: center; gap: 10px; }
.nc-who { flex: 1; display: grid; min-width: 0; }
.nc-who small { color: var(--muted); font-size: 12px; }
.nc-body { font-size: 17px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nc-wave .wave { width: 100%; height: 30px; }
.nc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- reaction floats ---------- */

#floats { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.float {
  position: absolute;
  left: var(--x);
  bottom: 18%;
  display: grid;
  justify-items: center;
  font-size: 44px;
  animation: float-up 3s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
  opacity: 0;
}
.float small { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg-glass); }
@keyframes float-up {
  0% { transform: translateY(40px) scale(0.4); opacity: 0; }
  12% { transform: translateY(0) scale(1.15); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(-46vh) scale(0.9) rotate(-8deg); opacity: 0; }
}

/* ---------- toast ---------- */

#toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translate(-50%, -150%);
  max-width: min(calc(100% - 32px), 460px);
  padding: 11px 18px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.2, 1.2, 0.4, 1);
}
#toast.show { transform: translate(-50%, 0); }
#toast.error { background: var(--danger); color: #fff; }

@media (min-width: 760px) {
  .ep-head { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: end; }
  .ep-titles { justify-items: start; }
  .art.xl { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.podcast > .row-between { margin: 26px 0 4px; }
.podcast > .row-between .section-title { margin: 0; }
