/* =====================================================================
   TELEFON DÜZENLEMELERİ
   Yalnızca dar ekranlarda (640px ve altı) çalışır; bilgisayar görünümüne
   hiçbir etkisi yoktur. style.css'ten SONRA yüklenmelidir.
   ===================================================================== */
@media (max-width: 640px) {
  body { padding-bottom: 96px; overflow-x: hidden; }
  input, select, textarea { font-size: 16px !important; } /* iOS'ta odaklanınca yakınlaşmayı engeller */

  .app-container { padding: 12px 12px 0; }
  .main-header { margin-bottom: 14px; }

  .header-top-row { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 12px; }
  .header-top-row > div { width: 100%; }
  .brand { text-align: center; }
  .brand h1 { font-size: 26px; }
  .header-top-row > div:last-child { display: flex; gap: 8px; }
  .search-container { flex: 1; min-width: 0; }
  .search-input-wrapper, .search-input-wrapper:focus-within { width: 100%; }
  .search-results-dropdown { width: calc(100vw - 24px); right: auto; left: 0; max-height: 60vh; }
  .user-profile-badge { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  #displayLibraryName { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
  .profile-dropdown { right: 0; width: 210px; }

  .nav-tabs { overflow-x: auto; flex-wrap: nowrap; gap: 4px; padding-bottom: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-btn { flex: 0 0 auto; font-size: 12.5px; padding: 8px 11px; white-space: nowrap; }
  .nav-btn svg { width: 15px; height: 15px; }

  .content-wrapper { gap: 16px; }
  .card { padding: 14px; }
  .section-header h2, #monthlyPageHeader { font-size: 19px; }
  #tab-monthly > div:first-child { flex-wrap: wrap; gap: 8px; }

  .goal-card { gap: 14px; margin-bottom: 18px; }
  .goal-progress-circle { width: 68px; height: 68px; }

  .books-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
  .book-card { padding: 8px; }
  .book-cover-box { height: 148px; }
  .add-book-card { height: 214px; }

  .sidebar-column { width: 100%; }

  /* Kitap detay sayfası */
  .full-page-detail { padding: 12px 10px 40px; }
  .detail-header-bar { margin-bottom: 12px; }
  .journal-paper-container { padding: 14px; gap: 16px; }
  .journal-left { max-width: 190px; }
  .cover-wrapper { height: 270px; }
  #jTitle { font-size: 21px !important; }
  .journal-box h3 { font-size: 15px; }
  .journal-right > .journal-box > div:first-child { flex-wrap: wrap; gap: 8px; }
  #jToggleReadBtnTop { margin-left: 0 !important; }
  .format-options, .genre-options { flex-wrap: wrap !important; }
  .format-btn, .genre-btn { height: 32px !important; font-size: 11.5px !important; padding: 0 10px !important; }
  .delete-book-btn-right { padding: 7px 12px; }
  #saveAllDetailsBtn { padding: 10px 14px; }

  /* Pencereler */
  .modal-overlay { padding: 14px; align-items: flex-start; overflow-y: auto; }
  .modal-card { max-width: 100%; margin: auto; padding: 18px; max-height: calc(100vh - 28px); overflow-y: auto; }
  .months-grid-picker { grid-template-columns: repeat(3, 1fr); }

  .toast-notification { left: 12px; right: 12px; bottom: 12px; text-align: center; }
  .auth-card { padding: 28px 20px; }
}
