/* Central Orbit v5.50.31 — Mobile v1 full responsive rebuild
   One data/function system across desktop + mobile. This layer only changes
   composition, touch ergonomics and density below 820px. */

@media (max-width: 820px) {
  :root {
    --co-mobile-gap: 10px;
    --co-mobile-radius: 16px;
    --co-mobile-pad: 12px;
    --co-mobile-hit: 44px;
  }

  html { -webkit-text-size-adjust: 100%; }
  body { overscroll-behavior-y: none; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

  /* ---------- Outer production shell / dashboard ---------- */
  body:not(.co-module-runtime) #app { padding-top: 64px !important; padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  body .mobile-vnext-header { height: 64px !important; padding: 0 10px !important; }
  body .mobile-brand img { width: 48px !important; height: 32px !important; }
  body .mobile-brand span { font-size: 19px !important; }
  body .mobile-icon-button, body .mobile-avatar-button { width: 38px !important; height: 38px !important; border-radius: 11px !important; }
  body .mobile-avatar { width: 29px !important; height: 29px !important; }
  body .mobile-bottom-nav { height: calc(68px + env(safe-area-inset-bottom)) !important; }
  body.co-index-module-mode .index-module-surface { top: 64px !important; bottom: calc(68px + env(safe-area-inset-bottom)) !important; }
  body .mobile-bottom-nav small { font-size: 10px !important; font-weight: 720 !important; }
  body .mobile-all-sheet { max-height: min(82dvh, 760px) !important; }
  body .mobile-all-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body .mobile-all-grid a { min-height: 70px !important; }
  body .mobile-all-grid span { font-size: 9px !important; }

  body:not(.co-index-module-mode) > #app > .shell-wrap {
    padding: 8px !important;
    gap: 8px !important;
  }
  body:not(.co-index-module-mode) .top-grid,
  body:not(.co-index-module-mode) .row-grid,
  body:not(.co-index-module-mode) .row-two,
  body:not(.co-index-module-mode) .row-three,
  body:not(.co-index-module-mode) .bottom-grid {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  body:not(.co-index-module-mode) .card {
    border-radius: 16px !important;
  }
  body:not(.co-index-module-mode) .card-head {
    min-height: 42px !important;
    padding: 10px 12px 7px !important;
  }
  body:not(.co-index-module-mode) .head-title span { font-size: 14px !important; }
  body:not(.co-index-module-mode) .head-meta { font-size: 10px !important; }
  body:not(.co-index-module-mode) .hero-card { min-height: 178px !important; }
  body:not(.co-index-module-mode) .hero-content { padding: 16px !important; }
  body:not(.co-index-module-mode) .hero-greeting { font-size: 18px !important; }
  body:not(.co-index-module-mode) .hero-time { font-size: 39px !important; }
  body:not(.co-index-module-mode) .hero-subline,
  body:not(.co-index-module-mode) .hero-date { font-size: 11px !important; }

  /* Dashboard cards should feel like mobile cards, not stacked desktop panes. */
  body:not(.co-index-module-mode) .weather-card-prominent,
  body:not(.co-index-module-mode) .home-card,
  body:not(.co-index-module-mode) .music-card,
  body:not(.co-index-module-mode) .now-card,
  body:not(.co-index-module-mode) .calendar-card,
  body:not(.co-index-module-mode) .notes-card,
  body:not(.co-index-module-mode) .shopping-card,
  body:not(.co-index-module-mode) .tasks-card,
  body:not(.co-index-module-mode) .routines-card,
  body:not(.co-index-module-mode) .fitness-card,
  body:not(.co-index-module-mode) .therapy-card,
  body:not(.co-index-module-mode) .news-card,
  body:not(.co-index-module-mode) .system-card,
  body:not(.co-index-module-mode) .ai-card {
    min-height: 0 !important;
    height: auto !important;
  }
  body:not(.co-index-module-mode) .fitness-main {
    grid-template-columns: 84px minmax(0,1fr) !important;
    gap: 9px !important;
    padding: 9px 10px !important;
  }
  body:not(.co-index-module-mode) .fitness-ring { width: 78px !important; height: 78px !important; }
  body:not(.co-index-module-mode) .fitness-metrics { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  body:not(.co-index-module-mode) .fitness-metric { min-height: 76px !important; padding: 7px !important; }
  body:not(.co-index-module-mode) .fitness-metric strong { font-size: 14px !important; }
  body:not(.co-index-module-mode) .fitness-footer { grid-template-columns: 1fr 1fr 1fr !important; }
  body:not(.co-index-module-mode) .training-next { grid-column: 1/-1 !important; min-height: 44px !important; }

  body:not(.co-index-module-mode) .therapy-dashboard-main-v5527 {
    grid-template-columns: 82px minmax(0,1fr) !important;
    gap: 9px !important;
    padding: 8px 10px !important;
  }
  body:not(.co-index-module-mode) .therapy-dashboard-ring-v5527 { width: 76px !important; height: 76px !important; }
  body:not(.co-index-module-mode) .therapy-dashboard-kpis-v5527 { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  body:not(.co-index-module-mode) .therapy-dashboard-kpi-v5527 { min-height: 48px !important; padding: 6px 8px !important; }
  body:not(.co-index-module-mode) .therapy-dashboard-footer-v5527 { grid-template-columns: 34px minmax(0,1fr) !important; gap: 8px !important; }
  body:not(.co-index-module-mode) .therapy-dashboard-next-extra-v5527 { grid-column: 2 !important; text-align: left !important; }

  /* ---------- Real module runtime ---------- */
  html body.co-module-runtime {
    font-size: 15px !important;
    line-height: 1.42 !important;
    overflow-x: hidden !important;
    background: #021117 !important;
  }
  html body.co-module-runtime #app,
  html body.co-module-runtime .main,
  html body.co-module-runtime .content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  html body.co-module-runtime .content {
    padding: 9px 9px 24px !important;
    overflow-x: hidden !important;
  }
  html body.co-module-runtime .grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: var(--co-mobile-gap) !important;
  }
  html body.co-module-runtime .card,
  html body.co-module-runtime .fitness-section,
  html body.co-module-runtime .relationship-card {
    min-width: 0 !important;
    border-radius: var(--co-mobile-radius) !important;
  }
  html body.co-module-runtime .card { padding: 13px !important; }
  html body.co-module-runtime .card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
  }
  html body.co-module-runtime .card-header h2,
  html body.co-module-runtime .card-header h3 { line-height: 1.14 !important; }
  html body.co-module-runtime .button-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
  }
  html body.co-module-runtime .button-row > button,
  html body.co-module-runtime .button-row > a { min-height: 42px !important; }
  html body.co-module-runtime .primary-button,
  html body.co-module-runtime .secondary-button,
  html body.co-module-runtime .ghost-button,
  html body.co-module-runtime .danger-button {
    min-height: 42px !important;
    border-radius: 11px !important;
  }
  html body.co-module-runtime input:not([type="checkbox"]):not([type="radio"]),
  html body.co-module-runtime select,
  html body.co-module-runtime textarea {
    min-height: 44px !important;
    font-size: 16px !important; /* prevents iOS zoom */
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html body.co-module-runtime textarea { min-height: 90px !important; }
  html body.co-module-runtime img, html body.co-module-runtime svg { max-width: 100%; }
  html body.co-module-runtime [class*="table"],
  html body.co-module-runtime [class*="timeline-scroll"],
  html body.co-module-runtime [class*="strip"] { scrollbar-width: thin; }

  /* ---------- Fitness & Therapie ---------- */
  html body.co-module-runtime #fitnessControlCenterV2 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-workspace-v4,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-vnext-workspace,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-workspace,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-workspace-content-v4 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 9px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero.fitness-cc-hero-reference {
    min-height: 0 !important;
    height: auto !important;
    padding: 66px 12px 12px !important;
    border-radius: 16px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero.fitness-cc-hero-reference::after {
    background: linear-gradient(180deg,rgba(2,14,18,.28),rgba(2,14,18,.56) 42%,rgba(2,14,18,.92) 100%) !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-media {
    object-position: 52% center !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-tabs {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    overflow: hidden !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-tabs-v2 {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 5px !important;
    padding: 5px !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    scroll-snap-type: x proximity !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-tabs-v2::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-tab-v2 {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    scroll-snap-align: start !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-tab-v2 strong { font-size: 11px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-copy {
    width: 100% !important;
    max-width: none !important;
    padding: 108px 2px 0 !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-copy .dashboard-section-label { font-size: 9px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-copy h2 {
    font-size: clamp(31px,10vw,39px) !important;
    margin: 7px 0 8px !important;
    line-height: .98 !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-copy p {
    font-size: 12.5px !important;
    line-height: 1.42 !important;
    max-width: 96% !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpis {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: none !important;
    gap: 6px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi {
    grid-template-columns: 31px minmax(0,1fr) auto !important;
    min-height: 64px !important;
    padding: 8px !important;
    border-radius: 12px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi .fitness-cc-hero-header-icon {
    width: 31px !important;
    height: 31px !important;
    border-radius: 9px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi .fitness-cc-hero-header-copy small { font-size: 8px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi .fitness-cc-hero-header-copy strong { font-size: 13px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi .fitness-cc-hero-header-copy em { font-size: 8px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-badge { min-width: 32px !important; min-height: 21px !important; font-size: 8px !important; padding: 0 5px !important; }

  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-overview-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-reference-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-layout,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-dashboard-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-dashboard-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-content-grid-v5521,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-insight-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-insight-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-insight-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-insight-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-insight-grid-v5519 {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 9px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-layout .fitness-cc-card,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-dashboard-grid > .fitness-cc-card,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-content-grid-v5521 .fitness-cc-card {
    padding: 12px !important;
    border-radius: 15px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card > header {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card > header strong { font-size: 15px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card > header small { font-size: 10px !important; line-height: 1.3 !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card-actions {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-card-actions > * { width: 100% !important; min-height: 42px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-feature-card,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-training-reference {
    grid-template-columns: 1fr !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-feature-visual,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-training-reference img {
    width: 100% !important;
    height: 148px !important;
    min-height: 148px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-exercise-strip,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-timeline-scroll,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-progress-chart,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-week-chart,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-trend-bars,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-week-timeline-v5519 {
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-training-exercise-strip { grid-auto-columns: minmax(150px,72vw) !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-today-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-today-cards,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-overview-metrics,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-overview-metrics-v2,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-stats-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-important-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-measure-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-latest-values,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-tools-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-stats-v5519,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-metrics,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-metrics-detailed {
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-weight-card,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-composition-card,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-activity-card,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-today-card,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-water-card {
    min-width: 0 !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-weight-summary,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-weight-tools,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-composition-body,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-activity-main,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-today-body,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-water-main,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-nutrition-body,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-therapy-main {
    grid-template-columns: 1fr !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-grid-v5519 { grid-template-columns: 1fr !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-card-v5519 { padding: 11px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-card-top,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-actions-v5519 { flex-wrap: wrap !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-progress-v5519,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-rotation-v5521,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-history-v5519,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-stock-v5519 {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-rotation-visual-v5521 { grid-template-columns: 1fr !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-figure-panel-professional-v5521.therapy-figure-panel-professional-v5522 {
    width: min(100%, 360px) !important;
    margin: 0 auto !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-history-list-v5519 article,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-stock-list-v5519 article { min-width: 0 !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-form-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-vital-form,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-vital-form-compact,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-profile-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-form-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-ai-fields {
    grid-template-columns: 1fr !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-modal-backdrop {
    padding: 0 !important;
    align-items: end !important;
  }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-modal,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-editor,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-log-editor {
    width: 100% !important;
    max-width: none !important;
    max-height: 94dvh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  /* ---------- Relationship ---------- */
  html body.co-module-runtime .relationship-hub {
    gap: 9px !important;
    padding: 0 0 16px !important;
  }
  html body.co-module-runtime .relationship-hero {
    min-height: 0 !important;
    height: auto !important;
    padding: 58px 12px 12px !important;
    display: grid !important;
    gap: 10px !important;
    border-radius: 16px !important;
  }
  html body.co-module-runtime .relationship-tabs {
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    top: 8px !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }
  html body.co-module-runtime .relationship-tabs::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .relationship-tabs button { flex: 0 0 auto !important; min-height: 38px !important; font-size: 10px !important; padding: 0 11px !important; }
  html body.co-module-runtime .relationship-hero-art {
    position: absolute !important;
    inset: 48px 0 auto 0 !important;
    height: 210px !important;
    opacity: .72 !important;
  }
  html body.co-module-runtime .relationship-hero-art img { object-position: 58% 50% !important; }
  html body.co-module-runtime .relationship-hero:before {
    background: linear-gradient(180deg,rgba(2,14,20,.18) 0%,rgba(2,14,20,.48) 35%,rgba(2,14,20,.96) 64%,rgba(2,14,20,.99) 100%) !important;
  }
  html body.co-module-runtime .relationship-hero-copy {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    padding-top: 164px !important;
  }
  html body.co-module-runtime .relationship-hero-copy>span { font-size: 9px !important; }
  html body.co-module-runtime .relationship-hero-copy h1 { font-size: 36px !important; margin: 6px 0 7px !important; }
  html body.co-module-runtime .relationship-hero-copy p { font-size: 12px !important; line-height: 1.45 !important; }
  html body.co-module-runtime .relationship-private-badge { font-size: 9px !important; }
  html body.co-module-runtime .relationship-hero-kpis {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  html body.co-module-runtime .relationship-hero-kpis article {
    grid-template-columns: 28px minmax(0,1fr) !important;
    min-height: 62px !important;
    padding: 8px !important;
  }
  html body.co-module-runtime .relationship-hero-kpis article>span { display: grid !important; width: 28px !important; height: 28px !important; }
  html body.co-module-runtime .relationship-hero-kpis small { font-size: 7px !important; }
  html body.co-module-runtime .relationship-hero-kpis strong { font-size: 13px !important; }
  html body.co-module-runtime .relationship-hero-kpis em { font-size: 8px !important; }
  html body.co-module-runtime .relationship-grid-top,
  html body.co-module-runtime .relationship-grid-mid,
  html body.co-module-runtime .relationship-insight-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .relationship-card { padding: 12px !important; }
  html body.co-module-runtime .relationship-card>header { flex-wrap: wrap !important; align-items: center !important; margin-bottom: 10px !important; }
  html body.co-module-runtime .relationship-card header strong { font-size: 15px !important; }
  html body.co-module-runtime .relationship-card header small { font-size: 10px !important; }
  html body.co-module-runtime .relationship-card>header button { min-height: 38px !important; font-size: 10px !important; }
  html body.co-module-runtime .relationship-calendar { min-height: 0 !important; }
  html body.co-module-runtime .relationship-calendar-day { height: 38px !important; font-size: 10px !important; }
  html body.co-module-runtime .relationship-calendar-weekdays span { font-size: 8px !important; }
  html body.co-module-runtime .relationship-gift-list article { grid-template-columns: 32px minmax(0,1fr) auto 24px !important; }
  html body.co-module-runtime .relationship-gift-list article > .relationship-chip { grid-column: 2 / 4 !important; justify-self: start !important; }
  html body.co-module-runtime .relationship-conflict-table { overflow: visible !important; }
  html body.co-module-runtime .relationship-conflict-table .head { display: none !important; }
  html body.co-module-runtime .relationship-conflict-table .row {
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 78px minmax(0,1fr) auto !important;
    gap: 5px 8px !important;
    align-items: start !important;
    padding: 10px !important;
    border: 1px solid rgba(83,157,164,.10) !important;
    border-radius: 11px !important;
    margin-bottom: 6px !important;
  }
  html body.co-module-runtime .relationship-conflict-table .row > span:nth-of-type(1) { grid-column: 1 !important; grid-row: 1 !important; }
  html body.co-module-runtime .relationship-conflict-table .row > .relationship-conflict-topic { grid-column: 2 / 4 !important; grid-row: 1 !important; }
  html body.co-module-runtime .relationship-conflict-table .row > span:nth-of-type(2) { grid-column: 1 !important; grid-row: 2 !important; }
  html body.co-module-runtime .relationship-conflict-table .row > span:nth-of-type(3) { grid-column: 2 !important; grid-row: 2 !important; }
  html body.co-module-runtime .relationship-conflict-table .row > .relationship-chip { grid-column: 3 !important; grid-row: 2 !important; }
  html body.co-module-runtime .relationship-modal-backdrop {
    padding: 0 !important;
    align-items: end !important;
  }
  html body.co-module-runtime .relationship-modal {
    width: 100% !important;
    max-width: none !important;
    max-height: 94dvh !important;
    border-radius: 20px 20px 0 0 !important;
  }
  html body.co-module-runtime .relationship-form-grid { grid-template-columns: 1fr !important; }

  /* ---------- Weather ---------- */
  html body.co-module-runtime .weather-hub-shell { gap: 10px !important; }
  html body.co-module-runtime .weather-hub-topline {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 3px 2px !important;
  }
  html body.co-module-runtime .weather-hub-topline h2 { font-size: 28px !important; margin: 4px 0 !important; }
  html body.co-module-runtime .weather-hub-topline p { font-size: 12px !important; }
  html body.co-module-runtime .weather-hub-actions { justify-content: stretch !important; width: 100% !important; }
  html body.co-module-runtime .weather-hub-actions > * { flex: 1 1 0 !important; }
  html body.co-module-runtime .weather-hub-hero-grid,
  html body.co-module-runtime .weather-hub-lower-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .weather-current-panel { grid-template-columns: 64px minmax(0,1fr) !important; gap: 10px !important; padding: 14px !important; }
  html body.co-module-runtime .weather-current-icon { font-size: 48px !important; }
  html body.co-module-runtime .weather-current-copy strong { font-size: 38px !important; }
  html body.co-module-runtime .weather-current-metrics { grid-column: 1/-1 !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  html body.co-module-runtime .weather-hub-days,
  html body.co-module-runtime .weather-hour-strip {
    display: flex !important;
    overflow-x: auto !important;
    gap: 7px !important;
    scroll-snap-type: x proximity !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }
  html body.co-module-runtime .weather-hub-days::-webkit-scrollbar,
  html body.co-module-runtime .weather-hour-strip::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .weather-hub-day { flex: 0 0 112px !important; scroll-snap-align: start !important; }
  html body.co-module-runtime .weather-hour { flex: 0 0 96px !important; scroll-snap-align: start !important; }
  html body.co-module-runtime .weather-hub-section { padding: 12px !important; border-radius: 15px !important; }
  html body.co-module-runtime .weather-hub-section>header { flex-wrap: wrap !important; gap: 6px !important; }
  html body.co-module-runtime .weather-radar-frame { min-height: 260px !important; height: 42vh !important; }
  html body.co-module-runtime .weather-detail-stack { grid-template-columns: 1fr 1fr !important; }

  /* ---------- Smart Home ---------- */
  html body.co-module-runtime .home-shell.home-v2 { gap: 9px !important; }
  html body.co-module-runtime .home-v2-hero {
    min-height: 0 !important;
    padding: 14px !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  html body.co-module-runtime .home-v2-title h1,
  html body.co-module-runtime .home-v2-title h2 { font-size: 28px !important; }
  html body.co-module-runtime .home-v2-actions { justify-content: flex-start !important; flex-wrap: wrap !important; }
  html body.co-module-runtime .home-v2-ambient { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  html body.co-module-runtime .home-v2-favorites .home-favorites-grid,
  html body.co-module-runtime .home-direct-quick .home-favorites-grid { grid-template-columns: 1fr 1fr !important; gap: 7px !important; padding: 0 8px 8px !important; }
  html body.co-module-runtime .home-area-grid.home-v2-area-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .home-v2-area { min-width: 0 !important; }
  html body.co-module-runtime .home-device-grid,
  html body.co-module-runtime .home-card-grid { grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .home-edit-toolbar { grid-template-columns: 1fr !important; gap: 8px !important; }
  html body.co-module-runtime .home-scope-tabs { overflow-x: auto !important; flex-wrap: nowrap !important; }
  html body.co-module-runtime .home-edit-toolbar-actions { justify-content: flex-start !important; }
  html body.co-module-runtime .home-modal { padding: 0 !important; align-items: end !important; }
  html body.co-module-runtime .home-dialog { width: 100% !important; max-width: none !important; max-height: 94dvh !important; border-radius: 20px 20px 0 0 !important; }
  html body.co-module-runtime .home-custom-fields { grid-template-columns: 1fr !important; }

  /* ---------- Calendar ---------- */
  html body.co-module-runtime .calendar-shell.calendar-v2 { gap: 9px !important; }
  html body.co-module-runtime .calendar-toolbar-card { padding: 12px !important; gap: 10px !important; }
  html body.co-module-runtime .calendar-title-block h2 { font-size: 24px !important; }
  html body.co-module-runtime .calendar-toolbar-actions { width: 100% !important; display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .calendar-toolbar-actions > * { min-width: 0 !important; }
  html body.co-module-runtime .calendar-stepper { grid-column: 1/-1 !important; justify-content: space-between !important; }
  html body.co-module-runtime .calendar-view-switch { grid-column: 1/-1 !important; overflow-x: auto !important; }
  html body.co-module-runtime .calendar-month-card { padding: 8px !important; overflow: hidden !important; }
  html body.co-module-runtime .calendar-weekdays,
  html body.co-module-runtime .calendar-month-grid { min-width: 0 !important; width: 100% !important; grid-template-columns: repeat(7,minmax(0,1fr)) !important; }
  html body.co-module-runtime .calendar-weekdays > * { font-size: 9px !important; }
  html body.co-module-runtime .calendar-day { min-height: 68px !important; padding: 5px !important; }
  html body.co-module-runtime .calendar-day-number { font-size: 11px !important; }
  html body.co-module-runtime .calendar-day-events { gap: 2px !important; }
  html body.co-module-runtime .calendar-day-events > * { font-size: 8px !important; line-height: 1.2 !important; padding: 2px 3px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body.co-module-runtime .calendar-week-card { overflow-x: auto !important; }
  html body.co-module-runtime .calendar-week-grid { min-width: 760px !important; }
  html body.co-module-runtime .calendar-agenda-card { padding: 12px !important; }
  html body.co-module-runtime .calendar-agenda-day { grid-template-columns: 70px minmax(0,1fr) !important; gap: 8px !important; }
  html body.co-module-runtime .calendar-form { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .calendar-editor-backdrop { padding: 0 !important; align-items: end !important; }

  /* ---------- Tasks / Notes / Shopping / Shortcuts ---------- */
  html body.co-module-runtime .task-item { padding: 10px !important; }
  html body.co-module-runtime .task-mainline { grid-template-columns: auto minmax(0,1fr) auto !important; gap: 8px !important; }
  html body.co-module-runtime .input-row { display: grid !important; grid-template-columns: 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .note-toolbar { align-items: stretch !important; flex-direction: column !important; gap: 8px !important; }
  html body.co-module-runtime .note-tabs { display: flex !important; overflow-x: auto !important; flex-wrap: nowrap !important; scrollbar-width: none !important; }
  html body.co-module-runtime .note-tabs::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .note-tabs button { flex: 0 0 auto !important; }
  html body.co-module-runtime .note-card-grid { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .shopping-quick-row { grid-template-columns: 1fr auto !important; gap: 7px !important; }
  html body.co-module-runtime .shopping-item { grid-template-columns: auto minmax(0,1fr) !important; gap: 8px !important; padding: 10px !important; }
  html body.co-module-runtime .shopping-actions { grid-column: 2 !important; justify-content: flex-start !important; flex-wrap: wrap !important; }
  html body.co-module-runtime .shopping-edit-grid { grid-template-columns: 1fr !important; grid-column: 1/-1 !important; }
  html body.co-module-runtime .shortcut-item { grid-template-columns: 44px minmax(0,1fr) !important; gap: 9px !important; }
  html body.co-module-runtime .shortcut-actions { grid-column: 2 !important; justify-content: flex-start !important; flex-wrap: wrap !important; }
  html body.co-module-runtime .shortcut-edit-form { grid-template-columns: 1fr !important; }

  /* ---------- Activities ---------- */
  html body.co-module-runtime .activity-page { gap: 10px !important; }
  html body.co-module-runtime .activity-hero { padding: 16px !important; gap: 11px !important; }
  html body.co-module-runtime .activity-hero h2 { font-size: 27px !important; }
  html body.co-module-runtime .activity-hero-stats { display: grid !important; grid-template-columns: repeat(3,1fr) !important; gap: 6px !important; }
  html body.co-module-runtime .activity-hero-stats div { min-width: 0 !important; padding: 8px !important; }
  html body.co-module-runtime .activity-hero-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; width: 100% !important; }
  html body.co-module-runtime .activity-toolbar { grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .activity-search { grid-column: 1/-1 !important; min-height: 44px !important; }
  html body.co-module-runtime .activity-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  html body.co-module-runtime .activity-card { padding: 13px !important; gap: 10px !important; }
  html body.co-module-runtime .activity-card-top { grid-template-columns: 40px minmax(0,1fr) auto !important; gap: 9px !important; }
  html body.co-module-runtime .activity-card-icon { width: 40px !important; height: 40px !important; }
  html body.co-module-runtime .activity-editor-backdrop { padding: 0 !important; align-items: end !important; }
  html body.co-module-runtime .activity-editor { width: 100% !important; max-height: 94dvh !important; border-radius: 20px 20px 0 0 !important; }

  /* ---------- Routines ---------- */
  html body.co-module-runtime .routine-control-center { gap: 9px !important; }
  html body.co-module-runtime .routine-cc-hero { padding: 14px !important; grid-template-columns: 1fr !important; gap: 10px !important; }
  html body.co-module-runtime .routine-cc-hero-title h1,
  html body.co-module-runtime .routine-cc-hero-title h2 { font-size: 29px !important; }
  html body.co-module-runtime .routine-cc-metrics { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  html body.co-module-runtime .routine-cc-toolbar { grid-template-columns: 1fr !important; gap: 8px !important; }
  html body.co-module-runtime .routine-cc-filters { overflow-x: auto !important; flex-wrap: nowrap !important; scrollbar-width: none !important; }
  html body.co-module-runtime .routine-cc-filters::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .routine-cc-filters > * { flex: 0 0 auto !important; }
  html body.co-module-runtime .routine-cc-layout { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .routine-cc-grid { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .routine-v7-pending-list { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .routine-quick-templates { grid-template-columns: 1fr 1fr !important; }
  html body.co-module-runtime .routine-studio-backdrop,
  html body.co-module-runtime .routine-v2-modal-backdrop { padding: 0 !important; align-items: end !important; }
  html body.co-module-runtime .routine-studio,
  html body.co-module-runtime .routine-v2-modal { width: 100% !important; max-width: none !important; max-height: 95dvh !important; border-radius: 20px 20px 0 0 !important; }

  /* ---------- Music ---------- */
  html body.co-module-runtime .spotify-shell { gap: 9px !important; }
  html body.co-module-runtime .spotify-topbar { align-items: stretch !important; flex-direction: column !important; gap: 8px !important; }
  html body.co-module-runtime .spotify-topbar-actions { width: 100% !important; display: grid !important; grid-template-columns: 1fr auto !important; }
  html body.co-module-runtime .spotify-player-card { grid-template-columns: 1fr !important; padding: 13px !important; text-align: left !important; }
  html body.co-module-runtime .spotify-player-cover { width: min(100%, 280px) !important; max-width: 280px !important; aspect-ratio: 1 !important; margin: 0 auto !important; }
  html body.co-module-runtime .spotify-controls { justify-content: center !important; }
  html body.co-module-runtime .spotify-content-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .spotify-media-grid { grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .spotify-device-panel { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .spotify-queue-panel { position: static !important; }
  html body.co-module-runtime .spotify-connect-hero { padding: 18px !important; grid-template-columns: 1fr !important; }
  html body.co-module-runtime .spotify-feature-grid { grid-template-columns: 1fr !important; }

  /* ---------- Cookbook ---------- */
  html body.co-module-runtime .recipe-toolbar { align-items: stretch !important; flex-direction: column !important; gap: 8px !important; }
  html body.co-module-runtime .recipe-tabs { display: flex !important; overflow-x: auto !important; flex-wrap: nowrap !important; scrollbar-width: none !important; }
  html body.co-module-runtime .recipe-tabs::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .recipe-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .recipe-card.compact { grid-template-columns: 106px minmax(0,1fr) !important; }
  html body.co-module-runtime .recipe-card.compact .recipe-image { width: 106px !important; min-height: 100% !important; }
  html body.co-module-runtime .recipe-detail-header { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .recipe-detail-image { min-height: 220px !important; max-height: 340px !important; }
  html body.co-module-runtime .recipe-detail-meta { grid-template-columns: 1fr 1fr !important; }
  html body.co-module-runtime .recipe-transfer-inline { grid-template-columns: 1fr !important; }

  /* ---------- AI ---------- */
  html body.co-module-runtime .ai-shell { gap: 9px !important; }
  html body.co-module-runtime .ai-module-head { padding: 11px !important; }
  html body.co-module-runtime .ai-section-tabs,
  html body.co-module-runtime .ai-section-tabs-v2 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    margin-top: 10px !important;
  }
  html body.co-module-runtime .ai-section-tabs::-webkit-scrollbar,
  html body.co-module-runtime .ai-section-tabs-v2::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .ai-section-tab { flex: 0 0 auto !important; min-height: 40px !important; }
  html body.co-module-runtime .ai-agent-grid,
  html body.co-module-runtime .ai-permissions-layout { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .ai-chat-head { align-items: flex-start !important; flex-direction: column !important; gap: 7px !important; }
  html body.co-module-runtime .ai-chat-head-actions { width: 100% !important; justify-content: flex-start !important; }
  html body.co-module-runtime .ai-chat-stream { height: min(48dvh, 430px) !important; min-height: 280px !important; padding: 10px !important; border-radius: 14px !important; }
  html body.co-module-runtime .ai-chat-message { max-width: 92% !important; font-size: 14px !important; }
  html body.co-module-runtime .ai-chat-input-row {
    grid-template-columns: 38px 38px 38px minmax(0,1fr) !important;
    gap: 4px !important;
    align-items: end !important;
  }
  html body.co-module-runtime .ai-chat-input-row .primary-button { grid-column: 1/-1 !important; width: 100% !important; height: 42px !important; }
  html body.co-module-runtime .ai-image-button,
  html body.co-module-runtime .ai-prompt-plus,
  html body.co-module-runtime .ai-voice-button { width: 38px !important; height: 38px !important; min-width: 38px !important; }
  html body.co-module-runtime .ai-chat-input-row textarea { min-height: 44px !important; max-height: 120px !important; }
  html body.co-module-runtime .ai-conversation-history-list { max-height: 190px !important; }
  html body.co-module-runtime .ai-permission-table { overflow-x: auto !important; }
  html body.co-module-runtime .ai-permission-row { min-width: 650px !important; }
  html body.co-module-runtime .ai-audit-list { overflow-x: auto !important; }
  html body.co-module-runtime .ai-audit-item { min-width: 640px !important; }

  /* ---------- Inbox ---------- */
  html body.co-module-runtime .orbit-inbox-page { gap: 9px !important; }
  html body.co-module-runtime .orbit-inbox-stats { grid-template-columns: 1fr 1fr !important; gap: 7px !important; }
  html body.co-module-runtime .orbit-inbox-tabs { display: flex !important; overflow-x: auto !important; flex-wrap: nowrap !important; scrollbar-width: none !important; }
  html body.co-module-runtime .orbit-inbox-tabs::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .orbit-inbox-tabs button { flex: 0 0 auto !important; }
  html body.co-module-runtime .orbit-inbox-list > * { min-width: 0 !important; }
  html body.co-module-runtime .orbit-share-dialog { width: 100% !important; max-width: none !important; max-height: 92dvh !important; border-radius: 20px 20px 0 0 !important; }

  /* ---------- Settings ---------- */
  html body.co-module-runtime .settings-v2-shell { grid-template-columns: 1fr !important; gap: 9px !important; }
  html body.co-module-runtime .settings-v2-sidebar { position: static !important; }
  html body.co-module-runtime .settings-v2-sidebar-profile { display: none !important; }
  html body.co-module-runtime .settings-v2-navigation {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 0 0 4px !important;
    scrollbar-width: none !important;
  }
  html body.co-module-runtime .settings-v2-navigation::-webkit-scrollbar { display: none !important; }
  html body.co-module-runtime .settings-v2-navigation button { flex: 0 0 auto !important; min-width: 0 !important; width: auto !important; padding: 10px 12px !important; }
  html body.co-module-runtime .settings-v2-main { padding: 12px !important; border-radius: 15px !important; }
  html body.co-module-runtime .settings-v2-card-grid,
  html body.co-module-runtime .settings-v2-account-grid,
  html body.co-module-runtime .settings-v2-integration-grid,
  html body.co-module-runtime .settings-v2-toggle-grid,
  html body.co-module-runtime .settings-v2-description-grid,
  html body.co-module-runtime .settings-v2-form-grid,
  html body.co-module-runtime .settings-v2-password-grid { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .settings-v2-profile-hero { grid-template-columns: 72px minmax(0,1fr) !important; padding: 12px !important; }
  html body.co-module-runtime .settings-v2-profile-hero > button { grid-column: 1/-1 !important; justify-self: stretch !important; }
  html body.co-module-runtime .settings-v2-nav-order { grid-template-columns: 1fr !important; }

  /* ---------- Generic modal / safety net ---------- */
  html body.co-module-runtime [class$="-backdrop"]:not(.weather-day-modal),
  html body.co-module-runtime [class*="-modal-backdrop"] {
    max-width: 100vw !important;
  }
  html body.co-module-runtime dialog,
  html body.co-module-runtime [role="dialog"] { max-width: 100vw !important; }
}

@media (max-width: 480px) {
  :root { --co-mobile-gap: 8px; --co-mobile-pad: 10px; }

  body .mobile-all-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 5px !important; }
  body .mobile-all-grid a { min-height: 64px !important; padding-inline: 2px !important; }

  body:not(.co-index-module-mode) .fitness-main,
  body:not(.co-index-module-mode) .therapy-dashboard-main-v5527 { grid-template-columns: 1fr !important; }
  body:not(.co-index-module-mode) .fitness-ring,
  body:not(.co-index-module-mode) .therapy-dashboard-ring-v5527 { margin-inline: auto !important; }
  body:not(.co-index-module-mode) .fitness-footer { grid-template-columns: 1fr 1fr !important; }

  html body.co-module-runtime .content { padding: 7px 7px 18px !important; }
  html body.co-module-runtime .card { padding: 11px !important; }

  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero.fitness-cc-hero-reference { padding: 64px 10px 10px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-cc-hero-copy { padding-top: 100px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpis { gap: 5px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-kpi { grid-template-columns: 28px minmax(0,1fr) !important; min-height: 61px !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-shared-hero-badge { display: none !important; }
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-today-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-today-cards,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-overview-metrics,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-overview-metrics-v2,
  html body.co-module-runtime #fitnessControlCenterV2 .fitness-stats-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-important-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-measure-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .vitals-latest-values,
  html body.co-module-runtime #fitnessControlCenterV2 .nutrition-tools-grid,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-plan-stats-v5519,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-metrics,
  html body.co-module-runtime #fitnessControlCenterV2 .therapy-metrics-detailed { grid-template-columns: 1fr !important; }

  html body.co-module-runtime .relationship-hero-kpis { grid-template-columns: 1fr 1fr !important; }
  html body.co-module-runtime .relationship-gift-list article { grid-template-columns: 32px minmax(0,1fr) 24px !important; }
  html body.co-module-runtime .relationship-gift-list article > .relationship-priority,
  html body.co-module-runtime .relationship-gift-list article > .relationship-chip { grid-column: 2 !important; justify-self: start !important; }
  html body.co-module-runtime .relationship-conflict-table .row { grid-template-columns: 68px minmax(0,1fr) !important; }
  html body.co-module-runtime .relationship-conflict-table .row > .relationship-conflict-topic { grid-column: 2 !important; }
  html body.co-module-runtime .relationship-conflict-table .row > .relationship-chip { grid-column: 2 !important; grid-row: 3 !important; justify-self: start !important; }

  html body.co-module-runtime .home-v2-favorites .home-favorites-grid,
  html body.co-module-runtime .home-direct-quick .home-favorites-grid,
  html body.co-module-runtime .home-device-grid,
  html body.co-module-runtime .home-card-grid,
  html body.co-module-runtime .spotify-media-grid,
  html body.co-module-runtime .activity-hero-actions,
  html body.co-module-runtime .weather-current-metrics,
  html body.co-module-runtime .weather-detail-stack,
  html body.co-module-runtime .orbit-inbox-stats { grid-template-columns: 1fr !important; }

  html body.co-module-runtime .calendar-toolbar-actions { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .calendar-stepper,
  html body.co-module-runtime .calendar-view-switch { grid-column: auto !important; }
  html body.co-module-runtime .calendar-day { min-height: 58px !important; }
  html body.co-module-runtime .calendar-day-events > * { font-size: 7px !important; }

  html body.co-module-runtime .activity-toolbar { grid-template-columns: 1fr !important; }
  html body.co-module-runtime .activity-search { grid-column: auto !important; }
  html body.co-module-runtime .activity-hero-stats { grid-template-columns: 1fr 1fr !important; }

  html body.co-module-runtime .routine-cc-metrics,
  html body.co-module-runtime .routine-quick-templates { grid-template-columns: 1fr !important; }

  html body.co-module-runtime .recipe-card.compact { grid-template-columns: 88px minmax(0,1fr) !important; }
  html body.co-module-runtime .recipe-card.compact .recipe-image { width: 88px !important; }

  html body.co-module-runtime .ai-chat-input-row { grid-template-columns: 38px 38px 38px minmax(0,1fr) !important; }
}


/* ---------- v5.50.31 mobile touch-scroll reliability ----------
   The old mobile shell historically locked html/body at 100% + overflow:hidden.
   vNext uses the real responsive dashboard and a same-origin module iframe, so the
   page itself must remain a native vertical touch-scroller whenever no modal is open. */
@media (max-width: 820px) {
  html,
  body:not(.co-index-module-mode):not(.mobile-all-open) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: manipulation !important;
  }

  body:not(.co-index-module-mode):not(.mobile-all-open) > #app {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    touch-action: manipulation !important;
  }

  body:not(.co-index-module-mode) > #app > .shell-wrap {
    overflow: visible !important;
    touch-action: manipulation !important;
  }

  /* Module pages scroll inside the real vNext runtime iframe. */
  body.co-index-module-mode,
  body.co-index-module-mode > #app,
  body.co-index-module-mode .index-module-surface {
    overscroll-behavior: none !important;
    touch-action: auto !important;
  }
  body.co-index-module-mode .index-module-surface iframe {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: auto !important;
  }

  /* Same stylesheet also runs inside module-runtime.html. Make its document the
     single vertical scroll owner; cards/grids must never become accidental locks. */
  html body.co-module-runtime {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: manipulation !important;
  }
  html body.co-module-runtime #app,
  html body.co-module-runtime .main,
  html body.co-module-runtime .content {
    height: auto !important;
    min-height: 0 !important;
    overflow-y: visible !important;
    touch-action: manipulation !important;
  }
  html body.co-module-runtime #app {
    min-height: 100dvh !important;
  }

  /* Horizontal scrollers keep horizontal gestures while vertical gestures remain
     available to the page. */
  html body.co-module-runtime [class*="timeline-scroll"],
  html body.co-module-runtime [class*="tabs"],
  html body.co-module-runtime [class*="strip"],
  html body.co-module-runtime [class*="table"] {
    -webkit-overflow-scrolling: touch !important;
  }

  .mobile-all-sheet {
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  .mobile-all-grid a,
  .mobile-sheet-actions a,
  .mobile-sheet-actions button,
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    touch-action: manipulation !important;
  }
}
