/* 랜덤 숫자 뽑기 */
.nm-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .nm-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.nm-stage {
  position: relative; min-height: 240px; padding: 22px 14px 18px; border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden;
  background:
    radial-gradient(420px 180px at 50% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border);
}
.nm-big {
  font-family: var(--font-num); font-weight: 900; font-size: 96px; line-height: 1.05; letter-spacing: -0.03em;
  color: var(--text); font-variant-numeric: tabular-nums; text-align: center; max-width: 100%; white-space: nowrap;
}
.nm-big.is-final { color: var(--primary); text-shadow: 0 6px 24px color-mix(in srgb, var(--primary) 30%, transparent); }
.nm-note { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-3); text-align: center; }

.nm-balls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
.nm-ball {
  --c: var(--primary); --ct: #fff;
  display: inline-grid; place-items: center; min-width: 54px; height: 54px; padding: 0 12px; border-radius: 999px;
  font-family: var(--font-num); font-weight: 900; font-size: 19px; font-variant-numeric: tabular-nums; color: var(--ct);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.62) 0 10%, rgba(255,255,255,0) 46%), var(--c);
  box-shadow: inset 0 -5px 10px rgba(0,0,0,.18), 0 5px 12px rgba(0,0,0,.16);
}
.nm-ball.is-in { animation: nm-drop .5s cubic-bezier(.2, 1.3, .4, 1); }
.nm-balls.is-small { gap: 7px; }
.nm-balls.is-small .nm-ball { min-width: 42px; height: 42px; padding: 0 9px; font-size: 15px; }

.nm-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nm-presets .hint { margin-right: 2px; }
.nm-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.nm-tilde { padding-bottom: 9px; font-weight: 900; color: var(--text-3); font-size: 18px; }
.nm-num { font-family: var(--font-num); font-weight: 800; text-align: center; }
.nm-num[aria-invalid="true"] { border-color: var(--danger); }
.nm-stepper input {
  width: 64px; height: 44px; border: 0; background: transparent; color: var(--text); text-align: center;
  font-family: var(--font-num); font-weight: 800; font-size: 17px; -moz-appearance: textfield; appearance: textfield;
}
.nm-stepper input::-webkit-outer-spin-button, .nm-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nm-stepper input:focus { outline: none; }
.nm-stepper:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.nm-stepper.is-bad { border-color: var(--danger); }
.nm-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.nm-checks .check { min-height: 36px; }
.nm-err { margin: 0; color: var(--danger); font-weight: 700; font-size: 14px; }
.nm-info { font-size: 13.5px; }

.nm-hist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.nm-hist li {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.nm-hist li:first-child { border-color: var(--primary); }
.nm-h-meta { font-size: 12px; font-weight: 700; color: var(--text-3); font-family: var(--font-num); }
.nm-h-nums { font-weight: 800; font-family: var(--font-num); word-break: break-word; }

@keyframes nm-drop {
  0% { opacity: 0; transform: translateY(-36px) scale(.4) rotate(-120deg); }
  60% { opacity: 1; transform: translateY(4px) scale(1.08) rotate(8deg); }
  100% { transform: none; }
}
.game-shell.is-full .nm-stage { min-height: 50vh; }
