.victory-show[open] {
  --vx-sky: #39206d;
  --vx-deep: #15102d;
  --vx-accent: #ffdfa2;
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  overflow: clip;
  background: var(--vx-deep);
  color: #fff7ea;
  text-align: center;
}

.victory-show::backdrop { background: #100b23; }

.victory-scene {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: clamp(.25rem, 1.2vh, .85rem);
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  overflow: clip;
  padding: max(.95rem, env(safe-area-inset-top)) max(1.15rem, env(safe-area-inset-right))
    max(clamp(1.25rem, 4.8vh, 3rem), env(safe-area-inset-bottom)) max(1.15rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 50% 42%, var(--vx-sky), transparent 78%),
    linear-gradient(170deg, var(--vx-sky), var(--vx-deep) 88%);
}

.victory-scene::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 47%, #100b2333 100%),
    repeating-linear-gradient(120deg, #ffffff03 0 1px, transparent 1px 8px);
  pointer-events: none;
}

.victory-plate {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: 2rem;
  padding: .4em .87em;
  border: 1px solid #ffffff38;
  border-radius: 99em;
  background: #140d3073;
  color: #fff7ed;
  font-size: clamp(.69rem, 1.65vmin, 1rem);
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1.24;
  text-transform: uppercase;
}

.victory-plate span:first-child { color: var(--vx-accent); }

.victory-art {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 80rem;
  overflow: visible;
  pointer-events: none;
}

.victory-caption {
  z-index: 1;
  max-width: min(100%, 58rem);
  padding: 0 .5rem;
  text-shadow: 0 .1em .5em #150d2ebd;
  animation: vx-caption-in .7s .2s cubic-bezier(.18,.76,.24,1) both;
}

.victory-caption h2 {
  margin: 0;
  color: #fff8e9;
  font-size: clamp(1.65rem, min(6.2vw, 7.6vh), 4.5rem);
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1;
  text-wrap: balance;
}

.victory-caption h2::after {
  content: "";
  display: block;
  width: clamp(1.2rem, 6vw, 4.25rem);
  height: .14rem;
  margin: .36em auto 0;
  border-radius: 99em;
  background: var(--vx-accent);
  box-shadow: 0 0 .75rem var(--vx-accent);
}

.victory-show .victory-message {
  margin: .44em 0 0;
  color: #fff7ed;
  font-size: clamp(.98rem, min(2.6vw, 3.55vh), 1.9rem);
  font-weight: 700;
  line-height: 1.19;
  text-wrap: balance;
}

@keyframes vx-caption-in {
  from { transform: translateY(.58rem); opacity: .25; }
  to { transform: translateY(0); opacity: 1; }
}

@media (orientation: portrait) {
  .victory-scene {
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: clamp(.65rem, 3.5dvh, 2rem);
    padding-inline: max(.35rem, env(safe-area-inset-left)) max(.35rem, env(safe-area-inset-right));
  }
  .victory-art { height: auto; aspect-ratio: 16 / 9; }
  .victory-caption { padding-inline: .75rem; }
  .victory-caption h2 { font-size: clamp(1.65rem, 8.2vw, 3.5rem); }
  .victory-show .victory-message { font-size: clamp(1.05rem, 4.65vw, 1.65rem); }
}

@media (max-height: 480px) and (orientation: landscape) {
  .victory-scene {
    grid-template: minmax(0, 1fr) minmax(0, 2fr) / minmax(0, 2.05fr) minmax(0, 1fr);
    gap: .45rem 0;
    padding-block: max(.5rem, env(safe-area-inset-top)) max(.55rem, env(safe-area-inset-bottom));
  }
  .victory-art { grid-column: 1; grid-row: 1 / 3; }
  .victory-plate { grid-column: 2; grid-row: 1; align-self: end; }
  .victory-caption { grid-column: 2; grid-row: 2; align-self: start; padding-block: .3rem; }
  .victory-caption h2 { font-size: clamp(1.35rem, min(4.4vw, 8.8vh), 2.75rem); }
  .victory-show .victory-message { font-size: clamp(.94rem, 2.2vw, 1.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  .victory-show *, .victory-show *::before, .victory-show *::after {
    animation: none !important;
    transition: none !important;
  }
}
