/* ================================================================
   Mentum · Browser-Handy wie Native (Coach + Auth/Setup)
   Phone: dieselbe Coach-Tab-Bar wie Native. Desktop (≥981px):
   portal_laptop.css. Native-UA unverändert.
   ================================================================ */

@media (max-width: 980px) {
  body.coach-app:not(.is-native-app),
  body.is-auth:not(.is-native-app),
  body.onboarding-page:not(.is-native-app),
  body.pilot-survey-page:not(.is-native-app) {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--surface) !important;
    overscroll-behavior-y: none;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body.coach-app:not(.is-native-app) .card,
  body.is-auth:not(.is-native-app) .card,
  body.onboarding-page:not(.is-native-app) .card,
  body.pilot-survey-page:not(.is-native-app) .card {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--surface) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh;
    overflow: visible;
  }

  body.coach-app:not(.is-native-app) .shell,
  body.is-auth:not(.is-native-app) .shell,
  body.onboarding-page:not(.is-native-app) .shell,
  body.pilot-survey-page:not(.is-native-app) .shell {
    gap: 0;
    min-height: inherit;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.coach-app:not(.is-native-app) .content,
  body.is-auth:not(.is-native-app) .content,
  body.onboarding-page:not(.is-native-app) .content,
  body.pilot-survey-page:not(.is-native-app) .content {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--surface) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: var(--space-4);
    gap: var(--space-4);
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: 100%;
    overflow-x: clip;
  }

  body.coach-app:not(.is-native-app) .content {
    padding-bottom: calc(var(--app-tab-bar-total-h) + var(--space-6));
  }

  body.is-auth:not(.is-native-app) .content {
    padding: var(--space-5) var(--space-4);
    justify-content: center;
  }

  body.onboarding-page:not(.is-native-app) .content,
  body.pilot-survey-page:not(.is-native-app) .content {
    padding: 0;
  }

  /* Tab-Bar wie Native – Hamburger und Sidebar nur Desktop */
  body.coach-app:not(.is-native-app) .mobile-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: calc(var(--space-3) + env(safe-area-inset-top, 0px)) var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }

  body.coach-app:not(.is-native-app) .mobile-menu-btn,
  body.coach-app:not(.is-native-app) .sidebar,
  body.coach-app:not(.is-native-app) .mobile-backdrop {
    display: none !important;
  }

  body.coach-app:not(.is-native-app) .mobile-header__brand,
  body.coach-app:not(.is-native-app) .coach-patch--mobile {
    display: none;
  }

  body.coach-app:not(.is-native-app) .mobile-header__title {
    display: block;
    margin: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-md);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
  }

  body.coach-app:not(.is-native-app) .coach-page-head,
  body.coach-app:not(.is-native-app) .page-top > .coach-kicker,
  body.coach-app:not(.is-native-app) .page-top > h1.coach-title,
  body.coach-app:not(.is-native-app) .page-top > .coach-subtitle {
    display: none;
  }

  body.coach-app:not(.is-native-app) .page-top {
    overflow: visible;
    padding-bottom: var(--space-2);
  }

  body.coach-app:not(.is-native-app) .page-top:not(:has(.coach-section-nav)):not(:has(.cp-inline-section-nav)):not(:has(.mm-cal-controls)) {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
  }

  body.coach-app:not(.is-native-app) .site-footer {
    display: none;
  }

  body.coach-app:not(.is-native-app) .app-shell-legal--phone {
    display: block;
    margin-top: var(--space-8);
    padding: var(--space-4) 0 calc(var(--app-tab-bar-total-h) + var(--space-4));
  }

  body.coach-app:not(.is-native-app) .cd,
  body.coach-app:not(.is-native-app) .cd-hero-dashboard {
    gap: var(--space-4);
    min-width: 0;
    max-width: 100%;
  }

  body.coach-app:not(.is-native-app) .cd-hero-dashboard .cp-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }

  body.coach-app:not(.is-native-app) .cd-hero-dashboard .cp-stat {
    min-width: 0;
    overflow: hidden;
    padding: var(--space-3);
  }

  body.coach-app:not(.is-native-app) .cd-hero-dashboard .cp-stat__value {
    font-size: var(--text-lg);
  }

  body.coach-app:not(.is-native-app) .cd-team-id {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
  }

  body.coach-app:not(.is-native-app) .cd-team-mark {
    width: 44px;
    height: 44px;
  }

  body.coach-app:not(.is-native-app) .cd-next-step .btn--primary,
  body.coach-app:not(.is-native-app) .cd-alert-v2__actions .btn,
  body.coach-app:not(.is-native-app) .cd-alert-v2__actions button[type="submit"].btn {
    width: 100%;
    max-width: 100%;
  }

  body.coach-app:not(.is-native-app) .cd-alert-v2 {
    flex-direction: column;
    align-items: stretch;
  }

  body.coach-app:not(.is-native-app) .cd-card__head h2 {
    font-size: var(--text-lg);
  }

  /* Segment-Schiene wie Native – keine Fade-Maske, kein Abschneiden */
  body.coach-app:not(.is-native-app) .portal-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    gap: 3px;
    margin-top: 0;
    margin-bottom: var(--space-4);
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    -webkit-mask-image: none;
    mask-image: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs::-webkit-scrollbar {
    display: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs > a.portal-tabs__tab,
  body.coach-app:not(.is-native-app) .portal-tabs > button.portal-tabs__tab,
  body.coach-app:not(.is-native-app) .portal-tabs--balanced > a.portal-tabs__tab,
  body.coach-app:not(.is-native-app) .portal-tabs--balanced > button.portal-tabs__tab,
  body.coach-app:not(.is-native-app) .portal-tabs--secondary > a.portal-tabs__tab,
  body.coach-app:not(.is-native-app) .portal-tabs--secondary > button.portal-tabs__tab {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: var(--space-1);
    min-height: 44px;
    margin-bottom: 0;
    padding: var(--space-2) var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: transparent;
    box-shadow: none;
    color: var(--text-dim);
    font-size: var(--text-sm);
  }

  body.coach-app:not(.is-native-app) .portal-tabs > a.portal-tabs__tab.is-active,
  body.coach-app:not(.is-native-app) .portal-tabs > a.portal-tabs__tab.is-active:visited,
  body.coach-app:not(.is-native-app) .portal-tabs > button.portal-tabs__tab.is-active {
    background: var(--primary-soft);
    border-color: color-mix(in oklab, var(--primary) 38%, var(--border));
    color: var(--text-primary) !important;
    box-shadow: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs > a.portal-tabs__tab.is-active::before,
  body.coach-app:not(.is-native-app) .portal-tabs > button.portal-tabs__tab.is-active::before {
    display: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs__hint {
    display: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs__icon:not(:has(.portal-tabs__lock)) {
    display: none;
  }

  body.coach-app:not(.is-native-app) .portal-tabs__label {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
  }

  [data-theme="light"] body.coach-app:not(.is-native-app) .portal-tabs {
    background: var(--surface-elevated);
    border-color: var(--border);
  }

  body.coach-app:not(.is-native-app) .ct-invite-bar__link-btn {
    display: none;
  }

  body.is-auth:not(.is-native-app) .auth-wrap {
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    justify-content: center;
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }

  body.is-auth:not(.is-native-app) .auth-card .btn[type="submit"] {
    min-height: 48px;
  }

  body.onboarding-page:not(.is-native-app) .ob {
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding-top: var(--space-2);
  }

  body.onboarding-page:not(.is-native-app) .ob.auth-setup {
    padding-top: clamp(var(--space-12), 14dvh, 7rem);
  }

  body.onboarding-page:not(.is-native-app) .ob__nav .btn {
    min-height: 48px;
  }

  [data-theme="light"] body.coach-app:not(.is-native-app),
  [data-theme="light"] body.coach-app:not(.is-native-app) .card,
  [data-theme="light"] body.coach-app:not(.is-native-app) .content,
  [data-theme="light"] body.is-auth:not(.is-native-app),
  [data-theme="light"] body.is-auth:not(.is-native-app) .card,
  [data-theme="light"] body.is-auth:not(.is-native-app) .content {
    background: var(--surface) !important;
  }
}

@media (min-width: 981px) {
  body.coach-app:not(.is-native-app) .app-tab-bar--coach,
  body.coach-app:not(.is-native-app) .app-more-sheet {
    display: none !important;
  }
}

.mobile-header__title {
  display: none;
}

.app-shell-legal--phone {
  display: none;
}
