/* Shared arcade polish. Each game's rules and saved runs stay in its own module. */
.gamegrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.gamecard{position:relative;overflow:hidden;text-align:left;padding:0 0 16px;border-radius:15px;background:var(--panel-solid);border:1px solid var(--line);transition:transform .18s,border-color .18s}.gamecard:hover{transform:translateY(-3px);border-color:#527969}.gamecard .gic{width:100%;height:auto;aspect-ratio:1.55;overflow:hidden;border-radius:0;margin:0 0 13px;background:#0d191f}.gamecard .gic img{width:100%;height:100%;object-fit:cover;border-radius:0;transition:transform .35s}.gamecard:hover .gic img{transform:scale(1.035)}.gamecard>b,.gamecard>strong{display:block;margin:0 15px 10px;font-size:17px;font-weight:550;letter-spacing:-.02em}.gamecard .gbtns{padding:0 14px;display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-start}.gamecard .abtn{font-size:11px;min-height:36px}.gamecard[data-game=space]{grid-column:span 2}.gamecard[data-game=space] .gic{aspect-ratio:3.15}.gamecard[data-game=space]:after{content:'SPACE EXPLORER';position:absolute;right:14px;top:14px;font-size:9px;letter-spacing:.18em;padding:6px 9px;border:1px solid #759da277;border-radius:5px;background:#06161cbb;color:#c7ece4;pointer-events:none}
#gameView{scroll-margin-top:85px}.chsq{background:#b9c9bf!important}.chsq.d{background:#57776f!important}.chsq .bp{color:#13282b;text-shadow:0 1px 0 #c4d4c7}.chsq .wp{color:#fff8df;text-shadow:0 2px 3px #172d29,1px 0 #172d29,-1px 0 #172d29}.chsq.sel{outline-width:4px;outline-color:#e4c777}.chsq.mvhint:after{content:'';width:20%;height:20%;border-radius:50%;background:#233e29aa;position:absolute}.chsq{position:relative}
#gameView[data-game=cw]{--game-art:url('../media/thumbs/cw.webp')}#gameView[data-game=sud]{--game-art:url('../media/thumbs/sud.webp')}#gameView[data-game=cave]{--game-art:url('../media/thumbs/cave.webp')}#gameView[data-game=drive]{--game-art:url('../media/thumbs/drive.webp')}#gameView[data-game=sol]{--game-art:url('../media/thumbs/sol.webp')}#gameView[data-game=cards]{--game-art:url('../media/thumbs/cards.webp')}#gameView[data-game=poker]{--game-art:url('../media/thumbs/poker.webp')}#gameView[data-game=quiz]{--game-art:url('../media/thumbs/quiz.webp')}#gameView[data-game=povaus]{--game-art:url('../media/thumbs/povaus.webp')}
#gameView:has([data-sdiff]):before,#gameView:has([data-cwdiff]):before,#gameView:has([data-drdiff]):not(:has(canvas)):before,#gameView[data-game=cave]:not(:has(canvas)):before,#gameView[data-game=sol]:not(:has(.solboard)):before,#gameView[data-game=cards]:not(:has(.cdtable)):before,#gameView:has([data-qcat]):before{content:'';display:block;height:145px;margin-bottom:18px;border-radius:12px;background-image:linear-gradient(90deg,#07101433,#071014dd),var(--game-art);background-size:cover;background-position:center 42%;border:1px solid var(--line)}
#gameView .ghead{gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line)}#gameView .ghead>b{font-size:19px;font-weight:550}#gameView .qzcat{padding:18px;border-radius:12px;border:1px solid var(--line)}#gameView .qzcat b{font-size:15px}#gameView .qzopts button{padding:16px 20px;font-size:16px;border-radius:12px}.ytable{font-size:14px}.ydie{margin:6px}
@media(max-width:760px){#gameView:before{max-height:105px}.chboard{border-width:5px}.ytable td,.ytable th{padding:8px}.ytable{font-size:12px}.ydice{gap:8px}.ydie{width:46px;height:46px;font-size:38px;margin:0}}
#gameView{border:1px solid var(--line);border-radius:16px;padding:18px;background:var(--bg2);overflow:hidden}#gameView button:not(.sq):not(.sudcell):not(.cwcell){border-radius:8px}#gameView h2,#gameView h3{letter-spacing:-.015em}#gameView canvas{max-width:100%;border-radius:12px}#gameView .gamehead,#gameView .game-head{padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:18px}#gameView table{font-variant-numeric:tabular-nums}#gameView iframe{border:0;display:block;border-radius:12px}#gameView input:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.chessboard,.chess-board{border:8px solid #334b48;border-radius:8px;box-shadow:0 10px 26px #0006}.chessboard button,.chess-board button{text-shadow:0 3px 3px #0006;transition:background .12s}.yatzy-table,.yztable{border-collapse:separate;border-spacing:0;background:var(--panel);border-radius:12px;overflow:hidden}.yatzy-table td,.yztable td{padding:10px;border-bottom:1px solid var(--line)}.shipsboard,.shipboard{box-shadow:0 0 0 1px #365766,0 12px 26px #0005}.sudgrid,.sud-grid,.cwgrid,.cw-grid{box-shadow:0 10px 25px #0005;border-radius:8px}.cardface,.playing-card{box-shadow:0 4px 7px #0005}.dice,.die{box-shadow:0 3px 0 #0006,0 8px 18px #0005}.quiz-opt{padding:15px!important;border-radius:12px!important}.quiz-opt:hover{border-color:var(--acc)}.gamecard:focus-within{border-color:var(--acc)}
.chboard{border:8px solid #3b514b;border-radius:10px;box-shadow:0 12px 28px #0006}.chboard button{border-radius:0!important;font-size:clamp(22px,4vw,38px);text-shadow:0 2px 2px #0005}.bgboard{border:9px solid #5e4833;border-radius:13px;background:#1e2d2e;box-shadow:0 15px 35px #0005}.bgpt.e:before{background:#94bfb073!important}.bgpt.o:before{background:#bd8f6977!important}.ytable{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel)}.ytable tr:nth-child(even){background:#ffffff03}.ytable td,.ytable th{padding:11px 12px}.ydice{gap:12px;margin:22px 0}.ydie{background:#e2ece3;color:#15272e!important;box-shadow:0 4px 0 #8fa69d,0 10px 18px #0005;border-radius:12px!important;width:56px;height:56px;font-size:45px}.ydie.held{background:#b4edce;outline:2px solid var(--acc);outline-offset:5px;transform:translateY(-4px)}.shboards{gap:22px}.shgrid{border:4px solid #294b5b;box-shadow:0 12px 28px #0005}.gstatus{font-size:15px;margin:16px 0;text-align:center}.gamehead{font-size:18px}.cwcell{font-size:18px}.cwkey{min-height:42px}.cwlists{font-size:13px;line-height:1.7}.sudcell{font-variant-numeric:tabular-nums}.sudgrid{border:5px solid #34564d}.pov-card{box-shadow:0 12px 30px #0008}.cdbtn{min-height:42px}#gameView[data-game=quiz]{border-color:#576855}#gameView[data-game=chess]{background:#0e1e20}#gameView[data-game=bg]{background:#1a211e}#gameView[data-game=ships]{background:#091b28}#gameView[data-game=yatzy]{background:#102521}#gameView[data-game=povaus]{background:#1b1625}#gameView[data-game=cards],#gameView[data-game=sol]{background:#0c2420}
@media(min-width:1000px){#gameView{padding:24px}.gamegrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.gamegrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gamecard{padding-bottom:13px}.gamecard .gic{aspect-ratio:1.2}.gamecard[data-game=space]{grid-column:span 2}.gamecard[data-game=space] .gic{aspect-ratio:2.55}.gamecard>b,.gamecard>strong{font-size:14px;margin:0 12px 10px}.gamecard .gbtns{padding:0 10px;gap:5px}.gamecard .abtn{font-size:10px;padding:7px 8px;min-height:36px}#gameView{padding:10px;border-radius:12px}#gameView canvas{border-radius:8px}}

.gamecard img.gthumb{max-width:none;width:100%;height:100%;object-fit:cover;display:block;border-radius:0;aspect-ratio:auto}.gamecard .gic{display:block;max-width:none}
.chboard .chsq{font-size:clamp(24px,7vw,40px)}
#gameView:has([data-cwsz]):before{content:'';display:block;height:120px;margin-bottom:18px;border-radius:12px;background:linear-gradient(90deg,#07101433,#071014dd),var(--game-art);background-size:cover;background-position:center}
#gameView[data-game=sol]:has(.solrow):before,#gameView[data-game=cards]:has(.cdhand):before{display:none}
.bus-rotation{padding:18px 20px;margin:16px 0 22px;border:1px solid #476d68;border-radius:15px;background:radial-gradient(ellipse at top right,#234c47,#112a2d 65%);display:flex;gap:16px;align-items:center;flex-wrap:wrap}.bus-rotation>div:first-child{display:flex;flex-direction:column;gap:5px;margin-right:auto}.bus-rotation small{font-size:9px;letter-spacing:.15em;color:#8fcbbb}.bus-rotation b{font-size:18px;font-weight:550;color:#e1efe6}.bus-rotation span{font-size:11px;color:#a4bdb6}.rotation-picks,.rotation-favourites{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.rotation-favourites{flex-basis:100%;color:#f2d89d}.gamecard .game-favourite{position:absolute;right:10px;top:10px;z-index:3;border:1px solid #c9dfd955;border-radius:50%;width:36px;height:36px;min-height:36px;background:#091c29d9;color:#f4d69e;font-size:23px;padding:0;line-height:1;cursor:pointer}.gamecard[data-game=space]:after{right:60px}#gameView button:focus-visible{outline:2px solid #afe9d0;outline-offset:3px}#gameView .qzopts button{min-height:48px}.ydie{background:radial-gradient(circle at 30% 20%,#fff9e7,#d1cdbd);color:#1b3339;border:1px solid #f9f4e0;box-shadow:0 4px #77878a,0 8px 16px #0004}.cdhand .cdcard,.solrow .solcard{filter:drop-shadow(0 3px 3px #0005)}
@media(max-width:600px){.bus-rotation{padding:14px}.rotation-picks{width:100%}.rotation-picks .abtn{flex:1;min-height:42px;font-size:11px}.rotation-picks #rotationNext{flex:0 0 42px}.bus-rotation b{font-size:16px}#gameView{padding-bottom:24px}.ytable td,.ytable th{padding:6px}.gamecard .game-favourite{width:34px;height:34px;min-height:34px}}
@media(prefers-reduced-motion:reduce){.gamecard,.gamecard img{transition:none!important}.gamecard:hover{transform:none}}
.arcade-recent{margin-top:12px}.arcade-recent summary{cursor:pointer;min-height:40px;padding:8px}.arcade-recent>div{display:flex;gap:12px;align-items:center;padding:8px 4px;border-top:1px solid #51657933}.arcade-recent>div b{flex:1}.arcade-recent small{color:var(--mut)}
