/* 숫자 야구 */
.bb-rule {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: -4px 0 14px;
}
.bb-board {
  text-align: center;
  scroll-margin-top: 80px;
}
.bb-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.bb-status b {
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.bb-slots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 10px;
}
.bb-slot {
  width: clamp(52px, 17vw, 72px);
  height: clamp(64px, 20vw, 84px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--surface-2);
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.bb-slot.on {
  border-color: var(--ink);
  background: var(--surface);
}
.bb-slot.cur {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.bb-msg {
  min-height: 1.7em;
  margin: 0 0 12px;
  font-weight: 700;
}
.bb-keys {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bb-key {
  appearance: none;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
  transition: transform 0.06s ease;
}
.bb-key:active:not(:disabled) {
  transform: scale(0.96);
}
.bb-key.fn {
  background: var(--surface-2);
}
.bb-key.ok {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-size: 1.1rem;
}
.bb-key.used {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.bb-key.memo-out:not(.used) {
  color: var(--muted);
  opacity: 0.45;
  text-decoration: line-through;
}
.bb-key.memo-in:not(.used) {
  border-color: var(--go);
  color: var(--go);
}
.bb-key:disabled {
  opacity: 0.4;
  cursor: default;
}

.bb-sub {
  margin: 0 0 8px;
  font-weight: 800;
  text-align: left;
}
.bb-sub .fine {
  font-weight: 500;
  font-size: 0.82rem;
}
.bb-memo-box,
.bb-log-box {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.bb-memo {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
@media (max-width: 420px) {
  .bb-memo {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.bb-m {
  appearance: none;
  font: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  min-height: 48px;
  padding: 4px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bb-m small {
  font-size: 0.66rem;
  font-weight: 700;
  min-height: 1em;
}
.bb-m[data-state='out'] {
  color: var(--muted);
  background: var(--surface);
  text-decoration: line-through;
  opacity: 0.6;
}
.bb-m[data-state='in'] {
  border-color: var(--go);
  color: var(--go);
  background: var(--surface);
}

.bb-empty {
  text-align: left;
  margin: 0;
}
.bb-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  position: relative;
}
.bb-log li {
  display: grid;
  grid-template-columns: 2.2em 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.bb-n {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
}
.bb-g {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
}
.bb-r {
  font-weight: 800;
  font-size: 0.92rem;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.bb-r.sb {
  background: var(--brand-soft);
  color: var(--brand);
}
.bb-r.out {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}
.bb-r.hr {
  background: var(--go);
  color: #fff;
}
.bb-board .linkish {
  margin-top: 12px;
}
