/* Turbo Sumas: a Mini Racers sibling with its own nitro look (violet + cyan). */
:root {
  --ts-v: #6a2cff;
  --ts-v2: #4a14c9;
  --ts-c: #19c6ff;
  --ts-y: #ffd23f;
  --ts-ink: #1d1640;
}
body {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 3px, rgba(255, 255, 255, 0) 3px 46px),
    linear-gradient(160deg, var(--c1), var(--c2));
}

/* ---------- Menu ---------- */
.pop-menu .pop-logo {
  width: 230px;
  height: 128px;
  background: radial-gradient(closest-side, rgba(255, 240, 160, 0.6), rgba(255, 240, 160, 0));
}
.pop-menu .pop-logo canvas {
  width: 230px;
  height: 128px;
  filter: drop-shadow(0 8px 10px rgba(20, 0, 60, 0.35));
}
.pop-menu .pop-title {
  margin-top: -14px;
  font-style: italic;
  transform: skewX(-6deg);
  letter-spacing: 0.5px;
}
.pop-title .t1 {
  color: #ffe14d;
}
.pop-title .t2 {
  color: #ffffff;
}
.ts-sub {
  margin: 2px 0 0;
  padding: 2px 14px;
  border-radius: 999px;
  background: rgba(20, 8, 70, 0.35);
  color: #bff3ff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.ts-gar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 460px;
  margin: 12px 0 2px;
  padding: 8px 14px 8px 8px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 236, 255, 0.95));
  box-shadow:
    0 5px 0 rgba(30, 10, 80, 0.3),
    0 9px 16px rgba(20, 0, 60, 0.2);
  color: var(--ts-ink);
  text-align: left;
}
.ts-gar canvas {
  width: 64px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 14px;
}
.ts-gar b {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}
.ts-gar small {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #4d4670;
}
.ts-gar .ts-wal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 1px 10px;
  border-radius: 999px;
  background: #fff1b8;
  font-weight: 800;
  font-size: 15px;
}
.ts-gar .mr-ic {
  width: 17px;
  height: 17px;
}
.pop-row.ts-crow {
  margin-top: 12px;
}
.pop-btn.ts-cbtn {
  background: linear-gradient(180deg, #eef3f8, #dfe6ee);
  color: #2a3448;
  font-size: 15px;
}
.pop-btn.ts-cbtn[aria-pressed="true"] {
  background: linear-gradient(180deg, #a8f0b2, #5fd17a);
  color: #0f3d1e;
}
.ts-chint {
  margin: 6px 0 0;
  max-width: 420px;
  text-align: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.85;
}

/* ---------- Play screen: violet header ---------- */
.pop-play {
  background: #1c1440;
}
.pop-hud {
  margin-bottom: -22px;
  padding: 8px 10px 10px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  border-radius: 0 0 26px 26px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 6px, rgba(255, 255, 255, 0) 6px 22px),
    linear-gradient(180deg, #8a4dff 0%, #6a2cff 55%, #5419e0 100%);
  box-shadow:
    inset 0 -3px 0 rgba(30, 0, 90, 0.3),
    0 6px 14px rgba(10, 10, 40, 0.35);
}
.pop-hud .pop-icon {
  width: 46px;
  height: 46px;
  color: #3a1aa0;
  background: #fff;
  box-shadow: 0 3px 0 rgba(30, 0, 90, 0.4);
}
.pop-hud .pop-icon svg {
  width: 22px;
  height: 22px;
}
.pop-hud .pop-icon:last-child {
  background: linear-gradient(180deg, #5fe0ff, #10a6e8);
  color: #fff;
  box-shadow:
    inset 0 0 0 3px #fff,
    0 3px 0 rgba(30, 0, 90, 0.4);
}
.pop-hud .pop-lvl {
  font-size: 20px;
  text-shadow: 0 2px 0 rgba(30, 0, 90, 0.4);
}
.pop-hud .pop-lvl small {
  font-size: 14px;
  max-width: 120px;
}
.pop-hud .pop-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 16px;
  color: var(--ts-ink);
  background: #fff;
  box-shadow: 0 2px 0 rgba(30, 0, 90, 0.35);
}
.pop-hud .pop-chip .mr-ic {
  width: 18px;
  height: 18px;
}
.ts-pos {
  font-size: 17px;
}
.ts-pos small {
  font-size: 12px;
  opacity: 0.6;
}
.pop-chip.ts-bump {
  animation: ts-bump 0.35s;
}

/* The DOM layer holds the question card, the track and the answer pad.
   It lets taps through to the road (lanes) except on its own controls. */
.pop-stage .pop-dom {
  display: block;
  padding: 0;
  pointer-events: none;
}
.ts-top {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

/* race track: every car's progress to the flag */
.ts-track {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(14, 8, 46, 0.72), rgba(30, 16, 80, 0.72));
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(255, 255, 255, 0.18);
}
.ts-track::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 30px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 8px, rgba(255, 255, 255, 0) 8px 14px);
}
.ts-flag {
  position: absolute;
  right: 6px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: conic-gradient(#1b1b24 0 25%, #fff 0 50%, #1b1b24 0 75%, #fff 0) 0 0 / 10px 10px;
  box-shadow: 0 0 0 2px #fff;
}
.ts-mk {
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: var(--mc);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  color: #fff;
  font: 800 11px/18px var(--font);
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  will-change: transform;
}
.ts-mk.me {
  top: 1px;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  z-index: 2;
  border-width: 3px;
  font-size: 10px;
  line-height: 22px;
  box-shadow:
    0 0 0 2px #ffd23f,
    0 2px 6px rgba(0, 0, 0, 0.4);
}

/* question card */
.ts-q {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  padding: 4px 14px 6px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbf8ff 70%, #efe8ff 100%);
  box-shadow:
    inset 0 -4px 0 rgba(106, 44, 255, 0.12),
    0 6px 0 rgba(40, 14, 120, 0.45),
    0 14px 26px rgba(10, 0, 40, 0.35);
  color: var(--ts-ink);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  pointer-events: auto;
}
.ts-q::before {
  /* chequered strip on the card's left edge: it's a racing ticket */
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 10px;
  border-radius: 0 6px 6px 0;
  background: conic-gradient(#1b1b24 0 25%, #fff 0 50%, #1b1b24 0 75%, #fff 0) 0 0 / 10px 10px;
  opacity: 0.85;
}
.ts-q .n {
  text-shadow: 0 3px 0 rgba(106, 44, 255, 0.15);
}
.ts-q .o {
  font-size: 0.86em;
}
.ts-q .o.mas {
  color: #19b34a;
}
.ts-q .o.menos {
  color: #ff7a1a;
}
.ts-q .eq {
  color: #9b8fc4;
  font-size: 0.86em;
}
.ts-q .slot {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.12em;
  padding: 0 0.12em;
  border-radius: 16px;
  background: #f0eaff;
  border: 3px dashed #a98cff;
  color: #6a2cff;
  animation: ts-slot 1.2s ease-in-out infinite;
}
.ts-q .slot.typed {
  border-style: solid;
  background: #fff;
  animation: none;
}
.ts-q .slot.ok {
  background: #d9ffe0;
  border: 3px solid #2fbf55;
  color: #14853a;
  animation: ts-pop 0.35s cubic-bezier(0.2, 1.8, 0.4, 1);
}
.ts-q .slot.fix {
  background: #fff3c4;
  border: 3px solid #ffb400;
  color: #a86200;
  animation: ts-pop 0.35s cubic-bezier(0.2, 1.8, 0.4, 1);
}
.ts-q .del {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f2edff, #ddd2ff);
  box-shadow: 0 3px 0 rgba(60, 30, 150, 0.3);
  color: #4a14c9;
  font-size: 22px;
  display: grid;
  place-items: center;
}
.ts-q .del:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(60, 30, 150, 0.3);
}
.ts-q.has-del {
  padding-right: 58px;
}
.ts-q .streak {
  position: absolute;
  left: 14px;
  top: -12px;
  padding: 1px 9px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb13d, #ff5d1f);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  box-shadow: 0 2px 0 rgba(150, 40, 0, 0.45);
  text-shadow: 0 1px 0 rgba(120, 30, 0, 0.5);
}
.ts-q .streak.super {
  background: linear-gradient(90deg, #8a4dff, #19c6ff);
  box-shadow: 0 2px 0 rgba(30, 0, 120, 0.5), 0 0 12px rgba(25, 198, 255, 0.8);
}
.ts-q .intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
  color: #4d4670;
}
.ts-q .intro b {
  font-size: 24px;
  color: var(--ts-ink);
}
.ts-q .intro .ej {
  margin-top: 3px;
  padding: 1px 12px;
  border-radius: 999px;
  background: #f0eaff;
  color: #6a2cff;
  font-weight: 800;
  font-size: 16px;
}
.ts-q.enter {
  animation: ts-enter 0.32s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.ts-q.leave {
  animation: ts-leave 0.26s ease-in forwards;
}
.ts-q.ok {
  box-shadow:
    inset 0 -4px 0 rgba(47, 191, 85, 0.25),
    0 0 0 4px #2fbf55,
    0 6px 0 4px rgba(20, 110, 50, 0.5),
    0 14px 26px rgba(10, 0, 40, 0.35);
}
.ts-q.bad {
  animation: ts-shake 0.42s;
  box-shadow:
    0 0 0 4px #ffb400,
    0 6px 0 4px rgba(160, 90, 0, 0.45),
    0 14px 26px rgba(10, 0, 40, 0.35);
}
.ts-note {
  padding: 3px 16px;
  border-radius: 999px;
  background: #fff3c4;
  color: #8a4b00;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 3px 0 rgba(160, 90, 0, 0.35);
  animation: ts-pop 0.35s cubic-bezier(0.2, 1.8, 0.4, 1);
}

/* answer pad */
.ts-pad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(22, 10, 64, 0) 0, rgba(22, 10, 64, 0.72) 26px, rgba(22, 10, 64, 0.88) 100%);
  pointer-events: none;
}
.ts-pad .grid {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  pointer-events: auto;
}
.ts-pad.b4 .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ts-pad.l3 .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ts-pad.np .grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ts-pad.fixh .grid {
  min-height: 142px;
  align-content: center;
}
.ts-btn {
  --bc: var(--base, #2f8bff);
  position: relative;
  height: 66px;
  border: 0;
  border-radius: 20px;
  padding: 0;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--bc), color-mix(in srgb, var(--bc) 78%, #12062e));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -5px 0 rgba(0, 0, 0, 0.16),
    0 5px 0 color-mix(in srgb, var(--bc) 55%, #12062e),
    0 9px 16px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
  touch-action: manipulation;
  transition: transform 0.08s, opacity 0.2s, filter 0.2s;
  animation: ts-btn-in 0.36s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}
.ts-btn:nth-child(2) {
  animation-delay: 0.05s;
}
.ts-btn:nth-child(3) {
  animation-delay: 0.1s;
}
.ts-btn:nth-child(4) {
  animation-delay: 0.15s;
}
.ts-btn:active,
.ts-btn.press {
  transform: translateY(4px) scale(0.97);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.16),
    0 1px 0 color-mix(in srgb, var(--bc) 55%, #12062e);
}
.ts-btn .k {
  display: none;
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 12px;
  opacity: 0.8;
  text-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  .ts-btn .k {
    display: block;
  }
}
.ts-btn .ar {
  position: absolute;
  left: 50%;
  bottom: 4px;
  font-size: 12px;
  opacity: 0.85;
  transform: translateX(-50%);
  text-shadow: none;
}
.ts-btn.dim {
  opacity: 0.4;
  filter: saturate(0.5);
}
.ts-btn.ok {
  --bc: #22c55e;
  animation: ts-ok 0.45s cubic-bezier(0.2, 1.8, 0.4, 1);
  box-shadow:
    0 0 0 4px #fff,
    0 0 22px 6px rgba(120, 255, 150, 0.85),
    0 5px 0 #157a3a;
}
.ts-btn.bad {
  --bc: #ff5a6e;
  animation: ts-shake 0.4s;
}
.ts-btn.show {
  --bc: #22c55e;
  animation: ts-pulse 0.6s ease-in-out 2;
  box-shadow:
    0 0 0 4px #fff,
    0 0 18px 4px rgba(120, 255, 150, 0.8),
    0 5px 0 #157a3a;
}
.ts-btn.pick {
  box-shadow:
    0 0 0 4px #ffd23f,
    0 0 18px 4px rgba(255, 210, 63, 0.8),
    0 5px 0 color-mix(in srgb, var(--bc) 55%, #12062e);
}
.ts-pad.np .ts-btn {
  --bc: #ffffff;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #e9e2ff);
  box-shadow:
    inset 0 -4px 0 rgba(106, 44, 255, 0.15),
    0 5px 0 #8f72e6,
    0 8px 14px rgba(0, 0, 0, 0.3);
  color: #3a1aa0;
  text-shadow: none;
  font-size: 32px;
  animation: none;
}
.ts-pad.np .ts-btn:active,
.ts-pad.np .ts-btn.press {
  transform: translateY(4px);
  box-shadow:
    inset 0 -2px 0 rgba(106, 44, 255, 0.15),
    0 1px 0 #8f72e6;
  background: linear-gradient(180deg, #fff6c8, #ffe27a);
}

/* big texts over the road */
.ts-ban {
  position: absolute;
  left: 0;
  right: 0;
  top: 44%;
  text-align: center;
  pointer-events: none;
  font-weight: 800;
  font-style: italic;
  font-size: 46px;
  line-height: 1;
  color: #fff35a;
  text-shadow:
    3px 0 0 #4a14c9,
    -3px 0 0 #4a14c9,
    0 3px 0 #4a14c9,
    0 -3px 0 #4a14c9,
    2px 2px 0 #4a14c9,
    -2px 2px 0 #4a14c9,
    2px -2px 0 #4a14c9,
    -2px -2px 0 #4a14c9,
    0 6px 0 #2a0a80,
    0 10px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
}
.ts-ban.go {
  animation: ts-ban 0.95s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
.ts-ban.super {
  color: #8ff3ff;
  font-size: 52px;
}
.ts-ban.bad {
  color: #fff;
  font-size: 34px;
  font-style: normal;
}
.ts-ban small {
  display: block;
  font-size: 0.45em;
  margin-top: 4px;
  color: #fff;
}
.ts-ban.fin {
  top: 30%;
  font-size: 84px;
  color: #ffd23f;
}
.ts-ban.fin.go {
  animation: ts-fin 2.2s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

/* countdown: a start gantry with three lamps */
.ts-cd {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.ts-lights {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #2c2f45, #15172a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 0 0 3px #4b4f6e,
    0 10px 20px rgba(0, 0, 0, 0.45);
}
.ts-lights i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a4d63, #1d1f30);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
  transition: background 0.1s;
}
.ts-lights i.r {
  background: radial-gradient(circle at 35% 30%, #ffd0d0, #ff3040 45%, #a3000f);
  box-shadow:
    0 0 18px 6px rgba(255, 40, 60, 0.7),
    inset 0 -3px 4px rgba(0, 0, 0, 0.3);
}
.ts-lights i.g {
  background: radial-gradient(circle at 35% 30%, #e0ffd8, #3cf05a 45%, #0a8a26);
  box-shadow:
    0 0 22px 8px rgba(60, 240, 90, 0.75),
    inset 0 -3px 4px rgba(0, 0, 0, 0.3);
}
.ts-num {
  font-weight: 800;
  font-size: 110px;
  line-height: 1;
  color: #fff;
  text-shadow:
    4px 0 0 #2a0a80,
    -4px 0 0 #2a0a80,
    0 4px 0 #2a0a80,
    0 -4px 0 #2a0a80,
    3px 3px 0 #2a0a80,
    -3px 3px 0 #2a0a80,
    3px -3px 0 #2a0a80,
    -3px -3px 0 #2a0a80,
    0 9px 0 #1a0560,
    0 14px 24px rgba(0, 0, 0, 0.45);
}
.ts-num.go {
  animation: ts-count 0.8s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.ts-num.ya {
  color: #7dff7a;
  font-style: italic;
}

/* coins flying to the wallet chip */
.ts-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 22px;
  height: 22px;
  pointer-events: none;
  animation: ts-fly 0.7s cubic-bezier(0.5, 0, 0.7, 0.4) forwards;
}
.ts-fly svg {
  width: 100%;
  height: 100%;
}

/* ---------- End of the race: podium above Pop's result card ---------- */
.pop-stage.ts-end .pop-overlay {
  padding-top: 22px;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(20, 10, 50, 0) 30%, rgba(20, 10, 50, 0.55));
}
.pop-stage.ts-end .pop-card {
  max-width: 380px;
  padding: 12px 16px 16px;
  border-radius: 26px;
}
.pop-stage.ts-end .pop-card h2 {
  font-size: 28px;
}
.pop-stage.ts-end .pop-bigstars {
  font-size: 36px;
  line-height: 1.1;
}
.pop-stage.ts-end .pop-card p {
  margin: 4px 0 0;
}
.pop-stage.ts-end .pop-card .pop-row {
  margin-top: 10px;
}
.ts-podium {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100% + 32px);
  margin: 0 -16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% 45%, rgba(255, 230, 120, 0.35), rgba(255, 230, 120, 0) 70%),
    linear-gradient(180deg, rgba(20, 8, 70, 0.75), rgba(40, 14, 120, 0.55) 70%, rgba(40, 14, 120, 0));
  animation: pop-fade 0.35s;
  overflow: hidden;
}
.ts-podium .rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.14) 0 8deg, rgba(255, 255, 255, 0) 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0, #000 12%, transparent 56%);
  mask: radial-gradient(circle, #000 0, #000 12%, transparent 56%);
  animation: pop-spin 30s linear infinite;
}
.ts-trophy {
  position: relative;
  font-size: 58px;
  line-height: 1;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
  animation: ts-trophy 0.7s 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) backwards, pop-bob 2.4s 1.6s ease-in-out infinite;
}
.ts-blocks {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 360px;
}
.ts-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.ts-step img {
  width: 44px;
  height: 72px;
  margin-bottom: -6px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35));
  animation: ts-drop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
}
.ts-step .nm {
  max-width: 100%;
  margin-bottom: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sc, #fff);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  order: -1;
  animation: pop-fade 0.4s backwards;
}
.ts-step.me .nm {
  background: #ffd23f;
  color: var(--ts-ink);
  text-shadow: none;
  box-shadow: 0 0 0 2px #fff;
}
.ts-step .blk {
  width: 100%;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 0 0;
  color: #fff;
  font-weight: 800;
  font-size: 30px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), inset 0 -6px 0 rgba(0, 0, 0, 0.12);
  transform-origin: bottom;
  animation: ts-rise 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
.ts-step.p1 .blk {
  height: 92px;
  background: linear-gradient(180deg, #ffe066, #f5b400);
}
.ts-step.p2 .blk {
  height: 66px;
  background: linear-gradient(180deg, #e9eef7, #aab5c9);
}
.ts-step.p3 .blk {
  height: 46px;
  background: linear-gradient(180deg, #ffbf8a, #d9742c);
}
.ts-step.p2 .blk,
.ts-step.p2 img,
.ts-step.p2 .nm {
  animation-delay: 0.2s;
}
.ts-step.p1 .blk,
.ts-step.p1 img,
.ts-step.p1 .nm {
  animation-delay: 0.45s;
}
.ts-step.p3 .blk,
.ts-step.p3 img,
.ts-step.p3 .nm {
  animation-delay: 0s;
}
.ts-step img {
  animation-delay: 0.5s !important;
}
.ts-step.p1 img {
  animation-delay: 0.75s !important;
}
.ts-floor {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 10px;
  border-radius: 6px;
  background: conic-gradient(#1b1b24 0 25%, #fff 0 50%, #1b1b24 0 75%, #fff 0) 0 0 / 10px 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.ts-fourth {
  position: relative;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  font-size: 15px;
  animation: pop-fade 0.4s 1s backwards;
}
.ts-fourth img {
  width: 22px;
  height: 36px;
}
.ts-conf {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: ts-fall linear infinite;
}

/* result card extras */
.ts-res {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 4px;
}
.ts-res span {
  padding: 1px 10px;
  border-radius: 999px;
  background: #f1ecff;
  color: #3a1aa0;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
.ts-res .mr-ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}
.ts-coins {
  display: block;
  margin: 2px auto 4px;
  width: fit-content;
  padding: 2px 12px;
  border-radius: 999px;
  background: #fff1b8;
  color: var(--ts-ink);
  font-weight: 800;
  font-size: 14px;
  animation: pop-in 0.5s 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}
.ts-coins .mr-ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}
.ts-rep {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.35;
  color: #4d4670;
}
.ts-rep b {
  display: inline-block;
  margin: 1px 2px;
  padding: 0 8px;
  border-radius: 8px;
  background: #fff3c4;
  color: #8a4b00;
  white-space: nowrap;
}

@keyframes ts-bump {
  40% {
    transform: scale(1.22);
  }
}
@keyframes ts-slot {
  50% {
    transform: translateY(-3px);
    border-color: #6a2cff;
  }
}
@keyframes ts-pop {
  from {
    transform: scale(0.4);
  }
}
@keyframes ts-enter {
  from {
    transform: translateX(105%) rotate(5deg);
    opacity: 0;
  }
}
@keyframes ts-leave {
  to {
    transform: translateX(-110%) rotate(-6deg);
    opacity: 0;
  }
}
@keyframes ts-shake {
  20% {
    transform: translateX(-9px) rotate(-2deg);
  }
  40% {
    transform: translateX(8px) rotate(2deg);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}
@keyframes ts-btn-in {
  from {
    transform: scale(0.3) translateY(20px);
    opacity: 0;
  }
}
@keyframes ts-ok {
  40% {
    transform: scale(1.12);
  }
}
@keyframes ts-pulse {
  50% {
    transform: scale(1.07);
  }
}
@keyframes ts-ban {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-8deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.12) rotate(-3deg);
  }
  45% {
    transform: scale(1) rotate(-3deg);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.05) translateY(-40px) rotate(-3deg);
  }
}
@keyframes ts-fin {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-12deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.2) rotate(-4deg);
  }
  35%,
  85% {
    opacity: 1;
    transform: scale(1) rotate(-4deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.1) rotate(-4deg);
  }
}
@keyframes ts-count {
  0% {
    transform: scale(2.2);
    opacity: 0;
  }
  35% {
    transform: scale(0.9);
    opacity: 1;
  }
  55% {
    transform: scale(1.05);
  }
}
@keyframes ts-fly {
  0% {
    transform: translate(var(--x0), var(--y0)) scale(1.3);
  }
  100% {
    transform: translate(var(--x1), var(--y1)) scale(0.7);
    opacity: 0.6;
  }
}
@keyframes ts-rise {
  from {
    transform: scaleY(0);
  }
}
@keyframes ts-drop {
  0% {
    transform: translateY(-160px) rotate(-20deg);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}
@keyframes ts-trophy {
  from {
    transform: scale(0) rotate(-30deg);
  }
}
@keyframes ts-fall {
  to {
    transform: translateY(520px) rotate(720deg);
  }
}

/* Modo cómodo and reduced motion: no shaking, popping or spinning. */
.ts-calm .ts-q.enter,
.ts-calm .ts-q.leave,
.ts-calm .ts-q.bad,
.ts-calm .ts-btn,
.ts-calm .ts-btn.ok,
.ts-calm .ts-btn.bad,
.ts-calm .ts-btn.show,
.ts-calm .ts-q .slot,
.ts-calm .ts-podium .rays,
.ts-calm .ts-trophy,
.ts-calm .ts-num.go {
  animation: none;
}
.ts-calm .ts-ban.go {
  animation: pop-fade 0.2s;
  opacity: 1;
}
.ts-calm .ts-ban.go.gone {
  opacity: 0;
  transition: opacity 0.3s;
}
.ts-calm .ts-ban.fin.go {
  animation: pop-fade 0.3s;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .ts-q.enter,
  .ts-q.leave,
  .ts-q.bad,
  .ts-btn,
  .ts-q .slot,
  .ts-podium .rays,
  .ts-trophy,
  .ts-step img,
  .ts-step .blk,
  .ts-num.go,
  .ts-conf {
    animation: none !important;
  }
}

@media (max-width: 370px) {
  .ts-q {
    font-size: 48px;
    min-height: 78px;
  }
  .ts-btn {
    height: 60px;
    font-size: 34px;
  }
  .ts-pad.np .ts-btn {
    height: 56px;
    font-size: 30px;
  }
  .ts-pad.fixh .grid {
    min-height: 130px;
  }
  .ts-ban {
    font-size: 40px;
  }
  .ts-lights i {
    width: 38px;
    height: 38px;
  }
}
@media (max-height: 700px) {
  .ts-q {
    min-height: 72px;
    font-size: 46px;
  }
  .ts-top {
    gap: 6px;
  }
  .ts-trophy {
    font-size: 44px;
  }
}
@media (min-width: 700px) {
  .ts-pad.b4 .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 640px;
  }
  .ts-pad.fixh .grid {
    min-height: 0;
  }
  .ts-pad.np .grid {
    max-width: 560px;
  }
  .ts-btn {
    height: 72px;
  }
}
