.sudoku-page {
  background: radial-gradient(ellipse at 70% 12%, #45386e, transparent 62%), #1a172b;
}
.word-layout .arcade-setup { grid-template-columns: auto; }
.word-console,
.sudoku-console {
  --paper: #fdfbf7;
  --pencil: #5142a8;
  --printed: #242039;
  --square: #6f5e96;
  --fine: #d8d1df;
  --alternate: #f0edf7;
  --related: #e8e2f9;
  --matching: #d9ccf5;
  --selected: #cdbcf5;
  --key-text: #3a2a80;
  --key-bg: #ede7fa;
  --key-edge: #cfc1e8;
  --secondary: #565166;
  border: 1px solid #e0d9ef;
  border-radius: 1.1rem;
  background: var(--paper);
  color: var(--printed);
  box-shadow: 0 1.6rem 4.2rem #100b26a0;
}
.word-console {
  --pencil: #08725d;
  --printed: #173b38;
  --square: #829c99;
  --fine: #cadbd4;
  --alternate: #ecf4f0;
  --related: #e0f2eb;
  --matching: #c7eade;
  --selected: #b9e6d5;
  --key-text: #0f4c40;
  --key-bg: #e5f3ec;
  --key-edge: #b9d8cc;
  --secondary: #415c57;
  border-color: #dfebe5;
}
:is(.word-console, .sudoku-console) .sudoku-board {
  border-color: var(--square);
  border-radius: .48rem;
  background: #fff;
}
:is(.word-console, .sudoku-console) .sudoku-cell {
  border-color: var(--fine);
  background: #fff;
  color: var(--pencil);
  font-weight: 720;
}
:is(.word-console, .sudoku-console) .sudoku-cell:nth-child(3n):not(:last-child) { border-right: 2.5px solid var(--square); }
:is(.word-console, .sudoku-console) .sudoku-row:nth-child(3n):not(:last-child) .sudoku-cell { border-bottom: 2.5px solid var(--square); }
:is(.word-console, .sudoku-console) .sudoku-cell:where(
  .sudoku-row:is(:nth-child(-n+3), :nth-child(n+7)) .sudoku-cell:nth-child(n+4):nth-child(-n+6),
  .sudoku-row:nth-child(n+4):nth-child(-n+6) .sudoku-cell:is(:nth-child(-n+3), :nth-child(n+7))
) { background: var(--alternate); }
:is(.word-console, .sudoku-console) .sudoku-cell.is-given { color: var(--printed); font-weight: 845; }
:is(.word-console, .sudoku-console) .sudoku-cell.is-complete { background: #faf1d6; }
:is(.word-console, .sudoku-console) .sudoku-cell.is-related { background: var(--related); }
:is(.word-console, .sudoku-console) .sudoku-cell.is-same { background: var(--matching); }
:is(.word-console, .sudoku-console) .sudoku-cell.is-selected { background: var(--selected); box-shadow: inset 0 0 0 2px var(--pencil); }
:is(.word-console, .sudoku-console) .sudoku-cell.is-hint { box-shadow: inset 0 0 0 2px #985619; }
:is(.word-console, .sudoku-console) .sudoku-cell.is-conflict { background: #ffe4e7; color: #9a2443; }
:is(.word-console, .sudoku-console) .sudoku-cell.is-selected.is-conflict { box-shadow: inset 0 0 0 2px #a62e49; }
:is(.word-console, .sudoku-console) .sudoku-cell:focus-visible { outline-color: var(--pencil); }
:is(.word-console, .sudoku-console) .sudoku-notes { color: var(--secondary); }
.sudoku-console .sudoku-progress strong, .sudoku-console .sudoku-time strong { color: var(--printed); }
.sudoku-console .sudoku-progress span, .sudoku-console .sudoku-time span { color: var(--secondary); }
.sudoku-console .sudoku-lights span { border-color: #aa99c9; background: #eae3f6; }
.sudoku-console .sudoku-lights .is-lit { border-color: #7054ba; background: #8267cb; box-shadow: none; }
:is(.sudoku-console, .word-console) :is(.sudoku-keypad, .sudoku-tools, .word-keys, .word-tools, .word-head) button {
  border-color: var(--key-edge);
  background: var(--key-bg);
  color: var(--key-text);
  box-shadow: 0 2px 0 #37275113;
}
:is(.sudoku-console, .word-console) :is(.sudoku-keypad, .sudoku-tools, .word-keys, .word-tools, .word-head) button:focus-visible { outline: 2px solid var(--pencil); outline-offset: 2px; }
:is(.sudoku-console, .word-console) :is(.sudoku-keypad, .sudoku-tools, .word-keys, .word-tools, .word-head) button:enabled:hover { background: var(--matching); }
:is(.sudoku-console, .word-console) :is(.sudoku-tools, .word-tools) button[aria-pressed="true"],
:is(.sudoku-console, .word-console) .merge-button.merge-primary { background: var(--key-text); color: #fff; }
.sudoku-console :is(.sudoku-feedback, .sudoku-status, .sudoku-hint-text),
.word-console .arcade-status { color: var(--printed); }
.sudoku-guide a { display: inline-flex; margin-top: .32rem; }
.word-head { align-items: center; color: var(--printed); }
.word-head span { display: block; color: var(--secondary); font-size: .77rem; }
.word-head button { min-height: 44px; }
.word-console .is-word-row::after {
  position: absolute;
  inset: auto 16% 2px;
  height: 2px;
  border-radius: 999px;
  background: #578d7b;
  content: "";
  pointer-events: none;
}
.word-console .is-word-row.is-complete { background: #caf0dd; }
.word-keys { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .28rem; margin-top: .66rem; }
.word-keys button { min-width: 0; min-height: 44px; padding: .2rem .05rem; font-size: 1.12rem; font-weight: 800; }
.word-keys button.is-current { outline: 2px solid var(--pencil); outline-offset: -2px; }
.word-unlock { display: grid; justify-items: center; margin-top: .75rem; padding: .65rem; border-radius: .65rem; border: 1px solid #b2ddca; background: #e5f6ee; color: #174e40; }
.word-unlock span { font-size: .79rem; }
.word-unlock strong { font-size: clamp(1.25rem, 5vw, 1.78rem); letter-spacing: .12em; }
.word-unlock p { font-size: .9rem; }
[data-words-clue] form { margin-top: .8rem; }

@media (max-width: 50rem) {
  .word-layout .arcade-setup { grid-template-columns: minmax(0, auto) auto; align-items: center; justify-content: start; gap: .34rem; }
  .word-layout .arcade-label { gap: .33rem; }
  .word-layout .arcade-label select { min-width: 0; }
  .word-layout [data-words-clue-button] { min-height: 44px; padding-inline: .5rem; font-size: .83rem; }
  .word-console, .sudoku-console { padding: .53rem; }
}
@media (max-width: 33rem) {
  .word-keys { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.sudoku-cell, .sudoku-pad button {
  transition: transform var(--xh-dur-instant, 110ms) var(--xh-ease-press, ease), background-color var(--xh-dur-fast, 180ms) var(--xh-ease-spring, ease), border-color var(--xh-dur-fast, 180ms) var(--xh-ease-spring, ease);
}
.sudoku-pad button:active:not(:disabled) { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { .sudoku-cell, .sudoku-pad button { transition: none !important; } }
.game-reduced-motion :is(.sudoku-cell, .sudoku-pad button) { transition: none !important; }
