/* Logical games: all rules scoped to their game root. */
.logic-game { width:100%; max-width:640px; margin:0 auto; }
.logic-game button { -webkit-tap-highlight-color:transparent; }
.logic-game button:focus-visible { outline:3px solid #c36b42; outline-offset:3px; z-index:2; }
.logic-game .game-intro { line-height:1.55; }
.sudoku-game .sudoku-board { --sudoku-size:9; display:grid; grid-template-columns:repeat(var(--sudoku-size), minmax(0,1fr)); overflow:hidden; border:2px solid #25524e; border-radius:8px; width:100%; max-width:490px; margin:20px auto 0; background:#fff; }
.sudoku-game .sudoku-cell { appearance:none; position:relative; display:flex; align-items:center; justify-content:center; aspect-ratio:1; min-width:0; padding:0; background:#fff; border:0; border-right:1px solid #ccd8d0; border-bottom:1px solid #ccd8d0; border-radius:0; color:#14635c; font:500 clamp(18px,5vw,30px)/1 inherit; font-family:inherit; font-size:clamp(19px,5vw,29px); cursor:pointer; }
.sudoku-game .sudoku-cell.given { font-weight:750; color:#183e42; }
.sudoku-game .sudoku-cell.peer { background:#f1f5ef; }
.sudoku-game .sudoku-cell.selected { background:#c7e5d9; outline:2px solid #26766a; outline-offset:-2px; z-index:1; }
.sudoku-game .sudoku-cell.invalid { color:#a4352c; background:#fbe7df; }
.sudoku-game .sudoku-cell.block-right { border-right:2px solid #46716b; }
.sudoku-game .sudoku-cell.block-bottom { border-bottom:2px solid #46716b; }
.sudoku-game .sudoku-cell svg { width:76%; height:76%; pointer-events:none; }
.sudoku-game .size-4 { max-width:380px; }
.sudoku-game .size-6 { max-width:440px; }
.sudoku-game .sudoku-actions { display:flex; justify-content:center; gap:8px; }
.sudoku-game .sudoku-actions .btn { flex:1; padding:12px 6px; min-height:46px; }
.sudoku-game .sudoku-feedback { text-align:center; min-height:1.4em; font-size:0.93em; line-height:1.4; margin:9px 0; }
.sudoku-game .sudoku-keypad { display:grid; grid-template-columns:repeat(var(--key-cols),minmax(0,1fr)); gap:8px; max-width:490px; margin:0 auto; }
.sudoku-game .sudoku-key { border:1px solid #d3dcd3; border-radius:12px; background:#f7f6ef; color:#19474a; min-height:51px; padding:8px; font-family:inherit; font-size:1.65rem; font-weight:700; line-height:1.1; cursor:pointer; }
.sudoku-game .sudoku-key:hover { background:#e5efe7; }
.sudoku-game .sudoku-key:disabled { opacity:.5; cursor:default; }
.sudoku-game .animal-icon { display:block; height:44px; }
.sudoku-game .animal-icon svg { width:44px; height:44px; }
.sudoku-game .sudoku-animal-name { display:block; font-size:.7rem; font-weight:600; margin-top:3px; }
.wordsearch-game .wordsearch-theme, .sequences-game .sequence-heading { text-align:center; color:#244f4c; font-size:1.22rem; margin:16px 0 6px; }
.wordsearch-game .wordsearch-board { display:grid; grid-template-columns:repeat(var(--word-size),minmax(0,1fr)); max-width:520px; margin:18px auto 0; border:1px solid #cad9d0; border-radius:10px; overflow:hidden; background:#fff; touch-action:none; user-select:none; -webkit-user-select:none; }
.wordsearch-game .wordsearch-cell { position:relative; display:grid; place-items:center; min-width:0; aspect-ratio:1; padding:0; border:0; border-radius:0; background:#fff; color:#204744; font-family:inherit; font-size:clamp(16px,4.4vw,24px); font-weight:650; cursor:pointer; }
.wordsearch-game .wordsearch-cell.found { background:#dbeddf; color:#185449; }
.wordsearch-game .wordsearch-cell.selecting { background:#f6dfb0; color:#403720; }
.wordsearch-game .wordsearch-cell.start { background:#f4d39b; box-shadow:inset 0 0 0 2px #a85b35; }
.wordsearch-game .wordsearch-words { list-style:none; padding:0; margin:15px auto 22px; display:flex; justify-content:center; flex-wrap:wrap; gap:8px; max-width:520px; }
.wordsearch-game .wordsearch-words li { border-radius:20px; border:1px solid #d7ddd3; background:#fafaf3; padding:7px 12px; font-weight:600; font-size:.88em; }
.wordsearch-game .wordsearch-words li.found { background:#dfeee3; color:#255d4e; border-color:#b2d2bd; text-decoration:line-through; }
.wordsearch-game .wordsearch-feedback { text-align:center; min-height:3em; line-height:1.5; font-size:.95em; }
.wordsearch-game .action-row { justify-content:center; }
.sequences-game .sequence-strip { list-style:none; margin:30px auto; padding:0; display:flex; flex-wrap:wrap; gap:9px; justify-content:center; max-width:530px; }
.sequences-game .sequence-tile { width:66px; height:75px; display:flex; align-items:center; justify-content:center; border:1px solid #d6dfd4; border-radius:14px; background:#fffdf7; box-shadow:0 3px 0 #edece0; font-size:1.7rem; font-weight:700; color:#224b47; }
.sequences-game .sequence-missing { background:#e1f0e8; border:2px dashed #669787; box-shadow:none; }
.sequences-game .sequence-symbol { display:flex; justify-content:center; align-items:center; min-width:36px; }
.sequences-game .sequence-symbol svg { width:48px; height:48px; }
.sequences-game .sequence-question { text-align:center; font-size:1.15rem; margin:30px 0 16px; }
.sequences-game .sequence-choices { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:430px; margin:0 auto; }
.sequences-game .sequence-choice { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:5px; min-height:90px; padding:12px; border:2px solid #d9e0d6; border-radius:16px; background:#fffefa; color:#214744; font-family:inherit; font-size:1.7rem; font-weight:650; cursor:pointer; }
.sequences-game .sequence-choice:hover:not(:disabled) { border-color:#367668; background:#f2f8f0; }
.sequences-game .sequence-choice-label { font-size:.85rem; }
.sequences-game .sequence-choice.wrong { border-color:#bf8066; background:#fdf1e8; }
.sequences-game .sequence-choice.right { border-color:#428465; background:#dfefe4; }
.sequences-game .sequence-choice:disabled { cursor:default; opacity:1; }
.sequences-game .sequence-feedback { text-align:center; min-height:1.6em; margin:18px 0; font-weight:600; line-height:1.4; }
.sequences-game .action-row { justify-content:center; }
.sequences-game .sequence-hint { background:#f9efd9; border-radius:14px; padding:18px; line-height:1.6; }
.sequences-game .sequence-explanation { background:#e8f2e9; border-radius:16px; padding:20px; margin-top:24px; line-height:1.65; }
.sequences-game .sequence-explanation h3 { font-size:1.05rem; margin:0 0 8px; }
.sequences-game .sequence-explanation p { margin:0; }
@media (max-width:370px) {
 .sudoku-game .sudoku-actions .btn { font-size:.86em; }
 .wordsearch-game .wordsearch-cell { font-size:15px; }
 .sequences-game .sequence-tile { width:56px; height:64px; }
}
