html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #f0e2ba;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.jd {
  --w1: #b3bfd4;
  --w2: #d8a3b4;
  --w3: #a9c4b0;
  --w4: #d9c48f;
  --w5: #c2a8d1;
  --w6: #9fc6c2;
  --ink: #17141a;
  --cream: #fff7e6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

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

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

.jd__field {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  width: clamp(176px, 46vw, 232px);
  height: clamp(176px, 46vw, 232px);
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.05);
  box-shadow: inset 0 0 0 1px rgba(23, 20, 26, 0.16);
  cursor: grab;
  touch-action: none;
}

.jd__field:active {
  cursor: grabbing;
}

.jd__field:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

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

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

.jd__win {
  font-weight: 800;
  font-size: clamp(20px, 6vw, 30px);
  line-height: 1;
  color: #0a4fe8;
  font-variant-numeric: tabular-nums;
}

.jd__unit {
  font-weight: 600;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.4;
  color: rgba(23, 20, 26, 0.82);
}

.jd__meta {
  margin: 4px 0 0;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.5;
  color: rgba(23, 20, 26, 0.82);
}

.jd__meta b {
  font-weight: 700;
  color: #0a4fe8;
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

.jd__metaUnit {
  color: rgba(23, 20, 26, 0.72);
}

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

@media (max-width: 340px) {
  .jd__hint {
    font-size: 8px;
    line-height: 1.3;
  }
  .jd {
    gap: 4px;
  }
  .jd__field {
    width: 150px;
    height: 150px;
  }
  .jd__win {
    font-size: 16px;
  }
  .jd__meta {
    margin-top: 0;
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jd.is-still .jd__field {
    cursor: default !important;
  }
}
