/* Desktop canvas: preserve a usable 1200px layout; touch/mobile rules remain intact. */
html body.dashboard-body:not(.admin-body) .sidebar :is(.side-nav button,.side-label,.brand-word,.sidebar-bottom) {
  text-shadow:0 1px 1px rgba(0,0,0,.38);
}
html[data-dashboard-theme="dark"] body.dashboard-body:not(.admin-body) .sidebar :is(.side-nav button,.side-label,.brand-word,.sidebar-bottom) {
  text-shadow:0 1px 2px rgba(0,0,0,.72);
}
@media (hover:hover) and (pointer:fine) {
  html { overflow-x:auto; }
  html body { min-width:1200px; max-width:none; overflow-x:visible; }
  html body.dashboard-body .dashboard-layout { display:grid; grid-template-columns:248px minmax(0,1fr); min-width:1200px; }
  html body.dashboard-body .sidebar { position:sticky; inset:auto; top:0; grid-column:1; grid-row:1; width:248px; height:100dvh; max-height:100dvh; align-self:start; transform:none; overflow-y:auto; }
  html body.dashboard-body:not(.admin-body) .dashboard-layout { grid-template-columns:196px minmax(0,1fr); }
  html body.dashboard-body:not(.admin-body) .sidebar { width:196px; padding-left:9px; padding-right:9px; }
  html body.dashboard-body .dashboard-main { grid-column:2; grid-row:1; width:auto; min-width:0; margin:0; padding-top:0; }
  html body.dashboard-body .dashboard-top { position:sticky; inset:auto; top:0; width:100%; height:74px; min-height:74px; padding:0 18px; flex-wrap:nowrap; box-sizing:border-box; }
  html body.dashboard-body .sidebar-toggle { display:none; }
  /* A narrow mouse/desktop window is still a 1200px desktop canvas. */
  html body.dashboard-body .sidebar { visibility:visible!important; transform:none!important; transition:none!important; }
  html body.dashboard-body .dashboard-layout { grid-template-columns:248px minmax(0,1fr)!important; }
  html body.dashboard-body:not(.admin-body) .dashboard-layout { grid-template-columns:196px minmax(0,1fr)!important; }
  html body.dashboard-body .dashboard-main>.dashboard-top { display:flex!important; align-items:center!important; justify-content:space-between!important; height:74px!important; min-height:74px!important; padding:0 18px!important; gap:12px!important; }
  html body.dashboard-body .dashboard-top-actions { position:static!important; inset:auto!important; display:flex!important; width:auto!important; max-width:none!important; height:auto!important; margin:0 0 0 auto!important; flex-wrap:nowrap!important; gap:7px!important; transform:none!important; }
  html body.dashboard-body .dashboard-breadcrumb { display:grid!important; flex-shrink:0; }
  html body.dashboard-body .dashboard-top:has(.dashboard-market)>.dashboard-breadcrumb { display:none!important; }
  html body.dashboard-body .dashboard-mobile-brand,
  html body.dashboard-body .sidebar-toggle { display:none!important; }
  html body.dashboard-body .dashboard-top-actions>.language-field { display:inline-flex!important; width:auto!important; min-width:0!important; flex:0 0 auto!important; }
  html body.dashboard-body .dashboard-top-actions .site-language-trigger { width:132px!important; min-width:132px!important; }
  html body.dashboard-body .dashboard-top-actions .site-language-current-name { display:inline!important; }
  html body.dashboard-body .dashboard-top-actions .user-menu { display:flex!important; }
  html body.dashboard-body .dashboard-top-actions .user-menu>div { display:block!important; }
  html body.dashboard-body .dashboard-top-actions>:is(.theme-field,.user-menu,.logout-button,.admin-shortcut,.language-field),
  html body.dashboard-body .dashboard-top-actions :is(.theme-toggle,.site-language-trigger) { height:40px!important; min-height:40px!important; max-height:40px!important; }
  html body.dashboard-body .dashboard-top-actions .logout-button { padding:0 14px!important; font-size:10px!important; }
  html body.dashboard-body .dashboard-top-actions>.language-select { width:132px!important; min-width:132px!important; }
  html body.dashboard-body::after { display:none!important; }
  html body.dashboard-body .dashboard-top-actions { flex-wrap:nowrap; min-width:0; gap:7px; }
  html body.dashboard-body :is(.dashboard-content,.admin-content) { min-width:0; padding-left:24px; padding-right:24px; }
  html body.dashboard-body :is(.member-table-wrap,.admin-ai-table-wrap,[data-admin-mobile-table]) { min-width:0; max-width:100%; overflow-x:auto; }
  html body.dashboard-body .admin-mobile-table-hint { display:none; }
  html body.dashboard-body [role=dialog] { min-width:0; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); }
  html body.dashboard-body [role=dialog]>header { position:sticky; top:0; z-index:8; flex-shrink:0; }
  html body.dashboard-body [role=dialog]>header>button { flex-shrink:0; }
  html body:has(>.app) { overflow-x:auto; }
  html body>.app { min-width:1200px; grid-template-columns:minmax(0,1fr); }
  html body>.app .terminal { min-width:0; grid-template-columns:minmax(0,1fr); }
  html body>.app .topbar { min-width:0; flex-wrap:wrap; gap:8px; }
  html body>.app>.accountbar { min-width:0; }
}
@media (hover:hover) and (pointer:fine) and (max-width:1400px) {
  html body.dashboard-body .dashboard-top-actions .user-menu { max-width:120px; }
  html body.dashboard-body .dashboard-top-actions .user-menu small { max-width:88px; }
  html body.dashboard-body .dashboard-top-actions .site-language-trigger { width:132px; }
  html body.dashboard-body .challenge-account-toolbar { grid-template-columns:minmax(0,1fr) auto; }
  html body.dashboard-body .challenge-account-toolbar-actions { grid-column:1/-1; flex-wrap:wrap; justify-content:flex-end; }
}
