/* 听书 v16 —— 复用站内主题变量，自动适配亮色/暗色/绿色主题 */

.listen-current {
  background: var(--tint);
  background: color-mix(in srgb, var(--tint) 82%, transparent);
  box-shadow: 0 0 0 6px var(--tint);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tint) 82%, transparent);
  border-radius: 6px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

body.listen-on {
  padding-bottom: 92px;
}

.listen-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  max-width: min(960px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(20, 40, 52, 0.18);
  font-family: inherit;
  animation: listen-in 0.18s ease-out;
}

@keyframes listen-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.listen-bar button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.listen-bar button:hover {
  background: var(--tint);
  border-color: var(--accent);
}

.listen-bar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.listen-bar .listen-toggle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  min-width: 40px;
}

.listen-bar .listen-toggle:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.listen-bar .listen-close {
  color: var(--muted);
}

.listen-status {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.listen-bar select {
  flex: none;
  max-width: 190px;
  height: 34px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.listen-bar select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  body.listen-on {
    padding-bottom: 132px;
  }

  .listen-bar {
    bottom: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
  }

  .listen-status {
    order: 10;
    flex: 1 0 100%;
    text-align: center;
    white-space: normal;
  }

  .listen-bar select {
    max-width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listen-bar {
    animation: none;
  }

  .listen-current {
    transition: none;
  }
}

/* 后台 · 听书生成（tts-admin.js） */
.tts-providers{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.tts-provider{display:flex;flex-direction:column;gap:2px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:13px;min-width:160px}
.tts-provider.ok{border-color:var(--accent)}
.tts-provider.off{opacity:.66}
.tts-provider span{color:var(--muted);font-size:12px}
.tts-badge{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;background:var(--tint);color:var(--ink)}
.tts-badge.ok{background:var(--tint);color:var(--accent);font-weight:600}
.tts-badge.bad{background:#fdecea;color:#9b2c2c}
.tts-badge.busy{background:var(--tint);color:var(--muted)}
.tts-badge.stale{background:#fff4e0;color:#8a5a12}
.tts-badge.off{background:transparent;color:var(--muted);border:1px dashed var(--line)}
.tts-progress{height:6px;border-radius:99px;background:var(--line);overflow:hidden;margin:6px 0 0;max-width:320px}
.tts-progress span{display:block;height:100%;background:var(--accent);transition:width .3s ease}
.tts-tools{align-items:flex-end}
.tts-hint code{background:var(--tint);padding:0 4px;border-radius:4px}
.tts-row .document-info{min-width:0}
.tts-tools select{max-width:280px}
