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

.ts {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: clamp(240px, 80vw, 336px);
  display: grid;
  gap: 12px;
  padding: 8px;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.ts__page {
  height: clamp(96px, 34vh, 132px);
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 20, 26, 0.06);
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

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

.ts__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.16);
}

.ts__slug {
  width: 40%;
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.12);
}

.ts__lines {
  display: grid;
  gap: 8px;
}

.ts__lines i {
  height: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.08);
}

.ts__lines i:nth-child(2) {
  width: 84%;
}

.ts__lines i:nth-child(3) {
  width: 62%;
}

.ts__save {
  justify-self: center;
  border: 0;
  border-radius: 12px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
  font-size: clamp(11px, 2.8vw, 12px);
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 220ms ease-out, opacity 220ms ease-out;
}

.ts__save:hover {
  opacity: 0.86;
}

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

.ts__save:active {
  transform: scale(0.96);
}

.ts__toast {
  position: absolute;
  top: 16px;
  right: 16px;
  width: clamp(152px, 52vw, 200px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(23, 20, 26, 0.1);
  box-shadow: 0 2px 8px rgba(23, 20, 26, 0.1);
  transform: translateX(120%);
}

.ts__ic {
  display: inline-flex;
  color: #2f6df6;
}

.ts__txt {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ts__title {
  font-size: clamp(11px, 2.8vw, 12px);
  font-weight: 700;
  line-height: 1.3;
}

.ts__sub {
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
  overflow-wrap: anywhere;
}

.ts__timer {
  grid-column: 1/-1;
  height: 2px;
  border-radius: 999px;
  background: #2f6df6;
  transform: scaleX(1);
  transform-origin: right;
}

.ts.is-demo .ts__toast,
.ts__toast.is-shot {
  animation: ts-slide 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ts.is-demo .ts__timer,
.ts__toast.is-shot .ts__timer {
  animation: ts-timer 2s linear infinite;
}

.ts__toast.is-shot,
.ts__toast.is-shot .ts__timer {
  animation-iteration-count: 1;
}

@keyframes ts-slide {
  0% {
    transform: translateX(120%);
  }
  14% {
    transform: translateX(0);
  }
  86% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120%);
  }
}
@keyframes ts-timer {
  0% {
    transform: scaleX(1);
  }
  14% {
    transform: scaleX(1);
  }
  86% {
    transform: scaleX(0);
  }
  99% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}
@media (max-width: 340px) {
  .ts {
    gap: 8px;
    width: 92vw;
  }
  .ts__page {
    gap: 8px;
    padding: 8px;
  }
  .ts__toast {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
  }
  .ts__save {
    padding: 8px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ts.is-demo .ts__toast, .ts__toast.is-shot,
  .ts.is-demo .ts__timer, .ts__toast.is-shot .ts__timer {
    animation: none !important;
  }
  .ts__toast {
    transform: translateX(0);
  }
  .ts__timer {
    transform: scaleX(1);
  }
  .ts__save {
    transition: none;
  }
}
