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

.ss {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ss__card {
  width: min(100%, 340px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  overflow: hidden;
}

.ss__bar {
  display: grid;
  gap: 8px;
  background: #17141a;
  padding: 8px 12px;
}

.ss__tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.ss__tool {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  cursor: pointer;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.56);
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  line-height: 1.3;
  padding: 4px 8px;
}

.ss__tool[aria-pressed=true] {
  color: #ffffff;
}

.ss__ico {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.ss__mark {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: #ffd23f;
  opacity: 0;
}

.ss__tool[aria-pressed=true] .ss__mark {
  opacity: 1;
}

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

.ss__count {
  position: relative;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
}

.ss__countDemo {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
}

.ss__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  color: #ffffff;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(9px, 2.4vw, 10px);
  line-height: 1.3;
  padding: 4px 8px;
}

.ss__btn:first-of-type {
  margin-left: auto;
}

.ss__btn--wipe {
  background: #2f6df6;
  border-color: #2f6df6;
}

.ss__tool:focus-visible, .ss__btn:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 2px;
}

.ss__board {
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  background-image: linear-gradient(to right, rgba(23, 20, 26, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(23, 20, 26, 0.07) 1px, transparent 1px);
  background-size: 8px 8px;
  aspect-ratio: 300/108;
  touch-action: none;
}

.ss__ink, .ss__ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ss__ghost {
  display: none;
  fill: none;
}

.ss__draft, .ss__firm {
  transform-box: view-box;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.ss__draft {
  stroke: #2f6df6;
  stroke-width: 3;
  stroke-dasharray: 6 5;
}

.ss__firm {
  stroke: #17141a;
  stroke-width: 3;
}

.ss__draft--line, .ss__firm--line {
  stroke-width: 9;
}

.ss__draft--rect, .ss__firm--rect {
  transform-origin: 24px 16px;
}

.ss__draft--circle, .ss__firm--circle {
  transform-origin: 212px 42px;
}

.ss__draft--line, .ss__firm--line {
  transform-origin: 26px 94px;
}

.ss.is-demo .ss__ink {
  visibility: hidden;
}

.ss.is-demo .ss__ghost {
  display: block;
}

.ss.is-demo .ss__draft,
.ss.is-demo .ss__firm {
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), ease-out;
  animation-iteration-count: infinite, infinite;
}

.ss.is-demo .ss__draft--rect {
  animation-name: ssRectDraft, ssRectGrow;
}

.ss.is-demo .ss__firm--rect {
  animation-name: ssRectFirm, ssRectShrink;
}

.ss.is-demo .ss__draft--circle {
  animation-name: ssCircleDraft, ssCircleGrow;
}

.ss.is-demo .ss__firm--circle {
  animation-name: ssCircleFirm, ssCircleShrink;
}

.ss.is-demo .ss__draft--line {
  animation-name: ssLineDraft, ssLineGrow;
}

.ss.is-demo .ss__firm--line {
  animation-name: ssLineFirm, ssLineShrink;
}

@keyframes ssRectDraft {
  0%, 1% {
    opacity: 0;
  }
  2%, 27% {
    opacity: 1;
  }
  28%, 100% {
    opacity: 0;
  }
}
@keyframes ssRectGrow {
  0%, 2% {
    transform: scale(0.02);
  }
  26%, 100% {
    transform: scale(1);
  }
}
@keyframes ssRectFirm {
  0%, 27% {
    opacity: 0;
  }
  28%, 93% {
    opacity: 1;
  }
  94%, 100% {
    opacity: 0;
  }
}
@keyframes ssRectShrink {
  0%, 86% {
    transform: scale(1);
  }
  94%, 100% {
    transform: scale(0.02);
  }
}
@keyframes ssCircleDraft {
  0%, 33% {
    opacity: 0;
  }
  34%, 55% {
    opacity: 1;
  }
  56%, 100% {
    opacity: 0;
  }
}
@keyframes ssCircleGrow {
  0%, 34% {
    transform: scale(0.02);
  }
  54%, 100% {
    transform: scale(1);
  }
}
@keyframes ssCircleFirm {
  0%, 55% {
    opacity: 0;
  }
  56%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes ssCircleShrink {
  0%, 82% {
    transform: scale(1);
  }
  88%, 100% {
    transform: scale(0.02);
  }
}
@keyframes ssLineDraft {
  0%, 59% {
    opacity: 0;
  }
  60%, 69% {
    opacity: 1;
  }
  70%, 100% {
    opacity: 0;
  }
}
@keyframes ssLineGrow {
  0%, 60% {
    transform: scale(0.02);
  }
  68%, 100% {
    transform: scale(1);
  }
}
@keyframes ssLineFirm {
  0%, 69% {
    opacity: 0;
  }
  70%, 81% {
    opacity: 1;
  }
  82%, 100% {
    opacity: 0;
  }
}
@keyframes ssLineShrink {
  0%, 72% {
    transform: scale(1);
  }
  82%, 100% {
    transform: scale(0.02);
  }
}
.ss.is-demo .ss__mark {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ss.is-demo .ss__tool--rect .ss__mark {
  animation-name: ssPickRect;
}

.ss.is-demo .ss__tool--circle .ss__mark {
  animation-name: ssPickCircle;
}

.ss.is-demo .ss__tool--line .ss__mark {
  animation-name: ssPickLine;
}

@keyframes ssPickRect {
  0%, 29% {
    opacity: 1;
  }
  30%, 71% {
    opacity: 0;
  }
  72%, 100% {
    opacity: 1;
  }
}
@keyframes ssPickCircle {
  0%, 29% {
    opacity: 0;
  }
  30%, 57% {
    opacity: 1;
  }
  58%, 100% {
    opacity: 0;
  }
}
@keyframes ssPickLine {
  0%, 57% {
    opacity: 0;
  }
  58%, 71% {
    opacity: 1;
  }
  72%, 100% {
    opacity: 0;
  }
}
.ss.is-demo .ss__tool {
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

.ss.is-demo .ss__tool--rect {
  animation-name: ssPressRect;
}

.ss.is-demo .ss__tool--circle {
  animation-name: ssPressCircle;
}

.ss.is-demo .ss__tool--line {
  animation-name: ssPressLine;
}

@keyframes ssPressRect {
  0%, 70% {
    transform: scale(1);
  }
  73% {
    transform: scale(0.9);
  }
  78%, 100% {
    transform: scale(1);
  }
}
@keyframes ssPressCircle {
  0%, 28% {
    transform: scale(1);
  }
  31% {
    transform: scale(0.9);
  }
  36%, 100% {
    transform: scale(1);
  }
}
@keyframes ssPressLine {
  0%, 56% {
    transform: scale(1);
  }
  59% {
    transform: scale(0.9);
  }
  64%, 100% {
    transform: scale(1);
  }
}
.ss.is-demo .ss__countReal {
  color: transparent;
}

.ss.is-demo .ss__countDemo {
  display: block;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.ss.is-demo .ss__countDemo--zero {
  animation-name: ssCountZero;
}

.ss.is-demo .ss__countDemo--one {
  animation-name: ssCountOne;
}

.ss.is-demo .ss__countDemo--two {
  animation-name: ssCountTwo;
}

.ss.is-demo .ss__countDemo--three {
  animation-name: ssCountThree;
}

@keyframes ssCountZero {
  0%, 27% {
    opacity: 1;
  }
  28%, 93% {
    opacity: 0;
  }
  94%, 100% {
    opacity: 1;
  }
}
@keyframes ssCountOne {
  0%, 27% {
    opacity: 0;
  }
  28%, 55% {
    opacity: 1;
  }
  56%, 81% {
    opacity: 0;
  }
  82%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes ssCountTwo {
  0%, 55% {
    opacity: 0;
  }
  56%, 69% {
    opacity: 1;
  }
  70%, 81% {
    opacity: 0;
  }
  82%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes ssCountThree {
  0%, 69% {
    opacity: 0;
  }
  70%, 81% {
    opacity: 1;
  }
  82%, 100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .ss__bar {
    gap: 4px;
    padding: 4px 8px;
  }
  .ss__acts {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ss.is-demo .ss__draft,
  .ss.is-demo .ss__firm,
  .ss.is-demo .ss__mark,
  .ss.is-demo .ss__countDemo,
  .ss.is-demo .ss__tool {
    animation: none !important;
  }
  .ss.is-demo .ss__draft {
    opacity: 0 !important;
    transform: scale(1) !important;
  }
  .ss.is-demo .ss__firm {
    opacity: 1 !important;
    transform: scale(1) !important;
  }
  .ss.is-demo .ss__countDemo--zero,
  .ss.is-demo .ss__countDemo--one,
  .ss.is-demo .ss__countDemo--two {
    opacity: 0 !important;
  }
  .ss.is-demo .ss__countDemo--three {
    opacity: 1 !important;
  }
  .ss.is-demo .ss__tool--rect .ss__mark,
  .ss.is-demo .ss__tool--circle .ss__mark {
    opacity: 0 !important;
  }
  .ss.is-demo .ss__tool--line .ss__mark {
    opacity: 1 !important;
  }
}
