.qianli-site-header {
  --header-ink: #172a33;
  --header-line: #d6d8ce;
  --header-red: #b83923;
  --header-paper: #f7f5f0;
  --header-group-gap: clamp(20px, 3vw, 44px);
  position: sticky;
  top: 0;
  z-index: 70;
  color: var(--header-ink);
  background: var(--header-paper);
  border-bottom: 1px solid var(--header-line);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}
.qianli-header-inner {
  width: calc(100% - 2 * clamp(20px, 4.45vw, 72px));
  max-width: 1312px;
  height: 75px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto auto;
  column-gap: var(--header-group-gap);
  align-items: center;
}
.qianli-site-header a { color: inherit; text-decoration: none; }
.qianli-site-header :focus-visible { outline: 2px solid var(--header-red); outline-offset: 3px; }
.qianli-header-brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; line-height: 1.2; white-space: nowrap; }
.qianli-header-brand img { display: block; width: 40px; height: 40px; flex: none; }
.qianli-header-brand strong { display: block; font: 700 23px/1.05 "Songti SC", SimSun, serif; letter-spacing: .08em; }
.qianli-header-brand small { display: block; margin-top: 4px; font-size: 11px; }
.qianli-header-nav { display: flex; align-self: stretch; align-items: center; gap: 36px; }
.qianli-header-nav a, .qianli-header-return { font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .18s ease; }
.qianli-header-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.qianli-header-nav a:hover, .qianli-header-return:hover, .qianli-header-nav a[aria-current] { color: var(--header-red); }
.qianli-header-nav a[aria-current] { box-shadow: inset 0 -2px currentColor; }
.qianli-header-actions { position: relative; justify-self: end; display: flex; align-items: center; gap: 18px; }
.qianli-header-actions::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--header-group-gap) * -.5);
  top: 50%;
  width: 1px;
  height: 18px;
  translate: 0 -50%;
  background: var(--header-line);
  pointer-events: none;
}
.qianli-site-header .qianli-header-return { color: #596664; font-size: 14px; }
.qianli-site-header .qianli-header-return:hover { color: var(--header-red); }
.qianli-site-header .qianli-header-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 15px;
  border-radius: 5px;
  background: var(--header-red);
  color: white;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color .18s ease;
}
.qianli-site-header .qianli-header-register[href]:hover { background: #9e2d1a; }
.qianli-site-header .qianli-header-register[aria-disabled="true"] {
  background: #eae4dc;
  color: #634d45;
  cursor: default;
}
.qianli-header-toggle, .qianli-header-nav .qianli-mobile-return { display: none; }

@media (max-width: 850px) {
  .qianli-header-inner { grid-template-columns: minmax(0, 1fr) auto; height: 63px; gap: 8px; }
  .qianli-header-brand { gap: 7px; }
  .qianli-header-brand img { width: 34px; height: 34px; }
  .qianli-header-brand strong { font-size: 20px; }
  .qianli-header-brand small { font-size: 10px; }
  .qianli-header-actions { gap: 6px; }
  .qianli-header-actions .qianli-header-return, .qianli-header-actions::before { display: none; }
  .qianli-site-header .qianli-header-register { min-height: 40px; font-size: 13px; padding-inline: 9px; }
  .qianli-header-toggle {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  .qianli-header-toggle:hover { background: #eae4dc; }
  .qianli-header-nav { display: none; }
  .qianli-site-header[data-menu-open] .qianli-header-nav {
    display: flex;
    position: absolute;
    inset: 100% 0 auto;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 6px clamp(20px, 4.45vw, 72px) 12px;
    border-bottom: 1px solid var(--header-line);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    background: var(--header-paper);
  }
  .qianli-header-nav a { width: fit-content; }
  .qianli-header-nav .qianli-mobile-return {
    display: inline-flex;
    width: 100%;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--header-line);
  }
}
@media (prefers-reduced-motion: reduce) {
  .qianli-site-header a { transition: none; }
}
