.puzzle-game { --game-ink: var(--ink, #203640); --game-blue: #075e88; --game-paper: var(--white, #fffefa); --game-line: #9eaba8; color: var(--game-ink); max-width: 900px; }
.puzzle-game *, .puzzle-game *::before, .puzzle-game *::after { box-sizing: border-box; }
.puzzle-game .game-toolbar, .puzzle-game .game-controls { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.puzzle-game .game-toolbar { justify-content: space-between; margin-bottom: 1rem; }
.puzzle-game .game-controls { margin-top: 1rem; }
.puzzle-game .game-button, .puzzle-game .game-select { font: inherit; color: var(--game-ink); background: var(--game-paper); border: 1px solid var(--game-line); border-radius: .3rem; padding: .65rem .85rem; min-height: 44px; cursor: pointer; }
.puzzle-game .game-button:hover { background: #e6eeeb; }
.puzzle-game .game-button:disabled { opacity: .45; cursor: default; }
.puzzle-game .game-button:focus-visible, .puzzle-game .game-select:focus-visible { outline: 3px solid #bb692b; outline-offset: 3px; z-index: 3; }
.puzzle-game .game-button.is-active { background: var(--game-ink); color: white; }
.puzzle-game .game-instructions { max-width: 72ch; line-height: 1.6; font-size: .98rem; }
.puzzle-game .game-status { min-height: 3.2em; margin: 1rem 0 .5rem; font-weight: 650; line-height: 1.5; }
.puzzle-game .game-caption { font-size: .85rem; line-height: 1.55; opacity: .85; max-width: 72ch; }
.puzzle-game .sudoku-board { width: min(100%, 486px); aspect-ratio: 1; border: 3px solid var(--game-ink); background: var(--game-paper); }
.puzzle-game .sudoku-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: calc(100% / 9); }
.puzzle-game .sudoku-cell { display: flex; align-items: center; justify-content: center; border: 0; border-right: 1px solid var(--game-line); border-bottom: 1px solid var(--game-line); border-radius: 0; min-height: 0; min-width: 0; padding: 0; font-size: clamp(1.15rem, 5vw, 1.8rem); font-weight: 500; color: var(--game-blue); touch-action: manipulation; }
.puzzle-game .sudoku-cell:nth-child(9) { border-right: 0; }
.puzzle-game .sudoku-row:last-child .sudoku-cell { border-bottom: 0; }
.puzzle-game .sudoku-cell.box-right { border-right: 2px solid var(--game-ink); }
.puzzle-game .sudoku-cell.box-bottom { border-bottom: 2px solid var(--game-ink); }
.puzzle-game .sudoku-cell.is-given { color: var(--game-ink); font-weight: 750; }
.puzzle-game .sudoku-cell.is-related { background: #f0f2e9; }
.puzzle-game .sudoku-cell.is-selected { background: #d7e6e3; box-shadow: inset 0 0 0 2px var(--game-ink); }
.puzzle-game .sudoku-cell.is-error { color: #9b2436; background-image: linear-gradient(135deg, transparent 92%, #9b2436 92%); }
.puzzle-game .sudoku-cell:focus-visible { outline-offset: -4px; }
.puzzle-game .pencil-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: 100%; height: 100%; padding: 2px; font-size: clamp(.5rem, 1.9vw, .75rem); line-height: 1; color: var(--game-blue); }
.puzzle-game .pencil-grid span { display: flex; align-items: center; justify-content: center; }
.puzzle-game .sudoku-keypad { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .3rem; width: min(100%, 486px); margin-top: .7rem; }
.puzzle-game .sudoku-keypad .game-button { min-width: 0; padding: .5rem 0; font-weight: 700; font-size: 1.1rem; }
.puzzle-game .word-search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 155px; align-items: start; gap: 1.5rem; max-width: 740px; }
.puzzle-game .word-search-board { width: 100%; aspect-ratio: 1; border: 2px solid var(--game-ink); background: var(--game-paper); }
.puzzle-game .word-search-row { height: calc(100% / 10); display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.puzzle-game .word-cell { padding: 0; min-width: 0; min-height: 0; border: 0; border-radius: 0; font-size: clamp(.85rem, 3.2vw, 1.25rem); font-weight: 650; line-height: 1; touch-action: manipulation; }
.puzzle-game .word-cell.is-found { background: #c5dfd2; }
.puzzle-game .word-cell.is-revealed { background: #f3dcac; }
.puzzle-game .word-cell.is-preview { background: #e7e8d6; }
.puzzle-game .word-cell.is-start, .puzzle-game .word-cell.is-hint { background: var(--game-ink); color: white; box-shadow: inset 0 0 0 2px #bb692b; }
.puzzle-game .word-cell:focus-visible { outline-offset: -3px; }
.puzzle-game .word-list-title { font: inherit; font-weight: 750; margin: 0 0 .7rem; }
.puzzle-game .word-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .9rem; letter-spacing: .04em; }
.puzzle-game .word-list .is-found { text-decoration: line-through; color: #236041; }
.puzzle-game .word-list .is-revealed { color: #80521d; letter-spacing: 0; }
@media (max-width: 620px) {
  .puzzle-game .word-search-layout { display: flex; flex-direction: column; gap: 1rem; }
  .puzzle-game .word-search-board { max-width: 486px; }
  .puzzle-game .word-list-panel { width: 100%; }
  .puzzle-game .word-list { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: .8rem; gap: .65rem .4rem; }
  .puzzle-game .game-controls .game-button { font-size: .9rem; padding: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .puzzle-game * { scroll-behavior: auto !important; } }

