.mobile-tools-toggle {display:none}

@media (max-width:860px) {
 html[data-theme] body {
  padding:0!important;
  height:auto!important;
  min-height:100dvh;
  overflow-x:hidden!important;
  overflow-y:auto!important;
 }
 html[data-theme] body .app-layout-wrapper {
  width:100%!important;
  height:auto!important;
  min-height:100dvh;
  padding:8px 10px calc(72px + env(safe-area-inset-bottom))!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  box-sizing:border-box;
  overflow:visible!important;
 }
 html[data-theme] body .app-layout-wrapper>header {
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  height:auto!important;
  min-height:0!important;
  padding:0 0 8px!important;
 }
 .app-layout-wrapper>header>.header-brand {flex:1 1 auto;min-width:0;gap:8px}
 .header-brand .brand-title {font-size:.77rem!important;letter-spacing:.06em!important}
 .header-brand .brand-logo-svg-wrap {width:32px;height:32px;min-width:32px}
 .header-brand #saveIndicator {display:none!important}
 html[data-theme] body header>.mobile-tools-toggle {
  display:block;
  order:-1;
  margin-inline-start:auto!important;
  min-height:44px!important;
 }
 html[data-theme] body header>.header-brand {order:-2}
 html[data-theme] body header:not(.mobile-tools-open)>:not(.header-brand,.mobile-tools-toggle),
 html[data-theme] body header>:is(.screen-mode,:has(>.soft-header-caption)) {display:none!important}
 html[data-theme][data-screen] body header :is(button,select,summary) {font-size:13px!important}

 html[data-theme] body .app-layout-wrapper>.soft-sidebar {
  position:fixed!important;
  inset:auto 0 0!important;
  display:flex!important;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start!important;
  width:100%!important;
  height:auto!important;
  min-height:58px;
  max-height:none!important;
  margin:0!important;
  padding:4px 6px calc(4px + env(safe-area-inset-bottom))!important;
  gap:2px!important;
  box-sizing:border-box;
  border-radius:12px 12px 0 0!important;
  background:var(--card)!important;
  overflow-x:auto;
  z-index:100;
 }
 html[data-theme] body .soft-sidebar>:is(.dashboard-home,[data-view=balance],.soft-sidebar-foot) {display:none!important}
 html[data-theme] body .soft-sidebar>.soft-nav:not([hidden]) {
  flex:1 0 44px!important;
  width:auto!important;
  min-width:44px!important;
  min-height:46px!important;
  max-height:none!important;
  margin:0!important;
  padding:4px 2px!important;
 }
 html[data-theme] body .soft-sidebar>.soft-nav>span {font-size:17px!important}
 html[data-theme] body .soft-sidebar>.soft-nav small {font-size:10px!important;line-height:1.12}
 .soft-sidebar .friends-nav svg {width:18px;height:18px}
 .soft-sidebar>.soft-profile {flex:0 0 40px;justify-content:center;margin:0!important}
 .soft-sidebar>.soft-profile .soft-avatar {width:30px;height:30px}
 html[data-theme]:not(.friends-view) body .soft-sidebar>.soft-nav[data-view][aria-pressed=true] {
  background:var(--accent-soft)!important;
  color:var(--accent)!important;
 }

 html[data-theme] body .kpi-bar {padding:0 0 8px!important}
 html[data-theme]:is(.friends-view,:not([data-mobile-view=overview])) body .kpi-bar {display:none!important}
 html[data-theme] body .soft-intro {display:flex!important;align-items:center;justify-content:space-between;gap:8px;padding:2px 0 8px!important}
 html[data-theme] body .soft-intro h1 {font-size:1.2rem!important}
 html[data-theme] body .dashboard-clock {position:static;transform:none;margin:0!important}
 html[data-theme] body .kpi-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 html[data-theme] body .kpi-card {
  height:auto!important;
  min-height:88px!important;
  max-height:none!important;
  min-width:0!important;
  padding:8px!important;
  overflow:visible;
 }
 .kpi-card .kpi-header {gap:4px;flex-wrap:wrap}
 .kpi-card :is(.kpi-title,.kpi-badge,.kpi-sub) {font-size:.68rem!important}
 .kpi-card .kpi-badge {white-space:nowrap}
 .kpi-card .kpi-value {font-size:1.5rem!important}
 html[data-theme] body .kpi-bar>.rules-note {font-size:.7rem!important;line-height:1.35;max-width:100%}

 html[data-theme] body .cockpit-4col-grid:not([hidden]) {
  display:flex!important;
  flex-direction:column!important;
  flex:1 0 auto!important;
  gap:8px!important;
  padding:0!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
 }
 html[data-theme] body .cockpit-4col-grid[hidden] {display:none!important}
 html[data-theme] body .cockpit-4col-grid :is(.snap-grid,#balancePanel,#col3DraggableContainer) {display:contents!important}
 html[data-theme] body .cockpit-4col-grid :is(#balancePanel>.panel-header,#card-radar,.chat-resize-edge) {display:none!important}
 html[data-theme][data-mobile-view] body .cockpit-4col-grid :is(#daysPanel,.monthly-overview,#card-discord,#activeDayPanel,#card-subtasks-mandatory,#card-subtasks-general,#chatPanel,#card-goals,.progress-window,.added-panel) {display:none!important}
 html[data-theme][data-mobile-view=overview] body .cockpit-4col-grid :is(#card-streak,#card-discipline),
 html[data-theme][data-mobile-view=overview] body .cockpit-4col-grid :is(#daysPanel,.monthly-overview,#card-discord,#card-goals,.added-panel):not(.dashboard-window-hidden),
 html[data-theme][data-mobile-view=tasks] body .cockpit-4col-grid :is(#activeDayPanel,#card-subtasks-mandatory,#card-subtasks-general):not(.dashboard-window-hidden),
 html[data-theme][data-mobile-view=chat] body .cockpit-4col-grid #chatPanel:not(.dashboard-window-hidden) {
  display:flex!important;
  position:relative!important;
  flex:none!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:10px!important;
  box-sizing:border-box;
 }
 html[data-theme][data-mobile-view=overview] body .cockpit-4col-grid .progress-window.dashboard-window-hidden{visibility:hidden}
 html[data-theme] body .cockpit-4col-grid #daysPanel {order:0}
 html[data-theme] body .cockpit-4col-grid .monthly-overview {order:1;min-height:180px!important}
 html[data-theme] body .cockpit-4col-grid #card-discord {order:2}
 html[data-theme] body .cockpit-4col-grid #activeDayPanel {order:0}
 html[data-theme][data-mobile-view=chat] body .cockpit-4col-grid #chatPanel {height:max(350px,calc(100dvh - 132px - env(safe-area-inset-bottom)))!important}
 .cockpit-4col-grid #chatPanel .swaga-messages-container {flex:1;min-height:0;overflow:auto}
 html[data-theme] body .cockpit-4col-grid :is(.panel-header,.swaga-chat-header,.col2-wrapper) {padding:0 0 8px!important}
 html[data-theme] body #activeDayPanel .task-quick-add-bar {display:flex!important;flex-wrap:wrap}
 html[data-theme] body #activeDayPanel #taskInput {flex:1 0 100%;width:100%!important;min-width:0!important}
 html[data-theme][data-screen] body .cockpit-4col-grid :is(input,select,textarea) {font-size:16px!important}
 html[data-theme][data-screen] body .cockpit-4col-grid button {font-size:13px!important}
 html[data-theme] body .cockpit-4col-grid #card-subtasks-mandatory {order:2}
 html[data-theme] body .cockpit-4col-grid #card-subtasks-general {order:3}
 html[data-theme] body .friends-space:not([hidden]) {padding:8px 0!important}
 html[data-theme] body .friends-space .friends-layout {height:auto}
}
html[data-theme] body .cockpit-4col-grid .dashboard-window-hidden.dashboard-window-hidden {display:none!important}
html[data-theme] body dialog.dashboard-windows-dialog{
 width:min(560px,calc(100vw - 24px))!important;box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;
}
.dashboard-windows-dialog h2{margin:0;text-wrap:balance}
.dashboard-windows-description{margin:6px 0 16px;color:var(--text-muted);text-wrap:pretty}
.dashboard-windows-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html[data-theme] body .dashboard-windows-list label{
 display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;
 min-height:44px;box-sizing:border-box;border:1px solid var(--border);border-radius:8px;background:var(--card-2,var(--card));cursor:pointer;
}
html[data-theme] body .dashboard-windows-list input[type=checkbox]{
 appearance:none!important;flex:none;width:30px!important;height:18px!important;min-height:0!important;min-width:0!important;
 margin:0!important;padding:0!important;border:1px solid var(--border)!important;border-radius:6px!important;
 background:var(--bg-base)!important;box-shadow:none!important;cursor:pointer;position:relative;
}
html[data-theme] body .dashboard-windows-list input[type=checkbox]::before{
 content:'';position:absolute;inset-block-start:2px;inset-inline-start:2px;width:12px;height:12px;
 border-radius:3px;background:var(--text-muted);
}
html[data-theme] body .dashboard-windows-list input[type=checkbox]:checked{background:var(--accent-soft)!important;border-color:var(--accent)!important}
html[data-theme] body .dashboard-windows-list input[type=checkbox]:checked::before{inset-inline-start:14px;background:var(--accent)}
.dashboard-windows-list input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.dashboard-windows-footer{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}
.dashboard-windows-footer>button:last-child{margin-inline-start:auto}
.dashboard-music-option{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.dashboard-music-hint{color:var(--text-muted)}
html[data-account-premium] .dashboard-music-hint{display:none}
@media(max-width:500px){.dashboard-windows-list{grid-template-columns:minmax(0,1fr)}}
html[data-theme] body .cockpit-4col-grid .dashboard-window-remove{
 flex:none;display:inline-grid;place-items:center;inline-size:30px;block-size:30px;
 min-height:0!important;padding:0!important;margin-inline-start:6px;line-height:1;
}
.panel-fullscreen-dialog .dashboard-window-remove{display:none!important}
@media(max-width:860px){
 html[data-theme] body .cockpit-4col-grid .dashboard-window-remove{inline-size:36px;block-size:36px}
}
@media(min-width:1501px){
 html.snap-dashboard[data-theme] body .cockpit-4col-grid .snap-grid:not(.premium-dashboard-grid){
  grid-template-columns:var(--dashboard-columns,22fr 32fr 24fr 22fr)!important;
  grid-template-rows:repeat(6,minmax(0,1fr))!important;
 }
}
@media(min-width:1100px){
}

/* Scroll the list rather than resizing the surrounding card. */
#daysList > .day-card { flex-shrink: 0; }
#daysList { padding-block-end: 4px; }
.subtask-title-text { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.subtask-category { display: block; color: var(--text-muted); font-size: .75em; }
.category-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
html[data-theme] body .kpi-card,
html[data-theme] body .kpi-card:hover { animation: none !important; transition: none !important; transform: none !important; }
@media (prefers-reduced-motion: no-preference) {
  dialog[open], .friends-space:not([hidden]), .charts-page:not([hidden]), .custom-space:not([hidden]) {
    animation: swaga-surface-enter 170ms ease-out both;
  }
  @keyframes swaga-surface-enter {
    from { opacity: .65; translate: 0 5px; }
    to { opacity: 1; translate: 0 0; }
  }
}

/* Extend the days viewport to the panel edge. */
html[data-theme][data-scheme] body .cockpit-4col-grid #daysPanel { padding-bottom: 0!important; }
html[data-theme][data-scheme] body #daysPanel > #daysList { padding-bottom: 18px!important; }

/* Shared alignment and entrance treatment. */
html[data-theme] body .cockpit-4col-grid {padding-inline:0!important;box-sizing:border-box;}
html[data-theme] body .friends-list-pane {padding-inline-start:0;}
html[data-theme] body .friend-card {box-sizing:border-box;}
.team-biography {display:grid;grid-template-columns:minmax(140px,32%) minmax(0,1fr);gap:26px;padding-block:12px;}
.team-biography>img {width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:12px;}
.team-bio-facts {display:flex;flex-wrap:wrap;gap:8px;}
.team-bio-facts>span {padding:5px 10px;border:1px solid var(--border);border-radius:8px;}
.team-bio-description {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;}
.team-dialog form label {display:grid;gap:6px;}
.team-dialog form input,.team-dialog form textarea {width:100%;box-sizing:border-box;}
@media(max-width:600px){.team-biography{grid-template-columns:1fr}.team-biography>img{max-width:220px}}
@media(prefers-reduced-motion:no-preference){
 dialog[open],.team-section,.admin-workspace-content,.profile-dialog[open],.cockpit-4col-grid:not([hidden]) {animation:swaga-surface-enter 200ms cubic-bezier(.2,.7,.2,1) both;}
}

/* Team biographies share the creator composition and theme tokens. */
.team-biography-dialog .creator-top{margin-bottom:22px}
.team-biography-dialog .creator-copy{min-width:0}
.team-biography-dialog .team-bio-description{white-space:pre-wrap;text-wrap:pretty}
.team-biography-dialog .creator-portrait>span{color:#fff}
