html:has(.result-dialog.with-parade[open]),
body:has(.result-dialog.with-parade[open]) { overflow: hidden; }

.result-dialog.with-parade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #211625;
  color: #fff1d6;
  box-shadow: none;
}
.result-dialog.with-parade[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  animation: ingredient-scene-in .25s ease-out both;
}
@keyframes ingredient-scene-in { from { opacity: 0; } }

.with-parade .result-dialog-heading {
  align-items: center;
  padding: .42rem .65rem .42rem 1rem;
  border-bottom: 2px solid #bc6b54;
  background: #291b2b;
}
.with-parade .result-dialog-heading h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 5.5vw, 2.2rem);
  text-shadow: 2px 2px #8e3d45;
}
.with-parade #result-dialog-close {
  border-color: #d58972;
  background: #4a2b3d;
  color: #fff4d3;
}
.with-parade #result-dialog-content,
.with-parade .drink-details {
  display: grid;
  min-height: 0;
}
.ingredient-parade {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}
.ingredient-scene {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(0deg, #341828ad 9%, #29152810 47%, #26192b5c 100%),
    url('./duel-nikkei-salle-manga.webp') center 43% / cover;
}
.ingredient-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.ingredient-names {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}
.ingredient-names[data-positioned] { visibility: visible; }
.ingredient-name {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(28%, 8rem);
  padding: .16rem .32rem;
  border: 1px solid #c87665;
  border-radius: .38rem;
  background: #27182bef;
  color: #fff1cd;
  font: 800 clamp(.75rem, 2.6vw, .94rem)/1.1 var(--display);
  text-align: center;
  overflow-wrap: anywhere;
}
.ingredient-credits {
  max-height: 34dvh;
  overflow: auto;
  padding: .48rem .8rem max(.48rem, env(safe-area-inset-bottom));
  border-top: 2px solid #a76255;
  background: #291b2b;
  color: #ffe8be;
  text-align: center;
}
.ingredient-roster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .2rem .85rem;
  margin: 0;
  padding: 0;
  list-style: '';
  font-size: clamp(.875rem, 3.8vw, 1.05rem);
  font-weight: 720;
  line-height: 1.26;
  overflow-wrap: anywhere;
}
.ingredient-roster li {
  max-width: 100%;
}
.ingredient-roster li + li::before {
  content: '·';
  margin-inline-end: .42rem;
  color: #ff9a73;
}
.with-parade .ingredients,
.with-parade .language-note {
  margin: .26rem 0 0;
  color: #e9ced1;
  font-size: .84rem;
}
.ingredient-replay {
  position: absolute;
  bottom: .8rem;
  left: 50%;
  transform: translateX(-50%);
  min-height: 44px;
  padding: .32rem .8rem;
  border: 2px solid #321e2e;
  border-radius: .4rem;
  background: #ffc979;
  color: #331c2f;
  font: 800 .9rem/1.15 var(--display);
}
@media (prefers-reduced-motion: reduce) {
  .result-dialog.with-parade[open] { animation: none; }
}
