@charset "UTF-8";
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);
}

@property --base {
  syntax: "<integer>";
  inherits: true;
  initial-value: 262;
}
@property --o1 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --o2 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --o3 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
@property --o4 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 180;
}
@property --o5 {
  syntax: "<integer>";
  inherits: true;
  initial-value: 180;
}
.hm {
  box-sizing: border-box;
  width: 288px;
  max-width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
}

.hm * {
  box-sizing: border-box;
}

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

.hm__base {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: ew-resize;
  background: hsl(var(--base), 68%, 52%);
}

.hm__base:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 3px;
}

.hm__basev {
  counter-set: cbs calc(var(--base));
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.hm__basev::after {
  content: counter(cbs) "°";
}

.hm__names {
  margin-left: auto;
  display: grid;
  justify-items: end;
}

.hm__name {
  grid-area: 1/1;
  opacity: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.hm__name.is-on {
  opacity: 1;
}

.hm__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.hm__tab {
  width: 100%;
  padding: 4px 0;
  border: 2px solid rgba(23, 20, 26, 0.16);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.hm__tab[aria-pressed=true] {
  border-color: #17141a;
  background: #17141a;
  color: #fff7e6;
}

.hm__tab:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 3px;
}

.hm__chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.hm__chip {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.hm__sw {
  width: 100%;
  height: 28px;
  border-radius: 4px;
}

.hm__deg {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.7);
}

.hm__deg::after {
  content: counter(cd) "°";
}

.hm__chip:nth-child(1) .hm__sw {
  background: hsl(calc(var(--base) + var(--o1)), 68%, 70%);
}

.hm__chip:nth-child(2) .hm__sw {
  background: hsl(calc(var(--base) + var(--o2)), 68%, 58%);
}

.hm__chip:nth-child(3) .hm__sw {
  background: hsl(calc(var(--base) + var(--o3)), 68%, 48%);
}

.hm__chip:nth-child(4) .hm__sw {
  background: hsl(calc(var(--base) + var(--o4)), 68%, 58%);
}

.hm__chip:nth-child(5) .hm__sw {
  background: hsl(calc(var(--base) + var(--o5)), 68%, 70%);
}

.hm__chip:nth-child(1) .hm__deg {
  counter-set: cd calc(var(--o1));
}

.hm__chip:nth-child(2) .hm__deg {
  counter-set: cd calc(var(--o2));
}

.hm__chip:nth-child(3) .hm__deg {
  counter-set: cd calc(var(--o3));
}

.hm__chip:nth-child(4) .hm__deg {
  counter-set: cd calc(var(--o4));
}

.hm__chip:nth-child(5) .hm__deg {
  counter-set: cd calc(var(--o5));
}

.hm.is-demo {
  animation-name: hmSet;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.hm.is-demo .hm__name--1 {
  animation-name: hmName1;
}

.hm.is-demo .hm__name--2 {
  animation-name: hmName2;
}

.hm.is-demo .hm__name--3 {
  animation-name: hmName3;
}

.hm.is-demo .hm__name {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.hm.is-demo .hm__tab:nth-child(1) {
  animation-name: hmTab1;
}

.hm.is-demo .hm__tab:nth-child(2) {
  animation-name: hmTab2;
}

.hm.is-demo .hm__tab:nth-child(3) {
  animation-name: hmTab3;
}

.hm.is-demo .hm__tab {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.hm.is-demo .hm__chip {
  animation-name: hmPop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.hm.is-demo .hm__chip:nth-child(2) {
  animation-delay: 40ms;
}

.hm.is-demo .hm__chip:nth-child(3) {
  animation-delay: 80ms;
}

.hm.is-demo .hm__chip:nth-child(4) {
  animation-delay: 120ms;
}

.hm.is-demo .hm__chip:nth-child(5) {
  animation-delay: 160ms;
}

@keyframes hmSet {
  0% {
    --o1: 0;
    --o2: 0;
    --o3: 0;
    --o4: 180;
    --o5: 180;
  }
  33% {
    --o1: -60;
    --o2: -30;
    --o3: 0;
    --o4: 30;
    --o5: 60;
  }
  66% {
    --o1: -120;
    --o2: -120;
    --o3: 0;
    --o4: 120;
    --o5: 120;
  }
  90%, 100% {
    --o1: 0;
    --o2: 0;
    --o3: 0;
    --o4: 180;
    --o5: 180;
  }
}
@keyframes hmName1 {
  0% {
    opacity: 1;
  }
  33% {
    opacity: 0;
  }
  90%, 100% {
    opacity: 1;
  }
}
@keyframes hmName2 {
  0% {
    opacity: 0;
  }
  33% {
    opacity: 1;
  }
  66% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes hmName3 {
  0% {
    opacity: 0;
  }
  66% {
    opacity: 1;
  }
  90% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes hmTab1 {
  0% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  33% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
  90%, 100% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
}
@keyframes hmTab2 {
  0% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
  33% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  66% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
  100% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
}
@keyframes hmTab3 {
  0% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
  66% {
    border-color: #17141a;
    background-color: #17141a;
    color: #fff7e6;
  }
  90% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
  100% {
    border-color: rgba(23, 20, 26, 0.16);
    background-color: transparent;
    color: #17141a;
  }
}
@keyframes hmPop {
  0% {
    transform: scale(0.86);
  }
  7% {
    transform: scale(1.06);
  }
  13%, 31% {
    transform: scale(1);
  }
  33% {
    transform: scale(0.86);
  }
  40% {
    transform: scale(1.06);
  }
  46%, 64% {
    transform: scale(1);
  }
  66% {
    transform: scale(0.86);
  }
  73% {
    transform: scale(1.06);
  }
  79%, 88% {
    transform: scale(1);
  }
  90% {
    transform: scale(0.86);
  }
  96% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hm.is-demo,
  .hm.is-demo .hm__name,
  .hm.is-demo .hm__tab,
  .hm.is-demo .hm__chip {
    animation: none !important;
  }
  .hm.is-demo .hm__name {
    opacity: 0 !important;
  }
  .hm.is-demo .hm__name.is-on {
    opacity: 1 !important;
  }
}
