/* ============================================================
   Fnko studio 表单：照他站点的真实 CSS 规则移植
   （数值/间距/字号照抄；颜色换成我们的主题变量）
   来源：docs/ref-full.css（他的 _next 样式表，已存盘）
   ============================================================ */

/* 表单容器 */
.studio-grid .form-card.tool-form,
.form-card.tool-form {
  max-width: none;
  padding: 23px;
  border-radius: 15px;
  border: 1px solid var(--stroke);
  background: var(--surface);
}

/* 区块标题：编号 + 名称 + 右侧小字 */
.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 550;
  margin: 2px 0 16px;
  color: var(--ink-2);
}
.form-section-title > .step-num {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-3);
}
.form-section-title > small,
.form-section-title > .step-opt {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
}
.form-card .step + .step {
  border-top: 0;
  padding-top: 0;
}

/* 上传区 */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 10px;
  margin-bottom: 22px;
  border: 1px dashed var(--stroke);
  border-radius: 11px;
  background: var(--surface-2, rgba(0, 0, 0, .02));
  color: var(--ink-3);
}
.upload-zone > strong { font-size: 14px; font-weight: 500; margin-top: 12px; }
.upload-zone > p,
.upload-zone > small { font-size: 12px; line-height: 1.8; margin-top: 7px; color: var(--ink-3); }
.upload-zone .dz-actions {
  display: flex; gap: 3px; align-items: center; justify-content: center;
  margin-top: 14px; flex-wrap: wrap;
}
.upload-zone .dz-actions .dz-btn,
.upload-zone .dz-actions .dz-link {
  display: inline-flex; align-items: center; justify-content: center;
  height: 33px; padding: 0 9px; font-size: 14px;
  border: 1px solid var(--stroke); border-radius: 9px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.upload-zone[data-dragging="true"] {
  border-color: var(--accent-2);
  background: var(--accent-soft);
}

/* 提示词 */
.prompt-field {
  width: 100%;
  min-height: 150px;
  padding: 13px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  resize: vertical;
}
.prompt-field::placeholder { color: var(--ink-3); }
.mention-help { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
.input-counter {
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  margin: 4px 0 24px;
}

/* 模型选择行 */
.model-picker { margin-bottom: 4px; }
.model-picker .model-card {
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: var(--surface);
}
.model-limits {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3);
  margin: 8px 0 0;
}

/* 参数区：两列网格，每列 label + 38 高的选择器 */
.parameter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 23px;
}
.parameter-grid .field-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.parameter-grid .seg {
  width: 100%;
}
.parameter-grid .seg button {
  width: 100%;
  height: 38px;
  font-size: 14px;
}

/* 提交区 */
.tool-form .form-foot { display: block; }
.tool-form .form-foot .btn-block { height: 43px; }
.generation-disclaimer {
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
  color: var(--ink-3);
  margin-top: 12px;
}

/* 放大编辑：980×820 弹窗 */
.modal-card.modal-card-wide {
  width: calc(100vw - 40px);
  max-width: 980px;
  height: min(820px, 88dvh);
  padding: 24px;
}
.modal-card.modal-card-wide .expand-area {
  height: 100%;
  min-height: 0;
  resize: none;
  font-size: 15px;
  line-height: 1.8;
  border-radius: 12px;
  padding: 16px;
}


/* 模型卡：他的内部结构（mark + name / price + badge / limits + health） */
.model-picker .model-card,
#modelList .model-card,
#imageModelList .model-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  min-height: 56px; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--stroke); border-radius: 11px; background: var(--surface);
  text-align: left;
}
.model-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 13px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.model-name { font-size: 14px; font-weight: 550; color: var(--ink); }
.model-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.model-price { font-size: 13px; color: var(--ink-2); font-family: var(--font-mono); }
.model-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px; border-radius: 999px;
  font-size: 11px; color: #1f7a4d; background: rgba(31, 153, 102, .12);
}
.model-badge i { width: 7px; height: 7px; border-radius: 50%; background: #1f9966; }
.model-badge.busy { color: #b03a2e; background: rgba(217, 72, 59, .12); }
.model-badge.busy i { background: #d9483b; }
.model-check { color: var(--accent); font-size: 13px; }
.model-row2 { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.model-limits { font-size: 12px; color: var(--ink-3); }
.model-health { font-size: 11.5px; color: var(--ink-3); }

/* ---- 模型卡：他的 56px 行 + 卡外 limits 行 ---- */
#modelList .model-card, #imageModelList .model-card {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 14px; margin-bottom: 0;
  flex-wrap: nowrap;
}
#modelList .model-name, #imageModelList .model-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 550; color: var(--ink);
}
#modelList .model-meta, #imageModelList .model-meta {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px;
}
#modelList .model-meta .model-price, #imageModelList .model-meta .model-price {
  font-size: 13px; font-family: var(--font-mono); color: var(--ink-2);
}
#modelList .model-mark, #imageModelList .model-mark {
  width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px;
}
.model-limits-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-3); margin: 7px 2px 14px;
}
.model-limits-row .model-health { font-size: 11.5px; color: var(--ink-3); }
#modelList:not(.open) .model-card:not(.on),
#imageModelList:not(.open) .model-card:not(.on),
#modelList:not(.open) .model-limits-row:not(.on),
#imageModelList:not(.open) .model-limits-row:not(.on) { display: none; }
#videoLimitHint, #imageLimitHint { display: none; }

/* ---- 参数选择器：他的 select-trigger 造型 ---- */
.seg { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  width: 100%; height: 38px; padding: 0 12px; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--stroke); border-radius: 9px; background: var(--surface); color: var(--ink);
}
.seg button::after { content: "▾"; font-size: 11px; opacity: .55; }
.seg:not(.open) button[aria-pressed="false"] { display: none; }
.seg.open { position: relative; }
.seg.open button { display: flex; }
.seg.open button[aria-pressed="true"] { border-color: var(--accent-2); background: var(--accent-soft); }
