/* Shared account toolbar; keep the viewport available for the game. */
body.portal-home .site-header{min-height:64px;padding-block:6px}
body.portal-home .site-header .logo-image{width:50px;height:50px}
.account-icon{display:none;color:#16846b;font-size:1.1rem;line-height:1}
.header-spacer{display:none;pointer-events:none}
html{scroll-padding-top:52px}
body.header-scrolled .header-spacer{display:block}
body.header-scrolled .site-header,
body.game-focus .site-header{position:fixed;inset:0 0 auto;min-height:0;height:auto;padding:8px 12px;border:0;background:transparent;box-shadow:none;backdrop-filter:none;justify-content:flex-end;pointer-events:none;z-index:80}
body.header-scrolled .site-header .logo,
body.header-scrolled .site-header nav>a:not(.account-link){display:none}
body.header-scrolled .site-header nav{gap:6px;flex-wrap:nowrap}
body.header-scrolled .site-header .account-link{pointer-events:auto;min-height:36px;padding:7px 10px;font-size:.75rem;background:#fff;color:#334155;box-shadow:0 2px 10px #1720331a}
body.header-scrolled .site-header .account-link[data-signed-in="1"]{width:38px;justify-content:center}
body.header-scrolled .account-link[data-signed-in="1"] .account-label{display:none}
body.header-scrolled .account-link[data-signed-in="1"] .account-icon{display:inline}
.game-screen-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;border:1px solid #cbd5e1;border-radius:9px;padding:6px 10px;background:#fff;color:#334155;font:650 .76rem system-ui;cursor:pointer;pointer-events:auto;touch-action:manipulation}
.game-screen-toggle>span:first-child{font-size:1.35rem;line-height:1}
.game-screen-toggle:focus-visible,.account-link:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
body.portal-game .site-header{min-height:52px;padding-block:4px;gap:8px}
body.portal-game .site-header .logo-image{width:40px;height:40px}
body.portal-game .site-header nav{gap:4px;flex-wrap:nowrap}
body.portal-game .site-header nav>a{padding:7px 9px;font-size:.76rem}
body.portal-game .chess-shell{padding:14px 0 32px}
body.portal-game .chess-heading{gap:10px}
body.portal-game .chess-heading h1{font-size:1.8rem;margin:8px 0}
body.portal-game .chess-heading p{margin:4px 0;font-size:.82rem;line-height:1.4}
body.portal-game .chess-release-tag{padding:6px 10px;font-size:.72rem}
body.portal-game .chess-notice{margin:12px 0;padding:8px 12px;font-size:.78rem;line-height:1.4}
body.portal-game .chess-board-panel{padding:12px}
body.portal-action-game .site-header{position:relative;min-height:48px;padding:4px 12px;z-index:80;background:#080d21}
body.portal-action-game .site-header nav{display:flex;align-items:center;justify-content:flex-end;gap:14px;font-size:.8rem}
body.portal-action-game .site-header a{color:#d1e5ed;text-decoration:none}
body.portal-action-game .account-link{display:inline-flex;align-items:center;gap:6px;border:1px solid #496178;border-radius:8px;padding:8px 10px}
body.portal-action-game #app{min-height:calc(100dvh - 48px)}
body.portal-action-game.header-scrolled .site-header{position:fixed;background:transparent}
body.game-focus{min-height:100dvh}
body.game-focus .site-header .logo,
body.game-focus .site-header nav>a,
body.game-focus footer,
body.game-focus .chess-heading,
body.game-focus .chess-notice,
body.game-focus .chess-bottom-link,
body.game-focus .online-tools,
body.game-focus .online-mail-settings,
body.game-focus .online-invitation,
body.game-focus.game-match-open .online-inbox,
body.game-focus .feedback-launcher{display:none!important}
body.game-focus .header-spacer{display:none}
body.game-focus .site-header nav{display:flex;justify-content:flex-end}
body.game-focus .chess-shell{width:min(1120px,calc(100% - 16px));padding:54px 0 12px}
body.game-focus .chess-layout{grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:16px}
body.game-focus .chess-board-panel{width:min(100%,calc(100dvh - 158px));margin:0 auto;padding:8px}
body.game-focus .chess-player{min-height:30px}
body.game-focus .chess-player-top{margin-bottom:6px}
body.game-focus .chess-player-bottom{margin-top:6px}
body.game-focus .chess-loading:empty{display:none}
body.game-focus .online-board-help{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.game-focus .online-play-header{margin-top:0}
body.game-focus .online-play{margin:0;padding:8px;border:0}
body.game-focus .online-play-header{margin-bottom:12px}
body.game-focus .online-play .chess-board-panel{width:min(100%,calc(100dvh - 198px))}
body.game-focus.portal-action-game .site-header{position:fixed;background:transparent}
body.game-focus.portal-action-game #app{min-height:100dvh}
@media(max-width:850px){
  body.portal-game .chess-heading p{display:none}
  body.portal-game .chess-heading .eyebrow{font-size:.6rem}
  body.portal-game .site-header nav>a:not(.account-link){display:none}
  body.game-focus .chess-layout{grid-template-columns:minmax(0,1fr)}
}
@media(max-height:850px) and (min-width:700px){
  body.portal-game .chess-heading p{display:none}
  body.portal-game .chess-layout{grid-template-columns:minmax(0,1fr) minmax(230px,300px);gap:16px}
  body.portal-game .chess-board-panel{width:min(100%,calc(100dvh - 280px));margin:0 auto}
  body.game-focus .chess-board-panel{width:min(100%,calc(100dvh - 158px))}
  body.game-focus .online-play .chess-board-panel{width:min(100%,calc(100dvh - 198px))}
}
@media(max-width:400px){.screen-label{font-size:.68rem}.game-screen-toggle{padding:6px 7px}body.portal-game .site-header nav>a{padding:7px;font-size:.7rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
