.desktop-help-label{display:none}
.play-start-choice-actions>button[aria-pressed="true"]{outline:2px solid var(--ai-color-accent,#4868f9);outline-offset:-2px}
.play-position-source-status{margin:.4rem 0 0;font-size:.78rem;line-height:1.35}
/* Two adaptive compositions of the same board and game state.
   <=1000px: accepted compact mobile/portrait shell remains authoritative.
   >1000px: landscape workspace; tall portrait browser stacks the board. */
@media(min-width:1001px){
  html.play-workspace-active #desktopPageHelpButton{display:none!important}
  #trainerLayout.workspace-play>.board-column>.play-side-column>#desktopPlayStartPanel{display:none!important}
  #trainerLayout.workspace-play>.board-column>.play-side-column{grid-template-rows:auto auto minmax(10rem,1fr)!important}
  #trainerLayout.workspace-play>.board-column>.play-side-column>#playModeInfo{
    grid-row:1!important;grid-column:1/-1!important;display:grid!important;position:relative!important;
    grid-template-columns:minmax(0,1fr) max-content!important;
    grid-template-rows:auto auto auto!important;align-content:start!important;align-items:center!important;
    column-gap:1rem!important;row-gap:.4rem!important;min-height:0!important;padding:.55rem .75rem!important;
  }
  #trainerLayout.workspace-play #playModeInfo .desktop-play-panel-title{
    grid-column:1!important;grid-row:1!important;margin:0!important;padding-right:0!important;
  }
  #trainerLayout.workspace-play #playModeInfo #playPageHelpButton{
    grid-column:2!important;grid-row:1!important;justify-self:end!important;align-self:center!important;
    position:static!important;inset:auto!important;margin:0!important;
    width:auto!important;height:2.25rem!important;min-height:0!important;
    padding:0 .6rem!important;gap:.35rem!important;line-height:normal!important;
  }
  #trainerLayout.workspace-play #playModeInfo #playControlsRow{
    grid-column:1/-1!important;grid-row:2!important;
    grid-template-columns:minmax(0,1fr)!important;margin:0!important;padding-right:0!important;
  }
  html.play-workspace-active #trainerLayout.workspace-play #playModeInfo .play-game-controls{
    grid-template-columns:minmax(8.5rem,10.5rem) minmax(9.5rem,12rem)!important;
    width:max-content!important;max-width:100%!important;justify-content:start!important;
  }
  #trainerLayout.workspace-play #playModeInfo .play-game-controls>button{
    min-height:2.35rem!important;height:2.35rem!important;padding:.35rem .65rem!important;
  }
  html.play-workspace-active #trainerLayout.workspace-play #playModeInfo .play-game-controls>#playStartChoicesButton{
    display:flex!important;
  }
  #trainerLayout.workspace-play #playModeInfo #playStartChoices{
    grid-column:1/-1!important;grid-row:3!important;display:block!important;position:static!important;
    border:0!important;box-shadow:none!important;background:transparent!important;
    margin:0!important;padding:0!important;min-width:0!important;
  }
  #trainerLayout.workspace-play #playModeInfo #playStartChoices[hidden]{display:none!important}
  #trainerLayout.workspace-play #playModeInfo .play-start-choice-actions{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,11rem))!important;
    justify-content:start!important;height:auto!important;gap:.4rem!important;
  }
  #trainerLayout.workspace-play #playModeInfo .play-start-choice-actions>button{
    width:100%!important;min-width:0!important;min-height:2.4rem!important;
    padding:.3rem .4rem!important;font-size:.78rem!important;white-space:normal!important;
  }
  #trainerLayout.workspace-play #playModeInfo .play-position-source-status{
    margin:.45rem 0 0!important;font-size:.75rem!important;color:var(--ai-color-text-muted,#637086)!important;
  }
  #trainerLayout.workspace-play #playModeInfo #playPageHelpButton .desktop-help-label{
    display:inline!important;font-size:.82rem!important;font-weight:650!important;
  }
  #trainerLayout.workspace-play>.board-column>.play-side-column>#desktopPlaySettingsPanel{
    grid-column:1!important;grid-row:2!important;min-width:0!important;
  }
  #trainerLayout.workspace-play>.board-column>.play-side-column>#playMovesPanel{
    grid-column:1!important;grid-row:3!important;min-height:10rem!important;
  }
  #trainerLayout.workspace-play #desktopPlaySettingsPanel #cancelNewGameButton{display:none!important}
  #trainerLayout.workspace-play>.board-column>.play-side-column.desktop-play-wide{
    grid-template-columns:minmax(17rem,.8fr) minmax(26rem,1.25fr)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
  }
  #trainerLayout.workspace-play>.board-column>.play-side-column.desktop-play-wide>#playMovesPanel{
    grid-column:1!important;grid-row:2!important;min-height:0!important;
  }
  #trainerLayout.workspace-play>.board-column>.play-side-column.desktop-play-wide>#desktopPlaySettingsPanel{
    grid-column:2!important;grid-row:2!important;align-self:start!important;height:max-content!important;
    min-height:0!important;max-height:100%!important;overflow-y:auto!important;
  }
  /* A score with no moves should not be a giant empty card. Once moves arrive,
     keep the existing independently scrolling game history. */
  #trainerLayout.workspace-play>.board-column>.play-side-column.desktop-play-wide>#playMovesPanel:has(#moveList:empty){
    align-self:start!important;min-height:0!important;height:auto!important;
  }
  #trainerLayout.workspace-play #playMovesPanel #moveList:empty{
    flex:0 0 auto!important;min-height:0!important;overflow:hidden!important;
  }
  #trainerLayout.workspace-play #playMovesPanel #moveList:empty::before{
    content:"Moves will appear here when play begins.";
    display:block;padding:.6rem .1rem .3rem;
    font-size:.81rem;color:var(--ai-color-text-muted,#758196);
  }
  #trainerLayout.workspace-play #playMovesPanel .panel-title-row h2{
    font-size:.98rem!important;font-weight:700!important;
  }
  #trainerLayout.workspace-play #playMovesPanel #moveCount{
    font-size:.78rem!important;
  }
  /* Keep Help in the header at *every* divider width. Only action-button
     columns adapt when the workspace becomes narrower: 2 across when they fit,
     one beneath the other at very small desktop panel widths. */
  html.play-workspace-active #trainerLayout.workspace-play>.board-column>.play-side-column:not(.desktop-play-wide)>#playModeInfo .play-game-controls{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(min(9.25rem,100%),1fr))!important;
    width:100%!important;max-width:23rem!important;
  }
  #trainerLayout.workspace-play>.board-column>.play-side-column:not(.desktop-play-wide)>#playModeInfo .play-start-choice-actions{
    grid-template-columns:repeat(auto-fit,minmax(min(8rem,100%),1fr))!important;
  }
}
@media(min-width:1001px) and (orientation:portrait){
  #trainerLayout.workspace-play>.board-column{
    grid-template-columns:var(--desktop-rail-width,3.35rem) minmax(0,1fr)!important;
    grid-template-rows:minmax(0,var(--play-board-size-px)) var(--play-nav-height) minmax(13rem,1fr)!important;
    align-content:start!important;overflow-y:auto!important;
  }
  #trainerLayout.workspace-play>.board-column>.app-header{grid-column:1!important;grid-row:1/span 2!important}
  #trainerLayout.workspace-play>.board-column>#board{grid-column:2!important;grid-row:1!important;justify-self:start!important}
  #trainerLayout.workspace-play>.board-column>.history-navigation{grid-column:2!important;grid-row:2!important;justify-self:start!important}
  #trainerLayout.workspace-play>.board-column>#playDivider{display:none!important}
  #trainerLayout.workspace-play>.board-column>.play-side-column{grid-column:1/-1!important;grid-row:3!important;min-height:13rem!important;overflow-y:auto!important}
}
#gameClockInfo.settings-info-popover:not([hidden]){
  display:block!important;position:fixed!important;z-index:2147483000!important;
  max-width:calc(100vw - 16px)!important;box-sizing:border-box!important;
  margin:0!important;padding:.75rem .85rem!important;border:1px solid #b7c2d2!important;
  border-radius:12px!important;background:#252629!important;color:#fff!important;
  box-shadow:0 8px 24px #0005!important;font-size:.82rem!important;line-height:1.4!important;
  text-align:left!important;pointer-events:auto!important;
}
#gameClockInfo.settings-info-popover[hidden]{display:none!important}

/* A source is selected by state, never by its old hard-coded primary class.
   The Play/Set toolbar highlights the open mode, not both at once. */
#trainerLayout.workspace-play #playStartChoices .play-start-choice-actions>button{
  background:var(--ai-color-surface-2,#edf2f8)!important;
  color:var(--ai-color-text,#162033)!important;
  border:1px solid var(--ai-color-border,#cfd8e6)!important;
}
#trainerLayout.workspace-play #playStartChoices .play-start-choice-actions>button[aria-pressed="true"]{
  background:var(--ai-color-accent,#4267ff)!important;
  color:var(--ai-color-accent-contrast,#fff)!important;
  border-color:var(--ai-color-accent,#4267ff)!important;
}
html.play-workspace-active #trainerLayout.workspace-play #playControlsRow .play-game-controls>button[aria-selected="false"]{
  background:var(--ai-color-surface-2,#edf2f8)!important;
  color:var(--ai-color-text,#162033)!important;
  border-color:var(--ai-color-border,#cfd8e6)!important;
}
html.play-workspace-active #trainerLayout.workspace-play #playControlsRow .play-game-controls>button[aria-selected="true"]{
  background:var(--ai-color-accent,#4267ff)!important;
  color:var(--ai-color-accent-contrast,#fff)!important;
  border-color:var(--ai-color-accent,#4267ff)!important;
}
