﻿:root,
html[data-theme="dark"] {
  --bg: #0f1419;
  --card: #1a222c;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d8bfd;
  --line: #2a3542;
  --sidebar: #121820;
  --rail: #0b0f16;
  --danger: #c45c5c;
  --paper: #0f1419;
  --glow: rgba(61, 139, 253, 0.22);
  --header-bg: rgba(15, 20, 25, 0.86);
  --font: "Noto Sans SC", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Syne", var(--font);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f3f7f9;
  --card: #ffffff;
  --text: #14202a;
  --muted: #5f7388;
  --accent: #1d6fd8;
  --line: rgba(20, 32, 42, 0.12);
  --sidebar: #eef3f7;
  --rail: #e4ebf2;
  --danger: #b42318;
  --paper: #f3f7f9;
  --glow: rgba(29, 111, 216, 0.18);
  --header-bg: rgba(243, 247, 249, 0.9);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 50%),
    var(--bg);
}

code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--line) 65%, transparent);
}

/* 鈥斺€?鍏变韩椤舵爮 鈥斺€?*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.site-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex: none;
}
.site-logo.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.site-brand-text strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.site-brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
}
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}
.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}
.header-app-pill {
  display: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
@media (min-width: 720px) {
  .header-app-pill { display: inline-flex; }
}

/* 鈥斺€?鍏紑棣栭〉 鈥斺€?*/
.site-body { position: relative; }
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.35;
}
.blob-a {
  width: 420px;
  height: 420px;
  left: -80px;
  top: -60px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}
.blob-b {
  width: 360px;
  height: 360px;
  right: -40px;
  top: 120px;
  background: color-mix(in srgb, #10b981 35%, transparent);
}
.site-body > *:not(.page-bg) { position: relative; z-index: 1; }

.landing-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 2.5rem;
}
.brand-hero {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.85rem;
}
.landing-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 800;
}
.hero-lead {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.section-alt {
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border-block: 1px solid var(--line);
  max-width: none;
  padding-inline: max(1.25rem, calc((100% - 1120px) / 2 + 1.25rem));
}
.section-head {
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

.app-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.app-card,
.feature-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
}
.app-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.app-card.is-soon { opacity: 0.78; }
.app-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  flex: none;
}
.app-card-icon svg { width: 24px; height: 24px; }
.app-card h3,
.feature-grid h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.app-card p,
.feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.app-card-product {
  margin-bottom: 0.35rem !important;
  font-size: 0.8rem !important;
}
.app-card-badge {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.app-card:not(.is-soon) .app-card-badge {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.login-card {
  max-width: 480px;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.footer-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.hero { margin-bottom: 28px; }
.brand {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 650;
}
.sub { margin: 0; color: var(--muted); line-height: 1.55; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.plans {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.8;
  color: var(--text);
}
.hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hint.tight { margin: 6px 0; }
.hint strong { color: var(--text); font-weight: 600; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #fff;
  color: #14202a;
  border-color: rgba(20, 32, 42, 0.22);
}
.mono-area {
  font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.actions-row { margin-top: 8px; }
.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.check-row input {
  width: auto;
  margin: 0;
}

.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.out {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f4f7fb;
  color: #14202a;
  border-radius: 8px;
  border: 1px solid rgba(20, 32, 42, 0.18);
  font-size: 13px;
  line-height: 1.55;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-all;
}
html[data-theme="dark"] .out {
  background: #1c2633;
  color: #f3f7fb;
  border-color: #4a5d72;
}

.foot {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}
.foot a { color: var(--accent); }
code {
  font-size: 12px;
  background: color-mix(in srgb, var(--line) 70%, var(--card));
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 鈥斺€?鍏紑棣栭〉锛氬簲鐢ㄩ€夋嫨 鈥斺€?*/
.app-picker {
  display: grid;
  gap: 10px;
  margin: 0 0 8px;
}
.app-picker-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #121820;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.app-picker-btn.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.app-picker-btn strong { font-size: 15px; }
.app-picker-btn span { font-size: 12px; color: var(--muted); }

/* 鈥斺€?绠＄悊鍚庡彴澹冲眰 鈥斺€?*/
.admin-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  flex: 1;
  min-height: 0;
}
.admin-sidebar {
  display: flex;
  position: sticky;
  top: 57px;
  height: calc(100vh - 57px);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 5;
}
.sidebar-rail {
  width: 148px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: var(--rail);
  transition: width 0.18s ease;
}
.admin-shell.sidebar-collapsed .sidebar-rail {
  width: 64px;
  align-items: center;
}
.app-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  flex: 1;
}
.rail-app {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.admin-shell.sidebar-collapsed .rail-app {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
}
.rail-app:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}
.rail-app.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}
.rail-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  flex: none;
}
.rail-app-icon svg {
  width: 20px;
  height: 20px;
}
.app-card-icon img,
.rail-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.rail-app.active .rail-app-icon {
  background: transparent;
  padding: 0;
}

html:not(.admin-ready) .admin-body .site-header,
html:not(.admin-ready) .admin-body .admin-shell,
html:not(.admin-ready) .admin-body .mobile-nav-toggle {
  display: none;
}
html.admin-ready #authGate {
  display: none;
}
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-gate .login-card {
  width: min(420px, 100%);
  margin: 0;
}

.config-tabs {
  gap: 8px;
  margin-bottom: 20px;
}
.config-tab {
  padding: 8px 16px;
  background: var(--card);
}
.config-pane {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 8px;
}
#planEditors {
  display: grid;
  gap: 12px;
}
#planEditors .editor-card,
#contactEditors .editor-card,
#downloadEditors .editor-card {
  background: color-mix(in srgb, var(--bg) 35%, var(--card));
  border-radius: 14px;
  padding: 14px;
}
#panel-config.card,
#panel-codes.card {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}
.rail-app-label {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-shell.sidebar-collapsed .rail-app-label {
  display: none;
}
.rail-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}
.admin-shell.sidebar-collapsed .rail-top {
  justify-content: center;
}
.rail-toggle {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}
.rail-toggle:hover {
  color: var(--text);
}

.sidebar-menu {
  width: 196px;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  min-width: 0;
  overflow: auto;
}
.admin-shell.sidebar-collapsed .sidebar-menu {
  display: none;
}
.sidebar-menu-head {
  margin: 2px 4px 14px;
}
.sidebar-menu-head strong {
  display: block;
  font-size: 15px;
}
.sidebar-menu-head small {
  color: var(--muted);
  font-size: 12px;
}
.func-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.nav-item:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-item.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 8px;
}
.admin-topbar h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 650;
}
.admin-topbar-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.admin-content {
  width: 100%;
  max-width: none;
  padding: 4px 28px 48px;
}
.admin-content .panel {
  width: 100%;
}
.admin-content.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}
.admin-content.layout-split .panel:not([hidden]) + .panel:not([hidden]) {
  margin-top: 0;
}
@media (max-width: 1100px) {
  .admin-content.layout-split {
    grid-template-columns: 1fr;
  }
}
.admin-content .panel:not([hidden]) + .panel:not([hidden]) {
  margin-top: 16px;
}
.section-title {
  margin: 18px 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.config-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.config-tab:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.config-tab.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.config-pane .hint {
  margin-top: 0;
}

.config-split {
  --split-form: 58%;
  display: flex;
  align-items: stretch;
  min-height: 460px;
}
.config-split-form {
  flex: 0 0 var(--split-form);
  min-width: 280px;
  overflow: auto;
  padding-right: 8px;
}
.config-split-handle {
  flex: 0 0 14px;
  margin: 0 2px;
  cursor: col-resize;
  position: relative;
  touch-action: none;
}
.config-split-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.config-split-handle:hover::before,
body.is-splitting .config-split-handle::before {
  background: var(--accent);
}
body.is-splitting {
  cursor: col-resize;
  user-select: none;
}
.config-split-preview {
  flex: 1 1 auto;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 230px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.preview-head span {
  color: var(--muted);
  text-align: right;
}
.preview-body {
  padding: 14px;
  overflow: auto;
}
.pv-frame {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pv-mark {
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 999px;
  padding: 3px 8px;
}
.pv-kicker {
  margin: 0;
  font-weight: 650;
}
.pv-frame p,
.pv-frame li {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.pv-frame ul {
  margin: 0;
  padding-left: 1.15em;
}
.pv-buy {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 650;
}
.pv-url {
  word-break: break-all;
  color: var(--text);
}
.pv-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pv-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px 10px;
}
.pv-plan em {
  font-style: normal;
  font-size: 20px;
  font-weight: 700;
}
.pv-origin {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 12px;
}
.pv-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 6px;
}
.pv-mini {
  font-size: 11px;
  color: var(--accent);
}
.pv-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.pv-row.head {
  color: var(--muted);
  font-size: 11px;
}
.pv-row .is-vip {
  color: var(--accent);
  font-weight: 650;
}
.pv-contact {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.pv-dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.pv-dl.is-primary {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}
.pv-dl em {
  font-style: normal;
  font-size: 11px;
  color: var(--accent);
}

@media (max-width: 980px) {
  .config-split {
    flex-direction: column;
  }
  .config-split-form {
    flex-basis: auto;
    width: 100%;
    min-width: 0;
    padding-right: 0;
  }
  .config-split-handle {
    display: none;
  }
  .config-split-preview {
    max-height: 420px;
  }
}

.shop-block { margin-top: 12px; }
.shop-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.shop-block details {
  margin-top: 8px;
}
.shop-block summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.editor-card {
  margin-bottom: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 70%, var(--card));
}
.inventory-actions { margin-bottom: 8px; }

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}
.table-toolbar label {
  margin: 0;
  min-width: 160px;
  flex: 1;
}
.table-toolbar .hint {
  margin: 0;
  flex: 1 1 220px;
}
.table-batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 13px;
}
.table-batch .batch-check {
  margin: 0;
}
.col-check {
  width: 36px;
}
.col-check input {
  width: auto;
  margin: 0;
}
.table-toolbar[hidden] {
  display: none !important;
}
.table-toolbar-more {
  margin-top: -4px;
}
.btn-icon {
  min-width: 36px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 18px;
  line-height: 1;
}
.btn-icon.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.th-sort {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}
.th-sort:hover {
  color: var(--accent);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th,
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background: color-mix(in srgb, var(--bg) 40%, var(--card));
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table input,
.data-table select {
  margin-top: 0;
  min-width: 88px;
}
.cell-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}
.cell-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.table-empty {
  color: var(--muted);
  text-align: center !important;
  padding: 18px 10px !important;
}
.row-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: color-mix(in srgb, var(--line) 70%, var(--card));
  color: var(--text);
}
.badge-unused { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent); }
.badge-redeemed { background: color-mix(in srgb, #1f8a4c 18%, var(--card)); color: #1f8a4c; }
.badge-revoked { background: color-mix(in srgb, var(--danger) 16%, var(--card)); color: var(--danger); }
html[data-theme="dark"] .badge-redeemed { color: #7dcea0; }

.mobile-nav-toggle {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: fixed;
    inset: 57px auto 0 0;
    height: auto;
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  body.nav-open .admin-sidebar {
    transform: translateX(0);
  }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 20;
  }
  .mobile-nav-toggle { display: inline-flex; }
  .admin-topbar, .admin-content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-nav a:not(.nav-cta) { display: none; }
}


/* —— 配置管理：一比一可视化编辑 —— */
.config-page-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.save-toast {
  position: fixed;
  left: 50%;
  top: 72px;
  z-index: 80;
  transform: translateX(-50%);
  min-width: 160px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  text-align: center;
  font-size: 14px;
}
.save-toast.is-ok { color: #1a7a42; }
.save-toast.is-error { color: var(--danger); }
html[data-theme="dark"] .save-toast.is-ok { color: #8ee0ae; }
.page-switch {
  display: flex;
  gap: 1.4rem;
  margin: 0;
  border-bottom: none;
  flex: 1;
  min-width: 0;
}
.page-switch button {
  border: none;
  background: none;
  padding: 8px 0 10px;
  margin-bottom: -1px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.page-switch button.active {
  color: var(--text);
  font-weight: 650;
  border-bottom-color: var(--accent);
}
.config-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.config-toolbar .btn { margin-bottom: 8px; flex: none; }
.config-canvas { width: 100%; }
.wy-editable {
  cursor: text;
  border-radius: 4px;
  outline: 1px dashed transparent;
}
.wy-editable:hover { outline-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wy-editable[contenteditable="true"] {
  outline: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  padding: 0 2px;
}
.wy-mini {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
}
.wy-mini:hover { color: var(--danger); }
.wy-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.wy-sec-head h3 { margin: 0; font-size: 14px; }

.wy-vip-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.wy-vip-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, #c9a227 18%, var(--card)), var(--card));
}
.wy-vip-brand { display: flex; align-items: center; gap: 12px; }
.wy-vip-brand h2 { margin: 0; font-size: 18px; }
.wy-vip-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: #c9a227; color: #fff; font-weight: 800; font-size: 12px;
}
.wy-vip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 1fr);
  min-height: 480px;
}
.wy-vip-main { padding: 16px 18px 20px; }
.wy-vip-side {
  border-left: 1px solid var(--line);
  padding: 20px 18px 22px;
  background: color-mix(in srgb, var(--bg) 45%, var(--card));
}
.wy-vip-step {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; font-weight: 650; font-size: 14px;
}
.wy-step-n {
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 12px;
}
.wy-vip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wy-vip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 110px;
  padding: 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.wy-vip-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}
.wy-vip-tag {
  position: absolute; top: 0; right: 0;
  padding: 2px 8px;
  border-radius: 0 11px 0 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-size: 11px; font-weight: 700;
}
.wy-vip-tag.is-empty { opacity: 0.45; font-weight: 500; }
.wy-vip-name { font-size: 14px; font-weight: 650; }
.wy-vip-price { font-size: 22px; font-weight: 750; color: var(--accent); line-height: 1.1; }
.wy-vip-price em { font-style: normal; font-size: 12px; margin-right: 2px; }
.wy-vip-origin { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.wy-vip-link { font-size: 11px; color: var(--accent); word-break: break-all; }
.wy-vip-buy { width: 100%; justify-content: center; margin-top: 4px; }
.wy-buy-url { margin-top: 8px; text-align: center; }
.wy-vip-side-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wy-vip-side-head h3 { margin: 0; font-size: 17px; }
.wy-vip-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}
.wy-vip-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.wy-vip-row span { min-width: 0; word-break: break-word; }
.wy-vip-row:last-child { border-bottom: none; }
.wy-vip-row.is-head { color: var(--muted); background: color-mix(in srgb, var(--bg) 50%, var(--card)); font-size: 12px; }
.wy-vip-row .is-vip { color: var(--accent); font-weight: 650; }

.wy-about-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  width: 100%;
}
.wy-about-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
}
.wy-about-brand {
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  display: flex;
  flex-direction: column;
}
.wy-about-stage {
  height: 180px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    radial-gradient(circle at 70% 60%, color-mix(in srgb, #1f8a4c 18%, transparent), transparent 50%);
}
.wy-about-stage img {
  width: 72px; height: 72px; border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.wy-about-meta { padding: 0 18px 18px; }
.wy-about-meta h2 { margin: 0 0 6px; font-size: 22px; }
.wy-about-tagline { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wy-about-body {
  padding: 16px 18px 20px;
}
.wy-about-body section { margin-bottom: 16px; }
.wy-about-body h3 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
.wy-about-body p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.wy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wy-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 12px;
}
.wy-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wy-features li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; background: color-mix(in srgb, var(--bg) 35%, var(--card));
}
.wy-features li span:first-child {
  position: relative; padding-left: 14px;
}
.wy-features li span:first-child::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.wy-contacts { display: grid; gap: 6px; }
.wy-contact {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.wy-about-foot {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex; justify-content: center;
}

.site-download {
  width: 100%;
  max-width: none;
  padding: 0;
  color: #14201f;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.site-download-head { margin-bottom: 1rem; }
.site-download-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #14201f;
}
.site-download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.site-dl-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 32, 31, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #14201f;
}
.site-dl-card.is-primary {
  background: #0b6e63;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(11, 110, 99, 0.22);
}
.site-dl-name { display: block; font-weight: 700; }
.site-dl-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: #5f736f;
  min-height: 1.1em;
}
.site-dl-card.is-primary .site-dl-note { color: rgba(255, 255, 255, 0.82); }
.site-dl-note:empty::before { content: "双击添加说明"; opacity: 0.55; }
.site-dl-action { flex: none; font-weight: 700; }
.site-dl-url {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.35;
  word-break: break-all;
  color: #3a4a48;
}
.site-dl-card.is-primary .site-dl-url { color: rgba(255, 255, 255, 0.92); }
/* Editing on primary (teal) card: keep dark text on a light chip so typed chars stay readable */
.site-dl-card .wy-editable[contenteditable="true"] {
  color: #14201f;
  background: #fff;
  caret-color: #14201f;
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0 8px;
}
.filter-toggle svg {
  display: block;
  transition: transform 0.15s ease;
}
.filter-toggle.is-open svg,
.filter-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.site-dl-tools {
  position: absolute;
  right: 8px;
  top: -10px;
  display: none;
  gap: 4px;
}
.site-dl-card:hover .site-dl-tools { display: flex; }
.site-dl-tools button {
  border: 1px solid rgba(20, 32, 31, 0.16);
  background: #fff;
  color: #14201f;
  border-radius: 999px;
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}
.site-dl-tools button:disabled { opacity: 0.4; cursor: default; }
.site-download-help {
  margin: 1rem 0 0;
  color: #5f736f;
  font-size: 0.9rem;
}
.site-download-add {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

@media (max-width: 980px) {
  .wy-vip-layout, .wy-about-layout { grid-template-columns: 1fr; }
  .wy-vip-side, .wy-about-brand { border-left: none; border-top: 1px solid var(--line); }
  .wy-vip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-download-list { grid-template-columns: 1fr; }
}
