.asg-game {
  --asg-bg: #ffffff;
  --asg-surface: #ffffff;
  --asg-text: #202020;
  --asg-muted: #646464;
  --asg-border: #deded8;
  --asg-accent: #ffb90f;
  --asg-accent-strong: #d98235;
  --asg-green: #dfead2;
  color: var(--asg-text);
  font-family: inherit;
  margin: 24px 0;
  position: relative;
  scroll-margin-top: 24px;
}

.asg-game > :not(.asg-game-lock):not(.asg-result) {
  transition: filter 350ms ease, opacity 350ms ease;
}

.asg-game--locked > :not(.asg-game-lock):not(.asg-result) {
  filter: grayscale(0.3);
  opacity: 0.22;
  pointer-events: none;
  user-select: none;
}

.asg-game-lock {
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 24px;
  position: absolute;
  text-align: center;
  transform: scale(1.025);
  transition: opacity 420ms ease, transform 420ms ease;
  z-index: 50;
}

.asg-game-lock.is-visible {
  opacity: 1;
  transform: scale(1);
}

.asg-game-lock.is-unlocking {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
}

.asg-game-lock .asg-image {
  filter: drop-shadow(0 8px 12px rgba(32, 32, 32, 0.12));
  max-width: min(150px, 35vw);
  width: 100%;
}

.asg-game-lock__message {
  color: var(--asg-text);
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0 0;
  max-width: 360px;
}

.asg-game h2 {
  font-size: 24px;
}

.asg-game *,
.asg-game *::before,
.asg-game *::after {
  box-sizing: border-box;
}

.asg-layout {
  border-radius: 20px;
  display: block;
  padding: 0;
}

.asg-stage {
  background: var(--asg-surface);
  border-radius: 0;
  box-shadow: none;
  min-height: 420px;
  padding: 40px;
  position: relative;
}

.asg-image {
  display: block;
  height: auto;
  max-width: 100%;
}

.asg-piece__crop {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: block;
  height: 100%;
  width: 100%;
}

.asg-empty {
  color: var(--asg-muted);
  margin: 0;
}

.asg-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 10px;
}

.asg-button {
  align-items: center;
  background: #ffb90f;
  border: 2px dashed #ffffff;
  border-radius: 500px;
  color: #ffffff;
  column-gap: 10px;
  cursor: pointer;
  display: inline-flex;
  font-family: "Baloo Chettan 2", inherit;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
  justify-content: center;
  min-height: 46px;
  min-width: 132px;
  outline: 4px solid #ffb90f;
  padding: 3px 32px;
  row-gap: 10px;
  text-align: center;
}

.asg-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.asg-button--secondary {
  background: #b8b8b8;
  border: 2px dashed #ffffff;
  color: #ffffff;
  outline: 4px solid #b8b8b8;
}

.asg-button--replay {
  background: #ffb90f;
  border-color: #ffffff;
  color: #ffffff;
  outline-color: #ffb90f;
}

.asg-piece.is-dragging {
  cursor: grabbing;
  position: relative;
  user-select: none;
  z-index: 1000;
}

.asg-result {
  align-items: center;
  background: rgba(32, 32, 32, 0.28);
  border-radius: 0;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 99998;
}

.asg-result__panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--asg-border);
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: min(880px, calc(100vw - 36px));
  padding: 28px;
  position: relative;
  text-align: center;
  width: 100%;
}

.asg-result__panel img {
  max-height: 180px;
  object-fit: contain;
}

.asg-result__message {
  max-width: 600px;
  text-wrap: balance;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin: 16px 0 0;
}

.asg-result__x {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--asg-border);
  border-radius: 999px;
  color: var(--asg-muted);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
}

.asg-result__close {
  margin-top: 18px;
}

.asg-result__next {
  background: #69bd45;
  border-color: #ffffff;
  outline-color: #69bd45;
  text-decoration: none;
}

.asg-result--retry .asg-result__panel {
  background: #ffffff;
  border-color: var(--asg-border);
}

@media (max-width: 900px) {
  .asg-layout {
    padding: 0;
  }

  .asg-stage {
    padding: 20px;
  }

  .asg-actions {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .asg-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .asg-actions .asg-button {
    font-size: var(--font-18);
    min-width: 0;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
  }

  .asg-result__message {
    font-size: 22px;
  }
}
