/* Squares Pro — iPad-only layout adjustments. Laptop and desktop views are untouched. */
@media (hover:none) and (pointer:coarse) and (min-width:700px) and (max-width:1600px){
  html,body{max-width:100%;overflow-x:hidden;}
  body:has(.stadiumAppPage.active) main,body:has(#dashboard.active) main{width:100%!important;margin-left:0!important;padding:0 max(10px,env(safe-area-inset-right)) 24px max(10px,env(safe-area-inset-left))!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings){width:100%!important;max-width:1540px!important;margin:0 auto!important;}

  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) :is(.stadiumHomeHeader,.stadiumDashboardHeader,.stadiumLeagueHeader,.stadiumEditorHeader,.stadiumBoardsHeader,.stadiumPlayersHeader,.stadiumOwnershipHeader,.stadiumRevenueHeader,.stadiumResultsHeader,.stadiumSnapshotsHeader,.stadiumImportExportHeader,.stadiumReportsHeader,.stadiumActionCenterHeader,.stadiumSettingsHeader){grid-template-columns:50px minmax(0,1fr) 50px!important;min-height:88px!important;padding:0 12px!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumHeaderButton{width:46px!important;height:46px!important;min-height:46px!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumBrandLockup{gap:14px!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumBrandLockup>img{display:block!important;width:62px!important;height:62px!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumMetalTitle{width:min(48vw,430px)!important;height:auto!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumBrandWords small{font-size:8px!important;letter-spacing:.24em!important;}

  :is(#home .stadiumHomeStrip,#league .stadiumLeagueStrip,#boards .stadiumBoardsStrip,#quick .stadiumEditorStrip,#players .stadiumPlayersStrip,#ownership .stadiumOwnershipStrip,#revenue .stadiumRevenueStrip,#results .stadiumResultsStrip,#snapshots .stadiumSnapshotsStrip,#importExport .stadiumImportExportStrip,#reports .stadiumReportsStrip,#actions .stadiumActionCenterStrip,#settings .stadiumSettingsStrip){display:grid!important;grid-template-columns:1fr 1.25fr 1fr!important;min-height:54px!important;margin:0 0 12px!important;}
  :is(#home .stadiumHomeStrip,#league .stadiumLeagueStrip,#boards .stadiumBoardsStrip,#quick .stadiumEditorStrip,#players .stadiumPlayersStrip,#ownership .stadiumOwnershipStrip,#revenue .stadiumRevenueStrip,#results .stadiumResultsStrip,#snapshots .stadiumSnapshotsStrip,#importExport .stadiumImportExportStrip,#reports .stadiumReportsStrip,#actions .stadiumActionCenterStrip,#settings .stadiumSettingsStrip)>div{display:flex!important;min-width:0!important;padding:7px 9px!important;}
  :is(#home .stadiumHomeStrip,#league .stadiumLeagueStrip,#boards .stadiumBoardsStrip,#quick .stadiumEditorStrip,#players .stadiumPlayersStrip,#ownership .stadiumOwnershipStrip,#revenue .stadiumRevenueStrip,#results .stadiumResultsStrip,#snapshots .stadiumSnapshotsStrip,#importExport .stadiumImportExportStrip,#reports .stadiumReportsStrip,#actions .stadiumActionCenterStrip,#settings .stadiumSettingsStrip)>div:not(.stadiumIpadNever){display:flex!important;}
  :is(#home .stadiumHomeStrip,#league .stadiumLeagueStrip,#boards .stadiumBoardsStrip,#quick .stadiumEditorStrip,#players .stadiumPlayersStrip,#ownership .stadiumOwnershipStrip,#revenue .stadiumRevenueStrip,#results .stadiumResultsStrip,#snapshots .stadiumSnapshotsStrip,#importExport .stadiumImportExportStrip,#reports .stadiumReportsStrip,#actions .stadiumActionCenterStrip,#settings .stadiumSettingsStrip) strong{font-size:16px!important;}
  :is(#home .stadiumHomeStrip,#league .stadiumLeagueStrip,#boards .stadiumBoardsStrip,#quick .stadiumEditorStrip,#players .stadiumPlayersStrip,#ownership .stadiumOwnershipStrip,#revenue .stadiumRevenueStrip,#results .stadiumResultsStrip,#snapshots .stadiumSnapshotsStrip,#importExport .stadiumImportExportStrip,#reports .stadiumReportsStrip,#actions .stadiumActionCenterStrip,#settings .stadiumSettingsStrip) b{font-size:12px!important;}

  :is(.stadiumHomeTopbar,.stadiumLeagueTopbar,.stadiumBoardsTopbar,.stadiumEditorTopbar,.stadiumPlayersTopbar,.stadiumOwnershipTopbar,.stadiumRevenueTopbar,.stadiumResultsTopbar,.stadiumSnapshotsTopbar,.stadiumImportExportTopbar,.stadiumReportsTopbar,.stadiumActionCenterTopbar,.stadiumSettingsTopbar){display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:10px!important;margin-bottom:10px!important;padding:11px 13px!important;}
  :is(.stadiumLeagueTopbar,.stadiumBoardsTopbar,.stadiumEditorTopbar,.stadiumPlayersTopbar,.stadiumOwnershipTopbar,.stadiumRevenueTopbar,.stadiumResultsTopbar,.stadiumSnapshotsTopbar,.stadiumImportExportTopbar,.stadiumReportsTopbar,.stadiumActionCenterTopbar,.stadiumSettingsTopbar)>div:first-child{flex:1 1 360px!important;min-width:0!important;}
  :is(.stadiumLeagueTopbar,.stadiumBoardsTopbar,.stadiumEditorTopbar,.stadiumPlayersTopbar,.stadiumOwnershipTopbar,.stadiumRevenueTopbar,.stadiumResultsTopbar,.stadiumSnapshotsTopbar,.stadiumImportExportTopbar,.stadiumReportsTopbar,.stadiumActionCenterTopbar,.stadiumSettingsTopbar) h2{font-size:20px!important;line-height:1.1!important;}
  :is(.stadiumLeagueTopbar,.stadiumBoardsTopbar,.stadiumEditorTopbar,.stadiumPlayersTopbar,.stadiumOwnershipTopbar,.stadiumRevenueTopbar,.stadiumResultsTopbar,.stadiumSnapshotsTopbar,.stadiumImportExportTopbar,.stadiumReportsTopbar,.stadiumActionCenterTopbar,.stadiumSettingsTopbar) .tag{font-size:10px!important;line-height:1.35!important;}
  :is(.stadiumPlayersActions,.stadiumOwnershipActions,.stadiumRevenueActions,.stadiumResultsActions,.stadiumSnapshotsActions,.stadiumImportExportActions,.stadiumReportsActions,.stadiumActionCenterTopActions){display:flex!important;flex:0 1 auto!important;gap:7px!important;}

  :is(#home .stadiumHomeSummary,#league .stadiumLeagueSummaryCards,#players .stadiumPlayersSummary,#ownership .stadiumOwnershipSummary,#revenue .stadiumRevenueCards,#results .stadiumResultsSummary,#snapshots .stadiumSnapshotsSummary,#importExport .stadiumImportExportSummary,#reports .stadiumReportMetrics,#actions .stadiumActionCenterSummary,#settings .stadiumSettingsSummary){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;}
  :is(.stadiumHomePanel,.stadiumHomeQuickActions,.stadiumLeaguePanel,.stadiumBoardsPanel,.stadiumEditorControlPanel,.stadiumPlayersPanel,.stadiumOwnershipPanel,.stadiumRevenuePanel,.stadiumResultsPanel,.stadiumSnapshotsPanel,.stadiumImportExportPanel,.stadiumReportsPanel,.stadiumActionCenterPanel,.stadiumSettingsPanel){padding:14px!important;margin-bottom:12px!important;}
  button,.btn,input,select,textarea{touch-action:manipulation;}
  :is(.stadiumAppPage,#dashboard) button:not(.actionPinBtn):not(.tinyBtn){min-height:40px;}
  #quick .stadiumBoardEditorLayout{gap:12px!important;}
  #quick .stadiumBoardEditorPreview{padding:14px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;}
  #players .stadiumPlayerForm{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  #players .playerNotesField{grid-column:1/3!important;}
  #players .playerFormActions{grid-column:3/4!important;grid-template-columns:1fr!important;}
  #reports .stadiumReportsSplit,#settings .settingsControlGrid{grid-template-columns:1fr!important;}
  #home .stadiumHomeActionGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  #home .stadiumHomeOperationsGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #home .stadiumHomeOperationsGrid>section:last-child{grid-column:1/-1!important;}
  #actions .actionGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}

  /* Game Center: retain desktop composition, but tighten it specifically for iPad. */
  #dashboard{overflow:visible!important;}
  #dashboard .stadiumDashboardHeader{min-height:82px!important;}
  #dashboard .stadiumMatchupStrip{width:auto!important;min-height:42px!important;margin:0 0 6px!important;padding:0 8px!important;}
  #dashboard .stadiumMatchupStrip>div{padding:4px 7px!important;}
  #dashboard .dashboardGameDayShell{
    display:grid!important;
    grid-template-columns:220px minmax(0,1fr) 220px!important;
    grid-template-areas:"left board side"!important;
    grid-template-rows:auto!important;
    align-items:start!important;
    gap:10px!important;
    height:auto!important;
    min-height:0!important;
    padding:0 4px 8px!important;
    overflow:visible!important;
  }
  #dashboard .dashboardBoardMarquee{display:none!important;}
  #dashboard .stadiumLeftRail{grid-area:left!important;display:block!important;position:relative!important;min-width:0!important;}
  #dashboard .dashboardLiveBoardCard{grid-area:board!important;position:relative!important;width:100%!important;max-width:none!important;margin:0!important;transform:none!important;}
  #dashboard .dashboardLiveBoard{width:100%!important;max-width:none!important;margin:0 auto!important;}
  #dashboard .dashboardBoardStatus{grid-area:side!important;position:relative!important;width:100%!important;min-width:0!important;margin:0!important;}

  #dashboard .stadiumEntryPayoutCard{min-height:0!important;}
  #dashboard .stadiumEntryFeeHero{padding:7px 8px!important;}
  #dashboard .stadiumEntryFeeHero span,#dashboard .stadiumEntryFeeHero small{font-size:8px!important;}
  #dashboard .stadiumEntryFeeHero strong{font-size:30px!important;}
  #dashboard .stadiumPayoutHeading{min-height:36px!important;padding:7px!important;font-size:16px!important;}
  #dashboard .stadiumPayoutRows{display:grid!important;grid-template-columns:1fr!important;}
  #dashboard .stadiumPayoutRows>div{min-height:54px!important;padding:5px 8px!important;}
  #dashboard .stadiumPayoutRows small{font-size:8px!important;}
  #dashboard .stadiumPayoutRows b{font-size:13px!important;}

  #dashboard .dashboardBoardStatus>.cardHeader,
  #dashboard .dashboardProgressWrap,
  #dashboard .dashboardStatusTiles,
  #dashboard .dashboardActionRow{display:none!important;}
  #dashboard .stadiumHighlightPanel{margin:0!important;}
  #dashboard .stadiumHighlightPanel summary{min-height:38px!important;padding:8px!important;font-size:10px!important;}
  #dashboard .dashboardPlayerHighlightContent{padding:6px!important;}
  #dashboard .dashboardPlayerHighlightRow{gap:5px!important;}
  #dashboard .dashboardPlayerHighlightRow input,
  #dashboard .dashboardPlayerHighlightRow select{min-height:31px!important;height:31px!important;padding:5px 7px!important;font-size:9px!important;}
  #dashboard .dashboardPlayerHighlightRow button{min-height:29px!important;height:29px!important;padding:4px 5px!important;font-size:8px!important;}
  #dashboard .dashboardHighlightStatus{min-height:55px!important;padding:8px!important;font-size:8px!important;}
  #dashboard .stadiumSideScoreboard{min-height:42px!important;margin-top:7px!important;padding:6px 9px!important;}
  #dashboard .stadiumSideScoreboard>span{font-size:22px!important;}
  #dashboard .stadiumSideScoreboard b{font-size:14px!important;}
  #dashboard .stadiumSideScoreboard small{font-size:7px!important;}
  #dashboard .dashboardDropPanel{padding:7px!important;}
  #dashboard .dashboardDropPanel h3{font-size:12px!important;}
  #dashboard .dashboardScoreGrid{gap:5px!important;}
  #dashboard .dashboardScoreGrid label{font-size:7px!important;}
  #dashboard .dashboardScoreGrid input,#dashboard .dashboardScoreGrid select{min-height:30px!important;height:30px!important;padding:4px 5px!important;font-size:9px!important;}
  #dashboard .dashboardScoreActions button{min-height:29px!important;padding:4px!important;font-size:7px!important;}
  #dashboard #dashboardScoreResult{min-height:42px!important;padding:7px!important;font-size:7px!important;}

  #dashboard .premiumGameToolbar{
    display:grid!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    width:calc(100% - 8px)!important;
    margin:8px auto 0!important;
    gap:7px!important;
    z-index:1!important;
  }
  #dashboard .premiumGameToolbar button{grid-template-columns:34px minmax(0,1fr)!important;min-height:50px!important;height:50px!important;padding:5px 7px!important;}
  #dashboard .premiumGameToolbar button>span{font-size:23px!important;}
  #dashboard .premiumGameToolbar button>b{font-size:11px!important;}
  #dashboard .premiumGameToolbar button small{font-size:7px!important;}
  #dashboard .premiumBoardStatusBar{position:relative!important;inset:auto!important;transform:none!important;margin-top:5px!important;}
}

@media (hover:none) and (pointer:coarse) and (min-width:700px) and (max-width:899px){
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumBrandLockup>img:last-child{display:none!important;}
  :is(#home,#dashboard,#league,#boards,#quick,#players,#ownership,#revenue,#results,#snapshots,#importExport,#reports,#actions,#settings) .stadiumMetalTitle{width:min(54vw,380px)!important;}
  #dashboard .dashboardGameDayShell{grid-template-columns:1fr!important;grid-template-areas:"board" "side" "left"!important;}
  #dashboard .premiumGameToolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* Current Stadium drawer: keep the workspace switch available on every page. */
body:has(.stadiumAppPage.active) #dashboardSidebar .modeSwitcher,
body:has(#dashboard.active) #dashboardSidebar .modeSwitcher{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-width:0!important;
  margin:0 0 10px!important;
  padding:5px!important;
  background:#06131e!important;
  border:1px solid #31566d!important;
  border-radius:3px!important;
}
body:has(.stadiumAppPage.active) #dashboardSidebar .modeSwitcher button,
body:has(#dashboard.active) #dashboardSidebar .modeSwitcher button{
  min-height:34px!important;
  padding:7px 5px!important;
  border-radius:2px!important;
  font-size:10px!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
