/* ============================================================
   yunfei api — design system v2
   light / dark 双主题 · 色阶 · 阴影层次 · 动效
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f5f8;
  --bg-soft: #eceef3;
  --card: #ffffff;
  --card-2: #f8f9fb;
  --fg: #111426;
  --fg-muted: #5b6376;
  --fg-faint: #8d94a6;
  --border: rgb(17 20 38 / 8%);
  --border-strong: rgb(17 20 38 / 14%);
  --input: rgb(17 20 38 / 12%);

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-fg: #ffffff;
  --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --ring: rgb(79 70 229 / 30%);

  --success: #059669;
  --success-soft: #ecfdf5;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --chart: #7c3aed;
  --chart-soft: #f5f3ff;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --destructive: #dc2626;
  --destructive-border: rgb(220 38 38 / 35%);
  --avatar: linear-gradient(135deg, #f472b6, #a78bfa);

  --chart-1: #6366f1;
  --chart-2: #14b8a6;
  --chart-3: #f59e0b;

  --shadow-sm: 0 1px 2px rgb(17 20 38 / 5%), 0 1px 3px rgb(17 20 38 / 6%);
  --shadow-md: 0 2px 4px rgb(17 20 38 / 5%), 0 4px 12px rgb(17 20 38 / 7%);
  --shadow-lg: 0 4px 8px rgb(17 20 38 / 6%), 0 12px 32px rgb(17 20 38 / 12%);
  --shadow-primary: 0 4px 14px rgb(79 70 229 / 35%);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --font: "Inter", "Public Sans", -apple-system, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0d14;
  --bg-soft: #11141d;
  --card: #151926;
  --card-2: #1a1f2e;
  --fg: #e9ebf4;
  --fg-muted: #9aa3ba;
  --fg-faint: #687089;
  --border: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 15%);
  --input: rgb(255 255 255 / 12%);

  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: rgb(99 102 241 / 16%);
  --primary-fg: #0c0e17;
  --primary-grad: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --ring: rgb(129 140 248 / 35%);

  --success: #34d399;
  --success-soft: rgb(52 211 153 / 12%);
  --info: #60a5fa;
  --info-soft: rgb(96 165 250 / 12%);
  --chart: #a78bfa;
  --chart-soft: rgb(167 139 250 / 14%);
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / 12%);
  --danger: #f87171;
  --danger-soft: rgb(248 113 113 / 12%);
  --destructive: #f87171;
  --destructive-border: rgb(248 113 113 / 40%);
  --avatar: linear-gradient(135deg, #f472b6, #a78bfa);

  --chart-1: #818cf8;
  --chart-2: #2dd4bf;
  --chart-3: #fbbf24;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 24%);
  --shadow-md: 0 2px 6px rgb(0 0 0 / 28%), 0 4px 16px rgb(0 0 0 / 22%);
  --shadow-lg: 0 8px 40px rgb(0 0 0 / 45%);
  --shadow-primary: 0 4px 16px rgb(99 102 241 / 40%);
  color-scheme: dark;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 15px;
  line-height: 1.55;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
}

code,
pre,
.mono {
  font-family: var(--mono);
}

::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

html[data-theme="dark"] ::selection {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 84px;
  height: 42px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.brand-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.55rem;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-fg);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--destructive);
  color: #fff;
}

.btn-danger:hover {
  background: var(--destructive);
  filter: brightness(1.08);
}

.btn-sm {
  height: 2.05rem;
  padding: 0 0.8rem;
  font-size: 0.82rem;
}

.btn i,
.btn svg {
  width: 15px;
  height: 15px;
}

.btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-ghost.loading::after {
  border-color: var(--border-strong);
  border-top-color: var(--fg);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.linkish {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.linkish:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* icon-only button (theme toggle, copy …) */
.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s;
}

.iconbtn:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.iconbtn i,
.iconbtn svg {
  width: 16px;
  height: 16px;
}

/* ---------- forms ---------- */
label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  height: 2.55rem;
  padding: 0 0.8rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder {
  color: var(--fg-faint);
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.form {
  display: grid;
  gap: 1rem;
}

.form .btn[type="submit"] {
  width: 100%;
  margin-top: 0.35rem;
}

.pw-wrap {
  position: relative;
}

.pw-wrap input {
  padding-right: 2.8rem;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-faint);
  cursor: pointer;
}

.pw-toggle:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.pw-toggle i,
.pw-toggle svg {
  width: 16px;
  height: 16px;
}

.err {
  min-height: 1.25rem;
  color: var(--destructive);
  font-size: 0.85rem;
}

/* ---------- toast ---------- */
.toast-box {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(360px, calc(100vw - 2.2rem));
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-size: 0.87rem;
  overflow: hidden;
  animation: toast-in 0.25s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.toast.out {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.toast i,
.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.toast.ok {
  color: var(--success);
}

.toast.err {
  color: var(--destructive);
}

.toast.info {
  color: var(--info);
}

.toast span {
  color: var(--fg);
}

.toast::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.35;
  animation: toast-bar 2.6s linear forwards;
}

@keyframes toast-bar {
  from {
    width: 100%;
  }
  to {
    width: 0;
  }
}

/* ---------- skeleton ---------- */
.sk {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 45%), transparent);
  animation: shimmer 1.4s infinite;
}

html[data-theme="dark"] .sk::after {
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 6%), transparent);
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.sk-line {
  height: 0.9rem;
}

/* ---------- auth pages (sign-in / sign-up) ---------- */
.auth-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}

.auth-tools {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.auth-tools a {
  color: var(--fg-muted);
  text-decoration: none;
}

.auth-tools a:hover {
  color: var(--fg);
}

/* brand showcase panel */
.auth-brand {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.6rem 2.8rem;
  background: var(--primary-grad);
  color: #fff;
  overflow: hidden;
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.auth-brand::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -120px;
  background: #22d3ee;
}

.auth-brand::after {
  width: 380px;
  height: 380px;
  bottom: -160px;
  left: -100px;
  background: #f472b6;
}

.auth-brand .brand {
  position: relative;
  z-index: 1;
}

.auth-brand .brand-mark {
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / 25%));
  width: 96px;
  height: 48px;
}

.auth-brand h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 22ch;
  font-size: 2.15rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgb(0 0 0 / 18%);
}

.auth-brand .sub {
  position: relative;
  z-index: 1;
  margin: 0.9rem 0 0;
  max-width: 40ch;
  color: rgb(255 255 255 / 85%);
  font-size: 0.95rem;
}

.auth-points {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgb(255 255 255 / 92%);
  font-size: 0.9rem;
}

.auth-points i,
.auth-points svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #99f6e4;
}

/* form side */
.auth-side {
  position: relative;
  display: grid;
  place-items: center;
  padding: 4.2rem 1.2rem 2.4rem;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  padding: 0 0.2rem;
}

.auth-mobile-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.auth-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0.45rem 0 1.6rem;
  color: var(--fg-muted);
  font-size: 0.92rem;
}

.auth-sub a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-sub a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-foot {
  margin-top: 2.6rem;
  text-align: center;
  color: var(--fg-faint);
  font-size: 0.78rem;
}

@media (min-width: 920px) {
  .auth-shell {
    grid-template-columns: 1.05fr 1fr;
  }

  .auth-brand {
    display: flex;
  }

  .auth-mobile-brand {
    display: none;
  }
}

/* ---------- app shell (sidebar layout) ---------- */
.app {
  min-height: 100svh;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
}

.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.app-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.app-tools a {
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-xs);
}

.app-tools a:hover,
.app-tools a.on {
  color: var(--fg);
  background: var(--bg-soft);
}

.app-tools > button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  cursor: pointer;
}

.app-tools > button:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.app-tools i,
.app-tools svg {
  width: 15px;
  height: 15px;
}

.app-body {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 0;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.8rem;
  background: var(--card);
  border-right: 1px solid var(--border);
}

.side a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.side a i,
.side a svg {
  width: 17px;
  height: 17px;
}

.side a:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.side a.on {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

html[data-theme="dark"] .side a.on {
  color: var(--primary-hover);
}

.side-foot {
  margin-top: auto;
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  color: var(--fg-faint);
  font-size: 0.72rem;
  line-height: 1.5;
}

.app-main {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.4rem 1.25rem 2.5rem;
}

.app-main .main {
  width: min(1100px, 100%);
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 2rem;
  display: grid;
  gap: 1.3rem;
}

.app-main .main > * {
  min-width: 0;
  max-width: 100%;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0.25rem 0 0;
  color: var(--fg-muted);
  font-size: 0.88rem;
}

/* ---------- cards ---------- */
.card {
  padding: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  outline: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-hd {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-hd .linkish {
  margin-left: auto;
  align-self: center;
}

.card-hd > div:last-child {
  flex: 1;
  min-width: 0;
}

.card-hd p {
  margin: 0.18rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.card-hd .btn {
  align-self: center;
}

.home-income {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.home-income > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1.25rem;
}

.home-income > div + div {
  border-left: 1px solid var(--border);
}

.home-income span {
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.home-income b {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.home-income-note {
  margin: 0;
  padding: 0.45rem 1.25rem 0.7rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.card-bd {
  padding: 1.05rem 1.25rem;
}

.ico {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.ico i,
.ico svg {
  width: 16px;
  height: 16px;
}

.ico-green {
  background: var(--success-soft);
  color: var(--success);
}

.ico-blue {
  background: var(--info-soft);
  color: var(--info);
}

.ico-purple {
  background: var(--chart-soft);
  color: var(--chart);
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.stat {
  position: relative;
  padding: 1.1rem 1.25rem 1.2rem;
  background: transparent;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0.5rem 0 0.22rem;
  font-size: 1.62rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  color: var(--fg-faint);
  font-size: 0.75rem;
}

.stat-ico {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.42rem;
  background: var(--success-soft);
  color: var(--success);
}

.stat-ico i,
.stat-ico svg {
  width: 13px;
  height: 13px;
}

.stat-ico.usage {
  background: var(--info-soft);
  color: var(--info);
}

.stat-ico.req {
  background: var(--chart-soft);
  color: var(--chart);
}

/* ---------- badges / pills / tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 1.3rem;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- pelican 降智检测 ---------- */

.pelican-group {
  margin-bottom: 1.8rem;
}

.pelican-group h3 {
  font-size: 1rem;
  margin: 0 0 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.pelican-rate {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--fg-muted);
}

.pelican-desc {
  margin: -0.3rem 0 0.8rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.pelican-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
}

.pelican-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card);
}

.pelican-card img {
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.pelican-noimg::before {
  content: "图同步中…";
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  color: var(--fg-muted);
  font-size: 0.8rem;
  background: var(--card-2);
}

.pelican-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.76rem;
  color: var(--fg-muted);
}

.pelican-model {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- pelican end ---------- */

.badge-ok {
  background: var(--success-soft);
  color: var(--success);
}

.badge-fail {
  background: var(--danger-soft);
  color: var(--destructive);
}

.badge-admin {
  background: var(--primary-soft);
  color: var(--primary);
}

html[data-theme="dark"] .badge-admin {
  color: var(--primary-hover);
}

.pill {
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
}

.tag {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 0.72rem;
  font-weight: 500;
}

.tag.free {
  background: var(--success-soft);
  color: var(--success);
}

/* ---------- tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th,
.table td {
  padding: 0.68rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  color: var(--fg-faint);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: var(--card-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table code {
  font-size: 0.8rem;
}

.events-table {
  min-width: 780px;
}

.users-table {
  min-width: 900px;
}

.admin-keys-table {
  min-width: 980px;
}

.groups-usage-table {
  min-width: 720px;
}

.table .pos {
  color: var(--success);
}

.table .neg {
  color: var(--destructive);
}

textarea {
  width: 100%;
  min-height: 4.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--fg);
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea::placeholder {
  color: var(--fg-faint);
}

/* 首页公告横幅 */
.portal-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 auto 1.2rem;
  max-width: 76rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--primary-soft);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--fg);
  font-size: 0.88rem;
  line-height: 1.55;
}

.portal-notice i,
.portal-notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--primary);
}

.reg-closed {
  margin-top: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--destructive);
  font-size: 0.85rem;
}

/* 在线充值：沿用卡片、主题色与余额单位 */
.payment-note {
  margin: 0.4rem 0;
  color: var(--fg-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.payment-config-row,
.payment-orders-head,
.payment-order-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.payment-form { margin: 1rem 0; }
.payment-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.payment-form legend { padding: 0; font-weight: 600; font-size: 0.9rem; }
.payment-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0; }
.payment-presets button[aria-pressed="true"] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.payment-amount-row { display: flex; align-items: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.payment-amount-row > div { flex: 1 1 180px; max-width: 320px; min-width: 0; }
.payment-amount-row label { display: block; margin-bottom: 0.35rem; }
.payment-amount-row input { width: 100%; font-variant-numeric: tabular-nums; }
.payment-form input[readonly] { background: var(--card-2); color: var(--fg-muted); }
.payment-form :disabled { cursor: not-allowed; opacity: 0.55; }
.payment-preview { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.payment-notice { font-size: 0.85rem; color: var(--info); overflow-wrap: anywhere; }
.payment-notice:empty, .payment-preview:empty { display: none; }
.payment-orders-head { border-top: 1px solid var(--border); margin-top: 1.3rem; padding-top: 1rem; }
.payment-orders-head h3 { margin: 0; font-size: 0.95rem; }
.payment-orders { display: grid; gap: 0.65rem; margin-top: 0.8rem; }
.payment-order { padding: 1rem; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.payment-order-main strong { font-variant-numeric: tabular-nums; }
.payment-credit { display: block; color: var(--fg-muted); font-size: 0.8rem; }
.payment-badge { font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 0.2rem 0.6rem; background: var(--info-soft); color: var(--info); }
.payment-order[data-status="paid"] .payment-badge { background: var(--success-soft); color: var(--success); }
.payment-order[data-status="review"] .payment-badge { background: var(--warn-soft); color: var(--warn); }
.payment-order-id { margin: 0.65rem 0 0; font-size: 0.8rem; color: var(--fg-muted); overflow-wrap: anywhere; }
.payment-order-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.payment-order-actions a { text-decoration: none; }
.payment-warning { color: var(--warn); font-size: 0.82rem; overflow-wrap: anywhere; }
#payment-card [hidden] { display: none !important; }
#payment-card .err { overflow-wrap: anywhere; }
#payment-card .err:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 540px) {
  .payment-amount-row { align-items: stretch; flex-direction: column; }
  .payment-amount-row > div { flex-basis: auto; max-width: none; }
  .payment-order { padding: 0.8rem; }
  .payment-order-actions .btn { min-height: 44px; }
  .payment-presets .btn { flex: 1 1 40%; min-height: 44px; }
  .home-income > div + div { border-left: 0; border-top: 1px solid var(--border); }
}

/* 激活码兑换 / 管理端生成器 */
.redeem-row {
  display: flex;
  gap: 0.55rem;
}

.redeem-row input {
  flex: 1;
  font-family: var(--mono);
}

/* 邮箱验证码行 */
.code-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.code-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  letter-spacing: 0.15em;
}

.code-row .btn {
  flex-shrink: 0;
  height: 2.45rem;
}

.buy-codes {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--primary-grad);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.buy-codes:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.invoice-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--primary);
  background: var(--card-2);
}

.invoice-note i {
  color: var(--primary);
}

.invoice-note .buy-main {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
}

.invoice-note b {
  color: var(--primary);
  letter-spacing: 0.02em;
}

.buy-codes i,
.buy-codes svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.buy-codes .buy-main {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 650;
}

.buy-codes .buy-sub {
  font-size: 0.78rem;
  opacity: 0.85;
}

.codes-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 0.6rem;
}

.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
}

.more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.blank {
  padding: 3rem 1rem;
  color: var(--fg-muted);
  text-align: center;
}

.empty {
  padding: 1.6rem 0.5rem;
  color: var(--fg-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* ---------- account page ---------- */
.who {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 1.1rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--avatar);
  box-shadow: var(--shadow-md);
}

.who-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.who-sub {
  margin-top: 0.22rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.bind {
  display: grid;
  gap: 0.7rem;
}

.bind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  transition: border-color 0.15s;
}

.bind-row:hover {
  border-color: var(--border-strong);
}

.bind-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.bind-meta {
  margin-top: 0.15rem;
  color: var(--fg-muted);
  font-size: 0.84rem;
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.sec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.1rem 0.8rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: inherit;
  text-align: center;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}

.sec-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sec-ico {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  background: var(--bg-soft);
  color: var(--fg-muted);
}

.sec-ico i,
.sec-ico svg {
  width: 15px;
  height: 15px;
}

.sec-card strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.sec-card span {
  color: var(--fg-faint);
  font-size: 0.75rem;
  line-height: 1.45;
}

.sec-card.danger .sec-ico {
  background: var(--danger-soft);
  color: var(--destructive);
}

.sec-card.danger {
  border-color: var(--destructive-border);
}

.sec-card.danger:hover {
  border-color: var(--destructive);
}

.session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--border);
}

.session:last-child {
  border-bottom: 0;
}

.session-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.session-title code {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.session-meta {
  margin-top: 0.22rem;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

/* ---------- keys page ---------- */
.page-head-acts {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.keys-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 1.05rem 1.25rem 0.9rem;
}

.keys-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.keys-search i,
.keys-search svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--fg-faint);
  pointer-events: none;
}

.keys-search input {
  width: 100%;
  padding-left: 2.1rem;
}

.keys-toolbar select {
  width: auto;
  min-width: 8.5rem;
}

.keys-table {
  min-width: 980px;
}

.keys-table .k-name {
  font-weight: 650;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.k-token {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.k-token code {
  font-size: 0.8rem;
  color: var(--fg);
  word-break: break-all;
}

.k-mini {
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
}

.k-mini i,
.k-mini svg {
  width: 13px;
  height: 13px;
}

.k-usage {
  display: grid;
  gap: 0.1rem;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
  white-space: nowrap;
}

.k-usage span:first-child {
  color: var(--fg);
  font-weight: 550;
}

.k-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.k-status i,
.k-status svg {
  width: 13px;
  height: 13px;
}

.k-status.k-on {
  color: var(--success);
}

.k-status.k-off {
  color: var(--fg-faint);
}

.k-time {
  color: var(--fg-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.k-acts {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.k-acts .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.use-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  margin-bottom: 0.5rem;
}

.use-row > span {
  flex-shrink: 0;
  width: 7.2rem;
  color: var(--fg-faint);
  font-size: 0.78rem;
  font-weight: 600;
}

.use-row code {
  flex: 1;
  font-size: 0.8rem;
  word-break: break-all;
}

.hint {
  margin-top: 0.6rem;
  color: var(--fg-faint);
  font-size: 0.78rem;
  line-height: 1.6;
}

.ccs-link-box {
  margin-top: 0.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.ccs-link-box code {
  display: block;
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--fg-muted);
  max-height: 5.2rem;
  overflow: auto;
}

/* ---------- chips (filters) ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  height: 2.05rem;
  padding: 0 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.chip.on {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

html[data-theme="dark"] .chip.on {
  color: #0c0e17;
}

/* ---------- dashboard chart ---------- */
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.trend-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--fg-muted);
  font-size: 0.78rem;
}

.trend-legend em {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  background: var(--chart-1);
  font-style: normal;
}

.chart-wrap {
  position: relative;
  margin-top: 0.6rem;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.bar {
  fill: var(--chart-1);
  opacity: 0.85;
  rx: 4px;
  transition: opacity 0.15s;
}

.bar:hover {
  opacity: 1;
}

.bar.alt {
  fill: var(--chart-2);
}

.axis-line {
  stroke: var(--border);
  stroke-width: 1;
}

.axis-tick {
  fill: var(--fg-faint);
  font-size: 10px;
  font-family: var(--font);
}

.avg-line {
  stroke: var(--chart-3);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  opacity: 0.7;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 8.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: nowrap;
}

.chart-tip b {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
}

.chart-tip span {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- mask & dialog ---------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgb(10 12 20 / 55%);
  backdrop-filter: blur(4px);
}

.mask.open {
  display: grid;
}

.dialog {
  width: 100%;
  max-width: 430px;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  outline: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: dialog-in 0.22s cubic-bezier(0.21, 1.02, 0.73, 1);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 650;
}

.preview {
  margin: 0 0 1rem;
  color: var(--fg-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.modes {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.mode {
  height: 2.1rem;
  padding: 0 0.95rem;
  flex: 1;
}

.mode.on {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

html[data-theme="dark"] .mode.on {
  color: #0c0e17;
}

.dialog-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100svh - 2rem);
  overflow: hidden;
}

.dialog-body {
  min-height: 0;
  overflow: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.dialog-actions .btn {
  margin-top: 0;
}

/* ---------- admin ---------- */
.admin-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 1.25rem 1rem;
}

.admin-search select {
  width: auto;
  flex: 0 0 auto;
  min-width: 8.5rem;
}

.admin-search input {
  flex: 1 1 auto;
  width: auto;
  min-width: 8rem;
  height: 2.3rem;
}

.admin-search input[type="number"] {
  flex: 0 0 7rem;
  width: 7rem;
  min-width: 5.5rem;
}

.admin-search .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem 0;
  margin-bottom: 1.3rem;
}

.admin-stats[hidden] {
  display: none;
}

.stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.rates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.rates-bulk {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.rates-bulk input {
  width: 6.2rem;
  height: 2.1rem;
}

.rates-wrap {
  overflow-x: auto;
}

.rate-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}

.rate-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8.4rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
}

.rate-cell input {
  width: 5.2rem;
  height: 2rem;
}

.rate-now,
.rate-live {
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.rate-live {
  color: var(--fg);
}

.actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.actions .btn {
  height: 1.85rem;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.users-card .table td.actions {
  min-width: 15rem;
}

.users-card .table td.u-name {
  max-width: 14rem;
}

.users-card .table td.u-name b {
  display: block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-card .head {
  padding: 1.05rem 1.25rem 0.9rem;
  margin: 0;
}

.users-card .head h2 {
  font-size: 1.12rem;
}

.users-card .head p {
  margin: 0.18rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.users-card .table {
  min-width: 720px;
}

.role-tag {
  display: inline-flex;
}

/* ---------- plaza (model square) ---------- */
.app-main.plaza-fit {
  padding: 0;
  overflow: hidden;
  display: flex;
}

.plaza-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
  min-height: 0;
  flex: 1;
}

.plaza-filter {
  min-height: 0;
  overflow: auto;
  padding: 1rem 0.75rem 1.5rem;
  background: var(--card-2);
  border-right: 1px solid var(--border);
}

.plaza-filter-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.plaza-filter-hd h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.plaza-filter-hd button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 2rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.plaza-filter-hd button:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.plaza-filter-hd svg {
  width: 14px;
  height: 14px;
}

.fsec {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}

.fsec:last-child {
  border-bottom: 0;
}

.fsec-hd {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.fsec-hd svg {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
  transition: transform 0.15s;
}

.fsec.open .fsec-hd svg {
  transform: rotate(180deg);
}

.fsec-bd {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.fsec.open .fsec-bd {
  display: grid;
}

.fchip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.fchip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fchip em {
  margin-left: auto;
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg-faint);
}

.fchip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

.fchip.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

html[data-theme="dark"] .fchip.on {
  color: var(--primary-hover);
}

.fchip.on em {
  color: inherit;
}

.plaza-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.plaza-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
}

.plaza-hero h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plaza-hero span {
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.plaza-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.7rem 1.25rem 0.8rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.plaza-search {
  position: relative;
}

.plaza-search svg {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  width: 16px;
  height: 16px;
  color: var(--fg-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.plaza-search input {
  height: 2.55rem;
  padding: 0 1rem 0 2.4rem;
  border-radius: var(--radius-sm);
}

.plaza-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.plaza-count {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-left: auto;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.plaza-count strong {
  color: var(--fg);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.plaza-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.plaza-sort,
.plaza-filter-open,
.plaza-pagebtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.1rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.plaza-sort:hover,
.plaza-filter-open:hover,
.plaza-pagebtn:not(:disabled):hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.plaza-sort svg,
.plaza-filter-open svg,
.plaza-pagebtn svg {
  width: 14px;
  height: 14px;
}

.plaza-pagebtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ledger-pager {
  padding: 0.75rem 1.25rem 1.1rem;
}

.dialog .ledger-pager {
  padding: 0.7rem 0 0;
}

.plaza-filter-open {
  display: none;
}

.seg {
  display: inline-flex;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.seg button {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.7rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 3px);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.seg button.on {
  background: var(--primary-soft);
  color: var(--primary);
}

html[data-theme="dark"] .seg button.on {
  color: var(--primary-hover);
}

.seg svg {
  width: 14px;
  height: 14px;
}

.plaza-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.85rem;
  padding: 1rem 1.25rem;
}

.mcard {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s, border-color 0.15s;
}

.mcard:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.mcard.is-off,
.plaza-table tr.is-off,
.mdoc-table tr.is-off {
  opacity: 0.42;
  filter: grayscale(0.75);
}

.mcard.is-off:hover {
  transform: none;
}

.mcard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.mcard-who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.mcard-name {
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.mcard-id {
  color: var(--fg-faint);
  font-size: 0.72rem;
  font-family: var(--mono);
  word-break: break-all;
}

.mcard-desc {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--fg-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  flex: 1;
}

.mcard-copy {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--fg-faint);
  cursor: pointer;
  transition: all 0.15s;
}

.mcard-copy:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.mcard-copy svg {
  width: 13px;
  height: 13px;
}

.mcard-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mcard-foot span {
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.plaza-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.plaza-table th,
.plaza-table td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.plaza-table th {
  color: var(--fg-faint);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plaza-main > .plaza-table,
.plaza-main > div:not(.plaza-grid):not(.empty):not(.plaza-pager) {
  padding: 1rem 1.25rem;
}

.plaza-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.9rem 1.25rem 1.4rem;
}

.plaza-pager p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.plaza-pager-btns {
  display: flex;
  gap: 0.45rem;
}

.prov {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  flex-shrink: 0;
  border-radius: 0.65rem;
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prov[data-p="anthropic"] {
  background: #f5f0e8;
  color: #c15f3c;
}

.prov[data-p="deepseek"] {
  background: #e8f0fd;
  color: #4d6bfe;
}

.prov[data-p="google"] {
  background: #eaf3ea;
  color: #34a853;
}

.prov[data-p="kimi"] {
  background: #0f0f14;
  color: #fff;
}

.prov[data-p="openai"],
.prov[data-p="codex"] {
  background: #e8e8e8;
  color: #10a37f;
}

.prov[data-p="ollama"] {
  background: #e8e8ec;
  color: #444;
}

.prov[data-p="bailian"] {
  background: #e9efff;
  color: #3742fa;
}

.prov[data-p="elevenlabs"] {
  background: #000;
  color: #fff;
}

.prov[data-p="mureka"] {
  background: #f3e8ff;
  color: #7c3aed;
}

.prov[data-p="byteplus"] {
  background: #0055ff;
  color: #fff;
}

.prov[data-p="doubao"] {
  background: #00f2ea;
  color: #0b0b0b;
}

html[data-theme="dark"] .prov[data-p="anthropic"] {
  background: rgb(193 95 60 / 18%);
  color: #e8967a;
}

html[data-theme="dark"] .prov[data-p="deepseek"] {
  background: rgb(77 107 254 / 18%);
  color: #9db1ff;
}

html[data-theme="dark"] .prov[data-p="google"] {
  background: rgb(52 168 83 / 16%);
  color: #8fe3a8;
}

html[data-theme="dark"] .prov[data-p="kimi"] {
  background: rgb(255 255 255 / 14%);
  color: #fff;
}

html[data-theme="dark"] .prov[data-p="openai"],
html[data-theme="dark"] .prov[data-p="codex"] {
  background: rgb(16 163 127 / 16%);
  color: #4fd6b3;
}

html[data-theme="dark"] .prov[data-p="ollama"] {
  background: rgb(255 255 255 / 10%);
  color: #c8c8d0;
}

html[data-theme="dark"] .prov[data-p="bailian"] {
  background: rgb(55 66 250 / 20%);
  color: #a9b4ff;
}

html[data-theme="dark"] .prov[data-p="mureka"] {
  background: rgb(124 58 237 / 18%);
  color: #d6b8ff;
}

.prov[data-p="glm"] {
  background: #e6f7ff;
  color: #1677ff;
}

.prov[data-p="grok"] {
  background: #111;
  color: #fff;
}

.prov[data-p="minimax"] {
  background: #ede9fe;
  color: #7c3aed;
}

.prov[data-p="mimo"] {
  background: #fff1f0;
  color: #e5484d;
}

.prov[data-p="ox"] {
  background: #f0fdf4;
  color: #16a34a;
}

html[data-theme="dark"] .prov[data-p="glm"] {
  background: rgb(22 119 255 / 18%);
  color: #79b8ff;
}

html[data-theme="dark"] .prov[data-p="grok"] {
  background: rgb(255 255 255 / 12%);
  color: #eee;
}

html[data-theme="dark"] .prov[data-p="minimax"] {
  background: rgb(124 58 237 / 18%);
  color: #c4b0f5;
}

html[data-theme="dark"] .prov[data-p="mimo"] {
  background: rgb(229 72 77 / 16%);
  color: #f1999c;
}

html[data-theme="dark"] .prov[data-p="ox"] {
  background: rgb(22 163 74 / 16%);
  color: #7ee2a8;
}

html.mdoc-lock {
  overflow: hidden;
}

.mdoc {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
}

.mdoc.open {
  display: block;
}

.mdoc-mask {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 10%);
  backdrop-filter: blur(2px);
  animation: mdoc-fade 0.15s ease;
}

.mdoc-sheet {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(100%, 42rem);
  background: var(--card);
  color: var(--fg);
  border-left: 1px solid var(--border);
  box-shadow: none;
  animation: mdoc-in 0.2s ease;
}

@keyframes mdoc-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mdoc-in {
  from {
    opacity: 0;
    transform: translateX(2.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mdoc-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}

.mdoc-close:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.mdoc-close svg {
  width: 16px;
  height: 16px;
}

.mdoc-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2.75rem 1.25rem 1.5rem;
}

.mdoc-head {
  padding-bottom: 1rem;
}

.mdoc-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.mdoc-title .prov {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.62rem;
}

.mdoc-title h1 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mdoc-namecopy {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}

.mdoc-namecopy:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.mdoc-namecopy svg {
  width: 12px;
  height: 12px;
}

.mdoc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.mdoc-meta i {
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 50%;
  background: var(--border-strong);
}

.mdoc-desc {
  margin: 0.55rem 0 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.mdoc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--fg) 6%, var(--card-2));
}

.mdoc-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}

.mdoc-tabs button:hover {
  color: var(--fg);
}

.mdoc-tabs button.on {
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

.mdoc-tabs svg {
  width: 14px;
  height: 14px;
}

.mdoc-panel {
  padding-top: 1.25rem;
}

.mdoc-block {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.mdoc-block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.mdoc-block h3 {
  margin: 0 0 0.75rem;
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mdoc-prices {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mdoc-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.mdoc-price:last-child {
  border-bottom: 0;
}

.mdoc-price span {
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.mdoc-price b {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.mdoc-price i {
  margin-left: 0.3rem;
  color: var(--fg-faint);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 400;
}

.mdoc-gbadge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mdoc-gbadge[data-i="0"] {
  background: var(--info-soft);
  color: var(--info);
}

.mdoc-gbadge[data-i="1"] {
  background: var(--chart-soft);
  color: var(--chart);
}

.mdoc-gbadge[data-i="2"] {
  background: var(--success-soft);
  color: var(--success);
}

.mdoc-gbadge[data-i="3"] {
  background: var(--primary-soft);
  color: var(--primary);
}

.mdoc-mono {
  color: var(--fg-muted);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.mdoc-pline {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.mdoc-pline + .mdoc-pline {
  margin-top: 0.25rem;
}

.mdoc-pline span {
  color: var(--fg-muted);
}

.mdoc-pline b {
  font-family: var(--mono);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mdoc-pline em {
  display: block;
  color: var(--fg-faint);
  font-size: 0.68rem;
  font-style: normal;
}

.mdoc-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--border);
}

.mdoc-facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  background: var(--card);
}

.mdoc-facts span {
  color: var(--fg-muted);
  font-size: 0.62rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mdoc-facts b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg);
  font-size: 0.86rem;
  font-weight: 650;
}

.mdoc-gtags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mdoc-gtags span {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.mdoc-ends,
.mdoc-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.15rem 0 0.8rem;
}

.mdoc-ends button,
.mdoc-langs button {
  height: 1.95rem;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.mdoc-ends button:hover,
.mdoc-langs button:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

.mdoc-ends button.on,
.mdoc-langs button.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

html[data-theme="dark"] .mdoc-ends button.on,
html[data-theme="dark"] .mdoc-langs button.on {
  color: #0c0e17;
}

.mdoc-code-wrap {
  position: relative;
}

.mdoc-code {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--fg);
  font-size: 0.8rem;
  line-height: 1.6;
}

.mdoc-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card);
  color: var(--fg-muted);
  cursor: pointer;
}

.mdoc-copy:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.mdoc-copy svg {
  width: 13px;
  height: 13px;
}

.mdoc-note {
  margin: 0.7rem 0 0;
  color: var(--fg-faint);
  font-size: 0.72rem;
  line-height: 1.55;
}

.mdoc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.mdoc-table th,
.mdoc-table td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.mdoc-table th {
  color: var(--fg-muted);
  font-size: 0.62rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .mdoc-scroll {
    padding: 3rem 1.5rem 1.75rem;
  }

  .mdoc-title h1 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .mdoc-sheet {
    width: min(100%, 48rem);
  }

  .mdoc-facts {
    grid-template-columns: 1fr 1fr;
  }

  .mdoc-fact-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1280px) {
  .mdoc-sheet {
    width: min(100%, 56rem);
  }
}

@media (min-width: 1536px) {
  .mdoc-sheet {
    width: min(100%, 64rem);
  }
}

@media (max-width: 639px) {
  .mdoc-tabs svg {
    display: none;
  }
}

/* ---------- home (marketing) ---------- */
.home {
  min-height: 100svh;
  background: var(--bg);
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem max(1.5rem, calc(50vw - 560px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.home-nav .links {
  display: flex;
  gap: 1.1rem;
  margin-left: 2rem;
  font-size: 0.9rem;
}

.home-nav .links a {
  color: var(--fg-muted);
  text-decoration: none;
}

.home-nav .links a:hover {
  color: var(--fg);
}

.home-nav .acts {
  margin-left: auto;
  display: flex;
  gap: 0.55rem;
}

.home-hero {
  position: relative;
  padding: 5.5rem 1.5rem 4.5rem;
  text-align: center;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  top: -240px;
  left: 50%;
  width: 900px;
  height: 480px;
  background: radial-gradient(closest-side, var(--primary-soft), transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.hero-badge i,
.hero-badge svg {
  width: 14px;
  height: 14px;
  color: var(--chart-2);
}

.home-hero h1 {
  position: relative;
  margin: 1.3rem auto 0;
  max-width: 21ch;
  font-size: clamp(2rem, 5.5vw, 3.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.home-hero h1 em {
  font-style: normal;
  background: var(--primary-grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

html[data-theme="dark"] .home-hero h1 em {
  filter: brightness(1.15);
}

.home-hero .sub {
  position: relative;
  margin: 1.1rem auto 0;
  max-width: 52ch;
  color: var(--fg-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-cta {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.hero-cta .btn {
  height: 2.9rem;
  padding: 0 1.5rem;
  font-size: 0.95rem;
}

.btn-lg-grad {
  background: var(--primary-grad);
  box-shadow: var(--shadow-primary);
}

.btn-lg-grad:hover {
  background: var(--primary-grad);
  filter: brightness(1.06);
}

.hero-stats {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
  margin: 3.2rem auto 0;
  flex-wrap: wrap;
}

.hero-stats > div {
  text-align: center;
}

.hero-stats b {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.home-sec {
  padding: 3.2rem 1.5rem;
}

.home-sec-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.home-sec-hd {
  text-align: center;
  margin-bottom: 2.2rem;
}

.home-sec-hd h2 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.home-sec-hd p {
  margin: 0.5rem auto 0;
  max-width: 52ch;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}

.feat {
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.15s;
}

.feat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.feat-ico {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 0.95rem;
}

html[data-theme="dark"] .feat-ico {
  color: var(--primary-hover);
}

.feat-ico svg,
.feat-ico i {
  width: 19px;
  height: 19px;
}

.feat h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 650;
}

.feat p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.proto {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.proto h3 {
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.proto pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  overflow-x: auto;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
  color: var(--fg);
  font-size: 0.72rem;
  line-height: 1.55;
}

.proto .tagline {
  margin: 0 0 0.8rem;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

/* ---------- home pricing table ---------- */
.price-table-wrap {
  margin: 0;
}

.price-table {
  min-width: 560px;
}

.price-table .num b {
  font-variant-numeric: tabular-nums;
}

.price-more {
  display: flex;
  justify-content: center;
  padding: 0.9rem 1.25rem 1.05rem;
  border-top: 1px solid var(--border);
}

.mcard-price {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .mcard-price {
  color: var(--primary-hover);
}

.mcard-price i,
.mcard-price svg {
  width: 13px;
  height: 13px;
}

.mcard-chs {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.mcard-ch {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

html[data-theme="dark"] .mcard-ch {
  color: var(--primary-hover);
}

.mcard-ch.is-off {
  color: var(--fg-muted);
  text-decoration: line-through;
}

html[data-theme="dark"] .mcard-ch.is-off {
  color: var(--fg-muted);
}

.badge-group {
  background: var(--chart-soft);
  color: var(--chart);
  font-family: var(--mono);
  font-weight: 600;
  margin-left: 0.25rem;
}

.mdoc-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tier-sub {
  margin-top: 0.15rem;
  color: var(--fg-faint);
  font-size: 0.7rem;
}

.usage-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.usage-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary-grad);
}

.dialog-wide {
  max-width: 640px;
}

.gp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
  max-height: 260px;
  overflow: auto;
  padding: 0.1rem;
}

.gp-field label {
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
}

.gp-field input {
  height: 2.1rem;
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .gp-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- footer ---------- */
.home-foot {
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--fg-faint);
  font-size: 0.8rem;
}

.home-foot .brand {
  justify-content: center;
  margin-bottom: 0.8rem;
}

/* ---------- legacy compat (kept working, restyled) ---------- */
.page {
  min-height: 100svh;
  background: var(--bg);
}

.wrap {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 2rem;
}

.wrap-wide {
  align-items: flex-start;
  padding-top: 6rem;
}

.panel {
  width: 100%;
  max-width: 480px;
}

.panel-wide {
  max-width: 880px;
}

.head {
  margin-bottom: 2rem;
}

.head h2 {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.head p {
  margin: 0.5rem 0 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.head a {
  font-weight: 500;
}

.key {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.8rem;
  word-break: break-all;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.row span:first-child {
  color: var(--fg-muted);
}

.meta {
  display: grid;
  gap: 0.75rem;
}

.nav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.nav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
}

.shell {
  min-height: 100svh;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar .brand {
  position: static;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.topnav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.topnav a:hover,
.topnav a.on {
  color: var(--fg);
  font-weight: 600;
}

.topnav button {
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  cursor: pointer;
}

.hero {
  display: grid;
  gap: 1rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.toolbar input {
  max-width: 320px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.plaza {
  display: grid;
  gap: 0.85rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-sub {
  margin: 0.2rem 0 0;
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-head h2 {
  margin: 0;
}

.shell .btn {
  width: auto;
  margin-top: 0;
}

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .brand-mark {
    width: 104px;
  }

  .sec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .app-body {
    grid-template-columns: 1fr;
  }

  .side {
    flex-direction: row;
    gap: 0.35rem;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
  }

  .side a {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
  }

  .side-foot {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .sec-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-title {
    font-size: 1.45rem;
  }

  .home-nav .links {
    display: none;
  }
}

@media (max-width: 900px) {
  .plaza-shell {
    grid-template-columns: 1fr;
  }

  .plaza-filter {
    display: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .plaza-filter.open {
    display: block;
  }

  .plaza-filter-open {
    display: inline-flex;
  }

  .plaza-grid {
    grid-template-columns: 1fr;
  }
}

.shelf-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.shelf-ghd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: var(--card-2);
  flex-wrap: wrap;
}

.shelf-ghd span {
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.shelf-live {
  color: var(--fg-muted);
  font-size: 0.82rem;
}

/* ---------- docs page ---------- */
.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-toc a {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg-muted);
  font-size: 0.78rem;
  font-weight: 550;
}

.doc-toc a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.doc-sec {
  scroll-margin-top: 1.25rem;
}

.doc-sec .card-hd h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
}

.doc-sec .card-hd h2 svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.doc-lead {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  font-weight: 550;
}

.doc-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.doc-step {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
}

.doc-step b {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
}

.doc-step strong {
  font-size: 0.85rem;
}

.doc-step span {
  display: block;
  margin-top: 0.2rem;
  color: var(--fg-faint);
  font-size: 0.74rem;
  line-height: 1.5;
}

.doc-facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.doc-facts th {
  width: 8.5rem;
  padding: 0.55rem 0.75rem 0.55rem 0;
  text-align: left;
  vertical-align: top;
  color: var(--fg-muted);
  font-weight: 600;
}

.doc-facts td {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}

.doc-facts tr:last-child th,
.doc-facts tr:last-child td {
  border-bottom: 0;
}

.doc-tool + .doc-tool {
  margin-top: 1.1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.doc-tool-hd {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.doc-tool-hd h3 {
  margin: 0;
  font-size: 0.95rem;
}

.doc-tool p {
  margin: 0.6rem 0;
  color: var(--fg-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.doc-tag-off {
  background: var(--warn-soft);
  color: var(--warn);
}

.doc-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 0.8rem 0;
}

.doc-vscode {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  font-size: 0.8rem;
}

.doc-vscode h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.doc-vscode ol {
  margin: 0;
  padding-left: 1.1rem;
}

.doc-vscode li {
  margin: 0.3rem 0;
  color: var(--fg-muted);
  line-height: 1.5;
}

.doc-faq h4 {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.9rem;
}

.doc-faq h4:first-child {
  margin-top: 0;
}

.doc-faq p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .doc-steps {
    grid-template-columns: 1fr;
  }

  .doc-tool-grid {
    grid-template-columns: 1fr;
  }
}

.mdoc-urls {
  margin: 0.2rem 0 0.9rem;
}

.rate-display {
  width: 100%;
  min-width: 8.5rem;
}

.mcard-ch.ch-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.mcard-ch.ch-copy:hover {
  text-decoration: underline;
}

.mcard-ch.ch-copy svg {
  width: 11px;
  height: 11px;
  flex: none;
  opacity: 0.55;
}

/* ---------- 全站限时折扣横幅 ---------- */
.promo-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #ec4899);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.35);
}

.promo-bar b {
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.promo-time {
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.promo-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.promo-row input {
  width: 4.6rem;
}

.promo-unit {
  color: var(--fg-faint);
  font-size: 0.78rem;
}

/* ---------- guide docs ---------- */
.app-main.guide-fit {
  padding: 0;
  overflow: hidden;
  display: flex;
}

.guide-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  width: 100%;
  min-height: 0;
  flex: 1;
}

.guide-nav {
  min-height: 0;
  overflow: auto;
  padding: 1.1rem 0.8rem 2rem;
  background: var(--card-2);
  border-right: 1px solid var(--border);
}

.guide-nav-group + .guide-nav-group {
  margin-top: 1.1rem;
}

.guide-nav-title {
  padding: 0 0.55rem 0.4rem;
  color: var(--fg-faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.guide-nav-link {
  display: block;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-xs);
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.guide-nav-link:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.guide-nav-link.on {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

html[data-theme="dark"] .guide-nav-link.on {
  color: var(--primary-hover);
}

.guide-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 1.6rem 1.8rem 3rem;
}

.guide-page {
  width: min(880px, 100%);
  margin: 0 auto;
}

.guide-page .guide-h1 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
  line-height: 1.35;
}

.guide-page .page-head {
  margin-bottom: 1.2rem;
}

.guide-page h2 {
  margin: 1.8rem 0 0.7rem;
  padding-top: 0.4rem;
  font-size: 1.12rem;
}

.guide-page h3 {
  margin: 1.3rem 0 0.5rem;
  font-size: 0.98rem;
}

.guide-page h4 {
  margin: 1.1rem 0 0.45rem;
  font-size: 0.9rem;
}

.guide-page p {
  margin: 0.6rem 0;
  color: var(--fg-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.guide-page p strong,
.guide-page li strong {
  color: var(--fg);
}

.guide-page ul,
.guide-page ol {
  margin: 0.6rem 0;
  padding-left: 1.3rem;
  color: var(--fg-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.guide-page li {
  margin: 0.25rem 0;
}

.guide-page a {
  color: var(--primary);
  text-decoration: none;
}

.guide-page a:hover {
  text-decoration: underline;
}

.guide-page code {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card-2);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.guide-page pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.guide-page .mdoc-code-wrap {
  margin: 0.7rem 0;
}

.guide-page .doc-facts,
.guide-page .table-wrap {
  margin: 0.8rem 0;
}

.guide-note {
  margin: 0.9rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 0.86rem;
}

.guide-note .guide-note-title {
  margin: 0 0 0.3rem;
  font-weight: 650;
  font-size: 0.86rem;
  color: var(--fg);
}

.guide-note p,
.guide-note ul,
.guide-note ol {
  margin: 0.35rem 0;
  font-size: 0.84rem;
}

.guide-note.tip {
  border-color: rgb(5 150 105 / 30%);
  background: var(--success-soft);
}

.guide-note.info {
  border-color: rgb(37 99 235 / 28%);
  background: var(--info-soft);
}

.guide-note.warning {
  border-color: rgb(180 83 9 / 30%);
  background: var(--warn-soft);
}

.guide-note.danger {
  border-color: rgb(220 38 38 / 30%);
  background: var(--danger-soft);
}

html[data-theme="dark"] .guide-note.tip {
  border-color: rgb(45 212 191 / 30%);
}

html[data-theme="dark"] .guide-note.info {
  border-color: rgb(96 165 250 / 32%);
}

html[data-theme="dark"] .guide-note.warning {
  border-color: rgb(251 191 36 / 30%);
}

html[data-theme="dark"] .guide-note.danger {
  border-color: rgb(248 113 113 / 32%);
}

.guide-pager {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  width: min(880px, 100%);
  margin: 2.2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.guide-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 48%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  text-decoration: none;
  transition: border-color 0.15s;
}

.guide-pager-link:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.guide-pager-link.next {
  align-items: flex-end;
  text-align: right;
  margin-left: auto;
}

.guide-pager-dir {
  color: var(--fg-faint);
  font-size: 0.74rem;
}

.guide-pager-name {
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
}

@media (max-width: 920px) {
  .guide-shell {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.8rem;
  }

  .guide-nav-group {
    margin-top: 0.4rem;
  }

  .guide-nav-link {
    display: inline-block;
  }

  .guide-content {
    padding: 1.1rem 1rem 2.5rem;
  }
}

/* guide docs: API 参考页复用站点卡片区块 */
.guide-page .doc-sec {
  margin: 1.1rem 0;
}

.guide-page .doc-sec .card-bd > p:first-child,
.guide-page .doc-sec .card-bd > .doc-tool:first-child {
  margin-top: 0;
}

.guide-page .doc-sec .doc-toc {
  margin-bottom: 0.4rem;
}

/* Model status: one shared snapshot per channel, in cards, tables and details. */
.mcard-channel { min-width: 0; padding-bottom: 0.3rem; }
.model-status { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; margin-top: 0.3rem; color: var(--fg-muted); font-size: 0.7rem; line-height: 1.5; }
.model-status-label { white-space: nowrap; }
.model-status-label b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.model-status-bars { display: inline-flex; align-items: stretch; gap: 2px; height: 14px; flex-shrink: 0; }
.model-status-point { display: block; width: 3px; height: 100%; flex-shrink: 0; border-radius: 1px; }
.model-status-point.is-empty { background: color-mix(in srgb, var(--fg-muted) 15%, transparent); }
.model-status-point.is-perfect { background: #10b981; }
.model-status-point.is-good { background: #34d399; }
.model-status-point.is-fair { background: #f59e0b; }
.model-status-point.is-poor { background: #ef4444; }
.model-status-stale { color: var(--fg-muted); font-size: 0.65rem; }
.model-status-list { display: grid; gap: 0.7rem; }
.model-status-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; padding-bottom: 0.65rem; border-bottom: 1px solid var(--border); }
.model-status-row > span { font-size: 0.85rem; }
.model-status-row .model-status { margin-top: 0; }
.plaza-status-note { margin: 0 1.25rem 1rem; color: var(--fg-muted); font-size: 0.75rem; line-height: 1.6; }

.account-recharge-link { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.account-recharge-link h2 { margin: 0; font-size: 17px; }
