/* xuhuiquan.cn — Shared header skin, 2026-11-07.
   ONE visual source for normal pages, model pages and homepage.
   Scope: navigation only. No changes to body content or page-specific artwork.
   The HTML header is still rendered by static page templates; this file is
   the authoritative visual source, not a server-side HTML include. */

@media (max-width:760px) {
  html body > header.nav {
    position:sticky;top:0;z-index:80;
    padding:9px 0 10px;
    border-bottom:1px solid rgba(91,72,55,.18);
    background:rgba(246,240,228,.97);
    -webkit-backdrop-filter:blur(10px);
    backdrop-filter:blur(10px);
  }
  html body > header.nav .wrap.nav-inner {
    display:flex;flex-direction:column;align-items:stretch;
    justify-content:flex-start;gap:9px;
    width:calc(100% - 32px);max-width:650px;
    min-height:0;margin:0 auto;padding:0;
  }
  html body > header.nav a.brand {
    display:flex;align-items:center;gap:9px;
    min-width:0;white-space:normal;
    color:#304846;text-decoration:none;
  }
  html body > header.nav .brand-mark {
    display:grid;place-items:center;flex:0 0 30px;
    width:30px;height:30px;
    border:1px solid #b9ab96;border-radius:4px;
    background:#f9f5ea;color:#304846;
    font-family:"Songti SC",serif;font-size:17px;font-weight:700;
  }
  html body > header.nav .brand-copy {
    display:flex;flex-direction:column;justify-content:center;
    gap:3px;min-width:0;line-height:1.15;
  }
  html body > header.nav .brand-copy strong {
    color:#304846;font-size:16px;font-weight:800;letter-spacing:.05em;
  }
  html body > header.nav .brand-copy small {
    margin:0;color:#736a5e;font-size:10px;font-weight:600;letter-spacing:.1em;
  }
  html body > header.nav nav.nav-links {
    display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));
    gap:7px;width:100%;margin:0;padding:0;
    overflow:visible;white-space:normal;
  }
  html body > header.nav nav.nav-links a {
    box-sizing:border-box;display:flex !important;
    justify-content:center;align-items:center;
    min-width:0;min-height:40px;padding:6px 2px;
    border:1px solid rgba(91,72,55,.16);border-radius:7px;
    background:rgba(255,255,255,.54);
    color:#304846;font-size:13px;font-weight:700;
    text-align:center;text-decoration:none !important;
    line-height:1.3;white-space:nowrap;
  }
  html body > header.nav nav.nav-links a[aria-current="page"] {
    background:rgba(196,170,120,.13);
    border-color:rgba(91,72,55,.34);
  }
  html body > header.nav nav.nav-links a::after {content:none !important;}
  html body > header.nav nav.nav-links a:focus-visible {
    outline:2px solid #8c7150;outline-offset:2px;
  }
}
/* Homepage's legacy .nav a rule adds 8px vertical padding to every
   descendant link, including the brand. Cancel it so the brand mark and
   first row are pixel-aligned with ordinary site pages on mobile. */
html body.home-preview > header.nav a.brand {padding:0;margin:0;}
html body.home-preview > header.nav a.brand::after {content:none;display:none;}

/* Shared, canonical header for homepage desktop.
   Header markup is rendered from site-header.json like normal pages.
   Scoped to the homepage so its independent editorial CSS remains untouched. */
@media (min-width:761px) {
  html body.home-preview > header.nav {
    box-sizing:border-box;display:block;position:sticky;top:0;z-index:90;
    margin:0;padding:0;
    background:rgba(246,240,228,.97);
    border-bottom:1px solid rgba(91,72,55,.16);
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  }
  html body.home-preview > header.nav .wrap.nav-inner {
    box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;
    gap:24px;min-height:70px;width:min(1120px,calc(100% - 40px));margin:0 auto;
  }
  html body.home-preview > header.nav a.brand {
    display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
    gap:12px;font-family:var(--sans);font-size:15px;
    line-height:1.12;letter-spacing:.04em;
    text-decoration:none;color:#304846;white-space:nowrap;
  }
  html body.home-preview > header.nav .brand-mark {
    display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;
    font-family:"Songti SC",serif;font-weight:700;font-size:18px;
    border:1px solid #b9ab96;border-radius:3px;color:#304846;
    background:#f9f5ea;
  }
  html body.home-preview > header.nav .brand-copy {
    display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
    gap:4px;line-height:1.1;
  }
  html body.home-preview > header.nav .brand-copy strong {
    font-family:var(--sans);font-weight:800;font-size:15px;
    letter-spacing:.06em;color:#304846;
  }
  html body.home-preview > header.nav .brand-copy small {
    margin:0;font-family:var(--sans);font-size:10px;font-weight:600;
    letter-spacing:.1em;line-height:1.2;color:#736a5e;
  }
  html body.home-preview > header.nav nav.nav-links {
    display:flex;align-items:center;gap:26px;margin:0;padding:0;
    font-family:var(--sans);font-size:14px;white-space:nowrap;color:#736a5e;
  }
  html body.home-preview > header.nav nav.nav-links a {
    display:inline-flex;align-items:center;position:relative;min-height:44px;
    padding:6px 0;font-size:14px;text-decoration:none;color:inherit;
  }
  html body.home-preview > header.nav nav.nav-links a:hover {color:#304846;}
  html body.home-preview > header.nav nav.nav-links a::after {content:none;}
}
