/* 집중력 테스트(슐테 테이블) 판. 공통 판 모양(.mem · .mem-board · .mem-cover)은 memory.css 를 같이 쓰고,
   여기서는 보라색 바탕과 숫자 격자만 정한다. 판은 늘 진한 바탕 + 흰 칸이라 밝은/어두운 화면에서 같은 대비다. */
.mem.schulte {
  --mem-bg: #6a3fe0;
  --sc-ink: #2a1466;
  --sc-cell: #fff;
  --sc-done: rgba(255, 255, 255, 0.14);
  margin-top: 0;
}

.sc-sizes {
  margin-top: 22px;
}
/* 칩 네 개 + 이름표가 360px 폭에서도 한 줄에 들어가게 조금 줄인다 */
.sc-sizes .chip {
  min-width: 52px;
  padding: 6px 10px;
}
.schulte .mem-top {
  justify-content: center;
  gap: 8px;
}
.schulte .mem-stat {
  padding: 6px 11px;
  gap: 5px;
}

/* 지금 찾을 숫자는 눈에 띄게 */
.sc-next {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand);
}
.sc-next b {
  color: var(--brand);
  font-size: 1.3rem;
  min-width: 1.4em;
  text-align: center;
}
.sc-time b {
  min-width: 3.8em;
  text-align: right;
}

.sc-board {
  min-height: 0;
}
.sc-grid {
  --n: 5;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: clamp(5px, 1.4vw, 9px);
  width: min(100%, 460px);
  aspect-ratio: 1;
}
.sc-cell {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  min-width: 0;
}
button.sc-cell {
  appearance: none;
  padding: 0;
  border: 0;
  background: var(--sc-cell);
  color: var(--sc-ink);
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 6.4vw, 2rem);
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.sc-grid[data-n='3'] button.sc-cell {
  font-size: clamp(1.8rem, 10vw, 2.8rem);
}
.sc-grid[data-n='4'] button.sc-cell {
  font-size: clamp(1.5rem, 8vw, 2.4rem);
}
.sc-grid[data-n='6'] button.sc-cell {
  font-size: clamp(1.05rem, 5.2vw, 1.7rem);
  border-radius: 10px;
}
button.sc-cell:active {
  transform: scale(0.95);
}
/* 찾은 칸: 흐리게 + 글자도 옅게(색만으로 알리지 않도록 모양도 바꾼다) */
button.sc-cell.done {
  background: var(--sc-done);
  color: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  cursor: default;
  transform: none;
}
button.sc-cell.bad {
  background: #ffd5d9;
  color: #a1202c;
  animation: sc-shake 0.34s ease-in-out;
}
@keyframes sc-shake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}
button.sc-cell:focus-visible {
  outline: 3px solid #ffd34d;
  outline-offset: 2px;
}

/* 등급표(이 페이지에만 들어오는 CSS): 시간 칸은 줄바꿈하지 않는다 */
.table-wrap td:not(:first-child),
.table-wrap th:not(:first-child) {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  button.sc-cell.bad {
    animation: none;
  }
}
