/* ALEXPOCKET mobile readability patch — 2026-11-25
   Targets phones (including iPhone Pro Max) without changing desktop layout. */
@media (max-width: 600px) {
  html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    font-size: 17px;
    line-height: 1.55;
  }

  .app-shell {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .main-area {
    padding: 0 18px 28px;
  }

  .topbar {
    min-height: 82px;
    gap: 10px;
  }

  .topbar-left { gap: 10px; }
  .mobile-brand { gap: 9px; }
  .mobile-brand .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    font-size: 22px;
  }
  .mobile-brand-name {
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: .025em;
  }
  .mobile-brand-tag {
    margin-top: 3px;
    font-size: 10px;
    letter-spacing: .08em;
  }
  .page-title {
    font-size: 25px;
    line-height: 1.2;
  }
  .topbar .btn {
    min-height: 48px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 15px;
  }

  .page-content { padding-top: 22px; }
  .welcome-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
  }
  .welcome-title {
    font-size: 25px;
    line-height: 1.25;
  }
  .welcome-sub {
    margin-top: 7px;
    font-size: 16px;
    line-height: 1.55;
  }
  .workspace-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
  }
  .workspace-tabs button {
    min-height: 45px;
    padding: 0 12px;
    font-size: 15px;
    border-radius: 9px;
  }

  /* Financial overview cards: larger amounts and labels. */
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .summary-card {
    min-height: 142px;
    padding: 17px 15px 15px;
    border-radius: 16px;
  }
  .summary-top {
    align-items: center;
    gap: 7px;
    font-size: 15px;
    line-height: 1.35;
  }
  .summary-icon {
    flex: none;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    font-size: 17px;
  }
  .summary-value {
    margin-top: 14px;
    font-size: clamp(22px, 5.8vw, 27px);
    line-height: 1.2;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
  }
  .summary-foot {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
  }

  .dashboard-grid,
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 16px;
  }
  .panel { border-radius: 16px; }
  .panel-head { padding: 19px 17px 14px; gap: 10px; }
  .panel-title { font-size: 18px; line-height: 1.3; }
  .panel-sub { font-size: 15px; line-height: 1.5; }
  .link-btn { min-height: 42px; font-size: 15px; }
  .chart-wrap { padding: 7px 15px 18px; }
  .chart-legend { gap: 15px; font-size: 14px; }
  .legend-dot { width: 9px; height: 9px; }
  .bar-chart { height: 205px; gap: 10px; }
  .bar-pair { height: 155px; gap: 4px; }
  .bar { width: 13px; }
  .bar-label { font-size: 14px; }

  .recent-list { padding: 0 17px 10px; }
  .transaction-row { gap: 11px; padding: 15px 0; }
  .transaction-mark {
    width: 41px;
    height: 41px;
    border-radius: 12px;
    font-size: 18px;
  }
  .transaction-name {
    font-size: 16px;
    line-height: 1.35;
  }
  .transaction-meta {
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.4;
  }
  .transaction-amount {
    font-size: 15px;
    line-height: 1.3;
  }

  /* Accounts and balances. */
  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .account-card { padding: 17px 15px; border-radius: 15px; }
  .account-icon { width: 39px; height: 39px; font-size: 20px; }
  .account-name { margin-top: 13px; font-size: 15px; line-height: 1.35; }
  .account-type { font-size: 14px; line-height: 1.35; }
  .account-balance { margin-top: 7px; font-size: 22px; line-height: 1.2; }

  /* Budgets, savings goals and reports. */
  .plan-section-head { align-items: stretch; gap: 13px; margin-bottom: 18px; }
  .plan-section-head h2 { font-size: 24px; line-height: 1.25; }
  .plan-section-head p { font-size: 16px; line-height: 1.55; }
  .plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .plan-actions .btn { min-height: 49px; padding: 0 10px; font-size: 15px; }
  .plan-section-title { margin: 23px 0 13px; font-size: 16px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .plan-card { padding: 18px; border-radius: 16px; }
  .plan-card h3 { font-size: 19px; line-height: 1.3; }
  .plan-label { font-size: 13px; line-height: 1.35; letter-spacing: .08em; }
  .plan-icon { width: 41px; height: 41px; font-size: 20px; }
  .plan-meta { margin-top: 8px; font-size: 15px; line-height: 1.45; }
  .plan-amount-row { margin-top: 18px; gap: 7px; }
  .plan-amount-row strong { font-size: 25px; line-height: 1.2; }
  .plan-amount-row span { font-size: 15px; }
  .progress-track { height: 11px; margin-top: 15px; }
  .plan-foot { margin-top: 11px; font-size: 15px; line-height: 1.45; }
  .goal-add { min-height: 49px; margin-top: 17px; font-size: 15px; }
  .plan-empty { padding: 19px; font-size: 16px; line-height: 1.6; }
  .report-note { padding: 18px; font-size: 16px; line-height: 1.6; }
  .report-month { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .report-month-label { font-size: 14px; }

  /* Transactions, filters and tables. */
  .table-toolbar { padding: 15px; gap: 12px; }
  .filters { gap: 8px; }
  .filter-btn {
    min-height: 44px;
    padding: 0 13px;
    font-size: 15px;
  }
  .transaction-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .transaction-filters .field:first-child { grid-column: auto; }
  .transaction-filters .field label,
  .field label { font-size: 16px; line-height: 1.35; }
  .transaction-filters .field input,
  .transaction-filters .field select,
  .field input,
  .field select,
  .field textarea {
    min-height: 54px;
    padding: 12px 14px;
    font-size: 17px;
    line-height: 1.4;
  }
  .field textarea { min-height: 105px; }
  .filter-actions { grid-template-columns: 1fr 1fr; gap: 9px; }
  .filter-actions .btn { min-height: 49px; font-size: 15px; }
  .table-scroll th { padding: 14px 13px; font-size: 13px; }
  .table-scroll td { padding: 15px 13px; font-size: 15px; }
  .table-scroll td strong { font-size: 16px; }
  .type-tag { padding: 6px 9px; font-size: 13px; }
  .row-actions { width: 42px; height: 42px; font-size: 20px; }
  .secondary-toolbar .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secondary-toolbar .btn { min-height: 48px; font-size: 15px; }
  .recurring-list, .transfer-list, .audit-list { padding: 0 17px 13px; }
  .recurring-row, .transfer-row { gap: 10px; padding: 15px 0; }
  .recurring-mark, .transfer-mark { width: 42px; height: 42px; font-size: 19px; }
  .recurring-main strong, .transfer-main strong { font-size: 16px; }
  .recurring-main span, .transfer-main span { font-size: 14px; line-height: 1.45; }
  .recurring-amount, .transfer-value { font-size: 15px; }
  .btn-ghost { min-height: 43px; padding: 0 12px; font-size: 14px; }
  .audit-row { grid-template-columns: 95px minmax(0, 1fr); gap: 7px 11px; font-size: 14px; }
  .form-hint, .csv-preview-result { font-size: 15px; line-height: 1.55; }

  /* Navigation and touch targets. */
  .mobile-bottom-nav {
    gap: 3px;
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav button {
    min-height: 62px;
    gap: 5px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.2;
  }
  .mobile-bottom-nav .nav-icon { font-size: 22px; }
  .btn { min-height: 50px; padding-left: 16px; padding-right: 16px; font-size: 16px; }

  /* Bottom-sheet forms and login page. */
  .modal-backdrop { padding: 0; align-items: end; }
  .modal {
    width: 100%;
    max-height: 94dvh;
    border-radius: 21px 21px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-head { padding: 20px 19px; }
  .modal-title { font-size: 21px; }
  .modal-body { padding: 19px 19px 23px; gap: 17px; }
  .close-btn { width: 44px; height: 44px; font-size: 24px; }
  .modal-actions { gap: 10px; }
  .modal-actions .btn { min-height: 52px; font-size: 16px; }
  .login-visual { min-height: 290px; padding: 28px 22px 24px; }
  .login-brand-title { font-size: 20px; }
  .login-brand-tag { font-size: 11px; }
  .login-copy { padding: 38px 0 24px; }
  .login-copy h1 { font-size: clamp(36px, 9vw, 42px); line-height: 1.08; }
  .login-copy p { font-size: 16px; line-height: 1.6; }
  .login-form-wrap { padding: 32px 22px 48px; }
  .login-form h2 { font-size: 32px; line-height: 1.2; }
  .login-form .intro { font-size: 17px; line-height: 1.55; }
  .login-form .field label { font-size: 16px; }
  .login-form .field input { min-height: 58px; font-size: 18px; }
  .login-form .btn { min-height: 56px; font-size: 17px; }
  .login-help { font-size: 14px; line-height: 1.55; }
  .empty-state, .plan-empty { font-size: 16px; line-height: 1.6; }
  .toast { padding: 15px 17px; font-size: 16px; line-height: 1.45; }
}

@media (max-width: 850px) { .mobile-bottom-nav.business-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); } }


/* Personal Intelligence adds an eighth destination; keep mobile navigation in two balanced rows. */
@media (max-width: 850px) {
  .app-shell { padding-bottom: calc(154px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav, .mobile-bottom-nav.business-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-bottom-nav button { min-height: 55px; }
}
