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

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

.ps {
  box-sizing: border-box;
  width: min(376px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.ps__screen {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 136px;
  overflow: hidden;
  border: 2px solid rgba(23, 20, 26, 0.16);
  border-radius: 16px;
  background: #fff7e6;
}

.ps__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(23, 20, 26, 0.06);
}

.ps__bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.22);
}

.ps__toasts {
  position: absolute;
  inset: calc(100% - 8px) auto auto calc(100% - 8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 148px;
  transform: translate(-100%, -100%);
  transition: inset 300ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ps__screen[data-pos=tl] .ps__toasts {
  inset: 30px auto auto 8px;
  transform: translate(0, 0);
}

.ps__screen[data-pos=tc] .ps__toasts {
  inset: 30px auto auto 50%;
  transform: translate(-50%, 0);
}

.ps__screen[data-pos=tr] .ps__toasts {
  inset: 30px auto auto calc(100% - 8px);
  transform: translate(-100%, 0);
}

.ps__screen[data-pos=bl] .ps__toasts {
  inset: calc(100% - 8px) auto auto 8px;
  transform: translate(0, -100%);
}

.ps__screen[data-pos=bc] .ps__toasts {
  inset: calc(100% - 8px) auto auto 50%;
  transform: translate(-50%, -100%);
}

.ps__screen[data-pos=br] .ps__toasts {
  inset: calc(100% - 8px) auto auto calc(100% - 8px);
  transform: translate(-100%, -100%);
}

.ps__toast {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #17141a;
  color: #fff7e6;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.ps__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f6df6;
}

.ps__msg {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps__pads {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 8px;
}

.ps__pad {
  box-sizing: border-box;
  display: flex;
  margin: 0;
  padding: 4px;
  height: 24px;
  border: 2px solid rgba(23, 20, 26, 0.2);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.ps__pad span {
  display: block;
  width: 14px;
  height: 6px;
  border-radius: 4px;
  background: #2f6df6;
}

.ps__pad[data-pos=tl] span,
.ps__pad[data-pos=bl] span {
  margin-right: auto;
}

.ps__pad[data-pos=tc] span,
.ps__pad[data-pos=bc] span {
  margin: 0 auto;
}

.ps__pad[data-pos=tr] span,
.ps__pad[data-pos=br] span {
  margin-left: auto;
}

.ps__pad[data-pos=tl],
.ps__pad[data-pos=tc],
.ps__pad[data-pos=tr] {
  align-items: flex-start;
}

.ps__pad[data-pos=bl],
.ps__pad[data-pos=bc],
.ps__pad[data-pos=br] {
  align-items: flex-end;
}

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

.ps__pad:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.ps.is-demo .ps__toasts {
  transition: none;
  animation-name: ps-move;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes ps-move {
  0%, 10% {
    inset: 30px auto auto 8px;
    transform: translate(0, 0);
  }
  16.67%, 27% {
    inset: 30px auto auto 50%;
    transform: translate(-50%, 0);
  }
  33.34%, 44% {
    inset: 30px auto auto calc(100% - 8px);
    transform: translate(-100%, 0);
  }
  50%, 61% {
    inset: calc(100% - 8px) auto auto calc(100% - 8px);
    transform: translate(-100%, -100%);
  }
  66.67%, 78% {
    inset: calc(100% - 8px) auto auto 50%;
    transform: translate(-50%, -100%);
  }
  83.34%, 90% {
    inset: calc(100% - 8px) auto auto 8px;
    transform: translate(0, -100%);
  }
  100% {
    inset: 30px auto auto 8px;
    transform: translate(0, 0);
  }
}
.ps.is-demo .ps__pad {
  animation-name: ps-pad;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ps.is-demo .ps__pad[data-pos=tl] {
  animation-delay: 0s;
}

.ps.is-demo .ps__pad[data-pos=tc] {
  animation-delay: -1.66667s;
}

.ps.is-demo .ps__pad[data-pos=tr] {
  animation-delay: -1.33333s;
}

.ps.is-demo .ps__pad[data-pos=br] {
  animation-delay: -1s;
}

.ps.is-demo .ps__pad[data-pos=bc] {
  animation-delay: -0.66667s;
}

.ps.is-demo .ps__pad[data-pos=bl] {
  animation-delay: -0.33333s;
}

@keyframes ps-pad {
  0% {
    border-color: #17141a;
    background-color: #17141a;
  }
  16.67% {
    border-color: rgba(23, 20, 26, 0.2);
    background-color: rgba(23, 20, 26, 0);
  }
  100% {
    border-color: rgba(23, 20, 26, 0.2);
    background-color: rgba(23, 20, 26, 0);
  }
}
@media (max-width: 340px) {
  .ps {
    gap: 8px;
  }
  .ps__screen {
    height: 108px;
  }
  .ps__toasts {
    width: 118px;
  }
  .ps__msg {
    font-size: 10px;
    line-height: 14px;
  }
  .ps__pads {
    grid-template-columns: repeat(3, 34px);
    gap: 4px;
  }
  .ps__pad {
    height: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ps.is-demo .ps__toasts,
  .ps.is-demo .ps__pad {
    animation: none !important;
  }
  .ps__toasts {
    transition: none;
  }
}
