/* ChestNutAI 官网 —— 全站样式(无框架、无外链、纯手写) */
:root {
  --bg: #ffffff;
  --bg-soft: #faf6f0;
  --bg-code: #f3ece3;
  --fg: #3a3532;
  --fg-mute: #6c625b;
  --fg-faint: #988d85;
  --line: #e6dcd0;
  --brand: #9c7a5c;
  --brand-strong: #6b4a32;
  --brand-soft: #f6efe6;
  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --ok: #2e7d5b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 21, 18, .05), 0 8px 24px rgba(27, 21, 18, .06);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
}
/* 深色配色。默认跟随系统，页脚的外观开关会在 <html> 上写 data-theme 强制指定。 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100e; --bg-soft: #1b1613; --bg-code: #201a16;
    --fg: #f2ece7; --fg-mute: #a89c93; --fg-faint: #7d7168;
    --line: #2e2621; --brand: #c6a98d; --brand-strong: #dcc3a9;
    --brand-soft: #241d17; --danger: #e8756a; --danger-soft: #2a1715;
    --ok: #5cb98c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #14100e; --bg-soft: #1b1613; --bg-code: #201a16;
  --fg: #f2ece7; --fg-mute: #a89c93; --fg-faint: #7d7168;
  --line: #2e2621; --brand: #c6a98d; --brand-strong: #dcc3a9;
  --brand-soft: #241d17; --danger: #e8756a; --danger-soft: #2a1715;
  --ok: #5cb98c;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
:root { color-scheme: light dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .875em; background: var(--bg-code); padding: .15em .4em; border-radius: 5px; }
pre { background: var(--bg-code); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin: 0 0 1.2em; }
pre code { background: none; padding: 0; font-size: .82rem; line-height: 1.6; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ── 顶栏 ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 680; color: var(--fg); font-size: 1.02rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav__links a { color: var(--fg-mute); font-size: .92rem; }
.nav__links a:hover { color: var(--fg); text-decoration: none; }
.nav__toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; color: var(--fg); padding: 6px 10px; font-size: 1rem; cursor: pointer; }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: .93rem; font-weight: 560; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--fg); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn--sm { padding: 7px 13px; font-size: .86rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── 首页 hero ── */
.hero { padding: 88px 0 72px; text-align: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 5px 14px; border-radius: 999px; background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  color: var(--brand-strong); font-size: .82rem; font-weight: 560;
}
.hero p.lede { font-size: 1.13rem; color: var(--fg-mute); max-width: 620px; margin: 0 auto 32px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 64px 0; }
.stats div { background: var(--bg); padding: 24px 18px; text-align: center; }
.stats b { display: block; font-size: 1.65rem; font-weight: 660; letter-spacing: -.03em; }
.stats span { font-size: .84rem; color: var(--fg-mute); }

.section { padding: 64px 0; }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section__head p { color: var(--fg-mute); }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--fg-mute); font-size: .93rem; margin: 0; }
.card__icon { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.05rem; }

/* ── 表格 ── */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .91rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 600; font-size: .84rem; color: var(--fg-mute); }
tbody tr:last-child td { border-bottom: 0; }

/* ── 定价 ── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg); }
.plan--hot { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.plan--hot::before {
  content: "最受欢迎"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: .72rem; padding: 3px 12px; border-radius: 999px; font-weight: 560;
}
.plan h3 { margin-bottom: .2em; }
.plan__price { font-size: 2.1rem; font-weight: 660; letter-spacing: -.03em; margin: 12px 0 4px; }
.plan__price small { font-size: .9rem; font-weight: 400; color: var(--fg-mute); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; font-size: .91rem; }
.plan li { padding: 6px 0 6px 24px; position: relative; color: var(--fg-mute); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.plan .btn { width: 100%; }

/* ── 报错提示条 ── */
.alert {
  display: none; align-items: flex-start; gap: 10px; margin: 16px 0 0;
  padding: 13px 15px; border-radius: 9px; font-size: .89rem; line-height: 1.55;
  background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
  color: var(--danger);
}
.alert.show { display: flex; }
.alert__code { font-family: var(--mono); font-size: .78rem; opacity: .8; display: block; margin-top: 3px; }

/* ── 控制台 ── */
.console { display: grid; grid-template-columns: 216px 1fr; min-height: calc(100vh - 60px); }
.side { border-right: 1px solid var(--line); background: var(--bg-soft); padding: 24px 0; }
.side h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-faint);
  padding: 0 20px; margin: 20px 0 8px; }
.side h4:first-child { margin-top: 0; }
.side a { display: block; padding: 8px 20px; color: var(--fg-mute); font-size: .9rem; border-left: 2px solid transparent; }
.side a:hover { background: var(--bg); color: var(--fg); text-decoration: none; }
.side a.active { color: var(--brand); border-left-color: var(--brand); background: var(--bg); font-weight: 560; }
.main { padding: 32px 36px 72px; min-width: 0; }
.panel { display: none; }
.panel.active { display: block; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 26px; }
.panel__head h2 { margin: 0; }
.panel__head p { color: var(--fg-mute); font-size: .92rem; margin: 4px 0 0; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.metric span { font-size: .82rem; color: var(--fg-mute); display: block; }
.metric b { font-size: 1.5rem; font-weight: 640; letter-spacing: -.02em; }
.metric i { font-style: normal; font-size: .78rem; color: var(--ok); }

.keyrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .84rem; }
.keyrow code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 聊天 ── */
.chat { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 460px; }
.chat__log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 11px; max-width: 84%; }
.msg--me { margin-left: auto; flex-direction: row-reverse; }
.msg__av { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 28px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: .78rem; }
.msg--me .msg__av { background: var(--bg-code); }
.msg__body { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; font-size: .92rem; }
.msg--me .msg__body { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.msg--err .msg__body { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); }
.chat__bar { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.chat__bar input { flex: 1; }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg); font-family: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: -1px; border-color: var(--brand); }
label { display: block; font-size: .86rem; font-weight: 560; margin-bottom: 5px; }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--fg-mute); margin-top: 5px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 560; }
.badge--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge--err { background: var(--danger-soft); color: var(--danger); }
.badge--mute { background: var(--bg-code); color: var(--fg-mute); }

/* ── 文档 ── */
.doc { display: grid; grid-template-columns: 224px 1fr; gap: 44px; align-items: start; padding: 36px 0 80px; }
.doc__nav { position: sticky; top: 84px; font-size: .9rem; }
.doc__nav h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-faint); margin: 18px 0 7px; }
.doc__nav h4:first-child { margin-top: 0; }
.doc__nav a { display: block; padding: 4px 0; color: var(--fg-mute); }
.doc__nav a:hover, .doc__nav a.active { color: var(--brand); text-decoration: none; }
.doc__body { min-width: 0; }
.doc__body h2 { margin-top: 2.2em; padding-top: .3em; }
.doc__body h2:first-child { margin-top: 0; }
.doc__body ul { padding-left: 1.3em; color: var(--fg-mute); }
.doc__body li { margin-bottom: .4em; }

/* ── 页脚 ── */
.foot { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 40px; color: var(--fg-mute); font-size: .89rem; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.foot h5 { font-size: .84rem; color: var(--fg); margin: 0 0 12px; font-weight: 600; }
.foot a { display: block; color: var(--fg-mute); padding: 3px 0; }
.foot a:hover { color: var(--brand); text-decoration: none; }
.foot__bot { border-top: 1px solid var(--line); padding-top: 22px; display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem; }

@media (max-width: 900px) {
  .grid--3, .plans, .metrics, .stats { grid-template-columns: repeat(2, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  /* 移动端目录改成横向折行，别让它把正文顶到一屏之外 */
  .doc { grid-template-columns: 1fr; gap: 20px; }
  .doc__nav { position: static; border-bottom: 1px solid var(--line); padding-bottom: 14px;
    display: flex; flex-wrap: wrap; gap: 6px; }
  .doc__nav h4 { width: 100%; margin: 8px 0 2px; }
  .doc__nav h4:first-child { margin-top: 0; }
  .doc__nav a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; }
  .console { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap;
    padding: 10px; gap: 4px; }
  .side h4 { display: none; }
  .side a { border-left: 0; border-radius: 7px; padding: 6px 12px; }
  .side a.active { border-left: 0; }
  .main { padding: 24px 20px 60px; }
}
@media (max-width: 620px) {
  .nav__links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0; }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 10px 24px; }
  .nav__toggle { display: block; }
  .grid--3, .grid--2, .plans, .metrics, .stats { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
}

/* ── 认证页 ── */
.auth { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth__box { width: 100%; max-width: 400px; }
.auth__head { text-align: center; margin-bottom: 28px; }
.auth__head img { width: 40px; height: 40px; margin-bottom: 14px; }
.auth__head h1 { font-size: 1.5rem; margin-bottom: .3em; }
.auth__head p { color: var(--fg-mute); font-size: .92rem; margin: 0; }
.auth__card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg); box-shadow: var(--shadow); }
.auth__sso { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sso {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
  color: var(--fg); font-family: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
}
.sso:hover { background: var(--bg-soft); }
.sso svg { width: 17px; height: 17px; flex: 0 0 17px; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--fg-faint); font-size: .82rem; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__foot { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--fg-mute); }
.auth__legal { text-align: center; margin-top: 20px; font-size: .78rem; color: var(--fg-faint); line-height: 1.6; }
.auth__step { display: none; }
.auth__step.active { display: block; }
.codebox { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.codebox input {
  width: 46px; height: 54px; text-align: center; font-size: 1.3rem; font-weight: 600;
  font-family: var(--mono); padding: 0;
}
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ── 聊天网页版 ── */
.app { display: grid; grid-template-columns: 252px 1fr; height: 100vh; overflow: hidden; }
.app__side { border-right: 1px solid var(--line); background: var(--bg-soft); display: flex; flex-direction: column; min-height: 0; }
.app__side header { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.app__side header img { width: 24px; height: 24px; }
.app__side header b { font-size: .96rem; font-weight: 640; letter-spacing: -.02em; }
.app__new { margin: 14px 16px 8px; }
.app__new button { width: 100%; }
.app__list { flex: 1; overflow-y: auto; padding: 6px 10px 14px; }
.app__list h5 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-faint);
  margin: 14px 6px 6px; font-weight: 600; }
.thread { display: block; padding: 8px 10px; border-radius: 8px; color: var(--fg-mute); font-size: .89rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.thread:hover { background: var(--bg); color: var(--fg); text-decoration: none; }
.thread.active { background: var(--bg); color: var(--fg); font-weight: 500; }
.app__user { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.app__user .av { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; flex: 0 0 28px; }
.app__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.app__user a { white-space: nowrap; flex: 0 0 auto; }

.app__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.app__bar { height: 56px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 12px; padding: 0 20px; flex: 0 0 56px; }
.app__bar select { width: auto; min-width: 190px; font-size: .88rem; padding: 6px 10px; }
.app__scroll { flex: 1; overflow-y: auto; }
.app__inner { max-width: 760px; margin: 0 auto; padding: 32px 24px 24px; }
.turn { margin-bottom: 30px; }
.turn__role { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 7px; }
.turn__body { font-size: .97rem; line-height: 1.75; }
.turn--err .turn__body { color: var(--danger); }
.turn__err { border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); background: var(--danger-soft);
  border-radius: 10px; padding: 13px 15px; }
.turn__err b { display: block; margin-bottom: 3px; }
.turn__meta { font-family: var(--mono); font-size: .76rem; opacity: .8; }
.app__empty { text-align: center; padding: 72px 24px 40px; }
.app__empty img { width: 52px; height: 52px; margin-bottom: 18px; }
.app__empty h2 { font-size: 1.35rem; margin-bottom: .3em; }
.app__empty p { color: var(--fg-mute); font-size: .93rem; }
.suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; margin: 26px auto 0; }
.suggest button { text-align: left; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--fg-mute); font-family: inherit; font-size: .88rem; cursor: pointer; line-height: 1.5; }
.suggest button:hover { border-color: var(--brand); color: var(--fg); }

.composer { border-top: 1px solid var(--line); padding: 16px 24px 20px; flex: 0 0 auto; }
.composer__in { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); padding: 10px 10px 10px 16px; display: flex; align-items: flex-end; gap: 10px; }
.composer__in:focus-within { border-color: var(--brand); }
.composer textarea { border: 0; padding: 6px 0; resize: none; max-height: 180px; background: none; font-size: .96rem; }
.composer textarea:focus { outline: none; }
.composer .btn { flex: 0 0 auto; border-radius: 10px; padding: 8px 14px; }
.composer__note { max-width: 760px; margin: 9px auto 0; text-align: center; font-size: .78rem; color: var(--fg-faint); }

/* ── 顶栏补充 ── */
.nav__links a.is-here { color: var(--fg); }
.nav__out { margin-left: 12px; font-size: .88rem; }

/* ── 表单补充 ── */
.btn--block { width: 100%; margin-top: 4px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field__aux { font-size: .82rem; }
.label--center { text-align: center; }
.hint--center { text-align: center; margin-top: 16px; }
.hint__ok { color: var(--ok); }
.check { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: .9rem; margin-bottom: 8px; }
.check input { width: auto; }
.alert--ok { background: color-mix(in srgb, var(--ok) 12%, transparent);
  border-color: color-mix(in srgb, var(--ok) 34%, transparent); color: var(--ok); }
.is-off { color: var(--fg-faint); pointer-events: none; }

.pw { position: relative; }
.pw input { padding-right: 62px; }
.pw__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--fg-mute); font-family: inherit; font-size: .8rem;
  cursor: pointer; padding: 4px 7px; border-radius: 6px; }
.pw__eye:hover { color: var(--fg); background: var(--bg-code); }

.meter { display: flex; gap: 4px; margin-top: 8px; }
.meter i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.meter[data-level="1"] i:nth-child(1) { background: var(--danger); }
.meter[data-level="2"] i:nth-child(-n+2) { background: #d9a441; }
.meter[data-level="3"] i { background: var(--ok); }

/* ── 登录页切页 ── */
.tabs { display: flex; gap: 4px; padding: 3px; background: var(--bg-code); border-radius: 9px; margin-bottom: 22px; }
.tab { flex: 1; padding: 7px 0; border: 0; border-radius: 7px; background: none; cursor: pointer;
  font-family: inherit; font-size: .89rem; font-weight: 560; color: var(--fg-mute); }
.tab.active { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ── 弹窗 ── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: color-mix(in srgb, #1b1512 55%, transparent); backdrop-filter: blur(2px); }
.modal[hidden] { display: none; }
.modal__box { width: 100%; max-width: 460px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.modal__box h3 { margin-bottom: .4em; }
.modal__box p { color: var(--fg-mute); font-size: .9rem; }
.modal__act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.keyshow { background: var(--bg-code); border: 1px solid var(--line); border-radius: 9px;
  padding: 12px 14px; margin: 16px 0 0; overflow-x: auto; }
.keyshow code { background: none; padding: 0; font-size: .84rem; white-space: nowrap; }

/* ── 控制台补充 ── */
.td--mute { color: var(--fg-faint); text-align: center; padding: 26px 16px; }
.rowact { display: flex; gap: 8px; justify-content: flex-end; }
.figure { font-size: 2rem; font-weight: 660; letter-spacing: -.03em; margin: 8px 0; }
.figure small { font-size: .85rem; font-weight: 400; color: var(--fg-mute); letter-spacing: 0; }
.quota { height: 8px; background: var(--bg-code); border-radius: 999px; overflow: hidden; }
.quota__bar { height: 100%; background: var(--brand); width: 0; transition: width .4s; }
.quota__row { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 8px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 132px; }
.bar { flex: 1; background: var(--brand-soft); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar--hot { background: var(--brand); }

/* ── 聊天页补充 ── */
.app__side header .brand { color: var(--fg); }
.app__menu { display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--fg); padding: 5px 9px; cursor: pointer; font-size: .95rem; }
.app__console { margin-left: auto; }
.app__out { margin-left: auto; font-size: .82rem; color: var(--fg-mute); }
.app__none { color: var(--fg-faint); font-size: .85rem; text-align: center; padding: 24px 8px; margin: 0; }
.thread { display: flex; align-items: center; gap: 4px; padding: 0; }
.thread__t { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; color: var(--fg-mute);
  font-size: .89rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread__t:hover { text-decoration: none; color: var(--fg); }
.thread:hover, .thread.active { background: var(--bg); border-radius: 8px; }
.thread.active .thread__t { color: var(--fg); font-weight: 500; }
.thread__x { opacity: 0; border: 0; background: none; color: var(--fg-faint); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 4px 8px; border-radius: 6px; flex: 0 0 auto; }
.thread:hover .thread__x { opacity: 1; }
.thread__x:hover { color: var(--danger); background: var(--danger-soft); }
.turn__typing { color: var(--fg-faint); }

/* ── 法律条款页 ── */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 0 80px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: .3em; }
.legal__meta { color: var(--fg-mute); font-size: .88rem; padding-bottom: 22px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.legal__meta span + span::before { content: "·"; margin: 0 8px; color: var(--fg-faint); }
.legal h2 { font-size: 1.25rem; margin: 2.4em 0 .6em; }
.legal h3 { font-size: 1rem; margin: 1.6em 0 .4em; }
.legal p, .legal li { color: var(--fg-mute); font-size: .95rem; }
.legal ul, .legal ol { padding-left: 1.4em; }
.legal li { margin-bottom: .45em; }
.legal__toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 28px 0 8px; }
.legal__toc h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--fg-faint); margin-bottom: 10px; }
.legal__toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: .9rem; }
.legal__toc a { color: var(--fg-mute); }
.legal__toc a:hover { color: var(--brand); }

/* ── 服务状态页 ── */
.status__all { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent); margin-bottom: 28px; }
.status__all.is-warn { background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: 0 0 10px; }
.status__all.is-warn .status__dot { background: var(--danger); }
.status__all b { font-size: 1rem; }
.status__all span { color: var(--fg-mute); font-size: .86rem; margin-left: auto; }
.svc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.svc__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.svc__top b { font-size: .96rem; }
.svc__top em { font-style: normal; color: var(--fg-faint); font-size: .82rem; font-family: var(--mono); }
.svc__top .badge { margin-left: auto; }
.uptime { display: flex; gap: 2px; height: 30px; }
.uptime i { flex: 1; border-radius: 2px; background: var(--ok); opacity: .75; }
.uptime i.d { background: #d9a441; }
.uptime i.x { background: var(--danger); }
.uptime__legend { display: flex; justify-content: space-between; font-size: .76rem;
  color: var(--fg-faint); margin-top: 7px; }
.incident { border-left: 2px solid var(--line); padding: 0 0 26px 20px; margin-left: 6px; position: relative; }
.incident::before { content: ""; position: absolute; left: -5px; top: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--fg-faint); }
.incident.is-open::before { background: var(--danger); }
.incident h3 { font-size: 1rem; margin-bottom: .2em; }
.incident time { display: block; font-size: .8rem; color: var(--fg-faint); margin-bottom: 10px; font-family: var(--mono); }
.incident dl { margin: 0; font-size: .9rem; color: var(--fg-mute); }
.incident dt { font-weight: 600; color: var(--fg); font-size: .84rem; margin-top: 10px; }
.incident dd { margin: 2px 0 0; }

/* ── 页脚补充 ── */
.foot__pref { background: none; border: 0; color: var(--fg-mute); font-family: inherit;
  font-size: .84rem; cursor: pointer; padding: 0; }
.foot__pref:hover { color: var(--brand); }
.foot__legal { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot__note { color: var(--fg-faint); font-size: .78rem; }

/* ── 404 ── */
.oops { text-align: center; padding: 100px 24px 120px; }
.oops__code { font-family: var(--mono); font-size: .85rem; color: var(--fg-faint); letter-spacing: .1em; }
.oops h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 12px 0 .4em; }
.oops p { color: var(--fg-mute); max-width: 460px; margin: 0 auto 26px; }

@media (max-width: 900px) {
  .legal__toc ol { columns: 1; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .app__menu { display: block; }
  .app__side { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 60;
    transform: translateX(-100%); transition: transform .2s; }
  .app__side.open { transform: none; box-shadow: var(--shadow); }
  .app__console { display: none; }
  .suggest { grid-template-columns: 1fr; }
}
