.lobby-topbar .credits {
  flex: none;
  height: 44px;
  column-gap: 3px;
  padding: 0 0 0 4px;
  border: 1.5px solid var(--gold-dark);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 45%),
    linear-gradient(180deg, #000, #1a0b30);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 0 1px #12051f;
}

.lobby-topbar .credits.gain {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(255, 212, 90, 0.9), 0 0 14px 2px rgba(255, 212, 90, 0.65);
}

.lobby-topbar .credits-coin {
  width: 28px;
  height: 28px;
}

.lobby-topbar .currency {
  margin-inline-end: 3px;
  font-size: var(--type-readout);
}

.lobby-buy {
  position: relative;
  z-index: 2;
  isolation: isolate;
  flex: none;
  min-width: 52px;
  height: 44px;
  margin: -1.5px -1.5px -1.5px 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
  font-family: var(--display);
  font-size: var(--type-key);
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 1px 0 #054018, 0 0 3px #054018;
}

.lobby-buy::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 999px;
  border: 1.5px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 48%, transparent 52%),
    linear-gradient(180deg, #4cf07d, #15a443 55%, #07662a);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 0 6px rgba(47, 212, 122, 0.5), inset 0 -2px 3px rgba(0, 40, 10, 0.5);
}

.lobby-buy.broke {
  font-size: 0.8rem;
}

.lobby-buy.broke::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 0 1.5px var(--gold-light), 0 0 12px 2px rgba(255, 212, 90, 0.9);
  opacity: 0;
  pointer-events: none;
  animation: lobby-buy-glow 1.6s ease-in-out infinite;
}

@keyframes lobby-buy-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-buy.broke::after {
    animation: none;
    opacity: 1;
  }
}

.lobby-round {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
}

.lobby-round-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lobby-bank-meter {
  position: absolute;
  bottom: -2px;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 212, 90, 0.3);
  overflow: hidden;
  pointer-events: none;
}

.lobby-bank-meter::after {
  content: "";
  display: block;
  width: var(--bank-fill, 0%);
  height: 100%;
  background: var(--gold-rim);
}

.lobby-bank.ready::after {
  content: "✦";
  position: absolute;
  top: -3px;
  right: 0;
  color: var(--gold-light);
  font-size: 16px;
  text-shadow: 0 1px 2px var(--gold-deep);
  pointer-events: none;
  animation: lobby-icon-spark 1.8s ease-in-out infinite;
}

.lobby-bank.ready .lobby-pig {
  animation: lobby-pig-wobble 2.4s ease-in-out infinite;
}

@keyframes lobby-pig-wobble {
  0%, 60%, 100% { transform: rotate(0); }
  68% { transform: rotate(-12deg); }
  76% { transform: rotate(10deg); }
  84% { transform: rotate(-6deg); }
  92% { transform: rotate(3deg); }
}

.lobby-settings {
  position: relative;
  flex: none;
  display: flex;
}

.lobby-gear-icon {
  transition: transform 160ms ease-out;
}

.lobby-gear.open .lobby-gear-icon {
  transform: rotate(45deg);
}

.lobby-menu {
  position: absolute;
  top: calc(100% + 11px);
  right: -2px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 8px;
  padding: 10px 12px 10px;
  border-radius: 16px;
  border: 2px solid var(--gold-dark);
  background:
    radial-gradient(ellipse at 50% 0, #b8399655, transparent 70%),
    linear-gradient(180deg, #3d0b59, #160820);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 18px #b932aa55;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.94);
  transform-origin: calc(100% - 24px) 0;
  transition: opacity 140ms ease-out, transform 140ms ease-out, visibility 0s linear 140ms;
}

.offline-settings {
  grid-column: 1 / -1;
  border-top: 1px solid var(--gold-dark);
  color: var(--text);
  font-family: var(--display);
  text-shadow: 0 1px 0 #000;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.offline-settings h2 {
  margin: 8px 0;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 1.2rem;
}
.offline-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 7px;
}
.offline-download > div { display: flex; flex-direction: column; gap: 2px; }
.offline-optional { margin-inline-start: 4px; color: var(--muted); font-size: .75rem; }
.offline-download [role="status"] { color: var(--gold-light); font-size: .75rem; }
.offline-download progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  background: linear-gradient(#000, #1b0826 70%, #08020d);
}

.offline-download progress::-webkit-progress-bar { background: transparent; }

.offline-download progress::-webkit-progress-value {
  border-radius: 2px;
  background: var(--gold-rim);
}

.offline-download progress::-moz-progress-bar {
  border-radius: 2px;
  background: var(--gold-rim);
}

.offline-download button, #connection-retry {
  min-height: 44px;
  padding: 4px 12px;
  font-family: var(--display);
  font-size: 0.9rem;
  color: var(--gold-ink);
  background: var(--gold-rim);
  text-shadow: none;
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  box-shadow: inset 0 -3px 0 var(--gold-dark);
}
.offline-download button:disabled { opacity: 0.65; }
.offline-size { font: 600 .75rem var(--body); font-variant-numeric: tabular-nums; }
.offline-size:empty { display: none; }
.offline-settings p { font: 400 0.8rem / 1.4 var(--body); letter-spacing: normal; text-shadow: none; margin: 4px 0; }

#app > .lobby-menu {
  top: calc(var(--menu-top) + 11px);
  right: calc(var(--menu-right) - 2px);
}

html.landscape #app > .lobby-menu { right: var(--menu-right); }

.lobby-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.lobby-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 17px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-top: 2px solid var(--gold-dark);
  border-left: 2px solid var(--gold-dark);
  background: #3d0b59;
}

.lobby-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.lobby-menu-button {
  border: 2px solid var(--gold-dark);
  background: radial-gradient(circle at 50% 30%, #4a1a86, #1c0838 70%, #0e041f);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--gold-deep);
  font-size: 1.25rem;
  line-height: 1;
}

.lobby-menu-button.lobby-help {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 1.6rem;
  text-shadow: 0 1px 0 #000;
}

.lobby-menu-item[hidden] {
  display: none;
}

#lobby-frames,
.lobby-frames-switch[aria-pressed="false"] {
  color: var(--muted);
}

#lobby-frames[aria-pressed="true"],
.lobby-frames-switch[aria-pressed="true"] {
  color: var(--gold-light);
  background: radial-gradient(circle at 50% 30%, #8a2cb4, #3c0a5e 70%, #1a0630);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--gold-deep), 0 0 8px var(--gold-dark);
}

.lobby-menu-label {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .lobby-bank.ready .lobby-pig {
    animation: none;
  }

  .lobby-bank.ready::after {
    animation: none;
  }

  .lobby-menu,
  .lobby-gear-icon {
    transition: none;
  }
}


:root {
  --lobby-grand-ink: #ff9ba6;
}

.game-card-jackpot.live .game-card-jackpot-amount::before {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  margin: 0 .2em .12em 0;
  vertical-align: middle;
  background: url("../art/ui/coin-gold.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 2px rgba(255, 211, 77, 0.55));
}

.game-card-jackpot { position: relative; }
.game-card-jackpot.flare {
  animation: lobby-plaque-flare 1.2s ease-out;
}
.game-card-jackpot.flare::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, #fff3c0cc, #ffd34d55 45%, transparent 75%);
  opacity: 0;
  animation: lobby-plaque-sheen 1.2s ease-out;
}

@keyframes lobby-plaque-flare {
  0%, 100% { box-shadow: 0 0 0 1px #764a10, inset 0 1px 0 #fff7c2, 0 2px 4px #000b, 0 0 7px #ffb82b44; }
  20% { box-shadow: 0 0 0 1px #ffe9a0, inset 0 1px 0 #fff7c2, 0 2px 4px #000b, 0 0 12px 3px #ffd34dbb; }
}

@keyframes lobby-plaque-sheen {
  0%, 100% { opacity: 0; }
  20% { opacity: 1; }
}

.lobby-sign-sub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 0 26px;
  text-align: center;
}
.lobby-marquee-tagline {
  display: block;
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.85;
}
.lobby-marquee-ticker {
  display: block;
  height: 1.5em;
  overflow: hidden;
  font-size: 1.1em;
  letter-spacing: .025em;
}
.lobby-marquee-line {
  display: flex;
  justify-content: center;
  gap: .25em;
  line-height: 1.5em;
  white-space: nowrap;
  overflow: hidden;
  animation: lobby-marquee 5.5s ease-in-out infinite;
}
.lobby-marquee-label { flex-shrink: 0; }
.lobby-marquee-amount {
  min-width: 0;
  font-size: 1.1em;
}
.lobby-marquee-amount.grand {
  color: var(--lobby-grand-ink);
  text-shadow: 0 1px 0 #000;
}
.lobby-marquee-amount.major {
  color: var(--jp-major);
  text-shadow: 0 0 4px var(--jp-major);
}

@keyframes lobby-marquee {
  0% { opacity: 0; transform: translateY(90%); }
  4% { opacity: 1; transform: none; }
  96% { opacity: 0.999; transform: none; }
  100% { opacity: 0; transform: translateY(-90%); }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-marquee-line,
  .game-card-jackpot.flare,
  .game-card-jackpot.flare::after {
    animation: none;
  }
}

@media (max-height: 700px) {
  .lobby-sign { padding-top: 4px; padding-bottom: 3px; }
  .lobby-sign-sub { margin-top: 0; font-size: .68rem; letter-spacing: .1em; }
  .lobby-marquee-tagline { display: none; }
  .lobby-marquee-ticker { font-size: 1em; height: 1.45em; }
  .lobby-marquee-line { line-height: 1.45em; }
}


@media (min-height: 701px) {
  .lobby-rush { height: 50px; }
  .rush-prize.milestone.noted { height: 38px; }
  .rush-prize.milestone.noted .rush-tag { top: -8px; }
  .rush-prize.milestone.noted .rush-note { margin-top: 1px; }
}


.lobby-dock {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.lobby-dock .lobby-tiles {
  flex: 1 1 auto;
  min-width: 0;
}

.lobby-bonus {
  position: relative;
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 0;
  width: 102px;
  padding-bottom: 12px;
}

.bonus-pod {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  min-height: 44px;
  padding: 0;
  background: none;
  color: #fff;
  transition: none;
}

.bonus-pod:active {
  transform: none;
}

.bonus-pill {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 3px 1px 1px;
  overflow: hidden;
  border: 2px solid #eac168;
  border-radius: 16px 3px 3px 16px;
  transform: skewX(-12deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.06) 48%, transparent 52%),
    linear-gradient(#8a45e0, #4a1694 58%, #24073f);
  box-shadow: 0 0 0 1px #603c22, inset 0 -2px 3px #0006, 0 4px 8px #0009;
  color: #fff;
  font-family: var(--display);
  font-size: .75rem;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 #16041f;
  transition: translate 80ms ease-out, box-shadow 80ms ease-out, border-color 80ms ease-out;
}

.bonus-pod:active:not(:disabled) .bonus-pill {
  translate: 0 1px;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 1px #603c22, inset 0 2px 3px rgba(0, 0, 0, 0.45), inset 0 -1px 1px #0006, 0 2px 4px #0009;
}

.bonus-pre,
.bonus-state,
.bonus-post {
  display: block;
  transform: skewX(12deg);
}

.bonus-wheel {
  flex: none;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 46px;
  min-height: 44px;
  margin: 0 0 -12px;
  padding: 0;
  background: none;
}

.bonus-wheel .tile-ring {
  width: 46px;
  height: 46px;
}

.bonus-wheel .tile-state {
  max-width: 100%;
  margin-top: -13px;
  padding: 2px 0;
  font-size: .7rem;
  letter-spacing: 0;
}

.bonus-pre,
.bonus-post {
  text-transform: uppercase;
}

.bonus-state {
  font-variant-numeric: tabular-nums;
}

.bonus-pod .bonus-post,
.bonus-pod.ready .bonus-pre {
  display: none;
}

.bonus-pod.ready .bonus-post {
  display: block;
}

.bonus-pod.ready .bonus-pill {
  border-color: var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 48%, transparent 52%),
    linear-gradient(#ff5a6a, #c8102e 60%, #6e0a1a);
  color: #fff6c4;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 #4a0010, 0 0 6px #ffd45a99;
  box-shadow: 0 0 0 1px #603c22, inset 0 -2px 3px #0006, 0 4px 8px #0009, 0 0 4px #ffd45a66;
}

.bonus-pod.ready :is(.bonus-state, .bonus-post) {
  -webkit-text-stroke: 2px #4a0010;
  paint-order: stroke fill;
}

.bonus-pod.ready:active:not(:disabled) .bonus-pill {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 1px #603c22, inset 0 2px 3px rgba(0, 0, 0, 0.4), inset 0 -1px 1px #0006, 0 2px 4px #0009, 0 0 8px #ffd45a99;
}

.bonus-pod.ready::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  border-radius: 16px 3px 3px 16px;
  transform: skewX(-12deg);
  box-shadow: 0 0 16px #ffd45aee;
  opacity: 0;
  pointer-events: none;
  animation: bonus-ready 1.6s ease-in-out infinite alternate;
}

@keyframes bonus-ready {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bonus-pill {
    transition: none;
  }
  .bonus-pod:active:not(:disabled) .bonus-pill {
    translate: none;
    box-shadow: 0 0 0 1px #603c22, inset 0 2px 3px rgba(0, 0, 0, 0.45), inset 0 -2px 3px #0006, 0 4px 8px #0009;
  }
  .bonus-pod.ready:active:not(:disabled) .bonus-pill {
    box-shadow: 0 0 0 1px #603c22, inset 0 2px 3px rgba(0, 0, 0, 0.4), inset 0 -2px 3px #0006, 0 4px 8px #0009;
  }
}

