/* games-classics.css */
/* AkiWeb V26 - classic board games */
.classic-game-shell{position:relative;max-width:790px;margin:22px auto;background:#17233b;border:1px solid #394963;border-radius:24px;padding:18px;color:#f3f7ff;box-shadow:0 18px 55px #0002}
.classic-top,.classic-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.classic-brand{display:flex;align-items:center;gap:12px}.classic-brand strong{font-size:20px;display:block}.classic-brand small{color:#bac7df;display:block}
.classic-actions{display:flex;gap:8px;flex-wrap:wrap}
.classic-game-shell button{border:1px solid #526481;background:#273858;color:#fff;border-radius:10px;padding:10px 14px;cursor:pointer;font:inherit;font-weight:650}
.classic-game-shell button:hover{background:#405784}.classic-game-shell button:disabled{opacity:.45;cursor:default}
.classic-board{margin:18px auto;touch-action:manipulation}.classic-bottom{border-top:1px solid #34445e;padding-top:14px;color:#c5d3ed}
.classic-overlay{position:absolute;inset:0;z-index:20;background:#10192eea;display:grid;place-items:center;border-radius:24px;padding:18px}
.classic-overlay[hidden]{display:none}.classic-modal{width:min(100%,420px);text-align:center;background:#1e2e4b;border:1px solid #526b96;padding:25px 22px;border-radius:22px;box-shadow:0 20px 50px #0005}
.classic-modal h2{font-size:26px;margin:12px 0}.classic-modal p{color:#cfdbf2;line-height:1.6}.classic-modal a{display:block;margin-top:15px;color:#b8cfff}
.classic-modal-buttons{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px}
.classic-modal-buttons button:first-child{background:#5865ed;border-color:#5865ed}
.classic-modal select{width:100%;padding:10px;border-radius:9px;background:#13223e;color:#fff;border:1px solid #586d90;margin-top:9px}
.classic-xadrez,.classic-damas{display:grid;grid-template-columns:repeat(8,1fr);width:min(100%,560px);aspect-ratio:1;border:6px solid #a5b7d2;border-radius:8px;overflow:hidden;gap:0}
.classic-square{display:grid;place-items:center;aspect-ratio:1;border:0!important;border-radius:0!important;padding:0!important;min-width:0;min-height:0;position:relative;user-select:none}
.classic-square.light{background:#e5e7d8!important;color:#1a2540}.classic-square.dark{background:#7699a0!important;color:#15243a}
.classic-square.selected{box-shadow:inset 0 0 0 5px #ffcc5a!important}.classic-square.target:after{content:"";position:absolute;width:22%;height:22%;border-radius:50%;background:#3b8d52aa;pointer-events:none}
.chess-piece{font-size:clamp(25px,6.6vw,53px);line-height:1;font-family:"DejaVu Sans","Segoe UI Symbol",serif;text-shadow:0 2px 2px #0005}
.chess-piece.white{color:#fff9e9;-webkit-text-stroke:1px #27334b}.chess-piece.black{color:#202a3d;-webkit-text-stroke:.5px #f1f5f9}
.checker{width:78%;height:78%;border-radius:50%;display:grid;place-items:center;border:3px solid #fff7;box-shadow:0 4px 5px #0005,inset 0 -7px #0002;font-size:24px}.checker.red{background:#e34b68;color:#fff}.checker.black{background:#243553;color:#ffdd9d}
.classic-paciencia{overflow-x:auto;max-width:100%;padding-bottom:12px}
.solitaire-layout{min-width:590px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;align-items:start}
.sol-stack{min-height:110px;position:relative}.sol-card{position:absolute;top:0;left:0;width:100%;height:105px;border-radius:9px;border:2px solid #d7e0f0;background:#fff;color:#18223a;box-shadow:0 3px 7px #0003;padding:7px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;font-size:19px;font-weight:800;cursor:pointer;user-select:none}
.sol-card.red{color:#d52e50}.sol-card.back{background:repeating-linear-gradient(45deg,#344f8d 0 6px,#5477b7 6px 12px);border:3px solid #f4f8ff;color:transparent}
.sol-card.selected{outline:4px solid #ffcc59;z-index:8}.sol-card .big{font-size:28px;align-self:center}.sol-placeholder{height:105px;border:2px dashed #8497b2;border-radius:9px;display:grid;place-items:center;color:#adc3e0;font-size:27px;cursor:pointer}
.sol-top{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;margin-bottom:18px}
.sol-top .sol-card{position:relative}.solitaire-tip{margin:0 0 12px;color:#c9d6ed;font-size:13px}
@media(max-width:620px){.classic-game-shell{padding:10px;border-radius:15px}.classic-xadrez,.classic-damas{border-width:3px}.chess-piece{font-size:clamp(25px,9vw,44px)}.checker{border-width:2px;font-size:17px}.classic-top{gap:6px}.classic-brand strong{font-size:17px}.classic-actions button{padding:7px 9px;font-size:12px}.classic-board{margin:12px auto}}

/* V27 premium redesign — scoped to the three classic games */
.board-game-page .classic-game-shell{max-width:880px;background:radial-gradient(circle at 20% 0%,#304a65 0%,#142238 48%,#101b2e 100%);border:1px solid #55728b;border-radius:25px;box-shadow:0 28px 80px #0004;padding:clamp(12px,2.6vw,28px)}
.board-game-page .classic-brand img{filter:drop-shadow(0 5px 12px #0006)}
.board-game-page .classic-brand strong{font-size:clamp(20px,3vw,28px);letter-spacing:-.5px}
.board-game-page .classic-actions button,.board-game-page .classic-bottom button{background:#ffffff12;border:1px solid #ffffff3b;box-shadow:inset 0 1px #ffffff20}
.board-game-page .classic-actions button:hover{background:#ffffff27}
.board-game-page .classic-xadrez,.board-game-page .classic-damas{width:min(100%,620px);border:9px solid #6b4e38;outline:3px solid #bd9868;box-shadow:0 15px 30px #0007,inset 0 0 0 2px #ebcda3;border-radius:6px}
.board-game-page .classic-square.light{background:#f2e2c8!important}.board-game-page .classic-square.dark{background:#9e795d!important}
.board-game-page .classic-square.selected{box-shadow:inset 0 0 0 5px #f9d26d!important;background:#d7ba69!important}
.board-game-page .classic-square.target:after{width:25%;height:25%;background:#2c6c45a8}
.board-game-page .chess-piece{width:95%;height:95%;display:grid;place-items:center;filter:drop-shadow(0 4px 2px #0005);-webkit-text-stroke:0}
.board-game-page .chess-piece img{width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.board-game-page .checker{width:81%;height:81%;border:3px solid #ffffff50;box-shadow:0 6px 4px #0007,inset 0 5px 5px #fff5,inset 0 -7px 7px #0006;position:relative;transition:transform .14s}
.board-game-page .checker.red{background:linear-gradient(150deg,#ff8392,#b71f48 68%,#77112f)}
.board-game-page .checker.black{background:linear-gradient(150deg,#6d89aa,#22324f 68%,#101b30)}
.board-game-page .checker-inner{border:2px solid #ffffff4b;border-radius:50%;width:78%;height:78%;display:grid;place-items:center;box-shadow:inset 0 2px 5px #0005}
.board-game-page .checker-inner svg{width:75%;height:75%;filter:drop-shadow(0 2px 2px #0006)}
.board-game-page .checker-star{font-size:clamp(13px,2.8vw,27px);color:#ffffff9c;text-shadow:0 2px 2px #0004}
.board-game-page .classic-paciencia{--sol-card-h:112px;--sol-fan:29px;overflow:visible;max-width:100%;padding:10px 0 20px}
.board-game-page .sol-top,.board-game-page .solitaire-layout{min-width:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(4px,1vw,11px)}
.board-game-page .sol-top{margin-bottom:24px}.board-game-page .sol-stack{min-width:0;min-height:var(--sol-card-h)}
.board-game-page .sol-card{height:var(--sol-card-h);border-radius:9px;background:linear-gradient(145deg,#fff,#f6f2e9);border:1px solid #d1d7df;box-shadow:0 3px 5px #0005,inset 0 1px #fff;padding:4px;display:block;text-align:left;overflow:hidden;transition:box-shadow .12s,transform .12s}
.board-game-page .sol-card.red{color:#ce3153}.board-game-page .sol-card:not(.red):not(.back){color:#202c40}
.board-game-page .sol-card.back{background:repeating-linear-gradient(45deg,#224b82 0 5px,#356da7 5px 10px);border:4px solid #f6f2e9;box-shadow:inset 0 0 0 2px #9dc0e3,0 3px 6px #0006}
.board-game-page .sol-card.back:after{content:"✦";display:grid;place-items:center;position:absolute;inset:10px;border:2px solid #e4efffaa;color:#e4efff;font-size:24px;border-radius:4px;background:#123d7488}
.board-game-page .sol-card.selected{outline:3px solid #ffd76d;outline-offset:1px;box-shadow:0 0 20px #ffcf54a0;z-index:30!important}
.board-game-page .sol-corner{font-family:Georgia,serif;font-size:clamp(11px,1.9vw,20px);line-height:1;font-weight:800;display:flex;flex-direction:column;gap:2px;align-items:center;width:max-content}
.board-game-page .sol-corner-bottom{position:absolute;right:5px;bottom:5px;transform:rotate(180deg)}
.board-game-page .sol-center{font-family:Georgia,serif;font-size:clamp(18px,3vw,39px);font-weight:700;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);white-space:nowrap}
.board-game-page .sol-placeholder{height:var(--sol-card-h);min-height:0;border-radius:10px;background:#ffffff0c;border:2px dashed #ffffff59;font-family:Georgia,serif;font-size:30px;color:#e4e5c4}
.board-game-page .classic-paciencia .sol-top .sol-card{position:relative}
@media(max-width:650px){.board-game-page .classic-paciencia{--sol-card-h:clamp(60px,16vw,92px);--sol-fan:clamp(16px,3.9vw,23px);padding:3px 0 10px}.board-game-page .sol-top{margin-bottom:12px}.board-game-page .sol-card{border-radius:5px;padding:2px}.board-game-page .sol-card.back{border-width:2px}.board-game-page .sol-card.back:after{inset:5px;font-size:15px}.board-game-page .sol-corner{font-size:clamp(10px,2.7vw,15px)}.board-game-page .sol-center{font-size:clamp(15px,5vw,29px)}.board-game-page .sol-corner-bottom{right:2px;bottom:2px}.board-game-page .classic-xadrez,.board-game-page .classic-damas{border-width:5px;outline-width:1px}}

/* V28 — proportional boards and compact, readable solitaire */
.board-game-page .classic-xadrez,.board-game-page .classic-damas{box-sizing:border-box;width:min(100%,540px);max-width:540px;aspect-ratio:1/1;margin:20px auto;grid-template-rows:repeat(8,minmax(0,1fr));border-width:7px}
.board-game-page .classic-square{box-sizing:border-box;overflow:hidden;min-width:0;min-height:0}
.board-game-page .chess-piece{width:76%!important;height:76%!important;max-width:76%;max-height:76%;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 2px 2px #0005)}
.board-game-page .chess-piece img{width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain}
.board-game-page .checker{box-sizing:border-box;width:68%!important;height:68%!important;max-width:68%;max-height:68%;border-width:2px;box-shadow:0 3px 3px #0006,inset 0 3px 3px #fff5,inset 0 -4px 4px #0005}
.board-game-page .checker-inner{box-sizing:border-box;width:77%;height:77%;border-width:1px}
.board-game-page .checker-inner svg{width:70%;height:70%}
.board-game-page .classic-paciencia{--sol-gap:clamp(4px,1.05vw,10px);--sol-card-h:clamp(76px,10.8vw,96px);--sol-fan:24px;box-sizing:border-box;width:100%;max-width:700px;margin:12px auto 18px;padding:12px 8px 20px;overflow:visible;border-radius:15px;background:linear-gradient(145deg,#17634e,#104c41);box-shadow:inset 0 2px 14px #0004,0 10px 25px #0003;container-type:inline-size}
.board-game-page .sol-top,.board-game-page .solitaire-layout{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:var(--sol-gap);width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.board-game-page .sol-top{margin-bottom:18px;align-items:start}
.board-game-page .sol-stack{box-sizing:border-box;min-width:0;min-height:var(--sol-card-h);width:100%}
.board-game-page .sol-card,.board-game-page .sol-placeholder{box-sizing:border-box;width:100%!important;max-width:100%;height:var(--sol-card-h)!important;min-height:0;min-width:0;border-radius:6px}
.board-game-page .sol-card{padding:3px!important;border-width:1px;overflow:hidden}
.board-game-page .sol-card.back{border-width:2px}
.board-game-page .sol-card.back:after{inset:6px;font-size:17px}
.board-game-page .sol-corner{font-size:clamp(10px,1.45vw,15px);line-height:.95;gap:1px}
.board-game-page .sol-center{font-size:clamp(16px,2.4vw,26px);top:51%}
.board-game-page .sol-placeholder{font-size:clamp(17px,2.4vw,24px);padding:0!important}
.board-game-page .sol-corner-bottom{right:3px;bottom:3px}
@container (max-width:520px){.board-game-page .sol-corner-bottom{display:none}.board-game-page .sol-center{top:56%}}
@media(max-width:650px){.board-game-page .classic-xadrez,.board-game-page .classic-damas{width:min(100%,420px);border-width:4px;margin:12px auto}.board-game-page .chess-piece{width:74%!important;height:74%!important}.board-game-page .checker{width:67%!important;height:67%!important}.board-game-page .classic-paciencia{--sol-gap:3px;--sol-card-h:clamp(54px,15vw,75px);--sol-fan:clamp(17px,4.5vw,22px);padding:9px 5px 12px;margin:10px auto}.board-game-page .sol-top{margin-bottom:12px}.board-game-page .sol-card{padding:2px!important;border-radius:4px}.board-game-page .sol-corner{font-size:clamp(9px,2.6vw,12px)}.board-game-page .sol-center{font-size:clamp(14px,4.4vw,21px);top:56%}.board-game-page .sol-corner-bottom{display:none}.board-game-page .sol-card.back:after{inset:3px;font-size:12px}.board-game-page .sol-placeholder{font-size:17px;border-width:1px;border-radius:4px}}
@media(max-width:380px){.board-game-page .classic-paciencia{--sol-card-h:clamp(49px,14vw,57px);--sol-fan:16px;--sol-gap:2px}.board-game-page .sol-corner{font-size:9px}.board-game-page .sol-center{font-size:15px}}

/* AkiWeb V30 — coherent arcade presentation, accessible solitaire, enigmatic hangman */
.game-page .game-panel,.board-game-page .classic-game-shell{border:1px solid #536789;border-radius:22px;box-shadow:0 18px 60px #0005;background:radial-gradient(ellipse at 15% 0%,#263d60 0%,#111d33 68%)}
.game-page .game-modal,.board-game-page .classic-modal{background:linear-gradient(160deg,#253b5b,#14233b 78%);border:1px solid #526a8d;color:#eef4ff;border-radius:22px;box-shadow:0 22px 60px #0008;padding:clamp(18px,3vw,29px)}
.game-page .game-modal h2,.board-game-page .classic-modal h2{color:#fff;font-weight:800;letter-spacing:-.025em;margin:8px 0 12px}
.game-page .game-modal-kicker,.board-game-page .game-modal-kicker{color:#a9baff;letter-spacing:.17em;font-weight:850;font-size:11px}
.game-page .game-modal input{background:#0d192c;color:#fff;border-color:#50617f}
.game-page .game-modal label,.game-page .game-avatar-label{color:#e7eeff}
.game-page .game-menu-info p,.game-page .game-menu-detail,.board-game-page .classic-modal p{color:#c9d6ed}
.game-page .game-menu-detail{background:#14223a;border-color:#465b7a}
.game-page .game-menu-detail h3{color:#fff}
.game-page .game-modal-actions .button,.board-game-page .classic-modal-buttons button{border-radius:12px;min-height:44px;font-weight:750}
.game-page .game-modal-actions .primary,.board-game-page .classic-modal-buttons button:first-child{background:linear-gradient(125deg,#5768ee,#7b5df0);border:1px solid #938cff;color:#fff}
.board-game-page .classic-modal{width:min(100%,470px);text-align:center}
.board-game-page .classic-modal>img{display:block;width:90px;height:90px;object-fit:contain;margin:16px auto 6px;border-radius:18px;box-shadow:0 9px 22px #0005}
.board-game-page .classic-modal-subtitle{display:block;font-size:14px;color:#afc7ec;margin:0 0 8px}
.board-game-page .classic-modal select{background:#0c1b31;color:#fff;border:1px solid #526a8d}
.board-game-page .classic-modal a{color:#c3d5ff;font-size:14px}
/* Cards: a face-up card always exposes enough of its header to read rank and suit. */
.board-game-page .classic-paciencia{--sol-card-h:100px;max-width:740px;min-height:430px;padding:15px 12px 26px;background:linear-gradient(135deg,#16644d,#0d4439)}
.board-game-page .sol-top,.board-game-page .solitaire-layout{gap:clamp(5px,1.2vw,12px)}
.board-game-page .sol-top{margin-bottom:26px}
.board-game-page .sol-card{height:var(--sol-card-h)!important;box-shadow:0 3px 8px #0006;background:linear-gradient(145deg,#fff,#faf8f2);border-radius:7px;padding:5px!important}
.board-game-page .sol-corner{font-size:clamp(13px,1.65vw,17px);font-weight:900;line-height:1.02}
.board-game-page .sol-corner small{font-size:.85em}
.board-game-page .sol-center{font-size:clamp(21px,2.7vw,29px);top:54%}
.board-game-page .sol-card.back:after{inset:7px}
.board-game-page .sol-stack{isolation:isolate}
.board-game-page .sol-card:focus-visible,.board-game-page .sol-placeholder:focus-visible{outline:3px solid #ffce5d;outline-offset:1px}
/* Forca: clues and missed letters */
.game-page .hang-hint{width:min(100%,550px);margin:12px auto 16px;padding:13px 18px;border:1px solid #5e7399;border-radius:15px;background:linear-gradient(130deg,#1f3354,#192740);color:#f0f5ff;text-align:center;box-shadow:0 7px 18px #0002}
.game-page .hang-hint-label{font-size:10px;letter-spacing:.18em;font-weight:850;color:#a7bcff}
.game-page .hang-hint p{font-size:clamp(14px,2vw,17px);line-height:1.5;margin:7px 0 0;font-weight:600}
.game-page .hang-word .hang-missed{color:#ff596e!important;border-bottom-color:#ff596e!important;background:#ff43521c;text-shadow:0 1px 9px #f4384555}
.game-page .hang-word .hang-correct{color:#7fe4ad}
.game-page .hang-reveal.lost{color:#ff8d9c}
@media(max-width:650px){.board-game-page .classic-paciencia{--sol-card-h:clamp(58px,16vw,82px);padding:9px 5px 14px;min-height:330px}.board-game-page .sol-top,.board-game-page .solitaire-layout{gap:3px}.board-game-page .sol-top{margin-bottom:16px}.board-game-page .sol-card{padding:2px!important;border-radius:4px}.board-game-page .sol-corner{font-size:clamp(10px,2.8vw,13px)}.board-game-page .sol-center{font-size:clamp(16px,4.5vw,24px)}.board-game-page .classic-modal>img{width:76px;height:76px}}

.game-page .game-menu-tagline{font-size:13px;color:#b7c9e8;margin:0 auto 13px;max-width:330px;line-height:1.5}
.board-game-page .classic-overlay{background:#081323e8;backdrop-filter:blur(5px)}
.game-page .game-overlay{backdrop-filter:blur(5px)}

/* V31: properly contained chess artwork, with breathing room on all four edges */
.board-game-page .classic-xadrez .classic-square{
 display:flex!important;align-items:center!important;justify-content:center!important;
 overflow:hidden!important;line-height:0!important;
}
.board-game-page .classic-xadrez .chess-piece{
 display:flex!important;align-items:center!important;justify-content:center!important;
 box-sizing:border-box!important;width:80%!important;height:80%!important;
 max-width:80%!important;max-height:80%!important;
 margin:0!important;padding:0!important;line-height:0!important;
 overflow:visible!important;filter:drop-shadow(0 2px 1px #0005)!important;
}
.board-game-page .classic-xadrez .chess-piece img{
 display:block!important;width:100%!important;height:100%!important;
 object-fit:contain!important;object-position:center!important;
 max-width:100%!important;max-height:100%!important;
 margin:0!important;padding:0!important;transform:none!important;
}
@media(max-width:650px){.board-game-page .classic-xadrez .chess-piece{width:78%!important;height:78%!important}}

/* V32 shared arcade navigation and chess analysis */
.arcade-toolbar{max-width:860px;margin:16px auto 10px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.arcade-toolbar-title{font-size:11px;font-weight:800;letter-spacing:.14em;color:#98aed2}
.arcade-back-link,.arcade-menu-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#263856;color:#e7efff!important;border:1px solid #53698b;border-radius:12px;padding:10px 15px;text-decoration:none;font-size:13px;font-weight:750;cursor:pointer}
.arcade-back-link:hover,.arcade-menu-trigger:hover{background:#344d73;color:#fff!important}
.arcade-menu-navigation{margin:10px auto 18px;display:flex;justify-content:center}
.game-panel>.arcade-toolbar{padding:10px 15px;margin:0 auto 12px;max-width:none;border-bottom:1px solid #3d5271}
.game-panel>.arcade-toolbar .arcade-back-link{padding:8px 12px}
.game-panel>.arcade-toolbar .arcade-menu-trigger{padding:8px 12px}
.chess-premium-layout{display:grid;grid-template-columns:minmax(0,560px) minmax(205px,260px);gap:18px;align-items:start;justify-content:center;margin:18px auto;max-width:850px}
.board-game-page .classic-game-shell:has(.chess-premium-layout){max-width:970px}
.chess-board-column{min-width:0}
.chess-board-column .classic-xadrez{width:100%;margin:0;max-width:560px}
.chess-board-note{padding:10px 3px;color:#b9cbe5;font-size:12px}
.chess-side-panel{border:1px solid #405678;background:linear-gradient(160deg,#1d2e4b,#111d32);border-radius:16px;padding:13px;min-width:0}
.chess-player-bar{display:flex;align-items:center;gap:10px;padding:9px 2px}
.chess-player-bar strong{display:block;font-size:14px;color:#f1f6ff}
.chess-player-bar small{display:block;font-size:11px;color:#a9bedc}
.chess-player-dot{width:18px;height:18px;flex:none;border-radius:50%;border:2px solid #9ab1d0}
.chess-player-dot.dark{background:#17213a}.chess-player-dot.light{background:#fff9eb}
.chess-capture-strip{display:flex;align-items:center;gap:1px;min-height:36px;flex-wrap:wrap;padding:5px;background:#0d192b;border:1px solid #2d4160;border-radius:9px}
.chess-capture-strip img{width:23px;height:29px;object-fit:contain}
.chess-history-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:18px 0 8px;color:#eef4ff}
.chess-history-head strong{font-size:14px}.chess-history-head span{font-size:11px;color:#b0c4e0}
.chess-history-list{height:230px;overflow-y:auto;overscroll-behavior:contain;background:#0e1a2c;border:1px solid #334866;border-radius:10px;padding:6px}
.chess-history-empty{font-size:12px;color:#91a6c7;padding:12px}
.chess-move-row{display:grid;grid-template-columns:34px 1fr 1fr;gap:5px;padding:3px;border-radius:6px}
.chess-move-row:nth-child(even){background:#1b2c47}
.chess-move-number{font-size:12px;color:#94a9c7;padding:7px 2px}
.chess-move-cell{font-size:13px;color:#e2eafa;border-radius:6px;padding:6px 7px;font-weight:650}
.chess-move-cell.current{background:#405d88;color:#fff}
.chess-motion-piece{position:fixed;z-index:9999;pointer-events:none;object-fit:contain;filter:drop-shadow(0 3px 4px #0005)}
.board-game-page .classic-xadrez .classic-square.last-move{box-shadow:inset 0 0 0 100px #e9cb5150}
@media(max-width:760px){.chess-premium-layout{grid-template-columns:minmax(0,1fr);gap:12px}.chess-side-panel{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}.chess-history-head,.chess-history-list{grid-column:1/-1}.chess-history-list{height:160px}.chess-capture-strip img{width:19px;height:25px}}
@media(max-width:390px){.arcade-toolbar{gap:5px}.arcade-back-link,.arcade-menu-trigger{font-size:11px;padding:8px}.chess-side-panel{padding:9px}.chess-player-bar strong{font-size:12px}}

/* override old 540px fixed board constraints within the new two-column layout */
.board-game-page .chess-board-column .classic-xadrez{width:100%!important;max-width:560px!important;margin:0 auto!important;box-sizing:border-box!important}
.board-game-page .chess-board-column .classic-square{min-width:0;min-height:0}

/* V33: AkiWeb Arcade full redesign */
.game-portal{max-width:1240px!important}
.portal-hero{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:center;gap:24px;padding:clamp(26px,5vw,55px);margin:16px 0 34px;border-radius:30px;background:radial-gradient(circle at 82% 28%,#50409d 0,transparent 42%),linear-gradient(120deg,#182d55,#161b3d 70%);border:1px solid #5360a6;box-shadow:0 24px 75px #090e2866;color:#fff}
.portal-hero h1{color:#fff!important;max-width:720px;font-size:clamp(32px,4.7vw,59px);line-height:1.06;letter-spacing:-.045em;margin:13px 0 18px}
.portal-hero p{max-width:600px;color:#cbd7f5;font-size:clamp(14px,1.6vw,17px);line-height:1.7}
.portal-eyebrow{font-size:11px;font-weight:900;letter-spacing:.18em;color:#94b8ff}
.portal-hero-stats{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.portal-hero-stats span{background:#ffffff12;border:1px solid #ffffff28;border-radius:12px;padding:10px 16px;font-size:12px;color:#cdd9f8}.portal-hero-stats strong{color:#fff;font-size:20px;margin-right:4px}
.portal-hero-art{position:relative;height:225px}.portal-hero-art span{position:absolute;display:grid;place-items:center;border:1px solid #ffffff55;box-shadow:0 16px 35px #050a2c99;border-radius:25px;font-size:72px;color:#f5e4b5;background:linear-gradient(150deg,#6976c5,#30285e)}.portal-hero-art span:nth-child(1){width:150px;height:150px;left:0;top:22px;transform:rotate(-13deg)}.portal-hero-art span:nth-child(2){width:125px;height:125px;right:4px;top:0;transform:rotate(15deg);color:#ff8199}.portal-hero-art span:nth-child(3){width:85px;height:85px;right:30px;bottom:0;font-size:40px;color:#ffcf78}.portal-hero-art span:nth-child(4){width:100px;height:100px;left:32px;bottom:-7px;font-size:54px;color:#f8f5ec}
.portal-section-head{display:flex;align-items:end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:0 0 18px}.portal-section-head h2{font-size:clamp(24px,3vw,34px);color:#f3f5ff;margin:7px 0}.portal-section-head p{color:#9eb0d2;font-size:13px}
.portal-filters{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:24px}.portal-filters button{cursor:pointer;border:1px solid #4d5b7b;background:#202d48;color:#d9e5fc;padding:10px 15px;border-radius:999px;font-size:13px;font-weight:750;transition:background .18s,transform .18s}.portal-filters button:hover{transform:translateY(-2px);background:#30436a}.portal-filters button.active{background:linear-gradient(115deg,#586bf1,#8a55e7);border-color:#b5a2ff;color:white}.portal-filters button span{margin-left:6px;opacity:.8}
.portal-games-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}.portal-games-grid .game-card[hidden]{display:none!important}
.portal-games-grid .arcade-portal-card{display:flex;flex-direction:column;padding:15px!important;background:linear-gradient(160deg,#243450,#151e33)!important;border:1px solid #425678!important;border-radius:23px!important;min-width:0;box-shadow:0 12px 34px #0003;overflow:hidden;transition:transform .2s,box-shadow .2s,border-color .2s}
.portal-games-grid .arcade-portal-card:hover{transform:translateY(-5px);border-color:#8d90e7!important;box-shadow:0 22px 48px #0006}
.portal-games-grid .game-card-icon{width:100%!important;height:170px!important;border-radius:16px!important;background:radial-gradient(circle at 50% 20%,#384c80,#131d36)!important;margin:0!important;overflow:hidden!important}
.portal-games-grid .game-card-icon img{width:155px!important;height:155px!important;object-fit:contain!important;filter:drop-shadow(0 12px 14px #0005)!important;transition:transform .2s}.portal-games-grid .arcade-portal-card:hover img{transform:scale(1.065)}
.portal-card-info{padding:16px 7px 6px;display:flex;flex-direction:column;flex:1}.portal-category{color:#a6b6ff;font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.portal-card-info h2{color:#fff!important;font-size:21px!important;margin:7px 0!important}.portal-card-info p{color:#b8c9e2!important;min-height:46px!important;font-size:13px!important;line-height:1.6}.portal-play{display:flex;align-items:center;justify-content:space-between;margin-top:auto;border-top:1px solid #42506a;padding-top:13px;color:#aabfff;font-size:13px;font-weight:800}.portal-play span{font-size:21px}
/* Single menu system: no nested scrollbars; menus are in the normal document flow */
.game-page .game-panel.game-menu-active{min-height:0!important}
.game-page .game-panel.game-menu-active:has(> #game-menu:not([hidden])) > :not(.arcade-toolbar):not(#game-menu){display:none!important}
.game-page .game-panel.game-menu-active:has(> #game-over:not([hidden])) > :not(.arcade-toolbar):not(#game-over){display:none!important}
.game-page .game-panel.game-menu-active:has(> .game-stage-overlay) > :not(.arcade-toolbar):not(.game-stage-overlay){display:none!important}
.game-page .game-panel.game-menu-active > .game-overlay:not([hidden]){position:relative!important;inset:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:14px!important;margin:0!important;overflow:visible!important;min-height:0!important;border-radius:19px!important;background:transparent!important;backdrop-filter:none!important}
.game-page .game-modal,.board-game-page .classic-modal{box-sizing:border-box;width:min(100%,560px)!important;max-height:none!important;overflow:visible!important;margin:0 auto!important;padding:clamp(17px,2.6vw,28px)!important;border-radius:24px!important;background:linear-gradient(155deg,#26385b,#151e37 78%)!important;border:1px solid #566c96!important;box-shadow:0 18px 48px #0005!important;color:#eef4ff!important}
.game-page .game-modal h2,.board-game-page .classic-modal h2{font-size:clamp(23px,3vw,29px)!important;line-height:1.2;margin:8px 0!important}
.game-page .game-modal .game-menu-tagline{font-size:13px;line-height:1.5;margin:5px 0 12px;color:#c3d3f0}
.game-page .game-modal label,.game-page .game-avatar-label{margin:9px 0 5px!important;font-size:12px!important}
.game-page .avatar-choices{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px!important}.game-page .avatar-option{min-height:49px!important;border-radius:13px!important;background:#1b2c49!important;border:1px solid #60749c!important}.game-page .avatar-option.selected{border:2px solid #9f91ff!important;background:#384978!important}
.game-page .game-menu-info{padding:8px 12px!important;margin:10px 0 0!important;border-radius:11px!important}.game-page .game-menu-info p{margin:4px 0!important;font-size:12px!important}
.game-page .game-modal-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;margin:13px 0 0!important}.game-page .game-modal-actions .button{min-width:0!important;min-height:42px!important;padding:10px 8px!important;font-size:12px!important}
.game-page .arcade-menu-navigation{margin:12px 0 0!important}.game-page .game-modal .arcade-back-link{font-size:12px;padding:8px 13px}
.game-page .game-overlay::-webkit-scrollbar,.game-page .game-modal::-webkit-scrollbar,.board-game-page .classic-overlay::-webkit-scrollbar{display:none!important}
.board-game-page .classic-game-shell:has(> .classic-overlay:not([hidden])) > .classic-top,.board-game-page .classic-game-shell:has(> .classic-overlay:not([hidden])) > .classic-board,.board-game-page .classic-game-shell:has(> .classic-overlay:not([hidden])) > .classic-bottom,.board-game-page .classic-game-shell:has(> .classic-overlay:not([hidden])) > .chess-premium-layout{display:none!important}
.board-game-page .classic-game-shell:has(> .classic-overlay:not([hidden])){min-height:0!important}
.board-game-page .classic-overlay:not([hidden]){position:relative!important;inset:auto!important;display:flex!important;justify-content:center!important;align-items:center!important;background:transparent!important;padding:10px!important;border-radius:20px!important;overflow:visible!important}
.board-game-page .classic-modal{width:min(100%,560px)!important}.board-game-page .classic-modal-buttons{gap:9px!important}.board-game-page .classic-modal-buttons button{min-height:45px!important}
/* Bigger snake playing field without distorting its 400x400 logical canvas */
.game-page .game-panel:has(canvas[data-game="snake"]){width:min(100%,810px)!important}
.game-page .game-canvas-wrap:has(canvas[data-game="snake"]){width:100%;padding:12px!important}
.game-page canvas[data-game="snake"]{display:block!important;width:min(100%,690px)!important;height:auto!important;max-height:none!important;aspect-ratio:1/1!important;image-rendering:auto}
/* Explicit check indication on the board and in the status area */
.classic-xadrez .classic-square.king-in-check{background:#c84054!important;box-shadow:inset 0 0 0 4px #ffdf7d!important;animation:checkPulse 1.35s ease-in-out infinite}
.chess-board-note.chess-check-alert{border:1px solid #ff8094;border-radius:10px;background:#6a263a;color:#fff!important;padding:12px 15px;font-weight:800;letter-spacing:.02em}
@keyframes checkPulse{50%{box-shadow:inset 0 0 0 7px #ffb657,0 0 14px #ff496f77}}
@media(max-width:940px){.portal-games-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.portal-hero{grid-template-columns:minmax(0,1fr) 180px}.portal-hero-art{transform:scale(.75);transform-origin:center left}}
@media(max-width:610px){.portal-games-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.portal-games-grid .arcade-portal-card{padding:9px!important;border-radius:15px!important}.portal-games-grid .game-card-icon{height:118px!important}.portal-games-grid .game-card-icon img{width:105px!important;height:105px!important}.portal-card-info{padding:10px 3px 3px}.portal-card-info h2{font-size:15px!important}.portal-card-info p{font-size:11px!important;min-height:58px!important}.portal-hero{grid-template-columns:1fr;padding:25px 20px}.portal-hero-art{display:none}.portal-filters{gap:6px}.portal-filters button{padding:8px 10px;font-size:11px}.portal-hero-stats{gap:6px}.portal-hero-stats span{padding:8px 10px}.game-page .game-modal-actions .button{font-size:11px!important}.game-page .avatar-option{min-height:41px!important}}
@media(prefers-reduced-motion:reduce){.classic-xadrez .classic-square.king-in-check{animation:none}.portal-games-grid .arcade-portal-card{transition:none}}

/* V34 — responsive, viewport-aware game surfaces (no internal scrollbars) */
.game-page,.board-game-page{min-width:0}
.game-page .game-panel,.board-game-page .classic-game-shell{box-sizing:border-box;max-width:100%;min-width:0}
.game-page .game-panel:not(.game-menu-active) .game-canvas-wrap{max-width:100%;max-height:calc(100dvh - 225px);overflow:hidden;box-sizing:border-box}
.game-page .game-panel:not(.game-menu-active) .game-canvas-wrap canvas{width:auto!important;height:auto!important;max-width:100%!important;max-height:min(510px,calc(100dvh - 250px))!important;object-fit:contain}
.game-page .game-panel:has(canvas[data-game="snake"]){width:min(100%,650px)!important}
.game-page .game-panel:not(.game-menu-active) canvas[data-game="snake"]{
 width:min(100%,500px,calc(100dvh - 255px))!important;
 height:auto!important;max-height:min(500px,calc(100dvh - 255px))!important;
 aspect-ratio:1/1!important;object-fit:contain!important;
}
.game-page .game-panel:not(.game-menu-active) .arcade-board{max-width:100%;min-width:0;box-sizing:border-box}
.game-page .game-panel:not(.game-menu-active) .memory-grid,
.game-page .game-panel:not(.game-menu-active) .sudoku-grid,
.game-page .game-panel:not(.game-menu-active) .mines-grid,
.game-page .game-panel:not(.game-menu-active) .board-2048,
.game-page .game-panel:not(.game-menu-active) .ttt-grid{
 max-width:min(100%,calc(100dvh - 245px),520px)!important;
 margin-inline:auto;box-sizing:border-box;
}
.game-page .game-panel:not(.game-menu-active) .hang-scene{max-height:min(25dvh,180px);overflow:hidden}
.game-page .game-panel:not(.game-menu-active) .hang-scene svg{max-height:min(25dvh,180px)}
.game-page .game-panel:not(.game-menu-active) .hang-hint{margin-block:6px!important;padding:9px 12px!important}
.game-page .game-panel:not(.game-menu-active) .hang-hint p{margin:4px 0!important}
.game-page .game-panel:not(.game-menu-active) .hang-keys{gap:4px!important}
.game-page .game-panel:not(.game-menu-active) .hang-keys button{min-height:32px!important;padding:5px!important}
.game-page .game-panel:not(.game-menu-active) .game-stats{margin-bottom:8px}
.game-page .game-panel:not(.game-menu-active) .arcade-toolbar{margin-bottom:8px}
.game-page .game-panel:not(.game-menu-active) .game-help{margin:7px 0}
.game-page .game-panel:not(.game-menu-active) .game-actions{margin-top:8px}
.game-page .game-panel:not(.game-menu-active) .arcade-tools{max-width:100%}
.board-game-page .classic-xadrez,.board-game-page .classic-damas{max-width:min(100%,calc(100dvh - 235px),540px)!important}
.board-game-page .classic-paciencia{max-width:100%;overflow-x:auto;scrollbar-width:none}
.board-game-page .classic-paciencia::-webkit-scrollbar{display:none}
@media(max-height:680px){.game-page .game-panel:not(.game-menu-active) .game-canvas-wrap canvas{max-height:calc(100dvh - 205px)!important}.game-page .game-panel:not(.game-menu-active) canvas[data-game="snake"]{width:min(100%,calc(100dvh - 205px))!important;max-height:calc(100dvh - 205px)!important}.game-page .game-panel:not(.game-menu-active) .game-stats{font-size:11px}}
@media(max-width:600px){.game-page .game-panel:has(canvas[data-game="snake"]){width:100%!important}.game-page .game-panel:not(.game-menu-active) canvas[data-game="snake"]{width:min(100%,calc(100dvh - 220px))!important;max-height:calc(100dvh - 220px)!important}.game-page .game-panel:not(.game-menu-active) .game-canvas-wrap{padding:7px!important}}

/* V47: Hangman mobile — keep the entire drawing visible and compact. */
@media(max-width:600px){.game-page #game-panel:has(canvas[data-game="forca"]) .hang-scene,
 .game-page #game-panel:has(.hang-scene) .hang-scene{
  width:min(100%,205px)!important;max-height:none!important;overflow:visible!important;
  margin:3px auto!important;filter:none!important;
 }.game-page #game-panel:has(.hang-scene) .hang-scene svg{
  display:block!important;width:100%!important;height:auto!important;max-height:none!important;
 }.game-page #game-panel:has(.hang-scene) .hang-hint{margin:5px auto!important;padding:7px 10px!important}.game-page #game-panel:has(.hang-scene) .hang-title{margin:3px auto!important;font-size:13px!important}.game-page #game-panel:has(.hang-scene) .hang-word{gap:3px!important;margin:5px auto!important}.game-page #game-panel:has(.hang-scene) .hang-word span{min-width:16px!important;font-size:17px!important;padding-bottom:2px!important}.game-page #game-panel:has(.hang-scene) .letter-grid{gap:3px!important}.game-page #game-panel:has(.hang-scene) .letter-grid button{padding:6px 1px!important;min-height:30px!important}}

