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

.sa {
  box-sizing: border-box;
  width: min(300px, 92vw);
  padding: 12px;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.sa * {
  box-sizing: border-box;
}

.sa__who {
  margin-bottom: 8px;
}

.sa__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: rgba(23, 20, 26, 0.72);
}

.sa__line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.sa__ic {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: rgba(23, 20, 26, 0.72);
}

.sa__ic svg {
  width: 14px;
  height: 14px;
}

.sa__v {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa__same {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.sa__box {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.sa__tick {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(23, 20, 26, 0.3);
  border-radius: 4px;
  color: #fff7e6;
}

.sa__tick::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid #2f6df6;
  border-radius: 4px;
  background: #2f6df6;
  opacity: 0;
  transition: opacity 140ms linear;
}

.sa__tick svg {
  position: relative;
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 140ms linear, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sa:has(.sa__box:checked) .sa__tick::before {
  opacity: 1;
}

.sa:has(.sa__box:checked) .sa__tick svg {
  opacity: 1;
  transform: scale(1);
}

.sa:has(.sa__box:focus-visible) .sa__tick {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.sa__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.sa__sumfold {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sa:has(.sa__box:checked) .sa__sumfold {
  grid-template-rows: 1fr;
}

.sa__sum {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.sa__sumtext {
  display: block;
  border-left: 2px solid #2f6df6;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa__fold {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sa:has(.sa__box:checked) .sa__fold {
  grid-template-rows: 0fr;
}

.sa__inner {
  display: grid;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

.sa__field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sa__fk {
  flex: 0 0 auto;
  width: 48px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.72);
}

.sa__fv {
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(23, 20, 26, 0.2);
  border-radius: 4px;
  background: #ffffff;
  color: #17141a;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

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

@keyframes sa-fields {
  0%, 40% {
    grid-template-rows: 0fr;
  }
  44%, 80% {
    grid-template-rows: 1fr;
  }
  84%, 100% {
    grid-template-rows: 0fr;
  }
}
@keyframes sa-sumrow {
  0%, 40% {
    grid-template-rows: 1fr;
  }
  44%, 80% {
    grid-template-rows: 0fr;
  }
  84%, 100% {
    grid-template-rows: 1fr;
  }
}
@keyframes sa-tickbg {
  0%, 40% {
    opacity: 1;
  }
  44%, 80% {
    opacity: 0;
  }
  84%, 100% {
    opacity: 1;
  }
}
@keyframes sa-tickfade {
  0%, 40% {
    opacity: 1;
  }
  44%, 80% {
    opacity: 0;
  }
  84%, 100% {
    opacity: 1;
  }
}
@keyframes sa-tickpop {
  0%, 43% {
    transform: scale(1);
  }
  44%, 84% {
    transform: scale(0.3);
  }
  96%, 100% {
    transform: scale(1);
  }
}
@keyframes sa-rise {
  0%, 43% {
    transform: translateY(0);
  }
  44% {
    transform: translateY(16px);
  }
  76%, 100% {
    transform: translateY(0);
  }
}
@keyframes sa-sumrise {
  0%, 83% {
    transform: translateX(0);
  }
  84% {
    transform: translateX(14px);
  }
  100% {
    transform: translateX(0);
  }
}
.sa.is-demo .sa__fold,
.sa.is-demo .sa__sumfold,
.sa.is-demo .sa__tick::before {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.sa.is-demo .sa__fold {
  animation-name: sa-fields;
}
.sa.is-demo .sa__sumfold {
  animation-name: sa-sumrow;
}
.sa.is-demo .sa__tick::before {
  animation-name: sa-tickbg;
}
.sa.is-demo .sa__tick svg {
  animation-name: sa-tickfade, sa-tickpop;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), ease-out;
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}
.sa.is-demo .sa__field,
.sa.is-demo .sa__sumtext {
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.sa.is-demo .sa__field {
  animation-name: sa-rise;
}
.sa.is-demo .sa__field:nth-child(2) {
  animation-delay: 60ms;
}
.sa.is-demo .sa__field:nth-child(3) {
  animation-delay: 120ms;
}
.sa.is-demo .sa__sumtext {
  animation-name: sa-sumrise;
}

@media (max-width: 340px) {
  .sa {
    padding: 8px;
  }
  .sa__kicker {
    font-size: 10px;
  }
  .sa__v {
    font-size: 11px;
  }
  .sa__label {
    font-size: 11px;
  }
  .sa__sumtext {
    font-size: 10px;
  }
  .sa__fv {
    height: 18px;
  }
  .sa__fk {
    width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sa.is-demo .sa__fold,
  .sa.is-demo .sa__sumfold,
  .sa.is-demo .sa__tick::before,
  .sa.is-demo .sa__tick svg,
  .sa.is-demo .sa__field,
  .sa.is-demo .sa__sumtext {
    animation: none !important;
  }
  .sa.is-demo .sa__field,
  .sa.is-demo .sa__sumtext {
    transform: none !important;
  }
  .sa.is-demo .sa__tick svg {
    transform: scale(1) !important;
    opacity: 1 !important;
  }
  .sa__fold {
    transition: none !important;
  }
  .sa__sumfold {
    transition: none !important;
  }
  .sa__tick::before {
    transition: none !important;
  }
  .sa__tick svg {
    transition: none !important;
  }
}
