/* 页面级样式：认证、首页、密钥、指南/文档、反馈、设置与响应式。 */

/* ---------- 登录 / 注册 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(430px, .94fr); }
.auth-poster {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 36px;
  padding: clamp(28px, 4.2vw, 58px);
  border-right: 1px solid var(--line);
  background: linear-gradient(165deg, var(--bg) 42%, var(--accent-softer));
}
.poster-glow {
  position: absolute; width: 540px; height: 540px; right: -180px; top: -220px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
}
.poster-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.poster-brand { display: flex; align-items: center; gap: 11px; }
.poster-tag {
  font-size: 9px; letter-spacing: .2em; color: var(--faint); font-weight: 650;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap;
}
.poster-main { position: relative; display: flex; flex-direction: column; gap: 18px; max-width: 570px; }
.poster-title { font-size: clamp(38px, 4.8vw, 70px); line-height: .99; letter-spacing: -.045em; font-weight: 680; margin: 6px 0 0; }
.poster-em { font-style: normal; color: var(--accent); position: relative; display: inline-block; }
.poster-em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .07em;
  background: var(--accent); opacity: .22; border-radius: 99px;
}
.poster-sub { color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 48ch; }
.poster-features { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--line); }
.poster-feature { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.poster-feature-icon { color: var(--accent); margin-top: 2px; }
.poster-feature-text { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.poster-feature-text strong { color: var(--ink); font-size: 12.8px; font-weight: 630; }
.poster-foot {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  font-size: 9.5px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase;
}
.poster-foot-brand { margin-left: auto; font-family: var(--font-mono); }
.auth-panel {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: clamp(28px, 4vw, 56px) clamp(22px, 3.4vw, 48px);
}
.auth-panel-inner { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-card {
  padding: clamp(26px, 3vw, 36px);
  border-radius: 24px; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow-card);
}
.auth-card-head { display: flex; flex-direction: column; gap: 7px; margin-bottom: 22px; }
.auth-title { font-size: 26px; letter-spacing: -.03em; font-weight: 670; line-height: 1.15; }
.auth-sub { color: var(--muted); font-size: 12.8px; line-height: 1.55; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-submit { margin-top: 6px; }
.auth-card-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.auth-legal { text-align: center; font-size: 10.5px; color: var(--faint); }
.auth-theme { display: flex; align-items: center; gap: 10px; }
.auth-theme-label { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.theme-dots { display: flex; gap: 7px; }
.theme-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; padding: 0; transition: box-shadow .2s, transform .2s; }
.theme-dot:hover { transform: translateY(-1px); }
.theme-dot-swatch { width: 11px; height: 11px; border-radius: 50%; }
.theme-dot[data-theme="plain"] .theme-dot-swatch { background: #181817; }
.theme-dot[data-theme="grid"] .theme-dot-swatch { background: #2f55d4; }
.theme-dot[data-theme="sand"] .theme-dot-swatch { background: #ad5f24; }
.theme-dot[data-theme="ink"] .theme-dot-swatch { background: #9d3126; }
.theme-dot.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }

/* ---------- 首页 ---------- */
.page-title--home { font-size: clamp(32px, 3.9vw, 54px); }
.page-head--home { align-items: flex-end; }
.dash-status-slot { display: contents; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.5vw, 20px); }
.dash-card { display: flex; flex-direction: column; }
.dash-status { grid-column: span 7; }
.dash-usage { grid-column: span 5; }
.dash-quick { grid-column: span 12; }
.dash-events { grid-column: span 7; }
.dash-site { grid-column: span 5; }
.dash-quick .card-row { margin-bottom: 14px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 620; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.live-indicator.is-online { color: var(--ok); border-color: rgba(26, 122, 75, .22); background: var(--ok-soft); }
.live-indicator.is-offline { color: var(--danger); border-color: rgba(182, 54, 43, .22); background: var(--danger-soft); }
.model-hero { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 16px; }
.model-name-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.model-name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 670; letter-spacing: -.03em; line-height: 1.1; }
.model-tag { font-size: 10.5px; color: var(--faint); padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; }
.model-sub { font-size: 12.5px; color: var(--muted); }
.cap-row { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 16px; }
.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 15px; }
.metric { display: flex; flex-direction: column; gap: 5px; }
.metric-label { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 620; }
.metric-value { display: flex; align-items: baseline; gap: 4px; }
.metric-value strong { font-size: 21px; font-weight: 660; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-value span { font-size: 10.5px; color: var(--faint); }
.status-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.status-foot-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); }
.status-skeleton { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.usage-body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.usage-hero { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.usage-number { font-size: clamp(38px, 4.2vw, 54px); line-height: 1; letter-spacing: -.04em; font-weight: 680; font-variant-numeric: tabular-nums; }
.usage-unit { font-size: 12px; color: var(--muted); }
.usage-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); }
.usage-line strong { color: var(--ink); font-weight: 620; }
.spark { display: flex; align-items: flex-end; gap: 7px; height: 86px; padding-top: 6px; margin-top: auto; }
.spark-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.spark-track { width: 100%; flex: 1; display: flex; align-items: flex-end; border-radius: 6px; background: var(--accent-softer); overflow: hidden; }
.spark-bar { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--accent); opacity: .82; transition: height .5s var(--ease-out), opacity .2s; }
.spark-col:hover .spark-bar { opacity: 1; }
.spark-label { font-size: 9.5px; color: var(--faint); font-family: var(--font-mono); }
.quota { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.quota-row { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; align-items: center; font-size: 11.5px; color: var(--muted); }
.quota-num { justify-self: end; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); }
.quota-bar { grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(22, 22, 20, .07); overflow: hidden; }
.quota-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .8; }
.quota-note { font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 10px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 15px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--bg-soft);
  transition: border-color .22s, background .22s, transform .25s var(--ease-out), box-shadow .25s;
}
.tile:hover { border-color: var(--accent-line); background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tile-icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.tile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-text strong { font-size: 12.8px; font-weight: 630; }
.tile-text span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.tile-arrow { margin-left: auto; color: var(--faint); transition: color .2s, transform .25s var(--ease-out); flex: none; }
.tile:hover .tile-arrow { color: var(--accent); transform: translate(1px, -1px); }
.events-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-list { display: flex; flex-direction: column; }
.event-row { display: grid; grid-template-columns: 64px 8px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.event-row:last-child { border-bottom: 0; }
.event-time { color: var(--faint); font-size: 10.5px; }
.event-level { width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.event-level--warn { background: var(--warn); }
.event-level--error { background: var(--danger); }
.event-level--debug { background: var(--faint); }
.event-text { color: var(--ink-2); line-height: 1.5; word-break: break-word; }
.events-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--faint); }
.events-foot .mono { color: var(--muted); }
.site-body { display: flex; flex-direction: column; flex: 1; }
.site-base { display: flex; flex-direction: column; gap: 7px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.site-base-row { display: flex; align-items: center; gap: 8px; }
.site-base-code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-links { display: flex; gap: 18px; padding-top: 14px; margin-top: auto; }

/* ---------- 密钥管理 ---------- */
.create-key-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.create-key-copy { display: flex; flex-direction: column; gap: 7px; }
.create-key-form-wrap { display: flex; flex-direction: column; gap: 10px; }
.create-key-form { display: flex; align-items: flex-end; gap: 10px; }
.create-key-form .field { flex: 1; }
.create-key-form .btn { margin-bottom: 1px; }
.page-keys .stack--lg { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); }
.key-list-card { padding-bottom: 8px; }
.key-list-body { min-height: 120px; }
.key-list { display: flex; flex-direction: column; }
.key-row { display: flex; align-items: flex-start; gap: 13px; padding: 15px 2px; border-top: 1px solid var(--line); }
.key-row:first-child { border-top: 0; padding-top: 4px; }
.key-row-icon {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-top: 2px;
}
.key-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.key-row-title { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.key-name { font-size: 13.5px; font-weight: 640; }
.key-id { font-size: 10px; color: var(--faint); }
.key-code {
  position: relative; align-self: flex-start;
  display: inline-flex; max-width: 100%; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-soft);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
}
.key-prefix { display: block; font-family: var(--font-mono); color: var(--ink-2); padding: 3px 7px; white-space: nowrap; }
/* 与代码条同色的渐变遮罩：第 5 位（文字起点 + 4ch）开始淡出，第 17 位（+12ch）起纯色遮挡。 */
.key-fade {
  position: absolute; top: 0; right: 0; bottom: 0; left: calc(7px + 4ch);
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0, var(--bg-soft) 12ch, var(--bg-soft) 100%);
}
.key-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--faint); }
.key-row-meta .mono { color: var(--muted); }
.key-row-actions { display: flex; gap: 2px; margin-left: auto; flex: none; }
.key-skeletons { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 18px; }
.key-skeleton { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.key-modal { display: flex; flex-direction: column; gap: 14px; }
.key-modal .note { margin: 0; }
.key-reveal {
  display: flex; align-items: center; overflow: hidden;
  padding: 14px 16px; border-radius: 12px;
  background: var(--bg-soft); border: 1px dashed var(--line-strong);
  font-family: var(--font-mono); font-size: 14px;
}
.key-reveal-prefix { color: var(--ink); }
.key-reveal-mask {
  color: var(--faint); letter-spacing: .1em; white-space: nowrap; overflow: hidden;
  background: linear-gradient(90deg, var(--faint), rgba(156, 156, 148, .15));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.key-modal-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key-modal-meta-item { display: flex; flex-direction: column; gap: 3px; }
.key-modal-meta-item strong { font-size: 12.5px; font-weight: 600; }
.key-modal-tools { display: flex; gap: 10px; }
.key-modal-hint { font-size: 11px; color: var(--faint); line-height: 1.5; }
.key-copy-btn { align-self: flex-start; }
.key-modal .check-line { font-size: 12.5px; }

/* ---------- 指南 / 文档 ---------- */
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(24px, 3.4vw, 48px); align-items: start; }
.doc-aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 20px; }
.toc { display: flex; flex-direction: column; gap: 6px; }
.toc-title { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); font-weight: 650; padding-left: 12px; margin-bottom: 2px; }
.toc-list { display: flex; flex-direction: column; gap: 1px; border-left: 1px solid var(--line); }
.toc-item { display: flex; }
.toc-link {
  position: relative; width: 100%; text-align: left;
  padding: 7px 10px 7px 13px;
  font-size: 12.5px; font-weight: 540; color: var(--muted);
  border-radius: 0 8px 8px 0;
  transition: color .2s, background .2s;
}
.toc-link::before {
  content: ""; position: absolute; left: -1px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; border-radius: 2px; background: var(--accent);
  transition: height .25s var(--ease-out);
}
.toc-link:hover { color: var(--ink); background: var(--accent-softer); }
.toc-link.is-active { color: var(--accent); font-weight: 620; background: var(--accent-softer); }
.toc-link.is-active::before { height: 62%; }
.aside-help { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft); display: flex; flex-direction: column; gap: 8px; }
.aside-help-text { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.aside-help .btn { align-self: flex-start; }
.doc-content { display: flex; flex-direction: column; gap: clamp(30px, 4vw, 52px); min-width: 0; max-width: 880px; }
.doc-section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: calc(var(--header-h) + 28px); }
.doc-section-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.doc-section-title { font-size: clamp(23px, 2.2vw, 30px); letter-spacing: -.025em; font-weight: 660; line-height: 1.15; }
.doc-section-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.doc-note { font-size: 12px; color: var(--faint); line-height: 1.6; }
.doc-sub-title { font-size: 14px; font-weight: 640; margin-bottom: 8px; }
.doc-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.base-url-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 20px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--bg-soft);
}
.base-url-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.base-url-code { font-family: var(--font-mono); font-size: 14px; color: var(--ink); word-break: break-all; }
.base-url-hint { font-size: 11.5px; color: var(--faint); }
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-card { display: flex; flex-direction: column; gap: 7px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.step-num { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); letter-spacing: .1em; }
.step-card strong { font-size: 13px; font-weight: 630; }
.step-card p { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.step-model { margin: 1px 0 2px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.caps-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.caps-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.limit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.limit-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft);
}
.limit-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 620; }
.limit-card strong { font-size: 23px; font-weight: 660; letter-spacing: -.02em; }
.limit-hint { font-size: 10.5px; color: var(--faint); line-height: 1.45; }
.caps-body { display: flex; flex-direction: column; gap: 10px; }
.model-dyn { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft); }
.model-dyn p { font-size: 12.5px; color: var(--muted); }
.model-dyn .mono { color: var(--ink); }
.rule-list { display: flex; flex-direction: column; counter-reset: rule; }
.rule-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.8px; color: var(--ink-2); line-height: 1.6; }
.rule-item:last-child { border-bottom: 0; }
.rule-item .icon { color: var(--accent); margin-top: 3px; flex: none; }
.caps-line .badge { font-size: 11px; }
.security-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.security-item { display: flex; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.security-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.security-item strong { font-size: 12.8px; font-weight: 630; display: block; margin-bottom: 2px; }
.security-item p { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 2px; cursor: pointer; list-style: none;
  font-size: 13.5px; font-weight: 610; color: var(--ink-2);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--accent); }
.faq-chevron { color: var(--faint); transition: transform .25s var(--ease-out); flex: none; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-a { padding: 0 2px 16px; max-width: 72ch; }
.faq-a p { font-size: 12.8px; color: var(--muted); line-height: 1.7; }
.example-body { min-width: 0; }

/* ---------- 问题反馈 ---------- */
.feedback-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.feedback-main { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); min-width: 0; }
.feedback-form { display: flex; flex-direction: column; gap: 16px; }
.feedback-submit { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; flex-wrap: wrap; }
.feedback-submit-note { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.submit-hint:empty { display: none; }
.submit-hint { color: var(--warn); }
.submit-limit { color: var(--faint); }
.feedback-tips { display: flex; flex-direction: column; gap: 10px; }
.feedback-history-card { position: sticky; top: calc(var(--header-h) + 24px); }
.dropzone {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 18px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-md);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color .22s, background .22s, transform .25s var(--ease-out);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent-line); background: #fff; }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.004); }
.dz-icon {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 13px; background: #fff; color: var(--accent);
  border: 1px solid var(--line);
  animation: lmBreathe 5s ease-in-out infinite;
}
.dropzone.is-dragover .dz-icon { animation: lmPing 1.1s infinite; }
.dz-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dz-text strong { font-size: 13px; font-weight: 630; }
.dz-text span { font-size: 11.5px; color: var(--faint); }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.upload-empty { font-size: 11.5px; color: var(--faint); padding: 4px 2px; }
.upload-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff;
}
.upload-item.is-error { border-color: rgba(182, 54, 43, .28); background: var(--danger-soft); }
.upload-thumb {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px; overflow: hidden;
  background: var(--bg-soft); color: var(--muted);
  border: 1px solid var(--line);
}
.upload-thumb-img, .upload-thumb-video { width: 100%; height: 100%; object-fit: cover; }
.upload-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.upload-name-row { display: flex; align-items: baseline; gap: 10px; }
.upload-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-size { margin-left: auto; font-size: 10.5px; color: var(--faint); font-family: var(--font-mono); flex: none; }
.upload-meta-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.upload-pct { color: var(--faint); font-family: var(--font-mono); margin-left: auto; }
.upload-status { color: var(--muted); }
.upload-status.is-done { color: var(--ok); }
.upload-status.is-error { color: var(--danger); }
.upload-status.is-uploading { color: var(--accent); }
.upload-progress { height: 4px; border-radius: 99px; background: rgba(22, 22, 20, .07); overflow: hidden; }
.upload-progress-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s var(--ease-out); }
.upload-error { font-size: 11px; color: var(--danger); line-height: 1.45; }
.upload-actions { display: flex; gap: 2px; flex: none; margin-top: 1px; }
.upload-cover { display: block; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 2px 0 -2px; }
.feedback-success-host { padding: 8px 0; }
.feedback-success { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 12px 10px; }
.success-icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 18px; background: var(--ok-soft); color: var(--ok); margin-bottom: 4px;
}
.success-title { font-size: 24px; font-weight: 660; letter-spacing: -.025em; }
.success-text { font-size: 12.8px; color: var(--muted); max-width: 46ch; line-height: 1.6; }
.success-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; width: 100%; max-width: 480px; margin: 10px 0 4px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--line); }
.success-meta-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: #fff; text-align: left; }
.success-meta-item strong, .success-meta-item code { font-size: 12px; font-weight: 600; word-break: break-all; }
.success-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.history-body { min-height: 120px; }
.history-loading { display: flex; align-items: center; gap: 9px; padding: 22px 4px; font-size: 12px; color: var(--muted); }
.history-list { display: flex; flex-direction: column; }
.history-row { display: flex; flex-direction: column; gap: 7px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.history-row:first-child { padding-top: 2px; }
.history-row:last-child { border-bottom: 0; }
.history-top { display: flex; align-items: baseline; gap: 10px; }
.history-topic { font-size: 13px; font-weight: 630; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-seq { margin-left: auto; flex: none; font-size: 10px; color: var(--faint); }
.history-desc { font-size: 11.5px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 0; font-size: 10px; color: var(--faint); }
.history-folder { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); align-items: start; }
.settings-card--wide { grid-column: 1 / -1; }
.settings-card--danger { border-color: rgba(182, 54, 43, .18); }
.settings-form { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px 30px; align-items: start; }
.profile-line { grid-column: 1; grid-row: 1 / span 3; flex-direction: column; align-items: flex-start; gap: 14px; padding: 2px 24px 0 0; border-bottom: 0; border-right: 1px solid var(--line); min-height: 100%; }
.settings-form .form-alert, .settings-form > .field, .settings-form .form-actions { grid-column: 2; }
.settings-form .form-actions { margin-top: 2px; }
.profile-avatar { display: flex; }
.profile-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-name { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.profile-handle { font-size: 11.5px; color: var(--faint); }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.theme-option {
  display: flex; flex-direction: column; gap: 9px;
  padding: 9px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff; text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .22s var(--ease-out);
}
.theme-option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-option.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-preview {
  position: relative; display: block; height: 96px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.theme-preview--plain { background: radial-gradient(160px 100px at 82% 0%, rgba(22, 22, 20, .07), transparent 70%), #fff; }
.theme-preview--grid {
  background-image: linear-gradient(rgba(47, 85, 212, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 85, 212, .13) 1px, transparent 1px);
  background-size: 14px 14px; background-color: #fff;
}
.theme-preview--sand { background-image: radial-gradient(rgba(173, 95, 36, .24) 1px, transparent 1.2px); background-size: 11px 11px; background-color: #fffdf9; }
.theme-preview--ink { background-image: repeating-linear-gradient(135deg, rgba(22, 22, 20, .1) 0 1px, transparent 1px 8px); background-color: #fffefc; }
.tp-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 5px; }
.tp-dot { width: 7px; height: 7px; border-radius: 50%; background: #181817; }
.tp-bar { height: 3px; width: 26px; border-radius: 2px; background: rgba(22, 22, 20, .16); }
.tp-body { position: absolute; left: 8px; right: 8px; bottom: 8px; top: 20px; display: flex; gap: 5px; }
.tp-side { width: 26px; border-radius: 5px; background: rgba(22, 22, 20, .07); }
.tp-card { flex: 1; border-radius: 6px; background: #fff; border: 1px solid rgba(22, 22, 20, .1); box-shadow: 0 1px 3px rgba(22, 22, 20, .06); padding: 7px 7px 6px; display: flex; flex-direction: column; gap: 4px; }
.tp-line { height: 3px; border-radius: 2px; background: rgba(22, 22, 20, .11); }
.tp-line--a { width: 56%; }
.tp-line--b { width: 84%; }
.tp-accent { position: absolute; right: 9px; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: #181817; }
.theme-preview--grid .tp-dot, .theme-preview--grid .tp-accent { background: #2f55d4; }
.theme-preview--sand .tp-dot, .theme-preview--sand .tp-accent { background: #ad5f24; }
.theme-preview--ink .tp-dot, .theme-preview--ink .tp-accent { background: #9d3126; }
.theme-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.theme-meta strong { font-size: 12.5px; font-weight: 640; }
.theme-meta span { font-size: 10.5px; color: var(--faint); }
.motion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.motion-option {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff; text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .22s var(--ease-out);
}
.motion-option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.motion-option.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.motion-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.motion-meta { display: flex; flex-direction: column; gap: 2px; }
.motion-meta strong { font-size: 12.8px; font-weight: 640; }
.motion-meta span { font-size: 10.5px; color: var(--faint); line-height: 1.5; }
.sync-note { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings-row-text { display: flex; flex-direction: column; gap: 3px; }
.settings-row-text strong { font-size: 13px; font-weight: 630; }
.settings-row-text span { font-size: 11.5px; color: var(--muted); }
.settings-code-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.settings-code-row--spaced { margin-top: 14px; }
.settings-code-row .btn { flex: none; }
.settings-code {
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-foot { padding-top: 14px; }

/* ---------- 404 ---------- */
.page-notfound { justify-content: flex-start; align-items: flex-start; padding-top: clamp(48px, 12vh, 150px); gap: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .dash-status, .dash-usage, .dash-events, .dash-site { grid-column: span 12; }
  .settings-grid { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .create-key-card { grid-template-columns: 1fr; gap: 16px; }
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-history-card { position: static; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-list { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-poster { border-right: 0; border-bottom: 1px solid var(--line); padding: clamp(22px, 4vw, 38px); gap: 22px; }
  .poster-features { display: none; }
  .poster-title { font-size: clamp(34px, 6.6vw, 52px); }
  .poster-sub { font-size: 13px; max-width: 56ch; }
  .poster-foot { display: none; }
  .auth-panel { padding: 30px 20px 52px; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-aside { position: static; flex-direction: column; }
  .toc { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft); }
  .toc-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; border-left: 0; }
  .toc-item { display: inline-flex; }
  .toc-link { width: auto; border-radius: 8px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); }
  .toc-link::before { display: none; }
  .toc-link.is-active { border-color: var(--accent-line); }
  .aside-help { display: none; }
  .doc-content { max-width: none; }
  .doc-two-col { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .key-modal-meta { grid-template-columns: 1fr 1fr; }
  .success-meta { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .motion-grid { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-preview { height: 88px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(292px, 84vw);
    height: 100vh;
    transform: translateX(-104%);
    transition: transform .34s var(--ease-out);
    box-shadow: 24px 0 60px -40px rgba(22, 22, 20, .5);
    z-index: 80;
  }
  .shell.drawer-open .sidebar { transform: translateX(0); }
  .drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 70;
    background: rgba(22, 22, 20, .3);
    backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease-out);
  }
  .shell.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar-brand { display: inline-flex; }
  .crumbs { display: none; }
  .status-pill-meta { display: none; }
  .user-chip-name { display: none; }
  .topbar { padding: 0 14px; gap: 8px; }
  .user-menu { right: -4px; }
  .content { min-height: calc(100vh - var(--header-h)); }
  .page { padding: 20px 16px 56px; gap: 18px; }
  .notice-dock:not(:empty) { padding: 10px 16px 0; }
  .page-head-actions { width: 100%; }
  .page-title--home { font-size: clamp(30px, 7vw, 40px); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-status, .dash-usage, .dash-quick, .dash-events, .dash-site { grid-column: auto; }
  .quick-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .metric-value strong { font-size: 18px; }
  .key-row { flex-wrap: wrap; }
  .key-row-actions { margin-left: 0; }
  .key-row { gap: 10px; }
  .key-row-main { flex-basis: calc(100% - 52px); }
  .key-row-actions { flex-basis: 100%; justify-content: flex-end; }
  .modal { max-height: 92vh; }
  .modal-layer { padding: 12px; }
  .modal-head { padding: 22px 20px 0; }
  .modal-body { padding: 16px 20px 4px; }
  .modal-foot { padding: 14px 20px 20px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  .toast-stack { top: 12px; right: 12px; }
  .limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-modal-meta { grid-template-columns: 1fr; gap: 8px; }
  .base-url-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .base-url-card .btn { width: 100%; }
}
@media (max-width: 720px) {
  .settings-form { grid-template-columns: 1fr; }
  .profile-line { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; min-height: 0; }
  .settings-form .form-alert, .settings-form > .field, .settings-form .form-actions { grid-column: 1; }
}
@media (max-width: 620px) {
  .brand-text .brand-version { display: none; }
  .page-title { font-size: clamp(26px, 8vw, 34px); }
  .page-sub { font-size: 13px; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
  .kv-grid .kv-card:last-child { grid-column: 1 / -1; }
  .create-key-form { flex-direction: column; align-items: stretch; }
  .create-key-form .btn { width: 100%; }
  .spark { height: 72px; }
  .event-row { grid-template-columns: 52px 7px 1fr; gap: 8px; }
  .key-code { font-size: 11.5px; }
  .upload-item { gap: 9px; padding: 9px 10px; }
  .feedback-submit { align-items: stretch; }
  .feedback-submit .btn { width: 100%; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .theme-preview { height: 76px; }
  .settings-code-row { flex-wrap: wrap; }
  .settings-code-row .btn { width: 100%; }
  .modal-foot .btn { flex: 1 1 100%; }
  .success-meta-item { padding: 10px 12px; }
  .page-notfound { min-height: auto; padding-top: 40px; }
  .auth-card { padding: 22px 18px; border-radius: 20px; }
  .auth-title { font-size: 23px; }
  .poster-title { font-size: clamp(30px, 8.6vw, 40px); }
  .poster-head .poster-tag { display: none; }
  .doc-section-title { font-size: 22px; }
  .security-list { grid-template-columns: 1fr; }
  .limit-grid { grid-template-columns: 1fr 1fr; }
  .key-modal-tools .btn { width: 100%; }
}
/* 设置页双列：左列 Security+Connection，右列 Account+Session（顶部紧凑堆叠） */
.settings-cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); align-items: stretch; }
.settings-col { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); min-width: 0; }
@media (min-width: 981px) { .settings-col > .settings-card:last-child { flex: 1 1 auto; } }
@media (max-width: 980px) { .settings-cols { grid-template-columns: 1fr; } }
