/* 子涵-野鸡量化 · 墨色酸橙视觉壳（逻辑仍走 app.js） */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Manrope:wght@400;500;600;700;800&family=Syne:wght@600;700;800&display=swap");

:root {
  --nex-primary: #1a6b4a;
  --nex-primary2: #c8f542;
  --nex-ink: #14201a;
  --nex-bg: #e8ece6;
  --nex-page: #eef1ec;
  --nex-card: #f7f8f5;
  --nex-text: #14201a;
  --nex-muted: #6a746c;
  --nex-line: #d5ddd4;
  --nex-orange: #c45c26;
  --nex-red: #d64545;
  --nex-green: #1a8f5c;
  --nex-tab-h: 58px;
  --nex-radius: 12px;
  --nex-font: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --nex-display: "Syne", "Manrope", "PingFang SC", sans-serif;
  --nex-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body.nex-body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--nex-font);
  color: var(--nex-text);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(200, 245, 66, 0.22), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(26, 107, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #f4f6f1 0%, var(--nex-bg) 42%, #e4e9e2 100%);
  -webkit-text-size-adjust: 100%;
}

.nex-body .portal[hidden],
.nex-body .app[hidden] { display: none !important; }

.mono { font-family: var(--nex-mono); font-variant-numeric: tabular-nums; }
.up { color: var(--nex-green) !important; }
.down { color: var(--nex-red) !important; }

/* ===== 登录页 ===== */
.nex-body .portal.nex-login {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.nex-login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(165deg, rgba(20, 32, 26, 0.92) 0%, rgba(26, 107, 74, 0.88) 48%, rgba(232, 236, 230, 0.98) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 11px,
      rgba(200, 245, 66, 0.05) 11px,
      rgba(200, 245, 66, 0.05) 12px
    );
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nex-login::before {
  content: "";
  position: absolute;
  inset: -20% 20% auto -10%;
  height: 55%;
  background: radial-gradient(circle at 30% 40%, rgba(200, 245, 66, 0.35), transparent 62%);
  pointer-events: none;
  animation: nexBlob 8s ease-in-out infinite alternate;
}

@keyframes nexBlob {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(8%, 6%) scale(1.08); }
}

.nex-login-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 8px 20px 24px;
  text-align: center;
  pointer-events: none;
}

.nex-login-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: var(--nex-display);
  font-size: 2.75rem;
  font-weight: 800;
  background: var(--nex-primary2);
  color: var(--nex-ink);
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px rgba(10, 20, 14, 0.28);
  animation: nexFloat 3.6s ease-in-out infinite;
}

@keyframes nexFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.nex-login-mark-name {
  margin: 14px 0 0;
  font-family: var(--nex-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(247, 248, 245, 0.72);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.nex-login-brand {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: calc(40px + env(safe-area-inset-top)) 20px 0;
  color: #f7f8f5;
  text-align: center;
}
.nex-login-brand h1 {
  margin: 0;
  font-family: var(--nex-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.nex-login-brand p {
  margin: 8px 0 0;
  opacity: 0.78;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.nex-login-card {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  background: var(--nex-card);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px 24px;
  border-top: 1px solid rgba(200, 245, 66, 0.35);
}

.nex-login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: #e3e8e1 !important;
  border-radius: 12px;
}

.nex-login-tabs button {
  border: none;
  background: transparent;
  height: 42px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--nex-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nex-login-tabs button.active {
  background: var(--nex-ink) !important;
  color: var(--nex-primary2) !important;
}

.nex-login-card label {
  display: block;
  color: var(--nex-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.nex-login-card label span { display: block; margin-bottom: 8px; padding-left: 2px; }
.nex-auth-nick.hidden { display: none !important; }
.nex-login-input {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dce3e8;
  border-radius: 12px;
  height: 48px;
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.04);
}
.nex-login-input input {
  border: none;
  background: transparent;
  width: 100%;
  font: inherit;
  font-size: 15px;
  outline: none;
  color: var(--nex-text);
}
.nex-login-input input::placeholder { color: #9aa8b3; }
.nex-login-input:focus-within {
  border-color: var(--nex-primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.12);
}
.nex-login-forgot {
  text-align: right;
  font-size: 12px;
  color: var(--nex-muted);
  margin: 6px 2px 0;
}
.nex-btn-primary {
  display: block;
  width: 100%;
  border: none;
  height: 48px;
  margin-top: 20px;
  border-radius: 12px;
  color: var(--nex-ink);
  font: inherit;
  font-family: var(--nex-display);
  font-size: 15px;
  font-weight: 700;
  background: var(--nex-primary2);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.nex-btn-primary:active { transform: scale(0.985); filter: brightness(0.96); }
.nex-login-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--nex-muted);
}
.nex-login-foot .link { color: var(--nex-primary); font-weight: 700; cursor: pointer; }
.nex-login-agree {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--nex-card);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--nex-muted);
}
.nex-login-agree input { width: 15px; height: 15px; accent-color: var(--nex-primary); }
.portal-err { color: var(--nex-red); font-size: 13px; margin: 8px 0 0; }

/* ===== App 壳 ===== */
.nex-body .app.shell.nex-app {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: calc(var(--nex-tab-h) + env(safe-area-inset-bottom)) !important;
}

.nex-body .app.shell.nex-app.nex-sub-mode {
  padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
}

.nex-app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  padding-bottom: calc(var(--nex-tab-h) + env(safe-area-inset-bottom));
}

.nex-app-top {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  z-index: 55;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 10px;
  background: rgba(20, 32, 26, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 245, 66, 0.18);
  box-sizing: border-box;
}

.nex-app-top-spacer {
  width: 100%;
  height: var(--nex-app-top-h, 96px);
  flex-shrink: 0;
  pointer-events: none;
}

.nex-app-top .logo {
  grid-column: 1;
  grid-row: 1;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--nex-display);
  font-weight: 800;
  font-size: 1.15rem;
  background: var(--nex-primary2);
  color: var(--nex-ink);
  letter-spacing: 0.02em;
}

.nex-app-top .brand-text {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.nex-app-top h1 {
  margin: 0;
  font-family: var(--nex-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: #f3f6f1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.nex-app-top .sub {
  margin: 2px 0 0;
  color: rgba(200, 245, 66, 0.75);
  font-size: 0.75rem;
  line-height: 1.2;
}

.nex-app-top .top-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.nex-app-refresh {
  grid-column: 3;
  grid-row: 1;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 245, 66, 0.35);
  border-radius: 10px;
  background: rgba(200, 245, 66, 0.12);
  color: #d8f26a;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nex-app-refresh svg {
  width: 18px;
  height: 18px;
  display: block;
}
.nex-app-refresh:active {
  transform: scale(0.96);
  background: rgba(200, 245, 66, 0.22);
}
.nex-app-refresh.spinning svg {
  animation: nex-refresh-spin 0.75s linear infinite;
}
.nex-app-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}
@keyframes nex-refresh-spin {
  to { transform: rotate(360deg); }
}

.nex-app-top .badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(213, 221, 212, 0.22);
  color: #a8b3aa;
  font-size: 0.7rem;
  line-height: 1.3;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
}

.nex-app-top .badge.ok {
  color: var(--nex-primary2);
  border-color: rgba(200, 245, 66, 0.35);
}

.nex-app-top .badge.err {
  color: #ff8f8f;
  border-color: rgba(214, 69, 69, 0.4);
}

.nex-app-top[hidden] { display: none !important; }

.nex-app.nex-pos-mode { background: transparent; }
.nex-app .top.compact { display: none; }

.nex-page {
  display: none;
  animation: nexFade 0.28s ease;
}
.nex-page:not(.active) { display: none !important; }
.nex-page.active { display: block; }
.nex-page.nex-pos.active { display: flex !important; }
@keyframes nexFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ===== 底部 Tab ===== */
.nex-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  height: calc(var(--nex-tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(247, 248, 245, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--nex-line);
  z-index: 50;
}
.nex-tabbar[hidden] { display: none !important; }

.nex-tab-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0 4px;
  color: #8a948c;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
}
.nex-tab-item img { width: 22px; height: 22px; opacity: 0.72; filter: grayscale(0.35); }
.nex-tab-item .nex-tab-ico {
  width: 22px;
  height: 22px;
  color: #8a948c;
}
.nex-tab-item.active .nex-tab-ico { color: var(--nex-primary); }
.nex-tab-item.active {
  color: var(--nex-primary);
  font-weight: 700;
}
.nex-tab-item.active img { opacity: 1; filter: none; }
.nex-tab-item.active::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--nex-primary2);
}

/* ===== 排行榜 ===== */
.nex-rank { padding-bottom: calc(var(--nex-tab-h) + 16px); }
.nex-rank-hero {
  margin: 12px 14px 10px;
  padding: 18px 16px;
  border-radius: var(--nex-radius);
  background:
    linear-gradient(135deg, #14201a 0%, #1a6b4a 58%, #245c40 100%);
  color: #f7f8f5;
  position: relative;
  overflow: hidden;
}
.nex-rank-hero::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 40%;
  background: rgba(200, 245, 66, 0.22);
}
.nex-rank-hero h2 {
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
  font-family: var(--nex-display);
  font-size: 1.2rem;
}
.nex-rank-hero p {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  opacity: 0.85;
}
.nex-rank-tabs { margin: 0 14px 12px; }
.nex-rank-podium {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 8px;
  align-items: end;
  margin: 0 14px 12px;
  min-height: 120px;
}
.nex-rank-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--nex-radius);
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  text-align: center;
}
.nex-rank-top.rank-1 {
  padding-top: 16px;
  padding-bottom: 14px;
  border-color: rgba(200, 245, 66, 0.65);
  background: linear-gradient(180deg, #fbfff0 0%, #f7f8f5 100%);
}
.nex-rank-top.self { outline: 2px solid rgba(26, 107, 74, 0.35); outline-offset: 1px; }
.nex-rank-top .medal { font-size: 1.2rem; line-height: 1; }
.nex-rank-top .name { font-size: 0.8rem; color: var(--nex-text); font-weight: 600; }
.nex-rank-top .val { font-size: 0.95rem; font-weight: 700; }
.nex-rank-top .sub { font-size: 0.7rem; color: var(--nex-muted); }
.nex-rank-list {
  margin: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nex-rank-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--nex-radius);
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
}
.nex-rank-row.self { border-color: rgba(26, 107, 74, 0.45); }
.nex-rank-row .idx { color: var(--nex-muted); font-weight: 700; }
.nex-rank-row .name { font-size: 0.9rem; color: var(--nex-text); }
.nex-rank-row .meta { font-size: 0.72rem; color: #9aa49c; }
.nex-rank-row .val { font-size: 0.92rem; }
.nex-rank-self {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nex-tab-h) + env(safe-area-inset-bottom) + 8px);
  transform: translateX(-50%);
  width: min(402px, calc(100% - 28px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--nex-radius);
  background: var(--nex-ink);
  color: #f7f8f5;
  font-size: 0.86rem;
  z-index: 40;
}
.nex-rank-self b.mono.up { color: var(--nex-green); }
.nex-rank-self b.mono.down { color: var(--nex-red); }
.nex-rank-top .val.up,
.nex-rank-row .val.up { color: var(--nex-green); }
.nex-rank-top .val.down,
.nex-rank-row .val.down { color: var(--nex-red); }

/* ===== 子页面顶栏 ===== */
.nex-navbar {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  background: var(--nex-ink);
}
.nex-sub .nex-navbar { padding-top: 0; }
.nex-navbar.light {
  background: var(--nex-card);
  border-bottom: 1px solid var(--nex-line);
}
.nex-navbar .back {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  color: #f7f8f5;
  padding: 0;
}
.nex-navbar.light .back { color: var(--nex-text); }
.nex-navbar .title {
  flex: 1;
  text-align: center;
  font-family: var(--nex-display);
  font-size: 16px;
  font-weight: 700;
  color: #f7f8f5;
  margin-right: 36px;
}
.nex-navbar.light .title { color: var(--nex-text); }

/* ===== 首页 ===== */
.nex-home {
  background:
    linear-gradient(180deg, #14201a 0%, #1a6b4a 118px, transparent 210px);
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - var(--nex-tab-h));
  padding: 12px 14px 20px;
}
.nex-home-banner {
  color: #f7f8f5;
  padding: 6px 2px 14px;
}
.nex-home-banner h2 {
  margin: 0;
  font-family: var(--nex-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.nex-home-banner p {
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.nex-home-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(247, 248, 245, 0.94);
  border-radius: var(--nex-radius);
  padding: 11px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(200, 245, 66, 0.35);
  cursor: pointer;
  user-select: none;
}
.nex-notice-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--nex-primary);
}
.nex-notice-body { flex: 1; min-width: 0; }
.nex-notice-txt {
  font-size: 12px;
  color: #4d564f;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nex-notice-more {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--nex-primary);
  font-weight: 700;
  margin-top: 1px;
}

.nex-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}
.nex-notice-modal[hidden] { display: none !important; }
.nex-notice-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 26, 0.55);
}
.nex-notice-dialog {
  position: relative;
  width: min(380px, 100%);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--nex-card);
  border-radius: 16px;
  border: 1px solid var(--nex-line);
  overflow: hidden;
}
.nex-notice-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--nex-line);
}
.nex-notice-dialog-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--nex-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nex-notice-dialog-head h3 {
  margin: 0;
  font-family: var(--nex-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--nex-text);
  line-height: 1.3;
}
.nex-notice-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #e7ece5;
  color: #555;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.nex-notice-dialog-body {
  padding: 4px 0 12px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.nex-notice-row { border-bottom: 1px solid #e8ede6; }
.nex-notice-row:last-child { border-bottom: none; }
.nex-notice-row-head {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}
.nex-notice-row-head:active { background: #eef2eb; }
.nex-notice-row-time {
  grid-column: 1;
  font-size: 11px;
  color: var(--nex-muted);
  line-height: 1.3;
}
.nex-notice-row-title {
  grid-column: 1;
  font-size: 14px;
  font-weight: 650;
  color: var(--nex-text);
  line-height: 1.35;
}
.nex-notice-row-chev {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #9aa49c;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.nex-notice-row.open .nex-notice-row-chev {
  transform: rotate(180deg);
  color: var(--nex-primary);
}
.nex-notice-row-body { padding: 0 16px 12px; }
.nex-notice-row-body[hidden] { display: none !important; }
.nex-notice-row-body ul {
  margin: 0;
  padding-left: 1.15em;
  color: #4d564f;
  font-size: 13px;
  line-height: 1.6;
}
.nex-notice-row-body li { margin: 3px 0; }
.nex-notice-row-ver {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--nex-primary);
  font-family: var(--nex-mono);
}
.nex-notice-pinned {
  background: linear-gradient(180deg, #f3f8ea 0%, #fff 100%);
  border-bottom: 1px solid #d7e6c0;
}
.nex-notice-pin-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #1a6b4a;
  color: #c8f542 !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  width: fit-content;
}

.nex-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 14px 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--nex-line);
}
.nex-feature-item {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #3d463f;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  cursor: pointer;
}
.nex-feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease;
}
.nex-feature-item:active .nex-feature-ico { transform: scale(0.94); }
.nex-feature-ico.blue {
  background: var(--nex-ink);
  color: var(--nex-primary2);
}
.nex-feature-ico svg { width: 20px; height: 20px; }

.nex-home-earn-card {
  width: 100%;
  border: 1px solid var(--nex-line);
  text-align: left;
  font: inherit;
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
}
.nex-home-earn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nex-home-earn-head strong {
  font-family: var(--nex-display);
  font-size: 15px;
  color: var(--nex-text);
}
.nex-home-earn-head .more {
  font-size: 12px;
  color: var(--nex-muted);
}
.nex-home-earn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.nex-home-earn-grid span {
  display: block;
  font-size: 11px;
  color: var(--nex-muted);
  margin-bottom: 6px;
}
.nex-home-earn-grid b {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--nex-mono);
}

.nex-card-title {
  font-family: var(--nex-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--nex-text);
  margin-bottom: 12px;
}
.nex-home-api-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--nex-line);
  font-size: 12px;
  color: var(--nex-muted);
}
.nex-home-api-row b {
  font-size: 13px;
  color: var(--nex-primary);
  font-weight: 700;
}
.nex-home-api-row b.off { color: #9aa49c; }

.nex-balance-card {
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 16px;
  border: 1px solid var(--nex-line);
  margin-bottom: 12px;
}
.nex-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nex-quote-grid {
  grid-template-columns: repeat(3, 1fr);
}

.home-quote-hint {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--nex-muted);
}

.home-quote-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.home-quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.home-quote-table th,
.home-quote-table td {
  padding: 10px 6px;
  text-align: right;
  border-bottom: 1px solid var(--nex-line);
}

.home-quote-table th:first-child,
.home-quote-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.home-quote-table th {
  color: var(--nex-muted);
  font-size: 11px;
  font-weight: 600;
}

.home-quote-table td.sym {
  color: #1a2e22;
  font-weight: 700;
}

.home-quote-table td.mono {
  font-family: var(--nex-mono);
  font-weight: 600;
  font-size: 12px;
}

.home-quote-empty {
  margin: 8px 0 0;
  text-align: center;
  color: var(--nex-muted);
  font-size: 13px;
}
.nex-balance-grid .k { color: var(--nex-muted); font-size: 12px; margin-bottom: 6px; }
.nex-balance-grid .v {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--nex-mono);
}

.nex-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 14px 8px;
  border: 1px solid var(--nex-line);
}
.nex-quick-item {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 11px;
  color: #566057;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.nex-quick-item .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #e5ebe3;
  color: var(--nex-primary);
  display: grid;
  place-items: center;
  font-size: 16px;
}

/* ===== 空状态 ===== */
.nex-empty-card {
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 48px 16px;
  text-align: center;
  color: var(--nex-muted);
  font-size: 14px;
  border: 1px solid var(--nex-line);
}

/* ===== 我的 ===== */
.nex-mine {
  background: linear-gradient(180deg, #14201a 0%, #1a6b4a 110px, transparent 190px);
  min-height: calc(100vh - var(--nex-tab-h));
  padding-bottom: 20px;
}
.nex-mine-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 20px;
  color: #f7f8f5;
}
.nex-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--nex-primary2);
  color: var(--nex-ink);
  border: none;
  display: grid;
  place-items: center;
  font-family: var(--nex-display);
  font-size: 22px;
  font-weight: 800;
}
.nex-mine-user .name {
  font-family: var(--nex-display);
  font-size: 18px;
  font-weight: 700;
}
.nex-mine-user .sub { font-size: 12px; opacity: 0.82; margin-top: 4px; }

.nex-mine-card {
  margin: 0 14px 12px;
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  overflow: hidden;
  border: 1px solid var(--nex-line);
}
.nex-menu-item {
  width: 100%;
  border: none;
  background: var(--nex-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--nex-text);
  border-bottom: 1px solid #e8ede6;
}
.nex-menu-item:last-child { border-bottom: none; }
.nex-menu-item .arr { color: #b0b8b1; font-size: 16px; }

.nex-mine-actions { padding: 0 14px; display: grid; gap: 10px; }
.nex-btn-outline {
  border: 1px solid var(--nex-line);
  background: var(--nex-card);
  border-radius: 12px;
  height: 42px;
  font: inherit;
  color: #566057;
}
.nex-btn-outline.danger { color: var(--nex-red); border-color: #f0c8c8; }

/* ===== 子页内容区 ===== */
.nex-sub-body {
  padding: 12px 14px 24px;
  background: transparent;
  min-height: calc(100vh - 44px - env(safe-area-inset-top));
}
.nex-panel {
  background: var(--nex-card);
  border-radius: var(--nex-radius);
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--nex-line);
}
.nex-panel h2, .nex-panel h3 {
  margin: 0 0 12px;
  font-family: var(--nex-display);
  font-size: 16px;
}
.nex-panel .hint, .nex-panel .hint.tiny {
  color: var(--nex-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 表单在 NexTrade 子页内 */
.nex-sub .form label,
.nex-panel .form label {
  color: var(--nex-muted);
}
.nex-sub input,
.nex-sub select,
.nex-panel input,
.nex-panel select {
  border-radius: 10px !important;
  border-color: var(--nex-line) !important;
  background: #fff !important;
}
.nex-sub .primary,
.nex-panel .primary,
.side-btns .primary {
  background: var(--nex-ink) !important;
  color: var(--nex-primary2) !important;
  border-radius: 12px !important;
  border: none !important;
  font-weight: 700 !important;
}
.nex-sub .ghost,
.nex-panel .ghost {
  border-radius: 12px !important;
  border-color: var(--nex-line) !important;
}

.nex-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #e3e8e1;
  border-radius: 12px;
}
.nex-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  height: 36px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--nex-muted);
}
.nex-tabs button.active {
  background: var(--nex-ink);
  color: var(--nex-primary2);
}

.preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #eef2eb;
  border: 1px solid var(--nex-line);
}
.preview > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.preview span { color: var(--nex-muted); }

/* 浅色模式可读性：避免深底深字 / 浅灰浅底 */
.nex-body .sym-box input,
.nex-body .sym-box input.symbol-input,
.nex-home .sym-box input {
  background: #fff !important;
  color: #14201a !important;
  border: 1px solid var(--nex-line, #d5ddd4) !important;
}
.nex-body .sym-box input::placeholder {
  color: #8a948c !important;
}
.nex-body .toast,
.toast {
  background: #14201a !important;
  color: #f7f8f5 !important;
  border: 1px solid rgba(200, 245, 66, 0.4) !important;
}
.nex-rec-grid .cell span,
.nex-rec-summary-grid > div span,
.nex-rec-time,
.nex-rec-hold-grid > div span,
.nex-rec-date {
  color: #566057 !important;
}
.nex-rec-grid .cell b,
.nex-rec-summary-grid > div b,
.nex-rec-hold-grid > div b,
.nex-rec-hm,
.nex-rec-order-type {
  color: #14201a !important;
}
.nex-rec-hold {
  background: #eef8f2 !important;
  border-color: #b8dfc8 !important;
}
.nex-add-price-table th,
.nex-add-price-head .hint,
.nex-add-price-mark {
  color: #566057 !important;
}
.nex-add-price-table td,
.nex-add-price-mark b {
  color: #14201a !important;
}
.nex-add-price-table {
  background: #f7faf8 !important;
  border-color: #dceee3 !important;
}
.nex-sub .form label,
.nex-panel .form label,
.nex-sub .hint,
.nex-panel .hint {
  color: #3d463f !important;
}
.nex-sub input,
.nex-sub select,
.nex-panel input,
.nex-panel select,
.nex-sub .add-plan-wrap input[type="number"] {
  color: #14201a !important;
  background: #fff !important;
  -webkit-text-fill-color: #14201a;
}
.nex-metric span,
.nex-leg-time {
  color: #566057 !important;
}

/* 策略 / 持仓卡片沿用墨色酸橙卡片风格 */
.nex-leg-card,
.nex-rec-card,
.nex-pos-card {
  border-radius: var(--nex-radius) !important;
  border-color: var(--nex-line) !important;
  background: var(--nex-card) !important;
  box-shadow: none !important;
}

/* 策略页 Tab：与收益页一致（深底酸橙），不再用下划线 */
.page.nex-pos .nex-tabs button.active {
  background: var(--nex-ink);
  color: var(--nex-primary2);
  box-shadow: none;
}
