:root {
  --site-chrome-font: "Avenir Next", "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --site-chrome-text: #0f172a;
  --site-chrome-muted: #475569;
  --site-chrome-line: #dde7f2;
  --site-chrome-max-width: 1420px;
  --home-header-height: 83px;
}

.site-chrome-header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(221, 231, 242, 0.92);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--site-chrome-font);
}

.site-chrome-header .site-chrome-header-inner,
.site-chrome-footer .footer-inner {
  width: min(var(--site-chrome-max-width), calc(100% - 32px));
  max-width: none;
  margin: 0 auto;
}

.site-chrome-header .site-chrome-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 14px 0;
  flex-wrap: nowrap;
}

.site-chrome-header .site-chrome-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
  color: inherit;
  text-decoration: none;
}

.site-chrome-header .brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  padding: 5px;
  border: 1px solid rgba(196, 211, 226, 0.92);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.98));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  object-fit: contain;
  flex: 0 0 auto;
}

.site-chrome-header .brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-chrome-header .brand-title,
.site-chrome-header .brand-subtitle {
  display: block;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-chrome-header .brand-title {
  color: var(--site-chrome-text);
  font-family: var(--site-chrome-font);
  font-size: 1.04rem;
  font-weight: 780;
  letter-spacing: -0.024em;
  line-height: 1.16;
}

.site-chrome-header .brand-subtitle {
  color: var(--site-chrome-muted);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  line-height: 1.18;
}

.site-chrome-header .site-chrome-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(221, 231, 242, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
  color: var(--site-chrome-muted);
  font-size: 0.86rem;
  flex: 0 1 auto;
  flex-wrap: nowrap;
}

.site-chrome-header .site-chrome-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #45586b;
  font-family: var(--site-chrome-font);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.site-chrome-header .site-chrome-nav a:hover {
  color: var(--site-chrome-text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.site-chrome-header .header-mobile-actions {
  display: none;
  gap: 8px;
}

.site-chrome-header .header-toggle {
  border: 1px solid rgba(221, 231, 242, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  color: var(--site-chrome-text);
  cursor: pointer;
  font: 700 0.82rem/1 var(--site-chrome-font);
}

.site-chrome-header .toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.site-chrome-header .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-chrome-header .header-toggle[aria-expanded="true"] {
  border-color: #0b2034;
  background: #0b2034;
  color: #fff;
}

.site-chrome-header .site-chrome-lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(221, 231, 242, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  flex: 0 0 auto;
}

.site-chrome-header .lang-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 92px;
  min-height: 42px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(221, 231, 242, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.82));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  color: var(--site-chrome-text);
  cursor: pointer;
  font: 700 0.82rem/1 var(--site-chrome-font);
}

.site-chrome-header .lang-dropdown-current {
  min-width: 1.8em;
  text-align: center;
}

.site-chrome-header .lang-dropdown-caret {
  color: #526579;
  font-size: 0.7rem;
  transition: transform 0.22s ease;
}

.site-chrome-header .desktop-open .lang-dropdown-caret {
  transform: rotate(180deg);
}

.site-chrome-header .lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 148px;
  padding: 8px;
  border: 1px solid rgba(221, 231, 242, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.site-chrome-header .desktop-open .lang-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.site-chrome-header .lang-btn {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #304256;
  cursor: pointer;
  font: 700 0.82rem/1.2 var(--site-chrome-font);
  text-align: left;
  white-space: nowrap;
}

.site-chrome-header .lang-btn:hover {
  background: #f4f8fc;
  color: var(--site-chrome-text);
}

.site-chrome-header .lang-btn.active,
.site-chrome-header .lang-btn.active:hover {
  border-color: rgba(11, 103, 208, 0.5);
  background: linear-gradient(135deg, #10233f, #0b67d0);
  box-shadow: 0 12px 22px rgba(11, 103, 208, 0.2);
  color: #fff;
}

.site-chrome-header :where(a, button):focus-visible,
.detail-return-row a:focus-visible,
.site-chrome-footer a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
  box-shadow: none;
}

.site-chrome-footer.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 28px;
  border: 0;
  border-top: 1px solid var(--site-chrome-line);
  background: #f8fafc;
  color: var(--site-chrome-muted);
  font-family: var(--site-chrome-font);
}

.site-chrome-footer .footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--site-chrome-muted);
  font-size: 0.92rem;
}

.site-chrome-footer .footer-inner > div {
  width: 100%;
}

.site-chrome-footer .footer-brand-title {
  color: var(--site-chrome-text);
  font-weight: 700;
}

.site-chrome-footer .footer-brand-subtitle {
  color: var(--site-chrome-muted);
}

.site-chrome-footer .footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin: 8px 0 0;
  color: #334155;
  font-size: 0.9rem;
}

.site-chrome-footer .footer-links a {
  color: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-chrome-footer .footer-disclaimer {
  max-width: 76ch;
  margin: 10px 0 0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.6;
}

.detail-return-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding-top: 24px;
  font-family: var(--site-chrome-font);
}

.detail-return-row [data-detail-return-link] {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid rgba(214, 224, 236, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  color: #304256;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.detail-return-row [data-detail-return-link]::before {
  content: "←";
  margin-right: 7px;
}

.detail-return-row [data-detail-return-link]:hover {
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

body.detail-page .site-chrome-header .site-chrome-header-inner,
body.detail-expert-page .site-chrome-header .site-chrome-header-inner {
  display: flex;
  grid-template-columns: none;
}

body.detail-page .site-chrome-footer.footer {
  margin-top: 28px;
  border-top: 1px solid var(--site-chrome-line);
  background: #f8fafc;
}

@media (max-width: 1180px) and (min-width: 761px) {
  .site-chrome-header .site-chrome-header-inner {
    gap: 10px;
  }
  .site-chrome-header .brand-logo {
    width: 42px;
    height: 42px;
  }
  .site-chrome-header .brand-title {
    font-size: 0.94rem;
  }
  .site-chrome-header .brand-subtitle {
    font-size: 0.68rem;
  }
  .site-chrome-header .site-chrome-nav {
    gap: 2px;
    padding: 5px;
    font-size: 0.78rem;
  }
  .site-chrome-header .site-chrome-nav a {
    padding: 0 7px;
  }
  .site-chrome-header .lang-dropdown-toggle {
    min-width: 78px;
    padding: 0 10px;
  }
}

@media (max-width: 760px) {
  .site-chrome-header .site-chrome-header-inner,
  body.detail-page .site-chrome-header .site-chrome-header-inner,
  body.detail-expert-page .site-chrome-header .site-chrome-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    width: min(var(--site-chrome-max-width), calc(100% - 24px));
    min-height: 0;
    padding: 12px 0;
  }

  .site-chrome-header .site-chrome-brand,
  body.detail-page .site-chrome-header .site-chrome-brand {
    grid-column: 1 / -1;
    order: 1;
    width: 100%;
    gap: 10px;
  }

  .site-chrome-header .brand-logo,
  body.detail-page .site-chrome-header .brand-logo {
    display: block;
    width: 38px;
    height: 38px;
    padding: 4px;
    border-radius: 12px;
  }

  .site-chrome-header .brand-copy {
    width: 100%;
  }

  .site-chrome-header .brand-title,
  .site-chrome-header .brand-subtitle,
  body.detail-page .site-chrome-header .brand-title,
  body.detail-page .site-chrome-header .brand-subtitle {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  .site-chrome-header .brand-title,
  body.detail-page .site-chrome-header .brand-title {
    font-size: 0.96rem;
    line-height: 1.18;
  }

  .site-chrome-header .brand-subtitle,
  body.detail-page .site-chrome-header .brand-subtitle {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .site-chrome-header .header-mobile-actions,
  body.detail-page .site-chrome-header .header-mobile-actions {
    display: flex;
    grid-column: 1 / -1;
    order: 2;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    padding-top: 2px;
  }

  .site-chrome-header .header-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    text-align: center;
  }

  .site-chrome-header .site-chrome-nav,
  .site-chrome-header .site-chrome-lang-switch,
  body.detail-page .site-chrome-header .site-chrome-nav,
  body.detail-page .site-chrome-header .site-chrome-lang-switch {
    display: none !important;
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .site-chrome-header .site-chrome-nav.mobile-open,
  .site-chrome-header .site-chrome-lang-switch.mobile-open,
  body.detail-page .site-chrome-header .site-chrome-nav.mobile-open,
  body.detail-page .site-chrome-header .site-chrome-lang-switch.mobile-open {
    display: flex !important;
  }

  .site-chrome-header .site-chrome-nav,
  body.detail-page .site-chrome-header .site-chrome-nav {
    flex-direction: column !important;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    overflow: visible;
    border: 1px solid var(--site-chrome-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
  }

  .site-chrome-header .site-chrome-nav a,
  body.detail-page .site-chrome-header .site-chrome-nav a {
    width: 100%;
    min-height: 46px;
    justify-content: flex-start;
    padding: 0 14px;
    border: 1px solid rgba(221, 231, 242, 0.92);
    border-radius: 999px;
    background: #f8fbff;
  }

  .site-chrome-header .site-chrome-lang-switch,
  body.detail-page .site-chrome-header .site-chrome-lang-switch {
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
  }

  .site-chrome-header .lang-dropdown-toggle {
    display: none;
  }

  .site-chrome-header .lang-menu,
  body.detail-page .site-chrome-header .lang-menu {
    position: static;
    display: flex;
    flex-flow: row wrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-chrome-header .lang-btn,
  body.detail-page .site-chrome-header .lang-btn {
    width: auto;
    min-width: 44px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    text-align: center;
  }

  .site-chrome-footer .footer-inner {
    width: min(var(--site-chrome-max-width), calc(100% - 24px));
    padding: 24px 0;
  }

  .detail-return-row {
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-chrome-header *,
  .detail-return-row * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
