/* File: /css/mobile.css (or appended to components.css) */
/* Purpose: phone-first fixes for spacing, horizontal scroll controls, and swipe gallery */

@media (max-width: 600px) {
  /* Page spacing */
  .page {
    padding-top: 32px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Coming soon button/panel */
  .coming-soon-btn {
    top: 12px;
    left: 12px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .coming-soon-panel {
    top: 48px;
    left: 12px;
    width: 280px;
    max-width: calc(100vw - 24px);
    border-radius: 12px;
  }

  /* Logo */
  .logo-wrap {
    margin-bottom: 18px;
  }

  .logo-wrap img {
    width: 72px;
    height: 72px;
  }

  /* Search */
  .search-wrap {
    margin: 0 auto 18px;
  }

  .search-inner input {
    padding: 12px 44px 12px 16px;
    font-size: 14px;
  }

  .search-icon {
    right: 14px;
  }

  /* Category buttons: tighter + still scrollable */
  .category-buttons {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 6px;
  }

  .category-btn {
    padding: 9px 18px;
    font-size: 12px;
    letter-spacing: 0.10em;
  }

  /* Chips: tighter + still scrollable */
  .chips-strip-wrap {
    margin-bottom: 10px;
  }

  .chips-strip {
    gap: 8px;
    padding: 4px 2px 8px;
  }

  .chip {
    padding: 7px 14px;
    font-size: 12px;
  }

  /* Topic card */
  .topic-card {
    padding: 18px 16px 12px;
    border-radius: 16px;
    margin: 0 auto 16px;
  }

  .topic-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .topic-card ul {
    font-size: 13px;
  }

  /* Topic actions row */
  .topic-actions {
    gap: 8px;
  }

  .small-btn {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Stack study buttons but keep them centered */
  .feature-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 10px;
  }

  .feature-grid button {
    width: 70%;
    min-width: 0;
    max-width: 260px;
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Feature output */
  .feature-output {
    max-height: 220px;
    font-size: 12px;
  }

  /* Gallery: full-width swipe cards on phones */
  .jc-gallery {
    gap: 12px;
    padding: 8px 2px 10px;
  }

  .jc-gallery-item {
    flex: 0 0 92%;
  }

  .jc-gallery-card {
    padding: 14px;
    border-radius: 14px;
  }

  .jc-gallery-placeholder {
    height: 220px;
  }

  .jc-gallery-title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .jc-gallery-expl {
    font-size: 13px;
  }

  .jc-gallery-controls {
    justify-content: space-between;
  }
}