/* Topic chat. Loaded after app.css, whose tokens (--bg, --text, --accent, ...) switch for dark mode. */

.tp { min-height: 100%; background: var(--bg); }
.tp-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 12px; border-radius: 10px; background: var(--text); color: var(--bg); }
.tp-skip:focus { left: 12px; }

.tp-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
  transition: background 0.15s;
}
.tp-pill:hover { background: var(--raised); }
.tp-pill svg { width: 17px; height: 17px; }
.tp-pill[disabled] { opacity: 0.5; cursor: default; }

.tp-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.tp-icon:hover { background: var(--hover); color: var(--text); }

.tp-main { width: min(1080px, 100%); margin: 0 auto; padding: 28px 20px 140px; }

/* Index */

.tp-hero { max-width: 760px; margin: 28px auto 36px; text-align: center; }
.tp-hero h1 { margin: 0 0 10px; font: 700 clamp(32px, 5vw, 48px)/1.05 var(--font-display); letter-spacing: -0.035em; }
.tp-sub { margin: 0 auto 26px; max-width: 620px; color: var(--text-2); font-size: 17px; }
.tp-start {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-md);
}
.tp-start:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.tp-start svg { color: var(--text-3); }
.tp-start input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 8px 0; }
.tp-go {
  padding: 10px 20px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}
.tp-go:hover { background: var(--accent-press); }
.tp-go:active { transform: scale(0.98); }
.tp-go[disabled] { opacity: 0.6; cursor: progress; }
.tp-note { margin: 12px 0 0; color: var(--text-2); font-size: 14px; min-height: 1.3em; }

.tp-start { position: relative; }
.tp-combo {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; text-align: left;
  max-height: min(360px, 60vh); overflow-y: auto;
  border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow-lg);
}
.tp-combo-opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.tp-combo-opt:hover, .tp-combo-opt[aria-selected="true"] { background: var(--hover); }
.tp-combo-dot { flex: none; width: 10px; height: 10px; margin: 0 4px; border-radius: 50%; background: hsl(var(--h, 210) 70% 55%); }
.tp-combo-icon { display: grid; place-items: center; flex: none; width: 18px; color: var(--accent); }
.tp-combo-icon svg { width: 18px; height: 18px; }
.tp-combo-copy { min-width: 0; display: flex; flex-direction: column; }
.tp-combo-title { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-combo-sub { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-limit { margin: 8px 4px 0; min-height: 0; font-size: 13px; }
.tp-limit:empty { display: none; }
.tp.has-player .tp-composer { bottom: 88px; }
.tp.has-player .tp-toast { bottom: 160px; }

.tp-section { margin: 0 0 34px; }
.tp-section h2 { margin: 0 0 12px; font: 650 21px/1.2 var(--font-display); letter-spacing: -0.02em; }
.tp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.tp-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px;
  padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm); text-align: left; color: var(--text);
  overflow: hidden; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.tp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.tp-card:active { transform: translateY(0) scale(0.99); }
.tp-card[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.tp-card-kind { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.tp-card-kind i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h, 210) 70% 55%); }
.tp-card-title { margin: 0; font: 650 17px/1.25 var(--font-display); letter-spacing: -0.015em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card-native { margin: 0; color: var(--text-2); font-size: 14px; }
.tp-card-sub { margin: auto 0 0; color: var(--text-3); font-size: 13px; }
.tp-card-photo { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--raised); }
.tp-card.has-photo .tp-card-title, .tp-card.has-photo .tp-card-kind { padding-right: 52px; }
.tp-card.is-skeleton { background: linear-gradient(100deg, var(--raised) 30%, var(--hover) 50%, var(--raised) 70%); background-size: 300% 100%; animation: tp-shimmer 1.4s ease-in-out infinite; border-color: transparent; }
@keyframes tp-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Topic header */

.tp-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; margin: 4px 0 22px; }
.tp-photo {
  position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden;
  background: radial-gradient(80% 80% at 30% 20%, hsl(var(--h, 215) 60% 75%), hsl(calc(var(--h, 215) + 40) 50% 45%));
  box-shadow: var(--shadow-md);
}
.tp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.tp-photo img.is-on { opacity: 1; }
.tp-photo .tp-initials { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,0.92); font: 700 64px/1 var(--font-display); letter-spacing: -0.04em; }
.tp-photo .tp-credit { position: absolute; left: 10px; bottom: 8px; z-index: 2; color: rgba(255,255,255,0.86); font-size: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.tp-dots { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 4px; }
.tp-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.tp-dots i.is-on { background: #fff; }
.tp-kind { margin: 0 0 6px; color: var(--text-2); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.tp-head h1 { margin: 0; font: 700 clamp(28px, 4.4vw, 44px)/1.05 var(--font-display); letter-spacing: -0.035em; }
.tp-native { margin: 6px 0 0; color: var(--text-2); font-size: 17px; }
.tp-native:empty, .tp-desc:empty { display: none; }
.tp-desc { margin: 8px 0 0; color: var(--text-2); font-size: 15px; max-width: 62ch; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.tp-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--raised); color: var(--text); font-size: 13px; font-weight: 500; border: 0;
}
button.tp-chip:hover { background: var(--press); }
.tp-chip svg { width: 15px; height: 15px; color: var(--text-2); }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tp-voice-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
  transition: transform 0.12s, opacity 0.15s;
}
.tp-voice-btn:hover { opacity: 0.88; }
.tp-voice-btn:active { transform: scale(0.98); }

/* Tabs */

.tp-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: var(--raised); width: fit-content; max-width: 100%; overflow-x: auto; }
.tp-tabs button { padding: 7px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 550; font-size: 14px; white-space: nowrap; }
.tp-tabs button:hover { color: var(--text); }
.tp-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tp-panel { max-width: 820px; }

/* Thread */

.tp-thread { display: flex; flex-direction: column; gap: 22px; margin-bottom: 18px; }
.tp-msg { display: flex; flex-direction: column; gap: 8px; }
.tp-msg-user { align-items: flex-end; }
.tp-bubble { max-width: min(78%, 620px); padding: 10px 16px; border-radius: 20px; background: var(--raised); white-space: pre-wrap; overflow-wrap: anywhere; }
.tp-via { color: var(--text-3); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.tp-via svg { width: 13px; height: 13px; }
.tp-answer { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.tp-answer p { margin: 0 0 10px; }
.tp-answer p:last-child { margin-bottom: 0; }
.tp-answer ul, .tp-answer ol { margin: 0 0 10px; padding-left: 22px; }
.tp-answer li { margin: 0 0 4px; }
/* Chat only, when a page that already shows the subject embeds the topic (?embed=chat inside an iframe). */
[data-embed="chat"] .tp-tabs, [data-embed="chat"] .tp-skip,
[data-embed="chat"] .tp-photo, [data-embed="chat"] .tp-kind, [data-embed="chat"] .tp-head h1, [data-embed="chat"] .tp-native,
[data-embed="chat"] .tp-desc, [data-embed="chat"] .tp-chips, [data-embed="chat"] #refresh-button, [data-embed="chat"] #share-button { display: none; }
[data-embed="chat"] .tp-head { display: none; }
.tp-voice-embed { display: none; }
/* Embedded chat: sample questions sit inside the chat box, above the input, as one card. */
[data-embed="chat"] .tp-suggest:not(:empty) {
  margin: 0; padding: 14px 16px 4px; gap: 6px;
  border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 26px 26px 0 0; background: var(--surface);
}
[data-embed="chat"] .tp-suggest:not(:empty)::before {
  content: "Try asking"; flex-basis: 100%; margin: 0 0 2px; color: var(--text-3); font-size: 12px; font-weight: 600;
}
[data-embed="chat"] .tp-suggest button { padding: 6px 12px; border: 0; background: var(--raised); font-size: 13.5px; }
[data-embed="chat"] .tp-suggest button:hover { background: var(--accent-soft); color: var(--accent); }
[data-embed="chat"] .tp-suggest:not(:empty) + .tp-composer {
  border-top: 0; border-radius: 0 0 26px 26px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
[data-embed="chat"] .tp-voice-embed { display: inline-flex; height: 34px; padding: 0 12px; font-size: 13.5px; }
[data-embed="chat"] .tp-main { padding-top: 12px; }
[data-embed="chat"] #panel-talk { display: block !important; max-width: none; }
.tp-answer-h { margin: 14px 0 6px; font: 650 16px/1.35 var(--font-display); letter-spacing: -0.01em; }
.tp-answer-h:first-child { margin-top: 0; }
.tp-answer.is-streaming::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--text); vertical-align: middle; animation: tp-pulse 1s ease-in-out infinite; }
@keyframes tp-pulse { 50% { opacity: 0.25; transform: scale(0.8); } }
.tp-cite {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0 1px; padding: 0 5px;
  border: 0; border-radius: 6px; background: var(--raised); color: var(--text-2);
  font: 600 11px/1 var(--font); vertical-align: 2px; cursor: pointer;
}
.tp-cite:hover, .tp-cite.is-hot { background: var(--accent); color: var(--on-accent); }
.tp-steps { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.tp-steps .tp-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--text-2); animation: tp-rot 0.8s linear infinite; }
@keyframes tp-rot { to { transform: rotate(360deg); } }
.tp-srcs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.tp-src {
  flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 248px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-align: left; font-size: 13px; transition: border-color 0.15s, background 0.15s;
}
.tp-src:hover, .tp-src.is-hot { border-color: var(--accent); }
.tp-src-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--raised); font-weight: 650; font-size: 11px; }
.tp-src-copy { min-width: 0; }
.tp-src-title { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-src-meta { display: block; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-src-go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); color: var(--text); }
.tp-src-go svg { width: 13px; height: 13px; }
.tp-src-go svg path[d^="M8"] { fill: currentColor; stroke: none; }
.tp-timing { color: var(--text-3); font-size: 12px; }
.tp-feedback { display: flex; gap: 2px; margin: 2px 0 0; }
.tp-fb { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; }
.tp-fb svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tp-fb:hover, .tp-fb:focus-visible { color: var(--text-2); border-color: var(--line); }
.tp-fb.is-on { color: var(--text); border-color: var(--line-strong); }
.tp-fb-share { width: auto; grid-auto-flow: column; gap: 5px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.tp-thread-bar { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.tp-thread-bar[hidden] { display: none; }
.tp-share { position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); width: min(460px, calc(100vw - 24px)); transform: translateX(-50%);
  display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.tp-share-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-share .tp-note { margin: 0; }
.tp-share-row { display: flex; gap: 8px; }
.tp-share-url { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: 13px/1.3 ui-monospace, "SF Mono", Menlo, monospace; }
.tp-share-btn { flex: 0 0 auto; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--text); color: var(--surface); font-weight: 650; cursor: pointer; }
.tp-share-stop { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--text-2); font-size: 13px; text-decoration: underline; cursor: pointer; }
.tp-share-close { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
.tp-share-close:hover, .tp-share-stop:hover { color: var(--text); }
.tp-error { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--text); font-size: 14px; }

.tp-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tp-suggest button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); font-size: 14px; text-align: left; transition: background 0.15s, border-color 0.15s;
}
.tp-suggest button:hover { background: var(--raised); }

.tp-composer {
  position: sticky; bottom: 16px; z-index: 10;
  padding: 10px 10px 8px 16px; border-radius: 26px; border: 1px solid var(--line-strong);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.tp-composer:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong)); }
.tp-composer textarea { display: block; width: 100%; max-height: 180px; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 16px; line-height: 1.45; }
.tp-composer-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tp-grow { flex: 1; }
.tp-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; cursor: pointer; user-select: none; }
.tp-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tp-switch { position: relative; width: 32px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background 0.2s; }
.tp-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.2s var(--ease); }
.tp-toggle input:checked + .tp-switch { background: var(--ok); }
.tp-toggle input:checked + .tp-switch::after { transform: translateX(12px); }
.tp-toggle input:focus-visible + .tp-switch { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.tp-select select { padding: 5px 26px 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 13px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 9px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
.tp-send { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--text); color: var(--bg); transition: opacity 0.15s; }
.tp-send[disabled] { opacity: 0.3; cursor: default; }
.tp-send.is-stop svg { display: none; }
.tp-send.is-stop::before { content: ""; width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
.tp-fine { margin: 10px 4px 0; color: var(--text-3); font-size: 12px; }

/* Sources and related */

.tp-seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--raised); }
.tp-seg button { padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 550; }
.tp-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tp-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.tp-item-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--raised); color: var(--text-2); }
.tp-item-icon svg { width: 18px; height: 18px; }
.tp-item-title { margin: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-item-meta { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.tp-more { margin: 16px auto 0; display: flex; }
.tp-empty { color: var(--text-2); padding: 24px 0; }

.tp-timeline-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tp-timeline-bar .tp-note { margin: 0; }
.tp-timeline { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.tp-build { margin: 8px 0 16px; }

/* Voice sheet */

.tp-voice {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(30px); -webkit-backdrop-filter: saturate(160%) blur(30px);
  overflow-y: auto; animation: tp-in 0.28s var(--ease);
}
@keyframes tp-in { from { opacity: 0; transform: scale(1.02); } }
.tp-voice-top { width: min(760px, 100%); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tp-voice-kicker { margin: 0; color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tp-voice h2 { margin: 2px 0 0; font: 650 20px/1.2 var(--font-display); letter-spacing: -0.02em; }
.tp-voice-stage { flex: 1; width: min(760px, 100%); display: flex; flex-direction: column; justify-content: center; padding: 18px 0; }
.tp-voice .tts-picker .tts-menu { top: auto; bottom: calc(100% + 6px); }
.tp-voice select { padding: 8px 28px 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; }
.tp-metrics { margin: 0; color: var(--text-3); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; min-height: 1.3em; }
.tp-fallback { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }

/* Mini player */

.tp-player {
  position: fixed; left: 50%; bottom: calc(16px + var(--site-tabbar, 0px)); z-index: 70; transform: translateX(-50%);
  width: min(640px, calc(100% - 24px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) 120px auto auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-lg);
}
.tp-play { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--text); color: var(--bg); }
.tp-play svg path { fill: currentColor; }
.tp-play .i-pause path { fill: none; stroke: currentColor; stroke-width: 2.4; }
.tp-play .i-play { display: none; }
.tp-player.is-paused .i-play { display: block; }
.tp-player.is-paused .i-pause { display: none; }
.tp-player-title { margin: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-player-sub { margin: 0; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-player input[type="range"] { width: 100%; accent-color: var(--text); }
.tp-player-time { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }

.tp-toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--site-tabbar, 0px)); z-index: 90; transform: translateX(-50%);
  max-width: min(520px, calc(100% - 32px)); padding: 10px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg);
}

/* Responsive */

@media (max-width: 760px) {
  .tp-main { padding: 18px 14px 140px; }
  .tp-head { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
  .tp-photo { border-radius: 22px; }
  .tp-photo .tp-initials { font-size: 34px; }
  .tp-bubble { max-width: 88%; }
  .tp-player { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .tp-player input[type="range"] { display: none; }
  .tp-row { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 460px) {
  .tp-head { grid-template-columns: 1fr; }
  .tp-photo { width: 120px; }
  .tp-toggle span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tp *, .tp *::before, .tp *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .tp-card:hover { transform: none; }
}
