/* One grid for every hub panel; mobile reads in the saved document order. */
.rct-theme #main[data-department="layout"],.rct-theme #main[data-department="desk"]{max-width:2200px;width:100%;padding-left:16px;padding-right:16px}
.dashboard-grid{position:relative;display:grid;grid-template-columns:repeat(24,minmax(0,1fr));grid-auto-rows:8px;gap:8px;isolation:isolate}
.dashboard-panel{grid-column:var(--panel-x)/span var(--panel-w);grid-row:var(--panel-y)/span var(--panel-h);position:relative;min-width:0;min-height:0;container-type:inline-size;container-name:dashboard-panel}
.dashboard-panel-body{height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8ba0a7 transparent;min-width:0}
.dashboard-panel-body:focus-visible{outline:2px solid var(--club-color);outline-offset:-2px}
.dashboard-panel-body>.fc-heading{margin:0;height:100%;align-items:center;gap:10px}
.dashboard-panel-body>.compact-overview{margin:0;min-height:100%;height:100%}
.rct-theme #main[data-department="layout"] .compact-overview{display:flex}
.rct-theme .dashboard-panel .week-workspace{display:block;margin:0}
.dashboard-panel :is(.hub-recap,.hub-context,.hub-shortcuts,.league-headlines,.week-news,.fc-panel){margin:0}
.dashboard-panel .hub-context-panel{min-height:100%;padding:10px 12px 0}
.dashboard-panel :is(.hub-inbox,.hub-season-rail,.hub-performances){min-height:100%}
.dashboard-panel .hub-season-rail{grid-area:auto}
.dashboard-panel .hub-performances{grid-area:auto}
.dashboard-panel .hub-leader-list{display:block}
.dashboard-panel .hub-scoreboard{display:block}
.dashboard-panel .hub-season-list{display:block}
.dashboard-panel .hub-context-panel:last-child .hub-calendar{display:block}
.dashboard-panel .headline-grid{gap:10px}
.dashboard-panel .league-story{background:#e6ebe8;border-top:3px solid #6b838b;padding:12px}
.dashboard-panel .league-story p{margin:7px 0}
.dashboard-edit-link{border:0;background:none;text-decoration:underline;color:var(--selection-ink);font:var(--text-caption) var(--body);padding:3px 6px;white-space:nowrap}
.dashboard-panel .fc-heading h1 .dashboard-edit-link{vertical-align:middle;margin-left:8px}
.dashboard-empty{border:1px solid var(--edge);background:var(--panel);padding:10px 12px;height:100%}
.dashboard-empty h2{font:700 20px var(--display);margin:0 0 4px}.dashboard-empty p{font-size:var(--text-caption);margin:0}
.dashboard-editor-header{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:12px}
.dashboard-editor-header h1{font:700 34px var(--display);margin:0 0 3px}
.dashboard-editor-header p{margin:0;font-size:var(--text-small)}
.dashboard-editor-header>div:last-child{display:flex;gap:8px;flex-shrink:0}
.rct-theme #dashboard-save{background:var(--accent);border-color:var(--accent);color:white;font-weight:700}
.dashboard-editor-tools{position:sticky;top:0;z-index:8;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px;background:var(--chrome);color:#f3f5f0;border:1px solid #56717d;box-shadow:0 3px 6px #192b3830}
.dashboard-editor-tools label{display:flex;align-items:center;gap:6px;font-size:var(--text-small)}
.dashboard-editor-tools select{max-width:200px;padding:9px;background:var(--paper);border:1px solid var(--edge);font:var(--text-small) var(--body);color:var(--ink)}
.dashboard-editor-tools .button{min-height:38px;padding:8px 11px;font-size:var(--text-small)}
.dashboard-desktop-tools{display:flex;gap:3px}.dashboard-stack-tools{display:none}
.dashboard-editor-tools details{position:relative;font-size:var(--text-small)}
.dashboard-editor-tools summary{cursor:pointer;padding:9px;border:1px solid #899ca3;min-height:38px}
.dashboard-editor-tools details>div{position:absolute;z-index:9;top:100%;left:0;min-width:210px;padding:8px;background:var(--chrome);border:1px solid #899ca3;display:grid;gap:5px;box-shadow:0 5px 12px #192b3840}
.dashboard-editor-tools details>div p{padding:4px;margin:0}
.dashboard-edit-help{font-size:var(--text-caption);margin:10px 0 4px;color:var(--muted)}
.dashboard-layout-message{font-size:var(--text-small);margin:4px 0 12px;min-height:22px;font-weight:600}
.dashboard-editing .dashboard-grid{background:repeating-linear-gradient(0deg,transparent 0 15px,#56717d15 15px 16px);outline:1px dashed #8aa0a8;min-height:180px}
.dashboard-editing .dashboard-panel{outline:1px dashed #627e8a;background:var(--paper)}
.dashboard-editing .dashboard-panel-body{opacity:.58;user-select:none;pointer-events:none}
.dashboard-editing .dashboard-selected{outline:3px solid #ba6936;z-index:2}
.dashboard-panel-tools{position:absolute;z-index:3;left:0;right:0;top:0;height:30px;display:flex;align-items:stretch;background:#203a48;color:#fff5dc}
.dashboard-panel-tools button{color:inherit;background:transparent;border:0;font:600 12px var(--body)}
.dashboard-panel-tools>.dashboard-drag{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:left;cursor:grab;touch-action:none;padding:4px 8px}
.dashboard-panel-tools>.dashboard-drag>span{font-size:20px;vertical-align:middle;margin-right:3px}
.dashboard-panel-tools>button:last-child{width:30px;cursor:pointer;font-size:21px}
.dashboard-panel-tools>button:hover{background:#456574}
.dashboard-resize{position:absolute;right:0;bottom:0;z-index:4;width:30px;height:30px;color:#fff5dc;background:#203a48;border:1px solid #648494;cursor:nwse-resize;touch-action:none;font-size:20px}
.dashboard-dragging{opacity:.4;z-index:4}
.dashboard-drop-preview{position:absolute;pointer-events:none;z-index:5;outline:3px solid #d39b46;background:#dab67035;color:#122e3a;padding:8px;font-size:13px;font-weight:700;overflow:hidden}
.dashboard-all-hidden{padding:35px;border:1px dashed var(--edge);text-align:center}
@container dashboard-panel (max-width:650px){
  .dashboard-panel-body .hub-matchup-teams{gap:8px;padding:15px 0}
  .dashboard-panel-body .matchup-club{grid-template-columns:38px minmax(0,1fr);gap:8px;justify-items:start;text-align:left}
  .dashboard-panel-body .matchup-club img{width:38px;height:38px}
  .dashboard-panel-body .matchup-club h2{font-size:27px}
  .dashboard-panel-body .matchup-record>span{display:none}
  .dashboard-panel-body .matchup-ratings{justify-content:flex-start}
  .dashboard-panel-body .hub-plan{padding:10px;gap:8px}
  .dashboard-panel-body .hub-preparation{padding:10px;gap:8px}
  .dashboard-panel-body .hub-plan strong{font-size:14px}
  .dashboard-panel-body .hub-preparation :is(strong,span){font-size:13px}
  .dashboard-panel-body .hub-shortcuts{display:grid;grid-template-columns:1fr 1fr}
  .dashboard-panel-body .headline-grid{grid-template-columns:1fr}
}
@container dashboard-panel (max-width:350px){
  .dashboard-panel-body .hub-plan{flex-wrap:wrap}
  .dashboard-panel-body .hub-matchup-teams{grid-template-columns:1fr auto 1fr}
  .dashboard-panel-body .matchup-club{grid-template-columns:1fr;text-align:center;justify-items:center}
  .dashboard-panel-body .matchup-city{display:none}
  .dashboard-panel-body .hub-inbox{padding:10px}
  .dashboard-panel-body .hub-leader{padding-right:0;min-height:0}
  .dashboard-panel-body .hub-leader-total{position:static;width:auto;flex-wrap:wrap}
  .dashboard-panel-body .hub-performances{padding:12px 10px 0}
  .dashboard-panel-body .hub-season-list li>button{padding:3px 7px;gap:5px}
}
@container dashboard-panel (max-width:190px){
  .dashboard-panel-body .hub-leader-total{gap:4px}
  .dashboard-panel-body .hub-leader-total strong{font-size:36px}
  .dashboard-panel-body .hub-leader-total>.player-portrait{--portrait-size:32px!important}
}
@media(max-width:1099px){
  .dashboard-grid{display:flex;flex-direction:column;gap:10px}
  .dashboard-panel{container-type:inline-size;min-height:0;width:100%}
  .dashboard-panel-body{height:auto;overflow:visible}
  .dashboard-panel-body>.fc-heading{height:auto;min-height:0}
  .dashboard-panel-body>.compact-overview{height:auto}
  .dashboard-panel .hub-season-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .dashboard-panel .hub-leader-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
  .dashboard-panel .hub-scoreboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  .dashboard-editing .dashboard-panel{min-height:70px;padding-top:30px}
  .dashboard-editing .dashboard-panel-body{max-height:380px;overflow:hidden}
  .dashboard-resize,.dashboard-desktop-tools,.dashboard-size-menu{display:none}
  .dashboard-stack-tools{display:flex;gap:5px}
  .dashboard-editor-tools{top:0}
}
@media(max-width:650px){
  .rct-theme #main[data-department="layout"],.rct-theme #main[data-department="desk"]{padding-left:8px;padding-right:8px}
  .dashboard-panel .hub-leader-list{display:block}
  .dashboard-panel .hub-season-list,.dashboard-panel .hub-scoreboard{grid-template-columns:1fr 1fr}
  .dashboard-editor-header{align-items:flex-start;flex-direction:column;gap:10px}
  .dashboard-editor-header>div:last-child{width:100%}.dashboard-editor-header>div:last-child button{flex:1}
  .dashboard-editor-tools{gap:6px;padding:8px}
  .dashboard-editor-tools label{width:100%}.dashboard-editor-tools select{max-width:none;flex:1}
  .dashboard-editor-tools .button,.dashboard-editor-tools summary{min-height:40px}
  .dashboard-edit-help{line-height:1.5}
  .dashboard-panel-body .hub-matchup-teams{padding:12px 0}
  .dashboard-edit-link{padding:4px;min-width:28px;min-height:32px;font-size:0;margin-left:4px!important}
  .dashboard-edit-link::before{content:'⚙';font-size:19px}
}
