/* Site screens. theme.css (loaded first) holds the tokens and building blocks;
   this file styles the site: header, every screen, the game tiles, the cinema
   hosts and their plain fallbacks, and the playing screen HUD. Mobile first. */

/* fast taps never zoom the page; game stages that need raw touches still set
   their own touch-action, which wins over this */
html,
body {
  touch-action: manipulation;
}
:where(*) {
  touch-action: manipulation;
}

:root {
  --bar-h: 58px;
  --bar-full: calc(var(--bar-h) + var(--safe-t));
  --skin: #f1c29a;
  --hair: #2a1e3d;
  --me-c: var(--blue);
  --me-hi: var(--blue-hi);
}

/* a faint diagonal speed-stripe layer over the theme backdrop */
#app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(-58deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 22px);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000, transparent 75%);
}

/* ---- header bar --------------------------------------------------------------------- */
#bar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--bar-full);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--safe-t) 12px 0;
  background: linear-gradient(180deg, rgba(11, 10, 20, 0.94), rgba(11, 10, 20, 0.8));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}
#bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0 36%, var(--violet) 36% 64%, var(--red) 64%);
  opacity: 0.9;
}
#logo {
  flex: none;
  display: block;
  width: 124px;
  text-decoration: none;
  color: #fff;
  transition: transform var(--t-med) var(--ease-spring);
}
#logo:hover {
  transform: rotate(-2deg) scale(1.04);
}
#logo:active {
  transform: scale(0.96);
}
.logo-text {
  font: 400 22px/1 var(--font-display);
  letter-spacing: 0.02em;
}
#barinfo {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.bar-hi b {
  color: #fff;
}
.bar-room {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-room b {
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 0.12em;
}
.icon-btn,
#mute {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: var(--outline);
  border-radius: 12px;
  background: var(--panel-hi);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 3px 0 var(--ink),
    inset 0 2px 0 rgba(255, 255, 255, 0.16);
  transition: transform var(--t-fast) var(--ease-spring);
}
#mute:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
#mute[aria-pressed="true"] {
  color: var(--muted);
}

/* the wordmark: chrome letters, ink outline, a light sweep */
.wordmark {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.wordmark text {
  font-family: var(--font-display);
  font-size: 118px;
  letter-spacing: 0;
}
.wm-sweep {
  animation: wm-sweep 5.5s var(--ease-out) infinite;
  animation-delay: 1.2s;
}
@keyframes wm-sweep {
  0% {
    transform: skewX(-20deg) translateX(0);
  }
  40%,
  100% {
    transform: skewX(-20deg) translateX(640px);
  }
}
.wm-hero .wm-slash {
  animation: wm-pulse 2.6s ease-in-out infinite alternate;
}
@keyframes wm-pulse {
  to {
    opacity: 0.75;
  }
}

/* in a match the bar is a compact scoreboard */
.sb {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.sb-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sb-seat[data-seat="1"] {
  justify-content: flex-end;
}
.sb-name {
  min-width: 0;
  font: 800 14px/1.1 var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-seat[data-seat="0"] .sb-name {
  color: var(--blue-hi);
}
.sb-seat[data-seat="1"] .sb-name {
  color: var(--red-hi);
}
.sb-seat.is-away .sb-name {
  opacity: 0.5;
}
.sb-seat.is-me .sb-name::after {
  content: "you";
  display: inline-block;
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.sb-score {
  position: relative;
  flex: none;
  min-width: 50px;
  padding: 5px 7px 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font: 800 15px/1 var(--font-mono);
  text-align: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
/* the seat color: a straight bar set inside the chip, clear of the rounded corners */
.sb-score::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 1px;
  background: var(--blue);
}
.sb-seat[data-seat="1"] .sb-score {
  padding: 5px 12px 4px 7px;
}
.sb-seat[data-seat="1"] .sb-score::before {
  left: auto;
  right: 3px;
  background: var(--red);
}
.sb-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.sb-round {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}
.sb-round.is-sudden {
  color: var(--warn);
}
.sb-code {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.16em;
}
@media (max-width: 560px) {
  body.in-match #logo {
    width: 64px;
  }
  .sb {
    gap: 5px;
  }
  .sb-seat {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .sb-seat[data-seat="1"] {
    align-items: flex-end;
  }
  .sb-name {
    max-width: 100%;
    font-size: 12px;
  }
  .sb-seat.is-me .sb-name::after {
    display: none;
  }
  .sb-score {
    min-width: 0;
    padding: 3px 6px 2px 11px;
    font-size: 14px;
  }
  .sb-seat[data-seat="1"] .sb-score {
    padding: 3px 11px 2px 6px;
  }
}

/* ---- page shell -------------------------------------------------------------------------- */
main {
  margin: 0;
  padding: 0;
  /* the hero burst and the tilted marquee bleed past the screen edge; clip keeps phones
     from widening the page (body's overflow-x: hidden alone does not stop that) */
  overflow-x: clip;
}
.scr {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding: 18px 0 calc(40px + var(--safe-b));
}
.loading {
  min-height: calc(100dvh - var(--bar-full) - 40px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
}
.loading-mark {
  font: 400 44px/1 var(--font-display);
  color: var(--blue-hi);
  letter-spacing: 0.02em;
}
.loading-mark i {
  font-style: normal;
  color: var(--violet-hi);
  margin: 0 4px;
}
.loading-mark i + * {
  color: var(--red-hi);
}
.loading-bar {
  width: 140px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--deep);
  overflow: hidden;
}
.loading-bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--red));
  animation: load-run 1.1s var(--ease-out) infinite;
}
@keyframes load-run {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(260%);
  }
}

/* plain buttons left on site screens get the chunky look. Zero specificity (:where) */
:where(#app button:not(.btn, .card, .gcard, .seg > button, #game *)) {
  min-height: 44px;
  padding: 8px 16px;
  margin: 0;
  border: var(--outline);
  border-radius: 12px;
  background: var(--panel-hi);
  color: #fff;
  font: 700 16px/1.1 var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 4px 0 var(--ink),
    inset 0 2px 0 rgba(255, 255, 255, 0.16);
}
/* plain buttons inside a game keep the old sizes (layouts depend on them), in dark colors */
:where(#game button:not(.btn, .card)) {
  font: inherit;
  padding: 8px 14px;
  margin: 4px 4px 4px 0;
  background: var(--panel-hi);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
}
:where(button:disabled) {
  opacity: 0.45;
  cursor: default;
}

/* shared bits */
.dots3 {
  display: inline-flex;
  gap: 3px;
  margin: 0 4px;
  vertical-align: middle;
}
.dots3 i {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  animation: dot-hop 1s var(--ease-out) infinite;
}
.dots3 i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots3 i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot-hop {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
.err:empty {
  display: none;
}
.err-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #5a1424, #3a0d18);
  border-color: var(--ink);
  font-weight: 800;
  color: #fff;
}
.err-banner::before {
  content: "";
  flex: none;
  width: 8px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--red);
}

/* ---- game tiles: the rendered 3D icon on a dramatic panel ---------------------------------- */
.gtile {
  --gc: var(--violet);
  position: relative;
  flex: none;
  display: block;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 50% 44%, #3a2a66 0%, var(--panel) 60%, var(--deep) 100%);
  background: radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--gc) 62%, #1c1930) 0%, color-mix(in srgb, var(--gc) 14%, #161328) 58%, #0e0c1a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.16),
    inset 0 -12px 20px rgba(0, 0, 0, 0.4);
}
.gtile-burst {
  position: absolute;
  inset: -42%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0deg 9deg, transparent 9deg 22.5deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 58%);
  mask-image: radial-gradient(circle, #000 12%, transparent 58%);
  animation: gt-spin 24s linear infinite;
}
.gtile-ico {
  position: absolute;
  inset: 4%;
  animation: gt-bob 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.5));
}
.gtile-ico .bb-icon-sprite {
  width: 100%;
  height: 100%;
}
.gtile-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.3) 48%, transparent 58%);
  transform: translateX(-110%);
  animation: gt-shine 6s var(--ease-out) infinite;
}
@keyframes gt-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes gt-bob {
  from {
    transform: translateY(2%);
  }
  to {
    transform: translateY(-3%);
  }
}
@keyframes gt-shine {
  0%,
  70% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(110%);
  }
}
:nth-child(3n + 2) > .gtile .gtile-ico,
:nth-child(3n + 2) > .gtile-ico {
  animation-delay: -1.1s;
}
:nth-child(3n) > .gtile .gtile-ico {
  animation-delay: -2.2s;
}
:nth-child(4n + 1) > .gtile .gtile-shine {
  animation-delay: -1.5s;
}
:nth-child(4n + 2) > .gtile .gtile-shine {
  animation-delay: -3s;
}
:nth-child(4n + 3) > .gtile .gtile-shine {
  animation-delay: -4.5s;
}
.gtile-sm {
  width: 76px;
  border-radius: 14px;
}
.gtile-xs {
  width: 44px;
  border-radius: 10px;
  border-width: 2px;
}
.gtile-xs .gtile-shine,
.gtile-xs .gtile-burst {
  display: none;
}

/* game card (picking, choosing) */
.gcard {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 8px 8px 12px;
  margin: 0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel) 62%);
  box-shadow: var(--drop), var(--hilite);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition:
    transform 0.5s var(--ease-spring),
    box-shadow var(--t-fast),
    border-color var(--t-fast),
    opacity var(--t-med);
}
.gcard:hover {
  --lift: -3px;
  transform: perspective(700px) translateY(-3px) rotateX(var(--rx)) rotateY(var(--ry));
}
.gcard:active {
  transform: perspective(700px) translateY(3px) scale(0.97);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    var(--hilite);
  transition-duration: 60ms;
}
.gcard:disabled {
  opacity: 0.38;
  filter: saturate(0.4);
  cursor: default;
  transform: none;
}
.gcard-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 0 4px;
}
.gcard-name {
  font: 800 16px/1.12 var(--font-body);
  overflow-wrap: anywhere;
}
.gcard-tag {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.gcard-kind {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 6px 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font: 800 10px/1.2 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gcard-check {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 11px;
  background: var(--me-c);
  color: #fff;
  box-shadow: 0 3px 0 var(--ink);
  transform: scale(0) rotate(-30deg);
  transition: transform 0.36s var(--ease-spring);
}
.gcard-check svg {
  width: 22px;
  height: 22px;
}
.gcard.on {
  border-color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--me-c) 34%, #262242), var(--panel) 70%);
  box-shadow:
    0 0 0 3px var(--me-c),
    0 0 0 6px var(--ink),
    0 9px 0 3px rgba(0, 0, 0, 0.45),
    0 0 28px color-mix(in srgb, var(--me-c) 55%, transparent);
}
.gcard.on .gcard-check {
  transform: scale(1) rotate(0);
}
.gcard.on .gtile-burst {
  animation-duration: 7s;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.3) 0deg 9deg, transparent 9deg 22.5deg);
}
.gcard-sm {
  gap: 6px;
  padding: 6px 6px 9px;
  border-radius: 16px;
  text-align: center;
}
.gcard-sm .gtile {
  border-radius: 12px;
}
.gcard-sm .gcard-body {
  padding: 0;
}
.gcard-sm .gcard-name {
  font-size: 13px;
}

/* catalog marquee */
.marquee {
  position: relative;
  overflow: hidden;
  margin: 0 -16px;
  padding: 14px 0 18px;
  transform: rotate(-2.5deg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: mq-run calc(var(--n, 30) * 2.4s) linear infinite;
}
.mq-item {
  flex: none;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.45));
}
.mq-item:nth-child(odd) {
  transform: translateY(6px) rotate(2deg);
}
.mq-item:nth-child(even) {
  transform: rotate(-2deg);
}
@keyframes mq-run {
  to {
    transform: translateX(calc(-50% - 6px));
  }
}

/* ---- timer bar ----------------------------------------------------------------------------- */
.tbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tbar-label:empty {
  display: none;
}
.tbar-label {
  font: 800 11px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tbar-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--deep);
  overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5);
}
.tbar-track i {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: linear-gradient(180deg, #6af2c4, var(--mint) 50%, var(--mint-deep));
  transition:
    transform 0.25s linear,
    background var(--t-med);
}
.tbar-track i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px);
  animation: tb-stripes 0.8s linear infinite;
}
@keyframes tb-stripes {
  to {
    background-position: 17px 0;
  }
}
.tbar.is-low .tbar-track i {
  background: linear-gradient(180deg, #ffc27a, var(--warn) 50%, #b85a0a);
}
.tbar.is-crit .tbar-track i {
  background: linear-gradient(180deg, #ff8e99, var(--red) 50%, var(--red-deep));
}
.tbar-num {
  flex: none;
  min-width: 34px;
  padding: 4px 6px 3px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--panel-hi);
  font: 800 15px/1 var(--font-mono);
  text-align: center;
}
.tbar-num::after {
  content: "s";
  color: var(--muted);
  font-size: 11px;
}
.tbar.is-crit .tbar-num {
  color: var(--red-hi);
  animation: bb-shake 0.3s linear;
}

/* ---- name entry ------------------------------------------------------------------------------ */
.scr-name {
  min-height: calc(100dvh - var(--bar-full));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding-top: 12px;
}
.hero {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 18px 0 4px;
}
.hero-burst {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(150vw, 980px);
  aspect-ratio: 1;
  z-index: -1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(124, 58, 237, 0.24) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 52%);
  mask-image: radial-gradient(circle, #000 8%, transparent 52%);
  animation: hero-spin 60s linear infinite;
}
@keyframes hero-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.hero-mark {
  width: min(92%, 560px);
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 30px rgba(124, 58, 237, 0.35));
}
.hero-line {
  max-width: 30ch;
  margin: 12px auto 0;
  font: 700 clamp(17px, 4.6vw, 21px) / 1.3 var(--font-body);
  color: #e9e6ff;
}
.name-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.name-input {
  width: 100%;
  min-height: 60px;
  font-size: 22px;
  text-align: center;
}
.name-card .err {
  margin: 0;
  text-align: center;
  font-weight: 700;
}
.foot-note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---- home ----------------------------------------------------------------------------------- */
.scr-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 980px;
}
/* "Hey" sits as an eyebrow over the name, both on the same left edge */
.home-hi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}
.home-hi .eyebrow {
  padding-left: 2px;
}
.home-name {
  margin: 0;
  min-width: 0;
  font-size: clamp(38px, 11vw, 64px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.55);
}
.modes {
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .modes {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.mode {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.mode::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(90% 70% at 100% 0%, var(--mode-glow), transparent 70%),
    repeating-linear-gradient(-58deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 14px);
}
.mode > * {
  position: relative;
}
.mode-friend {
  --mode-glow: rgba(124, 58, 237, 0.38);
}
.mode-robo {
  --mode-glow: rgba(255, 59, 78, 0.3);
}
.mode-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mode-art {
  flex: none;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  position: relative;
}
/* the bros, rendered from the same 3D models as the lobby and the big moments */
.mode-art .mode-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.35));
}
.mode-art-duo {
  width: 118px;
  height: 100px;
  margin: -6px -4px -6px -8px;
  animation: duo-bob 1.8s ease-in-out infinite alternate;
}
.mode-art-robo {
  width: 100px;
  height: 100px;
  margin: -6px -2px -6px -6px;
}
.mode-art .bro-fig {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.4));
}
.mode-art-duo .duo {
  position: absolute;
  width: 64px;
  height: 68px;
  bottom: 4px;
  animation: duo-bob 1.8s ease-in-out infinite alternate;
}
.duo0 {
  left: 0;
  --bc: var(--blue);
  --bd: var(--blue-deep);
}
.duo1 {
  right: 0;
  --bc: var(--red);
  --bd: var(--red-deep);
  animation-delay: -0.9s !important;
}
.duo1 .bro-fig {
  transform: scaleX(-1);
}
.duo .bro-fig {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.4));
}
@keyframes duo-bob {
  to {
    transform: translateY(-5px);
  }
}
.mode-art-robo {
  --bc: var(--red);
  --bd: var(--red-deep);
  animation: duo-bob 2.2s ease-in-out infinite alternate;
}
.mode-title {
  margin: 0;
  font-size: clamp(30px, 8vw, 40px);
}
.mode-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 800 12px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
}
.codeform {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.codebox {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  cursor: text;
}
.codebox input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  text-transform: uppercase;
  outline: none;
}
.codebox input:focus {
  box-shadow: none;
}
.cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cells i {
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--deep);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35);
  font: 800 26px/1 var(--font-mono);
  font-style: normal;
  color: #fff;
  transition:
    transform var(--t-fast) var(--ease-spring),
    border-color var(--t-fast);
}
.cells i.is-filled {
  background: var(--panel-hi);
  animation: bb-pop-in 0.22s var(--ease-spring);
}
.cells i.is-on {
  border-color: var(--violet-hi);
  box-shadow:
    inset 0 3px 0 rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(124, 58, 237, 0.45);
}
.cells i.is-on:empty::after {
  content: "";
  width: 3px;
  height: 26px;
  border-radius: 2px;
  background: var(--violet-hi);
  animation: caret 1s steps(2) infinite;
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.join-btn {
  flex: none;
  min-height: 54px;
  min-width: 84px;
}
.seg-level {
  --seg-on: var(--red);
}
.catalog-strip {
  margin-top: 6px;
  text-align: center;
}
.strip-title {
  margin-bottom: -4px;
}
.home-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--dim);
  font-weight: 700;
}
.home-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

/* ---- lobby: character select -------------------------------------------------------------------- */
.scr-lobby {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 920px;
}
.fighters {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.f-slot {
  min-width: 0;
}
.fighter {
  --bc: var(--blue);
  --bd: var(--blue-deep);
  --bh: var(--blue-hi);
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: min(46vh, 420px);
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--drop);
}
.fighter.f1 {
  --bc: var(--red);
  --bd: var(--red-deep);
  --bh: var(--red-hi);
}
.f-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--bh) 55%, transparent), transparent 70%),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.07) 0 3px, transparent 3px 16px),
    linear-gradient(160deg, var(--bc), var(--bd) 80%);
}
.f1 .f-bg {
  background:
    radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--bh) 55%, transparent), transparent 70%),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.07) 0 3px, transparent 3px 16px),
    linear-gradient(200deg, var(--bc), var(--bd) 80%);
}
.f-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 18%), linear-gradient(0deg, rgba(5, 4, 10, 0.75), transparent 40%);
}
.f-bro {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  bottom: 13%;
  top: 14%;
  display: grid;
  place-items: end center;
  animation: f-idle 1.6s ease-in-out infinite alternate;
}
.f1 .f-bro {
  animation-delay: -0.8s;
}
.f-bro .bro-fig {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35));
}
.f1 .f-bro .bro-fig {
  transform: scaleX(-1);
}
.f-3d {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  pointer-events: none;
}
.f-3d .bb3d {
  background: transparent;
}
.fighters.has-3d .f-bro {
  visibility: hidden;
}
@keyframes f-idle {
  from {
    transform: translateY(0) scaleY(1);
  }
  to {
    transform: translateY(-4px) scaleY(1.015);
  }
}
.f-plate {
  position: absolute;
  z-index: 3;
  left: -6px;
  right: -6px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px 6px;
  background: var(--ink);
  transform: skewY(-4deg);
  border-top: 3px solid var(--bc);
  box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.3);
}
.f1 .f-plate {
  transform: skewY(4deg);
}
.f-name {
  min-width: 0;
  font: 400 clamp(20px, 6vw, 34px) / 1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.f-tags {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.f1 .f-tags {
  justify-content: flex-end;
}
.f-tag {
  min-height: 20px;
  padding: 2px 6px;
  font-size: 10px;
}
.f-tag:not([class*="badge-"]) {
  background: #fff;
  color: var(--ink);
}
.fighter.is-empty {
  --bc: var(--line);
  border-style: dashed;
  border-color: var(--line);
  box-shadow: none;
  background: var(--deep);
}
.is-empty .f-bg {
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.03) 0 3px, transparent 3px 16px),
    linear-gradient(200deg, #1c1930, #100e1d);
}
.f-wait {
  position: absolute;
  z-index: 1;
  inset: 14% 8% 13%;
  max-width: 230px;
  margin: 0 auto;
  display: grid;
  place-items: end center;
  overflow: hidden;
}
.f-q {
  width: 100%;
  height: 100%;
  opacity: 0.28;
  filter: brightness(0) invert(0.45);
  animation: f-breathe 1.6s ease-in-out infinite alternate;
}
.f-q .bro-fig {
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}
@keyframes f-breathe {
  to {
    opacity: 0.5;
  }
}
.f-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.22), transparent);
  animation: f-scan 2.2s ease-in-out infinite;
}
@keyframes f-scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(340%);
  }
}
.is-empty .f-plate {
  border-top-color: var(--line);
}
.is-empty .f-name {
  color: var(--muted);
}
.f-dots {
  display: inline-flex;
  gap: 4px;
}
.f-dots i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--muted);
  animation: dot-hop 1s var(--ease-out) infinite;
}
.f-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.f-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
.vs-chip {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 4;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(135deg, #a77bff, var(--violet) 55%, var(--violet-deep));
  box-shadow:
    0 5px 0 var(--ink),
    0 0 26px rgba(124, 58, 237, 0.7);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: vs-pulse 1.4s ease-in-out infinite alternate;
}
.vs-chip span {
  transform: rotate(-45deg);
  font: 400 26px/1 var(--font-display);
  color: #fff;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
@keyframes vs-pulse {
  to {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.08);
  }
}
.ready-banner {
  position: absolute;
  left: -16px;
  right: -16px;
  top: 40%;
  z-index: 6;
  pointer-events: none;
  display: grid;
  place-items: center;
  padding: 12px 0 10px;
  background: linear-gradient(90deg, var(--blue), var(--gold) 30% 70%, var(--red));
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: skewY(-5deg);
  opacity: 0;
}
.ready-banner span {
  font: 400 clamp(28px, 8vw, 46px) / 1 var(--font-display);
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
}
.ready-banner[hidden] {
  display: none;
}
.ready-banner.go {
  animation: ready-go 2.6s var(--ease-slam) forwards;
}
@keyframes ready-go {
  0% {
    opacity: 0;
    transform: skewY(-5deg) scaleX(0.2);
  }
  12% {
    opacity: 1;
    transform: skewY(-5deg) scaleX(1.06);
  }
  20%,
  78% {
    opacity: 1;
    transform: skewY(-5deg) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: skewY(-5deg) translateX(30%);
  }
}
@media (min-width: 760px) {
  .fighter {
    max-height: min(40vh, 400px);
  }
}
.lobby-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.lobby-row > * {
  min-width: 0;
}
@media (min-width: 800px) {
  .lobby-row {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: start;
  }
}
.invite {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(255, 201, 60, 0.18), transparent 70%),
    linear-gradient(180deg, var(--panel-hi), var(--panel) 46%);
}
.invite[hidden] {
  display: none;
}
.code-big {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.code-big span {
  display: grid;
  place-items: center;
  height: 64px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, #e9a91f);
  color: var(--ink);
  font: 800 34px/1 var(--font-mono);
  box-shadow:
    0 5px 0 var(--gold-deep),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
  animation: bb-pop-in 0.5s var(--ease-spring) both;
}
.code-big span:nth-child(2) {
  animation-delay: 0.06s;
}
.code-big span:nth-child(3) {
  animation-delay: 0.12s;
}
.code-big span:nth-child(4) {
  animation-delay: 0.18s;
}
.linkrow {
  display: flex;
  gap: 8px;
}
.linkrow input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  font: 600 14px/1 var(--font-mono);
  color: var(--muted);
}
.linkrow .btn {
  flex: none;
}
.lobby-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rules-who {
  margin-top: 4px;
  font-size: 13px;
}
.seg-rounds button {
  font: 800 18px/1 var(--font-mono);
}
.seg-rounds.is-locked button:disabled {
  opacity: 1;
  cursor: default;
}
.seg-rounds.is-locked button:disabled:not([aria-checked="true"]) {
  opacity: 0.55;
}
.pts3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--deep);
  box-shadow: var(--drop-sm);
  text-align: center;
}
.pt b {
  font-size: 22px;
  line-height: 1;
}
.pt span {
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
  font-weight: 700;
}
.pt-own b {
  color: #fff;
}
.pt-neu b {
  color: var(--violet-hi);
}
.pt-opp {
  background: linear-gradient(180deg, #3b2c14, var(--deep));
}
.pt-opp b {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 201, 60, 0.5);
}
.rules-note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.lobby-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.start-btn {
  --b-bg: #3a3658;
  --b-deep: var(--ink);
  min-height: 84px;
  font-size: 36px;
  overflow: hidden;
}
.start-btn:disabled {
  opacity: 0.6;
}
.start-btn.is-ready {
  --b-bg: var(--mint);
  --b-fg: var(--ink);
  --b-deep: var(--mint-deep);
  animation: start-glow 1.2s ease-in-out infinite alternate;
}
.start-btn.is-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: gt-shine 2.4s var(--ease-out) infinite;
}
@keyframes start-glow {
  from {
    filter: drop-shadow(0 0 0 rgba(46, 230, 168, 0));
  }
  to {
    filter: drop-shadow(0 0 18px rgba(46, 230, 168, 0.7));
  }
}
.cta-note {
  margin: 0;
  text-align: center;
  font-size: 14px;
}
.wait-host {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  padding: 12px;
  border: 3px dashed var(--line);
  border-radius: 16px;
  font-weight: 800;
  color: var(--muted);
}
.wait-host .p0 {
  margin: 0 0.25em;
}
.leave-btn {
  align-self: center;
  color: var(--muted);
}
.leave-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- picking ------------------------------------------------------------------------------------- */
.seat-me-1 {
  --me-c: var(--red);
  --me-hi: var(--red-hi);
}
.scr-picking {
  padding-bottom: calc(150px + var(--safe-b));
}
.pick-head {
  margin-bottom: 14px;
}
.pick-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pick-title h2 {
  margin: 0;
  font-size: clamp(32px, 9vw, 52px);
}
.pick-sub {
  margin: 6px 0 0;
  font-weight: 600;
  color: #dcd9f2;
  font-size: 15px;
}
.pick-note {
  margin: 6px 0 0;
  font-size: 13px;
}
.pick-count {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 12px 6px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--deep);
  box-shadow: var(--drop-sm);
}
.pick-count b {
  font-size: 34px;
  line-height: 1;
  color: var(--me-hi);
  display: inline-block;
}
.pick-count span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
}
.pick-count.is-full b {
  color: var(--gold);
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px 12px;
}
@media (max-width: 520px) {
  .pick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .pick-grid .gcard {
    gap: 6px;
    padding: 5px 5px 9px;
    border-radius: 15px;
  }
  .pick-grid .gtile {
    border-radius: 11px;
  }
  .pick-grid .gcard-body {
    padding: 0 2px;
    gap: 3px;
  }
  .pick-grid .gcard-name {
    font-size: 13.5px;
  }
  .pick-grid .gcard-tag {
    font-size: 11.5px;
    line-height: 1.25;
  }
  .pick-grid .gcard-kind {
    font-size: 9px;
    padding: 2px 5px 1px;
  }
  .pick-grid .gcard-check {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    top: -7px;
    right: -7px;
  }
  .pick-grid .gcard-check svg {
    width: 18px;
    height: 18px;
  }
}
.scr-picking.is-locked .gcard:not(.on) {
  opacity: 0.3;
}
.pick-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 10px 16px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, rgba(11, 10, 20, 0.6), rgba(11, 10, 20, 0.96) 30%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 3px solid var(--ink);
}
.dock-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dock-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dock-meta .tbar {
  flex: 1 1 auto;
}
.dock-pips {
  display: grid;
  grid-template-columns: repeat(3, 16px);
  gap: 5px;
  flex: none;
}
.dock-pips i {
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--deep);
  transition:
    background var(--t-fast),
    transform var(--t-med) var(--ease-spring);
}
.dock-pips i.on {
  background: var(--me-c);
  transform: scale(1.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
.lock-btn {
  flex: 1 1 auto;
}
.lock-btn.is-locked {
  --b-bg: var(--mint);
  --b-deep: var(--mint-deep);
  opacity: 1;
  filter: none;
}
.opp-status {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.opp-name {
  min-width: 0;
  max-width: 34vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-status.seat-0 .opp-name {
  color: var(--blue-hi);
}
.opp-status.seat-1 .opp-name {
  color: var(--red-hi);
}
.opp-state {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
}
.opp-state svg {
  width: 16px;
  height: 16px;
  color: var(--mint);
  margin-right: 2px;
}
.opp-status.is-locked .opp-state {
  color: var(--mint);
}
.opp-n {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

/* ---- choose ------------------------------------------------------------------------------------- */
.scr-choose {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 980px;
}
.choose-head h2 {
  margin: 2px 0 0;
  font-size: clamp(32px, 9vw, 52px);
}
.choose-sub {
  margin: 6px 0 0;
  font-size: 14px;
}
.choose-timer {
  position: sticky;
  top: calc(var(--bar-full) + 6px);
  z-index: 5;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: rgba(18, 16, 31, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--drop-sm);
}
button.rand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  overflow: hidden;
  background:
    repeating-conic-gradient(from 0deg at 15% 50%, rgba(255, 255, 255, 0.07) 0deg 10deg, transparent 10deg 24deg),
    linear-gradient(110deg, #3a1e7a, var(--violet) 50%, #b02a72);
  transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
}
.rand-art {
  display: block;
  flex: none;
  width: 70px;
  height: 70px;
}
.rand-art svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: dice-roll 2.6s var(--ease-spring) infinite;
}
@keyframes dice-roll {
  0%,
  70% {
    transform: rotate(0);
  }
  85% {
    transform: rotate(200deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg);
  }
}
.rand-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rand-body b {
  font-size: 32px;
  line-height: 1;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
.rand-body small {
  color: #efe6ff;
  font-size: 14px;
  font-weight: 600;
}
.csec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.csec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--line);
}
.csec-h h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
}
.csec-h .muted {
  font-size: 13px;
  font-weight: 700;
}
.pts-badge {
  flex: none;
  padding: 8px 12px 6px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--panel-hi);
  font: 800 24px/1 var(--font-mono);
  box-shadow: var(--drop-sm), var(--hilite);
  transform: rotate(-3deg);
}
.csec-neutral .pts-badge {
  background: var(--violet);
}
.csec-opponent .pts-badge {
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  color: var(--ink);
  transform: rotate(3deg) scale(1.08);
}
.cgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(104px, 29vw), 1fr));
  gap: 10px;
}
.scr-choose.is-sent .gcard:not(.on),
.scr-choose.is-sent .rand-card:not(.on) {
  opacity: 0.35;
  pointer-events: none;
}
.scr-choose .gcard.on {
  --me-c: var(--gold);
}

.scr-choosewait {
  min-height: calc(100dvh - var(--bar-full));
  display: grid;
  place-items: center;
  padding-top: 0;
}
.wait-panel {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 20px 22px;
  text-align: center;
  overflow: hidden;
}
.wait-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 50% at 50% 30%, var(--wc), transparent 70%);
  opacity: 0.45;
}
.wait-panel.seat-0 {
  --wc: var(--blue);
}
.wait-panel.seat-1 {
  --wc: var(--red);
}
.wait-panel > * {
  position: relative;
}
.wait-cards {
  position: relative;
  width: 120px;
  height: 110px;
  margin-bottom: 8px;
}
.wait-cards i {
  position: absolute;
  left: 30px;
  top: 6px;
  width: 64px;
  height: 90px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 4px, transparent 4px 10px),
    linear-gradient(160deg, var(--violet), var(--violet-deep));
  box-shadow: var(--drop-sm);
  animation: card-shuffle 1.6s var(--ease-spring) infinite;
}
.wait-cards i:nth-child(1) {
  --a: -16deg;
  --x: -26px;
}
.wait-cards i:nth-child(2) {
  --a: 0deg;
  --x: 0px;
  animation-delay: 0.12s;
}
.wait-cards i:nth-child(3) {
  --a: 16deg;
  --x: 26px;
  animation-delay: 0.24s;
}
@keyframes card-shuffle {
  0%,
  100% {
    transform: translateX(var(--x)) rotate(var(--a));
  }
  40% {
    transform: translateX(0) rotate(0) translateY(-10px);
  }
}
.wait-name {
  margin: 0;
  max-width: 100%;
  font-size: clamp(44px, 13vw, 72px);
  overflow-wrap: anywhere;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
}
.wait-line {
  margin: 0;
  font: 400 26px/1 var(--font-display);
  text-transform: uppercase;
}
.wait-why {
  margin: 8px 0 12px;
  font-size: 14px;
}
.wait-panel .tbar {
  width: 100%;
}

/* ---- cinema hosts ---------------------------------------------------------------------------------- */
.scr-cine {
  position: fixed;
  top: var(--bar-full);
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.cine-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.boot-host {
  position: fixed;
  inset: 0;
  z-index: 100;
  transition: opacity 0.25s;
}
.boot-host.is-out {
  opacity: 0;
  pointer-events: none;
}

/* ---- final ------------------------------------------------------------------------------------------- */
.scr-final {
  max-width: 760px;
  padding-top: 0;
}
.final-hero {
  position: relative;
  height: clamp(320px, 54vh, 520px);
  margin: 0 -16px;
}
.final-panel {
  position: relative;
  z-index: 2;
  margin-top: -10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* the cinema final already shows the score line */
.scr-final.has-cine .final-score,
.scr-final.has-cine .final-why {
  display: none;
}
.final-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.fs-seat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fs1 {
  justify-content: flex-end;
}
.fs-name {
  min-width: 0;
  font: 800 16px/1.1 var(--font-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs0 .fs-name {
  color: var(--blue-hi);
}
.fs1 .fs-name {
  color: var(--red-hi);
}
.fs-seat b {
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1;
}
.fs-seat.is-win b {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(255, 201, 60, 0.55);
}
.fs-dash {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--dim);
}
.final-gg {
  margin: 0;
  text-align: center;
  font: 800 16px/1.25 var(--font-body);
  color: #fff;
}
.final-why {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.final-actions {
  display: grid;
  gap: 10px;
}
.again-btn .dots3 {
  margin-left: 8px;
}
.again-btn.is-waiting {
  font-size: 22px;
  opacity: 0.8;
}
.again-btn.is-asked {
  --b-bg: var(--mint);
  --b-deep: var(--mint-deep);
  animation: start-glow 0.9s ease-in-out infinite alternate;
}
.rematch-note {
  margin: 0;
  text-align: center;
  font-weight: 800;
  animation: bb-pop-in 0.4s var(--ease-spring);
}
.rematch-note[hidden] {
  display: none;
}
.hist-title {
  margin: 26px 0 10px;
}
.history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hrow {
  --wc: var(--line);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--wc) 22%, var(--panel)), var(--panel) 55%);
  box-shadow: var(--drop-sm);
  overflow: hidden;
  animation: bb-pop-in 0.45s var(--ease-spring) both;
  animation-delay: calc(0.6s + var(--i) * 70ms);
}
.hrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--wc);
}
.hrow.w0 {
  --wc: var(--blue);
}
.hrow.w1 {
  --wc: var(--red);
}
.h-n {
  flex: none;
  width: 18px;
  color: var(--dim);
  font-weight: 800;
  text-align: center;
}
.h-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.h-body b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.h-body small {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.h-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.h-pts {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}
.h-win {
  max-width: 96px;
  padding: 3px 7px 2px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font: 800 11px/1.2 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.h-w0 {
  background: var(--blue);
}
.h-w1 {
  background: var(--red);
}
.h-draw {
  background: var(--panel-hi);
  color: var(--muted);
}

/* ---- message screens and the reconnecting strip -------------------------------------------------- */
.scr-msg {
  min-height: calc(100dvh - var(--bar-full));
  display: grid;
  place-items: center;
}
.msg-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 26px 20px 20px;
}
.msg-card h2 {
  margin: 0;
}
.msg-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
}
.msg-ico {
  width: 76px;
  height: 76px;
  animation: bb-wobble 1.4s ease-in-out infinite;
}
.msg-ico svg {
  width: 100%;
  height: 100%;
}
#net {
  position: fixed;
  top: calc(var(--bar-full) + 10px);
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--warn);
  color: var(--ink);
  font: 800 15px/1 var(--font-body);
  box-shadow: var(--drop);
  transform: translate(-50%, calc(-100% - 30px));
  transition: transform var(--t-slow) var(--ease-spring);
}
#net.on {
  transform: translate(-50%, 0);
}
.net-spin {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(5, 4, 10, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: gt-spin 0.8s linear infinite;
}

/* ---- fallback scenes (only when cinema.js has no scene) ------------------------------------------- */
.fb {
  --t0: 0ms;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 16px calc(16px + var(--safe-b));
  text-align: center;
  overflow: hidden;
}
.fb h2 {
  margin: 0;
}
.fb-slam {
  animation: bb-slam-in 480ms var(--ease-slam) both;
  animation-delay: calc(var(--d, 0ms) + var(--t0));
}
.fb-pop {
  animation: bb-pop-in 520ms var(--ease-spring) both;
  animation-delay: calc(var(--d, 0ms) + var(--t0));
}
.fb-title h2 {
  font-size: clamp(38px, 11vw, 64px);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
}
.gtile-fb {
  width: 100%;
}
.gtile-lg {
  width: min(42vw, 180px);
}
.fb-deal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 640px;
}
.fb-dcard {
  width: min(29vw, 112px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 6px 8px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  box-shadow: var(--drop);
  animation: fb-deal 560ms var(--ease-spring) both;
  animation-delay: calc(var(--d) + var(--t0));
}
.fb-dcard b {
  font-size: 12px;
  line-height: 1.15;
}
@keyframes fb-deal {
  from {
    opacity: 0;
    transform: translateY(-70vh) rotate(-40deg) scale(0.6);
  }
  to {
    opacity: 1;
    transform: rotate(var(--r));
  }
}
.fb-picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  animation: bb-pop-in 520ms var(--ease-spring) both;
  animation-delay: calc(var(--d) + var(--t0));
}
.fb-prow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--panel);
}
.fb-pname {
  flex: none;
  width: 76px;
  font-weight: 800;
  font-size: 13px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-pgames {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.fb-pg .gtile-xs {
  width: 36px;
}
.fb-coinwrap {
  position: relative;
  width: 170px;
  height: 260px;
  perspective: 800px;
}
.fb-coin3d {
  position: absolute;
  left: 15px;
  top: 90px;
  width: 140px;
  height: 140px;
  transform-style: preserve-3d;
  animation: fb-flip 2700ms cubic-bezier(0.2, 0.6, 0.3, 1) both;
  animation-delay: calc(200ms + var(--t0));
}
.win-1 .fb-coin3d {
  animation-name: fb-flip1;
}
.fb-coin3d .face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 5px solid var(--ink);
  border-radius: 50%;
  font: 400 64px/1 var(--font-display);
  text-transform: uppercase;
  color: #fff;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.25),
    inset 0 -10px 0 rgba(0, 0, 0, 0.25);
}
.face0 {
  background: radial-gradient(circle at 35% 30%, var(--blue-hi), var(--blue) 50%, var(--blue-deep));
}
.face1 {
  background: radial-gradient(circle at 35% 30%, var(--red-hi), var(--red) 50%, var(--red-deep));
  transform: rotateY(180deg);
}
@keyframes fb-flip {
  0% {
    transform: translateY(0) rotateY(0);
  }
  45% {
    transform: translateY(-80px) rotateY(1080deg);
  }
  100% {
    transform: translateY(0) rotateY(1800deg);
  }
}
@keyframes fb-flip1 {
  0% {
    transform: translateY(0) rotateY(0);
  }
  45% {
    transform: translateY(-80px) rotateY(1080deg);
  }
  100% {
    transform: translateY(0) rotateY(1980deg);
  }
}
.fb-coinshadow {
  position: absolute;
  left: 35px;
  right: 35px;
  bottom: 14px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
}
.fb-coinwin h2 {
  font-size: clamp(46px, 13vw, 80px);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
}
.fb-reel {
  position: relative;
  width: 100%;
  height: 170px;
  margin: 0 -16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.fb-reel-track {
  position: absolute;
  left: 50%;
  top: 10px;
  display: flex;
  gap: 12px;
  animation: fb-reel 3400ms cubic-bezier(0.08, 0.6, 0.12, 1) both;
  animation-delay: calc(100ms + var(--t0));
}
@keyframes fb-reel {
  from {
    transform: translateX(-60px);
  }
  to {
    transform: translateX(calc(var(--n) * -132px - 60px));
  }
}
.fb-rcard {
  flex: none;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  box-shadow: var(--drop-sm);
}
.fb-rcard b {
  font-size: 12px;
}
.fb-reel-frame {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 136px;
  height: 160px;
  transform: translateX(-50%);
  border: 4px solid var(--gold);
  border-radius: 18px;
  box-shadow:
    0 0 0 3px var(--ink),
    0 0 26px rgba(255, 201, 60, 0.6);
  animation: fb-frameflash 600ms ease-out both;
  animation-delay: calc(3450ms + var(--t0));
}
@keyframes fb-frameflash {
  0% {
    box-shadow:
      0 0 0 3px var(--ink),
      0 0 26px rgba(255, 201, 60, 0.6);
  }
  30% {
    box-shadow:
      0 0 0 3px var(--ink),
      0 0 80px 20px rgba(255, 255, 255, 0.9);
  }
  100% {
    box-shadow:
      0 0 0 3px var(--ink),
      0 0 30px rgba(255, 201, 60, 0.7);
  }
}
.is-sudden .fb-reel-frame {
  border-color: var(--red);
}
.fb-roulette.is-sudden {
  background: radial-gradient(70% 50% at 50% 50%, rgba(255, 59, 78, 0.35), transparent 70%);
}
.fb-land h2 {
  font-size: clamp(36px, 10vw, 58px);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.fb-land p {
  margin: 6px 0 0;
  font-weight: 800;
  font-size: 18px;
}
.fb-versus {
  justify-content: center;
}
.fb-split {
  position: absolute;
  inset: 0;
}
.fb-side {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 24px 20px;
  animation: fb-side-in 520ms var(--ease-slam) both;
  animation-delay: calc(var(--d) + var(--t0));
}
.fb-side.s0 {
  clip-path: polygon(0 0, 64% 0, 36% 100%, 0 100%);
  background:
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.06) 0 3px, transparent 3px 18px),
    linear-gradient(150deg, var(--blue), var(--blue-deep));
  align-items: flex-start;
  justify-content: flex-start;
  --from: -100%;
}
.fb-side.s1 {
  clip-path: polygon(64% 0, 100% 0, 100% 100%, 36% 100%);
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.06) 0 3px, transparent 3px 18px),
    linear-gradient(210deg, var(--red), var(--red-deep));
  align-items: flex-end;
  justify-content: flex-end;
  --from: 100%;
}
@keyframes fb-side-in {
  from {
    transform: translateX(var(--from));
  }
  to {
    transform: none;
  }
}
.fb-vname {
  max-width: 62%;
  font-size: clamp(34px, 10vw, 72px);
  overflow-wrap: anywhere;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
  text-align: left;
}
.s1 .fb-vname {
  text-align: right;
}
.fb-vs {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -60px 0 0 -70px;
  width: 140px;
  height: 120px;
  display: grid;
  place-items: center;
  animation: fb-vs 1300ms var(--ease-slam) both;
  animation-delay: calc(var(--d) + var(--t0));
}
.fb-vs span {
  font: 400 110px/1 var(--font-display);
  color: var(--gold);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.55);
  transform: skewX(-8deg);
}
@keyframes fb-vs {
  0% {
    opacity: 0;
    transform: scale(3);
    filter: blur(8px);
  }
  22% {
    opacity: 1;
    transform: scale(0.9);
    filter: blur(0);
  }
  30% {
    transform: scale(1.05);
  }
  36%,
  72% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}
.fb-gcard {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(38, 34, 66, 0.97), rgba(22, 19, 40, 0.97));
  box-shadow: var(--drop), var(--hilite);
}
.fb-gcard h2 {
  font-size: clamp(34px, 10vw, 54px);
}
.fb-how {
  margin: 0;
  color: #dcd9f2;
  font-weight: 600;
  font-size: 15px;
}
.fb-gmeta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}
.fb-count {
  position: relative;
  z-index: 2;
  height: 100px;
  width: 200px;
}
.fb-cd {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 400 96px/1 var(--font-display);
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.55);
  animation: fb-cd 950ms var(--ease-slam) both;
  animation-delay: calc(var(--d) + var(--t0));
}
.fb-go {
  color: var(--mint);
  text-transform: uppercase;
}
@keyframes fb-cd {
  0% {
    opacity: 0;
    transform: scale(2.4);
  }
  18% {
    opacity: 1;
    transform: scale(0.95);
  }
  28%,
  78% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.7);
  }
}
.fb-result .fb-flood {
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: circle(0% at 50% 40%);
  animation: fb-flood 700ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--t0));
}
.fb-result.win-0 .fb-flood {
  background:
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.06) 0 3px, transparent 3px 18px),
    radial-gradient(circle at 50% 40%, var(--blue), var(--blue-deep) 80%);
}
.fb-result.win-1 .fb-flood {
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.06) 0 3px, transparent 3px 18px),
    radial-gradient(circle at 50% 40%, var(--red), var(--red-deep) 80%);
}
.fb-result.is-draw .fb-flood {
  background: radial-gradient(circle at 50% 40%, var(--panel-hi), var(--deep) 80%);
}
@keyframes fb-flood {
  to {
    clip-path: circle(150% at 50% 40%);
  }
}
.fb-rtop {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 16px/1 var(--font-body);
}
.fb-big {
  font-size: clamp(96px, 30vw, 180px);
  line-height: 0.9;
  color: #fff;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.5);
}
.fb-who {
  margin: 0;
  font-weight: 800;
  font-size: 20px;
}
.fb-who .muted {
  color: rgba(255, 255, 255, 0.72);
}
.fb-plus {
  font-size: 48px;
  font-weight: 800;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
}
.fb-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 440px;
}
.fb-sc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: rgba(5, 4, 10, 0.55);
  font-weight: 800;
  min-width: 0;
}
.fb-sc span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-sc.s0 span {
  color: var(--blue-hi);
}
.fb-sc.s1 span {
  color: var(--red-hi);
}
.fb-sc b {
  font-size: 22px;
}
.fb-sc.is-win b {
  color: var(--gold);
}
.fb-final {
  justify-content: center;
  gap: 8px;
}
.fb-rays {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 1200px;
  height: 1200px;
  margin: -600px 0 0 -600px;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, var(--rc, rgba(255, 201, 60, 0.22)) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 5%, transparent 45%);
  mask-image: radial-gradient(circle, #000 5%, transparent 45%);
  animation: gt-spin 30s linear infinite;
}
.fb-final.win-0 {
  --rc: rgba(47, 123, 255, 0.3);
}
.fb-final.win-1 {
  --rc: rgba(255, 59, 78, 0.3);
}
.fb-trophy {
  width: min(42vw, 180px);
}
.fb-trophy .trophy {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 26px rgba(255, 201, 60, 0.45));
  animation: duo-bob 1.6s ease-in-out infinite alternate;
}
.is-draw .fb-trophy {
  filter: grayscale(1) brightness(0.7);
}
.fb-champ {
  font-size: clamp(48px, 14vw, 96px);
  max-width: 100%;
  overflow-wrap: anywhere;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
}
.fb-champ.p0 {
  color: var(--blue-hi);
}
.fb-champ.p1 {
  color: var(--red-hi);
}
.fb-gg {
  margin: 0;
  font-weight: 800;
  font-size: 18px;
}
.fb-confetti i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: calc(10px * var(--s));
  height: calc(16px * var(--s));
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--c);
  animation: confetti-fall 3.2s linear infinite;
  animation-delay: calc(var(--d) - 0s);
}
@keyframes confetti-fall {
  from {
    transform: translateY(0) rotate(0);
  }
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}

/* ---- playing screen: app.js builds .play-screen (theme.css) with this HUD ---- */
body.is-playing #bar,
body.is-playing #app {
  display: none;
}
.play-screen {
  z-index: 20;
}
.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  position: relative;
}
.play-hud.hud::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0 36%, var(--violet) 36% 64%, var(--red) 64%);
  opacity: 0.85;
}
.hud-seat {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.hud-seat[data-seat="1"] {
  flex-direction: row-reverse;
  text-align: right;
}
.hud-chip {
  flex: none;
  width: 10px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 5px;
  background: var(--blue);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
.hud-seat[data-seat="1"] .hud-chip {
  background: var(--red);
}
.hud-who {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.hud-name {
  font: 800 14px/1.1 var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-seat[data-seat="0"] .hud-name {
  color: var(--blue-hi);
}
.hud-seat[data-seat="1"] .hud-name {
  color: var(--red-hi);
}
.hud-seat.is-away .hud-name {
  opacity: 0.55;
}
.hud-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hud-seat[data-seat="1"] .hud-line {
  flex-direction: row-reverse;
}
.hud-score {
  font: 800 16px/1 var(--font-mono);
  color: #fff;
}
.hud-seat.is-winner .hud-score {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 201, 60, 0.55);
}
.hud-you,
.hud-away {
  padding: 2px 5px 1px;
  border-radius: 5px;
  background: var(--fg);
  color: var(--ink);
  font: 800 10px/1.2 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hud-away {
  background: var(--warn);
  animation: bb-wobble 1.2s ease-in-out infinite;
}
.hud-you[hidden],
.hud-away[hidden] {
  display: none;
}
.hud-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 40vw;
  min-width: 0;
  min-height: 44px;
  padding: 4px 6px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.hud-mid:active {
  background: rgba(255, 255, 255, 0.06);
}
.hud-title {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font: 400 17px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hud-title svg {
  flex: none;
  color: var(--muted);
}
.hud-gname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-round {
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}
.hud-pts {
  margin-left: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 201, 60, 0.16);
  color: var(--gold);
  font-weight: 800;
}
.hud-line {
  min-width: 0;
  overflow: hidden;
}
.hud-round.is-sudden {
  color: var(--warn);
  font-weight: 800;
}
.hud-mute {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: var(--outline);
  border-radius: 12px;
  background: var(--panel-hi);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 3px 0 var(--ink),
    inset 0 2px 0 rgba(255, 255, 255, 0.16);
  transition: transform var(--t-fast) var(--ease-spring);
}
.hud-mute:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
.hud-mute[aria-pressed="true"] {
  color: var(--muted);
}
.play-howto {
  position: absolute;
  z-index: 30;
  top: calc(var(--safe-t) + var(--hud-h) + 8px);
  left: calc(var(--safe-l) + 16px);
  right: calc(var(--safe-r) + 16px);
  max-width: 440px;
  margin: 0 auto;
  animation: bb-pop-in var(--t-med) var(--ease-spring) both;
  cursor: pointer;
}
.play-howto[hidden] {
  display: none;
}
.play-howto p {
  margin: 6px 0 0;
  font-weight: 600;
}
.howto-ctl {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}
.howto-ctl li {
  position: relative;
  padding-left: 16px;
  font-weight: 700;
}
.howto-ctl li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--violet-hi);
}
.play-howto .howto-goal {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--line);
}
.howto-goal b {
  margin-right: 6px;
  color: var(--gold);
  font: 800 11px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.howto-close {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}
/* the finished game stays up for a moment; taps no longer reach it */
.play-screen.is-outro .play-stage {
  pointer-events: none;
}
.play-fail {
  margin: auto 16px;
  text-align: center;
}
.play-fail p {
  margin: 0;
  font-weight: 700;
}

/* shown over the stage when the device cannot draw 3D games */
.play-no3d {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.play-no3d p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---- credits page -------------------------------------------------------------------------------- */
.scr-credits {
  max-width: 760px;
}
.credits-hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(44px, 12vw, 72px);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.5);
}
.credits-hero p {
  margin: 0 0 18px;
  color: #dcd9f2;
  font-weight: 600;
}
.credit-group {
  margin-bottom: 16px;
}
.credit-group h2 {
  margin: 0 0 10px;
  font-size: 26px;
}
.credit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.credit-list li {
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--deep);
  line-height: 1.35;
}
.credit-list small {
  display: block;
  margin-top: 2px;
}
.credit-lic {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font: 700 11px/1.5 var(--font-mono);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

/* ---- how to play (public/howto.js) ------------------------------------------------------------ */
.scr-howto {
  --me-c: var(--blue);
  --me-hi: var(--blue-hi);
  --me-deep: var(--blue-deep);
  position: fixed;
  top: var(--bar-full);
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.scr-howto.me-s1 {
  --me-c: var(--red);
  --me-hi: var(--red-hi);
  --me-deep: var(--red-deep);
}
.ht-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(124, 58, 237, 0.34), transparent 60%),
    linear-gradient(112deg, #0b1d4d 0 44%, #2a1260 47.5% 52.5%, #4d0b18 56% 100%);
}
.ht-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-58deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, rgba(11, 10, 20, 0.15), rgba(11, 10, 20, 0.7) 75%);
}
.ht-dots {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 22%, transparent 24%);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(112deg, #000, transparent 40% 60%, #000);
  mask-image: linear-gradient(112deg, #000, transparent 40% 60%, #000);
  animation: ht-dots 9s linear infinite;
}
@keyframes ht-dots {
  to {
    transform: translate(18px, 18px);
  }
}
.ht-rays {
  position: absolute;
  left: 50%;
  top: -60vmax;
  width: 140vmax;
  height: 140vmax;
  margin-left: -70vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.05) 0 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 80%);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 80%);
  animation: ht-spin 60s linear infinite;
}
@keyframes ht-spin {
  to {
    transform: rotate(360deg);
  }
}
.ht-wrap {
  position: relative;
  height: 100%;
  width: min(100% - 24px, 1080px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 10px 0 calc(10px + var(--safe-b));
}

/* the first two seconds answer "what is this and how do I win": the name, the win line,
   the clip and the main control, then the rules. Phone first: name and win across the top,
   the clip with the main control tile next to it, the other controls, then the rules. */
.ht-top {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.ht-banner {
  flex: none;
  transform: skewX(-12deg);
  padding: 4px 12px 3px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, #f0a91a);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}
.ht-banner span {
  display: block;
  transform: skewX(12deg);
  font: 400 14px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.is-sudden .ht-banner {
  background: linear-gradient(180deg, #ff8e99, var(--red) 55%, #c81d33);
}
.is-sudden .ht-banner span {
  color: #fff;
}
.ht-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ht-chips:empty {
  display: none;
}
.ht-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 8px 3px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--panel-hi);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  font: 800 12px/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.ht-chip b {
  font-size: 1.15em;
  letter-spacing: 0;
}
.ht-chip-gold {
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  color: var(--ink);
}
/* white on the main seat colors is under 4.5:1, so the seat chips use the deep shade */
.ht-chip-s0 {
  background: var(--blue-deep);
  border-color: var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), inset 0 -3px 0 var(--blue);
}
.ht-chip-s1 {
  background: var(--red-deep);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), inset 0 -3px 0 var(--red);
}
.ht-chip-violet {
  background: var(--violet);
}
.ht-chip-red {
  background: var(--red-deep);
  color: #fff;
}
.ht-chip-set {
  background: #fff;
  color: var(--ink);
}

/* the showdown strip: which game of the card this is and the score so far */
.ht-sd {
  display: inline-flex;
  align-items: stretch;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  font: 800 12px/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.ht-sd > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 3px;
  min-height: 21px;
}
.ht-sd-label {
  background: var(--violet);
  border-right: 2.5px solid var(--ink);
}
.ht-sd-label b {
  font-size: 1.15em;
  color: #fff;
}
.ht-sd-score {
  gap: 4px;
  font-size: 1.2em;
  letter-spacing: 0;
}
.ht-sd-score b {
  min-width: 1.3em;
  padding: 1px 4px;
  border-radius: 4px;
  text-align: center;
}
.ht-sd-score .s0 {
  background: var(--blue);
}
.ht-sd-score .s1 {
  background: var(--red);
}
.ht-sd-score i {
  font-style: normal;
  color: var(--muted);
}

/* the grid: hero, media + main control, other controls, rules */
.ht-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas:
    "hero hero"
    "media ctl"
    "more ctl"
    "rules rules";
  align-content: start;
  gap: 10px;
  margin: 10px -6px 0;
  padding: 2px 6px 12px;
}
.ht-grid::-webkit-scrollbar {
  display: none;
}
.ht-hero {
  grid-area: hero;
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 8px;
}
.ht-name {
  margin: 0;
  max-width: 100%;
  font: 400 clamp(40px, 13vw, 66px) / 0.9 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.55);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
/* the hero line: one gold sticker that says how you win */
.ht-win {
  margin: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 50%, #f3b21f);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  color: var(--ink);
}
.ht-win-cup svg {
  display: block;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.3));
}
.ht-win-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.ht-win-label {
  font: 800 11px/1 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(5, 4, 10, 0.78);
}
.ht-win-text b {
  font: 400 24px/1.02 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

/* media: the gameplay clip, or the 3D icon when there is none */
.ht-media {
  grid-area: media;
  min-width: 0;
  display: grid;
  align-items: start;
}
.ht-icon {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 38%, #3a3368, var(--panel) 70%);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.ht-icon-glow {
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 201, 60, 0.22) 0 10deg, transparent 10deg 30deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  animation: ht-spin 14s linear infinite;
}
.ht-icon-face {
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
}
.ht-icon-face .bb-icon-sprite {
  width: auto;
  height: 100%;
  aspect-ratio: 1;
}
.ht-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0916;
}

/* controls: the main way to play as a big tile, the others as a line each.
   The section itself steps aside so its parts sit in the grid. */
.ht-controls {
  display: contents;
}
.ht-ctl-main {
  grid-area: ctl;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.ht-gx {
  position: relative;
  flex: none;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-width: 132px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background:
    radial-gradient(85% 70% at 50% 30%, color-mix(in srgb, var(--me-c) 55%, #2f2a5c), #221d44 72%),
    #221d44;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.45),
    inset 0 3px 0 rgba(255, 255, 255, 0.22),
    inset 0 -6px 14px rgba(5, 4, 10, 0.35);
  overflow: hidden;
  isolation: isolate;
}
/* a faint grid, like a little screen */
.ht-gx::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 14px);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}
.is-keys > .ht-gx {
  background:
    radial-gradient(85% 70% at 50% 30%, #5b3bb0, #241c4a 72%),
    #241c4a;
}
.ht-ctl-main .ht-ctl-text {
  max-width: 100%;
  text-align: center;
  text-wrap: balance;
  font: 800 14px/1.18 var(--font-body);
  color: #fff;
}
.ht-ctl-more {
  grid-area: more;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.ht-ctl-more:empty {
  display: none;
}
.ht-ctl {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: rgba(28, 25, 48, 0.94);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
.ht-gx.ht-gx-sm {
  width: 42px;
  border-width: 2.5px;
  border-radius: 10px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2);
}
.ht-ctl .ht-ctl-text {
  min-width: 0;
  font: 700 13px/1.2 var(--font-body);
  color: #fff;
}
.ht-or {
  flex: none;
  rotate: -8deg;
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  font: 400 13px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
/* key controls only matter where there is a keyboard */
@media (hover: none) and (pointer: coarse) {
  .ht-ctl-more .ht-ctl.is-keys {
    display: none;
  }
}

/* rules: second in line, still plain to read */
.ht-rules {
  grid-area: rules;
  min-width: 0;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(38, 34, 66, 0.97), rgba(28, 25, 48, 0.97) 50%);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  padding: 10px 12px 11px;
}
.ht-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.ht-rule-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font: 600 15px/1.28 var(--font-body);
  color: #f1effb;
}
.ht-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--violet);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

/* the dock: a lamp per seat around the big ready button, the timer under it */
.ht-dock {
  flex: none;
  position: relative;
  padding: 10px 10px 8px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(38, 34, 66, 0.98), rgba(18, 16, 31, 0.98));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transition:
    opacity 0.25s,
    transform 0.3s var(--ease-out);
}
.ht-dock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.ht-lamp {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.ht-bulb {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #4a4470, #1a1730 70%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 3px 0 rgba(0, 0, 0, 0.45);
  transition:
    background 0.2s,
    box-shadow 0.25s;
}
.ht-bulb i {
  position: absolute;
  left: 6px;
  top: 5px;
  width: 9px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(-30deg);
}
.ht-lamp.s0 {
  --lc: var(--blue);
  --lhi: var(--blue-hi);
}
.ht-lamp.s1 {
  --lc: var(--red);
  --lhi: var(--red-hi);
}
.ht-lamp.is-on .ht-bulb {
  background: radial-gradient(circle at 38% 32%, #fff, var(--lhi) 30%, var(--lc) 70%);
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.2),
    0 3px 0 rgba(0, 0, 0, 0.45),
    0 0 18px 4px color-mix(in srgb, var(--lc) 70%, transparent),
    0 0 40px 8px color-mix(in srgb, var(--lc) 35%, transparent);
  animation: ht-lamp-on 1.6s ease-in-out infinite;
}
@keyframes ht-lamp-on {
  50% {
    filter: brightness(1.18);
  }
}
.ht-bulb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid var(--lhi);
  border-radius: 50%;
  opacity: 0;
}
.ht-lamp.is-flash .ht-bulb::after {
  animation: ht-ring 0.6s var(--ease-out) both;
}
@keyframes ht-ring {
  from {
    opacity: 1;
    transform: scale(0.7);
  }
  to {
    opacity: 0;
    transform: scale(2.2);
  }
}
.ht-lamp.is-flash .ht-bulb {
  animation:
    ht-bulb-pop 0.45s var(--ease-spring),
    ht-lamp-on 1.6s ease-in-out 0.45s infinite;
}
@keyframes ht-bulb-pop {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.ht-lamp-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 14px/1.1 var(--font-body);
  color: var(--lhi);
}
.ht-lamp-state {
  font: 800 10px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.ht-lamp.is-on .ht-lamp-state {
  color: #fff;
}
.ht-lamp.is-away .ht-lamp-state {
  color: var(--warn);
}
.ht-lamp.is-away .ht-lamp-state::after {
  display: none;
}
.ht-lamp:not(.is-on) .ht-lamp-state::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: ht-dots-txt 1.4s steps(4) infinite;
}
@keyframes ht-dots-txt {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}
.ht-ready {
  --b-bg: var(--me-c);
  --b-deep: var(--me-deep);
  position: relative;
  width: 184px;
  min-width: 0;
  min-height: 70px;
  padding: 10px 14px 8px;
  border-radius: 16px;
  font: 400 36px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  animation: ht-breathe 1.5s ease-in-out infinite;
}
.ht-ready-label {
  display: block;
}
.ht-ready-done {
  display: none;
}
@keyframes ht-breathe {
  50% {
    transform: scale(1.045);
    filter: brightness(1.12);
  }
}
.ht-ready:active {
  animation: none;
}
/* pressed: the button stays pushed in, turns mint and says who we are waiting for */
.ht-ready.is-done,
.ht-ready.is-done:disabled {
  --b-bg: var(--mint);
  --b-fg: var(--ink);
  --b-deep: var(--mint-deep);
  padding: 8px 10px 7px;
  opacity: 1;
  filter: none;
  cursor: default;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #8ff5d2, var(--mint) 55%, #1fc890);
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--b-deep),
    0 0 22px rgba(46, 230, 168, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
  animation:
    ht-done 0.45s var(--ease-spring),
    ht-stripes 1.1s linear infinite;
}
.ht-ready.is-done .ht-ready-label {
  display: none;
}
.ht-ready.is-done .ht-ready-done {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}
.ht-rd-big {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 400 21px/1 var(--font-display);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.ht-rd-big svg {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 2px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--mint);
}
.ht-rd-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 12px/1.1 var(--font-body);
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(5, 4, 10, 0.78);
}
.scr-howto:not(.is-ready-them) .ht-rd-sub::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: ht-dots-txt 1.4s steps(4) infinite;
}
@keyframes ht-done {
  0% {
    transform: translateY(4px) scale(0.86);
  }
  60% {
    transform: translateY(4px) scale(1.08);
  }
  100% {
    transform: translateY(4px) scale(1);
  }
}
@keyframes ht-stripes {
  to {
    background-position: 28.28px 0, 0 0;
  }
}
/* the dock glows in my color once I am in */
.scr-howto.is-ready-me .ht-dock {
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 0 0 2px color-mix(in srgb, var(--me-c) 65%, transparent),
    0 0 30px color-mix(in srgb, var(--me-c) 35%, transparent);
}
.ht-wait.is-hot {
  color: var(--gold);
}
.ht-timer {
  margin-top: 10px;
}
.ht-timer .tbar-track {
  height: 12px;
}
.ht-wait {
  min-height: 15px;
  margin: 7px 0 0;
  text-align: center;
  font: 700 13px/1.15 var(--font-body);
  color: var(--muted);
}

/* one bright slash across the screen as it arrives */
.ht-wipe {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 46%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5) 30%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 138, 160, 0.5) 70%, transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-120%) skewX(-22deg);
  animation: ht-wipe 0.6s cubic-bezier(0.3, 0, 0.2, 1) 0.04s both;
}
@keyframes ht-wipe {
  0% {
    opacity: 1;
    transform: translateX(-120%) skewX(-22deg);
  }
  100% {
    opacity: 1;
    transform: translateX(330%) skewX(-22deg);
  }
}
.scr-howto.no-intro .ht-wipe {
  display: none;
}
/* 3, 2, 1, GO over everything once both are ready */
.ht-count {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(60% 45% at 50% 50%, rgba(11, 10, 20, 0.35), rgba(5, 4, 10, 0.82));
  transition: opacity 0.2s;
}
.ht-count.is-on {
  opacity: 1;
}
.ht-count-slash {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 150px;
  margin-top: -75px;
  display: flex;
  transform: skewY(-9deg);
  opacity: 0;
}
.ht-count-slash i {
  flex: 1;
  border-block: 4px solid var(--ink);
}
.ht-count-slash .s0 {
  background: linear-gradient(90deg, rgba(47, 123, 255, 0.15), var(--blue));
}
.ht-count-slash .s1 {
  background: linear-gradient(90deg, var(--red), rgba(255, 59, 78, 0.15));
}
.ht-count.is-hit .ht-count-slash {
  animation: ht-slash 0.55s var(--ease-out) both;
}
.ht-count.is-go .ht-count-slash i {
  background: linear-gradient(90deg, rgba(46, 230, 168, 0.1), var(--mint), rgba(46, 230, 168, 0.1));
}
@keyframes ht-slash {
  0% {
    opacity: 0;
    transform: skewY(-9deg) scaleY(0.1);
  }
  30% {
    opacity: 0.95;
    transform: skewY(-9deg) scaleY(1.1);
  }
  100% {
    opacity: 0.75;
    transform: skewY(-9deg) scaleY(1);
  }
}
.ht-count-ring {
  position: absolute;
  width: min(72vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue) 0 25%, var(--violet) 25% 50%, var(--red) 50% 75%, var(--gold) 75%);
  -webkit-mask-image: radial-gradient(closest-side, transparent 82%, #000 84% 96%, transparent 98%);
  mask-image: radial-gradient(closest-side, transparent 82%, #000 84% 96%, transparent 98%);
  filter: drop-shadow(0 0 18px rgba(167, 139, 250, 0.6));
  animation: ht-spin 2.4s linear infinite;
}
.ht-count-word {
  position: relative;
  font: 400 clamp(150px, 46vw, 260px) / 1 var(--font-display);
  color: #fff;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0 10px 0 rgba(0, 0, 0, 0.6),
    0 0 40px rgba(167, 139, 250, 0.55);
}
.ht-count.is-go .ht-count-word {
  color: var(--mint);
  text-shadow:
    0 10px 0 rgba(0, 0, 0, 0.6),
    0 0 60px rgba(46, 230, 168, 0.75);
}
.ht-count.is-hit .ht-count-word {
  animation: ht-slam 0.42s var(--ease-slam) both;
}
.ht-count.is-hit .ht-count-ring {
  animation:
    ht-ring-hit 0.42s var(--ease-spring),
    ht-spin 2.4s linear infinite;
}
@keyframes ht-slam {
  0% {
    transform: scale(2.6);
    opacity: 0;
    filter: blur(10px);
  }
  55% {
    transform: scale(0.92);
    opacity: 1;
    filter: blur(0);
  }
  75% {
    transform: scale(1.06) translateX(-3px);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes ht-ring-hit {
  0% {
    scale: 0.6;
  }
  70% {
    scale: 1.12;
  }
  100% {
    scale: 1;
  }
}
.scr-howto.is-go .ht-dock {
  opacity: 0;
  transform: translateY(24px);
}
.scr-howto.is-go .ht-grid,
.scr-howto.is-go .ht-top {
  filter: saturate(0.6) brightness(0.7);
  transition: filter 0.3s;
}

/* the entrance, done in about 1.5 s: banner, name slams, the win line stamps, the clip,
   the controls, the rules, then the dock */
.ht-in {
  animation: ht-in 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 150ms);
}
@keyframes ht-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
  }
}
.ht-top.ht-in {
  animation-name: ht-banner-in;
  animation-duration: 0.4s;
}
@keyframes ht-banner-in {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
}
.ht-name.ht-in {
  animation: ht-name-in 0.46s var(--ease-slam) both;
  animation-delay: 120ms;
}
@keyframes ht-name-in {
  0% {
    opacity: 0;
    transform: scale(2.2);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: scale(0.95);
    filter: blur(0);
  }
  80% {
    transform: scale(1.03) translateX(-2px);
  }
  100% {
    transform: none;
  }
}
.ht-name.ht-in {
  transform-origin: 0 60%;
}
.ht-win.ht-in {
  animation: ht-win-in 0.5s var(--ease-spring) both;
  animation-delay: 330ms;
  transform-origin: 20% 50%;
}
@keyframes ht-win-in {
  0% {
    opacity: 0;
    transform: scale(1.35) rotate(-4deg);
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: none;
  }
}
.ht-win-cup svg {
  animation: ht-cup 2.6s var(--ease-spring) 0.9s infinite;
}
@keyframes ht-cup {
  0%,
  70%,
  100% {
    transform: rotate(0) scale(1);
  }
  80% {
    transform: rotate(-14deg) scale(1.15);
  }
  90% {
    transform: rotate(8deg) scale(1.05);
  }
}
.ht-media.ht-in {
  animation: ht-media-in 0.55s var(--ease-spring) both;
  animation-delay: 480ms;
}
@keyframes ht-media-in {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-6deg);
  }
}
.ht-controls .ht-ctl-main {
  animation: ht-in 0.45s var(--ease-spring) both;
  animation-delay: 640ms;
}
.ht-ctl {
  animation: ht-in 0.4s var(--ease-spring) both;
  animation-delay: calc(760ms + var(--j, 0) * 80ms);
}
.ht-rules.ht-in {
  animation-delay: 880ms;
}
.ht-dock.ht-in {
  animation-name: ht-dock-in;
  animation-delay: 1000ms;
}
@keyframes ht-dock-in {
  from {
    opacity: 0;
    transform: translateY(70px);
  }
}
.scr-howto.no-intro .ht-in,
.scr-howto.no-intro .ht-ctl,
.scr-howto.no-intro .ht-controls .ht-ctl-main {
  animation: none;
}

/* wide screens and streams (1280x720 up to 1920x1080): name and win line on the left with the
   controls under them, the clip big on the right, the rules across the bottom. Sizes follow
   the height so a 1080p stream reads from across the room. */
@media (min-width: 760px) {
  .ht-wrap {
    width: min(100% - 4vw, 1760px);
    padding-top: clamp(10px, 2vh, 28px);
    padding-bottom: calc(clamp(10px, 1.6vh, 24px) + var(--safe-b));
  }
  .ht-top {
    gap: 8px 10px;
  }
  .ht-banner span {
    font-size: clamp(16px, 2.3vh, 28px);
  }
  .ht-chip,
  .ht-sd {
    font-size: clamp(13px, 1.75vh, 22px);
  }
  .ht-chip {
    min-height: clamp(30px, 3.6vh, 44px);
    padding: 5px 10px 4px;
  }
  .ht-sd > span {
    min-height: clamp(25px, 3.1vh, 39px);
    padding: 4px 10px 3px;
  }
  .ht-grid {
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "hero hero"
      "ctl media"
      "more media"
      "rules media";
    align-content: safe center;
    gap: clamp(10px, 1.8vh, 26px) clamp(16px, 2.4vw, 44px);
    margin-top: clamp(8px, 1.6vh, 22px);
  }
  /* the name and the win line side by side, read left to right */
  .ht-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(8px, 1.4vh, 18px) clamp(18px, 2.6vw, 48px);
  }
  .ht-name {
    font-size: clamp(52px, 10vh, 140px);
    -webkit-text-stroke-width: 3px;
    text-shadow: 0 5px 0 rgba(0, 0, 0, 0.55);
  }
  .ht-win {
    gap: clamp(10px, 1.4vh, 18px);
    padding: clamp(8px, 1.3vh, 16px) clamp(14px, 2vh, 26px) clamp(8px, 1.3vh, 16px) clamp(10px, 1.4vh, 18px);
    border-radius: clamp(14px, 1.8vh, 22px);
  }
  .ht-win-cup svg {
    width: clamp(42px, 6.4vh, 80px);
    height: clamp(42px, 6.4vh, 80px);
  }
  .ht-win-label {
    font-size: clamp(12px, 1.6vh, 20px);
  }
  .ht-win-text b {
    font-size: clamp(26px, 4.4vh, 60px);
    text-wrap: pretty;
  }
  .ht-media {
    align-items: center;
    justify-items: center;
  }
  /* as big as the column allows, short enough that the rules and the dock still fit */
  .ht-icon {
    width: min(100%, calc((100svh - var(--bar-full) - 26vh - 140px) * 1.6));
    border-width: 4px;
    border-radius: clamp(16px, 2.2vh, 28px);
  }
  .ht-ctl-main {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: clamp(12px, 1.8vh, 24px);
  }
  .ht-ctl-main .ht-gx {
    width: clamp(76px, 12vh, 170px);
    max-width: none;
  }
  .ht-ctl-main .ht-ctl-text {
    text-align: left;
    font-size: clamp(17px, 2.6vh, 32px);
  }
  .ht-ctl-more {
    align-content: start;
    gap: clamp(8px, 1.2vh, 16px);
  }
  .ht-gx.ht-gx-sm {
    width: clamp(34px, 5vh, 64px);
  }
  .ht-ctl .ht-ctl-text {
    font-size: clamp(14px, 1.9vh, 24px);
  }
  .ht-or {
    width: clamp(28px, 3.4vh, 42px);
    height: clamp(22px, 2.7vh, 34px);
    font-size: clamp(13px, 1.7vh, 21px);
  }
  .ht-rules {
    padding: clamp(10px, 1.5vh, 20px) clamp(14px, 1.8vh, 24px);
  }
  .ht-rules {
    align-self: start;
  }
  .ht-rule-list {
    gap: clamp(6px, 1vh, 14px);
  }
  .ht-rule-list li {
    grid-template-columns: clamp(24px, 3.2vh, 40px) minmax(0, 1fr);
    align-items: center;
    font-size: clamp(14px, 2.15vh, 27px);
    line-height: 1.22;
  }
  .ht-num {
    width: clamp(24px, 3.2vh, 40px);
    height: clamp(24px, 3.2vh, 40px);
    font-size: clamp(13px, 1.8vh, 22px);
  }
  .ht-dock {
    width: min(100%, clamp(720px, 70vh, 1000px));
    margin: clamp(8px, 1.4vh, 20px) auto 0;
    padding: clamp(8px, 1.2vh, 16px) 18px clamp(6px, 1vh, 14px);
  }
  .ht-ready {
    width: clamp(240px, 30vh, 360px);
    min-height: clamp(56px, 7.5vh, 96px);
    font-size: clamp(32px, 4.6vh, 56px);
  }
  .ht-ready.is-done .ht-rd-big {
    font-size: clamp(24px, 3vh, 36px);
  }
  .ht-rd-sub {
    font-size: clamp(13px, 1.6vh, 20px);
  }
  .ht-bulb {
    width: clamp(36px, 4.6vh, 56px);
    height: clamp(36px, 4.6vh, 56px);
  }
  .ht-lamp-name {
    font-size: clamp(14px, 2vh, 26px);
  }
  .ht-lamp-state {
    font-size: clamp(10px, 1.3vh, 16px);
  }
  .ht-timer {
    margin-top: clamp(6px, 1vh, 12px);
  }
  .ht-wait {
    font-size: clamp(13px, 1.6vh, 20px);
  }
}
/* the spectator view has no ready button: the two lamps share the dock */
.scr-howto.is-watch .ht-dock-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
/* short phones (an SE in portrait): tighter */
@media (max-height: 700px) and (max-width: 759px) {
  .ht-wrap {
    padding-top: 8px;
  }
  .ht-name {
    font-size: clamp(32px, 10vw, 46px);
  }
  .ht-win {
    padding: 6px 12px 6px 8px;
  }
  .ht-win-cup svg {
    width: 30px;
    height: 30px;
  }
  .ht-win-text b {
    font-size: 19px;
  }
  .ht-grid {
    margin-top: 8px;
    gap: 8px;
  }
  .ht-gx {
    max-width: 100px;
  }
  .ht-rules {
    padding: 8px 10px 9px;
  }
  .ht-rule-list {
    gap: 5px;
  }
  .ht-rule-list li {
    font-size: 14px;
  }
  .ht-ctl-main .ht-ctl-text {
    font-size: 13px;
  }
  .ht-ready {
    min-height: 58px;
    font-size: 30px;
  }
  .ht-timer {
    margin-top: 7px;
  }
}

/* phones a bit shorter than a 390x844: a little tighter so all the rules show */
@media (max-height: 800px) and (max-width: 759px) {
  .ht-name {
    font-size: clamp(36px, 11vw, 52px);
  }
  .ht-win-text b {
    font-size: 21px;
  }
  .ht-rule-list li {
    font-size: 14px;
    line-height: 1.22;
  }
  .ht-rule-list {
    gap: 5px;
  }
  .ht-gx {
    max-width: 108px;
  }
}

/* reduced motion: no spinning, breathing or slamming, the screen still says everything */
@media (prefers-reduced-motion: reduce) {
  .ht-rays,
  .ht-dots,
  .ht-icon-glow,
  .ht-win-cup svg,
  .ht-ready,
  .ht-ready.is-done,
  .ht-lamp.is-on .ht-bulb,
  .ht-lamp.is-flash .ht-bulb,
  .ht-count-ring,
  .ht-count.is-hit .ht-count-ring {
    animation: none;
  }
  .ht-count.is-hit .ht-count-word,
  .ht-count.is-hit .ht-count-slash {
    animation: ht-fade 0.2s linear both;
  }
  .ht-wipe {
    display: none;
  }
}
@keyframes ht-fade {
  from {
    opacity: 0;
  }
}

/* ---- gesture drawings ---------------------------------------------------------------------------- */
/* Each drawing is posed so the still frame reads on its own (that is what reduced motion shows);
   the loops below only run when motion is welcome. */
.gx {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.gx-hand {
  transform-box: view-box;
  transform-origin: 0 0;
}
.gx-skin {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3.4;
  stroke-linejoin: round;
}
.gx-crease {
  fill: none;
  stroke: #b9b4d8;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.gx-cuff {
  fill: var(--me-c);
  stroke: var(--ink);
  stroke-width: 3.4;
}

/* tap: a bullseye, the finger comes down, rings and sparks burst out */
.gx-tgt {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 3.2;
}
.gx-tgt-in {
  fill: #fff4c8;
  stroke: var(--ink);
  stroke-width: 2.6;
}
.gx-target,
.gx-ring,
.gx-puckmove,
.gx-flag,
.gx-chev {
  transform-box: fill-box;
  transform-origin: center;
}
.gx-ring {
  fill: none;
  stroke: #fff;
  stroke-width: 3.5;
  opacity: 0;
}
.gx-spark {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4.5;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 50px 36px;
}

/* drag: grab the puck, pull it along, a glowing trail behind */
.gx-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.5 8;
}
.gx-goal {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 3;
  stroke-dasharray: 4 4;
}
.gx-trail {
  fill: none;
  stroke: var(--me-hi);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 60 60;
  stroke-dashoffset: 0;
}
.gx-puckglow {
  fill: var(--me-hi);
  opacity: 0.35;
}
.gx-puck {
  fill: var(--me-c);
  stroke: var(--ink);
  stroke-width: 3.2;
}
.gx-puckshine,
.gx-ballshine {
  fill: rgba(255, 255, 255, 0.75);
}

/* swipe: the hand flicks across, an arc and two arrows light up */
.gx-arc {
  fill: none;
  stroke: var(--me-hi);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 0;
}
.gx-chev {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gx-chev2 {
  opacity: 0.55;
}
.gx-h-swipe-wrap {
  transform: translate(56px, 2px);
}
.gx-h-swipe {
  transform: rotate(-14deg);
}
.gx-streak {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0.8;
}

/* hold: keep the finger down, your player runs to it */
.gx-track-d {
  stroke-dasharray: 0.5 7;
}
.gx-spot {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 2.6;
}
.gx-hold1,
.gx-hold2 {
  stroke: var(--gold);
  opacity: 0.6;
}
.gx-follow {
  transform: translate(22px, -27px);
}

/* long press: a ring fills around the square, then a flag pops up */
.gx-cell {
  fill: #4a4290;
  stroke: var(--ink);
  stroke-width: 3.2;
}
.gx-cellshine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 3;
  stroke-linecap: round;
}
.gx-lptrack {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 6;
}
.gx-lpfill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-90deg);
}
.gx-pole {
  fill: none;
  stroke: #fff;
  stroke-width: 3.5;
  stroke-linecap: round;
}
.gx-flagcloth {
  fill: var(--red);
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linejoin: round;
}
.gx-flag {
  transform-origin: 0% 100%;
}

/* mash: a big arcade button hammered over and over */
.gx-btnbase {
  fill: var(--ink);
}
.gx-btnside {
  fill: var(--me-deep);
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linejoin: round;
}
.gx-btncap {
  fill: var(--me-c);
  stroke: var(--ink);
  stroke-width: 3.2;
}
.gx-btnshine {
  fill: rgba(255, 255, 255, 0.45);
}
.gx-bl {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4.5;
  stroke-linecap: round;
}
.gx-pop {
  fill: none;
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0;
}

/* type: keys light up as the finger hits them, letters fill the box */
.gx-field {
  fill: #141127;
  stroke: var(--ink);
  stroke-width: 2.6;
}
.gx-char {
  fill: #fff;
}
.gx-cover {
  fill: #141127;
}
.gx-typed {
  transform: translateX(33px);
}
.gx-caret {
  stroke: var(--me-hi);
  stroke-width: 3;
  stroke-linecap: round;
}
.gx-pad {
  fill: #3d3672;
  stroke: var(--ink);
  stroke-width: 2.4;
}

/* watch: the eye follows the ball */
.gx-eye {
  fill: #fff;
}
.gx-eyeline,
.gx-lash {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.gx-lash {
  stroke: #fff;
  stroke-width: 3;
}
.gx-iris {
  fill: var(--me-c);
  stroke: var(--ink);
  stroke-width: 2.6;
}
.gx-pupil {
  fill: var(--ink);
}
.gx-glint {
  fill: #fff;
}
.gx-ball {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 2.8;
}

/* keys: caps press down one after another and light up in your color */
.gx-keyglow {
  fill: var(--me-c);
  opacity: 0;
}
.gx-keyside {
  fill: var(--ink);
}
.gx-keyface {
  fill: #433b7c;
  stroke: var(--ink);
  stroke-width: 2.6;
}
.gx-keyshine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.gx-keytxt {
  fill: #fff;
  font: 800 16px var(--font-mono);
  text-anchor: middle;
  dominant-baseline: middle;
}
.gx-keyglyph {
  fill: #fff;
}
.gx-keyline {
  fill: none;
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  /* tap */
  .gx-h-tap {
    animation: gx-tap 1.6s var(--ease-out) infinite;
  }
  .gx--tap .gx-target {
    animation: gx-squish 1.6s var(--ease-spring) infinite;
  }
  .gx--tap .gx-ring1 {
    animation: gx-ripple 1.6s var(--ease-out) infinite;
  }
  .gx--tap .gx-ring2 {
    animation: gx-ripple 1.6s var(--ease-out) 0.16s infinite;
  }
  .gx-spark {
    animation: gx-spark 1.6s var(--ease-out) infinite;
  }
  /* drag */
  .gx--drag .gx-puckmove {
    animation: gx-drag-puck 2.4s ease-in-out infinite;
  }
  .gx-h-drag {
    animation: gx-drag-hand 2.4s ease-in-out infinite;
  }
  .gx-trail {
    animation: gx-drag-trail 2.4s ease-in-out infinite;
  }
  /* swipe */
  .gx-h-swipe-wrap {
    animation: gx-swipe 1.8s cubic-bezier(0.45, 0, 0.35, 1) infinite;
  }
  .gx-streak {
    animation: gx-streak 1.8s linear infinite;
  }
  .gx-arc {
    animation: gx-arc 1.8s cubic-bezier(0.45, 0, 0.35, 1) infinite;
  }
  .gx-chev {
    animation: gx-chev 1.8s var(--ease-spring) infinite;
  }
  .gx-chev2 {
    animation-delay: 0.08s;
  }
  /* hold */
  .gx-h-hold {
    animation: gx-hold 1.2s ease-in-out infinite;
  }
  .gx-hold1 {
    animation: gx-ripple-soft 1.2s var(--ease-out) infinite;
  }
  .gx-hold2 {
    animation: gx-ripple-soft 1.2s var(--ease-out) 0.6s infinite;
  }
  .gx-follow {
    animation: gx-follow 2.4s var(--ease-out) infinite;
  }
  /* long press */
  .gx-h-press {
    animation: gx-press 2.4s var(--ease-out) infinite;
  }
  .gx-lpfill {
    animation: gx-fill 2.4s linear infinite;
  }
  .gx-flag {
    animation: gx-flag 2.4s var(--ease-spring) infinite;
  }
  /* mash */
  .gx-h-mash {
    animation: gx-mash 0.24s ease-in-out infinite alternate;
  }
  .gx-btntop {
    animation: gx-btn 0.24s ease-in-out infinite alternate;
  }
  .gx-bl {
    animation: gx-blink 0.48s steps(1) infinite;
  }
  .gx-bl2 {
    animation-delay: 0.24s;
  }
  .gx-pop {
    animation: gx-pop 0.96s var(--ease-out) infinite;
  }
  .gx-pop2 {
    animation-delay: 0.48s;
  }
  /* type */
  .gx-h-type {
    animation: gx-type-hand 2.4s ease-in-out infinite;
  }
  .gx-pad {
    animation: gx-pad 2.4s linear infinite;
    animation-delay: calc(var(--k, 0) * 0.48s);
  }
  .gx-pad.gx-pad-idle {
    animation: none;
  }
  .gx-typed {
    animation: gx-typed 2.4s step-end infinite;
  }
  .gx-caret {
    animation: gx-blink 0.6s steps(1) infinite;
  }
  /* watch */
  .gx-look {
    animation: gx-look 1.4s ease-in-out infinite alternate;
  }
  .gx-orbit {
    animation: gx-orbit 1.4s ease-in-out infinite alternate;
  }
  /* keys */
  .gx-key .gx-keytop {
    animation: gx-key 1.6s var(--ease-out) infinite;
    animation-delay: calc(var(--k, 0) * 0.4s - 1.6s);
  }
  .gx-key .gx-keyface {
    animation: gx-keyface 1.6s linear infinite;
    animation-delay: calc(var(--k, 0) * 0.4s - 1.6s);
  }
  .gx-key .gx-keyglow {
    animation: gx-keyglow 1.6s var(--ease-out) infinite;
    animation-delay: calc(var(--k, 0) * 0.4s - 1.6s);
  }
  .gx--keys-space .gx-key *,
  .gx--keys-enter .gx-key * {
    animation-duration: 0.9s !important;
  }
}

@keyframes gx-tap {
  0%,
  72%,
  100% {
    transform: translate(9px, -18px) rotate(10deg);
  }
  28% {
    transform: translate(0, 0) scale(0.92);
  }
  42% {
    transform: translate(0, 0) scale(0.95);
  }
}
@keyframes gx-squish {
  0%,
  26%,
  70%,
  100% {
    transform: scale(1);
  }
  33% {
    transform: scale(0.78);
  }
  48% {
    transform: scale(1.12);
  }
}
@keyframes gx-ripple {
  0%,
  27% {
    opacity: 0;
    transform: scale(0.6);
  }
  31% {
    opacity: 1;
    transform: scale(0.8);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}
@keyframes gx-spark {
  0%,
  28% {
    opacity: 0;
    transform: scale(0.6);
  }
  34% {
    opacity: 1;
    transform: scale(0.9);
  }
  56%,
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}
@keyframes gx-drag-puck {
  0%,
  14% {
    transform: translate(0, 0) scale(1);
  }
  66%,
  84% {
    transform: translate(60px, 0) scale(1);
  }
  89% {
    transform: translate(60px, 0) scale(0);
  }
  90% {
    transform: translate(0, 0) scale(0);
  }
  97%,
  100% {
    transform: translate(0, 0) scale(1);
  }
}
@keyframes gx-drag-hand {
  0% {
    transform: translate(0, -14px) rotate(8deg);
  }
  12%,
  14% {
    transform: translate(0, 0) scale(0.94);
  }
  66%,
  80% {
    transform: translate(60px, 0) scale(0.94);
  }
  88% {
    transform: translate(62px, -16px) rotate(8deg);
  }
  100% {
    transform: translate(0, -14px) rotate(8deg);
  }
}
@keyframes gx-drag-trail {
  0%,
  14% {
    stroke-dashoffset: 60;
  }
  66%,
  84% {
    stroke-dashoffset: 0;
  }
  92% {
    stroke-dashoffset: -60;
  }
  92.1%,
  100% {
    stroke-dashoffset: 60;
  }
}
@keyframes gx-swipe {
  0% {
    transform: translate(-34px, 14px);
  }
  10% {
    transform: translate(6px, 10px);
  }
  56% {
    transform: translate(70px, -2px);
  }
  70%,
  100% {
    transform: translate(136px, -8px);
  }
}
@keyframes gx-streak {
  0%,
  10% {
    opacity: 0;
  }
  18%,
  56% {
    opacity: 0.9;
  }
  66%,
  100% {
    opacity: 0;
  }
}
@keyframes gx-arc {
  0%,
  8% {
    stroke-dashoffset: 100;
  }
  56%,
  84% {
    stroke-dashoffset: 0;
  }
  98%,
  100% {
    stroke-dashoffset: -100;
  }
}
@keyframes gx-chev {
  0%,
  50%,
  100% {
    transform: translateX(0) scale(1);
    opacity: 0.45;
  }
  60% {
    transform: translateX(6px) scale(1.25);
    opacity: 1;
  }
  80% {
    transform: translateX(2px) scale(1);
    opacity: 1;
  }
}
@keyframes gx-hold {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(0.9) translate(0, 1px);
  }
}
@keyframes gx-ripple-soft {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}
@keyframes gx-follow {
  0% {
    transform: translate(0, 0) scale(0);
  }
  8% {
    transform: translate(0, 0) scale(1);
  }
  72%,
  88% {
    transform: translate(34px, -42px) scale(1);
  }
  95% {
    transform: translate(34px, -42px) scale(0);
  }
  100% {
    transform: translate(0, 0) scale(0);
  }
}
@keyframes gx-press {
  0%,
  92%,
  100% {
    transform: translate(4px, -14px) rotate(8deg);
  }
  10%,
  74% {
    transform: translate(0, 0) scale(0.93);
  }
  82% {
    transform: translate(4px, -14px) rotate(8deg);
  }
}
@keyframes gx-fill {
  0%,
  10% {
    stroke-dashoffset: 100;
  }
  62%,
  92% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 100;
  }
}
@keyframes gx-flag {
  0%,
  60% {
    transform: scale(0);
  }
  70%,
  92% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes gx-mash {
  from {
    transform: translate(0, -9px) rotate(6deg);
  }
  to {
    transform: translate(0, 4px) scale(0.94);
  }
}
@keyframes gx-btn {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(5px);
  }
}
@keyframes gx-blink {
  50% {
    opacity: 0;
  }
}
@keyframes gx-pop {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@keyframes gx-type-hand {
  0% {
    transform: translate(0, -7px);
  }
  4%,
  16% {
    transform: translate(0, 0) scale(0.95);
  }
  20% {
    transform: translate(31px, 12px);
  }
  24%,
  36% {
    transform: translate(31px, 19px) scale(0.95);
  }
  40% {
    transform: translate(-21px, -7px);
  }
  44%,
  56% {
    transform: translate(-21px, 0) scale(0.95);
  }
  60% {
    transform: translate(10px, 12px);
  }
  64%,
  76% {
    transform: translate(10px, 19px) scale(0.95);
  }
  80% {
    transform: translate(11px, 29px);
  }
  84%,
  94% {
    transform: translate(11px, 36px) scale(0.95);
  }
  100% {
    transform: translate(0, -7px);
  }
}
@keyframes gx-pad {
  0%,
  3% {
    fill: #3d3672;
  }
  4% {
    fill: var(--me-hi);
  }
  14% {
    fill: var(--me-c);
  }
  19%,
  100% {
    fill: #3d3672;
  }
}
@keyframes gx-typed {
  0% {
    transform: translateX(0);
  }
  4% {
    transform: translateX(11px);
  }
  24% {
    transform: translateX(22px);
  }
  44% {
    transform: translateX(33px);
  }
  64% {
    transform: translateX(44px);
  }
  84% {
    transform: translateX(55px);
  }
  98%,
  100% {
    transform: translateX(0);
  }
}
@keyframes gx-look {
  from {
    transform: translate(-13px, 2px);
  }
  to {
    transform: translate(13px, 2px);
  }
}
@keyframes gx-orbit {
  from {
    transform: translate(-28px, 0);
  }
  to {
    transform: translate(28px, 0);
  }
}
@keyframes gx-key {
  0% {
    transform: translate(0, 4px);
  }
  16% {
    transform: translate(0, 4px);
  }
  26%,
  100% {
    transform: translate(0, 0);
  }
}
@keyframes gx-keyface {
  0% {
    fill: var(--me-hi);
  }
  14% {
    fill: var(--me-c);
  }
  26%,
  100% {
    fill: #433b7c;
  }
}
@keyframes gx-keyglow {
  0% {
    opacity: 0.85;
  }
  30%,
  100% {
    opacity: 0;
  }
}

/* ---- named moments: stamps and the title card (public/hype.js) ---------------------------- */
.mo-stamp {
  --mc: var(--blue);
  --mc-deep: var(--blue-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 92%, #fff), var(--mc));
  color: #fff;
  font: 400 28px/1 var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 var(--ink);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 3px var(--mc-deep);
  white-space: nowrap;
  transform: rotate(-6deg);
  animation: mo-stamp 0.5s var(--ease-slam, cubic-bezier(0.2, 0.9, 0.3, 1.25)) both;
  animation-delay: var(--mo-d, 0ms);
}
.mo-stamp.s1 {
  --mc: var(--red);
  --mc-deep: var(--red-deep);
}
.mo-mark {
  width: 1em;
  height: 1em;
  flex: none;
  color: var(--gold);
  filter: drop-shadow(0 2px 0 var(--ink));
}
.mo-stamp-sm {
  font-size: 20px;
  padding: 6px 12px 6px 9px;
  transform: rotate(-3deg);
}
.mo-stamp-xs {
  font-size: 13px;
  padding: 3px 7px 3px 5px;
  border-width: 2px;
  border-radius: 7px;
  gap: 4px;
  text-shadow: 0 2px 0 var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  transform: rotate(-2deg);
}
@keyframes mo-stamp {
  0% {
    opacity: 0;
    transform: rotate(-14deg) scale(2.6);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: rotate(-4deg) scale(0.92);
    filter: blur(0);
  }
  100% {
    opacity: 1;
  }
}
.mo-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: clamp(14px, 6vh, 60px);
}
.final-moments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 2px;
}
.h-mo {
  display: flex;
  gap: 4px;
  flex: none;
}
.h-mo:empty {
  display: none;
}

/* the big card for the main match moment */
.mo-card {
  --mc: var(--blue);
  --mc-hi: var(--blue-hi);
  --mc-deep: var(--blue-deep);
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 7;
  width: min(92%, 620px);
  translate: -50% 0;
  pointer-events: none;
  animation: mo-card 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  animation-delay: var(--mo-d, 0ms);
}
.mo-card.s1 {
  --mc: var(--red);
  --mc-hi: var(--red-hi);
  --mc-deep: var(--red-deep);
}
.mo-card-band {
  position: absolute;
  inset: 8% -4%;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background:
    repeating-linear-gradient(-58deg, rgba(255, 255, 255, 0.14) 0 3px, transparent 3px 16px),
    linear-gradient(100deg, var(--mc-deep), var(--mc) 40%, var(--mc) 60%, var(--mc-deep));
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.5),
    inset 0 3px 0 rgba(255, 255, 255, 0.3);
  transform: skewX(-12deg);
  overflow: hidden;
}
.mo-card-band i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: mo-sweep 1.6s ease-out both;
  animation-delay: calc(var(--mo-d, 0ms) + 0.35s);
}
.mo-card-band i:nth-child(2) {
  width: 6%;
  animation-delay: calc(var(--mo-d, 0ms) + 0.5s);
}
.mo-card-band i:nth-child(3) {
  width: 3%;
  animation-delay: calc(var(--mo-d, 0ms) + 0.62s);
}
.mo-card-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(14px + 4%) 18px calc(16px + 4%);
  text-align: center;
}
.mo-card-eyebrow {
  font: 800 12px/1.2 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 0 var(--ink);
}
.mo-card-title {
  font: 400 clamp(46px, 13vw, 92px)/0.95 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0 6px 0 var(--ink),
    0 0 26px color-mix(in srgb, var(--mc-hi) 70%, transparent);
  animation: mo-title 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
  animation-delay: calc(var(--mo-d, 0ms) + 0.08s);
}
.mo-card-sub {
  margin-top: 4px;
  font: 800 clamp(14px, 3.6vw, 19px)/1.2 var(--font-body);
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}
@keyframes mo-card {
  0% {
    opacity: 0;
    transform: translateX(-30%) scaleX(0.4);
  }
  55% {
    opacity: 1;
    transform: translateX(3%) scaleX(1.04);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes mo-title {
  0% {
    opacity: 0;
    transform: scale(2.4);
    filter: blur(8px);
  }
  65% {
    opacity: 1;
    transform: scale(0.94);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes mo-sweep {
  from {
    left: -20%;
  }
  to {
    left: 120%;
  }
}
/* the stream overlay version spans the whole width */
.mo-card-full {
  top: 50%;
  bottom: auto;
  width: 100%;
  translate: -50% -50%;
}
.mo-card-full .mo-card-band {
  inset: 4% -2%;
  border-radius: 0;
}
.mo-card-full .mo-card-title {
  font-size: clamp(80px, 11vw, 200px);
}
.mo-card-full .mo-card-sub {
  font-size: clamp(20px, 2.2vw, 40px);
}
.mo-card-full .mo-card-eyebrow {
  font-size: clamp(14px, 1.2vw, 22px);
}
@media (prefers-reduced-motion: reduce) {
  .mo-stamp,
  .mo-card,
  .mo-card-title {
    animation-duration: 0.01s;
  }
  .mo-card-band i {
    display: none;
  }
}

/* ---- viewer count for the players ---------------------------------------------------------- */
.bar-watch,
.sb-watch,
.hud-watch {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bar-watch {
  margin-left: 6px;
}
.hud-watch {
  display: block;
  line-height: 1.1;
}
.bar-watch[hidden],
.sb-watch[hidden],
.hud-watch[hidden] {
  display: none;
}
.watch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}
.watch-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 13px;
}
.watch-row-text b {
  font-size: 15px;
}
.watch-row .btn {
  flex: none;
  gap: 6px;
}
.watch-row .btn svg {
  width: 18px;
  height: 18px;
}

/* ---- the watch page (/w/CODE) ---------------------------------------------------------------- */
.watch-body {
  overflow-x: hidden;
}
.wt-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: var(--bar-full);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: var(--safe-t) 12px 0;
  background: linear-gradient(180deg, rgba(11, 10, 20, 0.95), rgba(11, 10, 20, 0.82));
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}
.wt-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0 36%, var(--violet) 36% 64%, var(--red) 64%);
}
.wt-logo {
  font: 400 22px/1 var(--font-display);
  letter-spacing: 0.02em;
  color: var(--blue-hi);
  text-decoration: none;
  white-space: nowrap;
}
.wt-logo i {
  font-style: normal;
  color: var(--violet-hi);
  margin: 0 3px;
}
.wt-logo i + span {
  color: var(--red-hi);
}
.wt-sb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wt-sb-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wt-sb-seat.s0 {
  justify-content: flex-end;
}
.wt-sb-name {
  font: 800 15px/1.1 var(--font-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-sb-seat.s0 .wt-sb-name {
  color: var(--blue-hi);
}
.wt-sb-seat.s1 .wt-sb-name {
  color: var(--red-hi);
}
.wt-sb-score {
  min-width: 2.6em;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 17px;
  text-align: center;
  color: #fff;
  box-shadow: 0 3px 0 var(--ink);
}
.wt-sb-seat.s0 .wt-sb-score {
  background: var(--blue);
}
.wt-sb-seat.s1 .wt-sb-score {
  background: var(--red);
}
.wt-sb-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 34vw;
  text-align: center;
}
.wt-sb-game {
  font: 400 17px/1.05 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.wt-sb-sub {
  font-size: 11px;
  color: var(--gold);
  white-space: pre;
}
.wt-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wt-watch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mint);
  white-space: nowrap;
}
.wt-watch[hidden],
.wt-delay[hidden] {
  display: none;
}
.wt-watch.is-off {
  opacity: 0.4;
}
.wt-stream-btn {
  gap: 6px;
}
@media (max-width: 760px) {
  .wt-logo,
  .wt-stream-btn,
  .wt-delay {
    display: none;
  }
  .wt-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 8px;
    padding-right: 8px;
  }
  .wt-sb-name {
    font-size: 13px;
  }
  .wt-sb-score {
    font-size: 13px;
    min-width: 3.4em;
    padding: 3px 4px;
  }
  .wt-sb {
    gap: 6px;
  }
  .wt-sb-seat {
    gap: 5px;
  }
  .wt-watch span {
    display: none;
  }
}
.wt-main {
  position: relative;
}
.wt-scr {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--bar-full) - 60px);
}
.wt-stand {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.wt-stand-title {
  font-size: clamp(30px, 7vw, 46px);
}
.wt-plates {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}
.wt-stand .tbar {
  width: min(100%, 420px);
}
.wt-plates > [data-p] {
  display: grid;
}
.wt-vs {
  align-self: center;
  font-size: 30px;
  color: var(--gold);
}
.wt-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  box-shadow: var(--drop);
  min-width: 0;
}
.wt-plate.s1 {
  background: linear-gradient(180deg, var(--red), var(--red-deep));
}
.wt-plate.is-empty {
  background: var(--panel);
  opacity: 0.7;
}
.wt-plate-corner {
  font: 800 11px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.wt-plate-name {
  font: 400 clamp(22px, 5vw, 32px)/1 var(--font-display);
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.wt-lock.is-on {
  color: var(--gold);
}
.wt-fb {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(90%, 520px);
  height: fit-content;
  text-align: center;
}
.scr-howto.is-watch .ht-ready,
.scr-howto.is-watch .ht-wait {
  display: none;
}

/* both game screens */
.wt-play {
  position: fixed;
  top: var(--bar-full);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px calc(8px + var(--safe-b));
}
.wt-tabs {
  display: none;
  flex: none;
}
.wt-tab.s0[aria-checked="true"] {
  --seg-on: var(--blue);
}
.wt-tab.s1[aria-checked="true"] {
  --seg-on: var(--red);
}
.wt-panes {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 14px;
  width: 100%;
}
.wt-pane {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wt-center {
  flex: none;
  width: clamp(110px, 12vw, 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.wt-center-vs {
  font-size: clamp(34px, 4vw, 72px);
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    -3px 0 0 var(--blue),
    3px 0 0 var(--red),
    0 5px 0 var(--ink);
  transform: skewX(-8deg);
}
.wt-center-ico {
  width: clamp(72px, 8vw, 140px);
  height: auto;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--panel-hi);
  box-shadow: var(--drop);
  object-fit: cover;
}
.wt-center-name {
  font-size: clamp(18px, 1.7vw, 32px);
  line-height: 1;
}
.wt-center-pts {
  font-size: clamp(22px, 2.2vw, 44px);
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 3px 0 var(--ink);
}
.wt-center-sub {
  font-size: clamp(12px, 1vw, 18px);
  font-weight: 700;
  color: var(--muted);
}
.wt-pane-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}
.wt-pane.s1 .wt-pane-head {
  flex-direction: row-reverse;
  background: linear-gradient(270deg, var(--red), var(--red-deep));
}
.wt-pane-name {
  font: 400 20px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 0 var(--ink);
}
.wt-pane-score {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
}
.wt-pane.s1 .wt-pane-score {
  margin-left: 0;
  margin-right: auto;
}
.wt-pane-chip {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #fff;
  border: 2px solid var(--ink);
}
.wt-phone {
  position: relative;
  flex: none;
  border-radius: 22px;
}
.wt-phone-in {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 788px;
  transform-origin: 0 0;
  border: 3px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: var(--stage);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.45);
}
.wt-pane.s0 .wt-phone-in {
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.45),
    0 0 0 3px var(--blue-deep);
}
.wt-pane.s1 .wt-phone-in {
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.45),
    0 0 0 3px var(--red-deep);
}
.wt-frame {
  display: block;
  width: 390px;
  height: 788px;
  border: 0;
  pointer-events: none;
  background: transparent;
}
.wt-pane-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: radial-gradient(80% 60% at 50% 45%, #262242, #0b0a14);
  border-radius: 16px;
}
.wt-pane-card[hidden] {
  display: none;
}
.wt-pane-card .display {
  font-size: clamp(24px, 3vw, 38px);
}
.wt-pane-card span {
  max-width: 30ch;
  color: var(--muted);
  font-size: 14px;
}
.wt-pane-ico {
  color: var(--gold);
}
.wt-pane-ico svg {
  width: 56px;
  height: 56px;
}
.wt-play.is-outro .wt-phone {
  filter: saturate(0.9);
}
@media (max-width: 760px) {
  .wt-tabs {
    display: flex;
  }
  .wt-center {
    display: none;
  }
  .wt-play[data-focus="0"] .wt-pane.s1,
  .wt-play[data-focus="1"] .wt-pane.s0 {
    display: none;
  }
}
.wt-mo {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.wt-play-cta {
  align-self: center;
}

/* ---- stream mode: 16:9, no menus, nothing scrolls ----------------------------------------------- */
body.is-stream {
  --bar-h: clamp(70px, 10vh, 120px);
  --bar-full: var(--bar-h);
  --safe-t: 0px;
  --safe-b: 0px;
  overflow: hidden;
  height: 100vh;
}
body.is-stream::-webkit-scrollbar {
  display: none;
}
body.is-stream .wt-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 2vw;
}
body.is-stream .wt-logo,
body.is-stream .wt-stream-btn,
body.is-stream .wt-mute,
body.is-stream .wt-delay {
  display: none;
}
body.is-stream .wt-sb {
  gap: 2vw;
}
body.is-stream .wt-sb-name {
  font: 400 clamp(28px, 3.4vw, 64px)/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 0 var(--ink);
}
body.is-stream .wt-sb-score {
  font-size: clamp(26px, 2.8vw, 54px);
  padding: 4px 14px;
  border-width: 3px;
  border-radius: 12px;
  box-shadow: 0 5px 0 var(--ink);
}
body.is-stream .wt-sb-mid {
  max-width: 30vw;
}
body.is-stream .wt-sb-game {
  font-size: clamp(22px, 2.2vw, 42px);
}
body.is-stream .wt-sb-sub {
  font-size: clamp(14px, 1.2vw, 24px);
  font-weight: 800;
}
body.is-stream .wt-watch {
  font-size: clamp(16px, 1.3vw, 26px);
}
body.is-stream .wt-watch svg {
  width: 1.2em;
  height: 1.2em;
}
body.is-stream .wt-main {
  height: calc(100vh - var(--bar-full));
  overflow: hidden;
}
body.is-stream .wt-scr {
  min-height: 100%;
}
body.is-stream .scr-final {
  height: 100%;
  overflow: hidden;
}
body.is-stream .wt-play {
  padding: 1.2vh 2vw 1.6vh;
  gap: 1vh;
}
body.is-stream .wt-tabs {
  display: none;
}
body.is-stream .wt-panes {
  column-gap: 3vw;
}
body.is-stream .wt-center {
  display: flex;
}
body.is-stream .wt-pane.s0,
body.is-stream .wt-pane.s1 {
  display: flex;
}
body.is-stream .wt-pane-head {
  display: none;
}

/* ---- a game pane (pane.html) --------------------------------------------------------------- */
.pane-body {
  margin: 0;
  overflow: hidden;
  background: var(--stage);
}
.pane-body::before,
.pane-body::after {
  display: none;
}
.pane-screen {
  --hud-h: 0px;
  --safe-t: 0px;
  --safe-r: 0px;
  --safe-b: 0px;
  --safe-l: 0px;
  grid-template-rows: minmax(0, 1fr);
}

/* music on/off, next to the sound button */
.music-btn[hidden] {
  display: none;
}
.music-btn[aria-pressed="false"] {
  color: var(--muted);
}
.music-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
body.is-stream .wt-music {
  display: none;
}
