.cb {
  background: var(--teal-050);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cb__frame {
  display: grid;
}

@media (min-width: 900px) {
  .cb__frame {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

.cb__stagewrap {
  padding: clamp(0.7rem, 0.3rem + 1.4vw, 1.2rem);
  background: linear-gradient(180deg, #1c2a3a, #10161f);
  border-bottom: 1px solid var(--teal-200);
}

@media (min-width: 900px) {
  .cb__stagewrap {
    border-bottom: 0;
    border-right: 1px solid var(--teal-200);
  }
}

.cb__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f4e4c1;
  border: 3px solid #0b0f14;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.cb__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cb-world {
  transform-origin: 0 0;
  transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cb-actor {
  transform-origin: 0 0;
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cb-scene {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.cb-scene.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s;
}

.cb-at {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cb-at.is-shown {
  opacity: 1;
}

.cb-cabaret {
  display: none;
}

.cb-rig.is-cabaret .cb-cabaret {
  display: inline;
}

.cb-body {
  animation: cb-bob 3.4s ease-in-out infinite;
  animation-delay: var(--bd, 0s);
}

.cb-head {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: cb-tilt 5.2s ease-in-out infinite;
  animation-delay: var(--bd, 0s);
}

.cb-lid {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: center top;
  animation: cb-blink 4.6s infinite;
  animation-delay: var(--bd, 0s);
}

.cb-mo {
  opacity: 0;
}

.cb-rig.is-talking .cb-mo {
  animation: cb-talk 0.3s linear infinite;
}

.cb-rig.is-talking .cb-mc {
  animation: cb-talkinv 0.3s linear infinite;
}

.cb-rig.is-talking .cb-head {
  animation: cb-nod 0.6s ease-in-out infinite alternate;
}

.cb-leg {
  transform-box: fill-box;
  transform-origin: 50% 4%;
}

.cb-actor.is-walking .cb-leg--l {
  animation: cb-step 0.55s ease-in-out infinite alternate;
}

.cb-actor.is-walking .cb-leg--r {
  animation: cb-step 0.55s ease-in-out infinite alternate-reverse;
}

.cb-actor.is-walking .cb-body {
  animation: cb-stride 0.55s ease-in-out infinite alternate;
}

.cb-actor.is-running .cb-leg--l {
  animation: cb-run 0.22s linear infinite alternate;
}

.cb-actor.is-running .cb-leg--r {
  animation: cb-run 0.22s linear infinite alternate-reverse;
}

.cb-actor.is-running .cb-body {
  animation: cb-lean 0.22s linear infinite alternate;
}

.cb-pump {
  animation: cb-pump 0.22s linear infinite alternate;
}

.cb-pump--r {
  animation-direction: alternate-reverse;
}

.cb-actor.is-hop {
  animation: cb-hop 0.5s ease-out 2;
}

.cb-swing {
  animation: cb-wave 0.6s ease-in-out infinite alternate;
}

.cb-swing--small {
  animation-duration: 0.9s;
}

.cb-strum {
  animation: cb-strum 0.42s ease-in-out infinite alternate;
}

.cb-shake {
  transform-box: fill-box;
  transform-origin: center;
  animation: cb-shake 0.3s linear infinite alternate;
  animation-delay: var(--d, 0s);
}

.cb-stamparm {
  animation: cb-stamparm 0.64s ease-in infinite;
}

.cb-sweat {
  transform-box: fill-box;
  transform-origin: center;
  animation: cb-sweat 1.4s ease-in infinite;
}

.cb-steam {
  animation: cb-steam 1.1s ease-out infinite;
}

.cb-hearts .cb-heartfloat,
.cb-heartfloat {
  transform-box: fill-box;
  transform-origin: center;
  animation: cb-heart 2.2s ease-out infinite;
  animation-delay: var(--d, 0s);
}

.cb-twinkle,
.cb-sparkle,
.cb-pop,
.cb-stamp,
.cb-spin,
.cb-float,
.cb-flicker,
.cb-vaultdoor,
.cb-thumb,
.cb-punch,
.cb-axe,
.cb-signhalf,
.cb-crack,
.cb-forkdrop,
.cb-dust,
.cb-zip,
.cb-toss,
.cb-sigh,
.cb-ball,
.cb-glow,
.cb-flame,
.cb-handspin,
.cb-tear,
.cb-cloud {
  transform-box: fill-box;
  transform-origin: center;
}

.cb-at.is-shown .cb-pop,
.cb-at.is-shown.cb-pop {
  animation: cb-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--d, 0s);
}

.cb-at.is-shown .cb-stamp,
.cb-at.is-shown.cb-stamp {
  animation: cb-stampin 0.45s ease-out both;
  animation-delay: var(--d, 0s);
}

.cb-at.is-shown .cb-twinkle,
.cb-twinkle {
  animation: cb-twinkle 1.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.cb-sparkle {
  animation: cb-twinkle 1.1s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.cb-at.is-shown .cb-float,
.cb-float {
  animation: cb-float 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.cb-at.is-shown .cb-spin {
  animation: cb-spin 2.4s linear infinite;
}

.cb-at.is-shown .cb-flicker {
  animation: cb-flicker 1.1s steps(3) infinite;
}

.cb-at.is-shown .cb-vaultdoor {
  animation: cb-vault 1.2s ease-in 0.5s both;
}

.cb-at.is-shown .cb-thumb {
  animation: cb-thumb 0.8s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}

.cb-at.is-shown .cb-punch {
  animation: cb-punch 0.7s ease-in 0.4s both;
}

.cb-axe {
  transform-origin: 100% 0;
}

.cb-at.is-shown .cb-axe {
  animation: cb-axe 0.5s ease-in 3.1s both;
}

.cb-signhalf {
  transform-origin: 50% 100%;
}

.cb-at.is-shown .cb-signhalf--l {
  animation: cb-halfl 0.8s ease-in 3.5s both;
}

.cb-at.is-shown .cb-signhalf--r {
  animation: cb-halfr 0.8s ease-in 3.5s both;
}

.cb-crack--l {
  transform-origin: 50% 100%;
}

.cb-crack--r {
  transform-origin: 50% 100%;
}

.cb-at.is-shown .cb-crack--l {
  animation: cb-crackl 0.7s ease-out 1.2s both;
}

.cb-at.is-shown .cb-crack--r {
  animation: cb-crackr 0.7s ease-out 1.2s both;
}

.cb-at.is-shown .cb-forkdrop {
  animation: cb-forkdrop 0.9s ease-in both;
}

.cb-at.is-shown .cb-dust {
  animation: cb-dust 1.4s ease-out both;
}

.cb-at.is-shown .cb-zip {
  animation: cb-zip 0.7s ease-out both;
}

.cb-at.is-shown .cb-toss {
  animation: cb-toss 1.4s ease-in both;
}

.cb-at.is-shown .cb-sigh {
  animation: cb-sigh 2.2s ease-out both;
}

.cb-at.is-shown .cb-handspin {
  animation: cb-spin 1.2s linear infinite;
}

.cb-tear {
  animation: cb-tear 1.6s ease-in infinite;
}

.cb-flame {
  animation: cb-flame 0.5s ease-in-out infinite alternate;
}

.cb-glow {
  animation: cb-glowpulse 3s ease-in-out infinite alternate;
}

.cb-ball {
  animation: cb-spinball 4s linear infinite;
}

.cb-prop {
  opacity: 0;
}

.cb-prop.is-on {
  opacity: 1;
  animation: cb-drop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cb-fork {
  transition: opacity 0.2s;
}

.cb__stage.is-forkless .cb-fork {
  opacity: 0;
}

[data-actor="fred"] .cb-rig,
[data-actor="waiter"] {
  transition: filter 0.5s ease;
}

.cb__stage.is-cabaret [data-actor="fred"] .cb-rig {
  filter: brightness(0.45) saturate(0.6);
}

.cb-dim {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cb-spot {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cb-curtains {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-140px);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, visibility 0s linear 0.9s;
}

.cb__stage.is-cabaret .cb-dim {
  opacity: 0.66;
}

.cb__stage.is-cabaret .cb-spot {
  opacity: 1;
}

.cb__stage.is-cabaret .cb-spot--small {
  opacity: 0.55;
}

.cb__stage.is-cabaret .cb-curtains {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0s;
}

.cb__stage.is-cabaret .cb-glow {
  opacity: 0;
}

.cb-shoutlines {
  animation: cb-shake 0.25s linear infinite alternate;
}

@keyframes cb-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes cb-tilt {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}

@keyframes cb-nod {
  from { transform: rotate(-2deg) translateY(0); }
  to { transform: rotate(2deg) translateY(-2px); }
}

@keyframes cb-blink {
  0%, 92%, 100% { transform: scaleY(0); }
  95%, 97% { transform: scaleY(1); }
}

@keyframes cb-talk {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

@keyframes cb-talkinv {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes cb-step {
  from { transform: rotate(-22deg); }
  to { transform: rotate(22deg); }
}

@keyframes cb-stride {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

@keyframes cb-run {
  from { transform: rotate(-40deg); }
  to { transform: rotate(40deg); }
}

@keyframes cb-lean {
  from { transform: translateY(0) rotate(-6deg); }
  to { transform: translateY(-6px) rotate(-8deg); }
}

@keyframes cb-pump {
  from { transform: rotate(-30deg); }
  to { transform: rotate(30deg); }
}

@keyframes cb-hop {
  0%, 100% { translate: 0 0; }
  40% { translate: 0 -22px; }
}

@keyframes cb-wave {
  from { transform: rotate(-16deg); }
  to { transform: rotate(14deg); }
}

@keyframes cb-strum {
  from { transform: rotate(-8deg); }
  to { transform: rotate(6deg); }
}

@keyframes cb-shake {
  from { transform: translate(-2px, 0); }
  to { transform: translate(2px, 1px); }
}

@keyframes cb-stamparm {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-38deg); }
  60% { transform: rotate(6deg); }
}

@keyframes cb-sweat {
  0% { opacity: 0; transform: translateY(-6px) scale(0.6); }
  30% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(22px) scale(0.9); }
}

@keyframes cb-steam {
  0% { opacity: 0; transform: translateY(8px) scale(0.7); }
  40% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-30px) scale(1.3); }
}

@keyframes cb-heart {
  0% { opacity: 0; transform: translateY(6px) scale(0.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-54px) scale(1.15); }
}

@keyframes cb-pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cb-stampin {
  0% { opacity: 0; transform: scale(2.4) rotate(-8deg); }
  70% { opacity: 1; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes cb-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes cb-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}

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

@keyframes cb-spinball {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

@keyframes cb-flicker {
  0%, 100% { opacity: 1; }
  33% { opacity: 0.45; }
  66% { opacity: 0.85; }
}

@keyframes cb-vault {
  to { transform: scaleX(0.08); }
}

@keyframes cb-thumb {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

@keyframes cb-punch {
  from { transform: translateY(-46px); }
  to { transform: translateY(0); }
}

@keyframes cb-axe {
  from { transform: rotate(0); }
  to { transform: rotate(-110deg); }
}

@keyframes cb-halfl {
  to { transform: translate(-30px, 40px) rotate(-70deg); opacity: 0.6; }
}

@keyframes cb-halfr {
  to { transform: translate(30px, 40px) rotate(70deg); opacity: 0.6; }
}

@keyframes cb-crackl {
  to { transform: translate(-8px, 6px) rotate(-18deg); }
}

@keyframes cb-crackr {
  to { transform: translate(8px, 6px) rotate(18deg); }
}

@keyframes cb-forkdrop {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  80% { transform: translate(20px, 84px) rotate(200deg); opacity: 1; }
  100% { transform: translate(24px, 86px) rotate(210deg); opacity: 0; }
}

@keyframes cb-dust {
  0% { opacity: 0; transform: scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.6) translateX(-40px); }
}

@keyframes cb-zip {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-120px); }
}

@keyframes cb-toss {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(-40px, 70px) rotate(160deg) scale(0.5); opacity: 0.2; }
}

@keyframes cb-sigh {
  0% { opacity: 0; transform: translate(0, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(40px, -24px); }
}

@keyframes cb-tear {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

@keyframes cb-flame {
  from { transform: scaleY(1) skewX(-4deg); }
  to { transform: scaleY(1.15) skewX(4deg); }
}

@keyframes cb-glowpulse {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

@keyframes cb-drop {
  0% { transform: translateY(-140px) scale(0.9); opacity: 0; }
  60% { transform: translateY(6px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cb__counter {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.cb__caption {
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: 3%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem 0.5rem;
  margin: 0 auto;
  width: fit-content;
  max-width: 94%;
  padding: 0.3rem 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.78rem, 2.1vw, 1.1rem);
  line-height: 1.3;
  text-align: center;
  color: var(--paper);
  background: rgba(16, 20, 19, 0.82);
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cb__caption.is-on {
  opacity: 1;
}

.cb__capwho {
  font-family: var(--font-display);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cb__caption[data-who="fred"] .cb__capwho {
  color: #ffb066;
}

.cb__caption[data-who="car"] .cb__capwho {
  color: #ff8fbb;
}

.cb__caption[data-who="esm"] .cb__capwho {
  color: #c6b3ff;
}

.cb__caption .cb__w {
  opacity: 0.5;
  transition: opacity 0.12s, color 0.12s;
}

.cb__caption .cb__w.is-said {
  opacity: 1;
  color: var(--yellow-400);
}

.cb__start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.7rem;
  padding: 1rem;
  text-align: center;
  background: rgba(16, 20, 19, 0.5);
}

.cb__start[hidden],
.cb__end[hidden] {
  display: none;
}

.cb__startbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1.3rem 0.7rem 0.8rem;
  background: var(--paper);
  border: 3px solid var(--teal-700);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  text-align: left;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.cb__startbtn:hover {
  transform: translateY(-2px) scale(1.02);
}

.cb__startbtn:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 3px;
}

.cb__startplay {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(2.6rem, 8vw, 3.4rem);
  height: clamp(2.6rem, 8vw, 3.4rem);
  border-radius: 50%;
  color: var(--paper);
  background: var(--orange-500);
  animation: cb-pulse 1.6s ease-in-out infinite;
}

.cb__startplay svg {
  width: 55%;
  height: 55%;
  fill: currentColor;
}

.cb__starttext strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.6vw, 1.3rem);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--teal-700);
}

.cb__starttext small {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(0.72rem, 1.9vw, 0.88rem);
  color: var(--ink-500);
}

.cb__startnote {
  margin: 0;
  padding: 0.2rem 0.7rem;
  font-size: clamp(0.72rem, 1.9vw, 0.88rem);
  color: var(--paper);
  background: rgba(16, 20, 19, 0.6);
  border-radius: var(--radius-pill);
}

.cb.is-waiting .cb__play {
  opacity: 0.6;
}

.cb__end {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4%;
  overflow: auto;
  background: rgba(16, 20, 19, 0.55);
}

.cb__endcard {
  max-width: 34rem;
  padding: clamp(0.8rem, 0.5rem + 1.5vw, 1.6rem);
  background: var(--paper);
  border: 3px solid var(--teal-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: popup-in 0.35s var(--ease);
}

.cb__endkicker {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(0.66rem, 1.8vw, 0.84rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
}

.cb__endcard h3 {
  margin-bottom: 0.4rem;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--teal-700);
}

.cb__endcard p {
  font-size: clamp(0.76rem, 2vw, 0.95rem);
  line-height: 1.45;
  color: var(--ink-700);
}

.cb__endactions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.cb__endactions .btn {
  font-size: clamp(0.76rem, 2vw, 0.95rem);
}

.cb__script {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(0.8rem, 0.4rem + 1.4vw, 1.3rem);
}

.cb__scripthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.cb__kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.cb__kicker svg {
  flex: none;
  fill: var(--orange-500);
}

.cb__expand {
  padding: 0.25rem 0.7rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 800;
  color: var(--teal-700);
  background: var(--paper);
  border: 2px solid var(--teal-200);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.cb__expand:hover {
  border-color: var(--teal-700);
}

.cb__lines {
  position: relative;
  margin: 0;
  padding: 0.2rem;
  list-style: none;
  max-height: 9.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (min-width: 900px) {
  .cb__lines {
    max-height: 24rem;
  }
}

.cb.is-open .cb__lines {
  max-height: none;
}

.cb__lines.has-above {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 1.4rem);
  mask-image: linear-gradient(180deg, transparent, #000 1.4rem);
}

.cb__lines.has-below {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 1.4rem), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 1.4rem), transparent);
}

.cb__lines.has-above.has-below {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 1.4rem, #000 calc(100% - 1.4rem), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 1.4rem, #000 calc(100% - 1.4rem), transparent);
}

.cb__lines li {
  margin: 0 0 0.15rem;
}

.cb__line {
  display: block;
  width: 100%;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.45;
  text-align: left;
  color: var(--ink-500);
  background: none;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.cb__line:hover {
  color: var(--teal-700);
  background: var(--teal-100);
}

.cb__who {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cb__line[data-who="fred"] .cb__who {
  color: var(--orange-600);
}

.cb__line[data-who="car"] .cb__who {
  color: #b8325f;
}

.cb__line[data-who="esm"] .cb__who {
  color: #5f4a9a;
}

.cb__line.is-past {
  color: var(--ink-300);
}

.cb__line.is-past .cb__who {
  opacity: 0.55;
}

.cb__line.is-now {
  color: var(--ink-900);
  font-weight: 700;
  background: var(--yellow-050);
  border-left-color: var(--orange-500);
}

.cb__line.is-now .cb__w {
  transition: color 0.12s, background 0.12s;
}

.cb__line.is-now .cb__w.is-said {
  color: var(--teal-700);
  background: var(--yellow-200);
  border-radius: 3px;
}

.cb__transport {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding: 0.55rem 0.7rem;
  background: var(--teal-700);
  border-radius: var(--radius-pill);
}

.cb audio {
  display: none;
}

.cb__play {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--paper);
  background: var(--orange-500);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.cb__play:hover {
  background: var(--orange-600);
  transform: scale(1.06);
}

.cb__play svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.cb__play .cb__pausemark,
.cb__play.is-playing .cb__playmark {
  display: none;
}

.cb__play.is-playing .cb__pausemark {
  display: block;
}

.cb__seek {
  flex: 1 1 auto;
  min-width: 0;
  height: 1.6rem;
  margin: 0;
  background: none;
  cursor: pointer;
  accent-color: var(--yellow-500);
}

.cb__time {
  flex: none;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  color: var(--teal-100);
}

.cb__foot {
  padding: 0.8rem clamp(0.9rem, 0.4rem + 1.6vw, 1.5rem);
  background: var(--paper);
  border-top: 1px solid var(--teal-200);
}

.cb__foot p {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-500);
}

.cb-plain audio {
  width: 100%;
  margin-top: 0.6rem;
}

.cb-plain p {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-500);
}

@keyframes cb-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.cast {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 720px) {
  .cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .cast {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.castcard {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--paper);
  border: 3px solid var(--teal-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.castcard__pic {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, var(--teal-100), var(--teal-050));
  border-bottom: 3px solid var(--teal-700);
}

.castcard__body {
  padding: 1rem 1.1rem 1.2rem;
}

.castcard__role {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-600);
}

.castcard h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: var(--step-1);
  color: var(--teal-700);
}

.castcard p {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-700);
}

.castcard--car .castcard__role {
  color: #b8325f;
}

.castcard--esm .castcard__role {
  color: #5f4a9a;
}

.castcard--todd .castcard__role {
  color: var(--teal-700);
}

@media (prefers-reduced-motion: reduce) {
  .cb-world,
  .cb-actor,
  .cb-scene,
  .cb-at,
  .cb-dim,
  .cb-spot,
  .cb-curtains,
  .cb__caption {
    transition: none;
  }

  .cb *,
  .cb *::before {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
  }

  .cb-mo {
    opacity: 0;
  }

  .cb-rig.is-talking .cb-mo {
    opacity: 1;
  }

  .cb-rig.is-talking .cb-mc {
    opacity: 0;
  }

  .cb-at.is-shown .cb-vaultdoor {
    transform: scaleX(0.08);
  }
}
