/*
 * ChatOmics 设计变量（方向："冷静精确"）。
 *
 * 中性冷灰底、一个青绿品牌色、细线条、信息密度高。颜色只用来表达状态与选中。
 * 明暗跟随 dsh：dsh 切暗色时在 body 上加 data-ds-dark-theme，我们据此切自己的一套。
 */

:root {
  --co-font:
    'Inter', 'Segoe UI Variable Text', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', system-ui,
    sans-serif;
  --co-mono: 'JetBrains Mono', 'Cascadia Mono', 'SF Mono', Consolas, monospace;

  --co-radius-s: 6px;
  --co-radius: 8px;
  --co-radius-l: 12px;

  --co-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --co-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --co-fast: 140ms;
  --co-mid: 260ms;
  --co-slow: 420ms;

  /* ── 明 ── */
  --co-canvas: #f4f6f8;
  --co-canvas-dot: #d5dbe3;
  --co-surface: #ffffff;
  --co-surface-2: #f7f8fa;
  --co-surface-3: #eef1f4;
  --co-hover: rgba(15, 23, 42, 0.045);
  --co-press: rgba(15, 23, 42, 0.08);
  --co-line: #e3e7ec;
  --co-line-strong: #c9d0d9;
  --co-text: #0f1728;
  --co-text-2: #4a5567;
  --co-text-3: #8591a3;
  --co-text-inverse: #ffffff;

  --co-brand: #0b8f82;
  --co-brand-strong: #087368;
  --co-brand-soft: rgba(11, 143, 130, 0.1);
  --co-brand-ring: rgba(11, 143, 130, 0.32);

  --co-ok: #1f9e63;
  --co-ok-soft: rgba(31, 158, 99, 0.1);
  --co-warn: #c9780a;
  --co-warn-soft: rgba(201, 120, 10, 0.11);
  --co-err: #d8453b;
  --co-err-soft: rgba(216, 69, 59, 0.09);
  --co-run: #2f6fe4;
  --co-run-soft: rgba(47, 111, 228, 0.1);
  --co-idle: #97a1b0;
  --co-idle-soft: rgba(151, 161, 176, 0.12);
  --co-model: #7a5af5;
  --co-model-soft: rgba(122, 90, 245, 0.12);

  --co-edge: #b3bcc8;
  --co-edge-strong: #6f7b8c;

  --co-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.02);
  --co-shadow-2: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
  --co-shadow-3: 0 16px 40px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
  /* ── 暗：深蓝灰，不是纯黑 ── */
  --co-canvas: #0d1117;
  --co-canvas-dot: #232b37;
  --co-surface: #151b24;
  --co-surface-2: #19202b;
  --co-surface-3: #202835;
  --co-hover: rgba(226, 232, 240, 0.05);
  --co-press: rgba(226, 232, 240, 0.09);
  --co-line: #252e3b;
  --co-line-strong: #364152;
  --co-text: #e6ebf2;
  --co-text-2: #a4afbf;
  --co-text-3: #6c788b;
  --co-text-inverse: #0d1117;

  --co-brand: #2ec4b3;
  --co-brand-strong: #52d6c7;
  --co-brand-soft: rgba(46, 196, 179, 0.13);
  --co-brand-ring: rgba(46, 196, 179, 0.38);

  --co-ok: #3ccf8a;
  --co-ok-soft: rgba(60, 207, 138, 0.12);
  --co-warn: #f0a53a;
  --co-warn-soft: rgba(240, 165, 58, 0.13);
  --co-err: #f2685e;
  --co-err-soft: rgba(242, 104, 94, 0.13);
  --co-run: #5b93ff;
  --co-run-soft: rgba(91, 147, 255, 0.14);
  --co-idle: #6f7a8b;
  --co-idle-soft: rgba(111, 122, 139, 0.16);
  --co-model: #a18bff;
  --co-model-soft: rgba(161, 139, 255, 0.15);

  --co-edge: #3c4757;
  --co-edge-strong: #8793a6;

  --co-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --co-shadow-2: 0 6px 18px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4);
  --co-shadow-3: 0 18px 48px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
}
}

/*
 * 外壳页面自己加的设计变量（其余全部来自流程面板的 theme.css，构建时拼在前面，见 build/css.ts）。
 * 面板里没有实心的品牌色按钮，所以没有"品牌色上的字"这一个。
 */

:root {
  --co-on-brand: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --co-on-brand: #06201d;
    color-scheme: dark;
  }
}

/* 外壳页面与"启动中"/提示页共用的底子：重置、链接、焦点、点阵底、按钮。 */

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
input::-ms-reveal,
input::-ms-clear {
  display: none;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-family: var(--co-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--co-text);
  background: var(--co-canvas);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--co-brand);
  text-decoration: none;
}
a:hover {
  color: var(--co-brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--co-brand);
  outline-offset: 2px;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.dots {
  background-image: radial-gradient(var(--co-canvas-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  background-position: -11px -11px;
}
/* 按钮与输入框共用的"控件"底 */
.btn,
.input {
  color: var(--co-text);
  background: var(--co-surface);
  border: 1px solid var(--co-line-strong);
  border-radius: var(--co-radius);
}
.btn {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background var(--co-fast),
    border-color var(--co-fast),
    box-shadow var(--co-fast),
    transform var(--co-fast),
    color var(--co-fast);
}
.btn:hover {
  background: var(--co-surface-2);
  border-color: var(--co-edge);
  text-decoration: none;
  color: var(--co-text);
}
.btn:active {
  transform: translateY(0.5px);
  background: var(--co-surface-3);
}
.btn.primary {
  background: var(--co-brand);
  border-color: transparent;
  color: var(--co-on-brand);
  box-shadow: 0 1px 2px rgba(8, 115, 104, 0.25);
}
.btn.primary:hover {
  background: var(--co-brand-strong);
  color: var(--co-on-brand);
}
.btn.danger {
  background: var(--co-err);
  border-color: transparent;
  color: #fff;
}
.btn.danger:hover {
  filter: brightness(0.94);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--co-text-2);
}
.btn.ghost:hover {
  background: var(--co-hover);
  color: var(--co-text);
}
.btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.btn.block {
  width: 100%;
  height: 40px;
}
.btn.icon {
  width: 32px;
  height: 32px;
  padding: 0;
}
.btn[disabled] {
  opacity: 0.62;
  cursor: default;
  pointer-events: none;
}
.spin {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 外壳前端的页面：登录 / 注册 / 改密码、项目列表、对话框、提示条（照定稿原型 .dsh-dev/prototype-shell）。 */

/* 容器查询按应用自己的宽度排版（窄屏单栏） */
#root {
  min-height: 100%;
  container-type: inline-size;
  container-name: app;
}
.view {
  min-height: 100%;
  animation: view-in var(--co-mid) var(--co-ease);
}
/* ── 品牌 ── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--co-text);
}
.brand svg {
  color: var(--co-brand);
  flex: none;
}
.brand.lg {
  font-size: 17px;
}
.brand.sm {
  font-size: 15px;
}
/* ── 表单 ── */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field > label,
.field > .label {
  font-size: 13px;
  font-weight: 550;
  color: var(--co-text-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.field .aside {
  font-weight: 400;
  font-size: 12px;
  color: var(--co-text-3);
}
.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  transition:
    border-color var(--co-fast),
    box-shadow var(--co-fast),
    background var(--co-fast);
}
.input::placeholder {
  color: var(--co-text-3);
}
.input:hover {
  border-color: var(--co-edge);
}
.input:focus {
  outline: none;
  border-color: var(--co-brand);
  box-shadow: 0 0 0 3px var(--co-brand-ring);
}
.input.mono {
  font-family: var(--co-mono);
  letter-spacing: 0.04em;
}
.field.bad .input {
  border-color: var(--co-err);
}
.field.bad .input:focus {
  box-shadow: 0 0 0 3px var(--co-err-soft);
}
.input-wrap {
  position: relative;
}
.input-wrap .input {
  padding-right: 40px;
}
.input-wrap .eye {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  border-radius: var(--co-radius-s);
  color: var(--co-text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.input-wrap .eye:hover {
  color: var(--co-text);
  background: var(--co-hover);
}
.hint {
  font-size: 12px;
  color: var(--co-text-3);
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hint:empty {
  display: none;
}
.hint.err {
  color: var(--co-err);
}
.hint.ok {
  color: var(--co-ok);
}
.hint svg {
  flex: none;
}
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
  border-radius: var(--co-radius);
  border: 1px solid transparent;
  animation: view-in var(--co-mid) var(--co-ease);
}
.alert svg {
  flex: none;
  margin-top: 2px;
}
.alert.err {
  background: var(--co-err-soft);
  color: var(--co-err);
  border-color: color-mix(in srgb, var(--co-err) 22%, transparent);
}
.alert.warn {
  background: var(--co-warn-soft);
  color: var(--co-warn);
  border-color: color-mix(in srgb, var(--co-warn) 24%, transparent);
}
.alert.info {
  background: var(--co-brand-soft);
  color: var(--co-brand-strong);
  border-color: color-mix(in srgb, var(--co-brand) 22%, transparent);
}
.alert b {
  font-weight: 600;
}
.shake {
  animation: shake 360ms var(--co-ease);
}
@keyframes shake {
  20% {
    transform: translateX(-5px);
  }
  45% {
    transform: translateX(4px);
  }
  70% {
    transform: translateX(-2px);
  }
}
/* ── 登录 / 注册 / 改密码 ── */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 1fr);
}
.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px 44px 40px;
  border-right: 1px solid var(--co-line);
  background:
    radial-gradient(900px 520px at 8% -12%, var(--co-brand-soft), transparent 62%),
    radial-gradient(720px 480px at 112% 112%, var(--co-run-soft), transparent 60%),
    var(--co-surface-2);
}
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  background-image: radial-gradient(var(--co-canvas-dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 64%, transparent 92%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 64%, transparent 92%);
}
.hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.beta {
  font-size: 12px;
  font-weight: 550;
  color: var(--co-brand-strong);
  background: var(--co-surface);
  border: 1px solid color-mix(in srgb, var(--co-brand) 30%, transparent);
  padding: 2px 10px;
  border-radius: 999px;
}
/* 对话窗口按最终内容的高度定高（--ideal 由脚本量出）；它和下面的标语作为一组在左栏里垂直居中：窗口很高时空白分在上下 */
.stage {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  margin-top: auto;
  display: flex;
  padding: 2px 0 0 4%;
}
.chat {
  position: relative;
  flex: 1;
  min-height: 0;
  height: var(--ideal, calc(100vh - 296px));
  max-height: calc(100vh - 296px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: 16px;
  box-shadow: var(--co-shadow-3);
  animation: rise 600ms var(--co-ease) both 100ms;
}
.chat-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--co-line);
  font-size: 12.5px;
  color: var(--co-text-2);
  background: var(--co-surface-2);
}
.chat-head .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--co-ok);
  box-shadow: 0 0 0 3px var(--co-ok-soft);
}
.chat-head .grow {
  flex: 1;
}
.chat-head .dim {
  color: var(--co-text-3);
}
.chat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 16px 10px;
  overflow: hidden;
}
.chat [data-at]:not(.in) {
  display: none;
}
.chat [data-at].in {
  animation: rise 420ms var(--co-ease) both;
}
.msg-user {
  flex: none;
  align-self: flex-end;
  max-width: 80%;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--co-on-brand);
  background: var(--co-brand);
  border-radius: 14px 14px 4px 14px;
}
.msg-bot {
  flex: none;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}
.msg-bot .av {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--co-brand);
  background: var(--co-brand-soft);
}
.msg-bot .col {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.msg-bot p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--co-text);
}
.wf {
  border: 1px solid var(--co-line);
  border-radius: 11px;
  background: var(--co-surface-2);
  overflow: hidden;
}
.wf-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--co-text-2);
}
.wf-head b {
  font-weight: 600;
  color: var(--co-text);
}
.wf-head .grow {
  flex: 1;
}
.wf-head .cnt {
  font-family: var(--co-mono);
  font-size: 11px;
  color: var(--co-text-3);
}
.wf-bar {
  height: 2px;
  background: var(--co-surface-3);
}
.wf-bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--co-brand);
  transition: width 500ms var(--co-ease);
}
.wf-steps {
  list-style: none;
  margin: 0;
  padding: 5px 0;
}
.wf-steps li {
  display: grid;
  grid-template-columns: 14px 56px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  height: 27px;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--co-text-3);
  transition: color var(--co-mid);
}
.wf-steps .s {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--co-idle);
  justify-self: center;
  transition:
    background var(--co-mid),
    border-color var(--co-mid);
}
.wf-steps .meta {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--co-text-3);
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity var(--co-mid),
    transform var(--co-mid) var(--co-ease);
}
.wf-steps li.run {
  color: var(--co-run);
}
.wf-steps li.run .s {
  border-color: currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.wf-steps li.done {
  color: var(--co-text);
}
.wf-steps li.done .s {
  border-color: var(--co-ok);
  background: var(--co-ok);
  box-shadow: inset 0 0 0 2px var(--co-surface-2);
}
.wf-steps li.done .meta {
  opacity: 1;
  transform: none;
}
.wf-sum {
  display: none;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--co-text-2);
}
.wf-sum .ok {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--co-ok-soft);
  color: var(--co-ok);
}
.wf-sum .ok svg {
  width: 11px;
  height: 11px;
}
.wf-sum .chips {
  display: flex;
  gap: 3px;
  margin-left: auto;
}
.wf-sum .chips i {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--co-ok);
  opacity: 0.7;
}
.wf.folded .wf-head,
.wf.folded .wf-bar,
.wf.folded .wf-steps {
  display: none;
}
.wf.folded .wf-sum {
  display: flex;
  animation: rise 360ms var(--co-ease) both;
}
.fig {
  position: relative;
  padding: 10px 12px 6px;
  border: 1px solid var(--co-line);
  border-radius: 11px;
  background: var(--co-surface);
}
.fig-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
  font-size: 11.5px;
  color: var(--co-text-3);
}
.fig-head b {
  color: var(--co-text);
  font-size: 12.5px;
  font-weight: 600;
}
.fig-head .grow {
  flex: 1;
}
.fig-head .lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.fig-head .lg i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.fig .scatter {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 620px);
  min-height: 170px;
}
.chat-input {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin: 0 12px 12px;
  padding: 0 6px 0 12px;
  font-size: 13px;
  color: var(--co-text);
  background: var(--co-surface);
  border: 1px solid var(--co-line-strong);
  border-radius: 12px;
}
.chat-input .typed-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.chat-input .caret {
  flex: none;
  width: 1.5px;
  height: 16px;
  margin-left: 1px;
  background: var(--co-brand);
  animation: blink 1s steps(1) infinite;
}
.chat-input .ph {
  color: var(--co-text-3);
  margin-left: 2px;
}
.chat-input.has-text .ph {
  display: none;
}
.chat-input .send {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--co-text-3);
  background: var(--co-surface-3);
  transition:
    background var(--co-fast),
    color var(--co-fast),
    transform var(--co-fast);
}
.chat-input .send.ready {
  color: var(--co-on-brand);
  background: var(--co-brand);
}
.chat-input .send.press {
  transform: scale(0.88);
}
.chat-input .send .i-stop {
  display: none;
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
  background: currentColor;
}
.chat-input .send.stop {
  color: var(--co-on-brand);
  background: var(--co-text);
}
@media (prefers-color-scheme: dark) {
  .chat-input .send.stop {
    background: var(--co-text-2);
  }
}
.chat-input .send.stop .i-send {
  display: none;
}
.chat-input .send.stop .i-stop {
  display: block;
}
.chat-input .send > span {
  display: grid;
  place-items: center;
}
/* 空对话：字标与标语在上、输入框在中间；发出去后输入框滑到底，字标淡出 */
.chat-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 92px);
  display: grid;
  justify-items: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 320ms var(--co-ease),
    transform 420ms var(--co-ease);
}
.chat-empty .mk {
  color: var(--co-brand);
}
.chat-empty b {
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.015em;
}
.chat.blank .chat-empty {
  opacity: 1;
  transform: none;
}
.chat.blank .chat-input {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 4px);
}
.chat.measure {
  height: auto !important;
  max-height: none !important;
}
.chat.measure .chat-body {
  flex: none;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  padding: 6px 9px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.5;
  background: var(--co-surface);
  border: 1px solid var(--co-line-strong);
  border-radius: 8px;
  box-shadow: var(--co-shadow-2);
  transform: translate(-50%, calc(-100% - 12px));
}
.tip b {
  font-style: italic;
  font-weight: 600;
}
.tip span {
  display: block;
  color: var(--co-text-3);
  font-family: var(--co-mono);
  font-size: 11px;
}
.hero-copy {
  position: relative;
  max-width: 480px;
  margin-bottom: auto;
}
.hero-copy h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-copy p {
  margin: 0 0 18px;
  color: var(--co-text-2);
  font-size: 15px;
  line-height: 1.7;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  font-size: 12.5px;
  color: var(--co-text-2);
  border: 1px solid var(--co-line);
  border-radius: 999px;
  background: var(--co-surface);
}
.hero-points li i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--co-brand);
}
.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--co-surface);
  position: relative;
}
.auth-card {
  width: 100%;
  max-width: 360px;
}
.auth-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.015em;
}
.auth-card .sub {
  margin: 0 0 24px;
  color: var(--co-text-2);
}
.auth-card form {
  margin-top: 4px;
}
.auth-card .alt {
  margin: 20px 0 0;
  text-align: center;
  color: var(--co-text-2);
  font-size: 13.5px;
}
.auth-card .fine {
  margin: 8px 0 0;
  text-align: center;
  color: var(--co-text-3);
  font-size: 12px;
}
.auth-top {
  display: none;
  margin-bottom: 28px;
}
.auth-foot {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--co-text-3);
}
/* 备案号：登录页在"内测中"那行下面，项目列表在页面最底下；与那行同色，悬停才显出是链接 */
.filing {
  margin-top: 4px;
  font-size: 12px;
  color: var(--co-text-3);
}
.filing a {
  color: inherit;
}
.filing a:hover {
  color: var(--co-text-2);
  text-decoration: underline;
}
.page-foot {
  padding: 0 28px 24px;
  text-align: center;
}
.page-foot:empty {
  display: none;
}
@container app (max-width: 820px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    display: none;
  }
  .auth-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .auth-top .tag {
    color: var(--co-text-2);
    font-size: 13px;
  }
}
/* 火山图：显著区淡底、浅网格、点从基线长上来、基因名小标签 */
.scatter .zone-up {
  fill: var(--co-brand);
  opacity: 0.055;
}
.scatter .zone-down {
  fill: var(--co-run);
  opacity: 0.05;
}
.scatter .gl {
  stroke: var(--co-line);
  stroke-width: 1;
}
.scatter .base {
  stroke: var(--co-line-strong);
  stroke-width: 1;
}
.scatter .thr {
  stroke: var(--co-edge);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.scatter .tick {
  fill: var(--co-text-3);
  font-size: 10.5px;
  font-family: var(--co-mono);
}
.scatter .ax-label {
  fill: var(--co-text-3);
  font-size: 11px;
}
.scatter .pt {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.fig.go .pt {
  animation: pt-rise 900ms var(--co-ease) both;
  animation-delay: var(--d);
}
@keyframes pt-rise {
  from {
    opacity: 0;
    transform: translateY(var(--dy)) scale(0.4);
  }
  to {
    opacity: var(--o);
    transform: none;
  }
}
.scatter .ns {
  fill: var(--co-edge);
  --o: 0.4;
}
.scatter .up {
  fill: var(--co-brand);
  --o: 0.9;
  stroke: var(--co-surface);
  stroke-width: 0.8;
}
.scatter .down {
  fill: var(--co-run);
  --o: 0.86;
  stroke: var(--co-surface);
  stroke-width: 0.8;
}
.scatter .sig {
  cursor: pointer;
}
.scatter .pt.hot {
  stroke: var(--co-text);
  stroke-width: 1.4;
}
.scatter .tag {
  opacity: 0;
}
.fig.go .tag {
  animation: fade-in 500ms var(--co-ease) forwards;
  animation-delay: 1400ms;
}
.scatter .tag rect {
  fill: var(--co-surface);
  stroke: var(--co-line-strong);
}
.scatter .tag text {
  fill: var(--co-text);
  font-size: 10.5px;
  font-style: italic;
  font-weight: 550;
}
.scatter .tag line {
  stroke: var(--co-text-3);
  stroke-width: 0.8;
}
.scatter .halo {
  fill: none;
  stroke-width: 1.2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.fig.go .halo {
  animation: halo 2.8s var(--co-ease) infinite;
  animation-delay: 1900ms;
}
@keyframes halo {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
/* 同一次访问里第二次进登录 / 注册页、或系统要求少动效：直接给结果，不再重播 */
.auth-hero.played .chat,
.auth-hero.played [data-at].in,
.auth-hero.played .wf-sum {
  animation: none;
}
.auth-hero.played .pt {
  animation: none;
  opacity: var(--o);
}
.auth-hero.played .tag {
  animation: none;
  opacity: 1;
}
/* ── 顶栏 ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--co-surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--co-line);
}
.topbar .grow {
  flex: 1;
}
.usermenu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  color: var(--co-text-2);
  font-size: 13.5px;
}
.usermenu-btn:hover {
  background: var(--co-hover);
  color: var(--co-text);
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--co-brand-strong);
  background: var(--co-brand-soft);
  border: 1px solid color-mix(in srgb, var(--co-brand) 25%, transparent);
}
/* ── 弹出菜单 ── */
.menu {
  position: absolute;
  z-index: 40;
  min-width: 188px;
  padding: 5px;
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: 10px;
  box-shadow: var(--co-shadow-3);
  animation: menu-in var(--co-fast) var(--co-ease);
  transform-origin: top right;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-3px);
  }
}
.menu .head {
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--co-line);
  margin: -5px -5px 5px;
}
.menu .head b {
  display: block;
  font-weight: 600;
}
.menu .head span {
  color: var(--co-text-3);
  font-size: 12.5px;
}
.menu button,
.menu a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: none;
  border-radius: var(--co-radius-s);
  color: var(--co-text);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.menu button:hover,
.menu a:hover {
  background: var(--co-hover);
  text-decoration: none;
  color: var(--co-text);
}
.menu svg {
  color: var(--co-text-3);
  flex: none;
}
.menu .danger,
.menu .danger svg {
  color: var(--co-err);
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--co-line);
  margin: 5px -5px;
}
/* ── 项目列表 ── */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 28px 72px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head .count {
  color: var(--co-text-3);
  font-size: 13px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-head .count .live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--co-ok);
}
.page-head .count .live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--co-ok);
}
.page-head .grow {
  flex: 1;
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search {
  position: relative;
}
.search svg {
  position: absolute;
  left: 10px;
  top: 9px;
  color: var(--co-text-3);
  pointer-events: none;
}
.search .input {
  height: 34px;
  width: 200px;
  padding-left: 32px;
  font-size: 13.5px;
}
.select {
  height: 34px;
  padding: 0 28px 0 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--co-text-2);
  cursor: pointer;
  background: var(--co-surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238591a3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 9px center;
  border: 1px solid var(--co-line-strong);
  border-radius: var(--co-radius);
  appearance: none;
}
.select:focus {
  outline: none;
  border-color: var(--co-brand);
  box-shadow: 0 0 0 3px var(--co-brand-ring);
}
.viewseg {
  display: inline-flex;
  height: 34px;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--co-line-strong);
  border-radius: var(--co-radius);
  background: var(--co-surface);
}
.viewseg button {
  width: 30px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--co-text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background var(--co-fast),
    color var(--co-fast);
}
.viewseg button:hover {
  color: var(--co-text);
}
.viewseg button[aria-pressed='true'] {
  background: var(--co-surface-3);
  color: var(--co-text);
}
@container app (max-width: 640px) {
  .viewseg {
    display: none;
  }
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
@container app (max-width: 640px) {
  .page {
    padding: 24px 16px 56px;
  }
  .page-head .tools {
    width: 100%;
  }
  .page-head .search {
    flex: 1;
    min-width: 0;
  }
  .page-head .search .input {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 142px;
  padding: 16px 14px 14px 16px;
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius-l);
  transition:
    border-color var(--co-fast),
    box-shadow var(--co-mid) var(--co-ease),
    transform var(--co-mid) var(--co-ease),
    opacity var(--co-mid);
  animation: card-in var(--co-slow) var(--co-ease) backwards;
  animation-delay: var(--i, 0ms);
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.pcard:hover {
  border-color: var(--co-line-strong);
  box-shadow: var(--co-shadow-2);
  transform: translateY(-1px);
}
.pcard.flash {
  animation: flash 1.6s var(--co-ease);
}
@keyframes flash {
  0%,
  40% {
    box-shadow: 0 0 0 3px var(--co-brand-ring);
    border-color: var(--co-brand);
  }
}
.pcard.leaving {
  opacity: 0;
  transform: scale(0.96);
}
.pcard .cover {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
}
.pcard .cover:hover {
  text-decoration: none;
}
.pcard > :not(.cover) {
  position: relative;
  z-index: 1;
}
.pcard .row1 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* 项目头像：项目自己的颜色做字、它的浅色做底（与项目里左上角的切换器同一个） */
.avatar {
  --c: var(--av, var(--co-brand));
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--co-radius-s);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: var(--c);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .avatar {
    --c: var(--av-dark, var(--co-brand));
    background: color-mix(in srgb, var(--c) 17%, transparent);
  }
}
.pcard .avatar {
  margin-top: -2px;
}
.prow .avatar {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 5px;
  font-size: 11px;
}
.pcard .name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.45;
  color: var(--co-text);
  word-break: break-word;
  pointer-events: none;
}
.pcard .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--co-text-3);
  font-size: 12.5px;
  pointer-events: none;
}
.pcard .meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pcard .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pcard .foot .note {
  font-size: 12px;
  color: var(--co-text-3);
  pointer-events: none;
}
.pcard .open-btn svg {
  transition: transform var(--co-fast) var(--co-ease);
}
.pcard:hover .open-btn {
  background: var(--co-brand);
  color: var(--co-on-brand);
  border-color: transparent;
}
.pcard:hover .open-btn svg {
  transform: translateX(2px);
}
.more-btn {
  width: 28px;
  height: 28px;
  margin: -3px -4px 0 0;
  border: 0;
  border-radius: var(--co-radius-s);
  background: none;
  color: var(--co-text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.more-btn:hover,
.more-btn[aria-expanded='true'] {
  background: var(--co-hover);
  color: var(--co-text);
}
.rename-input {
  flex: 1;
  height: 30px;
  margin: -4px 0 -4px -6px;
  padding: 0 6px;
  font: inherit;
  font-size: 15px;
  font-weight: 620;
  color: var(--co-text);
  background: var(--co-surface);
  border: 1px solid var(--co-brand);
  border-radius: var(--co-radius-s);
  box-shadow: 0 0 0 3px var(--co-brand-ring);
  outline: none;
}
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  flex: none;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: default;
  transition:
    background var(--co-mid),
    color var(--co-mid);
}
.state .dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.state.running {
  color: var(--co-ok);
  background: var(--co-ok-soft);
}
.state.running .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: ping 2.2s var(--co-ease) infinite;
}
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  80%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
/* 管理员正在恢复（M3-7）：与启动中同一个样子——在进行、稍等，不是出了问题 */
.state.starting,
.state.restoring {
  color: var(--co-run);
  background: var(--co-run-soft);
}
.state.starting .dot,
.state.restoring .dot {
  background: none;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  width: 9px;
  height: 9px;
  animation: spin 0.8s linear infinite;
}
.state.stopping {
  color: var(--co-text-3);
  background: var(--co-idle-soft);
}
.state.stopping .dot {
  animation: breathe 1.2s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    opacity: 0.3;
  }
}
.state.stopped {
  color: var(--co-text-3);
  border-color: var(--co-line);
}
.state.stopped .dot {
  background: none;
  border: 1.5px solid currentColor;
}
.state.fresh {
  color: var(--co-brand-strong);
  background: var(--co-brand-soft);
}
.state.fresh .dot {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border-radius: 1.5px;
}
/* 表格版式 */
.ptable {
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius-l);
  overflow: visible;
}
.prow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 128px 116px 128px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 10px 0 18px;
  border-top: 1px solid var(--co-line);
  transition:
    background var(--co-fast),
    opacity var(--co-mid);
  animation: card-in var(--co-slow) var(--co-ease) backwards;
  animation-delay: var(--i, 0ms);
}
.prow:first-child {
  border-top: 0;
}
.prow.headrow {
  min-height: 38px;
  font-size: 12px;
  font-weight: 550;
  color: var(--co-text-3);
  background: var(--co-surface-2);
  border-radius: var(--co-radius-l) var(--co-radius-l) 0 0;
  animation: none;
}
.prow:not(.headrow):hover {
  background: var(--co-surface-2);
}
.prow.flash {
  animation: flash-row 1.6s var(--co-ease);
}
@keyframes flash-row {
  0%,
  40% {
    background: var(--co-brand-soft);
  }
}
.prow.leaving {
  opacity: 0;
}
.prow .cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.prow > :not(.cover) {
  position: relative;
  z-index: 1;
}
.prow .name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
}
.prow .name .rename-input {
  font-size: 14px;
  margin: 0;
}
.prow .c {
  color: var(--co-text-3);
  font-size: 13px;
  pointer-events: none;
}
.prow .acts {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.prow .more-btn {
  margin: 0;
}
@container app (max-width: 760px) {
  .prow {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .prow .c,
  .prow.headrow .c {
    display: none;
  }
}
/* 空状态 */
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 56px 20px 48px;
  background: var(--co-surface);
  border: 1px dashed var(--co-line-strong);
  border-radius: 16px;
}
.empty h2 {
  margin: 18px 0 8px;
  font-size: 19px;
  font-weight: 680;
}
.empty p {
  margin: 0 0 22px;
  max-width: 460px;
  color: var(--co-text-2);
  line-height: 1.7;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 170px));
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.steps li {
  padding: 12px 12px 12px;
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius);
  background: var(--co-surface-2);
}
.steps b {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}
.steps b em {
  font-style: normal;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--co-brand-strong);
  background: var(--co-brand-soft);
}
.steps span {
  color: var(--co-text-3);
  font-size: 12.5px;
  line-height: 1.55;
  display: block;
}
@container app (max-width: 620px) {
  .steps {
    grid-template-columns: 1fr;
    width: 100%;
  }
}
.illus .l1 {
  animation: float 5s ease-in-out infinite;
}
.illus .l2 {
  animation: float 5s ease-in-out infinite;
  animation-delay: -1.6s;
}
.illus .l3 {
  animation: float 5s ease-in-out infinite;
  animation-delay: -3.2s;
}
@keyframes float {
  50% {
    transform: translateY(-2.5px);
  }
}
.noresult {
  padding: 36px;
  text-align: center;
  color: var(--co-text-3);
}
/* 回收站 */
.trash {
  margin-top: 36px;
}
/* 收起 / 展开的那一行字（回收站；额度页的"已失效几张""显示全部"也用它） */
.trash-toggle,
.q-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  margin-left: -8px;
  border: 0;
  background: none;
  color: var(--co-text-3);
  font-size: 13px;
  border-radius: var(--co-radius-s);
  cursor: pointer;
}
.trash-toggle:hover,
.q-toggle:hover {
  background: var(--co-hover);
  color: var(--co-text-2);
}
.trash-toggle .chev {
  transition: transform var(--co-mid) var(--co-ease);
}
.trash-toggle[aria-expanded='true'] .chev {
  transform: rotate(90deg);
}
.trash-list {
  margin-top: 10px;
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius-l);
  background: var(--co-surface);
  animation: view-in var(--co-mid) var(--co-ease);
}
.trow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 16px;
  border-top: 1px solid var(--co-line);
}
.trow:first-child {
  border-top: 0;
}
.trow .name {
  flex: 1;
  min-width: 0;
  color: var(--co-text-2);
}
.trow .name small {
  display: block;
  color: var(--co-text-3);
  font-size: 12px;
}
.trash-note {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--co-text-3);
  border-top: 1px solid var(--co-line);
  background: var(--co-surface-2);
  border-radius: 0 0 var(--co-radius-l) var(--co-radius-l);
}
/* ── 对话框 ── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 17, 23, 0.36);
  backdrop-filter: blur(2px);
  animation: scrim-in var(--co-mid) var(--co-ease);
}
@media (prefers-color-scheme: dark) {
  .scrim {
    background: rgba(0, 0, 0, 0.55);
  }
}
@keyframes scrim-in {
  from {
    opacity: 0;
  }
}
.dialog {
  width: 100%;
  max-width: 440px;
  max-height: calc(100% - 20px);
  overflow: auto;
  padding: 22px 22px 18px;
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: 14px;
  box-shadow: var(--co-shadow-3);
  animation: dialog-in var(--co-mid) var(--co-ease);
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}
.dialog h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.dialog .lead {
  margin: 0 0 18px;
  color: var(--co-text-2);
  line-height: 1.65;
}
.dialog .actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.dialog .actions .left {
  margin-right: auto;
}
.dialog.wide {
  max-width: 560px;
}
.notice .hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.notice .hero .badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--co-brand);
  background: var(--co-brand-soft);
  flex: none;
}
.notice .hero h2 {
  margin: 0;
}
.notice .hero p {
  margin: 1px 0 0;
  color: var(--co-text-3);
  font-size: 13px;
}
.notice ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.notice li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 11px 4px;
  border-top: 1px solid var(--co-line);
}
.notice li:first-child {
  border-top: 0;
}
.notice li .ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--co-surface-3);
  color: var(--co-text-2);
}
.notice li b {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.notice li span {
  color: var(--co-text-2);
  font-size: 13px;
  line-height: 1.65;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--co-radius);
  background: var(--co-surface-2);
  border: 1px solid var(--co-line);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--co-brand);
  margin: 0;
}
/* ── 提示条 ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 8px 8px 8px 16px;
  transform: translateX(-50%);
  color: #e6ebf2;
  background: #1b2330;
  border-radius: 10px;
  box-shadow: var(--co-shadow-3);
  font-size: 13.5px;
  animation: toast-in var(--co-mid) var(--co-ease);
}
@media (prefers-color-scheme: dark) {
  .toast {
    background: #2a3444;
  }
}
.toast.out {
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: all var(--co-mid) var(--co-ease);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}
.toast button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #7fe3d7;
  font-weight: 600;
  cursor: pointer;
}
.toast button:hover {
  background: rgba(255, 255, 255, 0.14);
}
.toast .spacer {
  width: 8px;
}
/* 菜单按钮的外层（菜单本身经 portal 放到 body 下、按按钮的位置 fixed 定位） */
.menu-anchor {
  display: inline-flex;
}
.trash-toggle .chev {
  display: inline-flex;
}
.pcard .name .rename-input {
  width: 100%;
}

/* ── 顶栏的额度小标 ── */
.topbar-home {
  display: inline-flex;
  color: inherit;
}
.topbar-home:hover {
  text-decoration: none;
  color: inherit;
}
.qbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 9px;
  border: 1px solid var(--co-line-strong);
  border-radius: 999px;
  background: var(--co-surface);
  color: var(--co-text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition:
    background var(--co-fast),
    border-color var(--co-fast),
    color var(--co-fast);
}
.qbadge:hover {
  text-decoration: none;
  background: var(--co-surface-2);
  border-color: var(--co-edge);
  color: var(--co-text);
}
.qbadge svg {
  flex: none;
  color: var(--co-text-3);
}
.qbadge.is-low,
.qbadge.is-expiring {
  background: var(--co-warn-soft);
  border-color: color-mix(in srgb, var(--co-warn) 35%, transparent);
  color: var(--co-text);
}
.qbadge.is-low svg,
.qbadge.is-expiring svg {
  color: var(--co-warn);
}
.qbadge.is-empty {
  background: var(--co-err-soft);
  border-color: color-mix(in srgb, var(--co-err) 35%, transparent);
  color: var(--co-err);
}
.qbadge.is-empty svg {
  color: var(--co-err);
}
/* ── 额度页 ── */
.q-page {
  max-width: 920px;
}
.q-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--co-text-3);
  font-size: 13px;
}
.q-back:hover {
  color: var(--co-text);
  text-decoration: none;
}
.q-loading {
  color: var(--co-text-3);
  padding: 40px 0;
}
.q-box,
.q-summary {
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius-l);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.q-box h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 650;
}
.q-box h2 svg {
  color: var(--co-text-3);
}
.q-count {
  margin-left: auto;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--co-text-3);
  font-variant-numeric: tabular-nums;
}
.q-empty {
  margin: 0;
  color: var(--co-text-3);
  font-size: 13px;
}
.q-dim {
  color: var(--co-text-3);
}
.q-warn {
  color: var(--co-warn);
  font-weight: 550;
}

/* 合计 */
.q-summary {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.q-total {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.q-label {
  font-size: 12.5px;
  color: var(--co-text-3);
}
.q-big {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.q-big small {
  font-size: 15px;
  font-weight: 500;
  margin-left: 6px;
  color: var(--co-text-2);
  letter-spacing: 0;
}
.q-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--co-text-2);
}
.q-summary.is-low .q-line,
.q-summary.is-expiring .q-line {
  color: var(--co-warn);
}
.q-summary.is-empty .q-line {
  color: var(--co-err);
}
.q-summary.is-empty .q-big {
  color: var(--co-text-3);
}
.q-debt {
  font-size: 12.5px;
  color: var(--co-text-3);
}
.q-redeem-slot {
  flex: 1 1 300px;
  max-width: 380px;
  padding-left: 24px;
  border-left: 1px solid var(--co-line);
}
.q-redeem {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.q-redeem label {
  font-size: 12.5px;
  color: var(--co-text-3);
}
.q-redeem-row {
  display: flex;
  gap: 8px;
}
.q-redeem-row .input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  font-family: var(--co-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.q-redeem .hint {
  min-height: 18px;
}

/* 卡 */
.q-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-cards.is-ended {
  margin-top: 10px;
  animation: view-in var(--co-mid) var(--co-ease);
}
.q-card {
  padding: 12px 14px;
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius);
  background: var(--co-surface);
}
.q-card.is-fresh {
  animation: q-fresh 1.6s var(--co-ease);
}
@keyframes q-fresh {
  from {
    background: var(--co-brand-soft);
    border-color: var(--co-brand);
  }
}
.q-card.is-ended {
  background: var(--co-surface-2);
  color: var(--co-text-3);
}
.q-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.q-card-head .grow {
  flex: 1;
}
.q-card-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
.q-card-name svg {
  color: var(--co-brand);
}
.q-card.is-ended .q-card-name svg {
  color: var(--co-text-3);
}
.q-tag {
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--co-brand-strong);
  background: var(--co-brand-soft);
}
.q-card-left {
  font-size: 13px;
  color: var(--co-text-3);
  font-variant-numeric: tabular-nums;
}
.q-card-left b {
  color: var(--co-text);
  font-weight: 650;
  font-size: 14px;
}
.q-meter {
  height: 6px;
  margin: 9px 0 8px;
  border-radius: 999px;
  background: var(--co-surface-3);
  overflow: hidden;
}
.q-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--co-brand);
  transition: width var(--co-slow) var(--co-ease);
}
.q-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 12.5px;
  color: var(--co-text-2);
}
.q-card.is-ended .q-card-foot {
  margin-top: 6px;
  color: var(--co-text-3);
}
/* 收起 / 展开那一行的底子在 app.css（与回收站的同一种） */
.q-toggle {
  gap: 6px;
  height: auto;
  margin: 12px 0 0 -4px;
  padding: 4px 8px 4px 4px;
}
.q-page .chev {
  display: inline-flex;
  transition: transform var(--co-mid) var(--co-ease);
}
.q-page .chev.open {
  transform: rotate(90deg);
}

/* 购买链接、联系管理员 */
.q-buy {
  font-weight: 550;
}
.q-buy-line {
  font-size: 12.5px;
}
.q-contact {
  position: relative;
  display: inline-block;
}
.q-contact button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--co-brand);
  font-weight: 550;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
/* 浮出来的小卡片（联系方式、用量柱子的悬停提示）：在上方居中 */
.q-contact-card,
.q-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: var(--co-surface);
  border: 1px solid var(--co-line);
  border-radius: var(--co-radius-s);
  box-shadow: var(--co-shadow-2);
}
.q-contact-card {
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: 320px;
  padding: 8px 11px;
  white-space: pre-line;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--co-text);
}

/* 存储与资源 */
.q-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.q-pair .q-box {
  margin-bottom: 14px;
}
.q-figure {
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.q-figure small {
  font-size: 13px;
  font-weight: 400;
  color: var(--co-text-3);
  margin-left: 2px;
}
.q-sep {
  width: 1px;
  height: 16px;
  margin: 0 14px;
  background: var(--co-line-strong);
  align-self: center;
}
.q-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--co-text-3);
}
.q-machine .q-figure {
  margin-bottom: 8px;
}
.q-storage.is-high .q-meter i {
  background: var(--co-warn);
}
.q-storage.is-full .q-meter i {
  background: var(--co-err);
}
.q-storage.is-high .q-note {
  color: var(--co-warn);
}
.q-storage.is-full .q-note {
  color: var(--co-err);
}

/* 用量：每天的点数 */
.q-bars {
  position: relative;
  margin: 4px 0 14px;
}
.q-bars-max {
  font-size: 11.5px;
  color: var(--co-text-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.q-bars-plot {
  position: relative;
  height: 96px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-top: 1px dashed var(--co-line);
  border-bottom: 1px solid var(--co-line-strong);
}
.q-bar {
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: flex-end;
  cursor: default;
}
.q-bar i {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--co-brand);
  opacity: 0.82;
  transition: opacity var(--co-fast);
}
.q-bar.is-hover {
  background: var(--co-hover);
}
.q-bar.is-hover i {
  opacity: 1;
}
.q-tip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--co-text-2);
  pointer-events: none;
  z-index: 2;
}
.q-tip b {
  color: var(--co-text);
  font-weight: 600;
}
.q-bars-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--co-text-3);
}
.q-days {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.q-days th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--co-text-3);
  padding: 6px 8px;
  border-bottom: 1px solid var(--co-line);
}
.q-days td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--co-line);
}
.q-days .num {
  text-align: right;
  width: 120px;
}
.q-days td:first-child {
  white-space: nowrap;
}
.q-day-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--co-text);
}
.q-day-btn .chev {
  color: var(--co-text-3);
}
.q-day-project td {
  color: var(--co-text-3);
  background: var(--co-surface-2);
  font-size: 12.5px;
}
.q-day-project td:first-child {
  padding-left: 30px;
}

@container app (max-width: 720px) {
  .q-pair {
    grid-template-columns: 1fr;
  }
  .q-redeem-slot {
    max-width: none;
    padding-left: 0;
    border-left: 0;
    padding-top: 16px;
    border-top: 1px solid var(--co-line);
  }
  .q-days .num {
    width: auto;
  }
  .q-day-project td:first-child {
    white-space: normal;
  }
}
