/* 交易行 · 交易大厅（独立于个人中心版式） */

/* 售价等 number 输入：去掉浏览器上下微调箭头 */
.trade-page input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.trade-page input[type="number"]::-webkit-outer-spin-button,
.trade-page input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.trade-page {
  position: relative;
  min-height: 100vh;
  background: #0b0a09;
}

.trade-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(160, 100, 30, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(11, 10, 9, 0.55) 0%, rgba(11, 10, 9, 0.82) 42%, rgba(11, 10, 9, 0.96) 100%),
    url("/assets/hero-bg.jpg") center 22% / cover no-repeat;
}

.trade-page .head,
.trade-page .trade-hall,
.trade-page .foot,
.trade-page .auth-mask {
  position: relative;
  z-index: 1;
}

.trade-page .head {
  position: fixed;
  z-index: 40;
}

.trade-page .auth-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.trade-hall {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6.8rem clamp(1.2rem, 4vw, 2.8rem) 3.5rem;
}

/* —— 大厅首屏 —— */
.trade-hero {
  text-align: center;
  padding: 1.6rem 1rem 1.8rem;
  margin-bottom: 1.5rem;
  border-bottom: 0;
}

.trade-hero .eyebrow {
  margin-bottom: 0.75rem;
}

.trade-hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  color: #f2e6c4;
  text-indent: 0.42em;
}

.trade-hero__lead {
  margin: 0 auto;
  color: #9a825c;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  white-space: nowrap;
}

.trade-market__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0;
  padding: 0.95rem 1.2rem 0.85rem;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-bottom: 0;
  border-radius: var(--radius, 6px) var(--radius, 6px) 0 0;
  background: #16120e;
  box-shadow: none;
}

.trade-board {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-radius: 0 0 var(--radius, 6px) var(--radius, 6px);
  background: #12100c;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.trade-market__left {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.trade-market__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: #f0dfb0;
}

.trade-soft-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: #6e5a40;
}

.trade-soft-links a {
  color: #8a7350;
}

.trade-soft-links a:hover {
  color: #e0c878;
}

.trade-hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.trade-hero__cta a {
  min-width: 7.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius, 6px);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-align: center;
}

.trade-cta-gold {
  border: 1px solid rgba(184, 137, 60, 0.5);
  background: rgba(90, 60, 24, 0.55);
  color: #e8dcc0 !important;
}

.trade-cta-gold:hover {
  color: #f3df9d !important;
  border-color: #b8893c;
  background: rgba(120, 80, 30, 0.45);
}

.trade-cta-line {
  border: 1px solid rgba(184, 137, 60, 0.28);
  color: #9a825c !important;
  background: transparent;
}

.trade-cta-line:hover {
  border-color: rgba(184, 137, 60, 0.5);
  color: #e0c878 !important;
}

/* —— 市场板 —— */
.trade-market {
  margin-top: 0.35rem;
}

.trade-row.is-demo {
  opacity: 0.92;
}

.trade-row.is-demo .trade-row__title::after {
  content: "演示";
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-radius: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: #8a7350;
  vertical-align: middle;
}

.trade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.trade-tabs a {
  padding: 0.5rem 1.15rem;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(184, 137, 60, 0.25);
  border-radius: 0;
  color: #8a7350;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  background: transparent;
}

.trade-tabs a.is-on,
.trade-tabs a:hover {
  color: #f2e6c4;
  border-bottom-color: #e0c878;
  background: transparent;
}

.trade-row {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1.4fr) minmax(0, 1fr) 7.5rem 5.5rem;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid rgba(203, 184, 146, 0.08);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.trade-row:last-child {
  border-bottom: 0;
}

.trade-row:hover {
  background: rgba(224, 200, 120, 0.06);
  color: inherit;
}

.trade-row__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: #f2e6c4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-row__meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #8a7350;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-row__zone {
  color: #9a825c;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.trade-row__price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  color: #e0c878;
  letter-spacing: 0.06em;
  text-align: right;
}

.trade-row__go {
  justify-self: end;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: #8a7350;
}

.trade-row:hover .trade-row__go {
  color: #f0dfb0;
}

.trade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.28rem 0.55rem;
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.trade-badge--account {
  color: #f0dfb0;
  border: 1px solid rgba(184, 137, 60, 0.4);
  background: rgba(140, 90, 30, 0.28);
}

.trade-badge--character {
  color: #d4e8b8;
  border: 1px solid rgba(120, 150, 80, 0.35);
  background: rgba(70, 100, 50, 0.28);
}

.trade-empty {
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: #8a7350;
  letter-spacing: 0.12em;
}

.trade-flash-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 2.8rem);
}

.trade-flash-wrap .me-flash {
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* —— 详情 / 出售 / 我的：居中大板 —— */
.trade-stage {
  max-width: 860px;
  margin: 0 auto;
}

.trade-stage--wide {
  max-width: 1080px;
}

.trade-panel {
  padding: 1.7rem 1.6rem 1.8rem;
  border: 1px solid rgba(184, 137, 60, 0.28);
  border-radius: var(--radius, 6px);
  background: linear-gradient(165deg, rgba(32, 26, 18, 0.92), rgba(12, 10, 8, 0.96));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.trade-panel__head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(203, 184, 146, 0.12);
  text-align: center;
}

.trade-panel__head h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 500;
  color: #f2e6c4;
  letter-spacing: 0.2em;
  line-height: 1.35;
}

.trade-panel__head h2 .trade-badge {
  flex-shrink: 0;
  letter-spacing: 0.16em;
  vertical-align: middle;
}

.trade-panel__head p {
  margin: 0;
  color: #8a7350;
  font-size: 0.9rem;
}

.trade-price {
  color: #e0c878 !important;
  font-size: 1.35rem !important;
}

.trade-desc {
  margin: 1.2rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(203, 184, 146, 0.1);
}

.trade-desc h3 {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: #cbb892;
  letter-spacing: 0.1em;
}

.trade-desc p {
  margin: 0;
  color: #9a825c;
  white-space: pre-wrap;
  line-height: 1.6;
}

.trade-tips {
  margin: 1rem 0 1.25rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(184, 137, 60, 0.2);
  border-radius: var(--radius, 6px);
  background: rgba(8, 7, 6, 0.4);
}

.trade-tips p {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  color: #8a7350;
  line-height: 1.55;
}

.trade-tips p:last-child {
  margin-bottom: 0;
}

.trade-buy-btn {
  width: auto;
  min-width: 12rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.trade-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.trade-back {
  display: inline-block;
  margin-top: 1.25rem;
  color: #8a7350;
  letter-spacing: 0.08em;
}

.trade-back:hover {
  color: #e0c878;
}

.me-form textarea,
.trade-select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #3a3022;
  border-radius: var(--radius, 6px);
  background: #12100d;
  color: #f0dfb0;
  font: inherit;
  outline: none;
  resize: vertical;
}

.me-form textarea::placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.me-form textarea::-webkit-input-placeholder {
  color: rgba(122, 104, 72, 0.42);
}

.me-form textarea::-moz-placeholder {
  color: rgba(122, 104, 72, 0.42);
  opacity: 1;
}

.trade-select {
  height: 44px;
}

.me-form textarea:focus,
.trade-select:focus {
  border-color: #b8893c;
}

.trade-inline-form {
  display: inline;
  margin: 0;
}

.trade-mini-btn {
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  width: auto;
  margin: 0;
}

.trade-fail {
  color: #d4a078;
  font-size: 0.82rem;
}

.trade-page .me-form {
  max-width: 520px;
  margin: 0 auto;
}

.trade-page .me-dl {
  max-width: 640px;
  margin: 0 auto;
}

.trade-page .me-table-wrap {
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .trade-row {
    grid-template-columns: 4.2rem minmax(0, 1fr) auto;
    grid-template-areas:
      "badge title price"
      "badge meta go";
    gap: 0.35rem 0.75rem;
  }

  .trade-row > :nth-child(1) { grid-area: badge; }
  .trade-row > :nth-child(2) { grid-area: title; }
  .trade-row > :nth-child(3) { display: none; }
  .trade-row > :nth-child(4) { grid-area: price; }
  .trade-row > :nth-child(5) { grid-area: go; }

  .trade-row__price {
    font-size: 1.15rem;
  }
}

@media (max-width: 640px) {
  .trade-hero h1 {
    letter-spacing: 0.28em;
    text-indent: 0.28em;
  }

  .trade-hero__lead {
    white-space: normal;
    padding: 0 0.75rem;
  }

  .trade-row {
    padding: 1rem;
  }
}

/* —— 挂单角色详情 —— */
.trade-chars {
  margin: 1.35rem 0 0.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(203, 184, 146, 0.12);
}

.trade-chars__title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #f0dfb0;
  text-align: center;
}

.trade-char {
  margin-bottom: 1rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(184, 137, 60, 0.22);
  border-radius: var(--radius, 6px);
  background: #12100c;
}

.trade-char:last-child {
  margin-bottom: 0;
}

.trade-char__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(203, 184, 146, 0.1);
}

.trade-char__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #f2e6c4;
}

.trade-char__sub {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #8a7350;
}

.trade-char__block {
  margin-top: 0.85rem;
}

.trade-char__block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #cbb892;
}

.trade-char__kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.35rem 0.75rem;
}

.trade-char__kv .row {
  display: flex;
  gap: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #d8c9a6;
}

.trade-char__kv .k {
  color: #6e5a40;
  flex-shrink: 0;
}

.trade-char__kv .v {
  min-width: 0;
  word-break: break-all;
}

.trade-char__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.trade-char__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(184, 137, 60, 0.22);
  border-radius: 3px;
  background: rgba(28, 22, 14, 0.9);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #d8c9a6;
}

.trade-char__chip .slot {
  color: #8a7350;
  flex-shrink: 0;
}

.trade-char__chip .n {
  min-width: 0;
  word-break: break-all;
}

.trade-char__chip .q {
  color: #8a7350;
  white-space: nowrap;
}

.trade-char__empty {
  margin: 0;
  font-size: 0.8rem;
  color: #6e5a40;
  letter-spacing: 0.08em;
}

.trade-char__note {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: #5c4a34;
  letter-spacing: 0.06em;
}
