/* One-player games: Sudoku, Five Letters, Word Search, Minesweeper, Double Up and Word Scramble. Presentation only. */
.solo-wrap{padding-block:18px 40px}.solo-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}.solo-bar button,.solo-bar select{margin:0;width:auto}.solo-bar label{margin:0;font-size:14px;display:flex;align-items:center;gap:6px}
.sudoku-board{display:grid;grid-template-columns:repeat(9,1fr);border:3px solid #1d2b26;border-radius:6px;overflow:hidden;background:#1d2b26;gap:1px}.sudoku-cell{aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:0;background:#fffdf7;color:#244d3d;font:500 clamp(17px,5.2vw,26px) "DM Sans",Arial,sans-serif}.sudoku-cell.given{color:#1d2b26;font-weight:800;background:#f1ece0}.sudoku-cell.edge-r{margin-right:2px}.sudoku-cell.edge-b{margin-bottom:2px}.sudoku-cell.same{background:#dfeee5}.sudoku-cell.chosen{background:#f6dc8c}.sudoku-cell.clash,.sudoku-cell.wrong{color:#b3261e;background:#fbe3e0}.sudoku-cell.chosen.clash{background:#f6c9a0}
.sudoku-pad{display:grid;grid-template-columns:repeat(9,1fr);gap:4px;margin:14px 0}.sudoku-pad button{margin:0;padding:12px 0;min-height:48px;font-size:19px}
.words-board{display:grid;gap:6px;max-width:330px;margin:14px auto}
/* On a short phone the squares give up size, so the status line, the six rows and the keys are on the screen together (never under 230 px wide). */
.words-board{max-width:clamp(230px,calc((100vh - 241px)*5/6),330px);max-width:clamp(230px,calc((100svh - 241px)*5/6),330px)}.words-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.words-cell{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border:2px solid #c9d2c8;border-radius:6px;background:#fffdf7;font:800 clamp(22px,7vw,32px) "DM Sans",Arial,sans-serif;color:#1d2b26}.words-cell.typed{border-color:#5c6c62}.words-cell.hit,.words-key.hit{background:#2f6f52;border-color:#2f6f52;color:#fff}.words-cell.near,.words-key.near{background:#d5a353;border-color:#d5a353;color:#1d2b26}.words-cell.miss,.words-key.miss{background:#8a948d;border-color:#8a948d;color:#fff}
.words-keys{display:grid;gap:6px;margin:16px 0}.words-keyrow{display:flex;gap:4px;justify-content:center}.words-key{flex:1;max-width:44px;min-height:50px;margin:0;padding:0;border-radius:6px;background:#dfe6dc;color:#1d2b26;font-size:16px;font-weight:700}.words-key.wide{max-width:64px;flex:1.6;font-size:13px}
.search-board{display:grid;grid-template-columns:repeat(10,1fr);gap:2px;margin:14px 0;user-select:none}.search-cell{aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:6px;background:#fffdf7;color:#1d2b26;font:700 clamp(15px,4.6vw,22px) "DM Sans",Arial,sans-serif}.search-cell.found{background:#2f6f52;color:#fff}.search-cell.chosen{background:#f6dc8c;color:#1d2b26}
.search-words{display:grid;grid-template-columns:repeat(2,1fr);gap:4px 16px;list-style:none;padding:0;margin:14px 0;font-weight:700;letter-spacing:.06em}.search-words .found{text-decoration:line-through;color:#8a948d}
.ms-board{display:grid;grid-template-columns:repeat(9,1fr);gap:2px;margin:14px 0;padding:3px;border-radius:6px;background:#1d2b26;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation}.ms-cell{aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:4px;background:#8fb39d;color:#1d2b26;font:800 clamp(16px,5vw,24px) "DM Sans",Arial,sans-serif}.ms-cell:disabled{opacity:1}.ms-cell.open{background:#fffdf7}.ms-cell.flag{background:#f6dc8c;color:#b3261e}.ms-cell.mine{background:#e9eddf}.ms-cell.hit{background:#b3261e;color:#fff}.ms-cell.wrong{background:#fbe3e0;text-decoration:line-through}.ms-cell.n1{color:#1f5fa8}.ms-cell.n2{color:#2f6f52}.ms-cell.n3{color:#b3261e}.ms-cell.n4{color:#5b3a9e}.ms-cell.n5{color:#8a4b12}.ms-cell.n6{color:#0f6e75}.ms-cell.n7{color:#1d2b26}.ms-cell.n8{color:#5c6c62}
.du-board{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0;padding:6px;border-radius:10px;background:#1d2b26;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none}.du-tile{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#3a4b44;color:#1d2b26;font:800 clamp(24px,8.5vw,40px) "DM Sans",Arial,sans-serif}.du-tile.long{font-size:clamp(18px,6.2vw,30px)}.du-tile.added{box-shadow:inset 0 0 0 3px #fffdf7}.du-tile.joined{box-shadow:inset 0 0 0 3px #2f8f5b}.du-tile.v2{background:#f1ece0;color:#1d2b26}.du-tile.v4{background:#e9eddf;color:#1d2b26}.du-tile.v8{background:#f6dc8c;color:#1d2b26}.du-tile.v16{background:#f3c561;color:#1d2b26}.du-tile.v32{background:#e8a04a;color:#1d2b26}.du-tile.v64{background:#d9713a;color:#fff}.du-tile.v128{background:#8fb39d;color:#1d2b26}.du-tile.v256{background:#5f9b7c;color:#fff}.du-tile.v512{background:#2f6f52;color:#fff}.du-tile.v1024{background:#1f5fa8;color:#fff}.du-tile.v2048{background:#5b3a9e;color:#fff}.du-tile.v4096{background:#8a2a3a;color:#fff}
.du-pad{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0}.du-pad button{margin:0;padding:10px 0;min-height:48px;font-size:22px}
.ws-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;max-width:330px;margin:14px auto}.ws-tile{aspect-ratio:1;min-height:0;margin:0;padding:0;border:2px solid #c9d2c8;border-radius:6px;background:#fffdf7;color:#1d2b26;font:800 clamp(22px,7vw,32px) "DM Sans",Arial,sans-serif}.ws-tile:disabled{opacity:1}.ws-tile.letter{background:#f6dc8c;border-color:#d5a353}.ws-tile.used{background:transparent;border-style:dashed;color:transparent}.ws-tile.filled{border-color:#5c6c62}.ws-tile.hint{background:#2f6f52;border-color:#2f6f52;color:#fff}.ws-label{margin:14px 0 0;text-align:center}
.solo-links{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.solo-links a{display:block;padding:14px;border-radius:10px;background:#fffdf7;color:inherit;text-decoration:none;font-weight:700;letter-spacing:0;font-size:16px}.solo-links a span{display:block;font-weight:400;font-size:13px;letter-spacing:0;margin-top:2px}
.lantern-lights{display:flex;justify-content:center;gap:6px;margin:14px 0;font-size:clamp(24px,7.5vw,34px)}.lantern-light.out{filter:grayscale(1);opacity:.28}#lanternNew{flex:1 0 100%}#lanternStatus{min-height:2lh}
.lantern-word{display:flex;justify-content:center;gap:5px;margin:16px 0}.lantern-cell{display:flex;align-items:center;justify-content:center;flex:0 1 clamp(26px,8.2vw,40px);min-width:0;height:clamp(33px,10.25vw,50px);border-bottom:3px solid #1d2b26;font:800 clamp(18px,5.6vw,26px) "DM Sans",Arial,sans-serif;color:#1d2b26}.lantern-cell.found{border-color:#2f6f52;color:#2f6f52}.lantern-cell.missed{border-color:#b3261e;color:#b3261e}

/* Charades: the card, the clock and the two buttons keep their size whatever the word is. */
.ch-status{min-height:3.4em;min-height:2lh;margin:6px 0}.ch-card{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px;height:clamp(200px,calc(100svh - 390px),300px);padding:18px;border-radius:20px;background:#fffdf7;box-shadow:0 0 0 3px #244d3d;text-align:center}.ch-card .eyebrow{margin:0;min-height:1.6em}.ch-word{flex:1;display:flex;align-items:center;justify-content:center;font:700 clamp(30px,10vw,46px)/1.15 'DM Sans',sans-serif;overflow:hidden}.ch-word.small{font-size:20px;font-weight:500;line-height:1.4}.ch-time{margin:0;font:700 34px 'DM Sans',sans-serif;font-variant-numeric:tabular-nums}
.ch-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin:12px 0}.ch-actions button{margin:0;min-height:72px;font-size:22px}.ch-main{display:grid;grid-template-columns:1fr 1fr}.ch-main button{width:100%;padding-left:8px;padding-right:8px;white-space:nowrap}.ch-score{min-height:1.7em;line-height:1.7;font-weight:700;text-align:center;margin:8px 0}
.solo-wrap>.rules-fold,.sol-wrap>.rules-fold{margin-top:16px;padding:0 4px}

/* Mahjong: the board keeps one shape; tiles are placed on it by layer, row and column. */
#mjStatus{min-height:4.5em;min-height:3lh}.mj-board{position:relative;width:100%;aspect-ratio:8/6.6;margin:18px 0 12px;padding:0}
.mj-tile{position:absolute;width:12.5%;height:20%;margin:0;padding:0;min-height:0;border-radius:7px;background:linear-gradient(160deg,#ece5cf,#d3caaf);border:1px solid #9a9072;box-shadow:inset 0 0 0 1px #f4eedb,2px 3px 0 #2f6b4f,3px 4px 0 #1b4332;display:block;line-height:1;overflow:hidden}
.mj-tile svg{display:block;width:100%;height:100%;opacity:.5;filter:saturate(.55)}
.mj-tile:disabled{opacity:1}.mj-tile[aria-disabled=true]{cursor:default}
.mj-tile.free{background:linear-gradient(160deg,#fffefb,#f3ecd8);border-color:#b3a988;box-shadow:inset 0 0 0 1px #ffffff,2px 3px 0 #2f8f5b,3px 4px 0 #1b4332}.mj-tile.free svg{opacity:1;filter:none}
.mj-tile.chosen{background:linear-gradient(160deg,#fff3c2,#f6dc8c);box-shadow:0 0 0 3px #c9a23f,2px 3px 0 #2f8f5b,3px 4px 0 #1b4332}
.mj-tile.hint{background:linear-gradient(160deg,#e3f6fb,#c9ecf5);box-shadow:0 0 0 3px #1e88e5,2px 3px 0 #2f8f5b,3px 4px 0 #1b4332}

.cross-board{display:grid;grid-template-columns:repeat(9,1fr);gap:2px;margin:10px auto;max-width:400px;user-select:none}.cross-gap{aspect-ratio:1}
.cross-cell{position:relative;aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:4px;border:1px solid #9aa79e;background:#fffdf7;color:#1d2b26;font:800 clamp(16px,5vw,24px) "DM Sans",Arial,sans-serif}.cross-cell small{position:absolute;top:1px;left:3px;font-size:9px;font-weight:700;color:#5d6b62}
.cross-cell.in{background:#dcebf7}.cross-cell.at{background:#f6dc8c;border-color:#1d2b26}.cross-cell.bad{color:#b3261e;background:#fbe4e1}.cross-cell.good{background:#2f6f52;color:#fff}.cross-cell.good small{color:#dff}
.cross-now{min-height:3.2em;margin:8px 0;padding:8px 12px;border-radius:10px;background:#fffdf7;color:#1d2b26;font-weight:700;line-height:1.4}
.cross-lists{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.cross-lists ul{list-style:none;margin:0;padding:0}.cross-clue{display:block;width:100%;margin:0 0 4px;padding:8px;min-height:44px;text-align:left;border-radius:8px;background:transparent;color:inherit;font-size:14px;font-weight:600;border:1px solid #0002}.cross-clue.on{background:#f6dc8c;color:#1d2b26}.cross-clue.done{text-decoration:line-through;opacity:.6}
.solo-wrap>p.cross-now{min-height:calc(2.8em + 16px)}
@media(max-width:520px){.cross-lists{grid-template-columns:1fr}}

/* A narrow phone: the boards run nearly edge to edge, so every square is about three pixels wider. */
@media(max-width:380px){.solo-wrap :is(.sudoku-board,.search-board,.cross-board,.ms-board,.words-keys){margin-inline:-11px}.solo-wrap .cross-board{max-width:none}}
/* Crossword on a short phone: the board gives up size by the height of the screen, so the board, the clue and the letter keys
   (249 px without the board) are on the screen together. A tall phone keeps its board. vh first for older phones, then svh. */
.solo-wrap .cross-board{max-width:clamp(270px,calc(100vh - 255px),400px);max-width:clamp(270px,calc(100svh - 255px),400px)}
@media(max-width:380px){.solo-wrap .cross-board{margin-inline:max(-11px,calc((100% - clamp(270px,100vh - 255px,400px))/2));margin-inline:max(-11px,calc((100% - clamp(270px,100svh - 255px,400px))/2))}}

/* Tile Words: our own board. Lines keep their height so the board and the tiles do not move under a finger. */
.tw-status{min-height:3.2em;min-height:2lh;margin:6px 0;font-size:14px;font-weight:600;color:#253d36}.tw-scores{margin:4px 0 8px;font-weight:700;font-size:14px;font-variant-numeric:tabular-nums}.tw-last{min-height:3.2em;min-height:2lh;margin:8px 0}
.tw-board{display:grid;grid-template-columns:repeat(11,1fr);gap:2px;padding:5px;border-radius:12px;background:#244d3d;border:5px solid #6b4423;user-select:none;-webkit-user-select:none}
.tw-cell{position:relative;aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:4px;background:#efe9d8;color:#253d36;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tw-cell:disabled{opacity:1}.tw-cell small{font-size:clamp(7px,2.1vw,10px);font-weight:800;letter-spacing:0;line-height:1}
.tw-cell.w3{background:#b5533c;color:#fff}.tw-cell.w2{background:#e3a09a;color:#4a1d15}.tw-cell.l3{background:#2f7f8f;color:#fff}.tw-cell.l2{background:#a9d5d8;color:#143c44}.tw-cell.star small{font-size:clamp(12px,4vw,18px)}
.tw-tile{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:4px;background:#f1d9a4;color:#2a2114;box-shadow:inset 0 -2px 0 #c9a765,inset 0 0 0 1px #b99554}
.tw-tile b{font:800 clamp(13px,4.6vw,20px)/1 var(--play-ui)}.tw-tile i{position:absolute;right:2px;bottom:1px;font:700 clamp(6px,1.9vw,9px)/1 var(--play-ui);font-style:normal}
.tw-tile.new{background:#ffe9a8;box-shadow:inset 0 0 0 2px #d6a357}
.tw-rack{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:6px 0 4px;padding:8px;border-radius:10px;background:#6b4423}
.tw-slot{position:relative;aspect-ratio:1;min-height:0;margin:0;padding:0;border-radius:6px;background:#58361a}.tw-slot:disabled{opacity:1}
.tw-slot .tw-tile{border-radius:6px}.tw-slot .tw-tile b{font-size:clamp(18px,6.4vw,26px)}.tw-slot .tw-tile i{font-size:clamp(9px,2.6vw,12px);right:4px;bottom:3px}
.tw-slot.chosen{outline:4px solid #fffdf7;outline-offset:-1px;transform:translateY(-4px)}
.tw-bar button{flex:1 1 auto}
@media(max-width:380px){.solo-wrap .tw-board{margin-inline:-11px;padding:3px;border-width:4px}}
@media(max-width:350px){.tw-scores{font-size:12.5px;line-height:23px}}

:root{color-scheme:only light}
