/* 搜索页只有一个纵向滚动容器，影片与小说共用；不改主页面滚动链。 */
#page-search { min-height: 0; overflow: hidden; }
#page-search .search-header { flex: 0 0 auto; }
#page-search .search-header input { min-width: 0; }
#search-scroll {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
#search-results { flex: none; overflow: visible; min-height: 0; }
#search-results.book-search-results { padding-bottom: 0; }
#search-results > .empty-tip, #search-results > .loading-center { grid-column: 1 / -1; }
#search-discovery[hidden] { display: none; }
#search-discovery { padding: 8px 16px 20px; }
.search-history, .search-hot { padding: 8px 0 16px; }
.search-discovery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.search-discovery-head h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 600; }
.search-discovery-note { color: var(--text-gray); font-size: 12px; line-height: 1.6; margin: 4px 0 10px; }
.search-discovery-head .search-discovery-note { margin: 0; }
.search-history-clear { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--text-gray); font-size: 13px; }
.search-history-clear:disabled { opacity: .45; }
.search-history-list { display: flex; flex-wrap: wrap; gap: 8px; }
.search-history-word { max-width: 100%; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 20px; background: var(--card-bg); color: var(--text); font-size: 14px; overflow-wrap: anywhere; text-align: left; }
.search-hot-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 12px; }
.search-hot-word { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 12px 0; border: 0; background: transparent; color: var(--text); text-align: left; font-size: 14px; }
.search-hot-keyword { min-width: 0; overflow-wrap: anywhere; }
.search-hot-rank { flex: 0 0 20px; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-gray); }
.search-hot-word:nth-child(-n+3) .search-hot-rank { color: var(--brand); font-weight: 600; }
.search-hot-list > .search-discovery-note { grid-column: 1 / -1; }
.search-history-word:focus-visible, .search-hot-word:focus-visible, .search-history-clear:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
