*{box-sizing:border-box} [hidden]{display:none!important} html,body{margin:0;width:100%;height:100%;background:#fff;color:#202b35;font-family:Arial,Helvetica,sans-serif}button,select{font:inherit;color:inherit;background:white;border:1px solid #ccd3d9;border-radius:6px;padding:8px 11px;cursor:pointer}button:hover{background:#f1f6f8}button:focus-visible,select:focus-visible{outline:3px solid #278597;outline-offset:2px}button:disabled{opacity:.4;cursor:default}main{height:100%}.screen{width:min(920px,100%);height:100%;margin:auto;padding:18px;display:flex;flex-direction:column;gap:14px}.brand{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#5a6873}.brand img{width:130px;height:35px;object-fit:contain}.intro{display:flex;gap:18px;align-items:center;margin:8px 0}.intro h1{font-size:32px;margin:0 0 8px;letter-spacing:-1px}.intro p{margin:0;color:#5a6873;font-size:14px}.mini-grid{display:grid;grid-template-columns:repeat(3,23px);border:1px solid #233542}.mini-grid>*{height:23px;display:grid;place-items:center;font-size:15px;border:1px solid #233542;font-style:normal}.mini-grid i{background:#233542}.filters{display:flex;align-items:center;justify-content:space-between;font-size:13px;gap:8px}.filters select{margin-left:6px}#libraryProgress{color:#5a6873}#puzzles{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px}.puzzle-card{display:flex;flex-direction:column;justify-content:center;align-items:start;text-align:left;padding:18px;border-color:#dce1e5;gap:8px}.puzzle-card strong{font-size:19px}.puzzle-card small{color:#5a6873;font-size:12px}.puzzle-card .status{font-size:12px;color:#246d78}.pagination{display:flex;align-items:center;justify-content:center;gap:18px;font-size:12px}.library-note{font-size:11px;text-align:center;color:#65717a;margin:0}.play-head{display:flex;align-items:center;gap:10px}.play-head h2{font-size:18px;flex:1;margin:0}.play-head>span{font-size:12px;white-space:nowrap}.play-layout{flex:1;min-height:0;display:grid;grid-template-columns:1.12fr 1fr;gap:22px;align-items:center}#boardArea{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}#board{display:grid;background:#273540;border:2px solid #273540;gap:1px;padding:1px;flex:none}.cell{position:relative;width:var(--cell);height:var(--cell);padding:0;border:0;border-radius:0;background:#fff;font-size:calc(var(--cell)*.57);font-weight:600;display:flex;align-items:center;justify-content:center}.block{width:var(--cell);height:var(--cell)}.cell.selected-word{background:#e9f3f5}.cell.active{background:#c4e4e9;box-shadow:inset 0 0 0 2px #267888}.cell.wrong{box-shadow:inset 0 0 0 2px #b34040}.cell.checked{box-shadow:inset 0 -3px #367e60}.cell .num{position:absolute;left:2px;top:1px;display:flex;--digit-width:6px;--digit-height:8px}.digit-number{display:inline-flex}.digit-sprite{display:block;width:var(--digit-width,10px);height:var(--digit-height,13px);background-repeat:no-repeat}.workbench{min-width:0;display:flex;flex-direction:column;gap:12px}.clue-controls{display:flex;gap:7px}.clue-controls select{width:0;flex:1;min-width:0;font-weight:bold}#clue{font-size:17px;line-height:1.45;min-height:75px;margin:0}.tools{display:flex;gap:6px}.tools button{font-size:12px;flex:1;padding:8px 5px}#feedback{font-size:12px;color:#52616b;margin:0;min-height:29px;line-height:1.3}#bank{font-size:12px;line-height:1.7;min-height:58px;color:#425761}#keyboard{display:flex;flex-direction:column;gap:5px}.key-row{display:flex;gap:4px;justify-content:center}.key-row button{flex:1;min-width:0;padding:10px 0;font-size:13px;font-weight:600}.footnote{display:flex;align-items:center;justify-content:space-between;color:#6d7880;font-size:10px}.footnote button{padding:4px 6px;font-size:10px}.results-overlay{background:#ffffffed}.results-panel a{color:#246d78}.results-actions{flex-wrap:wrap}
@media(max-width:620px) and (min-height:440px){.screen{padding:10px;gap:8px}.play-layout{display:flex;flex-direction:column;gap:8px;align-items:stretch}#boardArea{flex:1;min-height:70px}.workbench{gap:7px}.play-head h2{font-size:14px}.play-head button{padding:6px 8px}.clue-controls button,.clue-controls select{padding:5px 8px}#clue{font-size:13px;min-height:34px;line-height:1.3}.tools button{padding:6px 3px;font-size:11px}#feedback{min-height:15px;font-size:11px}#bank{min-height:0;font-size:11px;line-height:1.3}.key-row button{padding:8px 0;font-size:12px}#keyboard{gap:4px}.key-row{gap:3px}.intro h1{font-size:25px}.intro{gap:10px;margin:2px 0}.intro p{font-size:12px}.puzzle-card{padding:10px;gap:7px}.puzzle-card strong{font-size:16px}.puzzle-card small{font-size:11px}.filters{font-size:11px}.filters select{padding:6px;width:120px}.pagination{gap:12px}.library-note{font-size:10px}.brand img{width:105px;height:26px}}
@media(max-height:439px){.screen{padding:8px;gap:6px}.brand img{height:22px;width:90px}.brand{font-size:10px}.intro{margin:0;gap:10px}.intro h1{font-size:22px;margin-bottom:3px}.intro p{font-size:11px}.mini-grid{grid-template-columns:repeat(3,16px)}.mini-grid>*{height:16px;font-size:11px}.filters{font-size:11px}.filters select{padding:3px}#puzzles{gap:6px;grid-template-columns:repeat(4,1fr);grid-template-rows:1fr}.puzzle-card{padding:8px;gap:6px}.puzzle-card strong{font-size:14px}.puzzle-card small,.puzzle-card .status{font-size:10px}.pagination button{padding:4px 8px}.library-note{font-size:10px}.play-head h2{font-size:14px}.play-head button{padding:4px 8px}.play-layout{gap:12px;grid-template-columns:1fr 1.2fr}.workbench{gap:5px}.clue-controls button,.clue-controls select{padding:3px 5px}#clue{font-size:12px;min-height:30px;line-height:1.25}.tools button{padding:5px 2px;font-size:10px}#feedback{font-size:10px;min-height:13px}.key-row button{padding:5px 0;font-size:11px}#keyboard{gap:3px}.key-row{gap:3px}#bank{font-size:10px;line-height:1.2;min-height:0}.footnote{font-size:9px}}
@media(max-height:320px){.workbench{gap:4px}.workbench:has(#bank:not([hidden])) #feedback{display:none}.key-row button{padding:4px 0}.play-layout{min-height:0}#boardArea{min-width:0}}
/* Reserve separate space for pagination even when the library is short. */
#library > :not(#puzzles){flex-shrink:0}
@media(min-height:440px) and (max-height:620px){
 #library{padding:10px;gap:8px}
 #library .brand img{width:105px;height:26px}
 #library .intro{gap:12px;margin:0}
 #library .intro h1{font-size:25px;margin-bottom:5px}
 #library .intro p{font-size:12px}
 #library .mini-grid{grid-template-columns:repeat(3,18px)}
 #library .mini-grid>*{height:18px;font-size:12px}
 #library .filters{font-size:12px}
 #library .filters select{padding:6px 8px}
 #library .puzzle-card{padding:10px;gap:6px}
 #library .puzzle-card strong{font-size:16px}
 #library .puzzle-card small,#library .puzzle-card .status{font-size:11px}
 #library .pagination button{padding:6px 10px}
}
@media(max-height:439px){
 #library{gap:5px}
 #library .mini-grid{grid-template-columns:repeat(3,12px)}
 #library .mini-grid>*{height:12px;font-size:10px}
 #library .puzzle-card{padding:6px;gap:4px}
 #library .puzzle-card strong{font-size:13px}
}
/* Celebration stays above the board without taking space or intercepting taps. */
#wordEffects{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:20}
.burst-star{position:absolute;color:#edaf20;text-shadow:0 0 5px #fff2b2;line-height:1;will-change:transform,opacity}
#soundToggle{position:relative;padding:0;flex:none;width:30px;height:30px;font-size:20px;color:#52616b}
#soundToggle.muted::after{content:'';position:absolute;width:22px;height:1px;background:currentColor;left:3px;top:14px;transform:rotate(-45deg)}
@media(max-width:380px){.play-head{gap:6px}.play-head h2{font-size:12px}}
