/* 搜索反馈与筛选状态覆盖；保持在 site-modern.css 之后加载。 */
/* v20.0.8：搜索反馈增强 */
.search-count{
  white-space:nowrap;
  color:var(--muted);
}
.toolbar-panel.is-search-empty,
.tools-command-center.is-search-empty,
.friend-search-box.is-search-empty,
.searchbox.is-search-empty{
  animation: songline-search-shake .42s ease;
  border-color:rgba(248,113,113,.55) !important;
  box-shadow:0 0 0 4px rgba(248,113,113,.12) !important;
}
.friend-search-item.is-search-hit,
.tool-card.is-search-hit,
.tool-app-card.is-search-hit{
  animation: songline-search-hit 1.05s ease;
}
.tools-search-row{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}
.tools-search-row .tools-searchbox{
  flex:1 1 280px;
}
@keyframes songline-search-shake{
  0%,100%{transform:translateX(0)}
  24%{transform:translateX(-5px)}
  48%{transform:translateX(5px)}
  72%{transform:translateX(-3px)}
}
@keyframes songline-search-hit{
  0%{box-shadow:0 0 0 0 rgba(14,165,233,.0);transform:translateY(0)}
  20%{box-shadow:0 0 0 5px rgba(14,165,233,.16);transform:translateY(-2px)}
  100%{box-shadow:inherit;transform:translateY(0)}
}
@media(max-width:760px){
  .search-count{width:100%;justify-content:center;text-align:center}
}
.post-card .meta-row,
.article-reader + .article-toc,
.meta-row{
  flex-wrap:wrap;
}
.post-card .meta-row .tag,
.card .meta-row .tag{
  max-width:100%;
}
.friend-search-item.is-search-filtered{
  display:none !important;
}

/* v20.0.8：首页朋友轮播 + 搜索筛选兜底 + 子页面标题彻底无框化 */
body .page-hero.minimal-page-hero,
body .page-hero.minimal-page-hero.card,
body .minimal-page-hero{
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  border-radius:0 !important;
  padding:18px 0 14px !important;
  margin:0 0 18px !important;
  min-height:auto !important;
  overflow:visible !important;
}
body .page-hero.minimal-page-hero::before,
body .page-hero.minimal-page-hero::after,
body .minimal-page-hero::before,
body .minimal-page-hero::after{
  display:none !important;
  content:none !important;
  background:none !important;
  box-shadow:none !important;
}
body .page-hero.minimal-page-hero h1,
body .minimal-page-hero h1{
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
body .section-head{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
body .section-head::before,
body .section-head::after{
  display:none !important;
  content:none !important;
}
body .friend-search-item.is-search-filtered,
body .friend-search-item[hidden],
body .tool-card.is-search-filtered,
body .tool-card[hidden],
body .tool-app-card.is-search-filtered,
body .tool-app-card[hidden]{
  display:none !important;
}
.search-submit[data-no-page-loading],
.friend-search-submit[data-no-page-loading],
[data-tools-search-submit][data-no-page-loading]{
  position:relative;
  z-index:2;
}

/* v20.0.8：本轮强制兜底。标题区完全无框，搜索触发有刷新动画，筛选隐藏不被旧样式顶掉。 */
html body .page-hero.minimal-page-hero,
html body section.page-hero.minimal-page-hero{
  display:block !important;
  min-height:0 !important;
  height:auto !important;
  padding:4px 0 22px !important;
  margin:0 0 18px !important;
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  outline:0 !important;
  overflow:visible !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
html body .page-hero.minimal-page-hero::before,
html body .page-hero.minimal-page-hero::after,
html body section.page-hero.minimal-page-hero::before,
html body section.page-hero.minimal-page-hero::after{
  display:none !important;
  content:none !important;
  opacity:0 !important;
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
}
html body .page-hero.minimal-page-hero > *,
html body .page-hero.minimal-page-hero h1,
html body .page-hero.minimal-page-hero p{
  position:static !important;
  display:block !important;
  width:auto !important;
  min-height:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
html body .page-hero.minimal-page-hero h1{
  font-size:clamp(38px, 5vw, 58px) !important;
  line-height:1.02 !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
}
html body .tool-card.search-hidden,
html body .tool-card.is-search-filtered,
html body .tool-card[hidden],
html body .tool-app-card.search-hidden,
html body .tool-app-card.is-search-filtered,
html body .tool-app-card[hidden]{
  display:none !important;
}
.search-refresh-overlay{
  position:fixed;
  inset:0;
  z-index:99998;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:86px;
  pointer-events:none;
  opacity:0;
  transform:translateY(-8px);
  transition:opacity .18s ease, transform .18s ease;
}
.search-refresh-overlay.is-active{
  opacity:1;
  transform:translateY(0);
}
.search-refresh-card{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:11px 16px;
  border-radius:999px;
  color:var(--text);
  background:color-mix(in srgb, var(--panel) 86%, transparent);
  border:1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  box-shadow:0 18px 48px rgba(15,23,42,.18), 0 0 0 1px rgba(255,255,255,.14) inset;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  font-size:14px;
  letter-spacing:.02em;
}
.search-refresh-ring{
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color:var(--accent);
  animation:songline-search-spin .62s linear infinite;
}
@keyframes songline-search-spin{to{transform:rotate(360deg)}}

/* v20.0.8：搜索清空按钮 hover、搜索隐藏兜底、朋友搜索状态增强。 */
input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance:none;
  appearance:none;
  display:none;
}
.songline-search-clear{
  width:32px;
  height:32px;
  border:1px solid color-mix(in srgb, var(--border) 68%, transparent);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:-42px;
  margin-right:8px;
  flex:0 0 auto;
  position:relative;
  z-index:2;
  opacity:0;
  pointer-events:none;
  cursor:pointer;
  color:var(--muted);
  background:color-mix(in srgb, var(--panel) 78%, transparent);
  box-shadow:0 8px 20px rgba(55,84,120,.08);
  transform:scale(.92);
  transition:opacity .16s ease, transform .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.songline-search-clear.is-visible{
  opacity:.82;
  pointer-events:auto;
  transform:scale(1);
}
.songline-search-clear:hover,
.songline-search-clear:focus-visible{
  opacity:1;
  color:#0ea5e9;
  background:rgba(14,165,233,.12);
  border-color:rgba(14,165,233,.35);
  box-shadow:0 10px 24px rgba(14,165,233,.14);
  outline:none;
}
body.dark .songline-search-clear{
  color:#cfe7ff;
  background:rgba(15,30,52,.74);
  border-color:rgba(148,188,220,.26);
}
body.dark .songline-search-clear:hover,
body.dark .songline-search-clear:focus-visible{
  color:#7dd3fc;
  background:rgba(56,189,248,.16);
  border-color:rgba(125,211,252,.42);
}
.searchbox.has-custom-clear,
.tools-searchbox.has-custom-clear{
  padding-right:48px !important;
}
.friend-search-box .songline-search-clear,
.tools-search-row .songline-search-clear,
.toolbar-panel .songline-search-clear{
  align-self:center;
}
html body .tool-card.search-hidden,
html body .tool-app-card.search-hidden{
  display:none !important;
}

/* v20.0.8：统一搜索框结构。X 键放回输入框内部，避免跑出边框，也避免朋友页 grid 被插入按钮挤坏。 */
.songline-search-field{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  flex:1 1 320px !important;
}
.songline-search-field > .searchbox,
.songline-search-field > .tools-searchbox{
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  padding-right:48px !important;
}
.songline-search-field > .songline-search-clear{
  position:absolute !important;
  right:8px !important;
  top:50% !important;
  width:30px !important;
  height:30px !important;
  margin:0 !important;
  transform:translateY(-50%) scale(.92) !important;
  z-index:5 !important;
}
.songline-search-field > .songline-search-clear.is-visible{
  transform:translateY(-50%) scale(1) !important;
}
.songline-search-field > .songline-search-clear:hover,
.songline-search-field > .songline-search-clear:focus-visible{
  transform:translateY(-50%) scale(1.06) !important;
}
.toolbar-panel,
.tools-search-row{
  align-items:center !important;
}
.toolbar-panel > .songline-search-field{
  flex:1 1 320px !important;
}
.tools-search-row > .songline-search-field{
  flex:1 1 320px !important;
}
.friend-search-box{
  grid-template-columns:auto minmax(0,1fr) auto !important;
  overflow:visible !important;
}
.friend-search-box .songline-search-field{
  grid-column:2 !important;
  grid-row:1 !important;
  width:100% !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}
.friend-search-box .songline-search-field > .searchbox{
  padding:8px 44px 8px 4px !important;
}
.friend-search-box .friend-search-submit{
  grid-column:3 !important;
  grid-row:1 !important;
  white-space:nowrap !important;
}
@media(max-width:640px){
  .friend-search-box{
    grid-template-columns:auto minmax(0,1fr) !important;
  }
  .friend-search-box .friend-search-submit{
    grid-column:1 / -1 !important;
    grid-row:2 !important;
    width:100% !important;
  }
}
