/* ═══════════════════════════════════════════════════════════════════
   psfx-cast.css — per-character status pills.

   A scrollable chip row (avatar dot · name · mood) with one disclosure panel
   per character, one open at a time. Follows the avatar-row convention used by
   group-chat UIs, with the accessible mechanics of a plain disclosure.
   ═══════════════════════════════════════════════════════════════════ */

#pscCastPills { padding: 0 22px 10px; }
#pscCastPills[hidden] { display: none; }

/* ── the pill row ─────────────────────────────────────────────────── */
.fxc-pills {
  display: flex; gap: 7px; align-items: center;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.fxc-pills::-webkit-scrollbar { display: none; }

.fxc-pill {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 5px 11px 5px 5px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--mid); font-size: 12px; font-weight: 600;
  /* transform/opacity only — safe to animate */
  transition: transform .18s ease, opacity .18s ease, border-color .25s ease, background .25s ease;
}
.fxc-pill:hover { background: rgba(255,255,255,.07); color: var(--text); }
.fxc-pill:focus-visible { outline: 2px solid var(--fx-mood-edge, var(--pink)); outline-offset: 2px; }

/* the open pill lifts and takes the mood colour */
.fxc-pill.open {
  background: rgba(var(--fx-mood-rgb, 255,45,120), .14);
  border-color: rgba(var(--fx-mood-rgb, 255,45,120), .45);
  color: var(--text);
  transform: translateY(-1px);
}
/* the lead character reads as primary */
.fxc-pill.lead .fxc-dot {
  background: linear-gradient(135deg, var(--fx-mood-glow, var(--pink)), var(--fx-mood-edge, var(--rose)));
  color: #fff;
}

.fxc-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,.10); color: var(--mid);
  font: 700 10px var(--fm); letter-spacing: 0;
}
.fxc-name { white-space: nowrap; }
.fxc-mood {
  font: 400 10.5px var(--fm); color: var(--dim);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fxc-chev { font-size: 9px; opacity: .5; transition: transform .2s ease; }
.fxc-pill.open .fxc-chev { transform: rotate(180deg); }

/* ── the per-character panel ──────────────────────────────────────── */
.fxc-panel {
  margin-top: 9px; padding: 11px 13px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(var(--fx-mood-rgb, 255,45,120), .22);
  animation: fxcOpen .22s ease;
}
.fxc-panel[hidden] { display: none; }
@keyframes fxcOpen { from { opacity: 0; transform: translateY(-3px) } to { opacity: 1; transform: none } }

.fxc-line { font-size: 12.5px; line-height: 1.55; color: var(--mid); margin-bottom: 6px; }
.fxc-line:last-child { margin-bottom: 0; }
.fxc-line.dim { color: var(--dim); font-style: italic; }
.fxc-line b {
  display: inline-block; min-width: 66px;
  font: 700 9.5px var(--fm); letter-spacing: .7px; text-transform: uppercase;
  color: var(--fx-mood-edge, var(--pink)); opacity: .9; margin-right: 6px;
}

/* per-character bond meter — same visual language as the scene bond bar */
.fxc-bond { margin-top: 9px; }
.fxc-bond-h { display: block; font: 700 9.5px var(--fm); letter-spacing: 1px;
  color: var(--fx-mood-edge, var(--pink)); margin-bottom: 4px; }
.fxc-bond-bar { display: block; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,.10); overflow: hidden; }
.fxc-bond-bar span { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--fx-mood-glow, var(--rose)), var(--fx-mood-edge, var(--pink)));
  transition: width .5s ease; }

/* ── RESTRAINT ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fxc-panel { animation: none; }
  .fxc-pill, .fxc-chev, .fxc-bond-bar span { transition: none; }
}
body.psfx-calm .fxc-panel { animation: none; }

@media (max-width: 820px) {
  #pscCastPills { padding: 0 14px 9px; }
  .fxc-mood { max-width: 70px; }
}