/* ==========================================================================
   LineRole · 统一视觉
   浅色、大留白、低饱和。三端共用同一套 token，避免官网/用户端/管理端气质割裂。
   ========================================================================== */

:root {
  --bg: #fbf7f4;
  --bg-alt: #f4eee9;
  --panel: #ffffff;
  --ink: #322b45;
  --ink-2: #4f4766;
  --muted: #8a8199;
  --line: #ece5ef;
  --line-2: #ddd3e4;

  --accent: #7c6bf0;
  --accent-hover: #6a58e8;
  --accent-soft: #f1eefe;
  --accent-ink: #5b48c9;

  --danger: #c2410c;
  --danger-soft: #fef2ee;
  --warn: #b45309;
  --warn-soft: #fef7e8;
  --ok: #22a35e;
  --price: #ff4d2e;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(50, 43, 69, .04), 0 8px 24px -12px rgba(124, 107, 240, .12);
  --shadow-lg: 0 24px 60px -24px rgba(80, 62, 140, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------- 基础组件 -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-alt); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-alt); }

.btn-danger { color: var(--danger); border-color: #f0d5cb; background: var(--danger-soft); }
.btn-danger:hover { background: #fbe6dd; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.price { color: var(--price); font-weight: 600; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrapflex { display: flex; flex-wrap: wrap; gap: 10px; }
.spacer { flex: 1; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }

/* --------------------------------- 表单 --------------------------------- */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* --------------------------------- 提示 --------------------------------- */

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-err { background: var(--danger-soft); color: var(--danger); border-color: #f0d5cb; }
.alert-ok { background: var(--accent-soft); color: var(--accent-ink); border-color: #ddd4fb; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: #f2e2c4; }
.alert-info { background: var(--bg-alt); color: var(--ink-2); border-color: var(--line); }

/* --------------------------------- 表格 --------------------------------- */

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
th {
  background: #fbf9fc;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .02em;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbf9fd; }
td.nowrap, th.nowrap { white-space: nowrap; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* --------------------------------- 状态点 -------------------------------- */

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}
.dot.ok { background: var(--accent); }
.dot.warn { background: #d97706; }
.dot.err { background: var(--danger); }

/* --------------------------------- 弹窗 --------------------------------- */

.modal-mask {
  position: fixed; inset: 0;
  background: rgba(28, 25, 23, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 100;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
}

/* --------------------------------- 进度条 -------------------------------- */

.bar {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .3s;
}

/* ==========================================================================
   官网
   ========================================================================== */

.site-nav {
  position: sticky; top: 0;
  z-index: 50;
  background: rgba(251, 247, 244, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-nav .inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 17px; color: var(--ink);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 700;
}
/* 品牌图标（气泡 logo），三端统一。横长图形用 contain 防裁边 */
.brand-logo {
  display: block;
  width: 26px; height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
}
/* 品牌名后的小标签：Role ·在线（绿点呼吸闪烁） */
.brand-online {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: #15803d;
  background: #e8f7ee;
  border: 1px solid #bfe8cf;
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
  letter-spacing: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}
.brand-online::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  animation: online-pulse 1.6s ease-in-out infinite;
}
@keyframes online-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  50%      { opacity: .45; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0); }
}
/* 暗色官网上的在线徽章 */
.site-dark .brand-online {
  color: #4ade80;
  background: rgba(34, 197, 94, .12);
  border-color: rgba(74, 222, 128, .32);
}
@media (prefers-reduced-motion: reduce) {
  .brand-online::before { animation: none; }
}
.brand-sub {
  font-size: 12px; font-weight: 500; color: var(--muted);
  letter-spacing: 0;
}
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.hero { padding: 84px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.22;
  letter-spacing: -.025em;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero-sub {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); }

/* 手机对话演示 */
.phone {
  width: 300px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.phone-head {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
  background: #fbf9fc;
}
.phone-head .av {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 15px;
}
.phone-head .nm { font-size: 13.5px; font-weight: 600; }
.phone-body {
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 330px;
  background: #fbf9fc;
}
.bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.them {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.bubble.typing { color: var(--muted); font-size: 18px; letter-spacing: 3px; }

/* 痛点 */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; margin-bottom: 12px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 15.5px; max-width: 560px; margin: 0 auto; }

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pain {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.pain .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 7px;
  margin-bottom: 14px;
}
.pain h3 { font-size: 16px; margin-bottom: 8px; }
.pain p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* 角色卡（官网） */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.persona {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  display: flex;
  flex-direction: column;
}
.persona:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.persona-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.persona-av {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 23px;
  flex-shrink: 0;
}
.persona-name { font-size: 16px; font-weight: 600; }
.persona-tagline { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.persona-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.persona-why {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: auto;
}
.persona-why h4 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 9px;
  letter-spacing: .02em;
}
.persona-why ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 7px;
}
.persona-why li {
  font-size: 13.5px;
  color: var(--ink-2);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.persona-why li::before {
  content: "";
  position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}

/* 定价 */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.price-card.hot {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.price-card .badge {
  position: absolute; top: -10px; left: 24px;
  background: var(--accent); color: #fff;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.price-card h3 { font-size: 17px; margin-bottom: 6px; }
.price-card .amt {
  font-size: 32px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 10px 0 4px;
}
.price-card .amt small { font-size: 14px; font-weight: 400; color: var(--muted); }
.price-card .meta { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.price-card ul {
  margin: 0 0 22px; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 9px;
}
.price-card li { font-size: 13.5px; color: var(--ink-2); padding-left: 20px; position: relative; }
.price-card li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--accent); font-size: 12px; font-weight: 700;
}

/* 三步 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { text-align: center; padding: 0 12px; }
.step-n {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 14px;
  font-size: 15px; font-weight: 600;
}
.step h3 { font-size: 15.5px; margin-bottom: 7px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.cta-band {
  margin: 0 0 72px;
  background: var(--accent);
  border-radius: 22px;
  padding: 52px 40px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { font-size: 28px; margin-bottom: 12px; }
.cta-band p { opacity: .82; margin-bottom: 26px; font-size: 15px; }
.cta-band .btn { background: #fff; color: var(--accent-ink); border-color: #fff; }

.site-foot {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  color: var(--muted);
  font-size: 13px;
}
.site-foot .inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}

/* ==========================================================================
   用户端 / 管理端骨架
   ========================================================================== */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
/* 窄屏下昵称会把「余额」「退出」挤成两行，这里统一压住 */
.topbar #balancePill { white-space: nowrap; flex: 0 0 auto; }
.topbar #userName {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 140px; flex: 0 1 auto;
}

.tabs {
  display: block;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.tabs .inner {
  max-width: 1080px; width: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs .inner::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* 登录后欢迎横幅：紫粉渐变 + 装饰光点，替代原来白板式的第一屏 */
.hello-band {
  width: 100%;
  max-width: 1080px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.hello-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-radius: 18px;
  background:
    radial-gradient(420px 180px at 88% -30%, rgba(216, 115, 200, .55), transparent 65%),
    radial-gradient(380px 200px at 8% 130%, rgba(124, 107, 240, .45), transparent 62%),
    linear-gradient(140deg, #7c6bf0 0%, #9a6ce0 55%, #c86fd4 100%);
  color: #fff;
  box-shadow: 0 18px 44px -22px rgba(110, 84, 200, .55);
}
.hello-hi { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.hello-sub { font-size: 13px; opacity: .88; margin-top: 4px; }
.hello-deco { display: flex; gap: 8px; flex: 0 0 auto; }
.hd-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  animation: hello-bounce 2.2s ease-in-out infinite;
}
.hd-dot.d2 { animation-delay: .25s; background: #ffd98e; }
.hd-dot.d3 { animation-delay: .5s; }
@keyframes hello-bounce {
  0%, 100% { transform: translateY(0); opacity: .7; }
  50%      { transform: translateY(-7px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .hd-dot { animation: none; } }
@media (max-width: 620px) {
  .hello-band { margin-top: 14px; padding: 0 16px; }
  .hello-inner { padding: 18px 20px; }
  .hello-hi { font-size: 17px; }
}

.page { flex: 1; padding: 28px 0 60px; }
.page .inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .k { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.stat .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.stat .u { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 3px; }

/* 绑定卡 */
.bind-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.bind-card .av {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 28px; flex-shrink: 0;
  overflow: hidden;
}
.bind-card .av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 角色选择卡（用户端） */
/* 角色分类切换（用户端 / 管理端共用）
   浅色底上用实心主色胶囊，选中态才够清楚；未选中只描边，不抢角色卡的视觉重量 */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.cat-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.cat-tab i {
  font-style: normal;
  font-size: 11px;
  padding: 3px 5px;
  border-radius: 5px;
  background: var(--bg-alt);
  color: var(--muted);
}
.cat-tab:hover { color: var(--ink); border-color: var(--line-2); }
.cat-tab.on { color: #fff; border-color: transparent; background: var(--accent); }
.cat-tab.on i { background: rgba(255, 255, 255, .2); color: #fff; }

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pick {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pick:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.pick.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 卡头：左侧名称+身份+擅长，右侧形象照（不再占满整块） */
.pick-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 0;
}
.pick-headinfo { flex: 1; min-width: 0; }
.pick-photo {
  position: relative;
  flex: 0 0 auto;
  width: 76px; height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--accent-soft), var(--bg-alt));
  box-shadow: inset 0 0 0 1px var(--line);
}
.pick-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform .5s;
}
.pick:hover .pick-photo img { transform: scale(1.04); }
.pick-photo .fb {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 32px;
}
.pick-body { padding: 10px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.pick .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pick .av {
  width: 44px; height: 44px; border-radius: 13px;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 19px;
  overflow: hidden;
}
.pick .av img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(1.07);   /* 生图是夜里拍的，放在白底卡片上要提一点 */
}
.pick .av:has(img) { border-color: transparent; }
.pick .nm { font-weight: 650; font-size: 15.5px; }
.pick-id {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 3px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-topics { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 0; }
.pick-topics span {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--muted);
}
.pick .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pick .q { font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; display: inline-block; margin-top: 8px; }
.pick .no { font-size: 12px; color: var(--danger); background: var(--danger-soft); padding: 2px 8px; border-radius: 6px; display: inline-block; margin-top: 8px; }

/* ---------------- 我的角色：已开通列表（和「角色市场」分开） ---------------- */

.own-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.own-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.own-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.own-photo {
  width: 58px; height: 58px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 24px;
}
.own-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.own-info { flex: 1; min-width: 0; }
.own-info .nm { font-weight: 650; font-size: 15px; }
.own-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.own-meta strong { color: var(--accent-ink); }
.own-id {
  font-size: 11.5px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.own-open { flex: 0 0 auto; }

/* 空状态：还没有开通任何角色 */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state .es-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; margin-bottom: 6px; }

/* ---------------- 客服二维码 ---------------- */

.kefu-box {
  display: flex;
  align-items: center;
  gap: 18px;
}
.kefu-qr {
  width: 132px; height: 132px;
  flex: 0 0 auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px -14px rgba(50, 43, 69, .4);
}
.kefu-qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kefu-text { flex: 1; min-width: 0; }
.kefu-title { font-weight: 650; font-size: 14.5px; margin-bottom: 5px; }

/* 购买弹窗：价格 + 客服二维码 */
.buy-price-row {
  display: flex; align-items: baseline; gap: 10px;
  margin: 12px 0 16px;
}
.buy-price { font-size: 26px; font-weight: 700; color: var(--price); }
.buy-kefu {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid #e2dbfb;
}
.buy-kefu .kefu-qr { width: 104px; height: 104px; box-shadow: none; }
.buy-kefu-text { flex: 1; min-width: 0; }

@media (max-width: 620px) {
  .own-grid { grid-template-columns: 1fr; }
  .kefu-box { flex-direction: column; align-items: flex-start; gap: 12px; }
  .buy-kefu { flex-direction: column; align-items: flex-start; }
}

/* 套餐卡（用户端） */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column;
  position: relative;
}
.plan.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan h4 { font-size: 15px; margin-bottom: 4px; }
.plan .p { font-size: 24px; font-weight: 650; color: var(--price); margin: 8px 0 2px; }
.plan .p small { font-size: 12px; color: var(--muted); font-weight: 400; }
.plan .d { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; flex: 1; }

/* 二维码 */
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  place-items: center;
  min-height: 220px;
}
.qr-box img, .qr-box canvas { width: 200px; height: 200px; }

/* ==========================================================================
   管理端
   ========================================================================== */

.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand { padding: 6px 10px 18px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s;
}
.nav-item:hover { background: var(--bg-alt); }
.nav-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.nav-item .ico { width: 16px; text-align: center; opacity: .8; }
.nav-group {
  font-size: 11px;
  color: var(--muted);
  padding: 16px 12px 6px;
  letter-spacing: .04em;
}
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-head {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.admin-body { padding: 24px 26px 60px; flex: 1; }
.admin-body h2 { font-size: 20px; margin-bottom: 4px; }
.admin-body .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar .input { width: auto; min-width: 200px; }

.pager {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; font-size: 13px; color: var(--muted);
}

/* 登录页 */
/* 登录页：奶油底 + 紫粉光斑 + 玻璃卡片，配合气泡 logo 的温馨气质 */
.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 560px at 18% -8%, rgba(216, 115, 200, .14), transparent 60%),
    radial-gradient(760px 520px at 86% 106%, rgba(124, 107, 240, .16), transparent 62%),
    linear-gradient(180deg, #fdf9f5 0%, #faf3ee 100%);
  overflow: hidden;
}
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .5;
  pointer-events: none;
  animation: blob-drift 12s ease-in-out infinite alternate;
}
.auth-blob.b1 { width: 380px; height: 380px; background: #e3d9fb; top: -110px; left: -90px; }
.auth-blob.b2 { width: 420px; height: 420px; background: #fad9ef; bottom: -150px; right: -110px; animation-delay: -4s; }
.auth-blob.b3 { width: 260px; height: 260px; background: #ffe9c9; top: 52%; left: 62%; opacity: .4; animation-delay: -8s; }
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(26px, -20px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .auth-blob { animation: none; } }
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 404px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(124, 107, 240, .14);
  border-radius: 24px;
  padding: 34px 32px 26px;
  box-shadow: 0 24px 70px -30px rgba(110, 84, 200, .35);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-logo {
  width: 78px; height: 78px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(124, 107, 240, .30));
}
.auth-brand-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 22px; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em;
}
.auth-tagline { font-size: 13px; color: var(--muted); margin-top: 6px; }
.auth-head { margin-bottom: 18px; }
.auth-card h1 { font-size: 17px; margin-bottom: 4px; color: var(--ink-2); font-weight: 600; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.auth-submit {
  background: linear-gradient(150deg, var(--accent), #c86fd4);
  border: none;
  font-weight: 600;
  box-shadow: 0 12px 28px -12px rgba(124, 107, 240, .65);
}
.auth-submit:hover { background: linear-gradient(150deg, var(--accent-hover), #b95fc4); }

/* 日志对话 */
.chat-log {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.chat-log:last-child { border-bottom: none; }
.chat-q, .chat-a {
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-q::before { content: "用户　"; color: var(--muted); font-size: 12px; }
.chat-a::before { content: "回复　"; color: var(--accent); font-size: 12px; }
.chat-a { margin-top: 8px; color: var(--ink-2); }
.chat-meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* 响应式 */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 32px; }
  .persona-grid, .pain-grid, .price-grid, .steps, .pick-grid, .plan-grid, .grid-3, .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links { display: none; }
  .sidebar { width: 62px; padding: 14px 8px; }
  .sidebar .brand span:not(.brand-mark), .nav-item span:not(.ico), .nav-group { display: none; }
  .sidebar .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-item { justify-content: center; padding: 11px 0; }
}
@media (max-width: 620px) {
  .persona-grid, .pain-grid, .price-grid, .steps, .pick-grid, .plan-grid,
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .section { padding: 48px 0; }
  .admin-body { padding: 16px 14px 50px; }
  .wrap { padding: 0 16px; }
  /* 品牌名变长后窄屏会挤：收紧导航间距，标签不换行 */
  .site-nav .inner { gap: 10px; padding: 12px 14px; }
  .site-nav .inner .btn { padding: 7px 12px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
  .brand-online { font-size: 10px; padding: 2px 6px 2px 5px; }
  .topbar .inner { gap: 8px; }
  /* 四个 Tab 在 390 宽下会超出 12px：收紧内边距，必要时横向滑动 */
  .tabs .inner { padding: 0 14px; gap: 2px; }
  .tab { padding: 11px 11px; font-size: 13px; }
}

/* ==========================================================================
   表情包管理（仅管理端）
   素材是文件系统实体，卡片只是目录的一层可视化，所以样式全部挂 .st- 前缀，
   不碰三端共用的通用类。
   ========================================================================== */

.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.st-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.st-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.st-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 表情包多是正方形，cover 会把上下裁掉，认不出是哪个表情 */
.st-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.st-noimg { font-size: 12px; color: var(--muted); }

.st-count {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(28, 25, 23, .62);
  color: #fff;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}

.st-body { padding: 11px 13px 13px; }
.st-name {
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.st-ops {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; gap: 5px;
  opacity: 0;
  transition: opacity .16s;
}
.st-card:hover .st-ops { opacity: 1; }
.st-op {
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink-2);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(28, 25, 23, .14);
}
.st-op:hover { background: #fff; color: var(--ink); }
.st-op.danger:hover { color: var(--danger); }

/* ------------------------------ 分类详情 ------------------------------ */

.st-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}

.st-file {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}
.st-file:hover { border-color: var(--accent); }
.st-file.bad { border-color: #e8bda9; }

.st-thumb {
  aspect-ratio: 1;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
}
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-file.bad .st-thumb img { filter: grayscale(1); opacity: .55; }

.st-fname {
  padding: 6px 8px 0;
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-fmeta { padding: 1px 8px 7px; font-size: 10.5px; color: var(--muted); }

.st-del {
  position: absolute;
  top: 5px; right: 5px;
  width: 22px; height: 22px;
  border: none; border-radius: 50%;
  background: rgba(28, 25, 23, .58);
  color: #fff;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .14s, background .14s;
}
.st-file:hover .st-del { opacity: 1; }
.st-del:hover { background: var(--danger); }

/* -------------------------------- 上传 -------------------------------- */

.st-drop {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 26px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  background: var(--bg-alt);
  transition: border-color .16s, background .16s, color .16s;
}
.st-drop:hover, .st-drop.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.st-uplist { max-height: 210px; overflow-y: auto; }
.st-uplist:empty { display: none; }

.st-urow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.st-urow:last-child { border-bottom: none; }
.st-uname {
  flex: 1;
  min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink-2);
}
.st-usize { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.st-ustate { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ustate.done { color: var(--accent-ink); }
.st-ustate.err { color: var(--danger); }
.st-ustate.sending { color: var(--warn); }
.st-udel {
  border: none; background: none;
  color: var(--muted);
  font: inherit; font-size: 11.5px;
  cursor: pointer; padding: 0 2px;
}
.st-udel:hover { color: var(--danger); }

@media (max-width: 620px) {
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .st-files { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
  /* 触摸设备没有 hover：操作按钮从「压在封面上」改成「卡片底部一行」，不挡表情 */
  .st-card { display: flex; flex-direction: column; }
  .st-ops {
    position: static;
    opacity: 1;
    padding: 0 13px 12px;
  }
  .st-body { padding-bottom: 7px; }
  .st-del { opacity: 1; }
  /* 统计卡在手机上排两列：4 个大块竖着堆会把内容顶到一屏之外 */
  .admin-body .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-body .stat { padding: 13px 15px; }
  .admin-body .stat .v { font-size: 21px; }
  /* 标题和按钮在窄屏换行，别互相挤压 */
  .admin-body .row-between { flex-wrap: wrap; }
}
