:root {
  --bg: #faf6ef;
  --card-bg: #ffffff;
  --ink: #2b2620;
  --muted: #8a8378;
  --accent: #2e7d32;
  --accent-dark: #1b5e20;
  --border: #e5ddce;
  --danger: #b3261e;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding: max(16px, env(safe-area-inset-top)) 16px
           max(48px, env(safe-area-inset-bottom));
  overscroll-behavior-y: none;
}

h1 { font-size: 1.4rem; margin: 8px 0 20px; text-align: center; color: var(--accent-dark); }
h2 { font-size: 1.1rem; margin: 28px 0 12px; color: var(--accent-dark); }

/* An element's own display rule would otherwise beat the hidden attribute —
   .screen sets display:flex, which kept the login screen on top of the app. */
[hidden] { display: none !important; }

/* Než se zjistí, jestli patří login nebo obsah, svítí jen název —
   jinak problikne přihlašovací obrazovka i přihlášenému uživateli. */
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 50;
}

.boot h1 { margin: 0; font-size: 1.6rem; color: var(--accent-dark); }

.screen {
  max-width: 340px;
  margin: 15vh auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto 16px;
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

button, select, input, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--ink);
}
button { cursor: pointer; }
input, textarea { width: 100%; }

button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button.primary:hover { background: var(--accent-dark); }
button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
button:disabled { opacity: 0.4; cursor: default; }

.cases { max-width: 640px; margin: 0 auto; }
.cases.single section { margin-top: 16px; }

/* Úpravy jen v detailu case — v přehledu všech by lákaly k překlepu */
.case-add, .del-btn { display: none; }
.cases.single .case-add { display: flex; }
.cases.single .del-btn { display: inline-flex; align-items: center; justify-content: center; }

/* V přehledu je nadpis cestou do detailu */
.cases:not(.single) h2 { cursor: pointer; }
.cases:not(.single) h2:hover { color: var(--accent); }

.case-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.case-flag { font-size: 1.45rem; line-height: 1; }

#newCaseBtn {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.case-add {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 14px 0 26px;
}

/* Volby jsou schované pod tlačítkem a při otevření vyjedou do stran */
.fan-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: var(--card-bg);
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s;
}

.fan-left { transform: translateX(60px) scale(0.85); }
.fan-right { transform: translateX(-60px) scale(0.85); }

.case-add.open .fan-btn {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.translate-form {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.translate-form input { flex: 1 1 200px; }
.translate-form .hint { flex: 1 1 100%; margin: 0; }

.add-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  color: #fff;
  background: var(--accent);
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.add-btn:hover { background: var(--accent-dark); }
.add-btn:active { transform: translateY(1px); }
.case-add.open .add-btn { background: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .fan-btn { transition: opacity 0.2s; transform: none; }
}

.option-flag { font-size: 1.35rem; line-height: 1; }

#searchClose {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  cursor: pointer;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.case-tags span:not(.case-flag) {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.case-head button {
  font-size: 0.8rem;
  padding: 4px 10px;
  color: var(--danger);
  border-color: transparent;
  background: none;
}

.row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 32px;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.del-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}
.del-btn:hover { color: var(--danger); }

.target { font-weight: 600; }
.cs { color: var(--muted); }


.status, .hint {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.error { font-size: 0.85rem; color: var(--danger); text-align: center; }

.editor {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.editor h2 { margin-top: 0; color: var(--accent-dark); }

/* Výběr case: vlastní komponenta, protože nativní <select> se na iOS
   otevírá jako kolečko odspodu a nedá se ničím ovlivnit. */
.picker { position: relative; }

.picker-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.picker-current:hover { border-color: var(--accent); }

.picker-arrow {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s;
}

.picker.open .picker-arrow { transform: rotate(-135deg) translate(-3px, -3px); }

.picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  padding: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transform-origin: top center;
  animation: unfold 0.16s ease-out;
}

.picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.picker-search input {
  border: none;
  background: none;
  padding: 6px 0;
  font-size: 0.95rem;
  color: var(--ink);
}

.picker-search input:focus { outline: none; }

#langList { max-height: 34vh; }

.picker-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes unfold {
  from { opacity: 0; transform: scaleY(0.9) translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.picker-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.picker-list li:hover, .picker-list li.cursor { background: var(--bg); }

.picker-list li.current {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.picker-list li .count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.picker-list li.current .count { color: rgba(255, 255, 255, 0.75); }

.picker-list li.divider {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding-top: 12px;
}

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

.chosen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.chosen button { font-size: 0.85rem; padding: 6px 11px; }

/* ------------------------------------------------------------- mapa tagů */

.map {
  position: relative;
  height: 300px;
  margin: 10px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  touch-action: manipulation;
}

.map svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.map-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  margin: 0;
  width: 92%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s, color 0.2s, border-color 0.2s, opacity 0.3s;
  /* Bez tohohle vyvolá podržení v Safari kontextové menu a výběr textu. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.node.picked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-style: normal;
}

.node.live {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  font-size: 0.95rem;
  padding: 10px 17px;
  font-style: normal;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}

.node.vanishing { opacity: 0; pointer-events: none; }

.node.holding::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 2.5px solid var(--accent-dark);
  animation: squeeze 0.5s linear forwards;
}

@keyframes squeeze {
  from { transform: scale(1.18); opacity: 0.15; }
  to { transform: scale(1); opacity: 1; }
}

/* Dotaz na Claude trvá vteřiny — musí být vidět, že se něco děje */
.node.live.thinking::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2.5px solid var(--accent);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.map.loading .map-hint::after { content: ' hledám souvislosti…'; }

@media (prefers-reduced-motion: reduce) {
  .node { transition: opacity 0.2s; }
  .node.holding::after { animation: none; opacity: 1; }
  .node.live.thinking::before { animation: none; border-top-color: var(--border); }
}

.field {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0;
}
.field input, .field textarea { margin-top: 4px; }

.segmented {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.segmented button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  font-size: 0.9rem;
  color: var(--ink);
}
.segmented small { font-size: 0.7rem; opacity: 0.65; }
.segmented button.active small { opacity: 0.85; }

.editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

progress { width: 100%; margin: 8px 0; }

button.big {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-bottom: 4px;
}

.passkey-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  font-size: 0.9rem;
}
.passkey-offer span { flex: 1 1 100%; }

/* ------------------------------------------------------------ účet, profil */

button.link {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.profile {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.panel .row-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.panel .row-line:last-child { border-bottom: none; }
.panel .row-line .value { font-weight: 600; font-variant-numeric: tabular-nums; }

.quota-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  margin-top: 8px;
}

.quota-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.quota-bar.full i { background: var(--danger); }

/* posuvník rychlosti řeči */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type="range"] { flex: 1; }
.slider-row .value { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

/* affiliate */
.ref-link {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.ref-link input {
  flex: 1;
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
}

.qr-box {
  display: flex;
  justify-content: center;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  margin-top: 10px;
}

.qr-box img { width: 190px; height: 190px; }

.ref-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ref-stat {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.ref-stat b {
  display: block;
  font-size: 1.5rem;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.ref-stat span { font-size: 0.76rem; color: var(--muted); }

.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Skrytý překlad: odkryje se klepnutím, ať jde fráze nejdřív zkusit po paměti */
body.hide-source .cs {
  color: transparent;
  background: var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

body.hide-source .cs.revealed {
  color: var(--muted);
  background: none;
}

button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

button.danger:hover { background: var(--danger); color: #fff; }

.pwd-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pwd-form .hint { margin: 0; }

/* ------------------------------------------------------- hlavička s profilem */

header {
  display: grid;
  /* mikrofon vlevo, profil vpravo — stejně široké kraje drží nadpis na středu */
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

header h1 { margin: 8px 0; }

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.icon-btn:hover { border-color: var(--accent); color: var(--accent-dark); }

/* otevřený profil pozná uživatel podle toho, že tlačítko svítí */
.icon-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.icon-btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.header-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* mikrofon v hlavičce svítí, když poslech běží */
#listenBtn.active { background: var(--danger); border-color: var(--danger); color: #fff; }

/* --------------------------------------------- velký mikrofon na obrazovce */

.mic-wrap { display: flex; justify-content: center; margin: 8px 0 18px; }

.mic-btn {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: none;
  background: var(--muted);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, transform 0.15s;
}

.mic-btn svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.mic-btn:active { transform: scale(0.96); }

/* zapnuto: červená a tepe, aby bylo přes celou místnost vidět, že se poslouchá */
.mic-btn.on {
  background: var(--danger);
  animation: mic-pulse 1.6s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.45); }
  50% { box-shadow: 0 0 0 18px rgba(179, 38, 30, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .mic-btn.on { animation: none; }
}

/* křížek u přeloženého slova */
.badge .drop {
  margin-left: 2px;
  padding: 0 2px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.badge .drop:hover { color: var(--danger); }
.badge.playing .drop { color: rgba(255, 255, 255, 0.8); }

/* ---------------------------------------------------------------- mentor */

.student-row, .invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.student-row:last-child, .invite-row:last-child { border-bottom: none; }
.student-row .who, .invite-row .who { flex: 1; min-width: 0; }
.student-row .who b, .invite-row .who b { display: block; }
.student-row .who span, .invite-row .who span {
  font-size: 0.8rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pill {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill.waiting { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.pill.joined { background: var(--accent); color: #fff; }

.bulk-area {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  min-height: 90px;
}

.invite-link {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.invite-link input {
  flex: 1;
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
}

.share-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow-y: auto;
  margin: 10px 0;
}

.share-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}

.share-list label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft, var(--bg));
}

/* --------------------------------------------------------------- poslech */

.listen-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.listen-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.listen-btn.active {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.listen { max-width: 640px; margin: 0 auto; }

.listen-status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.listen-status .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}

.listen-status.idle .dot { background: var(--muted); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Průběžný přepis je nástroj, ne obsah — proto bledě a menším písmem */
.transcript {
  min-height: 3.2em;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.transcript b { color: var(--ink); font-weight: 500; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.badge {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--accent);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 0.95rem;
  text-align: left;
  font-family: inherit;
}

.badge b { color: var(--accent-dark); font-weight: 600; }
.badge span { color: var(--muted); font-size: 0.86rem; }
.badge small { color: var(--muted); font-size: 0.72rem; }
.badge:active { transform: translateY(1px); }
.badge.playing { background: var(--accent); border-color: var(--accent); }
.badge.playing b, .badge.playing span, .badge.playing small { color: #fff; }
.badge.waiting { opacity: 0.55; border-color: var(--border); }

.listen-actions { display: flex; gap: 8px; flex-wrap: wrap; }

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

/* Heslo je záložní cesta, ne hlavní — proto schované pod rozbalovátkem */
#passwordFallback {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
}

#passwordFallback summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
  list-style: none;
}

#passwordFallback summary::-webkit-details-marker { display: none; }
#passwordFallback summary::before { content: '▸ '; }
#passwordFallback[open] summary::before { content: '▾ '; }
#passwordFallback[open] summary { margin-bottom: 10px; }
#passwordFallback input { margin-bottom: 8px; }
