/* The cast: faces, who-strips, sheets, "Meet Ana" cards, scenes with faces (js/cast-ui.js, js/venue.js). */

/* ---------- A face ---------- */
.av {
  --av: 28px;
  flex: none; display: inline-block; width: var(--av); height: var(--av); border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 calc(var(--av) / 18 + 1px) var(--surface), 0 1px 3px rgba(0, 0, 0, 0.18);
  background: var(--surface2); vertical-align: middle; line-height: 0;
}
.av svg { display: block; width: 100%; height: 100%; }

/* ---------- Who-strip: a row of small faces ---------- */
.who-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 2px; border-radius: 18px; background: color-mix(in srgb, var(--c, var(--text)) 9%, transparent); font-size: 13px; font-weight: 700; color: var(--text-soft); }
.who-chip:has(> .av:only-child) { padding: 2px; }
.who-strip.in-prompt { margin: 8px 0 -2px; }
.who-strip.faces-only { gap: 0; }
.who-strip.faces-only .who-chip { background: none; padding: 0; margin-left: -6px; }
.who-strip.faces-only .who-chip:first-child { margin-left: 0; }

/* ---------- A person's sheet ---------- */
.cast-sheet { padding: 4px 2px 20px; }
.cs-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 22px; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 20%, var(--surface)), var(--surface) 75%); box-shadow: inset 0 0 0 1px var(--line); }
.cs-hero .av { box-shadow: 0 0 0 4px var(--surface), 0 6px 16px rgba(0, 0, 0, 0.18); }
.cs-name { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.cs-role { color: var(--muted); font-size: 14px; font-weight: 650; margin-top: 2px; }
.cs-bio { margin: 14px 4px; font-size: 15.5px; line-height: 1.45; color: var(--text-soft); }
.cs-lines { margin-top: 6px; }
.cs-h { font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 4px 6px; display: flex; justify-content: space-between; }
.cs-h small { font-size: 12px; text-transform: none; letter-spacing: 0; }
.cs-bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin: 0 4px 10px; }
.cs-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.cs-line { position: relative; display: block; width: 100%; text-align: left; padding: 10px 40px 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow), inset 0 0 0 1px var(--line); margin-bottom: 8px; }
.cs-line span { display: block; font-weight: 700; font-size: 15.5px; }
.cs-line small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.cs-line i { position: absolute; right: 12px; top: 50%; translate: 0 -50%; font-style: normal; font-size: 14px; }
.cs-none { color: var(--muted); font-size: 14px; margin: 4px; }

/* ---------- "Meet Ana" card (one time, doesn't block play) ---------- */
.meet-card {
  position: fixed; left: 50%; top: calc(var(--top-h) + 8px); z-index: 55;
  display: flex; align-items: center; gap: 12px; width: min(380px, calc(100% - 32px));
  padding: 10px 14px 10px 10px; border-radius: 20px; text-align: left; color: var(--text);
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--line);
  transform: translate(-50%, -16px) scale(0.92); opacity: 0; pointer-events: none;
  transition: transform 0.45s var(--spring), opacity 0.25s;
}
.meet-card.in-stage { position: absolute; top: calc(var(--sat) + 58px); }
.meet-card.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.meet-card .av { animation: av-hop 0.6s var(--spring) 0.15s both; }
.mc-text { display: flex; flex-direction: column; min-width: 0; }
.mc-text small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: color-mix(in srgb, var(--c) 70%, var(--text)); }
.mc-text b { font-size: 15px; line-height: 1.3; }
@keyframes av-hop { from { transform: translateY(8px) scale(0.6); } to { transform: none; } }

/* ---------- Town: your neighbors ---------- */
.neighbors { margin: 0 16px 16px; }
.nb-title { font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 2px 8px; }
.nb-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.nb { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 70px; font-size: 11.5px; font-weight: 700; color: var(--text-soft); }
.nb span:last-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-q { display: grid !important; place-items: center; line-height: 1; font-size: 22px; font-weight: 900; color: var(--muted); background: var(--surface3); box-shadow: inset 0 0 0 2px var(--line); }
.nb-more { color: var(--muted); }

/* ---------- Scenes with faces (venue.js) ---------- */
.rp-cast .who-strip { flex: none; }
.rp-cast > div:last-child { min-width: 0; }
.rp-row { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.rp-row.npc { align-self: flex-start; }
.rp-row.me { align-self: flex-end; }
.rp-row .bub { max-width: none; min-width: 0; }
.rp-av { flex: none; padding: 0; border-radius: 50%; margin-bottom: 2px; }
.bub-name { font-size: 12px; font-weight: 800; letter-spacing: 0.02em; margin-bottom: 2px; color: color-mix(in srgb, var(--c) 72%, var(--text)); }
.bub.me .bub-mic { margin: 6px 0 -2px; display: block; font-size: 12.5px; font-weight: 750; color: inherit; opacity: 0.85; }
.rp-sayline { padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--card-shadow), inset 0 0 0 1px var(--line); margin-top: 8px; }
.rp-sayline b { display: block; font-size: 18px; }
.rp-sayline small { color: var(--muted); font-size: 13.5px; }
.rp-pad { margin: 10px 0; }
.rp-pad .sp-out { margin-top: 8px; }

/* The finale's start card and the "act complete" moment (a scene run as a lesson). */
.scene-start { text-align: center; padding-top: 28px; display: flex; flex-direction: column; align-items: center; }
.scene-start h2 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.scene-start .an-hook { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 4px 8px 18px; }
.scene-start .who-strip { justify-content: center; margin: 6px 0 18px; }
.scene-start .btn { width: 100%; }
.ss-kicker, .act-end .ae-kicker { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.act-end .ae-faces { display: flex; justify-content: center; margin: 4px 0 18px; }
.act-end .ae-faces .av { margin-left: -8px; animation: av-hop 0.7s var(--spring) both; }
.act-end .ae-faces .av:first-child { margin-left: 0; }
.act-end .fd-title { font-size: 32px; }
.act-end .ae-next { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 14px; padding: 8px 14px; border-radius: 14px; background: color-mix(in srgb, var(--d-ser) 14%, var(--surface)); color: var(--text); font-weight: 750; font-size: 14.5px; box-shadow: inset 0 0 0 1px var(--line); }
.act-end .rp-stars { margin-bottom: 4px; }
