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

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

.sd {
  --row-h: 48px;
  box-sizing: border-box;
  width: min(340px, 88vw);
  padding: 12px;
  border-radius: 16px;
  background-color: #fff7e6;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.sd__title {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.sd__list {
  height: calc(var(--row-h) * 3);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.sd__row {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--row-h);
  max-height: var(--row-h);
  overflow: hidden;
  background-color: transparent;
  transform: translateX(0);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), max-height 300ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd__row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: rgba(23, 20, 26, 0.12);
}

.sd__row:last-child::after {
  display: none;
}

.sd:not(.is-demo) .sd__row[data-gone="1"] {
  transform: translateX(112%);
  max-height: 0;
  background-color: #ffe0d8;
}

.sd__ic {
  display: inline-flex;
  flex: 0 0 auto;
  color: #2f6df6;
}

.sd__ic svg {
  display: block;
}

.sd__txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.sd__name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.sd__badge {
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 999px;
  background-color: #0a4fe8;
  color: #fff7e6;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
}

.sd__meta {
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: rgba(23, 20, 26, 0.72);
  white-space: nowrap;
}

.sd__out {
  flex: 0 0 auto;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid rgba(23, 20, 26, 0.2);
  border-radius: 999px;
  background-color: transparent;
  color: #17141a;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  cursor: pointer;
}

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

.sd__out:disabled {
  opacity: 0.4;
  cursor: default;
}

.sd__live {
  margin: 8px 0 0;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  color: rgba(23, 20, 26, 0.64);
  white-space: nowrap;
  opacity: 0;
}

.sd:not(.is-demo)[data-said] .sd__live {
  opacity: 1;
}

.sd.is-demo .sd__row[data-row="3"] {
  animation-name: sd-out;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes sd-out {
  0% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: transparent;
  }
  28% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: transparent;
  }
  31% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: #ffe0d8;
  }
  48% {
    transform: translateX(112%);
    max-height: var(--row-h);
    background-color: #ffe0d8;
  }
  58% {
    transform: translateX(112%);
    max-height: 0;
    background-color: #ffe0d8;
  }
  68% {
    transform: translateX(112%);
    max-height: var(--row-h);
    background-color: #ffe0d8;
  }
  84% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: #ffe0d8;
  }
  87% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: transparent;
  }
  100% {
    transform: translateX(0);
    max-height: var(--row-h);
    background-color: transparent;
  }
}
.sd.is-demo .sd__live {
  animation-name: sd-say;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sd-say {
  0% {
    opacity: 0;
  }
  46% {
    opacity: 0;
  }
  48% {
    opacity: 1;
  }
  84% {
    opacity: 1;
  }
  86% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .sd {
    --row-h: 36px;
    padding: 8px;
  }
  .sd__title {
    margin: 0 0 4px;
    font-size: 11px;
    line-height: 14px;
  }
  .sd__name {
    font-size: 12px;
    line-height: 15px;
  }
  .sd__meta {
    font-size: 10px;
    line-height: 13px;
  }
  .sd__badge {
    font-size: 9px;
    line-height: 13px;
  }
  .sd__out {
    padding: 0 4px;
    font-size: 10px;
    line-height: 20px;
  }
  .sd__live {
    margin: 4px 0 0;
    height: 14px;
    font-size: 10px;
    line-height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sd.is-demo .sd__row[data-row="3"],
  .sd.is-demo .sd__live {
    animation: none !important;
  }
  .sd__row {
    transition: none !important;
  }
  .sd.is-demo .sd__live {
    opacity: 1 !important;
  }
}
