

.float-text.xp {
  left: auto;
  right: 34px;
  transform: translate(50%, -50%);
  color: #ffd6f6;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 6px var(--neon-pink), 0 0 2px var(--neon-pink), 0 1px 2px #000;
  animation: fb-xp-float 900ms ease-out forwards;
}

.float-text.payback {
  font-size: 0.85rem;
}

.coin.payback-coin,
.coin.win-coin,
.coin.total-flight-coin {
  opacity: 0;
  animation: none;
  will-change: transform, opacity;
}

.level-fill.gain {
  animation: fb-xp-gain 650ms ease-out;
}

#level .level-star.pop {
  animation: fb-star-pop 420ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.level-fill.gain:where(.replay-b) {
  animation-name: fb-xp-gain-b;
}

#level .level-star.pop:where(.replay-b) {
  animation-name: fb-star-pop-b;
}

.level-fill.almost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.7) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%;
  background-position: 125% 0;
  animation: fb-sweep 1.8s ease-in-out infinite;
  pointer-events: none;
}

.credits {
  transition: box-shadow 400ms ease-out;
}

.credits.gain {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 212, 90, 0.9), 0 0 14px 2px rgba(255, 212, 90, 0.65);
  transition-duration: 120ms;
}

.credits.gain .credits-coin {
  box-shadow: 0 0 12px 2px rgba(255, 230, 140, 0.95);
}

.credits.spend {
  animation: fb-spend 380ms ease-out;
}

.credits.spend .currency {
  animation: fb-spend-text 380ms ease-out;
}

.credits.spend:where(.replay-b) {
  animation-name: fb-spend-b;
}

.credits.spend:where(.replay-b) .currency {
  animation-name: fb-spend-text-b;
}

.bet-value.bump strong {
  animation: fb-bump 280ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.bet-max.flash {
  animation: fb-max-flash 480ms ease-out;
}

.streak-chip {
  position: absolute;
  top: -11px;
  right: 10px;
  z-index: 4;
  padding: 2px 9px 1px 24px;
  border-radius: 6px;
  background: linear-gradient(180deg, #6a0c34, #1c0412);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 150, 40, 0.55);
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 1.25;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.app.drums .streak-chip {
  top: -2px;
}

.streak-chip.show {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.streak-chip.level-2 {
  background: linear-gradient(180deg, #a3200e, #3a0806);
  border-color: #ffc44a;
  box-shadow: 0 0 0 1px var(--gold-deep), 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 14px 2px rgba(255, 120, 30, 0.8);
  color: #fff3c0;
}

.streak-chip.level-3 {
  background: linear-gradient(180deg, #e0284e, #6a0424);
  border-color: var(--gold-light);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 18px 3px rgba(255, 79, 216, 0.85), 0 0 6px #ff6a00;
  color: #fff;
  animation: fb-streak-hot 900ms ease-in-out infinite alternate;
}

.streak-chip.show.pop {
  animation: fb-streak-pop 420ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.streak-chip.show.pop.level-3 {
  animation: fb-streak-pop 420ms cubic-bezier(0.3, 1.6, 0.5, 1), fb-streak-hot 900ms ease-in-out 420ms infinite alternate;
}

.goal-chip {
  position: absolute;
  top: -11px;
  left: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1px 8px 2px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border: 1px solid var(--gold-deep);
  box-shadow: 0 0 0 1px rgba(255, 212, 90, 0.35), 0 2px 6px rgba(0, 0, 0, 0.7);
  font-family: var(--display);
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: left top;
  transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.app.drums .goal-chip {
  top: -2px;
}

@media (max-height: 680px) {
  .goal-chip {
    top: -2px;
  }
}

.goal-chip.show {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.goal-chip.show.pop {
  animation: fb-streak-pop 420ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.goal-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.goal-num {
  color: var(--gold-light);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.goal-label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.goal-track {
  position: relative;
  align-self: stretch;
  height: 4px;
  margin: 2px 0 1px;
  border-radius: 2px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}

.goal-fill {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-dark));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms ease-out;
}

.goal-chip.locked {
  background: linear-gradient(180deg, var(--navy-deep), var(--bg-deep));
}

.goal-lock,
.level-mark-lock {
  display: none;
  position: relative;
  flex: none;
  width: 10px;
  height: 8px;
  margin-top: 5px;
  border-radius: 2px;
  background: var(--gold-bevel);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.goal-lock::before,
.level-mark-lock::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 100%;
  width: 6px;
  height: 6px;
  box-sizing: border-box;
  border: 2px solid var(--gold-deep);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 0 1px rgba(255, 212, 90, 0.45);
}

.goal-chip.locked .goal-lock {
  display: block;
}

.goal-chip.bet-up .goal-track {
  display: none;
}

.win-plate.show {
  animation: plate-in 220ms cubic-bezier(0.3, 1.5, 0.5, 1) forwards, fb-plate-glow 900ms ease-out 200ms;
}

.win-box.sparkle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 240, 180, 0.6) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%;
  background-position: -25% 0;
  animation: fb-sweep-once 650ms ease-out;
  pointer-events: none;
}

.badge::before,
.badge::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.badge::before {
  box-shadow: 0 0 0 1px rgba(255, 211, 77, 0.75), 0 0 5px rgba(255, 59, 78, 0.9);
  animation: fb-badge-glow-half 1s infinite alternate;
}

.badge::after {
  box-shadow: 0 0 0 2px rgba(255, 211, 77, 0.75), 0 0 10px rgba(255, 59, 78, 0.9);
  animation: fb-badge-glow 1s infinite alternate;
}

.bet-step,
.bet-max,
.rush-button,
.league-button,
.sheet-close,
.deal-yes,
.deal-no,
.reward-collect,
.wheel-go,
.icon-button {
  transition: transform 60ms ease-out;
}

.deal-yes:active:not(:disabled),
.deal-no:active:not(:disabled),
.reward-collect:active:not(:disabled),
.wheel-go:active:not(:disabled),
.icon-button:not(.paytable-button):active:not(:disabled) {
  transform: scale(0.96);
}

@keyframes fb-xp-float {
  0% { opacity: 0; transform: translate(50%, calc(-50% + 4px)); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(50%, calc(-50% - 30px)); }
}

@keyframes fb-xp-gain {
  25% { filter: brightness(1.7) saturate(1.2); box-shadow: 0 0 14px var(--neon-pink), 0 0 4px #fff; }
}

@keyframes fb-xp-gain-b {
  25% { filter: brightness(1.7) saturate(1.2); box-shadow: 0 0 14px var(--neon-pink), 0 0 4px #fff; }
}

@keyframes fb-star-pop {
  40% { transform: scale(1.3) rotate(-10deg); filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 4px var(--gold)); }
}

@keyframes fb-star-pop-b {
  40% { transform: scale(1.3) rotate(-10deg); filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 4px var(--gold)); }
}

@keyframes fb-sweep {
  0% { background-position: 125% 0; }
  60%, 100% { background-position: -25% 0; }
}

@keyframes fb-sweep-once {
  from { background-position: 125% 0; }
  to { background-position: -25% 0; }
}

@keyframes fb-spend {
  30% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 59, 78, 0.55), 0 0 0 1px rgba(255, 59, 78, 0.6); }
}

@keyframes fb-spend-text {
  30% { color: #ffa0aa; }
}

@keyframes fb-spend-b {
  30% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 59, 78, 0.55), 0 0 0 1px rgba(255, 59, 78, 0.6); }
}

@keyframes fb-spend-text-b {
  30% { color: #ffa0aa; }
}

@keyframes fb-bump {
  40% { transform: scale(1.28); text-shadow: 0 0 12px rgba(255, 211, 77, 1), 0 0 2px #fff; }
}

@keyframes fb-max-flash {
  30% { filter: brightness(1.5); box-shadow: 0 0 0 1px var(--gold-deep), 0 3px 0 #2a0008, 0 0 16px 3px rgba(255, 211, 77, 0.85); }
}

@keyframes fb-streak-pop {
  from { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; transform: scale(1.18); }
  to { transform: scale(1); }
}

@keyframes fb-streak-hot {
  to { box-shadow: 0 0 0 1px var(--gold-deep), 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 24px 5px rgba(255, 79, 216, 0.95), 0 0 10px #ff6a00; }
}

@keyframes fb-plate-glow {
  35% { box-shadow: 0 0 0 1px var(--gold-deep), 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 22px 4px rgba(255, 211, 77, 0.85); }
}

@keyframes fb-badge-glow-half {
  0% { opacity: 0; animation-timing-function: cubic-bezier(0.42, 0, 0.71, 0.5); }
  50% { opacity: 0.5; animation-timing-function: cubic-bezier(0.29, 0.5, 0.58, 1); }
  100% { opacity: 0; }
}

/* Out until halfway, at a thousandth rather than none: WebKit repaints a
   layer leaving a flat opacity stretch while another animation updates
   on the main thread (as the lobby's loops, css/lobby.css). */
@keyframes fb-badge-glow {
  0% { opacity: 0; }
  50% { opacity: 0.001; animation-timing-function: cubic-bezier(0.29, 0.5, 0.58, 1); }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .float-text.xp {
    animation-duration: 1ms;
  }
  .level-fill.gain,
  .level-fill.almost::after,
  #level .level-star.pop,
  .credits.spend,
  .credits.spend .currency,
  .bet-value.bump strong,
  .bet-max.flash,
  .bet-value.nudge,
  .shop-button.nudge,
  .streak-chip.level-3,
  .streak-chip.show.pop,
  .streak-chip.show.pop.level-3,
  .goal-chip.show.pop,
  .win-box.sparkle::after,
  .badge,
  .badge::before,
  .badge::after {
    animation: none;
  }
  .credits,
  .streak-chip,
  .goal-chip,
  .goal-fill,
  .bet-step,
  .bet-max,
  .rush-button,
  .league-button,
  .sheet,
  .sheet-panel,
  .auto-panel,
  .pay-panel,
  .sheet-close,
  .deal-yes,
  .deal-no,
  .reward-collect,
  .wheel-go,
  .icon-button {
    transition: none;
  }
}


.feature-jackpots { width: 100%; max-width: 300px; margin: 0 auto 16px; font: 0.85rem/1.2 var(--display); letter-spacing: 0.04em; color: var(--text); text-shadow: 0 1px 0 #000; }
.feature-jackpots:empty { display: none; }
.feature-jackpot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--hairline); }
.feature-jackpot-name { text-shadow: var(--jp-outline); }
.feature-jackpot-amount { color: var(--gold-light); font-variant-numeric: tabular-nums; }
.feature-jackpot.grand .feature-jackpot-name { color: var(--jp-grand); }
.feature-jackpot.major .feature-jackpot-name { color: var(--jp-major); }
.feature-jackpot.minor .feature-jackpot-name { color: var(--jp-minor); }
.feature-jackpot.mini .feature-jackpot-name { color: var(--jp-mini); }

#app[data-chip-dock] { --chip-band: 20px; --chip-foot: 1px; }
#app[data-chip-dock] > .grid { padding-top: var(--chip-band); }
#app[data-chip-dock] .goal-chip,
#app[data-chip-dock] .streak-chip {
  top: auto;
  bottom: calc(100% - var(--chip-band) + var(--chip-foot));
}
#app[data-chip-dock] .goal-chip {
  flex-flow: row wrap;
  justify-content: center;
  column-gap: 3px;
  left: 6px;
  padding: 1px 6px 2px;
  transform-origin: left bottom;
}
#app[data-chip-dock] .streak-chip { right: 6px; }
#app[data-chip-dock] .goal-num { font-size: 0.8rem; letter-spacing: 0.02em; }
#app[data-chip-dock] .goal-label { letter-spacing: 0.03em; }
#app[data-chip-dock] .goal-lock { margin-top: 3px; }
#app[data-chip-dock] .goal-track { flex: 1 0 100%; margin: 1px 0 0; }
html.landscape #app[data-chip-dock] {
  --chip-band: 30px;
  --ls-cell-h: clamp(36px, calc((var(--ls-stage-h) - var(--ls-strip) - var(--ls-pad) - var(--chip-band) - 8px - (var(--ls-rows) - 1) * 3px) / var(--ls-rows)), 120px);
}
html.landscape #app[data-chip-dock] > .grid { padding-top: var(--chip-band); }
html.landscape #app[data-chip-dock] .goal-chip,
html.landscape #app[data-chip-dock] .streak-chip {
  top: auto;
  bottom: calc(100% - var(--chip-band) + var(--chip-foot));
}
@media (max-height: 680px) {
  html:not(.landscape) #app[data-chip-dock] { --chip-band: 8px; --chip-foot: 0px; }
  html:not(.landscape) #app[data-chip-dock] .goal-chip { flex-wrap: nowrap; align-items: center; padding: 0 6px; line-height: 1.05; }
  html:not(.landscape) #app[data-chip-dock] .goal-num { font-size: 0.7rem; }
  html:not(.landscape) #app[data-chip-dock] .goal-lock { margin-top: 3px; transform: scale(0.7); }
  html:not(.landscape) #app[data-chip-dock] .goal-track { flex: 0 0 20px; margin: 0 0 0 1px; }
  html:not(.landscape) #app[data-chip-dock] .streak-chip {
    padding: 0 7px 0 18px;
    border-width: 1px;
    font-size: 0.7rem;
    line-height: 1.05;
  }
  html:not(.landscape) #app[data-chip-dock] .streak-chip::before { left: 5px; top: 1px; width: 9px; height: 10px; }
  html:not(.landscape) #app[data-chip-dock]:has(> .tower:not([hidden])) .goal-chip { padding: 0 4px; column-gap: 2px; }
  html:not(.landscape) #app[data-chip-dock]:has(> .tower:not([hidden])) :is(.goal-num, .goal-label) { letter-spacing: 0; }
  html:not(.landscape) #app[data-chip-dock]:has(> .tower:not([hidden])) .goal-track { flex-basis: 14px; }
  html:not(.landscape) #app[data-chip-dock]:has(> .tower:not([hidden])) .streak-chip { padding: 0 5px 0 17px; letter-spacing: 0.02em; }
}
