html:has(.board-app),body:has(.board-app){background:#11172e}.board-app{width:100%;background:transparent;overflow:visible}.board-app:before{display:none}
:root{--surface:#1a233c;--edge:#516483;--accent:#d6e9ff}.board-app{max-width:1080px;min-height:100vh;margin:auto;padding:24px 28px 60px}.game-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:32px}.game-brand{display:flex;align-items:center;gap:14px}.game-brand img{width:56px;height:56px;border-radius:16px}.game-brand h1{font-size:clamp(24px,4vw,36px);margin:0}.game-topbar a{font-size:16px}.game-layout{border:1px solid #52638170;background:#18233b;border-radius:26px;padding:24px;box-shadow:0 18px 60px #07101e60}.board-app p{line-height:1.7}.game-button{font:inherit;min-height:48px;padding:11px 18px;cursor:pointer;border:1px solid #7890b0;border-radius:12px;background:#2b3c58;color:#f5f8ff}.game-button.primary{background:#d6e9ff;color:#16243b;border-color:#d6e9ff;font-weight:700}.board-app button:disabled{cursor:default}.game-button:disabled{opacity:.45}.board-app button:focus-visible,.board-app select:focus-visible{outline:3px solid #ffcd74;outline-offset:3px}.board-app label{display:flex;flex-direction:column;gap:8px;min-width:140px}.board-app select{font:inherit;min-height:48px;padding:10px 32px 10px 12px;color:#f5f8ff;background:#202f49;border:1px solid #7890b0;border-radius:10px}.board-app #board-modes{display:flex;gap:16px;align-items:end;flex-wrap:wrap}.online-modes{flex-basis:100%;display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding-top:20px;border-top:1px solid #51648370;margin-top:8px}.game-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:22px 0}.game-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.board-status{font-size:clamp(18px,2.5vw,24px);font-weight:700;min-height:36px;margin:14px 0}#board-score{font-variant-numeric:tabular-nums;color:#cbd9ec;overflow-wrap:anywhere}.rummy-rack,.rummy-set{display:flex;flex-wrap:wrap;gap:8px;padding:16px;border-radius:16px;background:#0e353e;margin:12px 0}.rummy-set{align-items:center}.rummy-set.invalid{outline:2px solid #ffa1a7}.group-number{width:22px;color:#adcccf;font-size:16px}.rummy-tile{width:48px;height:66px;border-radius:8px;background:#fff6e3;font:800 28px system-ui;box-shadow:0 4px 0 #a2a399;border:2px solid #e3dac9;cursor:pointer;touch-action:manipulation}.rummy-tile:disabled{opacity:.8}.rummy-tile.selected{transform:translateY(-6px);outline:3px solid #8cdaff}.jenga-tower{display:flex;flex-direction:column;align-items:center;gap:5px;max-height:65vh;overflow-y:auto;padding:24px;perspective:900px;transition:transform .7s ease}.jenga-layer{display:flex;gap:4px;transform:skewY(-3deg)}.jenga-layer.cross{filter:brightness(.82);transform:skewY(3deg)}.wood-block{width:84px;height:44px;min-height:44px;border-radius:3px;border:1px solid #99622f;background:repeating-linear-gradient(0deg,#e4b674,#dca964 3px,#efc78e 5px);color:#493017;font-size:13px;touch-action:pan-y;cursor:grab}.wood-block:empty{visibility:hidden}.wood-block:disabled{cursor:default}.jenga-tower.fallen{animation:collapse 1.1s forwards}.jenga-tower.fallen .jenga-layer:nth-child(3n){transform:translateX(25px) rotate(8deg)}@keyframes collapse{to{transform:rotate(14deg);opacity:.6}}.fruit-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px}.fruit-card{display:flex;flex-direction:column;min-height:230px;background:#fff5e5;color:#182b3e;border-radius:20px;padding:18px;box-sizing:border-box}.fruit-card p{margin:2px 0;font-size:16px}.fruit-face{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;flex:1;margin-top:16px;font-size:40px}.fruit-face span{width:44px;height:48px}.fruit-face svg{width:100%;height:100%}.bell{background:#ffcd68;color:#332409;border-radius:40px;border:3px solid #cc962a;padding:18px 24px;font-size:20px;min-height:64px;box-shadow:0 5px 0 #7c541b;cursor:pointer;touch-action:manipulation}.bell:active{transform:translateY(4px);box-shadow:0 1px 0 #7c541b}.bell:disabled{opacity:.45}.chess-board{display:grid;grid-template-columns:repeat(8,1fr);max-width:640px;aspect-ratio:1;margin:20px auto;border:6px solid #8a664b;border-radius:8px;overflow:hidden;direction:ltr}.chess-square{border:0;border-radius:0;min-width:0;min-height:0;position:relative;aspect-ratio:1;font-family:'DejaVu Sans',serif;font-size:clamp(28px,6vw,58px);padding:0;cursor:pointer;line-height:1;touch-action:manipulation}.chess-square.light{background:#e7d9bd}.chess-square.dark{background:#7c977f}.chess-square.piece-w{color:#fffef5;text-shadow:0 2px 1px #213d3d,-1px 0 #213d3d,1px 0 #213d3d}.chess-square.piece-b{color:#162b30;text-shadow:0 1px 1px #d4e1d5}.chess-square.selected{background:#f4d171}.chess-square.legal:after{content:'';position:absolute;inset:35%;background:#173f4880;border-radius:50%;pointer-events:none}.chess-square[data-rank]:before{content:attr(data-rank);position:absolute;left:3px;top:3px;font:12px system-ui;color:#24352e}.chess-square[data-file]:after{content:attr(data-file);position:absolute;right:3px;bottom:2px;font:12px system-ui;color:#24352e}.promotion{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;padding:16px}.promotion button{font-size:32px}.gomoku-board{display:grid;grid-template-columns:repeat(15,1fr);max-width:660px;aspect-ratio:1;margin:20px auto;background:#dcb578;padding:12px;border-radius:10px;direction:ltr}.go-cell{background:linear-gradient(#765534,#765534) center/100% 1px no-repeat,linear-gradient(#765534,#765534) center/1px 100% no-repeat;border:0;border-radius:0;padding:0;position:relative;min-width:0;min-height:0;cursor:crosshair;aspect-ratio:1;touch-action:manipulation}.go-cell.black:before,.go-cell.white:before{content:'';position:absolute;inset:6%;border-radius:50%;background:radial-gradient(circle at 30% 25%,#565c66,#10131b 70%);box-shadow:1px 2px 3px #3d271860}.go-cell.white:before{background:radial-gradient(circle at 30% 25%,#fff,#dfe3e3 70%);border:1px solid #b8b8ab}.go-cell.last:after{content:'';position:absolute;inset:40%;border-radius:50%;background:#e05a46}.domino-chain,.domino-rack{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding:20px 12px;min-height:110px;background:#0d3940;border-radius:16px;margin:16px 0;direction:ltr}.domino-rack{background:#26354e}.domino-tile{display:flex;flex-direction:column;background:#fff6df;color:#1e3340;border:2px solid #afaca0;border-radius:8px;padding:5px;min-width:42px;font:700 24px system-ui;box-shadow:0 3px 0 #999888;cursor:pointer}.domino-tile span{padding:4px;min-width:24px;line-height:1.1}.domino-tile span+span{border-top:2px solid #9d998c}.domino-tile.selected{transform:translateY(-6px);outline:3px solid #a4d8ff}.memory-board{display:grid;grid-template-columns:repeat(var(--columns),1fr);gap:12px;max-width:700px;margin:20px auto}.memory-card{aspect-ratio:4/5;background:repeating-linear-gradient(45deg,#304d70,#304d70 10px,#294364 10px,#294364 20px);border:2px solid #8299b4;border-radius:14px;font-size:clamp(22px,5vw,44px);color:#c7ddf7;cursor:pointer;touch-action:manipulation;min-width:0;min-height:48px;transition:background .15s,transform .15s}.memory-card.revealed{background:#fff4dd;color:#243e57;transform:rotateY(0)}.memory-card.matched{background:#b0e5cf;color:#124b3b;border-color:#74ba9b}.board-invite canvas{max-width:100%;background:white;padding:12px;border-radius:16px}.board-invite a{overflow-wrap:anywhere}.board-rules{margin-top:26px;padding:20px;border:1px solid #7486a070;border-radius:16px}.board-rules summary{cursor:pointer;font-size:18px;font-weight:700}.board-rules p{max-width:80ch;color:#ccdaed}#memory-stats{font-variant-numeric:tabular-nums}.install-page .game-icon{width:88px;height:88px;border-radius:22px}.install-page .profile-download img{width:200px!important;height:auto!important}
@media(max-width:600px){.board-app{padding:16px 12px 36px}.game-layout{padding:16px 10px;border-radius:20px}.game-topbar{margin-bottom:20px}.game-brand img{width:44px;height:44px}.board-app #board-modes{gap:12px}.board-app #board-modes label{min-width:calc(50% - 12px);flex:1}.game-controls .game-button{flex:1;min-width:110px}.rummy-rack,.rummy-set{padding:12px 8px;gap:6px}.rummy-tile{width:40px;height:58px;font-size:25px}.wood-block{width:76px}.fruit-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fruit-card{min-height:200px;padding:12px}.fruit-face span{width:36px;height:40px}.memory-board{gap:7px}.memory-card{border-radius:9px}.gomoku-board{padding:5px}.game-toolbar .game-button{flex:1}.board-app .language-control{margin:10px auto 20px!important}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
