/* 金币商城 /mall/ —— 与站点一致的浅色卡片风格 */

.ml-page {
	max-width: 1080px;
	margin: 0 auto;
	padding: 4px 0 60px;
	color: #1f2937;
	font-size: 14px;
	line-height: 1.6;
}

/* ---------- 顶部 ---------- */
.ml-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
	border-radius: 18px;
	padding: 26px 28px;
	color: #fff;
	box-shadow: 0 14px 34px -16px rgba(79, 70, 229, .55);
	flex-wrap: wrap;
}

.ml-hero-l { flex: 1 1 460px; min-width: 0; }

.ml-kicker {
	display: inline-block;
	font-size: 11.5px;
	letter-spacing: 2px;
	text-transform: uppercase;
	background: rgba(255, 255, 255, .18);
	border: 1px solid rgba(255, 255, 255, .28);
	padding: 2px 10px;
	border-radius: 999px;
	margin-bottom: 10px;
}

.ml-hero h1 {
	margin: 0 0 8px;
	font-size: 25px;
	line-height: 1.35;
	font-weight: 700;
	color: #fff;
}

.ml-hero h1 em { font-style: normal; color: #fde68a; }

.ml-hero p {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, .82);
	line-height: 1.7;
}

.ml-wallet {
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .26);
	border-radius: 14px;
	padding: 12px 18px;
	backdrop-filter: blur(4px);
	flex-wrap: wrap;
}

.ml-wallet-ico { font-size: 30px; line-height: 1; }

.ml-wallet-n {
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.ml-wallet-t { font-size: 11.5px; color: rgba(255, 255, 255, .75); }

.ml-wallet-tag {
	display: inline-block;
	background: #fde68a;
	color: #78350f;
	font-size: 11.5px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
}

/* ---------- 区块 ---------- */
.ml-sec { margin-top: 30px; }

.ml-sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.ml-sec-head h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}

.ml-sec-head span { font-size: 12px; color: #6b7280; }

.ml-empty {
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	padding: 26px;
	text-align: center;
	color: #6b7280;
	font-size: 13px;
}

.ml-empty a { color: #4f46e5; font-weight: 600; }

/* ---------- 商品 ---------- */
.ml-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.ml-card {
	background: #fff;
	border: 1px solid #ececf1;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 14px -10px rgba(15, 23, 42, .25);
	transition: transform .16s ease, box-shadow .16s ease;
}

.ml-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 26px -18px rgba(15, 23, 42, .45);
}

.ml-card.is-off { opacity: .72; }
.ml-card.is-off:hover { transform: none; }

.ml-pic {
	position: relative;
	aspect-ratio: 3 / 2;
	background: #f3f4f6;
	overflow: hidden;
}

.ml-pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ml-badge, .ml-stock {
	position: absolute;
	top: 9px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	line-height: 1.6;
}

.ml-badge {
	left: 9px;
	background: rgba(17, 24, 39, .72);
	color: #fff;
}

.ml-stock {
	right: 9px;
	background: #fff;
	color: #b45309;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.ml-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.ml-name {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	line-height: 1.35;
}

.ml-sub {
	font-size: 12px;
	color: #6b7280;
	line-height: 1.5;
	min-height: 36px;
}

.ml-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	row-gap: 5px;
	margin-top: auto;
	padding-top: 4px;
}

/* 子项不许被压缩，挤不下就换行，避免文字叠在一起 */
.ml-price > * { flex: 0 0 auto; }

.ml-price b {
	font-size: 19px;
	font-weight: 800;
	color: #d97706;
	font-variant-numeric: tabular-nums;
}

.ml-price i {
	font-style: normal;
	font-size: 11px;
	color: #9ca3af;
	text-decoration: line-through;
	white-space: nowrap;
}

.ml-price i.ml-next {
	text-decoration: none;
	color: #b45309;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 999px;
	padding: 0 7px;
}

.ml-price em {
	font-style: normal;
	font-size: 11px;
	color: #6b7280;
	background: #f3f4f6;
	padding: 1px 7px;
	border-radius: 999px;
	white-space: nowrap;
}

.ml-buy {
	margin-top: 8px;
	width: 100%;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	padding: 10px 12px;
	cursor: pointer;
	transition: filter .15s ease;
}

.ml-buy:hover:not(:disabled) { filter: brightness(1.07); }
.ml-buy:active:not(:disabled) { transform: translateY(1px); }

.ml-buy:disabled,
.ml-buy[disabled] {
	background: #eef0f4;
	color: #9aa1ad;
	cursor: not-allowed;
	font-weight: 600;
}

/* ---------- 我的券 ---------- */
.ml-mine {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ml-ticket {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	background: #fff;
	border: 1px solid #ececf1;
	border-radius: 14px;
	padding: 13px 16px;
	position: relative;
	overflow: hidden;
	flex-wrap: wrap;
}

.ml-ticket::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #6366f1;
}

.ml-ticket.is-used::before { background: #10b981; }
.ml-ticket.is-void::before { background: #d1d5db; }
.ml-ticket.is-used { background: #fafdfb; }
.ml-ticket.is-void { opacity: .65; }

.ml-tk-name { font-size: 14px; font-weight: 700; color: #111827; }
.ml-tk-meta { font-size: 11.5px; color: #8b93a1; margin-top: 2px; }

.ml-tk-code {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
}

.ml-tk-code code {
	font-family: Consolas, "Courier New", monospace;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 3px;
	color: #4338ca;
	background: #eef2ff;
	border: 1px dashed #c7d2fe;
	border-radius: 8px;
	padding: 2px 10px;
	cursor: pointer;
	user-select: all;
}

.ml-ticket.is-used .ml-tk-code code {
	color: #047857;
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.ml-ticket.is-void .ml-tk-code code {
	color: #6b7280;
	background: #f3f4f6;
	border-color: #e5e7eb;
	text-decoration: line-through;
}

.ml-tk-tag {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: #eef2ff;
	color: #4338ca;
	white-space: nowrap;
}

.ml-ticket.is-used .ml-tk-tag { background: #ecfdf5; color: #047857; }
.ml-ticket.is-void .ml-tk-tag { background: #f3f4f6; color: #6b7280; }

/* ---------- 榜单 ---------- */
.ml-rank {
	background: #fff;
	border: 1px solid #ececf1;
	border-radius: 16px;
	overflow: hidden;
}

.ml-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 16px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 13.5px;
}

.ml-row:last-child { border-bottom: 0; }
.ml-row.is-me { background: #f5f3ff; }

.ml-no {
	width: 28px;
	font-size: 15px;
	text-align: center;
	flex: 0 0 auto;
	color: #6b7280;
	font-weight: 700;
}

.ml-who {
	flex: 1;
	font-weight: 600;
	color: #111827;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ml-who i {
	font-style: normal;
	font-size: 10.5px;
	font-weight: 700;
	color: #fff;
	background: #8b5cf6;
	border-radius: 4px;
	padding: 0 5px;
	margin-left: 6px;
	vertical-align: 1px;
}

.ml-cnt {
	font-size: 12.5px;
	color: #4f46e5;
	font-weight: 700;
	white-space: nowrap;
}

.ml-spent {
	font-size: 12px;
	color: #9ca3af;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	min-width: 76px;
	text-align: right;
}

.ml-feed {
	margin-top: 14px;
	background: #fbfbfd;
	border: 1px solid #ececf1;
	border-radius: 14px;
	padding: 12px 16px;
}

.ml-feed-head {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
	letter-spacing: .5px;
	margin-bottom: 6px;
}

.ml-feed-row {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 12.5px;
	color: #4b5563;
	padding: 4px 0;
}

.ml-feed-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #a78bfa;
	flex: 0 0 auto;
}

.ml-feed-who { font-weight: 600; color: #374151; }
.ml-feed-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-feed-when { font-size: 11.5px; color: #9ca3af; white-space: nowrap; }
.ml-feed-empty { font-size: 12.5px; color: #9ca3af; }

/* ---------- 底部 ---------- */
.ml-foot {
	margin-top: 26px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12px;
	color: #9ca3af;
}

.ml-foot a { color: #6366f1; font-weight: 600; text-decoration: none; }
.ml-foot a:hover { text-decoration: underline; }

/* ---------- 轻提示 ---------- */
.ml-toast {
	position: fixed;
	left: 50%;
	bottom: 96px;
	transform: translateX(-50%) translateY(12px);
	background: #111827;
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
	padding: 10px 18px;
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
	z-index: 2147483150;
	opacity: 0;
	transition: opacity .2s ease, transform .2s ease;
	max-width: 86vw;
	text-align: center;
	pointer-events: none;
}

.ml-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.ml-toast.is-err { background: #991b1b; }

/* ---------- 包邮角标 / 实物提示 ---------- */
.ml-free {
	position: absolute;
	left: 9px;
	bottom: 9px;
	background: #10b981;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 999px;
	line-height: 1.6;
	box-shadow: 0 2px 8px rgba(16, 185, 129, .35);
}

.ml-need {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 1px 0 2px;
}

.ml-need span {
	font-size: 11px;
	color: #4b5563;
	background: #f3f4f6;
	border: 1px solid #ececf1;
	border-radius: 999px;
	padding: 1px 8px;
	line-height: 1.7;
	white-space: nowrap;
}

.ml-tk-ship {
	font-size: 11.5px;
	color: #4b5563;
	background: #f8fafc;
	border: 1px dashed #e2e8f0;
	border-radius: 8px;
	padding: 4px 8px;
	margin-top: 6px;
	line-height: 1.55;
	word-break: break-all;
}

.ml-tk-ship span { color: #6b7280; }

/* ---------- 兑换弹层 ---------- */
.ml-sheet {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483050;
	display: none;
}

.ml-sheet.is-on { display: block; }

.ml-sh-mask {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(17, 24, 39, .46);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.ml-sh-card {
	position: absolute;
	left: 50%;
	top: 50%;
	width: calc(100vw - 28px);
	max-width: 440px;
	max-height: 88vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 18px;
	padding: 18px 18px 16px;
	box-shadow: 0 30px 70px -18px rgba(15, 23, 42, .55);
	opacity: 0;
	transform: translate(-50%, -50%) translateY(10px);
	transition: opacity .18s ease, transform .18s ease;
	-webkit-overflow-scrolling: touch;
}

.ml-sheet.is-on .ml-sh-card {
	opacity: 1;
	transform: translate(-50%, -50%) translateY(0);
}

.ml-sh-x {
	position: absolute;
	right: 10px;
	top: 10px;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	color: #6b7280;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	font-family: inherit;
	z-index: 2;
}

.ml-sh-x:hover { background: #e9ecf1; color: #374151; }

.ml-sh-kicker {
	font-size: 10.5px;
	letter-spacing: 2px;
	color: #9ca3af;
	text-transform: uppercase;
}

.ml-sh-name {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	margin-top: 3px;
	padding-right: 30px;
	line-height: 1.35;
}

.ml-sh-price {
	font-size: 16px;
	font-weight: 800;
	color: #d97706;
	margin-top: 5px;
	font-variant-numeric: tabular-nums;
}

.ml-sh-price i {
	font-style: normal;
	font-size: 11px;
	font-weight: 600;
	color: #9ca3af;
	margin-left: 4px;
}

.ml-sh-free {
	margin-top: 12px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #047857;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.5;
}

.ml-sh-tip {
	margin-top: 12px;
	display: flex;
	gap: 9px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 12px;
	padding: 10px 12px;
	color: #92400e;
	font-size: 12.5px;
	line-height: 1.6;
}

.ml-sh-tipi { font-size: 15px; line-height: 1.3; flex: 0 0 auto; }

.ml-sh-tipbtn {
	display: inline-block;
	margin-left: 6px;
	color: #b45309;
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

.ml-sh-form {
	margin-top: 13px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.ml-sh-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.ml-sh-row > span {
	flex: 0 0 58px;
	font-size: 12.5px;
	color: #6b7280;
	padding-top: 9px;
}

.ml-sh-row input,
.ml-sh-row textarea {
	flex: 1;
	min-width: 0;
	font-family: inherit;
	font-size: 14px;
	color: #111827;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 8px 11px;
	outline: none;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.ml-sh-row input:focus,
.ml-sh-row textarea:focus {
	background: #fff;
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.ml-sh-row textarea {
	resize: none;
	line-height: 1.5;
	height: 54px;
}

.ml-sh-row .is-bad {
	border-color: #fca5a5;
	background: #fef2f2;
	box-shadow: 0 0 0 3px rgba(248, 113, 113, .14);
}

.ml-sh-hint {
	font-size: 11px;
	color: #9ca3af;
	padding-left: 68px;
	line-height: 1.5;
}

.ml-sh-btns {
	display: flex;
	gap: 10px;
	margin-top: 16px;
}

.ml-sh-btns button {
	flex: 1;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	border: 0;
	border-radius: 12px;
	padding: 11px 12px;
	cursor: pointer;
	line-height: 1.3;
}

.ml-sh-cancel { background: #f3f4f6; color: #4b5563; }
.ml-sh-cancel:hover { background: #e9ecf1; }

.ml-sh-ok {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	flex: 1.7;
	box-shadow: 0 8px 18px -10px rgba(99, 102, 241, .9);
}

.ml-sh-ok:hover:not(:disabled) { filter: brightness(1.06); }
.ml-sh-ok:disabled { opacity: .72; cursor: default; box-shadow: none; }

.ml-sh-warn {
	margin-top: 10px;
	font-size: 11px;
	color: #9ca3af;
	text-align: center;
}

.ml-sh-body.is-busy { opacity: .85; }

/* 成功态 */
.ml-sh-done { text-align: center; padding: 6px 0 0; }
.ml-sh-ok-ico { font-size: 34px; line-height: 1; }
.ml-sh-ok-t { font-size: 15px; font-weight: 700; color: #111827; margin-top: 5px; }

.ml-sh-code {
	display: inline-block;
	margin-top: 10px;
	font-family: Consolas, "Courier New", monospace;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 5px;
	color: #4338ca;
	background: #eef2ff;
	border: 1px dashed #c7d2fe;
	border-radius: 12px;
	padding: 6px 16px;
	cursor: pointer;
	user-select: all;
}

.ml-sh-ok-s { font-size: 11.5px; color: #9ca3af; margin-top: 8px; }

.ml-sh-note {
	margin-top: 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 12.5px;
	line-height: 1.6;
	color: #374151;
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
}

.ml-sh-note i { font-style: normal; color: #9ca3af; font-size: 11.5px; }

/* ---------- 手机 ---------- */
@media (max-width: 860px) {
	.ml-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ml-mine { grid-template-columns: 1fr; }
	.ml-hero { padding: 20px; }
	.ml-hero h1 { font-size: 21px; }
	.ml-wallet { width: 100%; justify-content: space-between; }
}

@media (max-width: 560px) {
	.ml-page { padding-bottom: 90px; }
	.ml-grid { grid-template-columns: 1fr; gap: 13px; }
	.ml-pic { aspect-ratio: 16 / 9; }
	.ml-sub { min-height: 0; }
	.ml-hero h1 { font-size: 19px; }
	.ml-hero p { font-size: 12.5px; }
	.ml-wallet-n { font-size: 23px; }
	.ml-ticket { gap: 9px; }
	.ml-tk-code { width: 100%; justify-content: space-between; }
	.ml-tk-code code { font-size: 17px; }
	.ml-spent { min-width: 64px; }

	/* 弹层改成底部上滑 */
	.ml-sh-card {
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		width: auto;
		max-width: none;
		max-height: 90vh;
		border-radius: 18px 18px 0 0;
		padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
		transform: translateY(18px);
	}
	.ml-sheet.is-on .ml-sh-card { transform: translateY(0); }
	.ml-sh-row > span { flex: 0 0 52px; font-size: 12px; }
	.ml-sh-hint { padding-left: 62px; }
	.ml-sh-code { font-size: 23px; letter-spacing: 4px; }
	.ml-sh-btns button { padding: 12px 10px; font-size: 13.5px; }
}

/* 老师前台核销台 */
.ml-teach-redeem { background: linear-gradient(120deg,#f4f0ff,#eef7ff); border: 1px solid #e2dcff; }
.ml-teach-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ml-teach-row input {
	flex: 1 1 240px; min-width: 180px; padding: 12px 14px; border-radius: 10px;
	border: 1px solid #d5d0f0; background: #fff; font: 600 17px/1.2 Consolas,Monaco,monospace;
	letter-spacing: 3px; text-transform: uppercase; color: #3b2f70;
}
.ml-teach-row input:focus { outline: none; border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.ml-teach-row .ml-btn {
	flex: 0 0 auto; padding: 12px 26px; border: 0; border-radius: 10px; cursor: pointer;
	background: #7c5cff; color: #fff; font-size: 14px; font-weight: 700;
}
.ml-teach-row .ml-btn:disabled { opacity: .6; cursor: default; }
.ml-teach-tip { margin-top: 9px; font-size: 12px; color: #7b7498; }
