/* Sudoku — game-specific styles */
.sd-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
}
.sd-menu {
  display: grid;
  gap: 12px;
  width: min(100%, 320px);
  text-align: center;
}
.sd-menu[hidden], .sd-game[hidden] { display: none; }
.sd-menu-title { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.4rem; }
.sd-game { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.sd-info {
  display: flex;
  justify-content: space-between;
  width: min(100%, 460px, max(280px, calc(100svh - 470px)));
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--muted);
}
.sd-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(100%, 460px, max(280px, calc(100svh - 470px)));
  aspect-ratio: 1 / 1;
  background: #0f1326;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  overflow: hidden;
  container-type: inline-size;
}
.is-fs .sd-board, .is-pseudo-fs .sd-board, .is-fs .sd-info, .is-pseudo-fs .sd-info { width: min(94vw, calc(100dvh - 300px), 620px); }
.sd-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: #3dd9ff;
  font: 700 5.6cqi var(--font-display);
  cursor: pointer;
  touch-action: manipulation;
}
.sd-cell.sd-r { border-right: 2px solid rgba(255, 255, 255, 0.28); }
.sd-cell.sd-b { border-bottom: 2px solid rgba(255, 255, 255, 0.28); }
.sd-cell.is-given { color: #f2f4ff; }
.sd-cell.is-peer { background: rgba(255, 255, 255, 0.045); }
.sd-cell.is-same { background: rgba(61, 217, 255, 0.18); }
.sd-cell.is-sel { background: rgba(198, 255, 61, 0.28); }
.sd-cell:focus-visible { outline: 2px solid #c6ff3d; outline-offset: -2px; }
.sd-bad { animation: sd-bad 400ms; }
@keyframes sd-bad { 0%, 100% { background: transparent; } 30% { background: rgba(255, 92, 122, 0.65); } }
.sd-notes {
  position: absolute;
  inset: 6%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  font: 600 2.1cqi var(--font-display);
  color: #a7aecb;
  line-height: 1;
}
.sd-notes span { display: grid; place-items: center; }
.sd-pad {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  width: min(100%, 460px, max(280px, calc(100svh - 470px)));
}
.sd-num {
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #1e2440;
  color: #f2f4ff;
  font: 700 1.2rem var(--font-display);
  cursor: pointer;
  touch-action: manipulation;
}
.sd-num:hover:not(:disabled) { background: #262d4f; }
.sd-num:disabled { opacity: 0.25; cursor: default; }
.sd-tools { display: flex; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .sd-bad { animation: none; } }
