/* Fix82: one header for each activity; app logout remains accessible from the real home/account only. */
#app>header.top .sa81CompBack{display:none!important}
#app>header.top .sa82CompBack{display:none!important;position:absolute;left:9px;top:50%;transform:translateY(-50%);z-index:50;border:1px solid #bbd2c7;border-radius:12px;background:#fffdf7;color:#125943;min-height:40px;padding:6px 12px;font:inherit;font-weight:900;box-shadow:none}
body.sa82CompList:not(.r35CompetitionRunning) #app>header.top .sa82CompBack{display:inline-flex!important;align-items:center}
body.sa82CompList #app>header.top .brand{margin-left:min(95px,24vw)}
body.sa82InnerSection #app>header.top{display:none!important}
body.sa82InnerSection #safeR10Bottom{display:none!important}
/* Use the in-page arena title, home action and room/duel/computer options in one compact area. */
#r56ArenaPage{box-sizing:border-box!important;width:100%;max-width:100%;margin:0 auto!important;padding:6px 9px 10px!important;}
#r56ArenaPage .r56Head{display:flex;align-items:center;gap:8px;margin:0 0 6px!important;padding:4px 2px!important}
#r56ArenaPage .r56Head small,#r56ArenaPage .r56Head p{display:none!important}
#r56ArenaPage .r56Head h2{margin:0!important;font-size:clamp(20px,5vw,25px)!important}
#r56ArenaPage .r56Head>button{min-height:39px!important;padding:6px 12px!important;white-space:nowrap}
/* Fix91: arena menu only — two rows of three cards, then the computer challenge on its own row. */
#r56ArenaPage .sa82ArenaNav{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:9px;padding:4px 0 11px;min-width:0}
#r56ArenaPage #r56ArenaTabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;flex:none;width:100%;gap:9px;overflow:visible;padding:0;min-width:0}
#r56ArenaPage #r56ArenaTabs button{box-sizing:border-box;flex:none;width:100%;min-width:0;min-height:clamp(68px,21vw,92px);padding:9px 4px;border-radius:16px;font-size:clamp(12px,3.5vw,16px);line-height:1.35;white-space:normal;overflow-wrap:anywhere;display:flex;align-items:center;justify-content:center;text-align:center}
#r56ArenaPage .sa82ArenaNav>.saFix03Open{background:#087258!important;color:#fff!important;border-color:#087258!important;min-height:52px;width:100%;flex:none;font-size:clamp(14px,3.8vw,17px);text-align:center}
#r56ArenaPage.saFix03On .sa82ArenaNav{display:none!important}
#r56ArenaPage .r56Panel{padding:clamp(8px,2vw,14px)!important}
/* Keep primary activities within the mobile viewport; long room/player lists may scroll inside their own panels. */
@media(max-width:720px){body.sa82Arena{overflow:hidden!important}#r56ArenaPage:not(.hidden){height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-height:100dvh;min-height:0;display:flex!important;flex-direction:column;overflow:hidden!important}#r56ArenaPage #r56ArenaBody{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain}#r56ArenaPage.saFix03On #saFix03Panel{flex:1;min-height:0;overflow-y:auto}}
/* General fun page uses its own heading and back/home control; never a second logout header. */
#fun:not(.hidden)>.head{margin-top:0!important}
/* Picture puzzles — original aspect ratio is mandatory: no object-fit:cover and no forced square/landscape. */
#r55PuzzlePage #r55PuzzleBoard{aspect-ratio:var(--sa81PuzzleRatio,4/3)!important;width:min(100%,var(--sa81PuzzleWidth,70dvh))!important;height:auto!important;max-width:100%!important;max-height:none!important;min-height:0!important;box-sizing:border-box!important;gap:0!important;padding:0!important}
#r55PuzzlePage #r55PuzzleBoard .r55PuzzlePiece{aspect-ratio:auto!important;background-repeat:no-repeat!important;box-shadow:inset 0 0 0 1px #ffffffa3!important;}
#r55PuzzlePage .r55PuzzleThumb{background-size:contain!important;background-repeat:no-repeat!important;background-position:center!important}
/* Computer opponent round timer, visible without introducing page scroll. */
#saFix03Panel .sa82TimeRemaining{font-variant-numeric:tabular-nums;background:#edf8f1;border:1px solid #b8decc;border-radius:11px;padding:7px 9px;color:#0c604d;font-size:clamp(12px,3.4vw,16px);font-weight:900;white-space:nowrap}
#saFix03Panel .sa82TimeRemaining.sa82Urgent{background:#fff1e8;border-color:#e2ac93;color:#a94222}
#saFix03Panel .saFix03Top{flex-wrap:wrap}

#r55PuzzlePage #r55PuzzleBoard .r55PuzzlePiece.selected{box-shadow:inset 0 0 0 4px #ffd75b!important;filter:brightness(1.06)!important}
#r55PuzzlePage #r55PuzzleBoard .r55PuzzlePiece.dragging{box-shadow:0 15px 32px #0005!important;z-index:20!important}
