html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.ba {
  width: min(400px, 96vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ba__toggle {
  display: flex;
  gap: 8px;
}

.ba__btn {
  border: 0;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.08);
  color: #17141a;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  font-family: inherit;
  transition: background 220ms ease-out, color 220ms ease-out;
}

.ba__btn[aria-pressed=true] {
  background: #17141a;
  color: #fff7e6;
}

.ba__frame {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
}

.ba__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ba__panel.is-active {
  opacity: 1;
}

.ba__panel--before {
  background: rgba(23, 20, 26, 0.82);
  opacity: 1;
}

.ba__panel--after {
  background: linear-gradient(160deg, #17141a, #24304f);
}

.ba__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.16);
  color: #fff7e6;
  font-weight: 700;
  font-size: 9px;
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.06em;
}

.ba__badge--after {
  background: rgba(47, 109, 246, 0.3);
}

.ba__shape {
  width: 64%;
  height: 64px;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.18);
}

.ba__shape--after {
  background: rgba(47, 109, 246, 0.5);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.ba__shimmer {
  position: absolute;
  inset: -20% -60%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, rgba(255, 247, 230, 0.42) 50%, transparent 58%);
  animation: ba-shimmer 2.4s linear infinite;
}

@keyframes ba-shimmer {
  0% {
    transform: translateX(-30%);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  60% {
    opacity: 0.9;
  }
  100% {
    transform: translateX(30%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ba__shimmer {
    animation: none !important;
    opacity: 0 !important;
  }
  .ba__panel, .ba__btn {
    transition: none !important;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .ba__frame {
    height: 108px;
  }
  .ba__shape {
    height: 44px;
  }
}
