/* WalkerBex Chess V1 — Stage 22.1 Final responsive/master release overrides. */
:root{--wb-safe-top:env(safe-area-inset-top,0px);--wb-safe-right:env(safe-area-inset-right,0px);--wb-safe-bottom:env(safe-area-inset-bottom,0px);--wb-safe-left:env(safe-area-inset-left,0px)}
html{max-width:100%;overflow-x:clip}body{max-width:100%;min-height:100dvh}
button,a,input,select,textarea,summary{box-sizing:border-box}
[data-disabled-nav="ai-engine"]{cursor:default!important;opacity:.58!important;pointer-events:auto!important;text-decoration:none!important}
.rating-card,.profile-rating{display:grid;gap:5px;padding:14px 16px;border:1px solid #deded9;border-radius:14px;background:#f7f7f4}.rating-card strong,.profile-rating strong{font:700 clamp(26px,4vw,38px)/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-.05em}.rating-card small,.rating-trend{color:#77777b;font-size:9px}.profile-rating.compact{margin:12px 0}.profile-rating.compact strong{font-size:26px}.rating-change{display:block;margin-top:5px;color:#66666b;font:700 10px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}
@media (pointer:coarse){button,.button,.btn,.top-action,summary,[role="button"]{min-height:44px}}
@media(max-width:760px){
  .page-shell{width:min(100% - 24px,1180px)!important;padding-left:max(0px,var(--wb-safe-left));padding-right:max(0px,var(--wb-safe-right));padding-bottom:calc(72px + var(--wb-safe-bottom))!important}
  .top-nav{width:calc(100% - 16px)!important;max-width:none!important}.top-links{overflow-x:auto;scrollbar-width:none}.top-links::-webkit-scrollbar{display:none}.nav-status{display:none!important}
  .hero-actions,.buttons,.profile-actions{gap:8px}.button,button{min-height:44px}
  .home-grid,.overview-grid,.search-card{grid-template-columns:1fr!important}.search-card{gap:18px!important;padding:22px 18px!important}.search-box{min-width:0}.section-hero{align-items:flex-start!important;flex-direction:column!important;gap:12px!important}
  .priority-card{min-height:auto!important;padding:24px 20px!important;align-items:flex-start!important;flex-direction:column!important}.priority-card .buttons{justify-content:flex-start!important}
  .quick-actions{grid-template-columns:1fr!important}.home-surface{min-width:0}.player-row{grid-template-columns:44px minmax(0,1fr)!important}.player-row>.buttons{grid-column:1/-1!important;padding-left:57px}
  dialog{width:min(94vw,620px)!important;max-height:min(88dvh,760px)!important;margin:auto!important}.quick-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:430px){.brand-copy small{display:none}.top-links a{font-size:10px!important;padding-inline:7px!important}.deck-tabs{top:72px!important}.home-head-copy h1{font-size:clamp(28px,10vw,42px)!important}.quick-time-grid{grid-template-columns:1fr 1fr!important}.settings-tabs{overflow-x:auto}.settings-tabs button{white-space:nowrap}.player-menu-popover{right:0;max-width:calc(100vw - 24px)}}
/* Arena sizing uses both width and height. */
body[data-stage="arena06"] .board-zone>.player,body[data-stage="arena06"] .board-zone>.board,body[data-stage="arena06"] .board-window,body[data-stage="online08"] .board-zone>.player,body[data-stage="online08"] .board-zone>.board,body[data-stage="online08"] .board-window{width:min(100%,calc(100dvh - 166px),820px)!important}
body[data-stage="arena06"].focus-mode,body[data-stage="online08"].focus-mode{overflow:hidden!important;background:#f1f1ee}
body[data-stage="arena06"].focus-mode .arena-topbar,body[data-stage="online08"].focus-mode .arena-topbar{display:none!important}
body[data-stage="arena06"].focus-mode .arena-workspace,body[data-stage="online08"].focus-mode .arena-workspace{height:100dvh!important;max-width:none!important;padding:max(6px,var(--wb-safe-top)) max(6px,var(--wb-safe-right)) max(6px,var(--wb-safe-bottom)) max(6px,var(--wb-safe-left))!important}
body[data-stage="arena06"].focus-mode .arena-layout,body[data-stage="online08"].focus-mode .arena-layout{height:100%;grid-template-columns:minmax(0,1fr) minmax(250px,320px);gap:10px}
body[data-stage="arena06"].focus-mode .board-zone>.player,body[data-stage="arena06"].focus-mode .board-zone>.board,body[data-stage="arena06"].focus-mode .board-window,body[data-stage="online08"].focus-mode .board-zone>.player,body[data-stage="online08"].focus-mode .board-zone>.board,body[data-stage="online08"].focus-mode .board-window{width:min(100%,calc(100dvh - 112px),900px)!important}
body[data-stage="arena06"].focus-mode .rightbar,body[data-stage="online08"].focus-mode .rightbar{min-width:0}
@media(max-width:820px){
  body[data-stage="arena06"],body[data-stage="online08"]{overflow:auto!important;padding-bottom:var(--wb-safe-bottom)}
  body[data-stage="arena06"] .arena-workspace,body[data-stage="online08"] .arena-workspace{height:auto!important;min-height:calc(100dvh - 48px);padding-left:max(6px,var(--wb-safe-left))!important;padding-right:max(6px,var(--wb-safe-right))!important;padding-bottom:calc(14px + var(--wb-safe-bottom))!important;overflow:visible!important}
  body[data-stage="arena06"] .arena-layout,body[data-stage="online08"] .arena-layout{grid-template-columns:1fr!important;height:auto!important;gap:8px!important}
  body[data-stage="arena06"] .board-zone,body[data-stage="online08"] .board-zone{grid-template-rows:46px auto 46px!important}
  body[data-stage="arena06"] .board-zone>.player,body[data-stage="arena06"] .board-zone>.board,body[data-stage="arena06"] .board-window,body[data-stage="online08"] .board-zone>.player,body[data-stage="online08"] .board-zone>.board,body[data-stage="online08"] .board-window{width:min(100%,calc(100vw - 20px - var(--wb-safe-left) - var(--wb-safe-right)),680px)!important}
  body[data-stage="arena06"] .rightbar,body[data-stage="online08"] .rightbar{height:auto!important;overflow:visible!important;display:grid!important;grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important;gap:8px!important}
  body[data-stage="arena06"] .moves-panel,body[data-stage="online08"] .moves-panel{grid-column:1/-1;min-height:180px}.move-list{max-height:220px!important}
  body[data-stage="arena06"].focus-mode .arena-layout,body[data-stage="online08"].focus-mode .arena-layout{grid-template-columns:1fr!important;align-content:center}
  body[data-stage="arena06"].focus-mode .rightbar,body[data-stage="online08"].focus-mode .rightbar{display:none!important}
  body[data-stage="arena06"].focus-mode .board-zone>.player,body[data-stage="arena06"].focus-mode .board-zone>.board,body[data-stage="arena06"].focus-mode .board-window,body[data-stage="online08"].focus-mode .board-zone>.player,body[data-stage="online08"].focus-mode .board-zone>.board,body[data-stage="online08"].focus-mode .board-window{width:min(calc(100vw - 12px - var(--wb-safe-left) - var(--wb-safe-right)),calc(100dvh - 108px),760px)!important}
}
@media(max-width:560px){body[data-stage="arena06"] .rightbar,body[data-stage="online08"] .rightbar{grid-template-columns:1fr!important}body[data-stage="arena06"] .rightbar>* ,body[data-stage="online08"] .rightbar>*{grid-column:1!important}.control-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.clock{min-width:84px!important;font-size:20px!important}.arena-topbar{padding-left:max(8px,var(--wb-safe-left))!important;padding-right:max(8px,var(--wb-safe-right))!important}}
@media(max-width:430px){body[data-stage="arena06"] .board-zone>.player,body[data-stage="arena06"] .board-zone>.board,body[data-stage="arena06"] .board-window,body[data-stage="online08"] .board-zone>.player,body[data-stage="online08"] .board-zone>.board,body[data-stage="online08"] .board-window{width:min(100%,calc(100vw - 12px - var(--wb-safe-left) - var(--wb-safe-right)))!important}.player-strip .portrait,.player-strip .bot-avatar,.player-strip .you-avatar{width:34px!important;height:34px!important}.control-grid .btn{font-size:9px!important}}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){body[data-stage="arena06"] .arena-layout,body[data-stage="online08"] .arena-layout{grid-template-columns:minmax(0,1fr) minmax(230px,34vw)!important;height:calc(100dvh - 48px)!important}body[data-stage="arena06"] .arena-workspace,body[data-stage="online08"] .arena-workspace{height:calc(100dvh - 48px)!important;min-height:0!important;overflow:hidden!important}body[data-stage="arena06"] .board-zone>.player,body[data-stage="arena06"] .board-zone>.board,body[data-stage="arena06"] .board-window,body[data-stage="online08"] .board-zone>.player,body[data-stage="online08"] .board-zone>.board,body[data-stage="online08"] .board-window{width:min(100%,calc(100dvh - 148px),720px)!important}body[data-stage="arena06"] .rightbar,body[data-stage="online08"] .rightbar{display:grid!important;grid-template-columns:1fr!important;height:100%!important;overflow:auto!important}.moves-panel{min-height:120px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}
