/* EloFlow homepage mobile repair: normal scrolling header and no clipped right gutter. */
@media(max-width:1099px){
 html,body{width:100%;max-width:100%;overflow-x:clip}
 header.navbar,body>header.navbar{
  position:relative!important;top:auto!important;inset:auto!important;
  z-index:20!important;width:100%!important;max-width:100%!important;
  min-height:72px!important;height:auto!important;
  padding:12px 16px!important;display:flex!important;flex-wrap:wrap!important;
  gap:10px!important;align-items:center!important;
  background:#031120!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 }
 header.navbar>.brand{flex:1 1 160px!important;min-width:0!important;margin:0!important}
 header.navbar .brand-logo{display:block!important;width:min(220px,100%)!important;max-width:100%!important;height:auto!important}
 header.navbar>.account-nav{display:flex!important;flex:0 1 auto!important;min-width:0!important;margin-left:auto!important;gap:7px!important}
 header.navbar>.account-nav a{font-size:12px!important;padding:9px 11px!important;white-space:nowrap!important}
 header.navbar>.mobile-chess-menu{margin-left:0!important}
 main,main>.hero,main>.hero>.hero-content,main>.hero>.hero-content>*{
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
 }
 main>.hero{width:100%!important;overflow:visible!important}
 main>.hero>.hero-content{width:100%!important;margin-inline:auto!important;padding-inline:16px!important}
 main>.hero>.hero-content form,
 main>.hero>.hero-content input,
 main>.hero>.hero-content button{max-width:100%!important;box-sizing:border-box!important}
 main>.below-hero-layout{width:calc(100% - 32px)!important;max-width:100%!important;min-width:0!important}
}
@media(max-width:560px){
 header.navbar>.brand{flex-basis:100%!important}
 header.navbar>.account-nav{margin-left:0!important}
 header.navbar>.mobile-chess-menu{margin-left:auto!important}
 main>.hero>.hero-content{padding-inline:16px!important}
}

/* EloFlow mobile header: logo and account actions share the top row;
   navigation remains visible as a separate right-aligned menu. */
@media(max-width:700px){
 body>header.navbar,header.navbar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"brand account" "menu menu"!important;
  align-items:center!important;column-gap:8px!important;row-gap:8px!important;
  padding:10px 12px!important;flex-wrap:nowrap!important;
 }
 header.navbar>.brand{
  grid-area:brand!important;display:block!important;
  min-width:0!important;width:100%!important;max-width:100%!important;
  flex:none!important;margin:0!important;
 }
 header.navbar>.brand .brand-logo{
  display:block!important;width:100%!important;max-width:210px!important;
  max-height:55px!important;height:auto!important;object-fit:contain!important;
  object-position:left center!important;
 }
 header.navbar>.account-nav{
  grid-area:account!important;display:flex!important;justify-content:flex-end!important;
  align-items:center!important;flex-wrap:nowrap!important;gap:5px!important;
  min-width:0!important;max-width:100%!important;margin:0!important;
  width:auto!important;justify-self:end!important;
 }
 header.navbar>.account-nav a{
  font-size:clamp(10px,2.9vw,13px)!important;
  padding:8px clamp(6px,2vw,11px)!important;white-space:nowrap!important;
 }
 header.navbar>.mobile-chess-menu{
  grid-area:menu!important;display:block!important;visibility:visible!important;
  justify-self:end!important;align-self:center!important;
  margin:0!important;position:relative!important;
 }
 header.navbar>.mobile-chess-menu summary{display:flex!important;visibility:visible!important}
 header.navbar>.mobile-chess-menu nav{right:0!important;left:auto!important;z-index:30!important}
}

/* EloFlow: one-row mobile header; account actions only inside opened menu. */
@media(max-width:1099px){
 body>header.navbar>.account-nav{display:none!important}
 body>header.navbar>.mobile-chess-menu{display:block!important;visibility:visible!important;position:relative!important;z-index:100!important;margin-left:auto!important}
 body>header.navbar>.mobile-chess-menu nav{z-index:200!important}
}
@media(max-width:700px){
 body>header.navbar{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:10px!important}
 body>header.navbar>.brand{flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:calc(100% - 105px)!important;margin:0!important}
 body>header.navbar>.mobile-chess-menu{flex:0 0 auto!important;margin-left:auto!important}
}


/* EloFlow desktop: give both side panels and the search their own columns.
   Prevent the hero title and search form from sitting underneath the tools. */
@media (min-width:1100px){
 main>.hero{
  display:grid!important;
  grid-template-columns:minmax(245px,29fr) minmax(0,43fr) minmax(270px,28fr)!important;
  align-items:center!important;
  column-gap:clamp(16px,2vw,32px)!important;
  padding:28px clamp(22px,3vw,52px)!important;
  min-height:650px!important;
  overflow:hidden!important;
 }
 main>.hero>.hero-puzzle-ranking,
 main>.hero>.hero-tool-links{
  position:relative!important;
  inset:auto!important;
  top:auto!important;right:auto!important;left:auto!important;
  width:100%!important;max-width:100%!important;
  margin:0!important;
  align-self:start!important;
  z-index:2!important;
 }
 main>.hero>.hero-puzzle-ranking{grid-column:1!important;grid-row:1!important}
 main>.hero>.hero-tool-links{grid-column:3!important;grid-row:1!important}
 main>.hero>.hero-content{
  grid-column:2!important;grid-row:1!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  padding:40px 0!important;margin:0!important;
  z-index:1!important;
 }
 main>.hero>.hero-content h1{
  font-size:clamp(27px,2.6vw,46px)!important;
  line-height:1.12!important;letter-spacing:-1.5px!important;
  overflow-wrap:normal!important;
 }
 main>.hero>.hero-content .subtitle{font-size:clamp(13px,1.1vw,16px)!important;line-height:1.65!important}
 main>.hero>.hero-content .search-box{width:100%!important;max-width:100%!important}
 main>.hero>.hero-content .search-box button{padding:12px 15px!important;white-space:nowrap!important}
}
@media (min-width:1100px) and (max-width:1300px){
 main>.hero{grid-template-columns:minmax(220px,27fr) minmax(0,46fr) minmax(235px,27fr)!important}
 main>.hero>.hero-tool-links{padding:16px!important;gap:10px!important}
 main>.hero>.hero-tool-links a{min-height:65px!important;padding:12px!important;font-size:15px!important}
 main>.hero>.hero-content h1{font-size:clamp(25px,2.55vw,34px)!important}
}
