.game-swipe-clean-card {
  --clean-stage-art: none;
  --clean-progress: 0;
  --clean-label-opacity: 1;
  --clean-sheen-opacity: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.portal-page.is-game-focus .mini-game-card:has(.game-swipe-clean-card) {
  --game-card-play-min-height: 452px;
  --game-card-play-max-height: 780px;
  --game-stage-play-min-height: 300px;
}

.game-swipe-clean-card .game-stage {
  min-height: 280px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.36), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(221, 246, 240, 0.06) 46%, rgba(17, 82, 68, 0.18)),
    var(--clean-stage-art) center / cover no-repeat,
    linear-gradient(180deg, #fff7ef, #dff6ef);
  box-shadow:
    inset 0 10px 18px rgba(255, 255, 255, 0.24),
    inset 0 -18px 28px rgba(17, 82, 68, 0.16);
}

.game-swipe-clean-card .game-stage::before {
  z-index: 0;
  inset: auto 12% 20px;
  height: 28px;
  border-radius: 999px;
  background: rgba(17, 82, 68, 0.22);
  filter: blur(18px);
}

.game-swipe-clean-card .game-stage::after {
  z-index: 1;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.42), transparent 17%),
    radial-gradient(circle at 82% 14%, rgba(255, 214, 94, 0.2), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%, rgba(17, 82, 68, 0.1));
}

.portal-page.is-game-focus .game-swipe-clean-card .game-stage {
  height: clamp(292px, calc(100svh - 330px), 380px);
  min-height: 292px;
}

@supports (height: 100dvh) {
  .portal-page.is-game-focus .game-swipe-clean-card .game-stage {
    height: clamp(292px, calc(100dvh - 330px), 380px);
  }
}

.portal-page.is-game-focus .game-swipe-clean-card.is-countdown .game-stage,
.portal-page.is-game-focus .game-swipe-clean-card.is-playing .game-stage,
.portal-page.is-game-focus .game-swipe-clean-card.is-completing .game-stage {
  height: clamp(318px, calc(100svh - 236px), 560px);
  min-height: var(--game-stage-play-min-height);
}

@supports (height: 100dvh) {
  .portal-page.is-game-focus .game-swipe-clean-card.is-countdown .game-stage,
  .portal-page.is-game-focus .game-swipe-clean-card.is-playing .game-stage,
  .portal-page.is-game-focus .game-swipe-clean-card.is-completing .game-stage {
    height: clamp(318px, calc(100dvh - 236px), 560px);
  }
}

@supports selector(:has(*)) {
  .portal-page.is-game-focus .game-swipe-clean-card.is-countdown .game-stage,
  .portal-page.is-game-focus .game-swipe-clean-card.is-playing .game-stage,
  .portal-page.is-game-focus .game-swipe-clean-card.is-completing .game-stage {
    height: clamp(318px, calc(100dvh - 236px), 560px);
    min-height: var(--game-stage-play-min-height);
  }
}

.game-swipe-clean-card.is-playing .game-stage {
  touch-action: none;
}

.game-swipe-clean-card.is-finished .game-stage {
  height: auto;
  min-height: 0;
  touch-action: auto;
  background: #ffffff;
}

.game-swipe-clean-card.is-finished .game-overlay {
  position: static;
  display: block;
  padding: 12px 16px;
  background: #ffffff;
  backdrop-filter: none;
}

.game-swipe-clean-card.is-finished .game-overlay-panel {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.game-swipe-clean-card.is-finished .game-overlay-panel h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 14px;
  line-height: 1.2;
}

.clean-card {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(86%, 430px);
  min-height: 246px;
  padding: 24px 18px 20px;
  border: 2px solid rgba(255, 214, 94, 0.84);
  border-radius: 26px;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(180deg, #fa3d47 0%, #df1420 42%, #850914 100%);
  box-shadow:
    0 28px 40px rgba(74, 7, 14, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -12px 20px rgba(75, 3, 9, 0.28);
  transform: translate(-50%, -50%);
}

.clean-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  pointer-events: none;
}

.clean-card-copy {
  position: relative;
  z-index: 1;
  padding: 0 4px 16px;
}

.clean-card-copy span {
  display: block;
  color: #ffe58f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.clean-card-copy strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: clamp(26px, 7vw, 42px);
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 4px 0 rgba(79, 4, 10, 0.26);
}

.clean-surface {
  position: relative;
  z-index: 1;
  min-height: 142px;
  overflow: hidden;
  border: 1px solid rgba(255, 214, 94, 0.74);
  border-radius: 20px;
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #ff4d56, #a20916);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -18px 30px rgba(72, 4, 10, 0.22);
  touch-action: none;
}

.clean-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  opacity: var(--clean-sheen-opacity);
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(118deg, transparent 0 34%, rgba(255, 255, 255, 0.34) 45%, transparent 58%);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 140ms ease-out;
}

.clean-prize {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(74, 7, 14, 0.3);
}

.clean-prize strong {
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.clean-prize small {
  font-size: 13px;
  font-weight: 850;
}

.clean-foam-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.game-swipe-clean-card.is-playing .clean-foam-canvas {
  cursor: grabbing;
}

.clean-foam-bubble {
  position: absolute;
  z-index: 4;
  width: var(--bubble-size, 22px);
  height: var(--bubble-size, 22px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.92) 0 16%, transparent 18%),
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 42%, rgba(226, 255, 255, 0.34) 44% 64%, transparent 68%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.72),
    0 0 14px rgba(181, 247, 244, 0.44),
    0 0 22px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: clean-foam-bubble 780ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes clean-foam-bubble {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.42);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--bubble-drift-x, 0px)),
        calc(-50% + var(--bubble-drift-y, -22px))
      )
      scale(var(--bubble-pop-scale, 1.28));
  }
}

.clean-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  color: #36736e;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
  opacity: var(--clean-label-opacity);
  pointer-events: none;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.76),
    0 0 12px rgba(255, 255, 255, 0.46);
  transition: opacity 120ms ease-out;
}

.clean-progress {
  position: relative;
  z-index: 1;
  height: 12px;
  margin: 14px 8px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(53, 3, 9, 0.5);
}

.clean-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd65e, #24b56f);
}

.game-swipe-clean-card .game-overlay {
  z-index: 6;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.58), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(17, 82, 68, 0.16));
  backdrop-filter: none;
}

.game-swipe-clean-card .game-overlay-panel {
  width: min(284px, 100%);
  padding: 16px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 255, 249, 0.86)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 14px 28px rgba(17, 82, 68, 0.16),
    0 0 0 6px rgba(255, 255, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.clean-ready-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 11px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(180deg, #ff4450, #bc1620);
  font-size: 11px;
  font-weight: 900;
}

.clean-ready-art {
  position: relative;
  width: 112px;
  height: 70px;
  margin: 10px auto 4px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.92) 0 7px, rgba(219, 255, 252, 0.72) 8px 13px, transparent 14px),
    radial-gradient(circle at 58% 10%, rgba(255, 255, 255, 0.88) 0 9px, rgba(219, 255, 252, 0.7) 10px 16px, transparent 17px),
    radial-gradient(circle at 38% 18%, rgba(255, 255, 255, 0.9) 0 8px, rgba(219, 255, 252, 0.72) 9px 15px, transparent 16px);
  filter: drop-shadow(0 12px 18px rgba(17, 82, 68, 0.14));
}

.clean-ready-art::before {
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 18px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px 26px 24px 18px;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(135deg, #7ee5d6 0%, #39c2b6 48%, #159587 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.62),
    inset -10px -12px 0 rgba(13, 112, 103, 0.2),
    0 8px 0 rgba(17, 82, 68, 0.12);
  content: "";
  transform: rotate(-5deg);
}

.clean-ready-art::after {
  position: absolute;
  top: 2px;
  right: 4px;
  left: 4px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 68%, rgba(255, 255, 255, 0.95) 0 7px, rgba(220, 255, 252, 0.75) 8px 13px, transparent 14px),
    radial-gradient(circle at 30% 38%, rgba(255, 255, 255, 0.98) 0 10px, rgba(220, 255, 252, 0.8) 11px 18px, transparent 19px),
    radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.95) 0 8px, rgba(220, 255, 252, 0.75) 9px 15px, transparent 16px),
    radial-gradient(circle at 72% 35%, rgba(255, 255, 255, 0.98) 0 12px, rgba(220, 255, 252, 0.8) 13px 20px, transparent 21px),
    radial-gradient(circle at 88% 62%, rgba(255, 255, 255, 0.94) 0 7px, rgba(220, 255, 252, 0.72) 8px 13px, transparent 14px);
  content: "";
  filter: drop-shadow(0 4px 6px rgba(57, 194, 182, 0.16));
}

@media (max-width: 340px), (max-height: 620px) {
  .clean-card {
    width: min(90%, 380px);
    min-height: 224px;
    padding: 18px 14px 16px;
    border-radius: 22px;
  }

  .clean-card-copy {
    padding-bottom: 12px;
  }

  .clean-card-copy strong {
    font-size: 25px;
  }

  .clean-surface {
    min-height: 124px;
    border-radius: 16px;
  }

  .clean-prize strong {
    font-size: 25px;
  }

  .clean-progress {
    height: 10px;
    margin-top: 10px;
  }
}
