/* Play-only refinement. Ranked is a persistent mode, separate from streak heat. */
.play-page #game-description {
  display: none;
}
.play-page .page-heading > div > p {
  display: none;
}
.play-page .page-heading {
  margin-bottom: 10px;
}
.play-page .page-heading h1 {
  margin: 4px 0;
}
.play-page .game-card {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding-top: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.play-page .game-card-top {
  grid-row: 1;
}
.play-page .game-intro {
  grid-row: 1;
  grid-column: 1/-1;
  align-self: center;
  justify-self: center;
  margin: 0;
  pointer-events: none;
  max-width: 48%;
  text-align: center;
}
.play-page .game-intro h2 {
  margin: 4px 0 0;
}
.play-page .game-intro .eyebrow {
  font-size: 7px;
  letter-spacing: 1.3px;
}
.play-page .coin-stage {
  grid-row: 2;
  padding-top: 8px;
}
.play-page .coin-caption {
  grid-row: 3;
  margin: 0 0 6px;
}
.play-page .game-controls {
  grid-row: 2/4;
}
.play-page .run-section {
  grid-row: 4;
  padding: 9px 0;
}
.play-page .coin-wrap {
  width: min(90cqh, 86cqw);
  max-width: 350px;
}
.play-page .coin-wrap.coin-frame-equipped {
  translate: 0 8px;
}
@property --ranked-edge-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
:is(.play-page.ranked-mode .game-card, .leader-podium) {
  position: relative;
  border-color: var(--website-line-212-249-155-0_7490196078431373, #d4f99bbf);
  box-shadow:
    0 0 0 1px var(--website-shade-197-233-139-0_27058823529411763, #c5e98b45),
    inset 0 0 30px var(--website-shade-182-223-115-0_10980392156862745, #b6df731c),
    0 0 26px var(--website-shade-183-228-118-0_23921568627450981, #b7e4763d);
}
/* Masked light stays on the rim; it never blocks the game or its controls. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::before,
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    pointer-events: none;
    z-index: 4;
    background: conic-gradient(
      from var(--ranked-edge-angle),
      var(--website-surface-202-255-140-0, #caff8c00) 0deg,
      var(--website-surface-186-250-128-0_13333333333333333, #bafa8022) 20deg,
      var(--website-surface-214-255-152-0_5333333333333333, #d6ff9888) 56deg,
      var(--website-surface-245-255-218-1, #f5ffda) 83deg,
      var(--website-surface-239-255-196-1, #efffc4) 91deg,
      var(--website-surface-213-255-141-0_8, #d5ff8dcc) 97deg,
      var(--website-surface-191-255-138-0, #bfff8a00) 119deg,
      var(--website-surface-191-255-138-0, #bfff8a00) 190deg,
      var(--website-surface-202-255-140-0_13333333333333333, #caff8c22) 220deg,
      var(--website-surface-220-255-168-0_5333333333333333, #dcffa888) 250deg,
      var(--website-surface-238-255-193-0_8, #eeffc1cc) 264deg,
      var(--website-surface-202-255-140-0, #caff8c00) 290deg,
      var(--website-surface-202-255-140-0, #caff8c00) 360deg
    );
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: ranked-edge-orbit 9s linear infinite;
  }
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::before {
    padding: 3px;
    filter: blur(5px);
    opacity: 0.85;
  }
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::after {
    filter: drop-shadow(0 0 3px #d4ff9cb3);
  }
  :is(#ranked-podium, #pvp-podium).leader-podium::before,
  :is(#ranked-podium, #pvp-podium).leader-podium::after {
    background: conic-gradient(
      from var(--ranked-edge-angle),
      #aed87400 0deg, #bbe68365 34deg, #d6ff98a6 66deg, #f5ffda 83deg,
      #efffc4 91deg, #d5ff8dcc 106deg, #c1f28980 135deg, #aed87400 178deg,
      #bbe68365 208deg, #d6ff98a6 241deg, #eeffc1 264deg, #d5ff8dcc 284deg,
      #c1f28980 318deg, #aed87400 360deg
    );
  }
  :is(#ranked-podium, #pvp-podium).leader-podium::before {
    padding: 5px;
    filter: blur(7px);
    opacity: 1;
  }
  :is(#ranked-podium, #pvp-podium).leader-podium::after {
    padding: 2.5px;
    filter: drop-shadow(0 0 4px #e0ffb3) drop-shadow(0 0 9px #b9ef77b3);
  }
}
@keyframes ranked-edge-orbit {
  to {
    --ranked-edge-angle: 360deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::before,
  :is(.play-page.ranked-mode .game-card, .pvp-result-player.pvp-result-winner, .leader-podium)::after {
    animation: none;
    --ranked-edge-angle: 35deg;
  }
}
body.player-reduced-motion .leader-podium::before,
body.player-reduced-motion .leader-podium::after {
  animation: none;
  --ranked-edge-angle: 35deg;
}
.play-page.ranked-mode #play-heading {
  color: var(--website-ink-227-255-192-1, #e3ffc0);
  letter-spacing: 3px;
  text-shadow:
    0 0 12px var(--website-shade-198-245-148-0_4, #c6f59466),
    0 0 28px var(--website-shade-180-239-115-0_2, #b4ef7333);
}
.play-page.ranked-mode [data-mode='ranked'] {
  box-shadow:
    inset 0 0 0 1px var(--website-shade-199-237-140-0_4, #c7ed8c66),
    0 0 12px var(--website-shade-169-223-99-0_13333333333333333, #a9df6322);
  color: var(--website-ink-230-255-199-1, #e6ffc7);
}
.play-page #flip-history {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px 6px;
  align-content: start;
}
.play-page .flip-slot {
  min-width: 0;
  height: 23px;
}
.play-page .flip-slot.row-start:before {
  display: none;
}
.play-page .flip-slot.unknown {
  color: var(--website-ink-167-174-153-1, #a7ae99);
  border-style: dotted;
}
@media (max-width: 1050px) and (min-width: 701px) {
  .play-page .game-intro {
    max-width: 42%;
  }
  .play-page .game-intro h2 {
    font-size: 19px;
  }
  .play-page .game-intro .eyebrow {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
}
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.play-page .game-card {
    padding: 6px 9px 8px;
    border: 1px solid var(--website-line-59-68-50-1, #3b4432);
    border-radius: 14px;
    background: var(--website-surface-27-33-23-0_13333333333333333, #1b211722);
  }
  body.play-page .mobile-game-summary {
    padding-top: 5px;
  }
  body.play-page.ranked-mode #mobile-streak-label {
    color: var(--website-ink-227-255-192-1, #e3ffc0);
    font-size: 12px;
    letter-spacing: 3px;
    text-shadow:
      0 0 10px var(--website-shade-198-245-148-0_5333333333333333, #c6f59488),
      0 0 20px var(--website-shade-180-239-115-0_26666666666666666, #b4ef7344);
  }
  body.play-page .coin-wrap {
    width: min(236px, 92cqh);
    height: min(236px, 92cqh);
    max-width: 88cqw;
  }
  body.play-page .coin-stage {
    padding-top: 4px;
    min-height: 110px;
  }
  body.play-page .coin-caption {
    margin: 0 0 5px;
  }
  body.play-page .run-section {
    padding: 0;
    margin: 0;
  }
  body.play-page.ranked-mode .run-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3px 0 5px;
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  body.play-page.ranked-mode .run-header .streak-score {
    font-size: 12px !important;
  }
  body.play-page.ranked-mode #ranked-heat-label {
    display: none;
  }
  body.play-page.streak-enabled #flip-history {
    gap: 5px 4px;
    margin: 0 0 7px;
  }
  body.play-page.streak-enabled .flip-slot {
    height: 21px;
    font-size: 11px;
    border-radius: 4px;
  }
  body.play-page .game-controls .result-message {
    min-height: 32px;
    padding: 5px 3px;
    font-size: 11px;
  }
}
@media (max-width: 700px) and (max-height: 700px) {
  body.play-page.streak-enabled .coin-wrap {
    width: min(144px, 92cqh);
    height: min(144px, 92cqh);
  }
  body.play-page.streak-enabled .coin-stage {
    min-height: 78px;
  }
  body.play-page.streak-enabled .flip-slot {
    height: 17px;
    font-size: 10px;
  }
  body.play-page .mobile-game-summary {
    padding-top: 2px;
  }
  body.play-page .game-controls .result-message {
    min-height: 26px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .play-page .game-card {
    transition: none;
  }
}

@media (min-width: 701px) and (min-height: 501px) {
  .play-page .game-card {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
  .play-page .coin-wrap.coin-frame-equipped {
    width: min(92cqh, 74cqw);
  }
}

@media (min-width: 951px), (min-width: 701px) and (min-height: 501px) {
  body.play-page.pvp-sandbox .workspace {
    height: 100dvh !important;
    min-height: 0;
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  body.play-page .workspace {
    min-height: 0;
  }
  body.play-page.ranked-mode.streak-enabled #ranked-heat-label {
    display: none;
  }
}

/* Winner highlight shares the Ranked rim animation; outcomes remain data-driven. */
.pvp-result-player.pvp-result-winner {
  position: relative;
  isolation: isolate;
  border-color: var(--website-line-212-249-155-0_7490196078431373, #d4f99bbf);
  box-shadow:
    inset 0 0 24px var(--website-shade-182-223-115-0_09411764705882353, #b6df7318),
    0 0 16px var(--website-shade-183-228-118-0_20784313725490197, #b7e47635);
}
