/*
 Theme Name: 尘枢主题
 Theme URI: shturl.cc/g7xh6L
 Author: 旧人
 Author URI: shturl.cc/g7xh6L
 Description: 尘枢主题，归档式资源主题，支持版本日志、分类筛选，适合软件、源码、工具分享站点。暗色优先，轻量高性能。
 Version: 0.6.3
 Requires at least: 6.0
 Tested up to: 6.8
 Requires PHP: 7.4
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: chenshu
 Tags: blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready, block-styles, wide-blocks
*/

/*
 * 尘枢主题 — 样式表
 *
 * @package ChenShu
 * @since   0.1.0
 * @version 0.6.3
 *
 * Copyright (c) 2026 旧人
 * Licensed under GPL-2.0-or-later
 */


/* =========================================================================
   1. 设计变量
   ========================================================================= */
:root {
	/* 颜色：取自子比的配色，观感保持一致 */
	--gl-bg: #f5f6f7;
	--gl-surface: #ffffff;
	--gl-surface-2: #f6f7f8;
	--gl-muted-bg: #eeeeee;
	--gl-text: #4e5358;
	--gl-text-soft: #4e5358;
	--gl-muted: #777777;
	--gl-muted-2: #999999;
	--gl-muted-3: #b1b1b1;
	--gl-muted-4: #d2d2d2;
	--gl-border: rgba(50, 50, 50, 0.06);
	--gl-border-2: rgba(0, 0, 0, 0.03);

	/* 主色 */
	--gl-accent: #f04494;
	--gl-accent-text: #f04494;
	--gl-accent-soft: rgba(240, 68, 148, 0.1);
	--gl-focus-shadow: rgba(253, 83, 161, 0.4);

	--gl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
	--gl-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
		"Liberation Mono", monospace;

	--gl-wrap: 1200px;
	--gl-read: 46rem;
	--gl-gap: 1.25rem;
	--gl-header-h: 60px;
	/* 开屏遮罩：留空变量时这里生效，深色模式会覆盖 */
	--gl-splash-bg: #ffffff;
	--gl-splash-color: #1f2430;
	--gl-radius: 8px;
	/* 小圆角 ≈ 基础 / 1.4（与 Zibll 的 mini-radius 同一比例），用于标签、按钮、小徽章 */
	--gl-radius-sm: 6px;
	/* 大圆角用于卡片、面板、下载区块这类"容器"，视觉上更柔和 */
	--gl-radius-lg: 12px;
	--gl-shadow: 0 1px 2px rgba(116, 116, 116, 0.08);
	--gl-shadow-hover: 0 4px 16px rgba(116, 116, 116, 0.16);
	--gl-footer-bg: #ffffff;
	--gl-footer-color: #999999;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--gl-bg: #292a2d;
		--gl-surface: #323335;
		--gl-surface-2: #37383a;
		--gl-muted-bg: #2d2e31;
		--gl-text: #f8fafc;
		--gl-text-soft: #e5eef7;
		--gl-muted: #b4b6bb;
		--gl-muted-2: #888a8f;
		--gl-muted-3: #636469;
		--gl-border: rgba(114, 114, 114, 0.1);
		--gl-border-2: rgba(184, 184, 184, 0.02);
		--gl-shadow: 0 1px 2px rgba(24, 24, 24, 0.1);
		--gl-shadow-hover: 0 4px 16px rgba(24, 24, 24, 0.3);
		--gl-splash-bg: #1c1d20;
		--gl-splash-color: #f2f4f7;
		--gl-footer-bg: #323335;
		--gl-footer-color: #888a8f;
	}
}

/* 手动切换到夜间（覆盖系统设置） */
:root[data-theme='dark'] {
	--gl-bg: #292a2d;
	--gl-surface: #323335;
	--gl-surface-2: #37383a;
	--gl-muted-bg: #2d2e31;
	--gl-text: #f8fafc;
	--gl-text-soft: #e5eef7;
	--gl-muted: #b4b6bb;
	--gl-muted-2: #888a8f;
	--gl-muted-3: #636469;
	--gl-border: rgba(114, 114, 114, 0.1);
	--gl-border-2: rgba(184, 184, 184, 0.02);
	--gl-shadow: 0 1px 2px rgba(24, 24, 24, 0.1);
	--gl-shadow-hover: 0 4px 16px rgba(24, 24, 24, 0.3);
	--gl-footer-bg: #323335;
	/* 开屏遮罩：手动切深色时也要跟着变 */
	--gl-splash-bg: #1c1d20;
	--gl-splash-color: #f2f4f7;
--gl-footer-color: #888a8f;
}

/* =========================================================================
   2. 基础重置
   ========================================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--gl-header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--gl-bg);
	color: var(--gl-text);
	font-family: var(--gl-font);
	font-size: 16px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	word-break: break-word;

	/* Sticky footer：内容少时把页脚顶到视口底部，避免下方留白。
	   减去后台工具栏高度，否则登录状态下会多出滚动条。 */
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

/* 主内容撑满剩余高度 */
.gl-main {
	flex: 1 0 auto;
}

/* 页脚不被压缩 */
.gl-footer {
	flex-shrink: 0;
}

img, svg, video, iframe, embed, object {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--gl-accent-text);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--gl-accent);
}

h1, h2, h3, h4, h5, h6 {
	margin: 1.5em 0 0.6em;
	font-weight: 650;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.15rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, blockquote, pre, table, figure {
	margin: 0 0 1.1em;
}

ul, ol {
	padding-left: 1.4em;
}

/*
 * ⚠️ 这条**必须限定在正文里**。
 *
 * 原来写成全局的 `li + li`，会命中全站所有相邻列表项 ——
 * 包括抽屉子菜单。`0.3em` = 4.8px，正好把每行第二列
 * 顶下去 4.8px，表现就是「侧边分类对不齐」：
 *   安卓游戏 y=136 / 电脑游戏 y=141
 *
 * 别处（.gl-widget / .gl-comments / .gl-author-card）都已各自覆盖，
 * 只有抽屉漏了 —— 与其到处补，不如把根上的作用域收窄。
 */
/*
 * 只作用于**文章正文**（.gl-content，已从渲染结果核实存在）。
 * 评论区、小工具、抽屉都各自有独立规则，不需要这条。
 *
 * ⚠️ 不要写 .gl-post-content / .gl-entry-content / .gl-comment-content ——
 * 这三个类名在本主题的模板里**根本不存在**，
 * 写了等于让正文列表间距直接失效。
 */
.gl-content li + li {
	margin-top: 0.3em;
}

code, kbd, samp {
	padding: 0.15em 0.4em;
	background: var(--gl-surface-2);
	border-radius: 5px;
	font-family: var(--gl-mono);
	font-size: 0.875em;
}

pre {
	overflow-x: auto;
	padding: 1rem 1.1rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	line-height: 1.6;
}

pre code {
	padding: 0;
	background: none;
}

blockquote {
	margin-left: 0;
	padding: 0.3em 0 0.3em 1.1em;
	border-left: 3px solid var(--gl-accent);
	color: var(--gl-text-soft);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

th, td {
	padding: 0.55em 0.8em;
	border: 1px solid var(--gl-border);
	text-align: left;
}

th {
	background: var(--gl-surface-2);
	font-weight: 600;
}

hr {
	margin: 2rem 0;
	border: 0;
	border-top: 1px solid var(--gl-border);
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--gl-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* =========================================================================
   3. 无障碍
   ========================================================================= */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 10px;
	left: 10px;
	z-index: 9999;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.6em 1.1em;
	background: var(--gl-surface);
	border-radius: var(--gl-radius);
	box-shadow: var(--gl-shadow-hover);
}

/* =========================================================================
   4. 布局
   ========================================================================= */
.gl-wrap {
	width: min(100% - 2rem, var(--gl-wrap));
	margin-inline: auto;
}

.gl-layout {
	display: grid;
	gap: calc(var(--gl-gap) * 1.8);
	grid-template-columns: minmax(0, 1fr);
	padding-block: 2rem 3rem;
}

@media (min-width: 62rem) {
	.gl-layout--sidebar {
		grid-template-columns: minmax(0, 1fr) 19rem;
	}
}

/* =========================================================================
   5. 站点头部
   ========================================================================= */
.gl-header {
	position: sticky;
	top: 0;
	z-index: 100;
	flex-shrink: 0;
	background: color-mix(in srgb, var(--gl-surface) 88%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--gl-border);
}

.gl-header__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: var(--gl-header-h);
}

.gl-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-shrink: 0;
}

.gl-brand img {
	display: block;
	max-height: 34px;
	width: auto;
}

/* 日夜两套 LOGO */
.gl-logo {
	display: block;
	line-height: 0;
}

.gl-logo__dark {
	display: none;
}

@media (prefers-color-scheme: dark) {
	.gl-logo__light {
		display: none;
	}

	.gl-logo__dark {
		display: block;
	}

	/* 只上传了日间 LOGO 时，深色底上稍微提亮 */
	.gl-logo:not(:has(.gl-logo__dark)) .gl-logo__light {
		display: block;
		filter: brightness(1.08);
	}
}

.gl-brand__name {
	margin: 0;
	font-size: 1.08rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.gl-brand__name a {
	color: var(--gl-text);
}

.gl-brand__name a:hover {
	color: var(--gl-accent);
}

.gl-brand__desc {
	margin: 0;
	font-size: 0.75rem;
	color: var(--gl-muted);
	line-height: 1.3;
}

.gl-nav {
	margin-left: 0.5rem;
}

.gl-nav ul {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-nav li {
	position: relative;
}

.gl-nav a {
	display: block;
	padding: 0.4rem 0.7rem;
	border-radius: 8px;
	color: var(--gl-text-soft);
	font-size: 0.94rem;
	font-weight: 500;
	white-space: nowrap;
}

/* 有子菜单的项加一个下拉箭头 —— 否则用户不知道这里能展开 */
.gl-nav .menu-item-has-children > a {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.gl-nav .menu-item-has-children > a::after {
	content: "";
	flex-shrink: 0;
	width: 0;
	height: 0;
	border-top: 4px solid currentColor;
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	opacity: 0.55;
	transition: transform 0.16s ease;
}

/* 展开时箭头翻转 */
.gl-nav .menu-item-has-children:hover > a::after,
.gl-nav .menu-item-has-children:focus-within > a::after {
	transform: rotate(180deg);
}

/* 二级菜单里的项如果还有下级，箭头朝右 */
.gl-nav .sub-menu .menu-item-has-children > a::after {
	border-top: 3.5px solid transparent;
	border-bottom: 3.5px solid transparent;
	border-left: 4px solid currentColor;
	margin-left: auto;
}

.gl-nav .sub-menu .menu-item-has-children > a {
	display: flex;
	width: 100%;
}

.gl-nav a:hover,
.gl-nav .current-menu-item > a,
.gl-nav .current_page_item > a,
.gl-nav .current-menu-parent > a {
	color: var(--gl-accent-text);
	background: var(--gl-surface-2);
}

.gl-nav .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	display: block;
	min-width: 11rem;
	padding: 0.35rem;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-6px);
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	box-shadow: var(--gl-shadow-hover);
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.gl-nav li:hover > .sub-menu,
.gl-nav li:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.gl-nav .sub-menu a {
	padding: 0.4rem 0.6rem;
}

.gl-nav .sub-menu .sub-menu {
	top: -0.35rem;
	left: calc(100% + 6px);
}

.gl-header__actions {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin-left: auto;
	flex-shrink: 0;
}
/* 用户区与图标区之间的分隔线（子比也有一条，用来分组） */
.gl-header__sep {
	flex-shrink: 0;
	width: 1px;
	height: 18px;
	margin: 0 0.4rem;
	background: var(--gl-border);
}

/* 图标按钮间距再松一点，现在挤在一起 */
.gl-header__actions .gl-icon-btn {
	margin-left: 0.1rem;
}


.gl-icon-btn {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--gl-muted);
	cursor: pointer;
}

.gl-icon-btn:hover {
	background: var(--gl-surface-2);
	color: var(--gl-text);
}

.gl-icon-btn svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-menu-toggle {
	display: none;
	color: var(--gl-text);
}

/*
 * =========================================================================
 * 手机端：顶栏三栏 + 左侧抽屉
 * =========================================================================
 * 布局：☰ 在左，LOGO 居中，搜索在右。
 * 分类与用户卡片收进从左侧滑出的抽屉里。
 *
 * 为什么改成抽屉而不是「顶栏下方展开」：
 *   下方展开会把正文整体往下推，每次开合页面都跳一下；
 *   抽屉是覆盖层，不动文档流，而且能放下分类 + 用户信息而不占正文高度。
 * ========================================================================= */
@media (max-width: 56rem) {
	/* ---- 顶栏：三栏 ---- */
	.gl-header__inner {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		column-gap: 0.5rem;
	}

	/* 菜单按钮在 DOM 里排在操作区末尾，靠 order 提到最左 */
	.gl-menu-toggle {
		display: grid;
		order: -1;
		grid-column: 1;
		justify-self: start;
	}

	/* ☰ / ✕ 两个图标都在 DOM 里，靠 aria-expanded 切换 —— 不用 JS 换 DOM */
	.gl-menu-toggle__open,
	.gl-menu-toggle__close {
		grid-area: 1 / 1;
		line-height: 0;
	}

	.gl-menu-toggle__close {
		display: none;
	}

	.gl-menu-toggle[aria-expanded='true'] .gl-menu-toggle__open {
		display: none;
	}

	.gl-menu-toggle[aria-expanded='true'] .gl-menu-toggle__close {
		display: block;
	}

	.gl-brand {
		order: 0;
		grid-column: 2;
		justify-self: center;
		min-width: 0;
	}

	/* 居中时站点名可能很长，限一下宽度别顶到两边按钮 */
	.gl-brand__name,
	.gl-brand__desc {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		max-width: 46vw;
	}

	.gl-header__actions {
		order: 1;
		grid-column: 3;
		justify-self: end;
		margin-left: 0;
	}

	/* 桌面导航在手机端整个不显示 —— 手机用下面的抽屉 */
	.gl-nav--desktop {
		display: none;
	}

	/* ---- 抽屉 ---- */
	.gl-drawer {
		position: fixed;

		/*
		 * ⚠️ top 是「顶栏高度」而不是 0 ——
		 * 抽屉要从**顶栏下方**滑出，顶栏（☰/LOGO/🔍）一直留在上面。
		 * 之前写 top:0 把顶栏整个盖住，还在抽屉里又做了一套顶栏，
		 * 等于同一个东西出现两次，跟要求不符。
		 */
		top: var(--gl-header-h);
		left: 0;
		bottom: 0;
		z-index: 130;

		display: flex;
		flex-direction: column;

		/*
		 * 尺寸与缓动对齐子比的规格：固定 281px、0.6s 弹性缓出。
		 * 之前是 min(84vw,330px) + 0.26s —— 快一倍，手感差别很明显。
		 */
		width: 281px;
		max-width: 86vw;
		max-height: none;
		margin: 0;
		padding: 1.1rem 1rem calc( 1.1rem + env( safe-area-inset-bottom, 0px ) );
		left: -2px;

		background: var(--gl-surface);
		box-shadow: 4px 0 24px rgb( 0 0 0 / 18% );
		overflow-y: auto;
		overscroll-behavior: contain;

		transform: translateX( -110% );
		transition: transform 0.6s cubic-bezier( 0.28, 0.9, 0.34, 0.99 );
		will-change: transform;
	}

	.gl-drawer.is-open {
		transform: translateX( 0 );
	}

	.gl-drawer ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	/* ---- 父级：大号字 + 左侧圆点 ---- */
	.gl-drawer .menu-item > a,
	.gl-drawer .page_item > a {
		display: flex;
		align-items: center;
		gap: 0.6rem;
		padding: 0.72rem 0.4rem;
		font-size: 1.02rem;
		font-weight: 600;
		color: var(--gl-text);
		text-decoration: none;
	}

	/* 圆点用 border 画空心圆，不用图片、不用伪内容字符 */
	.gl-drawer .menu-item-has-children > a::before,
	.gl-drawer .page_item_has_children > a::before {
		content: "";
		flex-shrink: 0;
		width: 8px;
		height: 8px;
		border: 2px solid var(--gl-accent);
		border-radius: 50%;
	}

	.gl-drawer .current-menu-item > a,
	.gl-drawer .current-menu-ancestor > a,
	.gl-drawer .current-menu-parent > a,
	.gl-drawer .current_page_item > a,
	.gl-drawer .current_page_ancestor > a {
		color: var(--gl-accent-text);
	}

	/* 父级之间的间距 */
	.gl-drawer > .gl-drawer__body > ul > li + li {
		margin-top: 0.35rem;
	}

	/* 抽屉顶栏：✕ 在左、LOGO 居中、🔍 在右 */
	.gl-drawer__head {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		gap: 0.5rem;
		margin-bottom: 1rem;
		padding-bottom: 0.85rem;
		border-bottom: 1px solid var(--gl-border-2);
	}

	/* 三个按钮统一样式：圆形、40px 点击区 */
	.gl-drawer__close,
	.gl-drawer__search {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		background: var(--gl-surface-2);
		border: 0;
		border-radius: 50%;
		color: var(--gl-muted);
		cursor: pointer;
	}

	.gl-drawer__close {
		justify-self: start;
	}

	.gl-drawer__search {
		justify-self: end;
	}

	.gl-drawer__close svg,
	.gl-drawer__search svg {
		width: 18px;
		height: 18px;
		fill: none;
		stroke: currentColor;
		stroke-width: 2;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.gl-drawer__brand {
		justify-self: center;
		min-width: 0;
		max-width: 100%;
		text-align: center;
		text-decoration: none;
	}

	.gl-drawer__brand img {
		display: block;
		max-height: 32px;
		width: auto;
		margin: 0 auto;
	}

	.gl-drawer__name {
		display: block;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 1.06rem;
		font-weight: 700;
		color: var(--gl-text);
	}

	.gl-drawer__body {
		flex: 1 1 auto;
		min-height: 0;
	}

	/*
	 * 子级：两列网格 + 填充方块。
	 *
	 * 不用竖线缩进那套 —— 手机屏幕窄，缩进会把子项挤成一条细长列，
	 * 两列方块能在同样高度里放下两倍条目，还更容易点。
	 */
	.gl-drawer .sub-menu {
		position: static;
		visibility: visible;
		opacity: 1;
		transform: none;
		box-shadow: none;
		border: 0;
		border-radius: 0;
		background: transparent;

		/* 两列从容器左边缘起 —— 不能有左内距/外边距，
		   否则第二个父级的子项会比第一个缩进更多，看着就是「对不齐」 */
		margin: 0.45rem 0 0;
		padding: 0;

		display: grid;
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );

		/* 实测 rjg9.cn 的抽屉：列间距 4px、行间距 5px */
		gap: 5px 4px;
	}

	.gl-drawer .sub-menu > li {
		min-width: 0;

		/* 两列网格靠 gap 控制间距；这里清掉任何继承来的外边距，
		   否则同一行左右两个会错开（对不齐） */
		margin: 0;
	}

	.gl-drawer .sub-menu > li > a {
		display: block;
		width: 100%;
		box-sizing: border-box;

		/*
		 * 实测 rjg9.cn 的抽屉子项：高 32px、字号约 13px。
		 * 这里用「固定行高 + 上下内距」凑够 32px，
		 * 比调 padding 猜数值稳。
		 */
		height: 32px;
		line-height: 20px;
		padding: 6px 10px;

		/* 超长分类名截断成省略号 —— 参考图里是 "Android soft…" */
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;

		background: var(--gl-surface-2);
		border-radius: var(--gl-radius);

		color: var(--gl-text-soft);
		font-size: 0.82rem;
		font-weight: 500;

		/* 左对齐 —— 照参考图；居中在长短不一的分类名之间会显得参差 */
		text-align: left;
		text-decoration: none;

		/* 长分类名截断，别把方块撑破 */
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.gl-drawer .sub-menu > li > a.is-active,
	.gl-drawer .sub-menu .current-menu-item > a,
	.gl-drawer .sub-menu .current_page_item > a {
		background: var(--gl-accent-soft);
		color: var(--gl-accent-text);
	}

	/* 子级不再显示圆点 */
	.gl-drawer .sub-menu .menu-item-has-children > a::before {
		display: none;
	}

	/* 第三级：回到单列；左边缘仍与上级对齐，只用竖线表示层级 */
	.gl-drawer .sub-menu .sub-menu {
		grid-template-columns: 1fr;
		margin-left: 0;
		padding-left: 0.6rem;
		border-left: 2px solid var(--gl-border);
	}

	/*
	 * 抽屉工具栏：深色切换 + 语言切换。
	 *
	 * ⚠️ 用 float:right 而不是靠自己占一行 ——
	 * 这样它会贴在**第一行分类的右侧**，跟参考图一致。
	 * 如果做成普通块级元素，就会把菜单挤下去、单独占一行。
	 */
	/*
	 * 工具栏靠**绝对定位**贴在菜单区右上角。
	 *
	 * ⚠️ 这里不能用 float:right ——
	 * `.gl-drawer` 是 `display:flex`，而 **float 对 flex 子项无效**，
	 * 会被忽略并沿交叉轴 stretch 拉满整行，把菜单挤到下面去。
	 * （实测：float 版工具栏宽 241px = 整行宽，父级分类被顶到下一行）
	 *
	 * 绝对定位不受父级 display 影响，稳稳压在第一行分类右侧。
	 */
	.gl-drawer__body {
		position: relative;

		/*
		 * flex-shrink:0 —— 内容超高时**不许被压缩**。
		 * 抽屉是 flex 列，默认 flex-shrink:1；屏幕矮的时候
		 * 菜单和用户区会互相挤到一起（实测：420px 高的视口里
		 * 「请登录」压在分类块上面）。
		 * 设成 0 之后，超高就让抽屉自己滚动。
		 */
		flex-shrink: 0;
	}

	.gl-drawer__tools {
		position: absolute;

		/*
		 * top 9px = 与第一行分类的文字中线对齐。
		 * 实测：第一行 <a> 高 52px、工具栏高 34px，
		 * 垂直居中偏移 = (52 - 34) / 2 = 9px。
		 */
		top: 9px;
		right: 0;
		z-index: 2;

		display: flex;
		align-items: center;
		gap: 0.4rem;
	}

	/* 第一行分类给工具栏让出位置，长分类名不会钻到按钮底下 */
	.gl-drawer__body > ul > li:first-child > a {
		padding-right: 5.5rem;
	}

	.gl-drawer__tools .gl-drawer__tool {
		display: grid;
		place-items: center;

		/* 圆形按钮，点击区 34px */
		width: 34px;
		height: 34px;
		padding: 0;

		background: var(--gl-surface-2);
		border: 0;
		border-radius: 50%;
		color: var(--gl-muted);
		cursor: pointer;
	}

	.gl-drawer__tool svg {
		width: 17px;
		height: 17px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.9;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	/* 语言下拉 */
	.gl-drawer__lang {
		position: relative;
	}

	.gl-drawer__langs {
		position: absolute;
		top: calc( 100% + 6px );
		right: 0;
		z-index: 10;

		display: none;
		min-width: 8rem;
		padding: 0.3rem;

		background: var(--gl-surface);
		border: 1px solid var(--gl-border);
		border-radius: var(--gl-radius);
		box-shadow: var(--gl-shadow-hover);
	}

	.gl-drawer__lang.is-open .gl-drawer__langs {
		display: block;
	}

	.gl-drawer__langs a {
		display: block;
		padding: 0.42rem 0.6rem;
		border-radius: var(--gl-radius-sm);
		color: var(--gl-text-soft);
		font-size: 0.86rem;
		text-decoration: none;
		white-space: nowrap;
	}

	.gl-drawer__langs-empty {
		display: block;
		padding: 0.42rem 0.6rem;
		color: var(--gl-muted-2);
		font-size: 0.82rem;
		white-space: nowrap;
	}

	.gl-drawer__langs a:hover,
	.gl-drawer__langs a.is-current {
		background: var(--gl-surface-2);
		color: var(--gl-accent-text);
	}

	/* ---- 抽屉底部的用户卡片 ---- */
	.gl-drawer__user {
		display: block;

		/* margin-top:auto 把它推到抽屉底部 —— 分类多的时候也不会被顶出屏幕 */
		margin-top: auto;

		/*
		 * flex-shrink:0 —— 抽屉是 flex 列，默认允许压缩；
		 * 屏幕矮的时候用户区会被压上去跟菜单重叠
		 * （实测：420px 高的视口里「请登录」压在分类块上）。
		 * 设成 0 之后超高就让抽屉滚动。
		 */
		flex-shrink: 0;
		padding-top: 1rem;
		border-top: 1px solid var(--gl-border-2);
	}

	/* ---- 抽屉用户区：头像 + 名字 + 统计 + 彩色快捷入口 ---- */
	.gl-duser__top {
		display: flex;
		align-items: center;
		gap: 0.7rem;
	}

	.gl-duser__av {
		flex-shrink: 0;
		width: 46px;
		height: 46px;
		border-radius: 50%;
		object-fit: cover;
		background: var(--gl-surface-2);
	}

	.gl-duser__av--ghost {
		display: grid;
		place-items: center;
		color: var(--gl-muted-3);
	}

	.gl-duser__av--ghost svg {
		width: 22px;
		height: 22px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.8;
	}

	.gl-duser__meta {
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 0.15rem;
	}

	.gl-duser__name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		color: var(--gl-text);
		font-size: 0.98rem;
	}

	.gl-duser__sub {
		color: var(--gl-muted-2);
		font-size: 0.76rem;
	}

	/* 统计标签 */
	.gl-duser__tags {
		display: flex;
		flex-wrap: wrap;
		gap: 0.35rem;
		margin-top: 0.7rem;
	}

	.gl-duser__tag {
		padding: 0.16rem 0.5rem;
		background: var(--gl-surface-2);
		border-radius: 4px;
		color: var(--gl-muted);
		font-size: 0.72rem;
		white-space: nowrap;
	}

	.gl-duser__tag.is-pts {
		background: var(--gl-accent-soft);
		color: var(--gl-accent-text);
	}

	/* 快捷入口：两列网格，彩色圆角图标 —— 结构照子比的两行 */
	.gl-duser__links {
		display: grid;
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 0.4rem;
		margin-top: 0.85rem;
	}

	.gl-duser__link {
		display: flex;
		align-items: center;
		gap: 0.5rem;

		min-height: 42px;
		padding: 0.35rem 0.6rem;

		background: var(--gl-surface-2);
		border-radius: var(--gl-radius);
		color: var(--gl-text-soft);
		font-size: 0.84rem;
		text-decoration: none;
	}

	.gl-duser__link span:last-child {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.gl-duser__ico {
		display: grid;
		place-items: center;
		flex-shrink: 0;
		width: 30px;
		height: 30px;
		border-radius: 9px;
		color: #fff;
	}

	.gl-duser__ico svg {
		width: 17px;
		height: 17px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.9;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	/* 每个入口一个颜色，一眼能分辨 */
	.gl-duser__ico.is-blue   { background: #4a7cf7; }
	.gl-duser__ico.is-green  { background: #16a34a; }
	.gl-duser__ico.is-purple { background: #8b5cf6; }
	.gl-duser__ico.is-red    { background: #ef4444; }

	.gl-drawer__user .gl-login-card {
		box-shadow: none;
		border: 0;
		background: transparent;
		padding: 0;
	}

	/* ---- 遮罩 ---- */
	.gl-drawer-mask {
		position: fixed;

		/* 与抽屉同起点：顶栏留在外面不遮暗，否则看不出顶栏还在 */
		top: var(--gl-header-h);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 125;

		background: rgb( 0 0 0 / 45% );
		backdrop-filter: blur( 2px );

		opacity: 0;
		visibility: hidden;
		transition: opacity 0.24s ease, visibility 0.24s ease;
	}

	body.gl-drawer-open .gl-drawer-mask {
		opacity: 1;
		visibility: visible;
	}

	/* 抽屉开着时锁住背景滚动，否则手指一滑抽屉下面的页面跟着动 */
	body.gl-drawer-open {
		overflow: hidden;
	}
}

/* 桌面端：抽屉专属部件全部不出现 */
@media ( min-width: 56.0625rem ) {
	.gl-drawer,
	.gl-drawer-mask {
		display: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.gl-drawer {
		transition: none;
	}

	.gl-drawer-mask {
		transition: none;
	}
}

/* 搜索面板 */
.gl-search-panel {
	/*
	 * ⚠️ 这里**不能写 display: none** —— display 不可过渡，
	 * 面板会硬切出来，就是站方说的「动画不好看」。
	 *
	 * 改成 max-height + opacity + visibility：
	 *   · 关上时 max-height:0 把高度收干净，不占版面
	 *   · visibility 保证关上后读屏软件也读不到
	 * display:block 是**必须写的** —— 页面上的 hidden 属性会命中
	 * 浏览器默认的 `[hidden] { display: none }`，不覆盖掉就还是硬切。
	 */
	display: block;
	overflow: hidden;

	max-height: 0;
	opacity: 0;
	visibility: hidden;

	padding: 0 0 0;
	border-top: 1px solid transparent;

	transition:
		max-height 0.32s cubic-bezier( 0.32, 0.72, 0, 1 ),
		opacity 0.22s ease,
		padding 0.32s cubic-bezier( 0.32, 0.72, 0, 1 ),
		border-color 0.22s ease,
		visibility 0.32s;
}

.gl-search-panel.is-open {
	max-height: 32rem;
	opacity: 1;
	visibility: visible;

	padding: 0.9rem 0 1.1rem;
	border-top-color: var(--gl-border);
}

/* 面板里第一个元素不带上外边距，避免展开时跳一下 */
.gl-search-panel > :first-child {
	margin-top: 0;
}

.gl-search {
	position: relative;
	margin-bottom: 1.5rem;
}

.gl-search-panel .gl-search {
	margin-bottom: 0;
}

.gl-search__field {
	width: 100%;

	/* 胶囊形 + 右侧给按钮留位；内距比原来从容一些 */
	padding: 0.78rem 3.3rem 0.78rem 1.15rem;

	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 999px;
	font-size: 0.94rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gl-search__field:focus {
	outline: none;
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 3px var(--gl-focus-shadow);
}

.gl-search__field::placeholder {
	color: var(--gl-muted);
}

.gl-search__submit {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);

	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;

	/*
	 * 原来是实心方块 —— 34px 一坨主色块压在输入框右端，
	 * 太重，视线先被按钮抓走而不是输入框本身。
	 * 改成圆形 + 浅色底，悬停或输入框聚焦时才变实心。
	 */
	background: var(--gl-accent-soft);
	border: 0;
	border-radius: 50%;
	color: var(--gl-accent-text);
	cursor: pointer;

	transition: background 0.2s ease, color 0.2s ease, transform 0.16s ease;
}

.gl-search__submit:hover,
.gl-search:focus-within .gl-search__submit {
	background: var(--gl-accent);
	color: #fff;
}

/* 按下去缩一下 —— 比单纯变色更有反馈 */
.gl-search__submit:active {
	transform: translateY(-50%) scale(0.92);
}

.gl-search__submit svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

/* =========================================================================
   6. 分类导航
   ========================================================================= */
.gl-cats {
	margin-bottom: 1.75rem;
}

/* ---- 子分类下拉 ---- */
.gl-cats__item {
	position: relative;
}

/* 有子分类的父项加个三角，提示这里能展开 */
.gl-cat__caret {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.3rem;
	border-top: 3.5px solid currentColor;
	border-left: 3px solid transparent;
	border-right: 3px solid transparent;
	opacity: 0.5;
	transition: transform 0.16s ease;
}

.gl-cats__item.has-sub:hover .gl-cat__caret,
.gl-cats__item.has-sub:focus-within .gl-cat__caret {
	transform: rotate( 180deg );
}

.gl-cats__sub {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 30;
	display: block;
	min-width: 9rem;
	margin: 0;
	padding: 0.3rem;
	list-style: none;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	box-shadow: var(--gl-shadow-hover);

	/* 默认藏着。用 visibility 而不是 display:none —— 后者没法过渡，
	   而且会让键盘 Tab 跳不进去。 */
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	/* 过渡那 0.16 秒里元素仍是「可见」的，会挡住下面内容的点击 */
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.gl-cats__item.has-sub:hover > .gl-cats__sub,
.gl-cats__item.has-sub:focus-within > .gl-cats__sub {
	visibility: visible;
	opacity: 1;
	transform: none;

	/* 隐藏态设了 none，这里必须收回 —— 否则展开后点不动 */
	pointer-events: auto;
}

.gl-cats__sub .gl-cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding: 0.42rem 0.7rem;
	border-radius: var(--gl-radius-sm);
	font-size: 0.86rem;
	white-space: nowrap;
}

.gl-cats__sub .gl-cat:hover {
	background: var(--gl-surface-2);
}

.gl-cats__sub .gl-cat.is-active {
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
}

/*
 * 手机端分类导航。
 *
 * 之前的写法是「父级变 flex column、子级 position:static 平铺」，
 * 但外层 .gl-cats__list 还是 flex-wrap —— 各项高度不一，换行之后就乱成
 * 一团：某个父级的子分类会夹在另一个父级和它的子分类中间，看不出层级。
 *
 * 改成：
 *   父级  → 各占一行，当小标题
 *   子级  → 两列网格，整齐排布
 * 这样缩到手机上层级仍然一眼看清。桌面端不变，仍然是悬停下拉。
 */
@media (max-width: 48rem) {
	.gl-cats__list {
		flex-direction: column;
		gap: 0.85rem;
	}

	.gl-cats__item {
		width: 100%;
	}

	.gl-cats__item.has-sub {
		display: block;
	}

	.gl-cats__sub {
		position: static;
		visibility: visible;
		opacity: 1;
		transform: none;
		box-shadow: none;
		border: 0;
		background: none;
		min-width: 0;
		margin-top: 0.55rem;
		padding: 0;

		/* 两列网格 —— 子分类多时不会拉成一长条 */
		display: grid;
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 0.45rem;
	}

	.gl-cats__sub li {
		width: 100%;
		min-width: 0;
	}

	/* 子级做成小方块，跟父级明显区分 */
	.gl-cats__sub .gl-cat {
		width: 100%;
		justify-content: center;
		padding: 0.5rem 0.6rem;
		background: var(--gl-surface);
		border: 1px solid var(--gl-border);
		border-radius: var(--gl-radius-sm);
		font-size: 0.84rem;
	}

	.gl-cats__sub .gl-cat.is-active {
		background: var(--gl-accent-soft);
		border-color: color-mix( in srgb, var(--gl-accent) 45%, var(--gl-border) );
	}

	/* 手机上没有 hover，下拉箭头没有意义 */
	.gl-cat__caret {
		display: none;
	}

	.gl-cats__sub .gl-cat__count {
		margin-left: 0.3rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gl-cat__caret,
	.gl-cats__sub {
		transition: none;
	}
}


.gl-cats__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-cats__list li {
	margin: 0;
}

.gl-cat {
	/* 指示条要相对它定位 */
	position: relative;

	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.42rem 0.9rem 0.5rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	color: var(--gl-text-soft);
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.16s ease;
}

.gl-cat:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
	transform: translateY(-1px);
}

/*
 * 分类的选中态。
 *
 * 之前是「主色实心填充 + 白字」—— 太重，而且跟子比的观感完全不同。
 * 子比的做法是：文字变成焦点色，另加一条**底部居中、圆角、微微发光**
 * 的短横线做指示，不做背景填充。
 *
 * 这里照那个思路重写（自己的实现，没有搬它的样式表）。
 */
.gl-cat.is-active {
	background: var(--gl-surface);
	border-color: color-mix( in srgb, var(--gl-accent) 42%, var(--gl-border) );
	color: var(--gl-accent-text);
}

/* 只给顶层的胶囊项加指示条 —— 子级是两列方块，加条会显得碎 */
.gl-cats__list > li > .gl-cat.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 3px;

	width: 20px;
	height: 2px;
	margin: 0 auto;

	background: var(--gl-accent);
	border-radius: 5px;
	box-shadow: 1px 1px 3px -1px var(--gl-accent);
}

.gl-cat__count {
	font-size: 0.78em;
	opacity: 0.7;
}

/* =========================================================================
   7. 文章列表
   ========================================================================= */
.gl-posts {
	display: grid;
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 网格布局（后台「文章列表样式」选 grid 时启用） */
.gl-posts--grid {
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.1rem;
}

.gl-posts--grid .gl-card {
	flex-direction: column;
}

.gl-posts--grid .gl-card__thumb {
	width: 100%;
}

.gl-posts--grid .gl-card__excerpt {
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.gl-card {
	display: flex;
	gap: 1rem;
	padding: 1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gl-card:hover {
	border-color: color-mix(in srgb, var(--gl-accent) 45%, var(--gl-border));
	box-shadow: var(--gl-shadow-hover);
	transform: translateY(-2px);
}

.gl-card__thumb {
	flex-shrink: 0;
	width: 148px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--gl-radius);
	background: var(--gl-surface-2);
}

.gl-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.gl-card:hover .gl-card__thumb img {
	transform: scale(1.04);
}

.gl-card__ph {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--gl-accent-soft);
	color: var(--gl-accent);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.gl-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.gl-card__title {
	margin: 0 0 0.35rem;
	font-size: 1.04rem;
	font-weight: 600;
	line-height: 1.45;
}

.gl-card__title--normal {
	font-weight: 500;
}

.gl-card__title a {
	color: var(--gl-text);
}

.gl-card__title a:hover {
	color: var(--gl-accent);
}

.gl-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 0.6rem;
	color: var(--gl-muted);
	font-size: 0.88rem;
	line-height: 1.6;
}

.gl-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: auto;
	color: var(--gl-muted);
	font-size: 0.79rem;
}

.gl-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.gl-card__meta svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.75;
}

.gl-badge {
	display: inline-block;
	padding: 0.1rem 0.45rem;
	border-radius: 4px;
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.6;
	vertical-align: middle;
}

@media (max-width: 32rem) {
	.gl-card {
		flex-direction: column;
	}

	.gl-card__thumb {
		width: 100%;
	}
}

/* =========================================================================
   8. 文章 / 页面
   ========================================================================= */
.gl-article {
	padding: clamp(1.1rem, 3vw, 2.2rem);
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
}

.gl-article__title {
	margin: 0 0 0.75rem;
}

.gl-article__subtitle {
	margin: -0.4rem 0 0.9rem;
	color: var(--gl-muted);
	font-size: 0.95rem;
}

.gl-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	padding-bottom: 1.1rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--gl-border);
	color: var(--gl-muted);
	font-size: 0.84rem;
}

.gl-featured {
	margin: 0 0 1.5rem;
	border-radius: var(--gl-radius);
	overflow: hidden;
}

.gl-featured img {
	display: block;
	width: 100%;
}

.gl-prose > *:first-child { margin-top: 0; }
.gl-prose > *:last-child  { margin-bottom: 0; }

.gl-prose img {
	border-radius: var(--gl-radius);
}

.gl-prose h2, .gl-prose h3 {
	scroll-margin-top: calc(var(--gl-header-h) + 1rem);
}

.gl-prose a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.gl-prose .wp-block-button__link {
	text-decoration: none;
}

/* WP 标准对齐类 */
.alignleft  { float: left;  margin: 0.3rem 1.3rem 0.9rem 0; }
.alignright { float: right; margin: 0.3rem 0 0.9rem 1.3rem; }
.aligncenter { display: block; margin-inline: auto; }

.alignwide {
	margin-inline: clamp(-2rem, -3vw, 0rem);
	max-width: 62rem;
}

.alignfull {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.wp-caption, .wp-caption-text, .gallery-caption {
	color: var(--gl-muted);
	font-size: 0.85rem;
}

.sticky .gl-card__title::after {
	content: "置顶";
	margin-left: 0.45rem;
	padding: 0.08rem 0.4rem;
	font-size: 0.68rem;
	font-weight: 600;
	color: #fff;
	background: var(--gl-accent);
	border-radius: 4px;
	vertical-align: middle;
}

/* =========================================================================
   8b. meta 版下载模块（仅当下载信息存在 posts_zibpay 字段里时才输出）
   ========================================================================= */
.gl-download {
	margin: 2rem 0;
	padding: 1.25rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
}

.gl-download__head {
	margin-bottom: 1rem;
}

.gl-download__title {
	margin: 0;
	font-size: 1.05rem;
}

.gl-download__doc {
	margin-bottom: 1rem;
	color: var(--gl-text-soft);
	font-size: 0.92rem;
}

.gl-download__doc > *:last-child {
	margin-bottom: 0;
}

.gl-download__list {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-download__list li {
	margin: 0;
}

.gl-dl-btn {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	padding: 0.75rem 1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	color: var(--gl-text);
	font-size: 0.94rem;
	font-weight: 600;
	transition: all 0.16s ease;
}

.gl-dl-btn:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
	box-shadow: var(--gl-shadow);
}

.gl-dl-btn__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 8px;
}

.gl-dl-btn__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	text-align: left;
}

.gl-dl-btn__more {
	color: var(--gl-muted);
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.4;
}

.gl-dl-btn__arrow {
	margin-left: auto;
	flex-shrink: 0;
	opacity: 0.4;
}

.gl-dl-btn__arrow svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-copy {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px dashed var(--gl-border);
}

.gl-copy__row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.88rem;
}

.gl-copy__key {
	flex-shrink: 0;
	color: var(--gl-muted);
}

.gl-copy__val {
	flex: 1;
	min-width: 0;
	padding: 0.32rem 0.6rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 7px;
	font-family: var(--gl-mono);
	font-size: 0.85rem;
	white-space: nowrap;
	overflow-x: auto;
}

.gl-copy__btn {
	flex-shrink: 0;
	padding: 0.32rem 0.7rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 7px;
	color: var(--gl-text-soft);
	font-size: 0.82rem;
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-copy__btn:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

.gl-copy__btn.is-done {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}

.gl-download__note {
	margin-top: 1rem;
	color: var(--gl-muted);
	font-size: 0.87rem;
}

.gl-download__note > *:last-child {
	margin-bottom: 0;
}

/* 标签 */
.gl-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--gl-border);
}

.gl-tags a {
	padding: 0.25rem 0.65rem;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.8rem;
}

.gl-tags a:hover {
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
}

/* =========================================================================
   9. 归档 / 分页
   ========================================================================= */
.gl-page-head {
	margin-bottom: 1.5rem;
}

.gl-page-head__title {
	margin: 0 0 0.35rem;
}

.gl-page-head__desc {
	color: var(--gl-muted);
	font-size: 0.92rem;
}

.gl-page-head__desc > *:last-child {
	margin-bottom: 0;
}

.gl-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 2rem;
}

.gl-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.35rem;
	height: 2.35rem;
	padding: 0 0.6rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-text-soft);
	font-size: 0.88rem;
}

.gl-pagination .page-numbers:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

.gl-pagination .page-numbers.current {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
	font-weight: 600;
}

.gl-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

.gl-post-nav {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.75rem;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 40rem) {
	.gl-post-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.gl-post-nav__item {
	padding: 0.85rem 1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	font-size: 0.9rem;
	line-height: 1.5;
}

.gl-post-nav__item:hover {
	border-color: var(--gl-accent);
}

.gl-post-nav__label {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--gl-muted);
	font-size: 0.76rem;
}

.gl-post-nav__item--next {
	text-align: right;
}

.gl-empty {
	padding: 3rem 1rem;
	text-align: center;
	color: var(--gl-muted);
}

/* =========================================================================
   10. 侧栏 / 页脚
   ========================================================================= */
.gl-sidebar {
	display: grid;
	gap: 1rem;
	align-content: start;
}

.gl-widget {
	padding: 1.1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	font-size: 0.9rem;
}

.gl-widget__title {
	margin: 0 0 0.75rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gl-muted);
}

.gl-widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-widget li + li {
	margin-top: 0.45rem;
	padding-top: 0.45rem;
	border-top: 1px solid var(--gl-border);
}

.gl-widget a {
	color: var(--gl-text-soft);
}

.gl-widget a:hover {
	color: var(--gl-accent-text);
}

.gl-footer {
	margin-top: 2rem;
	padding-block: 2.25rem;
	border-top: 1px solid var(--gl-border);
	background: var(--gl-footer-bg);
	color: var(--gl-footer-color);
	font-size: 0.87rem;
}

.gl-footer__widgets {
	display: grid;
	gap: var(--gl-gap);
	grid-template-columns: minmax(0, 1fr);
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--gl-border);
}

@media (min-width: 40rem) {
	.gl-footer__widgets {
		grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	}
}

.gl-footer__widgets .gl-widget {
	padding: 0;
	background: none;
	border: 0;
}

.gl-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	align-items: center;
}

.gl-footer__copy {
	margin: 0;
}

/* 页脚简介区：左简介 / 中链接 / 右二维码 */
.gl-footer__intro {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: minmax(0, 1fr);
	padding-bottom: 1.75rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--gl-border);
}

@media (min-width: 48rem) {
	.gl-footer__intro {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
		align-items: start;
	}
}

.gl-footer__about {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
}

.gl-footer__logo {
	flex-shrink: 0;
	max-height: 42px;
	width: auto;
	border-radius: var(--gl-radius-sm);
}

.gl-footer__desc {
	color: var(--gl-footer-color);
	font-size: 0.85rem;
	line-height: 1.75;
}

.gl-footer__desc > *:last-child {
	margin-bottom: 0;
}

/* 链接徽章 */
.gl-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-content: start;
}

.gl-fbadge {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.7rem;
	border-radius: var(--gl-radius-sm);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.6;
	transition: opacity 0.15s ease;
}

a.gl-fbadge:hover {
	opacity: 0.85;
	color: #fff;
}

.gl-fbadge--theme  { background: var(--gl-accent); }
.gl-fbadge--blue   { background: #2b7de1; }
.gl-fbadge--green  { background: #16a34a; }
.gl-fbadge--orange { background: #f59e0b; }
.gl-fbadge--purple { background: #7c3aed; }
.gl-fbadge--red    { background: #e5484d; }
.gl-fbadge--pink   { background: #ec4899; }

/* 二维码 */
.gl-footer__qr {
	display: flex;
	gap: 1rem;
}

.gl-qr {
	margin: 0;
	text-align: center;
}

.gl-qr img {
	display: block;
	width: 84px;
	height: 84px;
	object-fit: contain;
	padding: 4px;
	background: #fff;
	border-radius: var(--gl-radius-sm);
}

.gl-qr figcaption {
	margin-top: 0.4rem;
	color: var(--gl-footer-color);
	font-size: 0.72rem;
	line-height: 1.4;
}

/* 性能信息 */
.gl-footer__stats {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--gl-border);
	color: var(--gl-footer-color);
	font-size: 0.78rem;
	text-align: center;
	opacity: 0.85;
}

/* 移动端可隐藏页脚 */
@media (max-width: 40rem) {
	.gl-footer--hide-mobile {
		display: none;
	}
}

.gl-footer__extra {
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--gl-border);
	font-size: 0.85rem;
	line-height: 1.7;
}

.gl-footer__extra > *:last-child {
	margin-bottom: 0;
}

.gl-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-footer__nav a {
	color: var(--gl-muted);
}

.gl-footer__nav a:hover {
	color: var(--gl-accent-text);
}

/* =========================================================================
   11. 评论区
   ========================================================================= */
.gl-comments {
	margin-top: 1.75rem;
	padding: clamp(1.1rem, 3vw, 1.75rem);
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

.gl-comments__title {
	margin: 0 0 1rem;
	font-size: 1.05rem;
}

/* ---- 评论列表 ---- */
.gl-comments ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-comments ol ol,
.gl-comments .children {
	margin-top: 0.9rem;
	padding-left: 1rem;
	border-left: 2px solid var(--gl-border);
}

.gl-comments li + li {
	margin-top: 0.9rem;
}

.gl-comments .comment-body {
	padding: 0.95rem 1rem;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius);
}

.gl-comments .comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	color: var(--gl-muted);
	font-size: 0.82rem;
}

.gl-comments .comment-author {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.gl-comments .comment-author img {
	border-radius: 50%;
	background: var(--gl-surface);
}

.gl-comments .comment-author .fn {
	color: var(--gl-text);
	font-weight: 600;
	font-style: normal;
}

.gl-comments .comment-author .says {
	display: none;
}

.gl-comments .comment-metadata {
	display: flex;
	gap: 0.6rem;
	align-items: center;
}

.gl-comments .comment-metadata a {
	color: var(--gl-muted);
	font-size: 0.78rem;
}

.gl-comments .comment-metadata a:hover {
	color: var(--gl-accent-text);
}

.gl-comments .comment-content > *:last-child {
	margin-bottom: 0;
}

.gl-comments .reply {
	margin-top: 0.5rem;
}

.gl-comments .reply a {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.78rem;
}

.gl-comments .reply a:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

/* 待审核提示 */
.gl-comments .comment-awaiting-moderation {
	display: block;
	margin-top: 0.4rem;
	color: #d97706;
	font-size: 0.8rem;
}

/* 嵌套评论的层级线 */
.gl-comments .comment-body + .children {
	margin-top: 0.9rem;
}

/* ---- 评论表单 ---- */
.comment-respond {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gl-border);
}

.comment-reply-title {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 650;
}

.comment-reply-title small {
	margin-left: 0.6rem;
	font-size: 0.78rem;
	font-weight: 400;
}

.comment-form {
	display: grid;
	gap: 0.9rem;
}

.comment-form p {
	margin: 0;
}

.comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--gl-text-soft);
	font-size: 0.85rem;
	font-weight: 500;
}

.comment-form .required {
	color: #e5484d;
}

.comment-notes,
.logged-in-as {
	margin: 0;
	color: var(--gl-muted);
	font-size: 0.82rem;
	line-height: 1.7;
}

.comment-notes .required-field-message {
	display: block;
}

/* 输入控件：暗色下必须看得见 */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	display: block;
	width: 100%;
	padding: 0.65rem 0.85rem;
	background: var(--gl-surface-2);
	border: 1px solid color-mix(in srgb, var(--gl-text) 18%, transparent);
	border-radius: var(--gl-radius);
	color: var(--gl-text);
	font-size: 0.92rem;
	line-height: 1.7;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.comment-form input[type="text"]::placeholder,
.comment-form input[type="email"]::placeholder,
.comment-form input[type="url"]::placeholder,
.comment-form textarea::placeholder {
	color: var(--gl-muted-2);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	background: var(--gl-surface);
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 3px var(--gl-accent-soft);
}

.comment-form textarea {
	min-height: 8rem;
	max-height: 24rem;
	resize: vertical;
}

/* 姓名 / 邮箱 / 网站 并排，窄屏堆叠 */
@media (min-width: 40rem) {
	.comment-form {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.comment-form .comment-notes,
	.comment-form .logged-in-as,
	.comment-form .comment-form-comment,
	.comment-form .comment-form-cookies-consent,
	.comment-form .form-submit {
		grid-column: 1 / -1;
	}
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
	color: var(--gl-muted);
	font-size: 0.8rem;
}

.comment-form .comment-form-cookies-consent input {
	margin-top: 0.25rem;
	flex-shrink: 0;
}

.comment-form input[type="submit"],
.gl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.6rem 1.5rem;
	background: var(--gl-accent);
	border: 0;
	border-radius: var(--gl-radius-sm);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.16s ease;
}

.comment-form input[type="submit"]:hover,
.gl-btn:hover {
	opacity: 0.88;
	color: #fff;
}

/* ---- 标题：竖线 + 计数 ---- */
.gl-comments-title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1.1rem;
	font-size: 1.05rem;
}

.gl-comments-title__bar {
	display: inline-block;
	width: 4px;
	height: 1.05em;
	background: var(--gl-accent);
	border-radius: 2px;
}

/* ---- 表单：头像在左，主体在右 ---- */
.gl-comment-form-wrap {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}

.gl-comment-form__avatar {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--gl-surface-2);
}

.gl-comment-form__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-comment-form__ghost {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--gl-muted);
}

.gl-comment-form__ghost svg {
	fill: none;
	stroke: currentColor;
}

.gl-comment-form__main {
	flex: 1;
	min-width: 0;
}

/* 表单内部：单列，textarea 在上 */
.gl-comment-form__main .comment-form {
	display: grid;
	gap: 0.7rem;
}

.gl-comment-form__main .comment-form > p {
	margin: 0;
}

@media (min-width: 40rem) {
	.gl-comment-form__main .comment-form {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.gl-comment-form__main .comment-form .comment-form-comment,
	.gl-comment-form__main .comment-form .comment-notes,
	.gl-comment-form__main .comment-form .logged-in-as,
	.gl-comment-form__main .comment-form .comment-form-cookies-consent,
	.gl-comment-form__main .comment-form .form-submit {
		grid-column: 1 / -1;
	}
}

/* 提交行：左边工具栏 + 面板，右边提交按钮 */
.gl-comment-form__main .form-submit {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.gl-cmt-actions {
	flex: 1 1 auto;
	min-width: 0;
}

.gl-cmt-submit {
	flex: 0 0 auto;
	margin-left: auto;
}

/* 工具栏按钮一行排开，不折行 */
.gl-cmt-actions .gl-cmt-tools {
	flex-wrap: wrap;
	margin-top: 0;
}

/* ---- 排序条 ---- */
.gl-comments-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	padding-bottom: 0.7rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--gl-border);
}

.gl-comments-bar__tabs {
	display: flex;
	gap: 1.1rem;
}

.gl-comments-bar__tab {
	position: relative;
	color: var(--gl-muted);
	font-size: 0.9rem;
	font-weight: 500;
}

.gl-comments-bar__tab:hover {
	color: var(--gl-text);
}

.gl-comments-bar__tab.is-active {
	color: var(--gl-accent-text);
}

.gl-comments-bar__tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.72rem;
	height: 2px;
	background: var(--gl-accent);
}

.gl-comments-bar__author {
	padding: 0.22rem 0.7rem;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.8rem;
}

.gl-comments-bar__author:hover {
	color: var(--gl-text-soft);
}

.gl-comments-bar__author.is-active {
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
}

/* ---- 评论列表（新结构） ---- */
.gl-comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-comment-list ol,
.gl-comment-list .children {
	margin: 0.9rem 0 0;
	padding: 0 0 0 1.1rem;
	list-style: none;
	border-left: 2px solid var(--gl-border);
}

.gl-comment-list li + li {
	margin-top: 0.2rem;
}

.gl-comment {
	margin: 0;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--gl-border-2);
}

.gl-comment-list > li:last-child > .gl-comment__inner {
	border-bottom: 0;
}

.gl-comment__inner {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.gl-comment__avatar {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--gl-surface-2);
}

.gl-comment__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-comment__body {
	flex: 1;
	min-width: 0;
}

.gl-comment__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.55rem;
	margin-bottom: 0.3rem;
}

.gl-comment__author {
	color: var(--gl-text);
	font-size: 0.92rem;
	font-weight: 600;
}

.gl-comment__author a {
	color: inherit;
}

.gl-comment__time {
	color: var(--gl-muted-2);
	font-size: 0.78rem;
}

.gl-comment__content {
	color: var(--gl-text-soft);
	font-size: 0.92rem;
	line-height: 1.75;
}

.gl-comment__content > *:last-child {
	margin-bottom: 0;
}

.gl-comment__pending {
	display: block;
	margin-bottom: 0.35rem;
	color: #d97706;
	font-size: 0.8rem;
	font-style: normal;
}

.gl-comment__actions {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: 0.45rem;
	font-size: 0.8rem;
}

/* 徽章推到最右，跟回复/编辑同一行 */
.gl-comment__actions .gl-id-badge {
	margin-left: auto;
}

.gl-comment__actions a {
	color: var(--gl-muted);
}

.gl-comment__actions a:hover {
	color: var(--gl-accent-text);
}

.gl-comments-empty,
.gl-comments-closed {
	margin: 0;
	padding: 1.5rem 1rem;
	color: var(--gl-muted);
	font-size: 0.9rem;
	text-align: center;
}

.gl-comment-pagination {
	margin-top: 1.25rem;
}

/* ---- 未登录提示（对齐子比的「请登录后发表评论」） ---- */
.gl-login-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 1.5rem 1rem;
	margin-top: 1.5rem;
	background: var(--gl-surface-2);
	border: 1px dashed var(--gl-border);
	border-radius: var(--gl-radius);
	text-align: center;
}

.gl-login-notice__text {
	margin: 0;
	color: var(--gl-muted);
	font-size: 0.9rem;
}

.gl-login-notice__btns {
	display: flex;
	gap: 0.5rem;
}

.gl-login-notice .gl-btn {
	font-size: 0.85rem;
	padding: 0.45em 1.2em;
}

/* =========================================================================
   12. 404 / 工具类
   ========================================================================= */
.gl-404 {
	padding: 4rem 1rem;
	text-align: center;
}

.gl-404__code {
	margin: 0;
	font-size: clamp(3.5rem, 12vw, 6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--gl-accent);
}

.bypostauthor {
	/* WordPress 主题审核要求此类存在 */
}

/* 内联 SVG 图标统一描边 */
.gl-icon,
.gl-badge svg {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.12em;
}

/* =========================================================================
   13. 打印
   ========================================================================= */
@media print {
	.gl-header,
	.gl-sidebar,
	.gl-footer,
	.gl-post-nav,
	.gl-comments {
		display: none !important;
	}

	body {
		background: #fff;
	}

	.gl-article {
		border: 0;
		padding: 0;
	}
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* =========================================================================
   16. 顶栏功能按钮（用户 / 夜间 / 语言）
   ========================================================================= */
.gl-user-btn__avatar {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	/* Gravatar 在国内常被墙，加载失败时给个底色而不是碎图 */
	background: var(--gl-surface-2);
	color: transparent;
	overflow: hidden;
}

/* 夜间切换：按当前主题显示对应图标 */
.gl-dark-toggle__sun,
.gl-dark-toggle__moon {
	display: none;
	line-height: 0;
}

:root[data-theme='dark'] .gl-dark-toggle__sun { display: block; }
:root[data-theme='dark'] .gl-dark-toggle__moon { display: none; }
:root:not([data-theme='dark']) .gl-dark-toggle__sun { display: none; }
:root:not([data-theme='dark']) .gl-dark-toggle__moon { display: block; }

/* 系统暗色但未手动设置时，显示太阳（点了会切回日间） */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) .gl-dark-toggle__sun { display: block; }
	:root:not([data-theme='light']) .gl-dark-toggle__moon { display: none; }
}

/* 语言切换 */
.gl-lang { position: relative; }

.gl-lang__list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 30;
	display: none;
	min-width: 8rem;
	margin: 0;
	padding: 0.3rem;
	list-style: none;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	box-shadow: var(--gl-shadow-hover);
}

.gl-lang.is-open .gl-lang__list { display: block; }

.gl-lang__list li { margin: 0; }

.gl-lang__list a {
	display: block;
	padding: 0.4rem 0.6rem;
	border-radius: var(--gl-radius-sm);
	color: var(--gl-text-soft);
	font-size: 0.88rem;
	white-space: nowrap;
}

.gl-lang__list a:hover,
.gl-lang__list .current-lang a {
	background: var(--gl-surface-2);
	color: var(--gl-accent-text);
}

.gl-lang__empty {
	padding: 0.4rem 0.6rem;
	color: var(--gl-muted);
	font-size: 0.82rem;
}

/* =========================================================================
   17. 登录卡片
   ========================================================================= */
.gl-login-card {
	overflow: hidden;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	text-align: center;
}

.gl-login-card__banner {
	aspect-ratio: 3 / 1.4;
	overflow: hidden;
	background: var(--gl-accent-soft);
}

.gl-login-card__banner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-login-card__avatar {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: -32px auto 0;
	overflow: hidden;
	background: var(--gl-surface);
	border: 3px solid var(--gl-surface);
	border-radius: 50%;
	box-shadow: var(--gl-shadow);
}

.gl-login-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-login-card__ghost {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--gl-surface-2);
	color: var(--gl-muted);
}

.gl-login-card__ghost svg {
	stroke: currentColor;
	fill: none;
}

.gl-login-card:not(:has(.gl-login-card__banner)) .gl-login-card__avatar {
	margin-top: 1.25rem;
}

.gl-login-card__hello {
	margin: 0.85rem 0 0.25rem;
	padding: 0 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gl-text);
}

.gl-login-card__sub {
	margin: 0 0 1rem;
	padding: 0 1.1rem;
	color: var(--gl-muted);
	font-size: 0.8rem;
	line-height: 1.6;
}

.gl-login-card__actions {
	display: flex;
	gap: 0.5rem;
	padding: 0 1rem 1.15rem;
}

.gl-login-card__actions .gl-btn {
	flex: 1;
	font-size: 0.85rem;
	padding: 0.5em 0.8em;
	border-radius: var(--gl-radius-sm);
}

.gl-btn--outline {
	background: transparent;
	border: 1px solid var(--gl-border);
	color: var(--gl-text-soft);
}

.gl-btn--outline:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
	opacity: 1;
}

.gl-btn--ghost {
	background: var(--gl-surface-2);
	color: var(--gl-text-soft);
}

.gl-btn--ghost:hover {
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
	opacity: 1;
}

/* =========================================================================
   18. 预选头像选择器
   ========================================================================= */
.gl-avatar-fab {
	position: fixed;
	right: 20px;
	bottom: 88px;
	z-index: 90;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 50%;
	color: var(--gl-text-soft);
	box-shadow: var(--gl-shadow-hover);
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-avatar-fab:hover {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}

.gl-avatar-fab svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* 弹窗 */
.gl-avatar-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.gl-avatar-modal[hidden] { display: none; }

.gl-avatar-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 45%);
	backdrop-filter: blur(2px);
}

.gl-avatar-modal__panel {
	position: relative;
	width: min(100%, 30rem);
	max-height: 80vh;
	overflow-y: auto;
	padding: 1.25rem;
	background: var(--gl-surface);
	border-radius: var(--gl-radius-lg);
	box-shadow: var(--gl-shadow-hover);
}

.gl-avatar-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.gl-avatar-modal__title {
	margin: 0;
	font-size: 1.05rem;
}

.gl-avatar-modal__x {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--gl-muted);
	cursor: pointer;
}

.gl-avatar-modal__x:hover { background: var(--gl-surface-2); color: var(--gl-text); }
.gl-avatar-modal__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.gl-avatar-modal__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
	gap: 0.7rem;
}

.gl-avatar-opt {
	padding: 0;
	background: var(--gl-surface-2);
	border: 2px solid transparent;
	border-radius: 50%;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 1;
	transition: all 0.16s ease;
}

.gl-avatar-opt img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-avatar-opt:hover { border-color: var(--gl-accent); transform: scale(1.05); }
.gl-avatar-opt.is-current { border-color: var(--gl-accent); box-shadow: 0 0 0 3px var(--gl-accent-soft); }

.gl-avatar-modal__note {
	margin: 1rem 0 0;
	min-height: 1.4em;
	color: var(--gl-muted);
	font-size: 0.84rem;
	text-align: center;
}

.gl-avatar-modal__note.is-ok { color: var(--gl-accent-text); }
.gl-avatar-modal__note.is-err { color: #e5484d; }

@media print {
	.gl-avatar-fab, .gl-avatar-modal { display: none !important; }
}

/* 图片加载失败：隐藏碎图，由父元素底色顶上 */
img.gl-img-failed {
	visibility: hidden;
	background: var(--gl-surface-2);
}

/* =========================================================================
   19. 面包屑
   ========================================================================= */
.gl-crumb {
	margin-bottom: 1.1rem;
	font-size: 0.84rem;
}

.gl-crumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-crumb li {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	color: var(--gl-muted);
}

.gl-crumb li + li::before {
	content: "/";
	color: var(--gl-muted-3);
	margin-right: 0.15rem;
}

.gl-crumb a {
	color: var(--gl-muted);
}

.gl-crumb a:hover {
	color: var(--gl-accent-text);
}

.gl-crumb [aria-current="page"] {
	color: var(--gl-text-soft);
	font-weight: 500;
}

/* =========================================================================
   20. 文章统计（评论 / 阅读）
   ========================================================================= */
.gl-post-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px dashed var(--gl-border);
	font-size: 0.82rem;
	color: var(--gl-muted);
}

.gl-post-stats__item {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.gl-post-stats__item svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.75;
}

.gl-post-stats__item b {
	color: var(--gl-text-soft);
	font-weight: 600;
}

/* =========================================================================
   21. 作者信息框（文章内）
   ========================================================================= */
.gl-author-box {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	margin-top: 1.75rem;
	padding: 1.15rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

.gl-author-box__avatar {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--gl-surface);
}

.gl-author-box__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-author-box__ghost {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--gl-muted);
}

.gl-author-box__ghost svg {
	fill: none;
	stroke: currentColor;
}

.gl-author-box__body {
	min-width: 0;
}

.gl-author-box__name {
	margin: 0 0 0.3rem;
	font-size: 0.98rem;
}

.gl-author-box__name a {
	color: var(--gl-text);
}

.gl-author-box__bio {
	margin: 0 0 0.4rem;
	color: var(--gl-muted);
	font-size: 0.85rem;
	line-height: 1.7;
}

.gl-author-box__meta {
	margin: 0;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
}

/* =========================================================================
   22. 作者卡片小工具
   ========================================================================= */
.gl-author-card__top {
	text-align: center;
}

.gl-author-card__avatar {
	display: block;
	width: 72px;
	height: 72px;
	margin: 0 auto 0.7rem;
	border-radius: 50%;
	object-fit: cover;
	background: var(--gl-surface-2);
}

.gl-author-card__name {
	margin: 0 0 0.3rem;
	font-size: 1rem;
}

.gl-author-card__name a {
	color: var(--gl-text);
}

.gl-author-card__desc {
	margin: 0 0 0.5rem;
	color: var(--gl-muted);
	font-size: 0.82rem;
	line-height: 1.65;
}

.gl-author-card__count {
	margin: 0 0 0.85rem;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
}

.gl-author-card__btn {
	display: block;
	width: 100%;
	font-size: 0.86rem;
	padding: 0.45em 1em;
	border-radius: var(--gl-radius-sm);
}

.gl-author-card__posts {
	margin: 1rem 0 0;
	padding: 0.9rem 0 0;
	list-style: none;
	border-top: 1px solid var(--gl-border);
}

.gl-author-card__posts li {
	margin: 0;
	padding: 0.32rem 0;
	font-size: 0.85rem;
}

.gl-author-card__posts li + li {
	border-top: 1px solid var(--gl-border-2);
}

.gl-author-card__posts a {
	color: var(--gl-text-soft);
}

.gl-author-card__posts a:hover {
	color: var(--gl-accent-text);
}

/* =========================================================================
   23. 标签页文章小工具
   ========================================================================= */
.gl-tabs__nav {
	display: flex;
	gap: 0.15rem;
	margin-bottom: 0.85rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--gl-border);
}

.gl-tabs__btn {
	flex: 1;
	padding: 0.35rem 0.4rem;
	background: transparent;
	border: 0;
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-tabs__btn:hover {
	color: var(--gl-text);
	background: var(--gl-surface-2);
}

.gl-tabs__btn.is-active {
	color: var(--gl-accent-text);
	font-weight: 600;
	background: var(--gl-accent-soft);
}

.gl-tabs__panel {
	display: none;
}

.gl-tabs__panel.is-active {
	display: block;
}

.gl-tabs__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-tabs__item {
	margin: 0;
	padding: 0.5rem 0;
}

.gl-tabs__item + .gl-tabs__item {
	border-top: 1px solid var(--gl-border-2);
}

.gl-tabs__item a {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	color: var(--gl-text-soft);
}

.gl-tabs__thumb {
	flex-shrink: 0;
	width: 58px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--gl-radius-sm);
	background: var(--gl-surface-2);
}

.gl-tabs__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-tabs__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gl-tabs__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.86rem;
	line-height: 1.5;
}

.gl-tabs__meta {
	margin-top: 0.25rem;
	color: var(--gl-muted-2);
	font-size: 0.74rem;
}

.gl-tabs__item a:hover .gl-tabs__title {
	color: var(--gl-accent-text);
}

@media print {
	.gl-crumb, .gl-author-box, .gl-post-stats { display: none !important; }
}

/* =========================================================================
   24. 用户资料头部（作者页）
   ========================================================================= */
.gl-profile {
	margin-bottom: 1.75rem;
	overflow: hidden;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

.gl-profile__cover {
	aspect-ratio: 5 / 1.6;
	background: linear-gradient(135deg, var(--gl-accent-soft), var(--gl-surface-2));
}

.gl-profile__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-profile__body {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-start;
	padding: 0 1.25rem 1.25rem;
}

.gl-profile__avatar {
	flex-shrink: 0;
	width: 84px;
	height: 84px;
	margin-top: -42px;
	overflow: hidden;
	background: var(--gl-surface);
	border: 3px solid var(--gl-surface);
	border-radius: 50%;
	box-shadow: var(--gl-shadow);
}

.gl-profile__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-profile__ghost {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--gl-surface-2);
	color: var(--gl-muted);
}

.gl-profile__ghost svg {
	fill: none;
	stroke: currentColor;
}

.gl-profile:not(.has-cover) .gl-profile__avatar {
	margin-top: 1.25rem;
}

.gl-profile__info {
	flex: 1 1 14rem;
	min-width: 0;
	padding-top: 0.9rem;
}

.gl-profile:not(.has-cover) .gl-profile__info {
	padding-top: 1.25rem;
}

.gl-profile__name {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
}

.gl-profile__bio {
	margin: 0.5rem 0 0;
	color: var(--gl-muted);
	font-size: 0.85rem;
	line-height: 1.7;
}

.gl-profile__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.5rem;
	padding-top: 1.25rem;
	margin-left: auto;
}

.gl-profile__count {
	margin: 0;
	color: var(--gl-muted);
	font-size: 0.82rem;
}

.gl-profile__btn {
	font-size: 0.85rem;
	padding: 0.45em 1.2em;
	border-radius: var(--gl-radius-sm);
}

/* 用户元信息行（UID / 加入天数 / 角色） */
.gl-user-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.9rem;
	margin: 0.35rem 0 0;
	color: var(--gl-muted);
	font-size: 0.8rem;
}

.gl-user-meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

/* =========================================================================
   25. 封面选择器
   ========================================================================= */
.gl-cover-fab {
	bottom: 144px;
}

.gl-cover-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
	gap: 0.6rem;
}

.gl-cover-opt {
	padding: 0;
	overflow: hidden;
	aspect-ratio: 5 / 1.8;
	background: var(--gl-surface-2);
	border: 2px solid transparent;
	border-radius: var(--gl-radius-sm);
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-cover-opt img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-cover-opt:hover {
	border-color: var(--gl-accent);
	transform: scale(1.02);
}

@media (max-width: 40rem) {
	.gl-profile__actions {
		align-items: flex-start;
		margin-left: 0;
	}
}

@media print {
	.gl-profile__cover, .gl-cover-fab { display: none !important; }
}

/* =========================================================================
   26. 用户 ID 徽章
   ========================================================================= */
.gl-id-badge {
	display: inline-flex;
	align-items: center;
	margin-top: 0.5rem;
	padding: 0.1rem 0.5rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-family: var(--gl-mono);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.6;
	white-space: nowrap;
}

/*
 * 有背景图时：图的左侧是留白（放数字），右侧是角色插画。
 * 438×132 的原图按高度 22px 显示 → 约 73px 宽，右侧留 46% 给插画。
 */
/*
 * 有背景图时：整块固定尺寸，数字落在左侧留白区。
 *
 * 尺寸必须用固定像素 —— 原图 438×132（约 3.32:1），
 * 按高 22px 显示，宽就是 73px。
 * 早先用百分比 padding，而百分比的参照物是【父容器宽度】，
 * 结果徽章被撑到几百像素宽，数字和插画就分离了。
 */
.gl-id-badge.has-bg {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	width: 74px;
	height: 22px;
	/* 右内距给插画留位置，左内距贴边放数字 */
	padding: 0 24px 0 6px;
	margin-top: 0;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 100%;
	border: 0;
	border-radius: 4px;
	color: #fff;
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	line-height: 1;
	text-shadow: 0 1px 2px rgb(0 0 0 / 45%);
	overflow: hidden;
	vertical-align: middle;
}

/* 窄屏：数字缩一点，避免溢出 */
@media (max-width: 30rem) {
	.gl-id-badge.has-bg {
		width: 68px;
		padding: 0 22px 0 5px;
		font-size: 0.64rem;
	}
}

/* 资料头部：跟在元信息后面 */
.gl-profile .gl-id-badge {
	margin-top: 0.4rem;
	color: var(--gl-accent-text);
	border-color: var(--gl-accent-soft);
	background: var(--gl-accent-soft);
}

@media print {
	.gl-id-badge { display: none !important; }
}

/* =========================================================================
   27. 侧栏：编号文章列表
   ========================================================================= */
.gl-rank-list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: gl-rank;
}

.gl-rank-list__item {
	margin: 0;
	padding: 0.5rem 0;
}

.gl-rank-list__item + .gl-rank-list__item {
	border-top: 1px solid var(--gl-border-2);
}

.gl-rank-list__item a {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	color: var(--gl-text-soft);
}

/* 序号：前三名用强调色，其余弱化 */
.gl-rank-list__num {
	flex-shrink: 0;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	background: var(--gl-surface-2);
	border-radius: 4px;
	color: var(--gl-muted-2);
	font-family: var(--gl-mono);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}

.gl-rank-list__item:nth-child(1) .gl-rank-list__num {
	background: #ef4444;
	color: #fff;
}

.gl-rank-list__item:nth-child(2) .gl-rank-list__num {
	background: #f59e0b;
	color: #fff;
}

.gl-rank-list__item:nth-child(3) .gl-rank-list__num {
	background: #eab308;
	color: #fff;
}

.gl-rank-list__thumb {
	flex-shrink: 0;
	width: 56px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--gl-radius-sm);
	background: var(--gl-surface-2);
}

.gl-rank-list__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-rank-list__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gl-rank-list__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.86rem;
	line-height: 1.5;
}

.gl-rank-list__meta {
	margin-top: 0.25rem;
	color: var(--gl-muted-2);
	font-size: 0.74rem;
}

.gl-rank-list__item a:hover .gl-rank-list__title {
	color: var(--gl-accent-text);
}

/* =========================================================================
   28. 侧栏：公告 / 引言块
   ========================================================================= */
.gl-notice-block {
	padding: 1rem 1.1rem;
	background: var(--gl-accent-soft);
	border-left: 3px solid var(--gl-accent);
	border-radius: var(--gl-radius);
	color: var(--gl-text-soft);
	font-size: 0.88rem;
	line-height: 1.75;
}

.gl-notice-block > *:last-child {
	margin-bottom: 0;
}

.gl-notice-block > *:first-child {
	margin-top: 0;
}

/* 侧栏里的标签页小工具，去掉重复内边距 */
.gl-tabs.gl-widget {
	padding: 1.15rem 1.25rem;
}

.gl-widget__empty {
	margin: 0;
	color: var(--gl-muted);
	font-size: 0.85rem;
}

@media print {
	.gl-sidebar { display: none !important; }
}

/* =========================================================================
   29. 评论工具栏（表情 / 代码 / 快捷回复）
   ========================================================================= */
.gl-cmt-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.55rem;
}

.gl-cmt-tools__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.3rem 0.7rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.82rem;
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-cmt-tools__btn svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-cmt-tools__btn:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

.gl-cmt-tools__btn.is-open {
	background: var(--gl-accent-soft);
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

/* 窄屏：提交按钮换行到工具栏下方并靠右 */
@media (max-width: 30rem) {
	.gl-comment-form__main .form-submit {
		flex-direction: column;
		align-items: stretch;
	}

	.gl-cmt-submit {
		display: flex;
		justify-content: flex-end;
		margin-left: 0;
	}
}

/* ---- 弹出面板 ---- */
.gl-cmt-panel {
	margin-top: 0.55rem;
	padding: 0.85rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius);
	box-shadow: var(--gl-shadow);
	max-height: 15rem;
	overflow-y: auto;
}

.gl-cmt-panel__group + .gl-cmt-panel__group {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--gl-border-2);
}

.gl-cmt-panel__label {
	margin-bottom: 0.4rem;
	color: var(--gl-muted-2);
	font-size: 0.74rem;
	font-weight: 600;
}

.gl-cmt-panel__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(2.1rem, 1fr));
	gap: 0.15rem;
}

.gl-cmt-panel__grid--list {
	grid-template-columns: 1fr;
	gap: 0.3rem;
}

.gl-emoji {
	padding: 0.25rem 0;
	background: transparent;
	border: 0;
	border-radius: var(--gl-radius-sm);
	font-size: 1.2rem;
	line-height: 1.4;
	cursor: pointer;
	transition: background 0.14s ease, transform 0.14s ease;
}

.gl-emoji:hover {
	background: var(--gl-surface-2);
	transform: scale(1.15);
}

.gl-quick {
	padding: 0.4rem 0.6rem;
	background: var(--gl-surface-2);
	border: 1px solid transparent;
	border-radius: var(--gl-radius-sm);
	color: var(--gl-text-soft);
	font-size: 0.83rem;
	text-align: left;
	cursor: pointer;
	transition: all 0.14s ease;
}

.gl-quick:hover {
	background: var(--gl-accent-soft);
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

/* 评论里的代码 */
.gl-comment__content code {
	padding: 0.1em 0.4em;
	background: var(--gl-surface-2);
	border-radius: 3px;
	font-family: var(--gl-mono);
	font-size: 0.88em;
}

.gl-comment__content pre {
	padding: 0.75rem 0.9rem;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius-sm);
	overflow-x: auto;
}

.gl-comment__content pre code {
	padding: 0;
	background: none;
}

@media print {
	.gl-cmt-tools, .gl-cmt-panel { display: none !important; }
}

/* =========================================================================
   30. 相关推荐 / 那年今日
   ========================================================================= */
.gl-related {
	margin-top: 1.75rem;
	padding: 1.15rem 1.25rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

.gl-related__title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1rem;
	font-size: 1rem;
}

.gl-related__bar {
	display: inline-block;
	width: 4px;
	height: 1.05em;
	background: var(--gl-accent);
	border-radius: 2px;
}

/*
 * 列数按【容器宽度】判断，不看视口。
 *
 * 有侧栏时视口 1280px、内容区可能只有 800px ——
 * 按视口判断会偏乐观，导致两列挤在一起。
 * 容器查询看的是实际可用宽度，所以更准。
 */
.gl-related {
	container-type: inline-size;
}

.gl-related__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.15rem 1.25rem;
}

/* 容器够宽（≥32rem ≈512px）→ 两列 */
@container (min-width: 32rem) {
	.gl-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* 兜底：不支持容器查询的浏览器退回按视口判断 */
@supports not (container-type: inline-size) {
	@media (min-width: 40rem) {
		.gl-related__grid {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
	}
}

.gl-related__item {
	display: flex;
	gap: 0.7rem;
	align-items: center;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--gl-border-2);
	color: var(--gl-text-soft);
}

.gl-related__thumb {
	flex-shrink: 0;
	width: 64px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--gl-radius-sm);
	background: var(--gl-surface-2);
}

.gl-related__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-related__noimg {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--gl-muted-2);
}

.gl-related__noimg svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.gl-related__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.gl-related__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.88rem;
	font-weight: 500;
	line-height: 1.5;
}

.gl-related__item:hover .gl-related__name {
	color: var(--gl-accent-text);
}

.gl-related__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem;
	margin-top: 0.35rem;
	color: var(--gl-muted-2);
	font-size: 0.75rem;
}

.gl-related__time,
.gl-related__views {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.gl-related__time svg,
.gl-related__views svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.8;
}

/* 那年今日：日期角标 */
.gl-thisday__hint {
	margin-left: auto;
	color: var(--gl-muted-2);
	font-size: 0.8rem;
	font-weight: 400;
}

.gl-thisday__item {
	display: flex;
	gap: 0.75rem;
	align-items: baseline;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--gl-border-2);
	color: var(--gl-text-soft);
}

.gl-thisday__year {
	flex-shrink: 0;
	padding: 0.1rem 0.45rem;
	background: var(--gl-accent-soft);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-accent-text);
	font-size: 0.72rem;
	font-weight: 600;
	white-space: nowrap;
}

.gl-thisday__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.gl-thisday__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.88rem;
	line-height: 1.5;
}

.gl-thisday__date {
	margin-top: 0.2rem;
	color: var(--gl-muted-2);
	font-size: 0.74rem;
}

.gl-thisday__item:hover .gl-thisday__title {
	color: var(--gl-accent-text);
}

@media print {
	.gl-related__bar { background: #999; }
}

/* =========================================================================
   31. 文章顶部信息（Hero）
   ========================================================================= */
.gl-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--hero-h, 50vh);
	padding: 3rem 0 4.5rem;
	background: var(--hero-bg, var(--gl-accent));
	color: var(--hero-text, #fff);
	overflow: hidden;
	isolation: isolate;
}

/* 背景图层：有图才铺，叠一层遮罩保证文字可读 */
.gl-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--hero-img, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.gl-hero.has-img .gl-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--hero-bg, #000);
	opacity: var(--hero-overlay, 0.35);
}

/* 内容容器：宽度对齐页面内容 */
.gl-hero__inner {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.gl-hero--center .gl-hero__inner { align-items: center; text-align: center; }
.gl-hero--left   .gl-hero__inner { align-items: flex-start; text-align: left; }
.gl-hero--right  .gl-hero__inner { align-items: flex-end; text-align: right; }

/* 面包屑：Hero 里要浅色 */
.gl-hero__crumb {
	width: 100%;
}

.gl-hero__crumb .gl-crumb {
	margin-bottom: 0;
}

.gl-hero__crumb .gl-crumb li,
.gl-hero__crumb .gl-crumb a {
	color: var(--hero-text, #fff);
	opacity: 0.82;
}

.gl-hero__crumb .gl-crumb a:hover {
	opacity: 1;
}

.gl-hero__crumb .gl-crumb li + li::before {
	color: var(--hero-text, #fff);
	opacity: 0.5;
}

.gl-hero__crumb .gl-crumb [aria-current="page"] {
	color: var(--hero-text, #fff);
	opacity: 1;
}

/* 分类 / 属性 / 标签 胶囊 */
.gl-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.gl-hero--center .gl-hero__badges { justify-content: center; }
.gl-hero--left   .gl-hero__badges { justify-content: flex-start; }
.gl-hero--right  .gl-hero__badges { justify-content: flex-end; }

.gl-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.28rem 0.85rem;
	border-radius: var(--hero-radius, 20px);
	font-size: 0.82rem;
	line-height: 1.5;
	white-space: nowrap;
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.gl-hero__badge svg {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* 分类：实底 */
.gl-hero__badge--cat {
	background: rgb(255 255 255 / 22%);
	color: var(--hero-text, #fff);
	font-weight: 600;
}

.gl-hero__badge--cat:hover {
	background: rgb(255 255 255 / 34%);
	color: var(--hero-text, #fff);
	transform: translateY(-1px);
}

/* 属性：描边，跟分类区分开 */
.gl-hero__badge--attr {
	background: transparent;
	border: 1px solid rgb(255 255 255 / 45%);
	color: var(--hero-text, #fff);
}

/* 标签：纯文字加 # */
.gl-hero__badge--tag {
	background: transparent;
	color: var(--hero-text, #fff);
	opacity: 0.78;
	padding-left: 0.25rem;
	padding-right: 0.25rem;
}

.gl-hero__badge--tag:hover {
	opacity: 1;
	color: var(--hero-text, #fff);
}

/* 标题 */
.gl-hero__title {
	max-width: 60rem;
	margin: 0;
	color: var(--hero-title, #fff);
	font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.gl-hero__title a {
	color: inherit;
}

/* 元信息行 */
.gl-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.4rem;
	align-items: center;
	color: var(--hero-text, #fff);
	font-size: 0.85rem;
	opacity: 0.9;
}

.gl-hero--center .gl-hero__meta { justify-content: center; }
.gl-hero--left   .gl-hero__meta { justify-content: flex-start; }
.gl-hero--right  .gl-hero__meta { justify-content: flex-end; }

.gl-hero__mi {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: inherit;
	white-space: nowrap;
}

.gl-hero__mi svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.85;
}

a.gl-hero__mi:hover {
	opacity: 1;
	text-decoration: underline;
}

/* 底部波浪：填页面背景色，切出弧线 */
.gl-hero__wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	width: 100%;
	height: clamp(40px, 7vw, 90px);
	display: block;
	fill: var(--gl-bg);
	pointer-events: none;
}

/* 文章卡片紧贴 Hero 时收一点上边距 */
.gl-hero + .gl-wrap {
	margin-top: -1.5rem;
}

@media (max-width: 40rem) {
	.gl-hero {
		padding: 2rem 0 3.5rem;
	}

	.gl-hero__title {
		font-size: 1.35rem;
	}

	.gl-hero__meta {
		font-size: 0.8rem;
		gap: 0.4rem 1rem;
	}
}

@media print {
	.gl-hero {
		min-height: 0;
		padding: 1rem 0;
		background: none;
		color: #000;
	}

	.gl-hero__wave,
	.gl-hero__bg { display: none; }

	.gl-hero__title,
	.gl-hero__meta,
	.gl-hero__badge { color: #000; }
}

/* =========================================================================
   32. 外链跳转中间页
   ========================================================================= */
.gl-golink-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding-top: 3rem;
	padding-bottom: 3rem;
}

.gl-golink {
	width: 100%;
	max-width: 34rem;
	padding: 2rem 1.75rem;
	margin: 0 auto;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	box-shadow: var(--gl-shadow);
	text-align: center;
}

.gl-golink__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	border-radius: 50%;
}

.gl-golink__icon svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-golink__icon--out {
	background: var(--gl-accent-soft);
	color: var(--gl-accent-text);
}

.gl-golink__icon--err {
	background: rgb(229 72 77 / 12%);
	color: #e5484d;
}

.gl-golink__title {
	margin: 0 0 0.6rem;
	font-size: 1.15rem;
}

.gl-golink__notice {
	margin: 0 0 1.1rem;
	color: var(--gl-muted);
	font-size: 0.88rem;
	line-height: 1.75;
}

/* 目标地址：域名醒目，完整地址弱化并可换行 */
.gl-golink__target {
	padding: 0.85rem 1rem;
	margin-bottom: 1.25rem;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius);
	text-align: left;
}

.gl-golink__host {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--gl-text);
	font-size: 0.95rem;
	font-weight: 650;
	word-break: break-all;
}

.gl-golink__url {
	display: block;
	color: var(--gl-muted-2);
	font-family: var(--gl-mono);
	font-size: 0.76rem;
	line-height: 1.6;
	word-break: break-all;
}

.gl-golink__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
}

.gl-golink__actions .gl-btn {
	min-width: 8rem;
}

.gl-golink__tip {
	margin: 0.9rem 0 0;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
}

@media print {
	.gl-golink__actions { display: none; }
}

/* =========================================================================
   33. 外链跳转：加载中样式
   ========================================================================= */
.gl-golink--loading {
	padding: 2.5rem 1.75rem;
}

.gl-golink__loading-text {
	margin: 0 0 0.35rem;
	color: var(--gl-text);
	font-size: 0.95rem;
}

.gl-golink__loading-host {
	margin: 0;
	color: var(--gl-muted-2);
	font-family: var(--gl-mono);
	font-size: 0.78rem;
	word-break: break-all;
}

/* 四点脉动加载指示器 */
.gl-golink__spinner {
	display: flex;
	gap: 0.4rem;
	align-items: flex-end;
	justify-content: center;
	height: 2rem;
	margin-bottom: 1.25rem;
}

.gl-golink__spinner span {
	display: block;
	width: 0.6rem;
	height: 0.6rem;
	background: var(--gl-accent);
	border-radius: 50%;
	animation: gl-dot-pulse 1.15s ease-in-out infinite;
}

.gl-golink__spinner span:nth-child( 2 ) { animation-delay: 0.14s; }
.gl-golink__spinner span:nth-child( 3 ) { animation-delay: 0.28s; }
.gl-golink__spinner span:nth-child( 4 ) { animation-delay: 0.42s; }

@keyframes gl-dot-pulse {
	0%,
	70%,
	100% {
		transform: translateY( 0 ) scale( 0.75 );
		opacity: 0.45;
	}

	35% {
		transform: translateY( -0.55rem ) scale( 1 );
		opacity: 1;
	}
}

/* 尊重系统的「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
	.gl-golink__spinner span {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

/* noscript 兜底在加载页里的间距 */
.gl-golink--loading noscript .gl-btn {
	margin-top: 0.75rem;
}

/* =========================================================================
   34. 文章悬停图
   ========================================================================= */
/* 缩略图容器：两层图叠在一起 */
.gl-card__thumb {
	position: relative;
	overflow: hidden;
}

.gl-card__thumb-main,
.gl-card__thumb-hover {
	display: block;
	width: 100%;
	height: 100%;
}

.gl-card__thumb-main img,
.gl-card__thumb-hover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 悬停图盖在上面，默认透明 */
.gl-card__thumb-hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s ease;
}

/* ---- 效果一：淡入（默认）---- */
.gl-card__thumb.has-hover:hover .gl-card__thumb-hover,
.gl-card:hover .gl-card__thumb.has-hover .gl-card__thumb-hover {
	opacity: 1;
}

/* ---- 效果二：横向推入 ---- */
.gl-card--hover-slide .gl-card__thumb-hover {
	transform: translateX( 100% );
	transition: transform 0.32s ease, opacity 0.2s ease;
	opacity: 1;
}

.gl-card--hover-slide .gl-card__thumb.has-hover:hover .gl-card__thumb-hover,
.gl-card--hover-slide:hover .gl-card__thumb.has-hover .gl-card__thumb-hover {
	transform: translateX( 0 );
	opacity: 1;
}

/* 悬停时主图轻微放大，观感更活 */
.gl-card__thumb.has-hover img {
	transition: transform 0.32s ease;
}

.gl-card__thumb.has-hover:hover .gl-card__thumb-main img {
	transform: scale( 1.03 );
}

/* 触摸设备没有悬停，直接不显示悬停层，避免残影 */
@media (hover: none) {
	.gl-card__thumb-hover {
		display: none;
	}
}

/* 系统要求减少动态效果时不做过渡 */
@media (prefers-reduced-motion: reduce) {
	.gl-card__thumb-hover,
	.gl-card__thumb.has-hover img {
		transition: none;
	}

	.gl-card__thumb.has-hover:hover .gl-card__thumb-main img {
		transform: none;
	}
}

@media print {
	.gl-card__thumb-hover { display: none !important; }
}

/* =========================================================================
   35. 后台设置：分组卡片可折叠
   ========================================================================= */
.gl-card-head.is-collapsible {
	cursor: pointer;
	user-select: none;
}

.gl-card-head.is-collapsible:hover {
	background: #f0f0f1;
}

.gl-card-head__caret {
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 7px;
	border-left: 5px solid #50575e;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform 0.16s ease;
	vertical-align: middle;
}

.gl-card-head.is-collapsed .gl-card-head__caret {
	transform: rotate( -90deg );
}

/* 收起时隐藏该分组的说明，标题更紧凑 */
.gl-card-head.is-collapsed .gl-card-head__desc {
	display: none;
}

/* 收起状态下被 JS 标记的行 */
.gl-card-row-hidden {
	display: none !important;
}


/* =========================================================================
   37. 顶栏布局
   ========================================================================= */

/* ---- 布局一：品牌左 / 菜单中 / 操作右（默认）---- */
.gl-header--brand-left .gl-header__inner {
	display: flex;
}

/* ---- 布局二：菜单左 / 品牌居中 / 操作右 ---- */
.gl-header--brand-center .gl-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.gl-header--brand-center .gl-brand {
	grid-column: 2;
	justify-self: center;
}

.gl-header--brand-center .gl-nav {
	grid-column: 1;
	grid-row: 1;
	margin-left: 0;
	justify-self: start;
}

.gl-header--brand-center .gl-header__actions {
	grid-column: 3;
	justify-self: end;
	margin-left: 0;
}

/* 窄屏退回单行，居中布局在手机上没意义 */
@media ( max-width: 56rem ) {
	.gl-header--brand-center .gl-header__inner {
		display: flex;
	}

	.gl-header--brand-center .gl-brand,
	.gl-header--brand-center .gl-nav,
	.gl-header--brand-center .gl-header__actions {
		grid-column: auto;
		grid-row: auto;
		justify-self: auto;
	}

	.gl-header--brand-center .gl-header__actions {
		margin-left: auto;
	}
}

/* ---- 布局三：品牌与菜单分两行 ---- */
.gl-header--stacked .gl-header__inner {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"brand actions"
		"nav   nav";
	row-gap: 0.5rem;
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
}

.gl-header--stacked .gl-brand {
	grid-area: brand;
}

.gl-header--stacked .gl-nav {
	grid-area: nav;
	margin-left: 0;
	border-top: 1px solid var(--gl-border);
	padding-top: 0.5rem;
}

.gl-header--stacked .gl-header__actions {
	grid-area: actions;
	margin-left: 0;
	justify-self: end;
}

@media ( max-width: 56rem ) {
	.gl-header--stacked .gl-header__inner {
		display: flex;
	}
}

/* =========================================================================
   顶栏背景风格
   ========================================================================= */
.gl-header--blur {
	background: color-mix( in srgb, var(--gl-surface) 88%, transparent );
	backdrop-filter: saturate( 180% ) blur( 12px );
}

.gl-header--solid {
	background: var(--gl-surface );
	backdrop-filter: none;
}

.gl-header--transparent {
	background: transparent;
	backdrop-filter: none;
	border-bottom-color: transparent;
}

/* 透明顶栏在滚动后才补背景，避免内容穿过去看不清 */
.gl-header--transparent.is-scrolled {
	background: color-mix( in srgb, var(--gl-surface) 92%, transparent );
	backdrop-filter: saturate( 180% ) blur( 12px );
	border-bottom-color: var(--gl-border);
}

/* =========================================================================
   浮动与自动隐藏
   ========================================================================= */
.gl-header--static {
	position: static;
}

.gl-header--autohide {
	transition: transform 0.25s ease;
	will-change: transform;
}

.gl-header--autohide.is-hidden {
	transform: translateY( -100% );
}

/* 尊重「减少动态效果」 */
@media ( prefers-reduced-motion: reduce ) {
	.gl-header--autohide {
		transition: none;
	}

	.gl-header--autohide.is-hidden {
		transform: none;
	}
}

/* =========================================================================
   移动端：菜单按钮靠左
   ========================================================================= */
@media ( max-width: 56rem ) {
	.gl-header--mleft .gl-header__inner {
		flex-direction: row;
	}

	/* 菜单按钮在 DOM 里位于操作区末尾，靠左时把它提到最前 */
	.gl-header--mleft .gl-menu-toggle {
		order: -1;
		margin-right: 0.35rem;
	}

	.gl-header--mleft .gl-brand {
		order: 0;
	}

	.gl-header--mleft .gl-header__actions {
		order: 1;
		margin-left: auto;
	}
}

/* =========================================================================
   38. 后台：区块诊断面板
   ========================================================================= */
.gl-diag {
	/* 不设 max-width —— 跟其它设置区块一样横向铺满。
	   限制宽度会让它在满宽的表格里显得缩了一块。 */
	width: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}

/* 顶部汇总条 */
.gl-diag__sum {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 650;
	border-bottom: 1px solid #dcdcde;
}

.gl-diag__sum.is-ok {
	background: #edfaef;
	color: #007017;
}

.gl-diag__sum.is-bad {
	background: #fcf0f1;
	color: #b32d2e;
}

.gl-diag__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-diag__item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 9px 16px;
	font-size: 13px;
	line-height: 1.6;
}

.gl-diag__item + .gl-diag__item {
	border-top: 1px solid #f0f0f1;
}

.gl-diag__item:nth-child( even ) {
	background: #fafafa;
}

/* 左侧：状态点 + 标签 */
.gl-diag__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	width: 150px;
	color: #1d2327;
	font-weight: 600;
}

.gl-diag__dot {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #00a32a;
	box-shadow: 0 0 0 3px rgb(0 163 42 / 14% );
}

.gl-diag__item.is-bad .gl-diag__dot {
	background: #d63638;
	box-shadow: 0 0 0 3px rgb(214 54 56 / 14% );
}

/* 右侧：值。路径用等宽字体，靠 <wbr> 在斜杠处换行 */
.gl-diag__value {
	flex: 1;
	min-width: 0;
	color: #50575e;
	font-family: Menlo, Consolas, Monaco, monospace;
	font-size: 12px;
	overflow-wrap: break-word;
}

.gl-diag__item.is-bad .gl-diag__value {
	color: #b32d2e;
}

/* 窄屏：改成上下两行 */
@media ( max-width: 782px ) {
	.gl-diag__item {
		flex-direction: column;
		gap: 4px;
	}

	.gl-diag__label {
		width: auto;
	}
}

/* =========================================================================
   39. LOGO 扫光
   =========================================================================
   一束斜向白光周期性地扫过 LOGO。

   实现要点：
   - 位移用 translateX 的**百分比**（相对伪元素自身宽度），不用固定像素 ——
     这样 LOGO 换成任何尺寸、任何宽高比都不会错位。
   - 倾斜用 skewX 而不是 rotate：skew 不会把元素撑高，也不会溢出容器。
   - 只在 ::after 上做动画，不影响 LOGO 本身的布局与点击。
   - 一个周期里只有前 22% 在扫，其余时间停住 —— 一直在闪会很吵。
   ========================================================================= */
.gl-header--sheen .gl-logo {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.gl-header--sheen .gl-logo::after {
	content: "";
	position: absolute;
	top: -75%;
	bottom: -75%;
	left: 0;
	width: 38%;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgb(255 255 255 / 15%) 35%,
		rgb(255 255 255 / 55%) 50%,
		rgb(255 255 255 / 15%) 65%,
		transparent 100%
	);
	transform: translateX(-180%) skewX(-20deg);
	pointer-events: none;
	will-change: transform;
	animation: gl-sheen var(--gl-sheen-cycle, 6s) ease-in-out infinite;
}

@keyframes gl-sheen {
	0% {
		transform: translateX(-180%) skewX(-20deg);
	}

	22% {
		transform: translateX(360%) skewX(-20deg);
	}

	100% {
		transform: translateX(360%) skewX(-20deg);
	}
}

/* 尊重「减少动态效果」：不扫，直接不显示这束光 */
@media (prefers-reduced-motion: reduce) {
	.gl-header--sheen .gl-logo::after {
		animation: none;
		display: none;
	}
}

/* 深色背景上的 LOGO 用弱一点的光，避免过曝 */
[data-theme="dark"] .gl-header--sheen .gl-logo::after {
	opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .gl-header--sheen .gl-logo::after {
		opacity: 0.55;
	}
}

/* =========================================================================
   40. 右侧悬浮按钮
   ========================================================================= */
.gl-float {
	position: fixed;
	right: 1.25rem;
	bottom: 1.5rem;
	z-index: 90;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.gl-float__item {
	position: relative;
	display: block;
	color: inherit;
	text-decoration: none;
}

.gl-float__btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	box-shadow: var(--gl-shadow);
	color: var(--gl-text-soft);
	cursor: pointer;
	transition: all 0.18s ease;
}

.gl-float__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* 星形图标的填充版（自定义按钮用的实心星） */
.gl-float__item .gl-float__btn svg[fill] {
	fill: currentColor;
}

.gl-float__btn:hover {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--gl-shadow-hover);
}

/* ---- 返回顶部：默认隐藏，滚动后才出现 ---- */
.gl-float__item--top {
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.gl-float__item--top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* ---- 微信二维码：默认藏着，点了才展开 ---- */
.gl-float__qr {
	position: absolute;
	right: calc(100% + 0.6rem);
	bottom: 0;
	display: grid;
	justify-items: center;
	gap: 0.4rem;
	width: 148px;
	padding: 0.7rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	box-shadow: var(--gl-shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateX(6px);
	transition: all 0.18s ease;
}

.gl-float__qr img {
	width: 120px;
	height: 120px;
	object-fit: contain;
	border-radius: var(--gl-radius-sm);
}

.gl-float__qr span {
	color: var(--gl-muted);
	font-size: 0.76rem;
}

.gl-float__item--qr.is-open .gl-float__qr {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.gl-float__item--qr.is-open .gl-float__btn {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}

/* 手指设备上没有 hover，二维码按钮点击展开即可，上面已覆盖 */

/* ---- 窄屏 ---- */
@media (max-width: 48rem) {
	.gl-float {
		right: 0.85rem;
		bottom: 1rem;
		gap: 0.4rem;
	}

	.gl-float__btn {
		width: 38px;
		height: 38px;
	}

	.gl-float__qr {
		width: 132px;
	}

	.gl-float__qr img {
		width: 104px;
		height: 104px;
	}
}

/* ---- 打印时隐藏 ---- */
@media print {
	.gl-float {
		display: none !important;
	}
}

/* ---- 尊重减少动态效果 ---- */
@media (prefers-reduced-motion: reduce) {
	.gl-float__btn,
	.gl-float__item--top,
	.gl-float__qr {
		transition: none;
	}

	.gl-float__btn:hover {
		transform: none;
	}
}

/* =========================================================================
   41. 社交分享
   ========================================================================= */
.gl-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.5rem 0;
	padding: 0.85rem 1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

.gl-share__label {
	flex-shrink: 0;
	color: var(--gl-muted);
	font-size: 0.85rem;
}

.gl-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.gl-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.35rem 0.8rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-text-soft);
	font-size: 0.82rem;
	cursor: pointer;
	transition: all 0.16s ease;
}

.gl-share__btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-share__btn:hover {
	color: #fff;
	transform: translateY(-1px);
}

/* 各平台品牌色（只用文字与图标着色，不引入品牌图片资源） */
.gl-share__btn.is-qq:hover {
	background: #12b7f5;
	border-color: #12b7f5;
}

.gl-share__btn.is-weibo:hover {
	background: #e6162d;
	border-color: #e6162d;
}

.gl-share__btn.is-copy:hover {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
}

.gl-share__btn.is-done {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}

@media (max-width: 30rem) {
	.gl-share {
		justify-content: center;
	}

	.gl-share__label {
		width: 100%;
		text-align: center;
	}
}

@media print {
	.gl-share {
		display: none !important;
	}
}

/* =========================================================================
   42. 图片灯箱
   =========================================================================
   用原生 <dialog>：浏览器自己处理焦点陷阱、ESC 关闭、顶层层级。
   ::backdrop 是 dialog 自带的遮罩伪元素。
   ========================================================================= */
.gl-lb {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	overflow: hidden;
}

.gl-lb::backdrop {
	background: rgb(0 0 0 / 88%);
	backdrop-filter: blur(2px);
}

/* 图片舞台：留出边距，别顶到屏幕边 */
.gl-lb__stage {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: 3.5rem 4.5rem;
}

.gl-lb__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: var(--gl-radius-sm);
	box-shadow: 0 8px 40px rgb(0 0 0 / 50%);
	cursor: default;
	user-select: none;
}

/* ---- 左右切换 ---- */
.gl-lb__nav {
	position: absolute;
	top: 50%;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-top: -23px;
	background: rgb(255 255 255 / 10%);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.16s ease;
}

.gl-lb__nav:hover {
	background: rgb(255 255 255 / 22%);
}

.gl-lb__nav svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-lb__nav--prev { left: 1rem; }
.gl-lb__nav--next { right: 1rem; }

/* 只有一张图时藏掉左右按钮 */
.gl-lb[data-count="1"] .gl-lb__nav {
	display: none;
}

/* ---- 关闭 ---- */
.gl-lb__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	background: rgb(255 255 255 / 10%);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.16s ease;
}

.gl-lb__close:hover {
	background: rgb(255 255 255 / 22%);
}

.gl-lb__close svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---- 说明与计数 ---- */
.gl-lb__cap {
	position: absolute;
	left: 50%;
	bottom: 1.25rem;
	max-width: min(80vw, 46rem);
	margin: 0;
	padding: 0.4rem 0.9rem;
	background: rgb(0 0 0 / 55%);
	border-radius: var(--gl-radius-sm);
	color: #fff;
	font-size: 0.84rem;
	line-height: 1.6;
	text-align: center;
	transform: translateX(-50%);
}

.gl-lb__count {
	position: absolute;
	left: 50%;
	top: 1.4rem;
	color: rgb(255 255 255 / 70%);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
	transform: translateX(-50%);
}

/* ---- 正文图片：可点击的视觉提示 ---- */
.gl-prose img[data-gl-lb-src] {
	cursor: zoom-in;
	transition: opacity 0.16s ease;
}

.gl-prose img[data-gl-lb-src]:hover {
	opacity: 0.9;
}

/* ---- 滚动锁定：打开时不跟着滚 ---- */
html.gl-lb-open {
	overflow: hidden;
}

/* ---- 窄屏 ---- */
@media (max-width: 48rem) {
	.gl-lb__stage {
		padding: 3rem 1rem;
	}

	.gl-lb__nav {
		width: 38px;
		height: 38px;
		margin-top: -19px;
	}

	.gl-lb__nav--prev { left: 0.4rem; }
	.gl-lb__nav--next { right: 0.4rem; }

	.gl-lb__nav svg { width: 20px; height: 20px; }
}

/* ---- 尊重减少动态效果 ---- */
@media (prefers-reduced-motion: reduce) {
	.gl-lb__nav,
	.gl-lb__close,
	.gl-prose img[data-gl-lb-src] {
		transition: none;
	}
}

/* =========================================================================
   43. 文章目录树
   ========================================================================= */
.gl-toc {
	margin: 1.5rem 0;
	padding: 0.9rem 1.1rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
}

/* 吸附：滚到顶部时固定在顶栏之下 */
.gl-toc.is-sticky.is-pinned {
	position: sticky;
	top: calc(var(--gl-header-h) + 0.5rem);
	z-index: 20;
	max-height: calc(100vh - var(--gl-header-h) - 2rem);
	overflow-y: auto;
	box-shadow: var(--gl-shadow);
}

/* ---- 标题栏（可点击折叠） ---- */
.gl-toc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	cursor: pointer;
	user-select: none;
}

.gl-toc__title {
	color: var(--gl-text);
	font-size: 0.92rem;
	font-weight: 700;
}

.gl-toc__caret {
	width: 0;
	height: 0;
	border-top: 5px solid var(--gl-muted-2);
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	transition: transform 0.16s ease;
}

.gl-toc.is-collapsed .gl-toc__caret {
	transform: rotate( -90deg );
}

.gl-toc.is-collapsed .gl-toc__list {
	display: none;
}

/* ---- 列表 ---- */
.gl-toc__list {
	margin: 0.6rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: gl-toc;
}

.gl-toc__item {
	margin: 0;
}

.gl-toc__item a {
	display: block;
	padding: 0.32rem 0 0.32rem 0.7rem;
	border-left: 2px solid var(--gl-border-2);
	color: var(--gl-muted);
	font-size: 0.86rem;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.16s ease, border-color 0.16s ease;
}

/* h3 层级缩进 */
.gl-toc__item.is-l3 a {
	padding-left: 1.6rem;
	font-size: 0.82rem;
}

.gl-toc__item a:hover {
	color: var(--gl-accent-text);
	border-left-color: var(--gl-accent);
}

/* 当前所在章节 */
.gl-toc__item.is-current a {
	border-left-color: var(--gl-accent);
	color: var(--gl-accent-text);
	font-weight: 600;
}

@media (max-width: 48rem) {
	.gl-toc.is-sticky.is-pinned {
		position: static;
		max-height: none;
		overflow: visible;
		box-shadow: none;
	}
}

@media print {
	.gl-toc {
		display: none !important;
	}
}

/* =========================================================================
   44. 性能自适应（弱设备降级）
   =========================================================================
   命中条件时 <html> 会带上 .gl-lite，下面把这些吃性能的效果关掉。
   全部用 !important 是有意的 —— 目的是确保覆盖，而不是被别处的优先级反压。
   ========================================================================= */
.gl-lite .gl-header,
.gl-lite .gl-header--blur,
.gl-lite .gl-header--transparent.is-scrolled {
	background: var(--gl-surface) !important;
	backdrop-filter: none !important;
}

.gl-lite .gl-lb::backdrop {
	backdrop-filter: none !important;
}

/* 关掉所有非必要动画与过渡 */
.gl-lite *,
.gl-lite *::before,
.gl-lite *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	scroll-behavior: auto !important;
}

/* 悬停位移这类"动感"也去掉，弱设备上更容易显得卡 */
.gl-lite .gl-card:hover,
.gl-lite .gl-float__btn:hover,
.gl-lite .gl-share__btn:hover {
	transform: none !important;
}

/* 阴影在低端 GPU 上合成开销明显 */
.gl-lite .gl-card,
.gl-lite .gl-header,
.gl-lite .gl-float__btn {
	box-shadow: none !important;
}

/* =========================================================================
   45. 滚动入场动画
   =========================================================================
   默认状态由 JS 在元素上添加 .gl-reveal 后生效 —— 这样 JS 没跑或
   IntersectionObserver 不支持时，元素是正常可见的，不会白屏。
   ========================================================================= */
.gl-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s ease, transform 0.5s ease;
	will-change: opacity, transform;
}

.gl-reveal.is-in {
	opacity: 1;
	transform: none;
	/* 动画结束后释放，避免长期占用合成层 */
	will-change: auto;
}

/* 尊重减少动效：直接显示，不做位移 */
@media (prefers-reduced-motion: reduce) {
	.gl-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* gl-lite 下也不做动画 */
.gl-lite .gl-reveal {
	opacity: 1 !important;
	transform: none !important;
}

/* =========================================================================
   46. AJAX「加载更多」
   ========================================================================= */
.gl-more {
	margin: 1.75rem 0 0.5rem;
	text-align: center;
}

.gl-more__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-width: 10rem;
	padding: 0.6rem 1.5rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	color: var(--gl-text-soft);
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
}

.gl-more__btn:hover {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
	box-shadow: var(--gl-shadow);
}

.gl-more__btn[disabled] {
	opacity: 0.65;
	cursor: default;
}

/* 加载中的小圈 */
.gl-more__btn.is-loading::before {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: gl-spin 0.7s linear infinite;
}

@keyframes gl-spin {
	to { transform: rotate( 360deg ); }
}

/* 加载完就收起按钮 */
.gl-more.is-done .gl-more__btn {
	display: none;
}

.gl-more__status {
	margin: 0.6rem 0 0;
	color: var(--gl-muted-2);
	font-size: 0.84rem;
}

/* 新插入的卡片也走入场动画 */
.gl-more .gl-card {
	animation: none;
}

/* 数字分页（AJAX 关闭时用的传统样式，顺便美化一下） */
.gl-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	margin: 1.75rem 0 0.5rem;
}

.gl-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 0.6rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-text-soft);
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	transition: all 0.16s ease;
}

.gl-pagination .page-numbers:hover {
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

.gl-pagination .page-numbers.current {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
	font-weight: 600;
}

.gl-pagination .page-numbers.dots {
	background: none;
	border-color: transparent;
}

@media print {
	.gl-more { display: none !important; }
}

/* =========================================================================
   47. 搜索增强
   ========================================================================= */

/* ---- 热门搜索词 ---- */
/*
 * 热门搜索。
 *
 * ⚠️ 这里**不能用 display:flex** ——
 * label 和列表都会变成 flex 项，被迫挤在同一行，
 * 右侧参差不齐。改成普通块级流，让它们自然分行。
 */
.gl-hot {
	margin-top: 0.9rem;
}

/* 标签独占一行 */
.gl-hot__label {
	display: block;
	margin-bottom: 0.5rem;

	color: var(--gl-muted-2);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

.gl-hot__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.gl-hot__item {
	padding: 0.28rem 0.78rem;

	/* 原来灰底 + 灰边，一片糊；改成透明底 + 细边，更透气 */
	background: transparent;
	border: 1px solid var(--gl-border);
	border-radius: 999px;
	color: var(--gl-text-soft);
	font-size: 0.8rem;
	text-decoration: none;

	/* 不用 transition:all —— 会把布局属性也带进过渡，容易抖动 */
	transition: background 0.18s ease, border-color 0.18s ease,
	            color 0.18s ease, transform 0.18s ease;
}

/* 悬停不再直接翻成实心粉（太生硬），改成浅色底 + 主色字 */
.gl-hot__item:hover {
	background: var(--gl-accent-soft);
	border-color: color-mix( in srgb, var(--gl-accent) 34%, var(--gl-border) );
	color: var(--gl-accent-text);
	transform: translateY(-1px);
}

.gl-hot__item:active {
	transform: translateY(0);
}

/* ---- 分类/标签页内的搜索框 ---- */
.gl-term-search {
	display: flex;
	align-items: center;
	max-width: 26rem;
	margin: 0.75rem 0 0;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	overflow: hidden;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.gl-term-search:focus-within {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 3px var(--gl-accent-soft);
}

.gl-term-search__input {
	flex: 1;
	min-width: 0;
	padding: 0.55rem 0.9rem;
	background: none;
	border: 0;
	color: var(--gl-text);
	font-size: 0.88rem;
	outline: none;
}

.gl-term-search__btn {
	display: grid;
	place-items: center;
	width: 40px;
	align-self: stretch;
	background: none;
	border: 0;
	color: var(--gl-muted);
	cursor: pointer;
	transition: color 0.16s ease;
}

.gl-term-search__btn:hover {
	color: var(--gl-accent-text);
}

.gl-term-search__btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* =========================================================================
   48. 文章页增强：作者行 + 版权声明
   ========================================================================= */

/* ---- 标题下的作者行 ---- */
.gl-aline {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin: 0.9rem 0 1.25rem;
	padding-bottom: 1.1rem;
	border-bottom: 1px solid var(--gl-border-2);
}

.gl-aline__avatar {
	flex-shrink: 0;
	display: block;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: hidden;
}

.gl-aline__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gl-aline__body {
	min-width: 0;
}

.gl-aline__name {
	display: block;
	color: var(--gl-text);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.gl-aline__name:hover {
	color: var(--gl-accent-text);
}

.gl-aline__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.15rem;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
}

.gl-aline__sep {
	opacity: 0.6;
}

/* ---- 版权声明 ---- */
.gl-copy {
	margin: 1.75rem 0;
	padding: 1rem 1.15rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-left: 3px solid var(--gl-accent);
	border-radius: var(--gl-radius-lg);
}

.gl-copy__head {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.55rem;
	color: var(--gl-accent-text);
	font-size: 0.86rem;
	font-weight: 700;
}

.gl-copy__head svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-copy__body {
	color: var(--gl-text-soft);
	font-size: 0.86rem;
	line-height: 1.75;
}

.gl-copy__body > *:last-child {
	margin-bottom: 0;
}

.gl-copy__link {
	margin-top: 0.6rem;
	padding-top: 0.6rem;
	border-top: 1px dashed var(--gl-border);
	color: var(--gl-muted-2);
	font-size: 0.78rem;
	word-break: break-all;
}

.gl-copy__link a {
	color: var(--gl-muted);
}

.gl-copy__link a:hover {
	color: var(--gl-accent-text);
}

@media print {
	.gl-copy {
		border-left-width: 1px;
	}
}

/* =========================================================================
   49. 首页列表 Tab（最新 / 热门）
   ========================================================================= */
.gl-htabs {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--gl-border-2);
}

.gl-htabs__btn {
	position: relative;
	padding: 0.4rem 0.9rem;
	background: none;
	border: 0;
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.16s ease, background 0.16s ease;
}

.gl-htabs__btn:hover {
	background: var(--gl-surface-2);
	color: var(--gl-text-soft);
}

.gl-htabs__btn.is-active {
	background: var(--gl-accent);
	color: #fff;
}

/* 切换中：列表半透明，给个"在加载"的暗示 */
.gl-htabs.is-loading ~ * [data-gl-list],
.gl-htabs.is-loading + * [data-gl-list] {
	opacity: 0.45;
	transition: opacity 0.16s ease;
}

@media (max-width: 30rem) {
	.gl-htabs {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.gl-htabs__btn {
		flex-shrink: 0;
	}
}

/* =========================================================================
   50. 后台：开关式切换
   =========================================================================
   把「一格只有一个复选框」的设置项渲染成拨动开关。
   多选组不受影响（JS 只处理单复选框的格子）。
   ========================================================================= */

.gl-sw-cell > label.gl-sw-label,
.gl-sw-cell label.gl-sw-label {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.4;
}

/* 把复选框本体做成轨道 */
input[type="checkbox"].gl-sw {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex-shrink: 0;
	width: 42px;
	height: 23px;
	margin: 0;
	background: #c3c4c7;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.18s ease;
}

/* 圆点 */
input[type="checkbox"].gl-sw::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 19px;
	height: 19px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
	transition: transform 0.18s ease;
}

input[type="checkbox"].gl-sw:checked {
	background: #2271b1;
}

input[type="checkbox"].gl-sw:checked::after {
	transform: translateX(19px);
}

/* 键盘可达性：焦点环 */
input[type="checkbox"].gl-sw:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

input[type="checkbox"].gl-sw:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 关闭状态下的文字标签淡一点，开着的时候更醒目 */
.gl-sw-label {
	color: #50575e;
}

label.gl-sw-label:has( input.gl-sw:checked ) {
	color: #1d2327;
	font-weight: 600;
}

/* 该行其它说明文字保持正常字重，别被上面的规则带粗 */
label.gl-sw-label:has( input.gl-sw:checked ) span,
label.gl-sw-label:has( input.gl-sw:checked ) strong {
	font-weight: inherit;
}

/* 浏览器不支持 :has 时退化成「勾选后变蓝」，不影响可用性 */
@media (prefers-reduced-motion: reduce) {
	input[type="checkbox"].gl-sw,
	input[type="checkbox"].gl-sw::after {
		transition: none;
	}
}

/* ---- 本页二维码：比微信二维码大一点，因为要扫整个页面地址 ---- */
.gl-float__qr-box {
	display: block;
	width: 120px;
	height: 120px;
}

.gl-float__qr-box svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* SVG 自带白底与静区，这里只要圆角即可 */
.gl-float__qr-box svg rect {
	rx: 4;
}

@media (max-width: 48rem) {
	.gl-float__qr-box {
		width: 104px;
		height: 104px;
	}
}

/* =========================================================================
   51. 评论置顶角标
   ========================================================================= */
.gl-cmt-pin {
	display: inline-flex;
	align-items: center;
	gap: 0.22rem;
	margin-right: 0.5rem;
	padding: 0.08rem 0.5rem;
	background: var(--gl-accent-soft);
	border-radius: 999px;
	color: var(--gl-accent-text);
	font-size: 0.72rem;
	font-weight: 600;
	vertical-align: middle;
	white-space: nowrap;
}

.gl-cmt-pin svg {
	width: 12px;
	height: 12px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* 置顶的那条评论，左边加一条细色带，扫列表时更醒目 */
.gl-comment-list > li.is-pinned > .gl-comment,
.gl-comment-list > li.is-pinned > article {
	border-left: 2px solid var(--gl-accent);
}

/* =========================================================================
   52. 移动端底部 Tab 导航
   =========================================================================
   只在窄屏显示。桌面端完全不出现。
   ========================================================================= */
.gl-tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 95;

	/* 默认藏起来；窄屏的媒体查询里才显示 */
	display: none;

	align-items: stretch;
	background: color-mix( in srgb, var(--gl-surface) 94%, transparent );
	backdrop-filter: saturate( 180% ) blur( 12px );
	border-top: 1px solid var(--gl-border);

	/* iPhone 底部横条：把内容顶上去，别被挡住 */
	padding-bottom: env( safe-area-inset-bottom, 0 );
}

.gl-tabbar__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;

	/* 点击区域至少 48px —— 低于这个值拇指容易点偏 */
	min-height: 50px;
	padding: 0.35rem 0.2rem;

	background: none;
	border: 0;
	color: var(--gl-muted);
	font-size: 0.68rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}

.gl-tabbar__icon svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-tabbar__item.is-active {
	color: var(--gl-accent-text);
}

.gl-tabbar__item.is-active .gl-tabbar__label {
	font-weight: 600;
}

.gl-tabbar__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media ( max-width: 48rem ) {
	.gl-tabbar {
		display: flex;
	}

	/*
	 * 底部被固定导航盖住了，给正文补上等高的下边距。
	 * 用 CSS 变量算高度，别写死数字 —— 安全区高度因机型不同。
	 */
	body {
		padding-bottom: calc( 50px + env( safe-area-inset-bottom, 0px ) );
	}

	/* 悬浮按钮与页脚也要让开 */
	.gl-float {
		bottom: calc( 60px + env( safe-area-inset-bottom, 0px ) );
	}

	.gl-footer {
		padding-bottom: calc( 1.5rem + 50px + env( safe-area-inset-bottom, 0px ) );
	}
}

/* 极窄屏（小屏手机横屏等）：只留图标，去掉文字省空间 */
@media ( max-width: 22rem ) {
	.gl-tabbar__label {
		display: none;
	}

	.gl-tabbar__item {
		min-height: 46px;
	}
}

/* 打印时不要 */
@media print {
	.gl-tabbar {
		display: none !important;
	}
}

/* 尊重减少动效 */
@media ( prefers-reduced-motion: reduce ) {
	.gl-tabbar__item {
		transition: none;
	}
}

/* =========================================================================
   53. 海报分享
   ========================================================================= */
.gl-share__btn.is-poster:hover {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
}

.gl-poster {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.gl-poster[hidden] {
	display: none;
}

.gl-poster__mask {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 72%);
	backdrop-filter: blur(3px);
}

.gl-poster__box {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 420px;
	max-height: 100%;
	overflow-y: auto;
	padding: 1rem;
	background: var(--gl-surface);
	border-radius: var(--gl-radius-lg);
	box-shadow: 0 12px 48px rgb(0 0 0 / 40%);
}

.gl-poster__canvas-wrap {
	width: 100%;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius);
	overflow: hidden;
}

.gl-poster__canvas {
	display: block;
	width: 100%;
	height: auto;
}

.gl-poster__tip {
	margin: 0;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
	text-align: center;
}

.gl-poster__actions {
	display: flex;
	gap: 0.5rem;
	width: 100%;
}

.gl-poster__actions .gl-btn {
	flex: 1;
	justify-content: center;
}

@media (max-width: 30rem) {
	.gl-poster {
		padding: 0.5rem;
	}

	.gl-poster__box {
		max-width: 100%;
		padding: 0.75rem;
	}
}

@media print {
	.gl-poster {
		display: none !important;
	}
}

/* =========================================================================
   54. 用户等级徽章
   ========================================================================= */
.gl-lv {
	display: inline-flex;
	align-items: center;
	gap: 0.22rem;
	padding: 0.06rem 0.42rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: 4px;
	color: var(--gl-muted);
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.5;
	vertical-align: middle;
	white-space: nowrap;
}

.gl-lv__name {
	font-weight: 500;
	opacity: 0.85;
}

/* 高等级给一点颜色区分 —— 不用图片，纯色渐变，零资源开销 */
.gl-lv--3,
.gl-lv--4 {
	border-color: color-mix( in srgb, var(--gl-accent) 35%, var(--gl-border) );
	color: var(--gl-accent-text );
}

.gl-lv--5,
.gl-lv--6,
.gl-lv--7,
.gl-lv--8 {
	background: var(--gl-accent);
	border-color: var(--gl-accent);
	color: #fff;
}

.gl-lv--9,
.gl-lv--10 {
	background: linear-gradient( 135deg, #f04494, #7c3aed );
	border-color: transparent;
	color: #fff;
}

.gl-aline__namerow {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
}

/* =========================================================================
   55. 签到按钮
   ========================================================================= */
.gl-checkin {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1.1rem;
	background: var(--gl-accent);
	border: 1px solid var(--gl-accent);
	border-radius: var(--gl-radius-lg);
	color: #fff;
	font-size: 0.86rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
}

.gl-checkin svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-checkin:hover:not([disabled]) {
	transform: translateY(-1px);
	box-shadow: var(--gl-focus-shadow);
}

.gl-checkin[disabled],
.gl-checkin.is-done {
	background: var(--gl-surface-2);
	border-color: var(--gl-border);
	color: var(--gl-muted-2);
	cursor: default;
}

.gl-checkin__streak {
	font-weight: 400;
	opacity: 0.85;
	font-size: 0.78rem;
}

.gl-checkin.is-busy {
	opacity: 0.7;
	cursor: wait;
}

/* 签到结果的提示条 */
.gl-checkin-msg {
	margin-top: 0.6rem;
	padding: 0.5rem 0.85rem;
	border-radius: var(--gl-radius-sm);
	font-size: 0.82rem;
	line-height: 1.6;
}

.gl-checkin-msg.is-ok {
	background: #edfaef;
	color: #007017;
}

.gl-checkin-msg.is-err {
	background: #fcf0f1;
	color: #b32d2e;
}

@media (prefers-reduced-motion: reduce) {
	.gl-checkin {
		transition: none;
	}

	.gl-checkin:hover:not([disabled]) {
		transform: none;
	}
}

/* =========================================================================
   56. 第三方登录按钮
   ========================================================================= */
.gl-oauth {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--gl-border-2);
}

.gl-oauth__label {
	flex-basis: 100%;
	color: var(--gl-muted-2);
	font-size: 0.76rem;
	text-align: center;
}

.gl-oauth__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.42rem 1rem;
	background: var(--gl-surface-2);
	border: 1px solid var(--gl-border);
	border-radius: var(--gl-radius-lg);
	color: var(--gl-text-soft);
	font-size: 0.84rem;
	text-decoration: none;
	transition: all 0.16s ease;
}

.gl-oauth__btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gl-oauth__btn:hover {
	color: #fff;
	transform: translateY(-1px);
}

/* 用平台品牌色，不用图片资源 */
.gl-oauth__btn.is-qq:hover {
	background: #12b7f5;
	border-color: #12b7f5;
}

.gl-oauth__btn.is-wechat:hover {
	background: #07c160;
	border-color: #07c160;
}

/* 登录失败提示 */
.gl-oauth-error {
	max-width: var(--gl-wrap);
	margin: 1rem auto 0;
	padding: 0.7rem 1rem;
	background: #fcf0f1;
	border: 1px solid rgb(179 45 46 / 22% );
	border-radius: var(--gl-radius);
	color: #b32d2e;
	font-size: 0.86rem;
	line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
	.gl-oauth__btn {
		transition: none;
	}

	.gl-oauth__btn:hover {
		transform: none;
	}
}

/* =========================================================================
   57. 点赞 / 收藏
   ========================================================================= */
.gl-engage {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
	margin: 1.8rem 0 0;
	padding-top: 1.4rem;
	border-top: 1px solid var(--gl-border-2);
}

.gl-engage__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.42rem;
	min-height: 40px;
	padding: 0.42rem 1.05rem;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 999px;
	color: var(--gl-muted);
	font-size: 0.86rem;
	line-height: 1;
	cursor: pointer;
	transition: all 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.gl-engage__btn svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.18s ease;
}

.gl-engage__btn b {
	font-weight: 700;
	color: var(--gl-text-soft);
	font-variant-numeric: tabular-nums;
}

.gl-engage__btn:hover {
	border-color: color-mix( in srgb, var(--gl-accent) 45%, var(--gl-border) );
	color: var(--gl-accent-text);
}

/* 点赞：切换成实心红 */
.gl-engage__btn.is-like.is-on {
	background: rgb(240 68 148 / 8% );
	border-color: var(--gl-accent);
	color: var(--gl-accent-text);
}

.gl-engage__btn.is-like.is-on svg {
	fill: var(--gl-accent);
	stroke: var(--gl-accent);
}

/* 收藏：切换成实心金 */
.gl-engage__btn.is-fav.is-on {
	background: rgb(245 166 35 / 10% );
	border-color: #f5a623;
	color: #b26a00;
}

.gl-engage__btn.is-fav.is-on svg {
	fill: #f5a623;
	stroke: #f5a623;
}

/* 点下去的一下反馈 —— 不要长，长了显得卡 */
.gl-engage__btn.is-pop svg {
	transform: scale(1.32);
}

.gl-engage__btn.is-busy {
	opacity: 0.6;
	cursor: wait;
}

/* 未登录点收藏：提示需要登录 */
.gl-engage__hint {
	flex-basis: 100%;
	margin: 0;
	color: var(--gl-muted-2);
	font-size: 0.8rem;
}

.gl-engage__hint a {
	color: var(--gl-accent-text);
}

/* 「我的收藏」空状态 */
.gl-favs-empty {
	padding: 2.4rem 1rem;
	background: var(--gl-surface);
	border-radius: var(--gl-radius-lg);
	color: var(--gl-muted);
	text-align: center;
}

/* 文章统计里的点赞/收藏图标 */
.gl-post-stats__item svg {
	vertical-align: -2px;
}

@media (max-width: 30rem) {
	.gl-engage__btn {
		flex: 1;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gl-engage__btn,
	.gl-engage__btn svg {
		transition: none;
	}

	.gl-engage__btn.is-pop svg {
		transform: none;
	}
}

/* =========================================================================
   58. 侧栏用户卡片
   ========================================================================= */
.gl-ucard {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--gl-border-2);
}

.gl-ucard__row {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.5rem;
	font-size: 0.8rem;
}

.gl-ucard__lv {
	flex-shrink: 0;
	padding: 0.08rem 0.42rem;
	background: var(--gl-accent);
	border-radius: 4px;
	color: #fff;
	font-weight: 700;
	font-size: 0.72rem;
}

.gl-ucard__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--gl-text-soft);
	font-weight: 600;
}

.gl-ucard__pts {
	flex-shrink: 0;
	color: var(--gl-muted-2);
	font-variant-numeric: tabular-nums;
}

.gl-ucard__bar {
	height: 6px;
	overflow: hidden;
	background: var(--gl-surface-2);
	border-radius: 999px;
}

.gl-ucard__bar span {
	display: block;
	height: 100%;
	background: linear-gradient( 90deg, var(--gl-accent), color-mix( in srgb, var(--gl-accent) 60%, #ffb347 ) );
	border-radius: 999px;
	transition: width 0.4s ease;
}

.gl-ucard__hint {
	margin: 0.35rem 0 0;
	color: var(--gl-muted-2);
	font-size: 0.74rem;
	text-align: center;
}

.gl-ucard__checkin {
	margin-top: 0.7rem;
}

.gl-ucard__checkin .gl-checkin {
	width: 100%;
	justify-content: center;
}

.gl-ucard__links {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.7rem;
	font-size: 0.78rem;
}

.gl-ucard__links a {
	flex: 1;
	padding: 0.3rem 0;
	background: var(--gl-surface-2);
	border-radius: var(--gl-radius-sm);
	color: var(--gl-muted);
	text-align: center;
	text-decoration: none;
}

.gl-ucard__links a:hover {
	color: var(--gl-accent-text);
}

@media (prefers-reduced-motion: reduce) {
	.gl-ucard__bar span {
		transition: none;
	}
}

/* =========================================================================
   59. 开屏遮罩
   =========================================================================
   默认 display:none —— 由 JS 给 <html> 加 .gl-splash-on 才显示。
   这样 JS 挂掉时页面完全不受影响，不会出现「永久白屏」。

   字体走系统手写体栈：不加载外部字体文件，也不用别人的专有字体。
   ========================================================================= */
.gl-splash {
	display: none;
}

.gl-splash-on .gl-splash {
	position: fixed;
	inset: 0;
	z-index: 99999;

	display: flex;
	align-items: center;
	justify-content: center;

	background: var(--gl-splash-bg, #fff);
	opacity: 1;
	transition: opacity 0.5s ease;
}

.gl-splash-on .gl-splash.is-off {
	opacity: 0;
	pointer-events: none;
}

/* 动画期间锁住滚动，别让用户在遮罩后面滑动页面 */
.gl-splash-on body {
	overflow: hidden;
}

.gl-splash__inner {
	display: block;
}

.gl-splash__text {
	display: block;
	color: var(--gl-splash-color, #1f2430);

	/*
	 * 手写体栈，从「更手写」到「更普通」依次回退：
	 *   Segoe Script / Bradley Hand   Windows
	 *   Snell Roundhand / Apple Chancery  macOS
	 *   楷体  —— 中文的手写感靠它
	 * 最后兜底到普通无衬线，保证任何设备都有字可看。
	 */
	font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand",
	             "Apple Chancery", "Kaiti SC", "KaiTi", "STKaiti",
	             "楷体", cursive, -apple-system, sans-serif;
	font-size: clamp( 2.6rem, 11vw, 6rem );
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	white-space: nowrap;

	/*
	 * 从左往右「写」出来：用 clip-path 把右侧裁掉，再放开。
	 * 比 SVG 描边简单得多，而且任何字体都适用 ——
	 * 换成中文、换成 hello，效果都成立。
	 */
	clip-path: inset( 0 100% 0 0 );
	animation: gl-splash-write 1.15s cubic-bezier( 0.5, 0, 0.35, 1 ) 0.18s forwards;
}

/* 写完后再轻轻浮一下，收尾不至于太突兀 */
.gl-splash__inner {
	animation: gl-splash-rise 0.9s ease 0.2s both;
}

@keyframes gl-splash-write {
	from { clip-path: inset( 0 100% 0 0 ); }
	to   { clip-path: inset( 0 -2% 0 0 ); }
}

@keyframes gl-splash-rise {
	from { transform: translateY( 6px ); opacity: 0; }
	to   { transform: translateY( 0 ); opacity: 1; }
}

/* 窄屏：字别撑出屏幕 */
@media ( max-width: 30rem ) {
	.gl-splash__text {
		font-size: clamp( 2rem, 14vw, 3.4rem );
	}
}

/* ---- 减少动效：根本不显示，不是「淡一点」 ---- */
@media ( prefers-reduced-motion: reduce ) {
	.gl-splash-on .gl-splash {
		display: none;
	}
}

/* ---- 打印时不要 ---- */
@media print {
	.gl-splash {
		display: none !important;
	}
}

/* =========================================================================
   60. 手机端顶栏：强制三栏（放在文件末尾，压过布局变体）
   =========================================================================
   踩过的坑：
     40 多行那段移动端规则写的是 `.gl-header__inner`（特异度 1），
     但各布局变体里有 `.gl-header--brand-left .gl-header__inner`
     这类选择器 —— **特异度 2，而且排在后面**，直接把 display 改回 flex。
     结果就是：用了「品牌居左 / 居中 / 堆叠」任一布局，手机端三栏完全不生效。

   所以要满足两个条件才能赢：
     1. 特异度不低于变体（这里都用 2 个类）
     2. 位置在变体之后（所以放在文件末尾）

   注意：不能只提高特异度 —— 同特异度时仍然是后写的胜出。
   ========================================================================= */
@media (max-width: 56rem) {
	/*
	 * =====================================================================
	 * 顶栏：LOGO 绝对居中 + 两侧按钮浮动
	 * =====================================================================
	 * 这是子比的做法（.navbar-brand 绝对定位铺满整行、文字居中，
	 * 按钮 float 在两侧）。**不用栅格。**
	 *
	 * 我前面用 grid 试了两版都不行，原因：
	 *   `1fr` 的隐含最小值是 auto(min-content) 而不是 0，
	 *   右侧按钮多、min-content 大，栏就被撑宽，LOGO 被挤偏。
	 *   改成 minmax(0,1fr) 能压住，但**绝对定位更简单也更稳** ——
	 *   LOGO 铺满整行居中，压根不受两侧宽度影响。
	 * ===================================================================== */
	.gl-header .gl-header__inner,
	.gl-header--brand-left .gl-header__inner,
	.gl-header--brand-center .gl-header__inner,
	.gl-header--stacked .gl-header__inner {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	/* LOGO：铺满整行、水平居中，脱离文档流 —— 永远在正中间 */
	.gl-header .gl-brand,
	.gl-header--brand-left .gl-brand,
	.gl-header--brand-center .gl-brand,
	.gl-header--stacked .gl-brand {
		position: absolute;
		left: 0;
		right: 0;
		z-index: 1;

		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 0;
		text-align: center;

		/* 别挡住两侧按钮的点击；下面再把品牌自身放出来 */
		pointer-events: none;
	}

	.gl-header .gl-brand > * ,
	.gl-header--brand-left .gl-brand > * ,
	.gl-header--brand-center .gl-brand > * ,
	.gl-header--stacked .gl-brand > * {
		pointer-events: auto;
		min-width: 0;
	}

	/* 两侧按钮浮在 LOGO 之上 */
	.gl-header .gl-menu-toggle,
	.gl-header--brand-left .gl-menu-toggle,
	.gl-header--brand-center .gl-menu-toggle,
	.gl-header--stacked .gl-menu-toggle {
		position: relative;
		z-index: 2;
		order: -1;
		flex: 0 0 auto;
	}

	.gl-header .gl-header__actions,
	.gl-header--brand-left .gl-header__actions,
	.gl-header--brand-center .gl-header__actions,
	.gl-header--stacked .gl-header__actions {
		position: relative;
		z-index: 2;
		order: 1;
		flex: 0 0 auto;
		margin-left: auto;
	}

	/* 桌面导航在窄屏不参与布局 */
	.gl-header .gl-nav--desktop {
		display: none;
	}
}

/* =========================================================================
   61. 登录 / 注册弹窗
   =========================================================================
   原来点登录是跳 wp-login.php，跟站点长得完全不一样。
   改成弹窗，在当前页面完成。
   ========================================================================= */
.gl-auth {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.gl-auth[hidden] {
	display: none;
}

.gl-auth__backdrop {
	position: absolute;
	inset: 0;
	background: rgb( 0 0 0 / 46% );
	backdrop-filter: blur( 2px );
	animation: gl-auth-fade 0.2s ease;
}

.gl-auth__panel {
	position: relative;
	z-index: 1;

	width: 100%;
	max-width: 23rem;
	max-height: calc( 100vh - 2rem );
	overflow-y: auto;

	padding: 1.6rem 1.4rem 1.3rem;
	background: var(--gl-surface);
	border-radius: 16px;
	box-shadow: 0 18px 50px -12px rgb( 0 0 0 / 42% );

	animation: gl-auth-in 0.26s cubic-bezier( 0.32, 0.72, 0, 1 );
}

@keyframes gl-auth-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes gl-auth-in {
	from { opacity: 0; transform: translateY( 14px ) scale( 0.97 ); }
	to   { opacity: 1; transform: none; }
}

/* 减少动效偏好 —— 系统开了就不要再动 */
@media ( prefers-reduced-motion: reduce ) {
	.gl-auth__panel,
	.gl-auth__backdrop {
		animation: none;
	}
}

.gl-auth__x {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;

	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;

	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--gl-muted);
	cursor: pointer;
}

.gl-auth__x:hover {
	background: var(--gl-surface-2);
}

.gl-auth__x svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

/* 标题 + 下方主色短横 —— 照参考图的处理 */
.gl-auth__title {
	position: relative;
	margin: 0 0 0.5rem;
	padding-bottom: 0.5rem;
	color: var(--gl-text);
	font-size: 1.32rem;
	font-weight: 700;
}

.gl-auth__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 30px;
	height: 3px;
	background: var(--gl-accent);
	border-radius: 3px;
}

.gl-auth__sub {
	margin: 0 0 1.1rem;
	color: var(--gl-muted-2);
	font-size: 0.82rem;
}

/* 登录 / 注册 切换 */
.gl-auth__tabs {
	display: flex;
	gap: 1.2rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--gl-border-2);
}

.gl-auth__tab {
	position: relative;
	padding: 0 0 0.5rem;

	background: none;
	border: 0;
	color: var(--gl-muted);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.gl-auth__tab.is-on {
	color: var(--gl-accent-text);
}

.gl-auth__tab.is-on::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;

	height: 2px;
	background: var(--gl-accent);
	border-radius: 2px;
}

/* 提示条 */
.gl-auth__note {
	margin-bottom: 0.9rem;
	padding: 0.5rem 0.7rem;
	border-radius: var(--gl-radius-sm);
	font-size: 0.82rem;
	line-height: 1.5;
}

.gl-auth__note.is-err {
	background: rgb( 220 38 38 / 10% );
	color: #b91c1c;
}

.gl-auth__note.is-ok {
	background: rgb( 22 163 74 / 10% );
	color: #15803d;
}

/* 表单：下划线式输入 —— 不用一圈边框盒子 */
.gl-auth__field {
	display: block;
	margin-bottom: 1rem;
}

.gl-auth__label {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--gl-muted-2);
	font-size: 0.75rem;
}

.gl-auth__field input[type="text"],
.gl-auth__field input[type="password"],
.gl-auth__field input[type="email"] {
	width: 100%;
	padding: 0.5rem 0;

	background: none;
	border: 0;
	border-bottom: 1px solid var(--gl-border);
	border-radius: 0;
	color: var(--gl-text);
	font-size: 0.95rem;

	transition: border-color 0.2s ease;
}

.gl-auth__field input:focus {
	outline: none;
	border-bottom-color: var(--gl-accent);
}

.gl-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 1.1rem;
}

.gl-auth__check {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--gl-muted);
	font-size: 0.8rem;
	cursor: pointer;
}

.gl-auth__link {
	padding: 0;
	background: none;
	border: 0;
	color: var(--gl-accent-text);
	font-size: 0.8rem;
	text-decoration: none;
	cursor: pointer;
}

.gl-auth__link:hover {
	text-decoration: underline;
}

.gl-auth__hint {
	margin: 0 0 1.1rem;
	color: var(--gl-muted-2);
	font-size: 0.78rem;
	line-height: 1.6;
}

/* 大圆角提交按钮 —— 照参考图 */
.gl-auth__submit {
	width: 100%;
	padding: 0.72rem 1rem;

	background: var(--gl-accent);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;

	transition: filter 0.18s ease, transform 0.16s ease;
}

.gl-auth__submit:hover {
	filter: brightness( 1.06 );
}

.gl-auth__submit:active {
	transform: scale( 0.985 );
}

.gl-auth__submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.gl-auth__foot {
	margin: 1rem 0 0;
	color: var(--gl-muted-2);
	font-size: 0.8rem;
	text-align: center;
}
