#app {
  color: #50444d;
  outline: none;
}
.crumb,
.actions-r,
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0;
}
.crumb a,
.actions-r a,
.panel-link,
.filters select,
.primary-r,
.back-r {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 16px;
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-weight: 750;
}
.crumb a {
  padding: 0.4rem 0.7rem;
}
.actions-r a,
.back-r,
.panel-link {
  background: white;
  border: 2px solid #decfc3;
}
.primary-r {
  background: #a24355;
  color: white;
  border: 0;
  font-size: 1.2rem;
  padding: 0.8rem 1.4rem;
}
.primary-r:disabled {
  background: #dbd4ce;
  color: #554d4d;
}
.hero-r,
.stage-r,
.result-r {
  border: 2px solid #e6cfc1;
  border-radius: 28px;
  background: #fff1df;
  padding: clamp(16px, 4vw, 40px);
}
.hero-r,
.stage-r {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.hero-r h1,
.result-r h1,
.stage-r h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  margin: 0.3em 0;
}
.machine {
  display: block;
  width: min(100%, 290px);
  margin: auto;
}
.panels,
.stats,
.prizes {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-link,
.planned {
  min-height: 100px;
  padding: 14px;
  border-radius: 22px;
}
.panel-link {
  gap: 12px;
  justify-content: flex-start;
  background: #e9f4ee;
  font-size: 1.18rem;
}
.panel-link img {
  width: 64px;
  height: 62px;
  object-fit: contain;
}
.planned {
  background: #eeeae4;
  display: grid;
  align-content: center;
  text-align: center;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  font-size: 0.92rem;
}
.stats span,
.tally {
  background: #f4ecdf;
  border-radius: 12px;
  padding: 7px 10px;
}
.tally {
  display: inline-block;
  font-weight: bold;
}
.prizes {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
}
.prize {
  display: grid;
  align-content: start;
  text-align: center;
  gap: 5px;
  border: 2px solid #ded2c5;
  border-radius: 18px;
  background: white;
  padding: 12px 8px;
  color: inherit;
  text-decoration: none;
}
.prize img {
  width: 100%;
  height: 86px;
  object-fit: contain;
}
.prize small {
  font-size: 0.82rem;
}
.locked img {
  filter: grayscale(1);
  opacity: 0.28;
}
.locked {
  background: #f6f3ed;
}
.filters label {
  display: grid;
  gap: 4px;
}
.filters select {
  background: white;
  max-width: 100%;
}
.result-r {
  text-align: center;
  background: #edf5eb;
}
.result-r > img {
  width: min(75%, 270px);
  height: 210px;
  object-fit: contain;
}
.result-r .actions-r {
  justify-content: center;
}
.scene {
  position: relative;
  isolation: isolate;
}
.capsule {
  position: absolute;
  bottom: 2%;
  left: 49%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #765661;
  background: linear-gradient(#fff9ee 49%, #cd8298 50%);
  display: none;
}
.roll .machine {
  animation: sway 0.42s ease-in-out 1;
}
.drop .capsule,
.open .capsule {
  display: block;
}
.drop .capsule {
  animation: drop 0.55s ease-out both;
}
.open .capsule {
  background: #fff3d8;
  transform: translateX(22px);
}
.open .capsule:before {
  content: '';
  position: absolute;
  inset: -13px -3px 55%;
  border-radius: 50px 50px 0 0;
  background: #efbacb;
  border: 3px solid #765661;
  transform: rotate(-17deg);
}
@keyframes sway {
  30% {
    transform: rotate(-4deg);
  }
  70% {
    transform: rotate(4deg);
  }
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translate(-8px, -34px) rotate(-80deg);
  }
  to {
    transform: translateX(22px) rotate(12deg);
  }
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 24px);
  }
  .hero-r,
  .stage-r {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-r .machine,
  .stage-r .machine {
    width: min(60vw, 220px);
  }
  .stage-r .actions-r {
    justify-content: center;
  }
  .panel-link {
    flex-direction: column;
    text-align: center;
    font-size: 1rem;
  }
  .panels {
    gap: 8px;
  }
  .prizes {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene * {
    animation: none !important;
  }
}
[data-motion='off'] .scene * {
  animation: none !important;
}
