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

.tb-wrap {
  position: relative;
  box-sizing: border-box;
  width: min(420px, 92vw);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  isolation: isolate;
}

.tb__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -30px;
  height: 30px;
  background: linear-gradient(180deg, rgba(47, 109, 246, 0), rgba(47, 109, 246, 0.16));
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.tb {
  box-sizing: border-box;
  width: 100%;
  border-collapse: collapse;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 12px;
  background: #fff;
}

.tb th, .tb td {
  box-sizing: border-box;
  text-align: left;
  padding: 8px 12px;
}

.tb thead th {
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
  border-bottom: 1px solid rgba(23, 20, 26, 0.08);
}

.tb__sort {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tb__arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(23, 20, 26, 0.35);
  transition: transform 220ms ease-out;
}

.tb__sort[aria-sort=ascending] .tb__arrow {
  transform: rotate(180deg);
}

.tb__sort[aria-sort=descending] .tb__arrow {
  transform: rotate(0deg);
}

.tb__body tr {
  border-bottom: 1px solid rgba(23, 20, 26, 0.06);
}

.tb__body tr:last-child {
  border-bottom: 0;
}

.tb__pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
}

.tb__pill--ok {
  background: #e3f3e6;
  color: #47905f;
}

.tb__pill--wait {
  background: #fff2d6;
  color: rgba(23, 20, 26, 0.72);
}

.tb__pill--err {
  background: #ffe0d8;
  color: rgba(23, 20, 26, 0.72);
}

.tb-wrap.is-demo .tb__scan {
  animation: tb-scan 2s linear infinite;
}

@keyframes tb-scan {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    transform: translateY(200px);
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .tb {
    font-size: 11px;
  }
  .tb th, .tb td {
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-wrap.is-demo .tb__scan {
    animation: none !important;
  }
  .tb__arrow {
    transition: none;
  }
}
