@media (max-width: 768px) {

  /* ========= 1. LAYOUT FLIP ========= */

  body {
    height: auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 10px;
  }

  .main-wrap {
    overflow: visible;
  }

  .main {
    overflow-y: visible;
    padding: 16px;
  }

  .stats {
    display: none;
  }

  /* ========= 2. SC ARTIST ROWS ========= */

  .artist-row {
    grid-template-columns: 28px 36px 1fr;
    gap: 8px;
    padding: 12px 0;
  }
  .artist-row .consensus-score { grid-column: 1; grid-row: 1; }
  .artist-row img.artist-avatar,
  .artist-row .artist-avatar-empty { grid-column: 2; grid-row: 1; }
  .artist-row .artist-info { grid-column: 3; grid-row: 1; position: relative; padding-right: 28px; }
  .artist-row .stat-col { display: none; }
  .artist-row .liked-by { display: none; }
  .artist-row .add-ear-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-right: 24px;
  }
  .artist-row .bm-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .artist-row:hover {
    margin: 0;
    padding: 12px 0;
    background: none;
  }

  img.artist-avatar,
  .artist-avatar-empty {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
  }

  .consensus-score { font-size: 14px; }

  .artist-detail { padding-left: 0; }
  .artist-detail.open { padding-left: 0; padding-right: 0; }

  /* ========= 3. BC RELEASE ROWS ========= */

  .bc-release-row {
    grid-template-columns: 32px 36px 1fr;
    gap: 8px;
  }
  .bc-release-row .bc-score { grid-column: 1; grid-row: 1; }
  .bc-release-row .bc-art,
  .bc-release-row .bc-art-empty { grid-column: 2; grid-row: 1; }
  .bc-release-row .bc-info { grid-column: 3; grid-row: 1; padding-right: 28px; }
  .bc-release-row .bc-fans { display: none; }
  .bc-release-row .bm-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .bc-release-row:hover {
    margin: 0;
    padding: 11px 0;
    background: none;
  }
  .bc-art, .bc-art-empty {
    width: 36px;
    height: 36px;
  }
  .bc-score { font-size: 14px; }

  .bc-detail { padding-left: 0; }
  .bc-detail.open { padding-left: 0; }

  /* ========= 4. OTHER MODE ROWS ========= */

  .dc-release-row {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }
  .dc-release-row .dc-breakdown { display: none; }
  .dc-release-row:hover { margin: 0; padding: 11px 0; background: none; }

  .rym-release-row {
    grid-template-columns: 32px 1fr;
    gap: 8px;
  }
  .rym-release-row .rym-avg { display: none; }
  .rym-release-row:hover { margin: 0; padding: 11px 0; background: none; }

  .nina-release-row {
    grid-template-columns: 32px 1fr 20px;
    gap: 8px;
  }
  .nina-release-row .nina-pct { display: none; }
  .nina-release-row:hover { margin: 0; padding: 11px 0; background: none; }

  .irl-artist-row {
    grid-template-columns: 32px 1fr 20px;
    gap: 8px;
  }
  .irl-artist-row .irl-right { display: none; }
  .irl-artist-row:hover { margin: 0; padding: 11px 0; background: none; }

  .nts-artist-row {
    grid-template-columns: 32px 1fr 20px;
    gap: 8px;
  }
  .nts-artist-row .nts-right { display: none; }
  .nts-artist-row:hover { margin: 0; padding: 11px 0; background: none; }

  .blog-artist-row {
    grid-template-columns: 32px 1fr 20px;
    gap: 8px;
  }
  .blog-artist-row .blog-right { display: none; }
  .blog-artist-row:hover { margin: 0; padding: 11px 0; background: none; }

  /* SC all-likes view */
  .like-header {
    grid-template-columns: 1fr 20px;
  }
  .like-header .stat-col,
  .like-header .track-liked-by {
    display: none;
  }

  /* ========= 5. TYPOGRAPHY ========= */

  body { font-size: 14px; }
  .section-label { font-size: 10px; margin-bottom: 4px; }

  .artist-name, .bc-title, .dc-title, .rym-title,
  .nina-title, .irl-name, .nts-name, .blog-name {
    font-size: 14px;
  }

  .artist-meta, .bc-artist, .dc-artist, .dc-meta,
  .rym-artist, .rym-genres, .nina-artist, .irl-meta,
  .nts-meta, .blog-meta {
    font-size: 12px;
  }

  .track-title { font-size: 13px; }
  .header h2 { font-size: 12px; }
  .depth-desc { font-size: 10px; }
  .stats { font-size: 12px; }
  .progress { font-size: 12px; }

  /* ========= 6. TOUCH TARGETS ========= */

  .mode-btn {
    padding: 10px 12px;
    font-size: 11px;
  }
  .mode-btn svg.mode-icon {
    width: 14px;
    height: 14px;
  }

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

  .action-btn {
    padding: 14px;
    font-size: 12px;
  }

  .add-ear input, .scene-save input, .add-seed input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .add-ear button, .scene-save button, .add-seed button {
    font-size: 12px;
    padding: 10px 14px;
  }

  .ear {
    padding: 8px 0;
  }
  .ear-name {
    font-size: 13px;
  }
  .ear-remove {
    font-size: 18px;
    padding: 4px 8px;
  }

  .scene-tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .save-trigger {
    font-size: 13px;
    padding: 8px 0;
  }

  /* ========= 7. STICKY VIEW TOGGLES ========= */

  .main-toggles {
    padding: 6px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }

  .main-toggles .view-toggle {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }


  .main-toggles .view-toggle::-webkit-scrollbar {
    display: none;
  }
  .main-toggles .view-toggle .view-btn {
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 12px;
  }

  /* ========= 8. EMBEDS ========= */

  .sc-embed iframe,
  .bc-embed iframe {
    height: 140px;
  }
  .sc-embed[data-sc-url] { min-height: 140px; }

  .track-row {
    padding: 8px 0;
    flex-wrap: wrap;
  }

  /* ========= 9. MODALS ========= */

  .modal {
    padding: 24px 20px 20px;
    max-width: none;
    width: 92%;
  }
  .modal p { font-size: 13px; }

  .saved-item .saved-name { font-size: 13px; }
  .saved-item .saved-meta { font-size: 11px; }
  .saved-item { padding: 12px 0; }

  /* ========= 10. AUTOCOMPLETE ========= */

  .ac-item {
    padding: 10px 12px;
    font-size: 13px;
  }
  .ac-drop {
    max-height: 200px;
  }

  /* ========= 11. EMPTY STATE ========= */

  .empty-state {
    min-height: 50vh;
  }
  .empty-state .hint {
    font-size: 14px;
    max-width: none;
    padding: 0 8px;
  }

  .spinner {
    height: 40vh;
  }

  /* ========= 12. LOGO ========= */

  .sidebar > div:first-child {
    padding-bottom: 0 !important;
  }
  .sidebar > div:first-child img {
    max-width: 100px !important;
  }

  /* ========= 13. SUGGESTIONS ========= */

  .ear-suggestion {
    padding: 8px 10px;
    font-size: 12px;
  }
  .ear-suggestion .sug-name {
    font-size: 12px;
  }

  /* ========= 14. HOVER REMOVAL ========= */

  @media (hover: none) {
    .ear:hover .ear-name { color: inherit; }
    .scene-tag:hover {
      border-color: var(--border);
      color: var(--text);
    }
  }
}
