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

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

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 280px;
  display: grid;
  gap: 8px;
}

.row {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff7e6;
}

.display {
  display: inline-block;
  color: #17141a;
  font-size: 13px;
  padding: 4px 4px;
  cursor: pointer;
  border-radius: 4px;
}
.display:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.editWrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.editInput {
  appearance: none;
  border: 1px solid rgba(23, 20, 26, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  color: #17141a;
  background: #fff;
  transition: width 220ms ease-out, border-color 220ms ease-out;
}
.editInput.warn {
  border-color: #c2361a;
}
.editInput:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.countBadge {
  font-size: 11px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.5);
  min-width: 16px;
  text-align: right;
}
.countBadge.warn {
  color: #c2361a;
}
.countBadge.shake {
  animation: shakeBadge 220ms ease-out;
}

.mirror {
  position: absolute;
  left: -9999px;
  top: -9999px;
  white-space: pre;
  font-size: 13px;
}

@keyframes shakeBadge {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}
@media (max-width: 340px) {
  .list {
    width: 220px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .editInput {
    transition: none !important;
  }
  .countBadge.shake {
    animation: none !important;
  }
}
