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

.cc {
  width: min(100%, 420px);
  display: grid;
  gap: 8px;
  color: #ffffff;
}

.cc__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.82);
}

.cc__ta {
  box-sizing: border-box;
  width: 100%;
  height: 64px;
  resize: none;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
}

.cc__ta::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.cc__ta:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

.cc__bar {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.cc__cell {
  position: absolute;
  top: 0;
  bottom: 0;
  transform-origin: 50% 100%;
  border-radius: 4px;
}

.cc__cell.is-half {
  background: #6ec8ff;
}

.cc__cell.is-full {
  background: #b9a0ff;
}

.cc__cell.is-over {
  background: #ff9ebb;
}

.cc__cell.is-space {
  opacity: 0.45;
}

.cc__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cc__big {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.cc__num {
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
  color: #6ec8ff;
  font-variant-numeric: tabular-nums;
}

.cc__unit {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.cc__legend {
  display: flex;
  gap: 8px;
}

.cc__chip {
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: #17141a;
}

.cc__chip--half {
  background: #6ec8ff;
}

.cc__chip--full {
  background: #b9a0ff;
}

.cc__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 340px) {
  .cc__legend {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cc__cell {
    transform: none;
  }
}
