:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #17171c;
  --muted: #6d7280;
  --line: rgba(23, 23, 28, 0.08);
  --accent: #5b4bff;
  --accent-soft: #efeefe;
  --black: #17171c;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(48, 40, 90, 0.08);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: #fff;
}
.auth-art {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 186, 214, 0.95), transparent 28%),
    radial-gradient(circle at 72% 22%, rgba(176, 166, 255, 0.95), transparent 32%),
    radial-gradient(circle at 48% 78%, rgba(146, 214, 255, 0.9), transparent 34%),
    linear-gradient(160deg, #f8f4ff, #eef3ff 55%, #f7fbff);
  padding: 36px;
}
.auth-mark {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
img.avatar { object-fit: cover; background: #f3f4f6; }
.auth-mark i, .brand i, .avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c6bff, #59c2ff);
  color: #fff;
  font-style: normal;
  font-size: 14px;
}
.orbit {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  left: 18%;
  top: 22%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 68%);
}
.float-card {
  position: absolute;
  z-index: 2;
  width: 280px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(80, 60, 140, 0.12);
  backdrop-filter: blur(10px);
  padding: 16px 16px 14px;
}
.float-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.float-card.one { top: 18%; left: 12%; width: 230px; transform: rotate(-7deg); }
.float-card.two { top: 40%; left: 30%; width: 340px; }
.float-card.three { bottom: 12%; left: 16%; width: 250px; transform: rotate(5deg); }
.float-card strong { display: block; margin: 8px 0 6px; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c6bff;
  display: inline-block;
}
.dot.blue { background: #3aa0ff; }
.dot.pink { background: #ff7ab2; }
.mono, .float-card code, td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: #4338ca;
}
.chips { display: flex; gap: 6px; margin-top: 10px; }
.chips span {
  background: rgba(91, 75, 255, 0.08);
  color: #4c3fd1;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-box { width: min(420px, 100%); }
.auth-box h1, .page h1, .hello {
  font-size: 22px;
  line-height: 1.35;
  margin: 0;
  font-weight: 620;
  letter-spacing: 0;
}
.lead { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f2f3f7;
  border-radius: 999px;
  padding: 4px;
}
.auth-box .seg { margin: 26px 0 8px; }
.wechat-login {
  margin-top: 14px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #eceef3;
  border-radius: 16px;
  padding: 24px 16px;
  box-sizing: border-box;
  text-align: center;
}
.wechat-frame {
  margin: 0 auto;
  width: 210px;
  height: 210px;
  overflow: hidden;
  position: relative;
  flex: none;
}
.wechat-frame iframe {
  border: 0;
  position: absolute;
  top: 0;
  left: 50%;
  width: 300px !important;
  height: 400px !important;
  transform: translateX(-50%) scale(0.7);
  transform-origin: top center;
}
.wechat-login p { margin: 0; color: #8b90a0; font-size: 11px; line-height: 1.45; }
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
}
body.mode-login .seg [data-pane="login"],
body.mode-wechat .seg [data-pane="wechat"],
.page[data-tab="credits"] .seg [data-tab="credits"],
.page[data-tab="subscription"] .seg [data-tab="subscription"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(23, 23, 28, 0.06);
}
body.mode-login #pane-wechat,
body.mode-wechat #pane-login,
.page[data-tab="credits"] .pane-sub,
.page[data-tab="subscription"] .pane-pack { display: none; }
label { display: block; margin: 16px 0 8px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid transparent;
  background: #f5f6f8;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: #d9d4ff;
  box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.12);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--black);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
}
.btn.block { width: 100%; margin-top: 18px; height: 46px; }
.msg {
  background: #fff8ec;
  color: #8a5a00;
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 16px;
  line-height: 1.7;
}
.fine { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.6; }

.app { min-height: 100vh; display: flex; flex-direction: column; background: #f3f5f9; }
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #e6e8ee;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar .brand { padding: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.who-mini { color: var(--muted); font-size: 13px; margin-right: 4px; }
.ghost {
  border: 1px solid #e1e3ea;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
}
.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px 1fr; }
.side {
  background: #fff;
  border-right: 1px solid #e6e8ee;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 8px 16px; }
.nav-btn { margin: 0 4px 8px; height: 40px; border-radius: 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { margin: 14px 10px 4px; color: #98a0ae; font-size: 12px; }
.nav-link, .history a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #3c4150;
  font-size: 13px;
}
.nav-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-link:hover { background: #f4f5f8; }
.history {
  margin-top: 18px;
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 23, 28, 0.22) transparent;
}
.history::-webkit-scrollbar,
.thread-log::-webkit-scrollbar { width: 6px; height: 6px; }
.history::-webkit-scrollbar-track,
.thread-log::-webkit-scrollbar-track { background: transparent; }
.history::-webkit-scrollbar-thumb,
.thread-log::-webkit-scrollbar-thumb {
  background: rgba(23, 23, 28, 0.18);
  border-radius: 999px;
}
.history::-webkit-scrollbar-thumb:hover,
.thread-log::-webkit-scrollbar-thumb:hover { background: rgba(23, 23, 28, 0.32); }
.history p { margin: 4px 12px 8px; color: var(--muted); font-size: 12px; }
.history-row { display: flex; align-items: center; border-radius: 10px; }
.history-row:hover { background: #f4f5f8; }
.history a {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #4b5160;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-row form { flex: none; }
.history-row button {
  width: 26px;
  height: 26px;
  margin-right: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a0a6b2;
  display: grid;
  place-items: center;
}
.history-row button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.history-row button:hover { color: #dc2626; background: #fde8e8; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 23, 28, 0.36);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(380px, 100%);
  padding: 22px 22px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(23, 23, 28, 0.18);
}
.modal-card h2 { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.modal-card p { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-actions button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #f4f5f8;
  color: #3c4150;
  font-size: 13px;
}
.modal-actions .ok { background: #17171c; color: #fff; }
.modal-actions .ok:disabled { opacity: 0.35; }
.modal-actions .ok.danger { background: #dc2626; }
.agree-card { width: min(640px, 100%); max-height: min(78vh, 760px); display: flex; flex-direction: column; }
.agree-body { overflow: auto; margin-top: 8px; padding-right: 8px; }
.agree-body h3 { margin: 16px 0 6px; font-size: 14px; color: #17171c; }
.agree-body p, .agree-body li { margin: 0 0 8px; color: #3c4150; font-size: 13px; line-height: 1.7; }
.agree-body ul { margin: 0 0 8px; padding-left: 18px; }
.agree-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #17171c; font-size: 13px; }
.agree-check input { width: 16px; height: 16px; margin: 0; padding: 0; flex: none; }
#verify-form.is-locked input,
#verify-form.is-locked .btn {
  background: #f3f4f6;
  color: #a0a6b0;
  cursor: not-allowed;
  pointer-events: none;
}
#verify-form.is-locked .btn { background: #d8dae0; color: #fff; }
#agree-reopen {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #17171c;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.side-user { margin-top: auto; padding-top: 12px; }
.who { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; }
.who strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar { flex: none; }
.side-user form { margin: 0; }
.logout {
  border: 0;
  background: transparent;
  color: #8b909a;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
}
.logout:hover { color: #dc2626; background: #fde8e8; }
.main {
  min-width: 0;
  background: #f3f5f9;
}
.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 22px 40px;
}
.page.narrow { max-width: none; }
.panel {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  padding: 16px 18px;
}
.panel h2, .page .panel h2 { margin: 0 0 12px; font-size: 15px; font-weight: 620; color: var(--ink); }
.stat-grid, .split { display: grid; gap: 14px; margin-top: 16px; }
.stat-grid { grid-template-columns: 1fr 1fr; }
.main:has(.usage-page) { background: #fff; }
.usage-page { max-width: none; width: 100%; }
.usage-board { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr)); gap: 12px; }
.usage-board section, .usage-metrics article, .usage-chart {
  background: #f4f5f7;
  border: 1px solid #eceef2;
  border-radius: 8px;
}
.usage-board section, .usage-metrics article { padding: 12px 16px; }
.usage-board span, .usage-metrics span { color: #6d7280; font-size: 13px; }
.usage-board strong, .usage-metrics strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 22px; font-weight: 650; letter-spacing: -0.03em; }
.usage-board strong em { color: #6d7280; font-size: 12px; font-style: normal; font-weight: 500; }
.usage-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.usage-line strong { margin-top: 0; }
.usage-recharge { display: flex; gap: 8px; align-items: center; margin: 0; }
.usage-recharge input { width: 132px; flex: none; height: 32px; padding: 0 12px; border-radius: 8px; background: #fff; border-color: #e6e8ee; }
.usage-recharge .btn { height: 32px; border-radius: 8px; padding: 0 12px; }
.usage-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.usage-chart { margin-top: 12px; padding: 18px 18px 12px; }
.usage-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.usage-chart-head b { font-size: 14px; font-weight: 620; }
.usage-chart-head b span { margin-left: 8px; color: #6d7280; font-weight: 500; }
.usage-ranges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.usage-ranges a, .usage-ranges form { height: 32px; }
.usage-ranges a {
  display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px;
  background: #fff; color: #3c4150; font-size: 12px; border: 1px solid #e6e8ee;
}
.usage-ranges a.on { background: #17171c; color: #fff; border-color: #17171c; }
.usage-ranges form { display: flex; align-items: center; gap: 6px; margin: 0; }
.usage-ranges input { width: 138px; height: 32px; padding: 0 8px; border-radius: 6px; background: #fff; border-color: #e6e8ee; font-size: 12px; }
.usage-ranges form span { color: #8b909a; font-size: 12px; }
.usage-plot { display: flex; gap: 8px; height: 240px; }
.usage-plot.is-loading { opacity: 0.45; }
.usage-axis { display: flex; flex-direction: column; justify-content: space-between; width: 48px; flex: none; color: #8b909a; font-size: 11px; padding-bottom: 22px; }
.usage-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; min-width: 0; border-bottom: 1px solid #eceef2; }
.usage-col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.usage-col i { display: block; width: min(14px, 70%); min-height: 0; background: #3b82f6; border-radius: 3px 3px 0 0; }
.usage-col > span { height: 18px; margin-top: 4px; color: #8b909a; font-size: 11px; }
.usage-tip {
  display: none; position: absolute; z-index: 5; left: 50%; bottom: calc(26px + var(--h, 0px));
  transform: translateX(-50%); min-width: 168px; padding: 10px 12px;
  background: #fff; border: 1px solid #e6e8ee; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(23, 23, 28, 0.12); text-align: left;
}
.usage-col { --h: 0px; }
.usage-col:hover { z-index: 2; }
.usage-col:hover .usage-tip { display: block; }
.usage-col.edge .usage-tip { left: auto; right: 0; transform: none; }
.usage-tip strong { display: block; margin-bottom: 6px; font-size: 12px; }
.usage-tip p { display: flex; align-items: center; gap: 6px; margin: 0; color: #3c4150; font-size: 12px; line-height: 1.7; }
.usage-chart, .usage-plot, .usage-bars { overflow: visible; }
.usage-tip em { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #93c5fd; flex: none; }
.usage-tip em.out { background: #3b82f6; }
.usage-tip em.hit { background: #1d4ed8; }
.usage-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; gap: 12px; }
.usage-stat {
  border: 1px solid #e6e8ee;
  border-radius: 6px;
  padding: 14px 16px 13px;
  background: #f7f8fb;
}
.usage-stat span { color: #5c6370; font-size: 13px; }
.usage-stat strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 8px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #17171c;
}
.usage-stat strong em {
  font-style: normal;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  color: #6b7280;
}
.usage-stat p { margin: 0; color: #8b909a; font-size: 12px; }
.usage-stat.today { background: #f3f1ff; border-color: #ddd8fb; }
.usage-stat.today strong { color: #4f46e5; }
.usage-stat.yesterday { background: #f4f6f8; border-color: #e4e7ee; }
.usage-stat.month { background: #eef4ff; border-color: #d7e3fb; }
.usage-stat.month strong { color: #1d4ed8; }
.usage-stat.all { background: #17171c; border-color: #17171c; }
.usage-stat.all span,
.usage-stat.all p,
.usage-stat.all strong em { color: rgba(255, 255, 255, 0.68); }
.usage-stat.all strong { color: #fff; }
.split { grid-template-columns: 1.25fr 0.75fr; align-items: start; }
.table-panel { margin-top: 14px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin: 10px 0 6px; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; }
.stat p { margin: 0; color: var(--muted); font-size: 12px; }
.url-line {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.url-line span { color: var(--muted); }
.url-line code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn, .key-actions button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--accent);
  font-size: 13px;
}
.copy-btn:hover, .key-actions button:hover { background: #f3f1ff; }
.key-actions form button { color: #6b7280; }
.key-actions form button:hover { color: #dc2626; background: #fde8e8; }
.key-actions { display: flex; align-items: center; gap: 8px; }
.key-actions form { margin: 0; }
.steps { margin: 0; padding-left: 18px; color: #3c4150; font-size: 13px; }
.steps li { margin: 8px 0; line-height: 1.55; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}
.page-head .seg { width: 240px; flex: none; }
.page h1 { margin-bottom: 0; }
.page h2 { margin: 28px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, 260px);
  justify-content: start;
  gap: 14px;
}
.plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 168px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  padding: 16px;
}
.badge { color: var(--accent); font-size: 12px; }
.plan b { font-size: 15px; font-weight: 620; }
.plan p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.plan .price { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.plan form { margin: auto 0 0; width: 100%; }
.plan .btn { width: 100%; height: 36px; border-radius: 8px; }
.plans.pack-grid {
  grid-template-columns: repeat(auto-fill, 248px);
  justify-content: start;
  gap: 16px;
}
.tier-label { margin: 4px 0 12px; font-size: 14px; font-weight: 620; }
.tier {
  display: flex;
  flex-direction: column;
  min-height: 228px;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, #f4f2ff 0%, #fff 46%);
  border: 1px solid #e6e7ee;
  border-radius: 12px;
}
.tier > b { font-size: 14px; font-weight: 600; }
.tier-figure {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 18px 0 10px;
}
.tier-figure strong {
  font-size: 28px;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: -0.03em;
}
.tier-figure span { color: #4f46e5; font-size: 13px; }
.tier-figure em { margin-left: auto; font-style: normal; font-size: 18px; font-weight: 650; }
.tier-figure s { margin-right: 6px; color: #9aa0a6; font-size: 13px; font-weight: 500; }
.tier p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.tier form { margin-top: auto; padding-top: 22px; }
.tier .btn { width: 100%; height: 40px; border-radius: 10px; background: #17171c; }
.tier-notes { margin-top: 22px; color: var(--muted); font-size: 13px; }
.tier-notes b { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; }
.tier-notes p { margin: 6px 0; }
.tier-notes p::before { content: "✓  "; color: #5b4bff; }
.empty, .empty-cell { color: var(--muted); font-size: 13px; }
.empty { padding: 8px 0; }
.empty-cell { text-align: center; padding: 22px 8px; }

.sheet { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; font-size: 13px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: #f7f8fb; }
th:last-child, td:last-child { text-align: right; }
td.empty-cell { text-align: center; }
tr + tr td { border-top: 1px solid var(--line); }
.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: #f3f4f6;
}
.tag.pending { background: #fff4df; color: #9a6700; }
.tag.paid { background: #e7f8ee; color: #137333; }

.chat-shell { min-height: calc(100vh - 56px); display: flex; flex-direction: column; background: #f7f8fb; }
.chat-top { height: 64px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 28px; }
.status-pill, .pill {
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
}
.status-pill { color: #3c4150; }
.pill { position: absolute; right: 28px; color: var(--accent); }
.chat-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 0 28px 40px;
}
.chat-stage:not(.thread) { padding-bottom: 160px; }
.chat-stage.thread { justify-content: flex-end; }
.chat-stage .hello-wrap,
.chat-stage .composer,
.chat-stage .hints,
.chat-stage .thread-log,
.chat-stage .fine { width: min(920px, 100%); margin-left: auto; margin-right: auto; }
.hello-wrap { text-align: center; margin-bottom: 72px; }
.hello { font-size: 26px; }
.thread-log {
  overflow: auto;
  max-height: calc(100vh - 250px);
  margin-bottom: 16px;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 23, 28, 0.22) transparent;
}
.bubble {
  width: fit-content;
  max-width: min(560px, 86%);
  padding: 10px 14px;
  border-radius: 16px;
  margin: 10px 0;
  white-space: pre-wrap;
  line-height: 1.65;
}
.bubble.user { margin-left: auto; background: #ece9ff; }
.bubble.assistant {
  width: 100%;
  max-width: 100%;
  margin-right: auto;
  background: transparent;
  padding: 2px 0;
  white-space: normal;
}
.bubble.pending { color: var(--muted); }
.think { margin: 0 0 8px; color: #6d7280; font-size: 13px; }
.think summary {
  cursor: pointer;
  color: #6a5ae0;
  font-size: 12px;
  list-style: none;
}
.think summary::-webkit-details-marker { display: none; }
.think-body {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid #ddd8ff;
  white-space: normal;
  line-height: 1.6;
}
.answer { color: var(--ink); }
.answer h1, .answer h2, .answer h3, .think-body h1, .think-body h2, .think-body h3 {
  margin: 14px 0 6px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}
.answer h1, .think-body h1 { font-size: 18px; }
.answer p, .think-body p { margin: 8px 0; }
.answer ul, .answer ol, .think-body ul, .think-body ol { margin: 8px 0; padding-left: 1.25em; }
.answer li, .think-body li { margin: 3px 0; }
.answer hr, .think-body hr { border: 0; border-top: 1px solid rgba(23, 23, 28, 0.08); margin: 14px 0; }
.answer a, .think-body a { color: var(--accent); }
.answer code, .think-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: #efeefe;
  border-radius: 4px;
  padding: 1px 5px;
}
.answer blockquote, .think-body blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 2px solid #ddd8ff;
  color: #6d7280;
}
.md-code {
  margin: 10px 0;
  border: 1px solid rgba(23, 23, 28, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #f6f7fb;
}
.md-code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  color: #6d7280;
  background: #eef0f5;
  font-size: 12px;
}
.md-code-bar button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
}
.md-pre {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  white-space: pre;
  line-height: 1.55;
}
.md-pre code { background: none; padding: 0; }
.composer {
  position: relative;
  background: #fff;
  border: 1px solid #d9d6f5;
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.06);
  padding: 6px 8px 6px 14px;
}
.chat-lock { width: min(920px, 100%); margin: 0 auto 12px; }
.chat-lock a { color: #17171c; font-weight: 650; }
.composer textarea { border: 0; background: transparent; resize: none; min-height: 64px; padding: 12px 4px; box-shadow: none; }
.composer textarea:disabled { color: #a0a6b0; cursor: not-allowed; }
.composer textarea:focus { border: 0; box-shadow: none; background: transparent; }
.composer-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.model-pick { position: relative; }
.model-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 6px;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--ink);
  font-size: 13px;
}
.model-trigger svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #8b909a;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.model-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #ece9ff;
  color: #5b4bff;
  font-size: 11px;
  font-weight: 650;
}
.model-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: 260px;
  max-height: 320px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(23, 23, 28, 0.14);
  z-index: 20;
}
.model-option {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 14px;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 8px;
  text-align: left;
  color: var(--ink);
}
.model-option:hover,
.model-option.active { background: #f4f5f7; }
.model-option-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-rate { color: #8b909a; font-size: 12px; }
.model-check { color: #17171c; font-size: 12px; visibility: hidden; }
.model-option.active .model-check { visibility: visible; }
.send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d5efc, #3aa0ff);
  color: #fff;
  font-size: 18px;
}
.send:disabled { opacity: 0.35; cursor: not-allowed; }
.hints { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hints button {
  border: 0;
  background: rgba(255, 255, 255, 0.8);
  color: #3c4150;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(48, 40, 90, 0.05);
}

.skill-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.skill-head h1 { margin: 0; }
.skill-head input { width: 240px; background: #fff; border: 1px solid #e6e8ee; border-radius: 10px; padding: 8px 12px; }
.skill-banner {
  margin-bottom: 18px;
  padding: 28px 32px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 30%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(105deg, #241a78, #5b4bff 58%, #7d6cff);
}
.skill-banner strong { display: block; font-size: 22px; font-weight: 650; }
.skill-banner p { margin: 8px 0 0; max-width: 520px; color: rgba(255, 255, 255, 0.84); font-size: 13px; line-height: 1.6; }
.skill-section { margin: 0 0 12px; font-size: 15px; font-weight: 620; color: var(--ink); }
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 168px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
}
.skill-top { display: flex; align-items: center; gap: 10px; }
.skill-card .mark { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.skill-card b { font-size: 15px; font-weight: 620; }
.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.skill-card .go { margin-top: auto; font-size: 13px; }
.skill-card:hover { border-color: #d9d4ff; }
.rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
}
.mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(135deg, #7c6bff, #59c2ff);
}
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-text b { font-size: 14px; }
.row-text span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.go { color: var(--accent); font-size: 13px; }
.meta { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.meta b { color: var(--ink); font-weight: 620; margin-right: 18px; }
.meta span { margin-left: 8px; }
.keyline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.keyline span { color: var(--muted); flex: none; }
.keyline code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.keyline button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
}
.invite-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 14px;
  color: #17171c;
  background: #f6f5f3;
  border: 1px solid #e6e3dc;
}
.invite-hero h1 { margin: 0; color: #17171c; font-size: 22px; }
.invite-hero-copy > p { margin: 8px 0 0; max-width: 460px; color: #6d7280; font-size: 13px; line-height: 1.6; }
.invite-code-line { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.invite-code-line span { color: #6d7280; font-size: 13px; }
.invite-code-line code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: #17171c;
}
.invite-hero button {
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: #17171c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.invite-hero button:hover { background: #2c2c33; }
.invite-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin-top: 14px;
  padding: 6px 6px 6px 14px;
  border-radius: 10px;
  background: #fff;
}
.invite-link-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: #3c4a42;
}
.invite-link-row button { background: #17171c; }
.invite-hero-stats { display: grid; gap: 10px; }
.invite-hero-stats div {
  min-width: 156px;
  padding: 14px 16px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6e3dc;
}
.invite-hero-stats strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.invite-hero-stats em,
.invite-rules strong em {
  font-style: normal;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
}
.invite-hero-stats em { color: #6d7280; }
.invite-hero-stats span { color: #6d7280; font-size: 13px; }
.invite-hero-stats strong { color: #17171c; }
.invite-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.invite-rules article {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 14px 16px 15px;
}
.invite-rules article.you { background: #f7f6f4; border-color: #e7e4de; }
.invite-rules article.friend { background: #f5f5f6; border-color: #e4e5e8; }
.invite-rules article.back { background: #f6f6f5; border-color: #e5e5e2; }
.invite-rule-top { display: flex; align-items: center; gap: 8px; }
.invite-rule-top i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
}
.invite-rule-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.invite-rules .you i { background: #8d8a84; }
.invite-rules .friend i { background: #7d8490; }
.invite-rules .back i { background: #908a82; }
.invite-rule-top b { font-size: 13px; font-weight: 620; }
.invite-rule-top em {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}
.invite-rules .you .on, .invite-rules .you .off { background: #fff; color: #5c5852; }
.invite-rules .friend .on, .invite-rules .friend .off { background: #fff; color: #5c6370; }
.invite-rules .back .on, .invite-rules .back .off { background: #fff; color: #6b6560; }
.invite-rules strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 14px 0 6px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.invite-rules .you strong { color: #3c3a36; }
.invite-rules .friend strong { color: #3c4150; }
.invite-rules .back strong { color: #4a453f; }
.invite-rules strong em { color: inherit; opacity: 0.72; }
.invite-rules p { margin: 0; color: #5c6370; font-size: 12px; line-height: 1.55; }
.invite-extra {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(220px, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.invite-cash {
  display: block;
  padding: 16px 18px;
  border: 1px solid #e6e3dc;
  border-radius: 12px;
  background: #f7f6f4;
}
.invite-gift {
  padding: 16px 18px;
  border: 1px solid #e5e5e2;
  border-radius: 12px;
  background: #f6f6f5;
}
.invite-gift span { color: #6d7280; font-size: 13px; }
.invite-gift strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #17171c;
}
.invite-gift strong em { font-style: normal; font-size: 13px; font-weight: 550; color: #6d7280; }
.invite-gift p { margin: 8px 0 0; color: #6d7280; font-size: 13px; line-height: 1.5; }
.invite-cash span { color: #6d7280; font-size: 13px; }
.invite-cash strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #17171c;
}
.invite-cash p { margin: 6px 0 0; color: #6d7280; font-size: 13px; line-height: 1.5; }
.invite-cash form { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 12px; }
.invite-cash input {
  width: 118px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e6e3dc;
  border-radius: 8px;
  background: #fff;
  color: #17171c;
  font-size: 13px;
}
.invite-cash button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #17171c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.invite-cash button:hover { background: #2c2c33; }
.invite-cash-off { margin: 0; color: #6d7280; font-size: 13px; }
.invite-people {
  margin-top: 14px;
  padding: 16px 18px 8px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
}
.invite-people-head { display: flex; align-items: center; justify-content: space-between; }
.invite-people-head h2 { margin: 0; font-size: 15px; font-weight: 620; color: var(--ink); }
.invite-people-head span {
  border-radius: 999px;
  padding: 3px 10px;
  background: #f0eeea;
  color: #5c5852;
  font-size: 12px;
  font-weight: 600;
}
.invite-list { list-style: none; margin: 8px 0 0; padding: 0; }
.invite-list > li { display: block; padding: 12px 2px; }
.invite-list > li + li { border-top: 1px solid var(--line); }
.invite-person { display: flex; align-items: center; gap: 10px; }
.invite-person div { min-width: 0; }
.invite-person b { display: block; font-weight: 550; font-size: 13px; }
.invite-person time { color: #8b909a; font-size: 12px; }
.invite-person em { margin-left: auto; color: #17171c; font-style: normal; font-size: 13px; font-weight: 600; }
.invite-buys { list-style: none; margin: 8px 0 0 38px; padding: 0; }
.invite-buys li { display: flex; align-items: center; gap: 12px; padding: 6px 0; color: #3c4150; font-size: 13px; }
.invite-buys span { min-width: 0; }
.invite-buys b { font-weight: 550; color: #17171c; }
.invite-buys time { margin-left: auto; color: #8b909a; font-size: 12px; }
.invite-none { margin: 8px 0 0 38px; color: #8b909a; font-size: 12px; }
.invite-list i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #8d8a84;
  color: #fff;
  font-style: normal;
  font-weight: 650;
  font-size: 13px;
  text-transform: uppercase;
}
.invite-list b { font-weight: 550; font-size: 13px; }
.invite-list time { margin-left: auto; color: #8b909a; font-size: 12px; }
.invite-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0 22px; }
.invite-empty i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f0eeea;
  color: #6b6560;
}
.invite-empty svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.invite-empty p { margin: 0; color: #8b909a; font-size: 13px; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form h2 { width: 100%; }
.inline-form input { flex: 1; min-width: 180px; }
.inline-form .btn { height: 42px; padding: 0 18px; flex: none; border-radius: 10px; }

@media (max-width: 980px) {
  .auth-page, .shell { grid-template-columns: 1fr; }
  .stat-grid, .split, .url-line, .invite-hero, .invite-rules { grid-template-columns: 1fr; }
  .invite-extra { grid-template-columns: 1fr; }
  .invite-hero-stats { grid-template-columns: 1fr 1fr; }
  .usage-stats { grid-template-columns: 1fr 1fr; }
  .usage-board, .usage-metrics { grid-template-columns: 1fr 1fr; }
  .usage-balance { grid-column: 1 / -1; }
  .auth-art { display: none; }
  .side { position: static; height: auto; }
  .page { padding: 20px 16px 36px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .seg, .plans.pack-grid { width: 100%; }
  .plans.pack-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-head { align-items: stretch; flex-direction: column; }
  .skill-head input { width: 100%; }
  .hello { font-size: 22px; }
  .pill { position: static; }
  .chat-top { justify-content: space-between; }
}
