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

.lh {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(320px, 90vw);
  padding: 12px;
  border-radius: 16px;
  background-color: #fff7e6;
  color: #17141a;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.lh__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lh__list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background-color: #2f6df6;
}

.lh__item {
  position: relative;
  padding-left: 24px;
}

.lh__dot {
  position: absolute;
  left: 2px;
  top: 13px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #4cd4a6;
  box-shadow: 0 0 0 3px #fff7e6;
}

.lh__item[data-ok=no] .lh__dot {
  background-color: #c2361a;
}

.lh__row {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #17141a;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

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

.lh__row[aria-pressed=true] {
  box-shadow: inset 0 0 0 2px #2f6df6;
  opacity: 0.62;
}

.lh__ic {
  display: inline-flex;
  flex: 0 0 auto;
  color: #17141a;
}

.lh__ic svg {
  display: block;
}

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

.lh__when {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.lh__where {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;
}

.lh__tag {
  flex: 0 0 auto;
  padding: 0 4px;
  border-radius: 999px;
  background-color: #4cd4a6;
  color: #17141a;
  white-space: nowrap;
  font-size: 9px;
  line-height: 16px;
  font-weight: 700;
}

.lh__item[data-ok=no] .lh__tag {
  background-color: #c2361a;
  color: #fff7e6;
}

.lh__item[data-flag=yes] .lh__tag {
  background-color: #ffffff;
  color: #c2361a;
}

.lh__item[data-flag=yes] .lh__row::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  box-shadow: 0 0 0 2px #c2361a;
  opacity: 0;
  pointer-events: none;
}

.lh:not(.is-demo) .lh__item[data-flag=yes] .lh__row {
  background-color: #ffe0d8;
}

.lh:not(.is-demo) .lh__item[data-flag=yes] .lh__row::after {
  opacity: 1;
}

.lh__live {
  position: relative;
  margin: 0;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  color: #17141a;
}

.lh__word {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
}

.lh:not(.is-demo) .lh__word[data-word=a] {
  opacity: 1;
}

.lh.is-demo .lh__item {
  animation-name: lh-rise, lh-show;
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.lh.is-demo .lh__item[data-i="1"] {
  animation-delay: 40ms, 40ms;
}

.lh.is-demo .lh__item[data-i="2"] {
  animation-delay: 200ms, 200ms;
}

.lh.is-demo .lh__item[data-i="4"] {
  animation-delay: 360ms, 360ms;
}

.lh.is-demo .lh__item[data-i="3"] {
  animation-delay: 520ms, 520ms;
}

@keyframes lh-rise {
  0% {
    transform: translateY(16px);
  }
  22% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes lh-show {
  0% {
    opacity: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.lh.is-demo .lh__item:not([data-flag=yes]) .lh__row,
.lh.is-demo .lh__item:not([data-flag=yes]) .lh__dot {
  animation-name: lh-dim;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes lh-dim {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.34;
  }
  100% {
    opacity: 0.34;
  }
}
.lh.is-demo .lh__item[data-flag=yes] .lh__row {
  animation-name: lh-alarm;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes lh-alarm {
  0% {
    background-color: #ffffff;
  }
  50% {
    background-color: #ffe0d8;
  }
  100% {
    background-color: #ffe0d8;
  }
}
.lh.is-demo .lh__item[data-flag=yes] .lh__row::after {
  animation-name: lh-ring, lh-breathe;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), ease-out;
  animation-iteration-count: infinite, infinite;
}

@keyframes lh-ring {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes lh-breathe {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1);
  }
  72% {
    transform: scale(1.045);
  }
  90% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.lh.is-demo .lh__word {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.lh.is-demo .lh__word[data-word=a] {
  animation-name: lh-w-a;
}

.lh.is-demo .lh__word[data-word=b] {
  animation-name: lh-w-b;
}

@keyframes lh-w-a {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes lh-w-b {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .lh {
    gap: 4px;
    padding: 8px;
  }
  .lh__list {
    gap: 4px;
  }
  .lh__item {
    padding-left: 20px;
  }
  .lh__dot {
    top: 7px;
    width: 10px;
    height: 10px;
  }
  .lh__list::before {
    left: 6px;
    top: 4px;
    bottom: 4px;
  }
  .lh__row {
    padding: 0 4px;
  }
  .lh__when {
    font-size: 11px;
    line-height: 14px;
  }
  .lh__where {
    font-size: 9px;
    line-height: 12px;
  }
  .lh__live {
    height: 14px;
    font-size: 10px;
    line-height: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lh.is-demo .lh__item,
  .lh.is-demo .lh__item:not([data-flag=yes]) .lh__row,
  .lh.is-demo .lh__item:not([data-flag=yes]) .lh__dot,
  .lh.is-demo .lh__item[data-flag=yes] .lh__row,
  .lh.is-demo .lh__item[data-flag=yes] .lh__row::after,
  .lh.is-demo .lh__word {
    animation: none !important;
  }
  .lh.is-demo .lh__item {
    transform: none !important;
    opacity: 1 !important;
  }
  .lh.is-demo .lh__item[data-flag=yes] .lh__row {
    background-color: #ffe0d8 !important;
  }
  .lh.is-demo .lh__item[data-flag=yes] .lh__row::after {
    opacity: 1 !important;
  }
  .lh.is-demo .lh__word[data-word=b] {
    opacity: 1 !important;
  }
}
