/* ==========================================================================
   Life Is Endless · 像素暖调 v2「档案指纹」
   --------------------------------------------------------------------------
   主题：让"内容指纹"从暗藏引擎 → 每页可见身份（指纹印章）+
         版式随哈希变化（每页长得都不一样）
   激活：body.theme-pixel-cozy 时生效（后台「主题风格」= 像素）
   指纹动态变量由 assets/js/pixel-cozy-v2.js 写入 body.innerText / body.style
   ========================================================================== */

/* ---------- 字体 ---------- */
@font-face {
	font-family: "PressStart2P";
	src: url("../fonts/PressStart2P-latin.woff2") format("woff2");
	font-display: swap;
	font-weight: normal;
	font-style: normal;
}
@font-face {
	font-family: "FusionPixel";
	src: url("../fonts/fusion-pixel-12px-proportional-zh_hans.woff2") format("woff2");
	font-display: swap;
	font-weight: normal;
	font-style: normal;
}

/* ==========================================================================
   1. Token 体系（结构化变量：所有视觉都由这里驱动）
   ========================================================================== */
.theme-pixel-cozy {
	/* 恒定暗冷调色板：深青黑 + 月光蓝（参考视频） */
	--px-bg: #0C1412;
	--px-surface: rgba(20, 30, 26, 0.58);
	--px-surface-solid: rgba(18, 27, 23, 0.36);
	--px-surface-2: rgba(27, 41, 36, 0.32);
	--px-text: #C9D2DC;
	--px-text-2: #93A4B5;
	--px-text-3: #6C7784;
	--px-accent: #7E90C0;   /* 月光蓝（主） */
	--px-accent-deep: #5D6FA6;
	--px-accent-2: #A9B8D9; /* 柔和冷光（次） */
	--px-line: #26332E;     /* 深青灰（边框） */

	/* 指纹动态变量（由 JS 依据 djb2 哈希写入 body style，天然每页不同） */
	--px-h2-offset: 0px;
	--px-card-radius: 4px;
	--px-shadow-x: 6px;
	--px-shadow-y: 6px;
	--px-noise-op: 0.02;
	--px-noise-size: 48px;
	--px-pixel-alpha: 0.15;
	--px-portal-cols: 3;
	--px-portal-gap: 24px;
	--px-post-align: left;

	/* 8px 刚性网格 */
	--space: 8px;

	/* 像素字体栈 */
	--font-pixel: "PressStart2P", "FusionPixel", "Courier New", monospace;

	/* 全局像素渲染：关抗锯齿，硬边 */
	-webkit-font-smoothing: none;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeSpeed;

	/* 覆盖基座主题的 --color-*（否则其他页面会漏出默认蓝色，与 v2 风格不一致） */
	--color-bg: #0C1412;
	--color-surface: rgba(18, 27, 23, 0.60);
	--color-surface-2: rgba(27, 41, 36, 0.50);
	--color-text: #C9D2DC;
	--color-text-2: #93A4B5;
	--color-text-3: #6C7784;
	--color-accent: #7E90C0;
	--color-accent-2: #A9B8D9;
	--color-border: #26332E;
	--color-placeholder-bg: #1B2924;
	--color-placeholder-line: #33413B;
}

/* ---------- 夜晚 / 深夜：整套变量联动为更深冷暗色 ---------- */
.theme-pixel-cozy[data-px-time="night"],
.theme-pixel-cozy[data-px-time="midnight"] {
	--px-bg: #080D0B;
	--px-surface: rgba(13, 20, 17, 0.58);
	--px-surface-solid: rgba(12, 18, 15, 0.36);
	--px-surface-2: rgba(20, 32, 27, 0.32);
	--px-text: #C2CCD6;
	--px-text-2: #8DA0B1;
	--px-text-3: #64707D;
	--px-accent: #7285B4;
	--px-accent-deep: #55679C;
	--px-accent-2: #A0AFCE;
	--px-line: #1F2B27;
}

/* ==========================================================================
   2. body / 基础
   ========================================================================== */
body.theme-pixel-cozy {
	background-color: var(--px-bg);
	background-image: none;
	color: var(--px-text);
	font-family: "FusionPixel", "PressStart2P", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 16px;
	line-height: 1.8;
	letter-spacing: 0.02em;
	transition: background-color 1.5s ease, color 1.5s ease;
}

/* 选中文本：陶土橙底（功能8 由 JS 叠加点阵纹理） */
.theme-pixel-cozy ::selection {
	background: rgba(126, 144, 192, 0.35);
	color: var(--px-text);
}

/* 焦点指示器 / 链接 */
.theme-pixel-cozy :focus-visible {
	outline: 2px dashed var(--px-accent);
	outline-offset: 2px;
}
.theme-pixel-cozy a { color: var(--px-accent); text-decoration: none; transition: color .18s ease; }
.theme-pixel-cozy a:hover { color: var(--px-accent-deep); text-decoration: underline; }
.theme-pixel-cozy a:visited { color: var(--px-accent); }

/* 标题 */
.theme-pixel-cozy h1, .theme-pixel-cozy h2, .theme-pixel-cozy h3,
.theme-pixel-cozy h4, .theme-pixel-cozy h5, .theme-pixel-cozy h6 {
	color: var(--px-text);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0.03em;
}
.theme-pixel-cozy h3 { font-size: 18px; }
.theme-pixel-cozy h4 { font-size: 16px; }

/* 段落 / 小字 */
.theme-pixel-cozy p { margin: 0 0 24px; }
.theme-pixel-cozy small, .theme-pixel-cozy figcaption { color: var(--px-text-3); font-size: 12px; }
.theme-pixel-cozy strong, .theme-pixel-cozy b { color: var(--px-text); font-weight: 700; }

/* 图片：像素渲染，无外框 */
.theme-pixel-cozy img { image-rendering: pixelated; }

/* ==========================================================================
   3. 站点头部（像素化 header）
   ========================================================================== */
.theme-pixel-cozy .site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--px-surface);
	border-bottom: 2px solid var(--px-accent-2);
	backdrop-filter: blur(6px);
	box-shadow: 0 var(--px-shadow-y) 0 rgba(126, 144, 192, 0.12);
}
.theme-pixel-cozy .site-header__inner {
	display: flex;
	align-items: center;
	gap: calc(var(--space) * 2);
	max-width: 1100px;
	margin: 0 auto;
	padding: calc(var(--space) * 1) calc(var(--space) * 3);
}
.theme-pixel-cozy .site-brand__name {
	font-family: var(--font-pixel);
	font-size: 12px;
	color: var(--px-text);
	letter-spacing: 0.08em;
}
.theme-pixel-cozy .site-brand__mark { margin: 0 6px; color: var(--px-accent); }

/* 导航 */
/* 顶部导航：移到 Header 右侧（logo 左、导航右） */
.theme-pixel-cozy .main-nav { margin-left: auto; }
.theme-pixel-cozy .main-nav ul {
	display: flex;
	gap: calc(var(--space) * 2);
	list-style: none;
	margin: 0;
	padding: 0;
}
.theme-pixel-cozy .main-nav a {
	font-family: var(--font-pixel);
	font-size: 11px;
	color: var(--px-text-2);
	padding: 4px 2px;
	position: relative;
}
.theme-pixel-cozy .main-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--px-accent);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .2s ease;
}
.theme-pixel-cozy .main-nav a:hover::after,
.theme-pixel-cozy .main-nav .current-menu-item > a::after { transform: scaleX(1); }
.theme-pixel-cozy .main-nav a:hover { color: var(--px-text); }

/* 深浅切换按钮（像素方块） */
.theme-pixel-cozy .theme-toggle {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-text);
	cursor: pointer;
}
.theme-pixel-cozy .theme-toggle:hover { border-color: var(--px-accent); color: var(--px-accent); }
/* 像素主题为恒定暗调，不需要黑白/深浅切换按钮 */
html.lie-pixel .theme-toggle { display: none; }

/* ==========================================================================
   4. Hero 主视觉 + 指纹印章（页面可见身份的焦点）
   ========================================================================== */
.theme-pixel-cozy .blog-hero {
	position: relative;
	padding: calc(var(--space) * 7) 0 calc(var(--space) * 5);
	text-align: center;
}
.theme-pixel-cozy .blog-hero__inner {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 calc(var(--space) * 3);
}
.theme-pixel-cozy .blog-hero__kicker {
	position: relative;
	display: inline-block;
	font-family: var(--font-pixel);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: var(--px-accent);
	background: var(--px-surface-2);
	border: 2px solid var(--px-accent);
	padding: 5px 14px;
	border-radius: 2px;
	box-shadow: 3px 3px 0 rgba(126, 144, 192, 0.22);
	margin-bottom: calc(var(--space) * 3);
}
.theme-pixel-cozy .blog-hero__title {
	font-family: var(--font-pixel);
	font-size: clamp(28px, 6vw, 52px);
	line-height: 1.25;
	letter-spacing: 0.06em;
	color: var(--px-text);
	margin: 0 0 calc(var(--space) * 3);
	text-shadow: 3px 3px 0 var(--px-accent-2), 6px 6px 0 rgba(126, 144, 192, 0.16);
}
.theme-pixel-cozy .blog-hero__rule {
	position: relative;
	width: 110px;
	height: 4px;
	margin: 0 auto calc(var(--space) * 3);
	background: linear-gradient(90deg, transparent, var(--px-accent), transparent);
}
.theme-pixel-cozy .blog-hero__rule::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	transform: translate(-50%, -50%) rotate(45deg);
	background: var(--px-accent);
	border: 1px solid var(--px-bg);
}
.theme-pixel-cozy .blog-hero__sub {
	position: relative;
	display: inline-block;
	color: var(--px-text-2);
	font-size: 14px;
	padding-left: 14px;
	margin-top: calc(var(--space) * 2);
}
.theme-pixel-cozy .blog-hero__sub::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	width: 4px;
	height: calc(100% - 8px);
	background: var(--px-accent);
}

/* --- 指纹印章：页面身份卡 --- */
/* JS 注入到 hero 内；印章 = 页面内容 djb2 哈希生成的像素"签名图记"，每页唯一 */
.theme-pixel-cozy .px-emblem {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: calc(var(--space) * 1);
	margin: calc(var(--space) * 4) auto calc(var(--space) * 2);
	padding: calc(var(--space) * 2) calc(var(--space) * 3);
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.18);
}
.theme-pixel-cozy .px-emblem__svg {
	display: block;
	width: 128px;
	height: 128px;
	image-rendering: pixelated;
	border: 2px solid var(--px-accent-2);
	background: var(--px-bg);
}
.theme-pixel-cozy .px-emblem__label {
	font-family: var(--font-pixel);
	font-size: 10px;
	letter-spacing: 0.1em;
	color: var(--px-text-3);
}
.theme-pixel-cozy .px-emblem__hash { color: var(--px-accent); }

/* --- 实时时钟：像素"时间戳"盒子 --- */
.theme-pixel-cozy .clock {
	position: relative;
	display: inline-block;
	margin: calc(var(--space) * 2) auto 0;
	padding: 12px 22px;
	font-family: var(--font-pixel);
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	box-shadow: 3px 3px 0 rgba(126, 144, 192, 0.18);
}
.theme-pixel-cozy .clock::before {
	content: "▚ 此刻 · NOW";
	display: block;
	font-family: var(--font-pixel);
	font-size: 9px;
	letter-spacing: 0.14em;
	color: var(--px-text-3);
	margin-bottom: 6px;
}
.theme-pixel-cozy .clock__time {
	font-size: 24px;
	color: var(--px-text);
	letter-spacing: 0.14em;
}
.theme-pixel-cozy .clock__sep { color: var(--px-accent); animation: lie-px-blink 1s steps(1) infinite; }
.theme-pixel-cozy .clock__date { font-size: 11px; color: var(--px-text-2); margin-top: 6px; letter-spacing: 0.08em; }
@keyframes lie-px-blink { 50% { opacity: 0; } }

/* ==========================================================================
   5. 分区入口卡（指纹版式：列数由 --px-portal-cols 决定）
   ========================================================================== */
.theme-pixel-cozy .portal-section { max-width: 1100px; margin: 0 0 0 auto; padding: 0 calc(var(--space) * 3); }
.theme-pixel-cozy .section-head {
	display: flex;
	align-items: baseline;
	gap: calc(var(--space) * 2);
	margin-bottom: calc(var(--space) * 3);
}
.theme-pixel-cozy .section-head__title {
	font-family: var(--font-pixel);
	font-size: 18px;
	color: var(--px-text);
	letter-spacing: 0.06em;
	margin: 0;
}
.theme-pixel-cozy .section-head__en {
	font-family: var(--font-pixel);
	font-size: 10px;
	color: var(--px-text-3);
	letter-spacing: 0.14em;
	border: 1px solid var(--px-line);
	padding: 2px 6px;
	border-radius: 2px;
}
.theme-pixel-cozy .portal-cards {
	display: grid;
	grid-template-columns: repeat(var(--px-portal-cols, 3), 1fr);
	gap: var(--px-portal-gap);
}
.theme-pixel-cozy .portal-card {
	position: relative;
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	padding: calc(var(--space) * 3);
	color: var(--px-text);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.14);
	overflow: hidden;
}
.theme-pixel-cozy .portal-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: var(--px-accent);
}
.theme-pixel-cozy .portal-card:hover {
	transform: translate(-2px, -2px);
	border-color: var(--px-accent);
	box-shadow: calc(var(--px-shadow-x) + 2px) calc(var(--px-shadow-y) + 2px) 0 rgba(126, 144, 192, 0.22);
}
.theme-pixel-cozy .portal-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-accent);
	margin-bottom: calc(var(--space) * 2);
}
.theme-pixel-cozy .portal-card__kicker {
	font-family: var(--font-pixel);
	font-size: 10px;
	letter-spacing: 0.14em;
	color: var(--px-accent);
	display: block;
	margin-bottom: 4px;
}
.theme-pixel-cozy .portal-card__title { font-size: 18px; margin: 0 0 6px; }
.theme-pixel-cozy .portal-card__desc { color: var(--px-text-2); font-size: 13px; margin: 0; }

/* 版式变体：分区卡网格列数由 JS 写入 --px-portal-cols（2 或 3）。
   不同骨架做轻微整体构图偏移，形成"每页不一样"但不破坏网格对齐。
   px-layout-1：分区入口略右移；px-layout-2：正文区略收窄。 */
.theme-pixel-cozy.px-layout-1 .portal-section { padding-left: 0; }
.theme-pixel-cozy.px-layout-1 .portal-section .section-head { padding-left: calc(var(--space) * 2); }
.theme-pixel-cozy.px-layout-2 .home-layout { max-width: 1000px; }

/* ==========================================================================
   6. 首页双栏（主栏 + 侧栏）
   ========================================================================== */
.theme-pixel-cozy .home-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: calc(var(--space) * 4);
	max-width: 1100px;
	margin: calc(var(--space) * 5) auto 0;
	padding: 0 calc(var(--space) * 3);
}

/* --- 最新文章卡片 --- */
.theme-pixel-cozy .post-list { display: grid; gap: calc(var(--space) * 3); }
.theme-pixel-cozy .post-card {
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	overflow: hidden;
	display: flex;
	flex-direction: row;
	gap: 0;
	color: var(--px-text);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.14);
}
.theme-pixel-cozy .post-card:hover {
	transform: translate(-2px, -2px);
	border-color: var(--px-accent);
	box-shadow: calc(var(--px-shadow-x) + 2px) calc(var(--px-shadow-y) + 2px) 0 rgba(126, 144, 192, 0.22);
}
.theme-pixel-cozy .post-card__thumb {
	flex: 0 0 240px;
	background: var(--px-surface-2);
	border-right: 2px solid var(--px-line);
}
.theme-pixel-cozy .post-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.theme-pixel-cozy .post-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 140px;
	font-family: var(--font-pixel);
	font-size: 10px;
	color: var(--px-text-3);
	background: repeating-linear-gradient(45deg, var(--px-surface-2), var(--px-surface-2) 8px, var(--px-surface) 8px, var(--px-surface) 16px);
}
.theme-pixel-cozy .post-card__body { padding: calc(var(--space) * 3); flex: 1; }
.theme-pixel-cozy .post-card__meta { display: flex; gap: 10px; font-size: 11px; color: var(--px-text-3); margin-bottom: 6px; }
.theme-pixel-cozy .post-card__date,
.theme-pixel-cozy .post-card__cats { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em; }
.theme-pixel-cozy .post-card__title { font-size: 20px; margin: 0 0 8px; }
.theme-pixel-cozy .post-card__title a { color: var(--px-text); }
.theme-pixel-cozy .post-card__title a:hover { color: var(--px-accent); text-decoration: none; }
.theme-pixel-cozy .post-card__excerpt { color: var(--px-text-2); font-size: 13px; margin: 0; }

/* --- 站点统计 mini-card --- */
.theme-pixel-cozy .mini-card {
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	padding: calc(var(--space) * 3);
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.14);
}
.theme-pixel-cozy .mini-card__kicker {
	font-family: var(--font-pixel);
	font-size: 10px;
	letter-spacing: 0.14em;
	color: var(--px-accent);
	display: block;
	margin-bottom: calc(var(--space) * 2);
}
.theme-pixel-cozy .stats__row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: calc(var(--space) * 2);
}
.theme-pixel-cozy .stats__item {
	text-align: center;
	padding: calc(var(--space) * 1);
	border: 1px dashed var(--px-line);
	border-radius: 4px;
}
.theme-pixel-cozy .stats__item b {
	display: block;
	font-family: var(--font-pixel);
	font-size: 20px;
	color: var(--px-accent);
	margin-bottom: 4px;
}
.theme-pixel-cozy .stats__item span { font-size: 11px; color: var(--px-text-2); }

/* --- 关于 / 作者卡 --- */
.theme-pixel-cozy .home-about {
	margin-top: calc(var(--space) * 3);
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	padding: calc(var(--space) * 3);
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.14);
}
.theme-pixel-cozy .home-about h2 { font-size: 20px; margin: 0 0 10px; }
.theme-pixel-cozy .home-about p { color: var(--px-text-2); font-size: 14px; margin: 0 0 12px; }
.theme-pixel-cozy .home-about__links { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-pixel-cozy .home-about__link {
	font-family: var(--font-pixel);
	font-size: 10px;
	color: var(--px-text);
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	padding: 8px 14px;
	transition: all .18s ease;
}
.theme-pixel-cozy .home-about__link:hover { border-color: var(--px-accent); color: var(--px-accent); text-decoration: none; }

/* --- 侧栏小部件 --- */
.theme-pixel-cozy .home-sidebar .home-widget {
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: var(--px-card-radius);
	padding: calc(var(--space) * 3);
	margin-bottom: calc(var(--space) * 3);
	box-shadow: var(--px-shadow-x) var(--px-shadow-y) 0 rgba(126, 144, 192, 0.12);
}
.theme-pixel-cozy .home-widget__title {
	font-family: var(--font-pixel);
	font-size: 12px;
	letter-spacing: 0.08em;
	color: var(--px-text);
	margin: 0 0 calc(var(--space) * 2);
	padding-bottom: calc(var(--space) * 1);
	border-bottom: 2px solid var(--px-accent-2);
}
.theme-pixel-cozy input[type="search"],
.theme-pixel-cozy input[type="text"],
.theme-pixel-cozy input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--font-pixel);
	font-size: 12px;
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-text);
	padding: 10px 12px;
}
.theme-pixel-cozy input[type="search"]:focus,
.theme-pixel-cozy input:focus {
	border-color: var(--px-accent);
	box-shadow: inset 2px 2px 0 rgba(126, 144, 192, 0.16);
	outline: none;
}
.theme-pixel-cozy .home-widget__hitokoto { color: var(--px-text); font-size: 14px; }
.theme-pixel-cozy .home-widget__hitokoto-from { color: var(--px-text-3); font-size: 11px; }
.theme-pixel-cozy .home-widget__poem { margin: 0; border-left: 4px solid var(--px-accent); padding-left: 12px; }
.theme-pixel-cozy .home-widget__poem-quote { color: var(--px-text); font-size: 14px; }
.theme-pixel-cozy .home-widget__poem-src { color: var(--px-text-3); font-size: 11px; }
.theme-pixel-cozy .home-widget__list { list-style: none; margin: 0; padding: 0; }
.theme-pixel-cozy .home-widget__list-item { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--px-line); }
.theme-pixel-cozy .home-widget__list-item:last-child { border-bottom: none; }
.theme-pixel-cozy .home-widget__list-date { font-family: var(--font-pixel); font-size: 9px; color: var(--px-text-3); padding-top: 2px; }
.theme-pixel-cozy .home-widget__list-link { color: var(--px-text); font-size: 13px; }
.theme-pixel-cozy .home-widget__char { display: flex; gap: 10px; align-items: center; }
.theme-pixel-cozy .home-widget__char-img { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--px-line); border-radius: 4px; image-rendering: auto; }
.theme-pixel-cozy .home-widget__char-info b { display: block; color: var(--px-text); }
.theme-pixel-cozy .home-widget__char-info em { font-style: normal; font-size: 12px; color: var(--px-text-2); }
.theme-pixel-cozy .home-widget__refresh {
	font-family: var(--font-pixel);
	font-size: 10px;
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-text);
	padding: 6px 12px;
	margin-top: calc(var(--space) * 2);
	cursor: pointer;
}
.theme-pixel-cozy .home-widget__refresh:hover { border-color: var(--px-accent); color: var(--px-accent); }
.theme-pixel-cozy .tagcloud a { font-size: 12px !important; display: inline-block; margin: 2px 4px; padding: 2px 8px; background: var(--px-surface-2); border: 1px solid var(--px-line); border-radius: 2px; color: var(--px-text-2); }

/* ==========================================================================
   7. 页脚
   ========================================================================== */
.theme-pixel-cozy .site-footer {
	margin-top: calc(var(--space) * 5);
	padding: calc(var(--space) * 4) 0;
	background: var(--px-surface);
	border-top: 2px solid var(--px-accent-2);
}
.theme-pixel-cozy .site-footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: calc(var(--space) * 3);
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 calc(var(--space) * 3);
	font-size: 12px;
	color: var(--px-text-2);
}
.theme-pixel-cozy .site-footer__credit { font-family: var(--font-pixel); font-size: 9px; }
.theme-pixel-cozy .site-footer__motto { display: block; margin-top: 4px; color: var(--px-text-3); }
.theme-pixel-cozy .site-footer__nav ul { display: flex; gap: calc(var(--space) * 2); list-style: none; margin: 0; padding: 0; }
.theme-pixel-cozy .site-footer__nav a { color: var(--px-text-2); font-size: 12px; }

/* 毛玻璃贴片：卡片/面板半透明 + 模糊，让视频画面透出、文字仍清晰 */
.theme-pixel-cozy .portal-card,
.theme-pixel-cozy .post-card,
.theme-pixel-cozy .mini-card,
.theme-pixel-cozy .home-about,
.theme-pixel-cozy .home-widget,
.theme-pixel-cozy .clock,
.theme-pixel-cozy .px-emblem {
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

/* ==========================================================================
   8. 背景 Canvas / 噪点 / 层级
   ========================================================================== */
.theme-pixel-cozy .px-video-bg {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -3;
	pointer-events: none;
}
.theme-pixel-cozy .px-video-scrim {
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(8, 13, 11, 0.26), rgba(8, 13, 11, 0.50));
}
.theme-pixel-cozy .px-canvas {
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
}
.theme-pixel-cozy .px-noise {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: radial-gradient(circle, rgba(126, 144, 192, var(--px-noise-op)) 1px, transparent 1px);
	background-size: var(--px-noise-size) var(--px-noise-size);
	mix-blend-mode: overlay;
}
.theme-pixel-cozy .site-header,
.theme-pixel-cozy .site-container,
.theme-pixel-cozy .site-footer { position: relative; }

/* ==========================================================================
   9. 特效：滚动进度条 / 时刻按钮 / 静音 / 文章指纹（功能 3-9）
   ========================================================================== */
/* 滚动像素进度条（右侧 20 块） */
.theme-pixel-cozy .px-progress {
	position: fixed;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 0;
	justify-content: space-evenly;
	z-index: 50;
}
.theme-pixel-cozy .px-progress__block {
	width: 4px;
	height: 4px;
	background: var(--px-line);
	transition: background .18s ease, transform .18s ease;
}
.theme-pixel-cozy .px-progress__block.px-on { background: var(--px-accent); transform: scale(1.6); }

/* 「设置」浮窗入口（右侧，收纳声音等控制） */
.theme-pixel-cozy .px-settings {
	position: fixed;
	right: 8px;
	top: 38%;
	z-index: 70;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-accent);
	box-shadow: 2px 2px 0 rgba(126, 144, 192, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
	transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.theme-pixel-cozy .px-settings:hover { border-color: var(--px-accent); color: var(--px-accent-deep); transform: translate(-1px, -1px); }
.theme-pixel-cozy .px-settings.px-on { background: var(--px-accent); border-color: var(--px-accent); color: #fff; }
.theme-pixel-cozy .px-settings svg { width: 17px; height: 17px; display: block; }

/* 设置面板 */
.theme-pixel-cozy .px-settings-panel {
	position: fixed;
	right: 10px;
	top: calc(38% + 48px);
	z-index: 70;
	width: 160px;
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	box-shadow: 3px 3px 0 rgba(126, 144, 192, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 10px;
}
.theme-pixel-cozy .px-settings-panel[hidden] { display: none; }
.theme-pixel-cozy .px-settings-panel__title {
	font-family: var(--font-pixel);
	font-size: 10px;
	letter-spacing: 0.12em;
	color: var(--px-text-3);
	padding: 2px 2px 8px;
	border-bottom: 1px solid var(--px-line);
	margin-bottom: 8px;
}
.theme-pixel-cozy .px-settings-sound {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 10px;
	background: var(--px-surface-2);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	color: var(--px-text-2);
	cursor: pointer;
	transition: all .18s ease;
}
.theme-pixel-cozy .px-settings-sound:hover { border-color: var(--px-accent); color: var(--px-text); }
.theme-pixel-cozy .px-settings-sound__label { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.08em; }
.theme-pixel-cozy .px-settings-sound__icon { display: flex; align-items: center; color: var(--px-accent); }
.theme-pixel-cozy .px-settings-sound__icon svg { width: 15px; height: 15px; }

/* 「设置」按钮放到顶部导航栏"友链"项旁边，点击下方弹出设置面板 */
.theme-pixel-cozy .px-settings-li { position: relative; display: flex; align-items: center; }
.theme-pixel-cozy .px-settings--nav {
	position: static;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	background: transparent;
	border: 2px solid transparent;
	border-radius: 4px;
	color: var(--px-text-2);
	cursor: pointer;
	transition: all .18s ease;
}
.theme-pixel-cozy .px-settings--nav:hover { color: var(--px-accent); border-color: var(--px-line); }
.theme-pixel-cozy .px-settings--nav.px-on { color: var(--px-accent); border-color: var(--px-accent); }
.theme-pixel-cozy .px-settings--nav svg { width: 16px; height: 16px; display: block; }
.theme-pixel-cozy .px-settings-panel--nav {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 170px;
	z-index: 80;
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	box-shadow: 3px 3px 0 rgba(126, 144, 192, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 10px;
}
.theme-pixel-cozy .px-settings-panel--nav[hidden] { display: none; }

/* 时刻切换面板（像素黄昏） */
.theme-pixel-cozy .px-times {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 60;
	display: flex;
	gap: 4px;
	background: var(--px-surface-solid);
	border: 2px solid var(--px-line);
	border-radius: 4px;
	padding: 4px;
}
.theme-pixel-cozy .px-times__btn {
	font-family: var(--font-pixel);
	font-size: 9px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 2px;
	color: var(--px-text-2);
	padding: 5px 6px;
	cursor: pointer;
}
.theme-pixel-cozy .px-times__btn:hover { color: var(--px-text); }
.theme-pixel-cozy .px-times__btn.px-on { background: var(--px-accent); color: #fff; border-color: var(--px-accent); }

/* 卡片像素升起（守卫类 .px-anim：JS 正常才隐藏初始态） */
.theme-pixel-cozy.px-anim .px-card,
.theme-pixel-cozy.px-anim .portal-card,
.theme-pixel-cozy.px-anim .post-card,
.theme-pixel-cozy.px-anim .home-widget,
.theme-pixel-cozy.px-anim .mini-card,
.theme-pixel-cozy.px-anim .home-about { opacity: 0; }
.theme-pixel-cozy.px-anim .px-card.visible,
.theme-pixel-cozy.px-anim .portal-card.visible,
.theme-pixel-cozy.px-anim .post-card.visible,
.theme-pixel-cozy.px-anim .home-widget.visible,
.theme-pixel-cozy.px-anim .mini-card.visible,
.theme-pixel-cozy.px-anim .home-about.visible { opacity: 1; animation: lie-px-rise .45s ease forwards; }
@keyframes lie-px-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 文章指纹码（16×16 点阵，点击放大） */
.theme-pixel-cozy .px-fingerprint { margin: calc(var(--space) * 4) 0; text-align: center; }
.theme-pixel-cozy .px-fingerprint__title { font-family: var(--font-pixel); font-size: 10px; color: var(--px-accent); letter-spacing: 0.1em; margin-bottom: 8px; }
.theme-pixel-cozy .px-fingerprint__grid {
	display: grid;
	grid-template-columns: repeat(16, 6px);
	grid-template-rows: repeat(16, 6px);
	gap: 0;
	margin: 0 auto;
	width: fit-content;
	cursor: pointer;
}
.theme-pixel-cozy .px-fingerprint__dot { width: 6px; height: 6px; background: rgba(126, 144, 192, 0.15); }
.theme-pixel-cozy .px-fingerprint__dot.px-on { background: var(--px-accent); }
.theme-pixel-cozy .px-fingerprint__hex { font-family: var(--font-pixel); font-size: 10px; color: var(--px-text-3); margin-top: 8px; letter-spacing: 0.1em; }
.theme-pixel-cozy .px-fingerprint__grid.px-zoom { grid-template-columns: repeat(16, 8px); grid-template-rows: repeat(16, 8px); }
.theme-pixel-cozy .px-fingerprint__mask { position: fixed; inset: 0; z-index: 999; background: rgba(74, 59, 50, 0.6); }
.theme-pixel-cozy .px-fingerprint__zoom-hex { position: fixed; z-index: 1000; font-family: var(--font-pixel); font-size: 12px; color: var(--px-text); background: var(--px-surface-solid); border: 2px solid var(--px-accent); padding: 6px 10px; border-radius: 4px; }

/* ==========================================================================
   10. 响应式
   ========================================================================== */
@media (max-width: 900px) {
	.theme-pixel-cozy .home-layout { grid-template-columns: 1fr; }
	.theme-pixel-cozy .portal-cards { grid-template-columns: repeat(2, 1fr); }
	.theme-pixel-cozy .post-card { flex-direction: column; }
	.theme-pixel-cozy .post-card__thumb { flex: none; border-right: none; border-bottom: 2px solid var(--px-line); }
	.theme-pixel-cozy .stats__row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.theme-pixel-cozy .portal-cards { grid-template-columns: 1fr; }
	.theme-pixel-cozy .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   11. 全局组件像素化（跨页面通用构件）
   ========================================================================== */
/* HUD 鼠标XY追踪器：像素主题隐藏，仅在默认档案室主题显示 */
body.theme-pixel-cozy .hud-tracker { display: none; }

/* 看板娘语音键：设置面板已提供声音开关，隐藏模型旁的按钮（保留 DOM 供设置面板控制） */
body.theme-pixel-cozy .site-mascot__voice { display: none; }

/* ---------- 像素光标 v2 补丁：像素箭头 + 隐藏霓虹光标 + 像素点击特效 ---------- */
/* px-cursor-v2-marker */


/* 双保险：即使 html 有 has-custom-cursor 旧缓存被加了 cursor:none，也强制像素箭头 */


/* 隐藏基座霓虹光标 */
.theme-pixel-cozy .cursor-dot,
.theme-pixel-cozy .cursor-ring {
	display: none;
}

/* 像素点击特效：月光蓝像素块从点击点炸开淡出 */
.theme-pixel-cozy .px-click-fx {
	position: fixed;
	z-index: 9999;
	pointer-events: none;
}
.theme-pixel-cozy .px-click-fx__block {
	position: absolute;
	width: 6px;
	height: 6px;
	background: #7E90C0;
	transform: translate(-50%, -50%);
	animation: px-click 0.38s ease-out forwards;
	opacity: 0.9;
}
@keyframes px-click {
	0%   { opacity: 0.95; }
	100% { transform: translate(calc(-50% + var(--fx-x, 0px)), calc(-50% + var(--fx-y, 0px))) rotate(90deg); opacity: 0; }
}

/* ---------- 发光箭头光标 v2（月光蓝光晕） ---------- */
/* px-glow-cursor-marker */
body.theme-pixel-cozy,
body.theme-pixel-cozy a,
body.theme-pixel-cozy button,
body.theme-pixel-cozy [role="button"],
body.theme-pixel-cozy .px-settings,
body.theme-pixel-cozy .px-mute {
	cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2730%27%20height%3D%2730%27%20viewBox%3D%270%200%2030%2030%27%20shape-rendering%3D%27crispEdges%27%3E%3Cpath%20d%3D%27M6%206%20L6%2022%20L10.5%2018.5%20L13%2024%20L15.5%2022.7%20L13%2017.2%20L18%2017.2%20Z%27%20fill%3D%27%230E1714%27%20stroke%3D%27%237E90C0%27%20stroke-width%3D%275%27%20opacity%3D%270.28%27%2F%3E%3Cpath%20d%3D%27M6%206%20L6%2022%20L10.5%2018.5%20L13%2024%20L15.5%2022.7%20L13%2017.2%20L18%2017.2%20Z%27%20fill%3D%27%230E1714%27%20stroke%3D%27%237E90C0%27%20stroke-width%3D%271.6%27%2F%3E%3C%2Fsvg%3E") 6 6, auto;
}
