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

.wrap {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stateLabel {
  color: #fff7e6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.panel {
  width: 220px;
  font-size: 11px;
  background: rgba(255, 247, 230, 0.08);
  border-radius: 8px;
  padding: 8px;
  transition: padding 300ms ease-out;
}

.demoHeading,
.demoPara,
.demoList {
  color: #fff7e6;
  transition: margin 300ms ease-out;
}

.demoList {
  transition: margin 300ms ease-out, padding 300ms ease-out;
}

.demoList li {
  color: #fff7e6;
}

.demoLink {
  transition: color 300ms ease-out;
}

.panel.reset .demoHeading, .panel.reset .demoPara, .panel.reset .demoList {
  margin: 0 0 8px;
}
.panel.reset .demoList {
  padding: 0;
  list-style: none;
}
.panel.reset .demoList li {
  padding: 4px 0;
}

.panel.reset.full .demoLink {
  color: #5b8cf8;
  text-decoration: none;
}

.ruler {
  position: relative;
  width: 14px;
  height: 130px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.1);
  align-self: flex-end;
  overflow: hidden;
}

.rulerFill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0);
  background: #5b8cf8;
  transition: transform 300ms ease-out;
}

.readout {
  color: #fff7e6;
  font-size: 11px;
  opacity: 0.82;
}

@media (max-width: 340px) {
  .wrap {
    width: 260px;
    gap: 8px;
  }
  .panel {
    width: 190px;
    padding: 4px;
    font-size: 9px;
  }
  .body {
    gap: 8px;
  }
  .ruler {
    height: 80px;
  }
  .demoList li:nth-child(3) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel, .demoHeading, .demoPara, .demoList, .demoBtn, .rulerFill, .toggleBtn {
    transition: none;
  }
}
