/* Compact board-first page chrome. Shared by Play, Puzzles and Arcade. */
body.elo-unified-chess .navbar{position:relative;min-height:80px}
.elo-page-nav{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:16px;white-space:nowrap;z-index:1;color:#e7f7ff;font:800 clamp(17px,2vw,25px)/1.2 system-ui,sans-serif;pointer-events:none}
.elo-page-nav a{pointer-events:auto;text-decoration:none;color:#91e8f6;border:1px solid #316887;border-radius:10px;padding:9px 14px;font-size:15px}
.elo-page-nav a:hover{background:#17435c}
body.elo-unified-chess .play-page{margin-top:12px!important}
body.elo-unified-chess .play-game{margin-top:0!important}
body.elo-unified-chess .play-main-layout{margin-top:0!important}
body.elo-unified-chess .puzzles-page{margin-top:12px!important}
body.elo-unified-chess .arcade-page{margin-top:12px!important}
body.elo-unified-chess .arcade-heading{justify-content:flex-end;margin:0 0 8px!important;min-height:22px}
body.elo-unified-chess .arcade-heading h1{display:none!important}
body.elo-unified-chess .arcade-layout{align-items:start}
@media(min-width:1121px){
 body.elo-unified-chess .puzzles-layout,body.elo-unified-chess .puzzles-layout.has-save-score{display:grid!important;grid-template-columns:minmax(170px,195px) minmax(0,700px) minmax(245px,330px)!important;justify-content:center!important;align-items:start!important;gap:14px!important}
 body.elo-unified-chess .puzzles-layout>.puzzles-tabs{grid-column:1!important;grid-row:1!important}
 body.elo-unified-chess .puzzles-layout>.puzzle-toolbar-card{grid-column:1!important;grid-row:2!important}
 body.elo-unified-chess .puzzles-layout>.puzzle-board-card{grid-column:2!important;grid-row:1/span 3!important}
 body.elo-unified-chess .puzzles-layout>.puzzle-details{grid-column:3!important;grid-row:1/span 3!important}
 body.elo-unified-chess .puzzles-layout>.puzzle-save-run:not([hidden]){grid-column:1!important;grid-row:3!important}
 body.elo-unified-chess .puzzles-tabs{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;margin:0!important;padding:10px!important;min-width:0!important}
 body.elo-unified-chess .puzzles-tabs button{width:100%;text-align:left;white-space:normal!important}
}
@media(min-width:1250px){
 body.elo-unified-chess .play-page{width:min(1520px,calc(100% - 32px))!important}
 body.elo-unified-chess .play-main-layout{display:grid!important;grid-template-columns:minmax(180px,1fr) minmax(0,700px) minmax(240px,1fr)!important;gap:14px!important}
 body.elo-unified-chess .play-game{grid-column:2!important}
 body.elo-unified-chess .play-selector{grid-column:3!important;max-height:calc(100vh - 110px);overflow-y:auto}
}
.play-bot-tier .play-tier-drawer{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .28s ease,opacity .24s ease}
.play-bot-tier[open] .play-tier-drawer{grid-template-rows:1fr;opacity:1}
.play-bot-tier .play-tier-drawer-inner{min-height:0;overflow:hidden}
.play-bot-tier .play-bots{padding-top:5px}
.play-bot-tier summary{position:relative}
@media(max-width:1120px){body.elo-unified-chess .puzzles-layout>.puzzles-tabs{grid-column:1/-1!important;grid-row:auto!important;margin:0 0 10px!important}}
@media(max-width:820px){
 .elo-page-nav{left:48%;max-width:42vw;overflow:hidden;text-overflow:ellipsis;font-size:15px;gap:7px}
 .elo-page-nav a{padding:7px;font-size:12px}
 body.elo-unified-chess .play-main-layout{grid-template-columns:1fr!important}
 body.elo-unified-chess .puzzles-layout>.puzzles-tabs{grid-column:1/-1!important}
}
@media(max-width:580px){.elo-page-nav{display:none}.play-bot-tier summary small{white-space:normal}}
@media(prefers-reduced-motion:reduce){.play-bot-tier .play-tier-drawer{transition:none}}


/* Play Bots layout repair (2026-11-12).
   Earlier theme layers reserve an empty grid track and assign the game to
   track 2, pushing the board and bot list off-centre. This play-only override
   establishes exactly two outer columns and explicit inner placements. */
body.elo-unified-chess .play-page{
  width:min(1340px,calc(100% - 32px))!important;
  max-width:1340px!important;
  margin:12px auto 60px!important;
  display:block!important;
}
body.elo-unified-chess .play-page>.play-main-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(270px,310px)!important;
  gap:18px!important;
  align-items:start!important;
  width:100%!important;
  min-width:0!important;
}
body.elo-unified-chess .play-main-layout>.play-game{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
body.elo-unified-chess .play-main-layout>.play-selector{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:12px!important;
  align-self:start!important;
  box-sizing:border-box!important;
  max-height:calc(100vh - 110px);
  overflow-y:auto;
  overflow-x:hidden;
}
body.elo-unified-chess .play-game>.play-layout{
  display:grid!important;
  grid-template-columns:minmax(150px,175px) minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  justify-items:stretch!important;
  justify-content:stretch!important;
  gap:12px!important;
  min-width:0!important;
  width:100%!important;
}
body.elo-unified-chess .play-layout>.play-controls-panel{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}
body.elo-unified-chess .play-layout>.play-board-card{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:740px!important;
  margin:0 auto!important;
  padding:12px!important;
}
body.elo-unified-chess .play-layout>.play-panel{
  grid-column:2!important;
  grid-row:2!important;
  width:100%!important;
  min-width:0!important;
  max-width:740px!important;
  margin:0 auto!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-bots{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-bot{
  min-width:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
@media(max-width:1199px){
 body.elo-unified-chess .play-page{max-width:900px!important}
 body.elo-unified-chess .play-page>.play-main-layout{
  grid-template-columns:minmax(0,1fr)!important;
  justify-items:stretch!important;
 }
 body.elo-unified-chess .play-main-layout>.play-game{
  grid-column:1!important;grid-row:1!important;
 }
 body.elo-unified-chess .play-main-layout>.play-selector{
  grid-column:1!important;grid-row:2!important;
  max-height:none!important;overflow:visible!important;
  width:100%!important;max-width:900px!important;
 }
 body.elo-unified-chess .play-selector .play-bot-tier .play-bots{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
}
@media(max-width:700px){
 body.elo-unified-chess .play-page{width:calc(100% - 20px)!important}
 body.elo-unified-chess .play-game>.play-layout{
  grid-template-columns:minmax(0,1fr)!important;
 }
 body.elo-unified-chess .play-layout>.play-board-card{
  grid-column:1!important;grid-row:1!important;
 }
 body.elo-unified-chess .play-layout>.play-controls-panel{
  grid-column:1!important;grid-row:2!important;
 }
 body.elo-unified-chess .play-layout>.play-panel{
  grid-column:1!important;grid-row:3!important;
 }
 body.elo-unified-chess .play-selector .play-bot-tier .play-bots{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
 }
}

/* 177: Bot library follows the board on desktop, with readable cards and no
   nested scroll container. Override legacy three-column and sidebar rules. */
body.elo-unified-chess .play-page>.play-main-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:32px!important;
  justify-items:center!important;
}
body.elo-unified-chess .play-main-layout>.play-game{
  grid-column:1!important;
  grid-row:1!important;
  width:min(100%,900px)!important;
  max-width:900px!important;
  margin-inline:auto!important;
}
body.elo-unified-chess .play-main-layout>.play-selector{
  grid-column:1!important;
  grid-row:2!important;
  width:min(100%,1050px)!important;
  max-width:1050px!important;
  max-height:none!important;
  height:auto!important;
  overflow:visible!important;
  padding:22px!important;
  margin:0 auto!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-bots{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
  padding:12px 16px 20px!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-bot{
  min-height:120px!important;
  padding:16px!important;
  gap:12px!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-avatar{
  width:58px!important;
  height:58px!important;
  font-size:34px!important;
}
body.elo-unified-chess .play-selector .play-bot-tier .play-bot-info strong{font-size:16px!important}
body.elo-unified-chess .play-selector .play-bot-tier .play-bot-info small{font-size:14px!important}
@media(max-width:700px){
  body.elo-unified-chess .play-page>.play-main-layout{gap:20px!important}
  body.elo-unified-chess .play-main-layout>.play-selector{padding:12px!important}
  body.elo-unified-chess .play-selector .play-bot-tier .play-bots{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:8px!important}
  body.elo-unified-chess .play-selector .play-bot-tier .play-bot{min-height:100px!important;padding:9px!important;gap:6px!important}
  body.elo-unified-chess .play-selector .play-bot-tier .play-avatar{width:44px!important;height:44px!important;font-size:27px!important}
  body.elo-unified-chess .play-selector .play-bot-tier .play-bot-info strong{font-size:13px!important}
  body.elo-unified-chess .play-selector .play-bot-tier .play-bot-info small{font-size:12px!important}
}

/* 178: Wide desktop Play layout: generous controls | board | bot chat/moves.
   The complete bot roster remains below the game, without nested scrolling. */
@media(min-width:1050px){
 body.elo-unified-chess .play-page{
  width:min(1520px,calc(100% - 40px))!important;
  max-width:1520px!important;
 }
 body.elo-unified-chess .play-main-layout>.play-game{
  width:100%!important;max-width:1450px!important;
 }
 body.elo-unified-chess .play-game>.play-layout{
  display:grid!important;
  grid-template-columns:minmax(190px,225px) minmax(0,720px) minmax(245px,310px)!important;
  grid-template-rows:auto!important;
  gap:20px!important;
  align-items:start!important;
  justify-content:center!important;
 }
 body.elo-unified-chess .play-layout>.play-controls-panel{
  grid-column:1!important;grid-row:1!important;padding:18px!important;
 }
 body.elo-unified-chess .play-layout>.play-board-card{
  grid-column:2!important;grid-row:1!important;
  width:100%!important;max-width:720px!important;
 }
 body.elo-unified-chess .play-layout>.play-panel{
  grid-column:3!important;grid-row:1!important;
  width:100%!important;max-width:none!important;
  margin:0!important;padding:16px!important;
 }
 body.elo-unified-chess .play-controls-panel h2{font-size:20px!important;margin-bottom:18px!important}
 body.elo-unified-chess .play-side-toolbar{gap:12px!important}
 body.elo-unified-chess .play-side-toolbar button{
  min-height:46px!important;padding:11px 12px!important;
  font-size:14px!important;line-height:1.3!important;
 }
 body.elo-unified-chess .play-main-layout>.play-selector{
  width:min(100%,1200px)!important;max-width:1200px!important;
 }
}
@media(min-width:1050px) and (max-width:1230px){
 body.elo-unified-chess .play-game>.play-layout{
  grid-template-columns:minmax(165px,185px) minmax(0,1fr) minmax(210px,245px)!important;
  gap:12px!important;
 }
}

/* Visible bot chooser shortcut even when the roster begins below the fold. */
body.elo-unified-chess .play-bots-jump{
 display:inline-flex;align-items:center;justify-content:center;
 padding:7px 10px;border-radius:9px;border:1px solid #60cce9;
 background:#174b65;color:#dcfaff;text-decoration:none;
 font:700 12px system-ui,sans-serif;white-space:nowrap;
}
body.elo-unified-chess .play-bots-jump:hover,
body.elo-unified-chess .play-bots-jump:focus-visible{background:#24779b}
body.elo-unified-chess #play-bot-list{scroll-margin-top:95px}
@media(max-width:460px){body.elo-unified-chess .play-board-top{flex-wrap:wrap}}
