/* Stage layers for the Bjorndroid performer. Everything is transparent when idle. */
.hl-stage { position: relative; overflow: hidden; background: transparent; }
.hl-layer { position: absolute; inset: 0; pointer-events: none; }
.hl-actor { position: absolute; will-change: transform; }
.hl-shake, .hl-breath, .hl-move, .hl-talk, .hl-body { width: 100%; height: 100%; transform-origin: 50% 100%; }
.hl-body { position: relative; }
.hl-fig { position: relative; }
.hl-pose { display: block; user-select: none; }
.hl-mouth, .hl-blink { position: absolute; visibility: hidden; pointer-events: none; user-select: none; }
.hl-ghost { position: absolute; bottom: 0; left: 50%; opacity: 0; pointer-events: none; user-select: none; }

.hl-bubble {
  position: absolute; box-sizing: border-box; width: max-content;
  padding: .55em .8em .65em; border-radius: .7em;
  background: #fff; color: #14122b; border: .12em solid #14122b;
  box-shadow: 0 .25em 0 #14122b, 0 .6em 1.6em rgba(0, 0, 0, .35);
  font: 800 1em/1.18 "Segoe UI", system-ui, sans-serif; letter-spacing: -.01em;
  transform-origin: var(--tail-x, 50%) 100%;
}
.hl-bubble::after {
  content: ""; position: absolute; top: 100%; left: var(--tail-x, 50%);
  width: .9em; height: .9em; margin: -.48em 0 0 -.45em; background: #fff;
  border: .12em solid #14122b; border-top: 0; border-left: 0; transform: rotate(45deg);
  box-shadow: .14em .14em 0 #14122b;
}
/* Long pointer, when the bubble had to move aside (the seller's camera) and he isn't under it. */
.hl-bubble.far::after { display: none; }
.hl-tail { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.hl-tail path { fill: #fff; stroke: #14122b; stroke-width: .12em; stroke-linejoin: round; }
.hl-bubble-text, .hl-bubble-tag { position: relative; }
.hl-bubble-tag {
  font: 900 .42em/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .14em;
  color: #6a4cff; margin-bottom: .55em;
}
.hl-bubble-text .hl-w { opacity: .16; transition: opacity 90ms linear; }
.hl-bubble-text .hl-w.on { opacity: 1; }

.hl-fx { position: absolute; inset: 0; }
.hl-confetti { position: absolute; inset: 0; width: 100%; height: 100%; }
.hl-flash { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; }
.hl-alarm { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 calc(12 * var(--u, 1vmin)) calc(3 * var(--u, 1vmin)) rgba(255, 30, 50, .85); }
.hl-ring { position: absolute; box-sizing: border-box; border: calc(.6 * var(--u, 1vmin)) solid; border-radius: 50%; }
.hl-bolts { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; filter: drop-shadow(0 0 calc(1.2 * var(--u, 1vmin)) #7fe3ff); }
.hl-speed {
  position: absolute; height: calc(.35 * var(--u, 1vmin)); border-radius: calc(1 * var(--u, 1vmin));
  background: linear-gradient(90deg, rgba(160, 235, 255, 0), rgba(200, 245, 255, .95));
}
.hl-speed-v { width: calc(.35 * var(--u, 1vmin)); background: linear-gradient(180deg, rgba(160, 235, 255, .95), rgba(160, 235, 255, 0)); }

/* Bits: comic impact text, twinkles, props (goalposts). */
.hl-comic {
  position: absolute; white-space: nowrap; pointer-events: none;
  font: italic 900 1em/1 "Arial Black", "Segoe UI Black", Impact, system-ui, sans-serif; letter-spacing: .02em;
  color: #ffd23f; -webkit-text-stroke: .06em #14122b; paint-order: stroke fill;
  text-shadow: .05em .07em 0 #14122b, 0 0 .4em rgba(255, 210, 63, .45);
}
.hl-twinkle { position: absolute; pointer-events: none; }
.hl-twinkle svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hl-twinkle path { fill: #fff; filter: drop-shadow(0 0 calc(1 * var(--u, 1vmin)) #9fe3ff); }
.hl-prop { position: absolute; pointer-events: none; overflow: visible; }

/* Set pieces: scenery behind the figures. */
.hl-sets { position: absolute; inset: 0; pointer-events: none; }
.hl-set { position: absolute; user-select: none; }

/* Cut scenes: a pre-made transparent video over the whole stage. */
.hl-cutscene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* An episode is opaque and takes over the whole frame: black around it if its shape differs. */
.hl-episode { background: #000; z-index: 5; }

/* The chat vote's ballot (src/renderer/ballot.ts): a card in the same ink as the speech bubbles. */
.hl-ballot {
  position: absolute; box-sizing: border-box; overflow: hidden; pointer-events: none;
  padding: .7em .8em .9em; border-radius: .7em;
  background: #fff; color: #14122b; border: .12em solid #14122b;
  box-shadow: 0 .25em 0 #14122b, 0 .6em 1.6em rgba(0, 0, 0, .35);
  font: 800 1em/1.15 "Segoe UI", system-ui, sans-serif; letter-spacing: -.01em;
}
.hl-ballot-tag { font: 900 .5em/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .16em; color: #6a4cff; }
.hl-ballot-q { font-size: 1.15em; font-weight: 900; margin: .3em 0 .5em; }
.hl-ballot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35em; }
.hl-ballot-opt {
  position: relative; display: flex; align-items: center; gap: .5em; overflow: hidden;
  padding: .32em .5em .32em .32em; border-radius: .45em; border: .08em solid #14122b; background: #f1eefc;
  transition: opacity .3s ease, background-color .3s ease;
}
.hl-ballot-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #c9bdff; transition: width .35s cubic-bezier(.2,.8,.3,1); }
.hl-ballot-n {
  position: relative; flex: none; display: grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: .35em;
  background: #14122b; color: #fff; font-weight: 900;
}
.hl-ballot-name { position: relative; flex: 1; min-width: 0; }
.hl-ballot-pct { position: relative; flex: none; font-size: .8em; font-variant-numeric: tabular-nums; color: #3b3560; }
.hl-ballot-foot { margin-top: .55em; font-size: .62em; font-weight: 700; color: #3b3560; }
.hl-ballot-time { position: absolute; left: 0; right: 0; bottom: 0; height: .28em; background: #6a4cff; transform-origin: 0 50%; transition: transform .2s linear; }
.hl-ballot.hurry .hl-ballot-time { background: #ff4d6d; }
.hl-ballot.done .hl-ballot-opt:not(.win) { opacity: .35; }
.hl-ballot.done .hl-ballot-opt.win { background: #ffe066; }
.hl-ballot.done .hl-ballot-opt.win .hl-ballot-bar { background: #ffd23f; }
.hl-ballot.done .hl-ballot-time { display: none; }
