/* /shared/v2-seo.css */
/* Focused V2 daily/tutorial pages keep the server board full-width on mobile. */
body[data-v2-page] #libList {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
body[data-v2-page] .daily-play-preview {
  width: 100%;
  min-width: 0;
  max-width: 42rem;
  margin-inline: auto;
}
body[data-v2-page] .daily-play-preview .play {
  margin: 0;
}
body[data-v2-page] .daily-play-preview .board-wrap {
  width: 100%;
}
body[data-v2-page] .daily-play-preview [role="gridcell"] {
  cursor: default;
}
body[data-v2-page] .daily-play-preview button:disabled {
  opacity: 1;
}
body[data-v2-page] #libList > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

html[data-daily-page="1"] .play-daily-hero {
  width: min(100%, 42rem);
  margin: 0 auto 0.75rem;
}
html[data-daily-page="1"] .play-daily-hero-date {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--muted, #6b5e4e);
}
html[data-daily-page="1"] .play-daily-hero-lede {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink, #2b2419);
}
html[data-daily-page="1"] .play-daily-hero-rules {
  margin: 0;
  font-size: 0.92rem;
}
html[data-daily-page="1"] .play-daily-hero-rules a {
  font-weight: 600;
}
html[data-daily-page="1"] #playDayBand,
html[data-daily-page="1"] .play-day-band select {
  display: none !important;
}

/* /how-to/tutorial/tutorial.css */

/* @import /shared/number-games/boards.css */
/**
 * Shared DOM/CSS contract for prototype/shared/number-games/boards.js.
 * Used by how-to extended tutorials and future product play shells.
 */
.extended-board {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  outline: none;
}

.extended-board .board {
  --ng-cell: clamp(44px, calc(min(92vw, 24rem) / var(--n)), 56px);
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  width: min(100%, calc(var(--ng-cell) * var(--n)));
  margin: 0 auto;
  touch-action: manipulation;
  box-sizing: border-box;
  border: 2px solid var(--board-line-strong, var(--ink));
  background: var(--board-cell, var(--paper-bright));
  gap: 0;
}

.extended-board .board[style*="--rows"] {
  aspect-ratio: calc(var(--n) / var(--rows));
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
}

.extended-board .board-calcudoku,
.extended-board .board:not(.board-cross):not(.board-sky) {
  aspect-ratio: calc(var(--n) / var(--rows, var(--n)));
}

.extended-board .board-cross {
  --ng-cell: clamp(
    44px,
    calc((min(100%, min(92vw, 22rem)) - (var(--n) - 1) * 2px) / var(--n)),
    48px
  );
  width: min(100%, calc(var(--ng-cell) * var(--n) + (var(--n) - 1) * 2px));
  aspect-ratio: auto;
  gap: 2px;
  grid-template-columns: repeat(var(--n), minmax(44px, 1fr));
  grid-template-rows: repeat(var(--n), minmax(44px, auto));
}

.extended-board .board.is-draw,
.extended-board .board.is-draw .cell {
  touch-action: none;
  user-select: none;
}

.extended-board .board .cell,
.extended-board .board .cross-num {
  box-sizing: border-box;
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--board-line, color-mix(in srgb, var(--ink) 18%, var(--line)));
  border-left: 1px solid var(--board-line, color-mix(in srgb, var(--ink) 18%, var(--line)));
  background: var(--board-cell, var(--paper-bright));
  font-family: var(--font-digits, inherit);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(0.9rem, 3.8vw, 1.3rem);
  line-height: 1;
  color: var(--board-entry, #2438c9);
  font-weight: var(--weight-entry, 500);
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
}

.extended-board .board .cell .digit {
  line-height: 1;
}

.extended-board .board .cell.is-given,
.extended-board .board .cell.is-given .digit {
  color: var(--board-given, #140f0a);
  font-weight: var(--weight-given, 800);
}

.extended-board .board .cell.is-player,
.extended-board .board .cell.is-player .digit {
  color: var(--board-entry, #2438c9);
  font-weight: var(--weight-entry, 500);
}

.extended-board .board .cell.is-selected,
.extended-board .board .cross-num.is-selected {
  z-index: 2;
  background-color: var(--board-cell-sel, color-mix(in srgb, var(--paper) 55%, var(--board-cell)));
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19d65a);
  outline: none;
}

.extended-board .board .cell.is-conflict,
.extended-board .board .cross-num.is-conflict {
  background-color: var(
    --board-cell-bad,
    color-mix(in srgb, var(--board-digit-bad, var(--vermillon)) 16%, var(--board-cell))
  );
  box-shadow: inset 0 -3px 0 0 var(--board-digit-bad, var(--vermillon));
}

.extended-board .board .cell.is-selected.is-conflict,
.extended-board .board .cross-num.is-selected.is-conflict {
  box-shadow:
    inset 0 0 0 2.5px var(--play-ring-active, #19d65a),
    inset 0 -3px 0 0 var(--board-digit-bad, var(--vermillon));
}

.extended-board .board .cell.is-black {
  background: var(--ink);
  border-color: var(--ink);
  cursor: default;
}

/* Calcudoku / suguru-style cage walls (strong only on boundaries). */
.extended-board .board .cell.wall-n,
.extended-board .board .cell.wall-e,
.extended-board .board .cell.wall-s,
.extended-board .board .cell.wall-w {
  --ng-wall-size: 2px;
  background-image:
    var(--ng-wall-n, linear-gradient(transparent, transparent)),
    var(--ng-wall-e, linear-gradient(transparent, transparent)),
    var(--ng-wall-s, linear-gradient(transparent, transparent)),
    var(--ng-wall-w, linear-gradient(transparent, transparent));
  background-position: top, right, bottom, left;
  background-size:
    100% var(--ng-wall-size),
    var(--ng-wall-size) 100%,
    100% var(--ng-wall-size),
    var(--ng-wall-size) 100%;
  background-repeat: no-repeat;
}

.extended-board .board .cell.wall-n {
  --ng-wall-n: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink)));
}
.extended-board .board .cell.wall-e {
  --ng-wall-e: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink)));
}
.extended-board .board .cell.wall-s {
  --ng-wall-s: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink)));
}
.extended-board .board .cell.wall-w {
  --ng-wall-w: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink)));
}

.extended-board .board .cage-label {
  position: absolute;
  top: clamp(1px, 4%, 3px);
  left: clamp(2px, 5%, 4px);
  font-size: clamp(0.62rem, calc(min(92vw, 28rem) / var(--n, 6) * 0.22), 1.05rem);
  font-weight: 700;
  line-height: 1.05;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  pointer-events: none;
  z-index: 1;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.extended-board .board .cell.has-cage-label .digit,
.extended-board .board .cell .digit {
  padding-top: 0.35em;
}

.extended-board .board .cell-notes {
  position: absolute;
  inset: auto 2px 2px 2px;
  top: 38%;
  font-size: 0.58rem;
  line-height: 1.15;
  text-align: center;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
  overflow-wrap: anywhere;
  pointer-events: none;
}

/* Crossmath chrome */
.extended-board .board .op,
.extended-board .board .result,
.extended-board .board .pad,
.extended-board .board .clue {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 2.25rem;
  font-size: clamp(0.72rem, 2.8vw, 0.95rem);
  overflow-wrap: anywhere;
}

.extended-board .board .op,
.extended-board .board .pad {
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  font-weight: 700;
  background: transparent;
  border: none;
}

.extended-board .board .result {
  color: var(--ink);
  font-weight: 800;
  background: color-mix(in srgb, var(--board-cell) 88%, var(--paper));
  border-radius: var(--radius-sm, 6px);
}

.extended-board .board-cross .op,
.extended-board .board-cross .pad,
.extended-board .board-cross .result {
  min-height: 0;
  padding: 0 1px;
  font-size: clamp(0.62rem, 2.2vw, 0.82rem);
  line-height: 1.05;
}

.extended-board .board-cross .cross-num {
  min-width: 44px;
  min-height: 44px;
}

/* Shade games */
.extended-board .board .shade-cell.is-ink {
  background: var(--ink);
  color: var(--paper-bright);
}

.extended-board .board .shade-cell.is-light {
  background: var(--board-cell, var(--paper-bright));
  box-shadow: inset 0 0 0 2px var(--board-line-strong, var(--ink));
}

.extended-board .board .shade-cell.is-unknown {
  background: var(--board-cell, var(--paper-bright));
}

.extended-board .board .shade-cell .digit {
  color: var(--board-given, #140f0a);
  font-weight: var(--weight-given, 800);
}

.extended-board .board .shade-cell.is-ink .digit {
  color: var(--paper-bright);
}

.extended-board .board .shade-cell.is-clue.is-unknown .digit,
.extended-board .board .shade-cell.is-clue.is-light .digit {
  color: var(--board-given, #140f0a);
  font-weight: var(--weight-given, 800);
}

/* Numberlink: full card width, square cells via aspect-ratio (page scroll for tall boards). */
.extended-board .board.board-numberlink {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  aspect-ratio: var(--n) / var(--rows, var(--n));
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, var(--n)), minmax(0, 1fr));
}
.extended-board .board.board-numberlink .cell,
.extended-board .board.board-numberlink .path-cell {
  min-width: 0;
  min-height: 0;
}

/* Numberlink */
.extended-board .board .path-cell {
  position: relative;
}

.extended-board .board .path-cell.path-1 {
  color: #c45c9a;
  background: color-mix(in srgb, #c45c9a 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-2 {
  color: #3d7ea6;
  background: color-mix(in srgb, #3d7ea6 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-3 {
  color: #c88708;
  background: color-mix(in srgb, #c88708 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-4 {
  color: #2e8b7a;
  background: color-mix(in srgb, #2e8b7a 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-5 {
  color: #d45e3d;
  background: color-mix(in srgb, #d45e3d 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-6 {
  color: #6b5b95;
  background: color-mix(in srgb, #6b5b95 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-7 {
  color: #8a5a2b;
  background: color-mix(in srgb, #8a5a2b 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-8 {
  color: #4a7c59;
  background: color-mix(in srgb, #4a7c59 22%, var(--board-cell, var(--paper-bright)));
}
.extended-board .board .path-cell.path-9 { color: #5c4033; background: color-mix(in srgb, #5c4033 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-10 { color: #7b2cbf; background: color-mix(in srgb, #7b2cbf 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-11 { color: #0077b6; background: color-mix(in srgb, #0077b6 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-12 { color: #bc6c25; background: color-mix(in srgb, #bc6c25 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-13 { color: #588157; background: color-mix(in srgb, #588157 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-14 { color: #9d4edd; background: color-mix(in srgb, #9d4edd 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-15 { color: #e76f51; background: color-mix(in srgb, #e76f51 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-16 { color: #2a9d8f; background: color-mix(in srgb, #2a9d8f 22%, var(--board-cell, var(--paper-bright))); }
.extended-board .board .path-cell.path-17 { color: #6d597a; background: color-mix(in srgb, #6d597a 22%, var(--board-cell, var(--paper-bright))); }

.extended-board .board .path-cell .digit {
  position: relative;
  z-index: 1;
  font-weight: var(--weight-given, 800);
  color: var(--board-given, #140f0a);
}

.extended-board .board .path-cell.is-given .digit,
.extended-board .board .path-cell.is-player .digit {
  font-weight: var(--weight-given, 800);
}

.extended-board .board .path-cell::before,
.extended-board .board .path-cell::after {
  content: "";
  position: absolute;
  background: currentColor;
  pointer-events: none;
  opacity: 0;
  border-radius: 999px;
  z-index: 0;
}

.extended-board .board .path-cell::before {
  height: 26%;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
}

.extended-board .board .path-cell.pipe-e::before,
.extended-board .board .path-cell.pipe-w::before {
  opacity: 1;
}
.extended-board .board .path-cell.pipe-e:not(.pipe-w)::before {
  left: 50%;
}
.extended-board .board .path-cell.pipe-w:not(.pipe-e)::before {
  right: 50%;
}

.extended-board .board .path-cell::after {
  width: 26%;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
}

.extended-board .board .path-cell.pipe-n::after,
.extended-board .board .path-cell.pipe-s::after {
  opacity: 1;
}
.extended-board .board .path-cell.pipe-s:not(.pipe-n)::after {
  top: 50%;
}
.extended-board .board .path-cell.pipe-n:not(.pipe-s)::after {
  bottom: 50%;
}

.extended-board .board .path-cell.is-selected {
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19d65a);
}

/* Tutorial-only focus ring from step engine */
.extended-board .board .cell.is-tutorial-focus {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--play-ring-active, #19d65a) 65%, var(--ink));
}

.extended-board .board .cell.is-selected.is-tutorial-focus {
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19d65a);
}

/* Controls */
.extended-board .extended-controls {
  display: grid;
  gap: 12px;
  width: min(100%, 320px);
  margin-top: 4px;
  justify-items: center;
}

.extended-board .extended-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.extended-board .extended-keypad[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.extended-board .extended-keypad .btn.extended-key {
  min-height: 52px;
  min-width: 44px;
  padding: 8px 6px;
  font: inherit;
  font-size: 1.15rem;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.2;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--board-key-line, var(--line));
  background: var(--board-key, var(--paper-bright));
  color: var(--ink);
}

.extended-board .extended-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.extended-board .extended-actions .btn {
  min-height: 44px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.extended-board .extended-actions .btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--indigo, #3547b3) 12%, var(--paper-bright));
  border-color: var(--indigo, #3547b3);
}

.extended-board .extended-controls > p {
  margin: 0;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  text-align: center;
  max-width: 36rem;
}

/* How-to phone stack: stretch the grid area so board width calc has a real containing block. */
.howto-tutorial-board .extended-board {
  justify-items: stretch;
  width: 100%;
}

.howto-tutorial-board .extended-board > :first-child {
  width: 100%;
}

@media (min-width: 761px) {
  .howto-tutorial-board .extended-board {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
    align-items: start;
    justify-items: stretch;
    width: 100%;
  }

  .howto-tutorial-board .extended-board .board {
    justify-self: center;
  }

  .howto-tutorial-board .extended-board .extended-controls {
    margin-top: 0;
    width: 100%;
  }
}



/* @import /ds/boards.css */
/* DIGIGMA design system — first-class grids.
   Demo grids plus the shared production numeric-cell contract below. */

.ds-play {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 768px) {
  .ds-play { grid-template-columns: minmax(0, 360px) 200px; }
}

.ds-board-wrap {
  min-width: 0;
  width: min(100%, 360px);
}

.ds-board {
  --n: 9;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  grid-template-rows: repeat(var(--n), minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  background: var(--board-cell);
  border: 2px solid var(--board-frame);
  border-radius: var(--radius-board);
  overflow: hidden;
}

.ds-board[data-size="6"] { --n: 6; }

.ds-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--board-cell);
  color: var(--board-given);
  font-family: var(--font-digits);
  font-size: clamp(0.95rem, 3.6vw, 1.35rem);
  font-weight: var(--weight-entry);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  box-shadow:
    inset -1px 0 0 var(--board-line),
    inset 0 -1px 0 var(--board-line);
}

.ds-cell:nth-child(9n),
.ds-board[data-size="6"] .ds-cell:nth-child(6n) {
  box-shadow: inset 0 -1px 0 var(--board-line);
}

.ds-cell:nth-child(n + 73),
.ds-board[data-size="6"] .ds-cell:nth-child(n + 31) {
  box-shadow: inset -1px 0 0 var(--board-line);
}

.ds-cell:nth-child(9n):nth-child(n + 73),
.ds-board[data-size="6"] .ds-cell:nth-child(6n):nth-child(n + 31) {
  box-shadow: none;
}

.ds-board:not([data-size="6"]) .ds-cell:nth-child(3n):not(:nth-child(9n)) {
  box-shadow:
    inset -2px 0 0 var(--board-line-strong),
    inset 0 -1px 0 var(--board-line);
}

.ds-board:not([data-size="6"]) .ds-cell:nth-child(n + 19):nth-child(-n + 27),
.ds-board:not([data-size="6"]) .ds-cell:nth-child(n + 46):nth-child(-n + 54) {
  box-shadow:
    inset -1px 0 0 var(--board-line),
    inset 0 -2px 0 var(--board-line-strong);
}

.ds-board:not([data-size="6"]) .ds-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n + 19):nth-child(-n + 27),
.ds-board:not([data-size="6"]) .ds-cell:nth-child(3n):not(:nth-child(9n)):nth-child(n + 46):nth-child(-n + 54) {
  box-shadow:
    inset -2px 0 0 var(--board-line-strong),
    inset 0 -2px 0 var(--board-line-strong);
}

.ds-cell.is-given {
  color: var(--board-given);
  font-weight: var(--weight-given);
}

.ds-cell.is-entry {
  color: var(--board-entry);
  font-weight: var(--weight-entry);
}

.ds-cell.is-hi { background: var(--board-cell-hi); }
.ds-cell.is-same { background: var(--board-cell-same); }
.ds-cell.is-ok { background: var(--board-cell-ok); color: var(--board-digit-ok); }
.ds-cell.is-bad {
  background: var(--board-cell-bad);
  color: var(--board-digit-bad);
  font-weight: var(--weight-given);
}

.ds-cell.is-sel {
  background: var(--board-cell-sel);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px #C88708,
    inset -1px 0 0 var(--board-line),
    inset 0 -1px 0 var(--board-line);
  z-index: 2;
}

.ds-cell:hover:not(.is-sel) { background: var(--board-cell-hover); }

.ds-cell:focus-visible {
  outline: none;
  z-index: 3;
  box-shadow:
    inset 0 0 0 2px #C88708,
    0 0 0 2px var(--paper);
}

.ds-notes {
  position: absolute;
  inset: 3px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  font-size: 0.52em;
  font-weight: 500;
  color: var(--board-note);
  line-height: 1;
  overflow: hidden;
  pointer-events: none;
}

.ds-notes span { display: grid; place-items: center; min-width: 0; min-height: 0; }

@media (max-width: 760px) {
  .ds-notes { font-size: 0.64em; }
}

.ds-cell[data-cage="a"] { background: var(--board-cage-a); }
.ds-cell[data-cage="b"] { background: var(--board-cage-b); }
.ds-cell[data-cage="c"] { background: var(--board-cage-c); }
.ds-cell[data-cage].is-hi { filter: saturate(1.05); }
.ds-cell[data-cage].is-sel { background: var(--board-cell-sel); }

.ds-cage-sum {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: clamp(0.48rem, 1.6vw, 0.62rem);
  font-weight: 600;
  color: var(--board-cage-sum);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.ds-cage-wall {
  position: absolute;
  background: transparent;
  border-color: var(--board-cage);
  border-style: dotted;
  pointer-events: none;
  z-index: 1;
}

.ds-cage-wall.n { top: 2px; left: 2px; right: 2px; height: 0; border-top-width: 1.5px; border-top-style: dotted; }
.ds-cage-wall.s { bottom: 2px; left: 2px; right: 2px; height: 0; border-bottom-width: 1.5px; border-bottom-style: dotted; }
.ds-cage-wall.w { top: 2px; bottom: 2px; left: 2px; width: 0; border-left-width: 1.5px; border-left-style: dotted; }
.ds-cage-wall.e { top: 2px; bottom: 2px; right: 2px; width: 0; border-right-width: 1.5px; border-right-style: dotted; }

.ds-cell.is-bin-0 { color: var(--board-bin-0); font-weight: var(--weight-given); }
.ds-cell.is-bin-1 { color: var(--board-bin-1); font-weight: var(--weight-entry); }
.ds-cell.is-warn {
  background: var(--board-bin-warn);
  box-shadow: inset 0 0 0 1.5px var(--board-bin-warn-line);
  color: var(--board-digit-bad);
}

.ds-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ds-clock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-digits);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--board-clock);
}

.ds-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* Local demo fallbacks when play.css is not loaded; play pages use play.css SSOT. */
.ds-keypad {
  --keypad-key-honey: #C49A4A;
  --keypad-key-paper: color-mix(in srgb, var(--paper-wash) 62%, var(--paper-bright));
  --keypad-key-bg: color-mix(in srgb, var(--keypad-key-honey) 10%, var(--keypad-key-paper));
  --keypad-key-ink: var(--ink-strong, var(--ink));
  --keypad-key-border: color-mix(in srgb, var(--ink) 22%, var(--line));
  --keypad-key-hover: color-mix(in srgb, var(--ink) 8%, var(--keypad-key-bg));
  --keypad-key-hover-border: color-mix(in srgb, var(--indigo) 40%, var(--keypad-key-border));
  --keypad-digit-radius: 11px;
}

.ds-keypad button {
  min-height: 44px;
  background: var(--keypad-key-bg, var(--board-key));
  border: 1px solid var(--keypad-key-border, var(--board-key-line));
  border-radius: var(--keypad-digit-radius, var(--radius-sm));
  color: var(--keypad-key-ink, var(--ink));
  font-family: var(--font-digits);
  font-size: 1.15rem;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.ds-keypad button:hover {
  background: var(--keypad-key-hover, var(--keypad-key-bg, var(--board-key)));
  border-color: var(--keypad-key-hover-border, var(--indigo));
}
.ds-keypad button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.ds-play-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ds-legend {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Production numeric values. Keep this in the render-blocking DS sheet,
   mirrored in design-system/boards.css. Givens and entered digits share one
   size, about 70% of the cell. Div cells are the query container (the glyph
   is a child, so cqw is the cell). Button cells cannot be size containers:
   Chrome collapses their cqw, so those glyphs use the board's cqw divided by
   the column count (--n, and --numeric-rows when the square board is not a
   square grid). Three-digit clues opt into --numeric-cell-wide-ratio. Notes,
   cage sums, inequalities, Kakuro clue triangles, operators, skyscraper
   towers and region fills are untouched. Font family stays inherited. */
html.is-play {
  --numeric-cell-ratio: 0.7;
  --numeric-cell-wide-ratio: 0.42;
  --numeric-cell-max: 4.8rem;
  --numeric-given-weight: 800;
  --numeric-entry-weight: 500;
}
html.is-play body:is(.ds-sudoku, .ds-killer, .ds-binary, .ds-futoshiki, .ds-kakuro, .ds-yakazu, .ds-suguru) #board {
  --numeric-given-ink: var(--board-given);
  --numeric-entry-ink: var(--board-entry);
}
/* The existing dark entry token falls below 4.5:1 on selected cells. */
html.is-play[data-ds-theme="dark"] body:is(.ds-sudoku, .ds-killer, .ds-binary, .ds-futoshiki, .ds-kakuro, .ds-yakazu, .ds-suguru) #board {
  --numeric-entry-ink: #C2CEFF;
}
html.is-play body #board > :is(.cell, .result):not(button):has(> :is(.digit, .cell-numeral, .clue):not(:empty)) {
  container-type: inline-size;
}
html.is-play body #board:has(> button.cell > :is(.digit, .cell-numeral, .clue):not(:empty)) {
  container-type: inline-size;
}
html.is-play body #board > :is(.cell, .result):not(button) > :is(.digit, .cell-numeral, .clue):not(:empty) {
  font-size: min(calc(var(--numeric-cell-ratio, 0.7) * 100cqw), var(--numeric-cell-max, 4.8rem));
  line-height: 1;
  font-weight: inherit;
}
html.is-play body #board > button.cell > :is(.digit, .cell-numeral, .clue):not(:empty) {
  font-size: min(
    calc(var(--numeric-cell-ratio, 0.7) * 100cqw / var(--n, 9)),
    calc(var(--numeric-cell-ratio, 0.7) * 100cqw / var(--numeric-rows, var(--n, 9))),
    var(--numeric-cell-max, 4.8rem)
  );
  line-height: 1;
  font-weight: inherit;
}
html.is-play body #board > :is(.cell, .result):not(button) > :is(.digit, .cell-numeral, .clue).cell-numeral-wide:not(:empty) {
  font-size: min(calc(var(--numeric-cell-wide-ratio, 0.42) * 100cqw), 3.2rem);
}
html.is-play body #board > button.cell > :is(.digit, .cell-numeral, .clue).cell-numeral-wide:not(:empty) {
  font-size: min(
    calc(var(--numeric-cell-wide-ratio, 0.42) * 100cqw / var(--n, 9)),
    calc(var(--numeric-cell-wide-ratio, 0.42) * 100cqw / var(--numeric-rows, var(--n, 9))),
    3.2rem
  );
}
html.is-play body:is(.ds-sudoku, .ds-killer, .ds-binary, .ds-futoshiki, .ds-yakazu, .ds-suguru) #board .cell:is(.given, .is-given) {
  color: var(--numeric-given-ink);
  font-weight: var(--numeric-given-weight);
}
/* Error ink stays owned by existing error rules; selection/hint backgrounds and
   rings remain intact. Theme tokens provide indigo on warm light/dark surfaces. */
html.is-play body:is(.ds-sudoku, .ds-killer, .ds-binary, .ds-futoshiki, .ds-kakuro, .ds-yakazu, .ds-suguru) #board .cell.entry:where(:not(.bad, .conflict, .mismatch, .is-conflict)) {
  color: var(--numeric-entry-ink);
  font-weight: var(--numeric-entry-weight);
}



.howto-tutorial {
  margin-top: 12px;
}

.howto-tutorial-intro {
  margin-bottom: 16px;
}

.howto-tutorial-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
  padding: 16px;
  background: var(--bg-2, rgba(255, 255, 255, 0.4));
}

.howto-tutorial-head {
  margin-bottom: 12px;
}

.howto-tutorial-progress {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #956300);
}

.howto-tutorial-instruction {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.howto-tutorial-error {
  margin: 8px 0 0;
  color: var(--bad, #b42318);
  font-size: 0.92rem;
}

.howto-tutorial-binary,
.howto-tutorial-play {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  align-items: center;
}

.howto-tutorial-binary-grid,
.howto-tutorial-kakuro-grid,
.howto-tutorial-futoshiki-grid {
  display: grid;
  width: min(100%, 280px);
  aspect-ratio: 1;
  gap: 0;
  border: 3px solid var(--grid-strong, #3a2d22);
  border-radius: 6px;
  background: var(--grid-strong, #3a2d22);
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.howto-tutorial-futoshiki-grid {
  aspect-ratio: auto;
  min-height: 200px;
}

.howto-tutorial-cell.clue {
  position: relative;
  background: var(--cell, #fff9e8);
  cursor: default;
  padding: 0;
  overflow: hidden;
}

.howto-tutorial-cell.clue .kakuro-diag {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    transparent calc(50% - 0.5px),
    var(--grid-thin, rgba(0, 0, 0, 0.2)) calc(50% - 0.5px),
    var(--grid-thin, rgba(0, 0, 0, 0.2)) calc(50% + 0.5px),
    transparent calc(50% + 0.5px)
  );
  pointer-events: none;
}

.howto-tutorial-cell.clue .kakuro-down {
  position: absolute;
  left: 4px;
  bottom: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-strong, #241a14);
  line-height: 1;
}

.howto-tutorial-cell.clue .kakuro-across {
  position: absolute;
  right: 3px;
  top: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-strong, #241a14);
  line-height: 1;
}

.howto-tutorial-cell.black {
  background: var(--grid-strong, #3a2d22);
  cursor: default;
  border-color: transparent;
}

.howto-tutorial-ineq {
  display: grid;
  place-items: center;
  font-size: clamp(0.72rem, 3.4vw, 1rem);
  font-weight: 700;
  color: var(--game-futoshiki, var(--cta, #c88708));
  pointer-events: none;
  user-select: none;
}

.howto-tutorial-cell {
  display: grid;
  place-items: center;
  background: var(--cell, #fff9e8);
  border-right: 1px solid var(--grid-thin, rgba(0, 0, 0, 0.12));
  border-bottom: 1px solid var(--grid-thin, rgba(0, 0, 0, 0.12));
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 600;
  color: var(--entry, #1d4ed8);
  cursor: pointer;
  user-select: none;
  min-height: 44px;
}

.howto-tutorial-cell.is-given {
  color: var(--ink-strong, #241a14);
  font-weight: 700;
  cursor: default;
}

.howto-tutorial-binary .howto-tutorial-binary-grid .howto-tutorial-cell {
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  text-align: center;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "zero" 0, "lnum" 1, "tnum" 1;
}

.howto-tutorial-binary .howto-tutorial-cell.is-selected {
  box-shadow: inset 0 0 0 2px var(--sel, #956300);
  background: var(--sel-bg, rgba(149, 99, 0, 0.12));
}

.howto-tutorial-cell.is-focus {
  box-shadow: inset 0 0 0 2px var(--gold, var(--accent));
}

.howto-tutorial-binary .howto-tutorial-cell.is-highlight:not(.is-selected) {
  background: var(--gold-wash, color-mix(in srgb, var(--gold, var(--accent)) 16%, transparent));
}

.howto-tutorial-cell.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.howto-tutorial-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 280px);
}

/* Same keypad surface as the Binary play board (--board-key), not a second button system. */
.howto-tutorial-keypad button {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 6px;
  font: inherit;
  font-size: 1.15rem;
  font-variant-numeric: lining-nums;
  line-height: 1.2;
  white-space: normal;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--board-key-line, var(--line));
  background: var(--board-key, var(--paper-bright));
  color: var(--ink);
  box-shadow: var(--shadow-1, none);
  cursor: pointer;
}

.howto-tutorial-keypad button:hover {
  border-color: var(--cta, #c88708);
}

.howto-tutorial-keypad button.ghost {
  font-size: 0.85rem;
}

.howto-tutorial-keypad.is-digits [data-digit="clear"] {
  grid-column: 1 / -1;
}

/* Sudoku and Killer reuse the Binary keypad surface and the same board tokens. */
.howto-tutorial-digits {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  align-items: center;
}

.howto-tutorial-digits-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(0, 1fr));
  width: min(100%, 320px);
  aspect-ratio: 1;
  gap: 0;
  border: 3px solid var(--grid-strong, var(--board-line-strong, #3a2d22));
  border-radius: 6px;
  background: var(--grid-strong, var(--board-line-strong, #3a2d22));
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.howto-tutorial-digits .howto-tutorial-cell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  font-family: var(--font-digits, inherit);
  font-size: clamp(0.72rem, 2.5vw, 1.05rem);
  font-variant-numeric: lining-nums;
  font-weight: var(--weight-entry, 600);
  color: var(--entry, var(--board-digit, #1d4ed8));
}

.howto-tutorial-digits-grid .howto-tutorial-cell:nth-child(3n) {
  border-right: 3px solid var(--grid-strong, var(--board-line-strong, #3a2d22));
}

.howto-tutorial-digits-grid .howto-tutorial-cell:nth-child(9n) {
  border-right: none;
}

.howto-tutorial-digits-grid .howto-tutorial-cell:nth-child(n + 19):nth-child(-n + 27),
.howto-tutorial-digits-grid .howto-tutorial-cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 3px solid var(--grid-strong, var(--board-line-strong, #3a2d22));
}

.howto-tutorial-digits-grid .howto-tutorial-cell:nth-child(n + 73) {
  border-bottom: none;
}

.howto-tutorial-cell.is-conflict {
  background-color: var(--board-cell-bad, rgba(180, 35, 24, 0.14));
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    color-mix(in srgb, var(--board-digit-bad, var(--bad, #b42318)) 16%, transparent) 3px,
    color-mix(in srgb, var(--board-digit-bad, var(--bad, #b42318)) 16%, transparent) 5px
  );
  color: var(--board-digit-bad, var(--bad, #b42318));
  box-shadow: inset 0 -3px 0 0 var(--board-digit-bad, var(--bad, #b42318));
}

.howto-tutorial-cell.is-selected.is-conflict {
  outline: 2px solid var(--sel, #956300);
  outline-offset: -4px;
}

/* Killer cages: same pastel fills and dotted walls as live play. */
.howto-tutorial-killer .howto-tutorial-cell[data-cage="a"] { --cage-hue: var(--indigo); }
.howto-tutorial-killer .howto-tutorial-cell[data-cage="b"] { --cage-hue: var(--vermillon); }
.howto-tutorial-killer .howto-tutorial-cell[data-cage="c"] { --cage-hue: var(--matcha); }
.howto-tutorial-killer .howto-tutorial-cell[data-cage="d"] { --cage-hue: #B47A19; }
.howto-tutorial-killer .howto-tutorial-cell[data-cage="e"] { --cage-hue: #8D5BB0; }
.howto-tutorial-killer .howto-tutorial-cell[data-cage="f"] { --cage-hue: #238F96; }

.howto-tutorial-killer .howto-tutorial-cell[data-cage] {
  --cage-color: color-mix(in srgb, var(--cage-hue) 14%, var(--board-cell, var(--cell, #fff9e8)));
  --cage-border: color-mix(in srgb, var(--cage-hue) 48%, var(--line));
  background-color: var(--cage-color);
  overflow: visible;
}

.howto-tutorial-killer .howto-tutorial-cell.is-highlight:not(.is-selected):not(.is-conflict) {
  background-color: color-mix(in srgb, var(--gold, #c9a227) 22%, var(--cage-color, var(--cell, #fff9e8)));
  background-image: none;
}

.howto-tutorial-killer .howto-tutorial-cell.is-selected:not(.is-conflict) {
  background-color: var(--board-cell-sel, var(--sel-bg, rgba(149, 99, 0, 0.12)));
  background-image: none;
}

.howto-tutorial-killer .howto-tutorial-cell.is-conflict {
  background-color: var(--board-cell-bad, rgba(180, 35, 24, 0.14));
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    color-mix(in srgb, var(--board-digit-bad, var(--bad, #b42318)) 16%, transparent) 3px,
    color-mix(in srgb, var(--board-digit-bad, var(--bad, #b42318)) 16%, transparent) 5px
  );
  color: var(--board-digit-bad, var(--bad, #b42318));
  box-shadow: inset 0 -3px 0 0 var(--board-digit-bad, var(--bad, #b42318));
}

.howto-tutorial-killer .cage-sum {
  position: absolute;
  top: 1px;
  left: 2px;
  z-index: 5;
  padding: 0 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--board-cell, var(--cell, #fff9e8)) 88%, transparent);
  color: var(--board-cage-sum, var(--ink-strong, #241a14));
  font-family: var(--font-digits, inherit);
  font-size: clamp(0.5rem, 1.6vw, 0.68rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}

.howto-tutorial-killer .howto-tutorial-cell.has-cage-sum .digit {
  padding-top: 0.45em;
}

.howto-tutorial-killer .cw {
  position: absolute;
  z-index: 1;
  background: transparent;
  border-color: var(--cage-border, var(--board-cage, var(--ink-strong, #241a14)));
  border-style: dotted;
  pointer-events: none;
}

.howto-tutorial-killer .cw.n {
  top: 2px;
  left: 2px;
  right: 2px;
  height: 0;
  width: auto;
  border-top-width: 1px;
  border-top-style: dotted;
}

.howto-tutorial-killer .cw.s {
  bottom: 2px;
  left: 2px;
  right: 2px;
  height: 0;
  width: auto;
  border-bottom-width: 1px;
  border-bottom-style: dotted;
}

.howto-tutorial-killer .cw.w {
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 0;
  height: auto;
  border-left-width: 1px;
  border-left-style: dotted;
}

.howto-tutorial-killer .cw.e {
  top: 2px;
  bottom: 2px;
  right: 2px;
  width: 0;
  height: auto;
  border-right-width: 1px;
  border-right-style: dotted;
}

.howto-tutorial-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.howto-tutorial-actions .tutorial-next-btn {
  min-height: 48px;
  min-width: min(100%, 14rem);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
}

.howto-tutorial-cell.is-given.is-locked {
  opacity: 0.38;
  color: color-mix(in srgb, var(--entry, var(--board-digit, #1d4ed8)) 55%, var(--muted));
}

.howto-tutorial-complete {
  margin: 0 0 12px;
  color: var(--muted);
}

.howto-tutorial-done .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

/* Tablet and up: keypad sits beside the board, same split as Binary play from 761px. */
@media (min-width: 761px) {
  .howto-tutorial-binary,
  .howto-tutorial-play,
  .howto-tutorial-suguru,
  .howto-tutorial-digits {
    grid-template-columns: minmax(0, 320px) minmax(168px, 220px);
    justify-content: center;
    justify-items: stretch;
    align-items: center;
  }

  .howto-tutorial-binary-grid,
  .howto-tutorial-kakuro-grid,
  .howto-tutorial-futoshiki-grid,
  .howto-tutorial-suguru-grid,
  .howto-tutorial-digits-grid,
  .howto-tutorial-sky-grid,
  .howto-tutorial-yakazu-grid,
  .howto-tutorial-keypad,
  .howto-tutorial-binary .howto-tutorial-keypad,
  .howto-tutorial-suguru .howto-tutorial-keypad {
    width: 100%;
  }
}

/* Phone stack. Columns may shrink so a long Clear label does not overflow. */
@media (max-width: 760px) {
  .howto-tutorial-shell {
    padding: 12px;
  }

  .howto-tutorial-binary,
  .howto-tutorial-play,
  .howto-tutorial-suguru,
  .howto-tutorial-digits {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .howto-tutorial-binary-grid,
  .howto-tutorial-kakuro-grid,
  .howto-tutorial-futoshiki-grid,
  .howto-tutorial-suguru-grid,
  .howto-tutorial-digits-grid,
  .howto-tutorial-sky-grid,
  .howto-tutorial-yakazu-grid,
  .howto-tutorial-keypad,
  .howto-tutorial-binary .howto-tutorial-keypad,
  .howto-tutorial-suguru .howto-tutorial-keypad {
    width: min(100%, 360px);
  }

  .howto-tutorial-actions {
    justify-content: stretch;
  }

  .howto-tutorial-actions .btn,
  .howto-tutorial-done .btn {
    width: 100%;
  }
}
/* Codebreaker teaching board. Same tokens as live play (board cell, entry ink,
   exact/misplaced marks, digit face). Scoped here because play-shell.css is
   bound to body.ds-codebreaker and is not loaded on how-to pages. */
.howto-tutorial-codebreaker {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.howto-tutorial-codebreaker-play {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  align-items: center;
}

.howto-tutorial-codebreaker-board {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, 360px);
  padding: 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  background: color-mix(in srgb, var(--game-codebreaker, #E07A5F) 7%, var(--board-cell, var(--paper-bright)));
}

.howto-tutorial-codebreaker .cb-label {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 62%, var(--paper));
}

.howto-tutorial-codebreaker .cb-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.howto-tutorial-codebreaker .cb-slot {
  width: clamp(2.2rem, 11vw, 3rem);
  height: clamp(2.5rem, 12vw, 3.3rem);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--board-line-strong, var(--ink));
  border-radius: var(--radius-sm, 8px);
  background: var(--board-cell, var(--paper-bright));
  color: var(--board-entry, var(--ink));
  font-family: var(--font-digits);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "zero" 0;
  font-size: clamp(1.15rem, 4.5vw, 1.5rem);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.howto-tutorial-codebreaker .cb-slot-hidden {
  background: color-mix(in srgb, var(--paper) 70%, var(--paper-bright));
  color: color-mix(in srgb, var(--ink) 42%, var(--paper));
  border-style: dashed;
  cursor: default;
  min-height: 36px;
}

.howto-tutorial-codebreaker .cb-slot.is-next,
.howto-tutorial-codebreaker .cb-slot.is-focus,
.howto-tutorial-codebreaker .cb-slot[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2.5px var(--cta);
  background: color-mix(in srgb, var(--cta) 20%, var(--board-cell, var(--paper-bright)));
  border-color: var(--cta);
}

.howto-tutorial-codebreaker .cb-slot.is-highlight:not(.is-next) {
  background: color-mix(in srgb, var(--cta) 16%, var(--board-cell, var(--paper-bright)));
}

.howto-tutorial-codebreaker .cb-slot.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button {
  font-family: var(--font-digits);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "zero" 0;
  touch-action: manipulation;
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button.is-backspace {
  grid-column: span 2;
  font-family: inherit;
  font-feature-settings: normal;
  font-size: 0.85rem;
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button.is-highlight {
  box-shadow: inset 0 0 0 2px var(--gold, #c9a227);
  background: var(--gold-wash, rgba(201, 162, 39, 0.16));
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button.is-highlight:disabled {
  opacity: 1;
  color: color-mix(in srgb, var(--ink) 48%, var(--paper));
  cursor: not-allowed;
}

.howto-tutorial-codebreaker .howto-tutorial-keypad button.is-press {
  background: color-mix(in srgb, var(--cta) 16%, var(--paper-bright, var(--board-cell)));
}

.howto-tutorial-codebreaker .cb-legend {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 68%, var(--paper));
}

.howto-tutorial-codebreaker .cb-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.howto-tutorial-codebreaker .cb-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.3rem 0.45rem;
  min-width: 0;
  font-family: var(--font-digits);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "zero" 0;
}

.howto-tutorial-codebreaker .cb-ord {
  flex: 0 0 auto;
  width: 1.15rem;
  color: color-mix(in srgb, var(--ink) 55%, var(--paper));
  font-size: 0.75rem;
}

.howto-tutorial-codebreaker .cb-digits {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  white-space: nowrap;
}

.howto-tutorial-codebreaker .cb-dots {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.16rem;
}

.howto-tutorial-codebreaker .cb-dot {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border-radius: 50%;
  box-sizing: border-box;
}

.howto-tutorial-codebreaker .cb-dot.is-exact {
  background: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
}

.howto-tutorial-codebreaker .cb-dot.is-misplaced {
  background: color-mix(in srgb, var(--cta) 28%, var(--paper-bright));
  border: 2.5px solid var(--cta);
}

.howto-tutorial-codebreaker .is-region-highlight {
  background: color-mix(in srgb, var(--cta) 12%, transparent);
  border-radius: var(--radius-sm, 8px);
}

.howto-tutorial-codebreaker .is-region-focus {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
  border-radius: var(--radius-sm, 8px);
}

@media (min-width: 761px) {
  .howto-tutorial-codebreaker-play {
    grid-template-columns: minmax(0, 1fr) minmax(168px, 220px);
    justify-content: center;
    justify-items: stretch;
  }

  .howto-tutorial-codebreaker-board,
  .howto-tutorial-codebreaker .howto-tutorial-keypad {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .howto-tutorial-codebreaker .cb-slot {
    width: clamp(1.9rem, 9.5vw, 2.6rem);
    height: clamp(2.1rem, 10vw, 2.8rem);
    font-size: clamp(1rem, 4vw, 1.28rem);
  }

  .howto-tutorial-codebreaker .cb-digits {
    letter-spacing: 0.05em;
    font-size: 0.88rem;
  }

  .howto-tutorial-codebreaker .cb-dot {
    width: 0.62rem;
    height: 0.62rem;
  }

  .howto-tutorial-codebreaker .cb-legend {
    font-size: 0.75rem;
    line-height: 1.25;
  }
}
/* Shikaku — same region tones and edge geometry as prototype/shikaku/styles.css. */
.howto-tutorial-shikaku {
  display: grid;
  justify-items: center;
  width: 100%;
}

.howto-tutorial-shikaku-grid {
  display: grid;
  width: min(100%, 320px);
  aspect-ratio: 1;
  touch-action: none;
  border: 3px solid var(--board-line-strong, var(--ink));
  background: var(--board-cell, var(--cell));
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.howto-tutorial-shikaku .howto-tutorial-cell {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--board-line, var(--line)) 62%, transparent);
  background-color: var(--board-cell, var(--cell));
  color: var(--ink);
  font-weight: 800;
  min-height: 44px;
}

.howto-tutorial-shikaku .howto-tutorial-cell .clue {
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 800;
  color: var(--ink);
}

.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-0 { background-color: color-mix(in srgb, #D96557 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-1 { background-color: color-mix(in srgb, #D7A11E 31%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-2 { background-color: color-mix(in srgb, #6C9F45 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-3 { background-color: color-mix(in srgb, #319A8D 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-4 { background-color: color-mix(in srgb, #4F7DC2 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-5 { background-color: color-mix(in srgb, #6E62B5 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-6 { background-color: color-mix(in srgb, #A15AB1 30%, var(--board-cell, var(--cell))); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-tone-7 { background-color: color-mix(in srgb, #C65386 30%, var(--board-cell, var(--cell))); }

.howto-tutorial-shikaku .howto-tutorial-cell.region-edge-top { border-top: 3px solid var(--board-line-strong, var(--ink)); }
.howto-tutorial-shikaku .howto-tutorial-cell.region-edge-left { border-left: 3px solid var(--board-line-strong, var(--ink)); }

.howto-tutorial-shikaku .howto-tutorial-cell.is-drag,
.howto-tutorial-shikaku .howto-tutorial-cell.is-anchor {
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19D65A);
  background-color: var(--board-cell-sel, var(--cell));
}

.howto-tutorial-shikaku .howto-tutorial-cell.is-conflict {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    color-mix(in srgb, var(--bad, #b42318) 28%, transparent) 2px,
    color-mix(in srgb, var(--bad, #b42318) 28%, transparent) 5px
  );
}
.howto-tutorial-shikaku .howto-tutorial-cell.is-area-mismatch {
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, color-mix(in srgb, var(--bad, #b42318) 30%, transparent) 3px, color-mix(in srgb, var(--bad, #b42318) 30%, transparent) 6px);
}

/* Suguru — same tints and four-sided walls as prototype/suguru/styles.css. */
.howto-tutorial-suguru {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
  align-items: center;
}

.howto-tutorial-suguru-grid {
  display: grid;
  width: min(100%, 280px);
  aspect-ratio: 1;
  border: 2px solid var(--board-line-strong, var(--ink));
  background: var(--board-cell, var(--cell));
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.howto-tutorial-suguru .howto-tutorial-cell {
  position: relative;
  font-weight: 650;
  color: var(--ink);
  background-color: var(--board-cell, var(--cell));
  background-image:
    var(--suguru-wall-n, linear-gradient(transparent, transparent)),
    var(--suguru-wall-e, linear-gradient(transparent, transparent)),
    var(--suguru-wall-s, linear-gradient(transparent, transparent)),
    var(--suguru-wall-w, linear-gradient(transparent, transparent));
  background-position: top, right, bottom, left;
  background-size:
    100% var(--suguru-wall-size, 2px),
    var(--suguru-wall-size, 2px) 100%,
    100% var(--suguru-wall-size, 2px),
    var(--suguru-wall-size, 2px) 100%;
  background-repeat: no-repeat;
  border: 0;
  border-top: 1px solid var(--board-line, var(--line));
  border-left: 1px solid var(--board-line, var(--line));
  padding: 0;
  font-family: inherit;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  min-height: 44px;
}

.howto-tutorial-suguru .howto-tutorial-cell.is-given {
  font-weight: 800;
  color: var(--board-given, var(--ink));
  cursor: default;
}

.howto-tutorial-suguru .howto-tutorial-cell.tint-1 { background-color: color-mix(in srgb, #D45E3D 10%, var(--board-cell, var(--cell))); }
.howto-tutorial-suguru .howto-tutorial-cell.tint-2 { background-color: color-mix(in srgb, #C88708 10%, var(--board-cell, var(--cell))); }
.howto-tutorial-suguru .howto-tutorial-cell.tint-3 { background-color: color-mix(in srgb, #2E8B7A 10%, var(--board-cell, var(--cell))); }
.howto-tutorial-suguru .howto-tutorial-cell.tint-4 { background-color: color-mix(in srgb, #3547B3 10%, var(--board-cell, var(--cell))); }
.howto-tutorial-suguru .howto-tutorial-cell.tint-5 { background-color: color-mix(in srgb, #6B5B95 10%, var(--board-cell, var(--cell))); }
.howto-tutorial-suguru .howto-tutorial-cell.tint-6 { background-color: color-mix(in srgb, #E07A5F 10%, var(--board-cell, var(--cell))); }

.howto-tutorial-suguru .howto-tutorial-cell.wall-n { --suguru-wall-n: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink))); }
.howto-tutorial-suguru .howto-tutorial-cell.wall-e { --suguru-wall-e: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink))); }
.howto-tutorial-suguru .howto-tutorial-cell.wall-s { --suguru-wall-s: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink))); }
.howto-tutorial-suguru .howto-tutorial-cell.wall-w { --suguru-wall-w: linear-gradient(var(--board-line-strong, var(--ink)), var(--board-line-strong, var(--ink))); }

.howto-tutorial-suguru .howto-tutorial-keypad {
  grid-template-columns: repeat(2, minmax(44px, 1fr));
}

.howto-tutorial-suguru .howto-tutorial-keypad button.ghost {
  grid-column: 1 / -1;
}

.howto-tutorial-shikaku .howto-tutorial-cell.is-highlight,
.howto-tutorial-suguru .howto-tutorial-cell.is-highlight {
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--gold, var(--accent)) 75%, transparent);
}

.howto-tutorial-shikaku .howto-tutorial-cell.is-focus,
.howto-tutorial-suguru .howto-tutorial-cell.is-focus {
  box-shadow: none;
  outline: 2px solid var(--gold, var(--accent));
  outline-offset: -4px;
}

.howto-tutorial-shikaku .howto-tutorial-cell.is-selected,
.howto-tutorial-suguru .howto-tutorial-cell.is-selected {
  outline: none;
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19D65A);
  background-color: var(--board-cell-sel, var(--cell));
  z-index: 1;
}

.howto-tutorial-cell.is-constraint {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
}

.howto-tutorial-suguru .howto-tutorial-cell.is-conflict {
  color: var(--bad, #b42318);
  box-shadow: inset 0 -3px 0 0 var(--bad, #b42318);
}

.howto-tutorial-suguru .howto-tutorial-cell.is-selected.is-conflict {
  box-shadow:
    inset 0 0 0 2.5px var(--play-ring-active, #19D65A),
    inset 0 -3px 0 0 var(--bad, #b42318);
}

.howto-tutorial-shikaku .howto-tutorial-cell.is-drag,
.howto-tutorial-shikaku .howto-tutorial-cell.is-anchor {
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19D65A);
  background-color: var(--board-cell-sel, var(--cell));
}

.howto-tutorial-sky-grid,
.howto-tutorial-yakazu-grid {
  display: grid;
  width: min(100%, 320px);
  aspect-ratio: 1;
  gap: 0;
  border: 3px solid var(--grid-strong, #3a2d22);
  border-radius: 6px;
  background: var(--grid-strong, #3a2d22);
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.howto-tutorial-sky-corner,
.howto-tutorial-sky-clue {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  background: var(--paper, var(--bg, #fffaf2));
  color: var(--ink-strong, #241a14);
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(0.75rem, 3vw, 1rem);
}

.howto-tutorial-sky-clue.is-highlight {
  outline: 2px solid var(--gold, var(--accent));
  outline-offset: -3px;
  background: var(--gold-wash, color-mix(in srgb, var(--gold, var(--accent)) 18%, var(--paper, #fffaf2)));
}

.howto-tutorial-sky .howto-tutorial-cell,
.howto-tutorial-yakazu .howto-tutorial-cell {
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--board-cell, var(--cell, #fffaf0));
  color: var(--board-entry, var(--entry, #1d4ed8));
}

.howto-tutorial-sky .howto-tutorial-cell.is-given,
.howto-tutorial-yakazu .howto-tutorial-cell.is-given {
  color: var(--board-given, var(--ink-strong, #241a14));
  font-weight: 800;
}

.howto-tutorial-sky .howto-tutorial-cell.is-selected,
.howto-tutorial-yakazu .howto-tutorial-cell.is-selected {
  outline: none;
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19D65A);
  background-color: var(--board-cell-sel, var(--cell));
  z-index: 1;
}

.howto-tutorial-sky .howto-tutorial-cell.is-conflict,
.howto-tutorial-yakazu .howto-tutorial-cell.is-conflict {
  box-shadow: inset 0 -3px 0 0 var(--bad, #b42318);
}

.howto-tutorial-sky .howto-tutorial-cell.is-selected.is-conflict,
.howto-tutorial-yakazu .howto-tutorial-cell.is-selected.is-conflict {
  box-shadow:
    inset 0 0 0 2.5px var(--play-ring-active, #19D65A),
    inset 0 -3px 0 0 var(--bad, #b42318);
}

.howto-tutorial-yakazu .howto-tutorial-cell.is-black {
  background: #241a14;
  cursor: default;
  box-shadow: none;
}

.howto-tutorial-sky .howto-tutorial-keypad button.ghost,
.howto-tutorial-yakazu .howto-tutorial-keypad button.ghost {
  grid-column: 1 / -1;
}

/* One shared column for the intro and exercise, independent of library flex chrome. */
/* Top gap is the shared 12px crumb margin (site-chrome.css). Do not add band padding-top. */
body.ds-shell[data-v2-page="tutorial"] .page > .band { padding: 0; background: transparent; }
body.ds-shell[data-v2-page="tutorial"] .page > :is(.lib-breadcrumb, nav.view-nav[data-game-views], .band, .section) {
  box-sizing: border-box;
  width: var(--teaching-content-width, min(1400px, calc(100vw - 2 * clamp(16px, 2vw, 28px))));
  max-width: none;
  margin-inline: auto;
}
@media (max-width: 767px) {
  body.ds-shell[data-v2-page="tutorial"] .page > :is(.lib-breadcrumb, nav.view-nav[data-game-views], .band, .section) {
    width: var(--mobile-content-width, 95%);
  }
}
/* Per-game play-shell.css sets `.actions { order: 3 }` for mobile play controls; tutorial view nav also uses `.actions`. */
body.ds-shell[data-v2-page="tutorial"] .page > nav.view-nav[data-game-views] { order: 0 !important; }
body.ds-shell[data-v2-page="tutorial"] .band .lib-hero {
  display: block;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
  min-height: 0;
  padding: 16px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
}
body.ds-shell[data-v2-page="tutorial"] .lib-hero-copy { width: 100%; min-width: 0; }
body.ds-shell[data-v2-page="tutorial"] :is(.page-title, .teaching-page-title) {
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  line-height: 1.2;
  margin: 0 0 8px;
}
body.ds-shell[data-v2-page="tutorial"] .lib-hero-copy .lede-tight {
  display: block;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}
body.ds-shell[data-v2-page="tutorial"] .page > .section {
  padding: 12px 0 32px;
}
body.ds-shell[data-v2-page="tutorial"] .lib-hero-actions { display: none !important; }
body.ds-shell[data-v2-page="tutorial"] :is(.howto-tutorial-mount, .howto-tutorial-shell) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.tutorial-grid-gate { position: relative; }
.tutorial-grid-gate > .howto-tutorial-idle {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 8px;
  background: color-mix(in srgb, var(--paper-bright, #fff8e7) 55%, transparent);
  border-radius: inherit;
}
.howto-tutorial-idle .btn { max-width: 100%; white-space: normal; text-align: center; }
.howto-tutorial-reset-row { display: flex; justify-content: center; }
.howto-tutorial-reset-row .btn { flex: 0 1 auto; min-height: 44px; margin-top: 12px; }
[data-tutorial-reset][hidden] { display: none !important; }
.howto-tutorial-shell.is-idle [data-tutorial-gate-inert] { pointer-events: none; }
.howto-tutorial-shell, .howto-tutorial-mount > details {
  background: var(--paper-bright);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 12px);
  padding: 16px;
}
.howto-tutorial-mount > details { margin-top: 12px; }
.howto-tutorial-mount summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; font-weight: 600; }
.howto-tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}
.howto-tutorial-actions .btn,
.howto-tutorial-idle .btn,
.howto-tutorial-done .btn,
.tutorial-bravo-actions .btn {
  min-height: 44px;
  min-width: 44px;
}
[data-tutorial-reset] { margin-top: 12px; }

.howto-tutorial-idle[hidden],
.howto-tutorial-done[hidden],
[data-tutorial-prompt][hidden],
[data-tutorial-actions][hidden],
[data-tutorial-free-note][hidden],
[data-tutorial-easy-fallback][hidden],
.tutorial-bravo[hidden] { display: none !important; }
.howto-tutorial-prompt,
.howto-tutorial-head { margin-bottom: 12px; }
.howto-tutorial-instruction {
  min-height: var(--tutorial-instruction-min, auto);
  max-height: var(--tutorial-instruction-max, none);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.howto-tutorial-done {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.howto-tutorial-free-note,
.tutorial-easy-fallback {
  flex: 1 0 100%;
  margin: 0;
  line-height: 1.45;
}
.tutorial-bravo {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background: #24170fb3;
  box-sizing: border-box;
}
.tutorial-bravo[hidden] { display: none !important; }
.tutorial-bravo-card {
  position: relative;
  width: min(100%, 420px);
  padding: 26px 20px 20px;
  border: 1px solid #bc8d40;
  border-radius: var(--radius-md, 12px);
  background: radial-gradient(ellipse at 0 0, #eebf5540, transparent 65%), var(--paper-bright, #fff8e7);
  color: var(--ink, #24170f);
  box-shadow: 0 24px 80px #35200d66;
  overflow: hidden;
}
.tutorial-bravo-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #956222, #ffe4a0, #c59438);
}
.tutorial-bravo-card h2 {
  margin: 8px 40px 12px 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.tutorial-bravo-card p { margin: 0 0 16px; line-height: 1.5; }
.tutorial-bravo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tutorial-bravo-actions .btn { flex: 1 1 160px; }
.tutorial-bravo-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper-bright, #fff8e7) 82%, transparent);
  font-size: 0;
}
.tutorial-bravo-close::after { content: "×"; font-size: 28px; line-height: 1; color: var(--ink, #24170f); }
.tutorial-bravo .win-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.tutorial-bravo .win-sparkles i {
  position: absolute;
  top: 0;
  left: calc(7% * var(--i));
  color: #d9940d;
  font-style: normal;
  font-size: 18px;
  animation: tutorial-bravo-sparkle 1100ms ease-out both;
  animation-delay: calc(var(--i) * 16ms);
}
.tutorial-bravo .win-sparkles i:nth-child(3n) { color: #b8812d; }
.tutorial-bravo .win-sparkles i:nth-child(3n + 1) { color: #f6d78a; }
@keyframes tutorial-bravo-sparkle {
  from { opacity: 0; transform: translateY(-10px) rotate(0); }
  25% { opacity: 1; }
  to { opacity: 0; transform: translateY(150px) rotate(150deg); }
}
@media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) {
  .tutorial-bravo .win-sparkles { display: none !important; }
}
@media (max-width: 760px) {
  .howto-tutorial-actions .btn,
  .howto-tutorial-done .btn,
  .tutorial-bravo-actions .btn { flex: 1 1 140px; }
}
/* Non-pedagogical play chrome on every activated tutorial, not on new games. */
:is(body[data-v2-page="tutorial"], .howto-tutorial-mount) .tutorial-play-surface :is(
  .toolbar, #meta, .meta, .clock, #timer, #pause, #pauseOverlay,
  .play-premium-slot, #win, #debug, #debugToggle, #startGate, .board-loading,
  .play-breadcrumb, .play-hero-card, #playContext, #newGame, #restart,
  #clearSession, #confirmDrafts, #bandField, #sizeField, #band, #size, #bandPill, #scorePill
) {
  display: none !important;
}
.howto-tutorial-futoshiki .board {
  width: min(100%, 360px);
  aspect-ratio: 1;
  min-height: 0;
}
.howto-tutorial-futoshiki .cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.howto-tutorial-futoshiki .is-focus { outline: 2px solid var(--play-ring-active); outline-offset: -2px; }
.howto-tutorial-futoshiki .howto-tutorial-keypad {
  width: min(100%, 360px);
  grid-template-columns: repeat(4, minmax(44px, 1fr));
}
.howto-tutorial-futoshiki .howto-tutorial-keypad button {
  min-height: 44px;
  background: var(--keypad-key-bg, var(--paper-wash));
  border: 1px solid var(--keypad-key-border, var(--line));
  color: var(--ink);
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-digits);
}
.howto-tutorial-futoshiki .howto-tutorial-keypad .ghost { grid-column: 1 / -1; }
.howto-tutorial button:focus-visible { outline: 2px solid var(--play-ring-active); outline-offset: 2px; }
/* Locked teaching cells remain readable and keep identical SSR/attached geometry. */
.howto-tutorial-futoshiki .cell.is-locked { opacity: 1; }
body[data-v2-page="tutorial"] .lib-hero-actions { margin-bottom: 0; }
body[data-v2-page="tutorial"] .lib-hero .lede-tight { font-size: .95rem; }
body[data-v2-page="tutorial"] #libList > nav {
  padding: 12px 16px;
  border-radius: var(--radius-md, 12px);
  background: var(--paper-bright);
  border: 1px solid var(--line);
}
body[data-v2-page="tutorial"] #libList > nav a { color: var(--ink); min-height: 44px; align-content: center; }

/* All tutorial title marks are icons, never full-size play boards. */
body.ds-shell[data-v2-page="tutorial"] .teaching-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body.ds-shell[data-v2-page="tutorial"] .teaching-page-title-icon {
  display: inline-flex;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.ds-shell[data-v2-page="tutorial"] .teaching-page-title-icon svg,
body.ds-shell[data-v2-page="tutorial"] .teaching-page-title-icon .game-icon {
  display: block;
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px;
}
body.ds-shell[data-v2-page="tutorial"] .teaching-page-title-text {
  min-width: 0;
}
body.ds-shell[data-v2-page="tutorial"] .lib-hero-copy .lede-tight,
body.ds-shell[data-v2-page="tutorial"] .lib-hero-copy [data-ssr="v2-lede"] {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  max-height: none;
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell,
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-mount,
body.ds-shell[data-v2-page="tutorial"] .tutorial-play-surface[data-tutorial-pedagogy="board"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-active,
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-board {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.howto-tutorial-mount .tutorial-play-surface #playMain.puzzle-page-shell {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.howto-tutorial-mount .tutorial-play-surface #playMain.puzzle-page-shell .play {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  gap: 12px !important;
}
.howto-tutorial-mount .tutorial-play-surface :is(
  .toolbar, #meta, .meta, .clock, .cb-head, .play-premium-slot, #win, #pauseOverlay,
  #debug, #debugToggle, .board-legend, .cb-legend, #startGate, .board-loading,
  .play-breadcrumb, .play-hero-card, #playContext, #newGame, #restart, #undoBtn,
  #notesBtn, #clearSession, #confirmDrafts, #bandField, #sizeField
) {
  display: none !important;
}
.howto-tutorial-mount .tutorial-play-surface #playMain .play > .board-wrap,
.howto-tutorial-mount .tutorial-play-surface #playMain .play > .side,
.howto-tutorial-mount .tutorial-play-surface #playMain .play-keypad-stack,
.howto-tutorial-mount .tutorial-play-surface #playMain .keypad {
  box-sizing: border-box !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: min(100%, var(--tutorial-board-width, 480px)) !important;
  max-width: var(--tutorial-board-width, 480px) !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  order: 0 !important;
}
.howto-tutorial-mount .tutorial-play-surface #playMain .board-wrap {
  padding: 8px !important;
  height: auto !important;
}
.howto-tutorial-mount .tutorial-play-surface #playMain .board-wrap > .board {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-inline: auto !important;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #keypad.is-binary-keypad {
  grid-template-columns: repeat(3, minmax(44px, 1fr)) !important;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #board .cell {
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 0 !important;
  min-width: 0;
  min-height: 0;
  text-align: center;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "zero" 0, "lnum" 1, "tnum" 1;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #board .cell > .cell-numeral {
  display: grid !important;
  place-items: center !important;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  line-height: 1 !important;
  text-align: center;
  font-size: min(calc(0.62 * 100cqi), 2.25rem) !important;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "zero" 0, "lnum" 1, "tnum" 1;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #keypad .keypad-digit {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "zero" 0, "lnum" 1, "tnum" 1;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #board .cell.is-tutorial-focus {
  box-shadow: inset 0 0 0 2.5px var(--play-ring-active, #19D65A);
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #board .cell.is-tutorial-locked {
  cursor: not-allowed;
}
body[data-v2-page="tutorial"][data-game="binary-puzzle"] .tutorial-play-surface[data-tutorial-pedagogy="board"] #board .cell.given {
  cursor: default;
}

/* A small Binary teaching grid retains its established cell scale. */
.howto-tutorial-shell[data-tutorial-game="binary-puzzle"] { --tutorial-board-width: 280px; }

/* A stable, bounded live rule slot: errors never move the board. */
.howto-tutorial-error {
  box-sizing: border-box;
  height: 2.7em;
  line-height: 1.35;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.howto-tutorial-head > .tutorial-next-btn { margin-top: 8px; min-height: 44px; }
.howto-tutorial-actions { display: flex; justify-content: center; gap: 12px; }
.howto-tutorial-actions [data-tutorial-back] { order: -1; }
.howto-tutorial-actions > button { min-height: 44px; }
.tutorial-daily-link { display: block; margin-top: 16px; text-align: center; }

body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-actions,
.howto-tutorial-shell .howto-tutorial-actions { flex-wrap: nowrap; align-items: stretch; gap: 12px; }
.howto-tutorial-shell .howto-tutorial-actions > .btn {
  flex: 0 0 auto; width: min(140px, calc((100% - 12px) / 2)); min-width: 0; margin-top: 0;
  box-sizing: border-box; height: 44px; padding: 4px 6px;
  font-size: .9rem; line-height: 1.15; white-space: normal;
}

/* The runner locks this to the tallest instruction in the current language. */
.howto-tutorial-instruction {
  min-height: var(--tutorial-instruction-min, auto);
  max-height: var(--tutorial-instruction-max, none);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.howto-tutorial-head > .tutorial-next-btn.is-tutorial-reserved {
  visibility: hidden;
  pointer-events: none;
}
.howto-tutorial-head { margin-bottom: clamp(8px, 2vw, 16px); }
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell .tutorial-daily-link {
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: min(140px, calc((100% - 12px) / 2)); max-width: 100%; min-height: 44px;
  margin: 12px auto 0; padding: 4px 6px; font-size: .9rem; line-height: 1.15;
}
.tutorial-bravo-actions { justify-content: center; }
.tutorial-bravo-actions .btn { flex: 0 1 140px; }

body.ds-shell[data-v2-page="tutorial"] .tutorial-bravo-actions .btn {
  box-sizing: border-box; width: 140px; flex: 0 1 140px;
  min-height: 44px; padding: 4px 6px; font-size: .9rem; line-height: 1.15;
}

/* Shared warm CTA palette: primary Play vs neutral browse/restart destinations. */
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell :is([data-tutorial-play], .tutorial-daily-link, [data-tutorial-restart-end], [data-tutorial-reset]) {
  --tutorial-cta-bg: var(--play-cta-bg);
  --tutorial-cta-hover: var(--play-cta-hover);
  --tutorial-cta-pressed: var(--play-cta-pressed);
  --tutorial-cta-ink: var(--play-cta-ink);
  background: var(--tutorial-cta-bg);
  color: var(--tutorial-cta-ink);
  border-color: var(--play-cta-bg);
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell :is([data-tutorial-play]:not(.primary), .tutorial-daily-link, [data-tutorial-restart-end], [data-tutorial-reset]) {
  --tutorial-cta-bg: var(--play-cta-secondary-bg);
  --tutorial-cta-hover: var(--play-cta-secondary-hover);
  --tutorial-cta-pressed: var(--play-cta-secondary-pressed);
  --tutorial-cta-ink: var(--play-cta-secondary-ink);
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell :is([data-tutorial-play], .tutorial-daily-link, [data-tutorial-restart-end], [data-tutorial-reset]):hover {
  background: var(--tutorial-cta-hover);
  color: var(--tutorial-cta-ink);
  border-color: var(--play-cta-hover);
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell :is([data-tutorial-play], .tutorial-daily-link, [data-tutorial-restart-end], [data-tutorial-reset]):active {
  background: var(--tutorial-cta-pressed);
  color: var(--tutorial-cta-ink);
  border-color: var(--play-cta-pressed);
}
body.ds-shell[data-v2-page="tutorial"] .howto-tutorial-shell :is([data-tutorial-play], .tutorial-daily-link, [data-tutorial-restart-end], [data-tutorial-reset]):focus-visible {
  outline: 3px solid var(--play-cta-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--play-cta-ink);
}

/* Select-this-cell cue. Inset outline and background do not change cell size. */
@keyframes tutorial-target-pulse {
  0%, 100% {
    background-color: color-mix(in srgb, #f5c542 14%, transparent);
    outline-color: #b58116;
  }
  50% {
    background-color: color-mix(in srgb, #f5c542 48%, transparent);
    outline-color: #6a4300;
  }
}
:is(.cell, .howto-tutorial-cell, .cb-slot).is-tutorial-target-pulse {
  outline: 3px solid #b58116;
  outline-offset: -3px;
  animation: tutorial-target-pulse 1.05s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  :is(.cell, .howto-tutorial-cell, .cb-slot).is-tutorial-target-pulse {
    animation: none !important;
    outline: 3px solid #6a4300 !important;
    outline-offset: -3px !important;
    background-color: color-mix(in srgb, #f5c542 42%, transparent) !important;
  }
}

/* Higher or Lower lesson only. The live game stylesheet is not edited. */
[data-tutorial-game="higher-lower-number"] .board-higher-lower-number {
  aspect-ratio: auto;
  width: 100%;
  max-width: 28rem;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
}
[data-tutorial-game="higher-lower-number"] .hl-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}
[data-tutorial-game="higher-lower-number"] .hl-keypad .hl-key {
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  font-size: 1.1rem;
}
[data-tutorial-game="higher-lower-number"] .hl-keypad [data-hl-key="submit"] {
  grid-column: 1 / -1;
}

/* Le bon compte lesson only. The live game stylesheet is not edited. */
[data-tutorial-game="target-number"] .board-target-number {
  display: flex;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: auto;
  width: 100%;
  max-width: 28rem;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  box-sizing: border-box;
}
[data-tutorial-game="target-number"] .tn-tray,
[data-tutorial-game="target-number"] .tn-ops,
[data-tutorial-game="target-number"] .tn-actions {
  display: grid;
  gap: 8px;
  width: 100%;
}
[data-tutorial-game="target-number"] .tn-tray { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-tutorial-game="target-number"] .tn-ops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[data-tutorial-game="target-number"] .tn-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-tutorial-game="target-number"] #board button {
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}
[data-tutorial-game="target-number"] #tnCalculate { width: 100%; }
[data-tutorial-game="target-number"] .tn-target,
[data-tutorial-game="target-number"] .tn-selection,
[data-tutorial-game="target-number"] #tnHistory {
  overflow-wrap: anywhere;
  text-align: center;
}
[data-tutorial-game="target-number"] #tnHistory { text-align: start; }
[data-tutorial-game="target-number"] [data-tn-region].is-tutorial-focus {
  outline: 3px solid #b58116;
  outline-offset: 2px;
}

/* Tents lesson only. The live tents stylesheet is not edited. */
[data-tutorial-game="tents"] {
  --tents-grass: #fbf6ea;
  --tents-tree-ground: #e3f3dc;
  --tents-tent-ground: #fde4d2;
  --tents-line: #c9b494;
  --tents-canopy: #1e7a38;
  --tents-canopy-deep: #145c28;
  --tents-trunk: #6a3e22;
  --tents-canvas: #c4512a;
  --tents-canvas-deep: #9a3818;
  --tents-door: #5c2412;
}
[data-tutorial-game="tents"] #playMain {
  padding-inline: 8px;
  max-width: 100%;
}
[data-tutorial-game="tents"] #board.board-tents,
html.is-play body.ds-tents [data-tutorial-game="tents"] #board.board-tents {
  display: block;
  aspect-ratio: auto;
  width: 100%;
  max-width: 28rem;
  height: auto;
  max-height: none;
  min-height: 0;
  margin-inline: auto;
  overflow: visible;
  background: transparent;
}
[data-tutorial-game="tents"] .tents-lesson {
  display: grid;
  grid-template-columns: minmax(1.75rem, auto) repeat(4, minmax(44px, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
[data-tutorial-game="tents"] .tents-clue,
[data-tutorial-game="tents"] .tents-cell {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}
[data-tutorial-game="tents"] .tents-clue {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #2b2419;
}
[data-tutorial-game="tents"] .tents-cell {
  padding: 0;
  border: 1px solid var(--tents-line);
  border-radius: 6px;
  background: var(--tents-grass);
  color: inherit;
  cursor: pointer;
  position: relative;
}
[data-tutorial-game="tents"] .tents-cell.is-tree { background: var(--tents-tree-ground); cursor: default; }
[data-tutorial-game="tents"] .tents-cell.is-tent { background: var(--tents-tent-ground); }
[data-tutorial-game="tents"] .tents-cell.is-selected { box-shadow: inset 0 0 0 2px #3547b3; }
[data-tutorial-game="tents"] .tents-cell.is-tutorial-focus,
[data-tutorial-game="tents"] .tents-lesson.is-tutorial-focus,
[data-tutorial-game="tents"] .tents-clue.is-tutorial-focus {
  outline: 3px solid #b58116;
  outline-offset: 1px;
}
[data-tutorial-game="tents"] .tents-mark {
  width: 70%;
  height: 70%;
  display: block;
  pointer-events: none;
}
[data-tutorial-game="tents"] .tents-canopy { fill: var(--tents-canopy); }
[data-tutorial-game="tents"] .tents-canopy-deep { fill: var(--tents-canopy-deep); }
[data-tutorial-game="tents"] .tents-trunk { fill: var(--tents-trunk); }
[data-tutorial-game="tents"] .tents-canvas { fill: var(--tents-canvas); }
[data-tutorial-game="tents"] .tents-canvas-shade { fill: var(--tents-canvas-deep); }
[data-tutorial-game="tents"] .tents-door { fill: var(--tents-door); }
[data-tutorial-game="tents"] .tents-pole {
  fill: none;
  stroke: var(--tents-door);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Minesweeper lesson only. The live minesweeper stylesheet is not edited. */
[data-tutorial-game="minesweeper"] #board.board-minesweeper,
html.is-play body.ds-minesweeper [data-tutorial-game="minesweeper"] #board.board-minesweeper {
  display: block;
  aspect-ratio: auto;
  width: 100%;
  max-width: 22rem;
  height: auto;
  max-height: none;
  min-height: 0;
  margin-inline: auto;
  overflow: visible;
  background: transparent;
}
[data-tutorial-game="minesweeper"] .ms-mine-count {
  margin: 0 auto 8px;
  text-align: center;
  font-weight: 700;
}
[data-tutorial-game="minesweeper"] .ms-lesson {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
[data-tutorial-game="minesweeper"] .ms-cell {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  border: 1px solid #8aa37a;
  border-radius: 6px;
  background: #c5ddb4;
  color: #1c2430;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
}
[data-tutorial-game="minesweeper"] .ms-cell.is-open { background: #f7f4ec; }
[data-tutorial-game="minesweeper"] .ms-cell.is-flag { background: #f6e3c4; }
[data-tutorial-game="minesweeper"] .ms-cell.is-boom { background: #f4c7c3; }
[data-tutorial-game="minesweeper"] .ms-cell.is-selected { box-shadow: inset 0 0 0 2px #3547b3; }
[data-tutorial-game="minesweeper"] .ms-lesson-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 0;
  box-sizing: border-box;
}
[data-tutorial-game="minesweeper"] .ms-lesson-actions button {
  min-height: 44px;
  min-width: 0;
}
[data-tutorial-game="minesweeper"] .ms-cell.is-tutorial-focus,
[data-tutorial-game="minesweeper"] .ms-lesson.is-tutorial-focus {
  outline: 3px solid #b58116;
  outline-offset: 1px;
}
[data-tutorial-game="minesweeper"] .ms-flag {
  width: 58%;
  height: 58%;
  display: block;
  pointer-events: none;
}
[data-tutorial-game="minesweeper"] .ms-flag-pole {
  fill: none;
  stroke: #5c4030;
  stroke-width: 4;
  stroke-linecap: round;
}
[data-tutorial-game="minesweeper"] .ms-flag-fly { fill: #c0392b; }

/* Web-font swap must not move the lesson (CLS).
   Measured: with the web fonts blocked the French lessons shift 0.0000 at 320/390/1440; with
   them, the crumb, title, lede and the four-link bar re-wrap when Inter/Sora replace the
   system fallback (up to ~0.26 at 390). Where the fallback is DejaVu Sans (the default sans
   on Linux, wider than Inter), these faces scale it to Inter/Sora advance widths, so the
   lines wrap the same before and after the swap. Machines with Segoe UI, SF, Roboto or
   Helvetica never match a face below and keep the stack that follows. No text is clipped,
   no height is reserved, so no blank space is added after the swap. */
@font-face {
  font-family: "Inter Fallback";
  src: local("DejaVu Sans");
  font-weight: 100 599;
  size-adjust: 94%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("DejaVu Sans Bold");
  font-weight: 600 900;
  size-adjust: 85.5%;
}
@font-face {
  font-family: "Sora Fallback";
  src: local("DejaVu Sans");
  font-weight: 100 599;
  size-adjust: 100.5%;
}
@font-face {
  font-family: "Sora Fallback";
  src: local("DejaVu Sans Bold");
  font-weight: 600 900;
  size-adjust: 89.7%;
}
body.ds-shell[data-v2-page="tutorial"] {
  --font-sans: "Inter", "Inter Fallback", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Sora", "Sora Fallback", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

/* Keep the public 4×4 lesson's existing touch targets when play CSS is loaded. */
html.is-play body.ds-minesweeper [data-tutorial-game="minesweeper"] #playMain.puzzle-page-shell #board .ms-cell {
  width: 100%;
  height: 44px;
  min-height: 44px;
}

/* SEO 2026-11-03: the title row is a wrapper; the real <h1> inherits its type styles. */
.teaching-page-title > h1.teaching-page-title-text {
  margin: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  text-transform: inherit;
}
