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

.wrap {
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.addInput {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-radius: 12px;
  background: #fff7e6;
  color: #17141a;
  padding: 4px 8px;
  font-size: 11px;
}
.addInput::placeholder {
  color: rgba(23, 20, 26, 0.45);
}
.addInput:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.simToggle {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #17141a;
  color: #fff7e6;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.simToggle:active {
  transform: scale(0.96);
}
.simToggle[aria-pressed=true] {
  background: #c93000;
}
.simToggle:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.chipRow {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chipRow > .chip:not(:last-child) {
  margin-right: 8px;
}

@supports (gap: 1rem) {
  .wrap:not(.force-fallback) .chipRow {
    gap: 8px;
  }
  .wrap:not(.force-fallback) .chipRow > .chip:not(:last-child) {
    margin-right: 0;
  }
}
.chip {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #2f6df6;
  color: #fff7e6;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transform: scale(1);
  transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.chip:hover {
  transform: scale(1.08);
}

.chip.is-entering {
  transform: scale(0);
  transition-duration: 300ms;
}

.chip.is-leaving {
  transform: scale(0);
  transition-delay: 0ms;
}

.modeLabel {
  color: #17141a;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 340px) {
  .wrap {
    width: 220px;
  }
  .chipRow {
    min-height: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .chip {
    transition: none;
  }
  .simToggle {
    transition: none;
  }
}
