html.is-play.ds-root { --accent: #2a5ea8; }
body.ds-numberlink .board-wrap {
  width: min(100%, calc(100vw - var(--nl-gutter, 24px)));
  max-width: 100%;
  margin: 0 auto;
}
body.ds-numberlink #board .cell {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  font-family: var(--font-digits);
  font-size: clamp(0.62rem, calc(100% * 0.42), 1.85rem);
  line-height: 1;
}

/* Numberlink has no numeric keypad, so Undo and Erase stay in the tool row. */
html.is-play body.ds-numberlink .play-tool-row > :is(#undoBtn, #eraseBtn) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 44px;
}
html.is-play body.ds-numberlink #undoBtn::after { content: "↶"; }
/* One endpoint pill for the live painter (.cell-numeral) and the public SSR mark (.digit). */
html.is-play body.ds-numberlink #board.board-numberlink > .cell.is-given {
  container-type: size;
}
html.is-play body.ds-numberlink #board.board-numberlink > .cell.is-given > :is(.cell-numeral, .digit) {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  max-width: 86%;
  height: auto;
  max-height: 78%;
  margin: 0;
  padding: 0 0.06em;
  overflow: hidden;
  border-radius: 25%;
  background: var(--board-cell, #fffaf0);
  color: var(--board-given, #241a14);
  font-size: min(46cqmin, 1.65rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: none;
  font-weight: var(--numeric-given-weight, 800);
  font-variant-numeric: tabular-nums lining-nums;
  z-index: 1;
  pointer-events: none;
}
html.is-play body.ds-numberlink #board.board-numberlink > .cell:not(.is-empty)::before {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.18;
  pointer-events: none;
}
html.is-play body.ds-numberlink #board {
  /* Two digits fit at the shared 70% height; three-digit ratio is unnecessary. */
  --numeric-cell-wide-ratio: var(--numeric-cell-ratio, 0.7);
}

html.is-play body.ds-numberlink #playMain.puzzle-page-shell .play-tool-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.is-play body.ds-numberlink #playMain.puzzle-page-shell #undoBtn {
  width: auto;
  font-size: 0.9rem;
}
