/* Mo Agent 官网 · 模型广场专用样式 */

.plaza {
  padding-bottom: 72px;
}
.plaza__loading {
  height: 420px;
}

/* ---------- 工具条：搜索、分组、单位 ---------- */
.plaza__bar {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  box-shadow: var(--shadow-sm);
}
.plaza__search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.plaza__search .icon {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.plaza__search .input {
  padding-left: 44px;
  border-radius: 14px;
  background: var(--bg-elev);
}
.plaza__select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
  white-space: nowrap;
}
.plaza__select select {
  height: 48px;
  max-width: 260px;
  padding: 0 36px 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 21px,
    calc(100% - 14px) 21px;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.plaza__select select:hover {
  border-color: var(--border-strong);
}

/* 分段按钮：单位切换、计费类型 */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.seg button {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14.5px;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.seg button:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.seg button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
}

/* ---------- 筛选：计费类型、平台 ---------- */
.plaza__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 22px;
}
.plaza__filters .seg button {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.fchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 14.5px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}
.fchip span {
  color: var(--text-3);
  font-size: 12.5px;
}
.fchip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.fchip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.fchip[aria-pressed='true'] span {
  color: inherit;
  opacity: 0.8;
}
.plaza__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 20px 2px 14px;
  color: var(--text-3);
  font-size: 14px;
}

/* ---------- 分组卡片：一个分组一张，里面是这个分组的模型价格表 ---------- */
.plaza__groups {
  display: grid;
  /* 不写 minmax(0, …) 的话，里面的宽表格会把整列撑宽，窄屏上页面就破了 */
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.gcard {
  min-width: 0;
  padding: 22px 22px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  animation: gcard-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
  /* 点「所在分组」跳过来时，别被吸顶的导航和工具条挡住 */
  scroll-margin-top: 160px;
}
@keyframes gcard-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.gcard__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gcard__head .model__av {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 17px;
}
.gcard__names {
  flex: 1;
  min-width: 0;
}
.gcard__names h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.gcard__names small {
  color: var(--text-3);
  font-size: 13px;
}
/* 计费倍率：整张卡片上最显眼的一个数 */
.gcard__ratio {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  line-height: 34px;
  white-space: nowrap;
}
.gcard__ratio b {
  font-size: 15.5px;
  font-weight: 700;
}
.gcard__desc {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 14.5px;
}
.gcard__eg {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12.5px;
}
.gcard__sub {
  margin-top: 18px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}
.gcard__table {
  margin-top: 14px;
  border-radius: 16px;
  box-shadow: none;
}
.gcard__sub + .gcard__table {
  margin-top: 8px;
}

/* ---------- 表格：窄屏时在自己的框里横向滚动，不撑破页面 ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.gt,
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

/* 分组里的价格表 */
.gt {
  min-width: 940px;
  font-size: 14px;
}
.gt--narrow {
  min-width: 520px;
}
.gt th,
.gt td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.gt tbody tr:last-child > *,
.gt tbody tr:has(+ .gt__detail[hidden]:last-child) > * {
  border-bottom: 0;
}
.gt thead th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--bg-soft);
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
}
.gt thead tr:first-child th {
  border-bottom-color: transparent;
}
.gt thead tr:first-child th[rowspan] {
  border-bottom-color: var(--border);
  vertical-align: bottom;
}
/* 「实付价格 / 官方参考价」这一层：居中，下面带一行小字写单位 */
.gt__span {
  text-align: center;
  color: var(--text-2);
}
.gt thead .gt__span {
  color: var(--text-2);
  font-size: 13px;
}
.gt__span small {
  display: block;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 400;
}
.gt thead .gt__span--pay {
  color: var(--accent);
}
/* 两组价格之间用一条竖线分开 */
.gt__edge,
.gt__span,
.gt .gt__ratio,
.gt thead th:last-child {
  border-left: 1px solid var(--border);
}
.gt .num {
  text-align: right;
  font-family: 'Cascadia Code', 'Cascadia Mono', Consolas, monospace;
  font-variant-ligatures: none;
}
.gt thead .num {
  font-family: inherit;
}
.gt td.gt__pay {
  color: var(--text);
  font-weight: 600;
}
.gt td.gt__ref,
.gt td.gt__ctx,
.gt td.gt__ratio {
  color: var(--text-3);
}
/* 没有单独定价、沿用默认价的图片档位：颜色淡一点 */
.gt td.is-same {
  font-weight: 400;
  opacity: 0.62;
}
.gt tbody tr:not(.gt__detail):hover > * {
  background: var(--bg-soft);
}
.gt__model {
  font-weight: 600;
}
.gt__model-in {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gt__pick {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  cursor: pointer;
}
.gt__pick input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-strong);
  cursor: pointer;
}
.gt__name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
button.gt__name {
  border-radius: 6px;
  text-decoration: underline dotted var(--border-strong);
  text-underline-offset: 4px;
}
button.gt__name:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}
/* 点模型名展开的介绍 */
.gt .gt__detail > td {
  padding: 14px 16px 16px 46px;
  background: var(--bg-soft);
  white-space: normal;
}
.gt__detail-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  max-width: 880px;
}
.gt__detail-text {
  flex: 1 1 360px;
  display: grid;
  gap: 8px;
  align-content: start;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.gt__detail-text .muted {
  color: var(--text-2);
}
.gt__detail-box .model__bars {
  flex: 0 1 260px;
  align-content: start;
}
.pm__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 整页的状态（读不到、还没有模型）和筛选后没有结果 */
.plaza__empty {
  padding: 56px 24px;
  border-radius: 22px;
  border: 1px dashed var(--border-strong);
  text-align: center;
  color: var(--text-3);
}
.plaza__empty[hidden] {
  display: none;
}
.plaza__empty b {
  display: block;
  color: var(--text);
  font-size: 17px;
}
.plaza__empty p {
  margin: 8px 0 0;
}
.plaza__empty .btn {
  margin-top: 18px;
}
.plaza__state {
  padding: 96px 24px;
}

/* ---------- 分段标题 ---------- */
.plaza__section {
  margin-top: 88px;
}
.plaza__section[hidden] {
  display: none;
}
.plaza__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-bottom: 22px;
}
.plaza__section-head h2 {
  margin-top: 12px;
  font-size: clamp(26px, 3.4vw, 36px);
}
.plaza__section-head p:not(.eyebrow) {
  margin-top: 10px;
  max-width: 640px;
  color: var(--text-2);
}

/* ---------- 对比表 ---------- */
.cmp-table th,
.cmp-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.cmp-table tbody tr:last-child > * {
  border-bottom: 0;
}
.cmp-table thead th {
  background: var(--bg-soft);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.cmp-table {
  table-layout: fixed;
}
.cmp-table .rowh {
  width: 110px;
  background: var(--bg-soft);
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.cmp-table td {
  vertical-align: top;
  line-height: 1.55;
}
.cmp-table td.muted {
  color: var(--text-2);
  font-size: 14.5px;
}
.cmp-table td small {
  display: block;
  color: var(--text-3);
  font-size: 12.5px;
}
.cmp-table td.is-best {
  color: var(--accent);
  font-weight: 650;
}
.cmp-table td.is-best small {
  font-weight: 400;
}
.cmp-table thead th {
  padding: 14px 18px;
}
.cmp-table__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cmp-table__head > div {
  flex: 1;
  min-width: 0;
}
.cmp-table__head b {
  display: block;
  color: var(--text);
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-table__head small {
  font-weight: 400;
}
.cmp-table__head .icon-btn {
  width: 30px;
  height: 30px;
  flex: none;
}
.cmp-table__head .icon {
  width: 15px;
  height: 15px;
}
.cmp-table__score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cmp-table__score span {
  width: 30px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.cmp-table__score .bar {
  flex: 1;
  max-width: 130px;
}

.plaza__foot {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}

/* ---------- 底部的对比托盘 ---------- */
.tray {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 9px 9px 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  translate: -50% 0;
  animation: tray-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}
.tray[hidden] {
  display: none;
}
.tray.is-away {
  opacity: 0;
  visibility: hidden;
}
@keyframes tray-in {
  from {
    opacity: 0;
    translate: -50% 16px;
  }
}
.tray__count {
  color: var(--text-3);
  font-size: 13.5px;
  white-space: nowrap;
}
.tray__chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tray__chips::-webkit-scrollbar {
  display: none;
}
.tray__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 12px;
  flex: none;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 13px;
}
.tray__chip .icon {
  width: 13px;
  height: 13px;
  color: var(--text-3);
}
.tray__chip:hover {
  border-color: var(--border-strong);
}
.tray__msg {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 13.5px;
  white-space: nowrap;
  translate: -50% 0;
}
.tray__msg[hidden] {
  display: none;
}
/* 托盘出现时给页面底部留出位置，别挡住页脚 */
body.has-tray .site-footer {
  padding-bottom: 84px;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .plaza__bar {
    flex-wrap: wrap;
    position: static;
  }
  .plaza__search {
    flex: 1 0 100%;
  }
  .plaza__select {
    flex: 1;
    min-width: 0;
  }
  .plaza__select select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .gcard {
    scroll-margin-top: 80px;
  }
}

@media (max-width: 640px) {
  .plaza__select > span {
    display: none;
  }
  .plaza__filters .seg {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .plaza__section {
    margin-top: 60px;
  }
  .gcard {
    padding: 18px 14px 14px;
    border-radius: 18px;
  }
  .gcard__head {
    flex-wrap: wrap;
  }
  .gcard__head .model__av {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 15px;
  }
  .gcard__names h3 {
    font-size: 16.5px;
  }
  .gt th,
  .gt td {
    padding: 10px 12px;
  }
  /* 横向滑动时模型名那一列固定在左边，一直看得到是哪个模型 */
  .gt__model,
  .gt thead tr:first-child th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg-elev);
    box-shadow: 1px 0 0 var(--border);
  }
  .gt thead tr:first-child th:first-child {
    background: var(--bg-soft);
  }
  /* 固定的那一列别太宽，给价格留地方：名字太长就省略（点开详情能看到全名对应的介绍），「推荐」标签收起来 */
  .gt__model-in {
    gap: 8px;
  }
  .gt__model-in .chip {
    display: none;
  }
  .gt__name {
    max-width: 136px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .gt .gt__detail > td {
    padding-left: 14px;
  }
  .gt__detail-box {
    position: sticky;
    left: 14px;
    max-width: calc(100vw - 96px);
  }
  .tray {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    padding-left: 14px;
    border-radius: 22px;
    translate: none;
    animation: none;
  }
  .tray__count {
    display: none;
  }
  .tray__chips {
    flex: 1;
  }
  .cmp-table th,
  .cmp-table td {
    padding: 11px 14px;
  }
  .cmp-table .rowh {
    width: 84px;
  }
}

/* ---------- 鹈鹕骑单车：每天的实测 ---------- */
.pelican-day {
  margin-bottom: 44px;
  padding: 26px 26px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
.pelican-day[hidden] {
  display: none;
}
.pelican-day__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.pelican-day__head h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-size: clamp(24px, 3vw, 32px);
}
.pelican-day__date {
  color: var(--accent);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pelican-day__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pelican-day__nav button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pelican-day__intro {
  margin-top: 12px;
  max-width: 760px;
  color: var(--text-2);
}
.pelican-day__status {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13.5px;
  min-height: 1.4em;
}
.pelican-empty {
  margin-top: 14px;
  padding: 26px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--text-2);
  text-align: center;
}
.pelicans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.pelican {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
button.pelican {
  cursor: zoom-in;
}
button.pelican:hover,
button.pelican:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  outline: none;
}
.pelican__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  /* 模型画的图多半是按浅色背景设计的，所以画框固定用浅色 */
  background: #fff;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
}
.pelican__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* 这一天没画出来、拿旧图垫着的：压暗一点，一眼能看出不是今天的 */
.pelican--failed .pelican__frame img,
.pelican--pending .pelican__frame img {
  opacity: 0.45;
  filter: grayscale(0.6);
}
.pelican__none {
  color: #9a968c;
  font-size: 13px;
}
.pelican__flag,
.pelican__old {
  position: absolute;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}
.pelican__flag {
  top: 8px;
  background: #1a1915;
  color: #fff;
}
.pelican__flag--failed {
  background: #b93a2b;
}
.pelican__old {
  bottom: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #5d5a52;
  border: 1px solid #e3dfd5;
  font-weight: 500;
}
.pelican__cap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.pelican__cap b {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pelican__cap small {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  /* 平台 · 线路 · 用时，放不下就折成两行 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.pelican-more {
  display: flex;
  margin: 16px auto 0;
}
.cmp-table__pelican {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cmp-table__pelican-day {
  display: block;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12px;
}

/* 大图 */
.pview {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.pview::backdrop {
  background: rgba(10, 10, 9, 0.6);
  backdrop-filter: blur(3px);
}
.pview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px 20px;
  border-bottom: 1px solid var(--border);
}
.pview__bar > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pview__bar b {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pview__bar small {
  color: var(--text-3);
  font-size: 12.5px;
}
.pview__stage {
  background: #fff;
  display: grid;
  place-items: center;
}
.pview__stage img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
}

@media (max-width: 640px) {
  .pelican-day {
    padding: 18px 14px 16px;
    border-radius: 18px;
    margin-bottom: 30px;
  }
  .pelicans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pelican-day__nav {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pelican {
    transition: none;
  }
  button.pelican:hover,
  button.pelican:focus-visible {
    transform: none;
  }
}
