/* ==========================================================================
   AetherGlow 刻字字段
   独立资源：正式商品页与叙事页共用，不依赖 lamp-story.css
   ========================================================================== */

@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Manrope';
	src: url('fonts/manrope-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.ag-engrave {
	--ag-blue: #002f6c;
	--ag-gold: #c5a059;
	--ag-ivory: #f7f3ec;
	--ag-panel: #fffdf9;
	--ag-ink: #14161a;
	--ag-muted: #6e6a63;
	--ag-line: #ddd5c7;

	margin: 0 0 22px;
	padding: 18px 18px 16px;
	border: 1px solid var(--ag-line);
	border-radius: 2px;
	background: var(--ag-panel);
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--ag-ink);
}

/* ---------- 标题行 ---------- */

.ag-engrave__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 14px;
	margin-bottom: 14px;
}

.ag-engrave__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ag-blue);
}

.ag-engrave__opt {
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: none;
	color: var(--ag-muted);
}

.ag-engrave__hint {
	font-size: 11.5px;
	color: var(--ag-muted);
}

/* ---------- 场景模板 ---------- */

.ag-engrave__presets {
	margin-bottom: 16px;
}

.ag-engrave__presets-label {
	display: block;
	margin-bottom: 8px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ag-muted);
}

/* 固定 3 列而不是自动换行：
   自动换行在窄容器里会变成 5+1，最后一个按钮单独占一行很难看。
   3 列在任何宽度下都是 3+3，两页表现一致。 */
.ag-engrave__chips {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.ag-chip {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--ag-line);
	border-radius: 2px;
	background: var(--ag-ivory);
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	color: var(--ag-ink);
	cursor: pointer;
	transition:
		border-color 180ms ease,
		background-color 180ms ease,
		color 180ms ease;
}

.ag-chip:hover {
	border-color: var(--ag-blue);
	color: var(--ag-blue);
}

.ag-chip:focus-visible {
	outline: 2px solid var(--ag-blue);
	outline-offset: 2px;
}

.ag-chip.is-active {
	border-color: var(--ag-blue);
	background: var(--ag-blue);
	color: #fff;
}

/* ---------- 两行输入 ---------- */

.ag-engrave__rows {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ag-engrave__row {
	position: relative;
	display: flex;
	align-items: center;
}

.ag-engrave__input {
	width: 100%;
	height: 50px;
	padding: 0 62px 0 14px;
	border: 1px solid var(--ag-line);
	border-radius: 2px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	letter-spacing: 0.04em;
	color: var(--ag-ink);
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease;
}

.ag-engrave__input::placeholder {
	color: #b3ada2;
	letter-spacing: 0.04em;
}

.ag-engrave__input:focus {
	outline: none;
	border-color: var(--ag-blue);
	box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.08);
}

.ag-engrave__count {
	position: absolute;
	right: 14px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--ag-muted);
	pointer-events: none;
	transition: color 180ms ease;
}

.ag-engrave__count.is-full {
	color: var(--ag-gold);
}

/* ---------- 说明与同意 ---------- */

.ag-engrave__note {
	margin: 12px 0 14px;
	font-size: 12px;
	line-height: 1.55;
	color: var(--ag-muted);
}

.ag-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--ag-line);
	border-radius: 2px;
	background: var(--ag-ivory);
	font-size: 12.5px;
	line-height: 1.55;
	color: #4a4740;
	cursor: pointer;
}

.ag-consent input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--ag-blue);
	cursor: pointer;
}

.ag-consent.is-invalid {
	border-color: #b3261e;
	background: #fdf3f2;
}

/* ---------- 加购按钮下方的交期说明 ---------- */

.ag-dispatch {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 10px 14px;
	border-left: 2px solid var(--ag-gold, #c5a059);
	border-radius: 2px;
	background: var(--ag-ivory, #f7f3ec);
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.5;
	color: #4a4740;
}

.ag-dispatch__dot {
	flex: 0 0 auto;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ag-gold, #c5a059);
}

/* ---------- 窄屏 ---------- */

@media (max-width: 480px) {
	/* 手机上 3 列会把「Anniversary」挤得太紧，降到 2 列 */
	.ag-engrave__chips {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.ag-engrave {
		padding: 16px 14px 14px;
	}

	.ag-engrave__input {
		height: 46px;
		font-size: 14px;
		padding-right: 56px;
	}

	.ag-engrave__head {
		flex-direction: column;
		gap: 4px;
	}
}
