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);
}

.ap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: min(100%, 400px);
}

.ap__view {
  position: relative;
  height: clamp(92px, 32vw, 148px);
  border-radius: 16px;
  overflow: hidden;
  background: #17141a;
}

.ap__view:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

.ap__track {
  --i: 0;
  display: flex;
  height: 100%;
  transform: translateX(calc(var(--i) * -100%));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.ap__shot {
  position: relative;
  flex: 0 0 100%;
}

.ap__photo {
  position: absolute;
  inset: 0;
  display: block;
}

.ap__photo--bread {
  background: linear-gradient(to bottom, rgba(23, 20, 26, 0) 64%, rgba(23, 20, 26, 0.5) 64.6%, rgba(23, 20, 26, 0.66)), repeating-linear-gradient(94deg, rgba(255, 210, 63, 0.3) 0 14px, rgba(255, 210, 63, 0) 14px 42px), radial-gradient(34% 30% at 68% 30%, rgba(255, 210, 63, 0.82), rgba(255, 210, 63, 0) 74%), linear-gradient(162deg, #c93000 4%, #ff4d1f 98%);
}

.ap__photo--window {
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.62) 0 18%, rgba(255, 255, 255, 0) 46%), radial-gradient(40% 36% at 30% 22%, rgba(255, 210, 63, 0.7), rgba(255, 210, 63, 0) 76%), linear-gradient(158deg, #fff7e6 6%, #b9a0ff 98%);
}

.ap__photo--drink {
  background: radial-gradient(24% 30% at 38% 54%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 74%), radial-gradient(24% 30% at 62% 44%, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0) 74%), linear-gradient(170deg, #6ec8ff 4%, #2b9d74 98%);
}

.ap__photo--plant {
  background: linear-gradient(to top, rgba(23, 20, 26, 0.4), rgba(23, 20, 26, 0) 48%), radial-gradient(30% 44% at 24% 66%, rgba(76, 212, 166, 0.78), rgba(76, 212, 166, 0) 76%), linear-gradient(166deg, #2b9d74 8%, #4cd4a6 96%);
}

.ap__cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1.5;
  white-space: nowrap;
}

.ap__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap__toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(23, 20, 26, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #17141a;
  font-size: 13px;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap__toggle:hover {
  transform: scale(1.08);
}

.ap__toggle:active {
  transform: scale(0.94);
}

.ap__toggle:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

.ap__ico {
  display: grid;
  place-items: center;
}

.ap__ico--play {
  display: none;
}

.ap.is-paused .ap__ico--pause {
  display: none;
}

.ap.is-paused .ap__ico--play {
  display: grid;
}

.ap__meter {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(23, 20, 26, 0.22);
}

.ap__fill {
  --p: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #0a4fe8;
  transform: scaleX(var(--p));
  transform-origin: left;
}

.ap__count {
  flex: 0 0 auto;
  color: #17141a;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.ap__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ap__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.3);
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap__dot[aria-current=true] {
  background: #0a4fe8;
  transform: scale(1.5);
}

.ap__dot:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .ap__cap {
    left: 8px;
    bottom: 8px;
    padding: 0 8px;
  }
  .ap__toggle {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .ap__count {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ap__track, .ap__toggle, .ap__dot {
    transition: none;
  }
}
