:root,
html[data-theme="terminal-off"] {
  --bg: #060a08;
  --bg-soft: #0a120d;
  --surface: #0d1712;
  --surface-2: #11201a;
  --border: #1e3a2b;
  --text: #d3f5e2;
  --muted: #6fae8c;
  --primary: #00e68a;
  --primary-2: #22c55e;
  --accent: #ffd166;
  --btn-text: #04140c;
  --success: #00e68a;
  --warning: #ffd166;
  --danger: #ff5c5c;
  --radius: 6px;
  --font: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --shadow: 0 0 0 1px rgba(0, 230, 138, 0.08), 0 8px 24px rgba(0, 0, 0, 0.5);
  --glow: 0 0 18px rgba(0, 230, 138, 0.25);
  --dotgrid: none;
  color-scheme: dark;
}
html[data-theme="paper"] {
  --bg: #fbf8ef;
  --bg-soft: #f6f2e5;
  --surface: #fffdf8;
  --surface-2: #f1eee3;
  --border: #ded7c5;
  --text: #1b3b32;
  --muted: #77897c;
  --primary: #e8622c;
  --primary-2: #c9501f;
  --accent: #1b3b32;
  --btn-text: #fffdf8;
  --success: #2f7d5f;
  --warning: #c98a1f;
  --danger: #b23a2e;
  --radius: 10px;
  --font: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(27, 59, 50, 0.06), 0 8px 24px rgba(27, 59, 50, 0.07);
  --glow: none;
  --dotgrid: radial-gradient(rgba(27, 59, 50, 0.055) 1px, transparent 1px);
  color-scheme: light;
}
/* 纸感主题:把少量硬编码的深色/荧光绿补成暖纸风 */
[data-theme="paper"] body {
  background-image: var(--dotgrid);
  background-size: 32px 32px;
}
[data-theme="paper"] .adm-dt,
[data-theme="paper"] .modal-backdrop,
[data-theme="paper"] .drawer::backdrop {
  background: rgba(27, 59, 50, 0.45);
}
[data-theme="paper"] .adm-dt-box,
[data-theme="paper"] .modal,
[data-theme="paper"] .adm-dcard {
  box-shadow: 0 18px 50px rgba(27, 59, 50, 0.18);
}
[data-theme="paper"] .btn.pri,
[data-theme="paper"] .btn.primary,
[data-theme="paper"] .mobile-primary-actions a.primary-action {
  background: linear-gradient(92deg, #e8622c, #f0894b);
  color: #fffdf8;
  box-shadow: none;
}
[data-theme="paper"] .btn.pri:hover,
[data-theme="paper"] .btn.primary:hover {
  background: linear-gradient(92deg, #d8561f, #e8793a);
}
[data-theme="paper"] .adm-cbtn.pri {
  background: linear-gradient(92deg, #e8622c, #f0894b);
  color: #fffdf8;
  border-color: transparent;
}
[data-theme="paper"] .adm-cal .d.on {
  background: var(--primary);
  color: var(--btn-text);
}
[data-theme="paper"] .modal-backdrop,
[data-theme="paper"] .side-backdrop.show,
[data-theme="paper"] .dw-bd {
  background: rgba(27, 59, 50, 0.45);
}
[data-theme="paper"] .side.open {
  box-shadow: 0 0 60px rgba(27, 59, 50, 0.22);
}
[data-theme="paper"] .crop-stage {
  background: #1b3b32;
}
[data-theme="paper"] .dw-bd,
[data-theme="paper"] .modal-backdrop {
  backdrop-filter: blur(2px);
}
[data-theme="paper"] .btn:active,
[data-theme="paper"] .adm-cbtn:active {
  transform: translateY(1px);
}

/* ============ 纸感设计层 v91：严格照抄 iacgn.com 的设计语言 ============
   取自其主页源码（实测值）：
   --paper#FBF8EF --paper2#F1EEE3 --ink#1B3B32 --accent#E8622C --accent2#C8451F --sage#DCE4D6
   --rule rgba(27,59,50,.25)；body 4px 点阵 rgba(27,59,50,.05)；
   标题 font-weight:900 / line-height:.98 / letter-spacing:-.02em；
   小标签＝等宽 + .24em 字距 + 大写；分隔＝2px（主）/1.5px（格）实线；
   卡片＝2.5px 实线墨框 + 8px 圆角 + 压印阴影 0 20px 44px -34px rgba(27,59,50,.6)；
   按钮＝999px 胶囊 + 2px 描边 + 等宽 10.5px/.12em，按下或选中＝墨底纸字。 */
[data-theme="paper"] {
  --paper: #fbf8ef;
  --paper2: #f1eee3;
  --ink: #1b3b32;
  --accent: #e8622c;
  --accent2: #c8451f;
  --sage: #dce4d6;
  --rule: rgba(27, 59, 50, 0.25);
  --rule-2: rgba(27, 59, 50, 0.14);
  --mono-ls: 0.24em;
  --font:
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #fbf8ef;
  --bg-soft: #f1eee3;
  --surface: #fbf8ef;
  --surface-2: #f1eee3;
  --border: rgba(27, 59, 50, 0.25);
  --text: #1b3b32;
  --muted: rgba(27, 59, 50, 0.62);
  --primary: #e8622c;
  --primary-2: #c8451f;
  --btn-text: #fbf8ef;
  --success: #2f6f57;
  --warning: #c8451f;
  --danger: #a8331f;
  --radius: 8px;
  --shadow: 0 20px 44px -34px rgba(27, 59, 50, 0.6);
  --glow: none;
  color-scheme: light;
}
/* 纸面：4px 点阵（照抄 background-size:4px 4px） */
[data-theme="paper"] body {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(27, 59, 50, 0.05) 1px, transparent 0);
  background-size: 4px 4px;
}
[data-theme="paper"] body:after {
  display: none;
}
/* 标题：无衬线 + 900 字重（不要衬线！） */
[data-theme="paper"] h1,
[data-theme="paper"] .page-head h1,
[data-theme="paper"] .hero h1,
[data-theme="paper"] .overview-head h1,
[data-theme="paper"] .auth-t {
  font-family: var(--font);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
[data-theme="paper"] .page-head h1 {
  font-size: 30px;
}
[data-theme="paper"] .hero h1 {
  line-height: 0.98;
}
/* 等宽小标签体系：字距 .24em + 大写感 */
[data-theme="paper"] .page-head p,
[data-theme="paper"] .demo-note,
[data-theme="paper"] .eyebrow,
[data-theme="paper"] .kv-h,
[data-theme="paper"] .adm-sec > .st,
[data-theme="paper"] .adm-dt-sec > .st,
[data-theme="paper"] .card .panel-head h2,
[data-theme="paper"] .ch-listhead b,
[data-theme="paper"] .acc-on,
[data-theme="paper"] .adm-dt-k,
[data-theme="paper"] .stat .k,
[data-theme="paper"] .mgr-price small,
[data-theme="paper"] .tbl th,
[data-theme="paper"] .foot-row {
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
}
[data-theme="paper"] .page-head p,
[data-theme="paper"] .demo-note {
  text-transform: none;
  letter-spacing: 0.1em;
  font-size: 11.5px;
}
[data-theme="paper"] .stat .k,
[data-theme="paper"] .mgr-price small {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: rgba(27, 59, 50, 0.6);
}
/* 小节标题：等宽标签 + 2px 实线延伸（照抄 .sec-h::after） */
[data-theme="paper"] .kv-h,
[data-theme="paper"] .card .panel-head h2,
[data-theme="paper"] .ch-listhead b {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: rgba(27, 59, 50, 0.7);
}
[data-theme="paper"] .kv-h:after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule);
}
[data-theme="paper"] .card .panel-head h2,
[data-theme="paper"] .ch-listhead b {
  display: flex;
  align-items: center;
  gap: 12px;
}
[data-theme="paper"] .card .panel-head h2:after,
[data-theme="paper"] .ch-listhead b:after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule);
}
/* 卡片＝实线墨框 + 压印阴影 */
[data-theme="paper"] .card,
[data-theme="paper"] .panel,
[data-theme="paper"] .acc,
[data-theme="paper"] .adm-dt-box,
[data-theme="paper"] .modal,
[data-theme="paper"] .stat {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 20px 44px -34px rgba(27, 59, 50, 0.6);
}
[data-theme="paper"] .stat {
  border-width: 1.5px;
  border-color: var(--rule);
}
[data-theme="paper"] .acc {
  border-width: 2px;
}
[data-theme="paper"] .sidebar,
[data-theme="paper"] .side,
[data-theme="paper"] .drawer {
  background: var(--paper2);
  border-right: 2px solid var(--rule);
}
/* 按钮＝胶囊 + 2px 描边 + 等宽小字 */
[data-theme="paper"] .btn,
[data-theme="paper"] .pg-btn,
[data-theme="paper"] .pg-jump,
[data-theme="paper"] .ch-add,
[data-theme="paper"] .adm-pickbtn,
[data-theme="paper"] .adm-cbtn {
  border: 2px solid rgba(27, 59, 50, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  min-height: 40px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}
[data-theme="paper"] .btn:hover {
  background: rgba(27, 59, 50, 0.06);
}
[data-theme="paper"] .btn:active,
[data-theme="paper"] .pg-btn:active {
  background: var(--ink);
  color: var(--paper);
}
[data-theme="paper"] .btn.pri,
[data-theme="paper"] .btn.primary,
[data-theme="paper"] .adm-cbtn.pri,
[data-theme="paper"] .mobile-primary-actions a.primary-action,
[data-theme="paper"] .auth-submit {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 500;
}
[data-theme="paper"] .btn.pri:hover,
[data-theme="paper"] .btn.primary:hover {
  background: #22463c;
}
[data-theme="paper"] .btn.dan,
[data-theme="paper"] .btn.danger {
  color: var(--danger);
  border-color: rgba(168, 51, 31, 0.45);
  background: transparent;
}
[data-theme="paper"] .btn.pri:active,
[data-theme="paper"] .btn.primary:active,
[data-theme="paper"] .adm-cbtn.pri:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
/* 输入＝2px 描边（同 .tbtn 的边框语言） */
[data-theme="paper"] input.input,
[data-theme="paper"] textarea,
[data-theme="paper"] .sel-btn,
[data-theme="paper"] .af-box,
[data-theme="paper"] .ro-fld,
[data-theme="paper"] .adm-cf input {
  background: var(--paper2);
  border: 2px solid rgba(27, 59, 50, 0.4);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font);
}
[data-theme="paper"] input.input::placeholder {
  color: rgba(27, 59, 50, 0.45);
}
[data-theme="paper"] input.input:focus,
[data-theme="paper"] .sel-btn[aria-expanded="true"],
[data-theme="paper"] .af-box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(232, 98, 44, 0.18);
}
[data-theme="paper"] .sbox .input {
  padding-left: 36px;
}
[data-theme="paper"] .sbox svg,
[data-theme="paper"] .input-wrap > svg {
  color: rgba(27, 59, 50, 0.55);
}
/* 徽章/胶囊＝2px 实线墨框（照抄 .pill） */
[data-theme="paper"] .badge,
[data-theme="paper"] .ve,
[data-theme="paper"] .acc-on,
[data-theme="paper"] .chip,
[data-theme="paper"] .ch-chip,
[data-theme="paper"] .mgr-tags span,
[data-theme="paper"] .mg-chip,
[data-theme="paper"] .adm-pill {
  background: transparent !important;
  border: 2px solid var(--ink) !important;
  border-radius: 999px !important;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  font-weight: 400;
}
[data-theme="paper"] .badge.g,
[data-theme="paper"] .ve.g {
  border-color: rgba(47, 111, 87, 0.6) !important;
  color: #2f6f57;
}
[data-theme="paper"] .badge.r,
[data-theme="paper"] .ve.r {
  border-color: rgba(168, 51, 31, 0.55) !important;
  color: var(--danger);
}
[data-theme="paper"] .mg-chip.on {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-color: var(--ink) !important;
}
[data-theme="paper"] .mg-chip.on:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 7px;
}
/* 数字＝800 字重（照抄 .cell .v / .p-track） */
[data-theme="paper"] .account-amount,
[data-theme="paper"] .stat .v,
[data-theme="paper"] .mgr-price strong,
[data-theme="paper"] .adm-stats .s b,
[data-theme="paper"] .wallet-summary > strong,
[data-theme="paper"] .bars .bv {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
[data-theme="paper"] .mgr-title h3,
[data-theme="paper"] .acc-row .m .mn,
[data-theme="paper"] .mc-head b {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.01em;
}
[data-theme="paper"] .acc-row .m .mu,
[data-theme="paper"] .mgr-title span,
[data-theme="paper"] .acc-h .acc-n {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(27, 59, 50, 0.6);
}
/* 表格：1.5px 格线 + 等宽表头 */
[data-theme="paper"] .tbl th {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: rgba(27, 59, 50, 0.6);
  border-bottom: 1.5px solid var(--rule);
  padding-bottom: 9px;
}
@media (min-width: 641px) {
  [data-theme="paper"] .tbl td {
    border-bottom: 1.5px solid var(--rule);
  }
}
[data-theme="paper"] .tbl tr:hover td,
[data-theme="paper"] .tbl tbody tr:hover {
  background: rgba(27, 59, 50, 0.04);
}
[data-theme="paper"] .adm-tabs {
  border-bottom: 2px solid var(--rule);
  gap: 0;
  padding: 0 14px;
}
[data-theme="paper"] .adm-tabs button {
  border: 0;
  border-bottom: 2.5px solid transparent;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  padding: 11px 0;
}
[data-theme="paper"] .adm-tabs button.on {
  background: transparent;
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 500;
}
/* 侧栏选中＝左侧橙色 2.5px 规（照抄 .kicker::before 的语言） */
[data-theme="paper"] .si,
[data-theme="paper"] .drawer-nav a {
  border-radius: 0;
}
[data-theme="paper"] .si.on,
[data-theme="paper"] .si.active,
[data-theme="paper"] .drawer-nav a.active {
  background: transparent !important;
  color: var(--ink) !important;
  font-weight: 800;
  box-shadow: inset 2.5px 0 0 var(--accent);
}
[data-theme="paper"] .si.on *,
[data-theme="paper"] .si.active * {
  color: var(--ink) !important;
}
/* 图表：实线橙柱、粗参考线 */
[data-theme="paper"] .bars .bcol .b,
[data-theme="paper"] .bars .b i,
[data-theme="paper"] .bar i {
  background: var(--accent);
  border-radius: 2px;
  box-shadow: none;
}
[data-theme="paper"] .adm-dist .fill {
  background: var(--accent);
  opacity: 1;
  border-radius: 2px;
}
[data-theme="paper"] .adm-dist .track {
  background: var(--paper2);
  border: 1.5px solid var(--rule);
}
/* 弹窗/底栏：纸2底 + 2px 墨线 */
[data-theme="paper"] .adm-dt-box,
[data-theme="paper"] .modal {
  border: 2.5px solid var(--ink);
  background: var(--paper);
}
[data-theme="paper"] .adm-dt-bar,
[data-theme="paper"] .pagerbar,
[data-theme="paper"] .adm-pagerbar {
  background: var(--paper2);
  border-top: 2px solid var(--rule);
}
[data-theme="paper"] .modal-backdrop,
[data-theme="paper"] .side-backdrop.show,
[data-theme="paper"] .dw-bd,
[data-theme="paper"] .adm-dt,
[data-theme="paper"] .drawer::backdrop {
  background: rgba(27, 59, 50, 0.45);
}
/* 细节 */
[data-theme="paper"] ::selection {
  background: rgba(232, 98, 44, 0.25);
}
[data-theme="paper"] :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
[data-theme="paper"] ::-webkit-scrollbar-thumb {
  background: rgba(27, 59, 50, 0.3);
  border-radius: 0;
}
[data-theme="paper"] .btn,
[data-theme="paper"] .card {
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
}
/* 内联动作按钮也走胶囊（照抄 .tbtn：2px 描边 + 等宽小字） */
[data-theme="paper"] .adm-mg,
[data-theme="paper"] .adm-back,
[data-theme="paper"] .adm-row .det,
[data-theme="paper"] .text-link,
[data-theme="paper"] .ch-del,
[data-theme="paper"] .kv-cp {
  border: 2px solid rgba(27, 59, 50, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="paper"] .adm-mg:active,
[data-theme="paper"] .adm-back:active,
[data-theme="paper"] .ch-del:active {
  background: var(--ink);
  color: var(--paper);
}
[data-theme="paper"] .kv-cp {
  padding: 0;
  width: 28px;
  min-height: 28px;
}
/* 下拉也走胶囊（互动语言统一） */
[data-theme="paper"] .sel-btn {
  border-radius: 999px;
  background: var(--paper2);
}
[data-theme="paper"] .sel-pop {
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
}
[data-theme="paper"] .sel-item {
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}
[data-theme="paper"] .sel-item:hover {
  background: var(--paper2);
}
/* 格线统一 1.5px（照抄 .cell / .note 的 1.5px） */
[data-theme="paper"] .mgr,
[data-theme="paper"] .acc-row,
[data-theme="paper"] .acc-b,
[data-theme="paper"] .adm-row2,
[data-theme="paper"] .kv-r,
[data-theme="paper"] .bill .b-row,
[data-theme="paper"] .tk-row,
[data-theme="paper"] .dev-row,
[data-theme="paper"] .ch-key {
  border-color: var(--rule) !important;
  border-width: 1.5px !important;
}
[data-theme="paper"] .mgr {
  border-bottom: 1.5px solid var(--rule) !important;
}
/* ===== 纸感:所有卡片透明(内容直接落在纸面上),去掉压印投影 ===== */
[data-theme="paper"] .card,
[data-theme="paper"] .panel,
[data-theme="paper"] .stat,
[data-theme="paper"] .acc,
[data-theme="paper"] .tbl-card,
[data-theme="paper"] .adm-dcard,
[data-theme="paper"] .ch-list,
[data-theme="paper"] .md-tbl,
[data-theme="paper"] .model-card,
[data-theme="paper"] .key-card,
[data-theme="paper"] .settings-grid > .card,
[data-theme="paper"] .bill,
[data-theme="paper"] .wallet-summary,
[data-theme="paper"] .notice-box,
[data-theme="paper"] .secret-box,
[data-theme="paper"] .test-out,
[data-theme="paper"] .chat-window,
[data-theme="paper"] .model-item,
[data-theme="paper"] .ledger-item,
[data-theme="paper"] .ticket,
[data-theme="paper"] .mg-form,
[data-theme="paper"] .up-card,
[data-theme="paper"] .pay,
[data-theme="paper"] .tier {
  background: transparent !important;
  box-shadow: none !important;
}
/* 卡片的边框保留(参考站用墨线框),但去掉内高光 */
[data-theme="paper"] .card,
[data-theme="paper"] .panel,
[data-theme="paper"] .acc {
  box-shadow: none !important;
  border-color: var(--rule);
}
/* 浮层必须不透明:弹窗/下拉/抽屉/浮条/提示 */
[data-theme="paper"] .modal,
[data-theme="paper"] .adm-dt-box,
[data-theme="paper"] .drawer,
[data-theme="paper"] .side,
[data-theme="paper"] .sel-pop,
[data-theme="paper"] .av-pop,
[data-theme="paper"] .chat-params-wrap,
[data-theme="paper"] .rs-card,
[data-theme="paper"] .adm-menu-pop,
[data-theme="paper"] .pg-float,
[data-theme="paper"] .pg-float .pager,
[data-theme="paper"] .adm-dt-bar,
[data-theme="paper"] .pagerbar,
[data-theme="paper"] .adm-pagerbar,
[data-theme="paper"] #app-toast,
[data-theme="paper"] .toast,
[data-theme="paper"] .tk-empty .ico,
[data-theme="paper"] .mgr-logo,
[data-theme="paper"] .model-logo,
[data-theme="paper"] .key-icon,
[data-theme="paper"] .sic {
  background: var(--paper) !important;
}
[data-theme="paper"] .sel-pop,
[data-theme="paper"] .av-pop,
[data-theme="paper"] .rs-card,
[data-theme="paper"] .adm-menu-pop,
[data-theme="paper"] .chat-params-wrap {
  background: var(--paper2) !important;
  box-shadow: 0 18px 40px -28px rgba(27, 59, 50, 0.55) !important;
}
[data-theme="paper"] .pg-float,
[data-theme="paper"] .adm-dt-bar,
[data-theme="paper"] .pagerbar,
[data-theme="paper"] .adm-pagerbar {
  background: var(--paper) !important;
  border-color: var(--rule) !important;
}
/* ===== 纸感:图表柱统一橙 + 标题放大到参考站量级 ===== */
[data-theme="paper"] .bars .b,
[data-theme="paper"] .bcol .b {
  background: var(--accent) !important;
  border-radius: 2px 2px 0 0;
}
[data-theme="paper"] .bcol.on .b {
  box-shadow:
    0 0 0 2px var(--paper),
    0 0 0 3.5px var(--ink) !important;
}
[data-theme="paper"] .bcol:hover .b {
  filter: none;
  opacity: 0.86;
}
[data-theme="paper"] .bcol.on .b {
  filter: none;
}
[data-theme="paper"] .bars .bavg b,
[data-theme="paper"] .bars .bavg span {
  color: var(--accent);
}
[data-theme="paper"] .hero h1 {
  font-size: clamp(40px, 8.3vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
[data-theme="paper"] .page-head h1 {
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
}
[data-theme="paper"] .overview-head h1 {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
[data-theme="paper"] .auth-t {
  font-size: clamp(26px, 6.4vw, 36px);
}
[data-theme="paper"] .page-head p,
[data-theme="paper"] .demo-note {
  font-size: 12px;
  line-height: 1.75;
}

/* 手机卡片布局:格线只保留「一条」——格子自身不要线(否则卡片里全是下划线) */
@media (max-width: 640px) {
  [data-theme="paper"] .tbl td,
  [data-theme="paper"] .tbl tr:has(.tk) td,
  [data-theme="paper"] .tbl tr:has(.tk) td:nth-child(2),
  [data-theme="paper"] .tbl tr:has(.tk) td:nth-child(1),
  [data-theme="paper"] .tbl tr:has(.tk) td:last-child,
  [data-theme="paper"] .tbl tr:has(.tk) td:nth-child(4),
  [data-theme="paper"] .tbl tr:has(.tk) td:nth-child(3) {
    border-bottom: 0 !important;
    border-top: 0 !important;
  }
  /* 卡片内部只留一条令牌行分隔线(站点原本就画在 td:nth-child(4) 的 border-top) */
  [data-theme="paper"] .tbl tr:has(.tk) td:nth-child(4) {
    border-top: 1.5px solid var(--rule) !important;
  }
  [data-theme="paper"] .tbl tr:has(.tk) td .tk em,
  [data-theme="paper"] .tbl tr:has(.tk) .tk b {
    border: 0 !important;
  }
  /* 其它卡片式列表:只保留卡片自身边框,内部不要格线 */
  [data-theme="paper"] .adm-row2,
  [data-theme="paper"] .md-tbl tbody tr td,
  [data-theme="paper"] .ch-tbl tbody tr td,
  [data-theme="paper"] .ch-key {
    border-bottom: 0 !important;
  }
  [data-theme="paper"] .mgr {
    border-bottom: 1.5px solid var(--rule) !important;
  }
  [data-theme="paper"] .adm-row2 {
    border-bottom: 1.5px solid var(--rule) !important;
  }
}

[data-theme="paper"] .badge.g,
[data-theme="paper"] .ve.g {
  background: #e6f1ea;
  color: #2f7d5f;
}
[data-theme="paper"] .badge.r,
[data-theme="paper"] .ve.r {
  background: #f7e7e4;
  color: #b23a2e;
}
[data-theme="paper"] .kv-cp,
[data-theme="paper"] .cp,
[data-theme="paper"] .sbox-clr {
  background: var(--surface-2);
  color: var(--muted);
}
[data-theme="paper"] .tbl th {
  color: var(--muted);
  border-bottom-color: var(--border);
}
[data-theme="paper"] .tbl td {
  border-bottom-color: var(--border);
}
[data-theme="paper"] .side,
[data-theme="paper"] .topbar,
[data-theme="paper"] .top-header {
  border-color: var(--border);
}
[data-theme="paper"] .bars .bcol i,
[data-theme="paper"] .bar i {
  opacity: 0.9;
}
[data-theme="paper"] .stagger > * {
  animation: none;
}
[data-theme="mono-light"] {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --border: #e5e5e5;
  --text: #0a0a0a;
  --muted: #737373;
  --primary: #0a0a0a;
  --primary-2: #404040;
  --accent: #a3a3a3;
  --btn-text: #ffffff;
  --success: #404040;
  --warning: #737373;
  --danger: #a3a3a3;
  --radius: 8px;
  --font:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --glow: none;
  --dotgrid: radial-gradient(rgba(0, 0, 0, 0.055) 1px, transparent 1px);
  color-scheme: light;
}
html[data-theme="mono-dark"] {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #171717;
  --border: #262626;
  --text: #fafafa;
  --muted: #a3a3a3;
  --primary: #fafafa;
  --primary-2: #d4d4d4;
  --accent: #737373;
  --btn-text: #000000;
  --success: #e5e5e5;
  --warning: #a3a3a3;
  --danger: #737373;
  --radius: 8px;
  --font:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: none;
  --glow: none;
  --dotgrid: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  color-scheme: dark;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  transition:
    background 0.35s,
    color 0.35s;
}
.theme-anim *,
.theme-anim *:before,
.theme-anim *:after {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    fill 0.35s ease !important;
}
html[data-theme^="mono"] body {
  background-image: var(--dotgrid);
  background-size: 32px 32px;
}
html[data-theme="terminal-off"] body:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.5;
}
html[data-theme="terminal-off"] .hero:before {
  content: "";
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -6px;
  height: 300px;
  z-index: -1;
  pointer-events: none;
  transform: perspective(430px) rotateX(56deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    transparent 78%
  );
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 78%);
  animation: gridFlow 4.5s linear infinite;
}
@keyframes gridFlow {
  to {
    background-position:
      0 42px,
      0 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="terminal-off"] .hero:before,
  html[data-theme="terminal-off"] .hero:after {
    animation: none;
  }
}
::selection {
  background: color-mix(in srgb, var(--primary) 30%, transparent);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
@media (hover: hover) {
  ::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
  }
}
::-webkit-scrollbar-track {
  background: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: var(--font);
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}
img,
svg {
  vertical-align: middle;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
a,
button,
.tier,
.pay,
.topt,
.fchip,
.si,
.sel-item,
.tm-item,
.acc-head {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.sp {
  flex: 1;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.center {
  text-align: center;
}
.num {
  font-variant-numeric: tabular-nums;
}
.page-enter {
  animation: pageIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}
@keyframes pageIn {
  0% {
    opacity: 0;
  }
}
.stagger > * {
  animation: fadeUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}
.stagger > *:nth-child(1) {
  animation-delay: 0.04s;
}
.stagger > *:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger > *:nth-child(3) {
  animation-delay: 0.16s;
}
.stagger > *:nth-child(4) {
  animation-delay: 0.22s;
}
.stagger > *:nth-child(5) {
  animation-delay: 0.28s;
}
.stagger > *:nth-child(6) {
  animation-delay: 0.34s;
}
.stagger > *:nth-child(7) {
  animation-delay: 0.4s;
}
.stagger > *:nth-child(8) {
  animation-delay: 0.46s;
}
.stagger > *:nth-child(9) {
  animation-delay: 0.52s;
}
.stagger > *:nth-child(10) {
  animation-delay: 0.58s;
}
.stagger > *:nth-child(11) {
  animation-delay: 0.64s;
}
.stagger > *:nth-child(12) {
  animation-delay: 0.7s;
}
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.lift {
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.28s,
    box-shadow 0.28s;
}
@media (hover: hover) {
  .lift:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  }
}
.skel {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    color-mix(in srgb, var(--text) 9%, var(--surface-2)) 50%,
    var(--surface-2) 75%
  );
  background-size: 200% 100%;
  flex: 1;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(92deg, var(--primary), var(--primary-2));
  color: var(--btn-text);
  box-shadow: var(--glow);
  transition:
    filter 0.18s,
    transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.18s,
    color 0.18s,
    box-shadow 0.18s;
  white-space: nowrap;
}
@media (hover: hover) {
  .btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1.5px);
  }
}
.btn:active {
  transform: scale(0.965);
  filter: brightness(0.96);
  transition-duration: 0.06s;
}
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  filter: none;
}
/* DSHA-FIX-DISABLED：基础禁用态只降 opacity，会把黑底白字一起压成中灰（对比度约 2.2:1，低于 4.5）
   → 统一改为「弱底 + 弱字 + 细边框」，三个主题都清晰可辨，一眼能看出是禁用 */
/* 注意：这里必须带 html[data-theme] 提高特异度，否则会被
   html[data-theme^=mono] .btn{background:var(--primary)} 压回去
   （后果就是深色主题下白底灰字，对比度仅 1.52）*/
html[data-theme] .btn[disabled] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
  opacity: 1;
  filter: none;
  box-shadow: none;
  transform: none !important;
}
html[data-theme^="mono"] .btn {
  background: var(--primary);
}
html[data-theme^="mono"] .btn-ghost {
  background: transparent;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
@media (hover: hover) {
  .btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
}
@media (hover: hover) {
  html[data-theme^="mono"] .btn-ghost:hover {
    color: var(--text);
    border-color: var(--text);
  }
}
.btn-soft {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: none;
}
/* DSHA-FIX-BTN-SOFT：mono 主题下 .btn 被刷成主题色实底，.btn-soft 的字色又与 --primary 撞车（浅色=黑底黑字 / 深色=白底白字，文字完全不可见）→ 这里把柔和按钮恢复成「浅底 + 正常字色 + 细边框」 */
html[data-theme^="mono"] .btn-soft {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
html[data-theme^="mono"] .btn-soft:hover {
  background: var(--surface);
  border-color: var(--text);
}
@media (hover: hover) {
  .btn-soft:hover {
    border-color: var(--border);
  }
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}
html[data-theme^="mono"] .btn-danger {
  color: var(--bg);
}
.btn-xs {
  padding: 4px 12px;
  font-size: 12px;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  pointer-events: none;
  z-index: -1;
  animation: rippleAnim 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes rippleAnim {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.15s;
}
@media (hover: hover) {
  .icon-btn:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}
.icon-btn:active {
  transform: scale(0.9);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.g {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}
.badge.y {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
}
.badge.r {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
}
html[data-theme="mono-dark"] .badge.g {
  background: #fafafa;
  color: #000;
}
html[data-theme="mono-dark"] .badge.y {
  background: transparent;
  border: 1px solid #525252;
  color: #d4d4d4;
}
html[data-theme="mono-dark"] .badge.r {
  background: #262626;
  color: #fafafa;
  border: 1px solid #525252;
}
html[data-theme="mono-light"] .badge.g {
  background: #0a0a0a;
  color: #fff;
}
html[data-theme="mono-light"] .badge.y {
  background: transparent;
  border: 1px solid #d4d4d4;
  color: #525252;
}
html[data-theme="mono-light"] .badge.r {
  background: #f5f5f5;
  color: #0a0a0a;
  border: 1px solid #d4d4d4;
}
.input,
.sel-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: calc(var(--radius) - 2px);
  padding: 9px 14px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.3s;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.input::placeholder {
  color: var(--muted);
}
.input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 190px;
}
.input-wrap > svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}
.input-wrap .input {
  width: 100%;
  padding-left: 36px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.sel-wrap {
  position: relative;
  display: inline-block;
}
.sel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  min-width: inherit;
  text-align: left;
}
@media (hover: hover) {
  .sel-btn:hover {
    border-color: var(--muted);
  }
}
.sel-btn.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.sel-btn .chev {
  color: var(--muted);
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.sel-btn.open .chev {
  transform: rotate(180deg);
}
.sel-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 100%;
  z-index: 120;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 16px 48px #0006;
  padding: 5px;
  max-height: 260px;
  overflow-y: auto;
  animation: popIn 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.sel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
@media (hover: hover) {
  .sel-item:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}
.sel-item.sel {
  color: var(--primary);
  font-weight: 700;
}
html[data-theme^="mono"] .sel-item.sel {
  color: var(--text);
}
.topnav {
  top: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
@media (hover: hover) {
  .brand:hover {
    color: var(--primary);
  }
}
@media (hover: hover) {
  html[data-theme^="mono"] .brand:hover {
    color: var(--text);
  }
}
.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .topnav {
    gap: 12px;
  }
}
.footer {
  margin-top: 72px;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.footer a {
  color: var(--muted);
  transition: color 0.2s;
}
@media (hover: hover) {
  .footer a:hover {
    color: var(--text);
  }
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 56px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5.2vw, 44px);
  font-weight: 800;
  line-height: 1.25;
}
.hero .sub {
  color: var(--muted);
  margin: 14px auto 26px;
  max-width: 540px;
  font-size: 15px;
}
.hero .row > .btn {
  min-width: 128px;
  justify-content: center;
  height: 44px;
}
.grad-text {
  background: linear-gradient(
    92deg,
    var(--primary),
    var(--primary-2),
    var(--accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme^="mono"] .grad-text {
  background: none;
  color: var(--text);
  border-bottom: 3px solid var(--text);
  padding-bottom: 2px;
}
.hero-in > * {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero-in > *:nth-child(1) {
  animation-delay: 0.05s;
}
.hero-in > *:nth-child(2) {
  animation-delay: 0.15s;
}
.hero-in > *:nth-child(3) {
  animation-delay: 0.25s;
}
.hero-in > *:nth-child(4) {
  animation-delay: 0.35s;
}
.hero-in > *:nth-child(5) {
  animation-delay: 0.45s;
}
.terminal {
  margin: 30px auto 0;
  max-width: 640px;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.terminal .bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.terminal .bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal .bar i:nth-child(1) {
  background: var(--danger);
}
.terminal .bar i:nth-child(2) {
  background: var(--warning);
}
.terminal .bar i:nth-child(3) {
  background: var(--success);
}
html[data-theme="mono-dark"] .terminal .bar i:nth-child(1) {
  background: #525252;
}
html[data-theme="mono-dark"] .terminal .bar i:nth-child(2) {
  background: #404040;
}
html[data-theme="mono-dark"] .terminal .bar i:nth-child(3) {
  background: #262626;
}
html[data-theme="mono-light"] .terminal .bar i:nth-child(1) {
  background: #d4d4d4;
}
html[data-theme="mono-light"] .terminal .bar i:nth-child(2) {
  background: #e5e5e5;
}
html[data-theme="mono-light"] .terminal .bar i:nth-child(3) {
  background: #a3a3a3;
}
.terminal pre {
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  overflow-x: auto;
  color: var(--muted);
  text-align: left;
}
.terminal .line {
  display: block;
  opacity: 0;
  animation: lineIn 0.4s ease forwards;
}
@keyframes lineIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.terminal .g {
  color: var(--success);
}
.terminal .b {
  color: var(--accent);
}
.terminal .t {
  color: var(--text);
}
html[data-theme^="mono"] .terminal .g {
  color: var(--text);
  font-weight: 700;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--primary);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.section {
  margin-top: 64px;
}
.section-head {
  text-align: center;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 800;
}
.section-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.feat {
  padding: 22px;
}
.feat .ic {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 16%, transparent),
    color-mix(in srgb, var(--accent) 12%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover) {
  .feat:hover .ic {
    transform: scale(1.1) rotate(-4deg);
  }
}
html[data-theme^="mono"] .feat .ic {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.feat h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
}
.feat p {
  color: var(--muted);
  font-size: 13px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.step {
  padding: 22px;
  position: relative;
}
.step .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--btn-text);
}
html[data-theme^="mono"] .step .n {
  background: var(--text);
  color: var(--bg);
}
.step h3 {
  font-size: 15px;
  margin-bottom: 6px;
}
.step p {
  color: var(--muted);
  font-size: 13px;
}
.step:after {
  content: "";
  position: absolute;
  top: 38px;
  right: -11px;
  width: 8px;
  height: 8px;
  border-top: 1.8px solid var(--muted);
  border-right: 1.8px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.5;
}
.step:last-child:after {
  display: none;
}
@media (max-width: 760px) {
  .step:after {
    display: none;
  }
}
.acc-item {
  border-bottom: 1px solid var(--border);
}
.acc-item:last-child {
  border-bottom: none;
}
.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  transition: color 0.2s;
}
@media (hover: hover) {
  .acc-head:hover {
    color: var(--primary);
  }
}
@media (hover: hover) {
  html[data-theme^="mono"] .acc-head:hover {
    color: var(--text);
  }
}
.acc-head .chev {
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  flex-shrink: 0;
}
.acc-item.open .acc-head .chev {
  transform: rotate(180deg);
  color: var(--primary);
}
html[data-theme^="mono"] .acc-item.open .acc-head .chev {
  color: var(--text);
}
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.3s ease;
}
.acc-item.open .acc-body {
  grid-template-rows: 1fr;
  opacity: 1;
}
.acc-body > div {
  overflow: hidden;
}
.acc-body p {
  color: var(--muted);
  font-size: 13.5px;
  padding-bottom: 15px;
}
.tbl-wrap {
  overflow-x: auto;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tbl th {
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tbl tr:last-child td {
  border-bottom: none;
} /* 表格行不可点击，去掉悬停高亮（避免误导 + 触屏粘滞） */
.tbl .ops {
  display: flex;
  gap: 6px;
}
.mono-txt {
  font-family: var(--mono);
}
.console-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
}
.side {
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
  padding: calc(14px + env(safe-area-inset-top)) 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  top: 0;
  overflow-y: auto;
  transition:
    background-color 0.35s,
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.side .side-brand {
  padding: 4px 12px 16px;
}
.si {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  position: relative;
  transition:
    color 0.2s,
    background 0.2s;
}
@media (hover: hover) {
  .si:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 7%, transparent);
  }
}
.si.active {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-weight: 700;
}
.si.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
  animation: indicatorIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes indicatorIn {
  0% {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
html[data-theme^="mono"] .si.active {
  background: var(--surface-2);
  color: var(--text);
}
html[data-theme^="mono"] .si.active:before {
  background: var(--text);
}
.main {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.topbar .spacer {
  flex: 1;
}
.menu-btn {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: calc(var(--radius) - 2px);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}
.menu-btn:active {
  transform: scale(0.92);
}
.avatar {
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--btn-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s;
}
@media (hover: hover) {
  .avatar:hover {
    transform: scale(1.08);
    box-shadow: var(--glow);
  }
}
html[data-theme^="mono"] .avatar {
  background: var(--text);
  color: var(--bg);
}
.side-backdrop {
  display: none;
  opacity: 0;
  transition: opacity 0.25s;
}
@media (max-width: 860px) {
  .console-grid {
    grid-template-columns: 1fr;
  }
  .menu-btn {
    display: inline-flex;
  }
  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: auto;
    width: 232px;
    z-index: 200;
    transform: translate(-105%);
    box-shadow: 0 0 60px #00000080;
  }
  .side.open {
    transform: none;
  }
  .side-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: #0000008c;
    z-index: 215;
    opacity: 1;
    backdrop-filter: blur(2px);
  }
  .main {
    padding: 14px 14px 40px;
  }
}
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 19px;
  font-weight: 800;
}
.page-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.page-head .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat .k {
  font-size: 11.5px;
  color: var(--muted);
}
.stat .v {
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat .d {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
/* Overview time range: preset tabs + floating calendar dialog (no layout shift). */
.range-bar {
  margin-bottom: 12px;
}
.range-bar .seg {
  height: 34px;
  max-width: 100%;
}
.range-bar .seg-i {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}
.range-bar .seg-i:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .range-bar .seg {
    display: flex;
    width: 100%;
    height: 36px;
  }
  .range-bar .seg-i {
    flex: 1;
    height: 32px;
    padding: 0 4px;
    font-size: 11.5px;
  }
}
.request-timeline {
  display: flex;
  flex-direction: column;
}
.request-day {
  margin: 0 0 8px 1px;
  font-size: 9.5px;
  color: var(--muted);
}
.request-group + .request-group {
  margin-top: 14px;
}
.request-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-left: 15px;
}
.request-list:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}
.request-entry {
  position: relative;
  min-width: 0;
}
.request-dot {
  position: absolute;
  left: -15px;
  top: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--success);
  border-radius: 50%;
  background: var(--bg);
}
.request-entry.is-failed .request-dot {
  border-color: var(--danger);
}
@keyframes request-entry-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.request-entry.is-new {
  animation: request-entry-in 0.26s ease both;
  animation-delay: calc(var(--i, 0) * 14ms);
}
@media (prefers-reduced-motion: reduce) {
  .request-entry.is-new {
    animation: none;
  }
}
.request-main {
  min-width: 0;
}
.request-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.request-time {
  flex: none;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.request-model {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.request-cost {
  flex: none;
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.request-sub {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  overflow: hidden;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}
.request-sub .is-ok {
  color: var(--success);
}
.request-sub .is-bad {
  color: var(--danger);
}
.request-token-btn {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 9.5px;
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.request-token-btn[aria-expanded="true"] {
  color: inherit;
}
.request-token-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}
.request-token-pop {
  position: fixed;
  z-index: 90;
  width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 14px 36px -20px rgba(0, 0, 0, 0.55);
}
.request-token-pop div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  font-size: 9.5px;
  color: var(--muted);
}
.request-token-pop b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.request-more {
  width: 100%;
  margin-top: 10px;
  padding: 8px 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.request-more:hover {
  color: var(--text);
}
.request-more:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.request-empty {
  margin: 8px 0 2px;
  font-size: 11px;
  color: var(--muted);
}
.model-rank {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.model-rank-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.model-rank-no {
  flex: none;
  width: 14px;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
}
.model-rank-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.model-rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.model-rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-rank-top b {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.model-rank-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-soft);
  overflow: hidden;
}
.model-rank-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
}
.panel {
  padding: 16px 18px;
  margin-bottom: 14px;
}
.panel h2 {
  font-size: 13.5px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 600;
}
.panel-head {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
}
/* Overview spend trend: responsive area chart with tap/focus tooltip. */
.spend-heading {
  min-width: 0;
}
.spend-heading h2 {
  margin-bottom: 2px;
}
[data-theme="paper"] .card .panel-head .spend-heading h2:after {
  content: none;
}
.spend-summary {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}
.spend-trend {
  margin-top: 4px;
}
.spend-chart {
  position: relative;
  height: 178px;
}
.spend-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.spend-grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}
.spend-baseline {
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.spend-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.spend-cursor {
  stroke: var(--primary);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.5;
  vector-effect: non-scaling-stroke;
}
.spend-points {
  position: absolute;
  inset: 0;
}
.spend-hits {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: crosshair;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.spend-hits:focus,
.spend-hits:focus-visible {
  outline: none;
}
.spend-points {
  pointer-events: none;
  z-index: 1;
}
.spend-point {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--primary);
}
.spend-point.is-active {
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  background: var(--bg);
  border: 2px solid var(--primary);
}
.spend-tooltip {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 10.5px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.5);
}
.spend-tooltip strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.spend-tooltip span {
  font-size: 9.5px;
  opacity: 0.7;
}
.spend-tooltip em {
  font-style: normal;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}
.spend-axis {
  position: relative;
  height: 18px;
  margin-top: 2px;
}
.spend-axis span {
  position: absolute;
  top: 0;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .spend-chart {
    height: 156px;
  }
  .spend-summary {
    font-size: 10px;
  }
}
.panel-head h2 {
  margin-bottom: 0;
}
.panel-head .sp {
  flex: 1;
}
.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--primary);
  transition: gap 0.2s;
}
@media (hover: hover) {
  .panel-link:hover {
    gap: 8px;
  }
}
html[data-theme^="mono"] .panel-link {
  color: var(--text);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.bars .bcol {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.bars .bwrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bars .b {
  display: block;
  width: 100%;
  max-width: 26px;
  border-radius: 4px 4px 0 0;
  min-height: 5px;
  background: var(--primary);
}
.bars .bwrap {
  justify-content: center;
}
.bars .bcol.on .b {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3px var(--primary);
}
.bars .bcol.on .bv {
  color: var(--text);
  font-weight: 700;
}
@media (hover: hover) {
  .bars .bcol:hover .b {
    filter: brightness(1.25);
  }
}
@keyframes barGrow {
  0% {
    transform: scaleY(0);
  }
}
html[data-theme^="mono"] .bars .b {
  background: var(--primary);
}
.bars .bl {
  font-size: 10.5px;
  color: var(--muted);
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
}
.donut-legend .li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.donut-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.donut-legend .li b {
  color: var(--text);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.keybox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.keybox .cp {
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
@media (hover: hover) {
  .keybox .cp:hover {
    border-color: var(--primary);
  }
}
.keybox .cp:active {
  transform: scale(0.94);
}
.keybox .cp.ok {
  color: var(--success);
  border-color: var(--success);
}
.keybox .cp.ok svg {
  animation: popCheck 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popCheck {
  0% {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
html[data-theme^="mono"] .keybox .cp {
  color: var(--text);
}
html[data-theme^="mono"] .keybox .cp.ok {
  color: var(--text);
  border-color: var(--text);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pager {
  justify-content: flex-end;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.pager button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    border-color 0.18s,
    transform 0.15s,
    color 0.18s;
}
@media (hover: hover) {
  .pager button:hover:not([disabled]) {
    border-color: var(--primary);
    color: var(--primary);
  }
}
@media (hover: hover) {
  html[data-theme^="mono"] .pager button:hover:not([disabled]) {
    color: var(--text);
    border-color: var(--text);
  }
}
.pager button:active:not([disabled]) {
  transform: scale(0.93);
}
.pager .pg {
  min-width: 28px;
  justify-content: center;
}
.pager .pg.on {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
html[data-theme^="mono"] .pager .pg.on {
  color: var(--text);
  border-color: var(--text);
}
.tiers {
  display: grid;
}
.tier {
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition:
    border-color 0.2s,
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.2s,
    box-shadow 0.2s;
}
@media (hover: hover) {
  .tier:hover {
    border-color: var(--muted);
    transform: translateY(-2px);
  }
}
.tier:active {
  transform: scale(0.97);
}
.tier.sel {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-soft));
  box-shadow: var(--glow);
}
html[data-theme^="mono"] .tier.sel {
  border-color: var(--text);
  background: var(--surface-2);
  box-shadow: none;
}
.tier .a {
  font-weight: 800;
}
.tier .bonus {
  color: var(--success);
}
html[data-theme^="mono"] .tier .bonus {
  color: var(--text);
}
.tier .hot-mark {
  position: absolute;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
html[data-theme^="mono"] .tier .hot-mark {
  background: var(--text);
  color: var(--bg);
}
.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.pay {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-soft);
  transition:
    border-color 0.2s,
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.2s;
}
@media (hover: hover) {
  .pay:hover {
    border-color: var(--muted);
    transform: translateY(-1px);
  }
}
.pay:active {
  transform: scale(0.985);
}
.pay.sel {
  border-color: var(--primary);
}
html[data-theme^="mono"] .pay.sel {
  border-color: var(--text);
}
.pay .pic {
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
html[data-theme^="mono"] .pay .pic {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}
.pay .pt b {
  font-size: 13.5px;
  display: block;
}
.pay .pt span {
  font-size: 11.5px;
  color: var(--muted);
}
.pay .radio {
  margin-left: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.pay.sel .radio {
  border-color: var(--primary);
}
html[data-theme^="mono"] .pay.sel .radio {
  border-color: var(--text);
}
.pay.sel .radio:after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
  animation: popCheck 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme^="mono"] .pay.sel .radio:after {
  background: var(--text);
}
.order-note {
  color: var(--muted);
}
.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.fchip {
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (hover: hover) {
  .fchip:hover {
    color: var(--text);
    border-color: var(--muted);
    transform: translateY(-1px);
  }
}
.fchip:active {
  transform: scale(0.94);
}
.fchip.on {
  background: linear-gradient(92deg, var(--primary), var(--primary-2));
  color: var(--btn-text);
  border-color: transparent;
  font-weight: 700;
  box-shadow: var(--glow);
}
html[data-theme^="mono"] .fchip.on {
  background: var(--text);
  color: var(--bg);
  box-shadow: none;
}
.model-grid {
  display: grid;
}
.model-card .mh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.model-card .mh b {
  font-size: 14px;
}
.model-card .mh .sp {
  flex: 1;
}
.model-card .vendor {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 999px;
}
.model-card .mp {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.model-card .mp b {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
}
.modal:focus-visible {
  outline: none;
}
.modal {
  width: 100%;
  max-width: 460px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 24px 80px #0000008c;
}
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
}
.modal .mh {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal .mh h3 {
  font-size: 15.5px;
  flex: 1;
}
.modal .mb {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal .mf {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translate(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 400;
  box-shadow: 0 10px 40px #00000073;
  max-width: 86vw;
  text-align: center;
}
@keyframes toastIn {
  0% {
    opacity: 0;
    transform: translate(-50%) translateY(18px) scale(0.9);
  }
}
.set-section {
  padding: 22px;
  margin-bottom: 14px;
}
.set-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}
.set-head .sic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
html[data-theme^="mono"] .set-head .sic {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}
.set-section > .set-head + .sub,
.set-section > .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}
.set-section .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}
.set-section h2 {
  font-size: 15.5px;
}
.topt {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--bg-soft);
  transition:
    border-color 0.2s,
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.2s;
}
@media (hover: hover) {
  .topt:hover {
    border-color: var(--muted);
    transform: translateY(-1px);
  }
}
.topt:active {
  transform: scale(0.985);
}
.topt.sel {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
html[data-theme^="mono"] .topt.sel {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}
.topt .radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}
.topt.sel .radio {
  border-color: var(--primary);
}
html[data-theme^="mono"] .topt.sel .radio {
  border-color: var(--text);
}
.topt.sel .radio:after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
  animation: popCheck 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme^="mono"] .topt.sel .radio:after {
  background: var(--text);
}
.topt .dots {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.topt .dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.35);
}
.topt .tt {
  flex: 1;
  min-width: 0;
}
.topt .tt b {
  font-size: 13.5px;
  display: block;
}
.topt .tt span {
  font-size: 11.5px;
  color: var(--muted);
}
.topt .def {
  font-size: 10.5px;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.tm-wrap {
  position: relative;
}
.tm-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover) {
  .tm-btn:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--primary);
  }
}
@media (hover: hover) {
  html[data-theme^="mono"] .tm-btn:hover {
    color: var(--text);
  }
}
.tm-btn:active {
  transform: scale(0.9);
}
.tm-btn svg {
  animation: iconIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes iconIn {
  0% {
    transform: scale(0.3) rotate(-90deg);
    opacity: 0;
  }
}
.tm-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 252px;
  z-index: 250;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 16px 48px #00000073;
  padding: 6px;
  animation: popIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}
.tm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  transition:
    background 0.15s,
    color 0.15s;
}
@media (hover: hover) {
  .tm-item:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}
.tm-item.sel {
  color: var(--text);
  font-weight: 700;
}
.tm-item .dots {
  display: flex;
  gap: 3px;
}
.tm-item .dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.35);
}
.tm-item .ck {
  margin-left: auto;
  color: var(--primary);
  animation: popCheck 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme^="mono"] .tm-item .ck {
  color: var(--text);
}
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .terminal .line {
    opacity: 1 !important;
    animation: none !important;
  }
  .page-enter {
    animation: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}
.hero h1,
.section-head h2 {
  text-wrap: balance;
}
.tm-pop {
  max-width: calc(100vw - 20px);
}
.grid-2 > * {
  min-width: 0;
}
@media (max-width: 640px) {
  .terminal pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 11.5px;
    line-height: 1.85;
  }
  .btn {
    padding: 10px 18px;
  }
  .btn-sm {
    padding: 8px 15px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .pager button {
    padding: 7px 12px;
  }
  .pager .pg {
    min-width: 34px;
  }
  .fchip {
    padding: 7px 16px;
  }
  .hero {
    padding: 44px 18px 40px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .input-wrap {
    min-width: 0;
  }
}
@media (max-width: 520px) {
  .topnav {
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }
  .nav-actions {
    gap: 6px;
  }
  .nav-actions .btn-ghost {
    display: none;
  }
  .brand {
    font-size: 15.5px;
  }
}
@media (max-width: 400px) {
} /* ===== DSHA-BG-START 背景增强（仅赛博终端主题） ===== */
/* 1/4 画布环境光：右上主光 + 左侧辅光 + 底部冷光（冷暖对比）+ 更清晰点阵 */
html[data-theme="terminal-off"] body {
  background-image:
    radial-gradient(
      1100px 560px at 86% -14%,
      color-mix(in srgb, var(--primary) 15%, transparent),
      transparent 64%
    ),
    radial-gradient(
      820px 500px at -14% 30%,
      color-mix(in srgb, var(--primary-2) 10%, transparent),
      transparent 62%
    ),
    radial-gradient(rgba(46, 230, 160, 0.09) 1px, transparent 1px);
  background-size:
    auto,
    auto,
    28px 28px;
}
/* 2/4 呼吸光晕 + 星尘：固定层，只动 transform/opacity，走合成层 */
html[data-theme="terminal-off"] body:before {
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  animation: bgAurora 58s ease-in-out infinite;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
}
@keyframes bgAurora {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.72;
  }
  30% {
    transform: translate3d(-2.2%, -1.6%, 0) scale(1.06);
    opacity: 1;
  }
  62% {
    transform: translate3d(1.8%, -0.8%, 0) scale(1.03);
    opacity: 0.86;
  }
}
/* 3/4 网格地面：线更清晰 + 加一层"地面被照亮"的光池（第三层保持不动） */
html[data-theme="terminal-off"] .hero:before {
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--primary) 27%, transparent) 0 1px,
      transparent 1px 54px
    ),
    repeating-linear-gradient(
      0deg,
      color-mix(in srgb, var(--primary) 27%, transparent) 0 1px,
      transparent 1px 42px
    );
}
/* 网格地面线更清晰（只覆盖 background，不触碰动画/透视/遮罩） */
/* 4/5 扫光：移除（保留网格流动 + 星尘呼吸作为背景动效） */
html[data-theme="terminal-off"] .hero:after {
  content: none;
  display: none;
}
/* 4/4 减弱动态偏好下关闭新动画 */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="terminal-off"] body:before {
    animation: none;
  }
}
/* ===== DSHA-BG-END ===== */
/* ===== DSHA-UI-START 右上角汉堡菜单（站内区块跳转） ===== */
.nm-wrap {
  position: relative;
  display: flex;
}
.nm-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover) {
  .nm-btn:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--primary);
  }
}
.nm-btn:active {
  transform: scale(0.9);
}
.nm-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 250;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 16px 48px #00000073;
  max-width: calc(100vw - 20px);
  animation: popIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top right;
}
.nm-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nm-pop {
  min-width: 212px;
  padding: 6px;
}
.nm-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}
.nm-segs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 3px 4px 5px;
}
.nm-seg {
  display: flex;
  gap: 6px;
}
.nm-si {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 0;
  cursor: pointer;
  transition:
    color 0.18s var(--e-soft),
    background-color 0.18s var(--e-soft),
    border-color 0.18s var(--e-soft);
}
.nm-si:hover:not(.on) {
  color: var(--text);
  border-color: var(--muted);
}
.nm-si.on {
  color: var(--btn-text);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
/* 主题：图标横排（每块底片自带该主题配色） */
.nm-ths {
  display: flex;
  gap: 6px;
}
.nm-th {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.2s var(--e-soft),
    background-color 0.2s var(--e-soft);
}
.nm-th:hover:not(.on) {
  background: var(--surface-2);
}
.nm-th.on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
.nm-tile {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition:
    transform 0.24s var(--e-out),
    box-shadow 0.24s var(--e-soft);
}
.nm-th.on .nm-tile {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px #00000047;
}
.nm-thn {
  font-size: 10.5px;
  color: var(--muted);
  transition: color 0.18s var(--e-soft);
}
.nm-th.on .nm-thn {
  color: var(--text);
  font-weight: 700;
}
.nm-tile-terminal {
  background: #070d09;
  color: #00e68a;
  border-color: #1e3a2b;
}
.nm-tile-mono-light {
  background: #fff;
  color: #3a3a3a;
  border-color: #dcdcdc;
}
.nm-tile-mono-dark {
  background: #000;
  color: #f5f5f5;
  border-color: #2a2a2a;
}
.nm-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
@media (hover: hover) {
  .nm-item:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}
.nm-item:active {
  transform: scale(0.98);
}
/* ===== DSHA-UI-END ===== */
/* ===== DSHA-CONSOLE-START ===== */
/* 趋势图：点击柱子显示当天消费金额 */
.bars {
  height: 158px;
  padding-top: 14px;
}
.bars .bcol {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bars .b {
  display: block;
}
.bars .bcol.on .b {
  filter: brightness(1.4);
}
.bars .bcol.on .bl {
  color: var(--text);
  font-weight: 700;
}
.bars .btip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--h, 0%) + 6px);
  z-index: 6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  box-shadow: 0 8px 22px #00000066;
  pointer-events: none;
  animation: popIn 0.16s ease;
}
/* 移动端：数据表改为卡片式，免横向滚动 */
@media (max-width: 640px) {
  .tbl-wrap {
    overflow: visible;
  }
  .tbl thead {
    display: none;
  }
  .tbl,
  .tbl tbody,
  .tbl tr,
  .tbl td {
    display: block;
    width: auto;
  }
  .tbl tr {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 14px;
    margin-bottom: 10px;
  }
  .tbl tr:last-child {
    margin-bottom: 0;
  }
  .tbl td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    padding: 4px 0;
    font-size: 13px;
  }
  .tbl td:before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    flex: none;
  }
  .tbl td:first-child {
    padding-top: 0;
  }
  .tbl td:last-child {
    padding-bottom: 0;
  }
  .tbl td[colspan] {
    justify-content: center;
  }
}
/* ===== DSHA-CONSOLE-END ===== */
/* ===== DSHA-NOSCROLL-START 隐藏滚动条（滚动能力保留） ===== */
html,
body,
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
  border: 0 !important;
}
/* ===== DSHA-NOSCROLL-END ===== */
/* ===== DSHA-APP-SHELL-START 应用外壳：顶栏在根层、根不滚动、内容区独立滚动 ===== */
html,
body {
  overflow: hidden !important;
}
#root {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* —— 首页：顶栏(根层,不滚) + 滚动区(main+footer) —— */
.topnav {
  position: static;
  flex: none;
  z-index: 100;
}
.page-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.page-scroll > main {
  flex: 1;
}
/* —— 控制台：侧栏(根层) + 主区；主区里顶栏不滚、内容区滚 —— */
.console-grid {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.side {
  position: static;
  height: 100%;
}
.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
.topbar {
  position: static;
  flex: none;
  margin: 0;
  padding: calc(18px + env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid var(--border);
}
.main > .page-enter {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px calc(40px + env(safe-area-inset-bottom));
}
/* —— 锁滚动（抽屉 / 模态框只锁内容区） —— */
html.noscroll .page-scroll,
html.noscroll .main > .page-enter {
  overflow: hidden;
}
/* —— 顶栏已不在滚动区内，锚点无需再留吸顶高度 —— */
#features,
#steps,
#faq {
  scroll-margin-top: 8px;
}
@media (max-width: 860px) {
  .side {
    position: fixed;
    height: auto;
  }
  .topbar {
    padding: calc(14px + env(safe-area-inset-top)) 14px 10px;
  }
  .main > .page-enter {
    padding: 14px 14px calc(40px + env(safe-area-inset-bottom));
  }
}
/* ===== DSHA-APP-SHELL-END ===== */
/* ===== DSHA-FIX-A-START 修复：抽屉盖住汉堡 / 下拉向上展开 ===== */
@media (max-width: 860px) {
  .topbar,
  .topnav {
    position: relative;
    z-index: 210;
  }
}
.sel-pop.up {
  top: auto;
  bottom: calc(100% + 6px);
}
/* ===== DSHA-FIX-A-END ===== */
/* ===== DSHA-FIX-B-START 键盘可达 / 点击热区 / 按钮化后的重置 ===== */
button.acc-head,
button.topt,
button.tier,
button.pay {
  font: inherit;
  color: inherit;
  width: 100%;
  text-align: inherit;
  -webkit-appearance: none;
  appearance: none;
}
button.acc-head {
  background: none;
  border: 0;
}
button.tier {
  padding: 16px 14px;
}
button.pay {
  padding: 12px 14px;
}
button.topt {
  padding: 12px 14px;
}
.acc-head:focus-visible,
button.topt:focus-visible,
button.tier:focus-visible,
button.pay:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* 移动端把偏小的热区撑到 ≥44px，视觉不变 */
@media (max-width: 900px) {
  .menu-btn,
  .tm-btn,
  .avatar,
  .panel-link {
    position: relative;
  }
  .menu-btn:after,
  .tm-btn:after,
  .avatar:after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: inherit;
  }
  .panel-link:after {
    content: "";
    position: absolute;
    inset: -13px -10px;
  }
}
/* ===== DSHA-FIX-B-END ===== */
/* ===== DSHA-FIX-C-START 首页末节滚动空间 / 条款排版 ===== */
.page-scroll > main {
  padding-bottom: 0;
}
div.legal h4 {
  font-size: 13.5px;
  color: var(--text);
  margin: 14px 0 6px;
  font-weight: 600;
}
div.legal p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin: 0 0 4px;
}
div.legal p:first-child {
  color: var(--primary);
  font-size: 12.5px;
}
/* ===== DSHA-FIX-C-END ===== */
/* ===== DSHA-FIX-D-START 移动端视口高度：内容不再被浏览器底栏遮挡 ===== */
html,
body {
  height: 100%;
  height: 100dvh;
  height: var(--app-h, 100dvh);
}
#root {
  height: 100%;
  height: 100dvh;
  height: var(--app-h, 100dvh);
}
@supports not (height: 100dvh) {
  html,
  body,
  #root {
    height: 100%;
  }
}
@media (max-width: 900px) {
  .main > .page-enter {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
  .page-scroll > main {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}
/* ===== DSHA-FIX-D-END ===== */
/* ===== DSHA-FIX-E-START 抽屉：整屏覆盖 + 自带关闭，不再被顶栏切断 ===== */
.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.side-x {
  display: none;
}
@media (max-width: 860px) {
  .side {
    top: 0;
    bottom: auto;
    height: var(--app-h, 100vh);
    width: 280px;
    max-width: 82vw;
    z-index: 220;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 0 70px #000000a6;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .side.open {
    transform: none;
  }
  .side-top {
    padding: 2px 2px 14px 2px;
  }
  .side-x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
  }
  @media (hover: hover) {
    .side-x:hover {
      color: var(--text);
      border-color: var(--primary);
    }
  }
  .side .side-brand {
    padding: 0;
  }
}
/* ===== DSHA-FIX-E-END ===== */
/* ===== DSHA-FIX-F-START 移动端：数据表拆成独立卡片（去掉外层大卡片） ===== */
@media (max-width: 640px) {
  .card.panel.tbl-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    padding: 0;
  }
  .card.panel.tbl-card + .card,
  .card.panel.tbl-card ~ .card {
    margin-top: 12px;
  }
  .tbl tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 12px;
    /* 原来是 0 8px 22px #00000038（22% 黑 + 22px 模糊）：浅色主题下一张卡片往下拖一团黑雾，
     多张叠起来整页发灰"黑乎乎" → 换轻量双层阴影；终端主题在深底上看不见，保持原值 */
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 4px 10px rgba(0, 0, 0, 0.05);
  }
  html[data-theme="terminal-off"] .tbl tr {
    box-shadow: 0 8px 22px #00000038;
  }
  .tbl tr:last-child {
    margin-bottom: 0;
  }
  .tbl td:before {
    font-weight: 500;
  }
  .tbl td {
    padding: 5px 0;
  }
}
/* ===== DSHA-FIX-F-END ===== */
/* ===== DSHA-FIX-G-START 表单行内校验提示 ===== */
.field-err {
  color: var(--danger, #ff5c5c);
  font-size: 12px;
  margin: 7px 0 0;
  line-height: 1.5;
}
/* ===== DSHA-FIX-G-END ===== */
/* ===== DSHA-FIX-H-START 密钥页底部汇总：三行居中 ===== */
.key-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}
.key-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.key-chip b {
  font-weight: 600;
  color: var(--text);
}
.key-chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.key-chip.on b {
  color: inherit;
}
.key-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.key-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 860px) {
  .key-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.key-card {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}
.key-card.is-expired {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border));
}
.key-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.key-card-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.key-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.5;
}
.key-pill:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.key-pill.ok {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}
.key-pill.bad {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}
.key-pill.off {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--muted);
}
.key-more {
  flex: none;
  margin-left: auto;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.key-menu {
  position: absolute;
  top: 34px;
  right: 12px;
  z-index: 5;
  min-width: 112px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.5);
}
.key-menu button {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.key-menu button:hover {
  background: var(--bg-soft);
}
.key-menu button.danger {
  color: var(--danger);
}
.key-card-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-top: 5px;
}
.key-card-key code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}
.key-copy {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  isolation: isolate;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
  font: inherit;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1),
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.key-copy > * {
  position: relative;
  z-index: 2;
}
.key-copy:hover {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}
.key-copy:active {
  transform: scale(0.97);
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--primary) 52%, transparent);
  color: var(--primary);
}
.key-copy:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.key-quota {
  margin-top: 9px;
}
.key-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 9%, transparent);
}
.key-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
}
.key-bar.is-bad i {
  background: var(--danger);
}
.key-money {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-size: 9.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.key-money b {
  color: var(--text);
  font-weight: 600;
}
.key-money .muted {
  color: var(--muted);
}
.key-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  font-size: 9px;
  color: var(--muted);
}
.key-card-foot .is-bad {
  color: var(--danger);
}
.key-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  width: 26px;
  height: 15px;
  cursor: pointer;
}
.key-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.key-switch span {
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
  transition: background 0.15s;
}
.key-switch span:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  transition: transform 0.15s;
}
.key-switch input:checked + span {
  background: var(--success);
}
.key-switch input:checked + span:before {
  transform: translateX(11px);
}
.key-switch input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}
.key-switch input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.k-search {
  margin-bottom: 12px;
}
.page-head:has(.key-new) {
  align-items: center;
  padding-top: 10px;
  margin-bottom: 2px;
}
.page-head:has(.key-new) > div:first-child {
  flex: 1;
  min-width: 0;
  display: block;
}
.page-head:has(.key-new) p {
  display: block;
  margin: 0;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
.page-head:has(.key-new) .actions {
  flex: none;
  margin-left: 12px;
}
html[data-theme="paper"] .page-head .actions .key-new {
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--paper);
  font-weight: 600;
}
html[data-theme="paper"] .page-head .actions .key-new:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--paper);
}
html[data-theme="paper"] .page-head .actions .key-new:active {
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--paper);
}
html[data-theme="paper"] .modal:has(.key-form) {
  height: auto !important;
  min-height: 0 !important;
  max-height: 86vh !important;
}
.key-filters-top {
  margin-top: 10px;
}
.key-switch-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.key-switch-label {
  font-size: 9px;
  color: var(--muted);
}
.key-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 0;
  margin-bottom: 8px;
}
.key-head-info {
  flex: 1;
  min-width: 0;
}
.key-head-count {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.key-head-note {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}
html[data-theme="paper"] .key-head-row .key-new {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--paper);
  font-weight: 600;
}
html[data-theme="paper"] .key-head-row .key-new:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--paper);
}
#root .key-head-row .key-new {
  isolation: isolate;
  transition:
    transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1),
    background-color 0.16s ease,
    border-color 0.16s ease;
}
html[data-theme="paper"] .key-head-row .key-new:active {
  transform: scale(0.97);
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--paper);
}
.key-new > svg,
.key-new-label {
  position: relative;
  z-index: 2;
}
.key-new .ripple {
  display: none;
}
.key-ripple {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.34;
  transform: scale(0);
  pointer-events: none;
  animation: key-ripple 0.5s ease-out forwards;
}
@keyframes key-ripple {
  0% {
    opacity: 0.34;
    transform: scale(0);
  }
  55% {
    opacity: 0.24;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}
@keyframes key-list-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.key-cards {
  animation: key-list-in 0.2s ease both;
  transition: opacity 0.14s ease;
}
.key-cards.is-leaving {
  animation: key-list-out 0.14s ease forwards;
}
@keyframes key-list-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.key-chip {
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}
@media (prefers-reduced-motion: reduce) {
  .key-cards {
    animation: none;
  }
}
.key-page {
  padding-bottom: 88px;
}
.logs-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.log-range-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 8px 2px;
  font-size: 9.5px;
  color: var(--muted);
}
.log-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.log-call-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 7px;
}
.log-call-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.log-call-head span {
  font-size: 9.5px;
  color: var(--muted);
}
html[data-theme="paper"] .modal:has(.range-form) {
  height: auto !important;
  min-height: 0 !important;
  max-height: 86vh !important;
}
.logs-page {
  position: relative;
  padding-bottom: 40px;
}
.log-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 6px;
}
.log-toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  flex: none;
}
.log-toolbar-title b {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.log-toolbar-title span {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.log-toolbar-actions {
  display: flex;
  gap: 4px;
  flex: 1;
  max-width: min(50%, 190px);
  min-width: 0;
  margin-left: auto;
}
.log-tool-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 0;
  min-width: 0;
  height: 30px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 8.5px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.log-tool-btn svg {
  flex: none;
}
.log-tool-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-tool-btn.is-open {
  background: var(--bg-soft);
  border-color: color-mix(in srgb, var(--text) 35%, var(--border));
}
.log-tool-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.log-tool-chev {
  flex: none;
  color: var(--muted);
  font-size: 8px;
}
.log-date-pop {
  position: absolute;
  z-index: 20;
  top: 46px;
  right: 0;
  width: 218px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.55);
}
.log-date-pop b {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}
.log-date-pop label {
  display: block;
  margin-top: 6px;
  font-size: 8.5px;
  color: var(--muted);
}
.log-date-pop input {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 9px;
}
.log-date-err {
  margin: 6px 0 0;
  font-size: 8.5px;
  color: var(--danger);
}
.log-date-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
}
.log-date-actions button {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.log-date-actions button.apply {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.logs-page .log-range-note {
  margin: 0 0 6px 1px;
}
.logs-page > .request-timeline {
  margin-top: 4px;
}
.log-call-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 7px;
}
.log-call-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.log-call-head span {
  font-size: 9.5px;
  color: var(--muted);
}
.keys-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  text-align: center;
  line-height: 1.65;
}
/* ===== DSHA-FIX-H-END ===== */
/* ===== DSHA-LOGS-START 用量明细：筛选条 / 排序表头 / 分页 / 详情 ===== */
.logbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.tbl th.srt {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tbl th.srt:hover {
  color: var(--text);
}
.tbl th.srt.on {
  color: var(--primary);
}
.srt-i {
  margin-left: 5px;
  vertical-align: -2px;
  opacity: 0.5;
  transition: transform 0.2s;
}
.srt-i.off {
  opacity: 0.25;
}
.srt-i.asc {
  transform: rotate(180deg);
  opacity: 1;
}
.tbl th.srt.on .srt-i {
  opacity: 1;
}

.kv-err {
  color: var(--danger, #ff5c5c);
}
@media (max-width: 640px) {
  .logbar {
    padding: 12px;
  }
  .logbar .sel-wrap {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .logbar-sum {
    margin-left: 0;
    width: 100%;
  }
  .logfoot {
    padding: 12px;
  }
  .kv-r {
    font-size: 12.5px;
  }
}
/* ===== DSHA-LOGS-END ===== */
/* ===== DSHA-LOGBAR2-START 筛选栏：分组 + 时间分段控件 ===== */
.logbar-grp {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.logbar-div {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex: none;
  margin: 0 2px;
}
.seg {
  gap: 2px;
}

@media (max-width: 640px) {
  .logbar {
    gap: 10px;
  }
  .logbar-grp {
    flex: 1 1 100%;
    gap: 7px;
  }
  .logbar-grp .sel-wrap {
    flex: 1 1 calc(33.333% - 5px);
    min-width: 0 !important;
  }
  .logbar-div {
    display: none;
  }
  .seg {
    flex: 1 1 100%;
  }
  .seg-i {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
  }
}
/* ===== DSHA-LOGBAR2-END ===== */
/* ===== DSHA-LOGBAR3-START 筛选栏：填满右侧 + 控件等高 ===== */
.logbar .sel-btn {
  height: 38px;
  padding: 0 12px;
  box-sizing: border-box;
}
.seg {
  box-sizing: border-box;
}

.logbar-sum {
  margin-left: auto;
  white-space: nowrap;
  padding-left: 12px;
}

@media (max-width: 640px) {
  .logbar-sum {
    margin-left: 0;
    width: 100%;
    text-align: right;
    padding-left: 0;
  }
  .logfoot {
    justify-content: center;
  }
  .logbar .sel-btn {
    height: 36px;
    padding: 0 10px;
  }
  .seg {
    height: 36px;
  }
  .seg-i {
    height: 32px;
    padding: 0 8px;
  }
}
/* ===== DSHA-LOGBAR3-END ===== */
/* ===== DSHA-LOGS2-START 用量明细页重写：工具条 / 抽屉 ===== */
.fbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}
.fbar-div {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex: none;
  margin: 0 2px;
}
.fbar-sum {
  margin-left: auto;
  white-space: nowrap;
  padding-left: 12px;
}
.seg {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 0 2px;
  height: 38px;
}
.seg-i {
  border: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  height: 34px;
  padding: 0 14px;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition:
    background 0.18s,
    color 0.18s;
}
.seg-i:hover {
  color: var(--text);
}
.seg-i.on {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}
.fbar .sel-btn {
  height: 38px;
  padding: 0 12px;
  box-sizing: border-box;
}
.tbl tbody tr.clk {
  cursor: pointer;
}
/* 点中的行不再有任何视觉变化 */
.logfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
}
/* 右侧详情抽屉 */
.dw {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 402px;
  max-width: 92vw;
  z-index: 225;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(105%);
  visibility: hidden;
  transition:
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0.3s;
  display: flex;
  flex-direction: column;
  height: var(--app-h, 100dvh);
}
.dw.open {
  transform: none;
  visibility: visible;
}
.dw-bd {
  position: fixed;
  inset: 0;
  z-index: 220;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
.dw-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.dw-h b {
  font-size: 14.5px;
}
.dw-x {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.dw-x:hover {
  color: var(--text);
  border-color: var(--primary);
}
.dw-b {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 24px;
}
.dw-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}
.dw-err {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger, #ff5c5c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger, #ff5c5c) 32%, transparent);
}
.dw-err b {
  font-size: 11.5px;
  color: var(--danger, #ff5c5c);
}
.dw-err span {
  font-size: 13px;
  color: var(--text);
}
.kv {
  display: flex;
  flex-direction: column;
}
.kv-r {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 0;
  font-size: 13px;
}
.kv-r > span {
  color: var(--muted);
  flex: none;
}
.kv-r > b {
  text-align: right;
  word-break: break-all;
  font-weight: 600;
}
.kv-h {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  margin: 16px 0 4px;
  letter-spacing: 0.02em;
}
.kv-tot {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 9px;
}
.kv-id {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.kv-cp {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.kv-cp:hover {
  color: var(--primary);
  border-color: var(--primary);
}
@media (max-width: 760px) {
  .fbar {
    gap: 8px;
  }
  .seg {
    flex: 1 1 100%;
  }
  .seg-i {
    flex: 1;
    justify-content: center;
    padding: 0 6px;
  }
  .fbar-div {
    display: none;
  }
  .fbar .sel-wrap {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0 !important;
  }
  .fbar-sum {
    margin-left: 0;
    width: 100%;
    text-align: right;
    padding-left: 0;
  }
  .dw {
    width: 100%;
    max-width: 100%;
  }
  .dw-b {
    padding: 14px 16px 24px;
  }
}
/* ===== DSHA-LOGS2-END ===== */
/* ===== DSHA-LOGS3-START 手机筛选/分页修正 ===== */
.sel-btn span {
  white-space: nowrap;
}
.pager button {
  white-space: nowrap;
}
.pg-dots {
  padding: 0 4px;
  align-self: center;
}
@media (max-width: 760px) {
  /* 下拉改两列，避免 1/3 宽度把文字挤成两行 */
  .fbar .sel-wrap {
    flex: 1 1 calc(50% - 5px);
    min-width: 0 !important;
  }
  .fbar .sel-btn {
    padding: 0 10px;
  }
  .logfoot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .logfoot > span {
    text-align: center;
  }
  .pager {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }
  .pager button {
    padding: 7px 10px;
    font-size: 12.5px;
    min-width: 34px;
  }
  .pager button:first-child,
  .pager button:last-child {
    min-width: auto;
  }
}
/* ===== DSHA-LOGS3-END ===== */
/* ===== DSHA-MOTION-START 动效打磨 ===== */
:root {
  --e-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --e-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.14s;
  --t-base: 0.26s;
  --t-slow: 0.42s;
}
/* 按压反馈：所有可点元素都有一点"回弹" */
.btn,
.icon-btn,
.menu-btn,
.tm-btn,
.nm-btn,
.sel-btn,
.seg-i,
.fchip,
.pager button,
.tier,
.pay,
.topt,
.nm-item,
.si,
.acc-head,
.avatar,
.panel-link,
.kv-cp,
.dw-x,
.chip,
.m2-btn {
  transition:
    transform var(--t-fast) var(--e-out),
    background-color 0.2s var(--e-soft),
    border-color 0.2s var(--e-soft),
    color 0.2s var(--e-soft),
    box-shadow 0.22s var(--e-soft),
    filter 0.18s var(--e-soft);
}
.btn:active,
.icon-btn:active,
.menu-btn:active,
.tm-btn:active,
.nm-btn:active,
.seg-i:active,
.fchip:active,
.pager button:active:not([disabled]),
.nm-item:active,
.kv-cp:active,
.dw-x:active,
.chip:active {
  transform: scale(0.955);
}
.sel-btn:active,
.tier:active,
.pay:active,
.topt:active,
.si:active {
  transform: scale(0.985);
}
/* 分段控件：滑动指示块 + 等宽 */
.seg {
  position: relative;
  width: min(100%, 352px);
  overflow: hidden;
}
.seg-ind {
  position: absolute;
  top: 2px;
  left: 2px;
  bottom: 2px;
  width: calc((100% - 4px) / 4);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  pointer-events: none;
  transition: transform 0.34s var(--e-spring);
}
.seg-i {
  flex: 1 1 0;
  background: transparent !important;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.seg-i.on {
  font-weight: 700;
  color: var(--primary);
}
/* 表格行入场 */
.tbl tbody tr {
  animation: rowIn 0.34s var(--e-out) both;
}
@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* 抽屉内容逐条淡入 */
.dw.open .dw-b > * {
  animation: fadeUp 0.4s var(--e-out) both;
}
.dw.open .dw-b > *:nth-child(1) {
  animation-delay: 0s;
}
.dw.open .dw-b > *:nth-child(2) {
  animation-delay: 0.045s;
}
.dw.open .dw-b > *:nth-child(3) {
  animation-delay: 0.09s;
}
.dw.open .dw-b > *:nth-child(4) {
  animation-delay: 0.13s;
}
.dw.open .dw-b > *:nth-child(5) {
  animation-delay: 0.17s;
}
.dw.open .dw-b > *:nth-child(n + 6) {
  animation-delay: 0.2s;
}
/* Toast：进 + 出 */
.toast {
  animation:
    toastIn 0.32s var(--e-spring),
    toastOut 0.3s ease 2.05s forwards;
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translate(-50%) translateY(10px) scale(0.96);
  }
}
/* 弹窗：更柔和的出入 */
.modal-backdrop {
  animation: fadeIn 0.22s var(--e-soft);
}
.modal {
  animation: popIn 0.26s var(--e-spring);
}
/* 骨架屏微光更顺滑 */
.skel {
  animation: shimmer 1.5s var(--e-soft) infinite;
}
/* 桌面端：卡片浮起 + 表格行轻微高亮（中性，不带绿） */
@media (hover: hover) {
  .card.model-card.lift:hover,
  .card.feat.lift:hover,
  .card.step.lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px #00000059;
  }
  .tbl tbody tr.clk:hover td {
    background: color-mix(in srgb, var(--text) 4.5%, transparent);
  }
  .btn:hover:not([disabled]) {
    transform: translateY(-1px);
  }
  .btn:active:not([disabled]) {
    transform: scale(0.955);
  }
}
/* 无障碍：尊重「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* ===== DSHA-MOTION-END ===== */
/* ===== DSHA-MOTION2-START 数据切换过渡 + reduce-motion 优化 ===== */
.tbl-wrap {
  transition:
    opacity 0.17s var(--e-soft),
    transform 0.17s var(--e-out);
}
.tbl-wrap.leaving {
  opacity: 0;
  transform: translateY(-7px) scale(0.995);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  @keyframes rowFade {
    from {
      opacity: 0.15;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes fadeSwap {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  .tbl tbody tr {
    animation: rowFade 0.3s ease both !important;
    animation-duration: 0.3s !important;
  }
  .tbl-wrap {
    transition: opacity 0.16s ease !important;
    transition-duration: 0.16s !important;
  }
  .tbl-wrap.leaving {
    transform: none !important;
  }
  .page-enter {
    animation: fadeSwap 0.22s ease both !important;
    animation-duration: 0.22s !important;
  }
  .dw-b > *,
  .modal,
  .toast,
  .skel {
    animation-duration: 0.22s !important;
  }
}
/* ===== DSHA-MOTION2-END ===== */
/* ===== DSHA-STAT-SIMPLE-START 统计卡精简：只有标签 + 数值 ===== */
.stat {
  padding: 15px 16px;
}
.stat .k {
  margin-bottom: 5px;
}
.stat .v {
  font-size: 23px;
  line-height: 1.15;
}
.stat .d {
  display: none;
}
@media (max-width: 760px) {
  .stat {
    padding: 13px 14px;
  }
  .stat .v {
    font-size: 21px;
  }
}
/* ===== DSHA-STAT-SIMPLE-END ===== */
/* ===== DSHA-PAGER2-START 分页：窗口式 + 手机紧凑 ===== */
.pager {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.pager button {
  min-width: 34px;
  padding: 7px 10px;
  font-size: 12.5px;
  border-radius: 9px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.pager button.on {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  font-weight: 700;
}
.pager button:hover:not([disabled]):not(.on) {
  color: var(--text);
  border-color: var(--muted);
}
.pager button[disabled] {
  cursor: not-allowed;
}
.pager button:first-child,
.pager button:last-child {
  min-width: auto;
}
.pg-dots {
  min-width: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}
@media (max-width: 760px) {
  .pager {
    gap: 3px;
    justify-content: center;
    width: 100%;
  }
  .pager button {
    min-width: 26px;
    padding: 6px 4px;
    font-size: 11.5px;
    border-radius: 8px;
  }
  .pager button:first-child,
  .pager button:last-child {
    padding: 6px 9px;
  }
  .pager button.pg-dots {
    min-width: 16px;
    padding: 6px 2px;
  }
}
/* 320-380px 极窄屏：再收一档，保证 9 个按钮一行 */
@media (max-width: 380px) {
  .pager {
    gap: 2px;
  }
  .pager button {
    min-width: 22px;
    padding: 5px 3px;
    font-size: 11px;
    border-radius: 7px;
  }
  .pager button:first-child,
  .pager button:last-child {
    padding: 5px 7px;
  }
  .pager button.pg-dots {
    min-width: 12px;
    padding: 5px 1px;
  }
}
/* ===== DSHA-PAGER2-END ===== */
/* ===== DSHA-PAGER3-START 省略号可点击（快进 5 页） ===== */
.pager button.pg-dots {
  background: transparent;
  border-color: transparent;
  min-width: 22px;
  padding: 6px 4px;
  cursor: pointer;
  color: var(--muted);
}
.pager button.pg-dots:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}
/* ===== DSHA-PAGER3-END ===== */
/* ===== DSHA-PERF-START 移动端卡顿治理：去掉全屏模糊 + 抽屉合成优化 ===== */
/* 全屏 backdrop-filter 在安卓 GPU 上极重（尤其背后还有行动画时），改为纯色遮罩 */
.dw-bd,
.modal-backdrop,
.side-backdrop.show {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}
.dw-bd {
  background: #000000b8;
}
.modal-backdrop {
  background: #000000c4;
}
/* 抽屉：提升为独立合成层，滑出不再触发整页重绘 */
.dw {
  will-change: transform;
  box-shadow: -10px 0 24px #0000008c;
  contain: layout paint;
}
/* 统计卡纯展示，不要任何点击/悬停反馈 */
.stat,
.stat.lift,
.stat:active {
  cursor: default !important;
  transform: none !important;
  box-shadow: none !important;
}
.stat.lift:hover {
  transform: none !important;
  box-shadow: none !important;
}
.stat .k,
.stat .v {
  user-select: none;
}
/* 请求列表：点开详情时不改变外观（不要"点中变色"） */
.tbl tbody tr.clk,
.tbl tbody tr.clk:active,
.tbl tbody tr.clk.on {
  background: transparent;
}
.tbl tbody tr.clk td,
.tbl tbody tr.clk.on td {
  background: transparent !important;
  box-shadow: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .dw {
    will-change: auto;
  }
}
/* ===== DSHA-PERF-END ===== */
/* ===== DSHA-FIXED-ANCESTOR-START 浮层定位根因修复 ===== */
/* 教训：祖先元素只要有 transform / filter / backdrop-filter / contain / will-change，
   position:fixed 就会退化为"相对该祖先定位"。而 .page-enter 既是滚动容器
   （overflow-y:auto）又带着入场动画，于是抽屉变成跟着内容一起滚。
   这里：① 动画结束后不残留 transform；② 给所有可能制造包含块的祖先兜底。 */
.main > .page-enter:not([style*="transform"]),
.page-scroll {
  will-change: auto;
}
/* 浮层自身只管提升层级，不再依赖祖先 */
.dw,
.dw-bd,
.modal-backdrop,
.modal,
.side,
.side-backdrop {
  contain: none;
}
/* 滚动锁定只作用于内容区，不影响浮层 */
html.noscroll .dw,
html.noscroll .dw-b,
html.noscroll .modal {
  overflow-y: auto;
}
/* ===== DSHA-FIXED-ANCESTOR-END ===== */
/* ===== DSHA-PAGER4-START 桌面用页码 / 手机用极简单行 + 提高对比度 ===== */
/* 对比度：数字用正文色，只有禁用态才发灰 */
.pager button {
  color: var(--text);
}
.pager button[disabled] {
  color: var(--muted);
  opacity: 0.45;
}
.pager button.on {
  color: var(--primary);
  border-color: var(--primary);
}
.pg-pos {
  display: none;
}
@media (max-width: 760px) {
  .logfoot {
    justify-content: center;
    padding: 14px 12px;
  }
  .logfoot-pos {
    display: none;
  }
  .pager {
    width: 100%;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
  }
  /* 手机上不显示页码数字，只留 上一页 / 第 N / M 页 / 下一页 */
  .pager .pg-num,
  .pager .pg-dots {
    display: none !important;
  }
  .pg-pos {
    display: inline-flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .pager button {
    min-width: auto;
    padding: 10px 18px;
    font-size: 13.5px;
    border-radius: 11px;
    font-weight: 600;
  }
  .pager button:first-child,
  .pager button:last-child {
    padding: 10px 18px;
  }
}
@media (max-width: 380px) {
  .pager {
    gap: 7px;
  }
  .pager button {
    padding: 9px 13px;
    font-size: 12.5px;
  }
}
/* ===== DSHA-PAGER4-END ===== */
/* ===== DSHA-PAGER5-START 翻页稳定：禁止浏览器滚动锚定 ===== */
/* 翻页时行数变化（末页行数少）会让浏览器"自动锚定"并微调滚动位置，
   表现为页面往上一跳。这里关掉锚定，改由翻页逻辑显式把列表滚回顶部。 */
.tbl-card,
.tbl-wrap,
.tbl tbody {
  overflow-anchor: none;
}
/* ===== DSHA-PAGER5-END ===== */
/* ===== DSHA-PAGER6-START 翻页栏悬浮固定 + 页码可输入跳转 ===== */
/* 悬浮：翻页栏始终钉在滚动区底部，不必滚到最后一行也能翻页 */
.logfoot {
  bottom: 0;
  z-index: 6;
  border-top: 1px solid var(--border);
}
/* 页码按钮：看起来像文字，悬停才提示可点 */
.pg-jump {
  background: transparent !important;
  border: 0 !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
  padding: 8px 10px !important;
  min-width: auto !important;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-radius: 9px !important;
  transition:
    color 0.18s,
    background-color 0.18s;
}
.pg-jump:hover {
  color: var(--primary) !important;
  background: color-mix(in srgb, var(--primary) 10%, transparent) !important;
}
/* 输入态 */
.pg-input {
  width: 56px;
  height: 34px;
  text-align: center;
  border-radius: 9px;
  border: 1px solid var(--primary);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.pg-input.logfoot-pos {
  width: 64px;
}
@media (max-width: 760px) {
  .logfoot {
    padding: 10px 12px;
    justify-content: center;
  }
  .logfoot-pos {
    display: none;
  }
  .pager {
    width: auto;
    flex: 1;
    justify-content: center;
  }
  .pager .pg-pos {
    display: inline-flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    min-width: 0;
  }
  .pager .pg-input {
    flex: none;
    width: 56px;
  }
}
/* ===== DSHA-PAGER6-END ===== */
/* ===== DSHA-PAGER7-START 常态不悬浮 / 点击后固定 / 无背景卡片 ===== */
.logfoot {
  position: static !important;
  box-shadow: none !important;
  background: transparent !important;
}
.pg-float {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  animation: pgFloatIn 0.26s var(--e-out) both;
}
@keyframes pgFloatIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* 悬浮时按钮样式完全不变：只用与底部一致的那套 .pager 规则，这里仅修正容器排列 */
.pg-float .pager {
  width: auto !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  flex: none;
}
.pg-float .pg-pos {
  flex: none !important;
}
.pg-float > * {
  align-self: center !important;
}
/* 取消按钮：与相邻按钮同高、垂直居中对齐 */
.pg-unpin {
  align-self: center;
  box-sizing: border-box;
  flex: none;
  padding: 7px 0;
  width: 34px;
  min-height: 33px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 9px;
  transition:
    color 0.18s,
    border-color 0.18s,
    transform 0.14s var(--e-out);
}
.pg-unpin:hover {
  color: var(--text);
  border-color: var(--primary);
}
.pg-unpin:active {
  transform: scale(0.95);
}
@media (max-width: 760px) {
  .pg-float {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    padding: 0 10px;
  }
  .pg-unpin {
    padding: 10px 0;
    width: 42px;
    min-height: 40px;
    border-radius: 11px;
  }
}
@media (max-width: 400px) {
  .pg-float {
    gap: 6px;
  }
}
/* ===== DSHA-PAGER7-END ===== */
/* ===== DSHA-STAT-COLOR-START 统计卡数字统一用绿色 ===== */
/* 之前按 accent 开关时有时无（东一个西一个），先统一全部绿色。
   想改回"只有账户余额绿"：把下面这条删掉即可，accent 逻辑仍在。 */
.stat .v {
  color: var(--success);
}
/* ===== DSHA-STAT-COLOR-END ===== */
/* ===== DSHA-MODELS2-START 模型广场重做：价格分区 / 状态文字 / 排序 ===== */

.model-card {
  display: flex;
  flex-direction: column;
}
.model-card .mc-head {
  gap: 9px;
}

.model-card .mc-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.model-card .mc-meta i {
  font-style: normal;
  color: var(--border);
}
.model-card .mc-price {
  flex-direction: column;
}
.model-card .prow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.model-card .prow > span {
  font-size: 11.5px;
  color: var(--muted);
}
.model-card .prow > b {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.model-card .prow > b em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}
.model-card .mc-foot {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.55;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.model-card .mc-foot i {
  font-style: normal;
  color: var(--border);
}

/* 工具条：结果计数右对齐 */
.filters-count {
  margin-left: auto;
  align-self: center;
  white-space: nowrap;
}
/* 空状态 */
.model-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 46px 20px;
  text-align: center;
}
.model-empty b {
  font-size: 14.5px;
}
@media (max-width: 760px) {
  .model-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .filters {
    gap: 8px;
  }
  .filters .input-wrap {
    max-width: none !important;
    flex: 1 1 100%;
  }
  .filters .sel-wrap {
    flex: 1 1 calc(50% - 4px);
  }
  .filters-count {
    width: 100%;
    text-align: right;
    margin-left: 0;
  }
  .model-card .prow > b {
    font-size: 15px;
  }
}
/* ===== DSHA-MODELS2-END ===== */
/* ===== DSHA-MODELS3-START 模型卡紧凑化 ===== */
.model-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.model-card {
  padding: 11px 12px;
}
.model-card.off {
  opacity: 0.5;
}
.model-card .mc-head {
  display: flex;
  align-items: center;
  min-width: 0;
}
.model-card .mc-head b {
  font-size: 13px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.model-card .mc-head .sp {
  flex: 1;
  min-width: 2px;
}
.model-card .mc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.model-card .mc-tags span {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.model-card .mc-price {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px 5px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}
.model-card .mc-price > span {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}
.model-card .mc-price > b {
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  white-space: nowrap;
  line-height: 1.4;
}
.model-card .mc-price > b em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 1px;
}
.model-card .mc-price.one {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.model-card .mc-price.one > b {
  font-size: 14px;
}
@media (max-width: 760px) {
  .model-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .model-card {
    padding: 12px 13px;
  }
  .model-card .mc-price > b {
    font-size: 13.5px;
  }
}
/* ===== DSHA-MODELS3-END ===== */
/* ===== DSHA-AVMENU-START 头像小菜单 ===== */
.av-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.av-btn {
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.av-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 7px;
  box-shadow: 0 18px 44px #00000073;
  animation: avIn 0.18s var(--e-out) both;
}
@keyframes avIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.av-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 11px;
}
.av-lg {
  width: 34px;
  height: 34px;
  font-size: 14px;
  flex: none;
}
.av-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.av-id b {
  font-size: 13.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av-id i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.av-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}
.av-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.16s var(--e-soft),
    color 0.16s var(--e-soft),
    transform 0.14s var(--e-out);
}
.av-item:hover {
  background: var(--surface-2);
}
.av-item:active {
  transform: scale(0.985);
}
.av-item > svg {
  color: var(--muted);
  flex: none;
}
.av-item .av-t {
  flex: 1;
  text-align: left;
}
.av-item .av-val {
  font-size: 11.5px;
  color: var(--muted);
}
.av-item.danger,
.av-item.danger > svg {
  color: var(--danger, #ff5c5c);
}
.av-item.danger:hover {
  background: color-mix(in srgb, var(--danger, #ff5c5c) 12%, transparent);
}
@media (max-width: 760px) {
  .av-pop {
    width: min(84vw, 240px);
  }
}
/* ===== DSHA-AVMENU-END ===== */
/* ===== DSHA-AVATAR-SQUARE-START 头像改为圆角矩形 ===== */
/* 与相邻的主题按钮（34px / 10px 圆角）保持同一套圆角语言；
   菜单头部的大头像沿用同一类，因此一起变成圆角矩形。 */
.avatar {
  border-radius: 10px !important;
}
.av-lg {
  border-radius: 11px !important;
}
/* ===== DSHA-AVATAR-SQUARE-END ===== */

/* ===== DSHA-AVMENU3-START 语言/主题：行内分段控件 ===== */
/* 面板加宽，并保证不超出视口；主题分段控件允许收缩（原来是 flex:none，英文界面下 Terminal/Light/Dark 会冲出面板右边框 13px） */
.av-pop {
  width: min(292px, calc(100vw - 20px));
}
.av-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
}
.av-row > svg {
  color: var(--muted);
  flex: none;
}
.av-row .av-t {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
}
.av-seg {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
}
.av-seg button {
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 7px;
  white-space: nowrap;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.16s var(--e-soft),
    color 0.16s var(--e-soft),
    transform 0.14s var(--e-out);
}
.av-seg button:hover {
  color: var(--text);
}
.av-seg button:active {
  transform: scale(0.94);
}
.av-seg button.on {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  font-weight: 700;
}
html[data-theme^="mono"] .av-seg button.on {
  background: var(--text);
  color: var(--bg);
}
@media (max-width: 760px) {
  .av-pop {
    width: min(88vw, 254px);
  }
}
/* ===== DSHA-AVMENU3-END ===== */
/* ===== DSHA-TOPBAR-FIX-START 顶栏去掉 backdrop-filter ===== */
/* 教训：backdrop-filter 会为内部 position:fixed 元素制造包含块。
   控制台顶栏里有「退出登录」确认弹窗，于是弹窗被压缩进 63px 高的顶栏、
   并跑到屏幕外（表现为"弹窗乱飞"）。
   顶栏在控制台是 static 布局（不是 sticky），没有内容从它下面滚过，
   这个模糊本来就无效 —— 去掉它，顺便省一次全屏合成。 */
.topbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* ===== DSHA-TOPBAR-FIX-END ===== */
/* ===== DSHA-SETTINGS-START 设置页：宽度约束 + 表单细化 ===== */
/* 之前设置卡片铺满整个内容区（1440 屏下单行近 1230px），
   用户名/邮箱这种短输入框被拉得极宽、读起来散。收成 768px。 */
.set-wrap {
  max-width: 768px;
}
.set-wrap .set-section {
  width: 100%;
}
.set-wrap .form-grid {
  gap: 14px;
}
.set-wrap .field .input {
  width: 100%;
}
/* 禁用态：只降透明度在暗色卡片上仍像"绿着可用"，加去饱和让状态一目了然 */
/* 禁用态：不用 opacity（会把底色和字色一起压成中灰，深浅主题都发闷），
   改为「弱底 + 弱字 + 无阴影」，三个主题统一、一眼可辨 */
.set-wrap .btn[disabled] {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
  opacity: 1;
  filter: none;
  box-shadow: none;
  cursor: not-allowed;
  transform: none !important;
}
@media (max-width: 640px) {
  .set-wrap {
    max-width: 100%;
  }
  .set-wrap .form-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== DSHA-SETTINGS-END ===== */
/* ===== DSHA-THEME-COMPACT-START 外观主题：名称与描述同行，卡片高度减半 ===== */
/* 之前每张卡 73px（名称一行、描述一行），三张竖排 219px，很占位置。
   现在名称与描述排在同一行，每张约 38px。 */
.theme-compact .topt {
  padding: 8px 11px;
  margin-bottom: 6px;
  gap: 10px;
  border-radius: 9px;
}
.theme-compact .topt .radio {
  width: 14px;
  height: 14px;
  border-width: 2px;
}
.theme-compact .topt.sel .radio:after {
  inset: 2.5px;
}
.theme-compact .topt .dots {
  gap: 2px;
}
.theme-compact .topt .dots i {
  width: 11px;
  height: 11px;
}
.theme-compact .topt .tt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.theme-compact .topt .tt b {
  display: inline;
  font-size: 13px;
  line-height: 1.35;
}
.theme-compact .topt .tt span {
  font-size: 11px;
  line-height: 1.35;
}
.theme-compact .topt .def {
  font-size: 10px;
  padding: 0 7px;
  line-height: 1.7;
}
@media (max-width: 520px) {
  .theme-compact .topt {
    padding: 9px 11px;
    gap: 9px;
  }
  .theme-compact .topt .dots {
    display: none;
  }
  /* 窄屏只留主题名：描述会换行导致三张卡高矮不一，名字本身已够区分。 */
  .theme-compact .topt .tt {
    flex-wrap: nowrap;
    min-width: 0;
  }
  .theme-compact .topt .tt span {
    display: none;
  }
}
/* ===== DSHA-THEME-COMPACT-END ===== */
/* ===== DSHA-SETTINGS2-START 邮件推送开关 + 登录设备列表 ===== */
/* 开关 */
.sw {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  background: var(--border);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--e-soft);
}
.sw:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px #00000059;
  transition: transform 0.22s var(--e-out);
}
.sw.on {
  background: var(--primary);
}
.sw.on:after {
  transform: translateX(16px);
}
html[data-theme^="mono"] .sw.on {
  background: var(--text);
}
html[data-theme^="mono"] .sw.on:after {
  background: var(--bg);
}
.sw:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.sw:active:after {
  width: 21px;
}
/* 登录设备 */
.dev-list {
  gap: 8px;
}

@media (max-width: 520px) {
  .set-wrap .row {
    gap: 8px;
  }
  .dev-row {
    padding: 10px;
  }
  .dev-main i {
    font-size: 11px;
  }
}
/* ===== DSHA-SETTINGS2-END ===== */
/* ===== DSHA-DEVLIST-START 登录设备改为分隔线列表（不再卡片套卡片）===== */
/* 之前每行都是带边框的小卡片，嵌在「安全」这张大卡里（卡片套卡片），
   而且手机上名称/徽章/IP 被挤成三行。改成细分隔线的列表 + 名称行不换行。 */
.dev-list {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}
.dev-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  background: none;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.dev-row:first-child {
  border-top: 1px solid transparent;
}
@media (hover: hover) {
  .dev-row:hover {
    background: color-mix(in srgb, var(--text) 3%, transparent);
  }
}
.dev-ic {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.dev-row.cur .dev-ic {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.dev-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.dev-main b {
  font-size: 13px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.dev-nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.dev-main b .badge {
  flex: none;
  padding: 0 8px;
  line-height: 1.4;
}
.dev-main i {
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .dev-row {
    gap: 10px;
    padding: 12px 0;
  }
  .dev-ic {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .dev-main b {
    font-size: 12.5px;
    gap: 6px;
  }
  .dev-main b .badge {
    font-size: 9.5px;
    padding: 0 6px;
    line-height: 1.7;
  }
  .dev-main i {
    font-size: 11px;
  }
}
/* ===== DSHA-DEVLIST-END ===== */
/* ===== DSHA-TOPUP-START 支付页：金额卡一排放下 + 支付行更紧凑 ===== */
/* 之前 minmax(130px) 在主栏（686px）里只排得下 4 列，第 5 个「自定义」被挤到第二行，
   5 个金额选项占掉 190px 竖向空间。收窄到 116px 就能一排 5 个。 */

.tier {
  padding: 11px 8px;
  border-radius: 9px;
}

.tier .bonus {
  font-size: 11px;
  margin-top: 2px;
}
/* 「热门」角标原来压在卡片边框上（top:-9px），移进卡片内右上角 */
.tier .hot-mark {
  top: 6px;
  right: 6px;
  font-size: 9.5px;
  padding: 0 6px;
  gap: 2px;
}
/* 支付方式行：73px → 约 62px */
.pay {
  padding: 10px 12px;
  gap: 11px;
}
.pay .pt {
  font-size: 13px;
  line-height: 1.35;
}
.pay .pic {
  width: 32px;
  height: 32px;
}
.order-note {
  font-size: 11.5px;
  line-height: 1.7;
  margin-top: 11px;
}
@media (max-width: 760px) {
  .tiers {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
  }
  .tier {
    padding: 10px 6px;
  }
  .tier .a {
    font-size: 17px;
  }
  .tier .bonus {
    font-size: 10.5px;
  }
  .tier .hot-mark {
    top: 5px;
    right: 5px;
    font-size: 9px;
    padding: 0 5px;
  }
  .pay {
    padding: 10px 11px;
    gap: 10px;
  }
  /* 窄屏描述会换行导致各行高矮不一，改成单行截断 */
  .pay .pt {
    min-width: 0;
    overflow: hidden;
  }
  .pay .pt span {
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* ===== DSHA-TOPUP-END ===== */
/* ===== DSHA-TOPUP2-START 金额卡只留金额 + 立即支付按钮 ===== */
/* 6 个金额选项（1/5/10/20/50/自定义）要在一排放下：主栏 686px 需 6 列 */
.tiers {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 9px;
  margin-bottom: 4px;
}
.tier .a {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
/* 立即支付按钮：整宽主 CTA */
.pay-now {
  margin-top: 2px;
  font-weight: 700;
}
@media (max-width: 760px) {
  .tiers {
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 8px;
  }
  .tier .a {
    font-size: 17px;
  }
  .pay-now {
    padding: 12px 14px;
  }
}
.tier .a {
  text-align: center;
}
/* ===== DSHA-TOPUP2-END ===== */
/* ===== DSHA-TOPUP3-START 充值页改单栏 ===== */
/* 「当前账户」卡片删除后，右栏只剩一张兑换码卡片、下方大片留白。
   改成单栏 + 768px 宽度（与设置页同一套宽度语言）。 */
.topup-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 768px;
}
.topup-wrap > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.topup-wrap .card.panel {
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .topup-wrap {
    max-width: 100%;
  }
}
/* ===== DSHA-TOPUP3-END ===== */
/* ===== DSHA-TOPUP-D-START 方案 D：余额徽章 / 到账金额行 / 脚注 ===== */
/* 页头右侧的余额徽章（充值前先看一眼余额） */
.bal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--bg-soft);
  white-space: nowrap;
}
.bal-chip b {
  font-size: 13.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* 到账金额 + 立即支付：同一行，左右分开 */
.payrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: 13px;
  padding-top: 12px;
}
.payrow > .pl {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.payrow > .pl b {
  font-size: 17px;
  color: var(--success);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pay-now {
  width: auto;
  margin: 0;
  min-width: 138px;
  padding: 11px 22px;
  font-size: 13.5px;
}
/* 底部整页脚注 */
.topup-foot {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.7;
}
@media (max-width: 520px) {
  .payrow {
    gap: 9px;
  }
  .pay-now {
    min-width: 118px;
    padding: 10px 16px;
  }
  .payrow > .pl b {
    font-size: 15.5px;
  }
  .bal-chip {
    padding: 4px 11px;
  }
}
/* ===== DSHA-TOPUP-D-END ===== */
/* ===== DSHA-TOPUP-FOOT-START 脚注支持换行 ===== */
.topup-foot {
  white-space: pre-line;
}
/* ===== DSHA-TOPUP-FOOT-END ===== */
/* ===== DSHA-AVATAR-UP-START 头像上传与裁剪 ===== */
.av-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.avatar.av-xl {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 20px;
  cursor: default;
}
.avatar.av-xl:hover {
  transform: none;
  box-shadow: none;
}
.prof-av {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}
.prof-av-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.prof-av-txt b {
  font-size: 13px;
}
.crop-stage {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop-stage:active {
  cursor: grabbing;
}
.crop-stage img {
  position: absolute;
  max-width: none;
  max-height: none;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      transparent 33.2%,
      #ffffff42 33.2%,
      #ffffff42 33.5%,
      transparent 33.5%,
      transparent 66.5%,
      #ffffff42 66.5%,
      #ffffff42 66.8%,
      transparent 66.8%
    ),
    linear-gradient(
      to bottom,
      transparent 33.2%,
      #ffffff42 33.2%,
      #ffffff42 33.5%,
      transparent 33.5%,
      transparent 66.5%,
      #ffffff42 66.5%,
      #ffffff42 66.8%,
      transparent 66.8%
    );
}
.crop-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #ffffff5c;
}
.crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.crop-zoom svg {
  color: var(--muted);
  flex-shrink: 0;
}
.crop-zoom input[type="range"] {
  flex: 1;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
  background: transparent;
}
.crop-zoom > span {
  font-size: 11.5px;
  color: var(--muted);
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .prof-av {
    flex-wrap: wrap;
    gap: 11px;
  }
  .avatar.av-xl {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 17px;
  }
}
/* ===== DSHA-AVATAR-UP-END ===== */
/* ===== DSHA-TICKET-START 工单页 ===== */
.ticket-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 768px;
}
.ticket-wrap .card.panel {
  margin-bottom: 0;
}
.ticket-wrap .form-grid {
  margin-bottom: 15px;
}
.ticket-wrap .field + .field {
  margin-top: 13px;
}
.tk-ta {
  resize: vertical;
  min-height: 112px;
  line-height: 1.75;
  font-family: inherit;
}
.tk-list {
  display: flex;
  flex-direction: column;
}
.tk-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.tk-row:first-child {
  border-top: 0;
  padding-top: 2px;
}
.tk-id {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tk-ti {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-when {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .ticket-wrap {
    max-width: 100%;
  }
  .ticket-wrap .form-grid {
    grid-template-columns: 1fr;
  }
  /* 关键：不开 flex-wrap 的话 flex:1 1 100% 不会换行，
     标题会被挤成右侧一列竖排字。开换行后标题独占第二行。 */
  .tk-row {
    gap: 9px;
    flex-wrap: wrap;
  }
  .tk-ti {
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
    font-size: 13px;
    line-height: 1.5;
  }
  .tk-when {
    margin-left: auto;
  }
}
/* ===== DSHA-TICKET-END ===== */
/* ===== DSHA-SIDE-FOOT-START 抽屉底部账户区 ===== */
/* 抽屉是 flex 列，margin-top:auto 让它贴底（不需要绝对定位） */
.side-foot {
  margin-top: auto;
  padding: 14px 4px 0;
  border-top: 1px solid var(--border);
}
.sf-acct {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.sf-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  padding-top: 1px;
}
.sf-name {
  font-size: 13px;
  line-height: 1.4;
}
.sf-mail {
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.sf-bal {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 1px;
}
.sf-bal b {
  font-size: 13.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.sf-home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.2s var(--e-soft),
    background-color 0.2s var(--e-soft),
    transform var(--t-fast) var(--e-out);
}
.sf-home:hover {
  border-color: var(--muted);
  background: var(--surface-2);
}
.sf-home:active {
  transform: scale(0.985);
}
.sf-home svg {
  color: var(--muted);
  flex: none;
}
.side .avatar {
  cursor: default;
}
.side .avatar:hover {
  transform: none;
  box-shadow: none;
}
/* ===== DSHA-SIDE-FOOT-END ===== */
/* ===== DSHA-CHAT-START 模型测试台 ===== */
.chat-wrap {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.page-enter.chat-scroll {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  min-height: 0;
}
.page-enter.chat-scroll > * {
  flex: 0 0 auto;
  min-height: 0;
}
.page-enter.chat-scroll .chat-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.chat-wrap > .chat-bar,
.chat-wrap > .chat-params-wrap,
.chat-wrap > .test-in {
  flex: 0 0 auto;
}
/* 顶部：模型 + 图标按钮 */
.chat-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.chat-bar .sel-wrap {
  flex: 0 1 200px;
  min-width: 0;
}
.chat-acts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}
.ch-ib {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.2s var(--e-soft),
    color 0.2s var(--e-soft),
    background-color 0.2s var(--e-soft),
    transform var(--t-fast) var(--e-out);
}
.ch-ib:hover:not(:disabled) {
  border-color: var(--muted);
  color: var(--text);
}
.ch-ib:active:not(:disabled) {
  transform: scale(0.94);
}
.ch-ib:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ch-ib.on {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.ch-tp {
  font: inherit;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.ch-tp:hover {
  color: var(--text);
  border-color: var(--muted);
}
/* 参数面板（可折叠，平滑展开） */
/* 参数面板：绝对定位浮层 —— 展开时完全不占布局，不会把回复区挤小 */
.chat-top {
  position: relative;
  flex: 0 0 auto;
}
.chat-params-wrap {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  width: min(370px, calc(100vw - 40px));
  max-height: min(72vh, 540px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 18px 50px #00000080,
    0 2px 8px #00000040;
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.2s var(--e-soft),
    transform 0.24s var(--e-out);
}
.chat-params-wrap.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.chat-params-wrap:before {
  content: "";
  position: absolute;
  top: -5px;
  right: 59px;
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  border-radius: 2px;
}
.chat-params-in {
  min-height: 0;
}
.chat-params {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}
.chat-params .field {
  margin: 0;
}
.chat-sys {
  resize: vertical;
  min-height: 66px;
  line-height: 1.7;
  font-family: inherit;
  font-size: 12.5px;
}
.cp-temp {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cp-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
.cp-lab {
  font-size: 12px;
  flex: none;
  min-width: 86px;
}
.cp-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 120px;
  height: 24px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  padding: 0;
  margin: 0;
}
.cp-row input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--primary) var(--pct, 0%),
    var(--border) var(--pct, 0%)
  );
}
.cp-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-soft);
  margin-top: -6px;
  box-shadow: 0 1px 4px #00000059;
  transition:
    transform 0.15s var(--e-out),
    box-shadow 0.15s var(--e-soft);
}
.cp-row input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--primary) 20%, transparent);
}
.cp-row input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: var(--border);
}
.cp-row input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--primary);
}
.cp-row input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid var(--bg-soft);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px #00000059;
}
.cp-row input[type="range"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 6px;
}
.cp-val {
  font-size: 12.5px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}
.cp-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 18px;
  padding-left: 2px;
}
.cp-model.top {
  border-bottom: 1px solid var(--border);
  padding-bottom: 9px;
}
/* 测试输入区 */
.test-in {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.test-ta {
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  resize: none;
  line-height: 20px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  overflow-y: auto;
}
.test-acts {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.test-acts .btn {
  min-width: 88px;
  justify-content: center;
}
/* 回复区 */
.test-out.has {
  border-color: color-mix(in srgb, var(--muted) 55%, var(--border));
}
.test-out {
  flex: 1 1 auto;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  font-size: 13.5px;
  line-height: 1.82;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.test-empty {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px 0;
}
.test-empty b {
  font-size: 14px;
}
.test-empty > span {
  font-size: 11.5px;
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
}
.test-empty .test-note {
  font-size: 11px;
  opacity: 0.85;
}
.test-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
  max-width: 380px;
}
.test-chips button {
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  transition:
    border-color 0.2s var(--e-soft),
    background-color 0.2s var(--e-soft),
    transform var(--t-fast) var(--e-out);
}
.test-chips button:hover {
  border-color: var(--muted);
  background: var(--surface-2);
}
.test-chips button:active {
  transform: scale(0.985);
}
.chat-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 20px;
}
.chat-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: chatBlink 1.1s infinite;
}
.chat-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--primary);
  vertical-align: middle;
  margin-left: 2px;
  animation: chatBlink 0.9s steps(2, start) infinite;
}
@keyframes chatBlink {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}
/* 指标行 */
.test-acts {
  flex-wrap: wrap;
}
.test-meta .rs-cost {
  color: var(--primary);
  font-weight: 700;
}
/* 手机端 */
@media (max-width: 640px) {
  .chat-wrap {
    gap: 10px;
    min-height: 0;
  }
  .chat-bar {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .chat-bar .sel-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
  .chat-bar .sel-btn {
    height: 42px;
  }
  .chat-acts {
    gap: 7px;
  }
  .ch-ib {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }
  .chat-params-wrap {
    width: min(370px, calc(100vw - 40px));
    max-height: min(62vh, 460px);
    border-radius: 13px;
  }
  .chat-params-wrap:before {
    right: 65px;
  }
  .chat-params {
    padding: 12px;
    gap: 10px;
  }
  .chat-params .sel-btn {
    height: 40px;
  }
  .chat-sys {
    min-height: 46px;
    font-size: 12px;
  }
  .cp-lab {
    min-width: 100%;
    font-size: 11.5px;
  }
  .cp-row {
    align-items: center;
    gap: 9px;
  }
  .cp-row input[type="range"] {
    min-width: 0;
    height: 30px;
  }
  .cp-row input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -7.5px;
  }
  .cp-val {
    font-size: 14px;
    min-width: 38px;
  }
  .cp-hint {
    font-size: 10.5px;
  }
  .ch-tp {
    padding: 10px 13px;
  }
  .test-in {
    gap: 9px;
  }
  .test-ta {
    height: 66px;
    min-height: 66px;
    max-height: 66px;
    padding: 11px 12px;
    font-size: 13.5px;
  }
  .test-acts {
    gap: 9px;
  }
  .test-acts .btn {
    height: 44px;
    padding: 0 18px;
  }
  .test-out {
    padding: 13px;
    font-size: 13.5px;
    line-height: 1.8;
    border-radius: 11px;
    min-height: 140px;
  }
  .test-empty {
    padding: 14px 0;
    gap: 7px;
  }
  .test-chips {
    max-width: 100%;
    gap: 7px;
  }
  .test-chips button {
    padding: 12px 13px;
    font-size: 12.5px;
  }
  @media (max-width: 380px) {
    .test-meta .rs-tok {
      display: none;
    }
    .test-acts .btn {
      padding: 0 12px;
      font-size: 12.5px;
    }
  }
  .test-acts {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .test-meta .ch-tp {
    margin-left: 0 !important;
    padding: 7px 10px;
    font-size: 10.5px;
  }
}
/* ===== DSHA-CHAT-END ===== */
/* ===== DSHA-TM-CARD-START 测试指标（两行）+ 明细卡 ===== */
.rs-wrap {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s var(--e-soft);
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}
/* 块内排布：左列=标签 / 中列=值 / 右列上=重跑、右列下=金额（点金额弹明细） */
.rs-wrap:hover:not(:disabled) {
  border-color: var(--muted);
}
.rs-wrap:disabled {
  cursor: default;
}
.rs-wrap.busy {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
/* 数字滚动用等宽，避免跳动 */
.rs-v,
.rs-cost {
  font-variant-numeric: tabular-nums;
}
/* 花费位置：生成中脉动 */
.rs-dots {
  grid-column: 2;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
}
.rs-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotPulse 1s var(--e-soft) infinite;
}
@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
/* 出场：信息块 / 明细卡 / 空态 */
@keyframes rsIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.rs-wrap {
  animation: rsIn 0.24s var(--e-out);
}
.rs-card {
  animation: rsIn 0.18s var(--e-out);
}
.test-empty {
  animation: esIn 0.32s var(--e-out);
}
@keyframes esIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.test-empty.fading {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition:
    opacity 0.16s var(--e-soft),
    transform 0.16s var(--e-soft);
}
/* 按钮文字切换淡入 */
.btn-lab {
  display: inline-block;
  animation: labIn 0.18s var(--e-out);
}
@keyframes labIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* 回复区边框在有内容时变亮 */
.test-out {
  transition: border-color 0.3s var(--e-soft);
}
.rs-wrap.on {
  border-color: var(--primary);
}
.rs-k {
  grid-column: 1;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.rs-v {
  grid-column: 2;
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rs-cost {
  grid-column: 2;
  grid-row: 2;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 明细小卡片 */
.rs-card {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 70;
  width: min(310px, calc(100vw - 28px));
  max-height: min(66vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 12px;
  box-shadow: 0 10px 28px #00000059;
  text-align: left;
}
.rs-card-h {
  margin-bottom: 7px;
}
.rs-card-h b {
  font-size: 12px;
  font-weight: 700;
}
.rs-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
}
.rs-dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.rs-dl dt {
  color: var(--muted);
  flex: none;
}
.rs-dl dd {
  margin: 0;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
@media (max-width: 640px) {
  .rs-wrap {
    padding: 5px 9px;
    border-radius: 9px;
    gap: 2px 8px;
  }
  .rs-k {
    font-size: 9.5px;
  }
  .rs-v {
    font-size: 11px;
  }
  .rs-cost {
    font-size: 11.5px;
  }
  .test-acts .ch-tp {
    padding: 8px 11px;
    font-size: 11.5px;
  }
  .rs-cost {
    font-size: 11px;
    padding: 2px 4px;
  }
  .rs-wrap .ch-tp {
    padding: 2px 7px;
    font-size: 10.5px;
  }
  .rs-card {
    width: calc(100vw - 24px);
    right: -2px;
    padding: 9px 11px;
    max-height: min(64vh, 330px);
    border-radius: 12px;
  }
  .rs-dl,
  .rs-dl.sec {
    font-size: 11px;
  }
}
/* ===== DSHA-TM-CARD-END ===== */
/* ===== DSHA-MOTION3-START 补齐表格行与可点单元格的过渡 ===== */
.tbl tr {
  transition: background-color 0.16s var(--e-soft);
}
.tbl tr:hover {
  transition-duration: 0.12s;
}
.tbl .clk {
  transition:
    color 0.16s var(--e-soft),
    background-color 0.16s var(--e-soft);
}
.tbl .clk:hover {
  color: var(--primary);
}
.tbl td,
.tbl th {
  transition: color 0.16s var(--e-soft);
}
/* 列表类行（工单/设备等）也统一 */
.tk-row,
.dev-row {
  transition:
    background-color 0.16s var(--e-soft),
    border-color 0.16s var(--e-soft);
}
/* ===== DSHA-MOTION3-END ===== */
/* ===== DSHA-AUTH-CSS3-START 精简紧凑版（无顶部条/标题/返回首页） ===== */
.auth-page {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
  padding: calc(20px + env(safe-area-inset-top)) 20px
    calc(44px + env(safe-area-inset-bottom));
}
.auth-page {
  animation: pgIn 0.32s var(--e-out) both;
}
@keyframes pgIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.auth-body {
  width: 100%;
  max-width: 368px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  animation: authIn 0.42s var(--e-out) 0.05s backwards;
}
@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.auth-ic {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  animation: icIn 0.5s var(--e-out) 0.09s backwards;
}
@keyframes icIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.auth-t {
  margin: 0 0 20px;
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.015em;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.af {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.af-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 15px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 13px;
  transition:
    border-color 0.2s var(--e-soft),
    background-color 0.2s var(--e-soft),
    box-shadow 0.2s var(--e-soft);
}
.af-box:hover {
  background: var(--surface-2);
}
.af-box:focus-within {
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent);
}
.af.err .af-box {
  border-color: var(--danger);
}
.af-i {
  color: var(--muted);
  flex: none;
}
.af-in {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.af-in::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.af-eye {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition:
    color 0.16s,
    background-color 0.16s;
}
.af-eye:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.af-code {
  flex: none;
  font: inherit;
  font-size: 12px;
  color: var(--primary);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 11px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.18s,
    color 0.18s,
    opacity 0.18s;
}
.af-code:hover:not(.off) {
  border-color: var(--primary);
}
.af-code.off {
  color: var(--muted);
  cursor: default;
  opacity: 0.75;
}
.af-e {
  font-size: 11px;
  color: var(--danger);
  line-height: 1.45;
  padding-left: 3px;
  animation: errIn 0.18s var(--e-out);
}
@keyframes errIn {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.af-h {
  font-size: 11px;
  color: var(--muted);
  padding-left: 3px;
}
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 3px;
}
.auth-ck {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.6;
}
.auth-ck input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  flex: none;
  cursor: pointer;
}
.auth-ck.err,
.auth-ck.err a {
  color: var(--danger);
}
.auth-terms {
  padding: 1px 3px;
}
.auth-link {
  font: inherit;
  font-size: 12px;
  color: var(--primary);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.16s var(--e-soft);
}
.auth-link:hover {
  opacity: 0.78;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border-radius: 13px !important;
  font-size: 14px;
  font-weight: 700;
}
.auth-bottom {
  width: 100%;
  max-width: 368px;
  margin: 0 auto;
  padding-top: 16px;
  text-align: center;
}
.auth-alt {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .auth-page {
    padding: calc(18px + env(safe-area-inset-top)) 18px
      calc(40px + env(safe-area-inset-bottom));
  }
  .auth-ic {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin-bottom: 16px;
  }
  .auth-t {
    font-size: 19.5px;
    margin-bottom: 18px;
  }
}
/* ===== DSHA-AUTH-CSS3-END ===== */
/* ===== DSHA-PERF2-START 渲染性能优化 ===== */
/* ① 顶栏常驻全宽模糊 → 每次滚动/动画整屏重绘；去掉并加实底色（视觉几乎无差） */
.topnav,
.topbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.topnav {
  background: color-mix(in srgb, var(--bg-soft) 97%, transparent);
}
.topbar {
  background: var(--bg-soft);
}
/* ② 背景不再 fixed 附着（安卓上滚动/动画时整屏重绘） */
html[data-theme="terminal-off"] body {
  background-attachment: scroll, scroll, scroll !important;
}
/* ③ 星尘层：50 → 10（点极小，肉眼几乎无差，栅格化成本降约 5 倍） */
/* DSHA-FIX-LIGHTBG：浅色主题的底图是「黑色 5.5% 点阵」铺在白底上，
   卡片又是纯白，视觉上卡片周围就发灰发脏（深色主题是白点铺黑底，看不见所以没这问题）。
   按「白底黑字 · 极简中性 · 无色彩干扰」的定义，浅色主题不应有底纹 → 直接去掉 */
html[data-theme="mono-light"] body {
  background-image: none;
}
html[data-theme="terminal-off"] body:before {
  background-image:
    radial-gradient(
      1.1px 1.1px at 18% 24%,
      rgba(140, 255, 205, 0.55),
      transparent 60%
    ),
    radial-gradient(
      1.3px 1.3px at 72% 16%,
      rgba(140, 255, 205, 0.45),
      transparent 60%
    ),
    radial-gradient(
      0.9px 0.9px at 34% 62%,
      rgba(140, 255, 205, 0.5),
      transparent 60%
    ),
    radial-gradient(
      1.5px 1.5px at 86% 44%,
      rgba(140, 255, 205, 0.6),
      transparent 60%
    ),
    radial-gradient(
      1px 1px at 52% 82%,
      rgba(140, 255, 205, 0.42),
      transparent 60%
    ),
    radial-gradient(
      1.2px 1.2px at 8% 58%,
      rgba(140, 255, 205, 0.38),
      transparent 60%
    ),
    radial-gradient(
      0.8px 0.8px at 64% 70%,
      rgba(140, 255, 205, 0.48),
      transparent 60%
    ),
    radial-gradient(
      1.4px 1.4px at 28% 12%,
      rgba(140, 255, 205, 0.52),
      transparent 60%
    ),
    radial-gradient(
      1px 1px at 92% 76%,
      rgba(140, 255, 205, 0.44),
      transparent 60%
    ),
    radial-gradient(
      1.1px 1.1px at 44% 36%,
      rgba(140, 255, 205, 0.56),
      transparent 60%
    );
}
/* ④ 呼吸光晕放慢（合成层动画，更省电） */
html[data-theme="terminal-off"] body:before {
  animation-duration: 120s !important;
}
/* ⑤ 全屏扫描线覆盖层会强制整页每帧合成 → 手机端关闭 */
@media (max-width: 900px) {
  body:after {
    display: none !important;
  }
}
/* ⑥ 切后台/切标签时暂停所有动画，回前台瞬间恢复 */
html.app-hidden *,
html.app-hidden *:before,
html.app-hidden *:after {
  animation-play-state: paused !important;
}
/* ⑦ 切主题那一瞬关掉逐元素过渡（只留 body 渐隐） */
html.theme-swap *:not(body) {
  transition: none !important;
}
/* ===== DSHA-PERF2-END ===== */
/* ===== DSHA-FIX-SIDESHADOW =====
   抽屉 .side 常驻 box-shadow:0 0 70px rgba(0,0,0,.65)（65% 黑 + 70px 模糊）。
   收起时抽屉在 x=-294，阴影从它的右边缘再外扩 70px，会铺进视口 0~56px ——
   实测左边缘是一条 R=198→241 的灰渐变（浅色主题下就是"整个屏幕左边黑乎乎"）。
   抽屉本来就看不到，投影毫无意义 → 只在打开时投影 */
.side {
  box-shadow: none;
}
.side.open {
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.65);
}
/* ===== DSHA-FIX-SIDESHADOW-END ===== */
/* ===== DSHA-CHART-A 消费趋势：纯色柱 + 柱顶金额 + 日均参考线 ===== */
.bars {
  position: relative;
  padding-top: 30px;
}
/* 日均标注移到【左侧】：原来在右侧，会压在柱顶数字上（¥14.93 压住 ¥22.40） */
.bars .bavg span,
.bars .bavg b {
  position: absolute;
  left: 0;
  top: -15px;
  font-size: 10px;
  color: var(--muted);
  background: var(--surface);
  padding: 0 4px 0 0;
}
.bars .bavg b {
  left: 32px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bars .b {
  position: relative;
}
/* 金额贴在各自柱顶：绝对定位在柱子正上方，必然跟随柱高
   （原来是柱子列的兄弟节点，被 .bwrap{flex:1} 顶到列顶，导致所有标签排成一行） */
.bars .bv {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 3px;
  font-size: 9.5px;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.18s var(--e-soft);
}
.bars .bcol.on .bv {
  color: var(--text);
  font-weight: 700;
}
@media (max-width: 400px) {
  .bars .bv {
    font-size: 9.5px;
  }
  .bars .bavg span {
    display: none;
  }
}
/* ===== DSHA-CHART-A-END ===== */
/* 缓存命中：内联在「输入/输出」后面，不新增行 */
.tbl td .tc {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  margin-left: 5px;
  white-space: nowrap;
}
.tbl td .tc:before {
  content: "·";
  margin-right: 4px;
  opacity: 0.5;
}
/* ===== DSHA-CACHE-END ===== */
/* 注意：这段只作用于「带 .tk 三栏 token 的记录表」（概览·最近请求 / 用量明细）。
   早前漏了限定条件，导致密钥表的「操作」列也被套上 flex:1 1 100%，删除按钮被拉成大色块。
   用 :has(.tk) 精确限定，Chrome 105+ 支持 */
/* ===== DSHA-CARD-PROP 记录卡(丙)：模型+金额 / 输入·输出·缓存命中 三栏 / 时间+延迟+状态 ===== */
.tbl tr:has(.tk) td .tk em {
  display: none;
}
@media (min-width: 641px) {
  .tbl tr:has(.tk) td .tk + .tk:before {
    content: "/";
    margin: 0 5px;
    opacity: 0.45;
  }
}
.tbl tr:has(.tk) td .tk b {
  font-weight: 600;
}
@media (max-width: 640px) {
  /* 两张表列数不同（概览 7 列 / 用量明细 8 列，多一个「流式」），
     所以不按第几列去认，改成给所有格子一个默认 order，再单独抬升关键几格 —— 两表通用 */
  .tbl tr:has(.tk) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 4px;
    column-gap: 8px;
  }
  .tbl tr:has(.tk) td {
    padding: 0 !important;
    display: block;
    order: 5;
  }
  .tbl tr:has(.tk) td:before {
    display: none !important;
  }
  /* 第 1 行：模型 + 金额 */
  .tbl tr:has(.tk) td:nth-child(2) {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tbl tr:has(.tk) td:nth-child(5) {
    order: 2;
    flex: none;
    font-size: 14px;
    font-weight: 700;
  }
  /* 第 2 行：输入 / 输出 / 缓存命中 三栏 */
  .tbl tr:has(.tk) td:nth-child(4) {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    column-gap: 10px;
    margin-top: 2px;
    padding-top: 6px !important;
    border-top: 1px solid var(--border);
  }
  .tbl tr:has(.tk) td:nth-child(4) .tk {
    flex: 1 1 0;
    min-width: 0;
  }
  .tbl tr:has(.tk) td:nth-child(4) .tk em {
    display: block;
    font-style: normal;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.55;
  }
  .tbl tr:has(.tk) td:nth-child(4) .tk b {
    display: block;
    font-size: 13px;
    line-height: 1.4;
  }
  .tbl tr:has(.tk) td:nth-child(4) .tk.hit b {
    color: var(--primary);
  }
  /* 第 3 行：时间 → 延迟/流式 → 状态靠右 */
  .tbl tr:has(.tk) td:nth-child(1) {
    order: 4;
    flex: none;
    font-size: 11.5px;
    color: var(--muted);
  }
  .tbl tr:has(.tk) td:last-child {
    order: 6;
    flex: none;
    margin-left: auto;
  }
  /* 密钥单独收尾一行小字 */
  .tbl tr:has(.tk) td:nth-child(3) {
    order: 7;
    flex: 1 1 100%;
    font-size: 11px;
    color: var(--muted);
  }
}
/* ===== DSHA-CARD-PROP-END ===== */
/* ===== DSHA-AVMENU-FIX =====
   头像菜单：英文界面下 Theme 行（Terminal / Light / Dark）会冲出面板右边框。
   这里放在样式表最后，确保不会被前面同选择器的规则压掉：
   面板加宽到 292px 且不超过视口；分段控件允许收缩并收紧内边距 */
.av-pop {
  width: min(292px, calc(100vw - 20px));
}
.av-pop .av-row {
  flex-wrap: nowrap;
  gap: 8px;
}
.av-pop .av-row > span:first-child,
.av-pop .av-row > .av-lab {
  flex: none;
}
.av-pop .av-seg {
  flex: 0 1 auto;
  min-width: 0;
}
.av-pop .av-seg button {
  padding: 6px 8px;
  white-space: nowrap;
}
/* ===== DSHA-AVMENU-FIX-END ===== */
/* ===== 忘记密码：步骤条（沿用鉴权页的视觉语言） ===== */
.auth-steps {
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.auth-steps .as {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.6;
}
.auth-steps .as i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  display: block;
}
.auth-steps .as.on {
  color: var(--primary);
  border-color: var(--primary);
}
.auth-steps .as.on i {
  background: var(--primary);
}
.auth-steps .as.done {
  color: var(--text);
}
.auth-steps .as.done i {
  background: var(--text);
}
.auth-back {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}
/* ===== DSHA-FORGOT-END ===== */

.auth-back {
  display: inline-block;
  width: auto;
  margin: 12px auto 0;
  text-align: center;
}

/* ===== 账单明细（余额充值页下方）===== */
.bill {
  display: flex;
  flex-direction: column;
}
.bill .b-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.bill .b-row:first-child {
  border-top: 0;
}
.bill .b-amt {
  flex: none;
  min-width: 76px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.bill .b-amt.in {
  color: var(--primary);
}
.bill .b-k {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.bill .b-t {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 420px) {
  .bill .b-amt {
    min-width: 64px;
    font-size: 12.5px;
  }
  .bill .b-t {
    font-size: 11px;
  }
}
/* ===== DSHA-BILL-END ===== */
.bill .b-tag {
  flex: none;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px;
}
.bill-note {
  margin: 8px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}
/* ===== 悬浮翻页条可读性优化：原来按钮半透明 ✗ 列表文字会从背后透出来 ✗ ===== */
.pg-float .pager {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 9px;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--bg) 55%, transparent);
}
.pg-float .pager > button,
.pg-float .pg-jump {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.pg-float .pg-unpin {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg-float .pg-unpin:hover {
  color: var(--text);
  border-color: var(--text);
}
/* 固定时给页面底部留出空间，最后几行也能滚上来 */
body:has(.pg-float) .card.panel:last-of-type {
  padding-bottom: 64px;
}
/* ===== DSHA-FLOAT-END ===== */
/* 悬浮条容器底色：前面那条被 App 自己的 .pager 规则压住了，这里提到最后并加 !important */
.pg-float .pager {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}
/* 换页入场动画：切页时列表轻微上浮淡入，不再生硬地整块替换 */
@keyframes billIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.bill {
  animation: billIn 0.26s var(--e-out) both;
}
@media (prefers-reduced-motion: reduce) {
  .bill {
    animation: none;
  }
}
/* 「余额消费每日结算」改为「账单明细」下的副标题 */
.card .panel-head + .bill-note,
.panel-head .bill-note {
  margin: -2px 0 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}
/* ===== 记录卡去掉「密钥」和「流式(SSE)」两行（桌面表格保留，列头看得懂）=====
   注意：两张表列数不同 —— 概览是 7 列（第 7 列是「状态」✗ 不能动），
   用量明细是 8 列（第 7 列才是「流式」✓ 用 .clk 精确区分）*/
@media (max-width: 640px) {
  .tbl tr:has(.tk) td:nth-child(3) {
    display: none !important;
  }
  .tbl tr.clk:has(.tk) td:nth-child(7) {
    display: none !important;
  }
}
/* ===== DSHA-HIDE2-END ===== */
/* 卡片里再去掉「延迟」这一行（两张表的第 6 列都是延迟 ✓ 桌面表格保留）*/
@media (max-width: 640px) {
  .tbl tr:has(.tk) td:nth-child(6) {
    display: none !important;
  }
}
/* ===== 悬浮翻页条：方案②「通栏贴底」（替换原来的居中白胶囊）=====
   全局生效 → 用量明细和账单明细保持一致 ✓ */
.pg-float {
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px color-mix(in srgb, var(--bg) 45%, transparent);
}
.pg-float .pager {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.pg-float .pager > button[disabled] {
  color: var(--muted);
  opacity: 0.55;
}
.pg-float .pager > button.pg-unpin {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg-float .pager > button.pg-unpin:hover {
  color: var(--text);
  border-color: var(--text);
}
/* ===== DSHA-FLOAT-F2-END ===== */
/* 通栏贴底：按钮沿用 App 自带的 .pager button 外观（有边框有底色），只把 ✕ 做成圆形 */
.pg-float .pager > button {
  font-size: 12.5px;
}
.pg-float .pager > button[disabled] {
  color: var(--muted);
  opacity: 0.5;
}
.pg-float .pager > button.pg-unpin {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* ===== DSHA-F2B-END ===== */
/* 通栏贴底 · 三段布局（左：上一页 / 中：页码 / 右：下一页+✕）
   之前只写了 justify-content ✗ 没带 !important ✗ 被 App 自带规则压掉 → 间距全乱 ✗ */
.pg-float {
  display: flex !important;
  align-items: center !important;
  justify-content: stretch !important;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 0 !important;
}
.pg-float .pager {
  flex: 1 1 auto !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
/* 三段：中间靠 auto 外边距自然居中 ✓ */
.pg-float .pager > button {
  font-size: 12.5px;
  flex: none;
}
.pg-float .pager > button[disabled] {
  color: var(--muted);
  opacity: 0.5;
}
/* ===== DSHA-F2C-END ===== */
/* 悬浮条：经典三段布局（页码精确居中，右侧两钮成组）
   上一版用 space-between ✗ 四个盒子等距 ✗ 但页码盒子自带内边距 → 视觉间距不等 → 看着歪 ✗
   现在只留两个 auto：上一页右推 + 页码右侧右推，两个空隙自然相等，✕ 紧跟下一页 */
/* ===== DSHA-F2D-END ===== */
/* 页码用绝对定位精确居中（三段布局里右侧有两个元素 ✗ 会让页码偏左 17px ✗） */
/* ===== DSHA-F2E-END ===== */
/* 悬浮条：修两个明显问题
   ① 内容在条里偏下（上方空一大块）→ 压掉 App 自带的内边距/最小高度，上下对称
   ② ✕ 被撑成椭圆 → 强制 34×34 正方形，去掉内边距和最小宽高 */
.pg-float {
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 0 !important;
  align-items: center !important;
}
.pg-float .pager {
  min-height: 0 !important;
  align-items: center !important;
}
.pg-float .pager > button {
  min-height: 0 !important;
  min-width: 0 !important;
  padding: 9px 14px !important;
  line-height: 1.15 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}
.pg-float .pager > button.pg-unpin {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  flex: none !important;
  aspect-ratio: 1/1 !important;
  border-radius: 999px !important;
  line-height: 1 !important;
}
.pg-float .pager > button.pg-jump {
  padding: 9px 6px !important;
}
/* ===== DSHA-F2G-END ===== */
/* 上下留白不均（上 23 下 8 ✗）：把内容行高钉死为 34px，靠外层 padding 居中 */
.pg-float {
  height: auto !important;
  min-height: 0 !important;
  padding: 9px 16px calc(9px + env(safe-area-inset-bottom, 0px)) !important;
  align-items: center !important;
}
.pg-float .pager {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  align-items: center !important;
  display: flex !important;
}
.pg-float .pager > button {
  height: 34px !important;
  max-height: 34px !important;
  align-self: center !important;
}
.pg-float .pager > button.pg-jump {
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
}
/* ===== DSHA-F2H-END ===== */
/* 内容区比按钮高 15px ✗ 导致内容贴底 ✗ → 把整条高度钉死为 9+34+9=52px，内容强制垂直居中 */
.pg-float {
  height: 52px !important;
  min-height: 52px !important;
  max-height: none !important;
  padding: 0 16px !important;
  align-items: center !important;
  box-sizing: border-box !important;
}
.pg-float .pager {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  align-items: center !important;
  display: flex !important;
  padding: 0 !important;
}
.pg-float .pager > button {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* ===== DSHA-F2I-END ===== */
/* 差的正好 15px ≈ App 自带进场动画的 translateY(16px) ✗ 先去掉动画排除干扰 */
.pg-float {
  animation: none !important;
  transform: none !important;
}
/* ===== DSHA-F2J-END ===== */
/* 内容没被 align-items 居中 ✗ → 放弃居中，改用确定性的顶部内边距：
   顶 9px + 内容 34px + 底 9px = 52px ✗→✓ 上下必然相等 */
.pg-float {
  height: 52px !important;
  min-height: 52px !important;
  padding: 9px 16px !important;
  align-items: flex-start !important;
  box-sizing: border-box !important;
}
.pg-float .pager {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  align-items: flex-start !important;
  display: flex !important;
  padding: 0 !important;
  margin: 0 !important;
}
.pg-float .pager > button {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  align-self: flex-start !important;
  margin: 0 !important;
}
.pg-float .pager > button.pg-unpin {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
}
/* ===== DSHA-F2K-END ===== */
/* 账单卡片：标题 → 副标题 → 列表 三处间距过大 ✗ 收紧
   用 :has(.bill) 精确限定，不影响其它卡片 ✓ */
.card.panel:has(.bill) .panel-head {
  margin-bottom: 3px !important;
  padding-bottom: 0 !important;
}
.card.panel:has(.bill) .bill-note {
  margin: 0 0 8px !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  font-size: 11.5px !important;
}
/* ===== DSHA-TIGHT-END ===== */
/* 标题/副标题/列表 三处 margin+padding 全清零 ✗→✓ 只保留行高自然间隙 */
.card.panel:has(.bill) .panel-head {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: baseline !important;
}
.card.panel:has(.bill) .panel-head h2 {
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.card.panel:has(.bill) .panel-head .small {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}
.card.panel:has(.bill) .bill-note {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  font-size: 11.5px !important;
}
.card.panel:has(.bill) .bill {
  margin: 0 !important;
  padding: 0 !important;
}
.card.panel:has(.bill) .b-row:first-child {
  padding-top: 6px !important;
}
/* ===== DSHA-TIGHT2-END ===== */
/* 前面清零没压住 App 自带内边距 ✗ 还剩 15/23px ✗ → 用负边距强制收拢（确定生效 ✓） */
.card.panel:has(.bill) .bill-note {
  margin-top: -7px !important;
  margin-bottom: -9px !important;
}
.card.panel:has(.bill) .bill {
  margin-top: -6px !important;
}
/* ===== DSHA-TIGHT3-END ===== */

/* ===== DSHA-404-START 专门 404 页：星空闪烁 + 霓虹 404（无鱼，单按钮） ===== */
.nf404 {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  overflow: hidden;
}
.nf404-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nf404-s1 {
  background-image:
    radial-gradient(
      1px 1px at 12% 18%,
      color-mix(in srgb, var(--text) 60%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 68% 9%,
      color-mix(in srgb, var(--text) 50%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1.5px 1.5px at 86% 34%,
      color-mix(in srgb, var(--primary) 60%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 28% 66%,
      color-mix(in srgb, var(--text) 40%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 52% 82%,
      color-mix(in srgb, var(--text) 45%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 78% 72%,
      color-mix(in srgb, var(--text) 40%, transparent) 50%,
      transparent 51%
    );
  animation: nf404twk 2.6s ease-in-out infinite;
}
.nf404-s2 {
  background-image:
    radial-gradient(
      1px 1px at 40% 28%,
      color-mix(in srgb, var(--text) 35%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 90% 14%,
      color-mix(in srgb, var(--primary) 40%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1px 1px at 8% 52%,
      color-mix(in srgb, var(--text) 30%, transparent) 50%,
      transparent 51%
    ),
    radial-gradient(
      1.5px 1.5px at 62% 48%,
      color-mix(in srgb, var(--text) 35%, transparent) 50%,
      transparent 51%
    );
  animation: nf404twk 3.7s ease-in-out infinite reverse;
}
@keyframes nf404twk {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}
.nf404-code {
  font-size: 72px;
  letter-spacing: 8px;
  color: var(--primary);
  font-weight: 700;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--primary) 55%, transparent),
    0 0 46px color-mix(in srgb, var(--primary) 25%, transparent);
  animation: nf404pulse 3.2s ease-in-out infinite;
}
@keyframes nf404pulse {
  0%,
  100% {
    text-shadow:
      0 0 14px color-mix(in srgb, var(--primary) 45%, transparent),
      0 0 40px color-mix(in srgb, var(--primary) 20%, transparent);
  }
  50% {
    text-shadow:
      0 0 22px color-mix(in srgb, var(--primary) 70%, transparent),
      0 0 60px color-mix(in srgb, var(--primary) 30%, transparent);
  }
}
.nf404-sub {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--muted);
}
.nf404-desc {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text);
}
.nf404 .btn {
  margin-top: 22px;
}
/* ===== DSHA-404-END ===== */
/* ===== DSHA-ADMIN-START 管理端补充样式（仅管理端类名，不影响用户端） ===== */
.adm-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 7px;
  font-size: 10.5px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: var(--primary);
  border: 1px solid var(--border);
  vertical-align: 2px;
}
.adm-set .adm-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
}
.adm-set .adm-row i {
  font-style: normal;
  color: var(--muted);
  font-size: 12.5px;
  min-width: 64px;
}
.adm-set .adm-inline {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
}
.adm-err {
  color: var(--danger);
  font-size: 12.5px;
  margin: 6px 0;
}
.adm-dl .adm-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.adm-dl .adm-row:last-child {
  border-bottom: 0;
}
.adm-dl .adm-row i {
  font-style: normal;
  color: var(--muted);
  font-size: 12.5px;
}
.adm-dl .adm-row b {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.adm-page .card.panel {
  padding: 6px 14px 8px;
}
.adm-page .adm-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--border);
}
.adm-page .adm-row2:last-child {
  border-bottom: 0;
}
.adm-page .adm-row2 .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.adm-page .adm-row2 .l b {
  font-size: 13.5px;
}
.adm-page .adm-row2 .l i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 210px;
}
.adm-page .adm-row2 .r {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}
.adm-page .adm-row2 .r em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.adm-page .adm-mg {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  padding: 3px 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.adm-page .page-head .actions .sel-wrap {
  flex: none;
}
@keyframes admRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.adm-page .adm-row2 {
  animation: admRowIn 0.34s var(--e-out) both;
  transition: background-color 0.2s var(--e-soft);
}
.adm-page .adm-mg {
  transition:
    transform 0.18s var(--e-out),
    border-color 0.2s var(--e-soft),
    color 0.2s var(--e-soft);
}
@media (hover: hover) {
  .adm-page .adm-mg:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
}
.adm-page .adm-mg:active {
  transform: scale(0.94);
}
@media (prefers-reduced-motion: reduce) {
  .adm-page .adm-row2,
  .adm-dt {
    animation: none;
  }
}
@keyframes admDtIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes admBoxIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.adm-dt {
  position: fixed;
  inset: 0;
  z-index: 310;
  background: #000000b8;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: admDtIn 0.2s var(--e-soft) both;
}
.adm-dt-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 64px #000000b3;
  overflow: hidden;
  animation: admBoxIn 0.24s var(--e-out) both;
}
.adm-dt-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.adm-dt-x {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.18s var(--e-soft),
    color 0.18s var(--e-soft);
}
.adm-dt-x:active {
  background: var(--surface-2);
  color: var(--text);
}
@media (hover: hover) {
  .adm-dt-x:hover {
    background: var(--surface-2);
    color: var(--text);
  }
}
.adm-dt-hero {
  padding: 18px 46px 15px 18px;
  border-bottom: 1px solid var(--border);
}
.adm-dt-nm {
  font-size: 15.5px;
  font-weight: 600;
}
.adm-dt-ml {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-dt-k {
  color: var(--muted);
}
.adm-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--muted);
  flex: none;
  white-space: nowrap;
}
.adm-pill.ok {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 34%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.adm-pill.no {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 34%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}
.adm-dt-sec {
  padding: 16px 18px 4px;
}
.adm-dt-sec > .st {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 6px;
}
.adm-dt-kv {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  min-height: 54px;
}
.adm-dt-kv:last-child {
  border-bottom: 0;
  padding-bottom: 6px;
}
.adm-dt-kv .k {
  color: var(--muted);
  font-size: 12.5px;
  flex: none;
  width: 56px;
}
.adm-dt-kv .vv {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}
.adm-dt-kv .v,
.adm-dt-kv input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  line-height: 20px;
  text-align: right;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-dt-kv .v {
  display: block;
}
.adm-dt-kv input {
  display: none;
  background: var(--bg);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.adm-dt-sec.edit .adm-dt-kv input {
  display: block;
  animation: admSwapIn 0.2s var(--e-out) both;
}
.adm-dt-sec.edit .adm-dt-kv:nth-child(3) input {
  animation-delay: 0.02s;
}
.adm-dt-sec.edit .adm-dt-kv:nth-child(4) input {
  animation-delay: 0.04s;
}
.adm-dt-sec.edit .adm-dt-kv:nth-child(5) input {
  animation-delay: 0.06s;
}
.adm-dt-sec.edit .adm-dt-kv .v {
  display: none;
}
@keyframes admSwapIn {
  from {
    clip-path: inset(0 0 0 100%);
    opacity: 0.5;
    border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  }
}
.adm-dt-bar {
  flex: none;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-dt-bar > * {
  flex: 0 0 calc(50% - 5px);
  width: calc(50% - 5px);
  min-width: 0;
  box-sizing: border-box;
}
/* ===== 账号详情（B1） ===== */
.adm-dt-box.fixed {
  height: min(86vh, 600px);
}
.adm-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.adm-info .tbl,
.adm-info .kv,
.adm-info .dw-badge {
  -webkit-user-select: none;
  user-select: none;
}
.adm-info .mono-txt {
  -webkit-user-select: none;
  user-select: none;
}
.adm-info .adm-dt-bar > .btn {
  flex: 1;
  width: 100%;
}
.adm-tabs {
  display: flex;
  gap: 4px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.adm-tabs button {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  padding: 7px 0;
  cursor: pointer;
}
.adm-tabs button.on {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.adm-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.adm-stats .s {
  text-align: center;
  min-width: 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 8px;
}
.adm-stats .s.on {
  background: var(--surface-2);
}
.adm-stats .s b {
  white-space: nowrap;
}
.adm-statdet {
  margin: 10px 14px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
}
.adm-statdet .hd2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 6px;
}
.adm-statdet .hd2 .x2 {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
}
.adm-statdet .r2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  color: var(--muted);
}
.adm-statdet .r2 b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.adm-stats .s b {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.adm-stats .s i {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}
.adm-sec {
  padding: 14px 16px 6px;
}
.adm-sec > .st {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-total {
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 2px 2px;
}
.adm-sum2 {
  display: flex;
  gap: 14px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.adm-sum2 b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.adm-total b {
  color: var(--text);
}
.adm-dist {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 12.5px;
}
.adm-dist .nm {
  width: 110px;
  flex: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-dist .track {
  display: block;
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.adm-dist .fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  opacity: 0.85;
}
.adm-dist .v {
  width: 104px;
  text-align: right;
  flex: none;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.adm-tools {
  display: flex;
  gap: 8px;
  padding: 10px 14px 8px;
  align-items: center;
}
.adm-selwrap {
  flex: 1;
  min-width: 0;
}
.adm-info .adm-tools .sel-wrap .sel-btn {
  height: 36px;
  min-height: 36px;
}
.adm-selwrap .sel-btn {
  width: 100%;
  justify-content: space-between;
  text-align: left;
}
.adm-selpop {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  padding: 4px;
}
.adm-selpop .sel-item {
  padding: 8px 5px;
}
.adm-custom {
  right: 0;
  left: auto;
  width: 264px;
  padding: 9px;
  max-height: min(72vh, 430px);
  overflow-y: auto;
}
.adm-cf {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}
.adm-cf label {
  font-size: 11px;
  color: var(--muted);
}
.adm-cf input {
  width: 100%;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  padding: 0 6px;
  outline: none;
}
.adm-cf input:focus {
  border-color: var(--primary);
}
.adm-cerr {
  font-size: 11px;
  color: var(--danger);
  margin: -2px 0 6px;
}
.adm-cbar {
  display: flex;
  gap: 8px;
}
.adm-cbtn {
  flex: 1;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.adm-cbtn.pri {
  background: linear-gradient(92deg, #00e68a, #22b8ff);
  border-color: transparent;
  color: #04110a;
  font-weight: 600;
}
.adm-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  padding: 5px 11px;
  cursor: pointer;
}
.adm-chip.on {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg));
}
.adm-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.adm-row:last-child {
  border-bottom: 0;
}
.adm-row .l1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
}
.adm-row .l1 .t {
  color: var(--muted);
  font-size: 11.5px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.adm-row .l1 .m {
  font-weight: 600;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-row .l1 .sp {
  flex: 1;
}
.adm-row .l1 .amt {
  font-variant-numeric: tabular-nums;
  flex: none;
  white-space: nowrap;
}
.adm-row .l1 .amt.in {
  color: var(--primary);
}
.adm-row .l2 {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.adm-row .l2 .bad {
  color: var(--danger);
}
.adm-row .l2 .ok {
  color: var(--primary);
}
.adm-row .l2 .kv {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
}
.adm-row .l2 .kv b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.adm-row .l3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}
.adm-row .l3 .rid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
}
.adm-row .l3 .rid:active {
  color: var(--primary);
}
.adm-pickbtns {
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
}
.adm-pickbtn {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: left;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.adm-pickbtn.on {
  border-color: var(--primary);
  color: var(--text);
}
.adm-pickbtn i {
  display: block;
  font-style: normal;
  font-size: 10px;
}
.adm-pickbtn b {
  display: block;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.adm-cal .hd3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 5px;
}
.adm-cal .hd3 button {
  width: 26px;
  height: 24px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}
.adm-cal .wk,
.adm-cal .grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.adm-cal .wk span {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}
.adm-cal .d {
  height: 27px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.adm-cal .d.on {
  background: var(--primary);
  color: #04110a;
  font-weight: 700;
}
.adm-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 0 6px;
  font-size: 12px;
  color: var(--muted);
}
.adm-steps button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.adm-steps b {
  min-width: 24px;
  text-align: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.adm-steps em {
  font-style: normal;
}
.adm-row .dotb {
  font-size: 10.5px;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 6px;
  color: var(--muted);
  flex: none;
}
.adm-row .rid {
  font-size: 10.5px;
  color: var(--muted);
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
}
.adm-row .det {
  background: none;
  border: 0;
  color: var(--primary);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.adm-fold {
  font-size: 11.5px;
  color: var(--muted);
  padding: 2px 0 6px;
}
.adm-empty {
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.adm-info .tbl-wrap {
  padding: 8px 12px 4px;
}
.adm-info .tbl tr.clk {
  cursor: pointer;
}
.adm-page .tbl tr.clk {
  cursor: pointer;
}
.adm-page .ell {
  display: inline-block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.adm-page .adm-dcard .ell {
  max-width: 210px;
}
.adm-page .page-head .actions {
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .adm-page .page-head .actions .btn {
    flex: 1 1 100%;
  }
}
.stats.ch-stats {
  margin: 12px 0 4px;
  grid-template-columns: repeat(2, 1fr);
}
.stats.ch-stats .stat {
  padding: 10px 12px;
}
.ch-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 2px;
}
.ch-head .ch-hl {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ch-head .ch-hl b {
  font-size: 15px;
}
.ch-head .ch-hl span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-kv .kv-r {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.ch-kv .kv-r:last-child {
  border-bottom: 0;
}
.ch-kv .ell {
  max-width: 150px;
}
@media (max-width: 640px) {
  .ch-tbl tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    padding: 11px 12px;
    margin-bottom: 8px;
  }
  .ch-tbl tbody tr td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .ch-tbl tbody tr td:before {
    display: none;
  }
  .ch-tbl tbody tr td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 14.5px;
    font-weight: 600;
  }
  .ch-tbl tbody tr td:nth-child(1) b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }
  .ch-tbl tbody tr td:nth-child(7) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .ch-tbl tbody tr td:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
  }
  .ch-tbl tbody tr td:nth-child(4):before {
    display: inline;
    content: "密钥 ";
    color: var(--muted);
    font-weight: 400;
  }
  .ch-tbl tbody tr td:nth-child(4) b {
    color: var(--text);
    font-weight: 600;
  }
  .ch-tbl tbody tr td:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    font-size: 12px;
  }
  .ch-tbl tbody tr td:nth-child(5):before {
    display: inline;
    content: "模型 ";
    color: var(--muted);
  }
  .ch-tbl tbody tr td:nth-child(5) b {
    color: var(--text);
    font-weight: 600;
  }
  .ch-tbl tbody tr td:nth-child(2),
  .ch-tbl tbody tr td:nth-child(3),
  .ch-tbl tbody tr td:nth-child(6),
  .ch-tbl tbody tr td:nth-child(8) {
    display: none;
  }
}
.adm-info .adm-dt-bar.ch-bar {
  flex-wrap: wrap;
}
.adm-info .adm-dt-bar.ch-bar > .btn {
  flex: 1 1 calc(50% - 5px);
  width: auto;
  min-width: 0;
}
.md-tbl tbody tr.clk {
  cursor: pointer;
}
@media (max-width: 640px) {
  .md-tbl tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    padding: 11px 12px;
    margin-bottom: 8px;
  }
  .md-tbl tbody tr td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .md-tbl tbody tr td:before {
    display: none;
  }
  .md-tbl tbody tr td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 14.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .md-tbl tbody tr td:nth-child(7) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .md-tbl tbody tr td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
    color: var(--text);
  }
  .md-tbl tbody tr td:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    font-size: 11.5px;
    color: var(--muted);
  }
  .md-tbl tbody tr td:nth-child(3):before {
    display: inline;
    content: "输入 ";
  }
  .md-tbl tbody tr td:nth-child(3) b:after {
    content: "/1M";
  }
  .md-tbl tbody tr td:nth-child(4),
  .md-tbl tbody tr td:nth-child(5),
  .md-tbl tbody tr td:nth-child(6),
  .md-tbl tbody tr td:nth-child(8) {
    display: none;
  }
}
.k-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  flex: none;
  margin: 0 0 14px;
}
.k-search .input {
  width: 100%;
  padding-left: 36px;
}
.k-search .clr,
.k-clr {
  background: var(--surface-2);
  border: 0;
  color: var(--muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  position: absolute;
  right: 8px;
}
.k-search {
  position: relative;
}
.tk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 64px 18px;
  text-align: center;
}
.tk-empty .ico {
  color: var(--muted);
  display: flex;
}
.tk-empty .ico svg {
  stroke-width: 1.5;
}
.tk-empty .t {
  font-size: 15px;
  font-weight: 600;
}
.tk-empty .s {
  font-size: 12px;
  color: var(--muted);
  margin-top: -6px;
}
.sbox {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  min-width: 0;
}
.sbox .input {
  padding-left: 36px;
  padding-right: 34px;
}
.sbox .sbox-clr {
  position: absolute;
  right: 8px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.page-head .actions .sbox {
  flex: 1 1 100%;
  min-width: 0;
}
.page-head .actions .sbox .input {
  width: 100%;
  height: 38px;
}
.ch-search .sbox .input {
  height: 38px;
}
.topup-sbox .input,
.fbar .sbox .input {
  height: 38px;
}
.ch-search .sbox {
  flex: 1;
  min-width: 0;
}
.sbox-240 {
  max-width: 240px;
}
.mg-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 2px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mg-chips::-webkit-scrollbar {
  display: none;
}
.mg-chip {
  flex: none;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
}
.mg-chip.on {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg));
}
.mgl {
  display: flex;
  flex-direction: column;
}
.mgr {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.mgr.off {
  opacity: 0.55;
}
.mgr-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
.mgr-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex: none;
}
.mgr-title {
  min-width: 0;
}
.mgr-title h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mgr-title span {
  font-size: 11px;
  color: var(--muted);
}
.mgr-desc {
  margin: 13px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.mgr-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mgr-tags span {
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}
.mgr-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.mgr-price small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.mgr-price strong {
  display: block;
  margin-top: 3px;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
}
.mgr-more {
  min-height: 38px;
  flex: none;
}
.mgr-d {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mgr-d div span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.mgr-d div b {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.mgr-d div b em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  margin-left: 1px;
}
@media (min-width: 641px) {
  .mgl {
    max-width: 760px;
  }
}
@media (max-width: 640px) {
  input.input,
  select,
  textarea {
    font-size: 16px;
  }
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.acc-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.acc {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.acc-h {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 13px;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.acc-h b {
  font-size: 13.5px;
}
.acc-h .acc-n {
  margin-left: auto;
}
.acc-on {
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  flex: none;
}
.acc-caret {
  color: var(--muted);
  transition: transform 0.2s var(--e-out);
  flex: none;
}
.acc.open .acc-caret {
  transform: rotate(180deg);
}
.acc-b {
  display: none;
}
.acc.open .acc-b {
  display: block;
  border-top: 1px solid var(--border);
}
.acc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.acc-row:first-child {
  border-top: 0;
}
.acc-row .m {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-row .m .mn {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-row .m .mu {
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-add {
  font-size: 11px;
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: 99px;
  padding: 2px 8px;
  flex: none;
  cursor: pointer;
}
.ro-fld {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.acc-row .p {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.acc-row .go {
  color: var(--muted);
  flex: none;
}
.card.panel:has(.tk-empty) {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.tbl tr:has(.tk-empty) td {
  border-bottom: 0 !important;
}
.ch-search {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 14px;
}
.ch-search .input {
  flex: 1;
  min-width: 0;
  width: auto;
}
.ch-search .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ch-listhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 8px;
}
.ch-listhead b {
  font-size: 14px;
}
@media (min-width: 641px) {
  .ch-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 12px;
  }
}
.ch-tbl tbody tr.ch-row {
  cursor: pointer;
}
@media (max-width: 640px) {
  .ch-list {
    background: transparent;
    border: 0;
    padding: 0;
  }
  .ch-list .tbl tr.ch-row {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
}
.ch-sech {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ch-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary);
  font: inherit;
  font-size: 11.5px;
  padding: 4px 9px;
  cursor: pointer;
}
.ch-kact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ch-del {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}
.ch-del.arm {
  color: var(--danger);
  font-weight: 600;
}
.ch-reasons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ch-reason {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--muted);
}
.ch-reason b {
  color: var(--danger);
  font-weight: 600;
}
.ch-keys {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.ch-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11.5px;
}
.ch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 2px;
}
.ch-chip {
  font-size: 11.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 9px;
}
.ch-more {
  margin-top: 4px;
}
.ch-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.ch-note b {
  color: var(--text);
}
.ch-act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.ch-act .btn {
  flex: 1 1 auto;
  min-width: 88px;
}
.ch-sw {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}
.adm-dcard {
  padding: 12px 14px 18px;
}
.adm-dcard-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.adm-dcard-h b {
  font-size: 13.5px;
}
.adm-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  padding: 4px 8px;
  cursor: pointer;
}
.adm-back:active {
  color: var(--text);
}
.adm-dcard .kv-r {
  font-size: 12.5px;
}
.adm-dcard .kv-r b {
  font-variant-numeric: tabular-nums;
}
.adm-dcard .kv-tot {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 8px;
}
.adm-dcard .kv-tot b {
  color: var(--primary);
  font-weight: 700;
}
.adm-dcard .kv-r b.in {
  color: var(--primary);
}
.adm-info .tbl td b.in {
  color: var(--primary);
}
.adm-exp td {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.adm-exp > td {
  padding: 8px 12px 10px;
  display: block;
}
.adm-expin .r2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding: 2px 0;
}
.adm-expin .r2 b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.adm-expin .r2 b.bad {
  color: var(--danger);
}
.adm-expin .rid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.adm-tools .fbar-sum b {
  color: var(--text);
}
@media (max-width: 640px) {
  .adm-info .tbl tr {
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  .adm-info .tbl tr.adm-exp {
    padding: 0;
    margin-top: -8px;
    background: transparent;
    border: 0;
  }
}
.adm-sum {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.adm-sum b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.adm-pagerbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.adm-pagerbar .pg-jump {
  min-width: 104px;
  text-align: center;
}
.adm-dt-bar .btn,
.adm-dt-bar .sel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13.5px;
  line-height: 1;
  font-weight: 600;
}
.adm-menu-wrap {
  position: relative;
}
.adm-menu-pop {
  left: 0;
  right: auto;
  top: auto;
  bottom: calc(100% + 18px);
  width: 100%;
  min-width: 100%;
  max-width: none;
  z-index: 340;
  background: var(--bg);
  border-color: color-mix(in srgb, var(--primary) 14%, var(--border));
  box-shadow:
    0 14px 40px #000000b3,
    0 0 0 1px #00000059;
}
.adm-menu-pop .sel-item {
  width: 100%;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  justify-content: center;
  text-align: center;
}
.adm-it-arm,
.adm-it-arm:hover,
.adm-it-arm:active,
.adm-it-arm-del,
.adm-it-arm-del:hover,
.adm-it-arm-del:active {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-weight: 600;
}
.adm-page .page-head .actions .input {
  width: 220px;
}
@media (max-width: 640px) {
  .adm-page .page-head .actions {
    margin-left: 0;
    width: 100%;
  }
  .adm-page .page-head .actions .input {
    flex: 1;
    max-width: none;
  }
}
.av-row .av-t.muted {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
/* ===== DSHA-ADMIN-END ===== */

/* ===== 纸感:图表柱强制橙(放最末覆盖站点自带配色) ===== */
html[data-theme="paper"] .bars .b,
html[data-theme="paper"] .bars .bcol .b,
html[data-theme="paper"] .bars .bcol .b i,
html[data-theme="paper"] .bcol .b,
html[data-theme="paper"] .bar i {
  background-color: #e8622c !important;
  background-image: none !important;
  border-radius: 2px 2px 0 0;
}
html[data-theme="paper"] .bars .bcol.on .b {
  box-shadow:
    0 0 0 2px #fbf8ef,
    0 0 0 3.5px #1b3b32 !important;
}
html[data-theme="paper"] .donut-legend i,
html[data-theme="paper"] .donut i {
  background-color: #e8622c !important;
}

/* ===== 纸感:修"按下卡片出现怪灰块" —— 取消逐格伪 hover,改为整卡反馈 ===== */
/* 桌面：hover 只画在「行」上，不画在「格子」上（格子背景会在手机卡片里露成方块） */
html[data-theme="paper"] .tbl tr:hover td,
html[data-theme="paper"] .tbl tr:hover > td {
  background: transparent !important;
}
html[data-theme="paper"] .tbl tbody tr:hover {
  background: rgba(27, 59, 50, 0.04);
}
@media (max-width: 640px) {
  /* 卡片模式：干掉一切格级灰底（触屏 :hover 会粘住 → 就是那个怪灰块） */
  html[data-theme="paper"] .tbl tr:hover td,
  html[data-theme="paper"] .tbl tr:active td,
  html[data-theme="paper"] .tbl tr:has(.tk):hover td,
  html[data-theme="paper"] .tbl tr:has(.tk):active td,
  html[data-theme="paper"] .tbl tbody tr:hover,
  html[data-theme="paper"] .tbl tbody tr:active,
  html[data-theme="paper"] .md-tbl tbody tr:hover td,
  html[data-theme="paper"] .ch-tbl tbody tr:hover td {
    background: transparent !important;
  }
  /* 按下反馈：整卡统一底色 + 墨色描边（对齐卡片圆角，不再露方块） */
  html[data-theme="paper"] .tbl tr:has(.tk):active,
  html[data-theme="paper"] .adm-row2:active,
  html[data-theme="paper"] .mgr:active,
  html[data-theme="paper"] .acc-row:active,
  html[data-theme="paper"] .ch-row:active {
    background: rgba(27, 59, 50, 0.05) !important;
    border-color: var(--ink) !important;
    border-radius: 10px;
  }
  html[data-theme="paper"] .tbl tr:has(.tk):active td {
    background: transparent !important;
  }
}

/* ===== 纸感:修"底部重复显示页码" =====
   站点有两个分页控件：.logfoot .pg-jump（.logfoot-pos）默认 display:none，
   真正显示的是 .pager .pg-jump（.pg-pos）。
   我给的胶囊规则里含 display:inline-flex → 把隐藏的那个也显示出来了 → 重复。
   这里：① 不覆盖 .pg-jump 的 display；② 明确恢复站点"隐藏 logfoot 版"的意图。 */
html[data-theme="paper"] .logfoot .pg-jump.logfoot-pos {
  display: none !important;
}
html[data-theme="paper"] .pg-jump {
  border: 2px solid rgba(27, 59, 50, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  min-height: 34px;
  padding: 0 12px;
}

/* ===== 模型广场 v103:紧凑三行、无分隔线、三档价并列、点行开弹窗 ===== */
.mg2 {
  padding: 10px 0;
  cursor: pointer;
}
.mg2:active {
  opacity: 0.72;
}
.mg2-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mg2-h b {
  font-size: 15px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg2-cp {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 2px;
  flex: none;
}
.mg2-cp:active {
  color: var(--ink);
}
.mg2-m {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg2-p {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.mg2-p span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.mg2-p b {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.mg2-p span:first-child b {
  color: var(--accent);
}
.mg2-mdl {
  width: min(360px, calc(100% - 28px));
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px 16px 18px;
}
.mg2-mdl-h {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mg2-mdl-h b {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.mg2-x {
  margin-left: auto;
  flex: none;
  width: 30px;
  height: 30px;
  border: 2px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mg2-mdl-m {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 5px 0 14px;
}
.mg2-mdl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  padding: 13px 0;
}
.mg2-mdl-grid div span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.mg2-mdl-grid div b {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mg2-mdl-f {
  margin-top: 14px;
}
.pillbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.pillbtn:active {
  background: var(--ink);
  color: var(--paper);
}

/* 纸感:页头与筛选压紧(用户要一屏 7-8 条) */
html[data-theme="paper"] .page-head {
  margin-bottom: 10px;
}
html[data-theme="paper"] .page-head p {
  display: none;
}
html[data-theme="paper"] .filters {
  margin-bottom: 8px;
}
html[data-theme="paper"] .mg-chips {
  margin-bottom: 8px;
}
html[data-theme="paper"] .mgl {
  gap: 0;
}

/* 纸感:继续压紧(目标一屏 7-8 条) */
html[data-theme="paper"] .main {
  padding-top: 0;
} /* 撤回:它会顶开 sticky 顶栏 */
html[data-theme="paper"] .page-head h1 {
  font-size: 22px;
  line-height: 1.2;
}
html[data-theme="paper"] .sbox .input,
html[data-theme="paper"] .page-head .actions .sbox .input {
  height: 34px;
  min-height: 34px;
}
html[data-theme="paper"] .sbox .input {
  padding-left: 32px;
}
html[data-theme="paper"] .mg-chip {
  min-height: 30px;
  padding: 0 10px;
}
html[data-theme="paper"] .page-head {
  padding-bottom: 0;
}
html[data-theme="paper"] .stats {
  margin-bottom: 8px;
}
html[data-theme="paper"] .mgl {
  margin-top: -2px;
}

/* 纸感:小字提示加深(--muted #77897c 在纸底上偏浅,小字吃力) */
html[data-theme="paper"] {
  --muted: rgba(27, 59, 50, 0.72);
}
html[data-theme="paper"] .small.muted,
html[data-theme="paper"] .keys-foot,
html[data-theme="paper"] .foot-row,
html[data-theme="paper"] .demo-note,
html[data-theme="paper"] .page-head p,
html[data-theme="paper"] .filters-count,
html[data-theme="paper"] .mgr-desc,
html[data-theme="paper"] .mc-tags span,
html[data-theme="paper"] .topup-foot,
html[data-theme="paper"] .bill-note,
html[data-theme="paper"] .sub {
  color: rgba(27, 59, 50, 0.72) !important;
}

/* 方案3:厂商分组 + 上下文描边胶囊 + 价格 ¥x/M */
.vgh {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin: 14px 0 2px;
  text-transform: uppercase;
}
.vgh:after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule);
}
.ctxp {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  border: 2px solid var(--rule);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
}
.mg2-p b i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-left: 1px;
}
.mg2-mdl-grid b i {
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 1px;
}

/* ===== v109:① 上下文胶囊右对齐(成列) ② 复制按钮柔和化 ③ toast 反白(修"看不见文字") ===== */
.mg2-h .ctxp {
  margin-left: auto;
  margin-right: 10px;
}
.mg2-cp {
  margin-left: 0 !important;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--muted);
  flex: none;
  cursor: pointer;
}
.mg2-cp:active {
  background: var(--ink);
  color: var(--paper);
}
html[data-theme="paper"] .mg2-cp {
  background: var(--paper2);
}
html[data-theme="paper"] .mg2-cp:active {
  background: var(--ink);
  color: var(--paper);
}
/* toast / 轻提示:纸感下改成墨底纸字(原来底与字都是纸色 → 看不见) */
html[data-theme="paper"] #app-toast,
html[data-theme="paper"] .toast,
html[data-theme="paper"] .tk-toast {
  background: #1b3b32 !important;
  color: #fbf8ef !important;
  border: 2px solid #1b3b32 !important;
  box-shadow: 0 14px 30px -20px rgba(27, 59, 50, 0.75) !important;
  letter-spacing: 0.04em;
}
html[data-theme="paper"] #app-toast * {
  color: #fbf8ef !important;
}

/* 右侧区域固定宽:胶囊与复制按钮始终一个位置(有无上下文都对齐) */
.mg2-h .mg2-r {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.mg2-h .mg2-r .ctxp {
  margin-left: 0;
  margin-right: 0;
  min-width: 46px;
  text-align: center;
  justify-content: center;
}

/* 复制按钮移除:点模型名即复制(有按下反馈 + toast 确认) */
.mg2-h b {
  cursor: copy;
  -webkit-tap-highlight-color: transparent;
}
.mg2-h b:active {
  opacity: 0.55;
}

/* 纸感:确保顶栏真正贴顶(sticky 以滚动容器的 padding 边为基准,祖先不能有上内边距) */
html[data-theme="paper"] .main {
  padding-top: 0;
}
/* 注意:站点的上间距在 .page-enter(14px),不要归零 —— 归零会让内容贴上顶栏 */
html[data-theme="paper"] .topnav,
html[data-theme="paper"] .topbar {
  top: 0;
}

/* 三档价:严格等分三列,位置固定(不随金额位数变化) */
.mg2-p > span:nth-child(1) {
  justify-self: start;
}
.mg2-p > span:nth-child(2) {
  justify-self: start;
}
.mg2-p > span:nth-child(3) {
  justify-self: start;
}

/* 纸感:布局间距与终端主题保持一致(.main 不用上内边距;间距来自 .page-enter 的 14px) */
html[data-theme="paper"] .main {
  padding-top: 0;
}
html[data-theme="paper"] .page-enter {
  padding-top: 14px;
}

/* 整卡点开详情;模型名长按复制(轻触不再拦截) */
.mg2-h b {
  cursor: pointer;
}

/* 无详情:点模型名复制,整行无其它动作 */
.mg2 {
  cursor: default;
}
.mg2-h b {
  cursor: copy;
}
.mg2-h b:active {
  opacity: 0.55;
}

/* ⑤ 点线:只在同厂商模型之间(每组最后一个不画) */
.mg2-sep {
  border-bottom: 1.5px dotted var(--border);
}
html[data-theme="paper"] .mg2-sep {
  border-bottom: 1.5px dotted rgba(27, 59, 50, 0.28);
}

/* 登录/注册页:外层 .af-box 已有 2px 边 + 聚焦光环,内层 input 不要再画 outline(否则双框) */
html[data-theme="paper"] .af-box input,
html[data-theme="paper"] .af-box input:focus,
html[data-theme="paper"] .af-box input:focus-visible,
html[data-theme="paper"] .af-in:focus,
html[data-theme="paper"] .af-in:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
}
/* 输入类控件统一:聚焦只靠边框+光环,不用 outline */
html[data-theme="paper"] input.input:focus-visible,
html[data-theme="paper"] textarea:focus-visible,
html[data-theme="paper"] select:focus-visible {
  outline: 0 !important;
}

/* 账号详情:概览页签的累计行(占搜索框位置) */
.adm-tools-sum {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.adm-tools-sum b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.adm-tools .adm-tools-sum + .sel-wrap,
.adm-tools .adm-tools-sum ~ .sel-wrap {
  flex: 0 0 auto;
}

/* 搜索无结果:空态所在的行/容器不要卡片底(全主题统一) */
.tbl tr:has(.tk-empty),
.tbl tr:has(.tk-empty) > td,
.tbl tbody tr:has(.tk-empty) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
/* 空态本身永远扁平、两处排版一致 */
.tk-empty {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 34px 18px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.tk-empty .ico {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--muted) !important;
}
.tk-empty .t {
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}
.tk-empty .btn {
  min-height: 36px;
}

/* 覆盖 v94 的"浮层不透明"里给空态图标加的纸底(优先级要压过它) */
html[data-theme="paper"] .tk-empty .ico,
html[data-theme="paper"] .tk-empty .ico svg {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="terminal-off"] .tk-empty .ico,
html[data-theme="mono-dark"] .tk-empty .ico,
html[data-theme="mono-light"] .tk-empty .ico {
  background: transparent !important;
  border: 0 !important;
}

/* 模型管理:表格式(模型/入/出/缓存),无上游列 */
.mg-tbl {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.mg-tbl th {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 400;
  text-align: left;
  padding: 4px 0 6px;
  border-bottom: 2px solid var(--rule);
}
.mg-tbl th.r {
  text-align: right;
}
.mg-tbl tr.vh-row td {
  border: 0;
  padding: 10px 0 2px;
}
.mg-vh {
  display: flex;
  align-items: center;
  gap: 9px;
}
.mg-vh .v {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.mg-vh .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mg-vh:after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule);
}
.mg-add {
  flex: none;
  border: 2px solid rgba(232, 98, 44, 0.45);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
  min-height: 24px;
}
.mg-tbl td {
  padding: 7px 0;
  border-bottom: 1.5px dotted var(--rule2);
  font-size: 12.5px;
  vertical-align: middle;
}
.mg-tbl td.nm {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.mg-tbl td.nm b {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mg-tbl td.pr {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mg-tbl td.pr.b {
  font-weight: 800;
}
.mg-tbl td.pr.mut {
  color: var(--muted);
}
.mg-tbl tr.clk {
  cursor: pointer;
}
.mg-tbl tr.clk:active td {
  background: rgba(27, 59, 50, 0.045);
}
.mg-tbl tr.off td.nm b {
  opacity: 0.55;
}
.mg-tbl .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.mg-tbl .dot.on {
  background: var(--accent);
}
.mg-tbl .dot:not(.on) {
  border: 2px solid var(--rule);
}

/* D 方案:只显示输入价(橙色强调,带 ¥) */
.mg-tbl td.pr.acc {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
}

/* 输入价橙色:用 !important 压过 td.pr 的墨色(同时作用于暗主题) */
.mg-tbl td.pr.acc,
html[data-theme="paper"] .mg-tbl td.pr.acc {
  color: var(--accent) !important;
}

/* 输入价:橙色强调写在内层 b 上(避开 td 上的高优先级颜色) */
.mg-tbl b.price-acc {
  color: #e8622c !important;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 渠道详情:模型段可下拉 */
.ch-mdd {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 0;
  margin: 12px 0 0;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
}
.ch-mdd.open {
  border-bottom-color: transparent;
}
.ch-mdd .ch-mdd-c {
  color: var(--muted);
  transition: transform 0.18s var(--e-out);
  flex: none;
}
.ch-mdd.open .ch-mdd-c {
  transform: rotate(180deg);
}
.ch-mdd + .ch-chips {
  margin-top: 10px;
}

/* 模型管理:点渠道名展开/收起(默认收起) */
.mg-tbl tr.vh-row {
  cursor: pointer;
}
.mg-tbl tr.vh-row:active td {
  background: rgba(27, 59, 50, 0.04);
}
.mg-vh .mg-chev {
  color: var(--muted);
  flex: none;
  transition: transform 0.18s var(--e-out);
}
.mg-vh.open .mg-chev {
  transform: rotate(180deg);
}
.mg-vh .mg-line {
  flex: 1;
  height: 2px;
  background: var(--rule);
}
.mg-vh:after {
  display: none;
}

/* 方案B:渠道=浅色分组条;无箭头无长线;模型行无圆点 */
.mg-tbl tr.vh-row {
  cursor: pointer;
}
.mg-tbl tr.vh-row td {
  border: 0;
  padding: 8px 0 2px;
}
.mg-band {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper2);
  border-radius: 6px;
  padding: 9px 10px;
}
.mg-band .v {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mg-band .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mg-band .tog {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.mg-band.open .tog {
  color: var(--accent);
}
.mg-tbl tr.clk:not(.vh-row) td {
  border-bottom: 1.5px dotted var(--rule2);
  padding: 8px 0;
}

/* 模型管理:新建按钮变紧凑胶囊(不再整行大框)、列表去外层卡片、行线做实 */
html[data-theme="paper"] .adm-page .page-head .actions .btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0;
  padding: 0 14px;
  height: 34px;
  min-height: 34px;
  border-radius: 999px !important;
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-color: var(--ink) !important;
  font-size: 12px;
  letter-spacing: 0.02em;
}
html[data-theme="paper"] .adm-page .page-head .actions .btn:active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}
html[data-theme="paper"] .adm-page .page-head .actions {
  justify-content: flex-start;
  gap: 8px;
}
html[data-theme="paper"] .card.panel:has(.mg-tbl) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html[data-theme="paper"] .card.panel:has(.mg-tbl) .panel-head {
  padding: 0 0 8px;
}
.mg-tbl tr.clk:not(.vh-row) td {
  border-bottom: 1px solid var(--rule2) !important;
}

/* ===== B+C 融合:橙色竖规滑入 + 线描展开 ===== */
.mg-list {
  padding-top: 2px;
}
.mg-hd {
  display: flex;
  align-items: center;
  padding: 4px 0 6px;
  border-bottom: 2px solid var(--rule);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.mg-hd .l {
  flex: 1;
}
.mg-grp {
  position: relative;
}
.mg-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 6px;
  padding: 11px 2px 11px 12px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.16s var(--e-soft),
    transform 0.12s var(--e-out);
}
.mg-band:active {
  background: rgba(27, 59, 50, 0.045);
  transform: scale(0.995);
}
.mg-band .rail {
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s var(--e-out);
}
.mg-band.on .rail {
  width: 3px;
}
.mg-band .v {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mg-band .n {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.mg-band .tog {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.18s var(--e-soft);
}
.mg-band.on .tog {
  color: var(--accent);
}
.mg-band .ul {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--rule);
  transform: scaleX(1);
  transform-origin: left;
  transition: background-color 0.2s var(--e-soft);
}
.mg-band.on .ul {
  background: var(--ink);
}
.mwrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s var(--e-out),
    opacity 0.2s var(--e-soft);
}
.mg-grp.open .mwrap {
  max-height: 520px;
  opacity: 1;
}
.mrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 2px 10px 12px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.14s var(--e-soft),
    transform 0.12s var(--e-out);
}
.mrow:active {
  background: rgba(27, 59, 50, 0.045);
  transform: scale(0.995);
}
.mrow .nm {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mrow .p {
  flex: none;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #e8622c;
  font-variant-numeric: tabular-nums;
}
.mrow.off .nm {
  opacity: 0.5;
}
.mrow:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--rule2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--e-out);
}
.mg-grp.open .mrow:after {
  transform: scaleX(1);
}
.mg-grp.open .mrow {
  animation: mgIn 0.28s var(--e-out) both;
}
.mg-grp.open .mrow:nth-child(2) {
  animation-delay: 0.04s;
}
.mg-grp.open .mrow:nth-child(3) {
  animation-delay: 0.08s;
}
.mg-grp.open .mrow:nth-child(4) {
  animation-delay: 0.12s;
}
.mg-grp.open .mrow:nth-child(n + 5) {
  animation-delay: 0.15s;
}
@keyframes mgIn {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.35;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mwrap,
  .mrow,
  .mrow:after,
  .mg-band .rail,
  .mg-band .ul {
    transition: none !important;
    animation: none !important;
  }
}

/* 添加模型靠右(与搜索同一行) + 列表内「展开全部」 */
html[data-theme="paper"] .adm-page .page-head .actions .addbtn {
  margin-left: auto;
  flex: 0 0 auto !important;
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-color: var(--ink) !important;
}
.mg-hd {
  gap: 10px;
}
.mg-all {
  margin-left: 2px;
  flex: none;
  border: 2px solid rgba(27, 59, 50, 0.4);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 0 9px;
  height: 24px;
  cursor: pointer;
}
.mg-all:active {
  background: var(--ink);
  color: var(--paper);
}

/* 模型管理:搜索与「添加模型」同一行(搜索可收缩,按钮贴右) */
html[data-theme="paper"] .adm-page .page-head .actions {
  flex-wrap: nowrap;
}
html[data-theme="paper"] .adm-page .page-head .actions .sbox {
  flex: 1 1 auto !important;
  min-width: 0;
  max-width: none;
}

/* 方案A:模型列表不要外框(直接落在纸面上) */
html[data-theme="paper"] .card.panel:has(.mg-list) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html[data-theme="paper"] .card.panel:has(.mg-list) .panel-head {
  padding: 0 0 6px;
  border: 0;
}
html[data-theme="paper"] .card.panel:has(.mg-list) .panel-head h2 {
  font-size: 13px;
}

/* ===== 按预览落地:标题行描边按钮(48px) + 独立大搜索框(58px) + 更舒展的列表节奏 ===== */
html[data-theme="paper"] .adm-page .page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}
html[data-theme="paper"] .adm-page .page-head h1 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  flex: 1;
}
html[data-theme="paper"] .adm-page .page-head .actions {
  margin: 0;
}
html[data-theme="paper"] .adm-page .page-head .actions .addbtn {
  flex: 0 0 auto !important;
  width: auto !important;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--rule) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html[data-theme="paper"] .adm-page .page-head .actions .addbtn:active {
  background: var(--paper2) !important;
}
.mt-search .sbox {
  width: 100%;
  display: flex;
}
html[data-theme="paper"] .mt-search .sbox .input {
  height: 58px !important;
  min-height: 58px !important;
  border-radius: 10px !important;
  background: var(--paper2) !important;
  border: 1.5px solid var(--rule2) !important;
  font-size: 17px !important;
  padding-left: 44px !important;
  color: var(--ink);
}
html[data-theme="paper"] .mt-search .sbox > svg {
  width: 20px;
  height: 20px;
  left: 15px;
}
html[data-theme="paper"] .mt-search .sbox .sbox-clr {
  right: 14px;
  width: 24px;
  height: 24px;
}
html[data-theme="paper"] .mg-band {
  padding: 13px 0 13px 12px;
}
html[data-theme="paper"] .mg-band .v {
  font-size: 15px;
}
html[data-theme="paper"] .mg-band .n,
html[data-theme="paper"] .mg-band .tog {
  font-size: 10px;
}
html[data-theme="paper"] .mrow {
  padding: 12px 0 12px 12px;
}
html[data-theme="paper"] .mrow .nm {
  font-size: 14px;
}
html[data-theme="paper"] .mrow .p {
  font-size: 13px;
}
html[data-theme="paper"] .mg-list .panel-head {
  font-size: 13px;
}

/* 标题行的按钮:绝对定位到标题中线右侧(站点的 .actions 本身是绝对定位) */
html[data-theme="paper"] .adm-page .page-head {
  position: relative;
  padding-right: 120px;
  min-height: 48px;
  display: flex;
  align-items: center;
}
html[data-theme="paper"] .adm-page .page-head .actions {
  position: absolute !important;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  margin: 0;
}

/* ===== 回滚:搜索框恢复原样式(36px 描边纸底) ; 按钮与标题同一条中线 ===== */
html[data-theme="paper"] .mt-search .sbox .input {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
  background: var(--paper) !important;
  border: 2px solid rgba(27, 59, 50, 0.4) !important;
  font-size: 13px !important;
  padding-left: 36px !important;
}
html[data-theme="paper"] .mt-search .sbox > svg {
  width: 15px;
  height: 15px;
  left: 12px;
}
/* 标题行:标题与按钮用同一 flex 行、同高(logical 48px),真正共中线 */
html[data-theme="paper"] .adm-page .page-head {
  position: relative;
  display: flex;
  align-items: center !important;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 0 12px;
  padding-right: 0;
}
html[data-theme="paper"] .adm-page .page-head h1 {
  display: flex;
  align-items: center;
  height: 48px;
  margin: 0;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.02em;
}
html[data-theme="paper"] .adm-page .page-head .actions {
  position: static !important;
  top: auto !important;
  transform: none !important;
  display: flex;
  align-items: center;
  margin: 0;
  flex: none;
}
html[data-theme="paper"] .adm-page .page-head .actions .addbtn {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--rule) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
html[data-theme="paper"] .adm-page .page-head .actions .addbtn:active {
  background: var(--paper2) !important;
}

/* 关键:站点给 .actions 设了 flex:1 1 100% → 会换行;改成不占满 */
html[data-theme="paper"] .adm-page .page-head {
  flex-wrap: nowrap !important;
}
html[data-theme="paper"] .adm-page .page-head .actions {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0;
  max-width: none;
}

/* ===== 修复:上面那套"标题行+按钮同行"只该作用于模型管理页(含 .mg-list) =====
   其它管理页(用户/渠道/兑换码…)恢复为:标题独占一行、搜索与筛选换行排在下面 */
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head {
  display: block !important;
  flex-wrap: wrap !important;
  min-height: 0 !important;
  padding: 0 0 12px !important;
}
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head h1 {
  display: block !important;
  height: auto !important;
  font-size: 25px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head .actions {
  position: static !important;
  top: auto !important;
  transform: none !important;
  margin: 10px 0 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  flex: 1 1 100% !important;
  width: auto !important;
  gap: 8px;
}
html[data-theme="paper"]
  .adm-page:not(:has(.mg-list))
  .page-head
  .actions
  .sbox {
  flex: 1 1 100% !important;
  max-width: none !important;
}
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head .sel-wrap {
  flex: 0 0 auto;
}

/* 用户列表:A(左侧橙规) + B(整行淡墨) 合并;移除详情按钮后整行可点 */
.adm-row2 {
  position: relative;
  cursor: pointer;
  transition: background-color 0.14s var(--e-soft);
}
.adm-row2:before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 0;
  background: #e8622c;
  border-radius: 2px;
  transition: width 0.18s var(--e-out);
}
.adm-row2:active:before {
  width: 3px;
}
html[data-theme="paper"] .adm-row2:active {
  background: rgba(27, 59, 50, 0.055);
}
@media (prefers-reduced-motion: reduce) {
  .adm-row2,
  .adm-row2:before {
    transition: none !important;
  }
}

/* 用户行按下态:去掉橙条、圆角归零、淡墨更轻、底线不加深 */
.adm-row2 {
  cursor: pointer;
  border-radius: 0 !important;
  transition: background-color 0.12s var(--e-soft) !important;
}
.adm-row2:before {
  display: none !important;
}
html[data-theme="paper"] .adm-row2:active {
  background: rgba(27, 59, 50, 0.035) !important;
  border-radius: 0 !important;
  border-bottom-color: rgba(27, 59, 50, 0.25) !important;
  box-shadow: none !important;
}
html[data-theme="paper"] .adm-row2:active * {
  background-color: transparent !important;
}

/* 纸感全局下拉按钮:圆角/高度/描边与搜索框一致(不再用胶囊) */
html[data-theme="paper"] .sel-btn {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
  border: 2px solid rgba(27, 59, 50, 0.4) !important;
  background: var(--paper) !important;
  padding: 0 11px !important;
  font-size: 13px !important;
  color: #1b3b32 !important;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  letter-spacing: 0;
}
html[data-theme="paper"] .sel-btn .chev {
  opacity: 0.7;
  flex: none;
}
html[data-theme="paper"] .sel-btn:active {
  background: #f1eee3 !important;
}
/* 下拉浮层也跟着收紧圆角 */
html[data-theme="paper"] .sel-pop {
  border-radius: 8px !important;
  border: 1.5px solid rgba(27, 59, 50, 0.25) !important;
  box-shadow: 0 18px 36px -24px rgba(27, 59, 50, 0.55) !important;
}
html[data-theme="paper"] .sel-pop .sel-item {
  border-radius: 6px !important;
}

/* 管理端搜索框也统一到 36px,与下拉按钮同高 */
html[data-theme="paper"] .adm-page .sbox .input {
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
}

/* 用户管理专用(:has(.page-head .sel-wrap)):搜索框收窄,筛选按钮放右边同一行 */
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 8px !important;
  flex: 1 1 100% !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sbox {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sbox
  .input {
  height: 36px !important;
  min-height: 36px !important;
  padding-left: 34px !important;
  font-size: 13px !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sel-wrap {
  flex: 0 0 auto !important;
  margin: 0 !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sel-btn {
  min-width: 96px;
  height: 36px !important;
  min-height: 36px !important;
}

/* 搜索框与下拉按钮的底色/描边完全统一(都用字面纸色,避免半透明差异) */
html[data-theme="paper"] .sbox,
html[data-theme="paper"] .sbox .input {
  background: #fbf8ef !important;
  background-color: #fbf8ef !important;
}
html[data-theme="paper"] .sbox {
  border-radius: 8px !important;
}
html[data-theme="paper"] .sel-btn {
  background: #fbf8ef !important;
  background-color: #fbf8ef !important;
}
html[data-theme="paper"] .sbox,
html[data-theme="paper"] .sel-btn {
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
}

/* 搜索框:去掉内层输入框的边框与自身底色,只保留外层一个框(消除内框边界) */
html[data-theme="paper"] .sbox {
  padding: 0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  display: flex !important;
  align-items: center !important;
  background: #fbf8ef !important;
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
}
html[data-theme="paper"] .sbox .input {
  position: static !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  height: 36px !important;
  min-height: 36px !important;
  width: 100% !important;
  padding: 0 10px 0 34px !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  color: #1b3b32 !important;
}
html[data-theme="paper"] .sbox > svg {
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 15px !important;
  height: 15px !important;
  opacity: 0.7;
}
html[data-theme="paper"] .sbox {
  position: relative;
}

/* 搜索框与下拉按钮:总高度(border-box)完全一致 = 38px */
html[data-theme="paper"] .sbox {
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 !important;
}
html[data-theme="paper"] .sbox .input {
  box-sizing: border-box !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  line-height: 34px !important;
}
html[data-theme="paper"] .sel-btn {
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 34px !important;
}
html[data-theme="paper"] .sel-wrap {
  align-self: center !important;
}

/* 用户页:筛选按钮同高 38px(压过更早那条 36px) */
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sel-btn {
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 34px !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sel-wrap {
  align-self: center !important;
  display: flex !important;
  align-items: center !important;
}

/* ===== 滚动交互:下滑收起顶栏 / 上滑恢复;用户页搜索行吸顶 ===== */
html[data-theme="paper"] .topbar,
html[data-theme="paper"] .topnav {
  transition:
    transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.2s ease;
}
html.hdr-hide[data-theme="paper"] .topbar,
html.hdr-hide[data-theme="paper"] .topnav {
  transform: translateY(-100%) !important;
  box-shadow: none !important;
}
/* 用户管理页:头部整体吸顶,标题在滚动后收起,只留搜索行 */
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 30;
  background: #fbf8ef;
  padding: 6px 0 10px !important;
  margin: 0 0 6px !important;
  transition: background 0.18s ease;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head h1 {
  transition:
    height 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.16s ease,
    transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}
html.pg-scrolled[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  h1 {
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  opacity: 0;
  transform: translateY(-6px);
  margin: 0 !important;
}
html.pg-scrolled[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  box-shadow: 0 1px 0 rgba(27, 59, 50, 0.12);
}

/* 顶栏收起时,吸顶头部上移 59px(顶栏高度)以贴到屏幕顶端 */
html.hdr-hide[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head {
  top: -73px !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  transition:
    top 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    padding 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

/* 收起顶栏时把它的高度也归零(否则 .main 的 overflow:hidden 会裁掉吸顶头部) */
html.hdr-hide[data-theme="paper"] .topbar,
html.hdr-hide[data-theme="paper"] .topnav {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  transition:
    transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.18s ease;
}
html[data-theme="paper"] .topbar,
html[data-theme="paper"] .topnav {
  transition:
    transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.26s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.18s ease;
}
/* 此时吸顶头部直接 top:0 */
html.hdr-hide[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head {
  top: 0 !important;
}

/* 吸顶头部自带背景+上内边距,彻底覆盖上方缝隙(顶栏可见时贴 59px,收起时贴 0) */
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  top: 59px !important;
  padding-top: 14px !important;
  padding-bottom: 8px !important;
  background: #fbf8ef !important;
  z-index: 40 !important;
}
html.hdr-hide[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head {
  top: 0 !important;
}
/* 兜一层:头部下方也不再透出内容 */
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #fbf8ef;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  position: sticky !important;
}

/* 关键:滚动容器本身不要再留上内边距(sticky 的 top 以 padding 边为基准),把 14px 交给吸顶头部 */
html[data-theme="paper"] .page-enter:has(.page-head .sel-wrap) {
  padding-top: 0 !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) {
  padding-top: 0 !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  top: 59px !important;
  padding-top: 14px !important;
  background: #fbf8ef !important;
  z-index: 40 !important;
}
html.hdr-hide[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head {
  top: 0 !important;
  padding-top: 10px !important;
}

/* ===== 回滚 v161~v167 的吸顶/收起顶栏,恢复原滚动行为 ===== */
html[data-theme="paper"] .page-enter:has(.page-head .sel-wrap) {
  padding-top: 14px !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 0 10px !important;
  margin: 0 !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head h1 {
  height: auto !important;
  min-height: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  overflow: visible !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head:after {
  display: none !important;
}
html[data-theme="paper"] .topbar,
html[data-theme="paper"] .topnav {
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  border: 0 !important;
}

/* ===== 渠道管理:仿用户列表排版 ===== */
/* 搜索 + 新建按钮 同一行;按钮与搜索框同款(纸底/2px/8px/38px) */
html[data-theme="paper"] .ch-search {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
}
html[data-theme="paper"] .ch-search .sbox {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html[data-theme="paper"] .ch-search .btn.ch-newbtn {
  flex: 0 0 auto !important;
  width: auto !important;
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  background: #fbf8ef !important;
  color: #1b3b32 !important;
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
html[data-theme="paper"] .ch-search .btn.ch-newbtn:active {
  background: #f1eee3 !important;
}
/* 列表行:名称一行 + 元信息一行(仿 .adm-row2) */
html[data-theme="paper"] .ch-tbl thead {
  display: none !important;
}
html[data-theme="paper"] .ch-tbl,
html[data-theme="paper"] .ch-tbl tbody {
  display: block !important;
  width: 100% !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  display: block !important;
  position: relative;
  padding: 12px 2px !important;
  border: 0 !important;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14) !important;
  background: transparent !important;
  cursor: pointer;
}
html[data-theme="paper"] .ch-tbl tr.ch-row:active {
  background: rgba(27, 59, 50, 0.035) !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td {
  display: inline !important;
  border: 0 !important;
  padding: 0 10px 0 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 1.6;
  color: rgba(27, 59, 50, 0.62) !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td::before {
  display: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child {
  display: block !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #1b3b32 !important;
  padding: 0 0 4px !important;
  letter-spacing: -0.01em;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child b {
  font-size: 14.5px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child::after {
  content: "";
  display: block;
}
/* 地址单独一行、等宽小字 */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  display: block !important;
  font-family: var(--mono);
  font-size: 10px !important;
  letter-spacing: 0.02em;
  padding: 1px 0 3px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) .ell {
  max-width: 88%;
  display: inline-block;
}
/* 操作列靠右(停止事件冒泡由原逻辑负责) */
html[data-theme="paper"] .ch-tbl tr.ch-row td:last-child {
  position: absolute;
  right: 0;
  top: 12px;
  padding: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:last-child .btn {
  height: 26px !important;
  min-height: 26px !important;
  font-size: 11.5px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
}

/* 渠道行:去掉莫名其妙的阴影/圆角,字距归零 */
html[data-theme="paper"] .ch-tbl tr.ch-row,
html[data-theme="paper"] .ch-tbl tr.ch-row:hover,
html[data-theme="paper"] .ch-tbl tr.ch-row td {
  box-shadow: none !important;
  border-radius: 0 !important;
  background-image: none !important;
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
  text-shadow: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  margin: 0 !important;
  padding: 14px 2px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(2),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  font-family: var(--mono) !important;
  letter-spacing: 0 !important;
  font-size: 11px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(2) {
  color: rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  color: rgba(27, 59, 50, 0.55) !important;
}
/* 数字与徽章也不要拉开字距 */
html[data-theme="paper"] .ch-tbl tr.ch-row td b,
html[data-theme="paper"] .ch-tbl tr.ch-row td .ve,
html[data-theme="paper"] .ch-tbl tr.ch-row td .badge {
  letter-spacing: 0 !important;
}

/* 渠道行精简:只留 名称 + 地址(隐藏类型/密钥/模型/权重/状态/操作) */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(2),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(n + 4) {
  display: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  padding: 13px 2px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child {
  padding: 0 0 3px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  display: block !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-family: var(--mono) !important;
  letter-spacing: 0 !important;
  color: rgba(27, 59, 50, 0.55) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) .ell {
  max-width: 100%;
  display: block;
}

/* 方案A:右侧上下两行「模型 / 上游」同款样式;地址已由 JS 去掉协议与路径 */
html[data-theme="paper"] .ch-tbl tr.ch-row {
  padding-right: 80px !important;
  position: relative !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) {
  display: block !important;
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  width: auto !important;
  padding: 0 !important;
  text-align: right !important;
  background: transparent !important;
  font-family: var(--mono) !important;
  font-size: 10.5px !important;
  letter-spacing: 0 !important;
  color: rgba(27, 59, 50, 0.6) !important;
  line-height: 1.5 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) {
  top: 12px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4) {
  top: 31px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4)::before,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5)::before {
  display: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4) b,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) b {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #1b3b32 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4)::after {
  content: " 上游";
  color: rgba(27, 59, 50, 0.6);
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5)::after {
  content: " 模型";
  color: rgba(27, 59, 50, 0.6);
}
/* 地址一行:更淡、等宽、不要被右侧数字压住 */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  max-width: calc(100% - 84px) !important;
}

/* 顺手:标签紧贴数字,和预览一致(2 模型 / 1 上游) */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) {
  letter-spacing: 0 !important;
  font-size: 10.5px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4) b,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) b {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #1b3b32 !important;
  margin-right: 4px;
}

/* 右侧两行做真对齐:数字定宽右对齐,标签左对齐成列 */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) {
  display: flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  font-variant-numeric: tabular-nums !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4) b,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5) b {
  display: inline-block !important;
  min-width: 20px !important;
  text-align: right !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #1b3b32 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4)::after,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5)::after {
  display: inline-block !important;
  min-width: 2.2em !important;
  text-align: left !important;
  font-size: 10.5px !important;
  color: rgba(27, 59, 50, 0.55) !important;
  letter-spacing: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(5)::after {
  content: "模型";
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(4)::after {
  content: "上游";
}

/* 渠道行右侧计数:同一格 grid,数字与标签各自严格成列 */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  display: block !important;
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  top: 11px !important;
  width: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt::before,
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt::after {
  display: none !important;
  content: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  display: grid !important;
  grid-template-columns: 22px 1fr !important;
  column-gap: 6px !important;
  align-items: baseline !important;
  font-style: normal !important;
  line-height: 1.55 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  display: block !important;
  text-align: right !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #1b3b32 !important;
  font-variant-numeric: tabular-nums !important;
  margin: 0 !important;
  letter-spacing: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i span {
  display: block !important;
  text-align: left !important;
  font-family: var(--mono) !important;
  font-size: 10.5px !important;
  font-weight: 400 !important;
  color: rgba(27, 59, 50, 0.55) !important;
  letter-spacing: 0 !important;
}
/* 该格不再参与旧的 nth-child 绝对定位规则 */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(n + 4)::before,
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(n + 4)::after {
  content: none !important;
}

/* 数字左缘对齐 + 标签左缘对齐 + 整块宽度固定(右边缘也齐) */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  width: 74px !important;
  right: 2px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  grid-template-columns: 22px auto !important;
  column-gap: 6px !important;
  justify-content: start !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  text-align: left !important;
}

/* 回到最简:渠道行只留 名称 + 地址(隐藏计数格) */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  display: none !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  padding-right: 2px !important;
}

/* 唯一改动:恢复计数格,并让右侧两行与左侧「名称/地址」基线对齐 */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  display: block !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  line-height: 1 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i:first-child {
  height: 22px !important;
  align-items: end !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i:last-child {
  height: 18px !important;
  align-items: end !important;
}

/* 垂直微调:整体下移 3px,第二行再加 2px,与左侧名称/地址底边对齐 */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  top: 14px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i:last-child {
  height: 20px !important;
}

/* 计数放到「渠道名」下面、「地址」上面,压成一行 */
html[data-theme="paper"] .ch-tbl tr.ch-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 12px 2px !important;
  position: relative !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(1) {
  order: 1 !important;
  display: block !important;
  padding: 0 0 3px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  order: 2 !important;
  display: flex !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  width: auto !important;
  padding: 0 0 4px !important;
  gap: 10px !important;
  align-items: baseline !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  order: 3 !important;
  display: block !important;
  max-width: 100% !important;
  padding: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: baseline !important;
  gap: 4px !important;
  height: auto !important;
  line-height: 1.2 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  display: inline !important;
  text-align: left !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  margin: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i span {
  display: inline !important;
  font-size: 10.5px !important;
  color: rgba(27, 59, 50, 0.55) !important;
}

/* 方案1:两列小卡片 */
html[data-theme="paper"] .ch-tbl {
  display: block !important;
  width: 100% !important;
}
html[data-theme="paper"] .ch-tbl tbody {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  background: #f1eee3 !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 9px 10px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row:active {
  background: #eae6d8 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td {
  display: block !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child {
  font-size: 13px !important;
  line-height: 1.3 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:first-child b {
  font-size: 13px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  margin: 2px 0 0 !important;
  padding: 0 !important;
  gap: 6px !important;
  display: flex !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  gap: 3px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  font-size: 9.5px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i span {
  font-size: 9px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  margin-top: 3px !important;
  font-size: 9px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) .ell {
  display: block !important;
  max-width: 100% !important;
}
html[data-theme="paper"] .ch-tbl tr:not(.ch-row) {
  display: block !important;
  grid-column: 1/-1 !important;
}

/* 地址:统一由 CSS 生成省略号(同一个字符、同一间距) */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3),
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) .ell {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
  display: block !important;
}
/* 计数:不再拉满整宽,数字与标签紧贴(2 模型 · 1 上游) */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  width: auto !important;
  align-self: flex-start !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  gap: 3px !important;
  align-items: baseline !important;
  width: auto !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  width: auto !important;
  min-width: 0 !important;
  text-align: left !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i span {
  width: auto !important;
}

/* 数字与标签:同字号、同行高、真 baseline 对齐(只靠字重区分) */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  align-items: baseline !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i {
  align-items: baseline !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i b {
  font-size: 9.5px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  font-family: var(--mono) !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  font-family: var(--sans) !important;
}

/* 覆盖 v178 给 i:first-child/:last-child 设的 align-items:end */
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i:first-child,
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt i:last-child {
  align-items: baseline !important;
  height: auto !important;
  min-height: 0 !important;
}

/* 改回单列:一行一个渠道,卡片占满整宽 */
html[data-theme="paper"] .ch-tbl tbody {
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  width: 100% !important;
  padding: 10px 12px !important;
}

/* 渠道卡片改透明:无灰底、无圆角,保留一条分隔线 */
html[data-theme="paper"] .ch-tbl tbody {
  gap: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row {
  background: transparent !important;
  border-radius: 0 !important;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14) !important;
  padding: 11px 2px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row:last-child {
  border-bottom: 0 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row:active {
  background: rgba(27, 59, 50, 0.035) !important;
}

/* 渠道弹窗:密钥权重 + 说明行 */
.ch-hint {
  font-size: 11px;
  line-height: 1.6;
  color: rgba(27, 59, 50, 0.55);
  padding: 2px 0 6px;
}
.ch-key {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.ch-key .kv-id {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-wgt {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.55);
}
.ch-wgt input {
  width: 38px;
  height: 26px;
  text-align: center;
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  border-radius: 6px;
  background: #fbf8ef;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #1b3b32;
}
.ch-wgt input:focus {
  outline: 0;
  border-color: #e8622c;
}

/* 渠道弹窗瘦身 */
.ch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 2px;
  min-width: 0;
}
.ch-meta .t {
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.55);
  border: 1.5px solid rgba(27, 59, 50, 0.25);
  border-radius: 999px;
  padding: 1px 7px;
}
.ch-meta .sep {
  flex: none;
  color: rgba(27, 59, 50, 0.35);
}
.ch-meta .u {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: #1b3b32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-theme="paper"] .ch-key {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 6px 0 !important;
  gap: 8px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.12) !important;
  min-height: 34px;
}
html[data-theme="paper"] .ch-key:last-child {
  border-bottom: 0 !important;
}
.ch-mline {
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.7);
  line-height: 1.6;
  padding: 2px 0 6px;
  word-break: break-all;
}
.ch-mline.empty {
  color: rgba(27, 59, 50, 0.45);
}
.ch-more-wrap {
  position: relative;
  flex: 1;
  display: flex;
}
.ch-more-wrap .btn {
  width: 100%;
}
.ch-more {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 110px;
  background: #fbf8ef;
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 16px 32px -22px rgba(27, 59, 50, 0.6);
  z-index: 5;
}
.ch-more button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  color: #1b3b32;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.ch-more button:active {
  background: rgba(27, 59, 50, 0.06);
}
.ch-more button.warn {
  color: #c8451f;
}

/* 渠道弹窗底部:隐藏遗留的"删除"按钮(已收进「更多」),只留 3 个 */
html[data-theme="paper"] .ch-bar > button.btn:last-child {
  display: none !important;
}
/* 三个按钮等宽一行 */
html[data-theme="paper"] .ch-bar {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
html[data-theme="paper"] .ch-bar > .btn,
html[data-theme="paper"] .ch-bar .ch-more-wrap {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

/* 渠道弹窗 v192:去重复/去附件/密钥可点/底部两键 */
html[data-theme="paper"] .ch-sech .ch-add {
  display: none !important;
} /* 顶部"+添加密钥"去掉 */
html[data-theme="paper"] .ch-key .ch-kact {
  display: none !important;
} /* 行内 可用/删除 去掉 */
html[data-theme="paper"] .ch-key.clk {
  cursor: pointer;
}
html[data-theme="paper"] .ch-key.clk:active {
  background: rgba(27, 59, 50, 0.04) !important;
}
html[data-theme="paper"] .ch-bar > button.btn:nth-child(2) {
  display: none !important;
} /* 独立"停用"移入更多 */
/* 编辑渠道弹窗:只留 名称 + 地址(该弹窗含 .ch-sw) */
html[data-theme="paper"] .modal:has(.ch-sw) .field:nth-child(2),
html[data-theme="paper"] .modal:has(.ch-sw) .field:nth-child(n + 4),
html[data-theme="paper"] .modal:has(.ch-sw) .ch-sw {
  display: none !important;
}

/* 弹层层级:保证弹窗盖在渠道详情之上 */
html[data-theme="paper"] .modal-backdrop {
  z-index: 1200 !important;
}
html[data-theme="paper"] .modal {
  z-index: 1201 !important;
}

/* 渠道行只显示:名称 / 地址 / 计数;其余列强制隐藏 */
html[data-theme="paper"] .ch-tbl tr.ch-row > td:nth-child(2),
html[data-theme="paper"] .ch-tbl tr.ch-row > td:nth-child(6),
html[data-theme="paper"] .ch-tbl tr.ch-row > td:nth-child(7),
html[data-theme="paper"] .ch-tbl tr.ch-row > td:nth-child(8) {
  display: none !important;
}

/* 密钥区方案A:单列行 + 右端权重小胶囊 */
html[data-theme="paper"] .ch-kh {
  display: flex !important;
  align-items: baseline;
  gap: 6px;
}
html[data-theme="paper"] .ch-sum {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(27, 59, 50, 0.5);
  font-weight: 400;
}
html[data-theme="paper"] .ch-key {
  padding: 7px 0 !important;
  gap: 6px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
  min-height: 32px;
}
html[data-theme="paper"] .ch-key .kv-cp {
  display: none !important;
} /* 复制移进详情 */
html[data-theme="paper"] .ch-key .kv-id {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 11px !important;
}
html[data-theme="paper"] .ch-wgt {
  flex: none !important;
  font-size: 9.5px !important;
  color: rgba(27, 59, 50, 0.5) !important;
  gap: 3px !important;
}
html[data-theme="paper"] .ch-wgt input {
  width: 34px !important;
  height: 22px !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(27, 59, 50, 0.25) !important;
  background: #fbf8ef !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #1b3b32 !important;
  text-align: center !important;
  -moz-appearance: textfield;
  appearance: textfield;
}
html[data-theme="paper"] .ch-wgt input::-webkit-outer-spin-button,
html[data-theme="paper"] .ch-wgt input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 渠道详情:按内容自适应 + 分隔线 + 字号收紧 + 方角按钮(对齐预览A) */
html[data-theme="paper"] .adm-dt {
  height: auto !important;
  max-height: 88vh !important;
  align-self: center !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-info {
  overflow: visible !important;
  height: auto !important;
}
html[data-theme="paper"] .adm-dt-hero {
  padding-bottom: 8px !important;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.12) !important;
}
html[data-theme="paper"] .adm-dt-nm {
  font-size: 16px !important;
  letter-spacing: -0.01em;
}
html[data-theme="paper"] .ch-meta {
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
  margin: 0 !important;
}
html[data-theme="paper"] .ch-meta .u {
  font-size: 12px !important;
}
html[data-theme="paper"] .ch-sech h5 {
  font-size: 11.5px !important;
  color: rgba(27, 59, 50, 0.55) !important;
  margin: 10px 0 2px !important;
}
html[data-theme="paper"] .ch-key {
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
}
html[data-theme="paper"] .ch-key .kv-id {
  font-size: 11.5px !important;
}
html[data-theme="paper"] .ch-mline {
  font-size: 11px !important;
  padding: 6px 0 8px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
}
html[data-theme="paper"] .ch-keys + div,
html[data-theme="paper"] .small.muted {
  font-size: 10.5px !important;
}
/* 底部:方角按钮 + 一行两键 */
html[data-theme="paper"] .ch-bar {
  padding: 10px 14px !important;
  gap: 8px !important;
}
html[data-theme="paper"] .ch-bar > .btn,
html[data-theme="paper"] .ch-bar .ch-more-wrap .btn {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  border: 1.5px solid rgba(27, 59, 50, 0.3) !important;
  background: #fbf8ef !important;
  color: #1b3b32 !important;
}
html[data-theme="paper"] .ch-bar .ch-more-wrap .btn {
  font-weight: 600;
}

/* 真正按内容收高:内容区不参与伸缩 */
html[data-theme="paper"] .adm-dt {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  max-height: 88vh !important;
}
html[data-theme="paper"] .adm-dt > .adm-info {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}
html[data-theme="paper"] .adm-dt > .ch-bar {
  flex: 0 0 auto !important;
  margin-top: auto !important;
}
html[data-theme="paper"] .adm-info > .adm-panel {
  flex: 0 0 auto !important;
}

/* 真正的容器是 .adm-dt-box:按内容收高,内部不再 flex 撑满 */
html[data-theme="paper"] .adm-dt-box {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  max-height: 88vh !important;
  min-height: 0 !important;
}
html[data-theme="paper"] .adm-dt-box > .adm-info {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
}

/* 渠道弹窗:遮罩铺满 + 弹窗垂直居中 */
html[data-theme="paper"] .adm-dt {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  z-index: 1100 !important;
}
html[data-theme="paper"] .adm-dt-box {
  width: 100% !important;
  max-width: 420px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 30px 70px -40px rgba(27, 59, 50, 0.7) !important;
}

/* 遮罩必须铺满:覆盖掉之前误设的 height:auto/88vh */
html[data-theme="paper"] .adm-dt {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: 100dvh !important;
  max-height: none !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow: auto !important;
  z-index: 1100 !important;
}
html[data-theme="paper"] .adm-dt-box {
  height: auto !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto !important;
  margin: 0 !important;
  max-width: 420px !important;
  width: 100% !important;
  border-radius: 12px !important;
}

/* 蒙层不再偏绿:中性暖灰压暗 + 轻微模糊 */
html[data-theme="paper"] .adm-dt {
  background: rgba(26, 24, 20, 0.3) !important;
  backdrop-filter: blur(3px) saturate(0.85) !important;
  -webkit-backdrop-filter: blur(3px) saturate(0.85) !important;
}
html[data-theme="paper"] .modal-backdrop {
  background: rgba(26, 24, 20, 0.3) !important;
  backdrop-filter: blur(3px) saturate(0.85) !important;
  -webkit-backdrop-filter: blur(3px) saturate(0.85) !important;
}
html[data-theme="paper"] .modal-backdrop .modal {
  box-shadow: 0 30px 70px -38px rgba(20, 18, 14, 0.6) !important;
}

/* 模型列表:小胶囊自动换行(不再断词) */
html[data-theme="paper"] .ch-chips2 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px 0 8px;
}
html[data-theme="paper"] .mchip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0;
  color: rgba(27, 59, 50, 0.78);
  border: 1px solid rgba(27, 59, 50, 0.18);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  background: rgba(27, 59, 50, 0.025);
}

/* 渠道弹窗:固定大小(内容多则内部滚动),不再随内容伸缩 */
html[data-theme="paper"] .adm-dt-box {
  display: flex !important;
  flex-direction: column !important;
  height: 72vh !important;
  min-height: 72vh !important;
  max-height: 72vh !important;
  width: calc(100% - 32px) !important;
  max-width: 420px !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-dt-box > .adm-info {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  flex: 0 0 auto !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}

/* 折中:高度随内容但有上下限(42vh ~ 80vh),底部按钮贴底 */
html[data-theme="paper"] .adm-dt-box {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 42vh !important;
  max-height: 80vh !important;
  width: calc(100% - 32px) !important;
  max-width: 420px !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-dt-box > .adm-info {
  flex: 0 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}
/* 内容少时不要把 42vh 的空白撑在中间 */
html[data-theme="paper"] .adm-info > .adm-panel {
  flex: 0 0 auto !important;
}

/* 统一固定尺寸:所有弹窗同一高度(72vh),内容多则内部滚动 */
html[data-theme="paper"] .adm-dt-box,
html[data-theme="paper"] .modal {
  display: flex !important;
  flex-direction: column !important;
  height: 72vh !important;
  min-height: 72vh !important;
  max-height: 72vh !important;
  width: calc(100% - 32px) !important;
  max-width: 420px !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-dt-box > .adm-info,
html[data-theme="paper"] .modal > .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
html[data-theme="paper"] .modal > .modal-head,
html[data-theme="paper"] .modal > .modal-foot,
html[data-theme="paper"] .modal > form {
  flex: 0 0 auto !important;
}
html[data-theme="paper"] .modal > form {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
}
html[data-theme="paper"] .modal > form > .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
html[data-theme="paper"] .modal > form > .modal-foot {
  flex: 0 0 auto !important;
  margin-top: auto !important;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  flex: 0 0 auto !important;
  margin-top: auto !important;
}

/* 底部按钮贴边:去掉弹窗底部内边距,按钮区自身只留 10px */
html[data-theme="paper"] .adm-dt-box {
  padding: 0 !important;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  margin: 0 !important;
  padding: 10px 14px !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}
html[data-theme="paper"] .modal {
  padding: 0 !important;
}
html[data-theme="paper"] .modal > .modal-foot,
html[data-theme="paper"] .modal > form > .modal-foot {
  margin: 0 !important;
  padding: 10px 14px !important;
}

/* 底部按钮:保留 margin-top:auto(贴底),只清掉底部外边距 */
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  margin: auto 0 0 0 !important;
  padding: 10px 14px !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}
html[data-theme="paper"] .adm-info {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* 按钮区真正贴底:它是 .adm-info 的子元素 → 用 sticky 固定在滚动区底部 */
html[data-theme="paper"] .adm-dt-box > .adm-info {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
}
html[data-theme="paper"] .adm-info > .adm-dt-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 3;
  margin: 0 !important;
  padding: 10px 14px !important;
  background: #fbf8ef !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}
html[data-theme="paper"] .adm-dt-box {
  padding-bottom: 0 !important;
}

/* 内容区改 flex 列:按钮用 margin-top:auto 真正贴底 */
html[data-theme="paper"] .adm-dt-box > .adm-info {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
html[data-theme="paper"] .adm-info > * {
  flex: 0 0 auto !important;
}
html[data-theme="paper"] .adm-info > .adm-dt-bar {
  position: static !important;
  margin: auto 0 0 0 !important;
  padding: 10px 14px !important;
  background: #fbf8ef !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}

/* 标题行:名称 + 状态徽章同一行,不再单独占一行 */
html[data-theme="paper"] .adm-dt-hero {
  display: block !important;
}
html[data-theme="paper"] .adm-dt-hero > div {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
html[data-theme="paper"] .adm-dt-nm {
  font-size: 16px !important;
  line-height: 1.2;
}
html[data-theme="paper"] .adm-dt-ml {
  margin: 0 !important;
}

/* 名称不要占满整行,让状态徽章能挤到同一行 */
html[data-theme="paper"] .adm-dt-hero > div {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
html[data-theme="paper"] .adm-dt-nm {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 60% !important;
  display: block !important;
}
html[data-theme="paper"] .adm-dt-ml {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 标题行:hero 本身 flex,名称与状态徽章同一行 */
html[data-theme="paper"] .adm-dt-hero {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
html[data-theme="paper"] .adm-dt-hero > .adm-dt-nm {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 62% !important;
}
html[data-theme="paper"] .adm-dt-hero > .adm-dt-ml {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
html[data-theme="paper"] .adm-dt-hero > div:not(.adm-dt-nm):not(.adm-dt-ml) {
  display: contents !important;
}

/* 渠道行:名称 / 接口地址 / 模型·上游(三行) */
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(1) {
  order: 1 !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td:nth-child(3) {
  order: 2 !important;
  margin-top: 2px !important;
  padding: 0 0 3px !important;
}
html[data-theme="paper"] .ch-tbl tr.ch-row td.ch-cnt {
  order: 3 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* 详情改全屏:遮罩即页面,弹窗铺满 */
html[data-theme="paper"] .adm-dt {
  padding: 0 !important;
  background: #fbf8ef !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-dt-box {
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}
html[data-theme="paper"] .adm-dt-box > .adm-info {
  padding-top: 6px !important;
}
html[data-theme="paper"] .adm-dt-box > .ch-bar {
  padding: 10px 14px 14px !important;
  background: #fbf8ef !important;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}

/* 渠道列表 = 一张大卡片(标题行 + 列表行),对齐用户管理 */
html[data-theme="paper"] .ch-listhead {
  background: rgba(251, 248, 239, 0.55) !important;
  border: 1.5px solid rgba(27, 59, 50, 0.2) !important;
  border-bottom: 0 !important;
  border-radius: 10px 10px 0 0 !important;
  margin: 2px 0 0 !important;
  padding: 11px 14px 7px !important;
}
html[data-theme="paper"] .ch-list {
  background: rgba(251, 248, 239, 0.55) !important;
  border: 1.5px solid rgba(27, 59, 50, 0.2) !important;
  border-top: 0 !important;
  border-radius: 0 0 10px 10px !important;
  margin: 0 !important;
  padding: 0 14px 8px !important;
}
html[data-theme="paper"] .ch-list .ch-tbl {
  background: transparent !important;
}
html[data-theme="paper"] .ch-listhead b {
  font-size: 12.5px !important;
  font-weight: 700 !important;
}
html[data-theme="paper"] .ch-listhead span {
  font-size: 11px !important;
  color: rgba(27, 59, 50, 0.55) !important;
}
/* 行内左内边距归零(卡片自己已有 14px) */
html[data-theme="paper"] .ch-tbl tr.ch-row {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 统一所有管理页:标题 → 下方控件 的间距(12px) */
html[data-theme="paper"] .adm-page .page-head {
  padding: 0 0 12px !important;
  margin: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}
html[data-theme="paper"] .adm-page .page-head h1 {
  font-size: 25px !important;
  line-height: 1.25 !important;
  margin: 0 0 0 !important;
  padding: 0 !important;
}
html[data-theme="paper"] .adm-page .page-head p {
  display: none !important;
}
/* 紧随其后的控件行不再自带上方间距 */
html[data-theme="paper"] .adm-page .page-head + * {
  margin-top: 0 !important;
}
html[data-theme="paper"] .adm-page .ch-search {
  margin-top: 0 !important;
}
html[data-theme="paper"] .adm-page .mt-search {
  margin-top: 0 !important;
}
html[data-theme="paper"] .adm-page .stats {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

/* 用户管理:搜索行与标题间距也统一 12px */
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions {
  margin-top: 12px !important;
}
html[data-theme="paper"] .adm-page:has(.page-head .sel-wrap) .page-head {
  padding-bottom: 0 !important;
}
html[data-theme="paper"] .adm-page .ch-listhead {
  margin-top: 0 !important;
}

/* 修正 v216 过度归零:列表卡片与搜索行之间恢复 12px */
html[data-theme="paper"] .adm-page .page-head + .card {
  margin-top: 12px !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  + .card {
  margin-top: 12px !important;
}
/* 模型管理搜索框:只保留内层一个描边(去掉外层 sbox 的边框与底色) */
html[data-theme="paper"] .mt-search .sbox {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
html[data-theme="paper"] .mt-search .sbox .input {
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
  background: #fbf8ef !important;
  border-radius: 8px !important;
}

/* 搜索框聚焦动画:边框转橙 + 橙色光环 + 底色调亮 */
html[data-theme="paper"] .sbox,
html[data-theme="paper"] .sbox .input {
  transition:
    border-color 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.18s ease !important;
}
html[data-theme="paper"] .sbox:focus-within {
  border-color: #e8622c !important;
  box-shadow: 0 0 0 3px rgba(232, 98, 44, 0.16) !important;
  border-radius: 9px !important;
}
html[data-theme="paper"] .mt-search .sbox:focus-within {
  box-shadow: none !important;
  border: 0 !important;
}
html[data-theme="paper"] .sbox .input:focus {
  border-color: #e8622c !important;
  box-shadow: 0 0 0 3px rgba(232, 98, 44, 0.16) !important;
  background: #fffdf8 !important;
}
html[data-theme="paper"] .sbox .input::placeholder {
  transition: color 0.18s ease;
}
html[data-theme="paper"] .sbox .input:focus::placeholder {
  color: rgba(232, 98, 44, 0.55);
}

/* 聚焦动画收敛:只有"框"在动(边框转橙 + 光环),底色与占位文字不变 */
html[data-theme="paper"] .sbox .input:focus {
  background: #fbf8ef !important;
  background-color: #fbf8ef !important;
}
html[data-theme="paper"] .sbox .input:focus::placeholder {
  color: rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .sbox:focus-within {
  background: #fbf8ef !important;
}

/* 兜底:用户页无论有无搜索结果,搜索行都保持"搜索+筛选同一行、搜索不占满" */
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions {
  flex-wrap: nowrap !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sbox {
  flex: 1 1 auto !important;
  max-width: none !important;
  min-width: 0 !important;
}
html[data-theme="paper"]
  .adm-page:has(.page-head .sel-wrap)
  .page-head
  .actions
  .sel-wrap {
  flex: 0 0 auto !important;
}

/* 1 顶部:大标题 + 吸顶 */
html[data-theme="paper"] .adm-info > .adm-dt-hero {
  position: sticky !important;
  top: 0 !important;
  z-index: 6;
  background: #fbf8ef !important;
  padding: 14px 0 10px !important;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14) !important;
  margin: 0 !important;
}
html[data-theme="paper"] .adm-dt-hero .adm-dt-nm {
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}
/* 2 地址:https:// 前缀固定 + 可编辑域名 */
html[data-theme="paper"] .ch-meta {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
}
html[data-theme="paper"] .ch-meta .proto {
  flex: none;
  font-family: var(--mono);
  font-size: 12.5px;
  color: rgba(27, 59, 50, 0.4);
}
html[data-theme="paper"] .ch-meta .u {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  outline: 0 !important;
  font-family: var(--mono) !important;
  font-size: 12.5px !important;
  color: #1b3b32 !important;
  padding: 2px 0 !important;
  border-bottom: 1.5px dashed transparent !important;
  transition: border-color 0.16s ease;
}
html[data-theme="paper"] .ch-meta .u:focus {
  border-bottom-color: #e8622c !important;
}
/* 3 密钥行:可点提示 */
html[data-theme="paper"] .ch-key.clk:after {
  content: "›";
  margin-left: 6px;
  color: rgba(27, 59, 50, 0.35);
  font-size: 15px;
  line-height: 1;
}
/* 4 模型更多按钮 */
html[data-theme="paper"] .ch-mmore {
  margin: -2px 0 6px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 11px;
  color: #e8622c;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  padding: 2px 0;
  cursor: pointer;
}
/* 5 使用数据 4 格 */
html[data-theme="paper"] .ch-use {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0 4px;
}
html[data-theme="paper"] .ch-use .it {
  background: rgba(27, 59, 50, 0.04);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}
html[data-theme="paper"] .ch-use .it b {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  color: #1b3b32;
}
html[data-theme="paper"] .ch-use .it span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: rgba(27, 59, 50, 0.55);
}
/* 6 底部两键等大(已 flex:1) */
html[data-theme="paper"] .adm-info > .adm-dt-bar > .btn {
  flex: 1 1 0 !important;
  width: auto !important;
}

/* 底部两键严格等宽:两者都按 flex-basis:0 均分 */
html[data-theme="paper"] .adm-dt-bar {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
  padding: 10px 14px 14px !important;
}
html[data-theme="paper"] .adm-dt-bar > .btn {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
}
html[data-theme="paper"] .adm-dt-bar > .ch-more-wrap {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  display: flex !important;
}
html[data-theme="paper"] .adm-dt-bar > .ch-more-wrap > .btn {
  flex: 1 1 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 底部两键:各占一半(calc(50% - gap/2)),彻底等宽 */
html[data-theme="paper"] .adm-dt-bar {
  display: flex !important;
  gap: 8px !important;
  padding: 10px 14px 14px !important;
}
html[data-theme="paper"] .adm-dt-bar > .btn {
  flex: 0 0 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  min-width: 0 !important;
  margin: 0 !important;
}
html[data-theme="paper"] .adm-dt-bar > .ch-more-wrap {
  flex: 0 0 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
}
html[data-theme="paper"] .adm-dt-bar > .ch-more-wrap > .btn {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* 旧渠道弹窗隐藏,改用新全屏组件 .cd */
html[data-theme="paper"] .adm-dt {
  display: none !important;
}

/* ===== 渠道详情(重写版)完整样式 ===== */
.cd {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: #fbf8ef;
  background-image: radial-gradient(rgba(27, 59, 50, 0.05) 1px, transparent 0);
  background-size: 4px 4px;
}
.cd-hd {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  background: #fbf8ef;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14);
}
.cd-back {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(27, 59, 50, 0.25);
  border-radius: 9px;
  background: transparent;
  color: #1b3b32;
  cursor: pointer;
}
.cd-back:active {
  background: rgba(27, 59, 50, 0.06);
}
.cd-nm {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-bg {
  flex: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.7;
}
.cd-bg.on {
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  color: #1b3b32;
}
.cd-bg.off {
  border: 1.5px solid rgba(200, 69, 31, 0.5);
  color: #c8451f;
}
.cd-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.cd-sec {
  padding: 14px 0 12px;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1);
}
.cd-sec:last-child {
  border-bottom: 0;
}
.cd-lb {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(27, 59, 50, 0.5);
  margin-bottom: 8px;
}
.cd-lb .cd-n {
  letter-spacing: 0;
  font-size: 10.5px;
}
.cd-addr {
  display: flex;
  align-items: center;
  padding: 2px 0 5px;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14);
}
.cd-addr:focus-within {
  border-bottom-color: #e8622c;
}
.cd-proto {
  flex: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: rgba(27, 59, 50, 0.35);
}
.cd-addr input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: #1b3b32;
  padding: 0;
}
.cd-key {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(27, 59, 50, 0.08);
  background: none;
  font: inherit;
  color: #1b3b32;
  text-align: left;
  cursor: pointer;
}
.cd-key:last-of-type {
  border-bottom: 0;
}
.cd-key:active {
  background: rgba(27, 59, 50, 0.04);
}
.cd-mask {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cd-w {
  flex: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.6);
  border: 1.5px solid rgba(27, 59, 50, 0.2);
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.7;
}
.cd-chev {
  flex: none;
  color: rgba(27, 59, 50, 0.3);
  font-size: 16px;
  line-height: 1;
}
.cd-empty {
  font-size: 12px;
  color: rgba(27, 59, 50, 0.45);
  padding: 6px 0;
}
.cd-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cd-stats div {
  background: rgba(27, 59, 50, 0.045);
  border-radius: 8px;
  padding: 9px 4px;
  text-align: center;
}
.cd-stats b {
  display: block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 800;
}
.cd-stats span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: rgba(27, 59, 50, 0.55);
}
.cd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cd-chip {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  color: rgba(27, 59, 50, 0.75);
  border: 1px solid rgba(27, 59, 50, 0.18);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
  background: rgba(27, 59, 50, 0.02);
}
.cd-more {
  margin-top: 8px;
  background: none;
  border: 0;
  font: inherit;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #e8622c;
  cursor: pointer;
  padding: 0;
}
.cd-ft {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #fbf8ef;
  border-top: 1.5px solid rgba(27, 59, 50, 0.14);
}
.cd-btn {
  flex: 1 1 0;
  width: auto;
  height: 44px;
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  border-radius: 10px;
  background: #fbf8ef;
  color: #1b3b32;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.cd-btn.solid {
  background: #1b3b32;
  color: #fbf8ef;
  border-color: #1b3b32;
}
.cd-btn:active {
  opacity: 0.85;
}
.cd-mwrap {
  position: relative;
  flex: 1 1 0;
  display: flex;
  min-width: 0;
}
.cd-mwrap .cd-btn {
  width: 100%;
}
.cd-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 150px;
  background: #fbf8ef;
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 18px 36px -24px rgba(20, 18, 14, 0.6);
  z-index: 5;
}
.cd-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13.5px;
  color: #1b3b32;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.cd-menu button:active {
  background: rgba(27, 59, 50, 0.06);
}
.cd-menu button.warn {
  color: #c8451f;
}

/* 底部两键:各占 (50% - gap/2),严格等宽 */
.cd-ft > .cd-btn {
  flex: 0 0 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  min-width: 0 !important;
}
.cd-ft > .cd-mwrap {
  flex: 0 0 calc(50% - 4px) !important;
  width: calc(50% - 4px) !important;
  min-width: 0 !important;
}
.cd-mwrap > .cd-btn {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 「更多」下拉:与按钮同宽、贴上方、带出现动画 */
.cd-menu {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  bottom: calc(100% + 6px) !important;
  padding: 5px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(27, 59, 50, 0.28) !important;
  background: #fbf8ef !important;
  box-shadow: 0 -14px 34px -22px rgba(20, 18, 14, 0.55) !important;
  transform-origin: bottom center;
  animation: cdMenu 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes cdMenu {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cd-menu button {
  padding: 11px 12px !important;
  font-size: 13.5px !important;
  border-radius: 7px !important;
}
.cd-menu button:active {
  background: rgba(27, 59, 50, 0.07) !important;
}

/* 地址输入框:聚焦时只要"橙色下划线",不要黑框/外发光 */
.cd-addr input,
.cd-addr input:focus,
.cd-addr input:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
}
.cd-addr:focus-within {
  border-bottom-color: #e8622c !important;
  box-shadow: none !important;
}
.cd-addr {
  transition: border-color 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 渠道列表新样式 + 隐藏旧列表 */
.cl {
  background: rgba(251, 248, 239, 0.55);
  border: 1.5px solid rgba(27, 59, 50, 0.2);
  border-radius: 10px;
  padding: 0 14px 6px;
  margin-top: 12px;
}
.cl-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 0 7px;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.12);
}
.cl-hd b {
  font-size: 12.5px;
  font-weight: 700;
}
.cl-hd span {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.5);
}
.cl-it {
  border-bottom: 1px solid rgba(27, 59, 50, 0.1);
}
.cl-it:last-child {
  border-bottom: 0;
}
.cl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  background: none;
  font: inherit;
  color: #1b3b32;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cl-row:active {
  background: rgba(27, 59, 50, 0.03);
}
.cl-nm {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cl-ur {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.55);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-chev {
  flex: none;
  color: rgba(27, 59, 50, 0.3);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cl-it.open .cl-chev {
  transform: rotate(90deg);
  color: #e8622c;
}
.cl-more {
  padding: 2px 0 12px;
  animation: clIn 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes clIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cl-cnt {
  display: flex;
  gap: 14px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.55);
  padding: 4px 0 10px;
}
.cl-cnt b {
  color: #1b3b32;
  font-weight: 800;
  font-size: 12px;
  margin-right: 2px;
}
.cl-detail {
  height: 34px;
  padding: 0 16px;
  border: 1.5px solid rgba(27, 59, 50, 0.3);
  border-radius: 9px;
  background: #fbf8ef;
  color: #1b3b32;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cl-detail:active {
  background: rgba(27, 59, 50, 0.06);
}
.cl-empty {
  padding: 20px 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(27, 59, 50, 0.45);
}
html[data-theme="paper"] .ch-listhead,
html[data-theme="paper"] .ch-list {
  display: none !important;
}

/* 渠道列表:完全对齐"模型管理"的排版语言 */
.cl {
  background: rgba(251, 248, 239, 0.55) !important;
  border: 1.5px solid rgba(27, 59, 50, 0.2) !important;
  border-radius: 10px !important;
  padding: 0 14px 4px !important;
  margin-top: 12px !important;
}
.cl-hd {
  padding: 11px 0 6px !important;
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.12) !important;
}
.cl-it {
  border-bottom: 0 !important;
}
.cl-row {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 13px 0 10px 12px !important;
  background: none !important;
  border: 0 !important;
}
.cl-row:active {
  background: rgba(27, 59, 50, 0.03) !important;
}
.cl-rail {
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 0;
  background: #e8622c;
  border-radius: 2px;
  transition: width 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cl-it.open .cl-rail {
  width: 3px;
}
.cl-l {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-bottom: 9px;
}
.cl-nm {
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}
.cl-ur {
  font-family: ui-monospace, Menlo, monospace !important;
  font-size: 10.5px !important;
  color: rgba(27, 59, 50, 0.55) !important;
  text-align: left !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.cl-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(27, 59, 50, 0.25);
  transition: background-color 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cl-it.open .cl-line {
  background: #1b3b32;
}
.cl-tog {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(27, 59, 50, 0.55);
  transition: color 0.18s ease;
}
.cl-it.open .cl-tog {
  color: #e8622c;
}
.cl-chev {
  display: none !important;
}
/* 展开区:和模型行同样的"揭示"动画 */
.cl-more {
  padding: 10px 0 12px 12px !important;
  animation: clIn 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}
.cl-cnt {
  padding: 0 0 10px !important;
  font-size: 10.5px !important;
}
.cl-detail {
  height: 32px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
}

/* 修:底线铺满整行 + 展开文字与名称同基线 + 行高收紧 */
.cl-row {
  padding: 12px 0 10px 12px !important;
  align-items: flex-start !important;
}
.cl-l {
  padding-bottom: 0 !important;
  gap: 3px !important;
}
.cl-line {
  left: 12px !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 2px !important;
}
.cl-tog {
  align-self: flex-start !important;
  margin-top: 1px !important;
  line-height: 20px !important;
}
.cl-it {
  padding-bottom: 0 !important;
}
.cl-more {
  padding: 10px 0 12px 12px !important;
}

/* 渠道列表细节对齐模型管理 */
.cl-hd {
  align-items: center !important;
}
.cl-all {
  margin-left: auto;
  flex: none;
  border: 1.5px solid rgba(27, 59, 50, 0.25);
  background: transparent;
  color: #1b3b32;
  border-radius: 999px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 0 10px;
  height: 24px;
  line-height: 21px;
  cursor: pointer;
}
.cl-all:active {
  background: rgba(27, 59, 50, 0.06);
}
.cl-hd b {
  font-size: 12.5px;
}
.cl-tog {
  font-size: 9px !important;
  letter-spacing: 0.14em !important;
}
.cl-cnt {
  gap: 16px !important;
}
.cl-detail {
  margin-top: 2px;
}

/* 底线定位修正:以 .cl-it 为容器,左右都贴卡片内容区 */
.cl-it {
  position: relative !important;
}
.cl-line {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 2px !important;
}

/* 颜色/字号统一:和用户管理卡、模型管理分组条一致 */
.cl {
  background: transparent !important;
  border: 2px solid rgba(27, 59, 50, 0.25) !important;
  border-radius: 8px !important;
  padding: 0 12px 4px !important;
}
.cl-hd {
  border-bottom: 1.5px solid rgba(27, 59, 50, 0.14) !important;
}
.cl-hd b {
  font-size: 13px !important;
}
.cl-hd span {
  font-size: 10px !important;
  color: rgba(27, 59, 50, 0.72) !important;
}
.cl-ur {
  font-size: 10px !important;
  color: rgba(27, 59, 50, 0.72) !important;
}
.cl-nm {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #1b3b32 !important;
}
.cl-tog {
  font-size: 10px !important;
  color: rgba(27, 59, 50, 0.72) !important;
  letter-spacing: 0.1em !important;
}
.cl-it.open .cl-tog {
  color: #e8622c !important;
}
.cl-cnt {
  font-size: 10px !important;
  color: rgba(27, 59, 50, 0.72) !important;
  gap: 16px !important;
}
.cl-cnt b {
  font-size: 11.5px !important;
  color: #1b3b32 !important;
}
.cl-all {
  font-size: 9.5px !important;
  border-color: rgba(27, 59, 50, 0.28) !important;
}
.cl-detail {
  font-size: 12.5px !important;
  border-color: rgba(27, 59, 50, 0.3) !important;
}

/* 汉堡抽屉:直角矩形,不要圆角 */
html[data-theme="paper"] .side,
html[data-theme="paper"] .side.open,
html[data-theme="paper"] .drawer,
html[data-theme="paper"] .drawer.open {
  border-radius: 0 !important;
}
html[data-theme="paper"] .side-brand,
html[data-theme="paper"] .side-top,
html[data-theme="paper"] .side-foot,
html[data-theme="paper"] .si,
html[data-theme="paper"] .drawer-nav,
html[data-theme="paper"] .drawer-nav > a,
html[data-theme="paper"] .drawer-nav > button {
  border-radius: 0 !important;
}

/* 抽屉直角:所有主题(paper / mono-light / mono-dark) */
html[data-theme] .side,
html[data-theme] .side.open,
html[data-theme] .drawer,
html[data-theme] .drawer.open {
  border-radius: 0 !important;
}
html[data-theme] .side-brand,
html[data-theme] .side-top,
html[data-theme] .side-foot,
html[data-theme] .si,
html[data-theme] .drawer-nav,
html[data-theme] .drawer-nav > a,
html[data-theme] .drawer-nav > button {
  border-radius: 0 !important;
}
/* 兜底:万一本机还存着 terminal,一律回落到 paper */
html[data-theme="terminal-off"] {
  --x: 0;
}

/* 渠道列表 = 用户管理同款(两行 + 右侧数字 + 整行可点) */
.cl {
  padding: 0 0 4px !important;
}
.cl-hd {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.cl-it.cl-row2 {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 13px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
  background: none !important;
  font: inherit !important;
  color: #1b3b32 !important;
  text-align: left !important;
  cursor: pointer !important;
}
.cl-it.cl-row2:last-child {
  border-bottom: 0 !important;
}
.cl-it.cl-row2:active {
  background: rgba(27, 59, 50, 0.03) !important;
}
.cl-l {
  flex: 1 1 auto;
  min-width: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.cl-nm {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}
.cl-ur {
  font-family: ui-monospace, Menlo, monospace !important;
  font-size: 11px !important;
  color: rgba(27, 59, 50, 0.72) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.cl-r {
  flex: none !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 1px !important;
  margin-top: 2px !important;
}
.cl-r b {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.cl-r i {
  font-style: normal;
  font-size: 10.5px;
  color: rgba(27, 59, 50, 0.62);
}
/* 旧展开相关元素彻底不显示 */
.cl-rail,
.cl-tog,
.cl-line,
.cl-more,
.cl-all {
  display: none !important;
}

/* 渠道列表:恢复左右内边距(之前被清成 0,右侧数字贴边被裁) */
.cl {
  padding: 0 12px 4px !important;
}
.cl-hd {
  padding: 11px 0 6px !important;
}
.cl-it.cl-row2 {
  padding: 13px 0 !important;
}

/* 顶栏标题:菜单按钮右侧;页面内大标题隐藏 */
.tb-title {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 4px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text, #1b3b32);
}
.tb-title + .spacer {
  flex: 1;
}
html[data-theme] .page-head h1 {
  display: none !important;
}
html[data-theme] .page-head {
  padding: 0 0 10px !important;
  min-height: 0 !important;
}
html[data-theme] .page-head:has(.addbtn) {
  min-height: 44px !important;
}
html[data-theme] .adm-page .page-head {
  gap: 0 !important;
}

/* 后台页内标题隐藏(顶栏已显示) */
html[data-theme] .adm-page .page-head h1,
html[data-theme] .page-head > h1 {
  display: none !important;
}
html[data-theme] .adm-page .page-head {
  padding: 0 0 10px !important;
  min-height: 0 !important;
  border: 0 !important;
}
html[data-theme] .adm-page .page-head:has(.addbtn) {
  min-height: 44px !important;
}

/* 页内大标题隐藏(四种写法兜底) */
.page-head h1,
.page-head > h1,
.page-head > div > h1,
div.page-head h1 {
  display: none !important;
}

/* 覆盖早期"标题独占一行"的 display:block!important(同选择器,后写生效) */
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head h1 {
  display: none !important;
}
html[data-theme="paper"] .adm-page:not(:has(.mg-list)) .page-head {
  display: flex !important;
  align-items: center !important;
  padding: 0 0 10px !important;
  min-height: 0 !important;
}
/* 顶栏标题更醒目一点 */
.tb-title {
  font-size: 17px !important;
  font-weight: 900 !important;
}

/* 三页顶部间距统一:页头归零,首个控件行统一 10px,页头上方 12px */
html[data-theme] .adm-page .page-head {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
}
html[data-theme] .page-enter {
  padding-top: 12px !important;
}
html[data-theme] .adm-page .page-head .actions {
  margin-top: 10px !important;
}
html[data-theme] .ch-search {
  margin-top: 10px !important;
}
html[data-theme] .mt-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 10px !important;
}
html[data-theme] .mt-row .mt-search {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html[data-theme] .addbtn2 {
  flex: 0 0 auto !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
  background: #fbf8ef !important;
  color: #1b3b32 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
html[data-theme] .addbtn2:active {
  background: #f1eee3 !important;
}
/* 搜索行到列表卡统一 12px */
html[data-theme] .cl,
html[data-theme] .mg-list {
  margin-top: 12px !important;
}

/* 三页顶部间距硬统一:顶栏下 {12px 页内边距} + {10px 行距} = 22px */
html[data-theme] .page-enter {
  padding-top: 12px !important;
}
html[data-theme] .adm-page {
  padding-top: 0 !important;
}
html[data-theme] .adm-page:has(.adm-row2) .page-head .actions {
  margin-top: 10px !important;
}
html[data-theme] .adm-page:has(.cl) .ch-search {
  margin-top: 10px !important;
}
html[data-theme] .adm-page:has(.mg-list) .mt-row {
  margin-top: 10px !important;
}
/* 搜索行 → 列表卡 统一 12px */
html[data-theme] .adm-page:has(.cl) .cl {
  margin-top: 12px !important;
}
html[data-theme] .adm-page:has(.mg-list) .mg-list {
  margin-top: 12px !important;
}
html[data-theme] .adm-page:has(.adm-row2) .page-head + .card {
  margin-top: 12px !important;
}

/* ===== 间距终极统一:所有页头/行间距归零,只由容器给 22px ===== */
html[data-theme] .page-enter {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
html[data-theme] .adm-page {
  padding: 22px 14px 40px !important;
}
html[data-theme] .adm-page .page-head {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
}
html[data-theme] .adm-page .page-head .actions {
  margin: 0 !important;
  padding: 0 !important;
}
html[data-theme] .adm-page .ch-search,
html[data-theme] .adm-page .mt-row,
html[data-theme] .adm-page .mt-search,
html[data-theme] .adm-page .cl,
html[data-theme] .adm-page .mg-list {
  margin-top: 0 !important;
}
html[data-theme] .adm-page .ch-search {
  margin-bottom: 12px !important;
}
html[data-theme] .adm-page .mt-row {
  margin-bottom: 12px !important;
}
html[data-theme] .adm-page:has(.adm-row2) .page-head .actions {
  margin-bottom: 12px !important;
}

/* ===== 间距收敛(终):三页容器内边距显式一致 + 页头与首行零间距 ===== */
html[data-theme] .adm-page,
html[data-theme] .adm-page:has(.adm-row2),
html[data-theme] .adm-page:has(.cl),
html[data-theme] .adm-page:has(.mg-list) {
  padding: 22px 14px 40px !important;
}
html[data-theme] .page-enter {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
html[data-theme] .adm-page .page-head,
html[data-theme] .adm-page:has(.adm-row2) .page-head,
html[data-theme] .adm-page:has(.cl) .page-head,
html[data-theme] .adm-page:has(.mg-list) .page-head {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  border: 0 !important;
}
html[data-theme] .adm-page .page-head .actions,
html[data-theme] .adm-page .ch-search,
html[data-theme] .adm-page .mt-row,
html[data-theme] .adm-page .mt-search {
  margin: 0 !important;
  padding-top: 0 !important;
}
html[data-theme] .adm-page .cl,
html[data-theme] .adm-page .mg-list,
html[data-theme] .adm-page .page-head + .card {
  margin-top: 12px !important;
}
html[data-theme] .adm-page .ch-search,
html[data-theme] .adm-page .mt-row,
html[data-theme] .adm-page .page-head .actions {
  margin-bottom: 12px !important;
}

/* ===== ID 级覆盖(压过所有历史 class 规则) ===== */
#root .page-enter {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#root .adm-page {
  padding: 22px 14px 40px !important;
}
#root .adm-page .page-head {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  border: 0 !important;
}
#root .adm-page .page-head h1 {
  display: none !important;
}
#root .adm-page .page-head .actions {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}
#root .adm-page .ch-search {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}
#root .adm-page .mt-row {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}
#root .adm-page .mt-search {
  margin: 0 !important;
}
#root .adm-page .cl,
#root .adm-page .mg-list,
#root .adm-page .page-head + .card {
  margin-top: 12px !important;
}

/* 搜索行到卡片:只由"行"的下边距 12px 提供,卡片自身不再加上边距 */
#root .adm-page .cl,
#root .adm-page .mg-list,
#root .adm-page .page-head + .card {
  margin-top: 0 !important;
}

/* 模型管理:列表卡片不再自带上边距(由搜索行下边距提供) */
#root .adm-page:has(.mg-list) .card.panel {
  margin-top: 0 !important;
}

/* 模型页:搜索行下边距收到 2px,与卡片自带 10px 合计 12px(与另两页视觉一致) */
#root .adm-page:has(.mg-list) .mt-row {
  margin-bottom: 2px !important;
}

/* ========== D2 落地:用户管理 = 大标题 + 滚动吸顶 + 胶囊搜索 ========== */
/* ① 恢复页内大标题(仅用户管理页,即含 .adm-row2 的页) */
#root .adm-page:has(.adm-row2) .page-head h1 {
  display: block !important;
  font-size: 27px !important;
  font-weight: 900 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}
#root .adm-page:has(.adm-row2) .page-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 2px 0 0 !important;
}
#root .adm-page:has(.adm-row2) .page-head p {
  display: block !important;
  font-size: 11.5px !important;
  color: rgba(27, 59, 50, 0.6) !important;
  margin: 3px 0 0 !important;
}
/* ② 搜索框收成胶囊 + 分段位(搜索与筛选同一行,胶囊化) */
#root .adm-page:has(.adm-row2) .page-head .actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 12px 0 0 !important;
}
#root .adm-page:has(.adm-row2) .sbox {
  border-radius: 999px !important;
  height: 36px !important;
  min-height: 36px !important;
  flex: 1 1 auto !important;
}
#root .adm-page:has(.adm-row2) .sbox .input {
  height: 32px !important;
  font-size: 13px !important;
}
#root .adm-page:has(.adm-row2) .sel-wrap > select,
#root .adm-page:has(.adm-row2) .sel-wrap .sel {
  border-radius: 999px !important;
  height: 36px !important;
}
/* ③ 卡片区:白底圆角分组 + 首行前多 12px */
#root .adm-page:has(.adm-row2) .page-head + .card {
  background: #fffdf7 !important;
  border: 1px solid rgba(27, 59, 50, 0.09) !important;
  border-radius: 12px !important;
  margin-top: 12px !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head {
  border-bottom: 1px solid rgba(27, 59, 50, 0.1) !important;
  padding: 11px 14px 9px !important;
}
/* ④ 行:56px、细线内缩 14px、右侧金额数字等宽 */
#root .adm-page:has(.adm-row2) .adm-row2 {
  height: 56px !important;
  padding: 0 14px !important;
  position: relative !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: 0 !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2:before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: rgba(27, 59, 50, 0.1);
}
#root .adm-page:has(.adm-row2) .adm-row2 .l b {
  font-size: 14px !important;
  font-weight: 700 !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l i {
  font-size: 11px !important;
  margin-top: 2px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .r,
#root .adm-page:has(.adm-row2) .adm-row2 .r em {
  font-family: ui-monospace, Menlo, monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  align-self: center !important;
}
#root .adm-page:has(.adm-row2) .adm-row2:active {
  background: rgba(27, 59, 50, 0.05) !important;
}
/* 去掉行尾箭头/多余装饰 */
#root .adm-page:has(.adm-row2) .adm-row2 .chev,
#root .adm-page:has(.adm-row2) .adm-row2 .arw {
  display: none !important;
}
/* ⑤ 滚动后:顶栏标题淡入 */
html[data-theme] .tb-title {
  transition: opacity 0.18s ease;
}
body.dsh-scrolled .adm-page .tb-title {
  opacity: 1 !important;
}
body:not(.dsh-scrolled) .adm-page .tb-title {
  opacity: 0;
}
/* 顶栏滚动后加分隔线 */
.topbar {
  transition: border-color 0.2s ease;
}
body.dsh-scrolled .topbar {
  border-bottom: 1px solid rgba(27, 59, 50, 0.12);
}

/* 顶栏标题:有大标题的页面初始隐藏,滚动后淡入 */
body.dsh-bigtitle:not(.dsh-scrolled) .tb-title {
  opacity: 0 !important;
}
body.dsh-bigtitle.dsh-scrolled .tb-title {
  opacity: 1 !important;
}

/* 安全版:顶栏标题始终可见(不做滚动淡入,避免滚动后标题消失) */
body.dsh-bigtitle:not(.dsh-scrolled) .tb-title {
  opacity: 1 !important;
}
body.dsh-bigtitle .tb-title {
  opacity: 1 !important;
}

/* ===== D2 完整:分段控件 / 头像 / 吸顶分区标题 / 滚动淡入 ===== */
#root .adm-page:has(.adm-row2) .u-seg {
  display: flex;
  background: rgba(27, 59, 50, 0.07);
  border-radius: 10px;
  padding: 3px;
  min-width: 156px;
}
#root .adm-page:has(.adm-row2) .u-seg-b {
  flex: 1;
  height: 30px;
  border: 0;
  background: none;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: rgba(27, 59, 50, 0.6);
  cursor: pointer;
  transition: 0.16s;
}
#root .adm-page:has(.adm-row2) .u-seg-b.on {
  background: #fffdf7;
  color: #1b3b32;
  box-shadow: 0 1px 3px rgba(27, 59, 50, 0.14);
}
.uav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #22473c;
  color: #fbf8ef;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}
#root .adm-page:has(.adm-row2) .adm-row2 {
  gap: 11px !important;
  align-items: center !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 6;
  background: #fffdf7 !important;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 1px 0 rgba(27, 59, 50, 0.1);
}
#root .adm-page:has(.adm-row2) .card .panel-head h2 {
  font-family: ui-monospace, Menlo, monospace !important;
  font-size: 9.5px !important;
  letter-spacing: 0.16em !important;
  font-weight: 600 !important;
  color: rgba(27, 59, 50, 0.6) !important;
}
/* 滚动淡入 */
body.dsh-bigtitle:not(.dsh-scrolled) .tb-title {
  opacity: 0 !important;
}
body.dsh-bigtitle.dsh-scrolled .tb-title {
  opacity: 1 !important;
}

/* 修:头像与文字之间的空隙、名字与邮箱左对齐 */
#root .adm-page:has(.adm-row2) .adm-row2 {
  justify-content: flex-start !important;
  gap: 12px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 1px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .r {
  flex: 0 0 auto !important;
  margin-left: auto !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l b {
  line-height: 1.25 !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l i {
  line-height: 1.3 !important;
}

/* 去掉卡片包裹:列表直接铺在页面上 */
#root .adm-page:has(.adm-row2) .card.panel {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
}
/* 分区标题:纸底 + 细线,与页面左右对齐 */
#root .adm-page:has(.adm-row2) .card .panel-head {
  background: #fbf8ef !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 10px 0 9px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.12) !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head h2 {
  font-size: 9.5px !important;
}
/* 行:左右不再内缩,细线通到底 */
#root .adm-page:has(.adm-row2) .adm-row2 {
  padding: 0 !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2:before {
  left: 0 !important;
  right: 0 !important;
}

/* 「最近活跃」区块标题:正常标题样式 + 垂直居中 + 上下留白均匀 */
#root .adm-page:has(.adm-row2) .card .panel-head {
  display: flex !important;
  align-items: center !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 0 0 0 !important;
  margin: 0 !important;
  background: #fbf8ef !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.12) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 6 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head h2 {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  color: #1b3b32 !important;
  line-height: 1 !important;
  margin: 0 !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head .small.muted,
#root .adm-page:has(.adm-row2) .card .panel-head .sp + span {
  font-size: 11px !important;
  color: rgba(27, 59, 50, 0.6) !important;
  line-height: 1 !important;
}
#root .adm-page:has(.adm-row2) .card.panel {
  margin-top: 10px !important;
}

/* 区块标题:紧凑 34px,标题不悬空,细线紧贴文字下方 */
#root .adm-page:has(.adm-row2) .card.panel {
  margin-top: 16px !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  margin: 0 0 6px !important;
  border-bottom: 1px solid rgba(27, 59, 50, 0.12) !important;
  background: #fbf8ef !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head h2 {
  font-size: 12.5px !important;
  font-weight: 700 !important;
}
#root .adm-page:has(.adm-row2) .card .panel-head .small.muted,
#root .adm-page:has(.adm-row2) .card .panel-head .sp + span {
  font-size: 10.5px !important;
}
/* 首行与细线之间留 8px,避免贴太死 */
#root .adm-page:has(.adm-row2) .card.panel > div:not(.panel-head) {
  padding-top: 4px !important;
}

/* 分段控件:通栏三等分(与搜索框、区块标题、列表同宽) */
#root .adm-page:has(.adm-row2) .page-head .actions {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
}
#root .adm-page:has(.adm-row2) .u-seg {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  background: rgba(27, 59, 50, 0.07) !important;
  border-radius: 10px !important;
  padding: 3px !important;
}
#root .adm-page:has(.adm-row2) .u-seg-b {
  flex: 1 1 0 !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}
#root .adm-page:has(.adm-row2) .u-seg-b.on {
  background: #fffdf7 !important;
  box-shadow: 0 1px 3px rgba(27, 59, 50, 0.14) !important;
}
/* 搜索框与分段同宽、间距一致 */
#root .adm-page:has(.adm-row2) .page-head .actions .sbox {
  width: 100% !important;
  flex: 0 0 auto !important;
}

/* 去掉孤立的分区标题行:列表直接从分段控件下方开始 */
#root .adm-page:has(.adm-row2) .card .panel-head {
  display: none !important;
}
#root .adm-page:has(.adm-row2) .card.panel {
  margin-top: 14px !important;
}
#root .adm-page:has(.adm-row2) .card.panel > div:not(.panel-head) {
  padding-top: 0 !important;
}
#root .adm-page:has(.adm-row2) .adm-row2:first-child:before {
  display: none !important;
}

/* ① 搜索框:圆角收敛(胶囊 → 12px) */
#root .adm-page:has(.adm-row2) .page-head .actions .sbox {
  border-radius: 12px !important;
  height: 38px !important;
  min-height: 38px !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions .sbox .input {
  height: 34px !important;
  font-size: 13.5px !important;
}
/* ② 分段控件:加高加厚,与搜索框体量匹配 */
#root .adm-page:has(.adm-row2) .u-seg {
  border-radius: 12px !important;
  padding: 3px !important;
}
#root .adm-page:has(.adm-row2) .u-seg-b {
  height: 34px !important;
  line-height: 34px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}
/* ③ 用户行:收紧(56 → 52),头像 32,字号统一 */
#root .adm-page:has(.adm-row2) .adm-row2 {
  height: 52px !important;
}
#root .adm-page:has(.adm-row2) .uav {
  width: 32px !important;
  height: 32px !important;
  font-size: 12.5px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l b {
  font-size: 13.5px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .l i {
  font-size: 10.5px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 .r,
#root .adm-page:has(.adm-row2) .adm-row2 .r em {
  font-size: 12.5px !important;
}

/* ① 搜索框:对齐其他页面(8px 圆角 / 38 高 / 2px 深边) */
#root .adm-page:has(.adm-row2) .page-head .actions .sbox {
  border-radius: 8px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 2px solid rgba(27, 59, 50, 0.35) !important;
  background: #fbf8ef !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions .sbox .input {
  border-radius: 0 !important;
  height: 34px !important;
}
/* ② 分段控件与列表之间:一条通栏实线 */
#root .adm-page:has(.adm-row2) .card.panel {
  border-top: 1.5px solid rgba(27, 59, 50, 0.22) !important;
  margin-top: 16px !important;
  padding-top: 2px !important;
}
/* ③ 用户之间:短实线,从名字左边开始 */
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2:before {
  left: 44px !important;
  right: 0 !important;
  height: 1px !important;
  background: rgba(27, 59, 50, 0.13) !important;
}

/* 长实线:筛选区与用户列表之间(明显、通栏、2px) */
#root .adm-page:has(.adm-row2) .card.panel {
  border-top: 2px solid rgba(27, 59, 50, 0.55) !important;
  margin-top: 16px !important;
  padding-top: 0 !important;
}
/* 短实线:用户之间(1px、从名字处开始、右侧留 8px) */
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2:before {
  left: 44px !important;
  right: 8px !important;
  height: 1px !important;
  background: rgba(27, 59, 50, 0.28) !important;
}

/* 用户之间的短实线:用背景渐变画(不依赖伪元素),从姓名处起、右侧留 12px */
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2 {
  background-image: linear-gradient(
    rgba(27, 59, 50, 0.3),
    rgba(27, 59, 50, 0.3)
  ) !important;
  background-repeat: no-repeat !important;
  background-position: 44px 0 !important;
  background-size: calc(100% - 56px) 1px !important;
}
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2:before {
  display: none !important;
}

/* ① 列表顶部那条线:通栏,左右到屏幕两边 */
#root .adm-page:has(.adm-row2) .card.panel {
  border-top: 0 !important;
  position: relative !important;
}
#root .adm-page:has(.adm-row2) .card.panel:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 2px;
  background: rgba(27, 59, 50, 0.55);
}
/* ② 用户之间:改用"长线"(从内容左缘到右缘,28~362) */
#root .adm-page:has(.adm-row2) .adm-row2 + .adm-row2 {
  background-image: linear-gradient(
    rgba(27, 59, 50, 0.22),
    rgba(27, 59, 50, 0.22)
  ) !important;
  background-repeat: no-repeat !important;
  background-position: 0 0 !important;
  background-size: 100% 1px !important;
}

/* 去掉列表顶部那条通栏实线 */
#root .adm-page:has(.adm-row2) .card.panel:before {
  content: none !important;
  display: none !important;
}

/* 筛选控件:尺寸与圆角与搜索框统一(高 38 / 圆角 8) */
#root .adm-page:has(.adm-row2) .u-seg {
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  padding: 3px !important;
}
#root .adm-page:has(.adm-row2) .u-seg-b {
  height: 32px !important;
  line-height: 32px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  padding: 0 !important;
}

/* 入场动画保留;仅"翻页瞬间"临时抑制,避免 25 行依次闪 */
body.dsh-paging .adm-page:has(.adm-row2) .adm-row2 {
  animation: none !important;
  opacity: 1 !important;
}

/* 一旦向上滚过:大标题/副标题永久消失,顶栏标题永久显示(回滚不恢复,刷新才恢复) */

body.dsh-locked.dsh-bigtitle .tb-title,
body.dsh-locked .tb-title {
  opacity: 1 !important;
}

/* 锁定态(必须带 #root 才能压过 ID 级规则) */
/* 锁定:只隐藏,不改布局(避免任何跳动/闪烁) */

/* 标题区消失过渡(极短淡出,避免生硬) */
#root .adm-page .page-head {
  transition: opacity 0.16s ease;
}

/* 锁定态(带 #root 压过 ID 级规则) */

/* 锁定:真正移除标题与副标题的高度(只动这两个元素) */
body.dsh-locked #root .adm-page .page-head h1,
body.dsh-locked #root .adm-page .page-head > p,
body.dsh-locked #root .adm-page:has(.adm-row2) .page-head h1,
body.dsh-locked #root .adm-page:has(.adm-row2) .page-head p {
  display: none !important;
}

/* 关掉浏览器滚动锚定,避免它和我们的补偿打架 */
#root .page-enter,
#root .main,
#root .console-grid {
  overflow-anchor: none !important;
}

/* 停用:不再隐藏标题,标题随页面滚动;顶栏标题随滚动淡入 */

/* 页内大标题与副标题去掉:标题只在顶栏(汉堡右侧) */
#root .adm-page .page-head h1,
#root .adm-page .page-head p,
#root .adm-page .page-head > p {
  display: none !important;
}
/* 顶栏标题始终可见(取消滚动淡入) */
.tb-title,
body.dsh-bigtitle .tb-title,
body.dsh-bigtitle:not(.dsh-scrolled) .tb-title,
body.dsh-scrolled .tb-title {
  opacity: 1 !important;
}
/* 页头不再占位 */
#root .adm-page .page-head {
  margin: 0 !important;
  min-height: 0 !important;
}

/* 同款 :has() 选择器覆盖(优先级相等,后写生效) */
#root .adm-page:has(.adm-row2) .page-head h1,
#root .adm-page:has(.adm-row2) .page-head p,
#root .adm-page:has(.cl) .page-head h1,
#root .adm-page:has(.mg-list) .page-head h1,
#root .adm-page:has(.mg-list) .page-head p {
  display: none !important;
}
#root .adm-page:has(.adm-row2) .page-head {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions {
  margin-top: 0 !important;
}

/* ===== 右上角菜单:按钮与面板重做 ===== */
.nm-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(27, 59, 50, 0.16) !important;
  background: transparent !important;
  color: rgba(27, 59, 50, 0.7) !important;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s !important;
}
.nm-btn:hover {
  background: rgba(27, 59, 50, 0.05) !important;
  color: #1b3b32 !important;
}
.nm-btn[aria-expanded="true"] {
  background: rgba(27, 59, 50, 0.07) !important;
  border-color: rgba(27, 59, 50, 0.24) !important;
  color: #1b3b32 !important;
}
.nm-btn:active {
  transform: none !important;
}
.nm-pop {
  min-width: 196px !important;
  padding: 10px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(27, 59, 50, 0.14) !important;
  background: #fbf8ef !important;
  box-shadow: 0 12px 30px -22px rgba(20, 18, 14, 0.55) !important;
}
.nm-login-wrap {
  display: flex !important;
  gap: 6px !important;
  margin-bottom: 10px !important;
}
.nm-login {
  flex: 1 !important;
  height: 32px !important;
  border: 1px solid #1b3b32 !important;
  border-radius: 8px !important;
  background: #1b3b32 !important;
  color: #fbf8ef !important;
  font: inherit !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
.nm-login.ghost {
  background: transparent !important;
  color: #1b3b32 !important;
  border-color: rgba(27, 59, 50, 0.22) !important;
}
.nm-segs {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
}
.nm-grp {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}
.nm-lab {
  font-size: 10.5px !important;
  color: rgba(27, 59, 50, 0.5) !important;
  letter-spacing: 0 !important;
}
.nm-seg {
  display: flex !important;
  gap: 3px !important;
  background: rgba(27, 59, 50, 0.06) !important;
  padding: 3px !important;
  border-radius: 9px !important;
}
.nm-si {
  flex: 1 !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: rgba(27, 59, 50, 0.6) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
.nm-si.on {
  background: #fbf8ef !important;
  color: #1b3b32 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.12) !important;
}
.nm-ths,
.nm-th,
.nm-tile,
.nm-thn,
.nm-list,
.nm-item,
.nm-sep {
  display: none !important;
}

/* ===== 菜单三主题隔离 ===== */
.nm-pop {
  min-width: 196px !important;
  padding: 10px !important;
  border-radius: 12px !important;
}
.nm-login-wrap {
  display: flex !important;
  gap: 6px !important;
  margin-bottom: 10px !important;
}
.nm-login {
  flex: 1 !important;
  height: 32px !important;
  border-radius: 8px !important;
  font: inherit !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
}
.nm-segs {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
}
.nm-seg {
  display: flex !important;
  gap: 3px !important;
  padding: 3px !important;
  border-radius: 9px !important;
}
.nm-si {
  flex: 1 !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}
.nm-ths,
.nm-th,
.nm-tile,
.nm-thn,
.nm-list,
.nm-item,
.nm-sep {
  display: none !important;
}
html[data-theme="paper"] .nm-pop {
  background: #fbf8ef !important;
  border: 1px solid rgba(27, 59, 50, 0.14) !important;
  box-shadow: 0 12px 30px -22px rgba(20, 18, 14, 0.55) !important;
}
html[data-theme="paper"] .nm-login {
  background: #1b3b32 !important;
  color: #fbf8ef !important;
  border-color: #1b3b32 !important;
}
html[data-theme="paper"] .nm-login.ghost {
  background: transparent !important;
  color: #1b3b32 !important;
  border-color: rgba(27, 59, 50, 0.22) !important;
}
html[data-theme="paper"] .nm-seg {
  background: rgba(27, 59, 50, 0.06) !important;
}
html[data-theme="paper"] .nm-si {
  color: rgba(27, 59, 50, 0.6) !important;
}
html[data-theme="paper"] .nm-si.on {
  background: #fbf8ef !important;
  color: #1b3b32 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.12) !important;
}
html[data-theme="mono-light"] .nm-pop {
  background: #fff !important;
  border: 1px solid #e6e8ec !important;
  box-shadow: 0 10px 28px -22px rgba(16, 24, 40, 0.5) !important;
}
html[data-theme="mono-light"] .nm-login {
  background: #0e1116 !important;
  color: #fff !important;
  border-color: #0e1116 !important;
}
html[data-theme="mono-light"] .nm-login.ghost {
  background: transparent !important;
  color: #0e1116 !important;
  border-color: #e6e8ec !important;
}
html[data-theme="mono-light"] .nm-seg {
  background: #f3f4f6 !important;
}
html[data-theme="mono-light"] .nm-si {
  color: #6b7280 !important;
}
html[data-theme="mono-light"] .nm-si.on {
  background: #fff !important;
  color: #0e1116 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12) !important;
}
html[data-theme="mono-dark"] .nm-pop {
  background: #141a20 !important;
  border: 1px solid #242a31 !important;
  box-shadow: 0 12px 30px -22px #000 !important;
}
html[data-theme="mono-dark"] .nm-login {
  background: #fff !important;
  color: #0e1116 !important;
  border-color: #fff !important;
}
html[data-theme="mono-dark"] .nm-login.ghost {
  background: transparent !important;
  color: #e6e8ec !important;
  border-color: #242a31 !important;
}
html[data-theme="mono-dark"] .nm-seg {
  background: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="mono-dark"] .nm-si {
  color: rgba(255, 255, 255, 0.62) !important;
}
html[data-theme="mono-dark"] .nm-si.on {
  background: #2a3038 !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

/* nm-drawer-v2 对齐 new-api 开门抽屉 */
.nm-pop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: auto !important;
  width: 88% !important;
  max-width: 340px !important;
  min-width: 0 !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 301 !important;
  animation: nmSlide 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes nmSlide {
  from {
    transform: translateX(-102%);
  }
  to {
    transform: none;
  }
}
.nm-hd {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.nm-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(from 210deg, #e8622c, #f2b33d, #1b3b32, #e8622c);
}
.nm-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nm-hdsp {
  flex: 1;
}
.nm-hbtn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nm-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nm-links {
  flex: 1;
  overflow: auto;
  padding: 14px 10px 0;
}
.nm-link {
  display: block;
  width: 100%;
  text-align: left;
  height: 56px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.nm-foot {
  flex: none;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nm-themes {
  display: flex;
  gap: 6px;
}
.nm-th2 {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.nm-cta {
  height: 46px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
html[data-theme="paper"] .nm-pop {
  background: #fbf8ef !important;
  box-shadow: 16px 0 44px -34px rgba(20, 18, 14, 0.6) !important;
}
html[data-theme="paper"] .nm-name {
  color: #1b3b32;
}
html[data-theme="paper"] .nm-hbtn {
  color: rgba(27, 59, 50, 0.62);
}
html[data-theme="paper"] .nm-x {
  color: rgba(27, 59, 50, 0.62);
  background: rgba(27, 59, 50, 0.05);
}
html[data-theme="paper"] .nm-link {
  color: #1b3b32;
}
html[data-theme="paper"] .nm-link:active {
  background: rgba(27, 59, 50, 0.06);
}
html[data-theme="paper"] .nm-th2 {
  color: rgba(27, 59, 50, 0.55);
  border-color: rgba(27, 59, 50, 0.14);
}
html[data-theme="paper"] .nm-th2.on {
  background: #1b3b32;
  color: #fbf8ef;
  border-color: #1b3b32;
}
html[data-theme="paper"] .nm-cta {
  background: #1b3b32;
  color: #fbf8ef;
}
html[data-theme="mono-light"] .nm-pop {
  background: #fff !important;
  box-shadow: 16px 0 44px -34px rgba(16, 24, 40, 0.5) !important;
}
html[data-theme="mono-light"] .nm-name {
  color: #0e1116;
}
html[data-theme="mono-light"] .nm-hbtn {
  color: #6b7280;
}
html[data-theme="mono-light"] .nm-x {
  color: #6b7280;
  background: #f3f4f6;
}
html[data-theme="mono-light"] .nm-link {
  color: #0e1116;
}
html[data-theme="mono-light"] .nm-link:active {
  background: #f6f7f9;
}
html[data-theme="mono-light"] .nm-th2 {
  color: #6b7280;
  border-color: #e6e8ec;
}
html[data-theme="mono-light"] .nm-th2.on {
  background: #0e1116;
  color: #fff;
  border-color: #0e1116;
}
html[data-theme="mono-light"] .nm-cta {
  background: #0e1116;
  color: #fff;
}
html[data-theme="mono-dark"] .nm-pop {
  background: #0f141a !important;
  box-shadow: 16px 0 44px -20px #000 !important;
}
html[data-theme="mono-dark"] .nm-name {
  color: #e6e8ec;
}
html[data-theme="mono-dark"] .nm-hbtn {
  color: #9aa1ac;
}
html[data-theme="mono-dark"] .nm-x {
  color: #c9cdd4;
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="mono-dark"] .nm-link {
  color: #e6e8ec;
}
html[data-theme="mono-dark"] .nm-link:active {
  background: rgba(255, 255, 255, 0.07);
}
html[data-theme="mono-dark"] .nm-th2 {
  color: rgba(255, 255, 255, 0.6);
  border-color: #242a31;
}
html[data-theme="mono-dark"] .nm-th2.on {
  background: #fff;
  color: #0e1116;
  border-color: #fff;
}
html[data-theme="mono-dark"] .nm-cta {
  background: #fff;
  color: #0e1116;
}

/* ===== 顶栏下拉卡片菜单 ===== */
.nm-pop {
  position: fixed !important;
  top: 58px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: calc(100dvh - 58px) !important;
  border: 0 !important;
  border-radius: 0 0 16px 16px !important;
  padding: 8px 12px 14px !important;
  z-index: 390 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: auto !important;
  transform-origin: top center !important;
  animation: dropOpen 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both !important;
}
@keyframes dropOpen {
  from {
    max-height: 0;
    opacity: 0.4;
    transform: translateY(-6px);
  }
  to {
    max-height: calc(100dvh - 58px);
    opacity: 1;
    transform: none;
  }
}
.nm-pop .fs-x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nm-pop .fs-list {
  padding: 34px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nm-pop .fs-btn {
  width: 100%;
  text-align: left;
  height: 56px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  cursor: pointer;
}
.nm-pop .fs-signin {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}

html[data-theme="paper"] .nm-pop {
  background: #fbf8ef !important;
  box-shadow: 0 18px 40px -28px rgba(20, 18, 14, 0.6) !important;
}
html[data-theme="paper"] .fs-x {
  color: rgba(27, 59, 50, 0.6);
}
html[data-theme="paper"] .fs-btn {
  color: #1b3b32;
}
html[data-theme="paper"] .fs-btn:active {
  background: rgba(27, 59, 50, 0.06);
}
html[data-theme="paper"] .fs-signin {
  background: #1b3b32;
  color: #fbf8ef;
}

html[data-theme="mono-light"] .nm-pop {
  background: #fff !important;
  box-shadow: 0 18px 40px -28px rgba(16, 24, 40, 0.5) !important;
}
html[data-theme="mono-light"] .fs-x {
  color: #6b7280;
}
html[data-theme="mono-light"] .fs-btn {
  color: #0e1116;
}
html[data-theme="mono-light"] .fs-btn:active {
  background: #f6f7f9;
}
html[data-theme="mono-light"] .fs-signin {
  background: #0e1116;
  color: #fff;
}

html[data-theme="mono-dark"] .nm-pop {
  background: #10151b !important;
  box-shadow: 0 18px 40px -18px #000 !important;
}
html[data-theme="mono-dark"] .fs-x {
  color: #9aa1ac;
}
html[data-theme="mono-dark"] .fs-btn {
  color: #e6e8ec;
}
html[data-theme="mono-dark"] .fs-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="mono-dark"] .fs-signin {
  background: #fff;
  color: #0e1116;
}

/* ===== 小尺寸下拉菜单(靠右上按钮下方) ===== */
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop {
  position: fixed !important;
  top: 56px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 200px !important;
  max-width: 200px !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 12px !important;
  padding: 6px !important;
  z-index: 390 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  overflow: hidden !important;
  transform-origin: top right !important;
  animation: popIn 0.16s ease both !important;
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
html[data-theme="paper"] .nm-pop {
  background: #fff !important;
  border: 1px solid rgba(27, 59, 50, 0.14) !important;
  box-shadow: 0 12px 30px -16px rgba(20, 18, 14, 0.45) !important;
}
html[data-theme="mono-light"] .nm-pop {
  background: #fff !important;
  border: 1px solid #e6e8ec !important;
  box-shadow: 0 12px 30px -16px rgba(16, 24, 40, 0.35) !important;
}
html[data-theme="mono-dark"] .nm-pop {
  background: #151b22 !important;
  border: 1px solid #242a31 !important;
  box-shadow: 0 12px 30px -16px #000 !important;
}
html[data-theme="paper"] .nm-pop .fs-list,
html[data-theme="mono-light"] .nm-pop .fs-list,
html[data-theme="mono-dark"] .nm-pop .fs-list {
  flex: none !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
html[data-theme="paper"] .nm-pop .fs-btn,
html[data-theme="mono-light"] .nm-pop .fs-btn,
html[data-theme="mono-dark"] .nm-pop .fs-btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 7px !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}
html[data-theme="paper"] .nm-pop .fs-btn {
  color: rgba(27, 59, 50, 0.8) !important;
}
html[data-theme="mono-light"] .nm-pop .fs-btn {
  color: rgba(14, 17, 22, 0.8) !important;
}
html[data-theme="mono-dark"] .nm-pop .fs-btn {
  color: rgba(230, 232, 236, 0.8) !important;
}
html[data-theme="paper"] .nm-pop .fs-btn:active {
  background: rgba(27, 59, 50, 0.07) !important;
}
html[data-theme="mono-light"] .nm-pop .fs-btn:active {
  background: #f4f5f7 !important;
}
html[data-theme="mono-dark"] .nm-pop .fs-btn:active {
  background: rgba(255, 255, 255, 0.07) !important;
}
html[data-theme="paper"] .nm-pop .fs-signin,
html[data-theme="mono-light"] .nm-pop .fs-signin,
html[data-theme="mono-dark"] .nm-pop .fs-signin {
  height: 34px !important;
  min-height: 34px !important;
  margin: 4px 0 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  width: 100% !important;
  cursor: pointer !important;
}
html[data-theme="paper"] .nm-pop .fs-signin {
  background: #1b3b32 !important;
  color: #fbf8ef !important;
}
html[data-theme="mono-light"] .nm-pop .fs-signin {
  background: #0e1116 !important;
  color: #fff !important;
}
html[data-theme="mono-dark"] .nm-pop .fs-signin {
  background: #fff !important;
  color: #0e1116 !important;
}
/* 让菜单项之间有一条极淡分隔 */
html[data-theme="paper"] .nm-pop .fs-btn + .fs-btn {
  box-shadow: inset 0 1px 0 rgba(27, 59, 50, 0.07) !important;
}
html[data-theme="mono-light"] .nm-pop .fs-btn + .fs-btn {
  box-shadow: inset 0 1px 0 #f0f1f4 !important;
}
html[data-theme="mono-dark"] .nm-pop .fs-btn + .fs-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop {
  width: 184px !important;
  max-width: 184px !important;
}
html[data-theme="paper"] .nm-pop .fs-btn,
html[data-theme="mono-light"] .nm-pop .fs-btn,
html[data-theme="mono-dark"] .nm-pop .fs-btn {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 13.5px !important;
}

/* ===== 开门菜单(参考:半透明整屏 + 大条目 + 底部图标) ===== */
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
  z-index: 390 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: auto !important;
  animation: alIn 0.2s ease both !important;
}
@keyframes alIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
html[data-theme="paper"] .nm-pop {
  background: rgba(251, 248, 239, 0.86) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
html[data-theme="mono-light"] .nm-pop {
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
html[data-theme="mono-dark"] .nm-pop {
  background: rgba(11, 15, 20, 0.88) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
/* 头部 */
html[data-theme="paper"] .nm-pop .al-hd,
html[data-theme="mono-light"] .nm-pop .al-hd,
html[data-theme="mono-dark"] .nm-pop .al-hd {
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.nm-pop .al-brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
html[data-theme="paper"] .nm-pop .al-brand {
  color: #1b3b32;
}
html[data-theme="mono-light"] .nm-pop .al-brand {
  color: #0e1116;
}
html[data-theme="mono-dark"] .nm-pop .al-brand {
  color: #e6e8ec;
}
.nm-pop .al-x {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
html[data-theme="paper"] .nm-pop .al-x {
  color: #1b3b32;
}
html[data-theme="mono-light"] .nm-pop .al-x {
  color: #0e1116;
}
html[data-theme="mono-dark"] .nm-pop .al-x {
  color: #e6e8ec;
}
/* 列表 */
html[data-theme="paper"] .nm-pop .al-list,
html[data-theme="mono-light"] .nm-pop .al-list,
html[data-theme="mono-dark"] .nm-pop .al-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
}
.nm-pop .al-item {
  width: 100%;
  text-align: left;
  height: 54px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 8px;
  cursor: pointer;
}
html[data-theme="paper"] .nm-pop .al-item {
  color: #1b3b32;
}
html[data-theme="mono-light"] .nm-pop .al-item {
  color: #0e1116;
}
html[data-theme="mono-dark"] .nm-pop .al-item {
  color: #e6e8ec;
}
html[data-theme="paper"] .nm-pop .al-item:active {
  background: rgba(27, 59, 50, 0.07);
}
html[data-theme="mono-light"] .nm-pop .al-item:active {
  background: rgba(14, 17, 22, 0.05);
}
html[data-theme="mono-dark"] .nm-pop .al-item:active {
  background: rgba(255, 255, 255, 0.07);
}
/* 底部:图标行 + 登录 */
html[data-theme="paper"] .nm-pop .al-foot,
html[data-theme="mono-light"] .nm-pop .al-foot,
html[data-theme="mono-dark"] .nm-pop .al-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(27, 59, 50, 0.1);
}
html[data-theme="mono-light"] .nm-pop .al-foot {
  border-top-color: #efefef;
}
html[data-theme="mono-dark"] .nm-pop .al-foot {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.nm-pop .al-icons {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nm-pop .al-ic {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
html[data-theme="paper"] .nm-pop .al-ic {
  color: #1b3b32;
}
html[data-theme="mono-light"] .nm-pop .al-ic {
  color: #0e1116;
}
html[data-theme="mono-dark"] .nm-pop .al-ic {
  color: #e6e8ec;
}
.nm-pop .al-login {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
}
html[data-theme="paper"] .nm-pop .al-login {
  color: #1b3b32;
}
html[data-theme="mono-light"] .nm-pop .al-login {
  color: #0e1116;
}
html[data-theme="mono-dark"] .nm-pop .al-login {
  color: #e6e8ec;
}

/* 覆盖旧的小尺寸规则:强制整屏 */
html[data-theme="paper"] .topnav .nm-pop,
html[data-theme="mono-light"] .topnav .nm-pop,
html[data-theme="mono-dark"] .topnav .nm-pop,
html .topnav.menu-open .nm-pop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
}

/* 顶栏固定,面板从 58 开始(不覆盖顶栏),半透明 */
html[data-theme="paper"] .topnav.menu-open,
html[data-theme="mono-light"] .topnav.menu-open,
html[data-theme="mono-dark"] .topnav.menu-open {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 58px !important;
  max-height: 58px !important;
  z-index: 400 !important;
  overflow: visible !important;
}
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop,
html .topnav .nm-pop,
html .topnav.menu-open .nm-pop {
  position: fixed !important;
  top: 58px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
  z-index: 395 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: auto !important;
}
html[data-theme="paper"] .nm-pop {
  background: rgba(251, 248, 239, 0.86) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
html[data-theme="mono-light"] .nm-pop {
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
html[data-theme="mono-dark"] .nm-pop {
  background: rgba(11, 15, 20, 0.88) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}
html[data-theme="paper"] .nm-pop .al-list,
html[data-theme="mono-light"] .nm-pop .al-list,
html[data-theme="mono-dark"] .nm-pop .al-list {
  padding: 10px 8px 0 !important;
}

html body .topnav.menu-open .nm-pop,
html body .topnav .nm-pop {
  inset: 58px 0 0 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: auto !important;
  border-radius: 0 !important;
  padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
  z-index: 395 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: auto !important;
}

/* 选项面板 + 完整登录按钮 */
.nm-pop .al-seg {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 4px;
}
.nm-pop .al-opt {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
html[data-theme="paper"] .nm-pop .al-opt {
  color: rgba(27, 59, 50, 0.75);
  border-color: rgba(27, 59, 50, 0.2);
}
html[data-theme="paper"] .nm-pop .al-opt.on {
  background: #1b3b32;
  color: #fbf8ef;
  border-color: #1b3b32;
  font-weight: 600;
}
html[data-theme="mono-light"] .nm-pop .al-opt {
  color: rgba(14, 17, 22, 0.7);
  border-color: #e6e8ec;
}
html[data-theme="mono-light"] .nm-pop .al-opt.on {
  background: #0e1116;
  color: #fff;
  border-color: #0e1116;
  font-weight: 600;
}
html[data-theme="mono-dark"] .nm-pop .al-opt {
  color: rgba(255, 255, 255, 0.7);
  border-color: #2a3038;
}
html[data-theme="mono-dark"] .nm-pop .al-opt.on {
  background: #fff;
  color: #0e1116;
  border-color: #fff;
  font-weight: 600;
}
.nm-pop .al-ic.on {
  border-radius: 10px;
}
html[data-theme="paper"] .nm-pop .al-ic.on {
  background: rgba(27, 59, 50, 0.08);
}
html[data-theme="mono-light"] .nm-pop .al-ic.on {
  background: #f2f3f5;
}
html[data-theme="mono-dark"] .nm-pop .al-ic.on {
  background: rgba(255, 255, 255, 0.1);
}
.nm-pop .al-login {
  width: 100% !important;
  height: 46px !important;
  border: 0 !important;
  border-radius: 12px !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-top: 2px;
}
html[data-theme="paper"] .nm-pop .al-login {
  background: #1b3b32 !important;
  color: #fbf8ef !important;
}
html[data-theme="mono-light"] .nm-pop .al-login {
  background: #0e1116 !important;
  color: #fff !important;
}
html[data-theme="mono-dark"] .nm-pop .al-login {
  background: #fff !important;
  color: #0e1116 !important;
}

/* 语言/主题:点图标弹出小下拉 */
.nm-pop .al-foot {
  position: relative !important;
}
.nm-pop .al-seg {
  position: absolute !important;
  bottom: 132px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 148px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 6px !important;
  border-radius: 10px !important;
  z-index: 6 !important;
  animation: popUp 0.14s ease both !important;
}
@keyframes popUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}
html[data-theme="paper"] .nm-pop .al-seg {
  background: #fff !important;
  border: 1px solid rgba(27, 59, 50, 0.14) !important;
  box-shadow: 0 12px 26px -16px rgba(20, 18, 14, 0.45) !important;
}
html[data-theme="mono-light"] .nm-pop .al-seg {
  background: #fff !important;
  border: 1px solid #e6e8ec !important;
  box-shadow: 0 12px 26px -16px rgba(16, 24, 40, 0.35) !important;
}
html[data-theme="mono-dark"] .nm-pop .al-seg {
  background: #151b22 !important;
  border: 1px solid #242a31 !important;
  box-shadow: 0 12px 26px -16px #000 !important;
}
.nm-pop .al-opt {
  width: 100% !important;
  height: 34px !important;
  flex: none !important;
  text-align: left !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  background: transparent !important;
}
html[data-theme="paper"] .nm-pop .al-opt {
  color: rgba(27, 59, 50, 0.8) !important;
}
html[data-theme="mono-light"] .nm-pop .al-opt {
  color: rgba(14, 17, 22, 0.8) !important;
}
html[data-theme="mono-dark"] .nm-pop .al-opt {
  color: rgba(230, 232, 236, 0.85) !important;
}
html[data-theme="paper"] .nm-pop .al-opt.on {
  background: #1b3b32 !important;
  color: #fbf8ef !important;
  font-weight: 600 !important;
}
html[data-theme="mono-light"] .nm-pop .al-opt.on {
  background: #0e1116 !important;
  color: #fff !important;
  font-weight: 600 !important;
}
html[data-theme="mono-dark"] .nm-pop .al-opt.on {
  background: #fff !important;
  color: #0e1116 !important;
  font-weight: 600 !important;
}
html[data-theme="paper"] .nm-pop .al-opt:active {
  background: rgba(27, 59, 50, 0.08) !important;
}
html[data-theme="mono-light"] .nm-pop .al-opt:active {
  background: #f4f5f7 !important;
}
html[data-theme="mono-dark"] .nm-pop .al-opt:active {
  background: rgba(255, 255, 255, 0.09) !important;
}

/* ☰ → ✕ 丝滑变形 */
.nm-btn .morph {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
  flex: none;
}
.nm-btn .morph i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2.2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease,
    width 0.28s ease;
}
.nm-btn .morph i:nth-child(1) {
  top: 0;
}
.nm-btn .morph i:nth-child(2) {
  top: 6px;
  width: 14px;
}
.nm-btn .morph i:nth-child(3) {
  top: 12px;
}
.nm-btn .morph.on i:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.nm-btn .morph.on i:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nm-btn .morph.on i:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* 菜单丝滑下拉到位(覆盖旧的淡入) */
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop,
html body .topnav.menu-open .nm-pop {
  animation: dropDown 0.34s cubic-bezier(0.22, 1, 0.36, 1) both !important;
  transform-origin: 50% 0 !important;
  will-change: transform, opacity;
}
@keyframes dropDown {
  0% {
    opacity: 0;
    transform: translateY(-18px) scaleY(0.92);
  }
  55% {
    opacity: 1;
    transform: translateY(2px) scaleY(1.01);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
/* 卡片列表与底部元素依次浮现 */
html[data-theme="paper"] .nm-pop .al-item,
html[data-theme="mono-light"] .nm-pop .al-item,
html[data-theme="mono-dark"] .nm-pop .al-item {
  animation: itemIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html[data-theme="paper"] .nm-pop .al-item:nth-child(1),
html[data-theme="mono-light"] .nm-pop .al-item:nth-child(1),
html[data-theme="mono-dark"] .nm-pop .al-item:nth-child(1) {
  animation-delay: 0.04s;
}
html[data-theme="paper"] .nm-pop .al-item:nth-child(2),
html[data-theme="mono-light"] .nm-pop .al-item:nth-child(2),
html[data-theme="mono-dark"] .nm-pop .al-item:nth-child(2) {
  animation-delay: 0.075s;
}
html[data-theme="paper"] .nm-pop .al-item:nth-child(3),
html[data-theme="mono-light"] .nm-pop .al-item:nth-child(3),
html[data-theme="mono-dark"] .nm-pop .al-item:nth-child(3) {
  animation-delay: 0.11s;
}
html[data-theme="paper"] .nm-pop .al-item:nth-child(4),
html[data-theme="mono-light"] .nm-pop .al-item:nth-child(4),
html[data-theme="mono-dark"] .nm-pop .al-item:nth-child(4) {
  animation-delay: 0.145s;
}
html[data-theme="paper"] .nm-pop .al-item:nth-child(5),
html[data-theme="mono-light"] .nm-pop .al-item:nth-child(5),
html[data-theme="mono-dark"] .nm-pop .al-item:nth-child(5) {
  animation-delay: 0.18s;
}
@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
html[data-theme="paper"] .nm-pop .al-foot,
html[data-theme="mono-light"] .nm-pop .al-foot,
html[data-theme="mono-dark"] .nm-pop .al-foot {
  animation: footIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
@keyframes footIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 更自然的开合:只做一次轻微下滑,不缩放、不回弹、不逐条延迟 */
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop,
html body .topnav.menu-open .nm-pop {
  animation: softDrop 0.22s cubic-bezier(0.16, 1, 0.3, 1) both !important;
  transform-origin: 50% 0 !important;
}
@keyframes softDrop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
html[data-theme="paper"] .nm-pop .al-item,
html[data-theme="mono-light"] .nm-pop .al-item,
html[data-theme="mono-dark"] .nm-pop .al-item,
html[data-theme="paper"] .nm-pop .al-foot,
html[data-theme="mono-light"] .nm-pop .al-foot,
html[data-theme="mono-dark"] .nm-pop .al-foot {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}
/* 按钮变形也放慢一点点、去掉弹性 */
.nm-btn .morph i {
  transition:
    top 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.16s linear,
    width 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 展开式动画:clip-path 从顶栏往下揭开,不缩放、不回弹 */
html[data-theme="paper"] .nm-pop,
html[data-theme="mono-light"] .nm-pop,
html[data-theme="mono-dark"] .nm-pop,
html body .topnav.menu-open .nm-pop {
  animation: unfold 0.26s cubic-bezier(0.4, 0, 0.2, 1) both !important;
  transform: none !important;
  transform-origin: 50% 0 !important;
}
@keyframes unfold {
  0% {
    clip-path: inset(0 0 100% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

/* 首页标题:两行,第二行稍小 */
.hero h1 {
  line-height: 1.22 !important;
}
.hero h1 br + *,
.hero h1 {
  letter-spacing: -0.02em;
}

/* 去掉副标题后补齐间距 */
.hero h1 {
  margin-bottom: 22px !important;
}
.hero .row {
  margin-top: 0 !important;
}
.hero {
  padding-top: 34px !important;
}

/* ===== 居中首页 ===== */
.hm {
  min-height: calc(100dvh - 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 0;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.hm-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: -4vh;
}
.hm-h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hm-sub {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.6;
}
.hm-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}
.hm-btn {
  height: 46px;
  min-width: 104px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}
.hm-btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}
.hm-foot {
  margin-top: auto;
  padding: 26px 0 20px;
  font-size: 11.5px;
}
/* 纸感 */
html[data-theme="paper"] .hm-h1 {
  color: #1b3b32;
}
html[data-theme="paper"] .hm-sub {
  color: rgba(27, 59, 50, 0.66);
}
html[data-theme="paper"] .hm-solid {
  background: #1b3b32;
  color: #fbf8ef;
}
html[data-theme="paper"] .hm-line {
  color: #1b3b32;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(27, 59, 50, 0.3);
}
html[data-theme="paper"] .hm-foot {
  color: rgba(27, 59, 50, 0.4);
}
/* 浅色 */
html[data-theme="mono-light"] .hm-h1 {
  color: #0e1116;
}
html[data-theme="mono-light"] .hm-sub {
  color: #6b7280;
}
html[data-theme="mono-light"] .hm-solid {
  background: #0e1116;
  color: #fff;
}
html[data-theme="mono-light"] .hm-line {
  color: #0e1116;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #e3e5e9;
}
html[data-theme="mono-light"] .hm-foot {
  color: #9aa1ac;
}
/* 深色 */
html[data-theme="mono-dark"] .hm-h1 {
  color: #f4f6f8;
}
html[data-theme="mono-dark"] .hm-sub {
  color: #9aa1ac;
}
html[data-theme="mono-dark"] .hm-solid {
  background: #fff;
  color: #0e1116;
}
html[data-theme="mono-dark"] .hm-line {
  color: #e6e8ec;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px #2a3038;
}
html[data-theme="mono-dark"] .hm-foot {
  color: #5b6168;
}

/* 垂直居中修正 */
.hm {
  justify-content: flex-start !important;
  padding-top: 0 !important;
}
.hm-hero {
  flex: 1;
  justify-content: center;
  margin-top: 0 !important;
  padding-top: 8px;
}
.hm-foot {
  flex: none;
  margin-top: 0 !important;
  padding: 22px 0 20px;
}
.hm-h1 {
  font-size: 34px !important;
}

.hm-cta {
  min-width: 168px !important;
  height: 48px !important;
  font-size: 15px !important;
  border-radius: 13px !important;
}

/* 暖黄主题:去掉点阵背景 */
html[data-theme="paper"] body {
  background-image: none !important;
  background-size: auto !important;
}
html[data-theme="paper"] .page-scroll {
  background-image: none !important;
}

.noscript-message {
  padding: 24px;
  font-family: sans-serif;
  color: #d3f5e2;
  background: #060a08;
}

/* 密钥页头：摘要与主操作同一行，留出顶部呼吸空间 */
#root .page-head:has(.key-new) {
  align-items: center !important;
  padding: 14px 0 0 !important;
  margin: 0 0 2px !important;
}
#root .page-head:has(.key-new) > div:first-child {
  display: block !important;
  flex: 1;
  min-width: 0;
}
#root .page-head:has(.key-new) p {
  display: block !important;
  margin: 0 !important;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
#root .page-head:has(.key-new) .actions {
  flex: none;
  margin-left: 12px !important;
}

/* 密钥页主次：按钮方正、卡片名称成为主体、顶部统计降级 */
#root .key-head-row .key-new {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px !important;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  gap: 5px;
}
#root .key-head-count {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text);
}
#root .key-head-note {
  font-size: 8.5px;
  color: var(--muted);
}
#root .key-card-name {
  font-size: 15px;
  font-weight: 700;
}
#root .key-card-key code {
  font-size: 10.5px;
}
#root .key-money {
  font-size: 10px;
}
#root .key-card-foot {
  font-size: 9.5px;
}

/* 用量明细：时间按钮保持宽度，刷新/导出缩成窄图标按钮 */
.logs-page .log-toolbar-actions {
  flex: none;
  max-width: none;
}
.logs-page .log-tool-btn {
  flex: none;
  width: 30px;
}
.logs-page .log-tool-btn.log-date-btn {
  width: 60px;
}

.request-more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 0 2px;
  color: var(--primary);
  font-size: 10.5px;
  text-decoration: none;
}
.request-more-link:hover {
  text-decoration: underline;
}
.request-more-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 指定时间段：自绘日历，不使用系统日期输入 */
.logs-page .log-date-pop {
  width: 244px;
  padding: 10px;
}
.log-date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.log-date-field {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.log-date-field span {
  display: block;
  font-size: 7.5px;
  color: var(--muted);
}
.log-date-field b {
  display: block;
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
  font-weight: 600;
}
.log-date-field.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.cal-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 4px;
}
.cal-head button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.cal-head b {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin: 4px 0 2px;
  text-align: center;
  font-size: 7px;
  color: var(--muted);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.cal-day {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.cal-day.out {
  color: color-mix(in srgb, var(--muted) 45%, transparent);
}
.cal-day.in-range {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.cal-day.sel {
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
}
.cal-day:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.log-date-hint {
  margin-top: 6px;
  text-align: right;
  font-size: 8px;
  color: var(--muted);
}
.log-date-hint.bad {
  color: var(--danger);
}

/* 日历弹层固定尺寸，错误/提示不改变高度 */
.logs-page .log-tool-btn.log-date-btn {
  width: 90px;
}
.log-date-hint {
  height: 14px;
  margin-top: 5px;
  overflow: hidden;
  text-align: right;
  font-size: 8px;
  line-height: 14px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.log-date-err {
  height: 14px;
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 8.5px;
  line-height: 14px;
  color: var(--danger);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.log-date-err.is-empty {
  visibility: hidden;
}
.log-date-actions .is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.log-date-field {
  height: 34px;
  overflow: hidden;
}

.log-date-actions button.apply:disabled {
  opacity: 0.45;
  cursor: default;
}

/* 指定时间段：更明显的时间按钮 + 日历开合过渡 */
.logs-page .log-tool-btn.log-date-btn {
  gap: 4px;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
  font-size: 9px;
  font-weight: 600;
}
.logs-page .log-tool-btn.log-date-btn:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.logs-page .log-tool-btn.log-date-btn.is-open {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.logs-page .log-date-pop {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s linear 0.18s;
}
.logs-page .log-date-pop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s;
}

.cal-head button:disabled {
  opacity: 0.3;
  cursor: default;
}
.cal-day:disabled {
  opacity: 0.28;
  cursor: default;
  background: transparent;
}

/* 调用明细详情 */
.request-entry.is-link {
  cursor: pointer;
  border-radius: 6px;
}
.request-entry.is-link:hover .request-model {
  color: var(--primary);
}
.request-entry.is-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.log-detail {
  padding-top: 8px;
  padding-bottom: 40px;
}
.log-detail-back {
  display: inline-flex;
  align-items: center;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 9.5px;
  text-decoration: none;
}
.log-detail-back:hover {
  color: var(--primary);
}
.log-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.log-detail-status {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 8px;
  letter-spacing: 0.04em;
}
.log-detail-status.is-ok {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}
.log-detail-status.is-bad {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}
.log-detail-head h1 {
  margin: 7px 0 3px;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.log-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}
.log-detail-head strong {
  flex: none;
  text-align: right;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.log-detail-head strong small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 400;
}
.log-detail-error {
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 6%, transparent);
  color: var(--danger);
  font-size: 9.5px;
  line-height: 1.5;
}
.log-detail-block {
  margin-top: 14px;
}
.log-detail-block h2 {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.log-detail-block dl {
  margin: 0;
}
.log-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.log-detail-row dt {
  flex: none;
  color: var(--muted);
  font-size: 9px;
}
.log-detail-row dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  font-size: 9.5px;
  overflow-wrap: anywhere;
}
.log-detail-row.is-wide {
  display: block;
}
.log-detail-row.is-wide dt {
  margin-bottom: 3px;
}
.log-detail-row.is-wide dd {
  text-align: left;
  font-family: var(--mono);
  font-size: 8.5px;
}
.log-detail-row.is-strong dd {
  font-weight: 600;
}
.log-detail-empty {
  margin: 24px 0;
  color: var(--muted);
  font-size: 10px;
}

/* 调用详情：快捷动作与性能摘要 */
.log-key-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.log-toolbar-title b {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0 2px;
}
.log-detail-actions button {
  height: 27px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.log-detail-actions button.pri {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.log-detail-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.log-detail-error span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.log-detail-error button {
  flex: none;
  height: 24px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: 4px;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.log-detail-perf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 12px;
}
.log-detail-perf > div {
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 5px;
}
.log-detail-perf span {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
}
.log-detail-perf b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.log-detail-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.log-detail-nav button {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.log-detail-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.log-detail-nav span {
  margin: 0 auto;
  color: var(--muted);
  font-size: 8.5px;
}

/* 用量明细：指定密钥 */
.log-toolbar-title b {
  max-width: 64px;
}
.log-key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  flex: none;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
}
.log-key-btn.is-active {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary);
}
.log-key-pop {
  position: absolute;
  z-index: 21;
  top: 46px;
  left: 0;
  width: 205px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.985);
  transform-origin: top left;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s linear 0.18s;
}
.log-key-pop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s;
}
.log-key-pop b {
  display: block;
  margin: 0 2px 5px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
}
.log-key-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}
.log-key-option + .log-key-option {
  margin-top: 1px;
}
.log-key-option:hover {
  background: var(--bg-soft);
}
.log-key-option.is-active {
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
  font-weight: 600;
}
.log-key-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-key-option em {
  flex: none;
  color: var(--muted);
  font-style: normal;
  font-size: 8px;
}

/* 指定时间段与指定密钥使用同一套按钮 */
.logs-page .log-tool-btn.log-date-btn,
.logs-page .log-tool-btn.log-key-btn {
  width: 58px;
  height: 30px;
  gap: 0;
  padding: 0 3px;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  color: var(--primary);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}
.logs-page .log-tool-btn.log-date-btn:hover,
.logs-page .log-tool-btn.log-key-btn:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.logs-page .log-tool-btn.log-date-btn.is-open,
.logs-page .log-tool-btn.log-key-btn.is-open {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}
.logs-page .log-tool-btn.log-key-btn.has-filter {
  border-color: var(--primary);
}
.logs-page .log-key-pop {
  left: auto;
  right: 0;
  transform-origin: top right;
}
@media (max-width: 340px) {
  .logs-page .log-toolbar-actions {
    gap: 3px;
  }
  .logs-page .log-tool-btn {
    width: 26px;
  }
  .logs-page .log-tool-btn.log-date-btn,
  .logs-page .log-tool-btn.log-key-btn {
    width: 48px;
    padding: 0 3px;
    font-size: 7.5px;
  }
}

.log-pop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.logs-page .log-tool-btn.log-date-btn,
.logs-page .log-tool-btn.log-key-btn {
  gap: 3px;
  font-size: 7.5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 1px 2px rgba(27, 59, 50, 0.05);
}
.logs-page .log-tool-btn.log-date-btn.has-range svg,
.logs-page .log-tool-btn.log-key-btn.has-filter svg {
  display: none;
}
@media (max-width: 340px) {
  .logs-page .log-tool-btn.log-date-btn svg,
  .logs-page .log-tool-btn.log-key-btn svg {
    display: none;
  }
}

.logs-page .log-tool-btn.log-date-btn,
.logs-page .log-tool-btn.log-key-btn {
  width: 60px;
  gap: 2px;
  padding: 0 2px;
}
@media (max-width: 340px) {
  .logs-page .log-tool-btn.log-date-btn,
  .logs-page .log-tool-btn.log-key-btn {
    width: 49px;
  }
}
@media (max-width: 340px) {
  .logs-page .log-tool-btn.log-key-btn {
    padding: 0 1px;
  }
}

.log-detail-row.is-sub {
  padding-left: 12px;
}
.log-detail-row.is-sub dt {
  font-size: 8.5px;
}
.log-detail-row.is-sub dd {
  color: var(--muted);
}

.log-detail-row.is-sub {
  padding-left: 0;
}
.log-detail-row.is-sub dt {
  padding-left: 12px;
}
.request-token-pop .is-sub {
  padding-left: 8px;
}
.request-token-pop .is-total {
  color: var(--text);
}

/* Token 明细：项目 / Token / 费用 三列对齐 */
.log-cost-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 60px;
  gap: 8px;
  padding: 2px 0 5px;
  color: var(--muted);
  font-size: 7.5px;
}
.log-cost-head span:nth-child(2),
.log-cost-head span:nth-child(3) {
  text-align: right;
}
.log-cost-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 60px;
  gap: 8px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
.log-cost-label {
  min-width: 0;
  font-size: 9px;
}
.log-cost-tokens,
.log-cost-money {
  text-align: right;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.log-cost-money {
  color: var(--muted);
}
.log-cost-row.is-sub .log-cost-label {
  padding-left: 14px;
  color: var(--muted);
  font-size: 8.5px;
}
.log-cost-row.is-sub .log-cost-tokens {
  color: var(--muted);
  font-size: 8.5px;
}
.log-cost-row.is-sub::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.log-cost-row.is-total {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}
.log-cost-row.is-total .log-cost-label,
.log-cost-row.is-total .log-cost-tokens,
.log-cost-row.is-total .log-cost-money {
  color: var(--text);
  font-weight: 600;
}

.menu-btn.detail-back {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
}
.menu-btn.detail-back:hover {
  color: var(--text);
}

/* 过滤按钮文字：避免缩放后底部被行高裁切 */
.logs-page .log-tool-btn .log-tool-label {
  padding: 1px 0;
  line-height: 1.35;
}

/* 筛选按钮选中态：轻量高亮，不做整块反白 */
.logs-page .log-tool-btn.log-date-btn.is-open,
.logs-page .log-tool-btn.log-key-btn.is-open {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.logs-page .log-tool-btn.log-date-btn.has-range,
.logs-page .log-tool-btn.log-key-btn.has-filter {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-color: var(--primary);
  color: var(--primary);
}

.request-open {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  margin: -2px 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.request-open .request-model {
  min-width: 0;
}
.request-open:hover .request-model {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.request-open:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 顶部菜单/返回图标交叉过渡 */
.menu-btn.topbar-nav {
  position: relative;
  overflow: hidden;
}
.menu-btn.topbar-nav .topbar-ico {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.menu-btn.topbar-nav .topbar-menu {
  opacity: 1;
  transform: translateX(0) rotate(0deg);
}
.menu-btn.topbar-nav .topbar-back {
  opacity: 0;
  transform: translateX(-7px) rotate(-35deg);
}
.menu-btn.topbar-nav.is-back {
  display: inline-flex;
}
.menu-btn.topbar-nav.is-back .topbar-menu {
  opacity: 0;
  transform: translateX(7px) rotate(35deg);
}
.menu-btn.topbar-nav.is-back .topbar-back {
  opacity: 1;
  transform: translateX(0) rotate(0deg);
}

/* 进入调用详情：轻量滑入，不做大幅位移 */
.page-enter.is-detail {
  animation: pageDetailIn 0.26s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes pageDetailIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 从调用详情返回列表/概览：从左侧轻滑入 */
.page-enter.is-return {
  animation: pageReturnIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes pageReturnIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== 充值页 V2：金额档位 / 支付方式 / 简化账单 ===== */
.topup-wrap.topup-v2 {
  max-width: 600px;
  gap: 12px;
}
.topup-v2 .card.panel {
  padding: 14px;
}
.topup-section + .topup-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.topup-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}
.topup-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.topup-section-head > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 8.5px;
}
.topup-tiers {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.topup-tier {
  min-height: 70px;
  padding: 9px 3px 8px;
  border-radius: 8px;
  overflow: visible;
}
.topup-tier .a {
  display: block;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.topup-tier .bonus {
  display: block;
  min-height: 12px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}
.topup-tier .bonus.has {
  color: var(--success);
}
.topup-tier .hot-mark {
  top: -6px;
  right: 4px;
  height: 14px;
  padding: 0 5px;
  font-size: 7px;
}
.topup-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 9px;
  color: var(--muted);
}
.topup-custom-label {
  flex: none;
}
.topup-custom-box {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-soft);
  transition:
    border-color 0.18s,
    background 0.18s;
}
.topup-custom-box:focus-within {
  border-color: var(--primary);
  background: var(--bg);
}
.topup-custom-box b {
  color: var(--muted);
  font-size: 11px;
}
.topup-custom-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
}
.topup-custom.is-invalid .topup-custom-box {
  border-color: var(--danger);
}
.topup-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.payment-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}
.payment-option svg {
  flex: none;
}
.payment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}
.payment-radio {
  width: 12px;
  height: 12px;
  flex: none;
  margin-left: auto;
  border: 1.5px solid var(--border);
  border-radius: 50%;
}
.payment-option.sel {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-soft));
  color: var(--primary);
}
.payment-option.sel .payment-name {
  color: var(--primary);
}
.payment-option.sel .payment-radio {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 3px var(--bg-soft);
  background: var(--primary);
}
.payment-note {
  min-height: 14px;
  margin: 6px 1px 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}
.topup-payrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.topup-pay-sum {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}
.topup-pay-sum > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}
.topup-pay-sum b {
  color: var(--success);
  font-size: 15px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.topup-pay-sum > span:first-child b {
  color: var(--text);
  font-size: 13px;
}
.topup-pay-btn {
  min-width: 112px;
  padding: 10px 15px;
  font-size: 12px;
}
.topup-code {
  padding: 12px 14px !important;
}
.topup-code .topup-section-head {
  margin-bottom: 7px;
}
.topup-code-row {
  align-items: center;
  gap: 7px;
}
.topup-code-row .input-wrap {
  height: 38px;
}
.topup-code-row .btn {
  padding: 8px 13px;
}
.topup-bills {
  padding: 13px 14px !important;
}
.topup-bills .topup-section-head {
  margin-bottom: 4px;
}
.topup-bills .bill-note {
  margin: 0 0 4px;
  font-size: 9px;
}
.topup-bills .bill .b-row {
  padding: 8px 0;
}
.topup-more {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.topup-more:hover {
  color: var(--primary);
}
.topup-foot {
  margin-top: 2px;
}
@media (max-width: 360px) {
  .topup-tiers {
    gap: 4px;
  }
  .topup-tier .a {
    font-size: 15px;
  }
  .topup-tier .bonus {
    font-size: 7.5px;
  }
  .payment-option {
    padding: 0 5px;
    font-size: 8px;
    gap: 3px;
  }
  .topup-pay-sum {
    gap: 9px;
  }
}

.topup-balance {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
}
.topup-balance span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}
.topup-balance b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 23px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.topup-balance p {
  max-width: 160px;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
  text-align: right;
}
.topup-balance + .topup-section {
  margin-top: 0;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.topup-tier {
  min-height: 56px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.topup-balance {
  padding-bottom: 13px;
}
.topup-pay-sum > span:only-child b {
  color: var(--success);
  font-size: 16px;
}

/* 问题反馈 V2：表单对齐 / 类型选择 / 附件 */
.ticket-v2 .tk-form-head,
.ticket-v2 .tk-list-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.ticket-v2 .tk-form-head h2,
.ticket-v2 .tk-list-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.ticket-v2 .tk-form-head > span,
.ticket-v2 .tk-list-head > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 8.5px;
}
.ticket-v2 .tk-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}
.ticket-v2 .tk-field > label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}
.ticket-v2 .tk-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.ticket-v2 .tk-type {
  height: 30px;
  min-width: 0;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ticket-v2 .tk-type.is-on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  color: var(--primary);
  font-weight: 600;
}
.ticket-v2 .tk-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.ticket-v2 .tk-meta .tk-field {
  min-width: 0;
}
.ticket-v2 .tk-count {
  align-self: flex-end;
  margin-top: -1px;
  color: var(--muted);
  font-size: 8px;
}
.ticket-v2 .tk-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.ticket-v2 .tk-attach button {
  height: 27px;
  padding: 0 8px;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.ticket-v2 .tk-attach button.is-on {
  border-style: solid;
  border-color: var(--primary);
  color: var(--primary);
}
.ticket-v2 .tk-files {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.ticket-v2 .tk-files > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 2px 3px 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-v2 .tk-files button {
  width: 15px;
  height: 15px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.ticket-v2 .tk-related {
  margin-top: 7px;
}
.ticket-v2 .tk-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.ticket-v2 .tk-submit > span {
  color: var(--muted);
  font-size: 8.5px;
}
.ticket-v2 .tk-submit .btn {
  margin-left: auto;
  flex: none;
}
@media (max-width: 520px) {
  .ticket-v2 .tk-meta {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ticket-v2 .tk-submit > span {
    max-width: 150px;
    line-height: 1.5;
  }
}

.ticket-v2 .input.is-invalid {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 4%, var(--paper2));
}
.ticket-v2 .tk-field-error {
  color: var(--danger);
  font-size: 8px;
  line-height: 1.4;
}
.ticket-v2 .tk-submit-note.is-error {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--danger) !important;
}
.ticket-v2 .tk-submit-note.is-error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  font-size: 8px;
  font-style: normal;
}

/* ===== 用户中心 ===== */
.uc-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 768px;
  padding-bottom: 30px;
}
.uc-hero {
  padding: 14px;
}
.uc-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.uc-person {
  min-width: 0;
  flex: 1;
}
.uc-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.uc-plan {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-size: 7.5px;
  font-weight: 600;
}
.uc-person p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-person p.uc-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
}
.uc-avatar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.uc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.uc-stats > div {
  min-width: 0;
}
.uc-stats span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.uc-stats b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.uc-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
}
.uc-tab {
  position: relative;
  padding: 8px 10px 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.uc-tab.is-on {
  color: var(--text);
  font-weight: 600;
}
.uc-tab.is-on:after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: -1px;
  height: 2px;
  background: var(--orange);
}
.uc-card {
  padding: 14px;
  margin-bottom: 0;
}
.uc-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}
.uc-card-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.uc-card-head > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
}
.uc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.uc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.uc-field > span {
  color: var(--muted);
  font-size: 8.5px;
}
.uc-field-wide {
  margin-top: 9px;
}
.uc-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.uc-save-row > span {
  color: var(--muted);
  font-size: 8px;
}
.uc-save-row .btn {
  margin-left: auto;
}
.uc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.uc-card-head + .uc-row {
  border-top: 0;
  padding-top: 2px;
}
.uc-row b {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}
.uc-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.uc-row-actions {
  margin-top: 10px;
}
.uc-danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}
.uc-danger .uc-card-head {
  color: var(--danger);
}
.uc-danger .uc-card-head h2 {
  color: var(--danger);
  font-size: 11px;
}
.uc-danger p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}
.uc-themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.uc-theme {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.uc-theme.is-on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--bg-soft));
}
.uc-theme-dots {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}
.uc-theme-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(27, 59, 50, 0.12);
}
.uc-theme b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
}
.uc-theme small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 7px;
}
.uc-theme.is-on b {
  color: var(--primary);
}
@media (max-width: 520px) {
  .uc-form {
    grid-template-columns: 1fr;
  }
  .uc-avatar-actions {
    margin-left: 64px;
  }
  .uc-themes {
    grid-template-columns: 1fr;
  }
  .uc-theme {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 6px;
    align-items: center;
  }
  .uc-theme-dots {
    grid-row: span 2;
    margin: 0;
  }
  .uc-theme b {
    grid-column: 2;
  }
  .uc-theme small {
    grid-column: 2;
  }
  .uc-save-row > span {
    max-width: 150px;
    line-height: 1.4;
  }
}

.uc-person p {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.uc-person p.uc-meta {
  font-size: 7px;
}
.uc-field .sel-wrap {
  width: 100%;
}
.uc-field .sel-btn {
  width: 100%;
  justify-content: space-between;
}

@media (max-width: 520px) {
  .uc-avatar-actions {
    flex-basis: 100%;
    margin-left: 64px;
    justify-content: flex-start;
  }
}
.uc-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 360px) {
  .uc-stats {
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
  }
}
.uc-card .dev-main b {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.uc-card .dev-nm {
  white-space: normal;
  line-height: 1.4;
}

/* 弹窗按内容高度，避免纸感主题下大片空白 */
html[data-theme="paper"] .modal {
  height: auto !important;
  min-height: 0 !important;
  max-height: 86vh !important;
}
.uc-field .input.is-invalid {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 4%, var(--paper2));
}
.uc-field-error {
  color: var(--danger);
  font-size: 8px;
  line-height: 1.4;
}

/* 用户中心 V2：概览 + 管理入口 */
.uc-balance-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.uc-balance-row span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.uc-balance-row > div > b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.uc-spend {
  text-align: right;
}
.uc-spend > b {
  font-size: 13px !important;
  color: var(--muted) !important;
  letter-spacing: 0 !important;
}
.uc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}
.uc-metrics > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-soft);
}
.uc-metrics span {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
}
.uc-metrics b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.uc-quick {
  padding: 14px;
}
.uc-quick .uc-card-head {
  margin-bottom: 5px;
}
.uc-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 2px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.uc-quick-row:first-of-type {
  border-top: 0;
}
.uc-quick-row.is-on {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.uc-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--muted);
}
.uc-quick-row.is-on .uc-quick-icon {
  color: var(--primary);
}
.uc-quick-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.uc-quick-main b {
  font-size: 9.5px;
  font-weight: 600;
}
.uc-quick-main i {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 7.5px;
  font-style: normal;
}
.uc-quick-row > em {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.uc-quick-row.is-on > em {
  color: var(--primary);
}
@media (max-width: 360px) {
  .uc-quick-main i {
    max-width: 180px;
  }
}

.uc-metrics {
  gap: 0;
  margin-top: 8px;
}
.uc-metrics > div {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.uc-metrics > div + div {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.uc-metrics span {
  font-size: 8px;
}
.uc-metrics b {
  margin-top: 3px;
  font-size: 15px;
}
@media (max-width: 520px) {
  .uc-avatar-actions {
    flex-basis: auto;
    margin-left: 0;
    justify-content: flex-end;
  }
}

.uc-account-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}
.uc-account-meta span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.uc-account-meta b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
}

.uc-hero .avatar.av-xl {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 18px;
}
.uc-name {
  font-size: 17px;
}
.uc-avatar-link {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.uc-avatar-link:hover {
  color: var(--primary);
}
.uc-account-meta {
  display: none;
}

/* 用户中心：参考图的白卡、大字号、胶囊输入 */
.uc-wrap {
  gap: 14px;
  max-width: 720px;
}
html[data-theme="paper"] .uc-wrap .card,
.uc-wrap .card,
.uc-wrap .uc-card {
  background: #fffdf9 !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 34px -30px rgba(27, 59, 50, 0.45) !important;
}
.uc-hero {
  padding: 18px;
}
.uc-identity {
  gap: 14px;
  flex-wrap: nowrap;
}
.uc-avatar-btn {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.uc-hero .avatar.av-xl {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 9%, #fffdf9);
  color: var(--primary);
  font-size: 22px;
}
.uc-avatar-edit {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 9px;
  font-style: normal;
  border: 2px solid #fffdf9;
}
.uc-name {
  font-size: 21px;
  gap: 8px;
}
.uc-plan {
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9px;
}
.uc-person p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}
.uc-balance-row {
  margin-top: 17px;
  padding-top: 16px;
  align-items: center;
}
.uc-balance-row span {
  font-size: 11px;
}
.uc-balance-row > div > b {
  margin-top: 4px;
  font-size: 34px;
}
.uc-spend {
  display: none;
}
.uc-balance-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.uc-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 6%, #fffdf9);
}
.uc-stats-strip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.uc-stats-strip b {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.uc-tabs {
  gap: 20px;
  padding: 0 4px;
  border-bottom: 0;
  margin-top: 2px;
}
.uc-tab {
  padding: 8px 0 10px;
  font-size: 15px;
  color: var(--muted);
}
.uc-tab.is-on {
  color: var(--text);
  font-weight: 700;
}
.uc-tab.is-on:after {
  left: 0;
  right: 0;
  bottom: 1px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
}
.uc-card {
  padding: 20px;
}
.uc-card-head {
  margin-bottom: 10px;
}
.uc-card-head h2 {
  font-size: 17px;
  font-weight: 700;
}
.uc-card-head > span {
  font-size: 10px;
}
.uc-form {
  grid-template-columns: 1fr;
  gap: 0;
}
.uc-field {
  gap: 7px;
  margin-top: 14px;
}
.uc-field > span {
  font-size: 11px;
  font-weight: 500;
}
.uc-field .input {
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fffdf9;
  border: 1px solid var(--border);
  font-size: 14px;
}
.uc-field .sel-wrap {
  height: 48px;
}
.uc-field .sel-btn {
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fffdf9;
  font-size: 14px;
}
.uc-field-wide {
  margin-top: 14px;
}
.uc-save-row {
  margin-top: 18px;
}
.uc-save-row > span {
  font-size: 10px;
  line-height: 1.5;
}
.uc-save-row .btn {
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
}
.uc-save-row .btn:disabled {
  opacity: 0.32;
}
.uc-row {
  padding: 14px 0;
}
.uc-row b {
  font-size: 12.5px;
}
.uc-row p {
  font-size: 10px;
}
.uc-row .btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
}
.uc-card .dev-row {
  padding: 10px 0;
}
.uc-card .dev-main b {
  font-size: 11.5px;
}
.uc-card .dev-main i {
  font-size: 9px;
}
.uc-danger p {
  font-size: 10px;
}
@media (max-width: 360px) {
  .uc-balance-row > div > b {
    font-size: 29px;
  }
  .uc-stats-strip {
    padding: 10px;
  }
  .uc-stats-strip b {
    font-size: 16px;
  }
  .uc-tab {
    font-size: 14px;
  }
  .uc-tabs {
    gap: 15px;
  }
}

.uc-avatar-edit svg {
  width: 10px;
  height: 10px;
  display: block;
}
.uc-stats-strip {
  background: color-mix(in srgb, var(--success) 7%, #fffdf9);
}
.uc-field .input,
.uc-field .sel-btn {
  border-color: color-mix(in srgb, var(--text) 16%, transparent);
}
.uc-field .input:focus {
  border-color: var(--primary);
  outline: none;
}
.uc-save-row .btn:disabled {
  opacity: 0.45;
}

.uc-avatar-edit {
  width: 22px;
  height: 22px;
  right: -4px;
  bottom: -4px;
}
.uc-avatar-edit svg {
  width: 12px;
  height: 12px;
}

.uc-info-box {
  margin: 2px 0 4px;
  padding: 12px 13px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--success) 7%, #fffdf9);
}
.uc-info-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.uc-info-head span {
  color: var(--muted);
  font-size: 10px;
}
.uc-info-head a {
  color: var(--primary);
  font-size: 9px;
  text-decoration: none;
}
.uc-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
}
.uc-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.uc-info-grid b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.uc-info-grid b.is-mono {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.uc-hero {
  padding: 16px;
}

/* 用户中心：参考图最终排版 */
.uc-hero {
  padding: 18px;
}
.uc-hero .avatar.av-xl {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 10%, #fffdf9);
  color: var(--primary);
  font-size: 25px;
}
.uc-name {
  font-size: 22px;
}
.uc-person p {
  margin-top: 5px;
  font-size: 13px;
}
.uc-person p.uc-meta {
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted);
  font-family: var(--mono);
}
.uc-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #245d47 0%, #3e8464 58%, #58a47c 100%);
  color: #fffdf9;
  box-shadow: 0 12px 26px -22px rgba(27, 59, 50, 0.7);
}
.uc-balance-card span {
  display: block;
  color: rgba(255, 253, 249, 0.76);
  font-size: 11px;
}
.uc-balance-card b {
  display: block;
  margin-top: 4px;
  color: #fffdf9;
  font-size: 34px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.uc-balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  flex: none;
  border-radius: 999px;
  background: #fffdf9;
  color: #1b3b32;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.uc-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 15px 2px 2px;
}
.uc-stat-row > div {
  min-width: 0;
  padding: 0 8px;
  text-align: center;
}
.uc-stat-row > div + div {
  border-left: 1px solid var(--border);
}
.uc-stat-row svg {
  margin: 0 auto 5px;
  color: var(--success);
}
.uc-stat-row span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.uc-stat-row b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.uc-info-rows {
  margin-top: 5px;
}
.uc-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: text;
}
.uc-info-row:last-child {
  border-bottom: 0;
}
.uc-info-row > svg {
  flex: none;
  margin-top: 5px;
  color: var(--muted);
}
.uc-info-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.uc-info-content > span {
  color: var(--muted);
  font-size: 10.5px;
}
.uc-inline-input {
  width: 100%;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
}
.uc-inline-input:focus {
  box-shadow: inset 0 -1px 0 var(--primary);
}
.uc-inline-input.is-invalid {
  color: var(--danger);
}
.uc-save-row {
  margin-top: 16px;
}
.uc-save-row > span {
  font-size: 10px;
}
.uc-save-row .btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 360px) {
  .uc-hero .avatar.av-xl {
    width: 64px;
    height: 64px;
  }
  .uc-balance-card b {
    font-size: 29px;
  }
  .uc-balance-pill {
    height: 38px;
    padding: 0 15px;
    font-size: 12px;
  }
  .uc-stat-row b {
    font-size: 16px;
  }
  .uc-stat-row span {
    font-size: 9px;
  }
}

.uc-save-row .btn:disabled {
  background: var(--text) !important;
  border-color: var(--text) !important;
  color: var(--bg) !important;
  opacity: 0.42;
}

/* 用户中心：沿用项目纸感主题，而不是参考图的绿色渐变 */
.uc-wrap .card,
.uc-wrap .uc-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  box-shadow: var(--shadow) !important;
}
.uc-hero .avatar.av-xl {
  background: var(--surface-2) !important;
  color: var(--text);
}
.uc-avatar-edit {
  background: var(--primary);
  color: var(--btn-text);
  border-color: var(--surface);
}
.uc-balance-card {
  background: var(--text) !important;
  color: var(--bg);
  box-shadow: none;
}
.uc-balance-card span {
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}
.uc-balance-card b {
  color: var(--bg);
}
.uc-balance-pill {
  background: var(--primary) !important;
  color: var(--btn-text) !important;
}
.uc-stat-row svg {
  color: var(--primary);
}
.uc-tab.is-on:after {
  background: var(--primary);
}
.uc-field .input,
.uc-field .sel-btn {
  background: var(--surface);
  border-color: var(--border);
}
.uc-save-row .btn,
.uc-save-row .btn:disabled {
  background: var(--text) !important;
  color: var(--bg) !important;
  border-color: var(--text) !important;
}
.uc-info-row {
  border-color: var(--border);
}

.uc-hero .avatar.av-xl {
  border-radius: 50% !important;
}

/* 用户中心：最简三字段 */
.uc-min {
  max-width: 520px;
  margin: 0 auto;
  padding: 34px 2px 80px;
}
.uc-min-balance span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.uc-min-balance b {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.uc-min-fields {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 46px;
}
.uc-min-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.uc-min-field b {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}
@media (max-width: 520px) {
  .uc-min {
    padding: 28px 2px 60px;
  }
  .uc-min-balance b {
    font-size: 46px;
  }
  .uc-min-fields {
    margin-top: 40px;
  }
}

/* 用户中心：最简用户卡片 */
.uc-simple-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-simple-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}
.uc-simple-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uc-simple-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 3px;
}
.uc-simple-info b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
}
.uc-simple-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.uc-simple-edit {
  flex: none;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.uc-min-balance {
  margin-top: 30px;
}

.uc-simple-card {
  display: block;
}
.uc-simple-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uc-simple-card .uc-min-balance {
  margin-top: 20px;
}
.uc-simple-card .uc-min-balance b {
  font-size: 42px;
}

.uc-min-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.uc-min-metrics span {
  display: block;
  min-height: 29px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.uc-min-metrics b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 360px) {
  .uc-min-metrics {
    gap: 8px;
  }
  .uc-min-metrics span {
    font-size: 9.5px;
  }
  .uc-min-metrics b {
    font-size: 14px;
  }
}

.uc-simple-avatar {
  border-radius: 12px;
}
.uc-min-metrics {
  margin-top: 14px;
}
.uc-min-metrics span {
  min-height: 0;
  line-height: 1.35;
}
.uc-min-metrics b {
  margin-top: 3px;
}

.uc-simple-card .uc-min-balance b,
.uc-min-balance b {
  font-size: 32px;
  letter-spacing: -0.03em;
}
@media (max-width: 360px) {
  .uc-simple-card .uc-min-balance b,
  .uc-min-balance b {
    font-size: 30px;
  }
}

.uc-simple-card .uc-min-balance {
  margin-top: 10px;
}

.uc-balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.uc-balance-line b {
  margin-top: 0 !important;
}
.uc-charge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  flex: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--btn-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.uc-settings-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-settings-head {
  margin-bottom: 4px;
}
.uc-settings-head b {
  font-size: 14px;
  font-weight: 600;
}
.uc-settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.uc-settings-row > span {
  flex: none;
  font-size: 12px;
}
.uc-settings-row > em {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.uc-settings-row > em.mono {
  font-family: var(--mono);
  font-size: 10.5px;
}
.uc-settings-row > i {
  flex: none;
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
}
.uc-settings-row.is-link {
  cursor: pointer;
}
.uc-settings-row.is-link:active {
  opacity: 0.6;
}

/* 用户中心：顶部切换标签 */
.uc-tabs-min {
  display: flex;
  gap: 16px;
  margin: 0 -2px 14px;
  padding: 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.uc-tabs-min::-webkit-scrollbar {
  display: none;
}
.uc-tab-min {
  position: relative;
  flex: none;
  padding: 6px 0 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.uc-tab-min.is-on {
  color: var(--text);
  font-weight: 600;
}
.uc-tab-min.is-on:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.uc-info-card,
.uc-view-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-view-title {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}
.uc-info-line,
.uc-view-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.uc-info-line span,
.uc-view-line span {
  color: var(--muted);
  font-size: 11.5px;
}
.uc-info-line b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
}
.uc-view-line b {
  font-size: 12px;
  font-weight: 500;
}
.uc-view-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.uc-view-row b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}
.uc-view-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.uc-row-action {
  flex: none;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.uc-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.uc-toggle:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, background 0.15s;
}
.uc-toggle.is-on {
  border-color: var(--primary);
  background: var(--primary);
}
.uc-toggle.is-on:after {
  transform: translateX(16px);
  background: var(--btn-text);
}
.uc-device-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
}
.uc-device-dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--border);
}
.uc-device-row b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}
.uc-device-row b em {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 400;
}
.uc-device-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-wide-action {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
@media (max-width: 360px) {
  .uc-tabs-min {
    gap: 13px;
  }
  .uc-tab-min {
    font-size: 11.5px;
  }
}

.uc-tabs-min {
  margin: 16px -2px 8px;
}
.uc-info-card,
.uc-view-card {
  margin-top: 0;
}

/* 用户中心：合并三组 + 重绘图标 */
.uc-merged {
  max-width: 520px;
  margin: 0 auto;
  padding: 26px 2px 60px;
}
.uc-m-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 5px 18px -16px rgba(27, 59, 50, 0.5);
}
.uc-m-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.uc-m-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: none;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
}
.uc-m-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uc-m-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 4px;
}
.uc-m-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}
.uc-m-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11.5px;
}
.uc-m-btn {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.uc-m-balance {
  margin-top: 11px;
  padding: 14px;
}
.uc-m-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.uc-m-balance-top > span {
  color: var(--muted);
  font-size: 12px;
}
.uc-m-charge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--btn-text);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.uc-m-balance > b {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 33px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.uc-m-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}
.uc-m-sub b {
  color: var(--text);
  font-weight: 500;
}
.uc-m-cat {
  margin: 14px 2px 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}
.uc-m-group {
  overflow: hidden;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 5px 18px -16px rgba(27, 59, 50, 0.5);
}
.uc-m-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.uc-m-row + .uc-m-row {
  border-top: 1px solid var(--soft);
}
.uc-m-ico {
  flex: none;
}
.uc-m-row > b {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}
.uc-m-val {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.uc-m-ch {
  flex: none;
  margin-left: 2px;
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
}
.uc-m-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  margin-left: auto;
  border-radius: 999px;
  background: var(--border);
}
.uc-m-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}
.uc-m-toggle.is-on {
  background: var(--text);
}
.uc-m-toggle.is-on::after {
  transform: translateX(16px);
}
.uc-m-danger,
.uc-m-danger .uc-m-ico,
.uc-m-danger .uc-m-ch {
  color: var(--danger);
}
.uc-m-row:active {
  opacity: 0.65;
}
@media (max-width: 360px) {
  .uc-merged {
    padding-top: 20px;
  }
  .uc-m-avatar {
    width: 50px;
    height: 50px;
  }
  .uc-m-name {
    font-size: 18px;
  }
  .uc-m-balance > b {
    font-size: 30px;
  }
  .uc-m-row {
    min-height: 51px;
  }
  .uc-m-row > b {
    font-size: 13.5px;
  }
}

.uc-m-balance {
  padding: 13px 14px;
}
.uc-m-balance-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.uc-m-balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.uc-m-balance-line > b {
  color: var(--text);
  font-size: 33px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.uc-m-charge {
  height: 32px;
  padding: 0 14px;
  border-radius: 9px;
}
.uc-m-sub {
  margin-top: 9px;
}
@media (max-width: 360px) {
  .uc-m-balance-line > b {
    font-size: 30px;
  }
}

.uc-m-user {
  display: block;
}
.uc-m-user-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uc-m-user .uc-m-balance {
  margin-top: 14px;
  padding: 0;
}

/* 用户中心：参考图最终版 */
.uc-ref {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 2px 60px;
}
.uc-ref-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px 15px;
}
.uc-ref-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: none;
  overflow: hidden;
  border-radius: 17px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}
.uc-ref-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uc-ref-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 4px;
}
.uc-ref-info b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}
.uc-ref-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.uc-ref-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.uc-ref-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 5px 18px -16px rgba(27, 59, 50, 0.5);
}
.uc-ref-balance {
  padding: 15px;
}
.uc-ref-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.uc-ref-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.uc-ref-label svg {
  color: var(--muted);
}
.uc-ref-charge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 38px;
  padding: 0 15px;
  border-radius: 11px;
  background: var(--primary);
  color: var(--btn-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.uc-ref-amount {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 37px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.uc-ref-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.uc-ref-stats span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.uc-ref-stats b {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.uc-ref-cat {
  margin: 15px 2px 7px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}
.uc-ref-group {
  overflow: hidden;
}
.uc-ref-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 56px;
  padding: 0 15px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.uc-ref-row + .uc-ref-row {
  border-top: 1px solid var(--soft);
}
.uc-ref-ico {
  flex: none;
}
.uc-ref-row > b {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 500;
}
.uc-ref-val {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.uc-ref-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
  color: color-mix(in srgb, var(--warning) 70%, var(--text));
  font-size: 10px;
  white-space: nowrap;
}
.uc-ref-ch {
  flex: none;
  margin-left: 2px;
  color: var(--muted);
  font-size: 17px;
  font-style: normal;
}
.uc-ref-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  text-decoration: none;
}
.uc-ref-row:active,
.uc-ref-logout:active {
  opacity: 0.65;
}
@media (max-width: 360px) {
  .uc-ref {
    padding-top: 20px;
  }
  .uc-ref-avatar {
    width: 52px;
    height: 52px;
  }
  .uc-ref-info b {
    font-size: 20px;
  }
  .uc-ref-amount {
    font-size: 33px;
  }
  .uc-ref-stats b {
    font-size: 14px;
  }
  .uc-ref-row {
    min-height: 53px;
  }
  .uc-ref-row > b {
    font-size: 14px;
  }
}

.uc-ref-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.uc-ref-label svg {
  display: none;
}
.uc-ref-amount {
  margin-top: 4px;
}
.uc-ref-ch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  flex: none;
  color: var(--muted);
  font-size: 0;
}
.uc-ref-val {
  text-align: right;
  line-height: 1.3;
}
.uc-ref-row {
  padding-right: 12px;
}

.uc-ref-charge {
  border: 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* 用户中心子页 */
.uc-ref-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  margin-left: auto;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.15s;
}
.uc-ref-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}
.uc-ref-switch.is-on {
  background: var(--primary);
}
.uc-ref-switch.is-on::after {
  transform: translateX(16px);
}
.uc-sub {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 2px 60px;
}
.uc-sub-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px -16px rgba(27, 59, 50, 0.5);
}
.uc-sub-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 11px;
}
.uc-sub-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}
.uc-sub-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uc-sub-profile b {
  display: block;
  font-size: 16px;
}
.uc-sub-profile > div span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}
.uc-sub-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}
.uc-sub-desc {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.uc-sub-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.uc-sub-field > span {
  color: var(--muted);
  font-size: 10.5px;
}
.uc-sub-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.uc-sub-input:focus {
  border-color: var(--primary);
}
.uc-sub-input.is-invalid {
  border-color: var(--danger);
}
.uc-sub-error {
  margin: 9px 0 0;
  color: var(--danger);
  font-size: 10px;
}
.uc-sub-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.uc-sub-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.uc-sub-btn {
  height: 40px;
  padding: 0 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.uc-sub-btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--btn-text);
  font-weight: 600;
}
.uc-sub-btn.wide {
  width: 100%;
  margin-top: 14px;
}
.uc-devices {
  margin-top: 10px;
}
.uc-device {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.uc-device:first-child {
  border-top: 0;
}
.uc-device-ic {
  flex: none;
  color: var(--muted);
}
.uc-device-main {
  min-width: 0;
  flex: 1;
}
.uc-device-main b {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}
.uc-device-main b em {
  flex: none;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 400;
}
.uc-device-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-device-out {
  flex: none;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
/* 文档与关于 */
.doc-page,
.about-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 38px 22px 72px;
}
.doc-kicker {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.doc-hero h1,
.about-hero h1 {
  margin: 8px 0 8px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.doc-hero p,
.about-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.doc-card b {
  font-size: 13px;
}
.doc-card span {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.doc-section {
  margin-top: 32px;
}
.doc-section h2 {
  margin: 0 0 9px;
  font-size: 17px;
}
.doc-section p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}
.doc-code {
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 13px 0 0;
  padding: 15px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
}
.doc-faq {
  margin-top: 10px;
}
.doc-faq > div {
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.doc-faq b {
  font-size: 12.5px;
}
.doc-faq p {
  margin-top: 4px;
  font-size: 10.5px;
}
.doc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
}
.doc-foot a {
  color: var(--primary);
  text-decoration: none;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}
.about-grid > div {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.about-grid b {
  display: block;
  font-size: 13px;
}
.about-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.about-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.about-meta span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}
.about-meta b,
.about-meta a {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 11.5px;
  text-decoration: none;
}
.about-foot {
  margin-top: 38px;
  color: var(--muted);
  font-size: 10px;
}
@media (max-width: 640px) {
  .doc-page,
  .about-page {
    padding: 24px 16px 54px;
  }
  .doc-hero h1,
  .about-hero h1 {
    font-size: 29px;
  }
  .doc-grid,
  .about-grid,
  .about-meta {
    grid-template-columns: 1fr;
  }
}

.uc-notify-list {
  margin-top: 10px;
}
.uc-notify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.uc-notify-row:first-child {
  border-top: 0;
}
.uc-notify-row > div {
  min-width: 0;
  flex: 1;
}
.uc-notify-row b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}
.uc-notify-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

/* 用户中心：行与行之间用短分隔线 */
.uc-ref-row {
  position: relative;
}
.uc-ref-row + .uc-ref-row {
  border-top: 0;
}
.uc-ref-row + .uc-ref-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 64px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--border);
}
.uc-notify-row {
  position: relative;
}
.uc-notify-row + .uc-notify-row {
  border-top: 0;
}
.uc-notify-row + .uc-notify-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 64px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--border);
}

.uc-ref-row + .uc-ref-row::before,
.uc-notify-row + .uc-notify-row::before {
  left: 14px;
  right: 14px;
  width: auto;
  transform: none;
}

/* 余额卡方案 2：金额与充值同行 */
.uc-ref-balance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.uc-ref-balance-line .uc-ref-amount {
  margin-top: 0;
  font-size: 36px;
}
.uc-ref-balance-line .uc-ref-charge {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
}
.uc-ref-stats {
  margin-top: 15px;
  padding-top: 0;
  border-top: 0;
}
@media (max-width: 360px) {
  .uc-ref-balance-line .uc-ref-amount {
    font-size: 33px;
  }
}

.uc-ref-stats > div:nth-child(1) {
  text-align: left;
}
.uc-ref-stats > div:nth-child(2) {
  text-align: center;
}
.uc-ref-stats > div:nth-child(3) {
  text-align: right;
}

.uc-ref-stats {
  position: relative;
  padding-top: 14px;
}
.uc-ref-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 1px;
  background: var(--border);
}

.uc-ref-stats {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.uc-ref-stats::before {
  display: none;
}

.uc-ref-stats > div:nth-child(1),
.uc-ref-stats > div:nth-child(2),
.uc-ref-stats > div:nth-child(3) {
  text-align: left;
}

.uc-2fa-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.uc-2fa-status span {
  color: var(--muted);
  font-size: 11px;
}
.uc-2fa-status b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.uc-2fa-status b.is-on {
  color: var(--primary);
}
.uc-2fa-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.uc-2fa-method b {
  font-size: 12px;
  font-weight: 500;
}
.uc-2fa-method span {
  color: var(--muted);
  font-size: 10.5px;
}

.uc-2fa-modal > p:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.uc-2fa-modal .uc-2fa-status {
  margin-top: 12px;
}

.uc-2fa-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper2);
}
.uc-2fa-summary-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.uc-2fa-summary b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.uc-2fa-summary b.is-on {
  color: var(--primary);
}
.uc-2fa-summary div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}
.uc-2fa-hint {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.uc-2fa-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.uc-2fa-desc {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.uc-2fa-desc b {
  color: var(--text);
  font-weight: 500;
}
.uc-2fa-email {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper2);
}
.uc-2fa-email > svg {
  flex: none;
  color: var(--text);
}
.uc-2fa-email span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-2fa-email b {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
}
.uc-2fa-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uc-2fa-field > span {
  color: var(--muted);
  font-size: 10px;
}
.uc-2fa-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  letter-spacing: 0.12em;
}
.uc-2fa-input:focus {
  border-color: var(--primary);
}
.uc-2fa-input.is-invalid {
  border-color: var(--danger);
}
.uc-2fa-error {
  margin: -6px 0 0;
  color: var(--danger);
  font-size: 10px;
}
.uc-2fa-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.uc-2fa-resend span {
  color: var(--muted);
  font-size: 9.5px;
}
.uc-2fa-resend button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.uc-2fa-resend button:disabled {
  color: var(--muted);
  cursor: default;
}

/* 两步验证弹窗：严格按参考排版 */
html[data-theme="paper"] .modal:has(.uc-2fa-step) {
  width: calc(100% - 40px) !important;
  max-width: 400px !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  box-shadow: 0 22px 60px -34px rgba(27, 59, 50, 0.45) !important;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh {
  padding: 20px 20px 4px;
  border-bottom: 0;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mb {
  padding: 8px 20px 16px;
  gap: 16px;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mf {
  padding: 0 20px 20px;
  border-top: 0;
  gap: 16px;
  align-items: center;
}
.uc-2fa-step {
  gap: 16px;
}
.uc-2fa-desc {
  font-size: 12.5px;
  line-height: 1.75;
}
.uc-2fa-email {
  padding: 15px;
}
.uc-2fa-email span {
  font-size: 10px;
}
.uc-2fa-email b {
  margin-top: 4px;
  font-size: 14px;
}
.uc-2fa-field > span {
  font-size: 12px;
}
.uc-2fa-input {
  height: 48px;
  font-size: 15px;
}
.uc-2fa-resend {
  justify-content: flex-end;
}
.uc-2fa-resend button {
  font-size: 10px;
}
.uc-2fa-cancel {
  height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.uc-2fa-submit {
  height: 44px;
  min-width: 118px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* 两步验证弹窗：更紧凑、邮箱块更深 */
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh {
  padding: 18px 18px 2px;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh h3 {
  font-size: 20px;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mb {
  padding: 6px 18px 14px;
  gap: 12px;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mf {
  padding: 0 18px 18px;
  gap: 14px;
}
.uc-2fa-step {
  gap: 12px;
}
.uc-2fa-desc {
  font-size: 12px;
  line-height: 1.65;
}
.uc-2fa-email {
  padding: 13px;
  background: color-mix(in srgb, var(--text) 7%, var(--surface));
}
.uc-2fa-email b {
  font-size: 13px;
}
.uc-2fa-cancel {
  height: 42px;
}
.uc-2fa-submit {
  height: 42px;
  min-width: 112px;
}

.uc-2fa-verify .uc-2fa-desc {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.uc-2fa-verify .uc-2fa-desc b {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.uc-2fa-verify .uc-2fa-field {
  margin-top: 1px;
}
.uc-2fa-verify .uc-2fa-resend {
  justify-content: flex-start;
  gap: 7px;
}
html[data-theme="paper"] .modal:has(.uc-2fa-verify) .mf {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

html[data-theme="paper"] .modal:has(.uc-2fa-verify) .mf {
  border-top: 0;
}
.uc-2fa-verify .uc-2fa-resend {
  justify-content: flex-end;
  gap: 7px;
}
.uc-2fa-verify .uc-2fa-resend span {
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

html[data-theme="paper"] .modal:has(.uc-2fa-verify) .mb {
  padding-top: 20px;
}

.uc-2fa-email {
  display: block;
}
.uc-2fa-email-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.uc-2fa-expand {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.28s cubic-bezier(0.2, 0.8, 0.3, 1),
    opacity 0.2s ease;
  will-change: max-height, opacity;
}
.uc-2fa-expand.is-open {
  max-height: 110px;
  opacity: 1;
}
.uc-2fa-expand-inner {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid
    color-mix(in srgb, var(--text) 12%, transparent);
}
.uc-2fa-expand .uc-2fa-input {
  border-color: var(--border);
  background: var(--surface);
}
.uc-2fa-expand .uc-2fa-error {
  margin: 7px 0 0;
}

html[data-theme="paper"] .uc-2fa-expand .uc-2fa-input:focus,
html[data-theme="paper"] .uc-2fa-expand .uc-2fa-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--text);
}

.uc-2fa-sent {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.uc-2fa-submit {
  position: relative;
  overflow: hidden;
}
.uc-2fa-submit-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  white-space: nowrap;
}
.uc-2fa-submit-text.is-on {
  opacity: 1;
}

.uc-2fa-expand {
  margin-top: -12px;
  transition:
    max-height 0.28s cubic-bezier(0.2, 0.8, 0.3, 1),
    opacity 0.2s ease,
    margin-top 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.uc-2fa-expand.is-open {
  margin-top: 0;
}
.uc-2fa-expand-inner {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* 弹窗：模糊只作用于背景层，避免正文被一并栅格化 */
.modal-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.modal-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop > .modal {
  position: relative;
  z-index: 1;
}
/* 两步验证弹窗：提高正文清晰度 */
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh h3 {
  font-size: 22px;
  font-weight: 700;
}
.uc-2fa-desc {
  font-size: 13px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--muted) 85%, var(--text));
}
.uc-2fa-email span {
  font-size: 10.5px;
}
.uc-2fa-email b {
  font-size: 15px;
  font-weight: 600;
}
.uc-2fa-sent {
  font-size: 10.5px;
  color: color-mix(in srgb, var(--muted) 85%, var(--text));
}
.uc-2fa-input {
  font-size: 15px;
}
.uc-2fa-cancel {
  font-size: 13.5px;
}
.uc-2fa-submit {
  font-size: 13.5px;
}

/* 两步验证：上沿固定，只向下展开 */
html[data-theme="paper"] .modal-backdrop:has(.uc-2fa-step) {
  align-items: flex-start;
  padding-top: max(18px, calc(50dvh - 121px));
  transition: padding-top 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
html[data-theme="paper"] .modal-backdrop:has(.uc-2fa-step.is-open) {
  padding-top: max(18px, calc(50dvh - 175px));
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) {
  max-height: calc(100dvh - 28px);
}
.uc-2fa-input {
  scroll-margin-bottom: 18px;
}
.uc-2fa-submit:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: default;
}
.uc-2fa-resend-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.uc-2fa-resend-hint button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}

/* 两步验证弹窗：柔和奶油/灰绿配色 */
html[data-theme="paper"] .modal:has(.uc-2fa-step) {
  background: #f7f4e8 !important;
  border: 1px solid #e4dfcf !important;
  box-shadow: 0 24px 64px -38px rgba(27, 59, 50, 0.45) !important;
}
html[data-theme="paper"] .modal:has(.uc-2fa-step) .mh h3 {
  color: #164535;
}
.uc-2fa-desc {
  color: #657467;
}
.uc-2fa-email {
  background: #e7e8d9 !important;
}
.uc-2fa-email span {
  color: #6b7b6d;
}
.uc-2fa-email b {
  color: #164535;
}
.uc-2fa-code-label {
  display: block;
  margin: 0 0 7px;
  color: #164535;
  font-size: 12px;
  font-weight: 600;
}
.uc-2fa-input {
  background: #fbf8ef !important;
  border-color: #dcddcd !important;
  color: #164535;
}
.uc-2fa-input::placeholder {
  color: #9aa69a;
}
.uc-2fa-resend-hint {
  color: #6b7b6d;
}
.uc-2fa-cancel {
  color: #164535;
}
.uc-2fa-submit {
  background: #164535;
  color: #f7f4e8;
}
.uc-2fa-submit:disabled {
  background: #e1e4d4 !important;
  color: #7d8a7d !important;
}

/* 两步验证关闭：柔和退场 */
.modal:has(.uc-2fa-step.is-closing) {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.modal-backdrop:has(.uc-2fa-step.is-closing) {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

/* ===== 重要操作提示：白底大卡片 ===== */
#app-notice.notice {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: min(560px, calc(100vw - 24px));
  padding: 18px 18px 18px 16px;
  border: 1px solid #e5dfcf;
  border-radius: 22px;
  background: #fffdf8;
  color: #1b3b32;
  box-shadow:
    0 28px 64px -34px rgba(27, 59, 50, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  z-index: 4100;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  cursor: pointer;
  touch-action: pan-y;
  transform: translateX(calc(100% + 28px));
  opacity: 1;
  transition:
    transform 0.34s cubic-bezier(0.18, 0.8, 0.24, 1),
    opacity 0.3s ease;
}
#app-notice.notice.show {
  transform: translateX(0);
}
#app-notice.notice.leaving {
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  transition-duration: 0.3s, 0.22s;
}
#app-notice.notice.dragging {
  transition: none;
}
#app-notice .notice-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: #e6eee4;
  color: #2f6b4f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}
#app-notice .notice-icon svg {
  width: 24px;
  height: 24px;
}
#app-notice .notice-copy {
  min-width: 0;
  flex: 1;
}
#app-notice .notice-title {
  display: block;
  color: #1b3b32;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
#app-notice .notice-detail {
  margin: 5px 0 0;
  color: #6b7b6d;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.55;
}
#app-notice .notice-close {
  width: 30px;
  height: 30px;
  flex: none;
  margin: 0 -4px 0 0;
  border: 0;
  background: transparent;
  color: #7b8b7d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#app-notice .notice-close svg {
  width: 16px;
  height: 16px;
  display: block;
}
#app-notice .notice-close:active {
  color: #1b3b32;
}
@media (max-width: 600px) {
  #app-notice.notice {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    width: calc(100vw - 24px);
    padding: 16px 14px 16px 14px;
    gap: 12px;
  }
  #app-notice .notice-icon {
    width: 42px;
    height: 42px;
  }
  #app-notice .notice-icon svg {
    width: 22px;
    height: 22px;
  }
  #app-notice .notice-title {
    font-size: 17px;
  }
}

/* 更改密码弹窗 */
html[data-theme="paper"] .modal:has(.uc-pw) {
  width: calc(100% - 40px) !important;
  max-width: 400px !important;
  border: 1px solid #e4dfcf !important;
  border-radius: 20px !important;
  background: #f7f4e8 !important;
  box-shadow: 0 24px 62px -36px rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .modal:has(.uc-pw) .mh {
  padding: 18px 20px 0;
  border-bottom: 0;
}
html[data-theme="paper"] .modal:has(.uc-pw) .mh h3 {
  color: #164535;
  font-size: 22px;
  font-weight: 700;
}
html[data-theme="paper"] .modal:has(.uc-pw) .mb {
  padding: 6px 20px 14px;
}
html[data-theme="paper"] .modal:has(.uc-pw) .mf {
  padding: 0 20px 18px;
  border-top: 0;
  gap: 14px;
}
.uc-pw {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.uc-pw-desc {
  margin: 0 0 1px;
  color: #657467;
  font-size: 12.5px;
  line-height: 1.6;
}
.uc-pw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uc-pw-field > span {
  color: #164535;
  font-size: 12px;
  font-weight: 600;
}
.uc-pw-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #ddd8c8;
  border-radius: 10px;
  background: #fffdf8;
  color: #164535;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.uc-pw-input::placeholder {
  color: #9aa69a;
}
.uc-pw-input:focus,
.uc-pw-input:focus-visible {
  outline: none !important;
  border-color: #164535;
  box-shadow: none !important;
}
.modal:has(.uc-pw) .uc-2fa-submit {
  height: 44px;
  min-width: 118px;
}
.modal:has(.uc-pw) .uc-2fa-cancel {
  height: 44px;
}
.uc-pw-error {
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.5;
}
.modal:has(.uc-pw.is-closing) {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.modal-backdrop:has(.uc-pw.is-closing) {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

/* 键盘打开：保留居中布局，只限制可视高度 */
html.kb-open .modal {
  max-height: calc(var(--dsh-vvh, 100dvh) - 24px) !important;
  overflow-y: auto;
}

/* 后台用户详情弹层同样适配键盘 */
html.kb-open .adm-dt {
  align-items: flex-start !important;
  padding-top: 12px !important;
}
html.kb-open .adm-dt-box {
  max-height: calc(var(--dsh-vvh, 100dvh) - 24px) !important;
}

/* 更改密码：邮箱验证后展开新密码 */
.uc-pw-email {
  padding: 14px;
  border-radius: 12px;
  background: #e7e8d9;
}
.uc-pw-email-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.uc-pw-email-row > svg {
  flex: none;
  color: #164535;
}
.uc-pw-email-row span {
  display: block;
  color: #6b7b6d;
  font-size: 10px;
}
.uc-pw-email-row b {
  display: block;
  margin-top: 3px;
  color: #164535;
  font-size: 14.5px;
  font-weight: 600;
}
.uc-pw-expand {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: -11px;
  transition:
    max-height 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
    opacity 0.2s ease,
    margin-top 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.uc-pw-expand.is-open {
  max-height: 360px;
  opacity: 1;
  margin-top: 0;
}
.uc-pw-expand-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uc-pw-hint {
  margin: -3px 0 1px;
  color: #6b7b6d;
  font-size: 9.5px;
  line-height: 1.5;
}
.uc-pw-hint button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #164535;
  font: inherit;
  font-size: 9.5px;
  text-decoration: underline;
  cursor: pointer;
}

.uc-pw-new {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 2px;
  padding-top: 13px;
  border-top: 1px solid #ddd8c8;
  animation: dshPwNew 0.24s ease both;
}
.uc-pw-new-title {
  color: #164535;
  font-size: 12px;
  font-weight: 600;
}
@keyframes dshPwNew {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 设备管理 */
.uc-dev-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-dev-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
}
.uc-dev-heading b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.uc-dev-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.uc-dev-all {
  flex: none;
  margin-top: 1px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #a34723;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.uc-dev-all:active {
  opacity: 0.65;
}
.uc-dev-safe {
  flex: none;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-dev-list {
  border-top: 0;
}
.uc-dev-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.uc-dev-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.uc-dev-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  color: var(--text);
}
.uc-dev-main {
  min-width: 0;
  flex: 1;
}
.uc-dev-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.uc-dev-title b {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}
.uc-dev-title em {
  padding: 2px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  font-size: 8px;
  font-style: normal;
  line-height: 1.3;
}
.uc-dev-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.uc-dev-exit {
  flex: none;
  padding: 6px 0 6px 8px;
  border: 0;
  background: transparent;
  color: #a34723;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.uc-dev-exit:active {
  opacity: 0.65;
}
.uc-dev-empty {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.uc-dev-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* 设备管理 V2 */
.uc-dev-group {
  margin-top: 2px;
}
.uc-dev-group + .uc-dev-group {
  margin-top: 22px;
}
.uc-dev-group-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 2px 7px;
}
.uc-dev-group-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.uc-dev-group-head span {
  color: var(--muted);
  font-size: 9.5px;
}
.uc-dev-list {
  border-top: 0;
}
.uc-dev-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
}
.uc-dev-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--text);
}
.uc-dev-main {
  min-width: 0;
  flex: 1;
}
.uc-dev-main b {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}
.uc-dev-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.uc-dev-exit {
  flex: none;
  padding: 6px 0 6px 8px;
  border: 0;
  background: transparent;
  color: #a34723;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.uc-dev-exit:active {
  opacity: 0.65;
}
.uc-dev-empty {
  margin: 0;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}
.uc-dev-batch {
  width: 100%;
  height: 42px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: #a34723;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.uc-dev-batch:active {
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.uc-dev-note {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.uc-dev-confirm {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.uc-dev-confirm p {
  margin: 0;
}
.uc-dev-confirm-name {
  margin-bottom: 6px !important;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.uc-dev-danger {
  background: #a34723 !important;
  color: #fffdf8 !important;
}

/* 设备管理：放大版层级 */
.uc-dev-group-head {
  gap: 8px;
  padding: 0 2px 10px;
}
.uc-dev-group-head h2 {
  font-size: 14px;
  font-weight: 600;
}
.uc-dev-group-head span {
  font-size: 10.5px;
}
.uc-dev-group + .uc-dev-group {
  margin-top: 26px;
}
.uc-dev-row {
  min-height: 76px;
  padding: 15px 2px;
  gap: 13px;
}
.uc-dev-icon {
  width: 30px;
  height: 30px;
}
.uc-dev-main b {
  font-size: 16px;
  line-height: 1.35;
}
.uc-dev-main span {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.4;
}
.uc-dev-exit {
  font-size: 12.5px;
  padding: 8px 0 8px 10px;
}
.uc-dev-online {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 6%, var(--surface));
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.3;
}
.uc-dev-batch {
  height: 48px;
  margin-top: 20px;
  border-radius: 12px;
  font-size: 13px;
}
.uc-dev-note {
  margin-top: 10px;
  font-size: 10px;
}
.uc-dev-empty {
  padding: 17px 2px;
  font-size: 11px;
}

/* 设备元信息三列对齐 */
.uc-dev-main > span.uc-dev-meta {
  display: grid;
  grid-template-columns: 48px 10px 36px 10px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}
.uc-dev-meta > span {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-dev-dot {
  text-align: center;
  color: color-mix(in srgb, var(--muted) 65%, transparent);
}
.uc-dev-time {
  text-align: left;
}

/* 设备元信息：自然排布，不强制对齐 */
.uc-dev-main > span.uc-dev-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

/* 设备管理弹窗 */
html[data-theme="paper"] .modal:has(.uc-dev-panel) {
  width: calc(100% - 40px) !important;
  max-width: 410px !important;
  border: 1px solid #e4dfcf !important;
  border-radius: 20px !important;
  background: #f7f4e8 !important;
  box-shadow: 0 24px 62px -36px rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .modal:has(.uc-dev-panel) .mh {
  padding: 18px 18px 0;
  border-bottom: 0;
}
html[data-theme="paper"] .modal:has(.uc-dev-panel) .mh h3 {
  color: #164535;
  font-size: 20px;
}
html[data-theme="paper"] .modal:has(.uc-dev-panel) .mb {
  padding: 10px 18px 12px;
}
html[data-theme="paper"] .modal:has(.uc-dev-panel) .mf {
  padding: 0 18px 18px;
  border-top: 0;
}
.uc-dev-panel {
  min-width: 0;
}
.uc-dev-panel .uc-dev-group:first-child {
  margin-top: 0;
}
.uc-dev-panel .uc-dev-batch {
  margin-top: 16px;
}

.uc-dev-icon {
  width: 30px;
  height: 30px;
  color: var(--text);
}

.uc-dev-main > span.uc-dev-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.uc-dev-meta > .uc-dev-time,
.uc-dev-meta > .uc-dev-city {
  display: block;
  white-space: nowrap;
}

/* 设备登出确认：软纸卡片 */
html[data-theme="paper"] .modal:has(.uc-dev-confirm-card) {
  width: calc(100% - 40px) !important;
  max-width: 400px !important;
  border: 1px solid #e4dfcf !important;
  border-radius: 20px !important;
  background: #f7f4e8 !important;
  box-shadow: 0 24px 62px -36px rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .modal:has(.uc-dev-confirm-card) .mh {
  padding: 19px 18px 0;
  border-bottom: 0;
}
html[data-theme="paper"] .modal:has(.uc-dev-confirm-card) .mh h3 {
  color: #164535;
  font-size: 20px;
}
html[data-theme="paper"] .modal:has(.uc-dev-confirm-card) .mb {
  padding: 12px 18px 14px;
}
html[data-theme="paper"] .modal:has(.uc-dev-confirm-card) .mf {
  padding: 0 18px 18px;
  border-top: 0;
  gap: 14px;
}
.uc-dev-confirm-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.uc-dev-confirm-device {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #e7e8d9;
}
.uc-dev-confirm-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  color: #164535;
}
.uc-dev-confirm-device b {
  display: block;
  color: #164535;
  font-size: 14px;
  font-weight: 600;
}
.uc-dev-confirm-device > div > span {
  display: block;
  margin-top: 3px;
  color: #6b7b6d;
  font-size: 10px;
  white-space: nowrap;
}
.uc-dev-confirm-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 15px 14px;
  border-radius: 12px;
  background: #e7e8d9;
}
.uc-dev-confirm-count b {
  color: #164535;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.uc-dev-confirm-count span {
  color: #6b7b6d;
  font-size: 11px;
}
.uc-dev-confirm-hint {
  margin: 0 2px;
  color: #6b7b6d;
  font-size: 11px;
  line-height: 1.55;
}

/* 通知设置 V2 */
.uc-notify-mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e7e8d9;
}
.uc-notify-mail span {
  flex: none;
  color: #6b7b6d;
  font-size: 9.5px;
}
.uc-notify-mail b {
  min-width: 0;
  overflow: hidden;
  color: #164535;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-notify-group {
  min-width: 0;
}
.uc-notify-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 9px;
}
.uc-notify-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.uc-notify-heading span {
  color: var(--muted);
  font-size: 10px;
}
.uc-notify-list {
  margin: 0;
}
.uc-notify-row {
  padding: 15px 2px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.uc-notify-row:first-child {
  border-top: 0;
}
.uc-notify-row:last-child {
  border-bottom: 0;
}
.uc-notify-row b {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.uc-notify-row span {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
}
.uc-notify-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.uc-notify-note.is-warn {
  color: #a34723;
}

/* 通知行只保留一条 border-bottom，移除旧的伪元素分隔线 */
.uc-notify-row + .uc-notify-row::before {
  content: none;
  display: none;
}

/* 兑换码弹窗 */
html[data-theme="paper"] .modal:has(.uc-redeem) {
  width: calc(100% - 40px) !important;
  max-width: 400px !important;
  border: 1px solid #e4dfcf !important;
  border-radius: 20px !important;
  background: #f7f4e8 !important;
  box-shadow: 0 24px 62px -36px rgba(27, 59, 50, 0.5) !important;
}
html[data-theme="paper"] .modal:has(.uc-redeem) .mh {
  padding: 18px 18px 0;
  border-bottom: 0;
}
html[data-theme="paper"] .modal:has(.uc-redeem) .mh h3 {
  color: #164535;
  font-size: 20px;
  font-weight: 700;
}
html[data-theme="paper"] .modal:has(.uc-redeem) .mb {
  padding: 12px 18px 12px;
}
html[data-theme="paper"] .modal:has(.uc-redeem) .mf {
  padding: 0 18px 18px;
  border-top: 0;
  gap: 14px;
}
.uc-redeem {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uc-redeem-desc {
  margin: -3px 0 2px;
  color: #6b7b6d;
  font-size: 10.5px;
  line-height: 1.5;
}
.uc-redeem-desc {
  margin: 0;
  color: #657467;
  font-size: 12px;
  line-height: 1.65;
}
.uc-redeem-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.uc-redeem-field > span {
  color: #164535;
  font-size: 12px;
  font-weight: 600;
}
.uc-redeem-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #ddd8c8;
  border-radius: 10px;
  background: #fffdf8;
  color: #164535;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.02em;
  outline: none;
}
.uc-redeem-input::placeholder {
  color: #8a978d;
}
.uc-redeem-input.is-invalid {
  border-color: var(--danger);
}
.uc-redeem-input:focus,
.uc-redeem-input:focus-visible {
  outline: none !important;
  border-color: #164535;
  box-shadow: none !important;
}
.uc-redeem-error {
  min-height: 16px;
  margin: -2px 0 0;
  color: var(--danger);
  font-size: 10.5px;
  line-height: 1.5;
}
.uc-redeem-note {
  margin: 1px 0 0;
  color: #6b7b6d;
  font-size: 11px;
  line-height: 1.55;
}
.modal:has(.uc-redeem) .uc-2fa-submit,
.modal:has(.uc-redeem) .uc-2fa-cancel {
  height: 40px;
}
.modal:has(.uc-redeem) .uc-2fa-submit {
  min-width: 86px;
  padding: 0 18px;
}
.modal:has(.uc-redeem.is-closing) {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.modal-backdrop:has(.uc-redeem.is-closing) {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}




/* 所有弹窗：键盘出现时统一平滑上移，不改布局 */
.modal {
  transform: translateY(var(--dsh-kb-shift, 0px));
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* 额度管理 */
.uc-quota-summary {
  padding: 18px;
  border-radius: 16px;
  background: #e7e8d9;
}
.uc-quota-summary > span {
  display: block;
  color: #6b7b6d;
  font-size: 10.5px;
}
.uc-quota-summary > b {
  display: block;
  margin-top: 6px;
  color: #164535;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.uc-quota-summary > p {
  margin: 7px 0 0;
  color: #6b7b6d;
  font-size: 10px;
}
.uc-quota-group {
  margin-top: 24px;
}
.uc-quota-head {
  padding: 0 2px 9px;
}
.uc-quota-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.uc-quota-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 2px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.uc-quota-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--muted);
}
.uc-quota-row > b {
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.uc-quota-val {
  flex: none;
  color: var(--muted);
  font-size: 10.5px;
}
.uc-quota-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* 额度管理卡片 */
.uc-quota-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-quota-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.uc-quota-card-head b {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.uc-quota-card-head span {
  color: var(--muted);
  font-size: 9.5px;
}
.uc-quota-total {
  margin-top: 12px;
  color: var(--text);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.uc-quota-total small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}
.uc-quota-bar {
  height: 6px;
  margin-top: 13px;
  border-radius: 999px;
  background: #e7e8d9;
  overflow: hidden;
}
.uc-quota-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
}
.uc-quota-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-quota-expiry {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9.5px;
}

/* 额度管理：参考图排版 */
.uc-quota-group {
  margin-top: 0;
}
.uc-quota-head {
  padding: 0 2px 12px;
}
.uc-quota-head h2 {
  font-size: 15px;
}
.uc-quota-card {
  padding: 18px;
  border-radius: 18px;
}
.uc-quota-card-head b {
  font-size: 18px;
}
.uc-quota-card-head span {
  font-size: 10.5px;
}
.uc-quota-label {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 10.5px;
}
.uc-quota-total {
  margin-top: 4px;
  font-size: 28px;
}
.uc-quota-total small {
  font-size: 10.5px;
}
.uc-quota-foot {
  margin-top: 14px;
  font-size: 10px;
}
.uc-quota-bar {
  height: 5px;
  margin-top: 10px;
}

/* 额度卡片：放大字号与留白，贴近参考图 */
.uc-quota-head {
  padding-bottom: 14px;
}
.uc-quota-head h2 {
  font-size: 16px;
}
.uc-quota-card {
  padding: 22px;
  border-radius: 20px;
  box-shadow: 0 18px 40px -32px rgba(27, 59, 50, 0.35);
}
.uc-quota-card-head b {
  font-size: 20px;
}
.uc-quota-card-head span {
  font-size: 11.5px;
}
.uc-quota-label {
  margin-top: 20px;
  font-size: 12px;
}
.uc-quota-total {
  margin-top: 6px;
  font-size: 34px;
}
.uc-quota-total small {
  font-size: 12px;
}
.uc-quota-foot {
  margin-top: 18px;
  font-size: 11.5px;
}
.uc-quota-bar {
  height: 7px;
  margin-top: 12px;
}

.uc-quota-head {
  padding-bottom: 16px;
}
.uc-quota-head h2 {
  font-size: 17px;
}
.uc-quota-card {
  padding: 24px;
  border-radius: 22px;
  box-shadow: 0 24px 52px -34px rgba(27, 59, 50, 0.42);
}
.uc-quota-card-head b {
  font-size: 22px;
}
.uc-quota-card-head span {
  font-size: 12px;
}
.uc-quota-label {
  margin-top: 22px;
  font-size: 13px;
}
.uc-quota-total {
  margin-top: 6px;
  font-size: 38px;
  letter-spacing: -0.02em;
}
.uc-quota-total small {
  font-size: 13px;
}
.uc-quota-foot {
  margin-top: 20px;
  font-size: 12px;
}
.uc-quota-bar {
  height: 8px;
  margin-top: 13px;
}

/* 额度卡片：压缩上下留白 */
.uc-quota-head {
  padding-bottom: 10px;
}
.uc-quota-head h2 {
  font-size: 15px;
}
.uc-quota-card {
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 14px 34px -30px rgba(27, 59, 50, 0.32);
}
.uc-quota-card-head b {
  font-size: 19px;
}
.uc-quota-card-head span {
  font-size: 10.5px;
}
.uc-quota-label {
  margin-top: 13px;
  font-size: 11px;
}
.uc-quota-total {
  margin-top: 3px;
  font-size: 32px;
  letter-spacing: -0.015em;
}
.uc-quota-total small {
  font-size: 11px;
}
.uc-quota-foot {
  margin-top: 13px;
  font-size: 10.5px;
}
.uc-quota-bar {
  height: 6px;
  margin-top: 9px;
}

/* 额度卡片：进一步收紧文字与进度条 */
.uc-quota-card-head {
  line-height: 1.2;
}
.uc-quota-label {
  margin-top: 8px;
  line-height: 1.3;
}
.uc-quota-total {
  margin-top: 0;
  line-height: 1.1;
}
.uc-quota-foot {
  margin-top: 9px;
  line-height: 1.25;
}
.uc-quota-bar {
  margin-top: 5px;
}

/* 额度卡片：按参考图比例恢复间距节奏 */
.uc-quota-card {
  padding: 20px 20px 18px;
}
.uc-quota-label {
  margin-top: 20px;
  line-height: 1.3;
}
.uc-quota-total {
  margin-top: 9px;
  line-height: 1.1;
}
.uc-quota-foot {
  margin-top: 17px;
  line-height: 1.25;
}
.uc-quota-bar {
  height: 6px;
  margin-top: 11px;
}

/* 额度卡片：使用实际可用的中文无衬线字体，数字等宽 */
.uc-quota-head,
.uc-quota-card {
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.uc-quota-card {
  font-variant-numeric: tabular-nums;
}
.uc-quota-total,
.uc-quota-foot {
  font-variant-numeric: tabular-nums;
}

.uc-quota-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 额度卡片：整体缩小一档 */
.uc-quota-card {
  padding: 18px 18px 16px;
}
.uc-quota-card-head b {
  font-size: 18px;
}
.uc-quota-card-head span {
  font-size: 10px;
}
.uc-quota-label {
  margin-top: 16px;
  font-size: 10.5px;
}
.uc-quota-total {
  margin-top: 8px;
  font-size: 30px;
}
.uc-quota-total small {
  font-size: 10.5px;
}
.uc-quota-foot {
  margin-top: 14px;
  font-size: 10px;
}
.uc-quota-bar {
  height: 5px;
  margin-top: 9px;
}
.uc-quota-list {
  gap: 10px;
}


/* 额度卡片：标签与数字贴紧，整体略矮 */
.uc-quota-label {
  margin-top: 14px;
  line-height: 1.2;
}
.uc-quota-total {
  margin-top: 2px;
}
.uc-quota-foot {
  margin-top: 12px;
}

/* 额度卡片：再整体缩小一档 */
.uc-quota-head h2 {
  font-size: 14.5px;
}
.uc-quota-card {
  padding: 16px;
  border-radius: 17px;
}
.uc-quota-card-head b {
  font-size: 17px;
}
.uc-quota-card-head span {
  font-size: 9.5px;
}
.uc-quota-label {
  margin-top: 12px;
  font-size: 10px;
}
.uc-quota-total {
  margin-top: 1px;
  font-size: 28px;
}
.uc-quota-total small {
  font-size: 10px;
}
.uc-quota-foot {
  margin-top: 10px;
  font-size: 9.5px;
}
.uc-quota-bar {
  height: 5px;
  margin-top: 8px;
}
.uc-quota-list {
  gap: 9px;
}


/* 额度管理空状态 */
.uc-quota-empty {
  min-height: calc(100dvh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 34px 86px;
  text-align: center;
}
.uc-quota-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #e7e8d9;
  color: var(--text);
}
.uc-quota-empty h3 {
  margin: 15px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.uc-quota-empty p {
  max-width: 232px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}
.uc-quota-empty-btn {
  height: 38px;
  margin-top: 18px;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.uc-quota-help section + section {
  margin-top: 17px;
}
.uc-quota-help b {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.uc-quota-help p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

/* 如何获取额度：三种方式 */
.uc-quota-help {
  display: flex;
  flex-direction: column;
}
.uc-quota-method {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.uc-quota-method:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.uc-quota-method-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: #e7e8d9;
  color: var(--text);
}
.uc-quota-method-copy {
  min-width: 0;
  flex: 1;
}
.uc-quota-method-copy b {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.uc-quota-method-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}
.uc-quota-method-btn {
  height: 30px;
  flex: none;
  padding: 0 10px;
  border: 1px solid var(--text);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}

/* 活动中心 */
.uc-activity-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.uc-activity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
.uc-activity-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7e8d9;
  color: var(--text);
  font-size: 9px;
}
.uc-activity-card h2 {
  margin: 16px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.uc-activity-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.uc-activity-btn {
  height: 36px;
  margin-top: 16px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}


/* 获取额度：整行入口 */
.uc-quota-help {
  margin: -3px 0 0;
}
.uc-quota-method {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 74px;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.uc-quota-method:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}
.uc-quota-method-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
}
.uc-quota-method-copy b {
  font-size: 15px;
}
.uc-quota-method-copy p {
  margin-top: 3px;
  font-size: 10.5px;
}
.uc-quota-method-ch {
  margin-left: auto;
  flex: none;
  color: var(--muted);
}

.uc-quota-help {
  margin: 0;
}

/* 用户中心通用弹窗外壳：两步验证 / 获取额度共用 */
html[data-theme="paper"] .modal.modal-uc {
  width: calc(100% - 40px) !important;
  max-width: 400px !important;
  background: #f7f4e8 !important;
  border: 1px solid #e4dfcf !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px -38px rgba(27, 59, 50, 0.45) !important;
}
html[data-theme="paper"] .modal.modal-uc .mh {
  padding: 18px 18px 2px;
  border-bottom: 0;
}
html[data-theme="paper"] .modal.modal-uc .mh h3 {
  color: #164535;
  font-size: 22px;
  font-weight: 700;
}
html[data-theme="paper"] .modal.modal-uc .mb {
  padding: 6px 18px 14px;
  gap: 12px;
}
html[data-theme="paper"] .modal.modal-uc .mf {
  padding: 0 18px 18px;
  border-top: 0;
  gap: 14px;
  align-items: center;
}


.uc-quota-method-ic {
  background: #e3e9dd;
}

/* 活动 / 充值占位页 */
.uc-page-empty {
  min-height: calc(100dvh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 34px 86px;
  text-align: center;
}
.uc-page-empty h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.uc-page-empty p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

/* 充值中心 */
.uc-recharge {
  padding-bottom: 28px;
}
.uc-recharge-tabs {
  display: flex;
  padding: 3px;
  border-radius: 11px;
  background: #e7e8d9;
}
.uc-recharge-tab {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.uc-recharge-tab.is-on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 59, 50, 0.08);
}
.uc-recharge-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #e2d9c4;
  border-radius: 11px;
  background: #f4ecdc;
  color: #7d673b;
}
.uc-recharge-banner b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}
.uc-recharge-banner p {
  margin: 3px 0 0;
  font-size: 9.5px;
  line-height: 1.5;
  color: #8b7650;
}
.uc-recharge-section {
  margin-top: 20px;
}
.uc-recharge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 10px;
}
.uc-recharge-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.uc-recharge-head span {
  color: var(--muted);
  font-size: 9.5px;
}
.uc-amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.uc-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 64px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.uc-amount.is-on,
.uc-quota-pack.is-on {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text) inset;
}
.uc-amount b {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}
.uc-amount span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.uc-pay-row,
.uc-recharge-submit,
.uc-recharge-note {
  margin-top: 14px;
}
.uc-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px;
  border-radius: 11px;
  background: #e7e8d9;
}
.uc-pay-row > span {
  color: var(--muted);
  font-size: 10px;
}
.uc-pay-row b {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
}
.uc-recharge-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.uc-recharge-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}
.uc-quota-packs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.uc-quota-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.uc-quota-pack b {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.uc-quota-pack small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}
.uc-quota-pack span {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}


.uc-recharge-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.uc-recharge-bill {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.uc-bill-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 6px 14px;
  text-align: center;
  color: var(--muted);
}
.uc-bill-empty b {
  margin-top: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.uc-bill-empty p {
  margin: 5px 0 0;
  font-size: 9.5px;
  line-height: 1.5;
}

/* 充值中心：参考图排版 */
.uc-recharge {
  padding-bottom: 30px;
}
.uc-recharge-switch {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 2px 2px 13px;
  border-bottom: 1px solid var(--border);
}
.uc-recharge-switch-tab {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}
.uc-recharge-switch-tab.is-on {
  color: var(--text);
  font-weight: 700;
}
.uc-recharge-bill {
  height: 27px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.uc-wallet-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.uc-wallet-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.uc-wallet-card > b {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.uc-wallet-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.uc-recharge-closed {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 2px 0;
  color: #8b7650;
  font-size: 9.5px;
}
.uc-recharge-section {
  margin-top: 20px;
}
.uc-recharge-head {
  padding: 0 2px 10px;
}
.uc-recharge-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.uc-amount {
  height: 78px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}
.uc-amount.is-on {
  border-color: var(--text);
  background: #e8efdf;
  box-shadow: 0 0 0 1px var(--text) inset;
}
.uc-amount b {
  font-size: 22px;
}
.uc-amount span {
  margin-top: 5px;
  font-size: 10px;
}
.uc-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 15px 2px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.uc-pay-row > span {
  font-size: 11px;
}
.uc-pay-row b {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.uc-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 2px 0;
}
.uc-order-label {
  color: var(--muted);
  font-size: 11px;
}
.uc-order-label b {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}
.uc-order p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}
.uc-order-btn {
  flex: none;
  width: 108px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.uc-recharge-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: left;
}


.uc-wallet-card.is-quota > b {
  font-size: 30px;
}


/* 充值页：自己的卡片与底部操作样式 */
.uc-wallet-card {
  background: #f7f4e8;
}
.uc-pay-row {
  margin-top: 16px;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: #e7e8d9;
}
.uc-order-btn {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* 充值页：重新设计的独立样式 */
.rc-page {
  padding-bottom: 32px;
}
.rc-switch {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: #e7e8d9;
}
.rc-switch-tab {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.rc-switch-tab.is-on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(27, 59, 50, 0.09);
}
.rc-balance {
  margin-top: 12px;
  padding: 18px;
  border-radius: 18px;
  background: radial-gradient(circle at 82% 0%, #28624d, #164535 62%);
  box-shadow: 0 20px 45px -30px rgba(22, 69, 53, 0.85);
  color: #fbf8ef;
}
.rc-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rc-balance-top > span {
  color: rgba(251, 248, 239, 0.68);
  font-size: 10.5px;
}
.rc-bill {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(251, 248, 239, 0.28);
  border-radius: 7px;
  background: transparent;
  color: rgba(251, 248, 239, 0.85);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.rc-balance > b {
  display: block;
  margin-top: 8px;
  color: #fbf8ef;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.rc-balance.is-quota > b {
  font-size: 30px;
}
.rc-balance > p {
  margin: 7px 0 0;
  color: rgba(251, 248, 239, 0.58);
  font-size: 9.5px;
}
.rc-closed {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 2px 0;
  color: #8b7650;
  font-size: 9.5px;
}
.rc-section-title {
  margin: 20px 2px 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.rc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.rc-pack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 78px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.rc-pack.is-on {
  border-color: var(--text);
  background: #e8efdf;
  box-shadow: 0 0 0 1px var(--text) inset;
}
.rc-pack b {
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
}
.rc-pack span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.rc-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 13px;
  border-radius: 10px;
  background: #e7e8d9;
}
.rc-pay > span {
  color: var(--muted);
  font-size: 10px;
}
.rc-pay b {
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
}
.rc-submit {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.rc-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

/* 充值页：暖纸色 + 橙色强调，减少绿色面积 */
.rc-balance {
  background: linear-gradient(135deg, #f4e8d6, #ecdcc5);
  border: 1px solid #e5d4bb;
  box-shadow: 0 18px 40px -32px rgba(139, 96, 48, 0.45);
  color: var(--text);
}
.rc-balance-top > span {
  color: #7a664d;
}
.rc-bill {
  border-color: rgba(232, 98, 44, 0.38);
  color: #b44f26;
}
.rc-balance > b {
  color: #1b3b32;
}
.rc-balance > p {
  color: #806c53;
}
.rc-pack.is-on {
  border-color: var(--primary);
  background: #f8e6d8;
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.rc-pay {
  background: #f1eee3;
}
.rc-submit {
  background: var(--primary);
  color: #fffdf8;
}
.rc-switch {
  background: #f1eee3;
}

/* 充值页：更克制的纸感样式 */
.rc-switch {
  gap: 20px;
  padding: 0 2px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.rc-switch-tab {
  flex: none;
  height: 38px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  color: var(--muted);
}
.rc-switch-tab.is-on {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 -2px 0 #c98a5a;
}
.rc-balance {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: none;
  color: var(--text);
}
.rc-balance-top > span {
  color: var(--muted);
}
.rc-bill {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}
.rc-balance > b {
  color: var(--text);
}
.rc-balance > p {
  color: var(--muted);
}
.rc-pack {
  border-radius: 10px;
  background: var(--surface);
}
.rc-pack.is-on {
  border-color: var(--text);
  background: #f7f3e9;
  box-shadow: none;
}
.rc-pay {
  margin-top: 16px;
  padding: 13px 2px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.rc-submit {
  background: #2e2a23;
  color: #fffdf8;
  border-radius: 9px;
}

/* 充值中心：双 Tab 参考排版 */
.r2-page {
  padding-bottom: 30px;
}
.r2-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.r2-tab {
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.r2-tab.is-on {
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--text);
}
.r2-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 0 2px;
}
.r2-status > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #8b7650;
  font-size: 9.5px;
}
.r2-bill {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.r2-balance-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 2px 0;
}
.r2-balance-row span {
  color: var(--muted);
  font-size: 11px;
}
.r2-balance-row b {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.r2-model {
  margin-top: 18px;
}
.r2-select {
  position: relative;
  margin-top: 8px;
}
.r2-select select {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  appearance: none;
  outline: none;
}
.r2-select svg {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.r2-label {
  display: block;
  margin: 21px 2px 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.r2-model .r2-label {
  margin: 0 0 8px;
}
.r2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.r2-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
}
.r2-pack.is-on {
  border-color: var(--text);
  background: #f7f3e9;
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r2-pack b {
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
}
.r2-pack span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
}
.r2-pay-list {
  border-top: 1px solid var(--border);
}
.r2-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 47px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.r2-radio {
  width: 18px;
  height: 18px;
  border: 1px solid #aeb9ab;
  border-radius: 50%;
}
.r2-radio.is-on {
  border: 5px solid var(--text);
}
.r2-submit {
  width: 100%;
  height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 10px;
  background: #2e2a23;
  color: #fffdf8;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}


/* 充值页：账单移动到金额标题右侧，卡片再收小 */
.r2-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 2px 10px;
}
.r2-section-head .r2-label {
  margin: 0;
}
.r2-bill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.r2-grid {
  gap: 8px;
}
.r2-pack {
  min-height: 64px;
  padding: 8px;
  border-radius: 9px;
}
.r2-pack b {
  font-size: 19px;
}
.r2-pack span {
  margin-top: 3px;
  font-size: 9px;
}


/* 充值金额 6 档与自定义 */
.r2-model-note {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}
.r2-pack b small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}
.r2-pack b {
  font-size: 20px;
}
.r2-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 0 13px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.r2-custom span {
  color: var(--muted);
  font-size: 13px;
}
.r2-custom input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.r2-submit:disabled {
  opacity: 0.42;
  cursor: default;
}


/* Tokens 与数量同字号；自定义金额内嵌卡片 */
.r2-pack b em {
  font-style: normal;
  font-size: inherit;
  font-weight: 500;
}
.r2-custom-card {
  position: relative;
  cursor: text;
  overflow: hidden;
}
.r2-custom-card > .r2-custom-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font-size: 13px;
  transition:
    top 0.16s ease,
    left 0.16s ease,
    transform 0.16s ease,
    font-size 0.16s ease;
  pointer-events: none;
  white-space: nowrap;
}
.r2-custom-card input {
  width: 100%;
  height: 100%;
  padding: 0 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  text-align: center;
  opacity: 0;
  appearance: textfield;
}
.r2-custom-card input::-webkit-inner-spin-button,
.r2-custom-card input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.r2-custom-card:focus-within > .r2-custom-label,
.r2-custom-card.has-value > .r2-custom-label {
  top: 7px;
  left: 10px;
  transform: none;
  font-size: 9px;
}
.r2-custom-card:focus-within input,
.r2-custom-card.has-value input {
  opacity: 1;
}

/* 充值页：统一使用站点主题变量 */
.r2-tab.is-on {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--primary);
}
.r2-pack.is-on {
  border-color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r2-submit {
  background: var(--text);
  color: var(--surface);
}
.r2-bill {
  border-color: var(--border);
  background: var(--surface);
  color: var(--muted);
}
.r2-bill svg {
  color: inherit;
}
.r2-model-note,
.r2-custom-card > .r2-custom-label,
.r2-pack span {
  color: var(--muted);
}
.r2-custom-card input {
  color: var(--text);
}
.r2-radio {
  border-color: var(--border);
}
.r2-radio.is-on {
  border-color: var(--text);
}


/* 充值页：三列档位 + 底部下一步 + 确认订单 */
.r2-page {
  padding-bottom: 98px;
}
.r2-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.r2-pack {
  min-height: 64px;
  padding: 8px 5px;
}
.r2-pack b {
  font-size: 19px;
}
.r2-pack span {
  font-size: 8.5px;
}
.r2-custom-card > .r2-custom-label {
  font-size: 11px;
}
.r3-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px -14px 0;
  padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.r3-total {
  min-width: 0;
}
.r3-total span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.r3-total b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}
.r3-next {
  width: 118px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.r3-next:disabled {
  opacity: 0.42;
  cursor: default;
}
.r3-confirm {
  padding-top: 2px;
}
.r3-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
}
.r3-row span {
  color: var(--muted);
  font-size: 10.5px;
}
.r3-row b {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  text-align: right;
}
.r3-row.is-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.r3-row.is-total b {
  font-size: 18px;
  font-weight: 600;
}
.r3-pay-title {
  margin: 12px 0 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.r3-modal-cancel {
  height: 40px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.r3-modal-submit {
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}


.r3-actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 6;
  width: 100%;
  max-width: 520px;
  margin: 0;
  transform: translateX(-50%);
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}


/* 充值页：支付方式与确认操作同页 */
.r2-page {
  padding-bottom: 30px;
}
.r4-pays {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.r4-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.r4-pay.is-on {
  border-color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r4-check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.r4-check.is-on {
  border: 5px solid var(--text);
}
.r4-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.r4-total span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.r4-total b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}
.r4-submit {
  width: 118px;
  height: 42px;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.r4-submit:disabled {
  opacity: 0.42;
  cursor: default;
}


/* 充值页：大胶囊切换、头部记录、参考图结构 */
.r5-record {
  display: flex;
  justify-content: flex-end;
  margin: 0 2px 8px;
}
.r5-record button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.r5-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: #e7e8d9;
}
.r5-tab {
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.r5-tab.is-on {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(27, 59, 50, 0.08);
}
.r5-model {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  margin: 22px 2px 0;
}
.r5-model > span {
  color: var(--muted);
  font-size: 11px;
}
.r5-model-value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.r5-model-value select {
  width: 100%;
  padding: 0 22px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  appearance: none;
  outline: none;
}
.r5-model-value svg {
  position: absolute;
  right: 1px;
  color: var(--text);
  pointer-events: none;
}
.r5-model p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
  text-align: right;
}
.r5-section-title {
  margin: 23px 2px 11px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.r2-pack.is-on {
  border-color: var(--text);
  background: #e8efdf;
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r4-pay {
  justify-content: flex-start;
  gap: 10px;
}
.r4-check {
  order: -1;
  flex: none;
}

.r5-record button {
  font-size: 11px;
}
.r4-pay.is-on {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: none;
}

/* 余额充值：方案 1 分组卡片与充值说明 */
.r5-record {
  gap: 12px;
}
.r5-record button + button {
  color: var(--text);
}
.r6-benefit {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 12px;
  color: var(--muted);
  font-size: 8.5px;
}
.r6-benefit i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8a98f;
}
.r6-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.r6-card + .r6-card {
  margin-top: 10px;
}
.r6-card .r5-section-title,
.r6-card .r2-label {
  margin: 0 2px 10px;
}
.r6-plain {
  display: block;
}
.r6-faq {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.r6-faq > h2 {
  margin: 2px 2px 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.r6-faq details {
  border-top: 1px solid #eee8db;
}
.r6-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.r6-faq summary::-webkit-details-marker {
  display: none;
}
.r6-faq summary span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 400;
}
.r6-faq p {
  margin: 0;
  padding: 0 2px 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

/* 余额充值：更明显的记录/发票按钮与折扣码 */
.r7-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.r7-action + .r7-action {
  margin-left: 0;
}
.r7-discount {
  margin-top: 12px;
}
.r7-discount-toggle {
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.r7-discount-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.r7-discount-form input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  outline: none;
}
.r7-discount-form button {
  width: 62px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.r7-discount-error {
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 8.5px;
}
.r7-discount-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
}
.r7-discount-applied b {
  color: var(--text);
  font-size: 9.5px;
  font-weight: 500;
}
.r7-discount-applied button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}

.r5-record button.r7-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.r7-discount-toggle {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  text-decoration: none;
  font-size: 9.5px;
}

/* 自定义金额：浮动标签收紧，输入值居中 */
.r2-custom-card:focus-within > .r2-custom-label,
.r2-custom-card.has-value > .r2-custom-label {
  top: 6px !important;
  left: 8px !important;
  transform: none !important;
  font-size: 8px !important;
  line-height: 1.2;
}
.r2-custom-card input {
  padding: 14px 4px 2px;
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.r2-custom-card.is-on {
  box-shadow: none;
}

/* 自定义金额：标准浮动标签输入 */
.r2-custom-card {
  display: block;
  padding: 0;
}
.r2-custom-card > .r2-custom-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--muted);
}
.r2-custom-card:focus-within > .r2-custom-label,
.r2-custom-card.has-value > .r2-custom-label {
  top: 7px !important;
  left: 10px !important;
  transform: none !important;
  font-size: 8px !important;
}
.r2-custom-value {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}
.r2-custom-card:focus-within .r2-custom-value,
.r2-custom-card.has-value .r2-custom-value {
  opacity: 1;
  pointer-events: auto;
}
.r2-custom-value i {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.r2-custom-card .r2-custom-value input {
  width: 100%;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  line-height: 22px;
  text-align: left;
  opacity: 1;
  outline: none;
  appearance: textfield;
}
.r2-custom-card .r2-custom-value input::-webkit-inner-spin-button,
.r2-custom-card .r2-custom-value input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 自定义金额：原生输入框 */
.r2-custom-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: text;
}
.r2-custom-card input {
  width: 100%;
  height: 100%;
  padding: 0 6px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  opacity: 1;
  appearance: textfield;
}
.r2-custom-card input::placeholder {
  color: var(--muted);
  font-size: 12px;
  opacity: 1;
}
.r2-custom-card input::-webkit-inner-spin-button,
.r2-custom-card input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.r2-custom-label,
.r2-custom-value {
  display: none !important;
}

/* 余额充值：底部悬浮结算 */
.has-fixed-actions {
  padding-bottom: 96px;
}
.r4-actions.is-fixed {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 8;
  width: 100%;
  max-width: 520px;
  margin: 0;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 -12px 28px -24px rgba(27, 59, 50, 0.5);
  transform: translateX(-50%);
}
.r4-actions.is-fixed.is-hidden {
  display: none;
}

/* 底部悬浮栏需要相对视口定位，解除页面入场 transform 的包含块 */
.page-enter:has(.has-fixed-actions) {
  animation: none !important;
  transform: none !important;
}

/* 余额充值：桌面同轴 / 手机底部结算 */
.r8-page {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 96px;
}
.r8-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.r8-action {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.r8-account {
  margin: 0 2px 18px;
}
.r8-account span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}
.r8-account b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
}
.r8-account p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.r8-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.r8-group + .r8-group {
  margin-top: 20px;
}
.r8-group legend {
  width: 100%;
  padding: 0 2px;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.r8-benefit {
  margin: 0 2px 8px;
  color: #596a5e;
  font-size: 10.5px;
}
.r8-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.r8-option,
.r8-pay {
  position: relative;
  cursor: pointer;
}
.r8-option {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}
.r8-option input,
.r8-pay input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.r8-option:has(input:checked) {
  border-color: var(--text);
  background: #e8efdf;
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r8-option:has(input:focus-visible),
.r8-pay:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.r8-pays {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.r8-pay {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
}
.r8-pay i {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.r8-pay:has(input:checked) {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text) inset;
}
.r8-pay:has(input:checked) i {
  border: 5px solid var(--text);
}
.r8-closed {
  margin: 13px 2px 0;
  color: #8b7650;
  font-size: 9.5px;
}
.r8-discount {
  margin-top: 8px;
}
.r8-discount-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.r8-discount-toggle span:last-child {
  color: var(--muted);
}
.r8-discount-form label {
  display: block;
  margin: 2px 2px 5px;
  color: var(--muted);
  font-size: 9px;
}
.r8-discount-row {
  display: flex;
  gap: 8px;
}
.r8-discount-row input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  outline: none;
}
.r8-discount-row button {
  width: 66px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font: inherit;
  font-size: 10px;
}
.r8-discount-row button:disabled {
  opacity: 0.42;
}
.r8-discount-error {
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 8.5px;
}
.r8-discount-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
}
.r8-discount-applied b {
  color: var(--text);
  font-size: 9.5px;
  font-weight: 500;
}
.r8-discount-applied button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
}
.r8-settle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 2px 0;
  border-top: 1px solid var(--border);
}
.r8-sums {
  min-width: 0;
}
.r8-extra {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}
.r8-extra b {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
}
.r8-due span,
.r8-expected span {
  color: var(--muted);
  font-size: 9px;
}
.r8-due b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
}
.r8-expected {
  margin-top: 4px;
  color: var(--muted);
}
.r8-expected b {
  margin-left: 5px;
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
}
.r8-submit {
  flex: none;
  width: 120px;
  height: 43px;
  border: 0;
  border-radius: 9px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.r8-info {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.r8-info h2 {
  margin: 2px 2px 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.r8-info-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid #eee8db;
  font-size: 9.5px;
}
.r8-info-row:last-child {
  border-bottom: 0;
}
.r8-info-row span {
  color: var(--muted);
}
.r8-info-row b {
  color: var(--text);
  font-weight: 400;
}
@media (max-width: 767px) {
  .r8-page {
    padding-bottom: 92px;
  }
  .r8-settle {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 8;
    width: 100%;
    max-width: 520px;
    margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--bg);
    box-shadow: 0 -12px 28px -24px rgba(27, 59, 50, 0.5);
    transform: translateX(-50%);
  }
  .r8-settle.is-hidden {
    display: none;
  }
  .r8-extra,
  .r8-expected {
    display: none;
  }
  .r8-due b {
    font-size: 20px;
  }
  .r8-submit {
    width: 118px;
  }
}
.page-enter:has(.r8-page) {
  animation: none !important;
  transform: none !important;
}

.r8-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.r8-head h1 {
  display: none;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}
@media (min-width: 768px) {
  .r8-head h1 {
    display: block;
  }
  body:has(.r8-page) .tb-title {
    display: none;
  }
}

.r8-head-actions {
  margin-left: auto;
}
.r8-info-row {
  padding: 9px 2px;
  font-size: 10px;
  line-height: 1.55;
}
.r8-discount-error {
  font-size: 9.5px;
  line-height: 1.45;
}
.r8-discount-toggle {
  font-size: 10.5px;
}
.r8-discount-form label {
  font-size: 9.5px;
}
.r8-closed {
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 359px) {
  .r8-head {
    margin-bottom: 6px;
  }
  .r8-account {
    margin-bottom: 12px;
  }
  .r8-account b {
    font-size: 24px;
  }
  .r8-group + .r8-group {
    margin-top: 16px;
  }
  .r8-option {
    min-height: 60px;
  }
  .r8-pay {
    min-height: 44px;
  }
  .r8-closed {
    margin-top: 8px;
  }
  .r8-discount {
    margin-top: 2px;
  }
}

@media (max-width: 767px) {
  .r8-head {
    position: relative;
    height: 0;
    margin: 0;
  }
  .r8-head-actions {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
  }
  .r8-account {
    margin: 0 2px 10px;
  }
  .r8-account b {
    font-size: 24px;
  }
  .r8-account p {
    margin-top: 3px;
  }
  .r8-group + .r8-group {
    margin-top: 16px;
  }
  .r8-group legend {
    margin-bottom: 5px;
  }
  .r8-benefit {
    margin-bottom: 6px;
  }
  .r8-page {
    padding-bottom: 78px;
  }
  .r8-settle {
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    align-items: center;
  }
  .r8-due {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .r8-due span {
    font-size: 9px;
  }
  .r8-due b {
    margin: 0;
    font-size: 18px;
  }
  .r8-submit {
    width: 112px;
    height: 40px;
  }
}

.r8-account {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.r8-account span {
  font-size: 10px;
}
.r8-account b {
  display: inline;
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}
.r8-info-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #eee8db;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.r8-info-action span {
  width: 58px;
  flex: none;
  color: var(--muted);
  font-size: 10px;
}
.r8-info-action b {
  flex: 1;
  color: var(--text);
  font-size: 10px;
  font-weight: 400;
}
.r8-info-action i {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.r8-topcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.r8-topbalance span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}
.r8-topbalance b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}
.r8-order {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.r8-discount {
  margin-top: 14px;
}

.r8-topcard {
  padding: 0;
  margin: 0 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  align-items: flex-start;
}
.r8-order {
  height: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.r8-order:hover {
  color: var(--text);
}

@media (max-width: 767px) {
  .r8-page {
    padding-bottom: 20px;
  }
  .r8-settle {
    position: static;
    left: auto;
    bottom: auto;
    z-index: auto;
    width: auto;
    max-width: none;
    margin-top: 14px;
    padding: 14px 2px 0;
    border-top: 1px solid var(--border);
    background: transparent;
    box-shadow: none;
    transform: none;
  }
  .r8-settle.is-hidden {
    display: flex;
  }
}

.r8-settle {
  display: block;
  margin-top: 16px;
  padding: 0;
  border-top: 0;
}
.r8-submit {
  width: 100%;
  height: 48px;
  font-size: 12px;
}

@media (max-width: 767px) {
  .r8-head {
    height: auto;
    margin: 0 0 12px;
  }
  .r8-order {
    margin-left: auto;
  }
}

@media (max-width: 767px) {
  .r8-head {
    position: relative;
    height: 0;
    margin: 0;
  }
  .r8-order {
    position: absolute;
    top: 6px;
    right: 0;
    margin: 0;
  }
}

@media (max-width: 767px) {
  .r8-order {
    top: 0;
  }
}

@media (max-width: 767px) {
  .r8-group:first-of-type > legend {
    position: relative;
    top: -7.5px;
    margin-bottom: 12.5px;
  }
}

@media (max-width: 767px) {
  .r8-group:first-of-type > legend {
    margin-bottom: 5px;
  }
}

@media (max-width: 767px) {
  .r8-order {
    top: -7.5px;
  }
}
.r8-order-list {
  display: flex;
  flex-direction: column;
}
.r8-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee8db;
}
.r8-order-item:last-child {
  border-bottom: 0;
}
.r8-order-main b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.r8-order-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.r8-order-meta {
  text-align: right;
}
.r8-order-meta em {
  display: block;
  font-size: 9.5px;
  font-style: normal;
}
.r8-order-meta em.is-done {
  color: #49745a;
}
.r8-order-meta em.is-pending {
  color: #a6783f;
}
.r8-order-meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.r8-order {
  z-index: 3;
}

.tb-action {
  flex: none;
  margin-right: 10px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
}
.tb-action:hover {
  color: var(--text);
}
body:has(.r8-page) .tb-title {
  display: block;
}

.r8-model {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 3px;
}
.r8-model > span {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}
.r8-model-value {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.r8-model-value select {
  max-width: 220px;
  padding: 4px 20px 4px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  appearance: none;
  outline: none;
  cursor: pointer;
}
.r8-model-value svg {
  position: absolute;
  right: 0;
  pointer-events: none;
  color: var(--muted);
}
.r8-model-note {
  margin: 0 2px 18px;
  color: var(--muted);
  font-size: 8.5px;
  text-align: right;
}
.r8-quota-option {
  flex-direction: column;
  gap: 2px;
}
.r8-quota-option b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}
.r8-quota-option span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 400;
}
.r8-quota-option:has(input:checked) span {
  color: var(--text);
}
.r8-order-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.r9-confirm {
  padding: 2px 0 0;
}
.r9-amount {
  padding: 8px 0 14px;
  text-align: center;
}
.r9-amount span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}
.r9-amount b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.r9-rule {
  margin: 0 0 8px;
  border-top: 1px dashed var(--border);
}
.r9-pay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.r9-pay i {
  width: 14px;
  height: 14px;
  border: 4px solid var(--text);
  border-radius: 50%;
}

.r9-rule {
  border-top-style: solid;
}

/* 关于页 */
.about-page {
  max-width: 1040px;
  padding: 48px 24px 72px;
}
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
}
.about-hero h1 {
  font-size: 42px;
  margin: 9px 0 10px;
}
.about-hero p {
  max-width: 540px;
  font-size: 13px;
  line-height: 1.85;
}
.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.about-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 10.5px;
  text-decoration: none;
}
.about-cta a.is-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}
.about-flow-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.about-flow-label {
  display: block;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.about-flow-node,
.about-flow-models {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-size: 10.5px;
  text-align: center;
}
.about-flow-node.is-core {
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  border-color: var(--text);
  background: #e8efdf;
}
.about-flow-node.is-core b {
  font-size: 15px;
}
.about-flow-node.is-core span {
  color: var(--muted);
  font-size: 8.5px;
}
.about-flow > i {
  width: 1px;
  height: 14px;
  margin: 0 auto;
  background: var(--border);
}
.about-flow-models {
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
  min-height: 34px;
}
.about-flow-models span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8.5px;
}
.about-page .about-grid {
  gap: 12px;
  margin-top: 44px;
}
.about-page .about-grid > div {
  padding: 18px;
}
.about-grid em {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.about-page .about-grid b {
  font-size: 14px;
}
.about-page .about-grid span {
  font-size: 10.5px;
  line-height: 1.7;
}
.about-how {
  margin-top: 52px;
}
.about-how h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.about-how-sub {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 10.5px;
}
.about-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.about-steps > div {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.about-steps em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--text);
  font-size: 9px;
  font-style: normal;
}
.about-steps b {
  display: block;
  font-size: 12.5px;
}
.about-steps span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.about-page .about-meta {
  margin-top: 44px;
}
@media (max-width: 760px) {
  .about-page {
    max-width: 620px;
    padding: 26px 16px 54px;
  }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-hero h1 {
    font-size: 34px;
  }
  .about-flow-card {
    padding: 14px;
  }
  .about-flow {
    display: grid;
    grid-template-columns: 1fr 14px 1fr 14px 1fr;
    align-items: center;
    gap: 0;
  }
  .about-flow-node,
  .about-flow-models {
    min-height: 44px;
    font-size: 9px;
  }
  .about-flow-node.is-core {
    min-height: 44px;
  }
  .about-flow-node.is-core b {
    font-size: 11px;
  }
  .about-flow-node.is-core span {
    font-size: 7px;
  }
  .about-flow > i {
    width: 14px;
    height: 1px;
    margin: 0;
  }
  .about-flow-models {
    min-height: 44px;
    gap: 3px;
    padding: 0 4px;
  }
  .about-flow-models span {
    padding: 3px 5px;
    font-size: 7px;
  }
  .about-page .about-grid,
  .about-steps {
    grid-template-columns: 1fr;
  }
  .about-page .about-grid {
    margin-top: 30px;
  }
  .about-how {
    margin-top: 36px;
  }
  .about-steps {
    gap: 9px;
  }
  .about-steps > div {
    padding: 15px;
  }
  .about-page .about-meta {
    margin-top: 30px;
  }
}

/* 关于：Markdown 风格正文 */
.about-page.about-md {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.about-md h1 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.about-md h2 {
  margin: 34px 0 9px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.3;
}
.about-md p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}
.about-md .about-lead {
  color: var(--text);
  font-size: 13px;
  line-height: 1.85;
}
.about-md ul,
.about-md ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted);
}
.about-md li {
  margin: 0 0 6px;
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.75;
}
.about-md li::marker {
  color: #a9a18f;
}
.about-md code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.92em;
}
.about-md a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
.about-md a:hover {
  text-decoration-color: var(--text);
}
.about-md hr {
  margin: 30px 0 14px;
  border: 0;
  border-top: 1px solid var(--border);
}
.about-md .about-version {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
@media (max-width: 640px) {
  .about-page.about-md {
    padding: 26px 16px 54px;
  }
  .about-md h1 {
    font-size: 29px;
  }
  .about-md h2 {
    margin-top: 28px;
    font-size: 18px;
  }
  .about-md p,
  .about-md li {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .about-page.about-md {
    padding: 26px 18px 56px;
  }
  .about-md h1 {
    font-size: 30px;
    margin-bottom: 13px;
  }
  .about-md h2 {
    margin: 30px 0 9px;
    font-size: 20px;
  }
  .about-md .about-lead {
    font-size: 15px;
    line-height: 1.85;
    margin-bottom: 0;
  }
  .about-md p {
    font-size: 14px;
    line-height: 1.8;
  }
  .about-md li {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
  }
  .about-md ul,
  .about-md ol {
    padding-left: 22px;
    margin-bottom: 14px;
  }
  .about-md code {
    font-size: 12.5px;
  }
  .about-md hr {
    margin: 28px 0 14px;
  }
  .about-md .about-version {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .about-page.about-md {
    padding-left: 0;
    padding-right: 0;
  }
}

/* 关于页空态与后台自定义内容 */
.about-empty {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.about-custom {
  color: var(--text);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.adm-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
}
.adm-about-textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.7;
  font-family: inherit;
}
.adm-preview-link {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 640px) {
  .about-empty {
    margin-top: 16px;
    font-size: 17px;
  }
  .about-custom {
    font-size: 14px;
  }
}

/* 新建密钥弹窗 */
.modal.key-create-modal {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}
.key-create-modal .mb {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.key-create-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}
.key-form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.key-form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}
.key-section-title {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.key-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.key-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
  cursor: pointer;
}
.key-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--text);
}
.key-check-main {
  color: var(--text);
  font-size: 10.5px;
}
.key-check-main input {
  width: 15px;
  height: 15px;
}
.key-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.key-date-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.key-date-chip.on {
  border-color: var(--text);
  background: #e8efdf;
  color: var(--text);
}
.key-input-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.key-input-unit .input {
  width: 100%;
  padding-right: 56px;
}
.key-input-unit > span {
  position: absolute;
  right: 11px;
  color: var(--muted);
  font-size: 9.5px;
  pointer-events: none;
}
.key-input-unit .input:disabled {
  opacity: 0.55;
}
.key-field-help {
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}
.key-model-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 168px;
  overflow-y: auto;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.key-model-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
}
.key-model-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--text);
}
.key-scope-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8.5px;
}
.key-scope-line span:last-child {
  text-align: right;
}

.key-model-inputs {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.key-model-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.key-model-input-row .input {
  flex: 1;
  min-width: 0;
}
.key-model-remove {
  width: 30px;
  height: 34px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.key-model-add {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}

.key-create-modal .mb {
  gap: 10px;
}
.key-create-modal .field {
  gap: 5px;
}
.key-create-modal .field > label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
}
.key-create-modal .key-section-title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.key-create-modal .key-form-section {
  gap: 10px;
  padding-top: 12px;
}
.key-create-modal .key-create-note {
  display: none;
}

.key-inline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.key-create-modal .mb {
  gap: 13px;
}
.key-create-modal .field > label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
}
.key-create-modal .key-field-help {
  margin-top: 5px;
}
@media (max-width: 340px) {
  .key-inline-row {
    grid-template-columns: 1fr;
  }
}

.key-input-unit .input {
  padding-right: 26px;
  font-size: 11.5px;
}
.key-input-unit > span {
  right: 9px;
}

/* 可用模型搜索选择 */
.key-model-combo {
  display: flex;
  flex-direction: column;
}
.key-model-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: text;
}
.key-model-control:focus-within {
  border-color: #8e9d90;
  box-shadow: 0 0 0 3px rgba(142, 157, 144, 0.12);
}
.key-model-control > svg {
  flex: none;
  color: var(--muted);
}
.key-model-control > input {
  flex: 1;
  min-width: 80px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.key-model-control > input::placeholder {
  color: #9a9d90;
}
.key-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 0 5px 0 7px;
  border-radius: 5px;
  background: var(--sage);
  color: var(--text);
  font-size: 9px;
  line-height: 1.2;
}
.key-model-chip button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.key-model-menu {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  max-height: 176px;
  overflow-y: auto;
}
.key-model-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eee8db;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.key-model-choice:last-child {
  border-bottom: 0;
}
.key-model-choice:hover {
  background: var(--soft);
}
.key-model-choice small {
  color: var(--muted);
  font-size: 8.5px;
}
.key-model-empty {
  padding: 11px 10px;
  color: var(--muted);
  font-size: 9px;
}

.key-model-control > input:focus,
.key-model-control > input:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* 模型选择浮层：不参与文档流，避免弹窗跳动 */
.key-create-modal {
  overflow: visible;
}
.key-create-modal .mb {
  overflow: visible;
}
.key-model-combo {
  position: relative;
}
.key-model-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 0;
  max-height: 210px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 38px -26px rgba(27, 59, 50, 0.5);
}
.key-model-choice {
  min-height: 38px;
}

.key-model-menu {
  top: auto;
  bottom: calc(100% + 4px);
  max-height: 180px;
}

.key-model-menu {
  max-height: 156px;
}

.key-model-control {
  min-height: 44px;
  padding: 0 10px;
  gap: 4px;
}
.key-model-control > input {
  min-width: 70px;
}

/* 新建密钥：统一所有输入框外观 */
.key-create-modal .input,
.key-create-modal .key-model-control {
  height: 44px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line) !important;
  border-radius: 9px;
  background: var(--surface) !important;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.key-create-modal .input:focus,
.key-create-modal .key-model-control:focus-within {
  border-color: #8e9d90 !important;
  box-shadow: 0 0 0 3px rgba(142, 157, 144, 0.12);
}
.key-create-modal .key-model-control {
  padding: 0 10px;
}
.key-create-modal .key-model-control > input {
  height: 30px;
  font-size: 12px;
}
.key-create-modal .key-input-unit .input {
  padding-right: 26px;
}

.key-create-modal .input,
.key-create-modal .key-model-control {
  border: 1px solid var(--border) !important;
}
.key-model-menu {
  border: 1px solid var(--border);
}

.key-create-modal .key-model-control {
  height: auto !important;
  max-height: 96px;
  overflow-y: auto;
  align-content: center;
}

/* 模型标签区：顶部对齐，避免滚动到顶时首行被裁 */
.key-create-modal .key-model-control {
  padding: 7px 10px;
  align-content: flex-start;
}
/* 软键盘打开时，弹窗跟随可视视口顶部 */
html.keyboard-open .modal-backdrop:has(.key-create-modal) {
  top: var(--keyboard-top, 0px) !important;
  bottom: auto !important;
  height: var(--keyboard-height, 100dvh) !important;
  align-items: flex-start !important;
  padding: 8px 16px !important;
}
html.keyboard-open .key-create-modal {
  max-height: calc(var(--keyboard-height, 100dvh) - 16px);
  overflow-y: auto;
  overflow-x: hidden;
}
html.keyboard-open .key-create-modal .mf {
  position: sticky;
  bottom: 0;
  background: #f7f4e8;
  z-index: 2;
}

html.keyboard-open .key-create-modal {
  overflow: hidden !important;
}
html.keyboard-open .key-create-modal .mb {
  overflow-y: auto !important;
  min-height: 0;
  flex: 1;
}
html.keyboard-open .key-model-menu {
  position: static;
  max-height: 140px;
  margin-top: 4px;
  box-shadow: none;
}

html.keyboard-open .key-create-modal {
  max-height: calc(var(--keyboard-height, 100dvh) - 16px) !important;
}

html.keyboard-open .modal-backdrop .modal.key-create-modal {
  max-height: calc(var(--keyboard-height, 100dvh) - 16px) !important;
}

/* 新建密钥：恢复与其他弹窗一致的滚动容器，依赖浏览器把输入框滚进键盘上方 */
.modal.key-create-modal {
  overflow-y: auto !important;
  overflow-x: hidden;
}
.key-create-modal .mb {
  overflow: visible;
}

/* 模型下拉：贴附在输入框下方，右侧带拖动条 */
.key-model-menu {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  margin-top: 6px;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 32px -24px rgba(27, 59, 50, 0.5);
}
.key-model-menu::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 18px;
  width: 9px;
  height: 9px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.key-model-list {
  max-height: 156px;
  overflow-y: auto;
  padding-right: 17px;
  scrollbar-width: none;
}
.key-model-list::-webkit-scrollbar {
  display: none;
}
.key-model-rail {
  position: absolute;
  top: 4px;
  right: 2px;
  bottom: 4px;
  width: 13px;
  border-radius: 99px;
  cursor: pointer;
  touch-action: none;
}
.key-model-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  border-radius: 99px;
  background: #e8e2d3;
}
.key-model-rail i {
  position: absolute;
  left: 3px;
  right: 3px;
  min-height: 24px;
  border-radius: 99px;
  background: #b8b09d;
}
.key-model-choice {
  padding-right: 4px;
}

/* 模型选择：页面级浮层，按空间决定上下方向 */
.key-model-menu.is-portal {
  position: fixed;
  margin: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 38px -22px rgba(27, 59, 50, 0.45);
}
.key-model-menu.is-portal .key-model-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 17px;
}
.key-model-menu.is-portal .key-model-rail {
  top: 4px;
  bottom: 4px;
}
.key-model-menu.is-portal.is-up {
  transform: translateY(-100%);
}
.key-model-menu.is-portal.is-up::before {
  top: auto;
  bottom: -5px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.key-model-menu.is-portal::before {
  z-index: 1;
}

.key-model-menu.is-portal {
  z-index: 1400;
}

/* 可用模型：默认全部 + 独立选择页 */
.key-model-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.key-model-inline > span {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
}
.key-model-edit {
  flex: none;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.key-models-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 22px 18px 70px;
}
.key-models-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.key-models-page h1 {
  margin: 12px 0 5px;
  color: var(--text);
  font-size: 23px;
  font-weight: 600;
}
.key-models-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.key-models-search {
  width: 100%;
}
.key-models-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 0 8px;
  color: var(--muted);
  font-size: 9.5px;
}
.key-models-toolbar > div {
  display: flex;
  gap: 10px;
}
.key-models-toolbar button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.key-models-list {
  border-top: 1px solid var(--border);
}
.key-models-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 4px;
  border-bottom: 1px solid #eee8db;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}
.key-models-item input {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: #94a68e;
}
.key-models-item > span {
  flex: 1;
  min-width: 0;
}
.key-models-item small {
  color: var(--muted);
  font-size: 8.5px;
}
.key-models-item.on {
  background: #f1f4ec;
}
.key-models-empty {
  padding: 20px 4px;
  color: var(--muted);
  font-size: 10px;
}
.key-models-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.key-models-cancel {
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.key-models-save {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 640px) {
  .key-models-page {
    padding: 18px 16px 60px;
  }
  .key-models-page h1 {
    font-size: 21px;
  }
}

/* 模型选择页：厂商手风琴 */
.key-models-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 1px 5px;
  color: var(--muted);
  font-size: 8.5px;
}
.key-models-tools > div {
  display: flex;
  gap: 9px;
}
.key-models-tools button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8.5px;
  cursor: pointer;
}
.key-models-groups {
  border-top: 1px solid var(--border);
}
.key-models-group {
  border-bottom: 1px solid #e7e1d2;
}
.key-models-band {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 1px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.key-models-rail {
  width: 3px;
  height: 16px;
  flex: none;
  border-radius: 2px;
  background: #d8d2c2;
}
.key-models-band.on .key-models-rail {
  background: var(--text);
}
.key-models-vendor {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.key-models-count {
  margin-left: 2px;
  color: var(--muted);
  font-size: 8px;
}
.key-models-picked {
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--sage);
  color: #466b57;
  font-size: 8px;
}
.key-models-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  color: var(--muted);
  font-size: 8px;
}
.key-models-toggle i {
  font-style: normal;
  font-size: 10px;
}
.key-models-rows {
  padding: 0 0 4px 11px;
}
.key-models-rows .key-models-item {
  min-height: 34px;
  border-top: 1px solid #eee8db;
  border-bottom: 0;
}
.key-models-foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--bg);
  margin-top: 12px;
  padding: 11px 0 12px;
  box-shadow: 0 -8px 18px -18px rgba(27, 59, 50, 0.45);
}
.key-models-foot-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 9.5px;
}
.key-models-foot-count b {
  color: var(--text);
  font-size: 11px;
}
.key-models-page {
  padding-bottom: 12px;
}

/* 模型选择页：对齐管理端的分组密度 */
.key-models-page {
  padding-top: 14px;
}
.key-models-hint {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.key-models-tools {
  margin: 12px 1px 0;
}
.key-models-all {
  padding: 2px 0;
}
.key-models-groups {
  border-top: 0;
}
.key-models-group {
  position: relative;
  border-bottom: 0;
}
.key-models-band {
  position: relative;
  min-height: 0;
  margin-top: 6px;
  padding: 11px 2px 11px 12px;
  gap: 9px;
}
.key-models-band:active {
  background: rgba(27, 59, 50, 0.045);
}
.key-models-rail {
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 0;
  height: auto;
  background: var(--text);
  border-radius: 2px;
  transition: width 0.2s var(--e-out, ease);
}
.key-models-band.on .key-models-rail {
  width: 3px;
}
.key-models-vendor {
  font-size: 13.5px;
  font-weight: 800;
}
.key-models-count {
  margin-left: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.key-models-toggle {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.key-models-band.on .key-models-toggle {
  color: var(--text);
}
.key-models-picked {
  margin-left: auto;
}
.key-models-picked + .key-models-toggle {
  margin-left: 0;
}
.key-models-band-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--border);
}
.key-models-band.on .key-models-band-line {
  background: var(--text);
}
.key-models-rows {
  padding: 0 0 2px 12px;
  animation: keyModelsIn 0.22s ease both;
}
@keyframes keyModelsIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.key-models-rows .key-models-item {
  min-height: 38px;
  border-top: 1px solid rgba(27, 59, 50, 0.12);
  font-size: 10.5px;
}
.key-models-rows .key-models-item > span {
  font-weight: 700;
}
.key-models-rows .key-models-item small {
  font-weight: 400;
}
.key-models-search {
  height: 40px;
}

/* 模型选择页：减少左右留白 */
.page-enter:has(.key-models-page) {
  padding-left: 10px !important;
  padding-right: 10px !important;
}
.key-models-page {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 640px) {
  .key-models-page {
    padding-left: 0;
    padding-right: 0;
  }
}

/* 模型选择页：统一颜色、动效和交互反馈 */
.key-models-rows-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.18s ease;
}
.key-models-rows-wrap.open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.key-models-rows-wrap > .key-models-rows {
  overflow: hidden;
  min-height: 0;
  padding: 0 0 0 12px;
  animation: none;
}
.key-models-band {
  transition:
    background-color 0.16s ease,
    transform 0.12s ease;
}
.key-models-band:active {
  transform: scale(0.995);
}
.key-models-band-line {
  transition: background-color 0.2s ease;
}
.key-models-item {
  transition: background-color 0.16s ease;
}
.key-models-item.on {
  background: color-mix(in srgb, var(--sage) 58%, transparent);
}
.key-models-item input[type="checkbox"] {
  accent-color: var(--text);
}
.key-models-picked {
  background: var(--sage);
  color: var(--text);
}
.key-models-search:focus {
  border-color: #8e9d90;
  box-shadow: 0 0 0 3px rgba(142, 157, 144, 0.12);
  outline: 0;
}
.key-models-save {
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}
.key-models-save:active {
  transform: translateY(1px);
}
.key-models-cancel:active {
  opacity: 0.6;
}
@media (hover: hover) {
  .key-models-item:hover {
    background: rgba(232, 239, 223, 0.38);
  }
  .key-models-item.on:hover {
    background: color-mix(in srgb, var(--sage) 72%, transparent);
  }
}

/* 模型选择页：底栏贴底通栏 */
.key-models-page {
  padding-bottom: 0 !important;
}
.key-models-foot {
  margin: 12px -10px 0;
  padding: 11px 10px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* 模型选择页：去掉说明/统计，底栏改为双栏 */
.key-models-page {
  padding-top: 12px !important;
}
.key-models-tools {
  justify-content: flex-end;
  margin: 9px 1px 0;
}
.key-models-all {
  font-size: 9px;
}
.key-models-foot {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px calc(11px + env(safe-area-inset-bottom));
}
.key-models-foot-count {
  margin-right: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 9.5px;
}
.key-models-foot-count b {
  font-size: 13px;
  font-weight: 700;
}
.key-models-save {
  flex: none;
  width: 120px;
  height: 40px;
  margin-left: auto;
  border-radius: 10px;
  font-size: 11px;
}
.key-models-cancel {
  display: none;
}

/* 模型选择页底栏状态：统一字号，圆点表示是否已选 */
.key-models-foot-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}
.key-models-foot-count > i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #c9c2b2;
}
.key-models-foot-count > i.on {
  background: #92a687;
  box-shadow: 0 0 0 3px rgba(146, 166, 135, 0.16);
}
.key-models-foot-count b {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin: 0 1px;
}

/* 模型选择页：底栏与内容对齐，左侧字放大，按钮收窄 */
.key-models-tools {
  margin-left: 0;
  margin-right: 0;
}
.key-models-foot {
  padding-left: 10px;
  padding-right: 10px;
}
.key-models-foot-count {
  gap: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.key-models-foot-count b {
  font-size: 13px;
  margin: 0 1px;
}
.key-models-save {
  width: 98px;
  padding: 0 16px;
  font-size: 11px;
}

/* 模型选择页：右侧内容对齐同一竖线 */
.key-models-band {
  padding-right: 0;
}
.key-models-rows .key-models-item {
  padding-right: 0;
}
.key-models-foot-count {
  gap: 3px;
}

/* 勾选行不再铺色块，避免中间一块、两边露白 */
.key-models-item.on {
  background: transparent;
}
.key-models-item.on > span {
  color: var(--text);
}
.key-models-item.on input[type="checkbox"] {
  accent-color: var(--text);
}
@media (hover: hover) {
  .key-models-item.on:hover {
    background: rgba(27, 59, 50, 0.035);
  }
}

/* 触摸设备不要把 hover 颜色粘在模型行上 */
.key-models-item,
.key-models-item.on {
  -webkit-tap-highlight-color: transparent;
}
.key-models-item:hover,
.key-models-item.on:hover {
  background: transparent;
}
.key-models-item:active {
  background: rgba(27, 59, 50, 0.04);
}
.key-models-item.on:active {
  background: rgba(27, 59, 50, 0.055);
}

/* 模型选择页：轻量分组 */
.key-models-tools {
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 2px;
}
.key-models-note {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}
.key-models-all {
  color: var(--muted);
}
.key-models-band {
  min-height: 0;
  margin-top: 4px;
  padding: 10px 0;
  gap: 8px;
}
.key-models-vendor {
  font-size: 13.5px;
  font-weight: 800;
}
.key-models-chevron {
  width: 8px;
  height: 8px;
  flex: none;
  margin: -4px 2px 0 auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.key-models-band.on .key-models-chevron {
  margin-top: 3px;
  transform: rotate(-135deg);
}
.key-models-rows-wrap > .key-models-rows {
  padding-left: 0;
}
.key-models-rows .key-models-item {
  width: 100%;
  min-height: 42px;
  padding: 0;
  border-top: 1px solid #eee8db;
  cursor: pointer;
  touch-action: manipulation;
}
.key-models-rows .key-models-item > span {
  font-size: 11px;
}
.key-models-rows .key-models-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.key-models-rail,
.key-models-band-line {
  display: none;
}

/* 密钥弹窗：两列字段允许收缩，避免长占位撑破 */
.key-inline-row > .field {
  min-width: 0;
}
.key-inline-row .input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* 密钥弹窗：模型值框与添加按钮分离 */
.key-model-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.key-model-row .key-model-inline {
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}
.key-model-row .key-model-edit {
  flex: none;
  height: 44px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--bg);
  font-size: 10px;
}
.key-model-row .key-model-edit:active {
  background: var(--soft);
}

/* 新建密钥：输入框再收紧一档 */
.key-create-modal .input {
  height: 40px;
  min-height: 40px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 11.5px;
}
.key-model-inline {
  min-height: 40px;
  padding-left: 10px;
  padding-right: 10px;
}
.key-model-row .key-model-edit {
  height: 40px;
  padding: 0 12px;
}
.key-create-modal .mb {
  gap: 11px;
}

/* 模型选择页：无论结果多少，底栏固定在视口底部 */
.key-models-page {
  padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important;
}
.key-models-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  margin: 0;
  width: 100%;
  padding: 10px 10px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 -10px 24px -24px rgba(23, 63, 49, 0.5);
}

/* 修复：底栏在短结果时也要贴底 */
.key-models-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 0 !important;
}
.key-models-foot {
  position: sticky;
  left: auto;
  right: auto;
  bottom: 0;
  width: auto;
  margin: 12px -10px 0;
  margin-top: auto;
  padding: 10px 10px calc(11px + env(safe-area-inset-bottom));
}

/* 模型选择页：标准搜索框与空状态 */
.key-models-search {
  width: 100%;
  height: 38px;
  margin: 0;
}
.key-models-search .input {
  width: 100%;
  height: 38px;
  padding-left: 34px;
  padding-right: 34px;
  font-size: 11px;
}
.key-models-search .input:focus {
  border-color: #8e9d90;
  box-shadow: 0 0 0 3px rgba(142, 157, 144, 0.12);
  outline: 0;
}
.key-models-search > svg {
  left: 11px;
  color: rgba(27, 59, 50, 0.55);
}
.key-models-search .sbox-clr {
  right: 7px;
  width: 19px;
  height: 19px;
  background: #f0ede1;
  color: #7c877e;
}
.key-models-groups.is-empty {
  flex: 1;
  min-height: 0;
  display: flex;
}
.key-models-empty-state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 8px 20px;
}
.key-models-empty-ico {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--soft);
  color: #809184;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
}
.key-models-empty-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.key-models-empty-desc {
  margin: 0;
  max-width: 220px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}
.key-models-empty-clear {
  margin-top: 14px;
  padding: 0 1px 2px;
  border: 0;
  border-bottom: 1px solid #b8c5b6;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.key-models-empty-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  color: #9a9f92;
  font-size: 8px;
}
.key-models-empty-tip:before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b9c2b6;
}

/* 空状态图标底色 + 搜索框焦点态统一为绿色 */
.key-models-empty-ico {
  background: var(--surface-2);
}
.key-models-search .input:focus {
  border: 1px solid #8e9d90 !important;
  box-shadow: 0 0 0 3px rgba(142, 157, 144, 0.12) !important;
  outline: 0 !important;
}

/* 新建密钥：错误提示不改变表单高度 */
.key-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 12px;
}
.key-field-label-row > label {
  min-width: 0;
}
.key-field-error {
  flex: none;
  color: #b5523d;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.key-create-modal .input.is-error {
  border-color: #c1604c !important;
  box-shadow: 0 0 0 3px rgba(193, 96, 76, 0.1) !important;
}

/* 密钥创建成功：沿用标准弹窗的 头/内容/底栏 结构 */
.keybox.key-result {
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  flex-wrap: nowrap;
}
.keybox.key-result code {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.55;
  word-break: break-all;
}
.keybox.key-result .btn {
  flex: none;
  align-self: center;
}
.key-result-note {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.keybox.key-result code {
  font-size: 10.5px;
  line-height: 1.6;
}

/* 成功弹窗与新建密钥同一套外壳 */
.keybox.key-result {
  display: block;
  background: var(--surface-2);
  padding: 10px 11px;
}
.keybox.key-result code {
  display: block;
  color: var(--text);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
}

/* 成功弹窗：复制移到密钥卡右上角 */
.keybox.key-result {
  position: relative;
  padding-right: 43px;
}
.keybox.key-result code {
  padding-right: 0;
}
.key-result-copy {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.key-result-copy:active {
  background: var(--surface-2);
}

/* 成功弹窗：复制收进密钥卡片标题行 */
.keybox.key-result {
  padding: 9px 11px 10px;
}
.key-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.key-result-head > span {
  color: var(--muted);
  font-family: system-ui, "PingFang SC", sans-serif;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0;
}
.key-result-copy {
  position: static;
  top: auto;
  right: auto;
  width: auto;
  height: 22px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: system-ui, "PingFang SC", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
}
.key-result-copy:active {
  opacity: 0.6;
}
.keybox.key-result code {
  font-size: 11px;
  line-height: 1.6;
}
/* toast 必须浮在弹窗之上 */
.toast {
  z-index: 2000 !important;
}

/* 新建密钥：更窄、更紧凑 */
html[data-theme="paper"] .modal.modal-uc.key-create-modal {
  width: min(300px, calc(100vw - 44px)) !important;
  max-width: 300px !important;
}
html[data-theme="paper"] .key-create-modal .mh {
  padding: 16px 14px 2px;
}
html[data-theme="paper"] .key-create-modal .mh h3 {
  font-size: 20px;
}
html[data-theme="paper"] .key-create-modal .mb {
  padding: 5px 14px 12px;
  gap: 9px;
}
html[data-theme="paper"] .key-create-modal .mf {
  padding: 0 14px 14px;
  gap: 10px;
}
.key-create-modal .input {
  height: 36px;
  min-height: 36px;
  padding-left: 9px;
  padding-right: 9px;
}
.key-create-modal .key-inline-row {
  gap: 8px;
}
.key-create-modal .key-model-inline {
  min-height: 36px;
  padding-left: 9px;
  padding-right: 9px;
}
.key-create-modal .key-model-row .key-model-edit {
  height: 36px;
  padding: 0 11px;
}
.key-create-modal .r3-modal-cancel,
.key-create-modal .r3-modal-submit {
  height: 36px;
}
.key-create-modal .r3-modal-submit {
  padding: 0 13px;
}
.key-create-modal .key-field-help {
  margin-top: 3px;
}

/* 密钥名称标签与其他字段标签统一 */
.key-create-modal .key-field-label-row > label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.2;
}

/* 编辑密钥：与新建密钥统一外壳和密度 */
html[data-theme="paper"] .modal.modal-uc.key-edit-modal {
  width: min(300px, calc(100vw - 44px)) !important;
  max-width: 300px !important;
}
html[data-theme="paper"] .key-edit-modal .mh {
  padding: 16px 14px 2px;
}
html[data-theme="paper"] .key-edit-modal .mh h3 {
  font-size: 20px;
}
html[data-theme="paper"] .key-edit-modal .mb {
  padding: 5px 14px 12px;
  gap: 9px;
}
html[data-theme="paper"] .key-edit-modal .mf {
  padding: 0 14px 14px;
  gap: 10px;
}
.key-edit-modal .input {
  height: 36px;
  min-height: 36px;
  padding-left: 9px;
  padding-right: 9px;
}
.key-edit-modal .key-field-label-row > label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.2;
}
.key-edit-modal .r3-modal-cancel,
.key-edit-modal .r3-modal-submit {
  height: 36px;
}
.key-edit-modal .r3-modal-submit {
  padding: 0 13px;
}

/* 密钥列表：原地修改名称 */
.key-card-name-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #8e9d90;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(142, 157, 144, 0.14);
}

/* 密钥名称原位输入：回到普通输入框的克制样式 */
.key-card-name-input {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: 0;
  box-shadow: none;
}
.key-card-name-input:focus {
  border-color: #8e9d90;
  box-shadow: none;
}

/* 名称原位编辑：不显示输入框，只显示文字和光标 */
.key-card-name-input {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  outline: 0;
  box-shadow: none;
  caret-color: var(--text);
}
.key-card-name-input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.key-card-name-input,
.key-card-name-input:focus,
.key-card-name-input:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

/* 名称编辑态与静态文字保持同一行高，避免卡片跳动 */
.key-card-name-input {
  height: 24px;
  line-height: 24px;
}

/* 删除密钥：与轻量弹窗统一 */
html[data-theme="paper"] .modal.modal-uc.key-delete-modal {
  width: min(300px, calc(100vw - 44px)) !important;
  max-width: 300px !important;
}
html[data-theme="paper"] .key-delete-modal .mh {
  padding: 16px 14px 2px;
}
html[data-theme="paper"] .key-delete-modal .mh h3 {
  font-size: 20px;
}
html[data-theme="paper"] .key-delete-modal .mb {
  padding: 5px 14px 12px;
  gap: 9px;
}
html[data-theme="paper"] .key-delete-modal .mf {
  padding: 0 14px 14px;
  gap: 10px;
}
.key-delete-desc {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}
.key-delete-target {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.key-delete-label {
  color: var(--muted);
  font-size: 9.5px;
}
.key-delete-name {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.key-delete-warning {
  margin: 0;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.4;
}
.key-delete-modal .r3-modal-cancel,
.key-delete-modal .r3-modal-delete {
  height: 36px;
}
.key-delete-modal .r3-modal-delete {
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--danger);
  color: var(--surface);
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

/* 删除密钥：避免重复提示 */
.key-delete-question {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.7;
}
.key-delete-question b {
  font-weight: 700;
}
.key-delete-warning {
  margin: 0;
  color: var(--danger);
  font-size: 9px;
  line-height: 1.5;
}

/* 密钥卡片：删除时淡出并收拢高度 */
.key-cards {
  gap: 0 10px;
}
.key-card-slot {
  display: grid;
  grid-template-rows: 1fr;
  min-width: 0;
  padding-bottom: 10px;
  transition:
    grid-template-rows 0.22s ease 0.18s,
    padding-bottom 0.22s ease 0.18s;
}
.key-card-slot > .key-card {
  min-height: 0;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}
.key-card-slot.is-deleting {
  grid-template-rows: 0fr;
  padding-bottom: 0;
}
.key-card-slot.is-deleting > .key-card {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.965);
  pointer-events: none;
}

/* 删除动画改为纯 transform/opacity，避免布局抖动 */
.key-card-slot {
  display: block;
  min-width: 0;
  padding-bottom: 10px;
  transition: none;
}
.key-card-slot > .key-card {
  min-height: 0;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.key-card-slot.is-deleting > .key-card {
  overflow: visible;
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.key-card-slot > .key-card,
.key-card-slot.is-deleting > .key-card {
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

/* 删除残影：卡片本体立刻移除，残影在原地淡出 */
.key-card-delete-ghost {
  position: fixed;
  z-index: 1100;
  margin: 0;
  pointer-events: none !important;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  box-sizing: border-box;
}
.key-card-delete-ghost.out {
  opacity: 0;
  transform: scale(0.965);
}
.key-card-slot > .key-card {
  transition: none;
}
.key-card-slot.is-deleting > .key-card {
  opacity: 1;
  transform: none;
}

/* 删除：目标卡片淡出，其余卡片同时用 transform 补位 */
.key-card-slot > .key-card {
  min-height: 0;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.key-card-slot.is-deleting > .key-card {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

/* 删除时保持 slot 占位不变，等动画结束再整体移除 */
.key-card-slot.is-deleting {
  grid-template-rows: none;
  padding-bottom: 10px;
}
.key-card-slot.is-deleting > .key-card {
  min-height: 0;
  overflow: visible;
}

/* 弹窗主按钮全局调浅、降低高度 */
.r3-modal-submit {
  height: 36px;
  background: #2f5b4a;
}
.r3-modal-submit:active {
  background: #264d3e;
}

/* 模型选择页：完成按钮缩小并换色 */
.key-models-save {
  width: 84px;
  height: 34px;
  border-radius: 8px;
  background: #2f5b4a;
  font-size: 10.5px;
}
.key-models-save:active {
  background: #264d3e;
}

/* 用量明细：概览、筛选与响应式列表 */
.usage-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.usage-stat {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.usage-stat span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.4;
}
.usage-stat b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.usage-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}
.usage-search {
  flex: 1 1 220px;
  min-width: 0;
}
.usage-search .input {
  height: 36px;
  padding-left: 34px;
  font-size: 10.5px;
}
.usage-select {
  height: 36px;
  max-width: 150px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 10px;
}
.usage-status-group {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.usage-status-group::-webkit-scrollbar {
  display: none;
}
.usage-status-chip {
  flex: none;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.usage-status-chip.on {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}
.usage-mobile {
  display: block;
}
.usage-desktop {
  display: none;
}
.usage-mobile .request-timeline {
  margin-top: 4px;
}
.usage-table-wrap {
  width: 100%;
  max-width: 1120px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}
.usage-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.usage-table td {
  padding: 10px;
  border-bottom: 1px solid #eee8db;
  color: var(--text);
  vertical-align: middle;
}
.usage-table tbody tr:last-child td {
  border-bottom: 0;
}
.usage-table tbody tr {
  cursor: pointer;
}
.usage-table tbody tr:hover {
  background: rgba(241, 238, 227, 0.62);
}
.usage-table tbody tr:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.usage-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.usage-table .usage-time span {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
}
.usage-table .usage-time b {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
}
.usage-state {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 8px;
}
.usage-state.is-ok {
  background: rgba(142, 166, 135, 0.16);
  color: #41604f;
}
.usage-state.is-bad {
  background: rgba(168, 51, 31, 0.09);
  color: var(--danger);
}
.usage-model,
.usage-key {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usage-model {
  font-weight: 600;
}
.usage-key {
  color: var(--muted);
}
.usage-cost {
  font-weight: 650;
}
.usage-table-empty {
  padding: 30px 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
@media (min-width: 760px) {
  .usage-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .usage-stat b {
    font-size: 19px;
  }
}
@media (min-width: 900px) {
  .usage-mobile {
    display: none;
  }
  .usage-desktop {
    display: block;
  }
  .usage-filterbar {
    flex-wrap: nowrap;
  }
  .usage-search {
    flex: 1 1 auto;
  }
}

/* 用量详情：消费指标与 Token 占比 */
.log-detail-perf {
  grid-template-columns: repeat(2, 1fr);
}
.log-detail-perf > div b {
  font-variant-numeric: tabular-nums;
}
.log-token-bar {
  display: flex;
  height: 7px;
  margin: 4px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}
.log-token-bar i {
  display: block;
  height: 100%;
}
.log-token-bar .miss {
  background: #8fa58d;
}
.log-token-bar .hit {
  background: #c7d3bf;
}
.log-token-bar .out {
  background: #2f5b4a;
}
@media (min-width: 760px) {
  .log-detail-perf {
    grid-template-columns: repeat(4, 1fr);
  }
}

.usage-status-group {
  flex: 0 0 auto;
}
.log-token-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 8px;
}
.log-token-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.log-token-legend i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}
.log-token-legend i.miss {
  background: #8fa58d;
}
.log-token-legend i.hit {
  background: #c7d3bf;
}
.log-token-legend i.out {
  background: #2f5b4a;
}

.usage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 16px 60px;
  text-align: center;
}
.usage-empty-ico {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  color: #809184;
  display: flex;
  align-items: center;
  justify-content: center;
}
.usage-empty b {
  font-size: 13px;
  font-weight: 600;
}
.usage-empty > span:not(.usage-empty-ico) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}
.usage-empty button {
  margin-top: 14px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}

/* 用量明细：范围说明 + 手机端搜索和密钥筛选同排 */
.usage-range-note {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 8.5px;
}
.usage-range-note b {
  color: var(--text);
  font-size: 9.5px;
  font-weight: 600;
}
.usage-search {
  flex: 1 1 0;
  min-width: 0;
}
.usage-select {
  flex: 0 0 112px;
  width: 112px;
  max-width: 112px;
}
.usage-status-group {
  flex: 0 0 100%;
}
@media (min-width: 900px) {
  .usage-select {
    flex-basis: 150px;
    width: 150px;
    max-width: 150px;
  }
  .usage-status-group {
    flex: 0 0 auto;
  }
}

/* 用量明细：范围标签在顶栏，搜索独占一行，密钥筛选在状态左侧 */
.usage-range-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.usage-search-row {
  width: 100%;
  margin: 0 0 8px;
}
.usage-search-row .usage-search {
  width: 100%;
}
.usage-filterbar {
  flex-wrap: nowrap;
}
.usage-status-group {
  flex: 1 1 auto;
  min-width: 0;
  flex-basis: auto;
}
@media (max-width: 899px) {
  .usage-status-group {
    flex: 1 1 auto;
    flex-basis: auto;
  }
}

.usage-range-label {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* 用量明细：合并概览卡 */
.usage-summary {
  margin: 10px 0;
  padding: 11px 13px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.usage-summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eee8db;
}
.usage-summary-top span {
  color: var(--muted);
  font-size: 9px;
}
.usage-summary-top b {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.usage-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 9px;
}
.usage-summary-metrics > div {
  min-width: 0;
  padding-left: 8px;
  border-left: 1px solid #eee8db;
}
.usage-summary-metrics > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.usage-summary-metrics span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usage-summary-metrics b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* 用量概览卡：上半金额区 + 下半四项指标 */
.usage-summary {
  margin: 9px 0 8px;
  padding: 0;
  overflow: hidden;
  border-radius: 11px;
}
.usage-summary-top {
  align-items: center;
  padding: 10px 13px 9px;
  background: linear-gradient(135deg, #f6f3e8, #fffdf8 72%);
  border-bottom: 1px solid #e9e2d3;
}
.usage-summary-top span {
  font-size: 9px;
  letter-spacing: 0.02em;
}
.usage-summary-top b {
  font-size: 23px;
  line-height: 1;
}
.usage-summary-metrics {
  padding: 9px 11px 10px;
  gap: 0;
}
.usage-summary-metrics > div {
  padding-left: 9px;
}
.usage-summary-metrics > div:first-child {
  padding-left: 0;
}
.usage-summary-metrics span {
  font-size: 8px;
  line-height: 1.4;
}
.usage-summary-metrics b {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.2;
}
@media (min-width: 760px) {
  .usage-summary-top {
    padding: 12px 15px 10px;
  }
  .usage-summary-top b {
    font-size: 25px;
  }
  .usage-summary-metrics {
    padding: 10px 13px 11px;
  }
  .usage-summary-metrics span {
    font-size: 8.5px;
  }
  .usage-summary-metrics b {
    font-size: 13px;
  }
}

.usage-summary-metrics > div:nth-child(4) b {
  color: #2f5b4a;
}

/* 用量明细：按手机账单重排 */
.page-enter:has(.logs-page) {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
.logs-page .log-toolbar {
  margin: 8px 0 7px;
}
.usage-range-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.usage-range-trigger i {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
.usage-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.usage-icon-action {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.usage-icon-action:disabled {
  opacity: 0.35;
}
/* summary: 总费用左侧上下 */
.usage-summary-top {
  display: block;
  padding: 10px 13px 9px;
}
.usage-summary-top span {
  display: block;
}
.usage-summary-top b {
  display: block;
  margin-top: 4px;
  text-align: left;
  font-size: 24px;
}
.usage-summary-metrics {
  padding: 9px 11px 10px;
  gap: 8px;
}
.usage-summary-metrics > div {
  padding-left: 0;
  border-left: 0;
}
/* search + filter */
.usage-search-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}
.usage-search-row .usage-search {
  flex: 1;
  width: auto;
  min-width: 0;
}
.usage-filter-trigger {
  flex: none;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.usage-filter-trigger.on {
  border-color: #9eada2;
  background: #f6f3e8;
}
.usage-filter-trigger > i {
  font-style: normal;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--text);
  color: var(--surface);
  font-size: 8px;
  line-height: 15px;
  text-align: center;
}
.usage-filter-chev {
  color: var(--muted);
  font-size: 10px;
}
/* status row */
.usage-status-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 4px;
}
.usage-status-chip {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.usage-status-chip.on {
  background: #e8efdf;
  color: var(--text);
  font-weight: 600;
}
/* filter panel */
.usage-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 2px 0 8px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.usage-filter-field {
  display: flex;
  align-items: center;
  gap: 9px;
}
.usage-filter-field > span {
  flex: none;
  color: var(--muted);
  font-size: 9px;
}
.usage-filter-field .usage-select {
  flex: 1;
  width: auto;
  max-width: none;
  height: 34px;
}
.usage-filter-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
}
.usage-filter-switch > span {
  flex: 1;
}
.usage-filter-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.usage-filter-switch > i {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  border-radius: 99px;
  background: #e3dece;
  transition: background 0.16s ease;
}
.usage-filter-switch > i:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fffdf8;
  transition: transform 0.16s ease;
}
.usage-filter-switch input:checked + i {
  background: #7d9a84;
}
.usage-filter-switch input:checked + i:after {
  transform: translateX(14px);
}
.usage-filter-done {
  align-self: flex-end;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: var(--text);
  color: var(--surface);
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
/* bill list */
.usage-bill-list section h3 {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.usage-bill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  width: 100%;
  padding: 9px 0 9px;
  border: 0;
  border-top: 1px solid #eee8db;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.usage-bill-model {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
}
.usage-bill-cost {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.usage-bill-meta {
  grid-column: 1 / span 2;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.usage-bill-row.is-failed .usage-bill-meta {
  color: var(--danger);
}
.logs-page .log-date-pop {
  left: 0;
  right: auto;
}
@media (min-width: 760px) {
  .usage-summary-top b {
    font-size: 26px;
  }
}

/* 查看指定密钥：下拉列表 */
.usage-search-row {
  position: relative;
  z-index: 8;
}
.usage-filter-trigger {
  white-space: nowrap;
}
.usage-key-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 222px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 32px -22px rgba(23, 63, 49, 0.45);
}
.usage-key-menu > b {
  display: block;
  padding: 3px 7px 6px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 500;
}
.usage-key-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.usage-key-option:hover {
  background: #f6f3e8;
}
.usage-key-option.on {
  background: #e8efdf;
  font-weight: 600;
}
.usage-key-option i {
  color: #2f5b4a;
  font-style: normal;
  font-size: 10px;
}
.usage-key-menu-foot {
  margin-top: 6px;
  padding: 8px 7px 4px;
  border-top: 1px solid #eee8db;
}
.usage-key-menu-foot .usage-filter-switch {
  font-size: 9.5px;
}

/* 用量明细：顶部按钮恢复描边，汇总透明，搜索独占，密钥入口与状态同排 */
.usage-icon-action {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
}
.usage-summary {
  background: transparent;
}
.usage-summary-top {
  background: transparent;
}
.usage-search-row {
  display: block;
  margin-bottom: 8px;
}
.usage-search-row .usage-search {
  width: 100%;
}
.usage-status-row {
  position: relative;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.usage-filter-trigger {
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.usage-filter-trigger.on,
.usage-filter-trigger.has-filter {
  border-color: #9eada2;
  background: #f6f3e8;
  color: var(--text);
}
.usage-key-menu {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
}

/* 时间范围按钮与展开箭头 */
.usage-range-trigger {
  height: 30px;
  padding: 0 9px 0 10px;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
}
.usage-range-trigger.is-open {
  border-color: #9eada2;
  background: #f6f3e8;
}
.usage-range-chev {
  flex: none;
  color: var(--muted);
  transition: transform 0.16s ease;
  transform: rotate(0deg);
}
.usage-range-trigger.is-open .usage-range-chev {
  transform: rotate(90deg);
}

/* 状态分段器靠左，密钥入口靠右 */
.usage-range-trigger {
  line-height: 1;
}
.usage-range-trigger > span {
  display: block;
  line-height: 1;
}
.usage-range-chev {
  display: block;
  position: relative;
  top: 0.5px;
}
.usage-status-row {
  align-items: center;
  gap: 8px;
}
.usage-status-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 2px;
  border-radius: 8px;
  background: #f1eee3;
}
.usage-status-chip {
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 9.5px;
}
.usage-status-chip.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 63, 49, 0.07);
}
.usage-filter-trigger {
  margin-left: auto;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: #e8efdf;
  color: #2f5b4a;
  font-size: 9.5px;
  font-weight: 500;
}
.usage-filter-trigger.on,
.usage-filter-trigger.has-filter {
  border: 0;
  background: #dce8d4;
  color: #244b3b;
}
.usage-filter-trigger svg {
  flex: none;
}
.usage-key-menu {
  right: 0;
  left: auto;
}

/* 查看指定密钥：改为暖色描边，去掉绿色底 */
.usage-filter-trigger {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}
.usage-filter-trigger.on,
.usage-filter-trigger.has-filter {
  border: 1px solid #c9c0ad;
  background: #f6f3e8;
  color: var(--text);
}

/* 长密钥列表：限高滚动 */
.usage-key-menu {
  max-height: min(360px, calc(100dvh - 330px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.usage-key-menu > b {
  position: sticky;
  top: -7px;
  z-index: 1;
  margin: -1px -1px 0;
  padding: 7px 8px 6px;
  background: var(--surface);
}

/* 调用详情：总计上方只保留一条分隔线 */
.log-cost-row:has(+ .log-cost-row.is-total) {
  border-bottom-color: var(--border);
}
.log-cost-row.is-total {
  margin-top: 0;
  border-top: 0;
  padding-top: 9px;
}

/* 请求 ID 与普通字段同一行，仅保留等宽字体 */
.log-detail-row.is-id dd {
  font-family: var(--mono);
  font-size: 8.5px;
  text-align: right;
  overflow-wrap: anywhere;
}

/* 范围按钮箭头：光学居中，略向上收 */
.usage-range-chev {
  top: -0.5px;
}

/* 日期弹层：压缩留白 */
.logs-page .log-date-pop {
  padding: 9px;
}
.log-date-fields {
  gap: 4px;
}
.log-date-field {
  height: 32px;
}
.cal-head {
  margin: 6px 0 3px;
}
.cal-day {
  height: 22px;
}
.log-date-hint {
  margin-top: 4px;
}
.log-date-err.is-empty {
  display: none;
}
.log-date-actions {
  margin-top: 6px;
}

/* 用量明细交互动效 */
.logs-page button {
  -webkit-tap-highlight-color: transparent;
}
.logs-page button:not(:disabled) {
  transition:
    transform 0.12s ease,
    background-color 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}
.logs-page button:not(:disabled):active {
  transform: scale(0.96);
}
.logs-page .usage-range-trigger:active {
  transform: scale(0.97);
}
.logs-page .usage-bill-row:active {
  transform: none;
  background: #f6f3e8;
}
.logs-page .usage-bill-row {
  transition: background-color 0.14s ease;
}
.logs-page .usage-key-option:active {
  transform: none;
  background: #e8efdf;
}
.logs-page .cal-day:active {
  transform: scale(0.9);
}
.usage-status-chip,
.usage-status-tabs,
.usage-filter-trigger,
.usage-icon-action,
.usage-range-trigger {
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.12s ease;
}
.usage-key-menu {
  transform-origin: top right;
  animation: usageKeyMenuIn 0.16s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes usageKeyMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.page-enter:has(.logs-page):not(.is-detail):not(.is-return) {
  animation: usagePageIn 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes usagePageIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .logs-page button:not(:disabled):active,
  .logs-page .cal-day:active,
  .logs-page .usage-range-trigger:active {
    transform: none;
  }
  .usage-key-menu,
  .page-enter:has(.logs-page):not(.is-detail):not(.is-return) {
    animation: none;
  }
  .logs-page .usage-bill-row {
    transition: none;
  }
}

/* 用量明细：方案 C 骨架刷新 */
@keyframes usageSkeletonShimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes usageRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}
.usage-refresh-btn.is-spinning svg {
  animation: usageRefreshSpin 0.7s linear infinite;
}
.usage-summary-top b,
.usage-summary-metrics b,
.usage-bill-model,
.usage-bill-cost,
.usage-bill-meta {
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}
.logs-page.is-refreshing .usage-summary-top b {
  width: 112px;
  height: 23px;
  color: transparent !important;
  border-radius: 99px;
  background: linear-gradient(90deg, #eee8db 25%, #f7f4e9 50%, #eee8db 75%);
  background-size: 200% 100%;
  animation: usageSkeletonShimmer 1s linear infinite;
}
.logs-page.is-refreshing .usage-summary-metrics b {
  width: 62%;
  height: 12px;
  margin-top: 3px;
  color: transparent !important;
  border-radius: 99px;
  background: linear-gradient(90deg, #eee8db 25%, #f7f4e9 50%, #eee8db 75%);
  background-size: 200% 100%;
  animation: usageSkeletonShimmer 1s linear infinite;
}
.logs-page.is-refreshing .usage-bill-row {
  min-height: 56px;
}
.logs-page.is-refreshing .usage-bill-model,
.logs-page.is-refreshing .usage-bill-cost,
.logs-page.is-refreshing .usage-bill-meta {
  color: transparent !important;
  border-radius: 99px;
  background: linear-gradient(90deg, #eee8db 25%, #f7f4e9 50%, #eee8db 75%);
  background-size: 200% 100%;
  animation: usageSkeletonShimmer 1s linear infinite;
}
.logs-page.is-refreshing .usage-bill-model {
  width: 42%;
  height: 12px;
  align-self: center;
}
.logs-page.is-refreshing .usage-bill-cost {
  width: 54px;
  height: 10px;
  align-self: center;
  justify-self: end;
}
.logs-page.is-refreshing .usage-bill-meta {
  width: 64%;
  height: 8px;
  margin-top: 3px;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n + 1) .usage-bill-model {
  width: 36%;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n + 2) .usage-bill-model {
  width: 48%;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n) .usage-bill-meta {
  width: 58%;
}
.logs-page.is-refreshing .usage-desktop {
  opacity: 0.4;
  transition: opacity 0.16s ease;
}
@media (prefers-reduced-motion: reduce) {
  .usage-refresh-btn.is-spinning svg,
  .usage-summary-top b,
  .usage-summary-metrics b,
  .usage-bill-model,
  .usage-bill-cost,
  .usage-bill-meta {
    animation: none !important;
  }
}

/* 骨架只覆盖内容，不改变任何布局尺寸 */
.logs-page.is-refreshing .usage-summary-top b,
.logs-page.is-refreshing .usage-summary-metrics b,
.logs-page.is-refreshing .usage-bill-model,
.logs-page.is-refreshing .usage-bill-cost,
.logs-page.is-refreshing .usage-bill-meta {
  width: auto !important;
  height: auto !important;
  background: none !important;
  animation: none !important;
  border-radius: 0 !important;
  position: relative;
}
.logs-page.is-refreshing .usage-summary-top b::after,
.logs-page.is-refreshing .usage-summary-metrics b::after,
.logs-page.is-refreshing .usage-bill-model::after,
.logs-page.is-refreshing .usage-bill-cost::after,
.logs-page.is-refreshing .usage-bill-meta::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 10px;
  border-radius: 99px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, #eee8db 25%, #f7f4e9 50%, #eee8db 75%);
  background-size: 200% 100%;
  animation: usageSkeletonShimmer 1s linear infinite;
}
.logs-page.is-refreshing .usage-summary-top b::after {
  width: 112px;
  height: 23px;
}
.logs-page.is-refreshing .usage-summary-metrics b::after {
  width: 62%;
}
.logs-page.is-refreshing .usage-bill-model::after {
  width: 42%;
  height: 11px;
}
.logs-page.is-refreshing .usage-bill-cost::after {
  left: auto;
  right: 0;
  width: 54px;
  height: 10px;
}
.logs-page.is-refreshing .usage-bill-meta::after {
  width: 64%;
  height: 8px;
}
.logs-page.is-refreshing .usage-bill-row {
  min-height: 0 !important;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n + 1) .usage-bill-model::after {
  width: 36%;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n + 2) .usage-bill-model::after {
  width: 48%;
}
.logs-page.is-refreshing .usage-bill-row:nth-child(3n) .usage-bill-meta::after {
  width: 58%;
}
@media (prefers-reduced-motion: reduce) {
  .logs-page.is-refreshing .usage-summary-top b::after,
  .logs-page.is-refreshing .usage-summary-metrics b::after,
  .logs-page.is-refreshing .usage-bill-model::after,
  .logs-page.is-refreshing .usage-bill-cost::after,
  .logs-page.is-refreshing .usage-bill-meta::after {
    animation: none !important;
  }
}

/* 去掉旧骨架规则残留的行高偏移 */
.logs-page.is-refreshing .usage-bill-model,
.logs-page.is-refreshing .usage-bill-cost,
.logs-page.is-refreshing .usage-bill-meta {
  margin: 0 !important;
  align-self: auto !important;
}

/* 状态标签：滑块 + 对应内容入场 */
.usage-status-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.usage-status-thumb {
  position: absolute;
  z-index: 0;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 3);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 63, 49, 0.07);
  transform: translateX(calc(var(--status-index) * 100%));
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.usage-status-chip {
  position: relative;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
}
.usage-status-chip.on {
  background: transparent !important;
  box-shadow: none !important;
}
@keyframes statusAllIn {
  0% {
    opacity: 0;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes statusSuccessIn {
  0% {
    opacity: 0;
    transform: translateY(4px);
    background: #eaf2e4;
  }
  100% {
    opacity: 1;
    transform: none;
    background: transparent;
  }
}
@keyframes statusFailIn {
  0% {
    opacity: 0;
    transform: translateX(-4px);
    background: #f8eae5;
  }
  100% {
    opacity: 1;
    transform: none;
    background: transparent;
  }
}
@keyframes successRatePulse {
  0% {
    transform: scale(1);
  }
  45% {
    color: #2f5b4a;
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes failEmptyShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  55% {
    transform: translateX(2px);
  }
  80% {
    transform: translateX(-1px);
  }
}
.logs-page[data-status="all"] .usage-bill-row,
.logs-page[data-status="all"] .usage-table tbody tr {
  animation: statusAllIn 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
  animation-delay: calc(min(var(--i), 12) * 10ms);
}
.logs-page[data-status="ok"] .usage-bill-row,
.logs-page[data-status="ok"] .usage-table tbody tr {
  animation: statusSuccessIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
  animation-delay: calc(min(var(--i), 12) * 10ms);
}
.logs-page[data-status="fail"] .usage-bill-row,
.logs-page[data-status="fail"] .usage-table tbody tr {
  animation: statusFailIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
  animation-delay: calc(min(var(--i), 12) * 10ms);
}
.logs-page[data-status="ok"] .usage-summary-metrics > div:nth-child(4) b {
  animation: successRatePulse 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.logs-page[data-status="fail"] .usage-empty {
  animation: failEmptyShake 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.logs-page[data-status="fail"] .usage-empty-ico {
  background: #f7e9e4;
  color: var(--danger);
}
@media (prefers-reduced-motion: reduce) {
  .usage-status-thumb {
    transition: none;
  }
  .logs-page[data-status] .usage-bill-row,
  .logs-page[data-status] .usage-table tbody tr,
  .logs-page[data-status="ok"] .usage-summary-metrics > div:nth-child(4) b,
  .logs-page[data-status="fail"] .usage-empty {
    animation: none;
  }
}

/* 状态切换统一走骨架；移除标签专属入场和失败抖动 */
.logs-page[data-status] .usage-bill-row,
.logs-page[data-status] .usage-table tbody tr,
.logs-page[data-status="ok"] .usage-summary-metrics > div:nth-child(4) b,
.logs-page[data-status="fail"] .usage-empty {
  animation: none !important;
}
.logs-page[data-status="fail"] .usage-empty-ico {
  background: var(--surface-2);
  color: #809184;
}
.logs-page.is-refreshing .usage-status-tabs,
.logs-page.is-refreshing .usage-filter-trigger {
  pointer-events: none;
}

/* 骨架出现时文字必须立即消失，避免与骨架叠加 */
.logs-page.is-refreshing .usage-summary-top b,
.logs-page.is-refreshing .usage-summary-metrics b,
.logs-page.is-refreshing .usage-bill-model,
.logs-page.is-refreshing .usage-bill-cost,
.logs-page.is-refreshing .usage-bill-meta {
  transition: none !important;
}

/* 模型广场：轻量列表，不显示类型/简介，只保留上下文 */
.mgl .vgh {
  margin: 13px 0 2px;
  font-size: 8px;
  letter-spacing: 0.15em;
}
.mgl .vgh:after {
  display: none;
}
.mgl .vgh-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}
.mgl .mg2 {
  padding: 9px 0 10px;
}
.mgl .mg2-sep {
  border-bottom: 0;
}
.mgl .ctxp {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 1px 5px;
  border: 1px solid #b9c7b7;
  border-radius: 4px;
  background: #f4f7ef;
  color: #355747;
  font-family: inherit;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0;
}
.mgl .ctxp em {
  color: #829284;
  font-size: 6.5px;
  font-style: normal;
  font-weight: 400;
}
.mgl .mg2-p {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  font-family: inherit;
  font-size: 7px;
  letter-spacing: 0;
  color: var(--muted);
}
.mgl .mg2-p span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
}
.mgl .mg2-p b {
  color: var(--ink);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
}
.mgl .mg2-p b i {
  font-size: 6.5px;
}

/* 覆盖纸感主题的模型行虚线 */
html[data-theme="paper"] .mgl .mg2-sep,
html[data-theme="paper"] .mgl .mg2 {
  border-bottom: 0 !important;
}

/* 模型价格：输入/输出/缓存三等分，左对齐 */
.mgl .mg2-p {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.mgl .mg2-p span {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
}

/* 模型价格：输入/输出/缓存三等分，左对齐 */
.mgl .mg2-p {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.mgl .mg2-p span {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
}
/* 每个模型之间一条轻分隔线，组内最后一个不加 */
html[data-theme="paper"] .mgl .mg2-sep {
  border-bottom: 1px solid var(--rule) !important;
}
.mgl .mg2-sep {
  border-bottom: 1px solid var(--rule);
}

/* 厂商与厂商之间用虚线分隔 */
.mgl > div + div {
  border-top: 1px dashed var(--border);
}
.mgl > div + div .vgh {
  margin-top: 10px;
}

/* 模型广场：恢复原版字号与厂商标题，保留上下文和厂商虚线 */
.mgl .vgh {
  margin: 14px 0 2px;
  font-size: 10px;
  letter-spacing: 0.24em;
}
.mgl .vgh:after {
  content: "";
  display: block;
  flex: 1;
  height: 2px;
  background: var(--rule);
}
.mgl .vgh-count {
  font-size: 7.5px;
  letter-spacing: 0.04em;
}
.mgl .mg2 {
  padding: 10px 0;
}
.mgl .mg2-h b {
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.mgl .ctxp {
  padding: 1px 8px;
  border: 2px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.mgl .ctxp em {
  color: var(--muted);
  font-size: 7px;
}
.mgl .mg2-p {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
}
.mgl .mg2-p b {
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mgl .mg2-p b i {
  font-size: 9.5px;
  font-weight: 500;
}

/* 厂商名保持数据原始大小写，不再显示数量 */
.mgl .vgh {
  text-transform: none;
  letter-spacing: 0.18em;
}
/* 移除厂商之间的虚线 */
.mgl > div + div {
  border-top: 0;
}
.mgl > div + div .vgh {
  margin-top: 14px;
}
/* 上下文更轻量 */
.mgl .ctxp {
  padding: 1px 5px;
  border: 1px solid #d8dfd2;
  border-radius: 4px;
  background: #f5f7f1;
  color: #7b8a7e;
  font-size: 8px;
  font-weight: 500;
}
.mgl .ctxp em {
  color: #9aa69c;
  font-size: 6px;
}

/* 收紧厂商分组之间的空白 */
.mgl > div > .mg2:last-child {
  padding-bottom: 4px;
}
.mgl > div + div .vgh {
  margin-top: 5px;
}

/* 使用文档：快速入口、接入信息和可复制代码 */
.doc-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
}
.doc-card-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.doc-num {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
}
.doc-arrow {
  color: var(--muted);
  font-size: 13px;
  transition: transform 0.16s ease;
}
.doc-card:hover .doc-arrow {
  transform: translateX(2px);
}
.doc-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.doc-fact {
  min-width: 0;
  padding: 11px 13px;
  border-left: 1px solid var(--border);
}
.doc-fact:first-child {
  border-left: 0;
}
.doc-fact span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}
.doc-fact code {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-codebox {
  margin-top: 13px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--text);
}
.doc-codehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.doc-copy {
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
  background: transparent;
  color: var(--bg);
  font: inherit;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0;
  cursor: pointer;
}
.doc-copy:active {
  background: rgba(255, 255, 255, 0.1);
}
.doc-codebox .doc-code {
  margin: 0;
  padding: 13px;
  border-radius: 0;
  background: transparent;
}
.doc-hint {
  margin-top: 7px !important;
  color: var(--muted);
  font-size: 9.5px !important;
}
.doc-faq-item {
  border-top: 1px solid var(--border);
}
.doc-faq-item:last-child {
  border-bottom: 1px solid var(--border);
}
.doc-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.doc-faq-item summary::-webkit-details-marker {
  display: none;
}
.doc-faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
}
.doc-faq-item[open] summary::after {
  content: "−";
}
.doc-faq-item p {
  margin: -1px 0 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
@media (max-width: 640px) {
  .doc-facts {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }
  .doc-fact {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 9px 12px;
  }
  .doc-fact:first-child {
    border-top: 0;
  }
  .doc-codehead {
    padding: 5px 11px;
  }
  .doc-codebox .doc-code {
    padding: 11px;
    font-size: 10px;
  }
  .doc-card {
    padding: 12px 13px;
  }
}

/* 文档页：聚焦调用方式，收窄左右留白 */
.doc-page {
  max-width: 1120px;
  padding: 34px 28px 60px;
}
.doc-page .doc-facts {
  margin-top: 20px;
}
.doc-page .doc-section {
  margin-top: 24px;
}
@media (max-width: 640px) {
  .doc-page {
    padding: 22px 14px 46px;
  }
}

/* 使用文档：完整 API 接入页 */
.docs-page {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 44px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 28px 64px;
}
.docs-side {
  position: sticky;
  top: 28px;
  align-self: start;
  padding-top: 8px;
}
.docs-side-inner {
  border-left: 1px solid var(--border);
  padding-left: 15px;
}
.docs-side-title {
  display: block;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}
.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-nav a {
  padding: 5px 0;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
  transition: color 0.15s ease;
}
.docs-nav a:hover {
  color: var(--text);
}
.docs-side-meta {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.docs-content {
  min-width: 0;
}
.docs-hero {
  position: relative;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--border);
}
.docs-kicker {
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.docs-hero h1 {
  margin: 7px 0 8px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.docs-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.docs-version {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-top: 12px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}
.docs-section {
  margin-top: 35px;
  scroll-margin-top: 84px;
}
.docs-sec-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 10px;
}
.docs-sec-num {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}
.docs-section h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.docs-copyline {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}
.docs-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.docs-facts > div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--border);
}
.docs-facts > div:first-child {
  border-left: 0;
}
.docs-facts span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}
.docs-facts code {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-tabs {
  display: inline-flex;
  gap: 2px;
  margin: 15px 0 8px;
  padding: 2px;
  border-radius: 7px;
  background: var(--soft);
}
.docs-tab {
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.docs-tab.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 63, 49, 0.07);
}
.docs-codebox {
  overflow: hidden;
  border-radius: 10px;
  background: var(--text);
}
.docs-codehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.docs-copy {
  height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: transparent;
  color: var(--bg);
  font: inherit;
  font-family: var(--font);
  font-size: 8.5px;
  letter-spacing: 0;
  cursor: pointer;
}
.docs-copy:active {
  background: rgba(255, 255, 255, 0.1);
}
.docs-code {
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 12px;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.7;
}
.docs-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.docs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 10px;
}
.docs-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  text-align: left;
}
.docs-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  line-height: 1.5;
}
.docs-table tbody tr:first-child td {
  border-top: 0;
}
.docs-table .docs-param code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}
.docs-note {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}
.docs-note code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}
.docs-errors {
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.docs-error-row {
  display: grid;
  grid-template-columns: 42px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.docs-error-row code {
  color: var(--danger);
  font-family: var(--mono);
  font-size: 9px;
}
.docs-error-row b {
  font-size: 10px;
  font-weight: 600;
}
.docs-error-row span {
  color: var(--muted);
  font-size: 9.5px;
}
@media (max-width: 820px) {
  .docs-page {
    display: block;
    max-width: none;
    padding: 18px 14px 46px;
  }
  .docs-side {
    display: none;
  }
  .docs-hero {
    padding-bottom: 20px;
  }
  .docs-hero h1 {
    font-size: 30px;
  }
  .docs-hero p {
    font-size: 11px;
  }
  .docs-section {
    margin-top: 27px;
  }
  .docs-facts {
    grid-template-columns: 1fr;
  }
  .docs-facts > div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
  .docs-facts > div:first-child {
    border-top: 0;
  }
  .docs-tabs {
    display: flex;
    width: 100%;
  }
  .docs-tab {
    flex: 1;
    padding: 0 5px;
  }
  .docs-code {
    padding: 10px;
    font-size: 8.5px;
  }
  .docs-error-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 3px 8px;
  }
  .docs-error-row span {
    grid-column: 2;
  }
}

/* 文档代码语言标签：避免被全局表单字号覆盖 */
.docs-page .docs-tab {
  font-family: var(--font);
  font-size: 9px !important;
  font-weight: 400;
  line-height: 1;
}
.docs-page .docs-tab.on {
  font-weight: 600;
}

/* 文档页：减少左右留白，补充安全提示 */
.docs-page {
  max-width: 1260px;
  padding: 28px 20px 60px;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 32px;
}
.docs-security {
  margin-top: 9px;
  padding: 8px 10px;
  border-left: 2px solid #b68a55;
  background: #f7f2e6;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
@media (max-width: 820px) {
  .docs-page {
    max-width: none;
    padding: 16px 12px 44px;
  }
}

/* 使用文档：单栏轻量版 */
.dc-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}
.dc-hero h1 {
  margin: 0 0 7px;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.dc-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.dc-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.dc-meta > div {
  min-width: 0;
  padding: 9px 12px;
  border-left: 1px solid var(--border);
}
.dc-meta > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.dc-meta span {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
}
.dc-meta code {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-section {
  margin-top: 30px;
}
.dc-section h2 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.dc-copyline {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.dc-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 0 6px;
}
.dc-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: var(--soft);
}
.dc-tab {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.dc-tab.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 63, 49, 0.07);
}
.dc-copy {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}
.dc-codebox {
  overflow: hidden;
  border-radius: 8px;
  background: var(--text);
}
.dc-codebox pre {
  margin: 0;
  padding: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
}
.dc-codebox.is-response {
  margin-top: 9px;
}
.dc-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}
.dc-table-wrap {
  margin-top: 2px;
  overflow-x: auto;
}
.dc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}
.dc-table th {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 7px;
  font-weight: 500;
  text-align: left;
}
.dc-table td {
  padding: 7px 8px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  line-height: 1.5;
}
.dc-table tbody tr:first-child td {
  border-top: 0;
}
.dc-table code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 8px;
}
@media (max-width: 640px) {
  .dc-page {
    padding: 20px 12px 46px;
  }
  .dc-hero h1 {
    font-size: 30px;
  }
  .dc-meta {
    grid-template-columns: 1fr;
  }
  .dc-meta > div {
    padding: 8px 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
  .dc-meta > div:first-child {
    border-top: 0;
  }
  .dc-table {
    min-width: 520px;
  }
  .dc-codebox pre {
    padding: 10px;
    font-size: 8.5px;
  }
}

.dc-page .dc-tab {
  font-family: var(--font);
  font-size: 8px !important;
  line-height: 1;
}
.dc-page .dc-tab.on {
  font-weight: 600;
}

/* 文档单栏：进一步减少左右留白 */
.dc-page {
  max-width: 1180px;
  padding: 32px 16px 62px;
}
@media (max-width: 640px) {
  .dc-page {
    padding: 20px 12px 46px;
  }
}

/* 文档页：去掉外层 landing 留白 */
.landing-main:has(.dc-page) {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 640px) {
  .dc-page {
    padding: 18px 8px 44px;
  }
}

/* 管理端用户列表：补状态与最近活跃 */
.adm-user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.adm-user-status,
.adm-user-last {
  font-style: normal;
  font-size: 8.5px;
  line-height: 1.4;
}
.adm-user-status {
  padding: 1px 5px;
  border-radius: 3px;
  background: #e8efdf;
  color: #355747;
}
.adm-user-status.is-bad {
  background: #f8e9e4;
  color: var(--danger);
}
.adm-user-last {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 管理端数据总览 */
.adm-range {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 7px;
  background: var(--soft);
}
.adm-range-btn {
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.adm-range-btn.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 63, 49, 0.07);
}
.adm-dash-stats {
  margin-bottom: 12px;
}
.adm-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 12px;
}
.adm-dash .card.panel {
  padding: 14px 16px;
}
.adm-dash .panel-head {
  margin-bottom: 8px;
}
.adm-dash .spend-panel {
  min-width: 0;
}
.adm-share-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.adm-share-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 62px 34px;
  gap: 7px;
  align-items: center;
}
.adm-share-no {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}
.adm-share-name {
  overflow: hidden;
  color: var(--text);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-share-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7e8d9;
}
.adm-share-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
}
.adm-share-row b {
  color: var(--muted);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.adm-dash-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.adm-recent-list,
.adm-channel-list {
  display: flex;
  flex-direction: column;
}
.adm-recent-row,
.adm-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-top: 1px solid var(--rule);
}
.adm-recent-row:first-child,
.adm-channel-row:first-child {
  border-top: 0;
}
.adm-recent-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
}
.adm-recent-main,
.adm-channel-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}
.adm-recent-main b,
.adm-channel-main b {
  overflow: hidden;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-recent-main span,
.adm-channel-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-recent-state {
  flex: none;
  padding: 1px 5px;
  border-radius: 3px;
  background: #e8efdf;
  color: #355747;
  font-size: 7.5px;
}
.adm-recent-state.is-bad {
  background: #f8e9e4;
  color: var(--danger);
}
.adm-recent-date {
  flex: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
}
.adm-channel-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #6f8a77;
}
.adm-channel-dot.is-off {
  background: #b9b3a3;
}
.adm-channel-keys {
  flex: none;
  color: var(--muted);
  font-size: 8px;
}
@media (max-width: 900px) {
  .adm-dash-grid,
  .adm-dash-bottom {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .adm-dash .card.panel {
    padding: 12px;
  }
  .adm-range-btn {
    padding: 0 8px;
  }
}

/* 全站页面铺满：去掉整页居中宽度限制 */
.landing-header-inner,
.landing-main,
.landing-footer,
.landing-footer-simple,
.landing-menu-top {
  max-width: none !important;
}
.landing-main {
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}
.mgl,
.uc-sub,
.dc-page,
.doc-page,
.about-page {
  width: 100%;
  max-width: none !important;
}
@media (max-width: 640px) {
  .landing-main {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* 管理端：去掉 page-enter 外层留白，铺满主内容区 */
.page-enter:has(.adm-page) {
  padding-left: 0;
  padding-right: 0;
}
@media (max-width: 640px) {
  .adm-page {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* 管理端总览指标：保留 Token 正常大小写 */
.adm-dash-stats .stat .k {
  text-transform: none;
  letter-spacing: 0.04em;
}

/* 管理端数据总览：与用户端同构的完整布局 */
.adm-dash-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.adm-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
}
.adm-updated i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6f8a77;
}
.adm-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.adm-refresh:hover {
  color: var(--text);
  border-color: var(--text);
}
.adm-stat-delta {
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}
.adm-stat-delta.up {
  color: var(--success);
}
.adm-stat-delta.down {
  color: var(--danger);
}
.adm-stat-delta em {
  color: var(--muted);
  font-style: normal;
}
.adm-share {
  display: flex;
  flex-direction: column;
}
.adm-share-list {
  margin-bottom: auto;
}
.adm-share-summary {
  display: flex;
  gap: 20px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.adm-share-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-share-summary span {
  color: var(--muted);
  font-size: 7.5px;
}
.adm-share-summary b {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.adm-recent-calls {
  margin-top: 12px;
  padding-bottom: 16px;
}
.adm-recent-calls .panel-head {
  margin-bottom: 10px;
}
.adm-recent-calls .request-timeline {
  margin-top: 2px;
}
@media (max-width: 640px) {
  .adm-dash-tools {
    width: 100%;
  }
  .adm-updated {
    margin-left: 2px;
  }
}

/* 管理端总览：显示环比 */
.adm-dash-stats .stat .d {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}

/* 管理端总览：平台级补充 */
.adm-share-note {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 7.5px;
}
.adm-share-note b {
  color: var(--ink);
  font-size: 10px;
}
.adm-anomalies {
  margin-top: 12px;
  padding-bottom: 14px;
}
.adm-anomaly-list {
  display: flex;
  flex-direction: column;
}
.adm-anomaly-row {
  display: grid;
  grid-template-columns: 7px 42px minmax(0, 1fr) 90px 62px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-top: 1px solid var(--rule);
}
.adm-anomaly-row:first-child {
  border-top: 0;
}
.adm-anomaly-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}
.adm-anomaly-time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}
.adm-anomaly-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.adm-anomaly-main b {
  font-size: 9px;
}
.adm-anomaly-main span {
  overflow: hidden;
  color: var(--danger);
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-anomaly-user {
  color: var(--muted);
  font-size: 8px;
}
.adm-anomaly-cost {
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.adm-anomaly-empty {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}
@media (max-width: 640px) {
  .adm-anomaly-row {
    grid-template-columns: 7px 38px minmax(0, 1fr) 58px;
  }
  .adm-anomaly-user {
    display: none;
  }
}

/* 管理端总览：手机端趋势标题不被摘要挤断 */
@media (max-width: 640px) {
  .adm-trend .panel-head {
    flex-wrap: wrap;
    gap: 2px 8px;
    align-items: flex-start;
  }
  .adm-trend .panel-head .sp {
    display: none;
  }
  .adm-trend .panel-head .small {
    flex-basis: 100%;
    line-height: 1.4;
  }
}

/* 管理端总览：异常调用详情 */
.adm-anomaly-row {
  grid-template-columns: 7px 42px minmax(0, 1fr) 76px 90px 62px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.15s var(--e-soft);
}
.adm-anomaly-row:hover,
.adm-anomaly-row:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.adm-anomaly-channel {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-detail {
  padding: 2px 0;
}
.adm-detail-failure {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #ecd5cd;
  border-radius: 7px;
  background: #fbf0ec;
}
.adm-detail-failure span {
  padding: 1px 5px;
  border-radius: 3px;
  background: #f1d9d1;
  color: var(--danger);
  font-size: 8px;
}
.adm-detail-failure b {
  color: var(--danger);
  font-size: 9px;
}
.adm-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.adm-detail-item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.adm-detail-item span {
  display: block;
  color: var(--muted);
  font-size: 7.5px;
}
.adm-detail-item b {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-detail-item b.is-mono {
  font-family: var(--mono);
  font-size: 8.5px;
}
.adm-detail-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .adm-anomaly-row {
    grid-template-columns: 7px 38px minmax(0, 1fr) 62px 54px;
  }
  .adm-anomaly-user {
    display: none;
  }
  .adm-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 管理端补齐：订单、日志、权限、设置 */
.adm-table-card{padding:0;overflow:hidden}
.adm-table-wrap{overflow-x:auto}
.adm-table{width:100%;min-width:840px;border-collapse:collapse;font-size:9px}
.adm-table th{padding:9px 10px;border-bottom:1px solid var(--rule);background:var(--surface-2);color:var(--muted);font-size:7.5px;font-weight:500;text-align:left;white-space:nowrap}
.adm-table td{padding:9px 10px;border-top:1px solid var(--rule);vertical-align:middle}
.adm-table tbody tr:hover{background:var(--surface-2)}
.adm-table td b{display:block;font-size:9px}
.adm-table td small{display:block;color:var(--muted);font-size:7px;margin-top:1px}
.adm-table .is-mono{font-family:var(--mono);font-size:8px;color:var(--muted);white-space:nowrap}
.adm-table .is-muted{color:var(--muted);font-size:8px;white-space:nowrap}
.adm-table .is-money{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.adm-order-summary{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.adm-order-summary span{padding:7px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--muted);font-size:8px}
.adm-order-summary b{color:var(--ink);font-size:10px;margin-left:3px}
.adm-link-btn{border:0;background:transparent;color:var(--muted);font:inherit;font-size:8.5px;cursor:pointer;padding:2px 0}
.adm-link-btn:hover{color:var(--ink);text-decoration:underline}
.adm-filter-select{height:34px;min-width:110px;font-size:8.5px}
.adm-create-form{display:grid;gap:10px}
.adm-role-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px}
.adm-role-side{padding:12px}
.adm-role-main{padding:14px}
.adm-role-list{display:flex;flex-direction:column;gap:3px;margin-top:8px}
.adm-role-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 8px;border:0;border-radius:6px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.adm-role-item:hover,.adm-role-item.on{background:var(--surface-2)}
.adm-role-item b{font-size:9px}.adm-role-item span{color:var(--muted);font-size:7.5px}.adm-role-item small{color:var(--muted);font-size:7px}
.adm-role-desc{margin:0 0 12px;color:var(--muted);font-size:8.5px}
.adm-perm-groups{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.adm-perm-group{border:1px solid var(--rule);border-radius:6px;padding:8px}
.adm-perm-group>b{font-size:8.5px}
.adm-perm-items{display:flex;flex-direction:column;gap:4px;margin-top:5px}
.adm-perm-item{display:flex;align-items:center;gap:5px;font-size:8px;color:var(--muted)}
.adm-settings-card{padding:14px 16px;margin-bottom:12px}
.adm-settings-body{display:grid;gap:9px}
.adm-field{display:flex;flex-direction:column;gap:4px;font-size:8px;color:var(--muted)}
.adm-field .input{font-size:9px}
.adm-check{display:flex;align-items:center;gap:5px;font-size:8.5px;color:var(--text)}
.adm-about-textarea{width:100%;font-size:9px;resize:vertical}
@media(max-width:760px){.adm-role-layout{grid-template-columns:1fr}.adm-perm-groups{grid-template-columns:1fr}.adm-table{min-width:760px}}
.adm-click-row{cursor:pointer}
.adm-orders-page .page-head .actions,
.adm-logs-page .page-head .actions{flex-wrap:wrap;justify-content:flex-end}
.adm-orders-page .page-head .actions .u-seg,
.adm-logs-page .page-head .actions .u-seg{width:auto;flex:none;white-space:nowrap}
.adm-orders-page .page-head .actions .sbox,
.adm-logs-page .page-head .actions .sbox{flex:0 1 280px;min-width:180px}
.adm-settings-body>.btn{justify-self:start;width:auto}
/* 用户管理：操作区改成横向工具条 */
.adm-page:has(.adm-row2) .page-head .actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  width: auto;
}
.adm-page:has(.adm-row2) .page-head .actions .sbox {
  flex: 0 1 260px;
  min-width: 180px;
}
.adm-page:has(.adm-row2) .page-head .actions .u-seg {
  width: auto;
  flex: none;
}
/* 头部工具条：强制不竖排、不被挤断 */
#root .page-enter:has(.adm-table-card) .page-head .actions {
  flex-wrap: wrap !important;
  justify-content: flex-end;
  gap: 7px;
}
#root .page-enter:has(.adm-table-card) .page-head .actions .u-seg {
  width: auto !important;
  flex: none !important;
  white-space: nowrap;
}
#root .page-enter:has(.adm-table-card) .page-head .actions .u-seg-b {
  white-space: nowrap;
}
#root .adm-page:has(.adm-row2) .page-head .actions {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions .sbox {
  flex: 0 1 260px !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions .u-seg {
  width: auto !important;
  flex: none !important;
}
#root .adm-page:has(.adm-row2) .page-head .actions .btn {
  width: auto !important;
}
.adm-pager{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:10px 2px 0;color:var(--muted);font-size:8px}
.adm-pager button{height:26px;padding:0 8px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-size:8px;cursor:pointer}
.adm-pager button:disabled{opacity:.4;cursor:default}

/* 公共模型目录 */
.public-model-page .page-head{display:none}
.public-models-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:30px 0 18px;border-bottom:1px solid var(--border);margin-bottom:16px}
.public-models-head h1{margin:0;font-size:32px;letter-spacing:-.03em}
.public-models-head p{margin:7px 0 0;color:var(--muted);font-size:11px}
.public-models-cta{display:inline-flex;align-items:center;height:34px;padding:0 12px;border:1px solid var(--text);border-radius:6px;color:var(--text);font-size:10px;text-decoration:none;white-space:nowrap}
@media(max-width:640px){.public-models-head{align-items:flex-start;flex-direction:column;gap:12px;padding-top:20px}.public-models-head h1{font-size:26px}}
