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

.sf {
  --sf-back: #14121c;
  --sf-far: #6a6478;
  --sf-mid: #b8b2c8;
  --sf-near: #f0e6cf;
  --sf-haze: #b8a8c8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 424px;
}

.sf__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 1.35;
  color: #fff7e6;
}

.sf__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #ffd23f;
}

.sf__field {
  position: relative;
  height: 170px;
  border-radius: 16px;
  overflow: hidden;
  background: #17141a;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.14);
  cursor: crosshair;
}

.sf__field:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.sf__cv {
  display: block;
  width: 100%;
  height: 100%;
}

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

.sf__lab {
  font-weight: 700;
  font-size: 11px;
  line-height: 1.4;
  color: #fff7e6;
}

.sf__dial {
  width: 88px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 247, 230, 0.3);
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.08);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: #fff7e6;
}

.sf__dial:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

.sf__shuffle {
  padding: 4px 12px;
  border: 1px solid rgba(255, 247, 230, 0.3);
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.12);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  color: #fff7e6;
  cursor: pointer;
  transition: background 220ms ease-out;
}

.sf__shuffle:hover {
  background: rgba(255, 247, 230, 0.22);
}

.sf__shuffle:focus-visible {
  outline: 2px solid #ffd23f;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .sf {
    gap: 4px;
  }
  .sf__field {
    height: 96px;
  }
  .sf__hint {
    font-size: 10px;
  }
  .sf__bar {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf__field {
    cursor: default !important;
  }
}
