:root {
  --bg: #060816;
  --bg-soft: rgba(12, 17, 38, .78);
  --panel: rgba(255, 255, 255, .078);
  --panel-strong: rgba(255, 255, 255, .12);
  --text: #f7f8ff;
  --muted: rgba(247, 248, 255, .68);
  --subtle: rgba(247, 248, 255, .45);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .2);
  --primary: #8b5cf6;
  --primary-2: #06b6d4;
  --primary-3: #22c55e;
  --danger: #fb7185;
  --warning: #f59e0b;
  --ok: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, .45);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1180px;
  --blur: blur(24px) saturate(1.15);
  color-scheme: dark;
}

[data-theme="emerald"] {
  --primary: #10b981;
  --primary-2: #14b8a6;
  --primary-3: #84cc16;
}

[data-theme="sakura"] {
  --primary: #ec4899;
  --primary-2: #a855f7;
  --primary-3: #f97316;
}

[data-theme="gold"] {
  --primary: #f59e0b;
  --primary-2: #fb7185;
  --primary-3: #facc15;
}

[data-theme="ice"] {
  --bg: #eaf5ff;
  --bg-soft: rgba(255, 255, 255, .74);
  --panel: rgba(255, 255, 255, .68);
  --panel-strong: rgba(255, 255, 255, .88);
  --text: #061127;
  --muted: rgba(6, 17, 39, .7);
  --subtle: rgba(6, 17, 39, .5);
  --line: rgba(5, 22, 55, .12);
  --line-strong: rgba(5, 22, 55, .22);
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --primary-3: #14b8a6;
  --shadow: 0 24px 80px rgba(50, 90, 150, .22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -4;
  filter: blur(28px);
}

body::before {
  width: 640px;
  height: 640px;
  right: -210px;
  top: -180px;
  background:
    radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--primary) 68%, transparent), transparent 62%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--primary-2) 65%, transparent), transparent 58%);
  opacity: .9;
}

body::after {
  width: 760px;
  height: 760px;
  left: -260px;
  bottom: -320px;
  background:
    radial-gradient(circle at 52% 44%, color-mix(in srgb, var(--primary-3) 46%, transparent), transparent 60%),
    radial-gradient(circle at 18% 30%, color-mix(in srgb, var(--primary) 38%, transparent), transparent 62%);
  opacity: .78;
}

button,
input,
textarea,
select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

#app { min-height: 100vh; }
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 12px;
  align-content: center;
}
.boot-orb {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--primary-2), var(--primary-3), var(--primary));
  box-shadow: 0 0 80px color-mix(in srgb, var(--primary) 55%, transparent);
  animation: spin 1.2s linear infinite;
}
.boot-title { font-size: 18px; font-weight: 800; }
.boot-subtitle { color: var(--muted); }

.shell { min-height: 100vh; position: relative; isolation: isolate; }
.bg-image {
  position: fixed;
  inset: 0;
  z-index: -5;
  opacity: .18;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08) contrast(1.04);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  opacity: .28;
  pointer-events: none;
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px clamp(14px, 3vw, 32px) 0;
}
.header {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--bg-soft) 86%, transparent);
  backdrop-filter: var(--blur);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.78), transparent 25%),
    conic-gradient(from 120deg, var(--primary), var(--primary-2), var(--primary-3), var(--primary));
  box-shadow: 0 14px 40px color-mix(in srgb, var(--primary) 36%, transparent);
  overflow: hidden;
  flex: 0 0 auto;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark { font-weight: 950; font-size: 20px; letter-spacing: -.07em; color: white; }
.brand-text { min-width: 0; }
.brand-title {
  font-weight: 900;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}
.brand-subtitle { font-size: 12px; color: var(--subtle); white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; max-width: 260px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}
.nav a,
.nav button {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 10px 13px;
  border-radius: 13px;
  font-weight: 750;
  font-size: 14px;
  transition: .18s ease;
}
.nav a:hover,
.nav button:hover,
.nav a.active {
  color: var(--text);
  background: var(--panel-strong);
}
.header-actions { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.mobile-toggle { display: none; }

.btn {
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  font-weight: 850;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: none;
}
.btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.11);
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line-strong));
}
.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--primary) 32%, transparent);
}
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(251, 113, 133, .14); border-color: rgba(251, 113, 133, .3); color: #fecdd3; }
.btn.block { width: 100%; }
.btn.small { min-height: 34px; border-radius: 12px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px clamp(14px, 3vw, 32px) 60px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 58px);
  min-height: calc(100vh - 132px);
  padding: 34px 0 50px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  backdrop-filter: var(--blur);
}
.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 24px var(--ok);
}
.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: .96;
  letter-spacing: -.07em;
  max-width: 850px;
}
.gradient-text {
  background: linear-gradient(110deg, var(--text) 10%, color-mix(in srgb, var(--primary) 80%, white), color-mix(in srgb, var(--primary-2) 78%, white));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.78;
  overflow-wrap: anywhere;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  backdrop-filter: var(--blur);
}
.metric-value { font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.metric-label { color: var(--subtle); font-size: 12px; margin-top: 4px; }

.visual {
  position: relative;
  min-height: 540px;
}
.visual-card {
  position: absolute;
  inset: 48px 18px auto auto;
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.065));
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 5%, color-mix(in srgb, var(--primary) 32%, transparent), transparent 34%);
  pointer-events: none;
}
.visual-head { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }
.dots { display: inline-flex; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.dot:nth-child(1) { background: #fb7185; }
.dot:nth-child(2) { background: #fbbf24; }
.dot:nth-child(3) { background: #34d399; }
.live-pill { font-size: 12px; color: var(--muted); font-weight: 800; }
.visual-body { padding: 22px; }
.ring {
  width: 190px;
  height: 190px;
  margin: 4px auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) 0 var(--usage-percent, 0%), rgba(255,255,255,.14) var(--usage-percent, 0%) 100%);
  position: relative;
  box-shadow: inset 0 0 28px rgba(255,255,255,.08), 0 0 60px color-mix(in srgb, var(--primary) 20%, transparent);
}
.ring::after { content: ""; position: absolute; inset: 16px; border-radius: inherit; background: color-mix(in srgb, var(--bg) 84%, transparent); border: 1px solid var(--line); }
.ring-inner { position: relative; z-index: 1; text-align: center; }
.ring-num { font-size: 44px; font-weight: 950; letter-spacing: -.06em; }
.ring-label { font-size: 12px; color: var(--subtle); font-weight: 800; }
.visual-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tiny-card { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.06); }
.tiny-label { color: var(--subtle); font-size: 12px; }
.tiny-value { margin-top: 6px; font-size: 19px; font-weight: 950; }
.section { padding: 26px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title { margin: 0; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.055em; }
.section-desc { margin: 8px 0 0; color: var(--muted); max-width: 620px; line-height: 1.7; }

.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.105), rgba(255,255,255,.058));
  backdrop-filter: var(--blur);
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
  overflow: hidden;
}
.card.padded { padding: 20px; }
.card.glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 38%);
  pointer-events: none;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--primary-2) 18%, transparent));
  border: 1px solid var(--line);
  font-size: 22px;
}
.card h3 { margin: 15px 0 8px; font-size: 19px; letter-spacing: -.025em; }
.card p { color: var(--muted); line-height: 1.7; margin: 0; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { padding: 22px; display: flex; flex-direction: column; min-height: 328px; }
.plan-card.highlight { border-color: color-mix(in srgb, var(--primary) 62%, var(--line)); box-shadow: 0 24px 80px color-mix(in srgb, var(--primary) 16%, transparent); }
.plan-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.plan-name { font-size: 22px; font-weight: 950; letter-spacing: -.04em; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 850; color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.price { margin: 18px 0 10px; display: flex; align-items: baseline; gap: 5px; }
.price strong { font-size: 40px; letter-spacing: -.055em; }
.price span { color: var(--subtle); font-weight: 800; }
.plan-content { margin: 10px 0 18px; color: var(--muted); line-height: 1.72; flex: 1; }
.plan-meta { display: grid; gap: 8px; margin: 0 0 18px; }
.meta-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.meta-line strong { color: var(--text); }
.periods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.period-pill { border: 1px solid var(--line); background: rgba(255,255,255,.055); color: var(--muted); border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; }
.period-pill.active { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 20px; }
.page-title { margin: 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.06em; }
.page-subtitle { color: var(--muted); margin: 8px 0 0; line-height: 1.7; }
.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.05); }
.stat-label { color: var(--subtle); font-size: 12px; font-weight: 800; }
.stat-value { margin-top: 8px; font-size: 24px; font-weight: 950; letter-spacing: -.04em; overflow-wrap: anywhere; }
.progress { width: 100%; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.09); border: 1px solid var(--line); }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--primary-3)); transition: width .35s ease; }
.subscribe-box { display: grid; gap: 12px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  min-height: 48px;
  border-radius: 15px;
  padding: 0 14px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.textarea { min-height: 92px; padding: 13px 14px; resize: vertical; }
.input:focus,
.textarea:focus,
.select:focus { border-color: color-mix(in srgb, var(--primary) 62%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.input::placeholder,
.textarea::placeholder { color: var(--subtle); }
.form { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.form-note { color: var(--subtle); font-size: 13px; line-height: 1.7; }
.auth-wrap { max-width: 980px; margin: 24px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.auth-art { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; min-height: 530px; }
.auth-art h2 { font-size: clamp(34px, 6vw, 58px); line-height: 1.02; letter-spacing: -.07em; margin: 18px 0; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs a { flex: 1; text-align: center; padding: 12px; border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); font-weight: 850; }
.auth-tabs a.active { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; }

.list { display: grid; gap: 12px; }
.item { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.052); }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.item-title { font-weight: 900; overflow-wrap: anywhere; }
.item-desc { color: var(--muted); line-height: 1.65; }
.rich-content { color: var(--muted); line-height: 1.82; overflow-wrap: anywhere; word-break: break-word; }
.rich-content p { margin: 0 0 10px; }
.knowledge-section { padding-top: 6px; }
.knowledge-item .item-title { font-size: 17px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { padding: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; background: rgba(255,255,255,.035); }

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: rgba(255,255,255,.045); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--subtle); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.035); }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 850; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 18px currentColor; }
.status.ok::before { background: var(--ok); }
.status.bad::before { background: var(--danger); }

.tutorial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.client-card { padding: 18px; display: grid; gap: 12px; }
.client-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: rgba(255,255,255,.075); border: 1px solid var(--line); }
.client-card h3 { margin: 0; }

.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast { padding: 14px 15px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-soft) 94%, transparent); backdrop-filter: var(--blur); box-shadow: var(--shadow); color: var(--text); animation: toast-in .18s ease both; }
.toast.success { border-color: rgba(52,211,153,.35); }
.toast.error { border-color: rgba(251,113,133,.42); }
.footer { max-width: var(--max); margin: 0 auto; padding: 24px clamp(14px,3vw,32px) 44px; color: var(--subtle); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.custom-html { display: contents; }

.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.065); border-radius: 12px; min-height: 18px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent); animation: shimmer 1.2s infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 980px) {
  .header { align-items: flex-start; flex-wrap: wrap; }
  .mobile-toggle { display: none !important; }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    display: flex;
  }
  .nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .visual { min-height: 480px; }
  .visual-card { left: 50%; right: auto; transform: translateX(-50%); }
  .grid.cols-3,
  .plan-grid,
  .dashboard-grid,
  .auth-wrap,
  .tutorial-grid { grid-template-columns: 1fr; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-wrap { padding-top: 10px; }
  .header { border-radius: 20px; min-height: 64px; }
  .brand-logo { width: 40px; height: 40px; border-radius: 14px; }
  .brand-title { max-width: 150px; }
  .brand-subtitle { max-width: 180px; -webkit-line-clamp: 2; font-size: 11px; }
  .header-actions .btn { display: inline-flex; }
  .main { padding-top: 18px; padding-bottom: 40px; }
  .hero { padding-top: 18px; gap: 18px; }
  .hero h1 { font-size: clamp(40px, 12vw, 56px); }
  .lead { font-size: 15px; line-height: 1.75; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-metrics, .stats { grid-template-columns: 1fr; }
  .visual { min-height: 360px; }
  .visual-card { width: 100%; top: 12px; }
  .section-head, .page-head { align-items: flex-start; flex-direction: column; }
  .copy-row, .form-row { grid-template-columns: 1fr; }
  .auth-art { min-height: 320px; }
  .toast-host { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .item-actions .btn { flex: 1 1 auto; }
  .plan-card { padding: 18px; min-height: auto; }
  .price strong { font-size: 34px; }
}

.node-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.node-card { min-height: 160px; }
.node-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 10px; }
.node-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { padding: 6px 9px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 14%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line)); color: var(--muted); font-size: 12px; font-weight: 800; }

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

@media (max-width: 640px) {
  .node-grid { grid-template-columns: 1fr; }
  table { min-width: 680px; }
  th, td { padding: 12px 13px; }
  .card.padded { padding: 17px; }
  .nav a { flex: 0 0 auto; }
}

/* v2.3 修复：支付方式、工单详情、知识库折叠、移动端体验 */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.payment-card {
  display: grid;
  gap: 16px;
  min-height: 168px;
}
.payment-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  padding: 7px;
  border: 1px solid var(--line);
}
.knowledge-toggle {
  color: inherit;
  text-decoration: none;
}
.knowledge-item.open {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: rgba(255,255,255,.075);
}
.ticket-thread { display: grid; gap: 16px; }
.ticket-messages { display: grid; gap: 12px; }
.ticket-bubble {
  max-width: min(760px, 92%);
  padding: 14px;
  border-radius: 18px 18px 18px 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
}
.ticket-bubble.mine {
  justify-self: end;
  border-radius: 18px 18px 6px 18px;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}
.ticket-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--subtle);
  font-size: 12px;
  margin-bottom: 7px;
}
.ticket-meta strong { color: var(--text); }
.ticket-reply { margin-top: 8px; }
.brand-subtitle br,
.lead br { display: block; }
.lead { white-space: normal; }

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

@media (max-width: 640px) {
  .header-wrap { padding-left: 10px; padding-right: 10px; }
  .header { gap: 10px; padding: 10px; }
  .brand { max-width: calc(100% - 88px); }
  .brand-title { max-width: 180px; }
  .brand-subtitle {
    max-width: 190px;
    -webkit-line-clamp: 3;
    line-height: 1.45;
  }
  .main { padding-left: 12px; padding-right: 12px; }
  .hero { min-height: auto; }
  .lead {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.85;
  }
  .hero-metrics { display: none; }
  .visual { display: none; }
  .payment-grid { grid-template-columns: 1fr; }
  .ticket-bubble { max-width: 100%; }
  .item-head { align-items: flex-start; }
  .item-actions { display: grid; grid-template-columns: 1fr; }
  .btn, .input, .textarea, .select { min-height: 46px; }
  .page-title { font-size: 30px; }
  .section-title { font-size: 27px; }
  .plan-grid, .grid.cols-3, .grid.cols-2, .dashboard-grid, .tutorial-grid, .stats { grid-template-columns: 1fr !important; }
  .table-wrap { margin-left: -4px; margin-right: -4px; }
}

.hero-single { grid-template-columns: minmax(0, 1fr); }
.hero-single > div:first-child { max-width: 980px; }
@media (max-width: 640px) {
  .header-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .nav { gap: 6px; padding-bottom: 4px; }
  .nav a { flex: 0 0 auto; padding: 9px 11px; font-size: 12px; }
  .brand { min-width: 0; }
}


/* v2.5 套餐卡片压缩优化：更像商品卡，说明默认折叠，避免套餐框过长 */
.plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.plan-card {
  min-height: 0;
  padding: 18px;
  gap: 12px;
}
.plan-top { align-items: center; }
.plan-name { font-size: 20px; line-height: 1.25; }
.price { margin: 6px 0 2px; }
.price strong { font-size: 34px; }
.plan-meta.compact {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.plan-meta.compact .meta-line {
  display: grid;
  gap: 4px;
  justify-content: stretch;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.plan-meta.compact .meta-line span { font-size: 12px; }
.plan-meta.compact .meta-line strong { font-size: 14px; overflow-wrap: anywhere; }
.periods.compact {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 0;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.periods.compact .period-pill { white-space: nowrap; flex: 0 0 auto; }
.plan-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
}
.plan-details summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 13px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}
.plan-details summary::-webkit-details-marker { display: none; }
.plan-details summary::after { content: '展开'; float: right; color: var(--subtle); font-weight: 750; }
.plan-details[open] summary::after { content: '收起'; }
.plan-details .plan-content {
  margin: 0;
  padding: 0 13px 13px;
  max-height: 190px;
  overflow: auto;
  flex: initial;
  font-size: 14px;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions .btn { flex: 1 1 160px; }

@media (max-width: 640px) {
  .plan-grid { grid-template-columns: 1fr !important; }
  .plan-card { padding: 16px; gap: 10px; }
  .plan-meta.compact { grid-template-columns: 1fr 1fr !important; }
  .price strong { font-size: 30px; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
}


/* v2.6 细节修复：工单下拉深色、公告单条展开、统一字号和间距 */
select.input,
select.select,
.input[type="select"] {
  background-color: rgba(15, 20, 43, .96);
  color: var(--text);
  border-color: var(--line-strong);
  appearance: auto;
}
select.input option,
select.select option {
  background: #11162d;
  color: #f7f8ff;
}
[data-theme="ice"] select.input,
[data-theme="ice"] select.select {
  background-color: rgba(255,255,255,.96);
  color: #061127;
}
[data-theme="ice"] select.input option,
[data-theme="ice"] select.select option {
  background: #ffffff;
  color: #061127;
}

body { font-size: 14px; line-height: 1.55; }
.header { min-height: 66px; border-radius: 21px; }
.brand-logo { width: 42px; height: 42px; border-radius: 14px; }
.brand-title { font-size: 15px; }
.brand-subtitle { font-size: 11px; line-height: 1.42; max-width: 300px; }
.nav a, .nav button { font-size: 13px; padding: 9px 11px; }
.btn { min-height: 39px; border-radius: 13px; padding: 0 14px; font-size: 13px; }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 12px; }
.main { padding-top: 26px; }
.hero { min-height: auto; padding: 24px 0 38px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 58px); line-height: 1.02; letter-spacing: -.055em; }
.lead { font-size: clamp(14px, 1.7vw, 16px); line-height: 1.82; max-width: 760px; }
.kicker { font-size: 12px; padding: 8px 12px; }
.metric { padding: 14px; }
.metric-value { font-size: 20px; }
.visual { min-height: 460px; }
.visual-card { border-radius: 28px; }
.section { margin-top: 38px; }
.section-title { font-size: clamp(21px, 3vw, 30px); letter-spacing: -.04em; }
.section-desc, .page-subtitle { font-size: 13px; line-height: 1.72; }
.page-head { margin: 8px 0 16px; }
.page-title { font-size: clamp(24px, 3.8vw, 36px); letter-spacing: -.045em; }
.card.padded { padding: 20px; }
.card h3 { font-size: 17px; margin: 12px 0 8px; }
.item { padding: 14px; border-radius: 16px; }
.item-title { font-size: 15px; }
.item-desc, .rich-content, .plan-content { font-size: 13.5px; line-height: 1.75; }
.stat { padding: 14px; }
.stat-value { font-size: 20px; }
.input, .textarea, .select { min-height: 43px; border-radius: 13px; font-size: 13px; }
.textarea { min-height: 92px; }
th, td { padding: 12px 14px; font-size: 13px; }
.price strong { font-size: 30px; }
.plan-name { font-size: 18px; }
.badge { min-height: 24px; font-size: 11px; }
.plan-card { padding: 16px; gap: 10px; }
.plan-meta.compact .meta-line { padding: 9px 10px; }
.plan-details summary { padding: 10px 12px; }
.plan-details .plan-content { font-size: 13px; max-height: 160px; }
.client-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 15px; }
.payment-card { min-height: 142px; gap: 12px; }
.ticket-bubble { padding: 12px; border-radius: 16px 16px 16px 6px; }
.notice-toggle { color: inherit; text-decoration: none; }
.notice-item.open { border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); background: rgba(255,255,255,.072); }
.notice-item .rich-content { margin-top: 6px; }

@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .header { min-height: auto; border-radius: 18px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-title { max-width: 160px; font-size: 14px; }
  .brand-subtitle { max-width: 210px; font-size: 10.5px; line-height: 1.45; }
  .nav a { font-size: 12px; padding: 8px 10px; }
  .main { padding-top: 16px; }
  .hero h1 { font-size: clamp(31px, 10vw, 44px); }
  .lead { font-size: 14px; line-height: 1.78; }
  .page-title { font-size: 25px; }
  .section-title { font-size: 22px; }
  .card.padded { padding: 16px; }
  .item { padding: 13px; }
  .stats { grid-template-columns: 1fr !important; }
  .plan-meta.compact { grid-template-columns: 1fr 1fr !important; }
  .price strong { font-size: 28px; }
  .input, .textarea, .select { min-height: 44px; font-size: 13px; }
}


/* v2.7：内容 --- 分隔符转成真正段落留白，公告/套餐/知识库/教程阅读间距优化 */
.rich-content,
.plan-content,
.item-desc.rich-content {
  line-height: 1.86;
  letter-spacing: .01em;
}
.rich-content .content-break,
.plan-content .content-break {
  display: block;
  height: 16px;
  min-height: 16px;
  clear: both;
}
.rich-content br,
.plan-content br {
  line-height: 1.95;
}
.notice-item .rich-content,
.knowledge-item .rich-content,
.plan-content {
  margin-top: 12px;
}
.notice-item .rich-content,
.knowledge-item .rich-content {
  padding: 2px 2px 0;
}
.plan-details[open] .plan-content {
  padding-top: 10px;
}
.rich-content p,
.plan-content p,
.rich-content div,
.plan-content div {
  margin-top: 0;
  margin-bottom: 12px;
}
.rich-content p:last-child,
.plan-content p:last-child,
.rich-content div:last-child,
.plan-content div:last-child {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .rich-content,
  .plan-content,
  .item-desc.rich-content {
    line-height: 1.82;
  }
  .rich-content .content-break,
  .plan-content .content-break {
    height: 14px;
    min-height: 14px;
  }
}

/* v2.8：套餐说明恢复紧凑分隔，节点状态不再误导为实时可用 */
.plan-details .plan-content {
  line-height: 1.62;
  margin-top: 8px;
  padding-top: 6px;
  color: color-mix(in srgb, var(--muted) 88%, #fff);
}
.plan-details .plan-content .content-break {
  display: inline;
  height: auto;
  min-height: 0;
}
.node-card .status.warn::before { background: var(--warning); }
.node-card .node-meta span:last-child {
  color: color-mix(in srgb, var(--muted) 86%, #fff);
}


/* v2.9：工单列表分页，避免历史工单过多时页面过长 */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ticket-list {
  min-height: 120px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pager-info {
  color: var(--muted);
  font-size: 12px;
}
.pager-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pager-actions .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.pager-dot {
  color: var(--muted);
  padding: 0 4px;
}
@media (max-width: 640px) {
  .list-head { align-items: flex-start; flex-direction: column; }
  .pager { align-items: flex-start; flex-direction: column; }
  .pager-actions { width: 100%; }
  .pager-actions .btn { flex: 1 1 auto; min-width: 64px; }
}

/* v3.1 captcha support */
.captcha-box {
  min-height: 76px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.captcha-box.compact {
  min-height: 42px;
  justify-content: flex-start;
  color: var(--subtle);
  font-size: 12px;
  padding: 10px 12px;
}
.captcha-box.warn,
.captcha-error {
  color: #ffd1a3;
  background: rgba(255,176,95,.10);
  border: 1px solid rgba(255,176,95,.20);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  text-align: center;
  font-size: 12px;
}
.captcha-widget { max-width: 100%; overflow: hidden; }
@media (max-width: 520px) {
  .captcha-box { padding: 8px; min-height: 72px; }
  .captcha-box iframe { max-width: 100%; }
}


/* v3.2：登录/注册验证码分开控制；套餐 --- 只换行不留大空白 */
.plan-details .plan-content {
  line-height: 1.68;
  white-space: normal;
}
.plan-details .plan-content br {
  display: block;
  content: "";
  margin: 2px 0;
}
.plan-details .plan-content .content-break {
  display: none !important;
}
.captcha-box:empty { display: none; }


/* v3.7 一次性套餐提示 */
.period-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.period-note {
  font-size: 11px;
  font-weight: 700;
  opacity: .9;
  line-height: 1.2;
}
@media (max-width: 640px) {
  .period-note { font-size: 10px; }
}


/* v5.1 captcha mobile fallback */
.captcha-failed { min-height: auto; }
.captcha-error { line-height: 1.65; }
@media (max-width: 420px) {
  .captcha-box { transform-origin: left top; }
  .captcha-widget { max-width: 100%; }
}


/* v5.1 优惠码输入 */
.coupon-box {
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
  border-radius: 16px;
}
.coupon-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.coupon-input { min-height: 38px; }
.coupon-note {
  min-height: 18px;
  margin-top: 6px;
  line-height: 1.5;
}
@media (max-width: 520px) {
  .coupon-input-row { grid-template-columns: 1fr; }
  .coupon-input-row .btn { width: 100%; justify-content: center; }
}


/* v5.2 先选支付方式再购买 */
.purchase-box {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.payment-inline {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
  border-radius: 16px;
}
.payment-inline label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(245,248,255,.82);
}
.payment-select {
  min-height: 38px;
  cursor: pointer;
}
.plan-card .btn[disabled] {
  opacity: .62;
  cursor: not-allowed;
}
@media (max-width: 520px) {
  .purchase-box { gap: 9px; }
  .payment-inline, .coupon-box { padding: 9px; }
}
