
/* ---------- 模型广场（一比一复刻 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%; }
/* 卡片列数按容器宽度自动算（auto-fill 238px），只在下方一处定义 */

.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 4px; border-radius: 4px; font-size: 9.5px; color: #fff; }
.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-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; }
.market-count { font-size: 13px; font-weight: 600; margin: 2px 0 10px; }
.market-main > .note { margin-top: 10px; }

/* 按容器宽度（不是视口断点）自动算列数。magpie 的窗口宽度固定，
   卡片区刚好容得下两张卡；最小列宽 430px 保证固定落 2 列，
   窗口更宽时才自动增到 3、4 列，不会把卡片挤窄。 */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 10px; align-items: stretch; }
.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.lvl1 { font-weight: 700; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.gb-tag.lvl2 { opacity: .82; }
.gb-tag.lead { font-weight: 700; opacity: 1; box-shadow: 0 0 0 1px rgba(255,255,255,.32); }
.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.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 { font-size: 10px; color: var(--nt-faint); margin: 6px 0 3px; letter-spacing: .04em; }

/* 充值卡：站点「添加资金」缩小版 */
.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-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; }
}