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

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

.pip {
  position: relative;
  box-sizing: border-box;
  width: min(392px, 92vw);
}

.pip__stack {
  position: relative;
  height: clamp(96px, 26vw, 132px);
}

.pip__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  margin: 0;
  border: 2px dashed rgba(255, 247, 230, 0.55);
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.16);
  color: #fff7e6;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  opacity: 0;
}

.pip__doc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.pip__line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.55);
}

.pip__line--b {
  width: 86%;
}

.pip__line--c {
  width: 62%;
  background: rgba(255, 247, 230, 0.38);
}

.pl {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  margin: 0;
  border-radius: 16px;
  background: #fff7e6;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  overflow: hidden;
  transform-origin: right bottom;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pl__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(47, 109, 246, 0.34), rgba(255, 247, 230, 0.96));
}

.pl__stripes {
  position: absolute;
  inset: 0 -72px;
  background: repeating-linear-gradient(90deg, rgba(23, 20, 26, 0.14) 0 12px, transparent 12px 32px);
  animation-name: pl-pan;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes pl-pan {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-64px);
  }
}
.pl__world {
  position: absolute;
  inset: 0;
}

.pl__sun {
  position: absolute;
  right: 20%;
  top: 14%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 210, 63, 0.95);
  box-shadow: 0 0 0 8px rgba(255, 210, 63, 0.25);
}

.pl__hill {
  position: absolute;
  bottom: -46%;
  height: 82%;
  border-radius: 50%;
}

.pl__hill--a {
  left: -14%;
  width: 72%;
  background: rgba(23, 20, 26, 0.15);
}

.pl__hill--b {
  right: -18%;
  width: 62%;
  background: rgba(23, 20, 26, 0.09);
}

.pl__clock, .pl__badge {
  position: absolute;
  top: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.62);
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
}

.pl__clock {
  left: 8px;
  color: #fff;
}

.pl__badge {
  right: 8px;
  color: rgba(255, 255, 255, 0.85);
}

.pl__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 12px;
}

.pl__time {
  color: #17141a;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 247, 230, 0.6);
}

.pl__time b {
  font-weight: 700;
}

.pl__mini {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #2f6df6;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(47, 109, 246, 0.45);
}

.pl__mini:hover {
  background: rgba(47, 109, 246, 0.88);
}

.pl__mini:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.pl__close {
  position: absolute;
  top: 4px;
  right: 4px;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(23, 20, 26, 0.82);
  color: #fff;
  cursor: pointer;
  transform: scale(1.9);
  transform-origin: right top;
  opacity: 0;
  pointer-events: none;
}

.pl__close:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.pl__fillwrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.28);
}

.pl__fill {
  display: block;
  height: 100%;
  background: #2f6df6;
  transform-origin: left center;
  transform: scaleX(0.07);
}

.pip.is-mini .pl {
  transform: translate(-4px, 40px) scale(0.44);
}

.pip.is-mini .pip__ph {
  opacity: 1;
}

.pip.is-mini .pl__close {
  opacity: 1;
  pointer-events: auto;
}

.pip.is-mini .pl__mini {
  opacity: 0;
  pointer-events: none;
}

.pip.is-demo .pl {
  animation-name: pip-shrink;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.pip.is-demo .pip__ph {
  animation-name: pip-ph;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.pip.is-demo .pl__close {
  animation-name: pip-close;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.pip.is-demo .pl__mini {
  animation-name: pip-minibtn;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes pip-shrink {
  0%, 26% {
    transform: none;
  }
  38%, 70% {
    transform: translate(-4px, 40px) scale(0.44);
  }
  86%, 100% {
    transform: none;
  }
}
@keyframes pip-ph {
  0%, 25.99% {
    opacity: 0;
  }
  26%, 85.99% {
    opacity: 1;
  }
  86%, 100% {
    opacity: 0;
  }
}
@keyframes pip-close {
  0%, 37.99% {
    opacity: 0;
  }
  38%, 71.99% {
    opacity: 1;
  }
  72%, 100% {
    opacity: 0;
  }
}
@keyframes pip-minibtn {
  0%, 25.99% {
    opacity: 1;
  }
  26%, 71.99% {
    opacity: 0;
  }
  72%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .pip__doc {
    gap: 4px;
    padding-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pip.is-demo .pl, .pip.is-demo .pip__ph, .pip.is-demo .pl__close,
  .pip.is-demo .pl__mini, .pl__stripes {
    animation: none !important;
  }
  .pl {
    transition: none;
  }
}
