*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#06152e;color:white;font-family:Arial,sans-serif}.game{height:100dvh;background:radial-gradient(ellipse at center,#17285d 0%,#060e2c 72%);display:flex;flex-direction:column;align-items:center;padding:1.5vh 3vw 2vh;gap:1.4vh}header{display:flex;width:100%;align-items:center;justify-content:space-between;gap:20px}h1{font-size:clamp(23px,3vw,54px);color:#a5faff;text-shadow:0 0 18px #00eaff;margin:0}#player,#lives{font-size:clamp(16px,1.7vw,28px);font-weight:bold}#lives{color:#ff6e9f}.category{font-size:clamp(17px,2vw,32px);color:#ffe58a;text-transform:uppercase}.puzzle{flex:1;width:min(1500px,100%);display:flex;align-content:center;justify-content:center;align-items:center;flex-wrap:wrap;gap:9px;padding:2vh 2vw;background:#07183b9c;border:2px solid #00dfff;border-radius:22px;box-shadow:0 0 22px #00dfff66}.letter{width:clamp(24px,4vw,74px);height:clamp(38px,7vh,88px);background:#d7f3ff;color:#112654;border:2px solid #58ddff;border-radius:7px;display:grid;place-items:center;font-size:clamp(20px,3vw,48px);font-weight:900}.space{width:25px}.status{width:100%;display:flex;justify-content:space-around;align-items:center;font-size:clamp(16px,1.6vw,28px);gap:12px}.status strong{color:#ffdc62;margin-left:10px}#message{color:#9cfaff;font-size:clamp(14px,1.3vw,22px)}footer{display:flex;justify-content:center;align-items:center;gap:1.3vw;width:100%;min-height:75px}.action{border:2px solid #28dfff;border-radius:13px;background:linear-gradient(115deg,#075b90,#31105d);box-shadow:0 0 15px #00dfff66;color:#fff;font-weight:900;text-decoration:none;font-size:clamp(14px,1.6vw,24px);padding:15px 24px;cursor:pointer}.action:disabled{opacity:.35}.keyboard{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;width:100%;max-width:1250px;min-height:55px}.keyboard[hidden],.overlay[hidden]{display:none!important}.keyboard button{background:#143c76;border:1px solid cyan;color:white;border-radius:7px;font-size:clamp(15px,1.5vw,24px);font-weight:900;min-width:clamp(35px,3.5vw,60px);height:clamp(36px,5vh,65px)}.keyboard button:disabled{opacity:.25}.overlay{position:fixed;z-index:1000;inset:0;background:#020a1ef2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.wheel-wrap{position:relative;width:min(76vh,85vw);aspect-ratio:1}canvas{width:100%;height:100%;touch-action:none;cursor:grab}.pointer{position:absolute;z-index:2;top:-15px;left:50%;transform:translateX(-50%);color:#fff5a5;font-size:60px;text-shadow:0 0 15px #fff}.overlay p{font-size:22px}.dialog{max-width:750px;width:90vw;text-align:center;background:#0b2451;border:2px solid cyan;border-radius:20px;padding:35px}.dialog input{font-size:25px;width:100%;padding:18px;background:#071534;border:1px solid cyan;color:white;text-transform:uppercase;margin:15px 0}.dialog .action{margin:8px}@media(max-height:760px){.game{gap:.7vh}.letter{height:6vh}.action{padding:10px 16px}footer{min-height:55px}}

.question{width:min(1500px,100%);text-align:center;font-size:clamp(16px,1.9vw,31px);font-weight:800;color:#fff;padding:1vh 1.5vw;background:#113461;border:1px solid #28dfff;border-radius:12px;max-height:14vh;overflow:auto}

/* FOI V1.3: neon score and lives at top */
.game{background:#06152e url('../../assets/background.png') center/cover no-repeat}
.game>header{flex-shrink:0;gap:18px;min-height:68px}
.game>header h1{font-size:clamp(22px,2.6vw,46px);white-space:nowrap}
.top-stats{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.stat-pill{display:flex;align-items:center;justify-content:center;gap:10px;border:2px solid;border-radius:40px;padding:9px 15px;background:rgba(3,14,47,.93);white-space:nowrap;font-weight:900;box-shadow:0 0 15px currentColor;line-height:1.1}
.stat-pill span{font-size:clamp(11px,.85vw,16px)}
.stat-pill strong{font-size:clamp(18px,1.5vw,27px)}
.stat-player{color:#72edff;border-color:#00eaff}.stat-player strong{font-size:clamp(15px,1.2vw,22px);max-width:180px;overflow:hidden;text-overflow:ellipsis}
.stat-score{color:#ffe17b;border-color:#ffcc25}.stat-lives{color:#ff77b7;border-color:#f044cb}
.puzzle{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:6px;padding:18px 14px;overflow:hidden}
.puzzle-row{display:grid;grid-template-columns:repeat(16,minmax(0,1fr));gap:clamp(2px,.3vw,6px);width:100%;max-width:1150px;margin:0 auto}
.puzzle-cell{aspect-ratio: .84;min-height:0;background:#075458;border:2px solid #348c9a;display:flex;align-items:center;justify-content:center;color:#142648;font-size:clamp(15px,2.3vw,43px);font-weight:900;box-shadow:inset 0 0 4px #071f2e}
.puzzle-cell.active{background:#ffd349;border-color:#ffe69c;box-shadow:inset 0 0 6px #fff2a5}
.puzzle-cell.revealed{background:#d7f3ff;border-color:#58ddff;animation:wofReveal .42s ease-out both}
@keyframes wofReveal{0%{transform:rotateY(90deg);opacity:.25}100%{transform:rotateY(0);opacity:1}}
.status{flex-shrink:0;min-height:30px}.status strong{color:#ffe17b}
@media(max-width:1000px){.game>header{flex-wrap:wrap;justify-content:center}.top-stats{justify-content:center}.stat-pill{padding:7px 11px}.puzzle-cell{font-size:clamp(12px,2.2vw,28px)}}
@media(max-height:750px){.puzzle{padding:8px}.puzzle-row{max-width:950px}.game>header{min-height:45px}.stat-pill{padding:5px 10px}}

/* V1.5 WOF reference board - 16 fixed columns, visible from PHP and JS */
.game section#puzzle.puzzle{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;align-content:center!important;gap:5px!important;overflow:hidden!important;padding:12px!important;min-height:0!important}
.game section#puzzle .puzzle-row{display:grid!important;grid-template-columns:repeat(16,minmax(0,1fr))!important;gap:4px!important;width:min(100%,1080px)!important;max-width:1080px!important;flex:0 0 auto!important;margin:0 auto!important}
.game section#puzzle .puzzle-cell{display:flex!important;visibility:visible!important;opacity:1!important;width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:0.83!important;align-items:center!important;justify-content:center!important;background:#075755!important;border:2px solid #72898b!important;border-radius:1px!important;color:#102344!important;font-weight:900!important;font-size:clamp(12px,2vw,35px)!important;box-shadow:inset 0 0 0 2px #044242!important}
.game section#puzzle .puzzle-cell.active{background:linear-gradient(#ffdf5d,#f7be2e)!important;border-color:#ffeda3!important;box-shadow:inset 0 0 0 2px #b9850c!important}
.game section#puzzle .puzzle-cell.revealed{background:linear-gradient(#ffdf5d,#f7be2e)!important;border-color:#ffeda3!important;color:#13234c!important}
@media(max-height:760px){.game section#puzzle .puzzle-row{width:min(100%,850px)!important;gap:3px!important}}

/* V1.6: full viewport; override FOI global main container constraints */
html,body{width:100%!important;min-width:0!important;max-width:none!important;height:100%!important;margin:0!important;overflow:hidden!important}
body>main.game,main.game{position:relative!important;display:flex!important;box-sizing:border-box!important;width:100vw!important;max-width:none!important;min-width:0!important;height:100vh!important;height:100dvh!important;min-height:0!important;margin:0!important;margin-inline:0!important;left:auto!important;right:auto!important;transform:none!important;float:none!important;background:#06152e url('../../assets/background.png') center center/cover no-repeat!important;padding:clamp(10px,1.4vh,20px) clamp(16px,2.6vw,52px) clamp(10px,1.5vh,22px)!important}
main.game .question,main.game section#puzzle.puzzle{width:100%!important;max-width:none!important}
main.game section#puzzle .puzzle-row{width:min(100%,1280px)!important;max-width:1280px!important}
@media(max-height:760px){main.game section#puzzle .puzzle-row{width:min(100%,1000px)!important}}

/* V1.7: 4 fixed board rows and static tiles; animate only new letter face */
main.game>header{justify-content:flex-end!important;min-height:46px!important}
main.game>header h1,main.game .stat-player{display:none!important}
main.game .top-stats{margin-left:auto}
main.game section#puzzle.puzzle{gap:4px!important}
main.game section#puzzle .puzzle-row{width:min(100%,1280px)!important;max-width:1280px!important}
main.game section#puzzle .puzzle-cell.revealed{
 animation:none!important;transform:none!important;opacity:1!important;
}
main.game section#puzzle .puzzle-cell .letter-face{
 display:grid;place-items:center;width:100%;height:100%;
 animation:wofLetterOnly .42s ease-out both;
 backface-visibility:hidden;
}
@keyframes wofLetterOnly{
 0%{transform:rotateY(90deg);opacity:0}
 100%{transform:rotateY(0deg);opacity:1}
}
@media(max-height:760px){
 main.game section#puzzle .puzzle-row{width:min(100%,1120px)!important}
}

/* V1.9: left aligned question and score-adjacent wheel value */
.game .question{text-align:left!important;padding-left:2vw!important}
.game .stat-wheel{color:#91f5ff;border-color:#28dfff}
.game .stat-wheel strong{color:#ffe17b;font-variant-numeric:tabular-nums}
.game .status{justify-content:center!important}
.game section#puzzle .puzzle-cell.tile-flip{
 transform-origin:center center;
 animation:wofTileFlip .55s ease-in-out both!important;
 backface-visibility:visible;
}
@keyframes wofTileFlip{
 0%{transform:perspective(650px) rotateY(0deg)}
 45%{transform:perspective(650px) rotateY(90deg)}
 55%{transform:perspective(650px) rotateY(-90deg)}
 100%{transform:perspective(650px) rotateY(0deg)}
}

/* V2.0: left aligned yellow tiles, centered question, fixed modal keyboard */
.game .question{text-align:center!important;padding-left:1.5vw!important}
.game .category{text-align:center!important}
.game section#puzzle .puzzle-row{margin-left:auto!important;margin-right:auto!important}
.game section#puzzle .puzzle-cell.tile-flip{animation:none!important;transform:none!important;position:relative;perspective:900px;overflow:visible}
.game section#puzzle .puzzle-cell.tile-flip .flip-face{position:absolute;inset:0;display:block;transform-style:preserve-3d;animation:wofCardTurn .72s ease-in-out forwards!important}
.game section#puzzle .puzzle-cell.tile-flip .flip-front,.game section#puzzle .puzzle-cell.tile-flip .flip-back{position:absolute;inset:0;display:grid;place-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:linear-gradient(#ffdf5d,#f7be2e);border:2px solid #ffeda3;box-shadow:inset 0 0 0 2px #b9850c}
.game section#puzzle .puzzle-cell.tile-flip .flip-back{transform:rotateY(180deg);color:#13234c}
@keyframes wofCardTurn{0%{transform:rotateY(0)}100%{transform:rotateY(180deg)}}
.keyboard-overlay{z-index:1100!important;background:rgba(1,8,28,.78)!important;backdrop-filter:blur(4px)}
.letter-dialog{width:min(900px,94vw);padding:clamp(20px,3vw,42px);border:2px solid #00eaff;border-radius:22px;background:linear-gradient(145deg,#071738,#10235a);box-shadow:0 0 40px #00dfff77;text-align:center}
.letter-dialog h2{margin:0 0 25px;color:#a7faff;font-size:clamp(22px,2.3vw,36px)}
.letter-dialog .keyboard{display:flex!important;max-width:none;gap:10px;justify-content:center;min-height:0}
.letter-dialog .keyboard[hidden]{display:none!important}
.letter-dialog .keyboard button{cursor:pointer;min-width:clamp(43px,4.2vw,70px);height:clamp(49px,6.8vh,76px);border:2px solid #00eaff;box-shadow:0 0 10px #00dfff44;background:linear-gradient(135deg,#0b5b92,#25135d)}
.letter-dialog #closeletters{margin-top:22px}

/* V2.1: the entire yellow tile flips with its letter */
.game section#puzzle .puzzle-cell.tile-flip{position:relative!important;perspective:950px!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important;overflow:visible!important}
.game section#puzzle .puzzle-cell.tile-flip .flip-face{position:absolute;inset:0;transform-style:preserve-3d;animation:wofFullTileFlip .72s ease-in-out forwards!important}
.game section#puzzle .puzzle-cell.tile-flip .flip-front,
.game section#puzzle .puzzle-cell.tile-flip .flip-back{position:absolute;inset:0;display:grid;place-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:linear-gradient(#ffdf5d,#f7be2e);border:2px solid #ffeda3;box-shadow:inset 0 0 0 2px #b9850c;color:#13234c;font-weight:900}
.game section#puzzle .puzzle-cell.tile-flip .flip-back{transform:rotateY(180deg)}
@keyframes wofFullTileFlip{from{transform:rotateY(0deg)}to{transform:rotateY(180deg)}}


/* V2.2 – visual layout only; game logic and API remain unchanged */
main.game>header{justify-content:center!important;min-height:56px!important;flex-shrink:0}
main.game .top-stats{margin:0 auto!important;justify-content:center!important;flex-wrap:nowrap;gap:clamp(9px,1.3vw,22px)}
main.game .stat-pill{min-width:clamp(110px,13vw,220px);padding:clamp(7px,1vh,13px) clamp(10px,1.5vw,23px);gap:clamp(7px,.8vw,14px)}
main.game .stat-pill .stat-icon{font-size:clamp(21px,2.1vw,36px);line-height:1}
main.game .stat-pill strong{font-size:clamp(19px,2vw,33px);font-variant-numeric:tabular-nums}
main.game .stat-wheel{color:#8ef5ff;border-color:#00dfff}
main.game .stat-score{color:#ffe17b;border-color:#ffcc25}
main.game .stat-lives{color:#ff7db5;border-color:#f044cb}
main.game .stat-lives strong{font-size:clamp(16px,1.55vw,26px)}
main.game .board-area{position:relative;flex:1 1 auto;min-height:0;width:100%;display:flex;align-items:stretch}
main.game .board-area section#puzzle.puzzle{
 width:100%!important;max-width:none!important;min-height:0!important;
 padding:clamp(12px,1.8vh,26px) clamp(12px,2vw,32px) clamp(55px,8vh,78px)!important;
 gap:clamp(4px,.55vh,9px)!important;
}
main.game .board-area section#puzzle .puzzle-row{
 width:min(100%,1500px,calc((100dvh - 365px)*3.35))!important;
 max-width:1500px!important;gap:clamp(3px,.3vw,7px)!important
}
main.game .board-area section#puzzle .puzzle-cell{font-size:clamp(17px,2.5vw,46px)!important}
main.game .board-area .status{
 position:absolute;bottom:clamp(11px,2vh,25px);left:2%;width:96%;
 justify-content:center!important;text-align:center;pointer-events:none;z-index:2;
}
main.game .board-area #message{font-size:clamp(14px,1.35vw,23px);text-shadow:0 1px 6px #00132b}
main.game footer{flex-shrink:0;min-height:clamp(54px,7vh,85px);gap:clamp(12px,1.4vw,24px)}
@media(max-height:760px){
 main.game .board-area section#puzzle .puzzle-row{width:min(100%,1350px,calc((100dvh - 270px)*3.35))!important}
 main.game .board-area section#puzzle.puzzle{padding-bottom:48px!important}
}
@media(max-width:680px){
 main.game .top-stats{gap:5px}
 main.game .stat-pill{min-width:0;padding:6px 8px}
 main.game .stat-pill strong{font-size:15px}
 main.game .stat-lives strong{font-size:12px}
 main.game .stat-pill .stat-icon{font-size:18px}
 main.game .board-area section#puzzle .puzzle-row{width:100%!important}
 main.game footer .action{padding:10px 8px;font-size:12px}
}

/* V2.3: Timer, status feedback and consistent FOI game end panel */
main.game .top-stats{gap:clamp(7px,1vw,16px)!important}
main.game .stat-pill{min-width:clamp(95px,11vw,190px)!important}
main.game .stat-timer{color:#91f5ff;border-color:#00eaff}
main.game .stat-timer strong{color:#a7faff}
main.game .category-panel{border:1px solid #20dfff;border-radius:12px;background:rgba(6,29,72,.83);padding:8px 26px;min-width:min(640px,85vw);box-shadow:0 0 14px #00cfff55;text-align:center!important}
main.game .question{border:2px solid #21dfff!important;box-shadow:0 0 14px #00cfff55;background:#123965ed!important}
main.game .board-area .status{bottom:clamp(9px,1.5vh,20px)}
main.game .instruction-panel{padding:9px 25px;background:#092a62e8;border:1px solid #28dfff;border-radius:10px;box-shadow:0 0 12px #00dfff66;color:#c5faff}
main.game .stat-pill.pop-value{animation:wofStatPulse .65s ease-out}
@keyframes wofStatPulse{0%{transform:scale(1)}30%{transform:scale(1.2);filter:brightness(1.8)}100%{transform:scale(1);filter:brightness(1)}}
.wof-bonus{position:fixed;z-index:1200;top:16%;left:50%;transform:translateX(-50%);color:#b6ffff;font-size:clamp(34px,4vw,68px);font-weight:900;text-shadow:0 0 18px #00eaff;pointer-events:none;animation:wofBonusFloat 1.1s ease-out forwards}
.wof-bonus.score{color:#ffe36c;text-shadow:0 0 18px #ffbb00;top:23%}
@keyframes wofBonusFloat{0%{opacity:0;transform:translate(-50%,25px) scale(.6)}25%{opacity:1;transform:translate(-50%,0) scale(1.2)}100%{opacity:0;transform:translate(-50%,-45px) scale(1)}}
#result .dialog{background:#071538f5;border:2px solid #00eaff;box-shadow:0 0 35px #00dfff70;border-radius:18px;max-width:650px}
#resulttitle{color:#ff9df4;text-shadow:0 0 18px #f04bff;font-size:clamp(32px,3vw,52px)}
#result .dialog .action{display:inline-block;margin-top:18px}

/* V2.5 – wrong vowel zoom and signed score neon pulse */
.wrong-vowel-overlay[hidden]{display:none!important}
.wrong-vowel-overlay{position:fixed;inset:0;z-index:1400;display:grid;place-items:center;background:rgba(2,8,27,.72);pointer-events:auto;backdrop-filter:blur(3px)}
.wrong-vowel-card{width:min(620px,90vw);padding:clamp(22px,4vh,45px);border:3px solid #ff497f;border-radius:25px;background:linear-gradient(140deg,#3d0c34,#100c38 65%);box-shadow:0 0 42px #ff3c7e88,inset 0 0 35px #ff326122;text-align:center;transform:scale(.7);opacity:0}
.wrong-vowel-overlay.show .wrong-vowel-card{animation:wofWrongZoom .55s cubic-bezier(.2,.8,.25,1) both}
.wrong-vowel-overlay.hide .wrong-vowel-card{animation:wofWrongHide .35s ease-in forwards}
.wrong-vowel-x{font-size:clamp(55px,7vw,100px);color:#ff477a;text-shadow:0 0 24px #ff3068;line-height:1}
.wrong-vowel-card h2{font-size:clamp(31px,4.5vw,64px);margin:9px 0;color:#ff6793;text-shadow:0 0 23px #ff3a74}
.wrong-vowel-card p{font-size:clamp(17px,2vw,27px);font-weight:800;color:white}
.wrong-vowel-loss{display:flex;justify-content:center;gap:clamp(12px,4vw,50px);font-size:clamp(25px,3vw,43px);font-weight:900;color:#ff678a;text-shadow:0 0 14px #ff477c;margin:20px 0}
.wrong-vowel-card small{color:#8cf1ff;font-size:clamp(15px,1.7vw,23px);font-weight:900}
@keyframes wofWrongZoom{0%{transform:scale(.7);opacity:0}65%{transform:scale(1.1);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes wofWrongHide{from{transform:scale(1);opacity:1}to{transform:scale(.7);opacity:0}}
.game .stat-pill.pop-value{animation:wofScorePulse .8s ease-out!important;transform-origin:center}
.game .stat-pill.pop-value.pop-negative{animation:wofScorePulseNegative .8s ease-out!important}
.wof-bonus.score.negative{color:#ff557e!important;text-shadow:0 0 20px #ff275c!important}
@keyframes wofScorePulse{0%,100%{transform:scale(1)}40%{transform:scale(1.3);box-shadow:0 0 35px #ffe164,0 0 65px #ffc328}}
@keyframes wofScorePulseNegative{0%,100%{transform:scale(1)}40%{transform:scale(1.3);box-shadow:0 0 35px #ff3a65,0 0 65px #ff174a;border-color:#ff497f;color:#ff668a}}

/* V2.7 Neon Deluxe Wheel - presentation only; no gameplay changes */
#overlay:not([hidden]){background:radial-gradient(circle at 50% 47%,rgba(7,31,78,.79),rgba(0,5,22,.93) 76%);backdrop-filter:blur(3px)}
#overlay .wheel-wrap{width:min(74vh,86vw,720px);filter:drop-shadow(0 0 15px rgba(0,230,255,.5)) drop-shadow(0 0 24px rgba(250,33,220,.32))}
#overlay .pointer{top:-21px;font-size:69px;color:#ffe875;line-height:1;text-shadow:0 0 6px #fff,0 0 19px #ffc400,0 0 33px #ff4fc9;filter:drop-shadow(0 3px 1px #813600);pointer-events:none}
#overlay #wheelmsg{margin:0;max-width:90vw;padding:12px 35px;border:2px solid #ef5ce9;border-radius:13px;background:linear-gradient(95deg,rgba(5,35,77,.95),rgba(38,9,79,.94));box-shadow:0 0 15px rgba(0,231,255,.5),inset 0 0 12px rgba(249,68,234,.2);color:#fff;font-weight:900;letter-spacing:.04em;text-align:center;font-size:clamp(15px,1.35vw,23px)}
@media(max-height:700px){#overlay .wheel-wrap{width:min(70vh,82vw)}#overlay #wheelmsg{padding:8px 22px}}

/* V2.8: lightweight classic wheel */
#wheel{filter:none!important;}

/* V2.9 minimal wheel: no GPU blur/filter on animated canvas */
#wheel{filter:none!important;}

/* V3.0 lightweight radial neon wheel */
#wheel{filter:none!important;}
#overlay .wheel-wrap{filter:none!important;}
#overlay #wheelmsg{display:none!important;}

/* V3.1: lightweight radial neon wheel, no blur-heavy rendering */
#overlay:not([hidden]){background:rgba(1,7,26,.87)!important;backdrop-filter:none!important;gap:0!important}
#overlay .wheel-wrap{width:min(76vh,86vw,710px)!important;filter:none!important}
#overlay .pointer{color:#ffe36c!important;font-size:63px!important;top:-22px!important;text-shadow:0 0 10px rgba(255,207,37,.65)!important;filter:none!important}
#overlay #wheelmsg{display:block!important;position:absolute;bottom:3vh;left:50%;transform:translateX(-50%);min-height:1.4em;margin:0;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;color:#b3f9ff!important;text-align:center;white-space:nowrap;font-size:clamp(15px,1.4vw,24px);letter-spacing:.08em}
#overlay #wheelmsg:empty{display:none!important}
#overlay #wheel{filter:none!important;touch-action:none;cursor:pointer}

/* V3.2: Dark neon segments; lightweight canvas, no heavy GPU filters */
#overlay .wheel-wrap{filter:none!important}
#overlay .pointer{text-shadow:0 0 8px rgba(255,221,72,.7)!important}

/* V3.3: Wheel styling follows the consonant buttons; no costly canvas filter. */
#overlay .wheel-wrap{filter:none!important;}
#overlay .pointer{color:#50eeff!important;text-shadow:0 0 9px #00dfff,0 0 18px #00dfff!important;filter:none!important;}
#overlay .wheel-result{display:none!important;}

/* V3.4: four-row board fills available frame, without instruction panel */
main.game .board-area section#puzzle.puzzle{padding:clamp(7px,1vh,13px)!important;gap:clamp(3px,.5vh,7px)!important;justify-content:stretch!important;align-items:stretch!important}
main.game .board-area section#puzzle .puzzle-row{width:100%!important;max-width:none!important;flex:1 1 0!important;min-height:0!important;margin:0!important;gap:clamp(3px,.4vw,7px)!important}
main.game .board-area section#puzzle .puzzle-cell{aspect-ratio:auto!important;height:100%!important;min-height:0!important}
main.game .board-area .status{display:none!important}

/* V3.4.1: Smaller tiles with larger, clearer letters */
main.game .board-area section#puzzle.puzzle{
  padding:clamp(16px,2.4vh,30px) clamp(25px,3vw,52px)!important;
  gap:clamp(6px,.8vh,11px)!important;
  justify-content:center!important;
  align-items:center!important;
}
main.game .board-area section#puzzle .puzzle-row{
  width:92%!important;
  max-width:92%!important;
  flex:0 1 22%!important;
  min-height:0!important;
  margin:0 auto!important;
  gap:clamp(4px,.45vw,9px)!important;
}
main.game .board-area section#puzzle .puzzle-cell{
  height:100%!important;
  font-size:clamp(32px,3.4vw,68px)!important;
  line-height:1!important;
}
main.game .board-area section#puzzle .puzzle-cell .letter-face,
main.game .board-area section#puzzle .puzzle-cell .flip-back{
  font-size:inherit!important;
  line-height:1!important;
}

/* WOF: papan pilihan konsonan dua barisan, butang lebih besar */
#lettermodal .letter-dialog{width:min(1260px,96vw);padding:clamp(18px,2.3vw,34px)}
#lettermodal .letter-dialog .keyboard{display:grid!important;grid-template-columns:repeat(22,minmax(0,1fr));gap:clamp(5px,.55vw,11px);width:100%;max-width:none} 
#lettermodal .letter-dialog .keyboard[hidden]{display:none!important}
#lettermodal .letter-dialog .keyboard button{grid-column:span 2;min-width:0;width:100%;height:clamp(56px,8.5vh,88px);font-size:clamp(22px,2vw,34px);padding:0;touch-action:manipulation}
/* 10 huruf pada barisan kedua: satu ruang grid di setiap hujung */
#lettermodal .letter-dialog .keyboard button:nth-child(12){grid-column:2 / span 2}
/* Vokal (5 butang) kekal satu barisan dan berpusat */
#lettermodal .letter-dialog .keyboard:has(button:nth-child(5):last-child){grid-template-columns:repeat(5,minmax(0,1fr));max-width:620px;margin-inline:auto}
#lettermodal .letter-dialog .keyboard:has(button:nth-child(5):last-child) button{grid-column:auto}
@media(max-width:760px){#lettermodal .letter-dialog{width:98vw;padding:12px}#lettermodal .letter-dialog .keyboard{gap:3px}#lettermodal .letter-dialog .keyboard button{height:52px;font-size:18px}}

/* V3.5 SOLVE: kiosk touchscreen keyboard, no device keyboard required */
#solvebox .dialog{width:min(1050px,96vw);max-width:1050px;padding:clamp(14px,2vh,28px);max-height:96dvh;overflow-y:auto}
#solvebox .dialog h2{margin:0 0 8px;font-size:clamp(22px,2.3vw,34px)}
#solvebox .dialog p{margin:5px 0;font-size:clamp(14px,1.4vw,20px)}
#solvebox #answer{margin:12px 0;padding:12px 16px;font-size:clamp(18px,2vw,29px);cursor:default;caret-color:transparent;pointer-events:none}
#solvebox .solve-keyboard{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:clamp(3px,.5vw,9px)}
#solvebox .solve-keyboard button,#solvebox .solve-tools button{min-width:0;min-height:clamp(42px,6.8vh,70px);border:1.5px solid #00eaff;border-radius:8px;background:linear-gradient(135deg,#145d94,#29165e);color:white;font-size:clamp(18px,1.8vw,28px);font-weight:900;touch-action:manipulation;cursor:pointer}
#solvebox .solve-keyboard button:active,#solvebox .solve-tools button:active{background:#168dba}
#solvebox .solve-tools{display:flex;justify-content:center;gap:10px;margin-top:12px}
#solvebox .solve-tools button{min-height:44px;padding:8px 20px;font-size:clamp(13px,1.3vw,19px)}
#solvebox .dialog .action{margin:12px 5px 0;padding:12px 18px}
@media(max-width:650px){#solvebox .solve-keyboard{grid-template-columns:repeat(7,minmax(0,1fr))}#solvebox .solve-keyboard button{min-height:42px}#solvebox .solve-tools button{padding:8px}}

/* V3.7: QWERTY touchscreen layout; actions separated at opposite edges */
#solvebox .solve-keyboard{display:flex;flex-direction:column;align-items:center;gap:clamp(5px,.7vh,10px);width:100%}
#solvebox .solve-key-row{display:flex;justify-content:center;gap:clamp(4px,.55vw,10px);width:100%}
#solvebox .solve-key-row button{flex:0 1 8.7%;width:8.7%;max-width:78px;min-width:0;min-height:clamp(42px,6.5vh,68px);padding:0}
#solvebox .solve-tools{margin-top:14px}
#solvebox .solve-actions{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:16px;border-top:1px solid rgba(0,234,255,.25);padding-top:12px}
#solvebox .solve-actions .action{margin:0;white-space:nowrap}
#solvebox .solve-actions #confirm{margin-left:auto}
@media(max-width:650px){#solvebox .solve-key-row{gap:3px}#solvebox .solve-key-row button{flex:1 1 0;width:auto;font-size:clamp(13px,3vw,20px);min-height:40px}#solvebox .solve-actions .action{font-size:clamp(12px,2.5vw,17px);padding:10px}}

/* V3.8: wide keyboard spacebar and top-right backspace */
#solvebox .solve-key-row:first-child .solve-backspace{flex:0 1 15%;width:15%;max-width:150px;font-size:clamp(11px,1.2vw,17px);padding:0 5px}
#solvebox .solve-tools{display:flex;align-items:center;justify-content:center;gap:clamp(8px,1vw,16px);width:100%}
#solvebox .solve-tools #solve-space{flex:0 1 46%;width:46%;max-width:490px;min-height:clamp(42px,6.5vh,68px)}
#solvebox .solve-tools #solve-clear{flex:0 0 auto;min-height:clamp(42px,6.5vh,68px);padding:0 clamp(12px,2vw,28px)}
@media(max-width:650px){#solvebox .solve-key-row:first-child .solve-backspace{flex:0 0 18%;width:18%;font-size:10px}#solvebox .solve-tools #solve-space{flex:1 1 55%;width:auto}#solvebox .solve-tools #solve-clear{font-size:12px;padding:0 9px}}

/* V3.9: warna tindakan khusus untuk kiosk — susun atur dan logik asal kekal */
#solvebox .solve-actions #confirm{
  background:linear-gradient(120deg,#087c58,#10a66e 55%,#075c49);
  border-color:#48ffb4;
  box-shadow:0 0 15px rgba(32,235,151,.55);
  color:#fff;
}
#solvebox .solve-actions #cancel{
  background:linear-gradient(120deg,#921e42,#d33850 55%,#79153a);
  border-color:#ff788c;
  box-shadow:0 0 15px rgba(255,72,112,.45);
  color:#fff;
}
#solvebox .solve-tools #solve-space{
  background:linear-gradient(120deg,#755014,#b47b1f 55%,#684015);
  border-color:#ffd36b;
  color:#fff;
}
#solvebox .solve-tools #solve-clear{
  background:linear-gradient(120deg,#65318c,#8b46b7 55%,#4e2378);
  border-color:#d7a1ff;
  color:#fff;
}
#solvebox .solve-key-row:first-child #solve-delete{
  background:linear-gradient(120deg,#9c4a1a,#ce6a27 55%,#843515);
  border-color:#ffb274;
  color:#fff;
}
#solvebox .solve-actions #confirm:active,#solvebox .solve-actions #cancel:active,
#solvebox .solve-tools #solve-space:active,#solvebox .solve-tools #solve-clear:active,
#solvebox .solve-key-row:first-child #solve-delete:active{filter:brightness(1.25)}

/* V4.0 KIOSK: Semua papan kekunci di bahagian bawah skrin besar. */
#lettermodal.keyboard-overlay,#solvebox.overlay{
  justify-content:flex-end!important;
  align-items:center!important;
  padding:clamp(8px,1.3vh,18px) clamp(8px,1.2vw,22px) clamp(12px,2vh,26px)!important;
  background:rgba(2,9,29,.82);
}
#lettermodal .letter-dialog,#solvebox .dialog{
  margin:0 auto!important;
  flex-shrink:0;
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
  background:linear-gradient(150deg,#0a2048,#10285a 70%,#091b43);
  border:2px solid #12efff;
  box-shadow:0 0 28px rgba(0,230,255,.45),0 10px 38px rgba(0,0,0,.5);
}
#lettermodal .letter-dialog{width:min(1260px,96vw)}
#solvebox .dialog{width:min(1120px,96vw);max-width:1120px}
#lettermodal .letter-dialog h2{margin-bottom:clamp(10px,1.8vh,20px)}
#lettermodal .letter-dialog .keyboard button,
#solvebox .solve-keyboard button{
  border:2px solid #21eaff;
  background:linear-gradient(135deg,#086ba3 0%,#194c91 45%,#36106b 100%);
  box-shadow:0 0 12px rgba(0,222,255,.4),inset 0 1px 0 rgba(255,255,255,.2);
  border-radius:11px;
  color:#fff;
  text-shadow:0 1px 2px rgba(0,0,0,.4);
  font-weight:900;
  cursor:pointer;
  touch-action:manipulation;
}
#lettermodal .letter-dialog .keyboard button:active,
#solvebox .solve-keyboard button:active{filter:brightness(1.35);transform:translateY(1px)}
#lettermodal .letter-dialog .keyboard button:disabled{opacity:.3;box-shadow:none}
#lettermodal #closeletters{
  background:linear-gradient(115deg,#971d44,#d63856,#7c153b);
  border-color:#ff788c;
  box-shadow:0 0 15px rgba(255,72,112,.45);
}
#solvebox .solve-tools button{box-shadow:0 0 13px rgba(0,220,255,.26),inset 0 1px 0 rgba(255,255,255,.16)}
#solvebox .solve-tools #solve-space{background:linear-gradient(120deg,#087c8c,#12a9ba,#0a596f);border-color:#55f4ff;box-shadow:0 0 15px #00dfff66}
#solvebox .solve-tools #solve-clear{background:linear-gradient(120deg,#65318c,#9b49c9,#4e2378);border-color:#e0a6ff;box-shadow:0 0 15px #aa64ff66}
#solvebox .solve-key-row:first-child #solve-delete{background:linear-gradient(120deg,#a44812,#e27c27,#883516);border-color:#ffb274;box-shadow:0 0 15px #ff873e66}
@media(max-height:700px){
 #lettermodal .letter-dialog{padding:12px 18px}
 #lettermodal .letter-dialog .keyboard button{height:clamp(40px,7vh,62px)}
 #solvebox .dialog{padding:12px 18px}
 #solvebox .solve-key-row button{min-height:clamp(35px,6vh,52px)}
 #solvebox .solve-tools #solve-space,#solvebox .solve-tools #solve-clear{min-height:42px}
 #solvebox .dialog h2{font-size:23px}
 #solvebox #answer{margin:6px 0;padding:7px 12px}
}
