/* 闲鱼 AI 上架助手样式：严格抄舰队 DESIGN-TOKENS 母版（颜色/字阶/间距/圆角/组件）。
 * 唯一强调色 #2563eb；正文 ≥15px；按钮 40/46px；卡片 1px 边线 + 14px 圆角。
 */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #efefec;
  --text: #1a1d21;
  --text-2: #5c6470;
  --text-3: #8a919c;
  --border: #e3e3de;
  --border-2: #cfcfc8;
  --accent: #2563eb;
  --accent-hover: #1d4fd0;
  --accent-soft: #eaf0fe;
  --on-accent: #ffffff;
  --success: #177245;
  --warning: #9a6a00;
  --warning-bg: #fdf3e0;
  --danger: #c62f3b;
  --danger-bg: #fdeeee;
  --focus: #2563eb;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-num: ui-monospace, "SF Mono", "Roboto Mono", monospace;
  --fs-display: 40px;
  --fs-h1: 30px;
  --fs-h2: 22px;
  --fs-h3: 17px;
  --fs-body: 15.5px;
  --fs-small: 13.5px;
  --fs-cap: 12px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --wrap: 860px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(26,29,33,.05), 0 1px 6px rgba(26,29,33,.04);
  --shadow-2: 0 8px 28px rgba(26,29,33,.10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: var(--fs-h1); line-height: 1.25; font-weight: 700; margin: 0; }
h2 { font-size: var(--fs-h2); line-height: 1.35; font-weight: 650; margin: 0 0 var(--sp-3); }
h3 { font-size: var(--fs-h3); line-height: 1.45; font-weight: 650; margin: 0 0 var(--sp-2); }
p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }
.muted { color: var(--text-2); font-size: var(--fs-small); line-height: 1.55; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* 页头 */
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.topbar-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.brand { font-size: 17px; font-weight: 700; color: var(--text); }
.brand span { color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* 首屏 */
.hero { padding: var(--sp-7) 0 var(--sp-6); }
.hero h1 { margin-bottom: var(--sp-3); }
.hero .sub { font-size: 17px; color: var(--text-2); max-width: 640px; }
.hero .quota-line { margin-top: var(--sp-3); }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 600; margin-bottom: var(--sp-3);
}
.tag {
  display: inline-block; padding: 2px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600;
}
.tag-warn { background: var(--warning-bg); color: var(--warning); }

/* 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: var(--sp-4);
}
.card h2 { display: flex; align-items: center; gap: var(--sp-2); }
.step-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

/* 三步说明 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: var(--sp-2);
}
.step p { color: var(--text-2); font-size: var(--fs-small); margin: 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 40px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
  font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 150ms cubic-bezier(.2,.7,.3,1), transform 150ms cubic-bezier(.2,.7,.3,1);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 16px; width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* 表单 */
.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: var(--fs-small); font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--text-2); font-size: var(--fs-small); margin-top: 6px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-family: var(--font); font-size: 15.5px;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--focus); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field .err { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.radio-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: 15px; cursor: pointer; user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 图片上传 */
.drop {
  border: 1.5px dashed var(--border-2); border-radius: var(--r-lg); background: var(--surface-2);
  padding: var(--sp-5); text-align: center; cursor: pointer;
}
.drop:hover { border-color: var(--accent); }
.drop input { display: none; }
.drop .icon { width: 40px; height: 40px; margin: 0 auto var(--sp-2); color: var(--text-2); }
.drop p { color: var(--text-2); font-size: var(--fs-small); margin: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-3); }
.thumb { position: relative; width: 120px; height: 120px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(26,29,33,.72); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}

/* 结果 */
.result-block { border-top: 1px solid var(--border); padding-top: var(--sp-4); margin-top: var(--sp-4); }
.result-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.result-head h3 { margin: 0; }
.result-text {
  background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px;
  font-size: 15.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.result-text p { margin: 0 0 var(--sp-2); }
.result-text p:last-child { margin-bottom: 0; }
.para-label { font-weight: 650; }
.mode-note {
  border-radius: var(--r-md); padding: 12px 16px; font-size: var(--fs-small); line-height: 1.55;
  background: var(--warning-bg); color: var(--warning); margin-bottom: var(--sp-4);
}
.mode-note.ai { background: var(--accent-soft); color: var(--accent); }
.estimate-box { background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; }
.estimate-box .big { font-size: 22px; font-weight: 700; font-family: var(--font-num); }
.estimate-box .note { color: var(--text-2); font-size: var(--fs-small); margin-top: 4px; }
.empty-state { text-align: center; padding: var(--sp-6) var(--sp-4); color: var(--text-2); }
.empty-state .icon { width: 44px; height: 44px; margin: 0 auto var(--sp-3); color: var(--text-3); }
.hidden { display: none !important; }

/* 赞助与定价 */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.price-cell { background: var(--surface-2); border-radius: var(--r-md); padding: 16px; }
.price-cell .v { font-size: 20px; font-weight: 700; }
.inline-input { display: flex; gap: var(--sp-2); }
.inline-input input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: var(--r-md); font-family: var(--font); font-size: 15.5px; }
.inline-input input:focus { border-color: var(--accent); outline: 2px solid var(--focus); outline-offset: 2px; }
code { font-family: var(--font-num); font-size: 13.5px; background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); }

/* 页脚 */
.footer { padding: var(--sp-6) 0 var(--sp-7); color: var(--text-2); font-size: var(--fs-small); }
.footer .brand-line { font-weight: 700; color: var(--text); margin-bottom: var(--sp-2); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: #fff; border-radius: var(--r-md); padding: 10px 18px;
  font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms;
  z-index: 50; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 骨架加载 */
.skeleton { background: var(--surface-2); border-radius: var(--r-md); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 响应式 */
@media (max-width: 640px) {
  .topbar { height: 54px; }
  .wrap { padding: 0 16px; }
  .hero { padding: var(--sp-6) 0 var(--sp-5); }
  .hero h1 { font-size: 24px; }
  .card { padding: 16px; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; }
  .thumb { width: 96px; height: 96px; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
