/* サイト内検索（Spotlight風コマンドパレット）。全ページ共通。
   デザイン制約: 角丸ゼロ（スクエア）、navy + lavender、絵文字アイコン禁止。 */

/* ---------- ヘッダーの検索ボタン（暗いヘッダー上） ---------- */
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease;
}
.search-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.search-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.search-btn kbd {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  padding: 2px 5px;
}
@media (max-width: 760px) {
  .search-btn {
    padding: 8px 9px;
  }
  .search-btn .search-btn-label,
  .search-btn kbd {
    display: none;
  }
}

/* ---------- オーバーレイとパネル ---------- */
.sp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(24, 18, 77, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  animation: sp-fade 0.16s ease;
}
.sp-overlay[hidden] {
  display: none;
}
.sp-panel {
  width: min(640px, 100%);
  background: #fff;
  border: 1px solid #e4e4f0;
  border-radius: 0;
  box-shadow: 0 34px 64px -20px rgba(24, 18, 77, 0.5);
  animation: sp-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
@keyframes sp-fade {
  from {
    opacity: 0;
  }
}
@keyframes sp-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
.sp-input-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  border-bottom: 1px solid #e4e4f0;
}
.sp-input-row svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: #221a63;
}
.sp-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 1.05rem;
  color: #1d1d2b;
}
.sp-input::placeholder {
  color: #8a8aa0;
}
.sp-esc {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: #5d5d72;
  border: 1px solid #e4e4f0;
  background: #f3f3f9;
  border-radius: 0;
  padding: 3px 6px;
  white-space: nowrap;
}
.sp-results {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 46vh;
  overflow-y: auto;
}
.sp-item {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 0;
}
.sp-item.active {
  background: #efeaff;
}
.sp-item-page {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #4a3aff;
  margin-bottom: 2px;
}
.sp-item-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #18124d;
  line-height: 1.5;
}
.sp-item-excerpt {
  display: block;
  font-size: 0.82rem;
  color: #5d5d72;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-item mark {
  background: #ddd5ff;
  color: inherit;
  padding: 0;
}
.sp-empty {
  padding: 26px 16px;
  text-align: center;
  color: #5d5d72;
  font-size: 0.92rem;
}
.sp-footer {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 9px 16px;
  border-top: 1px solid #e4e4f0;
  font-size: 0.75rem;
  color: #5d5d72;
}
.sp-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sp-footer kbd {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid #e4e4f0;
  background: #f3f3f9;
  border-radius: 0;
  padding: 1px 5px;
}
@media (prefers-reduced-motion: reduce) {
  .sp-overlay,
  .sp-panel {
    animation: none;
  }
}
