.casino-lobby h2 {
  margin: 0.9rem 0;
}
.casino-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.casino-cover {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: clamp(10rem, 44vw, 16rem);
  border: 1px solid #b79050;
  border-radius: 14px;
  padding: 0.85rem;
  color: #fff1c9;
  text-decoration: none;
  box-shadow:
    inset 0 0 21px #ffce7822,
    0 8px 20px #0007;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.casino-cover:is(:hover, :focus-visible) {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px #e5b65b44;
}
.casino-cover strong {
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 5vw, 2.4rem);
  text-shadow: 0 3px 8px #000;
}
.casino-cover small {
  color: #efe1c7;
}
.roulette-cover {
  background:
    linear-gradient(0deg, #291018 15%, transparent),
    radial-gradient(at 75% 20%, #db5940, #551823 65%);
}
.blackjack-cover {
  background:
    linear-gradient(0deg, #241730 15%, transparent),
    radial-gradient(at 75% 20%, #744a99, #342053 65%);
}
.cover-wheel {
  position: absolute;
  z-index: -1;
  width: clamp(6rem, 32vw, 12rem);
  aspect-ratio: 1;
  right: 5%;
  top: -9%;
  border: 0.47rem ridge #d7a54f;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      #d2a354 0 9%,
      #552e27 10% 44%,
      #d7a54f 45% 49%,
      transparent 50%
    ),
    repeating-conic-gradient(#161519 0 11deg, #c63747 11deg 22deg);
  box-shadow: 0 0 27px #f8a95077;
  animation: cover-spin 24s linear infinite;
}
@keyframes cover-spin {
  to {
    transform: rotate(1turn);
  }
}
.cover-cards {
  position: absolute;
  top: 9%;
  right: 6%;
  z-index: -1;
  display: flex;
}
.cover-cards i {
  font:
    bold clamp(0.9rem, 4vw, 1.65rem) Georgia,
    serif;
  color: #201a20;
  background: linear-gradient(140deg, #fff9e5, #dfcca4);
  border-radius: 6px;
  border: 2px solid #d7ae61;
  padding: 0.25rem;
  display: block;
  width: clamp(2.4rem, 12vw, 5rem);
  aspect-ratio: 0.69;
  transform: rotate(-17deg);
  box-shadow: 0 3px 9px #0008;
}
.cover-cards i + i {
  color: #a51f3d;
  margin-left: -0.65rem;
  transform: translateY(10%) rotate(13deg);
}
.casino-table {
  max-width: 42rem;
  margin-inline: auto;
  border-color: #786341;
  background: radial-gradient(at 50% 16%, #30221b, #171616 70%);
}
.blackjack-table {
  background: radial-gradient(at 50% 16%, #443057, #211831 75%);
}
.casino-table-head h2 {
  margin: 0;
  font-family: Georgia, serif;
  color: #ffdfa1;
}
.casino-table-head a {
  color: #ead79c;
  padding-block: 0.55rem;
}
.wheel-stage {
  position: relative;
  width: min(100%, 21rem);
  margin: 0.3rem auto 0;
}
.wheel-stage::after {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  content: '';
  border: 0.58rem solid transparent;
  border-top: 0.9rem solid #fff0a1;
  filter: drop-shadow(0 2px 3px #000);
}
.roulette-wheel {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px #0009);
}
.wheel-result {
  margin: 0.45rem 0;
  min-height: 1.5rem;
  color: #ffe1a4;
  text-align: center;
  font-weight: 750;
}
.roulette-colors {
  padding: 0;
  margin: 0;
  min-width: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.roulette-colors legend {
  margin-bottom: 0.4rem;
  font-weight: 650;
}
.chip {
  position: relative;
  cursor: pointer;
  display: grid;
  border-radius: 10px;
}
.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}
.chip span {
  display: grid;
  place-items: center;
  border: 2px solid #ffffff24;
  border-radius: inherit;
  padding: 0.35rem 0.15rem;
  text-align: center;
}
.chip small {
  color: #fff2d5;
}
.chip.rot span {
  background: #8a2032;
}
.chip.schwarz span {
  background: #22212a;
}
.chip.gruen span {
  background: #14543b;
}
.chip input:checked + span {
  border-color: #ffe099;
  box-shadow: 0 0 12px #ffd57c45;
}
.chip input:focus-visible + span {
  outline: 2px solid white;
  outline-offset: 2px;
}
.casino-table .casino-play {
  background: linear-gradient(#ffe3a2, #d5a142);
  border-color: #f1ca71;
  color: #2b1b0b;
}
.casino-table .casino-rules {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
}
.felt {
  background: radial-gradient(#543761, #2a1b42);
  border: 0.32rem ridge #927045;
  border-radius: 1rem;
  overflow: hidden;
  padding: 0.65rem;
  margin: 0.4rem 0 0.65rem;
}
.felt section + section {
  border-top: 1px dashed #d4b1de66;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
}
.felt h3 {
  margin: 0 0 0.25rem;
}
.felt section .row > span {
  color: #eed4f0;
  font-size: 0.85rem;
}
.card-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 4.5rem;
  perspective: 380px;
}
.playing-card {
  width: clamp(2.7rem, 12vw, 4.25rem);
  aspect-ratio: 0.7;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #d7c8a4;
  border-radius: 0.4rem;
  color: #221d22;
  background: linear-gradient(155deg, #fffdf3, #eee4cd);
  box-shadow: 0 4px 7px #0007;
  font-family: Georgia, serif;
}
.playing-card.red-suit {
  color: #a51f37;
}
.card-corner {
  position: absolute;
  top: 0.14rem;
  left: 0.24rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 800;
}
.card-corner small {
  display: block;
  font-size: 0.72rem;
  color: inherit;
}
.card-corner.mirrored {
  inset: auto 0.24rem 0.14rem auto;
  transform: rotate(180deg);
}
.card-suit {
  font-size: clamp(1.1rem, 5vw, 2rem);
}
.face-down {
  color: #fce3ae;
  border: 3px double #e6c996;
  background: repeating-linear-gradient(
    45deg,
    #702035 0px 4px,
    #972b49 4px 8px
  );
}
.dealt {
  animation: deal 0.38s cubic-bezier(0.18, 0.84, 0.25, 1) var(--delay) both;
}
.flip {
  animation: flip 0.48s ease both;
}
@keyframes deal {
  from {
    opacity: 0;
    transform: translate(90px, -30px) rotate(18deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes flip {
  from {
    transform: rotateY(100deg);
  }
  to {
    transform: rotateY(0);
  }
}
.play-actions {
  margin-bottom: 0.65rem;
}
.casino-outcome {
  text-align: center;
  color: #ffe0b0;
  font-weight: 700;
}
.win-panel {
  --prize: #ffd26d;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  justify-items: center;
  padding: 0.75rem 0.25rem;
  margin: 0.55rem 0 0.85rem;
  border: 2px solid var(--prize);
  border-radius: 13px;
  background: radial-gradient(ellipse, #79461e, #281525 76%);
  text-align: center;
  color: var(--prize);
}
.win-panel strong,
.win-panel output {
  z-index: 1;
  font-weight: 1000;
  text-transform: uppercase;
  line-height: 1.04;
  text-shadow:
    0 3px #512a12,
    0 5px 14px #150d09;
}
.win-panel strong {
  font-size: clamp(1.45rem, 7vw, 3rem);
}
.win-panel output {
  font-size: clamp(1.8rem, 9vw, 4.4rem);
  font-variant-numeric: tabular-nums;
}
.win-panel > span {
  color: #fff2c2;
}
.win-panel.big {
  box-shadow: 0 0 18px #ffcb6770;
}
.win-panel.mega {
  --prize: #b5ff7c;
  background: radial-gradient(ellipse, #245534, #20132a 76%);
  box-shadow: 0 0 23px #a6ef6e70;
}
.win-panel.jackpot {
  --prize: #ffe587;
  background: radial-gradient(ellipse, #ac521c, #4a133a 76%);
  box-shadow: 0 0 26px #ffc758a0;
}
.win-rays {
  width: 180%;
  aspect-ratio: 1;
  opacity: 0.3;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: repeating-conic-gradient(
    from -6deg,
    var(--prize) 0deg 7deg,
    transparent 7deg 23deg
  );
  mask-image: radial-gradient(black 0 18%, transparent 62%);
}
.win-coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.win-coins i {
  position: absolute;
  left: calc(2% + var(--coin) * 8%);
  top: calc(13% + mod(var(--coin), 3) * 31%);
  width: clamp(0.6rem, 4vw, 1.3rem);
  aspect-ratio: 1;
  border: 2px ridge #ffe488;
  border-radius: 50%;
  background: linear-gradient(120deg, #ffd24b, #bc6a20, #ffe39a);
  opacity: 0.85;
}
.win-reveal {
  animation: win-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
}
.win-reveal .win-rays {
  animation: cover-spin 3.5s linear;
}
.win-reveal .win-coins i {
  animation: coin-fly 0.85s ease-out calc(var(--coin) * 38ms) both;
}
@keyframes win-pop {
  from {
    scale: 0.78;
    opacity: 0;
  }
  to {
    scale: 1;
    opacity: 1;
  }
}
@keyframes coin-fly {
  from {
    transform: translateY(60px) rotateY(100deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateY(0);
    opacity: 0.85;
  }
}
@media (prefers-reduced-motion: reduce) {
  .casino-cover {
    transition: none;
  }
  .cover-wheel,
  .dealt,
  .flip,
  .win-reveal,
  .win-reveal .win-rays,
  .win-reveal .win-coins i {
    animation: none;
  }
}

.roulette-paid {
  text-align: center;
  color: #efdeb9;
  font-size: 0.875rem;
}

.roulette-history {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.roulette-dot {
  width: 0.82rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #efd4a0;
  box-shadow: inset 0 1px 3px #fff3;
}
.roulette-dot.red {
  background: #bc3345;
}
.roulette-dot.black {
  background: #18171c;
}
.roulette-dot.green {
  background: #238259;
}
.roulette-dot:first-child {
  outline: 1px solid #efd4a0;
  outline-offset: 2px;
}

.cups-cover {
  background:
    linear-gradient(0deg, #201432 12%, transparent),
    radial-gradient(at 74% 25%, #8759bd, #392153 72%);
}
.case-cover {
  background:
    linear-gradient(0deg, #371723 12%, transparent),
    radial-gradient(at 75% 25%, #a75242, #512138 72%);
}
.cover-cup,
.case-cover > span {
  position: absolute;
  top: 0.4rem;
  right: 10%;
  z-index: -1;
  opacity: 0.85;
  color: #ffd58f;
  font-size: clamp(3.1rem, 15vw, 7rem);
  line-height: 1;
  text-shadow: 0 0 24px #f9aa8177;
}
.cover-cup {
  top: 9%;
  width: clamp(3.1rem, 18vw, 7rem);
  aspect-ratio: 1;
  opacity: 1;
  transform: rotate(15deg);
  filter: drop-shadow(0 5px 9px #160b26cc);
}
.cup-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  place-items: center;
  padding: 2.6rem 0 1.45rem;
  overflow: hidden;
  border: 1px solid #98709d;
  border-radius: 12px;
  margin-block: 0.55rem;
  background: radial-gradient(ellipse at 50% 84%, #593a69, #2b1b3c 73%);
}
.cup-stage .cup {
  position: relative;
  grid-row: 1;
  width: min(80%, 5rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  z-index: 1;
  background: transparent;
}
.cup:disabled {
  opacity: 1;
}
.cup > span,
.cover-cup > span {
  display: block;
  position: absolute;
  inset: 0;
  clip-path: polygon(22% 0, 78% 0, 100% 97%, 0 97%);
  border-radius: 20%;
  background: linear-gradient(
    90deg,
    #71393e,
    #d7966e 25%,
    #ffe1a1 42%,
    #d48d69 65%,
    #713438
  );
  box-shadow:
    inset 0 5px 0 #fff3b9,
    inset 0 -7px 0 #54263d;
}
.cup:not(:disabled):hover > span {
  filter: brightness(1.18);
}
.cup.revealed {
  transform: translateY(-27px);
}
.cup-ball {
  position: absolute;
  bottom: 1.45rem;
  left: calc((var(--slot) + 0.5) * 100% / 3);
  translate: -50% 0;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    at 32% 25%,
    white,
    #ffce5b 32%,
    #c15b29 72%,
    #54253a
  );
  box-shadow: 0 0 10px #ffd689;
}
.cup-status {
  text-align: center;
  min-height: 1.5rem;
}
.case-view {
  --tile: clamp(5.3rem, 21vw, 7.7rem);
  position: relative;
  overflow: hidden;
  border: 1px solid #9d725d;
  border-radius: 8px;
  background: #18101c;
  margin-block: 0.65rem;
}
.case-view::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffe18a;
  box-shadow: 0 0 8px #ffd173;
  pointer-events: none;
}
.case-strip {
  position: relative;
  display: flex;
  gap: 0.45rem;
  width: max-content;
  margin-left: calc(50% - var(--tile) / 2);
  transform: translateX(calc(-3 * (var(--tile) + 0.45rem)));
  padding-block: 0.4rem;
}
.case-tile {
  display: grid;
  align-content: end;
  justify-items: center;
  width: var(--tile);
  min-height: 6.2rem;
  padding: 0.2rem;
  text-align: center;
  font-size: 0.73rem;
  background: radial-gradient(at 50% 65%, var(--rarity), #241a30 87%);
  border-bottom: 3px solid var(--rarity);
}
.rarity-iron {
  --rarity: #877991;
}
.rarity-seal {
  --rarity: #5b8fea;
}
.rarity-moon {
  --rarity: #a66df2;
}
.rarity-crown {
  --rarity: #ef80bd;
}
.rarity-dragon {
  --rarity: #ed9a48;
}
.prize-glyph {
  font:
    2.5rem Georgia,
    serif;
  color: #fff0bf;
  text-shadow: 0 0 18px var(--rarity);
}
.case-reveal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  min-height: 6rem;
  align-content: center;
  gap: 0.25rem;
  border: 1px solid var(--rarity);
  margin-bottom: 0.6rem;
  border-radius: 10px;
  color: #ffe1a3;
  background: #291c31;
}
.case-reveal strong {
  font-size: 1.05rem;
  padding-bottom: 0.3rem;
}
.case-reveal.rarity-dragon {
  background: radial-gradient(ellipse, #66331f, #2d1834);
}
.case-burst {
  position: absolute;
  z-index: -1;
  inset: -100%;
  background: repeating-conic-gradient(
    from -10deg,
    transparent 0 12deg,
    var(--rarity) 14deg 19deg,
    transparent 22deg
  );
  mask-image: radial-gradient(black 0, transparent 44%);
  animation: cover-spin 12s linear infinite;
  opacity: 0.72;
}
.skin-art {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 5.2;
  overflow: hidden;
}
.skin-art img {
  position: absolute;
  inset: -112% auto auto -8%;
  width: 121%;
  max-width: none;
  aspect-ratio: 1252/634;
  clip-path: polygon(
    7.7% 44.5%,
    11% 44.5%,
    11.4% 44%,
    13% 44%,
    13.2% 44.5%,
    49.7% 44.5%,
    49.7% 43.5%,
    56.5% 43.5%,
    57% 42.5%,
    57% 41.5%,
    50.2% 42.3%,
    50.2% 35%,
    56.6% 36.8%,
    59.9% 36.7%,
    60% 34.5%,
    61.5% 34.5%,
    61.6% 36.7%,
    70.7% 36.5%,
    70.7% 42%,
    64.6% 42%,
    64.6% 44.1%,
    68.4% 44.5%,
    69% 47.5%,
    76.8% 47.6%,
    77.8% 46%,
    88.8% 46%,
    89.2% 62.9%,
    81.7% 61.6%,
    81.6% 59.5%,
    78.5% 59.5%,
    76% 62.8%,
    69.4% 64.6%,
    68.5% 57%,
    63.9% 57%,
    63.4% 58.8%,
    58.3% 58.3%,
    58% 55.1%,
    54% 52.1%,
    44.5% 51.9%,
    43% 54.8%,
    41% 54.8%,
    41% 53.9%,
    28% 54.5%,
    27.7% 53.7%,
    28% 52.4%,
    40.7% 52%,
    40.7% 48%,
    13% 48%,
    12.8% 48.4%,
    11% 48.4%,
    10.9% 47.6%,
    7.7% 47.6%
  );
}
.case-tile .skin-art {
  align-self: center;
  width: 100%;
}
.case-reveal .skin-art {
  width: min(94%, 32rem);
  margin-top: 0.5rem;
  filter: drop-shadow(0 0 9px #ffd282da);
}
.case-odds {
  font-size: 0.85rem;
  margin: 0.4rem 0 0.7rem;
}
.case-odds ul {
  padding-left: 1.25rem;
}
@media (prefers-reduced-motion: reduce) {
  .case-burst {
    animation: none;
  }
}

.case-reveal.rarity-dragon {
  animation: dragon-reveal 0.75s cubic-bezier(0.15, 0.85, 0.3, 1) both;
  box-shadow:
    inset 0 0 22px #ef9b4f75,
    0 0 18px #ed9a484d;
}
.case-reveal.rarity-dragon .skin-art {
  animation: dragon-rise 0.85s cubic-bezier(0.16, 0.85, 0.27, 1) both;
}
@keyframes dragon-reveal {
  from {
    opacity: 0.3;
    box-shadow:
      inset 0 0 55px #ffe1a6c9,
      0 0 30px #e8914777;
  }
  to {
    opacity: 1;
  }
}
@keyframes dragon-rise {
  from {
    opacity: 0;
    transform: scale(0.76) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-reveal.rarity-dragon,
  .case-reveal.rarity-dragon .skin-art {
    animation: none;
  }
}

.rarity-lightblue {
  --rarity: #8bc4e8;
}
.case-odds li + li {
  margin-top: 0.35rem;
}

.case-png {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--crop-ratio);
  background: #1c1e21;
  border-radius: 0.25rem;
}
.case-png img {
  width: 100%;
  display: block;
  transform: translateY(calc(-1 * var(--crop-top)));
}
.case-cover > .case-png {
  width: 94%;
  top: 0.25rem;
  left: 3%;
  right: auto;
  opacity: 1;
}
.case-preview {
  width: min(86%, 18rem);
  margin: 0.55rem auto;
}
.case-tile .case-png {
  align-self: center;
  width: 100%;
}
.case-reveal .case-png {
  width: min(80%, 18rem);
  margin-top: 0.55rem;
}
.case-skins {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.35rem 0 0.55rem;
}
.case-skins li {
  display: grid;
  align-content: end;
  gap: 0.2rem;
  padding: 0.35rem;
  background: #282039;
  border-radius: 0.35rem;
}
.case-skins li + li {
  margin-top: 0;
}

.casino-celebration {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  color: var(--celebration-ink);
  background: var(--celebration-bg);
}
.casino-celebration[open] {
  display: grid;
  place-items: center;
}
.celebration-big {
  --celebration-ink: #ffdc74;
  --celebration-bg: radial-gradient(
    ellipse at 50% 45%,
    #894207,
    #2c0c22 62%,
    #130b1b
  );
}
.celebration-mega {
  --celebration-ink: #f7e6ff;
  --celebration-bg: radial-gradient(
    ellipse at 50% 45%,
    #6927a4,
    #28145a 52%,
    #100d2d
  );
}
.celebration-atmosphere,
.celebration-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.celebration-big .celebration-atmosphere {
  inset: -60%;
  background: repeating-conic-gradient(
    #ffb94045 0deg 7deg,
    transparent 11deg 25deg
  );
  mask-image: radial-gradient(black, transparent 64%);
  animation: celebration-rays 12s linear infinite;
}
.celebration-mega .celebration-atmosphere::before,
.celebration-mega .celebration-atmosphere::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 60vmin;
  aspect-ratio: 1;
  border: 0.6rem solid #d697ff;
  border-radius: 50%;
  box-shadow:
    0 0 35px #bf78ff,
    inset 0 0 48px #6affe9;
  animation: celebration-wave 2.4s cubic-bezier(0.15, 0.7, 0.3, 1) infinite;
}
.celebration-mega .celebration-atmosphere::after {
  border-color: #8cfceb;
  animation-delay: 0.55s;
}
.celebration-particles i {
  position: absolute;
  left: var(--x);
  width: clamp(0.65rem, 3.6vw, 2.2rem);
}
.celebration-big .celebration-particles i {
  top: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px ridge #ffe8a0;
  background: radial-gradient(circle at 30% 25%, #fff3c7, #ffc24a 35%, #a74e12);
  box-shadow: 0 0 0.65rem #ffba6577;
  animation: celebration-coins 2.7s linear var(--delay) infinite both;
}
.celebration-mega .celebration-particles i {
  top: var(--y);
  aspect-ratio: 0.45;
  background: linear-gradient(#fff2fb, #fa67e6, #934fff);
  animation: celebration-confetti 2.7s ease-out var(--delay) infinite both;
}
.celebration-mega .celebration-particles i:nth-child(3n) {
  background: linear-gradient(#e9fffc, #63f4d0, #4b7fff);
}
.celebration-message {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}
.celebration-message strong,
.celebration-message output {
  font-weight: 1000;
  line-height: 0.95;
  letter-spacing: -0.055em;
}
.celebration-message strong {
  font-size: clamp(3.2rem, 13vw, 10rem);
  text-transform: uppercase;
}
.celebration-message output {
  font-size: clamp(3.6rem, 15vw, 11rem);
  font-variant-numeric: tabular-nums;
}
.celebration-big .celebration-message {
  text-shadow:
    0 0.06em #9e4f13,
    0 0.12em #451915,
    0 0 28px #ffbb54;
  animation: celebration-stamp 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.4) both;
}
.celebration-mega .celebration-message {
  text-shadow:
    0 0.055em #853dc3,
    0 0.1em #3d216e,
    0 0 30px #b45aff;
  animation: celebration-mega-enter 0.9s cubic-bezier(0.1, 0.8, 0.3, 1) both;
}
.celebration-message span {
  font-size: clamp(1rem, 4vw, 2rem);
  font-weight: 750;
}
.casino-celebration form {
  position: absolute;
  inset: auto auto max(1.6rem, env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%);
}
.casino-celebration button {
  min-width: 8rem;
  color: #260e2a;
  background: var(--celebration-ink);
  border-color: var(--celebration-ink);
}
@keyframes celebration-rays {
  to {
    rotate: 1turn;
  }
}
@keyframes celebration-wave {
  from {
    scale: 0.15;
    opacity: 0.8;
  }
  to {
    scale: 2.4;
    opacity: 0;
  }
}
@keyframes celebration-coins {
  from {
    transform: translateY(-12vh) rotateY(0) rotateZ(var(--angle));
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  to {
    transform: translateY(110vh) rotateY(760deg) rotateZ(var(--angle));
  }
}
@keyframes celebration-confetti {
  from {
    transform: translateY(-38vh) scale(0.5) rotate(var(--angle));
    opacity: 0;
  }
  23% {
    opacity: 1;
  }
  to {
    transform: translateY(42vh) rotate(calc(var(--angle) + 290deg));
    opacity: 0;
  }
}
@keyframes celebration-stamp {
  from {
    opacity: 0;
    transform: scale(1.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes celebration-mega-enter {
  from {
    opacity: 0;
    transform: translateY(20vh) scale(0.5);
    filter: blur(9px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .casino-celebration *,
  .casino-celebration *::before,
  .casino-celebration *::after {
    animation: none !important;
  }
  .celebration-particles,
  .celebration-mega .celebration-atmosphere {
    display: none;
  }
}

.live-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.35rem 0 1rem;
}
.live-cover {
  --art-ink: #ffe8bf;
  --art-edge: #9c5553;
  min-height: clamp(7.25rem, 32vw, 11.5rem);
  align-items: flex-start;
  text-align: left;
  border-color: var(--art-edge);
}
.live-cover strong,
.live-cover h3 {
  margin: 0;
  font:
    bold clamp(1.05rem, 4.5vw, 1.85rem) Georgia,
    serif;
  color: #fff4e2;
  overflow-wrap: anywhere;
}
.live-cover small {
  font-weight: 600;
}
.live-camera {
  background:
    linear-gradient(0deg, #331b38 10%, transparent),
    radial-gradient(at 80% 25%, #b6635f, #703953 70%);
}
.live-film {
  --art-ink: #f6e4ff;
  --art-edge: #9874cb;
  background:
    linear-gradient(0deg, #281b42 10%, transparent),
    radial-gradient(at 82% 19%, #8659b8, #4b3779 70%);
}
.live-lens {
  --art-ink: #c8fff7;
  --art-edge: #448d9c;
  background:
    linear-gradient(0deg, #20223d 10%, transparent),
    radial-gradient(at 80% 20%, #40999e, #28576f 70%);
}
.live-art {
  position: absolute;
  z-index: -1;
  top: 17%;
  right: 10%;
  width: clamp(3rem, 15vw, 6rem);
  aspect-ratio: 1.35;
  border: 0.14rem solid var(--art-ink);
  border-radius: 0.53rem;
  transform: rotate(-11deg);
  box-shadow:
    0 0 18px #ffffff35,
    inset 0 0 10px #ffffff22;
}
.live-camera .live-art {
  background:
    radial-gradient(
      circle,
      #37213f 0 19%,
      #d78876 20% 25%,
      var(--art-ink) 27% 32%,
      transparent 34%
    ),
    #864452;
}
.live-camera .live-art::before {
  content: '';
  position: absolute;
  left: 12%;
  top: -0.45rem;
  width: 35%;
  height: 0.45rem;
  border-radius: 0.2rem 0.2rem 0 0;
  background: var(--art-ink);
}
.live-film .live-art {
  transform: rotate(12deg);
  border-radius: 0.25rem;
  background:
    linear-gradient(transparent 50%, #e6c7f988 51% 54%, transparent 55%),
    #5b397e;
}
.live-film .live-art::before {
  content: '';
  position: absolute;
  inset: -0.27rem -0.14rem auto;
  height: 0.55rem;
  transform-origin: left bottom;
  transform: rotate(-17deg);
  background: repeating-linear-gradient(
    115deg,
    var(--art-ink) 0 15%,
    #654293 17% 30%
  );
  border: 1px solid var(--art-ink);
  border-radius: 0.12rem;
}
.live-lens .live-art {
  width: clamp(2.55rem, 13vw, 5.2rem);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: rotate(24deg);
  background: radial-gradient(
    circle at 38% 35%,
    #9cf5ee,
    #28576f 28%,
    #1d2b4c 49%,
    #569ba3 53%,
    #264461 72%
  );
}
.live-lens .live-art::after {
  content: '';
  position: absolute;
  left: 43%;
  top: 96%;
  width: 15%;
  height: 40%;
  background: var(--art-ink);
  border-radius: 0 0 0.25rem 0.25rem;
}
.live-current {
  min-height: 7rem;
  margin-bottom: 0.75rem;
}
.live-current:hover {
  transform: none;
  box-shadow:
    inset 0 0 21px #ffce7822,
    0 8px 20px #0007;
}
@media (min-width: 600px) {
  .live-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.live-race {
  background: radial-gradient(at 80% 20%, #924854, #38213f 73%);
}
.live-roulette {
  background: radial-gradient(at 80% 20%, #ba603d, #401d36 73%);
}
.live-rps {
  background: radial-gradient(at 80% 20%, #587daf, #30254e 73%);
}
.live-game-icon {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: clamp(1.9rem, 8vw, 3.6rem);
  opacity: 0.8;
  z-index: -1;
}
.live-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  border: 0;
  margin: 0.5rem 0;
  padding: 0;
  min-width: 0;
}
.live-picks legend {
  margin-bottom: 0.45rem;
}
.live-picks label {
  position: relative;
  cursor: pointer;
}
.live-picks input {
  position: absolute;
  opacity: 0;
  width: 1px;
  min-height: 0;
}
.live-picks label > span {
  min-height: 3.4rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #372749;
  font-size: 0.88rem;
}
.live-picks small {
  color: #ffce92;
}
.live-picks input:checked + span {
  border-color: var(--accent);
  background: #5b3c4e;
}
.live-picks input:focus-visible + span {
  outline: 2px solid var(--accent);
}

.live-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.race-curse input {
  width: 1.2rem;
  min-height: auto;
  height: 1.2rem;
  accent-color: var(--accent);
}

.race-broadcast {
  --horse-width: clamp(3.75rem, 17vw, 6rem);
  --race-lane-height: max(2.55rem, calc(var(--horse-width) * 135 / 203 + 2px));
  --race-top: 3.9rem;
  --race-bottom: 0.8rem;
  --race-right: 5.5%;
  --finish-stripe: 0.48rem;
  margin-block: 0.65rem 1rem;
  overflow: hidden;
  border: 1px solid #9c7569;
  border-radius: 0.9rem;
  background: #231b33;
}
.race-hud {
  min-height: 2.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.65rem;
  padding: 0.5rem 0.75rem;
  color: #f9ead0;
  background: linear-gradient(100deg, #36223f, #201e39);
}
.race-hud span {
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffb870;
}
.race-hud strong {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.race-course {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: calc(
    8 * var(--race-lane-height) + var(--race-top) + var(--race-bottom)
  );
  background: linear-gradient(
    #8d799d 0,
    #e2a98c 2.25rem,
    #305047 2.3rem,
    #305047 var(--race-top),
    #694846 var(--race-top)
  );
}
.race-stands {
  position: absolute;
  inset: 1.45rem 0 auto;
  height: 2.2rem;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 23px,
      #b79aaf88 24px 26px,
      transparent 27px 44px
    ),
    repeating-linear-gradient(
      0deg,
      #503752 0 4px,
      #ac8c9f 5px 7px,
      #5e4b63 8px 12px
    );
}
.race-rail {
  position: absolute;
  inset: var(--race-top) 0 var(--race-bottom);
  border-block: 3px solid #f5d2ac;
  background:
    repeating-linear-gradient(
      90deg,
      #5438461a 0 37px,
      #edbf9833 38px 40px,
      #5438461a 41px 59px
    ),
    linear-gradient(90deg, #67424a, #a16c57);
}
.race-finish-line {
  position: absolute;
  z-index: 2;
  inset: var(--race-top) var(--race-right) var(--race-bottom) auto;
  width: var(--finish-stripe);
  opacity: 0;
  background: conic-gradient(
      #ffe8c4 25%,
      #493145 0 50%,
      #ffe8c4 0 75%,
      #493145 0
    )
    0 0 / 0.48rem 0.48rem;
  box-shadow: 0 0 10px #ffc382a0;
  transform: translateX(5rem);
  transition:
    transform 650ms cubic-bezier(0.16, 0.72, 0.35, 1),
    opacity 250ms ease-out;
}
.race-finish-visible .race-finish-line {
  opacity: 0.9;
  transform: translateX(0);
}
.race-in-motion .race-stands {
  animation: race-pan 4s linear infinite;
}
.race-in-motion .race-rail {
  animation: race-track-pan 1.5s linear infinite;
}
@keyframes race-pan {
  to {
    background-position:
      -88px 0,
      0 0;
  }
}
@keyframes race-track-pan {
  to {
    background-position:
      -118px 0,
      0 0;
  }
}
.race-pack {
  position: absolute;
  inset: var(--race-top) var(--race-right) var(--race-bottom) 0.35rem;
  display: grid;
  grid-template-rows: repeat(8, minmax(0, 1fr));
}
.race-lane {
  position: relative;
  border-bottom: 1px solid #ffe3ba50;
}
.race-lane:last-child {
  border-bottom: 0;
}
.race-horse {
  --finish: calc(
    100% - var(--finish-stripe) - var(--horse-width) * 0.9 -
      var(--finish-gap, 0px)
  );
  position: absolute;
  top: 50%;
  left: 2.5%;
  width: var(--horse-width);
  aspect-ratio: 203 / 135;
  transform: translateY(-50%);
}
.race-horse::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/race/horse-idle.png') center / contain no-repeat;
  filter: sepia(0.68) brightness(1.38) contrast(1.18)
    drop-shadow(0 3px 2px #1c14239c);
}
.race-lane:nth-child(3n) .race-horse::before {
  filter: sepia(0.15) brightness(1.85) drop-shadow(0 3px 2px #1c14239c);
}
.race-lane:nth-child(3n + 1) .race-horse::before {
  filter: sepia(0.9) brightness(1.35) drop-shadow(0 3px 2px #1c14239c);
}
.race-in-motion .race-horse.racing::before {
  background-image: url('/race/horse.gif');
}
.race-horse span {
  position: absolute;
  left: 48%;
  top: 42%;
  width: clamp(0.66rem, 2.7vw, 1.25rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--silk);
  color: #281b2a;
  border-radius: 0.16rem;
  font-size: clamp(0.52rem, 2vw, 0.85rem);
  font-weight: 900;
}
.race-horse.is-leading span {
  box-shadow:
    0 0 0 2px #fff1c2,
    0 0 8px 4px #efb761b0;
}
.race-lane .race-horse.race-surging::before {
  filter: brightness(1.65) drop-shadow(-6px 1px 3px var(--silk));
}
@media (prefers-reduced-motion: reduce) {
  .race-finish-line {
    transition: none;
  }
}
.race-complete .race-finish-line {
  box-shadow: 0 0 18px #ffdf93;
}
.race-complete .race-horse:not(.race-winner) {
  opacity: 0.72;
}
.race-winner {
  z-index: 3;
  filter: drop-shadow(0 0 5px #ffd37a) drop-shadow(0 0 10px #ffe0a5);
}
.race-complete .race-callout {
  text-transform: uppercase;
  color: #ffe7b7;
}
.race-progress {
  height: 0.26rem;
  background: #513550;
}
.race-progress i {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #ec794e, #ffd086);
}
.race-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(7rem, 46%), 1fr));
  gap: 0.35rem;
  padding: 0.55rem;
  margin: 0;
  list-style: none;
}
.race-roster li {
  white-space: nowrap;
  font-size: 0.75rem;
}
.race-roster span {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  background: var(--silk);
  color: #271a2b;
  margin-right: 0.23rem;
  border-radius: 0.2rem;
  font-weight: 850;
}

.live-race .live-game-icon {
  width: clamp(4.25rem, 23vw, 8.5rem);
  aspect-ratio: 203 / 135;
  background: url('/race/horse-idle.png') center / contain no-repeat;
  filter: sepia(0.5) brightness(1.45) drop-shadow(0 3px 4px #211429);
}

.race-callout:not([hidden]) {
  position: absolute;
  z-index: 3;
  inset: 8% 0 auto;
  width: max-content;
  margin-inline: auto;
  padding: 0.2rem 0.6rem;
  color: #fff1c9;
  background: #251a32db;
  border: 1px solid #f7b56b;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px #eb9b6650;
  font-size: clamp(1.5rem, 7vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
}

.live-game-icon svg {
  width: 1.2em;
  height: 1.2em;
}

.rps-opponent {
  display: grid;
  gap: 0.35rem;
  text-align: center;
  padding: 1rem 0.65rem;
  border: 1px solid #795388;
  border-radius: 0.85rem;
  background: radial-gradient(ellipse at top, #573367, #211a33 75%);
}
.rps-opponent span {
  color: #ddb8ed;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.rps-opponent strong {
  font-size: clamp(1.5rem, 7vw, 2.6rem);
  overflow-wrap: anywhere;
}
.rps-opponent p {
  margin: 0;
  font-size: 0.83rem;
}

.live-picks.rps-picks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rps-picks label > span,
.rps-card-face,
.rps-card-back {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.35rem;
  min-height: 6rem;
  text-align: center;
  color: #f5e8f8;
  background: linear-gradient(160deg, #49315e, #272039);
}
.rps-picks label:nth-of-type(2) svg { color: #91deef; }
.rps-picks label:nth-of-type(3) svg { color: #ffa6cc; }
.rps-picks svg, .rps-reveal svg {
  width: clamp(2rem, 10vw, 3.5rem);
  color: #eac0ff;
}
.rps-picks input:checked + span {
  background: linear-gradient(160deg, #704471, #443050);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 16px #ee99cd55;
}
.rps-reveal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
}
.rps-card-face,
.rps-card-back {
  border: 1px solid #795388;
  border-radius: 0.7rem;
}
.rps-reveal > span { color: #ffcb9a; font-weight: 900; }
.rps-verdict { text-align: center; }
.rps-verdict strong { color: #ffcb9a; font-size: 1.25rem; }


.rps-card {
  display: grid;
  perspective: 650px;
}
.rps-card-face, .rps-card-back {
  grid-area: 1 / 1;
  backface-visibility: hidden;
}
.rps-card-back {
  visibility: hidden;
  font-size: 2rem;
  background: radial-gradient(circle, #694784, #2b1e41 72%);
}

[data-live-reveal]:has(.rps-reveal) {
  --rps-flip-delay: 650ms;
  --rps-flip-duration: 550ms;
}
.rps-verdict {
  animation: rps-show 0s calc(var(--rps-flip-delay) + var(--rps-flip-duration)) both;
}
.rps-card-face {
  animation: rps-show 0s calc(var(--rps-flip-delay) + var(--rps-flip-duration) / 2) both;
}
.rps-card-back {
  animation: rps-hide 0s calc(var(--rps-flip-delay) + var(--rps-flip-duration) / 2) both;
}
@media (prefers-reduced-motion: no-preference) {
  .rps-card-face {
    animation: rps-flip-face var(--rps-flip-duration) var(--rps-flip-delay) ease-in-out both;
  }
  .rps-card-back {
    animation: rps-flip-back var(--rps-flip-duration) var(--rps-flip-delay) ease-in-out both;
  }
  .rps-verdict {
    animation-duration: 180ms;
  }
}
@keyframes rps-flip-face {
  0%, 49% { visibility: hidden; }
  50%, 100% { visibility: visible; }
  from { transform: rotateY(-180deg); }
  to { transform: rotateY(0); }
}
@keyframes rps-flip-back {
  0%, 49% { visibility: visible; }
  50%, 100% { visibility: hidden; }
  from { transform: rotateY(0); }
  to { transform: rotateY(180deg); }
}
@keyframes rps-show {
  from { visibility: hidden; opacity: 0; }
  to { visibility: visible; opacity: 1; }
}
@keyframes rps-hide {
  from { visibility: visible; }
  to { visibility: hidden; }
}

.race-picks label > span {
  justify-items: center;
  text-align: center;
}
.race-picks .race-pick-horse {
  position: relative;
  top: auto;
  left: auto;
  width: min(100%, 6rem);
  transform: none;
}
.race-pick-horse span {
  width: 1rem;
  font-size: 0.72rem;
}
.race-pick-info {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.race-picks .race-pick-taken {
  cursor: default;
}
.race-picks .race-pick-taken > span {
  grid-template-columns: minmax(0, 1fr) minmax(0, 45%);
  align-items: center;
  background: #292733;
  border-color: #4c4855;
  color: #c2bdca;
}
.race-pick-taken .race-pick-info {
  filter: grayscale(1);
}
.race-picks .race-pick-owner {
  justify-self: end;
  text-align: right;
  overflow-wrap: anywhere;
  color: #e3dfeb;
  font-weight: 700;
}
