@property --hue {
  syntax: "<angle>";
  inherits: false;
  initial-value: 210deg;
}
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);
}

.ge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, hsl(var(--hue), 72%, 20%) 0%, hsl(calc(var(--hue) + 48deg), 62%, 13%) 100%);
  transition: --hue 300ms ease-out;
}

.ge__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 12px);
  color: #fff7e6;
}

.ge__ico {
  width: 16px;
  height: 16px;
  color: #ffd23f;
}

.ge__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  background: rgba(23, 20, 26, 0.45);
}

.ge__label {
  margin: 0;
  font-weight: 800;
  font-size: clamp(12px, 3.2vw, 13px);
  color: #fff7e6;
}

.ge__meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 247, 230, 0.16);
}

.ge__fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4cd4a6 0%, #ffd23f 100%);
  transform-origin: left center;
  transform: scaleX(var(--e, 0.3));
  transition: transform 300ms ease-out;
}

.ge__read {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ge__readLabel {
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 11px);
  color: rgba(255, 247, 230, 0.82);
}

.ge__readBox {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 20px;
  border-radius: 4px;
  padding: 0 4px;
  background: rgba(255, 247, 230, 0.16);
  color: #fff7e6;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1;
}

.ge__loop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.ge__loop i {
  grid-area: 1/1;
  font-style: normal;
  visibility: hidden;
}

.ge__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ge__play {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #ffd23f;
  color: #17141a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1;
}

.ge__ico--pause {
  display: none;
}

.ge__play[aria-pressed=true] .ge__ico--play {
  display: none;
}

.ge__play[aria-pressed=true] .ge__ico--pause {
  display: inline-block;
}

.ge__play .ge__ico {
  color: #17141a;
}

.ge.is-demo {
  animation-name: geHueLoop;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  transition: none;
}

@keyframes geHueLoop {
  0% {
    --hue: 210deg;
  }
  50% {
    --hue: 340deg;
  }
  100% {
    --hue: 210deg;
  }
}
.ge.is-demo .ge__fill {
  animation-name: geFillLoop;
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  transition: none;
}

@keyframes geFillLoop {
  0% {
    transform: scaleX(0.32);
  }
  50% {
    transform: scaleX(0.78);
  }
  100% {
    transform: scaleX(0.32);
  }
}
.ge.is-demo .ge__readText {
  color: transparent;
}

.ge.is-demo .ge__loop {
  visibility: visible;
}

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

.ge.is-demo .ge__loop i:nth-child(1) {
  animation-delay: 0ms;
}

.ge.is-demo .ge__loop i:nth-child(2) {
  animation-delay: 666ms;
}

.ge.is-demo .ge__loop i:nth-child(3) {
  animation-delay: 1332ms;
}

@keyframes geNumLoop {
  0%, 33% {
    visibility: visible;
  }
  34%, 100% {
    visibility: hidden;
  }
}
@media (max-width: 340px) {
  .ge {
    gap: 8px;
    padding: 12px;
  }
  .ge__panel {
    padding: 12px;
    gap: 4px;
  }
  .ge__play {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ge.is-demo,
  .ge.is-demo .ge__fill,
  .ge.is-demo .ge__loop i {
    animation: none !important;
  }
  .ge.is-demo .ge__readText {
    color: #fff7e6 !important;
  }
  .ge.is-demo .ge__loop {
    visibility: hidden !important;
  }
  .ge {
    transition: none !important;
  }
  .ge__fill {
    transition: none !important;
  }
}
