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

.tie {
  width: 100%;
  max-width: 240px;
  border-collapse: collapse;
  font: 400 12px/1.3 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #fff7e6;
}

.tie__row:not(:first-child) td {
  border-top: 1px solid rgba(255, 247, 230, 0.14);
}

.tie__label {
  padding: 8px 12px;
}

.tie__editcell {
  position: relative;
  padding: 8px 12px;
  text-align: right;
  cursor: pointer;
}

.tie__box {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(91, 140, 248, 0.18);
  border: 1px solid #5b8cf8;
  border-radius: 4px;
  pointer-events: none;
}

.tie__text {
  position: relative;
  font-variant-numeric: tabular-nums;
}

.tie__input {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  color: #fff7e6;
  font: 400 12px/1 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tie__input:focus {
  outline: none;
}

@media (max-width: 340px) {
  .tie {
    max-width: 200px;
    font-size: 11px;
  }
  .tie__label, .tie__editcell {
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tie__box {
    transition: none;
  }
}
