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

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

.toggleBtn {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #17141a;
  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: #0a4fe8;
}
.toggleBtn:active {
  transform: scale(0.96);
}
.toggleBtn[aria-pressed=true] {
  background: #fff7e6;
  color: #c93000;
}
.toggleBtn:focus-visible {
  outline: 2px solid #fff7e6;
  outline-offset: 2px;
}

.sample {
  margin: 0;
  color: #fff7e6;
  font-size: 15px;
  font-weight: 700;
}

.fieldRow {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.field {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid rgba(255, 247, 230, 0.55);
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.08);
  padding: 8px;
  color: #fff7e6;
  transition: color 300ms ease-out, border-color 300ms ease-out;
}

.ghostBtn {
  appearance: none;
  border: 2px solid rgba(255, 247, 230, 0.55);
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.08);
  padding: 8px 12px;
  color: #fff7e6;
  cursor: pointer;
  transition: color 300ms ease-out;
}

.wrap.inherited .field, .wrap.inherited .ghostBtn {
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  color: #fff7e6;
}

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

@media (max-width: 340px) {
  .wrap {
    width: 260px;
  }
  .ghostBtn {
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toggleBtn, .field, .ghostBtn {
    transition: none;
  }
}
