/* SmartLab mobile guardrails: all content stays inside the device viewport. */
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

@media (max-width: 900px) {
  body { padding-bottom: 68px; }
  .container { max-width: 100%; padding-right: 18px; padding-left: 18px; }
  .custom-navbar { height: 72px; padding: 11px 0; }
  .nav-inner { height: 50px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-name { font-size: 17px; }
  .fullscreen-menu { padding: 24px 18px; }
  .close-menu-btn { top: 15px; right: 14px; }
  .hero-section { min-height: 0; padding: 126px 0 76px; }
  .hero-grid { display: grid; grid-template-columns: 1fr; gap: 38px; min-height: 0; }
  .hero-art { order: -1; }
  .hero-art img { width: min(100%, 360px); height: auto; aspect-ratio: 1; }
  .hero-copy { width: 100%; max-width: none; }
  .badge-premium { margin-bottom: 12px; font-size: 10px; }
  .hero-main-title { max-width: 100%; margin-bottom: 24px; font-size: clamp(35px, 9.6vw, 52px); line-height: 1.14; overflow-wrap: anywhere; }
  .hero-subtitle { max-width: 100%; margin-bottom: 24px; font-size: 15px; line-height: 1.65; }
  .hero-action-hub-inline { max-width: none; }
  .hero-actions { gap: 10px; margin: 12px 0; }
  .button { min-height: 48px; }
  .metrics-container { margin-top: -16px; }
  .metrics-grid { grid-template-columns: 1fr; gap: 0; padding-right: 14px; padding-left: 14px; }
  .metric-item-card { padding: 18px 14px; border-radius: 0; box-shadow: none; }
  .metric-item-card:first-child { border-radius: 16px 16px 0 0; }
  .metric-item-card:last-child { border-radius: 0 0 16px 16px; }
  .metric-item-card + .metric-item-card { border-top: 0; }
  .metric-value { font-size: 27px; }
  .metric-title { margin-top: 4px; font-size: 12px; }
  .content-section, .steps-section { padding: 58px 0; }
  .section-heading { margin-bottom: 30px; }
  .section-heading h2, .cta-section h2 { font-size: clamp(28px, 8vw, 36px); overflow-wrap: anywhere; }
  .section-heading p { margin-top: 12px; }
  .feature-grid, .steps-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { min-height: 0; padding: 24px; }
  .steps-grid article { padding: 10px 0; }
  .cta-section { padding: 0 0 28px; }
  .premium-cta-banner { padding: 40px 22px; border-radius: 18px; }
  .auth-page, .dashboard-page { min-height: calc(100vh - 72px); padding: 28px 14px 84px; }
  .auth-card, .dashboard-card { width: 100%; max-width: 520px; padding: 28px 20px; border-radius: 18px; }
  .auth-card h1, .dashboard-card h1 { font-size: clamp(30px, 8vw, 36px); overflow-wrap: anywhere; }
  .task-row { width: 100%; align-items: stretch; flex-direction: column; gap: 12px; }
  .task-row form, .task-row .button { width: 100%; }
  .dashboard-actions { display: grid; grid-template-columns: 1fr; }
  .dashboard-actions .button { width: 100%; }
  .admin-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .admin-actions form, .admin-actions .button { width: 100%; }
  .appBottomMenu { padding-bottom: env(safe-area-inset-bottom); }
  .appBottomMenu .item { flex-direction: column; gap: 3px; justify-content: center; }
  .appBottomMenu .bottom-icon { margin-right: 0; font-size: 19px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 16px; }
  .menu-container-box { width: 100%; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .hero-actions .button { width: 100%; padding-right: 8px; padding-left: 8px; }
  .free-investment-box { font-size: 12px; }
  .metrics-grid { padding-right: 12px; padding-left: 12px; }
  .history-row { align-items: flex-start; flex-direction: column; }
  .amount-positive { align-self: flex-end; }
}
