:root {
	--gq-blue:    #2563eb;
	--gq-blue-h:  #1d4ed8;
	--gq-text:    #1e2233;
	--gq-muted:   #6b7280;
	--gq-border:  #e5e7eb;
	--gq-bg:      #f3f4f8;
	--gq-card:    #ffffff;
	--gq-tip-bg:  #fffbeb;
	--gq-tip-br:  #fde68a;
	--gq-tip-tx:  #92400e;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.gq-body {
	min-height: 100vh;
	background: linear-gradient(135deg, #1d4ed8 0%, #1d4ed8 55%, #1d4ed8 100%);
	font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", -apple-system, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	color: var(--gq-text);
}

/* ── Shell ── */
.gq-shell {
	max-width: 1080px;
	margin: 0 auto;
	padding: 125px 24px 60px;
}

/* ── Header ── */
.gq-header { color: #fff; margin-bottom: 28px; }
.gq-title  { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: 0.5px; }
.gq-sub    { margin: 6px 0 0; font-size: 13px; opacity: 0.85; }

/* ── Two-column main ── */
.gq-main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: start;
}
@media (max-width: 600px) {
	.gq-main { grid-template-columns: 1fr; }
}

/* ── Panel (shared card style) ── */
.gq-panel {
	background: var(--gq-card);
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(30, 34, 80, 0.12);
	padding: 24px;
}

/* ── Left panel ── */
.gq-block { margin-bottom: 20px; }
.gq-block:last-child { margin-bottom: 0; }
.gq-block-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--gq-muted);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-bottom: 8px;
}

/* ── Tabs ── */
.gq-tabs {
	display: flex;
	gap: 0;
	border: 1px solid var(--gq-border);
	border-radius: 8px;
	overflow: hidden;
	background: #f9fafb;
}
.gq-tab {
	flex: 1;
	height: 36px;
	border: none;
	background: transparent;
	color: var(--gq-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	position: relative;
}
.gq-tab + .gq-tab::before {
	content: '';
	position: absolute;
	left: 0; top: 20%; bottom: 20%;
	width: 1px;
	background: var(--gq-border);
}
.gq-tab.is-active {
	background: var(--gq-blue);
	color: #fff;
	font-weight: 600;
}
.gq-tab.is-active + .gq-tab::before { display: none; }
.gq-tab:not(.is-active):hover { background: #f0f0f7; color: var(--gq-text); }

/* ── Card input ── */
.gq-input {
	width: 100%;
	height: 42px;
	padding: 0 14px;
	border: 1px solid var(--gq-border);
	border-radius: 8px;
	background: #f9fafb;
	color: var(--gq-text);
	font: inherit;
	font-size: 14px;
	outline: none;
	letter-spacing: 0.4px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.gq-input::placeholder { color: #b0b3c6; }
.gq-input:focus {
	border-color: var(--gq-blue);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ── Button row ── */
.gq-btn-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 4px;
}

/* ── Buttons ── */
.gq-btn {
	height: 42px;
	border: none;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s;
	white-space: nowrap;
}
.gq-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.gq-btn-blue {
	background: var(--gq-blue);
	color: #fff;
}
.gq-btn-blue:not(:disabled):hover {
	background: var(--gq-blue-h);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.gq-btn-outline {
	background: #fff;
	color: var(--gq-blue);
	border: 1.5px solid var(--gq-blue);
}
.gq-btn-outline:hover {
	background: #eff6ff;
	transform: translateY(-1px);
}
.gq-btn-orange {
	background: #f59e0b;
	color: #fff;
}
.gq-btn-orange:not(:disabled):hover {
	background: #d97706;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.gq-btn-green {
	background: #16a34a;
	color: #fff;
}
.gq-btn-green:not(:disabled):hover {
	background: #15803d;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.gq-btn-sm { height: 36px; font-size: 13px; }

/* ── Right panel: QR ── */
.gq-panel-right {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 240px;
}
.gq-qr-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}
.gq-qr-box {
	position: relative;
	width: 220px;
	height: 220px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--gq-border);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.gq-qr-box img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: none;
}
.gq-qr-box img.is-loaded { display: block; }
.gq-qr-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	color: #9ca3af;
	font-size: 12px;
	text-align: center;
	padding: 0 16px;
}
.gq-qr-ph svg { opacity: 0.55; }
.gq-qr-ph.is-hidden { display: none; }

/* ── Status badge ── */
.gq-status {
	margin-top: 14px;
	padding: 5px 18px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	background: #dcfce7;
	color: #166534;
}
.gq-status.is-bad  { background: #fee2e2; color: #991b1b; }
.gq-status.is-warn { background: #fef9c3; color: #854d0e; }

/* ── Tip ── */
.gq-tip {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	background: var(--gq-tip-bg);
	border: 1px solid var(--gq-tip-br);
	color: var(--gq-tip-tx);
	font-size: 12.5px;
	line-height: 1.6;
	padding: 11px 16px;
	border-radius: 8px;
	margin-top: 16px;
}

/* ── 推广链接 card ── */
.gq-link-card {
	background: var(--gq-card);
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(30, 34, 80, 0.12);
	margin-top: 16px;
	overflow: hidden;
}
.gq-link-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 24px 14px;
	border-bottom: 1px solid var(--gq-border);
}
.gq-link-bar {
	width: 4px;
	height: 16px;
	border-radius: 2px;
	background: var(--gq-blue);
	flex-shrink: 0;
}
.gq-link-title { font-size: 15px; font-weight: 600; }
.gq-link-body { padding: 18px 24px 20px; }

.gq-url {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--gq-border);
	border-radius: 6px;
	background: #f9fafb;
	color: var(--gq-text);
	font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	outline: none;
	letter-spacing: 0.2px;
}
.gq-link-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}
.gq-link-actions .gq-btn { flex: 1 1 auto; min-width: 0; padding: 0 16px; }

@media (max-width: 600px) {
	.gq-link-body { padding: 14px 16px 16px; }
	.gq-link-head { padding: 14px 16px 12px; }
	.gq-link-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.gq-link-actions #gq-huoma { grid-column: 1 / -1; }
	.gq-link-actions .gq-btn {
		width: 100%;
		padding: 0 10px;
		font-size: 13px;
	}
}
