/* Counter scenes: the dialogs a visitor opens by touching something on Reggie's counter.
   The cast strip is built by counter-cast.js from the shop painting. */
.scene-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.counter-cast { display: flex; gap: 7px; }
.cast-chip { position: relative; width: 58px; text-align: center; }
.cast-chip i {
  display: block; aspect-ratio: 4 / 3; border: 2px solid var(--shop-ink); border-radius: 6px;
  background-color: #244c43; background-repeat: no-repeat;
}
.cast-chip b {
  display: block; margin-top: 2px; color: var(--shop-ink);
  font: bold 10px/1.2 'Courier New', monospace; letter-spacing: .06em; text-transform: uppercase;
}
.cast-chip[data-state="off"] i { filter: grayscale(1) contrast(.8); opacity: .45; }
.cast-chip[data-state="off"] b { color: var(--shop-muted); }
.cast-chip[data-state="speaking"] i { box-shadow: 0 0 0 2px var(--shop-paper), 0 0 0 5px var(--shop-violet); }
.cast-chip[data-state="speaking"] b { color: var(--shop-violet); }
.cast-chip em {
  position: absolute; z-index: 1; top: -9px; right: -9px; min-width: 22px; padding: 1px 5px 3px;
  border: 2px solid var(--shop-ink); border-radius: 10px; background: var(--shop-lime); color: var(--shop-ink);
  font: italic 900 14px/1 'Arial Black', Impact, sans-serif; transform: rotate(-3deg);
}
.cast-chip em[hidden] { display: none; }
.cast-chip em.pop { animation: cast-pop .34s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes cast-pop { 0% { opacity: 0; transform: scale(.3) rotate(-14deg); } 100% { opacity: 1; transform: rotate(-3deg); } }

/* Bomi's tape. The words and the square or triangle carry the state. The wobble is extra. */
.scene-tape {
  flex: 1 1 190px; display: flex; align-items: center; gap: 8px; margin: 0;
  color: var(--shop-ink); font: bold 13px/1.25 'Courier New', monospace;
}
.scene-tape img { flex: none; width: 38px; height: 24px; }
.scene-tape span { flex: 1; }
.scene-tape span::before { content: '▶ '; color: var(--shop-violet); }
.scene-tape[data-tape="stopped"] span::before { content: '■ '; color: #9d253b; }
.scene-tape[data-tape="stopped"] img { filter: grayscale(1); opacity: .6; }
.scene-tape button {
  flex: none; min-width: 44px; min-height: 44px; padding: 4px 8px; border: 2px solid var(--shop-ink);
  background: transparent; color: var(--shop-ink); font: bold 12px/1.2 'Courier New', monospace;
}
.scene-tape button[aria-pressed="true"] { background: var(--shop-lime); }
.scene-tape[data-tape="rolling"] img { animation: talk-thump .52s steps(1) infinite; }
.scene-top:has(.scene-tape[data-tape="rolling"]) .cast-chip[data-actor="Bomi"] i { animation: talk-thump .52s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) {
  .cast-chip em.pop, .scene-tape[data-tape="rolling"] img,
  .scene-top:has(.scene-tape[data-tape="rolling"]) .cast-chip[data-actor="Bomi"] i { animation: none; }
}
@media (max-width: 640px) {
  .cast-chip { width: 50px; }
}
