 



:root { --xn-h: 48px; }

.xnav {
  --xn-bg: #b01f24;
  --xn-bg2: #c62828;
  --xn-fg: #ffffff;
  --xn-dim: rgba(255, 255, 255, .82);
  --xn-acc: #ffffff;
  position: sticky;
  top: 0;
  z-index: 9990;
  background: linear-gradient(180deg, var(--xn-bg) 0%, var(--xn-bg2) 100%);
  color: var(--xn-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 2px 10px rgba(122, 20, 20, .24);
  -webkit-text-size-adjust: 100%;
}

.xnav-in {
  max-width: 1400px;
  margin: 0 auto;
  min-height: var(--xn-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.xnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 10px 6px 0;
  white-space: nowrap;
}
button.xnav-brand {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.xnav-brand:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 2px; border-radius: 6px; }
button.xnav-brand:active { opacity: .82; }
.xnav-logo {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #ffffff, #ffe4e4);
  color: #c62828; font-size: 13px; font-weight: 700;
  flex: none;
}
.xnav-brand-sub {
  font-size: 10px; font-weight: 400; color: var(--xn-dim);
  margin-left: 2px; letter-spacing: .06em;
}

.xnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.xnav-links::-webkit-scrollbar { display: none; }

.xnav-links a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--xn-dim);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.6;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.xnav-links a:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.xnav-links a.xn-on {
  color: #c62828;
  background: #fff;
  border-color: #fff;
  font-weight: 600;
}

.xnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
  color: var(--xn-dim);
  font-size: 12px;
}
 
.xnav-right .sfxn,
.xnav-right .theme-switch-group { position: static !important; top: auto !important; right: auto !important; }
.xnav-right .sfxn { min-width: 34px; padding: 6px 9px; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); }
.xnav-right .sfxn:hover { background: rgba(255, 255, 255, .24); }

.xnav-burger {
  display: none;
  flex: none;
  width: 34px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 15px; line-height: 1;
  cursor: pointer;
  align-items: center; justify-content: center;
}

.xnav-drawer {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 8px 12px 12px;
  background: rgba(0, 0, 0, .18);
}
.xnav-drawer a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--xn-fg);
  text-decoration: none;
  font-size: 14px;
}
.xnav-drawer a + a { margin-top: 2px; }
.xnav-drawer a.xn-on { background: #fff; color: #c62828; font-weight: 600; }

@media (max-width: 900px) {
  .xnav-links { display: none; }
  .xnav-burger { display: inline-flex; }
  .xnav.open .xnav-drawer { display: block; }
  .xnav-in { gap: 4px; }
  .xnav-brand-sub { display: none; }
}

@media print {
  .xnav { display: none !important; }
}

 
.xnav-right { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 2px; }
.xnav-user {
  font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.xnav-user-sub { font-size: 11px; color: var(--xn-dim); white-space: nowrap; }
.xnav-quit {
  color: #fff; opacity: .85; font-size: 12px; text-decoration: underline;
  white-space: nowrap; padding: 2px 4px;
}
.xnav-quit:hover { opacity: 1; }
.xnav-login {
  display: inline-block; padding: 4px 14px; border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #ffe4e4); color: #c62828;
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
@media (max-width: 860px) {
  .xnav-user { max-width: 110px; }
  .xnav-user-sub { display: none; }
}

 
.xnav-auth { display: inline-flex; align-items: center; gap: 8px; }

 
.xnav-user { cursor: pointer; }
.xnav-user:hover { text-decoration: underline; }

 
.xnp-mask {
  display: none; position: fixed; inset: 0; z-index: 10050;
  background: rgba(40, 8, 8, .45);
  align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.xnp-card {
  width: min(420px, 94vw); background: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(60, 10, 10, .35);
  padding: 20px 22px 24px; color: #333; font-size: 14px;
}
.xnp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.xnp-head span { font-size: 17px; font-weight: 700; color: #b01f24; }
.xnp-x { border: none; background: none; font-size: 22px; line-height: 1; color: #999; cursor: pointer; padding: 2px 6px; }
.xnp-x:hover { color: #c62828; }
.xnp-ro { background: #faf3f2; border: 1px solid #f0dddb; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #7a4a48; margin-bottom: 14px; }
.xnp-lb { display: block; font-size: 12px; color: #666; margin: 10px 0 4px; }
.xnp-in {
  width: 100%; padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 14px; outline: none; box-sizing: border-box; background: #fff; font-family: inherit;
}
.xnp-in:focus { border-color: #c62828; box-shadow: 0 0 0 2px rgba(198, 40, 40, .12); }
.xnp-btn {
  width: 100%; margin-top: 16px; padding: 10px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #b01f24, #c62828); color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.xnp-btn:hover { filter: brightness(1.06); }
.xnp-btn2 { background: #fff; color: #c62828; border: 1px solid #c62828; font-weight: 600; margin-top: 10px; }
.xnp-div { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #e5c9c7; font-size: 12px; color: #999; }
.xnp-toast {
  position: fixed; left: 50%; bottom: 8vh; transform: translateX(-50%) translateY(16px);
  background: rgba(30, 30, 30, .92); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 20px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 10060;
}
.xnp-toast.xnp-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.xnp-toast.xnp-err { background: rgba(166, 26, 26, .95); }
