* { box-sizing: border-box; margin: 0; padding: 0; }



html.ai-intelligent-page,

body.ai-intelligent-page {

	min-height: 100dvh;

	font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

	-webkit-font-smoothing: antialiased;

	color: #1e293b;

	background: linear-gradient(180deg, #e0eafc 0%, #f0f4f8 45%, #f8fafc 100%);

}



.ai-page {

	min-height: 100dvh;

	max-width: 480px;

	margin: 0 auto;

	display: flex;

	flex-direction: column;

	position: relative;

}



/* ── 顶栏 ── */

.ai-head {

	position: sticky;

	top: 0;

	z-index: 20;

	padding: calc(12px + env(safe-area-inset-top, 0)) 16px 8px;

	background: transparent;

}



.ai-head-bar {

	display: flex;

	align-items: center;

	justify-content: space-between;

	height: 32px;

}



.ai-head-left,

.ai-head-right {

	display: flex;

	align-items: center;

	gap: 0;

	min-width: 64px;

}



.ai-head-right {

	justify-content: flex-end;

}



.ai-icon-btn {

	width: 32px;

	height: 32px;

	border: none;

	background: transparent;

	border-radius: 50%;

	display: flex;

	align-items: center;

	justify-content: center;

	color: #374151;

	cursor: pointer;

	text-decoration: none;

	-webkit-tap-highlight-color: transparent;

}



.ai-icon-btn:active {

	background: rgba(148, 163, 184, 0.15);

}



.ai-icon-btn svg {

	width: 24px;

	height: 24px;

	stroke: currentColor;

	fill: none;

	stroke-width: 2;

	stroke-linecap: round;

	stroke-linejoin: round;

}



.ai-head-title {

	font-size: 17px;

	font-weight: 600;

	color: #1f2937;

	letter-spacing: 0.01em;

}



/* ── 主体滚动区 ── */

.ai-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 8px 16px 160px;
	position: relative;
	z-index: 1;
}



/* ── Hero ── */

.ai-hero {

	display: block;

	padding: 8px 0 10px;

}



.ai-hero-text {

	min-width: 0;

}



.ai-hero-text h1 {

	font-size: 28px;

	font-weight: 900;

	line-height: 1.2;

	color: #111827;

	letter-spacing: -0.02em;

}



.ai-hero-text p {

	margin-top: 4px;

	font-size: 14px;

	color: #6b7280;

	font-weight: 400;

}



.ai-intro-wrap {
	position: relative;
	margin-top: 0;
}

.ai-intro-mascot {
	position: absolute;
	right: 2px;
	bottom: 100%;
	top: auto;
	width: 142px;
	height: auto;
	z-index: 2;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
	filter: drop-shadow(0 6px 16px rgba(30, 58, 138, 0.14));
}



/* ── 介绍卡片 ── */

.ai-intro-card {

	position: relative;
	z-index: 1;

	border-radius: 16px;

	background: rgba(255, 255, 255, 0.9);

	border: 1px solid rgba(255, 255, 255, 0.6);

	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);

	backdrop-filter: blur(4px);

	-webkit-backdrop-filter: blur(4px);

	padding: 16px 118px 16px 16px;

	margin-top: 0;

}



.ai-card-banner {

	display: flex;

	align-items: center;

	gap: 8px;

	margin-bottom: 12px;

}



.ai-banner-ico {

	width: 28px;

	height: 28px;

	border-radius: 50%;

	background: linear-gradient(135deg, #60a5fa 0%, #4f46e5 100%);

	display: flex;

	align-items: center;

	justify-content: center;

	flex-shrink: 0;

	color: #fff;

}



.ai-banner-ico [data-lucide] svg {

	stroke: #fff;

}



.ai-banner-text {

	font-size: 13px;

	font-weight: 500;

	color: #2563eb;

}



.ai-card-intro {

	font-size: 15px;

	color: #1f2937;

	line-height: 1.75;

}



.ai-card-intro em {

	font-style: normal;

	font-weight: 700;

	color: #2563eb;

}



/* ── 服务 2x2（参考 PlannerPage 横向布局） ── */

.ai-svc-grid {

	display: grid;

	grid-template-columns: 1fr 1fr;

	gap: 12px;

	margin-top: 16px;

}



.ai-svc-item {

	display: flex;

	flex-direction: row;

	align-items: center;

	gap: 12px;

	padding: 14px;

	border: 1px solid rgba(255, 255, 255, 0.6);

	border-radius: 12px;

	background: rgba(255, 255, 255, 0.9);

	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);

	backdrop-filter: blur(4px);

	-webkit-backdrop-filter: blur(4px);

	cursor: pointer;

	text-align: left;

	font-family: inherit;

	-webkit-tap-highlight-color: transparent;

	transition: transform 0.15s ease;

}



.ai-svc-item:active {

	transform: scale(0.97);

}



.ai-svc-ico {

	width: 48px;

	height: 48px;

	border-radius: 12px;

	display: flex;

	align-items: center;

	justify-content: center;

	flex-shrink: 0;

	color: #fff;

}



.ai-svc-ico [data-lucide] svg {

	stroke: #fff;

}



.ai-svc-ico--finance {

	background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);

	box-shadow: 0 10px 15px -3px rgba(191, 219, 254, 0.8), 0 4px 6px -4px rgba(191, 219, 254, 0.8);

}



.ai-svc-ico--tax {

	background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);

	box-shadow: 0 10px 15px -3px rgba(165, 243, 252, 0.8), 0 4px 6px -4px rgba(165, 243, 252, 0.8);

}



.ai-svc-ico--plan {

	background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);

	box-shadow: 0 10px 15px -3px rgba(221, 214, 254, 0.8), 0 4px 6px -4px rgba(221, 214, 254, 0.8);

}



.ai-svc-ico--deep {

	background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);

	box-shadow: 0 10px 15px -3px rgba(199, 210, 254, 0.8), 0 4px 6px -4px rgba(199, 210, 254, 0.8);

}



.ai-svc-text {

	flex: 1;

	min-width: 0;

}



.ai-svc-item h3 {

	font-size: 15px;

	font-weight: 700;

	color: #111827;

	line-height: 1.3;

}



.ai-svc-item p {

	margin-top: 2px;

	font-size: 11px;

	color: #6b7280;

	line-height: 1.45;

}



/* ── 底部栏（Pill + 输入，参考 PlannerPage 1:1） ── */
.ai-chat-bar {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	width: 100%;
	max-width: 480px;
	z-index: 30;
	padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0));
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.ai-quick-row {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 12px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.ai-quick-row::-webkit-scrollbar { display: none; }

.ai-quick-pill {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	-webkit-tap-highlight-color: transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-quick-pill.is-active {
	background: #1f2937;
	border-color: #1f2937;
	color: #fff;
	box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
}

.ai-quick-pill.is-active [data-lucide] svg {
	stroke: #fff;
}

.ai-quick-pill [data-lucide] {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ai-quick-pill [data-lucide] svg {
	stroke: #374151;
}

.ai-chat-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.ai-chat-input {
	flex: 1;
	min-width: 0;
	border: none;
	background: #f3f4f6;
	border-radius: 999px;
	padding: 12px 16px;
	font-size: 14px;
	color: #1f2937;
	font-family: inherit;
	outline: none;
}

.ai-chat-input::placeholder {
	color: #6b7280;
}

.ai-chat-send {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #2563eb;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 10px 15px -3px rgba(191, 219, 254, 0.8), 0 4px 6px -4px rgba(191, 219, 254, 0.8);
}

.ai-chat-send [data-lucide] svg {
	stroke: #fff;
	stroke-width: 2.5;
}

.ai-chat-send:active {
	opacity: 0.9;
}

.ai-chat-send.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.ai-chat-thread {
	margin: 12px 16px 0;
	padding: 12px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(191, 219, 254, 0.8);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	max-height: min(52vh, 420px);
	overflow-y: auto;
}

.ai-chat-thread[hidden] {
	display: none !important;
}

.ai-msg {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.ai-msg:last-child {
	margin-bottom: 0;
}

.ai-msg--user {
	flex-direction: row-reverse;
}

.ai-msg-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
	background: #eff6ff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #2563eb;
	font-weight: 700;
}

.ai-msg-bubble {
	max-width: 88%;
	padding: 10px 12px;
	border-radius: 14px;
	font-size: 13px;
	line-height: 1.55;
	word-break: break-word;
}

.ai-msg--user .ai-msg-bubble {
	background: #2563eb;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.ai-msg--bot .ai-msg-bubble {
	background: #f8fafc;
	color: #1e293b;
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-bottom-left-radius: 4px;
}

.ai-msg-bubble p {
	margin: 0 0 8px;
}

.ai-msg-bubble p:last-child {
	margin-bottom: 0;
}

.ai-msg-typing {
	display: inline-flex;
	gap: 4px;
	align-items: center;
}

.ai-msg-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #94a3b8;
	animation: aiDot 1s infinite ease-in-out;
}

.ai-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiDot {
	0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* ── 企划师 · 选择企业弹窗 ── */
body.ai-planner-open {
	overflow: hidden;
}

.ai-planner-mask {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
}

.ai-planner-mask[hidden] {
	display: none !important;
}

.ai-planner-sheet {
	width: 100%;
	max-width: 480px;
	max-height: min(78dvh, 560px);
	background: #fff;
	border-radius: 18px 18px 0 0;
	padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0));
	box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ai-planner-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.ai-planner-hd h2 {
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}

.ai-planner-close {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: #f3f4f6;
	color: #6b7280;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.ai-planner-tip {
	font-size: 12px;
	line-height: 1.6;
	color: #6b7280;
	margin-bottom: 12px;
}

.ai-planner-tip strong {
	color: #374151;
	font-weight: 600;
}

.ai-planner-loading,
.ai-planner-empty {
	font-size: 13px;
	color: #6b7280;
	text-align: center;
	padding: 24px 8px;
	line-height: 1.6;
}

.ai-planner-empty-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 14px;
	flex-wrap: wrap;
}

.ai-planner-empty-actions a {
	display: inline-flex;
	padding: 8px 14px;
	border-radius: 999px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.ai-planner-list {
	list-style: none;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ai-planner-item {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.ai-planner-item.is-ready {
	border-color: #bfdbfe;
	background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.ai-planner-item.is-ready:active {
	background: #eff6ff;
}

.ai-planner-item:disabled {
	cursor: not-allowed;
	opacity: 0.92;
}

.ai-planner-item-main {
	flex: 1;
	min-width: 0;
}

.ai-planner-item-name {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
	word-break: break-all;
}

.ai-planner-item-sub {
	margin-top: 4px;
	font-size: 11px;
	color: #9ca3af;
	word-break: break-all;
}

.ai-planner-tag {
	flex-shrink: 0;
	max-width: 42%;
	font-size: 10px;
	line-height: 1.35;
	padding: 4px 8px;
	border-radius: 999px;
	text-align: center;
	font-weight: 600;
}

.ai-planner-tag--ready {
	background: #dcfce7;
	color: #15803d;
}

.ai-planner-tag--pending {
	background: #fef3c7;
	color: #b45309;
}

.ai-planner-tag--missing {
	background: #f3f4f6;
	color: #6b7280;
}

.ai-planner-tag--failed {
	background: #fee2e2;
	color: #b91c1c;
}

.ai-planner-tag--blocked {
	background: #f3f4f6;
	color: #6b7280;
}

