/* 效果器与乐器预制查询：树状中英对照 */

.preset-page .lang-selector {
  margin-left: auto;
  display: flex;
}

.preset-page .nav-hamburger {
  display: none !important;
}

.preset-page .nav-brand-text {
  max-width: min(42vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 20px 64px;
}

.preset-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.preset-intro .sub {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.5;
}

.preset-intro .plugins-back {
  margin-bottom: 12px;
}

.preset-toolbar-wrap {
  position: sticky;
  top: 52px;
  z-index: 40;
  margin: 16px -20px 14px;
  padding: 10px 20px;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.preset-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.preset-toolbar input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent-blue) 40%, rgba(255, 255, 255, 0.16));
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.preset-toolbar input[type="search"]::placeholder {
  color: var(--text-tertiary);
}

.preset-toolbar input[type="search"]:focus {
  border-color: color-mix(in srgb, var(--accent-blue) 75%, white);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent-blue) 28%, transparent),
    0 0 16px color-mix(in srgb, var(--accent-blue) 22%, transparent);
}

.preset-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.preset-toolbar button:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.1);
}

.preset-toolbar button:focus-visible,
.preset-toolbar input[type="search"]:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.preset-tree details {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 6px 0;
}

.preset-tree details details {
  background: rgba(8, 12, 22, 0.45);
}

.preset-tree summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.preset-tree summary::-webkit-details-marker {
  display: none;
}

.preset-tree summary::before {
  content: "▸";
  color: var(--text-tertiary);
  display: inline-block;
  width: 1em;
  flex: 0 0 auto;
}

.preset-tree details[open] > summary::before {
  content: "▾";
}

.preset-tree .folder {
  color: var(--accent-cyan);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.preset-tree .en {
  color: var(--text-tertiary);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.preset-tree .count {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px 8px;
  flex: 0 0 auto;
}

.preset-tree .body {
  padding: 0 8px 8px 18px;
}

.preset-tree ul.presets {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}

.preset-tree ul.presets li {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 7px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.preset-tree ul.presets li .zh {
  font-weight: 560;
  color: var(--text);
  overflow-wrap: anywhere;
}

.preset-tree ul.presets li .en {
  color: var(--text-secondary);
}

.preset-tree li.hit,
.preset-tree details.hit > summary {
  background: rgba(56, 189, 248, 0.16);
}

.preset-tree .hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .preset-page .nav-home {
    display: inline;
  }

  .preset-page .lang-selector {
    display: flex;
  }
}

@media (max-width: 640px) {
  .preset-shell {
    padding: 64px 12px 48px;
  }

  .preset-toolbar-wrap {
    margin-left: -12px;
    margin-right: -12px;
    padding: 10px 12px;
  }

  .preset-toolbar input[type="search"] {
    flex-basis: 100%;
  }

  .preset-tree .body {
    padding: 0 4px 8px 10px;
  }
}
