html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-size: 16px;
}

button,
.nav-link,
.rating-btn,
.drag-item {
  touch-action: manipulation;
}

@media (max-width: 700px) {
  .page-header {
    padding: 1rem 1rem 0;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .main-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: .5rem;
    overflow-x: auto;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: .65rem 1rem .85rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 38px;
    padding: .45rem .65rem;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .container {
    width: 100%;
    padding: 1.25rem .85rem 5.5rem;
  }

  .page-intro {
    margin-bottom: 1.25rem;
  }

  .page-intro h2 {
    font-size: 1.15rem;
  }

  .question-card,
  .commitment-card,
  .item-card,
  .generate-card,
  .intake-panel,
  .context-panel,
  #plan-output,
  #roadmap-output,
  #synthesis-output,
  .profile-rendered,
  .direction-card,
  .commitment-work-card {
    border-radius: 8px;
    padding: 1rem;
  }

  textarea {
    min-height: 112px;
  }

  button {
    width: 100%;
    min-height: 44px;
    padding: .78rem 1rem;
  }

  .submit-row,
  .submit-bar,
  .save-bar,
  .feedback-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rating-buttons {
    flex-direction: column;
  }

  .rating-btn {
    min-height: 44px;
  }

  .progress-row {
    align-items: stretch;
    flex-direction: column;
    gap: .45rem;
  }

  .progress-label {
    min-width: 0;
  }
}
