/* ===== KSPay 独立收银台 —— 设计系统 ===== */
:root {
	--bg: #f4f6fa;
	--bg-soft: #eef1f7;
	--card: #ffffff;
	--text: #0f172a;
	--text-2: #475569;
	--muted: #8b96a8;
	--border: #e6eaf0;
	--border-strong: #d6dce6;
	--primary: #4f46e5;
	--primary-dark: #4338ca;
	--primary-soft: #eef0ff;
	--success: #16a34a;
	--success-soft: #e8f7ee;
	--warn: #f59e0b;
	--warn-soft: #fff5e5;
	--danger: #dc2626;
	--danger-soft: #fdecec;
	--wx: #07c160;
	--ali: #1677ff;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
	--shadow-lg: 0 4px 12px rgba(15, 23, 42, .06), 0 24px 48px -20px rgba(15, 23, 42, .22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
	/* 移动端横竖屏切换时不擅自放大字号 */
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	/* 消除双击缩放延迟，触摸响应更快 */
	touch-action: manipulation;
	/* 防止误触下拉刷新导致付款流程中断 */
	overscroll-behavior-y: contain;
	/* 兜底：避免光晕层造成横向滚动 */
	overflow-x: hidden;
}

/* 输入框获得焦点时禁止 iOS 自动缩放（配合字号 ≥16px） */
input, select, textarea, button { font-family: inherit; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* 键盘可达性：保留焦点轮廓 */
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible,
.pay-method:focus-visible, .agg-method:focus-visible,
a:focus-visible, summary:focus-visible {
	outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

/* ---------- 布局 ---------- */
.topbar {
	background: var(--card);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 20;
}
.topbar-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand-mark {
	width: 30px; height: 30px; border-radius: 9px;
	background: linear-gradient(135deg, #6366f1, #4f46e5);
	color: #fff; display: grid; place-items: center;
	font-size: 15px; font-weight: 800; letter-spacing: -.5px;
	box-shadow: 0 4px 10px -2px rgba(79, 70, 229, .5);
}
.topnav { display: flex; gap: 4px; align-items: center; }
.topnav a {
	color: var(--text-2); font-size: 13.5px; padding: 7px 12px; border-radius: 8px;
}
.topnav a:hover { background: var(--bg-soft); text-decoration: none; }
.topnav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.wrap-narrow { max-width: 620px; }

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
}
.card + .card { margin-top: 18px; }
.card-title { font-size: 15px; font-weight: 650; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: -10px; margin-bottom: 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.label .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.input, .select, .textarea {
	width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit;
	border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
	background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
	outline: none;
	/* 移动端：统一由样式表控制外观，去掉 iOS 默认内阴影与圆角 */
	-webkit-appearance: none; appearance: none;
}
.select {
	/* 自绘下拉箭头（原生箭头在移动端样式不统一） */
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b96a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
	padding-right: 36px;
}
.input:focus, .select:focus, .textarea:focus {
	border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}
.input-money {
	font-size: 30px; font-weight: 700; padding: 12px 14px 12px 38px; letter-spacing: -.02em;
}
.money-wrap { position: relative; }
.money-wrap .cny {
	position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
	font-size: 22px; font-weight: 600; color: var(--muted); pointer-events: none;
}
.quick-amounts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
	padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
	background: #fff; font-size: 13px; color: var(--text-2); cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------- 环境自动识别 / 拉起支付提示条 ---------- */
.auto-tip {
	display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
	font-size: 12.5px; line-height: 1.5;
	color: #3730a3; background: var(--primary-soft); border: 1px solid #dfe3ff;
	border-radius: 10px; padding: 8px 11px; margin-bottom: 12px;
}
.auto-tip.jump { color: #8a4b00; background: var(--warn-soft); border-color: #ffdfae; }
.auto-tip .act { margin-left: auto; display: flex; gap: 6px; flex: none; }
.auto-tip .btn { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }

/* ---------- 支付方式 ---------- */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-method {
	display: flex; align-items: center; gap: 12px; padding: 15px 16px;
	border: 1.5px solid var(--border-strong); border-radius: 14px;
	background: #fff; cursor: pointer; transition: .18s cubic-bezier(.2,.7,.3,1); user-select: none;
}
.pay-method:hover { border-color: #b9c0cc; transform: translateY(-1px); }
.pay-method.on {
	border-color: var(--primary); background: var(--primary-soft);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, .13), 0 8px 18px -12px rgba(79, 70, 229, .5);
}
.pay-ico {
	width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
	color: #fff; font-weight: 700; font-size: 17px; flex: none;
}
.pay-ico.wx { background: linear-gradient(135deg, #2ecb6d, #07c160); box-shadow: 0 5px 12px -4px rgba(7, 193, 96, .75); }
.pay-ico.ali { background: linear-gradient(135deg, #54a0ff, #1677ff); box-shadow: 0 5px 12px -4px rgba(22, 119, 255, .75); }
.pay-ico svg { width: 22px; height: 22px; display: block; }
.pay-method .pm-name { font-weight: 600; font-size: 14px; }
.pay-method .pm-desc { font-size: 12px; color: var(--muted); }
.pay-method .check {
	margin-left: auto; width: 18px; height: 18px; border-radius: 50%;
	border: 1.5px solid var(--border-strong); background: #fff; flex: none;
}
.pay-method.on .check { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3.5px #fff; }

/* ---------- 按钮 ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
	background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
	font-family: inherit; cursor: pointer; transition: .15s; text-decoration: none;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-ghost { background: #fff; color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-brand {
	background: linear-gradient(135deg, #6d6bf0, #4338ca);
	box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .85);
}
.btn-brand:hover { background: linear-gradient(135deg, #6366f1, #3730a3); }
.btn-brand:active { transform: translateY(1px); }

/* ---------- 二维码中心图标 ---------- */
.qr-logo {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
	background: linear-gradient(135deg, #FF8A00, #FE3666); color: #fff;
	font-weight: 800; font-size: 22px; letter-spacing: -.5px;
	box-shadow: 0 0 0 5px #fff, 0 6px 14px -6px rgba(254, 54, 102, .8);
}

/* ---------- 收银台页面 ---------- */
.checkout-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.checkout-bg i {
	position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
}
.checkout-bg i:nth-child(1) { width: 420px; height: 420px; background: #c7d2fe; top: -180px; left: -80px; }
.checkout-bg i:nth-child(2) { width: 360px; height: 360px; background: #fecdd3; bottom: -160px; right: -60px; }
.checkout-bg i:nth-child(3) { width: 300px; height: 300px; background: #bfdbfe; top: 40%; right: -120px; opacity: .35; }
.checkout-main { position: relative; z-index: 1; }

.co-card { border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; }
.co-head { text-align: center; margin-bottom: 22px; }
.co-head h1 { font-size: 19px; }
.co-head p { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.co-amount-box {
	background: linear-gradient(180deg, #fbfbfe, #f6f7fb);
	border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 14px; text-align: center;
}
.co-amount-box .money-wrap { display: inline-flex; align-items: center; position: relative; max-width: 260px; }
.co-amount-box .cny { position: static; transform: none; font-size: 24px; margin-right: 4px; }
.co-amount-box .input-money {
	border: 0; background: transparent; text-align: left; padding: 0; width: 180px;
	font-size: 38px; box-shadow: none;
}
.co-amount-box .input-money:focus { box-shadow: none; }
.co-amount-box .quick-amounts { justify-content: center; }
.co-divider { height: 1px; background: var(--border); margin: 20px 0; }
.co-trust { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 12px; color: var(--muted); }
.co-trust span { display: flex; align-items: center; gap: 5px; }

/* ---------- 支付页 ---------- */
.pay-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .pay-layout { grid-template-columns: 1fr; } }

.qr-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; text-align: center; }
.qr-box {
	width: 240px; height: 240px; margin: 4px auto 14px; border-radius: 12px;
	border: 1px solid var(--border); padding: 10px; background: #fff; position: relative; overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; display: block; }
.qr-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; background: #fff; }
.qr-amount { font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.qr-amount small { font-size: 17px; font-weight: 600; margin-right: 2px; }
.qr-tip { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.qr-tip .hl { color: var(--primary); font-weight: 600; }

.countdown { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.countdown-bar { flex: 1; height: 4px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.countdown-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #a855f7); transition: width 1s linear; }

.status-pill {
	display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
	font-size: 12.5px; font-weight: 600;
}
.status-pill.waiting { background: var(--warn-soft); color: #b45309; }
.status-pill.paid { background: var(--success-soft); color: var(--success); }
.status-pill.closed { background: var(--bg-soft); color: var(--muted); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--muted); flex: none; }
.info-list .v { color: var(--text); font-weight: 550; text-align: right; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.success-mask {
	position: absolute; inset: 0; background: rgba(255, 255, 255, .96); border-radius: 12px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.success-icon {
	width: 56px; height: 56px; border-radius: 50%; background: var(--success); color: #fff;
	display: grid; place-items: center; font-size: 28px; font-weight: 700;
	animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
	text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px;
	padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
	background: #fafbfd;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover { background: #fafbfd; }
tbody tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.wait { background: var(--warn-soft); color: #b45309; }
.badge.off { background: var(--bg-soft); color: var(--muted); }
.badge.err { background: var(--danger-soft); color: var(--danger); }

/* ---------- 统计卡片 ---------- */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .s-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .s-value { font-size: 25px; font-weight: 720; letter-spacing: -.02em; margin-top: 6px; }
.stat .s-value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat .s-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 后台 ---------- */
.login-box { max-width: 380px; margin: 8vh auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab {
	padding: 9px 15px; font-size: 13.5px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent;
	margin-bottom: -1px; white-space: nowrap; font-weight: 550;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }
.pane { display: none; }
.pane.on { display: block; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 8px 11px; font-size: 13px; }
.spacer { flex: 1; }

.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--muted); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 13.5px; }
.empty .e-icon { font-size: 34px; opacity: .35; margin-bottom: 8px; }

/* ---------- 提示条 ---------- */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }
.alert.warn { background: var(--warn-soft); color: #92400e; border: 1px solid #fde3ba; }
.alert.info { background: var(--primary-soft); color: #3730a3; border: 1px solid #dcd9fb; }
.alert.err { background: var(--danger-soft); color: #991b1b; border: 1px solid #f8cfcf; }

.toast {
	position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
	background: #0f172a; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px;
	opacity: 0; pointer-events: none; transition: .25s; z-index: 999; box-shadow: var(--shadow-lg);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 20px 10px; }
.footer code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

.spinner {
	width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
	border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   移动端 H5 适配
   断点：≤820px（平板/大屏手机，输入字号防缩放）
         ≤640px（手机竖屏）
         ≤380px（小屏手机）
   ============================================================ */

/* 仅移动端 / 仅桌面端 显示控制 */
.only-mobile { display: none; }

@media (max-width: 820px) {
	/* iOS 在输入框字号 <16px 时会自动放大整页，统一提到 16px */
	.input, .select, .textarea { font-size: 16px; }
	.toolbar .input, .toolbar .select { font-size: 16px; }
	/* 金额输入框保持大字号（需覆盖上面的 16px） */
	.input-money { font-size: 30px; }
}

@media (max-width: 640px) {
	.only-mobile { display: block; }
	.only-desktop { display: none !important; }

	/* ---------- 顶部栏 ---------- */
	.topbar-inner { padding: 11px 14px; gap: 10px; flex-wrap: wrap; }
	.brand { font-size: 15px; gap: 8px; min-width: 0; }
	.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
	.topnav { gap: 2px; }
	.topnav a { padding: 6px 9px; font-size: 12.5px; }

	/* ---------- 容器 ---------- */
	.wrap { padding: 16px 14px calc(36px + env(safe-area-inset-bottom)); }
	.card { padding: 16px; border-radius: 14px; }
	.card + .card { margin-top: 12px; }
	.card-title { font-size: 14.5px; margin-bottom: 12px; }
	.card-sub { margin-top: -8px; margin-bottom: 12px; font-size: 12px; }

	/* ---------- 统计卡：2 列更紧凑 ---------- */
	.grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.stat { padding: 13px 14px; border-radius: 13px; }
	.stat .s-label { font-size: 11.5px; }
	.stat .s-value { font-size: 20px; margin-top: 3px; }
	.stat .s-value small { font-size: 12px; }
	.stat .s-sub { font-size: 11px; }

	/* ---------- 按钮 / 快捷金额：满足 44px 触控区 ---------- */
	.btn { min-height: 44px; padding: 11px 16px; }
	.btn-lg { min-height: 50px; font-size: 15.5px; }
	.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
	.chip { padding: 8px 13px; font-size: 13px; min-height: 36px; display: inline-flex; align-items: center; }
	.quick-amounts { gap: 7px; }

	/* ---------- 收银台 ---------- */
	.co-card { padding: 18px 16px 20px; border-radius: 18px; }
	.co-head { margin-bottom: 16px; }
	.co-head h1 { font-size: 17px; }
	.co-head p { font-size: 12.5px; }
	.co-amount-box { padding: 14px 10px 12px; border-radius: 14px; }
	.co-amount-box .money-wrap { max-width: 100%; }
	.co-amount-box .cny { font-size: 21px; }
	.co-amount-box .input-money { font-size: 34px; width: auto; min-width: 2.6em; max-width: 58vw; }
	.co-divider { margin: 16px 0; }
	.co-trust { gap: 8px 13px; font-size: 11.5px; margin-top: 14px; }

	/* ---------- 支付方式 ---------- */
	.pay-methods { gap: 9px; }
	.pay-method { padding: 14px 12px; gap: 9px; border-radius: 12px; }
	.pay-ico { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
	.pay-ico svg { width: 19px; height: 19px; }
	.pay-method .pm-name { font-size: 13.5px; }
	/* 手机上省略副标题：页面下方已有扫码说明，避免文字折行显得拥挤 */
	.pay-method .pm-desc { display: none; }
	.pay-method .check { width: 16px; height: 16px; }

	/* ---------- 支付页 ---------- */
	.pay-layout { gap: 12px; }
	.qr-card { padding: 16px; }
	.qr-box { width: 62vw; height: 62vw; max-width: 250px; max-height: 250px; padding: 9px; }
	.qr-logo {
		width: 42px; height: 42px; border-radius: 11px; font-size: 19px;
		box-shadow: 0 0 0 4px #fff, 0 6px 14px -6px rgba(254, 54, 102, .8);
	}
	.qr-amount { font-size: 27px; }
	.qr-tip { font-size: 12.5px; line-height: 1.75; }
	.countdown { margin-top: 12px; }
	.info-list li { font-size: 13px; padding: 9px 0; gap: 10px; }
	.info-list .v { max-width: 62%; }
	.mono { font-size: 11.5px; }
	.success-icon { width: 48px; height: 48px; font-size: 24px; }

	/* ---------- 工具条：控件铺满一行更好点 ---------- */
	.toolbar { gap: 8px; }
	.toolbar .input, .toolbar .select { flex: 1 1 100%; width: 100%; min-width: 0; }
	.toolbar .btn { flex: 1 1 auto; }
	.toolbar .spacer { display: none; }

	/* ---------- 表格：横向滑动，不挤压列宽 ---------- */
	.table-wrap { -webkit-overflow-scrolling: touch; }
	table { min-width: 560px; font-size: 13px; }
	th { padding: 9px 10px; font-size: 12px; }
	td { padding: 10px; }

	/* ---------- 标签页：横向滑动，隐藏滚动条 ---------- */
	.tabs { -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-bottom: 16px; }
	.tabs::-webkit-scrollbar { display: none; }
	.tab { padding: 9px 12px; font-size: 13px; }

	.pager { justify-content: center; margin-top: 12px; }
	.empty { padding: 34px 16px; }

	/* ---------- 提示条 / Toast ---------- */
	.alert { padding: 10px 12px; font-size: 12.5px; }
	.toast {
		left: 14px; right: 14px; bottom: calc(20px + env(safe-area-inset-bottom));
		transform: translateY(20px); text-align: center; max-width: none;
	}
	.toast.on { transform: translateY(0); }

	.footer { padding: 20px 14px 6px; font-size: 11.5px; }
	.footer code { font-size: 11px; word-break: break-all; }

	.login-box { margin: 5vh auto; padding: 0 14px; }
}

/* ---------- 小屏手机（≤380px） ---------- */
@media (max-width: 380px) {
	.grid-4 { grid-template-columns: 1fr; }
	.pay-methods { grid-template-columns: 1fr; }
	.co-amount-box .input-money { font-size: 30px; max-width: 64vw; }
	.brand > span:last-child { max-width: 128px; }
}

/* ---------- 横屏矮屏（手机横屏）：二维码用视口高度约束 ---------- */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 500px) {
	.qr-box { width: 46vh; height: 46vh; max-width: 190px; max-height: 190px; }
	.wrap { padding-top: 12px; }
}
