/* Shared search discovery: horizontal cards on desktop and mobile. */
.header-search { text-decoration:none; }
.header-search .search-input { display:flex; align-items:center; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.header-search .search-input--placeholder { color:#9b9b9b; }
.search-discovery { display:flex; flex-direction:column; gap:24px; min-width:0; }
.search-discovery [data-search-content] { display:flex; flex-direction:column; gap:40px; }
.search-discovery h2, .search-discovery h3, .search-discovery p { margin:0; }
.search-discovery h2 { display:flex; align-items:center; gap:8px; color:rgba(255,255,255,.9); font-size:14px; line-height:20px; font-weight:500; }
.search-discovery-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.search-discovery button { display:inline-flex; align-items:center; justify-content:center; gap:4px; border:0; background:transparent; color:rgba(255,255,255,.35); font:inherit; font-size:12px; line-height:18px; cursor:pointer; padding:4px 0; }
.search-discovery button:disabled { opacity:.5; cursor:wait; }
.search-discovery button:hover { color:#ff4b02; }
.search-history-section, .search-keywords-section { display:flex; flex-direction:column; gap:14px; padding:24px; border:1px solid rgba(255,255,255,.08); border-radius:20px; background:rgba(255,255,255,.04); }
.search-history-tags, .search-keyword-tags { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.search-history-tags a, .search-keyword-tags a { padding:7px 15px; border:1px solid rgba(255,255,255,.05); border-radius:999px; background:rgba(255,255,255,.04); color:rgba(255,255,255,.55); font-size:12px; line-height:18px; text-decoration:none; max-width:100%; overflow-wrap:anywhere; }
.search-keyword-tags a { border-radius:9px; }
.search-history-tags a:is(:hover,:focus-visible,:active), .search-keyword-tags a:is(:hover,:focus-visible,:active) { color:#ff4b02; background:rgba(255,75,2,.1); border-color:rgba(255,75,2,.2); }
.search-recommend-section { display:flex; flex-direction:column; gap:24px; }
.search-recommend-section h2 { font-size:18px; line-height:28px; letter-spacing:.45px; }
.search-recommend-spark { color:#ff4b02; font-size:18px; }
.search-discovery .search-recommend-refresh { gap:4px; padding:4px 8px; }
.search-recommend-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.search-recommend-card { display:flex; min-width:0; gap:16px; padding:16px; border:1px solid rgba(255,255,255,.08); border-radius:20px; background:rgba(255,255,255,.05); color:#fff; text-decoration:none; transition:border-color .18s,background .18s; }
.search-recommend-card:hover { border-color:rgba(255,75,2,.5); background:rgba(255,255,255,.08); }
.search-recommend-cover { position:relative; flex:0 0 96px; width:96px; height:128px; overflow:hidden; border-radius:12px; background:#262626; }
.search-recommend-cover > img { display:block; width:100%; height:100%; object-fit:cover; }
.search-recommend-cover::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(0,0,0,.6),transparent 60%); pointer-events:none; }
.search-recommend-badge { position:absolute; top:6px; left:6px; z-index:1; padding:2px 6px; border-radius:999px; background:#ff4b02; color:#fff; font-size:9px; line-height:14px; }
.search-recommend-info { display:flex; flex:1; min-width:0; flex-direction:column; gap:4px; padding:2px 0; }
.search-recommend-info h3 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; min-height:40px; max-height:40px; overflow:hidden; overflow-wrap:anywhere; font-size:14px; font-weight:500; line-height:20px; }
.search-recommend-author, .search-recommend-tags { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:rgba(255,255,255,.35); font-size:11px; line-height:17px; }
.search-recommend-info .search-recommend-desc { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; color:rgba(255,255,255,.55); font-size:11px; line-height:16px; }
.search-recommend-info .search-recommend-tags { color:rgba(255,255,255,.55); }
.search-recommend-bottom { display:flex; justify-content:space-between; align-items:center; gap:4px; margin-top:auto; padding-top:4px; font-size:11px; line-height:17px; }
.search-recommend-heat { display:flex; align-items:center; gap:4px; color:#ff4b02; }
.search-recommend-play { white-space:nowrap; color:rgba(255,255,255,.7); padding:4px; }
.search-discovery-status { color:#888; font-size:12px; line-height:20px; }
.search-discovery a:focus-visible, .search-discovery button:focus-visible { outline:2px solid #ff4b02; outline-offset:3px; }
@media (min-width:768px) and (max-width:860px) { .search-recommend-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767px) {
 .search-discovery, .search-discovery [data-search-content] { gap:24px; }
 .search-history-section, .search-keywords-section { padding:0 0 24px; border:0; border-bottom:1px solid #262626; border-radius:0; background:transparent; }
 .search-discovery h2, .search-recommend-section h2 { font-size:16px; line-height:22px; font-weight:600; letter-spacing:0; }
 .search-history-icon, .search-history-clear img, .search-recommend-spark, .search-recommend-refresh img { display:none; }
 .search-history-tags { gap:10px; }
 .search-history-tags a { padding:6px 11px; background:#272727; border:1px solid transparent; }
 .search-recommend-section { gap:18px; }
 .search-recommend-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
 .search-discovery .search-recommend-refresh { padding:4px 0; }
}

.search-history-tags a:focus-visible, .search-keyword-tags a:focus-visible { outline:none; }
