/* ============================================================
   Cockpit mobile companion — bottom nav, FAB, Shared-first UX
   Author: Dave Greenlaw
   Active when body.cockpit-mobile-active (≤720px). Desktop unchanged.
============================================================ */

/* Desktop guard — shell nodes are injected in DOM but must stay inert above 720px */
.cockpit-mobile-nav,
.cockpit-mobile-fab,
.cockpit-mobile-capture-sheet,
.cockpit-mobile-more-sheet,
.cockpit-mobile-mode-help-sheet,
.cockpit-mobile-backdrop,
.cockpit-mobile-capture-toast,
.cockpit-mobile-viewer-bar,
.cockpit-mobile-journal-bar {
  display: none !important;
}

@media (max-width: 720px) {
  body.cockpit-mobile-active {
    --bb-chrome-top: 72px;
    --cockpit-mobile-nav-h: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* Compact site header */
  body.cockpit-mobile-active .index-header {
    flex-wrap: nowrap;
    align-items: center;
    padding: 6px 10px;
  }

  body.cockpit-mobile-active .index-header__nav,
  body.cockpit-mobile-active .index-header__nav-sep {
    display: none !important;
  }

  body.cockpit-mobile-active .index-header__brand .logo {
    height: 32px;
  }

  body.cockpit-mobile-active .index-footer {
    display: none;
  }

  /* Mode bar → slim look-controls strip only */
  body.cockpit-mobile-active #modeBar {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px 10px 6px;
    min-height: 0;
  }

  body.cockpit-mobile-active #modeBar .mode-btn,
  body.cockpit-mobile-active #modeBar .mode-bar-alpha-sticker,
  body.cockpit-mobile-active #modeBar .bb-inspect-toggle,
  body.cockpit-mobile-active #modeBar .mode-bar-spacer {
    display: none !important;
  }

  body.cockpit-mobile-active #modeBar .sticky-controls {
    display: none !important;
  }

  body.cockpit-mobile-active #modeBar .mode-bar-middle {
    margin-left: auto;
  }

  /* Room for bottom nav + FAB */
  body.cockpit-mobile-active .mode-root:not(.hidden) {
    padding-bottom: var(--cockpit-mobile-nav-h);
    box-sizing: border-box;
  }

  /* --- Bottom navigation --- */
  .cockpit-mobile-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100080;
    margin: 0;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border, #cbd5e1);
    background: var(--surface, #fff);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    list-style: none;
  }

  body.cockpit-mobile-active .cockpit-mobile-nav {
    display: grid !important;
  }

  .cockpit-mobile-nav__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted, #64748b);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
  }

  .cockpit-mobile-nav__btn-icon {
    font-size: 18px;
    line-height: 1;
  }

  .cockpit-mobile-nav__btn.active,
  .cockpit-mobile-nav__btn[aria-current="page"] {
    color: var(--accent, #2a4d8f);
    background: color-mix(in srgb, var(--accent, #2a4d8f) 10%, transparent);
  }

  .cockpit-mobile-nav__btn:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 1px;
  }

  /* --- FAB + capture sheet --- */
  .cockpit-mobile-fab {
    display: none;
    position: fixed;
    right: 14px;
    bottom: calc(var(--cockpit-mobile-nav-h, 56px) + 10px);
    z-index: 100090;
  }

  body.cockpit-mobile-active .cockpit-mobile-fab {
    display: block !important;
  }

  .cockpit-mobile-fab__toggle {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--accent, #2a4d8f);
    color: #fff;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
  }

  .cockpit-mobile-fab__toggle[aria-expanded="true"] {
    transform: rotate(45deg);
  }

  .cockpit-mobile-fab__toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent, #2a4d8f) 55%, #fff);
    outline-offset: 2px;
  }

  body.cockpit-mobile-active .cockpit-mobile-capture-sheet,
  body.cockpit-mobile-active .cockpit-mobile-more-sheet,
  body.cockpit-mobile-active .cockpit-mobile-mode-help-sheet {
    display: block !important;
  }

  .cockpit-mobile-capture-sheet,
  .cockpit-mobile-more-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100085;
    margin: 0;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid var(--border, #cbd5e1);
    border-radius: 16px 16px 0 0;
    background: var(--surface, #fff);
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.14);
    transform: translateY(110%);
    transition: transform 0.22s ease;
    pointer-events: none;
  }

  .cockpit-mobile-capture-sheet.is-open,
  .cockpit-mobile-more-sheet.is-open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .cockpit-mobile-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 10px;
  }

  .cockpit-mobile-sheet__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text, #0f172a);
  }

  .cockpit-mobile-sheet__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cockpit-mobile-sheet__actions .pill-btn {
    min-height: 44px;
    justify-content: center;
    width: 100%;
  }

  .cockpit-mobile-sheet__actions--single {
    grid-template-columns: 1fr;
  }

  .cockpit-mobile-sheet__actions--stack {
    grid-template-columns: 1fr;
  }

  .cockpit-mobile-sheet__section {
    margin: 0 0 12px;
  }

  .cockpit-mobile-sheet__section:last-of-type {
    margin-bottom: 0;
  }

  .cockpit-mobile-sheet__section-title {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
  }

  .cockpit-mobile-sheet__head--sub {
    margin-bottom: 8px;
  }

  .cockpit-mobile-sheet__back {
    flex-shrink: 0;
  }

  .cockpit-mobile-sheet__head--sub {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .cockpit-mobile-post-picker.hidden {
    display: none;
  }

  #cockpitMobileCaptureMain.hidden {
    display: none;
  }

  body.cockpit-mobile-active .cockpit-mobile-capture-toast {
    display: block !important;
  }

  .cockpit-mobile-capture-toast {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--cockpit-mobile-nav-h, 56px) + 72px);
    z-index: 100095;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .cockpit-mobile-capture-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Capture modals — full-width companion sheets (above calendar stack) */
  body.cockpit-mobile-active #tasksModal.modal:not(.hidden),
  body.cockpit-mobile-active #stickyModal.modal:not(.hidden) {
    align-items: flex-end;
    padding: 0;
    z-index: 100165;
  }

  body.cockpit-mobile-active #tasksModal .modal-content,
  body.cockpit-mobile-active #stickyModal .modal-content {
    width: 100%;
    max-width: none;
    max-height: min(92vh, 720px);
    margin: 0;
    border-radius: 16px 16px 0 0;
  }

  /* Journal — full-width companion sheet with list → detail */
  body.cockpit-mobile-active #journalWindow.journal-window:not(.hidden) {
    position: fixed;
    inset: auto 0 calc(var(--cockpit-mobile-nav-h, 56px) + 8px) 0;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: min(92vh, 720px) !important;
    max-height: min(92vh, 720px);
    min-height: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
    resize: none;
    z-index: 100165;
  }

  body.cockpit-mobile-active #journalWindow .floating-window-header {
    flex-shrink: 0;
    padding: 10px 12px;
    cursor: default;
  }

  body.cockpit-mobile-active #journalWindow .journal-window-subtitle,
  body.cockpit-mobile-active #journalWindow [data-note-pane-maximize] {
    display: none;
  }

  body.cockpit-mobile-active #journalWindow .journal-window-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  body.cockpit-mobile-active #journalWindow .journal-date-bar {
    flex-shrink: 0;
    margin: 8px 10px 0;
    padding: 8px 10px;
    gap: 8px;
  }

  body.cockpit-mobile-active #journalWindow .journal-layout {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 8px 10px 10px;
  }

  /* Default to notes list until detail class is applied */
  body.cockpit-mobile-active #journalWindow.journal-window:not(.hidden) .journal-editor-pane {
    display: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-journal-list #journalWindow .journal-sidebar {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
  }

  body.cockpit-mobile-active.cockpit-mobile-journal-list #journalWindow .journal-editor-pane {
    display: none !important;
  }

  body.cockpit-mobile-active.cockpit-mobile-journal-detail #journalWindow .journal-sidebar {
    display: none !important;
  }

  body.cockpit-mobile-active.cockpit-mobile-journal-detail #journalWindow .journal-editor-pane {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
  }

  body.cockpit-mobile-active.cockpit-mobile-journal-detail #journalWindow #journalNoteBodyWrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  body.cockpit-mobile-active #journalWindow .journal-note-toolbar {
    flex-shrink: 0;
    gap: 6px;
  }

  body.cockpit-mobile-active #journalWindow .journal-format-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }

  body.cockpit-mobile-active #journalWindow #journalNoteTitle {
    width: 100%;
    min-width: 0;
  }

  body.cockpit-mobile-active #journalWindow .note-toolbar-editor-actions {
    flex-wrap: wrap;
  }

  body.cockpit-mobile-active #journalWindow .cockpit-mobile-journal-bar {
    margin: 8px 8px 0;
    padding: 0;
  }

  /* Calendar — full-width companion sheet (desktop floating window min-width is 520px) */
  body.cockpit-mobile-active #calendarWindow.calendar-window:not(.hidden) {
    position: fixed;
    inset: auto 0 calc(var(--cockpit-mobile-nav-h, 56px) + 8px) 0;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: min(92vh, 720px) !important;
    max-height: min(92vh, 720px);
    min-height: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
    resize: none;
    z-index: 100150;
  }

  body.cockpit-mobile-active #calendarWindow .floating-window-header {
    flex-wrap: wrap;
    cursor: default;
    padding: 8px 10px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-window-body {
    max-height: calc(min(92vh, 720px) - 52px);
    overflow: hidden;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-content-layer {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding: 0;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-month-view,
  body.cockpit-mobile-active #calendarWindow .calendar-day-view {
    padding: 8px 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-controls {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-selectors select {
    min-height: 40px;
    font-size: 16px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-grid-inner {
    grid-auto-rows: minmax(40px, 1fr);
    gap: 4px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-day {
    font-size: 12px;
    padding: 4px 2px;
    min-height: 40px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-dow-label {
    font-size: 10px;
  }

  body.cockpit-mobile-active #calendarWindow .calendar-day-canvas {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cockpit-mobile-sheet__hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted, #64748b);
  }

  .cockpit-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100082;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
  }

  body.cockpit-mobile-active .cockpit-mobile-backdrop.is-open {
    display: block !important;
  }

  /* --- Shared / Group (C2) --- */
  body.cockpit-mobile-active #sharedRoot .cockpit-shared-lead,
  body.cockpit-mobile-active #sharedRoot .pf-lens-hint {
    display: none;
  }

  body.cockpit-mobile-active #sharedRoot .cockpit-shared-header {
    padding: 8px 10px 4px;
  }

  body.cockpit-mobile-active #sharedRoot .cockpit-shared-title {
    font-size: 1.15rem;
    margin: 0;
  }

  body.cockpit-mobile-active #sharedRoot .cockpit-shared-toolbar {
    gap: 8px;
  }

  body.cockpit-mobile-active #sharedRoot .cockpit-shared-toolbar .public-forums-topics-field--view,
  body.cockpit-mobile-active #sharedRoot .cockpit-shared-toolbar .public-forums-topics-field:nth-child(2),
  body.cockpit-mobile-active #sharedRoot .cockpit-shared-toolbar .public-forums-topics-field:nth-child(3) {
    display: none;
  }

  body.cockpit-mobile-active #sharedRoot .pf-view-switch {
    flex-wrap: wrap;
  }

  body.cockpit-mobile-active #sharedRoot .pf-view-switch__btn {
    min-height: 36px;
  }

  body.cockpit-mobile-active #sharedRoot .public-forums-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.cockpit-mobile-active #groupRoot .archive-layout,
  body.cockpit-mobile-active.cockpit-mobile-view-archive #archiveRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-research #researchRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-photoalbum #photoAlbumRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-group #groupRoot .archive-app {
    flex-direction: column;
  }

  /* C2 fallback when viewer classes not active */
  body.cockpit-mobile-active:not(.cockpit-mobile-view-detail):not(.cockpit-mobile-view-list) #groupRoot .archive-sidebar {
    max-height: 38vh;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  /* --- C4: list ↔ detail viewer (Archive, Research, Photos, Group) --- */
  body.cockpit-mobile-active.cockpit-mobile-view-list #archiveRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-list #researchRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-list #photoAlbumRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-list #groupRoot .archive-main {
    display: none !important;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-list #archiveRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-list #researchRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-list #photoAlbumRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-list #groupRoot .archive-sidebar {
    display: flex !important;
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    width: 100%;
    max-width: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .archive-sidebar,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .archive-sidebar {
    display: none !important;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .archive-main,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .archive-main {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .archive-app,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .archive-app {
    min-height: calc(100dvh - var(--bb-chrome-top, 72px) - var(--cockpit-mobile-nav-h, 56px));
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .main-content,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .main-content,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .main-content,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .main-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .detail-panel,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .detail-panel,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .detail-panel,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .detail-panel {
    display: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .archive-narrative,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .group-mode-hint,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .group-mode-hint,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #groupRoot .group-mode-hint {
    display: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .archive-main-header .main-actions,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .photo-album-main-header__actions {
    display: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-list #archiveRoot .archive-narrative,
  body.cockpit-mobile-active.cockpit-mobile-view-list #groupRoot .group-mode-hint {
    display: none;
  }

  .cockpit-mobile-mode-help__body {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text, #0f172a);
  }

  @media (prefers-reduced-motion: reduce) {
    .cockpit-mobile-capture-sheet,
    .cockpit-mobile-more-sheet,
    .cockpit-mobile-capture-toast,
    .cockpit-mobile-fab__toggle {
      transition: none;
    }
  }

  body.cockpit-mobile-active .cockpit-mobile-viewer-bar:not([hidden]),
  body.cockpit-mobile-active .cockpit-mobile-journal-bar:not([hidden]) {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0 2px;
    flex-shrink: 0;
  }

  .cockpit-mobile-viewer-bar[hidden],
  .cockpit-mobile-journal-bar[hidden] {
    display: none !important;
  }

  .cockpit-mobile-viewer-bar__back {
    flex-shrink: 0;
  }

  .cockpit-mobile-viewer-bar__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--text, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot .note-editor-container,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot .note-editor-container {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #archiveRoot #noteBodyWrapper,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #researchRoot #researchNoteBodyWrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .photo-album-editor,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .photo-album-gallery-shell,
  body.cockpit-mobile-active.cockpit-mobile-view-detail #photoAlbumRoot .photo-album-node-shell {
    min-height: 0;
  }

  /* --- C4: Dashboard lite (Today) --- */
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-tagline,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot #dash-achievements,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot [data-dash-section="archive"],
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot [data-dash-section="group"],
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot [data-dash-section="research"],
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot [data-dash-section="privateforums"],
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dash-section-drag,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dash-section-minimize,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dash-card-size,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot #btnDashSetWallpaper,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot #btnDashRemoveWallpaper,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot #dashMinimizedTray,
  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-expand-panel {
    display: none !important;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-heading {
    font-size: 0;
    line-height: 1.2;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-heading::after {
    content: "Today";
    font-size: 1.35rem;
    font-weight: 800;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-sections-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(180px, auto);
    gap: 10px;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-section-visual {
    display: none;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-section {
    flex-direction: column;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-section-shell {
    padding: 12px 14px 14px;
    border-radius: 14px;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-top {
    padding-bottom: 4px;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-date-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  body.cockpit-mobile-active.cockpit-mobile-view-dashboard #dashboardRoot .dashboard-top-actions {
    flex-wrap: wrap;
  }

  /* Welcome modal */
  .cockpit-mobile-welcome-card {
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
  }

  body.cockpit-mobile-active #cockpitMobileWelcomeModal.modal {
    align-items: flex-end;
    padding: 0;
  }

  body.cockpit-mobile-active #cockpitMobileWelcomeModal .modal-content {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
  }
}

html[data-a11y-view="comfort"] .cockpit-mobile-nav__btn,
html[data-a11y-view="comfort"] .cockpit-mobile-sheet__actions .pill-btn,
html[data-a11y-view="comfort"] .cockpit-mobile-fab__toggle {
  min-height: 48px;
}

html[data-a11y-view="contrast"] .cockpit-mobile-nav,
html[data-a11y-view="contrast"] .cockpit-mobile-capture-sheet,
html[data-a11y-view="contrast"] .cockpit-mobile-more-sheet {
  border-width: 2px;
}
