:root {
  --page: #1f1f1e;
  --ink: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.1);
  --gold: #d3a377;
  --wx: #07c160;
  --wx-bright: #0bd16a;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --font-serif: "Store Serif", Georgia, "Times New Roman", "Songti SC", serif;
  --font-display: "Horizon Fraunces", "Source Serif 4", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 20px;
  --topbar-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

button { font: inherit; color: inherit; }
a { color: inherit; }
img, svg { display: block; }

:focus-visible { outline: 2px solid rgba(120, 160, 255, 0.85); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 3.4vw, 49px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(rgba(3, 5, 9, 0.55) 0%, rgba(3, 5, 9, 0.18) 62%, rgba(3, 5, 9, 0) 100%);
  transition: opacity 0.46s ease, transform 0.46s var(--ease-out);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 70px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  transition: transform 0.3s var(--ease-out);
}

.brand-mark img, .brand-mark svg { width: 26px; height: 20px; fill: currentColor; }

.brand-text {
  display: inline-block;
  max-width: 220px;
  margin-left: 14px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 620;
  line-height: 1.35;
  padding-block: 3px;
  letter-spacing: -0.01em;
  color: rgba(245, 245, 245, 0.96);
  transition: max-width 0.34s var(--ease-out), opacity 0.26s ease, transform 0.34s var(--ease-out), margin 0.34s var(--ease-out);
}

.topbar.is-scrolled .brand-text { max-width: 0; opacity: 0; margin-left: 0; transform: translateX(-8px); }
.topbar.is-scrolled .brand-mark { transform: scale(0.96); }
.topbar.is-scrolled { background: rgba(20,20,20,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

.topnav { display: flex; align-items: center; gap: 23px; height: 56px; }

.topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.94;
  transition: opacity 0.2s ease;
}

.topnav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topnav-link:hover { opacity: 1; }
.topnav-link:hover::after, .support-trigger[aria-expanded="true"]::after { opacity: 0.7; transform: scaleX(1); }
.topnav-link .chev { transition: transform 0.22s ease; }
.support-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  cursor: pointer;
  place-items: center;
  color: #fff;
}

.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out), opacity 0.2s ease;
}

.menu-toggle span { position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
/* ---------- Support dropdown ---------- */
.support-menu { position: relative; }

.support-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 10px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(16, 16, 16, 0.97);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transform-origin: 100% 0;
  transform: translateY(-6px) scale(0.98);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.22s var(--ease-out);
}

.support-panel[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.support-panel.is-open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }

.sp-group {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.sp-wechat {
  border-color: rgba(7, 193, 96, 0.5);
  background: linear-gradient(180deg, rgba(7, 193, 96, 0.16), rgba(7, 193, 96, 0.05));
  box-shadow: inset 0 0 0 1px rgba(7, 193, 96, 0.08), 0 0 24px rgba(7, 193, 96, 0.08);
}

.sp-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.sp-head b { font-weight: 700; }

.sp-badge {
  padding: 1px 7px;
  border: 1px solid rgba(7, 193, 96, 0.35);
  border-radius: 6px;
  background: rgba(7, 193, 96, 0.16);
  color: #4fe39a;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.sp-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }

.sp-btn {
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.sp-btn:active { transform: scale(0.98); }
.sp-btn-green { background: var(--wx-bright); color: #fff; box-shadow: 0 6px 18px rgba(7, 193, 96, 0.28); }
.sp-btn-green:hover { background: #12dc75; }
.sp-btn-dark { background: rgba(0, 0, 0, 0.32); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.sp-btn-dark:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(0, 0, 0, 0.45); }

.sp-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  transition: background-color 0.18s ease;
}

.sp-row:hover { background: rgba(255, 255, 255, 0.05); }
.sp-num { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.5); }

/* ---------- Icons ---------- */
.ico-wechat, .ico-qq { display: inline-block; flex: none; width: 16px; height: 16px; background: currentColor; }
.ico-wechat {
  color: var(--wx);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.2 3.5C5 3.5 1.6 6.3 1.6 9.8c0 2 1.1 3.7 2.8 4.9l-.7 2.2 2.6-1.4c.9.3 1.9.4 2.9.4h.5a5.6 5.6 0 0 1-.2-1.5c0-3.4 3.2-6.1 7.2-6.1h.5C16.5 5.5 13.2 3.5 9.2 3.5zM6.6 8.6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm5.2 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3Cpath d='M22.4 14.4c0-2.9-2.9-5.2-6.4-5.2s-6.4 2.3-6.4 5.2 2.9 5.2 6.4 5.2c.8 0 1.6-.1 2.3-.4l2.1 1.2-.6-1.9c1.5-1 2.6-2.5 2.6-4.1zm-8.6-.9a.85.85 0 1 1 0-1.7.85.85 0 0 1 0 1.7zm4.4 0a.85.85 0 1 1 0-1.7.85.85 0 0 1 0 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.2 3.5C5 3.5 1.6 6.3 1.6 9.8c0 2 1.1 3.7 2.8 4.9l-.7 2.2 2.6-1.4c.9.3 1.9.4 2.9.4h.5a5.6 5.6 0 0 1-.2-1.5c0-3.4 3.2-6.1 7.2-6.1h.5C16.5 5.5 13.2 3.5 9.2 3.5zM6.6 8.6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm5.2 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3Cpath d='M22.4 14.4c0-2.9-2.9-5.2-6.4-5.2s-6.4 2.3-6.4 5.2 2.9 5.2 6.4 5.2c.8 0 1.6-.1 2.3-.4l2.1 1.2-.6-1.9c1.5-1 2.6-2.5 2.6-4.1zm-8.6-.9a.85.85 0 1 1 0-1.7.85.85 0 0 1 0 1.7zm4.4 0a.85.85 0 1 1 0-1.7.85.85 0 0 1 0 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ico-qq {
  color: #2ab6f5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c-3.4 0-5.6 2.6-5.6 6v1.3c-1 1.3-2.4 3.5-2.4 5.4 0 1 .4 1.3.8 1.3.4 0 1-.6 1.4-1.3.3 1 1 1.9 1.8 2.6-1 .4-1.8 1-1.8 1.6 0 .9 1.6 1.6 3.6 1.6 1 0 1.9-.2 2.2-.6.3.4 1.2.6 2.2.6 2 0 3.6-.7 3.6-1.6 0-.6-.8-1.2-1.8-1.6.8-.7 1.5-1.6 1.8-2.6.4.7 1 1.3 1.4 1.3.4 0 .8-.3.8-1.3 0-1.9-1.4-4.1-2.4-5.4V8.5c0-3.4-2.2-6-5.6-6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c-3.4 0-5.6 2.6-5.6 6v1.3c-1 1.3-2.4 3.5-2.4 5.4 0 1 .4 1.3.8 1.3.4 0 1-.6 1.4-1.3.3 1 1 1.9 1.8 2.6-1 .4-1.8 1-1.8 1.6 0 .9 1.6 1.6 3.6 1.6 1 0 1.9-.2 2.2-.6.3.4 1.2.6 2.2.6 2 0 3.6-.7 3.6-1.6 0-.6-.8-1.2-1.8-1.6.8-.7 1.5-1.6 1.8-2.6.4.7 1 1.3 1.4 1.3.4 0 .8-.3.8-1.3 0-1.9-1.4-4.1-2.4-5.4V8.5c0-3.4-2.2-6-5.6-6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ico-white { color: #fff; }
/* ---------- Mobile menu ---------- */
.mobile-sheet {
  position: fixed;
  inset: var(--topbar-h) 12px auto 12px;
  z-index: 59;
  padding: 10px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(16, 16, 16, 0.97);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.24s var(--ease-out);
}

.mobile-sheet[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.mobile-sheet.is-open { opacity: 1; transform: none; visibility: visible; }

.ms-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.ms-link::after { content: "↗"; font-size: 12px; opacity: 0.5; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 64px clamp(20px, 3.65vw, 52px) 72px;
}

.footer-brand { max-width: 236px; }
.footer-mark { display: grid; place-items: center; width: 70px; height: 40px; margin: 0 0 24px 40px; color: #fff; }
.footer-mark svg { width: 30px; height: 22px; fill: currentColor; }

.footer-seo {
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.7;
  color: rgb(138, 143, 152);
}

.footer-copy { margin: 16px 0 0; font-size: 14px; color: rgba(247, 244, 236, 0.86); }

.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 6px; }
.footer-col:nth-of-type(2) { grid-column: 3; }
.footer-col:nth-of-type(3) { grid-column: 4; }

.footer-col h3 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: #fff; letter-spacing: 0.02em; }

.footer-col a, .footer-col button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 450;
  color: rgba(247, 244, 236, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover, .footer-col button:hover { color: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 120;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s ease, transform 0.28s var(--ease-out);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- First paint entrance ---------- */
.is-entering .topbar, .is-entering .market-head { opacity: 0; transform: translateY(18px); }

@media (max-width: 960px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; max-width: 420px; }
  .footer-mark { margin-left: -16px; }
  .footer-col:nth-of-type(2), .footer-col:nth-of-type(3) { grid-column: auto; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 64px; }
  .topnav { display: none; }
  .menu-toggle { display: grid; }
  .brand-mark { width: 44px; }
  .brand-text { margin-left: 8px; font-size: 16px; }
}

@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; }
}

[hidden] { display: none !important; }
.ico-wechat, .ico-qq { background: transparent; border-radius: 0; clip-path: none; mask: none; -webkit-mask: none; }
.ico-wechat { background: url("../images/icons/wechat.svg") center/contain no-repeat; }
.ico-wechat.ico-white { background-image: url("../images/icons/wechat-white.svg"); }
.ico-qq { background: url("../images/icons/qq.svg") center/contain no-repeat; }
.ico-wechat::before, .ico-wechat::after, .ico-qq::before, .ico-qq::after { content: none; }

.footer-mark img { width: 30px; height: 24px; }
.toast { max-width: calc(100vw - 32px); white-space: normal; text-align: center; }

@media (max-width: 760px) {
  .footer-col { gap: 4px; }
  .footer-col a, .footer-col button { min-height: 44px; }
}
