/* Loaded at desktop widths by the standalone games with a wide play layout. */
html body.game-ui[data-game] {
  --play-width: min(1200px, calc(100% - 80px));
  --play-columns: minmax(0, 2fr) minmax(300px, 1fr);
  --play-gap: clamp(20px, 2vw, 32px);
}
html body.game-ui[data-game]:has(:is(.ff-play, .shirt-card, .career-panel, .dd-dock, .lms-dock, .pitch-quiet, .fixture, #kitstoric-game .cards)) {
  > main { width: var(--play-width); max-width: none; margin-inline: auto; padding: 32px 0 44px; }
  > header.ui-bar { padding-inline: max(40px, calc((100% - 1200px) / 2)); }
}
html body.game-ui[data-game] :is(.ff-play, .shirt-card, #game:has(> .ss-dock), #game:has(> .dd-dock), #content:has(> .lms-dock), .pitch-board:has(.pitch-quiet):not(:has(.result)), #game:has(> .sheet)) {
  display: grid;
  grid-template-columns: var(--play-columns);
  column-gap: var(--play-gap);
  align-items: start;
  align-content: start;
  max-width: none;
  min-height: 0;
  > .ui-hud { grid-column: 1 / -1; margin-bottom: 16px; }
  > .ui-dock { position: relative; inset: auto; margin: 0; padding: 22px; border: 0; border-radius: 18px; background: var(--ui-soft); min-width: 0; }
}
html body.game-ui[data-game=football-fairway] {
  .ff-play .ff-hole { grid-column: 1; grid-row: 2 / span 2; height: clamp(400px, 57vh, 560px); }
  .ff-play #shot-controls, .ff-hole-end { grid-column: 2; }
  .ff-play #shot-controls { margin: 0; }
  .ff-shot-row { flex-direction: column; }
  .ff-shot-row #take-shot { width: 100%; }
}
html body.game-ui[data-game=inherit-the-shirt] {
  .shirt-card { grid-template-rows: auto 1fr; }
  .shirt-board { grid-area: 1 / 1 / span 2; padding: 28px 18px; }
  .slot .shirt { width: 120px; height: 126px; font-size: 46px; }
  .shirt-card > form.ui-dock { grid-area: 1 / 2; margin: 0; }
  .shirt-quiet { grid-area: 2 / 2; justify-content: flex-start; }
  .shirt-card > :is(.hints, .guess-list, .reveal, .evidence) { grid-column: 1; }
  .shirt-card > .ui-dock:not(form) { grid-area: 1 / 2; }
  .suggestions { bottom: auto; top: calc(100% + 8px); }
}
html body.game-ui[data-game=season-signature] {
  #game:has(.ss-dock) { max-width: none; }
  .ss-head { grid-column: 1 / -1; }
  .career-panel { grid-column: 1; grid-row: span 4; }
  #game .ss-dock { grid-column: 2; align-self: start; }
  #game > :is(.ui-feedback, .guess-feedback, #reveal) { grid-column: 2; }
  .career-table :is(th,td) { padding: 12px 14px; }
  .ss-dock #options { top: calc(100% + 8px); bottom: auto; }
}
html body.game-ui[data-game=deadline-day] {
  .dd-content:has(.dd-dock) { max-width: none; }
  .dd-brief { grid-area: 2 / 1; }
  .dd-dock { grid-area: 2 / 2; }
  .history { grid-column: 1; }
}
html body.game-ui[data-game=last-man-standing] {
  #view:has(.lms-dock) { max-width: none; }
  .category { grid-area: 2 / 1; }
  .category h2 { max-width: 24ch; font-size: 40px; line-height: 1.12; }
  .aside { grid-area: 3 / 1; }
  .lms-dock { grid-area: 2 / 2; }
  #view:has(.lms-dock) #give-up { grid-area: 3 / 2; justify-self: center; }
  .lms-dock .suggestions { top: calc(100% + 8px); bottom: auto; }
}
html body.game-ui[data-game=shared-a-pitch] {
  .pitch-board:has(.pitch-quiet):not(:has(.result)) { display: grid; min-height: 0; }
  .chain { grid-area: 1 / 1 / span 3; }
  .pitch-board > :is(.ui-feedback,p) { grid-column: 2; }
  .pitch-board .pitch-dock { grid-area: 1 / 2; margin: 0; }
  .pitch-quiet { grid-column: 2; }
  #search-results { top: calc(100% + 8px); bottom: auto; }
}
html body.game-ui[data-game=imposter] {
  #game:has(> .sheet) { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.8fr); grid-template-rows: auto auto 1fr; max-width: none; }
  .sheet { display: contents; }
  .fixture { grid-area: 2 / 1; padding: 24px; }
  .cards { grid-area: 2 / 2 / span 2; padding: 22px; background: var(--ui-soft); border-radius: 18px; }
  #game:has(.sheet) .ui-dock { grid-area: 3 / 1; }
}
html body.game-ui[data-game=kitstoric] {
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .stage { height: 275px; }
  .stage img { width: auto; height: 250px; max-height: 250px; max-width: 100%; object-fit: contain; }
}
html body.game-ui[data-game] .desktop-prompt[hidden] {
  display: block !important;
  flex: 0 0 100%;
  margin: 0 0 6px;
  font: 800 28px/1.1 var(--ui-display);
}
html body.game-ui[data-game=inherit-the-shirt] .shirt-card form.ui-dock { flex-wrap: wrap; }
html body.game-ui[data-game=shared-a-pitch] .pitch-dock { flex-direction: column; align-items: stretch; }
html body.game-ui[data-game=football-fairway] #shot-controls .results { order: 1; }
