/* BWH 云服务 · 移动端样式
   配色呼应顶栏 #2C2E43 */

:root {
	--bg: #14151c;
	--bg-soft: #1b1d27;
	--card: #20222e;
	--card-2: #262a38;
	--line: #313449;
	--txt: #e8eaf2;
	--txt-2: #9aa0b5;
	--txt-3: #6c7288;
	--pri: #4f7cff;
	--pri-2: #7aa2ff;
	--ok: #2ecc9b;
	--warn: #ffb547;
	--err: #ff5c72;
	--radius: 14px;
}

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

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	background: radial-gradient(120% 70% at 50% -10%, #26304f 0%, var(--bg) 55%) no-repeat;
	background-color: var(--bg);
	color: var(--txt);
	font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
	padding-bottom: env(safe-area-inset-bottom);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--pri-2);
	text-decoration: none;
}

input,
button,
select {
	font-family: inherit;
	font-size: 15px;
}

/* ---------- 布局 ---------- */
.view {
	min-height: 100vh;
}

.page {
	padding: 22px 18px 40px;
	max-width: 520px;
	margin: 0 auto;
}

.page.has-tabs {
	padding-bottom: 92px;
}

/* ---------- 品牌区 ---------- */
.brand {
	text-align: center;
	padding: 14px 0 20px;
}

.brand-logo {
	width: 58px;
	height: 58px;
	margin: 0 auto 12px;
	border-radius: 18px;
	background: linear-gradient(145deg, var(--pri), #8f6bff);
	color: #fff;
	font-weight: 700;
	letter-spacing: .5px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	box-shadow: 0 10px 26px rgba(79, 124, 255, .35);
}

.brand h1 {
	font-size: 21px;
	margin: 0 0 6px;
	font-weight: 600;
}

.brand .sub {
	margin: 0;
	color: var(--txt-3);
	font-size: 12.5px;
}

/* ---------- 卡片与表单 ---------- */
.card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px;
}

.form .field {
	display: block;
	margin-bottom: 14px;
}

.form .field>span {
	display: block;
	font-size: 12.5px;
	color: var(--txt-2);
	margin-bottom: 7px;
}

.input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border-radius: 11px;
	border: 1px solid var(--line);
	background: var(--bg-soft);
	color: var(--txt);
	outline: none;
	transition: border-color .15s, background .15s;
}

.input:focus {
	border-color: var(--pri);
	background: #1f2231;
}

.input::placeholder {
	color: var(--txt-3);
}

.row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.row .input {
	flex: 1;
	min-width: 0;
}

/* ---------- 按钮 ---------- */
.btn {
	height: 44px;
	padding: 0 16px;
	border-radius: 11px;
	border: 1px solid var(--line);
	background: var(--card-2);
	color: var(--txt);
	font-weight: 500;
	cursor: pointer;
	transition: transform .08s, opacity .15s, background .15s;
}

.btn:active {
	transform: scale(.98);
}

.btn[disabled] {
	opacity: .45;
	cursor: not-allowed;
}

.btn-primary {
	width: 100%;
	height: 48px;
	border: none;
	background: linear-gradient(135deg, var(--pri), #7c6bff);
	color: #fff;
	font-weight: 600;
	font-size: 16px;
	box-shadow: 0 10px 22px rgba(79, 124, 255, .28);
}

.btn-ghost {
	width: 100%;
	height: 46px;
	background: transparent;
	color: var(--txt-2);
}

.btn-code {
	white-space: nowrap;
	font-size: 13px;
	padding: 0 12px;
	height: 44px;
	color: var(--pri-2);
	background: rgba(79, 124, 255, .1);
	border-color: rgba(79, 124, 255, .35);
}

/* ---------- 勾选 ---------- */
.check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 12.5px;
	color: var(--txt-2);
	margin: 4px 0 18px;
	cursor: pointer;
	line-height: 1.5;
}

.check input {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin: 0;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--bg-soft);
	position: relative;
	transition: .15s;
}

.check input:checked {
	background: var(--pri);
	border-color: var(--pri);
}

.check input:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1.5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(42deg);
}

.foot {
	text-align: center;
	color: var(--txt-3);
	font-size: 12.5px;
	margin: 16px 0 0;
}

/* ---------- 安全验证（多种题型） ---------- */
.cap-box {
	margin: 0 0 14px;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px;
}

.cap-loading {
	height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--txt-3);
	font-size: 13px;
}

.cap-stage {
	position: relative;
	width: 100%;
	border-radius: 9px;
	overflow: hidden;
	background: #101119;
	touch-action: none;
}

.cap-bg {
	display: block;
	width: 100%;
	height: auto;
}

.cap-piece {
	position: absolute;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 4px 10px rgba(0, 0, 0, .5);
	pointer-events: none;
}

.cap-track {
	position: relative;
	height: 40px;
	margin-top: 10px;
	border-radius: 10px;
	background: #101119;
	border: 1px solid var(--line);
	overflow: hidden;
	touch-action: none;
}

.cap-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: rgba(79, 124, 255, .22);
}

.cap-knob {
	position: absolute;
	left: 0;
	top: -1px;
	width: 54px;
	height: 40px;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--pri), #7c6bff);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	letter-spacing: 1px;
	box-shadow: 0 4px 12px rgba(79, 124, 255, .4);
	cursor: grab;
}

.cap-knob.dragging {
	cursor: grabbing;
}

.cap-hint {
	margin-top: 8px;
	font-size: 12px;
	color: var(--txt-3);
	text-align: center;
}

.cap-hint.ok {
	color: var(--ok);
}

.cap-hint.err {
	color: var(--err);
}

.cap-targets {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-top: 9px;
	flex-wrap: wrap;
}

.cap-targets b {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: rgba(79, 124, 255, .16);
	border: 1px solid rgba(79, 124, 255, .4);
	color: var(--pri-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
}

.cap-targets b.done {
	background: var(--ok);
	border-color: var(--ok);
	color: #fff;
}

.cap-rot {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.cap-rot canvas {
	width: 168px;
	height: 168px;
	background: #101119;
	border-radius: 50%;
	margin-bottom: 6px;
}

.cap-range {
	width: 100%;
	margin: 8px 0 0;
	-webkit-appearance: none;
	appearance: none;
	height: 6px;
	border-radius: 4px;
	background: #101119;
	border: 1px solid var(--line);
}

.cap-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 34px;
	height: 30px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--pri), #7c6bff);
	border: none;
	box-shadow: 0 4px 10px rgba(79, 124, 255, .4);
}

/* ---------- 主页 ---------- */
.hero {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border-radius: 18px;
	background: linear-gradient(140deg, #2a3350, #1d1f2b 70%);
	border: 1px solid var(--line);
}

.hero .avatar {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--card-2);
	border: 2px solid rgba(255, 255, 255, .12);
	flex: none;
}

.hero .uname {
	font-size: 17px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.hero .uid {
	margin-top: 3px;
	font-size: 12.5px;
	color: var(--txt-3);
	font-variant-numeric: tabular-nums;
}

.badge {
	font-size: 11px;
	padding: 1px 7px;
	border-radius: 20px;
	background: rgba(46, 204, 155, .16);
	color: var(--ok);
	border: 1px solid rgba(46, 204, 155, .35);
	font-weight: 500;
}

.stats {
	display: flex;
	gap: 10px;
	margin: 12px 0 20px;
}

.stat {
	flex: 1;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 14px 12px;
	text-align: center;
}

.stat b {
	display: block;
	font-size: 21px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.stat span {
	font-size: 12px;
	color: var(--txt-3);
}

.section-title {
	font-size: 12.5px;
	color: var(--txt-3);
	margin: 0 0 9px 4px;
	letter-spacing: .5px;
}

.menu-list {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 18px;
}

.menu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	color: var(--txt);
	border-bottom: 1px solid var(--line);
	cursor: pointer;
}

.menu-item:last-child {
	border-bottom: none;
}

.menu-item:active {
	background: var(--card-2);
}

.menu-item .mi-icon {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: rgba(79, 124, 255, .14);
	color: var(--pri-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	flex: none;
}

.menu-item .mi-body {
	flex: 1;
	min-width: 0;
}

.menu-item .mi-title {
	font-size: 14.5px;
}

.menu-item .mi-desc {
	font-size: 11.5px;
	color: var(--txt-3);
	margin-top: 1px;
}

.menu-item .mi-arrow {
	color: var(--txt-3);
	font-size: 16px;
}

/* ---------- 占位页 ---------- */
.ph {
	text-align: center;
	padding: 46px 10px;
}

.ph .ph-icon {
	font-size: 40px;
	margin-bottom: 12px;
}

.ph h2 {
	font-size: 17px;
	margin: 0 0 8px;
}

.ph p {
	color: var(--txt-3);
	font-size: 13px;
	margin: 0 auto;
	max-width: 300px;
}

.ph .tag {
	display: inline-block;
	margin-top: 16px;
	font-size: 12px;
	color: var(--warn);
	background: rgba(255, 181, 71, .12);
	border: 1px solid rgba(255, 181, 71, .3);
	padding: 4px 12px;
	border-radius: 20px;
}

.skeleton {
	height: 76px;
	border-radius: var(--radius);
	background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%);
	background-size: 220% 100%;
	animation: sk 1.4s linear infinite;
	margin-bottom: 10px;
}

@keyframes sk {
	from {
		background-position: 120% 0;
	}

	to {
		background-position: -60% 0;
	}
}

/* ---------- 底部导航 ---------- */
.tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	background: rgba(24, 26, 36, .94);
	backdrop-filter: blur(12px);
	border-top: 1px solid var(--line);
	padding-bottom: env(safe-area-inset-bottom);
	z-index: 20;
}

.tabbar a {
	flex: 1;
	padding: 9px 0 8px;
	text-align: center;
	color: var(--txt-3);
	font-size: 11.5px;
}

.tabbar a i {
	display: block;
	font-size: 18px;
	font-style: normal;
	margin-bottom: 2px;
	line-height: 1;
}

.tabbar a.on {
	color: var(--pri-2);
}

/* ---------- 提示 ---------- */
.toast {
	position: fixed;
	left: 50%;
	bottom: 84px;
	transform: translate(-50%, 14px);
	max-width: 86vw;
	padding: 10px 16px;
	border-radius: 11px;
	background: rgba(28, 31, 44, .96);
	border: 1px solid var(--line);
	color: var(--txt);
	font-size: 13.5px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	z-index: 99;
	text-align: center;
}

.toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}

.toast.err {
	border-color: rgba(255, 92, 114, .5);
	color: #ffd4da;
}

.toast.ok {
	border-color: rgba(46, 204, 155, .5);
	color: #c9f7e9;
}

/* ---------- 协议页 ---------- */
.doc h2 {
	font-size: 16px;
	margin: 22px 0 8px;
}

.doc p,
.doc li {
	color: var(--txt-2);
	font-size: 13.5px;
}

.doc ul {
	padding-left: 20px;
}

.top-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.top-nav .back {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--card);
	border: 1px solid var(--line);
	color: var(--txt);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 15px;
	flex: none;
}

.top-nav h2 {
	font-size: 16px;
	margin: 0;
	font-weight: 600;
}

/* ---------- 安全验证弹窗 ---------- */
.cap-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 200;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	transition: opacity .2s;
}

.cap-modal.show {
	opacity: 1;
}

.cap-mask {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, .58);
}

.cap-sheet {
	position: relative;
	width: 100%;
	max-width: 520px;
	background: var(--card);
	border-top: 1px solid var(--line);
	border-radius: 18px 18px 0 0;
	padding: 14px 16px 16px;
	padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
	transform: translateY(48px);
	transition: transform .26s cubic-bezier(.2, .8, .3, 1);
	box-shadow: 0 -12px 40px rgba(0, 0, 0, .45);
}

.cap-modal.show .cap-sheet {
	transform: translateY(0);
}

.cap-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.cap-sheet-head span {
	font-size: 15px;
	font-weight: 600;
}

.cap-x {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: var(--bg-soft);
	color: var(--txt-2);
	font-size: 13px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.cap-sheet-body {
	margin-bottom: 12px;
}

.cap-sheet-body .cap-box {
	margin: 0;
}

.cap-sheet-foot .btn-primary {
	height: 46px;
}

/* ---------- 纯代码图标 ---------- */
.ico {
	display: inline-block;
	vertical-align: -3px;
	flex: none;
}

.tabbar a i {
	display: block;
	height: 20px;
	margin-bottom: 3px;
}

.tabbar a i .ico {
	vertical-align: 0;
}

.ph-icon .ico {
	color: var(--pri-2);
}

/* ---------- 在线客服 ---------- */
.chat-page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding-bottom: 0;
	max-width: 520px;
}

.chat-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	margin-bottom: 10px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.chat-left {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: var(--txt-2);
	font-variant-numeric: tabular-nums;
}

.chat-end {
	height: 30px;
	padding: 0 12px;
	border-radius: 9px;
	border: 1px solid rgba(255, 92, 114, .4);
	background: rgba(255, 92, 114, .1);
	color: #ff8d9c;
	font-size: 12.5px;
	cursor: pointer;
	flex: none;
}

.chat-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 2px 8px;
	-webkit-overflow-scrolling: touch;
}

.bubble {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
	max-width: 82%;
}

.bubble .b-text {
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.5;
	word-break: break-word;
	white-space: pre-wrap;
	background: var(--card);
	border: 1px solid var(--line);
}

.bubble .b-time {
	font-size: 10.5px;
	color: var(--txt-3);
	margin-top: 3px;
	padding: 0 4px;
}

.bubble.me {
	align-self: flex-end;
	margin-left: auto;
	align-items: flex-end;
}

.bubble.me .b-text {
	background: linear-gradient(135deg, var(--pri), #7c6bff);
	border-color: transparent;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.bubble.other {
	align-self: flex-start;
	align-items: flex-start;
}

.bubble.other .b-text {
	border-bottom-left-radius: 4px;
}

.bubble.sys {
	max-width: 100%;
	align-self: center;
	align-items: center;
	margin: 6px auto;
}

.bubble.sys .b-text {
	background: transparent;
	border: none;
	color: var(--txt-3);
	font-size: 12px;
	text-align: center;
	padding: 2px 8px;
}

.chat-form {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--line);
	background: var(--bg);
}

.chat-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 14px;
	border-radius: 22px;
	border: 1px solid var(--line);
	background: var(--bg-soft);
	color: var(--txt);
	outline: none;
}

.chat-input:focus {
	border-color: var(--pri);
}

.chat-send {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(135deg, var(--pri), #7c6bff);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: none;
}

/* ---------- 验证码托管（/qqmcp） ---------- */
.mcp-text {
	height: 132px;
	padding: 10px 12px;
	line-height: 1.55;
	resize: vertical;
	font-family: inherit;
}

.mcp-row {
	margin: 10px 0 12px;
}

.mcp-row select.input {
	height: 46px;
}

.btn-primary .ico {
	margin-right: 6px;
}

.mcp-keybox .btn-primary {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mcp-secret {
	display: flex;
	gap: 8px;
	align-items: center;
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 11px;
	padding: 10px 12px;
	margin-bottom: 12px;
}

.mcp-secret code {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	word-break: break-all;
	color: var(--pri-2);
	font-family: ui-monospace, Menlo, Consolas, monospace;
}

.mcp-copy {
	height: 34px;
	padding: 0 10px;
	font-size: 12.5px;
	display: flex;
	align-items: center;
	gap: 4px;
	flex: none;
}

.mcp-usage {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	color: var(--txt-2);
	margin-bottom: 7px;
}

.mcp-usage b {
	color: var(--txt);
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}

.mcp-bar {
	height: 8px;
	border-radius: 5px;
	background: var(--bg-soft);
	overflow: hidden;
	margin-bottom: 14px;
}

.mcp-bar i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--pri), #7c6bff);
	transition: width .3s;
}

.mcp-del {
	color: var(--err);
	border-color: rgba(255, 92, 114, .3);
}

.mcp-api {
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 12px;
	color: var(--txt-2);
	white-space: pre-wrap;
	word-break: break-all;
	margin: 0 0 10px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	line-height: 1.6;
}

.mcp-note {
	font-size: 12.5px;
	color: var(--txt-3);
	margin: 0 0 10px;
	line-height: 1.6;
}

/* ---------- 版本号（用于确认加载到的是最新前端） ---------- */
.ver {
	text-align: center;
	font-size: 11px;
	color: var(--txt-3);
	margin: 12px 0 0;
	letter-spacing: .3px;
}
