/* Shared board controls keep their targets comfortably usable on mobile. */
.board-main{max-width:700px;margin:0 auto;padding:18px 14px 40px;color:#eff4ff}.board-options{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}.board-options label,.room-setup label{display:flex;gap:8px;align-items:center;font-size:16px}.board-options select,.room-setup select,.room-setup input,.room-share input{background:#14253d;color:#f5f7ff;border:1px solid #476080;border-radius:8px;padding:10px;font:inherit;min-width:0}.board-options button,.board-main button,.remote-panel button{font:inherit;cursor:pointer}.board-options button,.ludo-control button,.remote-panel button{border:1px solid #476080;border-radius:9px;background:#213857;color:#fff;padding:10px 14px;min-height:42px}.board-main button:disabled,.remote-panel button:disabled{cursor:default;opacity:.55}.classic-ludo-view .gamebar{flex-wrap:wrap;gap:8px}.classic-ludo-view .gamebar button{font-size:14px;white-space:normal}.classic-ludo{position:relative;display:grid;grid-template-columns:repeat(15,1fr);grid-template-rows:repeat(15,1fr);width:100%;aspect-ratio:1;max-width:600px;margin:18px auto;background:#f6f2e5;border:5px solid #152338;border-radius:14px;overflow:hidden;box-shadow:0 12px 38px #0005}.ludo-cell{border:1px solid #9ca8ad;color:#162637;display:flex;align-items:center;justify-content:center;font-size:clamp(10px,2.6vw,22px);line-height:1;z-index:1;background:#fff}.ludo-cell.protected{background:#e7e9e7;color:#24344d}.ludo-cell.home-lane{color:#fff}.ludo-yard{position:relative;grid-row:span 6;grid-column:span 6;background:var(--team);border:2px solid #223047;display:flex;align-items:center;justify-content:center}.ludo-yard span{position:absolute;top:7px;left:9px;color:#fff;font-size:14px;font-weight:800;text-shadow:0 1px 2px #0008}.ludo-yard.yard-0{grid-area:1/1/7/7}.ludo-yard.yard-1{grid-area:1/10/7/16}.ludo-yard.yard-2{grid-area:10/10/16/16}.ludo-yard.yard-3{grid-area:10/1/16/7}.yard-inner{width:71%;height:71%;background:#fffffff0;border:2px solid #152338;border-radius:20%;margin-top:9%}.ludo-finish{grid-area:7/7/10/10;background:conic-gradient(from -45deg,#13895b 0 25%,#ecbb27 25% 50%,#2865cc 50% 75%,#df3a50 75% 100%);display:flex;align-items:center;justify-content:center;color:#fff;font-size:26px;text-shadow:0 1px 3px #000;z-index:0}.classic-ludo button.classic-pawn{position:absolute;display:flex;align-items:center;justify-content:center;width:5.3%;height:5.3%;min-height:0;padding:0;border-radius:50%;border:2px solid #fff;background:var(--team);color:#fff;font-size:clamp(10px,2.5vw,17px);font-weight:900;line-height:1;box-shadow:0 2px 2px #0008;opacity:1;text-shadow:0 1px 2px #000}.classic-ludo button.classic-pawn.playable{outline:3px solid #101a2e;box-shadow:0 0 0 5px #fff8,0 3px 6px #0008;cursor:pointer}.classic-ludo button.classic-pawn:focus-visible{outline:4px solid #06c8ff}.ludo-control{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:108px;background:#15263e;border:1px solid #324d71;padding:14px;border-radius:14px}.ludo-control strong{font-size:19px;color:#fff}.ludo-control p{font-size:15px;margin:6px 0;line-height:1.45}.ludo-control .ludo-roll{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:86px;min-height:90px;background:#eac24d;color:#172137;font-weight:800}.ludo-roll span{font-size:42px;line-height:1}.ludo-roll small{font-size:14px;margin-top:5px}.pawn-shortcuts{display:flex;gap:5px;flex-wrap:wrap}.ludo-control .pawn-shortcuts button{font-size:14px;padding:8px;min-height:40px}.ludo-scores{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.ludo-scores span{border-bottom:4px solid;padding:10px;font-size:15px}.board-rules{margin-top:18px;font-size:16px;line-height:1.6}.board-rules summary{cursor:pointer;font-weight:700;padding:10px}.race-notice{position:absolute;top:14px;left:50%;transform:translateX(-50%);background:#101b2eea;color:#ffe191;padding:10px 16px;border-radius:8px;font-weight:800;white-space:nowrap;pointer-events:none}.remote-overlay{position:fixed;inset:0;z-index:10000;background:#06101bf5;overflow:auto;padding:18px;color:#eff4ff;text-align:left;line-height:1.5;font-size:16px;isolation:isolate}.remote-panel{width:100%;max-width:760px;min-height:70vh;margin:0 auto;background:#0f1d32;border:1px solid #334b6d;border-radius:18px;padding:20px;box-shadow:0 20px 60px #0008}.remote-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #304462;padding-bottom:14px;margin-bottom:16px}.remote-heading h2{margin:0;font-size:26px;line-height:1.3}.remote-heading small{font-size:13px;color:#8cb9ec;letter-spacing:.08em}.remote-heading button{flex:none}.room-setup{display:flex;flex-direction:column;gap:16px;max-width:480px;margin:auto}.room-setup p{margin:0}.room-setup label{flex-direction:column;align-items:stretch}.room-setup button{background:#215cb5;font-weight:700}.room-join{border-top:1px solid #344965;margin-top:8px;padding-top:20px;display:flex;flex-direction:column;gap:10px}.room-share{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.room-share input{flex-basis:100%;width:100%;font-size:14px}.room-share small{font-size:14px}.room-players{display:flex;gap:8px;flex-wrap:wrap}.room-players span{border:1px solid #324d6e;padding:7px 10px;border-radius:8px;font-size:14px}.room-players .current{border-color:#f5d063;background:#4a4123}.room-waiting{padding:30px 0;text-align:center}.room-hint,.board-caption{font-size:14px;color:#b5c7df;margin:18px 0 0}.room-error{background:#582532;padding:12px;border:1px solid #f28294;border-radius:8px;color:#fff}.online-turn{font-size:20px;font-weight:700;margin:16px 0}.remote-grid{display:grid;gap:3px;max-width:560px;margin:18px auto;width:100%;aspect-ratio:1}.remote-panel .remote-grid button{min-width:0;min-height:0;aspect-ratio:1;padding:0;border-radius:5px;border:0;opacity:1;position:relative;display:flex;align-items:center;justify-content:center;line-height:1}.remote-panel .remote-grid button.dark{background:#5b423a}.remote-panel .remote-grid button.light{background:#e9dcc1}.remote-panel .remote-grid button.legal{box-shadow:inset 0 0 0 4px #f4bf3f;color:#ad7221}.remote-panel .remote-grid button.selected{box-shadow:inset 0 0 0 4px #62d8f6}.remote-panel .remote-grid button:focus-visible{outline:3px solid #67d8fb;z-index:2}.draughts-board{gap:1px;border:6px solid #213451;border-radius:8px;background:#213451}.draught{width:79%;height:79%;display:flex;align-items:center;justify-content:center;border-radius:50%;box-shadow:0 2px 2px #0009,inset 0 0 0 3px #ffffff33;font-size:clamp(16px,3.5vw,29px);border:1px solid #fff7}.connect-board{aspect-ratio:7/6;padding:10px;background:#194b9b;border-radius:14px;gap:7px}.remote-panel .connect-board button{border-radius:50%;font-size:24px}.chess-board{gap:1px;background:#182e49;border:6px solid #182e49}.chess-board button{font-size:clamp(27px,7vw,50px);text-shadow:0 1px 2px #0009}.remote-fleets{display:grid;grid-template-columns:1fr 1fr;gap:18px}.remote-fleets h3{font-size:17px}.remote-panel .remote-grid .naval-hit{background:#ad394b;font-size:24px}.remote-panel .remote-grid .naval-own{background:#276d87}.remote-cards{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;padding:25px 0}.remote-panel .remote-cards button{min-width:65px;min-height:90px;background:#fff2d7;color:#14253c;font-size:25px;font-weight:800}.room-rematch{text-align:center;margin:18px 0}.remote-panel button:focus-visible,.board-main button:focus-visible,.remote-panel input:focus-visible,.remote-panel select:focus-visible{outline:3px solid #67d8fb;outline-offset:2px}.gamebar:has(.remote-overlay){z-index:auto}.gamebar .remote-overlay{font-weight:400}.gamebar .remote-overlay p{white-space:normal}.gamebar .remote-overlay strong{display:inline}.gamebar .remote-overlay h2{white-space:normal}
@media(max-width:480px){.remote-overlay{padding:6px}.remote-panel{padding:12px;border-radius:10px}.board-main{padding:12px 8px}.board-options{gap:8px}.board-options label{font-size:14px}.classic-ludo{border-width:3px}.ludo-yard span{font-size:12px;top:4px;left:5px}.ludo-control{padding:10px;gap:8px}.ludo-control strong{font-size:17px}.ludo-control .ludo-roll{min-width:72px;padding:8px}.remote-heading h2{font-size:22px}.remote-fleets{gap:10px}.remote-grid{gap:2px}.room-share strong{font-size:15px;letter-spacing:.02em}.remote-panel .remote-cards button{min-width:52px;min-height:75px}.classic-ludo-view .gamebar strong{font-size:17px}}
.dice-space{width:76px;height:80px;perspective:480px;display:grid;place-items:center;margin:8px auto 15px}.dice-cube{position:relative;width:52px;height:52px;transform-style:preserve-3d;transform:rotateX(var(--rx)) rotateY(var(--ry));transition:transform .3s cubic-bezier(.2,.8,.3,1)}.dice-face{position:absolute;inset:0;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:4px;padding:8px;border:1px solid #cbd2de;border-radius:9px;background:linear-gradient(135deg,#fff,#d8dfeb);box-shadow:inset 0 0 7px #fff;backface-visibility:hidden}.dice-face i.pip{background:#14223c;border-radius:50%;box-shadow:inset 1px 2px 2px #0005}.face-1{transform:translateZ(26px)}.face-2{transform:rotateY(90deg) translateZ(26px)}.face-3{transform:rotateX(90deg) translateZ(26px)}.face-4{transform:rotateX(-90deg) translateZ(26px)}.face-5{transform:rotateY(-90deg) translateZ(26px)}.face-6{transform:rotateY(180deg) translateZ(26px)}.dice-cube.rolling{animation:dice-tumble .95s cubic-bezier(.15,.6,.4,1)}@keyframes dice-tumble{0%{transform:translateY(0) rotateX(0) rotateY(0)}35%{transform:translateY(-24px) rotateX(300deg) rotateY(400deg)}75%{transform:translateY(-8px) rotateX(640deg) rotateY(720deg)}100%{transform:translateY(0) rotateX(720deg) rotateY(1080deg)}}.ludo-roll{min-width:112px!important}.ludo-roll:disabled{opacity:.85}.ludo-roll small{font-size:14px}
.chess-main{max-width:1060px;margin:auto;padding:16px}.chess-status{padding:14px;background:#142741;color:#ffe29a;border-radius:10px}.chess-layout{display:grid;grid-template-columns:minmax(0,620px) minmax(160px,1fr);gap:20px}.standard-board{display:grid;grid-template-columns:repeat(8,1fr);border:10px solid #24334a;border-radius:8px;overflow:hidden;box-shadow:0 20px 60px #0005}.chess-square{aspect-ratio:1;border:0!important;border-radius:0!important;position:relative;padding:0!important;display:grid;place-items:center;opacity:1!important;min-width:0!important}.chess-square.light{background:#dde5dc!important}.chess-square.dark{background:#648377!important}.chess-square.last{box-shadow:inset 0 0 0 5px #e9c25388}.chess-square.selected{background:#e4b84a!important}.chess-square.check{background:#db5961!important}.chess-square.legal{box-shadow:inset 0 0 0 3px #f7d76e}.chess-piece{font-family:'DejaVu Sans','Segoe UI Symbol',serif;font-size:clamp(28px,6vw,58px);line-height:1}.chess-piece.w{color:#fffdf1;text-shadow:0 2px 2px #000,1px 0 #24334a,-1px 0 #24334a}.chess-piece.b{color:#152135;text-shadow:0 1px 1px #fff6}.chess-square small{position:absolute;font-size:12px;color:#172c26}.chess-square .file{bottom:1px;right:4px}.chess-square .rank{top:1px;left:3px}.legal-dot{width:23%;height:23%;border-radius:50%;background:#17382770}.chess-history{background:#112239;padding:18px;border-radius:12px;max-height:540px;overflow:auto}.chess-history ol{padding-left:25px}.chess-history li{padding:8px}.chess-history li span{display:inline-block;width:45%}.chess-actions,.promotion-panel{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.promotion-panel{padding:18px;border:2px solid #e9c253;background:#16253b}.chess-actions button,.promotion-panel button{padding:10px;border-radius:8px;background:#243f5c;color:#fff}.standard-chess .board-options select{min-width:160px}@media(max-width:680px){.chess-layout{grid-template-columns:1fr}.chess-history{max-height:170px}.standard-board{border-width:5px}.chess-main{padding:8px}.chess-piece{font-size:clamp(28px,9vw,46px)}}
.action-health{position:absolute;top:12px;left:4%;right:4%;display:flex;justify-content:space-between;gap:22px;pointer-events:none}.action-health label{width:43%;font-weight:bold;color:white;text-shadow:0 1px 3px #000}.action-health label:last-child{text-align:right}.action-health meter{display:block;width:100%;height:20px}.action-health small{display:block;font-size:12px}.action-message{position:absolute;bottom:8px;left:4%;right:4%;text-align:center;background:#071627bb;border-radius:8px;padding:7px;color:#ffe7a4;font-size:14px;pointer-events:none}.p2-controls{display:flex;gap:7px;flex-wrap:wrap;width:100%;align-items:center;border-top:1px solid #6683a5;padding-top:9px}.tank-battle{position:absolute;inset:0;background:linear-gradient(#17263b,#526377 67%,#4d4b39 67%)}.tank-terrain{position:absolute;inset:79% 0 0;border-top:4px solid #a8a177;background:repeating-linear-gradient(173deg,#625d46 0 3px,#454534 3px 18px)}.tank-hp{position:absolute;top:54%;width:90px;transform:translateX(-50%)}.tank-shell{position:absolute;top:69%;width:15px;height:6px;background:#ffed99;box-shadow:0 0 14px 5px #f89b30;border-radius:50%}.tank-impact{position:absolute;top:72%;width:95px;height:95px;border-radius:50%;background:radial-gradient(circle,#fffed4 0,#ffbd41 22%,#e3562b88 50%,transparent 70%);box-shadow:0 0 40px #ffab3444}.tank-battle .art-tank{width:clamp(85px,21vw,145px)!important}
.dice-cube .dice-face{width:52px;height:52px;box-sizing:border-box;place-items:stretch;box-shadow:inset 0 0 7px #fff}.dice-space{transform:rotate(-7deg)}.gamebar>button:not(:first-child){width:auto;min-width:44px;padding:0 10px;white-space:nowrap;font-size:14px}.gamebar>div{min-width:0}.gamebar strong{overflow:hidden;text-overflow:ellipsis}.gamebar{gap:8px}.dice-face i{min-width:0;min-height:0}
.dice-space{transform:rotateX(-16deg) rotateY(-20deg) rotateZ(-5deg);transform-style:preserve-3d}.dice-cube .face-2,.dice-cube .face-5{background:linear-gradient(135deg,#cbd6e5,#f0f4ff)}.dice-cube .face-3,.dice-cube .face-4{background:linear-gradient(135deg,#f8fbff,#c4cfe0)}@media(max-width:520px){.gamebar>button:not(:first-child){padding:0 7px;font-size:12px}.gamebar strong{font-size:14px}.gamebar{gap:6px}.action-health small{font-size:12px}.action-message{font-size:12px}.classic-ludo-view .gamebar>button:last-child{margin-left:auto}}
.tank-battle .art-tank:first-of-type{filter:sepia(.5) saturate(2) hue-rotate(150deg)}.tank-battle .art-tank:nth-of-type(2){filter:sepia(.6) saturate(2) hue-rotate(320deg)}
