/* ==========================================================================
   site-search.css —— 站内搜索弹层
   ========================================================================== */
.ss-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  background: rgba(6, 7, 9, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ss-overlay.open { display: block; }

.ss-box {
  position: absolute;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(44rem, calc(100vw - 32px));
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: rgba(18, 20, 24, .985);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
  overflow: hidden;
}

.ss-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.ss-head svg { flex: none; color: rgba(245, 246, 248, .45); }
.ss-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f6f8;
  font-size: 1.0625rem;
  font-family: inherit;
  line-height: 1.5;
}
.ss-input::placeholder { color: rgba(245, 246, 248, .34); }
.ss-esc {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: rgba(245, 246, 248, .45);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.ss-esc:hover { color: #f0c391; border-color: rgba(217, 154, 91, .5); }

.ss-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}
.ss-hint {
  padding: 22px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(245, 246, 248, .42);
  text-align: center;
}
.ss-hint b { color: rgba(245, 246, 248, .7); font-weight: 600; }

.ss-item {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color .14s ease;
}
.ss-item:hover,
.ss-item.active { background: rgba(255, 255, 255, .07); }
.ss-item-t {
  font-size: .9688rem;
  font-weight: 620;
  line-height: 1.45;
  color: #f5f6f8;
  margin: 0 0 3px;
}
.ss-item-m {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  color: rgba(245, 246, 248, .4);
  margin: 0 0 4px;
}
.ss-item-m em { font-style: normal; color: #d99a5b; }
.ss-item-d {
  font-size: 12.5px;
  line-height: 1.62;
  color: rgba(245, 246, 248, .58);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ss-item-t mark,
.ss-item-d mark {
  background: rgba(217, 154, 91, .26);
  color: #f0c391;
  border-radius: 3px;
  padding: 0 1px;
}

.ss-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  font-size: 11.5px;
  color: rgba(245, 246, 248, .34);
}
.ss-foot kbd {
  font-family: inherit;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
}

/* 锁定滚动 */
body.ss-locked { overflow: hidden; }

@media (max-width: 640px) {
  .ss-box {
    top: 6vh;
    width: calc(100vw - 20px);
    max-height: 82vh;
  }
  .ss-input { font-size: 1rem; }
  .ss-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-item { transition: none; }
}
