/* ==========================================================================
   商标分类表 · 独立公开站点样式
   品牌蓝 #2f5bd3；原生 CSS，无外部依赖；桌面 / 平板 / 手机响应式
   ========================================================================== */

:root {
  --brand: #2f5bd3;
  --brand-dark: #1e3f9e;
  --brand-deep: #16213c;
  --brand-soft: #eef3ff;
  --brand-soft-2: #dfe8ff;
  --ink: #1c2434;
  --ink-soft: #3d4a63;
  --ink-muted: #6b7789;
  --ink-faint: #96a1b3;
  --line: #e3e8f2;
  --line-strong: #cfd8e8;
  --bg: #f5f7fc;
  --white: #ffffff;
  --success: #1f9d64;
  --danger: #d4453a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 30, 54, 0.06), 0 1px 3px rgba(16, 30, 54, 0.05);
  --shadow-md: 0 6px 18px rgba(20, 39, 73, 0.09), 0 1px 3px rgba(20, 39, 73, 0.06);
  --shadow-lg: 0 22px 50px rgba(16, 32, 62, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono",
    "Courier New", monospace;
  --topbar-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 14px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

::selection {
  background: rgba(47, 91, 211, 0.2);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* ============================ 顶部导航 ============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(227, 232, 242, 0.9);
}

.topbar-inner {
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(140deg, #3f6ee8, var(--brand) 55%, #2448b8);
  box-shadow: 0 4px 10px rgba(47, 91, 211, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

/* ============================ 首屏 Hero ============================ */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(126deg, #1c3a91 0%, var(--brand) 46%, #3a6ae8 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -220px;
  top: -330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 66%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 54px 24px 46px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.92);
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(9, 22, 56, 0.25);
}

.hero-subtitle {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 720px;
  margin: 26px auto 0;
  padding: 7px 7px 7px 16px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(8, 22, 58, 0.26);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.search-bar:focus-within {
  box-shadow: 0 16px 44px rgba(8, 22, 58, 0.34), 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.search-icon {
  display: inline-flex;
  color: var(--ink-faint);
  flex: none;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-input::placeholder {
  color: var(--ink-faint);
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-submit {
  flex: none;
  height: 42px;
  padding: 0 26px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #3f6ee8, var(--brand));
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(47, 91, 211, 0.34);
  transition: filter 0.15s ease, transform 0.1s ease;
}

.search-submit:hover {
  filter: brightness(1.06);
}

.search-submit:active {
  transform: translateY(1px);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12.5px;
}

.quick-label {
  color: rgba(255, 255, 255, 0.62);
}

.quick-tag {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quick-tag:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.44);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-stats b {
  color: var(--white);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-stats-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

/* ============================ 通用布局 ============================ */
.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  scroll-margin-top: calc(var(--topbar-h) + 14px);
}

.classes-section {
  padding: 46px 0 18px;
}

.search-section {
  padding: 40px 0 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head-main {
  min-width: 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a77ef, var(--brand));
}

.section-meta {
  margin-top: 7px;
  font-size: 13px;
  color: var(--ink-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-icon {
  display: inline-flex;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: #2850c2;
}

.btn-ghost {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn-text {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
}

.btn-text:hover {
  text-decoration: underline;
}

/* ============================ 分类筛选 / 网格 ============================ */
.class-filter {
  position: relative;
  display: flex;
  align-items: center;
  width: 220px;
  max-width: 100%;
}

.class-filter-icon {
  position: absolute;
  left: 11px;
  display: inline-flex;
  color: var(--ink-faint);
  pointer-events: none;
}

.class-filter-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink);
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.class-filter-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 91, 211, 0.14);
}

.class-filter-input::placeholder {
  color: var(--ink-faint);
}

.class-filter-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 12px;
}

.class-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
}

.class-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 91, 211, 0.45);
  box-shadow: var(--shadow-md);
}

.class-card.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px rgba(47, 91, 211, 0.35), var(--shadow-md);
}

.class-no {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background 0.16s ease, color 0.16s ease;
}

.class-card:hover .class-no,
.class-card.is-active .class-no {
  background: var(--brand);
  color: var(--white);
}

.class-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.class-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.class-arrow {
  flex: none;
  color: var(--ink-faint);
  font-size: 15px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.class-card:hover .class-arrow,
.class-card.is-active .class-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--brand);
}

.class-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 12px;
}

.class-grid-skeleton::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 0;
}

.classes-empty {
  padding: 34px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

/* 骨架屏 */
.skeleton-card {
  height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(100deg, #f0f3fa 30%, #f8fafd 46%, #f0f3fa 62%);
  background-size: 220% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-row {
  height: 58px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(100deg, #f0f3fa 30%, #f8fafd 46%, #f0f3fa 62%);
  background-size: 220% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(100deg, #f0f3fa 30%, #f8fafd 46%, #f0f3fa 62%);
  background-size: 220% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

.skeleton-w60 {
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-tabs {
  height: 38px;
  width: 76%;
  margin-bottom: 18px;
  border-radius: 10px;
  background: linear-gradient(100deg, #f0f3fa 30%, #f8fafd 46%, #f0f3fa 62%);
  background-size: 220% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

/* ============================ 状态提示 ============================ */
.state-box {
  padding: 40px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--white);
  text-align: center;
}

.state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.state-desc {
  margin: 8px auto 16px;
  max-width: 520px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.state-error .state-title {
  color: var(--danger);
}

/* ============================ 搜索结果 ============================ */
.search-summary b {
  font-variant-numeric: tabular-nums;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.result-row {
  display: block;
}

.result-main {
  display: grid;
  grid-template-columns: 74px 200px minmax(0, 1fr) 96px 64px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.result-main:hover {
  border-color: rgba(47, 91, 211, 0.5);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-class {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-group {
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-group b {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.result-name {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.result-name mark {
  background: #fff1b8;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.result-code {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.result-code.is-empty {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-faint);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 6px;
}

.result-go {
  justify-self: end;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.result-main:hover .result-go {
  opacity: 1;
}

/* ============================ 分页 ============================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.page-btn:hover:not(:disabled):not(.is-current) {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.page-btn.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  min-width: 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.page-total {
  margin-left: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* ============================ 分类详情 ============================ */
.detail-section {
  padding: 26px 0 10px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 24px 28px 28px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.detail-seal {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(145deg, #4a77ef, var(--brand) 62%, #2448b8);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(47, 91, 211, 0.3);
  font-variant-numeric: tabular-nums;
}

.detail-title-text {
  min-width: 0;
}

.detail-kicker {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.detail-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* 本类说明（可折叠） */
.note {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fafbfe;
  overflow: hidden;
}

.note-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

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

.note-summary:hover {
  background: #f3f6fd;
}

.note-summary-text {
  color: var(--brand);
}

.note-summary-hint {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
}

.note-chevron {
  display: inline-flex;
  color: var(--ink-faint);
  transition: transform 0.18s ease;
}

.note[open] .note-chevron {
  transform: rotate(180deg);
}

.note-body {
  padding: 4px 18px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.note-body .note-p {
  margin: 8px 0;
  line-height: 1.85;
}

.note-body .note-sub {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.note-list {
  margin: 4px 0 0;
  padding: 0;
}

.note-list li {
  position: relative;
  padding: 2px 0 2px 18px;
  line-height: 1.8;
}

.note-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brand);
  opacity: 0.55;
}

.note-list.is-excludes li::before {
  color: var(--ink-faint);
}

/* 类似群 tabs */
.group-tabs-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px -6px 0;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.group-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 2px;
  flex: 1 1 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.group-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.group-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.group-tab:hover {
  border-color: rgba(47, 91, 211, 0.45);
  color: var(--brand);
  background: var(--brand-soft);
}

.group-tab[aria-selected="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(47, 91, 211, 0.26);
}

.group-tab-no {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.group-tab-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-tab-count {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(47, 91, 211, 0.1);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.group-tab[aria-selected="true"] .group-tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.tabs-scroll {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-muted);
}

.tabs-scroll:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.group-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.group-title b {
  font-family: var(--font-mono);
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

.group-meta {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.group-tip {
  font-size: 12px;
  color: var(--ink-faint);
}

/* 项目列表 */
.item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.item:hover {
  border-color: rgba(47, 91, 211, 0.42);
  background: #fbfcff;
  box-shadow: var(--shadow-sm);
}

.item-code {
  flex: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.item-code.is-empty {
  background: #f2f4f8;
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
}

.item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.item-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
  opacity: 0.55;
  transition: opacity 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.item:hover .item-copy,
.item-copy:focus-visible {
  opacity: 1;
}

.item-copy:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

/* 从搜索结果定位时的高亮 */
.item.is-target {
  border-color: var(--brand);
  background: #eaf0ff;
  box-shadow: 0 0 0 2px rgba(47, 91, 211, 0.3), 0 8px 20px rgba(47, 91, 211, 0.16);
  animation: target-pulse 1.4s ease-out 2;
  scroll-margin-top: calc(var(--topbar-h) + 110px);
}

@keyframes target-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 91, 211, 0.45), 0 8px 20px rgba(47, 91, 211, 0.16);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(47, 91, 211, 0), 0 8px 20px rgba(47, 91, 211, 0.16);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(47, 91, 211, 0.3), 0 8px 20px rgba(47, 91, 211, 0.16);
  }
}

.item-list-empty {
  padding: 26px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13.5px;
}

/* ============================ 数据说明 ============================ */
.about-section {
  padding: 46px 0 54px;
}

.about-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.about-item h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.about-item h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-2px);
}

.about-item p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.about-disclaimer {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #faf5ee;
  border: 1px solid #f0e3cd;
  font-size: 12.5px;
  line-height: 1.8;
  color: #7d6644;
}

.about-disclaimer strong {
  color: #6b5328;
}

/* ============================ 页脚 ============================ */
.site-footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 36px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
}

.footer-mark {
  display: inline-flex;
  color: #7f9df3;
}

.footer-source {
  margin-top: 14px;
  font-size: 12.5px;
}

.footer-source a {
  color: #a9bdf7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-source a:hover {
  color: #d3defc;
}

.footer-disclaimer,
.footer-copy {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-copy {
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

/* ============================ Toast ============================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 300;
  transform: translate(-50%, 16px);
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(22, 33, 60, 0.94);
  color: var(--white);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 48px);
  text-align: center;
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-banner {
  padding: 14px 16px;
  background: #fff4e5;
  color: #8a5a00;
  text-align: center;
  font-size: 14px;
}

/* ============================ 响应式 ============================ */
@media (max-width: 960px) {
  .class-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  }

  .result-main {
    grid-template-columns: 68px 158px minmax(0, 1fr) 92px;
  }

  .result-go {
    display: none;
  }

  .detail-card {
    padding: 20px 20px 24px;
  }

  .detail-name {
    font-size: 21px;
  }

  .detail-seal {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 23px;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .section-inner,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-inner {
    padding: 40px 16px 38px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 13.5px;
  }

  .search-bar {
    margin-top: 22px;
    padding-left: 13px;
  }

  .search-submit {
    padding: 0 18px;
  }

  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .class-card {
    padding: 12px;
    gap: 10px;
  }

  .class-no {
    width: 38px;
    height: 38px;
    font-size: 15.5px;
  }

  .class-name {
    font-size: 13.5px;
  }

  .class-filter {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
  }

  .result-main {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "class code"
      "name name"
      "group group";
    gap: 8px 10px;
    padding: 12px 14px;
  }

  .result-class {
    grid-area: class;
    justify-self: start;
  }

  .result-code {
    grid-area: code;
    justify-self: end;
    align-self: center;
  }

  .result-name {
    grid-area: name;
    font-size: 14px;
  }

  .result-group {
    grid-area: group;
  }

  .detail-head {
    flex-direction: column;
    gap: 14px;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1 1 auto;
  }

  .detail-kicker {
    font-size: 12px;
  }

  .detail-title-wrap {
    gap: 12px;
  }

  .item-list {
    grid-template-columns: 1fr;
  }

  .group-tip {
    display: none;
  }

  .group-tabs-wrap {
    margin: 16px -4px 0;
    padding: 4px;
  }

  .group-tab {
    max-width: 240px;
    height: 34px;
  }

  .group-tab-name {
    max-width: 108px;
  }

  .about-card {
    padding: 20px 18px;
  }

  .note-body {
    padding: 4px 14px 14px;
  }

  .detail-card {
    padding: 16px 14px 20px;
  }

  .hero-stats {
    font-size: 12px;
    gap: 4px 18px;
    line-height: 1.7;
  }

  .hero-stats-dot {
    display: none;
  }
}

@media (max-width: 460px) {
  .topnav a {
    display: none;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-eyebrow {
    font-size: 11.5px;
  }

  .search-submit {
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .search-input {
    font-size: 14px;
  }

  .quick-tags {
    display: none;
  }

  .section-title {
    font-size: 19px;
  }

  .detail-seal {
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 12px;
  }

  .detail-name {
    font-size: 19px;
  }

  .pagination {
    gap: 4px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }
}
