/* Shared tabs live inside each page's existing header. */
header.site-header { flex-wrap:nowrap; min-height:48px; gap:10px; padding:6px 10px; }
.site-bar { display:flex; align-items:center; flex:none; }
.site-tabs { display:flex; gap:2px; }
.site-tabs a { display:flex; align-items:center; min-height:36px; padding:7px 11px; border-radius:4px; color:var(--fg); font:500 14px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-decoration:none; white-space:nowrap; }
.site-tabs a[aria-current="page"] { color:#fff; background:#2a74b8; }
.site-tabs a:hover { color:#eae7e3; background:#3a3734; }
.site-tabs a:focus-visible { outline:2px solid #3692e7; outline-offset:2px; }
.site-offline { background:#3a3734; color:#eae7e3; border:1px solid #403d39; border-radius:4px; padding:7px 12px; cursor:pointer; font:inherit; }
.site-offline[hidden] { display:none; }
header.site-header #lichess-link { margin-left:auto; overflow:hidden; text-overflow:ellipsis; }
header.site-header .loader { max-width:none; }
@media(max-width:720px) {
 header.site-header { gap:6px; padding:4px 6px; min-height:44px; }
 .site-tabs a { padding:7px 8px; }
 header.site-header .header-note,header.site-header .connection { display:none; }
 header.site-header #lichess-link { flex:0 1 auto; max-width:calc(100% - 146px); padding:6px 8px; gap:6px; }
 header.site-header #lichess-btn { padding:7px 8px; }
 header.site-header .loader input,header.site-header #game-chip { padding:7px 6px; }
}

/* Keep the mobile game input mounted while the account's game list updates. */
#game-entry { display:none; }
@media(max-width:720px) {
 header.site-header #game-loader { display:none; }
 header.site-header #lichess-btn { margin-left:auto; flex:1; min-width:0; }
 header.site-header #lichess-btn .lb-label { display:inline; }
 #game-entry { display:flex; flex-wrap:wrap; gap:6px; padding:8px; border-bottom:1px solid var(--border); margin-bottom:4px; }
 #game-entry input { flex:1; min-width:0; padding:9px 10px; border:1px solid var(--border); border-radius:4px; background:var(--panel-2); color:var(--fg-bright); font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
 #game-entry input:focus { outline:1px solid var(--accent); border-color:var(--accent); }
 #lichess-menu #game-entry-load { width:auto; flex:none; text-align:center; padding:9px 12px; color:#fff; background:var(--accent); }
 #game-entry-error { flex-basis:100%; margin:0; color:var(--bad); font-size:12px; }
}

#game-entry-load[hidden] { display:none; }
#lichess-menu #game-entry #game-chip { flex:1; width:100%; min-width:0; padding:9px 10px; text-align:left; background:var(--panel-2); border:1px solid var(--border); color:var(--fg); font-size:14px; }
#lichess-menu #game-entry #game-chip:hover { border-color:var(--accent); }
#lichess-menu .lm-connect { padding:8px; }
#lichess-menu .lm-connect .lm-note { padding:7px 0 0; }
#lichess-menu button[data-act="link"] { min-height:42px; padding:10px 14px; text-align:center; font-size:14px; font-weight:600; color:#fff; background:var(--accent); }
#lichess-menu button[data-act="link"]:hover { background:#4aa0f0; }
