@media (max-width: 640px) {
      #new-snapshot-modal #draft-assets-table.ds-draft-table,
      #new-snapshot-modal #draft-liabilities-table.ds-draft-table {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
      }
      #new-snapshot-modal #draft-assets-table {
        min-width: 36rem;
      }
      #new-snapshot-modal .ds-draft-table .ds-col-draft-symbol {
        width: 7rem;
        min-width: 7rem;
      }
      #new-snapshot-modal .ds-draft-table .ds-col-draft-type {
        width: 8rem;
        min-width: 8rem;
      }
      #new-snapshot-modal .ds-draft-table .ds-col-draft-notes {
        width: 7rem;
        min-width: 7rem;
      }
      #new-snapshot-modal .ds-draft-table .ds-col-draft-num {
        width: 6rem;
        min-width: 6rem;
      }
      #new-snapshot-modal .ds-draft-table .ds-col-draft-venue {
        width: 8.5rem;
        min-width: 8.5rem;
        max-width: none;
      }
      #new-snapshot-modal #draft-liabilities-table .ds-col-liability-bank {
        width: 8rem;
        min-width: 8rem;
        max-width: none;
      }

      .ds-summary-actions {
        margin-left: var(--ds-space-2);
        gap: var(--ds-space-2);
      }
      /* Draft modal + rails stay ≥16px — do not inherit the compact D1 gap */
      #new-snapshot-modal .ds-summary-actions {
        margin-left: var(--ds-space-4);
        gap: var(--ds-space-4);
      }
      .ds-subgroup {
        margin-left: var(--ds-space-2);
      }

      .ds-stat-grid {
        grid-template-columns: 1fr;
      }
      /* Beat desktop #new-snapshot-modal #draft-re-body .ds-stat-grid (2 IDs) */
      #new-snapshot-modal #draft-re-body .ds-stat-grid {
        grid-template-columns: 1fr;
      }

      /* draft table scroll: .ds-draft-table-scroll (horizontal only) */

      /* Touch has no hover — keep row remove visible */
      .ds-btn-remove {
        opacity: 0.85;
        min-width: 2.75rem;
        min-height: 2.75rem;
      }

      /* Avoid iOS focus zoom (<16px) on edit fields */
      .ds-input,
      .ds-auth-gate input,
      #new-snapshot-modal input,
      #new-snapshot-modal select,
      #add-symbol-modal input {
        font-size: 16px;
      }
    }
    @media (max-width: 640px) {
      /* Date control: full-width on phone but content start-aligned (not centered) */
      #new-snapshot-modal .ds-modal-field {
        text-align: start;
        align-self: stretch;
      }
      #new-snapshot-modal #new-date.ds-date-input,
      #new-snapshot-modal #new-date.ds-input {
        max-width: none;
        width: 100%;
        margin-inline: 0;
        text-align: start;
        padding: 0.45rem 1rem 0.45rem 0.75rem;
      }
      #new-snapshot-modal #new-date::-webkit-date-and-time-value {
        text-align: start;
        margin-inline: 0;
      }

}
