/* 숫자 야구: 비밀 수 줄, 추리 기록, 메모판, 숫자 칸, 숫자 패드. 공통 화면 모양은 /shared/student.css */

/* 먼저(●)·나중(○): 색이 아니라 모양과 글자로 구분한다 */
.side-mark {
  flex: none;
  font-size: 1.2rem;
  line-height: 1;
}

/* ── 비밀 수 ── */
.secrets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.secret-line {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.35;
}

.secret-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.secret-line b {
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

.phase-note {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 700;
  min-height: 1.4em;
  word-break: keep-all;
}

/* ── 추리 기록: 내 것 / 친구 것 두 칸. 길어지면 칸 안에서 넘겨 본다 ── */
.history {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.history-col {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 4px 6px;
}

.history-head {
  margin: 0 0 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
}

.history.single {
  grid-template-columns: 1fr;
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 6.2em;
  overflow-y: auto;
  font-variant-numeric: tabular-nums;
}

/* 한 줄: 번호 · 부른 수 · 결과 (줄바꿈 없이) */
.history-list li {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.5;
  font-size: 0.92rem;
  white-space: nowrap;
}

.history-list .no {
  min-width: 1.4em;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
}

.history-list .call {
  font-weight: 700;
}

.history-list .res {
  margin-left: auto;
}

.history-list .res {
  color: var(--slate-700);
}

.history-list .hit .res {
  font-weight: 800;
  color: var(--emerald-700);
}

.history-list .skipped {
  color: var(--muted);
}

.history-list .none {
  color: var(--muted);
  font-size: 0.85rem;
}

/* 복기: 지금 단계의 줄 (색만이 아니라 테두리로) */
.history-list .mark {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 4px;
  background: var(--accent-soft);
}

/* ── 메모판 ── */
.memo-box {
  margin-bottom: 6px;
}

.memo-title {
  margin: 0 0 2px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hint-inline {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.memo {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
}

button.memo-key {
  min-height: 40px;
  padding: 0;
  flex-direction: column;
  gap: 0;
  font-size: 0.95rem;
  line-height: 1.1;
  box-shadow: none;
}

.memo-mark {
  min-height: 1em;
  font-size: 0.85rem;
}

/* 없음 ✗: 흐리게, 있음 ○: 진하게 (글자 표시가 기준) */
button.memo-key[data-state='1'] {
  color: var(--slate-400);
  background: var(--slate-100);
}

button.memo-key[data-state='2'] {
  border: 2px solid var(--emerald-700);
  color: var(--emerald-700);
}

/* ── 고른 숫자 칸 ── */
.slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.slot {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--slate-700);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-size: 1.6rem;
  font-weight: 800;
}

.slot.empty {
  border-style: dashed;
  border-color: var(--slate-400);
}

/* ── 숫자 패드: 1~9 (3×3) + 오른쪽 세로 "지우기". 360px에서 버튼 높이 56px ── */
.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 0.9fr;
  grid-auto-rows: 56px;
  gap: 6px;
  margin-bottom: 4px;
}

button.pad-key {
  min-height: 56px;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

/* 이미 고른 숫자: 꺼지고 빗금처럼 보이게 */
button.pad-key.used {
  text-decoration: line-through;
}

button.pad-erase {
  grid-column: 4;
  grid-row: 1 / 4;
  height: auto;
  padding: 0 4px;
  font-size: 1rem;
}

/* ── 복기 ── */
.review-secrets {
  margin: 0 0 8px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.review-history .history-list {
  max-height: none;
}

.review-note {
  margin: 4px 0 0;
  text-align: center;
  font-weight: 700;
}

/* ── 게임 방법 ── */
.guide-history,
.guide-pad {
  width: 100%;
}

.guide-history .history-list {
  max-height: none;
}

.quiz-ask {
  font-weight: 700;
  color: var(--text) !important;
}

.quiz-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.quiz-choices button {
  font-variant-numeric: tabular-nums;
}

.quiz-choices button.chosen {
  border: 2px solid var(--emerald-700);
  color: var(--emerald-700);
}
