
.qs-panel {
  background: rgba(7, 18, 29, 0.97);
  border: 1px solid var(--c-border-cyan);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(var(--c-cyan-rgb, 0, 173, 238), 0.06) inset;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--f-body);
  color: var(--c-text);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.35) transparent;
}

.qs-group { padding: 6px 0 4px; }
.qs-group + .qs-group { border-top: 1px solid var(--c-border); }
.qs-group[hidden] { display: none; }

.qs-group-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--c-muted);
}
.qs-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--c-cyan-dim);
  color: var(--c-cyan-hi);
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}
.qs-clear {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--c-muted);
  font: inherit;
  letter-spacing: .5px;
  cursor: pointer;
}
.qs-clear:hover { color: var(--c-cyan); }

.qs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1px 6px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--c-text);
  text-decoration: none;
  outline: none;
  transition: background-color .12s var(--ease);
}
.qs-item.is-active,
.qs-item:focus-visible {
  background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.12);
  box-shadow: inset 2px 0 0 var(--c-cyan);
}

.qs-ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--c-border);
  color: var(--c-cyan);
  overflow: hidden;
}
.qs-ico svg { width: 17px; height: 17px; }
.qs-ico-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qs-ico-player   { color: var(--c-warn); }
.qs-ico-alliance { color: #a78bfa; }
.qs-ico-forum    { color: #60a5fa; }
.qs-ico-video    { color: #ff6b81; }
.qs-ico-image    { color: var(--c-success); }
.qs-ico-recent   { color: var(--c-muted); background: transparent; border-color: transparent; }

.qs-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.qs-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-sub {
  font-size: 0.8rem;
  color: var(--c-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-panel mark {
  background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.22);
  color: var(--c-text-hi);
  border-radius: 3px;
  padding: 0 1px;
}

.qs-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--c-muted);
}
.qs-state strong { color: var(--c-text); font-weight: 600; }
.qs-spin {
  width: 18px;
  height: 18px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-cyan);
  border-radius: 50%;
  animation: qs-spin .6s linear infinite;
}
@keyframes qs-spin { to { transform: rotate(360deg); } }

.qs-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--c-border);
  background: rgba(7, 18, 29, 0.98);
}
.qs-hints { font-size: 0.72rem; color: var(--c-muted); white-space: nowrap; }
.qs-hints kbd, .qs-kbd {
  display: inline-block;
  min-width: 20px;
  margin: 0 1px;
  padding: 0 5px;
  border: 1px solid var(--c-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  line-height: 17px;
  text-align: center;
  color: var(--c-text-dim);
}
.qs-all {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--c-border-cyan);
  border-radius: 999px;
  background: var(--c-cyan-dim);
  padding: 5px 12px;
  color: var(--c-cyan-hi);
  font: 600 0.8rem var(--f-body);
  cursor: pointer;
  transition: var(--trans-fast);
}
.qs-all svg { width: 14px; height: 14px; }
.qs-all:hover { background: rgba(var(--c-cyan-rgb, 0, 173, 238), 0.25); }

.qs-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(2, 8, 14, 0.66);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.qs-modal.open { display: flex; animation: qs-fade .14s var(--ease); }
@keyframes qs-fade { from { opacity: 0; } }

.qs-dialog {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  max-height: min(640px, 76vh);
  border: 1px solid var(--c-border-cyan);
  border-radius: 18px;
  background: rgba(7, 18, 29, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(var(--c-cyan-rgb, 0, 173, 238), 0.08);
  overflow: hidden;
  animation: qs-pop .16s var(--ease);
}
@keyframes qs-pop { from { transform: translateY(-8px) scale(.985); opacity: 0; } }

.qs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 18px;
  border-bottom: 1px solid var(--c-border);
}
.qs-bar > svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--c-cyan); }
.qs-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 16px 0;
  font: 500 1.1rem var(--f-body);
  color: var(--c-text-hi);
}
.qs-input::placeholder { color: var(--c-muted); }
.qs-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.qs-x {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--c-muted);
  cursor: pointer;
}
.qs-x svg { width: 18px; height: 18px; }
.qs-x:hover { color: var(--c-text); background: rgba(255, 255, 255, 0.06); }

.qs-panel-modal {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.qs-panel-modal .qs-foot { background: rgba(7, 18, 29, 0.99); }

@media (max-width: 640px) {
  .qs-modal { padding: 0; align-items: stretch; }
  .qs-dialog { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .qs-hints { display: none; }
}

@media (hover: none) {
  .qs-hints { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .qs-modal.open, .qs-dialog { animation: none; }
  .qs-spin { animation-duration: 1.5s; }
}
