/* Pods: dark, artwork-led, mint accent (Snipd-style). */
:root {
  --bg: #121318; --panel: #1d1f27; --panel2: #262935; --panel3: #30333f; --text: #f3f4f8; --muted: #8e91a3; --line: #2a2d38;
  --accent: #2fe0a2; --accent-btn: #12c48b; --accent-soft: rgba(47, 224, 162, .14); --danger: #ff6b6b; --star: #ffc65c;
  --radius: 18px; --side: 240px; --tabs: 64px; --mini: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { padding-top: var(--safe-t); }
a { color: var(--accent); cursor: pointer; text-decoration: none; }
h1 { font-size: 34px; line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -0.025em; }
h1 .n { color: var(--muted); font-weight: 700; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; margin: 30px 0 12px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.err { color: var(--danger); }
.center { text-align: center; }
.pad { padding: 16px 18px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ico { flex-shrink: 0; display: block; }
input, textarea, select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid transparent; border-radius: 14px; padding: 12px 14px; width: 100%; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
::placeholder { color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; }

/* layout */
#root { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
#main { padding: 18px 20px calc(var(--tabs) + var(--safe-b) + 28px); max-width: 880px; width: 100%; margin: 0 auto; min-width: 0; }
body.has-player #main { padding-bottom: calc(var(--tabs) + var(--mini) + var(--safe-b) + 36px); }
#side { display: none; }
#tabs { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--tabs) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: rgba(18, 19, 24, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 30; }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 3px; font-size: 12px; font-weight: 600; }
#tabs a.on { color: var(--accent); }
body.is-login #tabs, body.is-login #side, body.is-login .mini { display: none !important; }
@media (min-width: 900px) {
  #root { grid-template-columns: var(--side) 1fr; }
  #tabs { display: none; }
  #side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: #0d0e12; }
  #side a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 15px; }
  #side a:hover { background: var(--panel); color: var(--text); }
  #side a.on { background: var(--panel); color: var(--accent); }
  #side hr { border: 0; border-top: 1px solid var(--line); margin: 12px 6px; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; padding: 2px 12px 20px; letter-spacing: -0.02em; }
  .brand img { width: 32px; height: 32px; border-radius: 9px; }
  #main { padding: 34px 40px 40px; }
  body.has-player #main { padding-bottom: calc(var(--mini) + 48px); }
  body.is-login #root { grid-template-columns: 1fr; }
}

/* page chrome */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 18px; }
.page-head .act { color: var(--text); font-weight: 600; font-size: 17px; background: none; border: 0; }
.sub-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin: 0 -6px 16px; }
.sub-head h1 { font-size: 24px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: none; border: 0; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); flex-shrink: 0; }
.icon-btn:hover { background: var(--panel); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.fav { color: var(--star); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--panel2); color: var(--text); font-weight: 650; font-size: 15px; white-space: nowrap; }
.btn:hover { background: var(--panel3); }
.btn.primary { background: var(--accent-btn); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.white { background: #fff; color: #111; }
.btn.ghost { background: none; color: var(--accent); padding-left: 0; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.on { background: var(--accent-soft); color: var(--accent); }
.btn:disabled { opacity: .5; }
.card { background: var(--panel); border-radius: var(--radius); margin: 14px 0; }
.searchbar { display: flex; align-items: center; gap: 12px; background: var(--panel2); border-radius: 14px; padding: 0 16px; color: var(--muted); margin: 4px 0 14px; }
.searchbar input { background: none; border: 0; padding: 14px 0; font-size: 17px; }
.searchbar input:focus { border: 0; }
.pills { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 4px -20px 16px; padding: 0 20px; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; border: 0; background: var(--panel2); color: var(--text); border-radius: 14px; padding: 11px 18px; font-size: 16px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.pill.on { background: #fff; color: #111; font-weight: 600; }
.pill.sm { padding: 7px 13px; font-size: 14px; border-radius: 11px; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--panel2); color: var(--text); border-radius: 7px; padding: 2px 7px; font-size: 13px; font-weight: 600; }
.tag.ai { color: #d7dbea; }
.tag.busy { color: var(--accent); }
.tag.err { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty .btn { margin-top: 14px; }
.h-scroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
.h-scroll::-webkit-scrollbar { display: none; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.see-all { display: flex; justify-content: space-between; align-items: baseline; }
.see-all a { color: var(--text); font-weight: 500; font-size: 17px; }

/* home */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.tile { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 0; border-radius: 16px; padding: 18px; color: var(--text); font-size: 18px; font-weight: 650; text-align: left; position: relative; }
.tile .ico { color: #c9ccd8; }
.tile:hover { background: var(--panel2); }
.qbadge { position: relative; display: inline-flex; }
.qbadge b { position: absolute; right: -9px; top: -7px; background: #fff; color: #111; font-size: 11px; font-weight: 800; border-radius: 5px; padding: 0 4px; line-height: 16px; min-width: 16px; text-align: center; }
.cover-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 18px; padding: 0 20px; }
.cover-row::-webkit-scrollbar { display: none; }
.cover-row img { width: 108px; height: 108px; border-radius: 14px; object-fit: cover; flex-shrink: 0; cursor: pointer; background: var(--panel); }
.dj-card { position: relative; border-radius: 24px; padding: 20px; display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: center; background: linear-gradient(135deg, #1f7a72, #154b52 55%, #18343d); margin-bottom: 18px; overflow: hidden; }
.dj-card .stack-covers { position: relative; width: 108px; height: 108px; }
.dj-card .stack-covers img { position: absolute; width: 100px; height: 100px; border-radius: 16px; object-fit: cover; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.dj-card .stack-covers img:first-child { left: 8px; top: -6px; opacity: .55; }
.dj-card .eyebrow { font-size: 14px; font-weight: 800; letter-spacing: .06em; color: rgba(255, 255, 255, .6); text-transform: uppercase; }
.dj-card .title { font-size: 19px; font-weight: 650; line-height: 1.3; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dj-card .title span { color: rgba(255, 255, 255, .6); }
.dj-card .btn { grid-column: 1 / -1; justify-self: start; padding: 12px 24px; font-size: 18px; }
.chat-card { display: flex; align-items: center; gap: 14px; background: var(--panel); border-radius: 16px; padding: 16px 18px; color: var(--text); margin-bottom: 18px; }
.chat-card b { display: block; font-size: 16px; }
.chat-card span { color: var(--muted); font-size: 14px; }
.chat-card .bubble { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }

/* episode rows (big artwork, Snipd-style) */
.ep-row { display: flex; gap: 16px; padding: 12px 0; align-items: center; }
.ep-cover { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--panel); cursor: pointer; }
.ep-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; cursor: pointer; }
.ep-kicker { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ep-kicker .hot { color: var(--accent); }
.ep-title { font-size: 17.5px; font-weight: 650; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-row.played .ep-title { color: var(--muted); }
.ep-meta { font-size: 14.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ep-prog { height: 3px; background: var(--panel3); border-radius: 2px; overflow: hidden; width: 70%; }
.ep-prog i { display: block; height: 100%; background: var(--accent); }
.ep-actions { display: flex; flex-direction: column; align-items: center; }
.ep-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel2); color: var(--text); display: grid; place-items: center; }
@media (max-width: 420px) { .ep-cover { width: 84px; height: 84px; } .ep-title { font-size: 16.5px; } .ep-row { gap: 14px; } }

/* podcasts grid: edge to edge, artwork only */
.pod-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 -20px; }
@media (min-width: 900px) { .pod-grid { grid-template-columns: repeat(6, 1fr); margin: 0; border-radius: 16px; overflow: hidden; } }
.pod-grid a { position: relative; aspect-ratio: 1; display: block; }
.pod-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-grid .count { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.show-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin: 0 0 8px; }
.show-hero h1 { font-size: 26px; }
.hero-cover { width: 200px; height: 200px; border-radius: 22px; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.hero-cover.small { width: 64px; height: 64px; border-radius: 12px; box-shadow: none; }
.show-desc { color: var(--muted); font-size: 15px; }
.show-desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.show-notes { font-size: 15px; overflow-wrap: anywhere; color: #d6d8e2; }
.book-chip { min-width: 170px; max-width: 210px; background: var(--panel); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.book-chip small { color: var(--muted); }
.count { color: var(--accent); font-weight: 800; font-size: 13px; }

/* episode page */
.ep-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.ep-hero .hero-cover { width: 220px; height: 220px; }
.ep-h1 { font-size: 24px; line-height: 1.25; }
.ep-hero .show-link { color: var(--muted); font-weight: 600; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0 4px; }
.tabs-pills { position: sticky; top: var(--safe-t); z-index: 5; background: var(--bg); padding-top: 8px; padding-bottom: 8px; margin-bottom: 4px; }
.ai-box { display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; padding: 18px; }
.ai-box .state { display: flex; gap: 10px; justify-content: center; align-items: center; color: var(--muted); }
.chap-row { display: flex; gap: 16px; padding: 14px 18px; cursor: pointer; }
.chap-row + .chap-row { border-top: 1px solid var(--line); }
.chap-row:hover { background: var(--panel2); }
.chap-t { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 650; min-width: 54px; }
a.seek { font-variant-numeric: tabular-nums; font-weight: 650; }
.book, .guest { padding: 10px 0; }
.book + .book, .guest + .guest { border-top: 1px solid var(--line); }
.mention { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-size: 14px; }
.tiny-cover { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip-row span { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; }

/* transcript */
.tr-tools { display: flex; gap: 10px; align-items: center; }
.tr-tools .searchbar { flex: 1; margin: 0; }
.transcript { font-size: 17px; line-height: 1.75; }
.tr-block { margin: 18px 0; }
.tr-head { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.tr-head b { color: var(--accent); }
.tr-block p { margin: 2px 0; color: #dfe1ea; }
.tseg { cursor: pointer; border-radius: 4px; }
.tseg:hover { background: var(--panel2); }
.tseg.now { background: var(--accent-soft); color: #fff; }
.tseg.snipped { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tseg.hit { background: #ffd66b; color: #111; }
.sel-snip { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs) + var(--mini) + var(--safe-b) + 22px); z-index: 40; background: #fff; color: #111; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { .sel-snip { bottom: calc(var(--mini) + 28px); } }

/* snips */
.snip-card { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.snip-card.pending { opacity: .8; }
.snip-src { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; margin-bottom: 10px; }
.snip-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snip-head { display: flex; gap: 10px; align-items: flex-start; }
.snip-title { flex: 1; font-weight: 700; font-size: 17px; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.snip-title small { font-weight: 500; color: var(--muted); font-size: 13px; }
.snip-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: #111; display: grid; place-items: center; flex-shrink: 0; }
.md { color: #dfe1ea; }
.md ul { padding-left: 20px; margin: 8px 0; }
.md li { margin: 4px 0; }
.md p { margin: 8px 0; }
.quote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent); font-size: 16px; font-style: italic; color: #eceef5; }
.quote cite { color: var(--muted); font-style: normal; font-size: 13.5px; }
.snip-tr summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.snip-tr p { font-size: 14.5px; color: var(--muted); }
.note { margin-top: 10px; font-size: 15px; background: var(--panel2); }
.adj { display: flex; flex-direction: column; gap: 10px; }
.adj-label { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-preview { width: 100%; border-radius: 14px; }
.recap { display: flex; justify-content: space-between; align-items: center; background: var(--panel); border-radius: 22px; padding: 22px; margin-bottom: 8px; cursor: pointer; }
.recap b { font-size: 24px; font-weight: 800; display: block; }
.recap span { color: #c9ccd8; font-size: 17px; }
.recap img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; transform: rotate(4deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.msg { padding: 12px 16px; border-radius: 18px; max-width: 92%; }
.msg.user { align-self: flex-end; background: var(--accent-btn); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--panel); border-bottom-left-radius: 6px; }
.msg ul { padding-left: 18px; margin: 4px 0; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: calc(var(--tabs) + var(--safe-b) + 8px); background: var(--bg); padding: 8px 0; }
body.has-player .chat-input { bottom: calc(var(--tabs) + var(--mini) + var(--safe-b) + 14px); }
@media (min-width: 900px) { .chat-input, body.has-player .chat-input { bottom: calc(var(--mini) + 16px); } }

/* You page: profile, stats, grouped rows */
.profile { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-btn), #2b7fff); display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; }
.profile b { font-size: 24px; font-weight: 800; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border-radius: 18px; padding: 16px 18px; min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; }
.stat small { color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.stat b { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat b.mint { color: var(--accent); }
.stat b span { font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin: 0 6px 0 4px; }
.stat .covers { display: flex; gap: 8px; }
.stat .covers img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.group { background: var(--panel); border-radius: 20px; padding: 6px 0; margin-bottom: 18px; }
.group-title { color: var(--muted); font-size: 17px; margin: 22px 0 8px 4px; }
.lrow { display: flex; align-items: center; gap: 18px; padding: 15px 20px; width: 100%; background: none; border: 0; color: var(--text); text-align: left; font-size: 18px; }
.lrow:hover { background: var(--panel2); }
.lrow .ico { color: #e4e6ee; }
.lrow .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lrow .txt small { color: var(--muted); font-size: 15px; }
.lrow.danger, .lrow.danger .ico { color: var(--danger); }
.lrow .chev { color: var(--muted); }
.settings .field, .settings .toggle { padding: 4px 0; }
.toggle { display: flex; gap: 14px; align-items: center; justify-content: space-between; cursor: pointer; }
.toggle span, .field { display: flex; flex-direction: column; gap: 3px; }
.toggle small, .field small { color: var(--muted); font-size: 13.5px; font-weight: 400; }
.toggle input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--panel3); position: relative; flex-shrink: 0; padding: 0; border: 0; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked { background: var(--accent-btn); }
.toggle input:checked::after { transform: translateX(20px); }
.settings .card { display: flex; flex-direction: column; gap: 14px; }

/* login */
.login { max-width: 340px; margin: 14vh auto 0; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login h1 { font-size: 32px; }
.login-logo { width: 84px; height: 84px; margin: 0 auto; border-radius: 22px; }

/* mini player: tinted from the artwork */
.mini { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tabs) + var(--safe-b) + 4px); height: var(--mini); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 10px; border-radius: 16px; background: var(--mini-bg, var(--panel2)); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); z-index: 31; cursor: pointer; overflow: hidden; transition: background .4s; }
@media (min-width: 900px) { .mini { left: calc(var(--side) + 20px); right: 20px; bottom: 14px; max-width: 900px; margin: 0 auto; } }
.mini-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); }
.mini-bar i { display: block; height: 100%; background: #fff; }
.mini-art { position: relative; width: 52px; height: 52px; flex-shrink: 0; border: 0; padding: 0; background: none; }
.mini-art img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; display: block; }
.mini-art .ov { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .28); border-radius: 9px; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-text b { font-size: 16.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text span { font-size: 15px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .icon-btn:hover { background: rgba(255, 255, 255, .1); }

/* full player */
.full { position: fixed; inset: 0; z-index: 50; background: linear-gradient(180deg, var(--full-top, #2a2d38) 0%, var(--full-mid, #1b1d24) 48%, var(--bg) 100%); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 10px) 22px calc(var(--safe-b) + 18px); overflow-y: auto; }
.full.open { transform: none; }
.full-head { display: flex; align-items: center; gap: 4px; }
.full-head .spacer { flex: 1; }
.full-head .close { background: rgba(0, 0, 0, .28); }
.full-body { max-width: 480px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.full-cover { width: min(78vw, 340px, 38vh); aspect-ratio: 1; border-radius: 22px; object-fit: cover; box-shadow: 0 22px 50px rgba(0, 0, 0, .45); margin: 12px auto 18px; display: block; }
.full-meta { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.full-meta > div { flex: 1; min-width: 0; }
.full-title { font-weight: 600; font-size: 21px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-show { color: rgba(255, 255, 255, .65); font-size: 18px; }
.full-meta .chev { color: rgba(255, 255, 255, .7); }
.ai-card { background: rgba(255, 255, 255, .08); border-radius: 18px; padding: 14px; text-align: center; margin: 10px 0 6px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.ai-card .lbl { color: rgba(255, 255, 255, .7); font-size: 16px; }
.ai-card .chap { color: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ai-card .line { font-size: 15.5px; line-height: 1.45; color: #f0f1f6; min-height: 44px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.run-ai { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; background: var(--accent-btn); color: #fff; font-size: 19px; font-weight: 700; padding: 15px; border-radius: 14px; }
.ai-card .state { display: flex; gap: 10px; align-items: center; justify-content: center; color: #fff; font-weight: 600; padding: 10px 0; }
.scrub-wrap { position: relative; width: 100%; height: 26px; margin-top: 8px; }
.marks { position: absolute; left: 0; right: 0; top: 50%; height: 0; pointer-events: none; z-index: 2; }
.marks .tick { position: absolute; top: -4px; width: 2px; height: 8px; background: rgba(0, 0, 0, .55); }
.marks .snipmark { position: absolute; top: -2px; height: 4px; background: var(--star); border-radius: 2px; }
.scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; padding: 0; margin: 0; border: 0; background: transparent; position: relative; z-index: 1; cursor: pointer; }
.scrub::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255, 255, 255, .2) var(--p, 0%)); }
.scrub::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p, 0%), rgba(255, 255, 255, .2) var(--p, 0%)); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.times { width: 100%; display: flex; justify-content: space-between; font-size: 15px; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.controls { display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center; justify-items: center; width: 100%; margin: 14px 0 4px; }
.speed { background: none; border: 0; color: #fff; font-size: 20px; font-weight: 700; }
.ctl { background: none; border: 0; color: #fff; padding: 6px; display: grid; place-items: center; }
.ctl:active { transform: scale(.92); }
.big-play { width: 78px; height: 78px; border-radius: 50%; border: 0; background: #fff; color: #111; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.big-play:active { transform: scale(.96); }
.create-snip { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 22px auto 10px; background: #fff; color: #111; border: 0; border-radius: 999px; padding: 16px 34px 16px 18px; font-size: 21px; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.create-snip .logo { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #5b6cff, #2b2f7a); color: #fff; display: grid; place-items: center; }
.create-snip:active { transform: scale(.97); }
.extras { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.extras button { border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.extras button.on { background: #fff; color: #111; }

/* sheets, modals, toasts */
.sheet-wrap, .modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.open { opacity: 1; }
.modal-wrap { opacity: 1; align-items: center; padding: 16px; }
.sheet { width: 100%; max-width: 500px; max-height: 82vh; overflow-y: auto; background: var(--panel); border-radius: 24px 24px 0 0; padding: 10px 10px calc(var(--safe-b) + 10px); transform: translateY(30px); transition: transform .22s; }
.sheet.tall { max-height: 88vh; }
.sheet-wrap.open .sheet { transform: none; }
@media (min-width: 900px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-title { font-weight: 700; padding: 12px 16px 8px; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-item { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; border-radius: 14px; font-size: 17px; color: var(--text); }
.sheet-item:hover { background: var(--panel2); }
.sheet-item.danger { color: var(--danger); }
.sheet-item.cancel { justify-content: center; color: var(--muted); font-weight: 600; }
.sheet-item .ico { color: var(--muted); }
.queue-list { padding: 0 6px; }
.q-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.q-cover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.q-text b { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-text span { font-size: 13.5px; color: var(--muted); }
.modal { width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; background: var(--panel); border-radius: 22px; padding: 16px 18px 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -20px); background: #fff; color: #111; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 650; z-index: 80; opacity: 0; transition: all .25s; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* public share page */
body.share-page { padding: 24px 16px; }
.share { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.share audio { width: 100%; }
.share .snip-src { cursor: default; font-size: 15px; }

/* Full player sized to the screen so "Create snip" is always visible (no scrolling on a phone). */
.full { padding-top: calc(var(--safe-t) + 4px); padding-bottom: calc(var(--safe-b) + 8px); }
.full-body { gap: 6px; }
.full-cover { width: auto; height: clamp(130px, calc(100dvh - 545px - var(--safe-t) - var(--safe-b)), 340px); margin: 6px auto 12px; }
.full-show { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.full-title { font-size: 19px; }
.ai-card { padding: 12px 14px; gap: 6px; margin: 6px 0 2px; }
.ai-card .line { -webkit-line-clamp: 2; min-height: 0; font-size: 15px; }
.run-ai { padding: 12px; font-size: 17px; }
.controls { margin: 8px 0 0; }
.big-play { width: 70px; height: 70px; }
.create-snip { margin: 12px auto 8px; padding: 12px 30px 12px 14px; font-size: 19px; }
.create-snip .logo { width: 40px; height: 40px; }
.extras button { padding: 6px 12px; font-size: 13px; }
@media (min-height: 860px) { .full-body { gap: 10px; } .create-snip { margin-top: 20px; } }

/* snip tags */
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.tagchip { border: 0; background: var(--panel2); color: #cfd2de; border-radius: 8px; padding: 4px 10px; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tagchip.on { background: var(--accent-soft); color: var(--accent); }
.tagchip.add { color: var(--muted); }
.snap-toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs) + var(--mini) + var(--safe-b) + 18px); z-index: 70; background: #fff; color: #111; border-radius: 16px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 10px; font-weight: 650; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); max-width: 480px; margin: 0 auto; }
.snap-toast span { flex: 1; }
.snap-toast button { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; border: 0; background: #111; color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.full.open ~ .snap-toast, body.player-open .snap-toast { bottom: calc(var(--safe-b) + 18px); }
@media (min-width: 900px) { .snap-toast { bottom: calc(var(--mini) + 30px); left: calc(var(--side) + 20px); } }
