/* AI 定制门户 /custom/〔批X587〕
   —— 全部走既有 token（--s-* 间距 / --ink-* 文字 / --bg-* 背景 / --r-* 圆角 / --brand 主色），
   不新造颜色与尺寸；表单沿用全站 .b-field 三件套（label / input / textarea / select）。 */

.b-portal { max-width: 780px; }

/* ---------- 页头 ---------- */
.b-portal__head { margin-bottom: var(--s-5); }
.b-portal__title { margin: 0 0 var(--s-2); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); line-height: 1.25; }
.b-portal__lead { margin: 0; color: var(--ink-2); line-height: 1.75; }

/* ---------- 提示条 ---------- */
.b-portal__notice {
	margin: 0 0 var(--s-4);
	padding: var(--s-3) var(--s-4);
	border-radius: var(--r-2);
	border: 1px solid var(--field-border);
	background: var(--bg-1);
	color: var(--ink-1);
	line-height: 1.6;
}
.b-portal__notice.is-ok { border-color: var(--success-strong); color: var(--success-strong); }
.b-portal__notice.is-error { border-color: var(--danger-strong); color: var(--danger-strong); }

/* ---------- 四步说明 ---------- */
.b-portal__steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--s-3);
	margin: 0 0 var(--s-5);
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.b-portal__step {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: var(--s-3);
	border: 1px solid var(--field-border);
	border-radius: var(--r-2);
	background: var(--bg-1);
}
.b-portal__step-n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--brand-50);
	color: var(--brand);
	font-size: 12px;
	font-weight: 700;
}
.b-portal__step-t { font-size: 0.92rem; font-weight: 600; color: var(--ink-1); }
.b-portal__step-d { font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }

/* ---------- 卡片（表单 / 游客态共用） ---------- */
.b-portal__card {
	padding: var(--s-5);
	border: 1px solid var(--field-border);
	border-radius: var(--r-3);
	background: var(--bg-0);
}
.b-portal__card--guest { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.b-portal__guest-t { margin: 0; color: var(--ink-2); }

/* ---------- 表单（沿用全站 .b-field 结构） ---------- */
.b-portal__form .b-field { margin-bottom: var(--s-4); }
.b-portal__form .b-field:last-of-type { margin-bottom: 0; }
.b-portal__form .b-field__label {
	display: block;
	margin-bottom: var(--s-2);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink-2);
}
.b-portal__form .b-field__input,
.b-portal__form .b-field__select,
.b-portal__form .b-field__textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--field-border);
	border-radius: var(--r-2);
	background: var(--bg-0);
	color: var(--ink-0);
	font-size: max(16px, 0.95rem);
	font-family: inherit;
	line-height: 1.6;
	box-sizing: border-box;
	transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.b-portal__form .b-field__textarea { resize: vertical; min-height: 160px; }
.b-portal__form .b-field__input::placeholder,
.b-portal__form .b-field__textarea::placeholder { color: var(--ink-4); }
.b-portal__form .b-field__input:focus,
.b-portal__form .b-field__select:focus,
.b-portal__form .b-field__textarea:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-50);
}
.b-portal__form .b-field__hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--ink-4); }

/* 预算 + 期望交付 并排 */
.b-portal__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-4); }
.b-portal__row .b-field { margin-bottom: 0; }

.b-portal__privacy {
	margin: 0 0 var(--s-4);
	padding: var(--s-3);
	border-radius: var(--r-2);
	background: var(--bg-1);
	color: var(--ink-3);
	font-size: 0.84rem;
	line-height: 1.7;
}

.b-portal__actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.b-portal__mine { color: var(--ink-3); font-size: 0.9rem; }
.b-portal__mine:hover { color: var(--brand); }

/* ---------- 窄屏 ---------- */
@media (max-width: 719px) {
	.b-portal__steps { grid-template-columns: repeat(2, 1fr); }
	.b-portal__row { grid-template-columns: 1fr; gap: var(--s-3); }
	.b-portal__card { padding: var(--s-4); }
}
@media (max-width: 419px) {
	.b-portal__steps { grid-template-columns: 1fr; }
}

/* ============================================================
   定制链路的另两个面〔批X587〕：
   创作者中心「定制邀约」(.b-req-cc) 与 我的账户「我的定制需求」(.b-req-mine)
   —— 原先 18 处内联 style，且用了两个**不存在的 token**（--b-border / --b-muted，
      一直在吃 #e5e5e5 / #777 的 fallback ⇒ 暗色模式下必然难看）。这里统一收进类。
   ============================================================ */

.b-req-cc__title { margin: 0 0 var(--s-3); font-size: 1.35rem; }

/* 需求卡（邀约页与我的需求页共用外观） */
.b-req-card,
.b-req-mine {
	padding: var(--s-4);
	margin: var(--s-3) 0;
	border: 1px solid var(--field-border);
	border-radius: var(--r-3);
	background: var(--bg-0);
}
.b-req-card__title,
.b-req-mine__title { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.4; }
.b-req-card__meta,
.b-req-mine__meta { margin: 0 0 var(--s-3); color: var(--ink-3); font-size: 0.86rem; }
.b-req-card__brief,
.b-req-mine__brief {
	white-space: pre-wrap;
	color: var(--ink-1);
	line-height: 1.75;
	font-size: 0.92rem;
}

/* 说明条（页顶的协议口径提示） */
.b-req-intro {
	margin: 0 0 var(--s-4);
	padding: var(--s-3);
	border-radius: var(--r-2);
	background: var(--bg-1);
	color: var(--ink-3);
	font-size: 0.84rem;
	line-height: 1.7;
}

/* 报价行 + 状态 */
.b-req-card__quote,
.b-req-mine__quote { margin: var(--s-3) 0 0; color: var(--ink-0); }
.b-req-mine__state { margin: 4px 0 0; color: var(--ink-3); font-size: 0.86rem; }

/* 卡内动作区（撤回 / 接受付款 / 提交报价） */
.b-req-acts { margin: var(--s-3) 0 0; }

/* 报价表单：一行排布，窄屏自动换行 */
.b-req-quote-form {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	align-items: flex-end;
	margin: var(--s-3) 0 0;
	padding: var(--s-3);
	border-radius: var(--r-2);
	background: var(--bg-1);
}
.b-req-quote-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--ink-2); }
.b-req-quote-form input[type="number"],
.b-req-quote-form input[type="text"],
.b-req-quote-form select {
	padding: 8px 10px;
	border: 1px solid var(--field-border);
	border-radius: var(--r-2);
	background: var(--bg-0);
	color: var(--ink-0);
	font-size: max(var(--b-control-font-floor, 0px), 0.9rem);
	font-family: inherit;
}
.b-req-quote-form input[type="number"] { width: 7.5em; }
.b-req-quote-form input[type="text"] { flex: 1; min-width: 12em; }
.b-req-quote-form input:focus,
.b-req-quote-form select:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-50);
}

@media (max-width: 719px) {
	.b-req-quote-form { flex-direction: column; align-items: stretch; }
	.b-req-quote-form input[type="number"] { width: 100%; }
}
