/* GutScore mobile-app shell — added 2026-10-26 with Healthy Flow merge.
   Desktop layout is untouched. Only small screens get the app treatment. */
:root { --app-bar-height: 64px; }

/* Safe-area + no horizontal overflow on phones */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
  body { padding-bottom: env(safe-area-inset-bottom, 0px); }

  /* Workspace: sidebar becomes a compact top strip, tabs move to a bottom bar */
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 14px 6px; gap: 10px; }
  .sidebar .sidebar-note { display: none; }
  .sidebar nav { display: none; }
  .sidebar .language-switcher { margin: 6px 0 0; }
  .workspace-main { padding: 16px 14px calc(92px + env(safe-area-inset-bottom, 0px)); }

  .mobile-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.97); backdrop-filter: blur(18px);
    box-shadow: 0 -8px 30px rgba(24,36,29,.12);
  }
  .mobile-tabbar button {
    min-width: 0; min-height: 48px; padding: 6px 2px; border: 0; border-radius: 12px;
    background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 800; line-height: 1.2;
  }
  .mobile-tabbar button.active { background: var(--green-soft); color: var(--green-dark); }

  /* Public assessment + login: full-width, thumb-friendly */
  .public-assessment-page { width: min(100% - 16px, 1480px); }
  .public-assessment-actions, .customer-actions { display: grid; }
  .public-assessment-actions button, .customer-actions button, .customer-actions a,
  .primary-button, .secondary-button { min-height: 48px; }
  input, select, textarea { min-height: 46px; font-size: 16px; } /* stops iOS zoom on focus */
  .panel, .login-card { border-radius: 20px; }
  .page-hero h1 { font-size: 34px; }

  /* Healthy Flow tab cards */
  .flow-grid { grid-template-columns: 1fr; }
}

/* Desktop: bottom tab bar is hidden, sidebar nav is the only nav */
.mobile-tabbar { display: none; }
@media (max-width: 720px) { .mobile-tabbar { display: grid; } }

/* Healthy Flow tab (all sizes) */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 18px; }
.flow-card { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.flow-card-emoji { font-size: 34px; }
.flow-card h3 { margin: 10px 0 6px; font-family: "Playfair Display", Georgia, serif; font-size: 22px; }
.flow-card-open { display: inline-block; margin-top: 8px; text-decoration: none; text-align: center; }
.flow-card-pdfs { margin-top: 12px; font-size: 13px; }
.flow-card-pdfs a { font-weight: 800; }

/* Install-app floating button + tip (same pattern as Healthy Flow's install button) */
.gs-install-btn {
  position: fixed; right: 16px; bottom: 88px; z-index: 1001;
  padding: 12px 18px; border: 0; border-radius: 999px;
  background: #165638; color: #fff; font-weight: 900; font-size: 14px;
  box-shadow: 0 10px 30px rgba(22,86,56,.35);
}
@media (min-width: 721px) { .gs-install-btn { bottom: 24px; } }
.gs-install-tip {
  position: fixed; left: 16px; right: 16px; bottom: 88px; z-index: 1002; max-width: 420px; margin: 0 auto;
  padding: 18px; border-radius: 20px; background: #fff; color: #18241d;
  box-shadow: 0 22px 70px rgba(24,36,29,.25); font-size: 14px; line-height: 1.55;
}
.gs-install-tip button { margin-top: 10px; }
