
/* ---------- 模型广场（一比一复刻 neartoken.cc/pricing） ---------- */

.market { display: block; }

.market-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin: 14px 0 10px;
  border: 1px solid var(--nt-line); border-radius: 12px; background: rgba(255,255,255,.02);
}

.market-search {
  flex: 1 1 220px; min-width: 160px; height: 30px; padding: 0 10px;
  border: 1px solid var(--nt-line); border-radius: 9px;
  background: rgba(0,0,0,.22); color: var(--nt-ink); font-size: 12px;
}
.market-search::placeholder { color: var(--nt-faint); }
.market-search:focus { outline: 1px solid var(--nt-accent); }

.market-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.market-seg { display: inline-flex; border: 1px solid var(--nt-line); border-radius: 9px; overflow: hidden; }
.market-seg button {
  height: 28px; padding: 0 9px; border: 0; background: transparent;
  color: var(--nt-muted); font-size: 11.5px;
}
.market-seg button + button { border-left: 1px solid var(--nt-line); }
.market-seg button[aria-pressed="true"] { color: var(--nt-ink); background: var(--nt-accent-soft); }

.market-tool {
  height: 28px; padding: 0 10px; border: 1px solid var(--nt-line); border-radius: 9px;
  background: transparent; color: var(--nt-muted); font-size: 11.5px;
}
.market-tool.on { color: var(--nt-ink); border-color: var(--nt-accent); }

.market-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.market { width: 100%; }
/* 卡片列数按右侧实际可用宽度计算，最多两列。 */

.market-aside {
  position: sticky; top: 10px;
  max-height: calc(100vh - 20px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 12px; border: 1px solid var(--nt-line); border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.market-aside h3 { margin: 0; font-size: 13px; }
.market-aside h4 { margin: 14px 0 7px; font-size: 11px; color: var(--nt-muted); font-weight: 600; }
.market-aside .note { font-size: 10.5px; line-height: 1.5; margin: 6px 0 0; }
.ma-head { display: flex; align-items: baseline; justify-content: space-between; }
.ma-head .link { border: 0; background: transparent; padding: 0; }

.market-chips { display: flex; flex-wrap: wrap; gap: 5px; }
/* 左侧筛选栏一律竖排：每个分组/chip 占一行，从上往下读 */
.market-aside .market-chips { flex-direction: column; flex-wrap: nowrap; gap: 6px; align-items: flex-start; }
/* 类型/供应商在左栏有限宽度内横向堆叠，不超出、不撑宽侧栏 */
.market-aside .market-chips.chips-row { flex-direction: row; flex-wrap: wrap; gap: 5px; align-items: center; max-width: 100%; }
.market-aside .chips-row .market-chip { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.market-chip-wrap { position: relative; display: inline-flex; align-items: center; }
.market-chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 25px; padding: 0 8px; border: 1px solid var(--nt-line); border-radius: 999px;
  background: transparent; color: var(--nt-muted); font-size: 10.5px; white-space: nowrap;
}
.market-chip.on, .market-chip-wrap.on > .market-chip {
  color: var(--nt-ink); border-color: var(--nt-accent); background: var(--nt-accent-soft);
}
.market-chip .ratio { font-family: var(--nt-code); color: var(--nt-faint); font-size: 10px; }
.market-chip .gb { display: inline-flex; align-items: center; gap: 3px; }
/* 小标签统一成「低价」那一种样式：同一尺寸、圆角、字重与描边，只换底色。 */
.gb-tag {
  padding: 1px 5px; border-radius: 4px; font-size: 9.5px; line-height: 1.5;
  font-weight: 700; color: #fff; opacity: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,.28);
}
.gb-tag.lvl1, .gb-tag.lvl2, .gb-tag.green { background: #2f8f68; }
.gb-tag.red { background: #b0475c; }
.gb-tag.pink { background: #8b4f9e; }
.gb-tag.blue { background: #3f6fa8; }
.gb-tag.plain { background: #5a6270; }
.gb-tag.gold { background: #b58a2b; }
.gb-tag.slate { background: #4a5568; }
.gb-tag.cyan { background: #3f8fa3; }
.gb-rest { color: var(--nt-ink); }

.chip-toggle {
  width: 16px; height: 24px; padding: 0; border: 0; background: transparent;
  color: var(--nt-faint); font-size: 10px; line-height: 1;
}
.chip-toggle.on { color: #4cc38a; }

.market-main { min-width: 0; container-type: inline-size; }
.market-count { font-size: 13px; font-weight: 600; margin: 2px 0 10px; }
.market-main > .note { margin-top: 10px; }

/* 固定宿主窗口下两张卡并排；右侧不足 470px 时退回一列。
   使用容器宽度而非外层窗口宽度，避免宿主侧栏占位导致误判。 */
.model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
@container (max-width: 469px) { .model-grid { grid-template-columns: minmax(0, 1fr); } }
.model-grid.as-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
/* 列表模式：压缩成紧凑行，隐藏描述/状态条/端点等非核心信息 */
.model-grid.as-list .mc { padding: 8px 12px; min-height: 0; }
.model-grid.as-list .mc-desc,
.model-grid.as-list .mc-stats,
.model-grid.as-list .mc-line:nth-of-type(2),
.model-grid.as-list .mc-detail { display: none; }
.model-grid.as-list .mc-billing { margin: 4px 0; }
.model-grid.as-list .mc-prices { margin-bottom: 6px; }
.model-grid.as-list .mc-line { margin-top: 4px; }

.mc {
  display: flex; flex-direction: column; min-width: 0; cursor: pointer;
  padding: 12px; border: 1px solid var(--nt-line); border-radius: 12px;
  background: rgba(255,255,255,.02); transition: border-color .12s, background .12s, opacity .12s;
}
.mc:hover { border-color: var(--nt-accent); }
.mc.on { border-color: var(--nt-accent); background: var(--nt-accent-soft); }
.mc.off { opacity: .48; }
.mc.off:hover { opacity: .8; }
.mc-flag { flex: none; font-size: 9.5px; color: var(--nt-muted); white-space: nowrap; }
.mc.on .mc-flag { color: var(--nt-accent); font-weight: 600; }

/* 两级标签：功能在前（饱和色），价格/品质在后（柔和色） */
.gb-tag.purple { background: #7b52b8; }
.gb-tag.teal { background: #2f8f8a; }
.chip-group-name.low { color: #4cc38a; font-weight: 700; font-size: 11px; }
.chip-group-name.official { color: var(--magpie-accent, #5b8def); }
.chip-group-name.full { color: var(--magpie-red, var(--nt-rose)); }
.chip-group-name.other { color: var(--magpie-fg-2, var(--nt-muted)); }
.chip-group-name.func { color: #9b7ce0; font-weight: 700; font-size: 11px; }
.chip-group-name.egg { color: #e0b34a; font-weight: 700; font-size: 11px; }
.chip-group-name.empty { color: var(--nt-faint); font-weight: 600; font-size: 11px; }
.market-chip.none { opacity: .45; cursor: default; pointer-events: none; }
.chip-group { width: 100%; margin: 2px 0 4px; }
.chip-group-name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 700; color: var(--nt-faint); margin: 6px 0 3px; letter-spacing: .04em; }
.chip-group-count { font-family: var(--nt-code); font-size: 10px; font-weight: 600; color: var(--nt-faint); letter-spacing: 0; }

/* 分组 chip 保持原单行胶囊，不加任何竖条：
   含启用模型的整块淡绿提亮，全停的整体灰化；蓝框仍专用于当前筛选。 */
.market-chip.group-chip.has-enabled:not(.on) {
  border-color: rgba(76,195,138,.55); background: rgba(76,195,138,.10); color: var(--nt-ink);
}
/* 没有模型走这一组分时明确「熄灭」：降透明 + 去色，避免彩色标签看起来仍像已启用。 */
.market-chip.group-chip.all-off { opacity: .38; filter: grayscale(.85); }
.market-chip.group-chip.all-off:hover { opacity: .55; filter: grayscale(.5); }

/* 选中分组的横幅：与官网一致，标签 + 倍率 + 说明，横跨模型区顶部。 */
.market-group-banner {
  border: 1px solid var(--nt-line); border-radius: 12px;
  background: rgba(255,255,255,.03); padding: 10px 14px; margin: 0 0 12px;
}
.mgb-head { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.mgb-head .gb { display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.mgb-head .gb-tag { flex: none; }
.mgb-head .gb-rest { color: var(--nt-ink); font-weight: 700; }
.mgb-head .ratio { font-family: var(--nt-code); font-size: 11px; color: var(--nt-muted); }
.mgb-desc { margin: 6px 0 0; font-size: 12px; line-height: 1.55; color: var(--nt-muted); }

/* 供应商 chip：品牌图标在前，名称与模型数在后，和官网供应商面板一致。 */
.market-chip.vendor-chip { gap: 5px; }
.market-chip .vendor-icon {
  width: 16px; height: 16px; flex: none; object-fit: contain; border-radius: 3px;
}
.market-chip .vendor-icon-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; background: var(--nt-line); color: var(--nt-muted);
}
.market-chip .vendor-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.market-chip .vendor-count { flex: none; font-family: var(--nt-code); font-size: 10px; color: var(--nt-faint); }
.market-chip.vendor-chip.on .vendor-count { color: var(--nt-ink); }

/* 充值卡：站点「添加资金」缩小版 */
.tp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--nt-line); margin-bottom: 8px; }
.tp-badge { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(76,195,138,.14); color: #4cc38a; font-size: 15px; font-weight: 700; }
.tp-head h2 { font-size: 14px; }
/* 添加资金大卡：跨整行、两栏铺开，高度按内容自然展开 */
.tp-wide { padding: 18px 20px 20px; }
/* 2 列 × 3 行显式网格：每行的左右单元等高，兑换码框与输入金额框平行对齐 */
.tp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 26px; row-gap: 0; margin-top: 4px; }
.tp-cell { min-width: 0; }
.tp-body > .tp-cell:nth-child(3), .tp-body > .tp-cell:nth-child(4) { padding-bottom: 8px; }
.tp-label { display: block; font-size: 10.5px; color: var(--nt-muted); margin: 12px 0 8px; }
.tp-body > .tp-cell:first-child > .tp-label, .tp-body > .tp-cell:nth-child(2) > .tp-label { margin-top: 0; }
.tp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tp-methods { display: flex; flex-direction: column; gap: 8px; }
.tp-method { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--nt-line); border-radius: 10px; background: rgba(255,255,255,.02); color: var(--nt-ink); font-size: 12px; }
.tp-method .tp-na { margin-left: auto; font-size: 10px; color: var(--nt-muted); }
.tp-method[aria-pressed="true"] { border-color: var(--nt-accent); background: var(--nt-accent-soft); }
.tp-method.tp-off-method { opacity: .5; cursor: not-allowed; color: var(--nt-muted); background: rgba(255,255,255,.02); }
.tp-method.tp-off-method .tp-micon { filter: grayscale(1); }
.tp-micon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.tp-micon.ali { background: #1677ff; }
.tp-micon.wx { background: #07c160; }
.tp-custom-row { display: flex; align-items: center; gap: 10px; }
.tp-field { height: 36px; flex: 0 0 auto; }
.tp-field input { width: 100%; font-size: 13px; }
.tp-due { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 11px; border: 1px solid var(--nt-line); border-radius: 9px; font-size: 11px; color: var(--nt-muted); }
.tp-due b { color: var(--nt-ink); font-family: var(--nt-code); font-size: 13px; }
.tp-input { flex: 1; min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--nt-line); border-radius: 9px; background: rgba(0,0,0,.2); color: var(--nt-ink); font-size: 12px; }
.tp-wide > .note { margin-top: 14px; }
@media (max-width: 860px) { .tp-body { grid-template-columns: minmax(0, 1fr); } .tp-cell { padding-bottom: 8px; } }
@media (max-width: 620px) { .tp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tp-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-height: 64px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--nt-line); border-radius: 10px; background: rgba(255,255,255,.02); color: var(--nt-ink);
}
.tp-tile b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tp-tile .tp-pay { font-size: 10px; color: var(--nt-muted); }
.tp-tile .tp-off { position: absolute; right: 8px; top: 8px; font-size: 9.5px; color: #4cc38a; }
.tp-tile[aria-pressed="true"] { border-color: var(--nt-accent); background: var(--nt-accent-soft); box-shadow: inset 0 0 0 1px var(--nt-accent); }

/* 推荐计划长条卡 */
.rf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rf-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(155,124,224,.16); color: #9b7ce0; font-size: 16px; }
.rf-text { flex: 1 1 240px; }
.rf-text h2 { font-size: 13px; }
.rf-invites { text-align: center; min-width: 54px; }
.rf-invites .k { font-size: 10px; color: var(--nt-muted); }
.rf-invites .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rf-link { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--nt-line); border-radius: 10px; background: rgba(0,0,0,.2); overflow: hidden; }
.rf-link span { font-family: var(--nt-code); font-size: 11.5px; color: var(--nt-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-copy { width: 36px; height: 36px; border: 1px solid var(--nt-accent); border-radius: 10px; background: var(--nt-accent-soft); color: var(--nt-accent); font-size: 15px; }
@media (max-width: 620px) { .tp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mc-image { border-color: rgba(139,79,158,.5); }
.mc-video { border-color: rgba(214,140,60,.5); }
.mc-audio { border-color: rgba(63,111,168,.5); }
.mc-embedding { border-color: rgba(47,143,104,.5); }

.mc-head { display: flex; align-items: center; gap: 8px; }
.mc-head > .grow { min-width: 0; }
.mc .gb { min-width: 0; overflow-wrap: anywhere; }
.mc-line .v { min-width: 0; overflow-wrap: anywhere; }
.mc-vicon {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nt-accent-soft); color: var(--nt-accent); font-size: 12px; font-weight: 700;
}
.mc-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-vendor { font-size: 10px; color: var(--nt-muted); }
.mc-copy { border: 0; background: transparent; color: var(--nt-faint); font-size: 13px; padding: 2px 4px; }
.mc-copy:hover { color: var(--nt-accent); }

.mc-desc {
  margin: 9px 0 8px; font-size: 10.5px; line-height: 1.55; color: var(--nt-muted);
  min-height: 32px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mc-billing { font-size: 10.5px; font-weight: 600; margin-bottom: 7px; }
.mc-billing.dyn { color: #e0a44a; }
.mc-billing.flat { color: #5aa9e6; }

.mc-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 9px; }
.mc-prices.one { grid-template-columns: 1fr; }
.mc-prices > div { display: flex; flex-direction: column; gap: 2px; }
.mc-prices span { font-size: 10px; color: var(--nt-muted); }
.mc-prices b { font-family: var(--nt-code); font-size: 11.5px; font-weight: 600; color: var(--nt-ink); }

.mc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 5px 0; font-size: 10px; }
.mc-line .k, .mc-stats .k { color: var(--nt-muted); margin-right: 4px; }
.mc-line .v, .mc-stats .v { color: var(--nt-ink); font-family: var(--nt-code); font-size: 10px; }
.mc-more { color: var(--nt-faint); font-family: var(--nt-code); }

.mc-stats {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--nt-line); font-size: 10px;
}
.mc-stats > span { display: inline-flex; align-items: baseline; gap: 3px; }
.mc-bar { display: inline-flex; gap: 1px; height: 8px; align-items: center; }
.mc-bar i { width: 2px; height: 8px; background: var(--nt-line); border-radius: 1px; }
.mc-bar i.ok { background: #3fbf85; }
.mc-bar i.bad { background: #d08a3c; }
.mc-foot { margin-top: 8px; text-align: right; }

/* 使用日志：仿站点日志页，筛选条 + 统计条 + 全宽明细表 */
.logs { width: 100%; }
.logs-head > .row { padding: 10px 12px; border: 1px solid var(--nt-line); border-radius: 12px; margin-bottom: 10px; }

.logs-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--nt-line); border-radius: 12px; margin-bottom: 8px;
  background: rgba(255,255,255,.02);
}
.lt-field { display: inline-flex; align-items: center; gap: 8px; min-width: 200px; height: 32px; padding: 0 10px;
  border: 1px solid var(--nt-line); border-radius: 9px; color: var(--nt-ink); font-size: 11.5px; }
.lt-ico { color: var(--nt-muted); }
.lt-input { height: 32px; flex: 1 1 160px; min-width: 120px; padding: 0 10px;
  border: 1px solid var(--nt-line); border-radius: 9px; background: rgba(0,0,0,.2);
  color: var(--nt-ink); font-size: 11.5px; }
.lt-input::placeholder { color: var(--nt-faint); }
.lt-select { height: 32px; flex: 0 1 150px; padding: 0 8px;
  border: 1px solid var(--nt-line); border-radius: 9px; background: #1c2027;
  color: var(--nt-ink); font-size: 11.5px; }
.lt-btn { height: 32px; padding: 0 11px; border: 1px solid var(--nt-line); border-radius: 9px;
  background: transparent; color: var(--nt-ink); font-size: 11.5px; white-space: nowrap; }
.lt-btn:hover { border-color: var(--nt-accent); }
.lt-btn.primary { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }

.logs-statbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border: 1px solid var(--nt-line); border-radius: 12px; margin-bottom: 10px; }
.ls-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.ls-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border: 1px solid var(--nt-line); border-radius: 999px; font-size: 10.5px; color: var(--nt-muted); }
.ls-chip b { color: var(--nt-ink); font-family: var(--nt-code); font-variant-numeric: tabular-nums; }
.ls-dot { width: 2px; height: 12px; border-radius: 1px; display: inline-block; }
.ls-dot.blue { background: #5b8def; }
.ls-dot.red { background: #d05a6a; }
.ls-actions { display: flex; align-items: center; gap: 6px; }

.logs-table-wrap { width: 100%; border: 1px solid var(--nt-line); border-radius: 12px; overflow: hidden; }
.logs-table { width: 100%; }
.lt-row { display: grid; grid-template-columns: 90px 90px minmax(140px, 1.6fr) 70px 100px 110px 100px 80px 70px;
  gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--nt-line); font-size: 11px; }
.lt-row:last-child { border-bottom: 0; }
.lt-row.head { color: var(--nt-muted); font-size: 10.5px; background: rgba(255,255,255,.02); }
.lt-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nt-ink); }
.lt-row .num { text-align: right; font-family: var(--nt-code); font-variant-numeric: tabular-nums; color: var(--nt-muted); }
.lt-row > span:not(.who):not(.num) { color: var(--nt-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-empty { padding: 26px; text-align: center; color: var(--nt-muted); font-size: 11.5px; }

.logs-dist { padding: 10px 12px; border: 1px solid var(--nt-line); border-radius: 12px; margin-bottom: 10px; }
.dist-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 110px; gap: 8px; align-items: center; margin: 8px 0; font-size: 10.5px; }
.dist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nt-muted); }
.dist-track { height: 8px; background: rgba(255,255,255,.05); border-radius: 5px; overflow: hidden; }
.dist-track i { display: block; height: 100%; border-radius: 5px; }
.dist-val { text-align: right; font-family: var(--nt-code); color: var(--nt-muted); font-variant-numeric: tabular-nums; }
.logs > .note { margin: 8px 2px 0; }

@media (max-width: 900px) {
  /* 窗口宽度固定，筛选栏与卡片区始终并排；左栏自己滚，不切单列 */
  .lt-row { grid-template-columns: 80px minmax(120px, 1.5fr) 90px 90px 60px; }
  .lt-row > span:nth-child(2), .lt-row > span:nth-child(4), .lt-row > span:nth-child(6), .lt-row > span:nth-child(8) { display: none; }
}
/* ---------- 侧栏可折叠小节（照上游定价页的折叠分组） ---------- */
.market-aside .aside-sec { border-top: 1px solid var(--nt-line); }
.market-aside .aside-sec:first-of-type { border-top: 0; }
.aside-sec-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 2px; border: 0; background: transparent; color: var(--nt-ink);
  font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; text-align: left;
}
.aside-sec-head:hover .aside-sec-title { color: var(--nt-accent); }
.aside-sec-head:focus-visible { outline: 2px solid var(--nt-accent); outline-offset: 2px; border-radius: 6px; }
.aside-sec-title { flex: 1 1 auto; }
.aside-sec-badge {
  flex: none; min-width: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--nt-accent-soft); color: var(--nt-accent);
  font-family: var(--nt-code); font-size: 9.5px; line-height: 15px; text-align: center;
}
/* 展开朝上、收起朝右：和上游定价页的折叠箭头一致 */
.aside-sec-chev { flex: none; color: var(--nt-faint); font-size: 12px; transition: transform .16s ease; transform: rotate(180deg); }
.aside-sec.closed .aside-sec-chev { transform: rotate(0deg); }
.aside-sec.closed .aside-sec-body { display: none; }
.aside-sec-body { padding: 0 0 10px; }
.market-aside .aside-active { color: var(--nt-accent); }

/* ---------- 模型卡片：向上游定价页的卡片层次靠拢 ---------- */
.mc {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  transition: border-color .14s, background .14s, opacity .14s, transform .14s, box-shadow .14s;
}
.mc:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.mc.on { box-shadow: 0 0 0 1px var(--nt-accent) inset, 0 8px 22px rgba(0,0,0,.22); }
.mc-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.mc-vendor { font-size: 10.5px; letter-spacing: .02em; }
.mc-desc {
  margin: 6px 0 8px; font-size: 11.5px; line-height: 1.55; color: var(--nt-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mc-billing {
  align-self: flex-start; margin-bottom: 6px;
  border-radius: 6px; letter-spacing: .02em;
}
.mc-prices > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 3px 0; border-bottom: 1px dashed rgba(127,127,127,.16);
}
.mc-prices > div:last-child { border-bottom: 0; }
.mc-prices > div > span { color: var(--nt-muted); font-size: 10.5px; }
.mc-prices > div > b { font-family: var(--nt-code); font-size: 11.5px; font-weight: 600; color: var(--nt-ink); }
.mc-line { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; min-width: 0; }
.mc-line > .k { flex: none; width: 26px; color: var(--nt-faint); font-size: 10px; line-height: 18px; }
.mc-ends { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.mc-end {
  padding: 1px 6px; border: 1px solid var(--nt-line); border-radius: 6px;
  font-family: var(--nt-code); font-size: 9.5px; line-height: 15px; color: var(--nt-muted);
}
.mc-stats {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--nt-line);
  gap: 10px; font-size: 10px;
}
.mc-stats .v { font-family: var(--nt-code); color: var(--nt-ink); }
.mc-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
.mc-foot .link { font-size: 10.5px; }

@media (prefers-reduced-motion: reduce) {
  .mc, .aside-sec-chev { transition: none; }
  .mc:hover { transform: none; }
}

.mc-vicon-img { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06); }
.mc-vicon-img img { border-radius: 5px; object-fit: contain; }

/* ---------- 使用日志（对齐原站通用日志的筛选条 + 统计条 + 明细） ---------- */
.logs-title { margin: 16px 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.lg-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px; border: 1px solid var(--nt-line); border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.lg-range { position: relative; flex: 1 1 340px; min-width: 240px; }
.lg-range-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid var(--nt-line); border-radius: 9px; background: rgba(0,0,0,.22);
  color: var(--nt-ink); font-size: 11.5px; text-align: left; cursor: pointer;
}
.lg-range-btn:hover, .lg-range-btn.open { border-color: var(--nt-accent); }
.lg-range-btn:focus-visible { outline: 2px solid var(--nt-accent); outline-offset: 2px; }
.lg-ico { color: var(--nt-faint); font-size: 11px; }
.lg-range-text { font-family: var(--nt-code); color: var(--nt-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-cal {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 340px;
  padding: 10px; border: 1px solid var(--nt-line); border-radius: 12px;
  background: var(--magpie-bg, #16181d); box-shadow: 0 16px 40px rgba(0,0,0,.42);
}
.lg-cal-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lg-cal-presets button {
  height: 26px; padding: 0 9px; border: 1px solid var(--nt-line); border-radius: 999px;
  background: transparent; color: var(--nt-muted); font-size: 11px; cursor: pointer;
}
.lg-cal-presets button:hover { color: var(--nt-ink); border-color: var(--nt-accent); }
.lg-cal-fields { display: grid; gap: 8px; }
.lg-cal-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--nt-faint); }
.lg-cal-fields input {
  height: 30px; padding: 0 8px; border: 1px solid var(--nt-line); border-radius: 8px;
  background: rgba(0,0,0,.28); color: var(--nt-ink); font-size: 11.5px; color-scheme: dark;
}
.lg-cal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.lg-cal-actions .ghost, .lg-cal-actions .primary {
  height: 28px; padding: 0 12px; border-radius: 8px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--nt-line); background: transparent; color: var(--nt-muted);
}
.lg-cal-actions .primary { border-color: var(--nt-accent); background: var(--nt-accent); color: #fff; }
.lg-input, .lg-select {
  height: 32px; padding: 0 10px; border: 1px solid var(--nt-line); border-radius: 9px;
  background: rgba(0,0,0,.22); color: var(--nt-ink); font-size: 11.5px;
}
.lg-input { flex: 1 1 180px; min-width: 140px; }
.lg-select { min-width: 120px; }
.lg-input:focus, .lg-select:focus { outline: 1px solid var(--nt-accent); }
.lg-btn {
  height: 32px; padding: 0 12px; border: 1px solid var(--nt-line); border-radius: 9px;
  background: transparent; color: var(--nt-muted); font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.lg-btn:hover { color: var(--nt-ink); border-color: var(--nt-accent); }
.lg-btn.primary { border-color: var(--nt-accent); background: var(--nt-accent); color: #fff; }
.lg-btn.icon { padding: 0 10px; }
.lg-stats { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.lg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--nt-line); border-radius: 999px; font-size: 11px; color: var(--nt-muted); }
.lg-chip b { color: var(--nt-ink); font-family: var(--nt-code); font-weight: 600; }
.lg-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.lg-dot.blue { background: #5b8def; } .lg-dot.red { background: #e06b7a; }
.lg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-table-wrap { border: 1px solid var(--nt-line); border-radius: 12px; overflow: hidden; }
.lg-table { display: flex; flex-direction: column; }
.lg-row { display: grid; grid-template-columns: 1.1fr 1fr 1.6fr .6fr .8fr 1fr .8fr .7fr .7fr; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--nt-line); font-size: 11.5px; }
.lg-row:first-child { border-top: 0; }
.lg-row.head { background: rgba(255,255,255,.03); color: var(--nt-faint); font-size: 10.5px; letter-spacing: .02em; }
.lg-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nt-ink); }
.lg-row .num { font-family: var(--nt-code); text-align: right; }
.lg-empty { padding: 20px 12px; text-align: center; color: var(--nt-faint); font-size: 11.5px; }
.lg-dist { margin: 8px 0 12px; display: grid; gap: 6px; }
.lg-dist-row { display: grid; grid-template-columns: 160px 1fr 120px; gap: 10px; align-items: center; font-size: 11px; }
.lg-dist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nt-muted); }
.lg-dist-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.lg-dist-track i { display: block; height: 100%; }
.lg-dist-val { text-align: right; font-family: var(--nt-code); color: var(--nt-muted); }
@media (max-width: 720px) {
  .lg-row { grid-template-columns: 1fr 1fr 1.4fr .6fr .8fr; }
  .lg-row > span:nth-child(n+6) { display: none; }
}

/* 逐条日志单元格 */
.lg-cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lg-tag { display: inline-block; font-size: 9.5px; padding: 0 5px; border-radius: 5px; width: fit-content; }
.lg-tag.ok { color: #4cc38a; background: rgba(76,195,138,.12); }
.lg-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; padding: 1px 7px; border: 1px solid var(--nt-line); border-radius: 999px; color: var(--nt-ink); width: fit-content; }
.lg-group { font-size: 9.5px; color: #4cc38a; }
.lg-model { font-size: 11.5px; color: var(--nt-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-effort { font-size: 10px; color: #e0b34a; }
.lg-sub { font-size: 9.5px; color: var(--nt-faint); font-family: var(--nt-code); }
.lg-time b { font-family: var(--nt-code); color: var(--nt-ink); font-weight: 600; }
.lg-time span { font-size: 10px; color: var(--nt-muted); margin-right: 6px; }
.lg-detail { font-size: 10px; color: var(--nt-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 日志按钮/弹层的过渡，和上游一致：轻、快、只动 transform/opacity/颜色 */
.lg-btn, .lg-cal-presets button, .lg-range-btn, .lg-select, .lg-input, .lg-chip {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.lg-btn:hover, .lg-cal-presets button:hover { background: rgba(255,255,255,.05); }
.lg-btn:active, .lg-cal-presets button:active { transform: scale(.97); }
.lg-btn.primary:hover { filter: brightness(1.06); }
.lg-btn:focus-visible, .lg-cal-presets button:focus-visible, .lg-range-btn:focus-visible {
  outline: 2px solid var(--nt-accent); outline-offset: 2px;
}
.lg-cal { animation: lgCalIn .16s ease both; transform-origin: top left; }
@keyframes lgCalIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.lg-range-btn.open { background: rgba(255,255,255,.04); }
.lg-btn .spin { display: inline-block; }
.lg-btn.refreshing .spin { animation: lgSpin .9s linear infinite; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
.lg-select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--nt-faint) 50%), linear-gradient(135deg, var(--nt-faint) 50%, transparent 50%); background-position: calc(100% - 13px) 13px, calc(100% - 8px) 13px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
@media (prefers-reduced-motion: reduce) {
  .lg-cal { animation: none; }
  .lg-btn, .lg-cal-presets button, .lg-range-btn, .lg-select, .lg-input, .lg-chip { transition: none; }
  .lg-btn.refreshing .spin { animation: none; }
}

.lg-btn.on { color: var(--nt-ink); border-color: var(--nt-accent); background: var(--nt-accent-soft); }
.lg-row:not(.head):hover { background: rgba(255,255,255,.025); }
.lg-row { transition: background-color .12s ease; }
@media (prefers-reduced-motion: reduce) { .lg-row { transition: none; } }
