/* ============ Velo Sudoku on the painted plate (design/v2/sudoku.webp) ============
   Sizes use var(--u) = one plate pixel, so everything scales with the painting. */

/* Transparent buttons over painted controls */
.game-sudoku .sd-hit { z-index: 3; transition: background 0.12s; }
.game-sudoku .sd-hit:active { background: rgba(255, 240, 210, 0.14); }
.game-sudoku .sd-diff { border-radius: calc(38 * var(--u)); }
.game-sudoku .sd-round { border-radius: 50%; }
.game-sudoku .sd-key { border-radius: calc(16 * var(--u)); }
.game-sudoku .sd-key.done { background: rgba(8, 3, 18, 0.72); pointer-events: none; }
.game-sudoku .sd-tool { border-radius: calc(24 * var(--u)); }
.game-sudoku .sd-tool.on { box-shadow: 0 0 calc(18 * var(--u)) calc(2 * var(--u)) rgba(255, 210, 100, 0.55), inset 0 0 calc(30 * var(--u)) rgba(255, 220, 140, 0.18); }
.game-sudoku .sd-ad { display: none; }

/* Difficulty level word, under the painted "Difficulty" label */
.game-sudoku .sd-diff-word {
  display: flex;
  align-items: center;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(29.5 * var(--u));
  font-weight: 600;
  letter-spacing: calc(-0.6 * var(--u));
  line-height: 1;
  color: #F5EEDA;
  white-space: nowrap;
}

/* Stopwatch time in its dark pill */
.game-sudoku .sd-timer {
  pointer-events: none;
  border-radius: calc(34 * var(--u));
  background: linear-gradient(90deg, rgba(4, 3, 16, 0.05) 0%, rgba(4, 3, 16, 0.12) 25%, rgba(4, 3, 16, 0.42) 34%, rgba(4, 3, 16, 0.45) 100%);
  box-shadow: inset 0 0 0 calc(1.5 * var(--u)) rgba(130, 140, 210, 0.16), inset 0 calc(2 * var(--u)) calc(3 * var(--u)) rgba(150, 160, 230, 0.1), 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.35);
}
.game-sudoku .sd-time {
  display: flex;
  align-items: center;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(42 * var(--u));
  font-weight: 500;
  letter-spacing: calc(-0.4 * var(--u));
  line-height: 1;
  color: #F3F5FA;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.game-sudoku .sd-time i { font-style: normal; color: #A2B8F0; }

/* Grid: numbers inside the 81 painted cells */
.game-sudoku .sd-grid { z-index: 1; }
.game-sudoku .sd-cell {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: "Times New Roman", Times, "Noto Serif", "Liberation Serif", Georgia, serif;
  font-weight: 700;
  font-size: calc(64 * var(--u));
  line-height: 1;
  color: #10122A;
  transition: background 0.12s;
}
.game-sudoku .sd-cell > b { font-weight: 700; position: relative; top: calc(1 * var(--u)); }
.game-sudoku .sd-cell.user { color: #6B26D9; }
.game-sudoku .sd-cell.bad { color: #E0263F; }
.game-sudoku .sd-cell.peer { background: rgba(120, 90, 200, 0.06); }
.game-sudoku .sd-cell.same { background: rgba(110, 60, 220, 0.13); }
.game-sudoku .sd-cell.sel {
  z-index: 2;
  border-radius: calc(8 * var(--u));
  background: radial-gradient(ellipse at 50% 50%, #F8FBFF 0%, #E2EFFF 45%, #B6D3FC 100%);
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #3E9DFB, inset 0 0 calc(8 * var(--u)) rgba(70, 150, 255, 0.55), 0 0 calc(14 * var(--u)) calc(2 * var(--u)) rgba(60, 150, 255, 0.85);
}
.game-sudoku .sd-cell.bad.sel { background: radial-gradient(ellipse at 50% 55%, #FFF0F2 0%, #FCDDE2 100%); }
.game-sudoku .sd-cell.flash { animation: sd-flash 0.5s ease; }
.game-sudoku .sd-cell.shake { animation: sd-shake 0.35s ease; }
@keyframes sd-flash { 0% { transform: scale(1.2); background: rgba(255, 220, 120, 0.8); } 100% { transform: scale(1); } }
@keyframes sd-shake { 25% { transform: translateX(calc(-6 * var(--u))); } 75% { transform: translateX(calc(6 * var(--u))); } }
.game-sudoku .sd-notes {
  position: absolute;
  inset: calc(5 * var(--u));
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  place-items: center;
  font-family: var(--font);
  font-size: calc(23 * var(--u));
  font-weight: 600;
  line-height: 1;
  color: #6E5A92;
}
.game-sudoku .sd-solved .sd-grid { animation: sd-glow 1.2s ease 2; }
@keyframes sd-glow { 50% { box-shadow: 0 0 0 calc(6 * var(--u)) #FFE9A3, 0 0 calc(60 * var(--u)) rgba(255, 210, 90, 0.9); } }

/* Badges the mockup draws on Notes (OFF/ON) and Hint (count) */
.game-sudoku .sd-off,
.game-sudoku .sd-hcount {
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1;
}
.game-sudoku .sd-off {
  border-radius: calc(20 * var(--u));
  font-size: calc(24 * var(--u));
  font-weight: 500;
  color: #F6F1E2;
  background: linear-gradient(180deg, #17121F, #07050C);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #D7A245, inset 0 0 0 calc(4 * var(--u)) #3A2408, 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.6);
}
.game-sudoku .sd-off.on {
  font-weight: 700;
  color: #2A1600;
  background: linear-gradient(180deg, #FFF0A6, #F6C453 55%, #D98A10);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #7A4A0E, 0 0 calc(12 * var(--u)) rgba(255, 210, 90, 0.7);
}
.game-sudoku .sd-hcount {
  border-radius: 50%;
  font-size: calc(36 * var(--u));
  font-weight: 600;
  padding-top: calc(1 * var(--u));
  color: #F7EFE6;
  background: radial-gradient(circle at 45% 35%, #9C33D8 0%, #6A0EA6 55%, #43066E 100%);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #E2B04F, inset 0 0 0 calc(5 * var(--u)) #2A0A3A, 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.6);
}
.game-sudoku .sd-hcount.empty { filter: grayscale(0.7) brightness(0.8); }

/* Footer line: lighter, smaller face, like the mockup */
.game-sudoku .vg-plate-fine {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(23 * var(--u));
  font-weight: 400;
  letter-spacing: calc(-0.9 * var(--u));
  color: #D9CFE8;
}
