/* Nanke API — chrome v67 · plaza + playground hard isolation; no 几折 */

:root,
.dark {
  --nk-cream: #f3e6c8;
  --nk-gold: #e0b35a;
  --nk-gold-deep: #c4922e;
  --nk-mint: #8fd9c6;
  --nk-teal: #3db8a8;
  --nk-ink: #f3ebe0;
  --nk-void: #0c0a09;
  --nk-btn-ink: #1a1206;
  --primary: 42 70% 55%;
  --ring: 42 70% 55%;
  --sidebar-primary: 42 70% 55%;
  --sidebar-ring: 42 70% 55%;
}

/* Homepage iframe — SPA shell header is the only nav; landing hides its own bar via embed-mode */
#root > div > iframe.h-screen,
#root iframe.h-screen.w-full {
  display: block !important;
  margin: 0 !important;
  margin-top: 4.25rem !important;
  width: 100% !important;
  height: calc(100dvh - 4.25rem) !important;
  max-height: calc(100dvh - 4.25rem) !important;
  border: 0 !important;
  background: #0c0a09 !important;
  box-sizing: border-box !important;
}

/* ========== Header: always floating pill (no scroll morph / square sides) ========== */
header.fixed {
  z-index: 50 !important;
}

/* Kill New-API scroll shrink (max-w 52rem) + square unscrolled state */
header.fixed > div {
  max-width: 72rem !important;
  width: calc(100% - 1.5rem) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0.7rem 0 0 !important;
  transition: none !important;
}

header.fixed > div > nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 3.2rem !important;
  min-height: 3.2rem !important;
  max-height: 3.2rem !important;
  padding: 0 0.45rem 0 0.85rem !important;
  gap: 0.25rem !important;
  border-radius: 999px !important;
  background: rgba(12, 10, 9, 0.92) !important;
  border: 1px solid rgba(224, 179, 90, 0.22) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  ring: none !important;
  outline: none !important;
  transition: none !important;
  overflow: visible !important;
}

/* Brand */
header.fixed a[href="/"] {
  gap: 0.5rem !important;
  margin-right: 0.25rem !important;
  border-radius: 999px !important;
}
header.fixed a[href="/"] img,
header.fixed img[alt="logo"],
header.fixed img[src*="nanke-logo"] {
  width: 1.7rem !important;
  height: 1.7rem !important;
  max-width: none !important;
  border-radius: 0.4rem !important;
  object-fit: contain !important;
  box-shadow: none !important;
  background: transparent !important;
}
header.fixed a[href="/"] > div,
header.fixed a[href="/"] .size-7 {
  width: 1.7rem !important;
  height: 1.7rem !important;
  border-radius: 0.4rem !important;
}
header.fixed a[href="/"] span {
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  background: linear-gradient(120deg, #f3e6c8 8%, #e0b35a 42%, #8fd9c6 78%, #3db8a8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Unified GATEWAY brand stack inside SPA header */
header.fixed a[href="/"] .nk-brand-stack {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.05 !important;
  gap: 0.05rem !important;
}
header.fixed a[href="/"] .nk-brand-name {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
  background: linear-gradient(120deg, #f3e6c8 8%, #e0b35a 42%, #8fd9c6 78%, #3db8a8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
header.fixed a[href="/"] .nk-brand-gateway {
  font-size: 0.58rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #3db8a8 !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

/* Links */
header.fixed nav a:not([href="/sign-in"]):not([href="/sign-up"]):not(.nk-cta) {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
}
header.fixed nav a:not([href="/sign-in"]):not([href="/sign-up"]):not(.nk-cta):hover {
  color: #f3ebe0 !important;
  background: rgba(224, 179, 90, 0.1) !important;
}
header.fixed nav a[aria-current="page"],
header.fixed nav a.nk-active {
  color: #e0b35a !important;
  background: rgba(224, 179, 90, 0.14) !important;
}

/* Icon buttons round */
header.fixed nav button,
header.fixed nav [data-slot="button"]:not(.nk-cta):not(:has(a[href="/sign-up"])):not(:has(a[href="/sign-in"])) {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  border-radius: 999px !important;
}

/* Dropdown / popover panels — match brand, always rounded */
[data-radix-popper-content-wrapper] > *,
[data-slot="popover-content"],
[role="menu"],
[data-slot="dropdown-menu-content"],
[data-slot="select-content"] {
  border-radius: 14px !important;
  border-color: rgba(224, 179, 90, 0.22) !important;
  background: rgba(16, 13, 11, 0.96) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}

/* CTA pill */
header.fixed a[href="/sign-in"],
header.fixed a[href="/sign-up"],
header.fixed a.nk-cta,
header.fixed button:has(a[href="/sign-in"]),
header.fixed button:has(a[href="/sign-up"]),
header.fixed [data-slot="button"]:has(a[href="/sign-in"]),
header.fixed [data-slot="button"]:has(a[href="/sign-up"]) {
  background: #e0b35a !important;
  background-image: none !important;
  color: #1a1206 !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  height: 2rem !important;
  padding: 0 0.85rem !important;
  box-shadow: 0 6px 16px rgba(224, 179, 90, 0.28) !important;
  white-space: nowrap !important;
}
header.fixed a.nk-cta:hover,
header.fixed a[href="/sign-up"]:hover,
header.fixed a[href="/sign-in"]:hover {
  background: #ebc06a !important;
  color: #1a1206 !important;
}

body:has(input[autocomplete="current-password"]) form button[type="submit"],
body:has(input[autocomplete="new-password"]) form button[type="submit"] {
  background: #e0b35a !important;
  background-image: none !important;
  color: #1a1206 !important;
  border: 0 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
}

body {
  background-color: var(--nk-void);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgba(224, 179, 90, 0.11), transparent 55%),
    radial-gradient(ellipse 40% 30% at 95% 20%, rgba(110, 184, 168, 0.06), transparent 50%);
}
#root {
  position: relative;
  z-index: 1;
}

[data-slot="card"],
.bg-card {
  border-color: rgba(224, 179, 90, 0.14) !important;
  background: rgba(18, 14, 12, 0.78) !important;
  border-radius: 16px !important;
}

button.bg-primary,
a.bg-primary,
[data-slot="button"].bg-primary {
  background: #e0b35a !important;
  background-image: none !important;
  color: #1a1206 !important;
  border: 0 !important;
  border-radius: 999px !important;
}

body [class*="max-w-3xl"] h1 {
  background: linear-gradient(120deg, #f3e6c8 8%, #e0b35a 40%, #8fd9c6 78%, #3db8a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sticky [data-slot="card"],
aside [data-slot="card"] {
  border: 1px solid rgba(224, 179, 90, 0.16) !important;
  border-radius: 16px !important;
}

main a[href*="/pricing/"] [data-slot="card"]:hover,
main [class*="grid"] [data-slot="card"]:hover {
  border-color: rgba(224, 179, 90, 0.4) !important;
  box-shadow: 0 0 0 1px rgba(224, 179, 90, 0.12), 0 16px 40px rgba(0, 0, 0, 0.35) !important;
}

/* ========== Model Plaza (/pricing) ========== */
body.nk-pricing {
  --nk-pricing: 1;
  background: #0c0a09 !important;
  color: #f3ebe0 !important;
  color-scheme: dark;
}
body.nk-pricing #root,
body.nk-pricing main {
  background: transparent !important;
}
/* Light-mode leftovers: keep plaza surfaces dark */
html:not(.dark) body.nk-pricing,
html body.nk-pricing {
  background: #0c0a09 !important;
}
body.nk-pricing header.max-w-3xl h1 {
  background: linear-gradient(120deg, #f3e6c8 8%, #e0b35a 42%, #8fd9c6 78%, #3db8a8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
body.nk-pricing header.max-w-3xl > p {
  color: rgba(243, 235, 224, 0.72) !important;
}
.nk-pricing-banner {
  margin: 0.75rem auto 0;
  max-width: 40rem;
  padding: 0.85rem 1rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(224, 179, 90, 0.24);
  background:
    radial-gradient(ellipse 80% 80% at 10% 0%, rgba(224, 179, 90, 0.14), transparent 55%),
    rgba(12, 10, 9, 0.65);
  text-align: center;
}
.nk-pricing-banner .nk-pitch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
.nk-pricing-banner .nk-pitch div {
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.nk-pricing-banner .nk-pitch b {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #e0b35a;
  margin-bottom: 0.15rem;
}
.nk-pricing-banner .nk-pitch span {
  display: block;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(243, 235, 224, 0.68);
}
.nk-pricing-banner .nk-cta-line {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: rgba(243, 235, 224, 0.7);
}
.nk-pricing-banner a {
  color: #e0b35a;
  font-weight: 700;
  text-decoration: none;
}
.nk-pricing-banner a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .nk-pricing-banner .nk-pitch {
    grid-template-columns: 1fr 1fr;
  }
}

/* Real pricing cards are plain bordered divs, not data-slot=card */
body.nk-pricing main .grid > div.rounded-xl.border,
body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border {
  border-color: rgba(224, 179, 90, 0.16) !important;
  background: rgba(16, 13, 11, 0.82) !important;
  border-radius: 16px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
body.nk-pricing main .grid > div.rounded-xl.border:hover,
body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border:hover {
  border-color: rgba(224, 179, 90, 0.42) !important;
  box-shadow: 0 0 0 1px rgba(224, 179, 90, 0.12), 0 16px 36px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-2px);
}
body.nk-pricing main .grid > div.rounded-xl.border h3 {
  color: #f3ebe0 !important;
}
body.nk-pricing main .grid > div.rounded-xl.border p[class*="line-clamp"] {
  color: rgba(185, 174, 160, 0.95) !important;
}
body.nk-pricing aside.sticky {
  border-radius: 16px;
}

/* Track badges: corner ribbon on plaza cards */
body.nk-pricing main .grid > div.rounded-xl.border,
body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border {
  position: relative !important;
  overflow: visible !important;
  padding-top: 0.35rem;
}
/* Reserve a top strip so badge never covers vendor logo or Details */
body.nk-pricing main .grid > div.rounded-xl.border,
body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border {
  padding-top: 1.85rem !important;
}
.nk-track-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.55rem;
  right: auto;
  z-index: 3;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) {
  body.nk-pricing main .grid > div.rounded-xl.border,
  body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border {
    padding-top: 1.7rem !important;
  }
  .nk-track-badge {
    font-size: 0.62rem;
    padding: 0.28rem 0.5rem;
  }
}
.nk-track-badge.eco {
  color: #0c1f1a;
  background: linear-gradient(120deg, #8fd9c6, #3db8a8);
  border: 1px solid rgba(143, 217, 198, 0.7);
}
.nk-track-badge.off {
  color: #1a1206;
  background: linear-gradient(120deg, #f0d08a, #e0b35a);
  border: 1px solid rgba(224, 179, 90, 0.75);
}
.nk-track-badge.pool {
  color: #071018;
  background: linear-gradient(120deg, #7eb6d9, #3d8eb8);
  border: 1px solid rgba(126, 182, 217, 0.7);
}
.nk-track-badge.welfare,
.nk-track-badge.rp {
  color: #f3ebe0;
  background: linear-gradient(120deg, #6b635a, #4a433c);
  border: 1px solid rgba(185, 174, 160, 0.55);
}

/* Marketing: Nebula-style discount / hot pills */
.nk-mkt-row {
  position: absolute;
  top: 0.42rem;
  right: 0.55rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  justify-content: flex-end;
  max-width: 55%;
  pointer-events: none;
}
.nk-mkt-zhe,
.nk-mkt-hot {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nk-mkt-zhe {
  color: #b42318;
  background: rgba(244, 180, 176, 0.92);
  border: 1px solid rgba(180, 35, 24, 0.18);
}
.nk-mkt-hot {
  color: #c27803;
  background: rgba(255, 237, 213, 0.95);
  border: 1px solid rgba(234, 168, 60, 0.45);
}
@media (max-width: 640px) {
  .nk-mkt-row {
    top: 0.32rem;
    right: 0.4rem;
    max-width: 68%;
    gap: 0.2rem;
  }
  .nk-mkt-zhe,
  .nk-mkt-hot {
    font-size: 0.58rem;
    padding: 0.22rem 0.4rem;
  }
  body.nk-pricing main .grid > div.rounded-xl.border:hover,
  body.nk-pricing main [class*="grid-cols"] > div.rounded-xl.border:hover {
    transform: none !important;
  }
  /* 档位筛选：横滑吸顶 */
  body.nk-pricing .nk-track-filter-strip,
  body.nk-pricing aside.sticky .nk-track-filter-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 4.5rem;
    z-index: 20;
    padding: 0.45rem 0.15rem 0.55rem;
    margin: 0 0 0.4rem;
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.88));
  }
  body.nk-pricing .nk-track-filter-strip::-webkit-scrollbar {
    display: none;
  }
  body.nk-pricing .nk-track-filter-strip .nk-track-chip,
  body.nk-pricing .nk-track-filter-strip button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}
html.dark .nk-mkt-zhe,
body.dark .nk-mkt-zhe,
body.nk-pricing .nk-mkt-zhe {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.55);
  border-color: rgba(248, 113, 113, 0.35);
}
html.dark .nk-mkt-hot,
body.dark .nk-mkt-hot,
body.nk-pricing .nk-mkt-hot {
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.55);
  border-color: rgba(245, 158, 11, 0.4);
}
.nk-hide-group-chip {
  display: none !important;
}
.nk-group-hint {
  margin: 0.15rem 0 0.45rem !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
  color: rgba(185, 174, 160, 0.9) !important;
  font-weight: 500 !important;
}
/* Footer tag pills */
span.nk-tag-pill {
  display: inline-flex !important;
  align-items: center;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 0.12rem 0.42rem !important;
  border-radius: 6px !important;
  line-height: 1.2 !important;
}
span.nk-tag-pill.eco {
  color: #8fd9c6 !important;
  background: rgba(61, 184, 168, 0.16) !important;
  border: 1px solid rgba(143, 217, 198, 0.4) !important;
}
span.nk-tag-pill.off {
  color: #e0b35a !important;
  background: rgba(224, 179, 90, 0.14) !important;
  border: 1px solid rgba(224, 179, 90, 0.42) !important;
}
span.nk-tag-pill.pool {
  color: #7eb6d9 !important;
  background: rgba(61, 142, 184, 0.16) !important;
  border: 1px solid rgba(126, 182, 217, 0.4) !important;
}
span.nk-tag-pill.welfare,
span.nk-tag-pill.rp {
  color: #d8cfc3 !important;
  background: rgba(185, 174, 160, 0.12) !important;
  border: 1px solid rgba(185, 174, 160, 0.35) !important;
}
/* Sidebar track filters */
button.nk-track-filter,
[role="button"].nk-track-filter {
  outline: 1px solid rgba(224, 179, 90, 0.35) !important;
  background: rgba(224, 179, 90, 0.08) !important;
  font-weight: 700 !important;
}
button.nk-track-filter.eco,
[role="button"].nk-track-filter.eco {
  outline-color: rgba(143, 217, 198, 0.45) !important;
  background: rgba(61, 184, 168, 0.12) !important;
  color: #8fd9c6 !important;
}
button.nk-track-filter.off,
[role="button"].nk-track-filter.off {
  outline-color: rgba(224, 179, 90, 0.5) !important;
  background: rgba(224, 179, 90, 0.12) !important;
  color: #e0b35a !important;
}
button.nk-track-filter.pool,
[role="button"].nk-track-filter.pool {
  outline-color: rgba(126, 182, 217, 0.5) !important;
  background: rgba(61, 142, 184, 0.12) !important;
  color: #7eb6d9 !important;
}
button.nk-track-filter.welfare,
[role="button"].nk-track-filter.welfare,
button.nk-track-filter.rp,
[role="button"].nk-track-filter.rp {
  outline-color: rgba(185, 174, 160, 0.45) !important;
  color: #d8cfc3 !important;
}
/* Table tags column: make track words bold/colored even if truncated */
body.nk-pricing td .nk-tag-pill,
body.nk-pricing [data-slot="table-cell"] .nk-tag-pill {
  margin-right: 0.25rem;
}

input[type="search"],
input[placeholder*="Search"],
input[placeholder*="搜索"],
input[placeholder*="model" i] {
  border-color: rgba(224, 179, 90, 0.2) !important;
  background: rgba(12, 10, 9, 0.7) !important;
  border-radius: 999px !important;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(224, 179, 90, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(224, 179, 90, 0.16) !important;
}

[role="tablist"] [role="tab"][aria-selected="true"],
[role="tablist"] button[data-state="active"] {
  color: #e0b35a !important;
  border-color: #e0b35a !important;
}

table thead,
[data-slot="table-header"] {
  background: rgba(224, 179, 90, 0.06) !important;
}
table tbody tr:hover,
[data-slot="table-row"]:hover {
  background: rgba(224, 179, 90, 0.06) !important;
}

[data-slot="sidebar"],
[data-sidebar="sidebar"] {
  border-right-color: rgba(224, 179, 90, 0.12) !important;
  background: linear-gradient(180deg, rgba(14, 12, 10, 0.98), rgba(10, 8, 7, 0.98)) !important;
}
[data-sidebar="menu-button"][data-active="true"],
[data-slot="sidebar-menu-button"][data-active="true"] {
  background: rgba(224, 179, 90, 0.16) !important;
  color: #e0b35a !important;
  border-radius: 10px !important;
}

footer .custom-footer a {
  color: #e0b35a !important;
}
footer {
  border-top-color: rgba(224, 179, 90, 0.12) !important;
}

[data-slot="badge"] {
  border-color: rgba(224, 179, 90, 0.28) !important;
  border-radius: 999px !important;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(224, 179, 90, 0.28);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RESTORED from v35: theme contrast ===== */

/* ========== Theme contrast fix v27 (mobile+desktop light/dark) ========== */

/* Always-dark floating pill: force readable ink */
header.fixed nav a,
header.fixed nav button,
header.fixed nav [data-slot="button"],
header.fixed nav span,
header.fixed nav svg {
  color: #f3ebe0 !important;
}
header.fixed nav a:not([href="/sign-in"]):not([href="/sign-up"]):not(.nk-cta) {
  color: rgba(243, 235, 224, 0.82) !important;
}
header.fixed nav a[aria-current="page"],
header.fixed nav a.nk-active {
  color: #e0b35a !important;
}
header.fixed a[href="/sign-in"],
header.fixed a[href="/sign-up"],
header.fixed a.nk-cta,
header.fixed a.nk-cta span,
header.fixed button:has(a[href="/sign-in"]),
header.fixed button:has(a[href="/sign-up"]) {
  color: #1a1206 !important;
}

/* ----- Light mode page chrome ----- */
html:not(.dark) body:not(.nk-pricing) {
  background-color: #f6f1ea !important;
  color: #1c1917 !important;
  color-scheme: light;
}
html:not(.dark) body:not(.nk-pricing)::before {
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgba(224, 179, 90, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 30% at 95% 20%, rgba(110, 184, 168, 0.05), transparent 50%) !important;
}
html:not(.dark) body:not(.nk-pricing) [data-slot="card"],
html:not(.dark) body:not(.nk-pricing) .bg-card {
  background: rgba(255, 252, 247, 0.92) !important;
  border-color: rgba(28, 25, 23, 0.1) !important;
  color: #1c1917 !important;
}

/* Light dropdowns / menus (were forced dark → invisible text) */
html:not(.dark) [data-radix-popper-content-wrapper] > *,
html:not(.dark) [data-slot="popover-content"],
html:not(.dark) [role="menu"],
html:not(.dark) [data-slot="dropdown-menu-content"],
html:not(.dark) [data-slot="select-content"] {
  background: #fffcf7 !important;
  border-color: rgba(28, 25, 23, 0.12) !important;
  color: #1c1917 !important;
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.12) !important;
}
html:not(.dark) [role="menuitem"],
html:not(.dark) [data-slot="dropdown-menu-item"],
html:not(.dark) [data-slot="select-item"] {
  color: #1c1917 !important;
}

/* ----- Sidebar + mobile drawer: DARK theme ----- */
html.dark [data-slot="sidebar"],
html.dark [data-sidebar="sidebar"],
.dark [data-slot="sidebar"],
.dark [data-sidebar="sidebar"],
html.dark [data-slot="sheet-content"],
html.dark [data-sidebar="sidebar"][data-mobile="true"],
.dark [data-sidebar="sidebar"][data-mobile="true"] {
  background: linear-gradient(180deg, rgba(14, 12, 10, 0.98), rgba(10, 8, 7, 0.98)) !important;
  color: #f3ebe0 !important;
  border-color: rgba(224, 179, 90, 0.12) !important;
}
html.dark [data-sidebar="group-label"],
html.dark [data-slot="sidebar-group-label"],
.dark [data-sidebar="group-label"],
.dark [data-slot="sidebar-group-label"] {
  color: rgba(243, 235, 224, 0.55) !important;
}
html.dark [data-sidebar="menu-button"],
html.dark [data-slot="sidebar-menu-button"],
html.dark [data-sidebar="menu-button"] span,
html.dark [data-slot="sidebar-menu-button"] span,
html.dark [data-sidebar="menu-button"] svg,
html.dark [data-slot="sidebar-menu-button"] svg,
.dark [data-sidebar="menu-button"],
.dark [data-slot="sidebar-menu-button"] {
  color: rgba(243, 235, 224, 0.88) !important;
}
html.dark [data-sidebar="menu-button"][data-active="true"],
html.dark [data-slot="sidebar-menu-button"][data-active="true"],
.dark [data-sidebar="menu-button"][data-active="true"],
.dark [data-slot="sidebar-menu-button"][data-active="true"] {
  background: rgba(224, 179, 90, 0.16) !important;
  color: #e0b35a !important;
}

/* ----- Sidebar + mobile drawer: LIGHT theme (daytime fix) ----- */
html:not(.dark) [data-slot="sidebar"],
html:not(.dark) [data-sidebar="sidebar"],
html:not(.dark) [data-slot="sheet-content"],
html:not(.dark) [data-sidebar="sidebar"][data-mobile="true"] {
  background: linear-gradient(180deg, #fffcf7 0%, #f3eee6 100%) !important;
  color: #1c1917 !important;
  border-color: rgba(28, 25, 23, 0.1) !important;
}
html:not(.dark) [data-sidebar="group-label"],
html:not(.dark) [data-slot="sidebar-group-label"],
html:not(.dark) [data-slot="sheet-content"] [class*="text-muted"],
html:not(.dark) [data-sidebar="sidebar"] .text-muted-foreground {
  color: rgba(28, 25, 23, 0.55) !important;
}
html:not(.dark) [data-sidebar="menu-button"],
html:not(.dark) [data-slot="sidebar-menu-button"],
html:not(.dark) [data-sidebar="menu-button"] span,
html:not(.dark) [data-slot="sidebar-menu-button"] span,
html:not(.dark) [data-sidebar="menu-button"] svg,
html:not(.dark) [data-slot="sidebar-menu-button"] svg,
html:not(.dark) [data-slot="sheet-content"] a,
html:not(.dark) [data-slot="sheet-content"] button,
html:not(.dark) [data-slot="sheet-content"] span,
html:not(.dark) [data-sidebar="sidebar"] a,
html:not(.dark) [data-sidebar="sidebar"] button {
  color: #1c1917 !important;
}
html:not(.dark) [data-sidebar="menu-button"][data-active="true"],
html:not(.dark) [data-slot="sidebar-menu-button"][data-active="true"] {
  background: rgba(224, 179, 90, 0.2) !important;
  color: #8a6418 !important;
}
html:not(.dark) [data-sidebar="menu-button"]:hover,
html:not(.dark) [data-slot="sidebar-menu-button"]:hover {
  background: rgba(28, 25, 23, 0.06) !important;
}

/* Sheet overlay text / close button */
html:not(.dark) [data-slot="sheet-content"] [data-slot="sheet-title"],
html:not(.dark) [data-slot="sheet-content"] [data-slot="sheet-description"] {
  color: #1c1917 !important;
}
html.dark [data-slot="sheet-content"] [data-slot="sheet-title"],
html.dark [data-slot="sheet-content"] [data-slot="sheet-description"] {
  color: #f3ebe0 !important;
}

/* Inputs: theme aware outside pricing */
html:not(.dark) body:not(.nk-pricing) input[type="search"],
html:not(.dark) body:not(.nk-pricing) input[placeholder*="Search"],
html:not(.dark) body:not(.nk-pricing) input[placeholder*="搜索"],
html:not(.dark) body:not(.nk-pricing) input[placeholder*="model" i] {
  background: #fff !important;
  border-color: rgba(28, 25, 23, 0.14) !important;
  color: #1c1917 !important;
}
html.dark input[type="search"],
html.dark input[placeholder*="Search"],
html.dark input[placeholder*="搜索"],
html.dark input[placeholder*="model" i] {
  background: rgba(12, 10, 9, 0.7) !important;
  color: #f3ebe0 !important;
}

/* Tables */
html:not(.dark) body:not(.nk-pricing) table thead,
html:not(.dark) body:not(.nk-pricing) [data-slot="table-header"] {
  background: rgba(224, 179, 90, 0.1) !important;
  color: #1c1917 !important;
}
html:not(.dark) body:not(.nk-pricing) table tbody tr:hover,
html:not(.dark) body:not(.nk-pricing) [data-slot="table-row"]:hover {
  background: rgba(224, 179, 90, 0.08) !important;
}

/* ========== Extra mobile/daytime sidebar readability v28b ========== */
html:not(.dark) [data-slot="sidebar"] .text-foreground,
html:not(.dark) [data-sidebar="sidebar"] .text-foreground,
html:not(.dark) [data-slot="sheet-content"] .text-foreground,
html:not(.dark) [data-slot="sidebar"] [class*="text-foreground"],
html:not(.dark) [data-sidebar="sidebar"] [class*="text-foreground"] {
  color: #1c1917 !important;
}
html:not(.dark) [data-slot="sidebar"] .text-muted-foreground,
html:not(.dark) [data-sidebar="sidebar"] .text-muted-foreground,
html:not(.dark) [data-slot="sheet-content"] .text-muted-foreground,
html:not(.dark) [data-sidebar="group-label"],
html:not(.dark) [data-slot="sidebar-group-label"] {
  color: rgba(28, 25, 23, 0.58) !important;
}

/* Semi Design leftovers (if present) */
html:not(.dark) .semi-navigation,
html:not(.dark) .semi-navigation-vertical,
html:not(.dark) .semi-sidesheet-body {
  background: #fffcf7 !important;
  color: #1c1917 !important;
}
html:not(.dark) .semi-navigation-item,
html:not(.dark) .semi-navigation-item-text,
html:not(.dark) .semi-navigation-sub-title,
html:not(.dark) .semi-sidesheet-title {
  color: #1c1917 !important;
}
html.dark .semi-navigation,
html.dark .semi-navigation-vertical,
html.dark .semi-sidesheet-body {
  background: #0c0a09 !important;
  color: #f3ebe0 !important;
}
html.dark .semi-navigation-item,
html.dark .semi-navigation-item-text,
html.dark .semi-navigation-sub-title,
html.dark .semi-sidesheet-title {
  color: #f3ebe0 !important;
}

/* Mobile sheet portal */
html:not(.dark) [data-slot="sheet-content"] {
  background: #fffcf7 !important;
  color: #1c1917 !important;
}
html.dark [data-slot="sheet-content"] {
  background: #0c0a09 !important;
  color: #f3ebe0 !important;
}

/* ========== Agreement checkbox: clear checked vs unchecked (v30) ========== */
button[role="checkbox"],
[data-slot="checkbox"],
[role="checkbox"]:not(input),
button[role="checkbox"].peer,
span[data-slot="checkbox"] {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  min-height: 1.25rem !important;
  border-radius: 999px !important;
  border: 2.5px solid #5c4a36 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.12) !important;
  opacity: 1 !important;
  visibility: visible !important;
  flex-shrink: 0 !important;
  color: transparent !important;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}

button[role="checkbox"] svg,
[data-slot="checkbox"] svg,
[role="checkbox"]:not(input) svg {
  width: 0.78rem !important;
  height: 0.78rem !important;
  opacity: 0 !important;
  color: transparent !important;
  stroke: transparent !important;
}

button[role="checkbox"][data-state="checked"],
[data-slot="checkbox"][data-state="checked"],
[role="checkbox"][data-state="checked"],
button[role="checkbox"][aria-checked="true"],
[data-slot="checkbox"][aria-checked="true"],
[role="checkbox"][aria-checked="true"],
button[role="checkbox"][data-state="on"],
[data-slot="checkbox"][data-state="on"] {
  background: #c4922e !important;
  border-color: #8f6a18 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(196, 146, 46, 0.4) !important;
}

button[role="checkbox"][data-state="checked"] svg,
[data-slot="checkbox"][data-state="checked"] svg,
[role="checkbox"][data-state="checked"] svg,
button[role="checkbox"][aria-checked="true"] svg,
[data-slot="checkbox"][aria-checked="true"] svg,
[role="checkbox"][aria-checked="true"] svg,
button[role="checkbox"][data-state="on"] svg,
[data-slot="checkbox"][data-state="on"] svg {
  opacity: 1 !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
  display: block !important;
}

/* Native fallback */
input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
  accent-color: #c4922e !important;
  opacity: 1 !important;
  cursor: pointer !important;
  filter: none !important;
}

/* Agreement row cue */
label:has([role="checkbox"][data-state="checked"]),
label:has([data-slot="checkbox"][data-state="checked"]),
label:has([role="checkbox"][aria-checked="true"]),
div:has(> [role="checkbox"][data-state="checked"]),
div:has(> [data-slot="checkbox"][data-state="checked"]),
div:has(> [role="checkbox"][aria-checked="true"]) {
  border-color: rgba(196, 146, 46, 0.65) !important;
  background: rgba(224, 179, 90, 0.16) !important;
}

/* Login/register agreement block: always visible container */
body:has(input[autocomplete="current-password"]) label:has([role="checkbox"]),
body:has(input[autocomplete="current-password"]) label:has([data-slot="checkbox"]),
body:has(input[autocomplete="new-password"]) label:has([role="checkbox"]),
body:has(input[autocomplete="new-password"]) label:has([data-slot="checkbox"]),
body:has(input[autocomplete="current-password"]) div:has(> [role="checkbox"]),
body:has(input[autocomplete="current-password"]) div:has(> [data-slot="checkbox"]) {
  border: 1px solid rgba(92, 74, 54, 0.28) !important;
  border-radius: 12px !important;
  padding: 0.65rem 0.75rem !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

/* Dark theme */
html.dark button[role="checkbox"],
html.dark [data-slot="checkbox"],
.dark button[role="checkbox"],
.dark [data-slot="checkbox"] {
  background: #1c1712 !important;
  border-color: #d6b36a !important;
  box-shadow: inset 0 0 0 1px rgba(224, 179, 90, 0.12) !important;
}

html.dark button[role="checkbox"][data-state="checked"],
html.dark [data-slot="checkbox"][data-state="checked"],
.dark button[role="checkbox"][data-state="checked"],
.dark [data-slot="checkbox"][data-state="checked"],
html.dark button[role="checkbox"][aria-checked="true"],
.dark button[role="checkbox"][aria-checked="true"] {
  background: #e0b35a !important;
  border-color: #e0b35a !important;
  color: #1a1206 !important;
  box-shadow: 0 0 0 3px rgba(224, 179, 90, 0.4) !important;
}

html.dark button[role="checkbox"][data-state="checked"] svg,
html.dark [data-slot="checkbox"][data-state="checked"] svg,
.dark button[role="checkbox"][data-state="checked"] svg,
.dark [data-slot="checkbox"][data-state="checked"] svg,
html.dark button[role="checkbox"][aria-checked="true"] svg,
.dark button[role="checkbox"][aria-checked="true"] svg {
  color: #1a1206 !important;
  stroke: #1a1206 !important;
  opacity: 1 !important;
}

/* Icon-as-checkbox fallback (CircleCheck always painted) */
body:has(input[autocomplete="current-password"]) button:has(svg.lucide-circle-check),
body:has(input[autocomplete="current-password"]) button:has(svg.lucide-check-circle),
body:has(input[autocomplete="current-password"]) button:has(svg.lucide-circle-check-big),
body:has(input[autocomplete="new-password"]) button:has(svg.lucide-circle-check),
body:has(input[autocomplete="new-password"]) button:has(svg.lucide-check-circle) {
  color: #5c4a36 !important;
}
body:has(input[autocomplete="current-password"]) button[data-state="checked"]:has(svg),
body:has(input[autocomplete="current-password"]) button[aria-checked="true"]:has(svg),
body:has(input[autocomplete="new-password"]) button[data-state="checked"]:has(svg),
body:has(input[autocomplete="new-password"]) button[aria-checked="true"]:has(svg) {
  color: #c4922e !important;
}

/* ========== Light/Dark dashboard contrast (v31) ========== */
/* Scope legacy forced-dark cards to dark theme only */
html.dark [data-slot="card"],
html.dark .bg-card,
.dark [data-slot="card"],
.dark .bg-card {
  border-color: rgba(224, 179, 90, 0.14) !important;
  background: rgba(18, 14, 12, 0.78) !important;
  border-radius: 16px !important;
  color: #f3ebe0 !important;
}

/* Light mode design tokens (fix muted/white-on-cream) */
html:not(.dark) {
  color-scheme: light;
  --background: 40 33% 96%;
  --foreground: 24 10% 10%;
  --card: 40 45% 98%;
  --card-foreground: 24 10% 10%;
  --popover: 40 45% 98%;
  --popover-foreground: 24 10% 10%;
  --primary: 42 70% 45%;
  --primary-foreground: 24 10% 10%;
  --secondary: 40 16% 90%;
  --secondary-foreground: 24 10% 14%;
  --muted: 40 14% 90%;
  --muted-foreground: 25 8% 32%;
  --accent: 40 18% 92%;
  --accent-foreground: 24 10% 14%;
  --destructive: 0 72% 45%;
  --destructive-foreground: 0 0% 100%;
  --border: 30 12% 82%;
  --input: 30 12% 82%;
  --ring: 42 70% 45%;
  --sidebar-background: 40 40% 97%;
  --sidebar-foreground: 24 10% 12%;
  --sidebar-accent: 40 18% 92%;
  --sidebar-accent-foreground: 24 10% 12%;
  --sidebar-border: 30 12% 85%;
}

html.dark {
  color-scheme: dark;
  --muted-foreground: 40 12% 72%;
  --card-foreground: 40 20% 96%;
  --foreground: 40 20% 96%;
}

/* Light surfaces + ink */
html:not(.dark) body:not(.nk-pricing) {
  background-color: #f4efe7 !important;
  color: #1c1917 !important;
}
html:not(.dark) body:not(.nk-pricing) #root,
html:not(.dark) body:not(.nk-pricing) main {
  color: #1c1917 !important;
}

html:not(.dark) body:not(.nk-pricing) [data-slot="card"],
html:not(.dark) body:not(.nk-pricing) .bg-card {
  background: #fffcf7 !important;
  border-color: rgba(28, 25, 23, 0.12) !important;
  color: #1c1917 !important;
}

/* Muted labels on light cards (成功率 / 平均延迟 / 吞吐量 etc.) */
html:not(.dark) body:not(.nk-pricing) .text-muted-foreground,
html:not(.dark) body:not(.nk-pricing) [class*="text-muted-foreground"],
html:not(.dark) body:not(.nk-pricing) .text-secondary-foreground,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .opacity-70,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .opacity-60,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .opacity-50 {
  color: #57534e !important;
  opacity: 1 !important;
}

html:not(.dark) body:not(.nk-pricing) .text-foreground,
html:not(.dark) body:not(.nk-pricing) [class*="text-foreground"] {
  color: #1c1917 !important;
}

/* Soft pills / muted blocks inside dashboard */
html:not(.dark) body:not(.nk-pricing) .bg-muted,
html:not(.dark) body:not(.nk-pricing) [class*="bg-muted"],
html:not(.dark) body:not(.nk-pricing) .bg-secondary,
html:not(.dark) body:not(.nk-pricing) [class*="bg-accent"] {
  background-color: rgba(28, 25, 23, 0.06) !important;
  color: #1c1917 !important;
}

/* Avoid white/near-white utility text on light cards */
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-white,
html:not(.dark) body:not(.nk-pricing) .bg-card .text-white,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-zinc-100,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-zinc-200,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-zinc-300,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-neutral-200,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-neutral-300,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-stone-200,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-stone-300,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-gray-200,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .text-gray-300 {
  color: #1c1917 !important;
}

/* Nested rounded panels that stay pale: force dark ink */
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .rounded-full,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .rounded-xl,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .rounded-2xl,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .rounded-lg {
  color: inherit;
}
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] .rounded-full,
html:not(.dark) body:not(.nk-pricing) [data-slot="card"] [class*="rounded-"][class*="bg-"] {
  /* keep structure; ink from parent */
}

/* Headings / labels */
html:not(.dark) body:not(.nk-pricing) h1,
html:not(.dark) body:not(.nk-pricing) h2,
html:not(.dark) body:not(.nk-pricing) h3,
html:not(.dark) body:not(.nk-pricing) h4,
html:not(.dark) body:not(.nk-pricing) label,
html:not(.dark) body:not(.nk-pricing) legend {
  color: #1c1917 !important;
}

/* Outline buttons on light surfaces */
html:not(.dark) body:not(.nk-pricing) button.variant-outline,
html:not(.dark) body:not(.nk-pricing) [data-slot="button"][class*="border"] {
  color: #1c1917 !important;
}

/* Dark mode: muted stays readable on dark cards */
html.dark .text-muted-foreground,
html.dark [class*="text-muted-foreground"],
.dark .text-muted-foreground {
  color: rgba(243, 235, 224, 0.68) !important;
}
html.dark [data-slot="card"],
html.dark .bg-card {
  color: #f3ebe0 !important;
}
html.dark body {
  color: #f3ebe0;
}

/* Tables / list rows on light */
html:not(.dark) body:not(.nk-pricing) td,
html:not(.dark) body:not(.nk-pricing) th,
html:not(.dark) body:not(.nk-pricing) li {
  color: inherit;
}

/* ========== Homepage shell top strip fix (v32) ========== */
/* Light theme was painting cream body behind the floating pill + dark landing iframe */
html:has(#root iframe.h-screen),
html:has(#root iframe.h-screen.w-full),
body:has(#root iframe.h-screen),
body:has(#root iframe.h-screen.w-full),
html:not(.dark) body:has(#root iframe.h-screen),
html:not(.dark) body:has(#root iframe.h-screen.w-full),
body.nk-home-shell,
html:not(.dark) body.nk-home-shell {
  background-color: #0c0a09 !important;
  background: #0c0a09 !important;
}

html:not(.dark) body:has(#root iframe.h-screen)::before,
html:not(.dark) body:has(#root iframe.h-screen.w-full)::before,
html:not(.dark) body.nk-home-shell::before {
  background:
    radial-gradient(ellipse 70% 40% at 50% -8%, rgba(224, 179, 90, 0.11), transparent 55%),
    radial-gradient(ellipse 40% 30% at 95% 20%, rgba(110, 184, 168, 0.06), transparent 50%) !important;
}

/* Solid dark band under / above the floating header so no light bleed */
body:has(#root iframe.h-screen) header.fixed,
body:has(#root iframe.h-screen.w-full) header.fixed,
body.nk-home-shell header.fixed {
  background: transparent !important;
}
body:has(#root iframe.h-screen) header.fixed::before,
body:has(#root iframe.h-screen.w-full) header.fixed::before,
body.nk-home-shell header.fixed::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 5rem !important;
  background: #0c0a09 !important;
  z-index: 40 !important;
  pointer-events: none !important;
}
body:has(#root iframe.h-screen) header.fixed > div,
body:has(#root iframe.h-screen.w-full) header.fixed > div,
body.nk-home-shell header.fixed > div {
  position: relative !important;
  z-index: 41 !important;
}


/* ========== Professional footer (v33) ========== */
.nk-footer {
  width: 100%;
  margin: 0;
  padding: 1.35rem 1rem 1.5rem;
  border-top: 1px solid rgba(224, 179, 90, 0.16);
  background: transparent;
}
.nk-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  text-align: center;
}
.nk-footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  justify-content: center;
}
.nk-footer-brand {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #f3e6c8 8%, #e0b35a 42%, #8fd9c6 78%, #3db8a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nk-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: center;
}
.nk-footer-nav a,
.nk-footer a.nk-footer-item {
  color: #e0b35a !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 600;
}
.nk-footer-nav a:hover,
.nk-footer a.nk-footer-item:hover {
  text-decoration: underline !important;
  color: #ebc06a !important;
}
.nk-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
  justify-content: center;
  color: rgba(243, 235, 224, 0.62);
  font-size: 0.8rem;
}
.nk-footer-meta strong {
  color: #e0b35a;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nk-footer-dot {
  opacity: 0.45;
}
.nk-footer-copy {
  color: rgba(243, 235, 224, 0.48);
  font-size: 0.75rem;
}

/* Light mode footer ink */
html:not(.dark) .nk-footer {
  border-top-color: rgba(28, 25, 23, 0.1);
}
html:not(.dark) .nk-footer-meta {
  color: rgba(28, 25, 23, 0.58);
}
html:not(.dark) .nk-footer-copy {
  color: rgba(28, 25, 23, 0.45);
}
html:not(.dark) .nk-footer-meta strong,
html:not(.dark) .nk-footer-nav a,
html:not(.dark) .nk-footer a.nk-footer-item {
  color: #a67c1f !important;
}

/* Hide default New API / upstream branding in footer only (no page-wide nuke) */
footer a[href*="github.com/Calcium-Ion"],
footer a[href*="github.com/songquanpeng"],
footer a[href*="newapi.pro"],
footer a[href*="docs.newapi"],
.custom-footer a[href*="Calcium-Ion"],
footer .text-muted a[href*="github.com/"] {
  display: none !important;
}
/* common powered-by rows that sit beside custom footer */
footer > div:not(:has(.nk-footer)):not(.nk-footer):not(.custom-footer) {
  /* keep structure; scrub via JS for text "New API" */
}

@media (max-width: 640px) {
  .nk-footer {
    padding: 1.1rem 0.85rem 1.35rem;
  }
  .nk-footer-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  .nk-footer-dot {
    display: none;
  }
}

/* ===== email bind reminder banner ===== */
#nk-email-bind-banner {
  position: sticky;
  top: 0;
  z-index: 10050;
  width: 100%;
  background: linear-gradient(90deg, #1a1612 0%, #2a2218 55%, #1f2a28 100%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  color: #f5efe6;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
.nk-email-bind-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nk-email-bind-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.nk-email-bind-text strong {
  color: #e6c35c;
  font-weight: 700;
}
.nk-email-bind-text span {
  color: rgba(245, 239, 230, 0.82);
}
.nk-email-bind-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
a.nk-email-bind-cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37, #a8841a);
  color: #14110c !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
}
button.nk-email-bind-later {
  appearance: none;
  border: 1px solid rgba(245, 239, 230, 0.22);
  background: transparent;
  color: rgba(245, 239, 230, 0.75);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
button.nk-email-bind-later:hover {
  color: #f5efe6;
  border-color: rgba(245, 239, 230, 0.4);
}
@media (max-width: 640px) {
  .nk-email-bind-inner { padding: 10px 12px; }
  .nk-email-bind-text span { font-size: 12px; }
}



/* ===== Theme harden v37: dark text-on-dark / light leftovers ===== */
html.dark body,
.dark body {
  color: hsl(40 20% 96%);
}
html.dark [data-slot="card"],
html.dark .bg-card,
.dark [data-slot="card"],
.dark .bg-card {
  color: hsl(40 20% 96%);
}
html.dark [data-slot="card"] .text-muted-foreground,
html.dark [data-slot="card"] [class*="text-muted"],
html.dark [data-slot="card"] .opacity-70,
html.dark [data-slot="card"] .opacity-60,
html.dark [data-slot="card"] .opacity-50,
html.dark .text-muted-foreground,
html.dark [class*="text-muted-foreground"],
.dark .text-muted-foreground {
  color: hsl(40 12% 72%) !important;
}
html.dark [data-slot="card"] .text-foreground,
html.dark [data-slot="card"] [class*="text-foreground"],
html.dark .text-foreground {
  color: hsl(40 20% 96%) !important;
}
html.dark [data-slot="card"] .text-black,
html.dark [data-slot="card"] .text-zinc-900,
html.dark [data-slot="card"] .text-zinc-800,
html.dark [data-slot="card"] .text-zinc-700,
html.dark [data-slot="card"] .text-neutral-900,
html.dark [data-slot="card"] .text-neutral-800,
html.dark [data-slot="card"] .text-gray-900,
html.dark [data-slot="card"] .text-gray-800,
html.dark [data-slot="card"] .text-slate-900,
html.dark [data-slot="card"] .text-slate-800,
html.dark [data-slot="card"] .text-stone-900,
html.dark [data-slot="card"] .text-stone-800 {
  color: hsl(40 20% 94%) !important;
}
html.dark .prose,
html.dark .prose p,
html.dark .prose li {
  color: hsl(40 14% 82%) !important;
}
html:not(.dark) body:not(.nk-pricing) [data-slot="card"],
html:not(.dark) body:not(.nk-pricing) .bg-card {
  background: hsl(40 45% 98%) !important;
  color: hsl(24 10% 12%) !important;
  border-color: hsl(40 18% 82%) !important;
}
html:not(.dark) body:not(.nk-pricing) .text-muted-foreground,
html:not(.dark) body:not(.nk-pricing) [class*="text-muted-foreground"] {
  color: hsl(25 8% 32%) !important;
}

/* ===== Plaza pitch marketing v38 ===== */
.nk-pricing-banner .nk-pitch {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
}
@media (max-width: 900px) {
  .nk-pricing-banner .nk-pitch {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 520px) {
  .nk-pricing-banner .nk-pitch {
    grid-template-columns: 1fr !important;
  }
}
.nk-pricing-banner .nk-pitch > div {
  padding: 0.55rem 0.65rem !important;
  border-radius: 12px !important;
  background: linear-gradient(165deg, rgba(224,179,90,.10), rgba(255,255,255,.03)) !important;
  border: 1px solid rgba(224,179,90,.18) !important;
  transition: border-color .2s ease, transform .2s ease;
}
.nk-pricing-banner .nk-pitch > div:hover {
  border-color: rgba(224,179,90,.42) !important;
  transform: translateY(-1px);
}
.nk-pricing-banner .nk-pitch b {
  display: block;
  font-size: 0.92rem !important;
  font-weight: 750 !important;
  letter-spacing: .02em;
  background: linear-gradient(120deg, #f3e6c8, #e0b35a 55%, #8fd9c6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  margin-bottom: 0.2rem !important;
}
.nk-pricing-banner .nk-pitch span {
  display: block;
  font-size: 0.72rem !important;
  line-height: 1.45 !important;
  color: rgba(243, 235, 224, 0.78) !important;
}
.nk-pricing-banner .nk-cta-line {
  margin: 0.75rem 0 0 !important;
  font-size: 0.78rem !important;
  color: rgba(243, 235, 224, 0.72) !important;
  text-align: center;
}
.nk-pricing-banner .nk-cta-line a {
  color: #e0b35a !important;
  font-weight: 650;
  text-decoration: none;
}
.nk-pricing-banner .nk-cta-line a:hover {
  color: #8fd9c6 !important;
}


/* === Nanke 四档标签重点突出 === */
button.nk-track-chip,
.nk-track-chip {
  position: relative !important;
  font-weight: 750 !important;
  letter-spacing: 0.03em !important;
  border-width: 1.5px !important;
  padding-inline: 0.85rem !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 8px 22px rgba(0,0,0,0.32) !important;
}
.nk-track-chip::before {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 999px;
  margin-right: 0.4em;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  vertical-align: 0.05em;
}
.nk-track-chip-off {
  color: #f3d27a !important;
  border-color: rgba(220,180,70,0.95) !important;
  background: linear-gradient(165deg, rgba(220,180,70,0.24), rgba(220,180,70,0.07)) !important;
}
.nk-track-chip-pool {
  color: #a8c2e0 !important;
  border-color: rgba(130,165,210,0.95) !important;
  background: linear-gradient(165deg, rgba(110,150,200,0.22), rgba(110,150,200,0.06)) !important;
}
.nk-track-chip-eco {
  color: #8fdcbb !important;
  border-color: rgba(85,180,140,0.95) !important;
  background: linear-gradient(165deg, rgba(70,170,125,0.22), rgba(70,170,125,0.06)) !important;
}
.nk-track-chip-welfare {
  color: #dfc09a !important;
  border-color: rgba(190,150,100,0.95) !important;
  background: linear-gradient(165deg, rgba(170,130,80,0.22), rgba(170,130,80,0.06)) !important;
}
.nk-track-badge {
  font-weight: 750 !important;
  letter-spacing: 0.05em !important;
  border-width: 1px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important;
}
.nk-pitch > div b {
  font-size: 1.02em;
}



/* ========== API Keys URL strip (v41 mobile) ========== */
.nk-api-url-host {
  width: 100%;
  margin: 0 0 0.65rem 0;
}
.nk-api-url-strip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.55rem;
  max-width: min(100%, 46rem);
  vertical-align: middle;
}
.nk-api-url-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b5e52;
  letter-spacing: 0.02em;
  margin-right: 0.15rem;
  white-space: nowrap;
}
html.dark .nk-api-url-title,
.dark .nk-api-url-title { color: #b7aa9c; }
.nk-api-url-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.nk-api-url-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  max-width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e0d5c4;
  background: #fffaf3;
  color: #1a1612;
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.nk-api-url-chip:hover {
  background: #f3ebe0;
  border-color: #c9b79a;
}
.nk-api-url-chip:active { transform: translateY(1px); }
html.dark .nk-api-url-chip,
.dark .nk-api-url-chip {
  background: rgba(255,255,255,0.04);
  border-color: rgba(224,179,90,0.22);
  color: #f3ebe0;
}
html.dark .nk-api-url-chip:hover,
.dark .nk-api-url-chip:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(224,179,90,0.4);
}
.nk-api-url-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.nk-api-url-lab {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b6914;
  white-space: nowrap;
}
html.dark .nk-api-url-lab,
.dark .nk-api-url-lab { color: #e0b35a; }
.nk-api-url-val {
  font-size: 0.72rem;
  font-weight: 500;
  color: #3d342c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html.dark .nk-api-url-val,
.dark .nk-api-url-val { color: #d8cfc3; }
.nk-api-url-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  color: #8b6914;
  font-size: 0.72rem;
  font-weight: 700;
}
.nk-api-url-cta-text { display: none; }
html.dark .nk-api-url-cta,
.dark .nk-api-url-cta { color: #e0b35a; }
.nk-api-url-ico { display: inline-flex; opacity: 0.85; }
.nk-copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 99999;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #1a1612;
  color: #f5efe6;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.nk-copy-toast.nk-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Phone / narrow tablet: own row, full-width chips, 44px tap targets */
@media (max-width: 900px) {
  .nk-api-url-host { display: block; width: 100%; }
  .nk-api-url-strip,
  .nk-api-url-strip--mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 0.45rem;
  }
  .nk-api-url-title {
    white-space: normal;
    font-size: 0.8rem;
    margin: 0 0 0.1rem;
  }
  .nk-api-url-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.45rem;
  }
  .nk-api-url-chip {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
  }
  .nk-api-url-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
  }
  .nk-api-url-lab { font-size: 0.78rem; }
  .nk-api-url-val {
    max-width: none;
    width: 100%;
    font-size: 0.78rem;
    white-space: normal;
    word-break: break-all;
  }
  .nk-api-url-cta-text { display: inline; }
  .nk-api-url-cta { font-size: 0.8rem; }
}
@media (max-width: 420px) {
  .nk-api-url-val { font-size: 0.74rem; }
}

