/* Advanced Settings page */
.as-hero { padding-bottom: 36px; }
.as-hero .hero-en { font-size: .55em; font-weight: 500; color: var(--color-text-mute); margin-left: 12px; letter-spacing: .02em; }
.as-warn {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 20px; padding: 14px 18px;
  background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid #ea580c;
  border-radius: 10px;
  color: #7c2d12; font-size: 13.5px; line-height: 1.6;
}
.as-warn svg { width: 22px; height: 22px; flex-shrink: 0; color: #ea580c; margin-top: 1px; }
.as-warn a { color: #c2410c; text-decoration: underline; font-weight: 600; }
.as-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.as-hero-meta .meta-pill {
  background: rgba(4,96,186,.08); color: var(--color-primary);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(4,96,186,.18);
}
.as-hero-meta .meta-pill strong { font-weight: 700; margin-right: 4px; }

/* —— 悬浮胶囊搜索条 Floating Pill —— */
.as-search-pill {
  position: fixed;
  top: 82px;                            /* 主导航高度 64 + 18px 间距 */
  left: 50%; transform: translateX(-50%);
  z-index: 30;
  width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 16px;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  box-shadow: 0 6px 24px -8px rgba(15,23,42,.18), 0 2px 6px -2px rgba(15,23,42,.08);
  transition: width .18s ease, box-shadow .18s ease, transform .18s ease, top .18s ease;
}
.as-search-pill:hover { box-shadow: 0 10px 28px -8px rgba(15,23,42,.22), 0 3px 8px -2px rgba(15,23,42,.1); }
.as-search-pill:focus-within {
  width: min(560px, calc(100vw - 32px));
  border-color: rgba(4,96,186,.4);
  box-shadow: 0 12px 32px -8px rgba(4,96,186,.28), 0 0 0 4px rgba(4,96,186,.1);
}
.as-search-pill.with-results { width: min(560px, calc(100vw - 32px)); }

.as-search-icon { width: 16px; height: 16px; color: var(--color-text-mute); flex-shrink: 0; }
.as-search-pill:focus-within .as-search-icon { color: var(--color-primary); }

.as-search-pill input {
  flex: 1; min-width: 0;
  height: 28px;
  border: 0; outline: 0;
  background: transparent; color: var(--color-text);
  font-size: 13.5px; font-family: inherit;
  padding: 0;
}
.as-search-pill input::-webkit-search-cancel-button,
.as-search-pill input::-webkit-search-decoration { display: none; }
.as-search-pill input::placeholder { color: #94a3b8; }

.as-result-count {
  font-size: 11.5px; color: var(--color-text-mute);
  background: #f1f5f9; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
}
.as-result-count:empty { display: none; }

.as-clear {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; border: 0;
  background: #e2e8f0; color: #475569;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.as-clear:hover { background: #cbd5e1; color: #1e293b; }

.as-kbd {
  display: inline-flex; align-items: center; gap: 1px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px; font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.as-search-pill:focus-within .as-kbd { display: none; }

/* 滚动时收缩为更小尺寸，避免遮挡 */
.as-search-pill.scrolled {
  top: 76px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 4px 16px -6px rgba(15,23,42,.16);
}

/* Layout */
.as-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 36px 32px 80px;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: flex-start;
}
.as-side {
  position: sticky; top: 140px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 8px;
}
.as-side h3 { font-size: 13px; font-weight: 700; color: var(--color-text-mute); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.as-side nav { display: flex; flex-direction: column; gap: 2px; }
.as-side nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  font-size: 13.5px; color: var(--color-text); text-decoration: none;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.as-side nav a:hover { background: #eff6ff; color: var(--color-primary); }
.as-side nav a.active { background: #eff6ff; color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 600; }
.as-side nav a .cnt { font-size: 11.5px; color: #94a3b8; font-weight: 500; padding: 1px 7px; background: #f1f5f9; border-radius: 999px; }
.as-side nav a.active .cnt { background: #dbeafe; color: var(--color-primary); }

/* Main */
.as-main { min-width: 0; }
.as-loading, .as-empty { padding: 60px 0; text-align: center; color: var(--color-text-mute); }

.as-group { padding-bottom: 36px; scroll-margin-top: 140px; }
.as-group:first-child .as-group-head { margin-top: 0; }
.as-group-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 24px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
}
.as-group-head h2 { font-size: 22px; font-weight: 700; color: var(--color-text); margin: 0; }
.as-group-head .count { font-size: 13px; color: var(--color-text-mute); }
.as-group-head .en { font-size: 13px; color: var(--color-text-mute); font-weight: 400; margin-left: auto; }

.as-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
  transition: border-color .12s, box-shadow .12s;
}
.as-item:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px -6px rgba(15,23,42,.08); }

.as-item-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.as-item-title { flex: 1 1 auto; min-width: 0; }
.as-item-title h3 { font-size: 15.5px; font-weight: 600; color: var(--color-text); margin: 0; line-height: 1.5; }
.as-item-title .en { display: block; font-size: 12.5px; color: var(--color-text-mute); font-weight: 400; margin-top: 3px; word-break: break-word; }
.as-item-meta { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

.as-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.4; }
.as-pill.type { background: #ede9fe; color: #6d28d9; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.as-pill.versions { background: #ecfeff; color: #0e7490; }
.as-pill.default { background: #f1f5f9; color: #475569; font-weight: 500; }

.as-key {
  display: block;
  margin: 10px 0;
  padding: 10px 14px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.as-key:hover { background: #1e293b; }
.as-key .copy-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #94a3b8; background: #0f172a; padding: 2px 6px; border-radius: 4px; }
.as-key.copied .copy-hint { color: #4ade80; }

.as-section { margin-top: 12px; }
.as-section-label { font-size: 12px; font-weight: 700; color: var(--color-text-mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.as-values { margin: 0; padding-left: 0; list-style: none; font-size: 13.5px; color: var(--color-text); line-height: 1.7; }
.as-values li { padding-left: 16px; position: relative; }
.as-values li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--color-primary); }
.as-values li.single { padding-left: 0; }
.as-values li.single::before { display: none; }

.as-desc { font-size: 14px; color: var(--color-text); line-height: 1.7; }
.as-desc p { margin: 0 0 8px; }
.as-desc p:last-child { margin: 0; }
.as-desc .restart-note { display: inline-block; margin-top: 6px; padding: 3px 10px; background: #fef3c7; color: #92400e; border-radius: 6px; font-size: 12.5px; font-weight: 500; }

@media (max-width: 980px) {
  .as-layout { grid-template-columns: 1fr; padding: 28px 20px 60px; }
  .as-side { position: static; max-height: none; overflow: visible; padding-right: 0; margin-bottom: 12px; }
  .as-side nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .as-side nav a { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; }
  .as-side nav a.active { border-left-color: transparent; background: var(--color-primary); color: #fff; }
  .as-side nav a.active .cnt { background: rgba(255,255,255,.25); color: #fff; }
  .as-search-pill { top: 72px; }
}
@media (max-width: 560px) {
  .as-search-pill {
    top: 68px;
    width: calc(100vw - 24px);
    padding: 6px 6px 6px 14px;
  }
  .as-search-pill .as-kbd,
  .as-search-pill .as-result-count { display: none; }
}
@media (max-width: 560px) {
  .as-item { padding: 14px 16px; }
  .as-item-head { gap: 6px; }
  .as-item-meta { gap: 4px; }
  .as-key { font-size: 11.5px; padding: 8px 12px; }
  .as-key .copy-hint { display: none; }
}
