/* 闪心租 · 上架页面样式（暗色紫青，移动端 H5） */
.page-listing {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.18), transparent 60%),
    linear-gradient(180deg, #0b0820 0%, #0a081c 100%);
  min-height: 100vh;
  padding-bottom: 160px;
}

/* 顶部品牌行（V力斯） */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  max-width: 720px;
  margin: 0 auto;
}
.topbar-back-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  transition: background .15s;
}
.topbar-back-btn svg { width: 20px; height: 20px; }
.topbar-back-btn:hover { background: rgba(124,58,237,0.25); }
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-text { line-height: 1.05; }
.brand-name { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.brand-en { font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 2px; margin-top: 2px; }
.brand-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(124,58,237,0.32);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  transition: transform .15s, background .15s;
}
.icon-btn:hover { background: rgba(124,58,237,0.55); }
.icon-btn:active { transform: scale(0.92); }

/* 表单卡片通用 */
.listing-form {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}
.form-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.form-card-extra { padding: 12px 14px; }

.form-label-row {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 10px;
}
.form-label { font-size: 15px; font-weight: 600; color: #fff; }
.form-required { color: #ef4444; font-size: 16px; line-height: 1; }
.form-sub { font-size: 12px; color: rgba(255,255,255,0.45); }
.form-tip { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 10px; }
.field-hint { font-size: 11px; color: rgba(255,255,255,0.42); margin-top: 8px; }
.char-count { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.4); font-variant-numeric: tabular-nums; }

/* 回收比例 */
.ratio-value {
  margin-left: auto;
  color: #fbbf24;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ratio-control {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}
.ratio-range {
  width: 100%;
  height: 28px;
  accent-color: #8b5cf6;
  cursor: pointer;
}
.step-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(139,92,246,0.45);
  border-radius: 10px;
  background: rgba(124,58,237,0.16);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.step-btn:hover { background: rgba(124,58,237,0.3); border-color: #8b5cf6; }
.step-btn:active { transform: scale(0.94); }
.step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ratio-scale {
  display: flex;
  justify-content: space-between;
  margin: 2px 50px 0;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.ratio-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 7px;
  margin-top: 12px;
}
.ratio-preset {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(124,58,237,0.28);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.7);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ratio-preset.active {
  border-color: #8b5cf6;
  background: rgba(124,58,237,0.26);
  color: #fff;
  font-weight: 700;
}

/* 输入/文本域 */
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus { border-color: #7c3aed; }
.form-input:invalid:not(:placeholder-shown) { border-color: #ef4444; }
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,0.35); }
.form-textarea { resize: vertical; min-height: 82px; }

/* 道具数量 */
.inventory-card { padding-bottom: 8px; }
.inventory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.inventory-head .form-tip { margin-top: 3px; }
.reset-items-btn {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #b8b3d6;
  font: inherit;
  font-size: 12px;
  padding: 8px;
  cursor: pointer;
}
.reset-items-btn:hover { color: #fff; }
.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  border-top: 1px solid rgba(124,58,237,0.18);
}
.item-info { min-width: 0; }
.item-label {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-unit-label {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(124,58,237,0.22);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
}
.item-meta {
  display: flex;
  gap: 7px;
  margin-top: 3px;
  color: rgba(255,255,255,0.42);
  font-size: 11px;
}
.item-subtotal { color: #fbbf24; font-variant-numeric: tabular-nums; }
.qty-stepper {
  display: grid;
  grid-template-columns: 36px 62px 36px;
  align-items: center;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,0.38);
  border-radius: 10px;
  background: rgba(5,3,12,0.28);
}
.qty-stepper .step-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 19px;
}
.qty-input {
  width: 62px;
  height: 36px;
  padding: 0 3px;
  border: 0;
  border-left: 1px solid rgba(124,58,237,0.25);
  border-right: 1px solid rgba(124,58,237,0.25);
  outline: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.qty-input:focus { background: rgba(124,58,237,0.12); }

/* 实时预览卡片 */
.preview-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.preview-title { font-size: 15px; font-weight: 600; color: #fff; }
.auto-badge {
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
}
.preview-rows { border-top: 1px dashed rgba(124,58,237,0.25); padding-top: 10px; margin-top: 10px; }
.preview-row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: #fff;
  padding: 4px 0;
}
.preview-row.preview-base { font-weight: 600; }
.preview-label { color: rgba(255,255,255,0.85); }
.preview-value { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }

.preview-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(124,58,237,0.35);
  font-size: 15px; color: #fff;
}
.total-value {
  font-size: 22px;
  font-weight: 800;
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(245,158,11,0.4);
  font-variant-numeric: tabular-nums;
}

.form-spacer { height: 80px; }

/* 固定提交栏 */
.submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(10,8,28,0), rgba(10,8,28,0.96) 28%);
  pointer-events: none;
}
.submit-btn {
  width: 100%;
  max-width: 688px;
  height: 50px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124,58,237,0.45);
  transition: transform .15s, box-shadow .15s;
  pointer-events: auto;
}
.submit-btn strong {
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.28);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.submit-btn:hover { box-shadow: 0 10px 30px rgba(124,58,237,0.6); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled, .submit-btn.loading {
  opacity: 0.7; cursor: not-allowed;
}
.submit-btn.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  .listing-form { padding: 0 12px; }
  .form-card, .preview-card { padding-left: 12px; padding-right: 12px; }
  .ratio-presets { gap: 5px; }
  .qty-stepper { grid-template-columns: 34px 54px 34px; }
  .qty-stepper .step-btn { width: 34px; }
  .qty-input { width: 54px; }
  .submit-bar { padding-left: 12px; padding-right: 12px; }
}

/* 底部 tab（中凸） */
.tabbar-listing {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr;
}
.tabbar-listing .tab { padding: 8px 4px; }
.tabbar-listing .tab-floating {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  color: rgba(255,255,255,0.85);
}
.tabbar-listing .tab-floating .tab-floating-inner {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  display: flex; align-items: center; justify-content: center;
  margin-top: -28px;
  box-shadow: 0 6px 20px rgba(124,58,237,0.5);
}
.tabbar-listing .tab-floating .tab-floating-label {
  font-size: 11px;
  margin-top: 2px;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 220px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast[hidden] { display: none; }
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
