/* ===================================================================
   LaoLuo Nav 主样式 (原创重写，仅做视觉还原)
   =================================================================== */
:root {
	--ln-accent: #6a5af9;
	--ln-accent-2: #a855f7;
	--ln-bg: #f7f8fc;
	--ln-surface: #ffffff;
	--ln-border: #ececf2;
	--ln-text: #2c2f3a;
	--ln-text-muted: #90919b;
	--ln-shadow: 0 6px 20px rgba(80, 80, 160, 0.06);
	--ln-radius: 14px;
	--ln-radius-sm: 8px;
	--ln-header-h: 62px;
	--ln-side-w: 188px;
	--ln-max: 1620px;
}
/* 深色模式变量覆盖由 JS 在 html 加 .ln-dark 实现 */
html.ln-dark {
	--ln-bg: #15161c;
	--ln-surface: #1c1e27;
	--ln-border: #2a2d38;
	--ln-text: #e9eaf0;
	--ln-text-muted: #8a8c96;
	--ln-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
	background: var(--ln-bg);
	color: var(--ln-text);
	font-size: 14px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul, h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.ln-skip {
	position: absolute; left: -9999px; top: 8px; background: var(--ln-accent); color: #fff; padding: 6px 12px; border-radius: 6px;
}
.ln-skip:focus { left: 8px; z-index: 9999; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; }

/* ---------- 顶部吸顶栏 ---------- */
.ln-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--ln-bg) 82%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--ln-border);
}
.ln-header-inner {
	max-width: var(--ln-max); margin: 0 auto; height: var(--ln-header-h);
	padding: 0 18px; display: flex; align-items: center; gap: 18px;
}
.ln-logo a { display: flex; align-items: center; font-size: 18px; font-weight: 700; }
.ln-logo-img { height: 30px; width: auto; }
.ln-logo-text { color: var(--ln-accent); }

.ln-main-nav { flex: 1; }
.ln-menu { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; gap: 2px; }
.ln-menu > li { position: relative; }
.ln-menu > li > a {
	display: inline-block; padding: 8px 12px; border-radius: 20px; color: var(--ln-text);
	font-size: 14px; transition: background .2s;
}
.ln-menu > li > a:hover { background: color-mix(in srgb, var(--ln-accent) 12%, transparent); color: var(--ln-accent); }
.ln-menu li ul { display: none; position: absolute; top: 100%; left: 0; background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: 10px; box-shadow: var(--ln-shadow); min-width: 150px; padding: 6px; z-index: 20; }
.ln-menu li:hover ul { display: block; }
.ln-menu li ul li a { display: block; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.ln-menu li ul li a:hover { background: color-mix(in srgb, var(--ln-accent) 10%, transparent); }

.ln-header-right { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.ln-ico-btn {
	width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; color: var(--ln-text); transition: background .2s;
}
.ln-ico-btn:hover { background: color-mix(in srgb, var(--ln-text) 9%, transparent); }
.ln-menu-toggle { display: none; width: 40px; height: 38px; background: none; border: 0; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.ln-menu-toggle span { width: 20px; height: 2px; background: var(--ln-text); display: block; border-radius: 2px; transition: all .3s; }

/* ---------- Banner 搜索区 ---------- */
.ln-home-banner {
	margin: 0; padding: 0; position: relative; overflow: hidden;
	background: linear-gradient(135deg, #8618db 0%, #d711ff 50%, #460fdd 100%);
	text-align: center;
}
.ln-banner-inner { max-width: var(--ln-max); margin: 0 auto; padding: 54px 18px 44px; }
.ln-hero-title {
	color: #fff; font-size: clamp(26px, 4vw, 42px); font-weight: 800; letter-spacing: .5px;
	text-shadow: 0 2px 12px rgba(0,0,0,.15); margin-bottom: 22px;
}
.ln-search-box { max-width: 720px; margin: 0 auto 12px; }
.ln-search-row {
	display: flex; background: #fff; border-radius: 999px; padding: 6px 6px 6px 22px;
	box-shadow: 0 12px 30px rgba(0,0,0,.18); transition: box-shadow .2s;
}
.ln-search-row:focus-within { box-shadow: 0 16px 40px rgba(0,0,0,.26); }
.ln-search-input {
	flex: 1; border: 0; outline: none; font-size: 15px; background: transparent; color: #333; min-width: 0;
}
.ln-search-btn {
	width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ln-accent); color: #fff;
	font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none;
	transition: transform .2s;
}
.ln-search-btn:hover { transform: scale(1.04); }
.ln-engine-tabs { display: flex; justify-content: center; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.ln-engine-tab {
	border: 0; background: rgba(255,255,255,.16); color: #fff; padding: 6px 16px; border-radius: 999px;
	font-size: 13px; transition: background .2s;
}
.ln-engine-tab.active { background: rgba(255,255,255,.92); color: var(--ln-accent); font-weight: 600; }

/* ---------- 搜索结果页：标题下的「共 N 条结果」 ---------- */
.ln-search-meta { margin: -8px 0 14px; font-size: 13px; color: var(--ln-text-muted); }
.ln-search-meta b { color: var(--ln-accent); }

/* ---------- 搜索结果页：内嵌搜索框（内容区是浅色底，覆盖 hero 那套深底样式） ---------- */
.ln-search-inline { margin: 0 0 18px; }
.ln-search-inline .ln-search-box { max-width: 100%; margin: 0; }
.ln-search-inline .ln-search-row {
	background: var(--ln-surface); border: 1px solid var(--ln-border);
	box-shadow: none; padding: 4px 4px 4px 18px;
}
.ln-search-inline .ln-search-row:focus-within { border-color: var(--ln-accent); box-shadow: none; }
.ln-search-inline .ln-search-input { color: var(--ln-text); font-size: 14px; }
.ln-search-inline .ln-search-btn { width: 40px; height: 40px; font-size: 15px; }
.ln-search-inline .ln-engine-tabs { justify-content: flex-start; margin-top: 10px; }
.ln-search-inline .ln-engine-tab {
	background: var(--ln-bg); color: var(--ln-text-muted); border: 1px solid var(--ln-border);
}
.ln-search-inline .ln-engine-tab.active { background: var(--ln-accent); border-color: var(--ln-accent); color: #fff; }

/* ---------- 搜索命中高亮 ---------- */
.ln-hl {
	background: color-mix(in srgb, var(--ln-accent) 18%, transparent);
	color: inherit; font-weight: 600; padding: 0 2px; border-radius: 4px;
}

/* ---------- 搜索无结果时的推荐 ---------- */
.ln-search-suggest { margin-top: 24px; }
.ln-suggest-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.ln-suggest-title i { color: var(--ln-accent); margin-right: 6px; }
.ln-suggest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ln-suggest-tags a {
	display: inline-flex; align-items: center; padding: 5px 13px; font-size: 13px;
	border: 1px solid var(--ln-border); border-radius: 999px; color: var(--ln-text-muted); transition: all .2s;
}
.ln-suggest-tags a:hover { border-color: var(--ln-accent); color: var(--ln-accent); }

/* ---------- 标签页（/tags）：热门标签 pills + 筛选框 + 标签云 ---------- */
.ln-tags-section { margin-top: 22px; }
.ln-tags-section .ln-section-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.ln-tag-filter { position: relative; max-width: 320px; margin-bottom: 12px; }
.ln-tag-filter i {
	position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
	font-size: 12px; color: var(--ln-text-muted); pointer-events: none;
}
.ln-tag-filter-input {
	width: 100%; height: 36px; padding: 0 12px 0 30px; font-size: 13px;
	color: var(--ln-text); background: var(--ln-surface);
	border: 1px solid var(--ln-border); border-radius: 999px; outline: none;
}
.ln-tag-filter-input:focus { border-color: var(--ln-accent); }
.ln-tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ln-tag-pill {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px;
	color: var(--ln-text); background: var(--ln-surface);
	border: 1px solid var(--ln-border); border-radius: 999px; transition: all .2s;
}
.ln-tag-pill:hover { border-color: var(--ln-accent); color: var(--ln-accent); }
.ln-tag-pill[hidden] { display: none !important; }
.ln-tag-count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; line-height: 1;
	color: #fff; background: var(--ln-accent); border-radius: 999px;
}
.ln-tag-empty { margin-top: 10px; font-size: 13px; color: var(--ln-text-muted); }
.ln-tags-group { margin-bottom: 18px; }
.ln-tags-group[hidden] { display: none !important; }
.ln-tags-group-title {
	display: flex; align-items: center; gap: 8px;
	font-size: 14px; font-weight: 600; margin: 0 0 8px;
}
.ln-tags-group-title::before {
	content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--ln-accent);
}
.ln-tags-group-count { font-size: 11px; font-weight: 400; color: var(--ln-text-muted); }
.ln-tag-cloud {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
	padding: 16px; background: var(--ln-surface);
	border: 1px solid var(--ln-border); border-radius: var(--ln-radius);
}
.ln-tag-cloud a { color: var(--ln-text-muted); text-decoration: none; line-height: 1.5; }
.ln-tag-cloud a:hover { color: var(--ln-accent); }

/* ---------- 主体双栏布局 ---------- */
.ln-layout {
	display: flex; gap: 20px; max-width: var(--ln-max); margin: 24px auto 40px; padding: 0 18px; align-items: flex-start;
}
.ln-side { width: var(--ln-side-w); flex: none; position: sticky; top: calc(var(--ln-header-h) + 18px); z-index: 90; }
.ln-side-inner {
	background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: var(--ln-radius);
	box-shadow: var(--ln-shadow); overflow: hidden;
}
.ln-side-head { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--ln-border); color: var(--ln-text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.ln-side-list { list-style: none; margin: 0; padding: 8px; }
.ln-side-item { margin-bottom: 2px; }
.ln-side-top { display: flex; align-items: center; }
.ln-side-link {
	flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--ln-text);
	transition: background .2s, color .2s;
}
.ln-side-link i { color: var(--ln-text-muted); width: 16px; flex: none; }
.ln-side-link:hover, .ln-side-item.active .ln-side-link { background: color-mix(in srgb, var(--ln-accent) 12%, transparent); color: var(--ln-accent); }
.ln-side-fold {
	flex: none; margin-right: 6px; background: none; border: 0; color: var(--ln-text-muted);
	font-size: 12px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 6px; transition: color .2s, background .2s;
}
.ln-side-fold:hover { color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 10%, transparent); }
.ln-side-item.open .ln-side-fold i { transform: rotate(-180deg); }
.ln-side-fold i { transition: transform .25s; }
.ln-side-sub {
	list-style: none; margin: 0; padding: 2px 4px 8px 14px; display: none;
}
.ln-side-item.open .ln-side-sub { display: block; }
/* 仅鼠标设备：悬停父条目的整行"顶部+子列表"区域时自动展开 */
@media (hover: hover) and (pointer: fine) {
	.ln-side-item:hover .ln-side-sub { display: block; }
}
.ln-side-sub a { display: block; padding: 6px 10px; font-size: 13px; border-radius: 6px; color: var(--ln-text-muted); }
.ln-side-sub a:hover { color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent); }

.ln-main { flex: 1; min-width: 0; }
/* 首页主体内容直接用容器而非额外 padding，由 section 负责卡片栅格 */

/* ---------- 分区/区块 ---------- */
.ln-section { margin-bottom: 26px; }
.ln-cat-section { scroll-margin-top: calc(var(--ln-header-h) + 12px); }
.ln-section-head {
	display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.ln-section-title { font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.ln-title-ico { color: var(--ln-accent); }

/* 一级分类标题后的灰色横线 + 最右端 more+（参考 iowen “常用推荐”区块头部） */
.ln-sec-line {
	flex: 1 1 auto; min-width: 10px; height: 1px; align-self: center;
	background: color-mix(in srgb, var(--ln-text) 13%, transparent);
}
.ln-sec-more {
	flex: 0 0 auto; margin-left: 14px; white-space: nowrap;
	display: inline-flex; align-items: center; gap: 3px;
	color: var(--ln-text-muted); font-size: 13px; font-weight: 600; text-decoration: none;
	transition: color .18s, transform .18s;
}
.ln-sec-more:hover { color: var(--ln-accent); }
.ln-sec-more::after { content: "\203A"; font-weight: 700; }
.ln-sub-title {
	font-size: 14px; color: var(--ln-accent); font-weight: 600;
	margin: 18px 0 10px; display: flex; align-items: center; gap: 6px;
	scroll-margin-top: calc(var(--ln-header-h) + 12px);
}
.ln-sub-title::before { content: ""; width: 4px; height: 14px; background: var(--ln-accent); border-radius: 2px; }

/* 二级分类：一级 section 内的横排筛选条 + 点击切换面板 */
.ln-filter-bar {
	display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
	overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
	padding: 2px 2px 8px; margin: -2px 0 4px;
}
.ln-filter-item {
	flex: 0 0 auto; white-space: nowrap; cursor: pointer;
	border: 1px solid var(--ln-border); background: var(--ln-surface);
	color: var(--ln-text-muted); padding: 6px 15px; border-radius: 999px; font-size: 13px;
	transition: background .18s, color .18s, border-color .18s;
	scroll-margin-top: calc(var(--ln-header-h) + 12px);
}
.ln-filter-item:hover { border-color: var(--ln-accent); color: var(--ln-accent); }
.ln-filter-item.active {
	background: var(--ln-accent); border-color: var(--ln-accent); color: #fff; font-weight: 600;
}
.ln-filter-panel { display: none; }
.ln-filter-panel.active { display: block; }
.ln-filter-panel + .ln-filter-bar { margin-top: 6px; }
.ln-filter-bar::-webkit-scrollbar { height: 6px; }
.ln-filter-bar::-webkit-scrollbar-thumb { background: var(--ln-border); border-radius: 3px; }

/* ---------- 首页右侧辅助栏（三栏布局第三栏，对齐 OneNav 演示站） ---------- */
.ln-aside { width: var(--ln-aside-w, 270px); flex: none; }
.ln-aside-inner { position: sticky; top: calc(var(--ln-header-h) + 18px); display: flex; flex-direction: column; gap: 16px; }
.ln-widget { background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: var(--ln-radius); box-shadow: var(--ln-shadow); overflow: hidden; }
.ln-widget-head { padding: 11px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--ln-border); display: flex; align-items: center; gap: 7px; }
.ln-widget-head i { color: var(--ln-accent); }
@media (max-width: 1320px) { .ln-aside { width: 238px; } }
@media (max-width: 1180px) { .ln-aside { width: 214px; } }
@media (max-width: 1100px) {
	.ln-aside { width: 100%; }
	.ln-aside-inner { position: static; display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; }
}
@media (max-width: 720px) { .ln-aside-inner { grid-template-columns: 1fr; } }

/* 桌面窄栏：保留“每个小工具各一张独立小卡片”（白底+边框+圆角+阴影，用间距分隔）；
   同时让整条 .ln-aside 像左栏 .ln-side 一样 position:sticky，随页面滚动吸附跟随。
   平板/手机（右栏变通栏）仍走上面的多小工具独立卡片网格。
   1.13.0：小工具总高度经常远超视口（如「Tag Groups标签」能列出上百个标签），
   只用 sticky 会让侧栏"钉"在顶部、下面的小工具永远看不到 —— 因此给 .ln-aside-inner
   加 max-height + 自身滚动：整条侧栏跟着页面走，栏内也能滚到任意小工具。 */
@media (min-width: 1101px) {
	.ln-aside { position: sticky; top: calc(var(--ln-header-h) + 18px); z-index: 90; }
	.ln-aside-inner {
		max-height: calc(100vh - var(--ln-header-h) - 36px);
		overflow-y: auto;
		padding-right: 2px;
		scrollbar-width: thin;
	}
	.ln-aside-inner::-webkit-scrollbar { width: 6px; }
	.ln-aside-inner::-webkit-scrollbar-track { background: transparent; }
	.ln-aside-inner::-webkit-scrollbar-thumb { background: var(--ln-border); border-radius: 3px; }
	.ln-aside-inner::-webkit-scrollbar-thumb:hover { background: var(--ln-text-muted); }
}
/* 后台“外观-小工具”里添加的通用小工具内容样式 */
.ln-widget .textwidget,
.ln-widget .custom-html-widget { padding: 12px 14px; font-size: 13px; word-break: break-word; }
.ln-widget .custom-html-widget img { border-radius: 6px; }
.ln-widget ul { list-style: none; margin: 0; padding: 8px 10px; }
.ln-widget ul li a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--ln-text); font-size: 13px; }
.ln-widget ul li a:hover { color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent); }
.ln-widget .search-form { padding: 12px; display: flex; gap: 6px; }

/* ===== Tag Groups标签 小工具（按插件分组展示各分组标签云） ===== */
.ln-tg { padding: 12px 14px; font-size: 13px; }
.ln-tg-empty { margin: 0; color: var(--ln-text-muted); }
.ln-tg-group + .ln-tg-group { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ln-border); }
.ln-tg-group-title {
	display: flex; align-items: center; gap: 6px;
	margin: 0 0 9px; font-weight: 700; font-size: 13px; color: var(--ln-text);
}
.ln-tg-group-title::before {
	content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--ln-accent);
}
.ln-tg-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-tg-tag {
	display: inline-flex; align-items: center;
	padding: 3px 10px; border: 1px solid var(--ln-border); border-radius: 20px;
	background: color-mix(in srgb, var(--ln-text) 4%, transparent);
	font-size: 12px; line-height: 1.6; color: var(--ln-text); text-decoration: none;
	transition: color .15s, border-color .15s, background .15s;
}
.ln-tg-tag:hover { color: var(--ln-accent); border-color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent); }
.ln-tg-count { margin-left: 4px; font-size: 11px; opacity: .72; font-weight: 500; }

/* ---------- 首页“热门网址”：站点卡片（对齐 iowen posts-item：左图标 + 右名称/简介 + 直达） ---------- */
.ln-hot-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
.ln-hot-card {
	position: relative; display: flex; min-width: 0;
	background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: var(--ln-radius);
	box-shadow: var(--ln-shadow); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ln-hot-card:hover { transform: translateY(-2px); border-color: var(--ln-accent); box-shadow: 0 10px 22px rgba(80, 80, 160, .12); }
.ln-hot-card-link { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 4px 12px 12px; min-width: 0; }
.ln-hot-card-ico {
	width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden;
	background: color-mix(in srgb, var(--ln-accent) 10%, transparent);
	display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: var(--ln-accent);
}
.ln-hot-card-ico img { width: 100%; height: 100%; object-fit: contain; }
.ln-hot-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ln-hot-card-title { font-size: 14px; font-weight: 600; color: var(--ln-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-hot-card:hover .ln-hot-card-title { color: var(--ln-accent); }
.ln-hot-card-desc { font-size: 12px; color: var(--ln-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-hot-card-go {
	flex: none; align-self: stretch; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; color: var(--ln-text-muted); font-size: 13px; transition: color .15s, background .15s;
}
.ln-hot-card-go:hover { color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent); }
.ln-hot-more { border: 0; background: none; display: inline-flex; align-items: center; gap: 5px; color: var(--ln-accent); font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.ln-hot-more:hover { background: color-mix(in srgb, var(--ln-accent) 10%, transparent); }
.ln-hot-more i { transition: transform .2s; }
.ln-hot-section.is-expanded .ln-hot-more i { transform: rotate(180deg); }
@media (max-width: 600px) { .ln-hot-cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 网格 ---------- */
.ln-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .ln-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .ln-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) {
	.ln-grid-hot { grid-template-columns: repeat(6, 1fr); }
	.ln-layout:not(.ln-body-home) .ln-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1500px) { .ln-grid:not(.ln-grid-hot) { grid-template-columns: repeat(5, 1fr); } }

/* ---------- 卡片（行式紧凑：左图标 + 右名称/简介 + 直达） ---------- */
.ln-card {
	position: relative; display: flex; align-items: stretch; min-width: 0;
	background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: var(--ln-radius);
	box-shadow: var(--ln-shadow); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ln-card:hover { transform: translateY(-2px); border-color: var(--ln-accent); box-shadow: 0 10px 22px rgba(80, 80, 160, .12); }
.ln-card-link { flex: 1; display: flex; align-items: center; gap: 10px; padding: 11px 4px 11px 11px; min-width: 0; }
.ln-card-media {
	width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden;
	background: color-mix(in srgb, var(--ln-accent) 10%, transparent);
	display: inline-flex; align-items: center; justify-content: center;
}
.ln-card-icon { width: 100%; height: 100%; object-fit: contain; }
.ln-card-letter { font-size: 18px; font-weight: 800; color: var(--ln-accent); }
.ln-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ln-card-title { font-size: 14px; font-weight: 600; color: var(--ln-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.ln-card:hover .ln-card-title { color: var(--ln-accent); }
.ln-card-desc { font-size: 12px; color: var(--ln-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.ln-card-go {
	flex: none; align-self: stretch; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; color: var(--ln-text-muted); font-size: 13px; transition: color .15s, background .15s;
}
.ln-card-go:hover { color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent); }
.ln-card { overflow: visible; }
.ln-card-go { position: relative; }
.ln-card-go i { font-size: 13px; }
.ln-card-go::after {
	content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
	background: #3a434d; color: #fff; font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 6px;
	white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; pointer-events: none; z-index: 14;
}
.ln-card-go::before {
	content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
	border: 5px solid transparent; border-left-color: #3a434d; opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; z-index: 14;
}
.ln-card-go:hover::after,
.ln-card-go:hover::before { opacity: 1; visibility: visible; }

/* 博客类列表内容区 */
.ln-content-page {
	background: var(--ln-surface); border: 1px solid var(--ln-border); border-radius: var(--ln-radius);
	box-shadow: var(--ln-shadow); padding: 22px; width: 100%; min-height: 40vh;
}
.ln-page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.ln-page-title .ln-title-ico { color: var(--ln-accent); margin-right: 8px; font-size: 18px; }
.ln-page-body, .ln-single-body { font-size: 15px; line-height: 1.75; }
.ln-page-body p, .ln-single-body p { margin-bottom: 1em; }
.ln-page-body img, .ln-single-body img { border-radius: 8px; }
.ln-page-body h2, .ln-single-body h2 { font-size: 20px; margin: 1.2em 0 .5em; }
.ln-blog-list .ln-post-item { border-bottom: 1px solid var(--ln-border); padding: 14px 0; }
.ln-blog-list .ln-post-item:last-child { border-bottom: 0; }
.ln-post-title { font-size: 17px; margin-bottom: 4px; }
.ln-post-title a:hover { color: var(--ln-accent); }
.ln-post-time { font-size: 12px; color: var(--ln-text-muted); margin-bottom: 6px; }
.ln-post-excerpt { font-size: 14px; color: var(--ln-text-muted); }

.ln-pagination { margin-top: 20px; display: flex; justify-content: center; }
.ln-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px;
	margin: 0 3px; border: 1px solid var(--ln-border); border-radius: 8px; font-size: 13px;
}
.ln-pagination .page-numbers.current { background: var(--ln-accent); color: #fff; border-color: var(--ln-accent); }

.ln-empty { text-align: center; padding: 60px 20px; color: var(--ln-text-muted); }
.ln-empty i { display: block; margin-bottom: 12px; color: var(--ln-text-muted); }

/* ---------- 站点详情页（对齐 iowen /sites） ---------- */
.ln-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ln-text-muted); margin-bottom: 16px; }
.ln-breadcrumb a:hover { color: var(--ln-accent); }
.ln-breadcrumb i { font-size: 10px; color: #c3c6ce; }
.ln-single-hero { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px solid var(--ln-border); }
.ln-single-hero-ico {
	width: 74px; height: 74px; flex: none; border-radius: 16px; overflow: hidden;
	background: color-mix(in srgb, var(--ln-accent) 10%, transparent);
	display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--ln-accent);
}
.ln-single-hero-ico img { width: 100%; height: 100%; object-fit: contain; }
.ln-single-hero-main { flex: 1; min-width: 0; }
.ln-single-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.ln-single-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ln-text-muted); margin-bottom: 8px; }
.ln-single-meta span { display: inline-flex; align-items: center; gap: 5px; }
/* 搬进 meta 行的分类 chips：保持原 chips 容器的 8px 间距 */
.ln-single-meta .ln-single-cats { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ln-single-meta a:hover { color: var(--ln-accent); }
.ln-single-url { font-size: 14px; font-weight: 600; color: var(--ln-accent); margin-bottom: 8px; word-break: break-all; display: inline-flex; align-items: center; gap: 6px; }
.ln-single-intro { font-size: 14px; color: var(--ln-text-muted); line-height: 1.6; margin-bottom: 14px; }
.ln-single-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ln-single-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ln-tag-chip {
	font-size: 12px; color: var(--ln-accent); background: color-mix(in srgb, var(--ln-accent) 8%, transparent);
	border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; transition: border-color .15s;
}
.ln-tag-chip:hover { border-color: var(--ln-accent); }
/* 区块标题最右端：可点击复制的标签关键词 chip */
.ln-tag-copy {
	flex: 0 0 auto; margin-left: 14px; white-space: nowrap; font-family: inherit;
	font-size: 12px; color: var(--ln-accent); cursor: pointer;
	background: color-mix(in srgb, var(--ln-accent) 8%, transparent);
	border: 1px solid transparent; border-radius: 999px; padding: 3px 10px;
	transition: border-color .15s, background .15s, color .15s;
}
.ln-tag-copy:hover { border-color: var(--ln-accent); }
.ln-tag-copy.is-copied { background: var(--ln-accent); color: #fff; border-color: var(--ln-accent); }

/* ---------- 详情页：GitHub 仓库信息卡片（实时获取+本地缓存，无图） ---------- */
.ln-repo-card {
	display: block; width: 100%; margin-top: 18px; padding: 14px 16px;
	background: var(--ln-surface); border: 1px solid var(--ln-border);
	border-radius: var(--ln-radius); box-shadow: var(--ln-shadow);
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ln-repo-card:hover { transform: translateY(-2px); border-color: var(--ln-accent); box-shadow: 0 10px 22px rgba(80, 80, 160, .12); }
.ln-repo-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ln-text); margin-bottom: 8px; }
.ln-repo-head i { color: var(--ln-text-muted); }
.ln-repo-name { min-width: 0; word-break: break-all; }
.ln-repo-go { margin-left: auto; flex: none; font-size: 12px; color: var(--ln-text-muted); transition: color .15s; }
.ln-repo-card:hover .ln-repo-go { color: var(--ln-accent); }
.ln-repo-desc { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--ln-text-muted); }
/* 统计行：参考 gitshare 的 .repo-meta（顶部细线 + 横向排列） */
.ln-repo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid var(--ln-border); font-size: 12.5px; color: var(--ln-text-muted); }
.ln-repo-meta-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ln-repo-dot { font-size: 7px; color: var(--ln-accent); }
.ln-repo-archived { color: #d97706; }
.ln-related { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--ln-border); }
.ln-related-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ln-related-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ln-related-title i { color: var(--ln-accent); }
.ln-related-more { font-size: 13px; color: var(--ln-accent); }
.ln-single-foot { margin-top: 8px; }
@media (max-width: 520px) { .ln-single-hero { flex-direction: column; } }

/* 按钮（单页用） */
.ln-btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px;
	border: 1px solid var(--ln-border); font-size: 14px; color: var(--ln-text); transition: all .2s;
}
.ln-btn-primary { background: var(--ln-accent); border-color: var(--ln-accent); color: #fff; }
.ln-btn:hover { opacity: .9; }

/* 404 */
.ln-404 { text-align: center; }
.ln-404-box { padding: 60px 20px; }
.ln-404-code { font-size: 80px; font-weight: 900; color: var(--ln-accent); }
.ln-404-text { color: var(--ln-text-muted); margin-bottom: 20px; }

/* ---------- 页脚 ---------- */
.ln-footer { background: var(--ln-surface); border-top: 1px solid var(--ln-border); }
.ln-footer-inner {
	max-width: var(--ln-max); margin: 0 auto; padding: 18px 18px;
	display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--ln-text-muted); flex-wrap: wrap;
}
.ln-icp { color: var(--ln-text-muted); }

/* 移动端 mask */
.ln-mobile-mask { display: none; }

/* ---------- 空无分区时的提示，覆盖 ln-empty 在首页 ---------- */
.ln-empty p b { color: var(--ln-accent); }

/* ---------- 响应式：平板与小屏隐藏侧栏并改顶仓 ---------- */
@media (max-width: 1100px) {
	.ln-layout { flex-direction: column; }
	.ln-side { width: 100%; position: static; }
	.ln-side-head { display: none; }
	.ln-side-list { display: flex; flex-wrap: wrap; padding: 8px; gap: 4px; }
	.ln-side-item { flex: 0 0 auto; }
	/* 横排时父项采用胶囊块；子项仍可点箭头展开，整块换行下沉以保可点 */
	.ln-side-item { display: flex; flex-direction: column; }
	.ln-side-top {
		background: color-mix(in srgb, var(--ln-text) 5%, transparent);
		border-radius: 8px; overflow: hidden;
	}
	.ln-side-item.open .ln-side-sub { display: block; }
}
@media (max-width: 860px) {
	.ln-main-nav { position: fixed; top: var(--ln-header-h); left: 0; right: 0; background: var(--ln-surface); border-bottom: 1px solid var(--ln-border); padding: 14px 18px; transform: translateY(-120%); transition: transform .3s; flex: 0 0 auto; }
	.ln-main-nav.is-open { transform: translateY(0); }
	.ln-menu { flex-direction: column; align-items: stretch; gap: 4px; }
	.ln-menu li ul { position: static; box-shadow: none; border: 0; padding-left: 16px; display: none; }
	.ln-menu-toggle { display: flex; }
	.ln-banner-inner { padding: 34px 14px 30px; }
	.ln-search-row { padding-left: 16px; }
	.ln-header-inner { gap: 6px; }
}
@media (max-width: 480px) {
	.ln-grid { gap: 10px; }
	.ln-layout { padding: 0 12px; margin-top: 16px; }
}

/* ====== 左侧分类栏：悬停父项 -> 右侧弹出二级面板(两列) ====== */
 /* .ln-side 使用基础样式的 position:sticky，滚动页面时左栏跟随显示；
    二级浮层由 .ln-side-item 相对定位承载，不受 sticky 影响，无需改回 static。 */
 .ln-side:hover .ln-side-inner,
 .ln-side-inner{ overflow: visible; }   /* 关键：释放裁切，让悬浮面板越出栏宽 */
 .ln-side-item{ position: relative; }
 /* 隐藏原折叠展开按钮，交互改为 hover */
 .ln-side-fold{ display:none !important; }

 /* 二级浮层：隐藏→父 hover 显示；定位到主栏右侧并压在主内容之上 */
 .ln-side-sub{
   display:none;
   position:absolute;
   left: calc(100% + 10px);
   top: -6px;                 /* 对齐高亮行附近 */
   right: auto;
   min-width: 330px;
   padding: 12px 14px 12px 16px;
   background: var(--ln-surface,#fff);
   border:1px solid var(--ln-border);
   border-radius: 12px;
   box-shadow: 0 14px 34px rgba(0,0,0,.16);
   column-count: 2;           /* --- 两列排布 --- */
   column-gap: 8px;
   z-index: 120;
   margin:0; list-style:none;
   transition: opacity .15s;
 }
 .ln-side-item:hover > .ln-side-sub{ display:block; }

 /* 确保连续悬停不丢失：给浮层左侧留虚拟热区 */
 .ln-side-item:hover::after{ content:""; position:absolute; left:100%; top:-12px; bottom:-12px; width:12px; }

 .ln-side-sub li{
   break-inside: avoid;
   white-space: nowrap;
 }
 .ln-side-sub a{
   display:block;
   padding: 6px 10px;
   font-size: 13px;
   color: var(--ln-text);
   border-radius: 7px;
 }
 .ln-side-sub a:hover{ background: color-mix(in srgb,var(--ln-accent) 12%,#fff); color: var(--ln-accent); }

 /* 平板以下：二级改回常规纵向折叠(不弹出)，避免悬停失控 */
 @media (max-width:1100px){
   .ln-side-inner{ overflow:hidden; }
   .ln-side-sub{ position:static; display:none; column-count:1; min-width:0; box-shadow:none; border:0; padding:0 0 4px 18px; }
   .ln-side-fold{ display:inline-flex !important; }
   .ln-side-item.open .ln-side-sub{ display:block; }
 }

/* 左栏二级菜单：文字居中 + 初始带背景色 + 鼠标经过橙色高亮 */
.ln-side-sub li { margin-bottom: 6px; }
.ln-side-sub a {
	display: flex; align-items: center; justify-content: center;
	padding: 7px 6px; font-size: 13px; text-align: center; white-space: nowrap;
	color: var(--ln-text); border-radius: 7px;
	background: color-mix(in srgb, var(--ln-text) 7%, transparent);
	transition: background .15s, color .15s;
}

/* 二级菜单：2px 主题色边框 + 柔和主题色光晕（随主题 --ln-accent） */
.ln-side-sub { border: 2px solid var(--ln-accent); box-shadow: 0 14px 34px rgba(0, 0, 0, .16), 0 0 0 3px color-mix(in srgb, var(--ln-accent) 20%, transparent); }

.ln-side-sub a:hover { background: var(--ln-accent); color: #fff; }


/* 直达箭头：默认隐藏，卡片 hover 才淡入显示 */
.ln-card-go { width: 0; opacity: 0; pointer-events: none; transition: width .2s ease, opacity .2s ease, background .15s, color .15s; }
.ln-card:hover .ln-card-go { width: 30px; opacity: 1; pointer-events: auto; }


/* 鼠标经过整块卡片：直达箭头与“直达”提示文字同步显示 */
.ln-card:hover .ln-card-go::after,
.ln-card:hover .ln-card-go::before { opacity: 1; visibility: visible; }


/* 直达箭头：居中小圆角钮，悬停/出现时突出系统主题蓝 */
.ln-card-go { align-self: center; height: 30px; border-radius: 8px; margin-right: 8px; }
.ln-card:hover .ln-card-go { background: transparent; color: var(--ln-text); }
.ln-card:hover .ln-card-go:hover { background: var(--ln-accent); color: #fff; }


/* 左栏分类数量（名称后括号） */
.ln-side-count { font-size: 11px; font-weight: 500; color: var(--ln-text-muted); margin-left: 2px; opacity: .85; }
.ln-side-link:hover .ln-side-count, .ln-side-sub a:hover .ln-side-count { color: inherit; }


/* 详情页：管理员编辑链接 */
.ln-single-edit a {
	font-size: 12px; color: var(--ln-accent);
	padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--ln-accent) 45%, transparent); border-radius: 6px;
	transition: background .15s, color .15s;
}
.ln-single-edit a:hover { background: var(--ln-accent); color: #fff; }


/* ===================================================================
   广告位（1.15.0，后台「老罗导航 ▸ 广告管理」）
   - 位置由模板决定：header_below / home_middle / archive_top / single_top / single_bottom / aside_right / footer_top
   - 尺寸自适应容器宽度；图片型保持原始比例、最大高度受限
   =================================================================== */
.ln-ad-zone {
	margin: 14px 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ln-ad-zone--header-below,
.ln-ad-zone--footer-top {
	max-width: var(--ln-max);
	margin: 12px auto;
	padding: 0 16px;
}
.ln-ad {
	position: relative;
	display: block;
	border-radius: var(--ln-radius-sm);
	overflow: hidden;
	background: var(--ln-surface);
	border: 1px solid var(--ln-border);
	box-shadow: var(--ln-shadow);
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.ln-ad:hover {
	transform: translateY(-1px);
	border-color: color-mix(in srgb, var(--ln-accent) 45%, var(--ln-border));
	box-shadow: 0 10px 24px rgba(80, 80, 160, .12);
}
.ln-ad-static { cursor: default; }

/* 图片型 */
.ln-ad--image { text-align: center; }
.ln-ad-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
}
.ln-ad-zone--aside-right .ln-ad-img { max-height: 300px; }
.ln-ad-caption {
	display: block;
	padding: 7px 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ln-text);
	text-align: left;
	background: color-mix(in srgb, var(--ln-bg) 60%, transparent);
}
.ln-ad-caption i {
	display: inline-block;
	margin-left: 8px;
	font-style: normal;
	font-weight: 400;
	font-size: 12px;
	color: var(--ln-text-muted);
}

/* 文字型（一条窄条） */
.ln-ad--text {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	font-size: 13.5px;
}
.ln-ad-text-main { font-weight: 600; }
.ln-ad-text-sub {
	color: var(--ln-text-muted);
	font-size: 12.5px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ln-ad-arrow { margin-left: auto; color: var(--ln-accent); font-size: 12px; }

/* 「广告」角标 */
.ln-ad-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 0 6px;
	line-height: 16px;
	font-size: 11px;
	color: #fff;
	background: rgba(0, 0, 0, .42);
	border-radius: 4px;
	letter-spacing: .5px;
}

/* 代码型：不加容器样式，交给广告代码自己 */
.ln-ad--code {
	border: 0;
	background: none;
	box-shadow: none;
	padding: 0;
}

/* 右栏宽度较窄：内边距与字号收一点 */
.ln-ad-zone--aside-right .ln-ad--text { padding: 8px 10px; }
.ln-ad-zone--aside-right .ln-ad-caption { font-size: 12.5px; }

@media (max-width: 640px) {
	.ln-ad-img { max-height: 160px; }
	.ln-ad-zone--header-below, .ln-ad-zone--footer-top { padding: 0 10px; }
}

