/* A single reveal runs alongside cloud confirmation. Its clock never gates input. */
.toy-gui #result.has-victory-scene[data-outcome='won'] .gui-award { display:none }
.victory-scene {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  box-sizing:border-box;
  flex:none;
  width:100%;
  height:clamp(108px, 25dvh, 208px);
  margin:0;
  border:1px solid #7799ac;
  border-radius:13px;
  background:
    radial-gradient(1px 1px at 9% 34%, #e0faff 90%, transparent),
    radial-gradient(2px 2px at 16% 74%, #7ce5e6 70%, transparent),
    radial-gradient(1px 1px at 23% 22%, #fff2bb 90%, transparent),
    radial-gradient(1px 1px at 72% 17%, #bde9ff 90%, transparent),
    radial-gradient(2px 2px at 84% 43%, #c9f9ff 70%, transparent),
    radial-gradient(1px 1px at 94% 25%, #fff2bb 90%, transparent),
    radial-gradient(ellipse at 50% 110%, #3a8ba1, #224660 48%, #0d2136 85%);
  box-shadow:inset 0 0 0 3px #17374b, inset 0 0 0 4px #60899d5c;
  pointer-events:none;
}
.victory-scene::before {
  content:'';
  position:absolute;
  inset:11% 20%;
  border:1px solid #adeefa73;
  border-radius:50%;
  box-shadow:0 0 0 7px #8ee9f50e, 0 0 0 16px #9ef5ff0a;
  transform:rotate(-15deg);
  animation:cargo-victory-orbit 1000ms ease-out both;
}
.victory-scene::after {
  content:'';
  position:absolute;
  bottom:5px;
  left:40%;
  height:2px;
  width:20%;
  border-radius:50%;
  background:#b9faff;
  opacity:.6;
}
.victory-scene[data-status='saving']::after { animation:cargo-victory-beacon 1400ms ease-in-out infinite alternate }
.victory-scene[data-status='retry']::after { opacity:.35 }
.victory-picture {
  position:absolute;
  top:9%;
  left:14%;
  width:72%;
  height:80%;
  object-fit:contain;
  image-rendering:pixelated;
  filter:drop-shadow(0 4px 1px #071e3688);
  animation:cargo-victory-picture 820ms cubic-bezier(.16,.76,.2,1) both;
}
.victory-medal {
  position:absolute;
  right:7%;
  bottom:8%;
  height:clamp(42px, 8dvh, 71px);
  aspect-ratio:1;
  filter:drop-shadow(0 3px 1px #071e36aa);
  animation:cargo-victory-medal 640ms 320ms cubic-bezier(.18,.7,.26,1.13) both;
}
.victory-medal-only .victory-medal { inset:12% 0 auto; height:76%; margin:auto }
.victory-burst {
  position:absolute;
  inset:0;
  z-index:1;
}
.victory-burst i {
  position:absolute;
  top:50%;
  left:50%;
  width:5px;
  height:5px;
  background:#ffdb7d;
  box-shadow:0 0 5px #ffd567a8;
  animation:cargo-victory-star 800ms var(--star-delay) cubic-bezier(.16,.64,.28,1) both;
}
.victory-burst i:nth-child(3n) { width:3px; height:7px; background:#c7ffff; box-shadow:0 0 6px #73e6ff }
@keyframes cargo-victory-picture {
  0% { opacity:0; transform:translateY(12px) scale(.76) }
  52% { opacity:1; transform:translateY(-1px) scale(1.035) }
  100% { opacity:1; transform:none }
}
@keyframes cargo-victory-medal {
  from { opacity:0; transform:translate(12px, 11px) rotate(13deg) scale(.68) }
  to { opacity:1; transform:none }
}
@keyframes cargo-victory-orbit {
  from { opacity:0; transform:rotate(-20deg) scale(.72) }
  to { opacity:1; transform:rotate(-15deg) }
}
@keyframes cargo-victory-star {
  0% { opacity:0; transform:rotate(45deg) scale(.3) }
  22% { opacity:1 }
  100% { opacity:0; transform:translate(var(--star-x), var(--star-y)) rotate(135deg) scale(.55) }
}
@keyframes cargo-victory-beacon {
  from { transform:scaleX(.3); opacity:.3 }
  to { transform:scaleX(1); opacity:.85 }
}
.victory-still .victory-picture, .victory-still .victory-medal,
.victory-still::before, .victory-still[data-status]::after { animation:none }
.victory-still .victory-burst { display:none }
@media (prefers-reduced-motion:reduce) {
  .victory-scene .victory-picture, .victory-scene .victory-medal,
  .victory-scene::before, .victory-scene[data-status]::after { animation:none }
  .victory-burst { display:none }
}
