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

.hr {
  --w1: #a6b4d3;
  --w2: #d9c48f;
  --w3: #a6d3b1;
  --w4: #d8a3b4;
  --w5: #9fc6c2;
  --w6: #c2a8d1;
  --w7: #e0c6a2;
  --w8: #a9c4b0;
  --ink: #17141a;
  --cream: #fff7e6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 436px;
}

.hr__hint {
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 1.35;
  color: #fff7e6;
}

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

.hr__field {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: clamp(176px, 46vw, 228px);
  height: clamp(176px, 46vw, 228px);
  border-radius: 16px;
  background: rgba(255, 247, 230, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.14);
  cursor: grab;
  touch-action: none;
}

.hr__field:active {
  cursor: grabbing;
}

.hr__field:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

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

.hr__side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.hr__win {
  font-weight: 800;
  font-size: clamp(18px, 5vw, 26px);
  line-height: 1.1;
  color: #ffd23f;
}

.hr__unit {
  font-weight: 600;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
  color: rgba(255, 247, 230, 0.82);
}

.hr__save {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff7e6;
  color: #17141a;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
}

.hr__save:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

.hr__save:active {
  transform: translateY(1px);
}

.hr__meta {
  margin: 4px 0 0;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.5;
  color: rgba(255, 247, 230, 0.82);
}

.hr__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: -1px;
}

@media (max-width: 340px) {
  .hr__hint {
    font-size: 8px;
    line-height: 1.3;
  }
  .hr {
    gap: 4px;
  }
  .hr__field {
    width: 148px;
    height: 148px;
  }
  .hr__win {
    font-size: 15px;
  }
  .hr__meta {
    margin-top: 0;
    font-size: 8px;
    line-height: 1.2;
  }
  .hr__unit {
    display: none;
  }
  .hr__side {
    gap: 0;
  }
  .hr__save {
    padding: 4px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hr.is-still .hr__field {
    cursor: default !important;
  }
}
