.sw-mask {
  position: fixed; inset: 0; z-index: 9999; display: none;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px);
  padding: 12vh 1rem 1rem;
}
.sw-mask.sw-open { display: block; }
.sw-box {
  max-width: 640px; margin: 0 auto; border-radius: 8px; overflow: hidden;
  background: #fff; color: #333; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.sw-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid #eee; }
.sw-head i { font-size: 1.2rem; color: var(--theme); }
.sw-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1rem; color: inherit; }
.sw-close { font-size: .75rem; padding: 2px 6px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; opacity: .7; }
.sw-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.sw-item a { display: block; padding: .7rem 1rem; color: inherit; border-bottom: 1px solid #f3f3f3; }
.sw-item a:hover { background: rgba(80, 191, 255, .1); }
.sw-title { font-weight: 600; color: var(--theme); margin: 0 0 .2rem; }
.sw-snippet { font-size: .85rem; opacity: .75; margin: 0; word-break: break-all; }
.sw-empty { padding: 1.2rem 1rem; text-align: center; opacity: .6; }
html.night .sw-box { background: #1f2329; color: #ccd; }
html.night .sw-head { border-bottom-color: #333; }
html.night .sw-item a { border-bottom-color: #2a2e35; }
html.night .sw-close { border-color: #444; }
.search-page-input {
  width: 100%; padding: .6rem .8rem; border-radius: 6px; font-size: 1rem;
  border: 1px solid rgba(128, 128, 128, .35); background: transparent; color: inherit; outline: 0;
}
.search-page-input:focus { border-color: var(--theme); }
