/* Walnut and ivory number tiles */
.sudoku-board {
  --ink: #644539;
  --line: #d4beaa;
  border: 5px solid #67463a;
  border-radius: 9px;
  background: linear-gradient(118deg, #fffdf2, #faf0dd);
  box-shadow: 0 3px 0 #3e2b26, 0 8px 17px #4c2a191c;
}
.sudoku-cell { font-family: Georgia, "Times New Roman", serif; color: #a94324; }
.sudoku-cell.is-given { color: #382c29; }
.sudoku-cell.is-selected { background: #f6cf99; box-shadow: inset 0 0 0 2px #ad6130; }
.sudoku-cell.is-conflict { background: #f8c6bb; text-decoration: underline wavy #a4342b 1px; }
.sudoku-notes { font-family: system-ui, sans-serif; }
.number-pad button {
  border-color: #d6c3a9;
  background: linear-gradient(#fffdf6, #f4e7d3);
  box-shadow: inset 0 -2px #d4bda0;
  font-family: Georgia, serif;
}

/* Glazed mosaic tiles on a dot-grid backing */
.nonogram-board {
  --puzzle-rule: #614565;
  background: #e8ddec;
  box-shadow: 0 3px 0 #5b4164, 0 8px 17px #3a274716;
}
.nonogram-board::before {
  background: conic-gradient(from 45deg, #74508b 25%, #c9aecf 0 50%, #8f729f 0 75%, #decde2 0) center / 18px 18px;
}
.nonogram-grid { background: radial-gradient(#a275a71e 1px, transparent 1px) center / 7px 7px, #fffbfd; }
.nonogram-cell.is-filled {
  background: linear-gradient(142deg, #a981bf, #774b94 49%, #644082);
  box-shadow: inset 1px 2px #dfbee88a, inset -1px -2px #482d6559;
}
.nonogram-board.is-complete .nonogram-cell.is-filled { background: linear-gradient(135deg, #956aa6, #593571); }
.nonogram-clue.is-complete { background: #dbcedf; text-decoration: line-through; text-decoration-color: #84728b; }

/* Letterpress puzzle sheet */
.crossword-board {
  border: 4px solid #244a43;
  background: #36584f;
  box-shadow: 0 3px 0 #193c35, 0 7px 16px #163b2c1c;
}
.crossword-block { background: repeating-linear-gradient(135deg, #254c43 0 3px, #2d554c 3px 4px); }
.crossword-cell:not(.is-word, .is-selected, .is-mistake) { background: #fffcf1; }
.crossword-cell input { font-family: Georgia, "Times New Roman", serif; }
.crossword-current { border-left: 4px solid #327d6a; }
.crossword-clues { background: linear-gradient(90deg, #f3eddf 0 3px, #fffcf3 3px); }

/* Survey field with pressed-metal covers and a recessed open grid */
.mine-board {
  border: 4px solid #385457;
  border-radius: 8px;
  box-shadow: 0 3px 0 #243d40, 0 8px 18px #18333b20;
}
.mine-cell:not(.is-open, .is-missed) {
  background: radial-gradient(circle at 19% 20%, #e9f4ef 0 1px, transparent 1.5px),
    linear-gradient(145deg, #d3e7e0, #adcbc5 68%, #98b6af);
  box-shadow: inset 1px 2px #eff8f0ae, inset -1px -2px #547a727d;
}
.mine-cell.is-flagged { color: #942d23; text-shadow: 0 1px #fff8ef; }
.mine-cell.is-open:not(.is-mine) { background: #edf1e7; }
.mine-cell.is-exploded { background: radial-gradient(circle, #d65736, #9c3129); }

/* Two cloths, one engraved deck */
.klondike-table { --felt-light: #32664e; --felt-dark: #143f35; }
.freecell-table { --felt-light: #366677; --felt-dark: #1c3d4d; }
.card-table {
  border: 2px solid var(--felt-dark);
  background: repeating-linear-gradient(125deg, transparent 0 3px, #fff1 3px 3.5px, transparent 4px 6px),
    radial-gradient(ellipse at 38% 18%, var(--felt-light), var(--felt-dark));
  box-shadow: inset 0 0 0 3px #d6c39563, inset 0 0 0 6px #0002, 0 4px 0 var(--felt-dark);
}
.playing-card:not(.face-down, .is-selected) { background: linear-gradient(142deg, #fffef7, #fff9ea 78%, #eee1c6); }
.card-print { position: absolute; inset: 22% 26%; pointer-events: none; display: grid; place-items: stretch; }
.printed-pips { display: grid; grid-template: repeat(7, 1fr) / repeat(5, 1fr); place-items: center; }
.printed-pips i {
  width: 0; height: 0; display: grid; place-content: center;
  font: normal calc(var(--card-width) * .205)/1 Georgia, serif;
}
.printed-pips.rank-1 i { font-size: calc(var(--card-width) * .54); }
.court-seal {
  display: grid; align-content: center; justify-items: center;
  border: 1px solid #bf9a5e; outline: 1px solid #c4ab7c66; outline-offset: 2px;
  border-radius: 50% 50% 42% 42%;
  background: repeating-linear-gradient(45deg, #dfcc9f32 0 1px, transparent 1px 3px);
}
.court-seal i { font: normal calc(var(--card-width) * .35)/1 Georgia, serif; }
.court-seal b { font: normal calc(var(--card-width) * .15)/1 Georgia, serif; }
.face-down {
  background: repeating-linear-gradient(45deg, transparent 0 5px, #ffda9c91 5px 6px),
    repeating-linear-gradient(-45deg, #873d3c 0 5px, #d39572 5px 6px);
  box-shadow: inset 0 0 0 2px #784039, inset 0 0 0 3px #e8b582, 0 1px 2px #16271e80;
}
.face-down:not(.stock-button)::after {
  content: "✥"; display: grid; place-items: center; width: 48%; aspect-ratio: 1;
  border: 1px solid #e3b47b; outline: 1px solid #e3b47b; outline-offset: 2px;
  border-radius: 50%; color: #fbd294; background: #883f3e;
  font: normal calc(var(--card-width) * .32)/1 Georgia, serif;
}
.card-slot:not(.face-down) { border-color: #c2d4c3b5; box-shadow: inset 0 2px 5px #0a201e40; }

/* Backlit block wells */
.battle-board, .battle-preview-grid {
  background: #14272c;
  box-shadow: inset 0 0 0 1px #638085, 0 3px 0 #14272c;
}
.battle-board > span:not([class]), .battle-board > span[class=""] { background: #23383b; }
.battle-field-cpu .battle-board > span:not([class]), .battle-field-cpu .battle-board > span[class=""] { background: #30353f; }
.battle-board > span[class^="block-color-"], .battle-preview-grid > span[class^="block-color-"] {
  background: linear-gradient(145deg, #ffffff4a, transparent 38% 62%, #0002), var(--block-color);
  box-shadow: inset 2px 2px #ffffff62, inset -2px -2px #0004, inset 0 0 0 3px #ffffff16;
  border-radius: 3px;
}
.battle-board > .block-ghost { background: #274146; outline: 1px dashed #9ac3bb; }
.battle-stage[data-battle-status="over"] .battle-message { border-bottom: 2px solid currentColor; }

/* Illustrated shopfronts and street paving */
.market-map {
  background: repeating-linear-gradient(0deg, #ffffff45 0 1px, transparent 1px 13px),
    repeating-linear-gradient(90deg, #ffffff45 0 1px, transparent 1px 22px), #e2d5c1;
  box-shadow: 0 3px 0 #b7a48c, 0 8px 17px #52392216;
}
.market-district { background: #fff9ec70; }
.market-district.is-in-demand { background: #f9e7bc; }
.market-site { box-shadow: 0 2px 0 #69543c26; }
.market-storefront {
  display: grid; place-items: end center; height: 24px; background: linear-gradient(#ede3ce, #fff6df);
  box-shadow: 1px 2px 0 #50372b2b;
}
.market-storefront::before {
  background: repeating-linear-gradient(90deg, currentColor 0 4px, #fff6dc 4px 8px);
  box-shadow: 0 2px 0 #624c422e;
}
.market-storefront i { position: relative; z-index: 1; font: normal 14px/1.25 Georgia, serif; }
.market-occupied .market-storefront::after { display: none; }
.market-vacant .market-storefront { opacity: .7; }
.market-result-title { padding-bottom: 7px; border-bottom: 2px dotted #d8c7ae; }
@media (max-width: 440px), (681px <= width <= 860px) {
  .market-site { grid-template: auto auto auto / minmax(0, 1fr); min-height: 77px; }
  .market-storefront { grid-row: auto; width: 20px; height: 18px; }
  .market-storefront i { font-size: 10px; }
  .market-site-detail { font-size: .68rem; }
}

.tableau-pile .playing-card:not(:last-child) .card-print { visibility: hidden; }
.nonogram-clue {
  gap: .38em;
  padding-inline: 2px;
  font-size: clamp(12px, 1.9vw, 15px);
}
.crossword-board.is-complete .crossword-cell { background: #d1ebd9; }
