/*
 * MoveU App Design Consistency Layer – Alpha 53
 * Loaded after the private module styles. It standardises typography, density,
 * overflow resilience and interaction polish without duplicating module logic.
 */
:root {
  --mu-type-page-mobile: 30px;
  --mu-type-page-desktop: 42px;
  --mu-type-sub-mobile: 14.5px;
  --mu-type-sub-desktop: 16px;
  --mu-type-section-mobile: 18px;
  --mu-type-section-desktop: 20px;
  --mu-type-card-title: 15px;
  --mu-type-body: 13.5px;
  --mu-type-meta: 12px;
  --mu-space-page-mobile: 20px;
  --mu-space-section-mobile: 26px;
  --mu-space-section-desktop: 38px;
  --mu-card-radius-mobile: 19px;
  --mu-card-radius-desktop: 22px;
  --mu-control-radius: 15px;
}

/* -------------------------------------------------------------------------
   Shared overflow and text safety
   ------------------------------------------------------------------------- */
:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist),
:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) :is(section, article, header, footer, nav, form, fieldset, div) {
  min-width: 0;
}

:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) :is(h1, h2, h3, h4, p, legend, label, small, strong) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) :is(button, a, summary) {
  max-width: 100%;
}

:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) :is(input, textarea, select) {
  min-width: 0;
  max-width: 100%;
}

:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) img {
  max-width: 100%;
}

/* Long dynamic project / account copy must remain inside its surface. */
:is(
  .mu-desktop-appbar__brand span,
  .mu-profile-button i,
  .mu-profile-overview-row strong,
  .mu-profile-email-full,
  .mu-collab-team-card h2,
  .mu-collab-team-trigger strong,
  .mu-collab-member-progress strong,
  .mu-collab-member-progress span,
  .mu-collab-note-card strong,
  .mu-collab-task__copy strong,
  .mu-category-row__copy strong,
  .mu-entry-row__copy strong,
  .mu-checklist-task-link > span:first-child,
  .mu-checklist-phase-copy strong
) {
  min-width: 0;
}

.mu-profile-email-full,
.mu-profile-overview-row strong,
.mu-collab-join-prompt p,
.mu-collab-assignment-hint,
.mu-checklist-task-details p,
.mu-checklist-task-blocker,
.mu-tip__body > p,
.mu-action-row small {
  overflow-wrap: anywhere;
}

/* Consistent Apple-like control language: no loud transforms or colour jumps. */
:where(.mu-app, body.moveu-authenticated-shell-page) :where(a, button, summary):active {
  transform: scale(.995);
}

:where(.mu-app, body.moveu-authenticated-shell-page) :where(a, button, summary):focus-visible {
  box-shadow: 0 0 0 3px rgba(76, 201, 184, .22) !important;
}

/* -------------------------------------------------------------------------
   Shared shell
   ------------------------------------------------------------------------- */
.mu-mobile-topbar {
  min-height: 68px;
  padding-inline: 16px;
}
.mu-mobile-topbar__brand { width: 126px; }

.mu-soft-dock {
  min-height: 74px;
  padding: 6px 5px;
  border-radius: 23px;
}
.mu-soft-dock__item {
  min-height: 58px;
  gap: 2px;
  font-size: 10.5px;
  line-height: 1.15;
}
.mu-soft-dock__item .mu-line-icon { width: 22px; height: 22px; }
.mu-nav-progress { width: 33px; height: 33px; font-size: 8.5px; }

.mu-shell-menu__item,
.mu-notification {
  min-width: 0;
}
.mu-shell-menu__item > span:nth-child(2),
.mu-notification > span:last-child { min-width: 0; }
.mu-shell-menu__item strong,
.mu-shell-menu__item small,
.mu-notification strong,
.mu-notification small {
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------
   Unified page title scale for the already-created private surfaces.
   ------------------------------------------------------------------------- */
.mu-page-intro h1,
.mu-collab-intro h1,
.mu-profile-intro h1,
.mu-checklist-page-head h1 {
  color: var(--mu-navy, #082456);
  font-size: var(--mu-type-page-mobile) !important;
  font-weight: 760 !important;
  letter-spacing: -.045em !important;
  line-height: 1.06 !important;
}

.mu-page-intro > div > p:last-child,
.mu-collab-intro p,
.mu-profile-intro p,
.mu-checklist-page-head p {
  color: var(--mu-text-secondary, #68758f);
  font-size: var(--mu-type-sub-mobile) !important;
  line-height: 1.4 !important;
}

.mu-collab-intro,
.mu-profile-intro { margin-bottom: 18px; }

/* -------------------------------------------------------------------------
   Budget V2
   ------------------------------------------------------------------------- */
.mu-budget-content { gap: 30px; }
.mu-budget-section { gap: 11px; }
.mu-section-header h2 { font-size: var(--mu-type-section-mobile); line-height: 1.22; }
.mu-section-header p { font-size: 13px; line-height: 1.45; }

.mu-summary-card,
.mu-list-card,
.mu-coach-card,
.mu-budget-secondary {
  max-width: 100%;
}

.mu-summary-card__main { min-width: 0; }
.mu-summary-card__amount { min-width: 0; }
.mu-summary-card__amount > strong {
  max-width: 100%;
  font-size: clamp(29px, 9vw, 42px);
  letter-spacing: -.045em;
}
.mu-summary-card__label h2 { font-size: 15px; }
.mu-progress-ring strong { font-size: 26px; }

.mu-category-row,
.mu-tip-row,
.mu-entry-row,
.mu-action-row { min-width: 0; }
.mu-category-row__copy,
.mu-tip-row > span:nth-child(2),
.mu-entry-row__copy,
.mu-action-row > span:nth-child(2) { min-width: 0; }

.mu-category-row__copy strong,
.mu-entry-row__copy strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.mu-tip-row strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.3;
}
.mu-category-row__amount,
.mu-entry-row__amount { flex: 0 0 auto; }

.mu-tip__actions :is(a, button),
.mu-export-grid button,
.mu-detail-row button {
  white-space: normal;
  line-height: 1.22;
}

/* -------------------------------------------------------------------------
   Collaboration V2.2
   ------------------------------------------------------------------------- */
.mu-collab-content { gap: 13px; }
.mu-collab-card,
.mu-collab-team-card,
.mu-collab-quicklinks { border-radius: var(--mu-card-radius-mobile); }

.mu-collab-team-card {
  padding: 18px;
  gap: 14px;
}
.mu-collab-team-card h2 {
  margin-top: 3px;
  font-size: 22px;
  line-height: 1.12;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.mu-collab-progress-ring { width: 88px; height: 88px; flex-basis: 88px; }
.mu-collab-progress-ring strong { font-size: 18px; }
.mu-collab-progress-ring span { font-size: 10.5px; }

.mu-collab-card { padding: 17px; }
.mu-collab-card h2 { font-size: 18px; line-height: 1.2; }
.mu-collab-card header { gap: 10px; }
.mu-collab-card header > a {
  max-width: 46%;
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
}

.mu-collab-invite p { font-size: 13px; }
.mu-collab-code-row { min-width: 0; }
.mu-collab-code { min-width: 0; flex: 1 1 132px; max-width: 100%; }

.mu-collab-quicklinks { min-height: 0; padding: 5px; gap: 3px; }
.mu-collab-quicklinks a {
  min-height: 72px;
  padding: 8px 6px;
  align-items: center;
  text-align: center;
  gap: 5px;
}
.mu-collab-quicklinks strong {
  font-size: 11.5px;
  line-height: 1.18;
  white-space: normal;
}
.mu-collab-quicklinks small { display: none; }

.mu-collab-member-progress {
  grid-template-columns: auto minmax(0,1fr) auto;
  padding: 9px 10px;
}
.mu-collab-member-progress strong { font-size: 12.5px; }
.mu-collab-member-progress span { font-size: 11px; }

.mu-collab-task {
  min-width: 0;
  min-height: 58px;
}
.mu-collab-task__copy strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.25;
}
.mu-collab-task__copy span { white-space: normal; line-height: 1.3; }
.mu-collab-unassigned { white-space: normal; text-align: right; }

.mu-collab-note-card strong { white-space: normal; line-height: 1.25; }
.mu-collab-note-card small { white-space: nowrap; }

/* -------------------------------------------------------------------------
   Profile V1.2
   ------------------------------------------------------------------------- */
.mu-profile-grid { gap: 14px; }
.mu-profile-card {
  padding: 18px;
  border-radius: var(--mu-card-radius-mobile);
}
.mu-profile-card h2 { font-size: 19px; }
.mu-profile-card__header { gap: 12px; }
.mu-profile-card__header p { font-size: 13.5px; line-height: 1.42; }

.mu-profile-identity {
  min-height: 0;
  grid-template-columns: 82px minmax(0,1fr);
  gap: 14px;
}
.mu-avatar--96 { width: 80px; height: 80px; font-size: 18px; }
.mu-profile-identity__copy h2 {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 19px;
  line-height: 1.18;
}

.mu-profile-overview-row {
  min-height: 56px;
  padding: 10px 2px;
}
.mu-profile-overview-row > span { min-width: 0; }
.mu-profile-overview-row strong {
  max-width: 100%;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.28;
}
.mu-profile-security .mu-profile-overview-row:first-of-type strong {
  overflow-wrap: anywhere;
}

.mu-profile-carousel { grid-auto-columns: 84%; }
.mu-profile-journey-card {
  min-height: 188px;
  padding: 18px;
  border-radius: 18px;
}
.mu-profile-journey-card h3 { font-size: 17px; }
.mu-profile-journey-card p {
  font-size: 13.5px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.mu-profile-option-button,
.mu-profile-preset,
.mu-profile-button-primary,
.mu-profile-button-secondary { max-width: 100%; }
.mu-profile-option-button span,
.mu-profile-option-button small { overflow-wrap: anywhere; }

/* -------------------------------------------------------------------------
   Checklist V2
   ------------------------------------------------------------------------- */
.mu-checklist-main { padding-top: var(--mu-space-page-mobile); }
.mu-checklist-ready { gap: 15px; }
.mu-checklist-page-head { margin-bottom: 15px; }

.mu-checklist-add {
  min-width: 96px;
  min-height: 46px;
  padding-inline: 11px;
  font-size: 13.5px;
}

.mu-checklist-summary,
.mu-checklist-next,
.mu-checklist-task-surface,
.mu-checklist-phase-card { border-radius: var(--mu-card-radius-mobile); }

.mu-checklist-summary {
  padding: 18px 16px 16px;
  grid-template-columns: minmax(0,1fr) 94px;
  gap: 9px;
}
.mu-checklist-summary h2 { font-size: 22px; }
.mu-checklist-summary__copy > p:not(.mu-checklist-course) { font-size: 13px; }
.mu-checklist-progress { width: 94px; }
.mu-checklist-progress strong { font-size: 25px; }
.mu-checklist-progress > span { font-size: 10.5px; }
.mu-checklist-metrics { margin-top: 15px; gap: 10px; }
.mu-checklist-metric dt { font-size: 17px; }
.mu-checklist-metric dd { font-size: 10.8px; }

.mu-checklist-next { padding: 14px 13px; }
.mu-checklist-next > .mu-checklist-eyebrow { font-size: 15.5px; }

.mu-checklist-toolbar { margin-bottom: 16px; }
.mu-checklist-views { min-height: 46px; }
.mu-checklist-views button { min-height: 40px; font-size: 12px; }
.mu-checklist-search,
.mu-checklist-tool { min-height: 43px; }
.mu-checklist-search input { font-size: 12px; }
.mu-checklist-tool { font-size: 11px; }

.mu-checklist-task-row {
  grid-template-columns: 38px minmax(0,1fr) auto;
  min-height: 66px;
  padding: 10px 10px 9px;
}
.mu-checklist-status-button { width: 32px; height: 32px; }
.mu-checklist-status-button .mu-line-icon { width: 16px; height: 16px; }
.mu-checklist-task-main { min-width: 0; }
.mu-checklist-task-link {
  font-size: 13.5px;
  line-height: 1.27;
}
.mu-checklist-task-meta { font-size: 11px; line-height: 1.32; }
.mu-checklist-avatar-button { width: 32px; height: 32px; }
.mu-checklist-unassigned-action { min-height: 30px; font-size: 10px; }
.mu-checklist-details-toggle {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 11px;
}
.mu-checklist-task-details { padding-top: 11px; }
.mu-checklist-task-details p { font-size: 12px; line-height: 1.5; }

.mu-checklist-phase-head {
  min-height: 70px;
  padding: 10px 11px;
  grid-template-columns: 40px minmax(0,1fr) auto;
  gap: 9px;
}
.mu-checklist-phase-icon { width: 40px; height: 40px; border-radius: 13px; }
.mu-checklist-phase-icon .mu-line-icon { width: 20px; height: 20px; }
.mu-checklist-phase-copy strong {
  font-size: 13.5px;
  line-height: 1.24;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.mu-checklist-phase-copy small { font-size: 10.5px; line-height: 1.3; }
.mu-checklist-phase-percent { min-width: 44px; padding: 5px 7px; font-size: 11px; }

/* Sheets across private modules: calmer header scale and safe dynamic copy. */
.mu-checklist-sheet__head h2,
.mu-budget-panel__header h2,
.mu-shell-panel__header h2,
.mu-profile-panel > header h2,
.mu-collab-panel > header h2 {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------
   Narrow phone corrections
   ------------------------------------------------------------------------- */
@media (max-width: 390px) {
  :root { --mu-type-page-mobile: 29px; --mu-type-sub-mobile: 14px; }

  .mu-app-main { padding-left: 13px; padding-right: 13px; }
  .mu-mobile-topbar { padding-inline: 13px; }
  .mu-mobile-topbar__brand { width: 122px; }

  .mu-collab-team-card { padding: 16px; }
  .mu-collab-progress-ring { width: 82px; height: 82px; flex-basis: 82px; }
  .mu-collab-code-row { gap: 6px; }
  .mu-collab-button-primary { padding-inline: 11px; }
  .mu-collab-quicklinks strong { font-size: 10.8px; }

  .mu-profile-card { padding: 16px; }
  .mu-profile-identity { grid-template-columns: 72px minmax(0,1fr); }
  .mu-avatar--96 { width: 70px; height: 70px; }
  .mu-profile-carousel { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }

  .mu-checklist-add { min-width: 90px; min-height: 44px; font-size: 12.5px; }
  .mu-checklist-summary { grid-template-columns: minmax(0,1fr) 88px; }
  .mu-checklist-progress { width: 88px; }
  .mu-checklist-progress strong { font-size: 23px; }
  .mu-checklist-tools { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 66px; }
  .mu-checklist-tool { font-size: 10.3px; padding-inline: 5px; }
  .mu-checklist-task-link { font-size: 13px; }
}

/* -------------------------------------------------------------------------
   Desktop consistency
   ------------------------------------------------------------------------- */
@media (min-width: 900px) {
  .mu-page-intro h1,
  .mu-collab-intro h1,
  .mu-profile-intro h1,
  .mu-checklist-page-head h1 {
    font-size: var(--mu-type-page-desktop) !important;
  }
  .mu-page-intro > div > p:last-child,
  .mu-collab-intro p,
  .mu-profile-intro p,
  .mu-checklist-page-head p {
    font-size: var(--mu-type-sub-desktop) !important;
  }

  .mu-budget-content { gap: 44px; }
  .mu-section-header h2 { font-size: var(--mu-type-section-desktop); }
  .mu-summary-card__amount > strong { font-size: 48px; }

  .mu-collab-content { gap: 16px; }
  .mu-collab-card,
  .mu-collab-team-card,
  .mu-collab-quicklinks { border-radius: var(--mu-card-radius-desktop); }
  .mu-collab-team-card { padding: 22px 24px; }
  .mu-collab-team-card h2 { font-size: 26px; }
  .mu-collab-progress-ring { width: 104px; height: 104px; flex-basis: 104px; }
  .mu-collab-quicklinks a { min-height: 82px; align-items: flex-start; text-align: left; padding: 10px 12px; }
  .mu-collab-quicklinks strong { font-size: 12px; }
  .mu-collab-quicklinks small { display: block; }

  .mu-profile-grid { gap: 18px; }
  .mu-profile-card { padding: 22px; border-radius: var(--mu-card-radius-desktop); }
  .mu-profile-identity { grid-template-columns: 92px minmax(0,1fr); gap: 16px; }
  .mu-avatar--96 { width: 90px; height: 90px; }
  .mu-profile-carousel { grid-auto-columns: 32%; }

  .mu-checklist-main { padding-top: 28px; }
  .mu-checklist-summary { grid-template-columns: minmax(0,1fr) 140px; padding: 26px 28px; }
  .mu-checklist-progress { width: 140px; }
  .mu-checklist-progress strong { font-size: 34px; }
  .mu-checklist-summary h2 { font-size: 28px; }
  .mu-checklist-task-row { grid-template-columns: 48px minmax(0,1fr) auto; min-height: 72px; padding: 12px 16px; }
  .mu-checklist-status-button { width: 38px; height: 38px; }
  .mu-checklist-avatar-button { width: 38px; height: 38px; }
  .mu-checklist-task-link { font-size: 14.5px; }
  .mu-checklist-task-meta { font-size: 12px; }
  .mu-checklist-details-toggle { min-height: 36px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  :where(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) *,
  :where(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) *::before,
  :where(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* -------------------------------------------------------------------------
   Reliable panel motion: same visual contract for Profile and Gemeinsam.
   Scroll locks are removed in JS before the closing animation finishes.
   ------------------------------------------------------------------------- */
.mu-profile-backdrop,
.mu-collab-backdrop {
  opacity: 0;
  transition: opacity .2s ease;
}
.mu-profile-backdrop.is-open,
.mu-collab-backdrop.is-open { opacity: 1; }

@media (max-width: 899px) {
  .mu-profile-panel,
  .mu-collab-panel {
    --mu-sheet-drag-y: 0px;
    opacity: 0;
    transform: translateY(calc(102% + var(--mu-sheet-drag-y)));
    transition: transform .26s cubic-bezier(.2,.75,.2,1), opacity .18s ease;
  }
  .mu-profile-panel.is-open,
  .mu-collab-panel.is-open {
    opacity: 1;
    transform: translateY(var(--mu-sheet-drag-y));
  }
  .mu-profile-panel.is-dragging,
  .mu-collab-panel.is-dragging { transition: none; user-select: none; }
}

@media (min-width: 900px) {
  .mu-profile-panel {
    opacity: 0;
    transform: translateX(24px);
    transition: transform .24s cubic-bezier(.2,.75,.2,1), opacity .18s ease;
  }
  .mu-profile-panel.is-open { opacity: 1; transform: translateX(0); }

  .mu-collab-panel {
    opacity: 0;
    transform: translateY(-7px) scale(.985);
    transform-origin: top right;
    transition: transform .2s ease, opacity .16s ease;
  }
  .mu-collab-panel.is-open { opacity: 1; transform: translateY(0) scale(1); }
  .mu-collab-note-panel { transform: translateX(24px); transform-origin: center right; }
  .mu-collab-note-panel.is-open { transform: translateX(0); }
}


/* Alpha 53 final product-wide polish */
:root {
  --mu-shadow-soft: 0 9px 28px rgba(8, 36, 86, .042);
  --mu-shadow-panel: 0 22px 62px rgba(8, 36, 86, .12);
}

/* Every existing app surface shares the same calm card language. */
:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist) :is(
  .mu-summary-card,
  .mu-list-card,
  .mu-coach-card,
  .mu-budget-secondary,
  .mu-collab-card,
  .mu-collab-team-card,
  .mu-collab-quicklinks,
  .mu-profile-card,
  .mu-checklist-summary,
  .mu-checklist-next,
  .mu-checklist-task-surface,
  .mu-checklist-phase-card
) {
  box-shadow: var(--mu-shadow-soft) !important;
}

/* Long, user-controlled copy must never expand a surface horizontally. */
.mu-page-intro__context {
  max-width: min(72vw, 340px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mu-collab-team-trigger,
.mu-collab-team-trigger > span:nth-child(2),
.mu-collab-card header > div,
.mu-profile-card__header > div,
.mu-checklist-page-head > div,
.mu-checklist-section-head > div,
.mu-checklist-task-side,
.mu-checklist-task-main {
  min-width: 0;
}
.mu-collab-team-trigger strong,
.mu-collab-team-trigger small,
.mu-collab-member-progress strong,
.mu-collab-team-member strong,
.mu-collab-team-member span {
  max-width: 100%;
  overflow-wrap: break-word;
}
.mu-profile-preset span,
.mu-checklist-picker-item__copy strong,
.mu-checklist-tool > span:not(.mu-checklist-filter-count) {
  min-width: 0;
  max-width: 100%;
}

/* Compact, platform-like controls: no over-wide pill buttons on phones. */
:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist, .mu-calendar) :is(button, [role="button"], a) {
  -webkit-tap-highlight-color: transparent;
}
:is(.mu-budget, .mu-collab, .mu-profile, .mu-checklist, .mu-calendar) :is(button, a):where(:hover, :focus-visible) {
  text-decoration-color: currentColor;
}

/* Budget: preserve the established visual hierarchy while making it fit reliably. */
.mu-summary-card__main { padding: 20px 17px 18px; }
.mu-summary-card__amount > strong {
  font-size: clamp(26px, 8.4vw, 40px);
  font-variant-numeric: tabular-nums;
}
.mu-summary-card__metrics { min-width: 0; }
.mu-metric-pair { min-width: 0; }
.mu-metric-pair span { white-space: normal; line-height: 1.25; }
.mu-metric-pair span b { white-space: normal; text-overflow: clip; }
.mu-metric-pair strong { font-variant-numeric: tabular-nums; }
.mu-category-row__amount,
.mu-entry-row__amount { font-variant-numeric: tabular-nums; }
.mu-action-row__description { line-height: 1.35; }

/* Collaboration: remove visual noise and keep team data scannable. */
.mu-collab-team-trigger { max-width: 100%; }
.mu-collab-team-trigger strong {
  white-space: normal;
  line-height: 1.2;
}
.mu-collab-team-trigger small { line-height: 1.25; }
.mu-collab-member-progress > div > div { min-width: 0; }
.mu-collab-member-progress strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.2;
}
.mu-collab-member-progress span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mu-collab-card header > a {
  overflow-wrap: break-word;
  white-space: normal;
}
.mu-collab-code { font-variant-numeric: tabular-nums; }

/* Profile: overview first, editing second; all values remain inside the card. */
.mu-profile-overview-row { width: 100%; }
.mu-profile-overview-row > span { overflow: hidden; }
.mu-profile-overview-row small { line-height: 1.25; }
.mu-profile-email-full { word-break: break-word; }
.mu-profile-preset span {
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Checklist: dense native-app rhythm rather than a desktop list squeezed onto mobile. */
.mu-checklist-ready { gap: 13px; }
.mu-checklist-top-grid { gap: 13px; }
.mu-checklist-summary { min-height: 0; }
.mu-checklist-summary h2 { margin: 7px 0 5px; }
.mu-checklist-metrics { margin-top: 12px; }
.mu-checklist-next > .mu-checklist-eyebrow { margin-bottom: 2px; }
.mu-checklist-task-surface { border-radius: 18px; }
.mu-checklist-task-row { border-bottom-color: rgba(223,232,231,.76); }
.mu-checklist-task-link > span:first-child {
  white-space: normal;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: clip;
}
.mu-checklist-task-meta { max-width: 100%; }
.mu-checklist-unassigned-action {
  max-width: 78px;
  white-space: normal;
  line-height: 1.15;
}
.mu-checklist-details-toggle { white-space: nowrap; }
.mu-checklist-all-tasks-action,
.mu-checklist-text-action {
  white-space: normal;
  line-height: 1.25;
}
.mu-checklist-task-actions > * { min-width: 0; white-space: normal; }
.mu-checklist-phase-head { overflow: hidden; }

/* Shared panel ergonomics and content safety. */
:is(.mu-shell-panel, .mu-budget-panel, .mu-profile-panel, .mu-collab-panel, .mu-checklist-sheet) {
  overscroll-behavior: contain;
}
:is(.mu-shell-panel, .mu-budget-panel, .mu-profile-panel, .mu-collab-panel, .mu-checklist-sheet) :is(h2, h3, p, strong, small, label, button) {
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 899px) {
  .mu-app-main { padding-top: 18px; }
  .mu-page-intro,
  .mu-checklist-page-head { margin-bottom: 13px; gap: 12px; }
  .mu-page-intro > div > p:last-child,
  .mu-collab-intro p,
  .mu-profile-intro p,
  .mu-checklist-page-head p { margin-top: 6px !important; }

  .mu-collab-team-card h2 { font-size: 20px; }
  .mu-collab-card h2 { font-size: 17px; }
  .mu-collab-card header > a { max-width: 42%; }
  .mu-collab-invite { gap: 11px; }
  .mu-collab-code-row { gap: 6px; }
  .mu-collab-button-primary { min-height: 42px; }

  .mu-profile-card h2 { font-size: 18px; }
  .mu-profile-card__header p { font-size: 13px; }
  .mu-profile-overview-row strong { font-size: 13.5px; }

  .mu-checklist-main { padding-top: 18px; }
  .mu-checklist-summary {
    padding: 15px 14px 14px;
    grid-template-columns: minmax(0,1fr) 82px;
    gap: 8px;
  }
  .mu-checklist-progress { width: 82px; }
  .mu-checklist-progress strong { font-size: 22px; }
  .mu-checklist-progress > span { font-size: 9.8px; }
  .mu-checklist-summary h2 { font-size: 20px; }
  .mu-checklist-summary__copy > p:not(.mu-checklist-course) { font-size: 12.5px; }
  .mu-checklist-metric dt { font-size: 16px; }
  .mu-checklist-metric dd { font-size: 10.2px; line-height: 1.2; white-space: normal; }
  .mu-checklist-next { padding: 13px 12px; }
  .mu-checklist-next > .mu-checklist-eyebrow { font-size: 14px; }
  .mu-checklist-toolbar { gap: 9px; margin-bottom: 14px; }
  .mu-checklist-views { min-height: 43px; border-radius: 17px; }
  .mu-checklist-views button { min-height: 37px; font-size: 11.3px; }
  .mu-checklist-search,
  .mu-checklist-tool { min-height: 40px; border-radius: 14px; }
  .mu-checklist-search input { font-size: 11.5px; }
  .mu-checklist-tool { font-size: 10.5px; gap: 5px; }
  .mu-checklist-section-head h3 { font-size: 16px; }
  .mu-checklist-section-head p { font-size: 11.5px; }
  .mu-checklist-task-row {
    grid-template-columns: 34px minmax(0,1fr) auto;
    min-height: 62px;
    padding: 9px 9px 8px;
  }
  .mu-checklist-status-button { width: 29px; height: 29px; border-width: 1.5px !important; }
  .mu-checklist-avatar-button { width: 30px; height: 30px; border-width: 1.5px !important; }
  .mu-checklist-task-link { font-size: 13px; line-height: 1.24; }
  .mu-checklist-task-meta { margin-top: 3px; font-size: 10.7px; }
  .mu-checklist-details-toggle { min-height: 31px; padding-inline: 9px; font-size: 10.2px; border-radius: 12px; }
  .mu-checklist-task-details { margin-top: 9px; padding-top: 9px; }
  .mu-checklist-task-details p { font-size: 11.8px; line-height: 1.48; }
  .mu-checklist-phase-head { min-height: 64px; padding: 9px 10px; }
  .mu-checklist-phase-copy strong { font-size: 13px; }
  .mu-checklist-phase-copy small { font-size: 10px; }
}

@media (max-width: 350px) {
  .mu-app-main { padding-left: 10px; padding-right: 10px; }
  .mu-mobile-topbar { padding-inline: 10px; }
  .mu-checklist-add { min-width: 84px; padding-inline: 8px; }
  .mu-checklist-tools { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 60px; }
  .mu-checklist-tool { padding-inline: 4px; }
  .mu-collab-card header { align-items: flex-start; }
  .mu-collab-card header > a { max-width: 38%; }
}

/* Interaction reliability details. */
.mu-shell-backdrop {
  opacity: 0;
  transition: opacity .18s ease;
}
.mu-shell-backdrop.is-open { opacity: 1; }
[data-mu-sheet-handle],
.mu-collab-panel__handle,
.mu-profile-panel__handle,
.mu-budget-panel__handle,
.mu-checklist-sheet__handle,
.mu-shell-panel__handle { touch-action: none; }

@media (max-width: 899px) {
  /* Keep compact visual circles while retaining a forgiving finger target. */
  .mu-checklist-status-button,
  .mu-checklist-avatar-button { position: relative; }
  .mu-checklist-status-button::after,
  .mu-checklist-avatar-button::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
  }
}
