.meta-gacha {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  gap: 5px;
  padding: 0 12px 10px;
  overflow: hidden;
  background: #75d2f0;
}

.meta-gacha .meta-title,
.meta-gacha .scroll-balance {
  display: none;
}

.gacha-scene {
  position: relative;
  align-self: center;
  width: 100%;
  height: min(62vh, 500px);
  min-height: 250px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background: radial-gradient(circle at 50% 32%, #b9f1ff, #67c8e9 72%);
}

.gacha-scene::before {
  display: none;
  content: 'GATE PRIZE LAB';
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 8px;
  padding: 5px 12px;
  border: 2px solid #083666;
  border-radius: 9px;
  color: #fff;
  background: #0b65a6cc;
  box-shadow: inset 0 2px #54bde9, 0 3px #07315c;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .13em;
  white-space: nowrap;
}

.gacha-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.gacha-scene.is-fallback {
  display: grid;
  place-items: center;
}

.gacha-fallback-machine {
  position: relative;
  width: 128px;
  height: 205px;
  border: 7px solid #ffcb32;
  border-radius: 16px;
  background: linear-gradient(#9eebf5 0 48%, #d83b35 49%);
  box-shadow: 0 10px #67202a;
}

.gacha-fallback-machine i {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 23px;
  height: 37px;
  border: 6px solid #ffcb32;
  background: #f17825;
}

.gacha-fallback-machine b {
  position: absolute;
  right: -35px;
  top: 120px;
  width: 31px;
  height: 10px;
  background: #33c995;
  box-shadow: 0 -18px #33c995, 0 18px #33c995;
}

.gacha-fallback-machine em {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  color: #11436a;
  font-size: 28px;
  font-style: normal;
  font-weight: 1000;
  text-align: center;
}

.meta-gacha .gacha-status {
  align-self: end;
  min-height: 22px;
  margin: 0;
  color: #07315f;
  font-size: 14px;
  font-weight: 1000;
  text-align: center;
}

.meta-gacha .gacha-button {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0 16px 0 20px;
  color: #3b2100;
  font-size: 20px;
  text-shadow: 0 1px #fff1a0;
}

.gacha-button .gacha-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 76px;
  padding: 5px 7px;
  border: 2px solid #704000;
  border-radius: 9px;
  background: #fff2b8;
  color: #462800;
  font-size: 14px;
  text-shadow: none;
}

.gacha-button .gacha-cost svg {
  width: 22px;
  height: 22px;
  fill: #f7e9c3;
  stroke: #174f87;
  stroke-width: 1.8;
}

.meta-gacha .gacha-button:disabled {
  opacity: 1;
  filter: saturate(.55);
  background: linear-gradient(#e6d9a9 0 12%, #b9ab7c 13% 70%, #938258 71%);
}

.meta-gacha .gacha-button:disabled .gacha-cost {
  background: #eee9d9;
  color: #3d3b35;
}

@media (max-height: 650px) {
  .gacha-scene {
    height: 312px;
    min-height: 0;
  }

  .meta-gacha .gacha-button {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gacha-scene canvas {
    animation: none;
  }
}
