.game-reward-tile {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 9px;
  line-height: 1.3;
}
.game-reward-tile strong, .game-reward-tile small { display: block; overflow-wrap: anywhere; }
.game-reward-tile[data-toy-tier] { border-radius: .4rem; background: var(--toy-tier-stage); color: var(--toy-tier-label); }
.game-reward-tile small { margin-top: 2px; font-size: .79rem; }
.game-reward-art { display: grid; place-items: center; min-height: 46px; }
.game-reward-art :is(img, canvas) { display: block; max-width: 100%; max-height: 55px; object-fit: contain; }
.game-reward-art .gift-art { width: 100%; }
.game-reward-tile[data-kind="cards"] .game-reward-art canvas { border-radius: 3px; }
.game-reward-tile[data-kind="stencils"] .game-reward-art canvas { border-radius: 3px; background: #f0debf; }
.game-reward-art .paint-swatch { display: block; width: 43px; height: 23px; border-radius: 45% 21% 35% 20%; background: linear-gradient(135deg, var(--swatch-light), var(--swatch) 44%, var(--swatch-dark)); }
.shell-post-reward .game-reward-tile { flex: 1 1 270px; }
.shell-order-games { display: flex; flex-wrap: wrap; gap: 5px; }
.gift-slot-series { color: #e4cda9; font-size: .8rem; }

.game-victory {
  box-sizing: border-box;
  width: min(94vw, 29rem);
  max-height: 90dvh;
  overflow: auto;
  padding: clamp(16px, 4vw, 26px);
  border: 1px solid #d5ab6b;
  border-radius: 14px;
  background: #15292d;
  color: #fff1d2;
  box-shadow: 0 16px 48px #071011b3;
}
.game-victory::backdrop { background: #081710b8; }
body:has(.game-victory[open]) .shell-toast { visibility: hidden; }
.game-victory--result[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(calc(100vw - 24px), 39rem);
  max-width: calc(100vw - 24px);
  max-height: 92dvh;
  overflow: hidden;
  padding: 0;
  border-color: var(--toy-tier-edge, #dfb678);
  border-radius: 20px;
  background: var(--toy-tier-stage, #182b29);
  scrollbar-color: #bd9968 #203631;
}
.game-victory--result::backdrop { background: #0a161cbd; }
.game-victory-head { padding: .68rem 1rem .42rem; text-align: center; }
.game-victory--result .game-victory-head h2 {
  margin: 0;
  color: #ffdfa3;
  font: 600 clamp(1.13rem, 3.8vw, 1.4rem)/1.14 Georgia, serif;
  outline: none;
}
.game-victory--result .game-victory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: .38rem clamp(10px, 3.3vw, 16px) .75rem;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.game-victory-card {
  --victory-picture-size: clamp(60px, 17vw, 76px);
  display: grid;
  grid-template-columns: calc(var(--victory-picture-size) + 10px) minmax(0, 1fr);
  align-items: center;
  gap: .68rem;
  min-width: 0;
  padding: .5rem;
  border-radius: 12px;
  background: #fff0d7;
  color: #2e2a20;
}
.game-victory-card[data-toy-tier] { background: var(--toy-tier-paper, #fff0d7); }
.game-victory-card[data-kind='coins']:not([data-featured]) { --victory-picture-size: 34px; }
.game-victory-card[data-kind='coins']:not([data-featured]) .game-victory-art { background: transparent; }
.game-victory-card[data-featured] {
  --victory-picture-size: clamp(139px, 24dvh, 214px);
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 13px;
  text-align: center;
}
.game-victory-copy { min-width: 0; }
.game-victory-card[data-featured] .game-victory-copy { padding: .8rem 1rem .92rem; }
.game-victory-list .game-victory-name {
  margin: 0;
  color: #302719;
  font: 750 1rem/1.2 var(--shell-sans);
  overflow-wrap: anywhere;
}
.game-victory-card[data-featured] .game-victory-name {
  color: #302416;
  font: 700 clamp(1.48rem, 4.8vw, 2.2rem)/1.06 var(--shell-serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.game-victory-copy p {
  margin: .25rem 0 0;
  color: #554533;
  font: 450 .84rem/1.38 var(--shell-sans);
  overflow-wrap: anywhere;
}
.game-victory-card[data-featured] .game-victory-copy p {
  max-width: 57ch;
  margin-inline: auto;
  font-size: .92rem;
  text-wrap: pretty;
}
.game-victory-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: calc(var(--victory-picture-size) + 10px);
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 43%, var(--victory-light, #528d76), var(--victory-stage, #244940) 84%);
}
.game-victory-card[data-featured] .game-victory-art {
  min-height: calc(var(--victory-picture-size) + 26px);
  border-radius: 0;
  border-block-end: 1px solid #b68650;
  background:
    radial-gradient(ellipse at 50% 83%, #f9ddb635, transparent 53%),
    radial-gradient(ellipse at 50% 42%, var(--victory-light, #528d76), var(--victory-stage, #244940) 74%);
}
.game-victory-art[data-toy-tier] {
  background: var(--toy-tier-fill);
  border-color: var(--toy-tier-edge);
}
.game-victory-card[data-kind='paints'] .game-victory-art { --victory-light: #5a7d96; --victory-stage: #223b50; }
.game-victory-art > :is(canvas, img) {
  display: block;
  width: auto;
  max-width: 96%;
  height: var(--victory-picture-size);
  object-fit: contain;
  filter: drop-shadow(0 6px 6px #101a18a6);
}
.game-victory-art > .gift-art { width: min(96%, calc(var(--victory-picture-size) * 1.34)); }
.game-victory-art > .snow-coin { width: calc(var(--victory-picture-size) * .69); }
.game-victory-star {
  color: #ffe099;
  font: 800 calc(var(--victory-picture-size) * .81)/1 var(--shell-sans);
  text-shadow: 0 3px #a76e32, 0 6px 12px #292313af;
}
.game-victory-empty {
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 12px;
  background: #fff0d7;
  text-align: center;
}
.game-victory-empty .game-victory-copy { padding: clamp(14px, 4vw, 22px); }
.game-victory-empty .game-victory-name {
  font: 700 clamp(1.34rem, 5vw, 1.94rem)/1.14 var(--shell-serif);
  text-wrap: balance;
}
.game-victory-empty .game-victory-copy p { max-width: 46ch; margin-inline: auto; font-size: .92rem; }
.game-victory-empty-art {
  display: grid;
  place-items: center;
  min-height: 7.5rem;
  border-block-end: 1px solid #a48d6d;
  background: radial-gradient(ellipse at 50% 45%, #64736c, #29423d 78%);
}
.game-victory-empty-art > img { width: auto; max-width: 82%; height: 6rem; object-fit: contain; }
.game-victory-empty-art > .gift-art { width: 9.5rem; }
.game-victory-empty-art[data-open-box] .gift-art__lid { transform: translateY(-14%) rotate(16deg); }
.game-victory-card[data-kind='stencils'] .game-victory-art > canvas {
  width: 85%;
  max-height: var(--victory-picture-size);
  height: auto;
  border-radius: 7px;
  background: #f0debf;
}
.paint-prize-sample {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--victory-picture-size);
  max-width: 100%;
}
.paint-prize-sample canvas {
  display: block;
  width: 100%;
  filter: drop-shadow(0 6px 6px #101a18a6);
}
.paint-prize-sample .paint-swatch {
  position: absolute;
  inset: auto 4% 12% auto;
  width: 26%;
  aspect-ratio: 1.62;
  border: 1px solid #ffeedbc7;
  border-radius: 45% 45% 35% 36%;
  background: linear-gradient(140deg, var(--swatch-light), var(--swatch) 47%, var(--swatch-dark));
  box-shadow: inset 0 1px 2px #fff5cd70, 0 4px 8px #11201c99;
}
.game-victory-art--gleam::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, #fff5d366, transparent 63%);
  content: '';
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .game-victory--result[open] .game-victory-art--gleam::after {
    animation: game-victory-gleam .84s ease-out both;
  }
}
@keyframes game-victory-gleam {
  0%, 100% { opacity: 0; transform: scale(.8); }
  24% { opacity: 1; transform: scale(1.12); }
}
.game-victory-copy .game-victory-reward-actions { justify-content: start; gap: .38rem; margin-top: .48rem; }
.game-victory-card[data-featured] .game-victory-reward-actions { justify-content: center; }
.game-victory--result .gift-dialog__actions > :is(.gift-button, .ec-prize-place) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 2.55rem;
  margin: 0;
  padding: .48rem .7rem;
  border-radius: 8px;
  font: 650 .85rem/1.22 var(--shell-sans);
  text-align: center;
  text-decoration: none;
}
.game-victory-main-action { margin-top: .75rem; }
.game-victory--result .game-victory-main-action > .gift-button {
  min-height: 2.85rem;
  padding-inline: 1rem;
  font-size: .96rem;
}
.game-victory-main-action > .gift-button:focus-visible { outline-color: #70491e; }
.game-victory-copy .game-victory-main-action + .game-victory-reward-actions { margin-top: .63rem; }
.game-victory--result .game-victory-reward-actions > :is(.gift-button, .ec-prize-place) {
  border-color: #a3845d;
  background: #fff8e9;
  color: #362d20;
  box-shadow: none;
}
.game-victory-reward-actions > :is(.gift-button, .ec-prize-place):not(:disabled):hover { background: #f6e1bb; color: #312719; }
.game-victory-reward-actions > .gift-button:disabled { border-color: #baa889; color: #675846; background: #eee0c7; }
.game-victory-reward-actions > :is(.gift-button, .ec-prize-place):focus-visible { outline: 2px solid #2f6352; outline-offset: 2px; }
.game-victory-footer {
  grid-row: 3;
  padding: .38rem clamp(10px, 3.3vw, 16px) .72rem;
  border-block-start: 1px solid #ad8d624d;
  text-align: center;
}
.game-victory--result .game-victory-footer p {
  margin: 0 0 .42rem;
  color: #ecd8b4;
  font: 500 .81rem/1.24 var(--shell-sans);
}
.game-victory--result .game-victory-actions > .gift-button--quiet { border-color: #ae9b77; background: transparent; }
@media (max-width: 560px) {
  .game-victory--result .game-victory-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 520px) {
  .game-victory-head { padding-block: .35rem; }
  .game-victory-card[data-featured] { --victory-picture-size: 112px; }
  .game-victory-footer { padding-block: .3rem; }
}

.game-prize[open] {
  display: grid;
  gap: .68rem;
  border-color: var(--toy-tier-edge, #d5ab6b);
  background: var(--toy-tier-stage, #15292d);
}
.game-prize-head { display: flex; justify-content: space-between; align-items: start; gap: .66rem; }
.game-prize .game-prize-head h2 { margin: 0; color: #ffe9bb; font: 600 clamp(1.42rem, 5vw, 2rem)/1.07 Georgia, serif; overflow-wrap: anywhere; }
.game-prize p { margin: 0; color: #e2e8de; font-size: .87rem; line-height: 1.38; }
.game-prize .game-prize-head p { margin: 0 0 .24rem; color: #f0c983; font-size: .77rem; font-weight: 700; }
.game-prize .game-prize-close { flex: 0 0 2.45rem; width: 2.45rem; height: 2.45rem; min-height: 0; padding: 0; font-size: 1.45rem; }
.game-prize-art {
  position: relative; display: grid; place-items: center; min-height: 5rem; overflow: hidden;
  padding: .5rem; border: 1px solid #ac8d5860; border-radius: .62rem;
  background: var(--toy-tier-fill, radial-gradient(ellipse at center, #294a58, #102634 80%));
}
.game-prize-art[data-playable] { padding-bottom: 2.85rem; }
.game-prize-art:has(> .toy-effect-button) { padding-bottom: .5rem; }
.game-prize-art > .toy-effect-button { position: absolute; z-index: 4; inset: auto .6rem .6rem auto; }
.game-prize-art > :is(canvas, img) { display: block; width: min(100%, 12rem, 32dvh); height: auto; object-fit: contain; }
.game-prize[data-kind='room'] .game-prize-art > img { width: 100%; max-height: 32dvh; object-fit: cover; }
.game-prize[data-kind='cards'] .game-prize-art > canvas { width: min(100%, 22rem, 55dvh); }
.game-prize-art > .gift-art { width: min(230px, 85%); }
.game-prize[data-kind='stencils'] .game-prize-art > canvas { background: #f0debf; }
.game-prize[data-kind='garland'] .game-prize-art > canvas { width: min(100%, 19rem); }
.game-prize-art > .snow-coin { width: 4.1rem; margin-block: .4rem; }
.game-prize-art > .paint-swatch { display: block; width: 9rem; height: 5rem; border-radius: .4rem; background: var(--swatch); }
.game-prize-replay {
  position: absolute; z-index: 4; inset: 0; align-items: end; justify-items: center;
  width: 100%; padding: .44rem; border: 0; border-radius: inherit; background: transparent; color: #fff3d4;
  font: 650 .8rem/1.2 system-ui, sans-serif;
}
.game-prize-replay:not([hidden]) { display: grid; }
.game-prize-replay span { display: flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border: 1px solid #e6ca8b8c; border-radius: .4rem; background: #10232bed; }
.game-prize-replay:hover span { background: #28444b; }
.game-prize-replay:focus-visible { outline-offset: -3px; }
.game-prize-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .32rem; }
.game-prize-meta:empty, .game-prize [data-prize-meta]:not(:has(.game-prize-tag)) { display: none; }
.game-prize-tag {
  display: inline-flex;
  align-items: center;
  padding: .24rem .49rem;
  border: 1px solid #8b9b9c;
  border-radius: .35rem;
  background: #253537;
  color: #f5efdf;
  font: 650 .77rem/1.16 var(--shell-sans);
}
.game-prize-tag[data-prize-rarity] {
  border-color: var(--toy-tier-edge);
  background: var(--toy-tier-stage);
  color: var(--toy-tier-label);
}
.game-prize-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.game-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.game-coin-badge > .snow-coin { width: 1rem; }
.game-prize-tag[data-prize-value] {
  display: inline-block;
  max-width: 100%;
  border-color: #7d9ba4;
  background: #203841;
  color: #e9f8ff;
  font-variant-numeric: tabular-nums;
}
.game-prize-value-amount {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  vertical-align: middle;
  white-space: nowrap;
}
.game-prize-value-amount > .snow-coin { width: 1rem; }
.game-prize .game-prize-tag[data-prize-value] { font-size: .85rem; }
.game-victory-copy > .game-prize-meta { margin-block: .5rem .35rem; }
.game-victory-card[data-featured] .game-prize-meta { justify-content: center; }
.game-prize-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.game-prize-actions:empty { display: none; }
.game-prize-actions .ec-prize-place { margin: 0; }

.game-mode-closed {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  color: #dcccb1;
  font-size: .8rem;
  font-weight: 650;
}

.game-star-reward {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-block: 8px 11px;
  padding: 9px;
  border: 1px solid #aa875b90;
  border-radius: 9px;
  background: #182b36;
  color: #ffebbf;
}
.game-star-reward__art { display: grid; place-items: center; }
.game-star-reward__art .snow-coin { width: 35px; }
.game-star-reward p { margin: 0; color: #e4d7bf; font-size: .8rem; }

:where(.reward-count-anchor) { position: relative; }
.reward-count-badge {
  position: absolute;
  z-index: 2;
  top: var(--reward-count-top, -.26rem);
  right: var(--reward-count-right, -.3rem);
  display: grid;
  place-items: center;
  min-width: 1.36rem;
  height: 1.36rem;
  padding-inline: .24rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #ffc9a0;
  border-radius: 999px;
  background: linear-gradient(165deg, #d83549, #aa1d38 58%, #86162e);
  box-shadow: 0 2px 5px #1e0a13b8, inset 0 1px #ff9a9566;
  color: #fff9ec;
  font: 800 .77rem/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.reward-count-badge[hidden], .reward-clock[hidden] { display: none; }
.reward-count-badge::after {
  position: absolute;
  z-index: -1;
  inset: -20% auto -20% 0;
  width: 65%;
  background: linear-gradient(90deg, transparent, #fff4d695, transparent);
  opacity: 0;
  content: '';
}
@media (prefers-reduced-motion: no-preference) {
  .reward-count-badge::after {
    animation: reward-count-glint 7.4s ease-out var(--reward-count-delay, .3s) 3;
  }
}
@keyframes reward-count-glint {
  0% { opacity: 0; transform: translateX(-120%) skewX(-22deg); }
  5% { opacity: 1; }
  13%, 100% { opacity: 0; transform: translateX(190%) skewX(-22deg); }
}
.reward-clock {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reward-clock::before {
  flex: none;
  width: .62rem;
  height: .62rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) 50% 20% / 1px 35% no-repeat,
    linear-gradient(currentColor, currentColor) 66% 53% / 30% 1px no-repeat;
  content: '';
}
.game-star-track { position: relative; width: max-content; color: #829098; }
.game-star-track::after {
  content: attr(data-filled);
  position: absolute;
  inset: 0 auto auto 0;
  color: #f5ca79;
  text-shadow: 0 1px 5px #dca35a65;
}
.game-star-track, .game-star-icons { font: 700 1rem/1.2 'Segoe UI', sans-serif; letter-spacing: .12em; }
.game-star-icons { color: #f5ca79; white-space: nowrap; }
.game-star-rules { display: grid; gap: 5px; margin: 7px 0; padding: 0; list-style: none; }
.game-star-rules li {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  color: #e8dfcd;
  font-size: .85rem;
  line-height: 1.3;
}

@media (prefers-reduced-motion: no-preference) {
  .elka-collection-art.elka-authored-art { position: relative; }
  .elka-authored-art::after {
    content: '';
    position: absolute;
    inset: 23% auto auto 29%;
    width: 23%;
    aspect-ratio: 1;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 44%, #fff8df 49% 51%, transparent 56%),
      linear-gradient(0deg, transparent 44%, #fff8df 49% 51%, transparent 56%),
      radial-gradient(closest-side, #fff5cb, #ffe3a000);
    opacity: 0;
  }
  :is(:hover, :focus-within) > .elka-authored-art::after,
  .elka-collection-detail[open] .elka-authored-art::after {
    animation: elka-authored-twinkle 4.7s ease-out infinite both;
  }
  @keyframes elka-authored-twinkle {
    0%, 19%, 100% { opacity: 0; transform: scale(.33) rotate(-12deg); }
    7% { opacity: .96; transform: scale(1) rotate(5deg); }
  }
}
