/*
 * BK 移动端设计层（手机竖屏）
 * =============================================================================
 * 2026-11-14 建立。目标：手机端不再是「PC 版压扁」，而是独立的一套排版节奏。
 *
 * 分层口径（改之前先看 ref-mobile-responsive.md）：
 *   组件自带断点 → 平板/小桌面的局部布局
 *   index.css 的 1024 断点 → 两栏塌成单栏
 *   theme/responsive.css → 尺寸收口（旧层）
 *   **本文件** → 手机端重设计，入队顺序在所有页面样式之后（inc/core/assets.php 最末尾）
 *
 * 铁律：
 *   1. 全部规则包在 @media (max-width: 820px) 里 —— 桌面端一字不动。
 *   2. 模板里写了行内 style 的（post-title / post-excerpt / post-author-row 等都是），
 *      覆盖必须带 !important，否则行内样式赢。
 *   3. 基础规则带 !important 的地方，这里要同时保证特异性不输（见 ref-mobile-responsive.md
 *      的「特异性压死」一节：两边都 !important 时比的是特异性）。
 *   4. 底部 Tab 栏固定定位，body 必须留出它 + 安全区的高度，否则页脚被压住。
 * =============================================================================
 */

/* 桌面端：底部 Tab 栏与通知抽屉的关闭键的 DOM 仍然会输出，这里让它们彻底不参与布局 */
.bk-tabbar,
.notification-close {
	display: none;
}

/* 移动端专属的三样东西：二级页标题区、筛选折叠开关。桌面端一律不参与布局 */
.bk-mhead,
.kb-filter-more-toggle,
.kb-filter-more-btn {
	display: none;
}

@media (max-width: 820px) {

	/* ---------------------------------------------------------------- 设计变量 */
	:root {
		--bk-m-pad: 16px;
		--bk-m-radius: 16px;
		--bk-m-radius-sm: 12px;
		--bk-m-ink: #14161a;
		--bk-m-ink-2: #4c5464;
		--bk-m-muted: #8f97a8;
		--bk-m-line: #eef1f7;
		--bk-m-blue: #4a6cf7;
		--bk-m-blue-soft: #eef2ff;
		--bk-m-bg: #f4f6fa;
		--bk-m-tab-h: 58px;
		--bk-m-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -14px rgba(16, 24, 40, 0.22);
		--bk-m-hit: 44px;
	}

	/* ---------------------------------------------------------------- 基础 */
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	body {
		font-size: 15px;
		background-color: var(--bk-m-bg);
		/* 底部 Tab 占位：滚动到最底时页脚不被遮住 */
		padding-bottom: calc(var(--bk-m-tab-h) + env(safe-area-inset-bottom, 0px));
		overscroll-behavior-y: none;
	}

	body.home,
	body.front-page {
		background-color: #f7f9ff;
	}

	::selection {
		background: rgba(74, 108, 247, 0.16);
	}

	.container {
		padding-left: var(--bk-m-pad);
		padding-right: var(--bk-m-pad);
	}

	/* 触控目标：所有可点元素给足最小高度，避免误触 */
	a,
	button {
		-webkit-tap-highlight-color: rgba(74, 108, 247, 0.12);
	}

	/* 键盘弹出时不要被 fixed 元素顶飞 */
	input,
	textarea,
	select {
		font-size: 16px !important; /* iOS 上 <16px 会自动放大页面 */
	}

	/* ---------------------------------------------------------------- 页头 */
	/*
	 * 手机上的页头必须是「一条全宽白条」，两个坑都在这里：
	 *
	 * ① 桌面那套滚动收缩成胶囊不能在手机上生效 —— 收缩后实测 header 只剩 272px 宽
	 *    （x=61..333），logo 被甩到卡片外面，看起来像飘在左上角（站长截图 1）。
	 *    把 --hdr-p 钉死 0，同时 top/left/right 兜底，避免 JS 写行内变量后跑掉。
	 *
	 * ② .hdr-capsule 上的 backdrop-filter 会给 position:fixed 的子元素**建立包含块**：
	 *    通知面板写的是 fixed + bottom:0，滚动后却被算成页头的子元素，
	 *    于是整块塌进页头、被裁掉（站长截图 2）。去掉模糊后 fixed 才真正相对视口。
	 *    （filter/blur(0px) 同样会建立包含块，所以这里给的是 none，不是 blur(0)。）
	 */
	.site-header,
	.site-header.hdr-capsule,
	.site-header.scrolled,
	.site-header.scrolled.hdr-capsule,
	body.home .site-header.scrolled,
	body.front-page .site-header.scrolled {
		--hdr-p: 0 !important;
		--hdr-inset-max: 0px !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: #fff !important;
		box-shadow: 0 1px 0 rgba(16, 24, 40, 0.07) !important;
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
	}

	.header-container,
	body.home .header-container,
	body.front-page .header-container {
		height: 54px !important;
		padding: 0 12px 0 14px !important;
	}

	.logo-img {
		height: 27px !important;
	}

	/*
	 * 右侧图标必须靠右。桌面是 .main-nav 的 margin-right:auto 把它们顶过去的，
	 * 手机上 main-nav 一 display:none 就没人顶了 —— 实测 4 个图标全挤在左边，
	 * 右边空出 135px 白板，铃铛也就成了「悬在半空」（截图 1 箭头指的就是这块）。
	 */
	.header-right {
		margin-left: auto !important;
		gap: 0 !important;
		justify-content: flex-end;
		flex: 0 0 auto;
	}

	.header-icons {
		gap: 0 !important;
		margin-left: auto !important;
	}

	/* 手机上图标不该是 20px 的小图配 36px 的框：按 40px 触控目标重排，
	   相邻项靠 padding 拉开，视觉间距反而比 PC 的 25px 更贴合手指 */
	.header-icons .icon-link {
		width: 40px;
		height: 40px;
		padding: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border-radius: 12px;
	}

	.header-icons .icon-link svg {
		width: 21px;
		height: 21px;
	}

	.header-icons .icon-link:active {
		background: #f2f5ff;
	}

	.header-icons .user-menu-container .icon-link.user-icon img {
		width: 28px !important;
		height: 28px !important;
	}

	.notification-bell-container {
		height: 40px;
		margin-right: 0 !important;
	}

	.header-icons .bk-nav-toggle {
		width: 40px;
		height: 40px;
		margin-left: 2px;
	}

	/* 红点：跟着 40px 的按钮框走。原来 top:1px 让 18px 的角标压在铃铛本身上，
	   再加一圈白描边把它和图标分开，视觉上才像「角标」而不是「糊上去的色块」 */
	.notification-badge {
		top: 4px !important;
		right: 3px !important;
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		font-size: 10px;
		line-height: 17px;
		border-radius: 999px;
		box-shadow: 0 0 0 2px #fff;
		pointer-events: none;
	}

	/*
	 * 通知：PC 是铃铛下面 372px 的下拉卡片，手机改成从底部升起的整宽抽屉。
	 *
	 * z-index 必须高过客服气泡（9600）—— 否则抽屉一开，蓝色气泡浮在列表上面。
	 * 遮罩不额外加 DOM：用一层 100vmax 的实心阴影当背景，点它等于点了空白处，
	 * notifications.js 里「点外面就关」的判断照样生效。
	 */
	.notification-dropdown {
		position: fixed !important;
		top: auto !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100% !important;
		max-width: none !important;
		max-height: 76vh !important;
		border-radius: 20px 20px 0 0 !important;
		border: 0 !important;
		z-index: 9800 !important;
		overflow: hidden !important;
		display: flex;
		flex-direction: column;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		box-shadow:
			0 -10px 34px -8px rgba(16, 24, 40, 0.2),
			0 0 0 100vmax rgba(15, 22, 38, 0.42) !important;
		animation: bk-m-sheet-in 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
	}

	@keyframes bk-m-sheet-in {
		from { opacity: 0; transform: translateY(20px); }
		to   { opacity: 1; transform: translateY(0); }
	}

	.notification-dropdown::before {
		content: '';
		display: block;
		flex: 0 0 auto;
		width: 38px;
		height: 4px;
		margin: 9px auto 3px;
		border-radius: 2px;
		background: #dfe4ee;
	}

	.notification-dropdown-header {
		flex: 0 0 auto;
		justify-content: flex-start !important;
		gap: 6px !important;
		padding: 6px 12px 10px 18px !important;
		font-size: 15.5px !important;
	}

	.notification-dropdown-header .notification-actions {
		margin-left: auto !important;
		gap: 4px !important;
	}

	.notification-mark-all,
	.notification-clear-all {
		padding: 5px 9px !important;
		font-size: 12.5px !important;
	}

	/* 抽屉的关闭键：只在手机出现（桌面靠点空白/Esc 关，不需要它占位） */
	.notification-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		width: 32px;
		height: 32px;
		margin-left: 2px;
		border-radius: 50%;
		background: #f4f6fa;
		color: #55607a;
	}

	.notification-close svg {
		width: 16px;
		height: 16px;
		display: block;
	}

	.notification-close:active {
		background: #e9edf6;
	}

	.notification-tabs {
		flex: 0 0 auto;
		padding: 0 12px !important;
	}

	.notification-tab {
		padding: 11px 7px 10px !important;
		font-size: 13px !important;
	}

	/* 列表吃掉抽屉剩余高度（原来写死 max-height:372px，抽屉一高下面就空一截） */
	.notification-dropdown-list {
		flex: 1 1 auto !important;
		min-height: 0;
		max-height: none !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	.notification-item {
		padding: 14px 16px 14px 18px !important;
	}

	.notification-item-title {
		font-size: 13.5px !important;
	}

	.notification-item-desc {
		font-size: 12.5px !important;
	}

	/* 触屏没有 hover，删除键必须常显，否则手机上根本删不掉单条 */
	.notification-item-delete {
		opacity: 1 !important;
		width: 26px;
		height: 26px;
		top: 11px;
		right: 9px;
	}

	/* 用户菜单同理，别在窄屏伸到屏幕外；top 跟 54px 的页头对齐 */
	.user-dropdown-menu {
		position: fixed !important;
		top: 60px !important;
		left: 12px !important;
		right: 12px !important;
		width: auto !important;
		min-width: 0 !important;
		border-radius: 16px !important;
		box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16) !important;
	}

	/* 移动抽屉：面板宽度收敛，圆角只在右侧 */
	.bk-mobile-drawer__panel {
		width: 82vw !important;
		max-width: 320px !important;
		border-radius: 0 20px 20px 0 !important;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.bk-mobile-drawer__nav .bk-nav-list--drawer li a {
		height: 48px;
		display: flex;
		align-items: center;
		font-size: 16px;
	}

	/* ---------------------------------------------------------------- 底部 Tab */
	.bk-tabbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 950;
		display: block;
		background: rgba(255, 255, 255, 0.92);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		backdrop-filter: saturate(180%) blur(20px);
		border-top: 1px solid rgba(16, 24, 40, 0.07);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.bk-tabbar__list {
		display: grid;
		grid-template-columns: repeat(var(--bk-tab-n, 5), 1fr);
		list-style: none;
		margin: 0;
		padding: 0;
		height: var(--bk-m-tab-h);
	}

	.bk-tabbar__item {
		margin: 0;
	}

	.bk-tabbar__link {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		height: 100%;
		color: #98a0b0;
		text-decoration: none;
		font-size: 10.5px;
		letter-spacing: 0.2px;
		transition: color 0.18s ease;
	}

	.bk-tabbar__icon {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 26px;
		border-radius: 9px;
		transition: background 0.18s ease, color 0.18s ease;
	}

	.bk-tabbar__item.is-active .bk-tabbar__link {
		color: var(--bk-m-blue);
		font-weight: 600;
	}

	.bk-tabbar__item.is-active .bk-tabbar__icon {
		background: var(--bk-m-blue-soft);
	}

	.bk-tabbar__link:active .bk-tabbar__icon {
		background: #e8edff;
	}

	/*
	 * 没有站点页脚的页面（思路栈 / 个人空间 / 分类页 —— 都置了 bk_hide_site_footer）
	 * 拿不到页脚那条让位，最后一张卡片会掉到 793px 以下、被 Tab 栏压住（实测 /blog 底部
	 * 内容到 820）。在 #page 末尾补一条同高的占位，等于给这些页面留出 Tab 的安全区。
	 * 用 :has(.site-footer) 区分有无页脚；浏览器不支持时退回现状，不会更糟。
	 */
	body:not(:has(.site-footer)) #page::after {
		content: '';
		display: block;
		flex: 0 0 auto;
		height: calc(var(--bk-m-tab-h) + env(safe-area-inset-bottom, 0px));
	}

	/* 有客服气泡的页面再让一条气泡道，否则气泡压住最后一张卡
	   （角色立绘画的是全身，比原来的圆形按钮高一倍：78 → 114） */
	body.bk-has-chat:not(:has(.site-footer)) #page::after {
		height: calc(var(--bk-m-tab-h) + 114px + env(safe-area-inset-bottom, 0px));
	}

	/* ---------------------------------------------------------------- 首页 · 横幅 */
	.homepage-banner .banner-container,
	body.home .homepage-banner .banner-container,
	body.front-page .homepage-banner .banner-container {
		min-height: 0 !important;
		height: auto !important;
		padding: 74px 0 18px !important;
		border-radius: 0 !important;
	}

	/* 横幅内容从「绝对定位居中」改成正常的文档流 —— 这是首页空白过大的根因 */
	.homepage-banner .banner-content,
	.banner-content {
		position: static !important;
		top: auto !important;
		left: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none !important;
		padding: 0 22px !important;
		text-align: center;
	}

	.banner-tag {
		font-size: 11.5px !important;
		padding: 5px 13px !important;
		margin-bottom: 12px !important;
		border-radius: 999px !important;
		letter-spacing: 0.2px;
	}

	.banner-content h1,
	.banner-content h2 {
		font-size: 27px !important;
		line-height: 1.3 !important;
		letter-spacing: -0.5px !important;
		margin: 0 0 12px 0 !important;
	}

	.banner-content p {
		font-size: 13.5px !important;
		line-height: 1.8 !important;
		margin: 0 auto !important;
		max-width: 300px;
		color: #6b7488 !important;
	}

	.banner-buttons {
		margin-top: 20px;
		gap: 10px;
	}

	/* 统计条：从「浮在底部、间距 120px」改成三等分的分隔条 */
	.stats-section,
	.homepage-banner .stats-section {
		position: static !important;
		left: auto !important;
		bottom: auto !important;
		transform: none !important;
		display: flex !important;
		justify-content: space-between !important;
		align-items: stretch;
		gap: 0 !important;
		margin: 22px 22px 0 !important;
		padding-top: 16px !important;
		border-top: 1px solid rgba(74, 108, 247, 0.1);
	}

	.stats-section .stat-item {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 4px;
		position: relative;
	}

	.stats-section .stat-item + .stat-item::before {
		content: '';
		position: absolute;
		left: 0;
		top: 3px;
		bottom: 3px;
		width: 1px;
		background: rgba(74, 108, 247, 0.12);
	}

	.stat-number {
		font-size: 21px !important;
		letter-spacing: -0.3px;
	}

	.stat-label {
		font-size: 11px !important;
		margin-top: 3px !important;
		color: #97a0b3 !important;
		white-space: nowrap;
	}

	/* ---------------------------------------------------------------- 首页 · 简介区 */
	/* 简介区改成压在横幅下沿的白色圆角面：横幅的彩色渐变到统计条为止，
	   下方回到白底，区块边界一眼能分出来，中间那截空白也不再显得"塌" */
	.hi-section,
	.hi-section.bk-cover--intro {
		background: #fff !important;
		border-radius: 24px 24px 0 0;
		margin-top: -14px;
		padding: 26px 0 30px !important;
	}

	.hi-section > .bk-cover-bg {
		display: none !important;
	}

	.hi-container {
		padding: 0 var(--bk-m-pad) !important;
	}

	.hi-top {
		gap: 0 !important;
	}

	.hi-title,
	.hi-title.bk-cv-title {
		font-size: 25px !important;
		line-height: 1.36 !important;
		letter-spacing: -0.4px !important;
	}

	.hi-sub {
		font-size: 13.5px !important;
		line-height: 1.8 !important;
	}

	/* 装饰球阵在手机上纯粹占地方，直接收掉 */
	.hi-visual {
		display: none !important;
	}

	.hi-actions {
		margin-top: 18px;
		gap: 10px;
	}

	.hi-btn {
		height: 42px;
		padding: 0 18px !important;
		font-size: 14px !important;
		border-radius: 12px !important;
	}

	.hi-cards {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 0 !important;
		margin-top: 24px !important;
		border: 0 !important;
		background: #fff;
		border-radius: var(--bk-m-radius);
		box-shadow: var(--bk-m-shadow);
		padding: 4px 16px !important;
	}

	.hi-card {
		padding: 14px 0 14px 0 !important;
		border: 0 !important;
		border-top: 1px solid var(--bk-m-line) !important;
		display: flex;
		gap: 12px;
	}

	.hi-card:first-child {
		border-top: 0 !important;
	}

	.hi-card-icon {
		width: 34px;
		height: 34px;
		flex: 0 0 34px;
	}

	.hi-card h3,
	.hi-card-title {
		font-size: 15px !important;
	}

	.hi-card p {
		font-size: 12.5px !important;
		line-height: 1.7 !important;
	}

	/* ---------------------------------------------------------------- 列表页外壳 + 页标题 */
	.kb-site-content,
	.teaching-site-content,
	.downloads-site-content {
		background: var(--bk-m-bg) !important;
	}

	body.knowledge-base .site-content,
	body.tax-teaching_cat .site-content {
		padding-top: 54px !important;
	}

	/*
	 * 二级页标题：手机上导航收进了抽屉，进页面后没有任何「我在哪」的锚点。
	 * 一层轻标题（大标题 + 一句说明）就能把页面立起来，而且不占卡片、不吃首屏。
	 */
	.bk-mhead {
		display: block;
		padding: 10px var(--bk-m-pad) 2px;
	}

	.bk-mhead__title {
		margin: 0 0 4px;
		font-size: 23px;
		line-height: 1.25;
		font-weight: 700;
		letter-spacing: -0.5px;
		color: var(--bk-m-ink);
	}

	.bk-mhead__desc {
		margin: 0;
		font-size: 12.5px;
		line-height: 1.5;
		color: #99a1b3;
	}

	.kb-full-layout,
	.single-full-layout {
		padding: 10px var(--bk-m-pad) 0 !important;
		gap: 14px !important;
		background: transparent !important;
	}

	/* 关键：外层已经给了 16px，内层容器再给一次就只剩 329px（PC 思维） */
	.kb-main .container,
	.kb-main > .container,
	.single-main .container,
	.single-main > .container {
		padding: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		border: 0 !important;
	}

	.kb-main,
	.single-main {
		min-width: 0;
		width: 100%;
	}

	/* ---------------------------------------------------------------- 筛选栏 */
	/*
	 * 三行筛选（分类 / 标签 / 排序）在手机上竖排要吃掉 220px —— 首屏一半是筛选项，
	 * 而绝大多数人只用「分类」。折成一行横滑 chip 条 + 右端一颗「筛选」按钮，
	 * 标签与排序收进按钮里（纯 CSS，见 kb-filter-bar.php 的 checkbox）。
	 *
	 * 2026-11-14 返工：按钮曾经 absolute 浮在 chips 右端，靠 padding-right:88px
	 * 「让位」。滚动容器的右 padding 只加滚动余量、不裁内容，于是胶囊照样能钻到
	 * 按钮底下，而那 88px 空档 + 渐隐带看起来就像「最后一颗胶囊被压掉了一半」。
	 * 现在两者是同一行的并排 flex item，间距由 margin 给，永不重叠。
	 */
	.kb-filter-bar {
		position: static !important;
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		column-gap: 0 !important;
		row-gap: 8px !important;
		padding: 0 !important;
		margin: 0 0 2px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		overflow: visible !important;
	}

	/* checkbox 藏在角落，不参与 flex 布局 */
	.kb-filter-more-toggle {
		position: absolute !important;
		left: 0;
		top: 0;
		width: 1px !important;
		height: 1px !important;
		opacity: 0;
		pointer-events: none;
	}

	.kb-filter-row {
		display: flex !important;
		align-items: center !important;
		flex: 1 1 100%;
		min-width: 0;
		padding: 0 !important;
		margin: 0 !important;
		gap: 0 !important;
		min-height: 0 !important;
		border: 0 !important;
	}

	/* 行首的「分类 / 标签 / 排序」文字标签在手机上纯属占宽，靠内容自己能读懂 */
	.kb-filter-label {
		display: none !important;
	}

	/* 排列：作者(1) → 分类 + 筛选按钮(2/3) → 子类(4) → 折叠区(5) */
	.kb-filter-row--author { order: 1; }
	.kb-filter-row--cat {
		order: 2;
		flex: 1 1 0;
	}
	.kb-filter-row--sub { order: 4; }
	.kb-filter-row--more { order: 5; }

	/* 子类行：桌面是淡蓝底 + 内缩，手机上用一根竖线表明它是上一行的下级
	   （两行各有一颗「全部」，光看胶囊分不出父子） */
	.kb-filter-row--sub {
		background: transparent !important;
		border-radius: 0 !important;
		border-left: 2px solid #dfe6f5 !important;
		padding: 0 0 0 12px !important;
	}

	/* 折叠区：标签 + 排序，展开后各是一张白卡，收起来完全不占位 */
	.kb-filter-row--more {
		display: none !important;
		padding: 7px 12px !important;
		background: #fff;
		border: 1px solid var(--bk-m-line) !important;
		border-radius: var(--bk-m-radius-sm);
		box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	}

	#bk-filter-more:checked ~ .kb-filter-row--more {
		display: flex !important;
	}

	/* 「筛选」按钮：文档流内，跟在分类行右边 */
	.kb-filter-more-btn {
		display: flex !important;
		position: static;
		order: 3;
		flex: 0 0 auto;
		margin-left: 10px;
		align-items: center;
		gap: 5px;
		height: 32px;
		padding: 0 13px;
		border-radius: 999px;
		border: 1px solid #e4e9f3;
		background: #fff;
		box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
		color: #5a6279;
		font-size: 12.5px;
		font-weight: 600;
		line-height: 1;
		cursor: pointer;
		user-select: none;
		-webkit-tap-highlight-color: transparent;
	}

	.kb-filter-more-btn svg {
		width: 14px;
		height: 14px;
		flex: 0 0 auto;
	}

	/* 展开态用浅蓝底蓝字：实心主色会和「全部」激活胶囊撞成两块蓝，
	   分不清哪个是选项、哪个是开关 */
	#bk-filter-more:checked ~ .kb-filter-more-btn {
		background: var(--bk-m-blue-soft);
		border-color: #cfdaff;
		color: var(--bk-m-blue);
		box-shadow: none;
	}

	/* 折叠区里有生效的标签/排序时，按钮描成主色，提示「里面还有条件」 */
	#bk-filter-more:not(:checked) ~ .kb-filter-more-btn.is-active {
		color: var(--bk-m-blue);
		border-color: #c9d5ff;
	}

	/* 一行横滑。padding-right 必须是 0：滚动容器的右 padding 只加滚动余量、
	   不裁内容，留了就会凭空多出一段空白（这正是上一版看着像 bug 的地方）。
	   右端 18px 渐隐只用来把「下一颗胶囊被切出的弧边」收成柔和的「后面还有」，
	   且到最右 2px 就全透明（否则会留下一小片蓝影，像渲染坏了）；
	   不能像旧版那样淡 100px —— 那会把完整的胶囊也抹糊。 */
	.kb-filter-chips {
		flex: 1 1 auto;
		min-width: 0;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin: 0 !important;
		padding: 2px 0 !important;
		gap: 7px !important;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent calc(100% - 2px));
		mask-image: linear-gradient(to right, #000 calc(100% - 18px), transparent calc(100% - 2px));
	}

	/* 折叠区 / 子类行内容少，不需要渐隐，也别把最后一颗胶囊抹糊 */
	.kb-filter-row--more .kb-filter-chips,
	.kb-filter-row--sub .kb-filter-chips {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.kb-filter-chips::-webkit-scrollbar {
		display: none;
	}

	.kb-filter-chip {
		flex: 0 0 auto;
		white-space: nowrap !important;
		padding: 6px 13px !important;
		font-size: 12.5px !important;
		line-height: 20px !important;
		border-radius: 999px !important;
		background: #e9edf6;
		color: #59617a !important;
		max-width: none !important;
		overflow-wrap: normal !important;
	}

	/* 白卡里的胶囊要压得住卡底，太浅等于没底 */
	.kb-filter-row--more .kb-filter-chip {
		background: #e9edf6 !important;
		padding: 5px 11px !important;
		font-size: 12px !important;
	}

	.kb-filter-chip.is-active {
		background: var(--bk-m-blue) !important;
		color: #fff !important;
		font-weight: 600;
		box-shadow: 0 2px 8px rgba(74, 108, 247, 0.26);
	}

	.kb-filter-chip.is-active-parent {
		background: var(--bk-m-blue-soft) !important;
		color: var(--bk-m-blue) !important;
	}

	/* ≤375px：四颗分类胶囊 + 筛选按钮刚好一行，再收一档字号与内边距，
	   否则「未分类」会被拦腰切在横滑边界上。折叠区胶囊本来就不挤，不受影响。 */
	@media (max-width: 375px) {
		.kb-filter-chips {
			gap: 6px !important;
		}

		.kb-filter-chip {
			padding: 5px 10px !important;
			font-size: 12px !important;
		}

		.kb-filter-more-btn {
			padding: 0 10px;
			font-size: 12px;
		}
	}

	/* ---------------------------------------------------------------- 文章卡片 */
	.posts-list {
		gap: 12px !important;
	}

	.posts-list .archive-post,
	.posts-list .archive-post.has-cover,
	.posts-list .archive-post.has-cover.is-cover-right {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		min-height: 0 !important;
		padding: 0 !important;
		gap: 0 !important;
		border-radius: var(--bk-m-radius) !important;
		border: 1px solid var(--bk-m-line) !important;
		background: #fff !important;
		box-shadow: var(--bk-m-shadow);
		overflow: hidden;
	}

	/* 封面从「右侧 132x96 小图」改成通栏 16:9 头图 */
	.posts-list .archive-post .post-thumb-right,
	.posts-list .archive-post.has-cover .post-thumb-right {
		order: -1 !important;
		display: block !important;
		flex: 0 0 auto !important;
		width: 100% !important;
		height: auto !important;
		aspect-ratio: 16 / 9;
		border-radius: 0 !important;
		align-self: stretch !important;
	}

	.posts-list .archive-post .post-thumb-img {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover !important;
	}

	.posts-list .archive-post .post-content-wrapper {
		padding: 13px 15px 14px !important;
		gap: 0 !important;
	}

	.posts-list .archive-post:not(.has-cover) .post-content-wrapper {
		padding: 15px !important;
	}

	/* 以下四段覆盖模板里的行内 style（不改模板，靠 !important 压过行内） */
	.posts-list .archive-post .post-author-row {
		gap: 7px !important;
		font-size: 12.5px !important;
		margin-bottom: 8px !important;
	}

	.posts-list .archive-post .post-author-info img {
		width: 24px !important;
		height: 24px !important;
		min-width: 24px !important;
		max-width: 24px !important;
	}

	.posts-list .archive-post .post-author-name {
		font-size: 12.5px !important;
		max-width: 9em;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.posts-list .archive-post .post-title {
		font-size: 16.5px !important;
		line-height: 1.4 !important;
		margin: 0 0 7px 0 !important;
		letter-spacing: -0.2px;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.posts-list .archive-post .post-title a {
		color: var(--bk-m-ink) !important;
	}

	.posts-list .archive-post .post-excerpt {
		font-size: 13.5px !important;
		line-height: 1.6 !important;
		color: #7b8398 !important;
		margin: 0 !important;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.posts-list .archive-post .post-primary-tag {
		font-size: 12px !important;
		margin-bottom: 2px !important;
	}

	.posts-list .archive-post .post-footer {
		border-top: 0 !important;
		padding-top: 9px !important;
		margin-top: 9px !important;
	}

	.posts-list .archive-post .post-stats {
		gap: 16px !important;
		font-size: 12px !important;
		color: #9aa2b4 !important;
	}

	.posts-list .archive-post .post-stats svg {
		width: 15px;
		height: 15px;
	}

	.posts-list .archive-post .post-review-actions {
		gap: 6px;
	}

	.posts-list .archive-post .sticky-badge,
	.posts-list .archive-post .post-status-badge {
		top: auto !important;
		bottom: 10px;
		right: 12px;
	}

	/* 有封面的卡片把角标挪到图右上，避免压住底部计数 */
	.posts-list .archive-post.has-cover .sticky-badge,
	.posts-list .archive-post.has-cover .post-status-badge {
		top: 10px !important;
		bottom: auto !important;
		right: 10px !important;
	}

	.no-posts {
		padding: 40px 20px !important;
		border-radius: var(--bk-m-radius) !important;
		border: 1px solid var(--bk-m-line) !important;
	}

	/* ---------------------------------------------------------------- 侧栏卡片 */
	.kb-sidebar,
	.single-sidebar,
	.teaching-sidebar,
	.downloads-sidebar {
		width: 100% !important;
		gap: 12px !important;
		margin-top: 4px;
	}

	.kb-sidebar .widget,
	.kb-sidebar > div,
	.single-sidebar .widget,
	.single-sidebar > div,
	.teaching-sidebar-widget,
	.downloads-sidebar-widget {
		border-radius: var(--bk-m-radius) !important;
		border: 1px solid var(--bk-m-line) !important;
		box-shadow: var(--bk-m-shadow);
		background: #fff;
	}

	.kb-sidebar h3,
	.kb-sidebar .widget-title,
	.single-sidebar h3,
	.teaching-sidebar-widget h3,
	.downloads-sidebar-widget h3,
	.sidebar-widget-title {
		font-size: 14px !important;
		padding-bottom: 10px !important;
		margin-bottom: 10px !important;
	}

	/* 分类目录 / 标签云：手机上属于次要导航，胶囊收一档，别把页面又拖长 */
	.kb-sidebar .category-directory-card,
	.kb-sidebar .tags-cloud-card {
		padding: 14px 15px !important;
		border-radius: var(--bk-m-radius) !important;
	}

	.kb-sidebar .category-list,
	.kb-sidebar .tags-list {
		gap: 8px !important;
	}

	.kb-sidebar .category-item,
	.kb-sidebar .tag-item {
		padding: 6px 12px !important;
		font-size: 12px !important;
		border-radius: 999px !important;
	}

	.kb-sidebar .category-count {
		font-size: 10.5px !important;
	}

	.kb-sidebar .tags-more-btn {
		margin-top: 10px !important;
		font-size: 12.5px !important;
	}

	/* ---------------------------------------------------------------- 分页 */
	.pagination-container,
	.bk-pagination {
		padding: 18px 0 6px !important;
	}

	.pagination-container ul,
	.bk-pagination ul {
		gap: 6px !important;
		flex-wrap: wrap;
		justify-content: center;
	}

	.pagination-container a,
	.pagination-container span,
	.bk-pagination a,
	.bk-pagination span {
		width: 34px !important;
		height: 34px !important;
		border-radius: 10px !important;
		font-size: 13px !important;
	}

	/* ---------------------------------------------------------------- 工坊栈 */
	.teaching-full-layout {
		padding: 6px var(--bk-m-pad) 0 !important;
		gap: 10px !important;
	}

	.teaching-sidebar {
		order: -1;
		position: static !important;
		display: block !important;
		width: 100% !important;
	}

	/*
	 * 分类：原来是一张「热门分类」白卡（190px 高，只放得下一行胶囊，第三颗还被切）。
	 * 卡壳、标题全去掉，只留一条横滑 chip 条 —— 跟筛选栏同一套语言。
	 */
	.teaching-sidebar-widget {
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.teaching-sidebar-widget .widget-title,
	.teaching-sidebar .sidebar-widget-title {
		display: none !important;
	}

	.teaching-category-list {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		gap: 8px !important;
		overflow-x: auto !important;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 3px 16px 4px 0 !important;
		margin: 0 !important;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
	}

	.teaching-category-list::-webkit-scrollbar {
		display: none;
	}

	.teaching-category-item {
		flex: 0 0 auto !important;
	}

	.teaching-category-item a {
		gap: 6px !important;
		padding: 7px 14px 7px 12px !important;
		font-size: 12.5px !important;
		line-height: 20px !important;
		border-radius: 999px !important;
		white-space: nowrap;
		background: #e9edf6 !important;
		color: #59617a !important;
		font-weight: 600 !important;
		box-shadow: none !important;
	}

	.teaching-category-item.active a {
		background: var(--bk-m-blue) !important;
		color: #fff !important;
		box-shadow: 0 2px 10px rgba(74, 108, 247, 0.26);
	}

	/* 黄色文件夹图标在蓝底上会显脏，激活时跟着文字变白 */
	.teaching-category-item .cat-icon .dc-folder-svg {
		width: 0.95em;
		height: 0.95em;
		color: #e0a800;
	}

	.teaching-category-item.active .cat-icon .dc-folder-svg {
		color: #fff;
	}

	.teaching-category-item .cat-icon {
		width: auto;
		display: inline-flex;
		align-items: center;
	}

	/* 主区小节标题：现在没有卡了，直接当分区标题用 */
	.teaching-section-header {
		margin: 2px 0 2px !important;
		padding: 0 !important;
	}

	.teaching-section-title {
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 15px !important;
		font-weight: 700;
		color: var(--bk-m-ink) !important;
	}

	.teaching-section-title::before {
		content: '';
		flex: 0 0 auto;
		width: 3px;
		height: 13px;
		border-radius: 2px;
		background: var(--bk-m-blue);
	}

	.teaching-video-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 14px !important;
	}

	.teaching-video-item {
		border-radius: 18px !important;
		overflow: hidden;
		background: #fff !important;
		box-shadow: var(--bk-m-shadow) !important;
		transform: none !important;
	}

	/* 封面统一 16:9：原来写死 height:200px，窄屏会变成 1.8:1，三张卡片高矮不一。
	   用 vw 算高度而不是 aspect-ratio —— 卡片里塞的是 <video>，它自带固有比例会把
	   aspect-ratio 撑破（实测第二张高出一截） */
	.teaching-video-thumb {
		height: calc((100vw - 32px) * 9 / 16) !important;
		border-radius: 0 !important;
	}

	.teaching-video-thumb img,
	.teaching-video-thumb video,
	.teaching-video-cover-img,
	.teaching-video-thumb-video {
		width: 100% !important;
		height: 100% !important;
		object-fit: cover !important;
		display: block;
	}

	/*
	 * 「视频」角标原本在右下角、紫色渐变 —— 和正中的播放按钮撞成一堆，
	 * 紫色又跟整站蓝无关。挪到左上角、压成半透明黑，只当"这是视频"的说明。
	 */
	.teaching-video-badge {
		top: 10px !important;
		left: 10px !important;
		right: auto !important;
		bottom: auto !important;
		padding: 3px 9px !important;
		border-radius: 7px !important;
		background: rgba(12, 16, 26, 0.55) !important;
		backdrop-filter: blur(6px);
		-webkit-backdrop-filter: blur(6px);
		font-size: 11px !important;
		font-weight: 600 !important;
		letter-spacing: 0.2px;
		color: #fff !important;
	}

	.teaching-video-play {
		width: 46px !important;
		height: 46px !important;
		font-size: 0.95rem !important;
		color: var(--bk-m-blue) !important;
		background: rgba(255, 255, 255, 0.94) !important;
		box-shadow: 0 6px 18px rgba(10, 16, 32, 0.28) !important;
	}

	.teaching-video-play::before {
		display: none !important;
	}

	.teaching-video-info {
		padding: 11px 14px 13px !important;
		gap: 5px !important;
	}

	.teaching-video-title {
		font-size: 15.5px !important;
		line-height: 1.42 !important;
		font-weight: 650;
		color: var(--bk-m-ink) !important;
		margin: 0 !important;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* 正文摘录在卡片里只是重复标题（实测就一行「2131」），压到一行当说明 */
	.teaching-video-desc {
		font-size: 12.5px !important;
		line-height: 1.55 !important;
		color: #8b93a7 !important;
		margin: 0 !important;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		line-clamp: 1;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.teaching-video-meta {
		font-size: 11.5px !important;
		color: #a2a9b9 !important;
		margin-top: 1px !important;
	}

	/* ---------------------------------------------------------------- 下载中心 */
	/*
	 * PC 是「左栏 260px 分类树 + 右栏软件卡」。
	 * 手机上按原顺序排下来，左栏那两张卡（热门分类 240px + 最近更新 200px）把
	 * 真正的软件卡挤到了首屏之外 —— 一块内容都没看到，全是导航。
	 *
	 * 重排：热门分类 → 一条横滑 chip 条（顶部）；软件卡 → 主体；最近更新 → 沉到底部。
	 * 侧栏用 display:contents 拆开，两个 widget 才能各自 order。
	 */
	.downloads-layout {
		display: flex !important;
		flex-direction: column;
		grid-template-columns: none !important;
		padding: 6px var(--bk-m-pad) 0 !important;
		gap: 12px !important;
		max-width: none !important;
	}

	.downloads-sidebar {
		display: contents !important;
	}

	.downloads-main {
		order: 1;
		width: 100% !important;
	}

	/* 第一个 widget = 热门分类：只要 chip 条，卡壳与标题都不要 */
	.downloads-sidebar-widget:first-of-type {
		order: 0;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.downloads-sidebar-widget:first-of-type .sidebar-widget-title {
		display: none !important;
	}

	/* 第二个 widget = 最近更新：整块沉到所有软件卡之后 */
	.downloads-sidebar-widget + .downloads-sidebar-widget {
		order: 2;
	}

	.downloads-project-list {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		gap: 8px !important;
		overflow-x: auto !important;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 3px 0 4px !important;
		margin: 0 !important;
		list-style: none !important;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
	}

	.downloads-project-list::-webkit-scrollbar {
		display: none;
	}

	.project-item-group {
		flex: 0 0 auto !important;
		margin: 0 !important;
	}

	.project-item-link {
		display: inline-flex !important;
		align-items: center;
		gap: 0 !important;
		padding: 7px 15px !important;
		border-radius: 999px !important;
		background: #e9edf6 !important;
		font-size: 12.5px !important;
		font-weight: 600 !important;
		line-height: 20px !important;
		color: #59617a !important;
		white-space: nowrap;
		text-decoration: none;
	}

	.project-item-group.is-active .project-item-link,
	.project-item-link:hover {
		background: var(--bk-m-blue) !important;
		color: #fff !important;
	}

	/* 下拉三角与子列表在手机上没有意义（主区已经列全所有软件），只留分类名 */
	.project-item-arrow,
	.software-sublist {
		display: none !important;
	}

	/* 最近更新：紧凑列表，行高 40，不再撑成一张 200px 的大卡 */
	.downloads-sidebar-widget + .downloads-sidebar-widget {
		border-radius: 16px !important;
		padding: 12px 14px 6px !important;
		border: 1px solid var(--bk-m-line) !important;
		background: #fff !important;
		box-shadow: var(--bk-m-shadow) !important;
		margin-top: 2px;
	}

	.downloads-sidebar-widget + .downloads-sidebar-widget .sidebar-widget-title {
		font-size: 14px !important;
		margin: 0 0 6px !important;
		padding: 0 !important;
		border: 0 !important;
		color: var(--bk-m-ink) !important;
		display: flex;
		align-items: center;
		gap: 7px;
	}

	.downloads-sidebar-widget + .downloads-sidebar-widget .sidebar-widget-title::before {
		content: '';
		width: 3px;
		height: 12px;
		border-radius: 2px;
		background: var(--bk-m-blue);
	}

	.downloads-recent-list {
		list-style: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.downloads-recent-list li {
		border-bottom: 1px solid #f3f5fa;
	}

	.downloads-recent-list li:last-child {
		border-bottom: 0;
	}

	.recent-item {
		display: flex !important;
		align-items: center;
		gap: 10px;
		padding: 10px 0 !important;
		text-decoration: none;
	}

	.recent-name {
		flex: 1 1 auto;
		font-size: 13.5px !important;
		font-weight: 600;
		color: var(--bk-m-ink) !important;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.recent-ver {
		font-size: 11.5px !important;
		color: #98a0b3 !important;
		background: #f3f5fa;
		border-radius: 6px;
		padding: 2px 7px;
	}

	.recent-date {
		font-size: 11.5px !important;
		color: #b3b9c7 !important;
	}

	/* 主区的分类标题不要再包一层白卡：否则「工具」孤零零躺在一张空卡里，
	   下面紧接着又是软件卡，两层白卡叠着特别脏。改成蓝竖条 + 标题的分节样式。 */
	.downloads-main .downloads-category-card {
		background: transparent !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		padding: 0 2px !important;
		margin-bottom: 10px !important;
	}

	.downloads-category-block {
		margin-bottom: 20px !important;
	}

	.downloads-category-title {
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 15px !important;
		font-weight: 700;
		line-height: 1.3;
		color: var(--bk-m-ink) !important;
	}

	.downloads-category-title::before {
		content: '';
		flex: 0 0 auto;
		width: 3px;
		height: 14px;
		border-radius: 2px;
		background: var(--bk-m-blue);
	}

	.software-cards {
		gap: 12px !important;
	}

	.software-card {
		border-radius: 18px !important;
		border: 1px solid var(--bk-m-line) !important;
		padding: 14px !important;
		box-shadow: var(--bk-m-shadow) !important;
	}

	.software-card-head {
		gap: 12px !important;
		align-items: flex-start !important;
	}

	.software-icon,
	.software-icon-img {
		width: 46px !important;
		height: 46px !important;
		border-radius: 13px !important;
		font-size: 22px !important;
	}

	.software-info {
		min-width: 0;
	}

	.software-name {
		font-size: 15.5px !important;
		font-weight: 700;
		line-height: 1.35;
		display: flex;
		align-items: center;
		gap: 7px;
		flex-wrap: wrap;
	}

	.software-version {
		font-size: 11px !important;
		font-weight: 600 !important;
		color: #8b93a7 !important;
		background: #f3f5fa;
		border-radius: 6px;
		padding: 2px 7px;
	}

	.software-desc {
		font-size: 12.5px !important;
		line-height: 1.6 !important;
		color: #7f8799 !important;
		margin-top: 5px !important;
		-webkit-line-clamp: 2;
		display: -webkit-box;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.software-meta {
		gap: 6px !important;
		margin-top: 8px !important;
	}

	.software-badge-latest,
	.software-size,
	.software-tag {
		font-size: 11px !important;
		line-height: 18px !important;
		padding: 1px 8px !important;
		border-radius: 6px !important;
	}

	/* 按钮：整行、大触控面，但压到 40px —— 原来 44px 满宽配一行小字显得发胀 */
	.software-action {
		margin-top: 12px !important;
	}

	.btn-download-now {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		width: 100% !important;
		min-height: 40px !important;
		height: 40px;
		border-radius: 12px !important;
		font-size: 13.5px !important;
		font-weight: 650;
		letter-spacing: 0.2px;
	}

	/* 链接未填时不要做成一颗灰色实心大按钮（像可点但其实点不了） */
	.btn-download-now.is-disabled {
		background: #f4f6fa !important;
		color: #a8afbe !important;
		border: 1px dashed #dfe4ee !important;
		box-shadow: none !important;
	}

	/* ---------------------------------------------------------------- 文章详情 */
	/* 文章页用的是 header-blank（没有站点导航），single.css 里那 60px 的「给固定页头让位」
	   在手机上就是一块死白 —— 首屏直接从 y=70 才开始（截图实测）。 */
	body.single .site-content {
		padding-top: 10px !important;
	}

	.single-full-layout {
		padding-top: 0 !important;
	}

	/* 容器只当包裹层，卡片交给 .single-post 自己 —— 否则 16 + 32 两层内边距叠成 48px，
	   正文可用宽只剩 261px（PC 的三分之一） */
	.single-main > .container {
		border-radius: 0 !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		padding: 0 !important;
	}

	.single-post {
		padding: 16px 15px 18px !important;
		border-radius: var(--bk-m-radius) !important;
		border: 1px solid var(--bk-m-line) !important;
		box-shadow: var(--bk-m-shadow) !important;
		margin-bottom: 14px !important;
	}

	.single-post .entry-header {
		margin-bottom: 14px !important;
	}

	.single-post .post-meta {
		padding-bottom: 12px !important;
		gap: 8px !important;
		border-bottom: 1px solid var(--bk-m-line) !important;
	}

	.single-post .author-info {
		gap: 10px !important;
		font-size: 12.5px !important;
	}

	.single-post .author-info .author-avatar img {
		width: 36px !important;
		height: 36px !important;
	}

	.single-post .author-info .author-name {
		font-size: 13.5px !important;
	}

	.single-main .post-title,
	.single-main h1.post-title,
	.single-main .entry-title {
		font-size: 21px !important;
		line-height: 1.42 !important;
		letter-spacing: -0.3px;
		margin-bottom: 10px !important;
	}

	.single-main .post-meta,
	.single-main .single-meta {
		font-size: 12px !important;
		gap: 8px !important;
		flex-wrap: wrap;
	}

	/* 正文：移动端正文 15.5px / 1.9 是中文长文最舒服的档 */
	.post-content,
	.entry-content,
	.single-main .post-content {
		font-size: 15.5px !important;
		line-height: 1.9 !important;
		letter-spacing: 0.1px;
	}

	.post-content p,
	.entry-content p {
		margin: 0 0 1.05em 0 !important;
	}

	.post-content h2,
	.entry-content h2 {
		font-size: 19px !important;
		margin: 1.6em 0 0.6em !important;
	}

	.post-content h3,
	.entry-content h3 {
		font-size: 16.5px !important;
		margin: 1.4em 0 0.5em !important;
	}

	.post-content img,
	.entry-content img {
		border-radius: var(--bk-m-radius-sm);
	}

	.post-content blockquote,
	.entry-content blockquote {
		margin: 1.1em 0 !important;
		padding: 12px 14px !important;
		border-radius: 0 var(--bk-m-radius-sm) var(--bk-m-radius-sm) 0;
		font-size: 14.5px !important;
	}

	.post-content pre,
	.entry-content pre {
		border-radius: var(--bk-m-radius-sm) !important;
		font-size: 12.5px !important;
		line-height: 1.7 !important;
		padding: 13px !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.post-content code,
	.entry-content code {
		font-size: 0.92em;
	}

	/* 文章页那两个悬浮按钮：手机上收成右下角一颗胶囊（返回 / 收藏），
	   top/left/transform 必须一起清掉 —— 桌面是「贴左栏、再左移 100%」的定位 */
	.action-card {
		top: auto !important;
		left: auto !important;
		transform: none !important;
		bottom: calc(var(--bk-m-tab-h) + 16px) !important;
		right: 14px !important;
		flex-direction: row !important;
		gap: 2px !important;
		padding: 5px !important;
		border: 1px solid rgba(16, 24, 40, 0.06) !important;
		border-radius: 999px !important;
		background: rgba(255, 255, 255, 0.96) !important;
		box-shadow: 0 10px 26px -12px rgba(16, 24, 40, 0.35) !important;
		z-index: 940;
	}

	.action-card .action-btn {
		width: 38px;
		height: 38px;
		padding: 0;
		border-radius: 50% !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.action-card .action-btn:active {
		background: #f2f5ff !important;
		transform: none !important;
	}

	.action-card .action-btn.back-btn img {
		width: 17px;
		height: 17px;
	}

	.action-card .action-btn.bookmark-btn svg {
		width: 20px;
		height: 20px;
	}

	/* 收藏数原来飘在按键外（top:-2/right:-6），胶囊一圆角就露在外面，收进按钮角落 */
	.action-btn.bookmark-btn .bookmark-count {
		top: 1px;
		right: 0;
		min-width: 14px;
		height: 14px;
		padding: 0 3px;
		border-radius: 999px;
		background: #eef2ff;
		color: var(--bk-m-blue);
		font-size: 9.5px;
		line-height: 14px;
		text-align: center;
	}

	/* ---------------------------------------------------------------- 个人空间 /blog */
	.blog-full-layout {
		padding: 12px var(--bk-m-pad) 0 !important;
		gap: 14px !important;
	}

	.blog-left-card {
		border-radius: var(--bk-m-radius) !important;
	}

	/*
	 * 资料卡 + 统计卡 + 四个入口在手机上摞成 556px，第一篇文章被顶到 650px 以下 ——
	 * 一屏什么都看不到。头像 96→64、卡片内边距和字号各收一档，正文能提前 200px 出现。
	 */
	.blog-left-card .user-profile-wrapper {
		gap: 10px !important;
	}

	.user-avatar-section {
		padding: 16px 12px 4px !important;
	}

	.user-avatar-wrapper img {
		width: 64px !important;
		height: 64px !important;
		border-width: 2px !important;
	}

	.user-info-section {
		padding: 6px 0 0 !important;
	}

	.user-name-row {
		margin-bottom: 9px !important;
		gap: 6px !important;
	}

	.user-name {
		font-size: 1.1rem !important;
	}

	.user-bio-wrapper,
	.user-bio-empty {
		padding: 9px 12px 9px 30px !important;
		border-radius: 10px !important;
	}

	.user-bio-quill {
		left: 9px;
		top: 9px;
	}

	.user-bio {
		font-size: 0.82rem !important;
		line-height: 1.55 !important;
	}

	.user-social-meta {
		margin-top: 8px !important;
		font-size: 12px !important;
	}

	/* 四宫格统计：14px→10px 内边距，数字 1.3rem→1.1rem */
	.user-stats-outside {
		padding: 10px 12px !important;
		border-radius: var(--bk-m-radius) !important;
	}

	.user-stat-item {
		padding: 2px 2px !important;
	}

	.user-stat-value {
		font-size: 1.1rem !important;
	}

	.user-stat-label {
		font-size: 11.5px !important;
		margin-top: 2px !important;
	}

	.user-stat-divider {
		height: 22px !important;
	}

	.user-profile-nav-outside {
		gap: 8px !important;
		flex-wrap: wrap !important;
	}

	.user-profile-nav-outside .profile-nav-item {
		flex: 1 1 calc(50% - 4px) !important;
		max-width: none !important;
		padding: 11px 8px !important;
		font-size: 13px !important;
		border-radius: 12px !important;
	}

	/* 筛选 tabs 是一条横滑条：右侧留渐隐，提示「还有」 */
	.my-post-tabs {
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
	}

	.my-post-tab {
		font-size: 13px !important;
		padding: 8px 12px 11px !important;
	}

	/* ---------------------------------------------------------------- 表单 */
	.bk-form input[type="text"],
	.bk-form input[type="email"],
	.bk-form input[type="url"],
	.bk-form input[type="password"],
	.bk-form textarea,
	.bk-form select,
	.comment-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
	.comment-form textarea {
		border-radius: var(--bk-m-radius-sm) !important;
		min-height: var(--bk-m-hit);
	}

	button,
	input[type="submit"],
	.button,
	.btn {
		min-height: 42px;
	}

	/* ---------------------------------------------------------------- 页脚 */
	/*
	 * ⚠️ 底部 Tab 是 fixed 的，而 #page 是撑满视口的 flex 容器 ——
	 * body 上那 58px 的 padding-bottom **不参与滚动高度**，让位必须写在
	 * .site-footer 自己的 padding-bottom 上，否则版权底栏会被 Tab 栏压住。
	 * 只让这一条，其余间距/字号仍归 responsive.css 与 footer.css 管。
	 */
	.site-footer {
		padding-bottom: calc(var(--bk-m-tab-h) + 20px + env(safe-area-inset-bottom, 0px)) !important;
	}

	/* 有客服气泡时再多让一条「气泡道」，气泡就浮在空白里 */
	body.bk-has-chat .site-footer {
		padding-bottom: calc(var(--bk-m-tab-h) + 114px + env(safe-area-inset-bottom, 0px)) !important;
	}

	.site-footer .container,
	body.home .site-footer .container,
	body.front-page .site-footer .container {
		padding: 0 var(--bk-m-pad) !important;
	}

	.site-footer .footer-meta {
		justify-content: center;
		text-align: center;
		gap: 6px 12px;
	}

	/* ---------------------------------------------------------------- 弹层 */
	.bk-search-modal__panel {
		width: calc(100vw - 24px) !important;
		max-width: none !important;
		border-radius: var(--bk-m-radius) !important;
		margin-top: 10vh;
	}

	/* 键盘快捷键提示（回车搜索 / Esc 关闭）在手机上没有任何意义，白占一行 */
	.bk-search-modal__keys {
		display: none !important;
	}

	.bk-search-modal__foot {
		justify-content: stretch !important;
	}

	/* 主操作给整行：手机上「搜索」按钮缩在右下角，离拇指远 */
	.bk-search-modal__submit {
		flex: 1 1 auto;
		min-height: 44px;
		border-radius: 12px !important;
		font-size: 15px !important;
	}

	.bk-search-modal__form {
		border-radius: var(--bk-m-radius) !important;
	}

	.login-modal-container {
		width: calc(100vw - 32px) !important;
		border-radius: 20px !important;
	}

	/* 在线客服气泡与欢迎浮层要让开底部 Tab —— 它们原本都钉在 right/bottom 14px，
	   正好被 58px 的 Tab 栏压住（ref-mobile-responsive 里同类问题：同角元素必须让位） */
	.bk-chat {
		bottom: calc(var(--bk-m-tab-h) + 14px + env(safe-area-inset-bottom, 0px)) !important;
	}

	body.bk-has-chat #bk-wn:not(.is-bl) {
		bottom: calc(var(--bk-m-tab-h) + 14px + 86px + 12px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* 窄屏再收一档：iPhone SE / 小屏安卓 */
@media (max-width: 400px) {
	.banner-content h1,
	.banner-content h2 {
		font-size: 24px !important;
	}

	.banner-content p {
		font-size: 13px !important;
	}

	.stat-number {
		font-size: 19px !important;
	}

	.posts-list .archive-post .post-title {
		font-size: 15px !important;
	}

	.single-main .post-title,
	.single-main h1.post-title {
		font-size: 19.5px !important;
	}
}
