/* ============================================================
   首页门户 · 结构样式
   ------------------------------------------------------------
   这份文件只负责「版式与尺寸」，不放任何颜色主题值：
   边框、底纹、标题色全部落在皮肤的 .siderbar_head / .siderbar_main 上，
   换皮肤时四条横带和诗人索引自动跟着变。
   ============================================================ */

/* ---------- 1. 页面骨架：首页无侧栏，内容区 700 满宽 ---------- */

.home-layout {
	display: block;
	width: 700px;
}

.home-layout .content {
	width: 700px;
	max-width: 700px;
	padding: 4px 4px 10px;
	box-sizing: border-box;
	background: transparent;
	overflow: visible;
}

/* ---------- 4. 四块等宽横带：统一 150px，格子撑满 ---------- */

.pf-cat {
	height: 150px;
	display: flex;
	flex-direction: column;
}

.pf-cat > .siderbar_main {
	flex: 1 1 0;
	min-height: 0;
	overflow: hidden;
	padding: 3px 7px 4px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* 身边事：列数由后台「诗词阁 → 首页四大板块」决定（--myg-scene-cols） */
.pf-scenelist {
	list-style: none;
	margin: 0;
	padding: 0;
	height: 100%;
	display: grid;
	grid-template-columns: repeat(var(--myg-scene-cols, 4), minmax(0, 1fr));
}

.pf-scenelist li {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 8px 0 4px;
	line-height: 19px;
	border-right: 1px dotted #7b8996;
	overflow: hidden;
}

.pf-scenelist li:last-child {
	border-right: none;
}

.pf-sceneline {
	white-space: nowrap;
	line-height: 19px;
}

.pf-scene {
	font-size: 13px;
	text-decoration: none;
	color: inherit;
}

.pf-scene:hover {
	text-decoration: underline;
}

.pf-today {
	display: inline-block;
	margin-left: 3px;
	padding: 0 3px;
	font-size: 11px;
	line-height: 12px;
	color: #fff;
	background: #c62828;
}

.pf-poem {
	font-size: 12.5px;
	line-height: 19px;
	color: #6b7883;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-poem a {
	text-decoration: none;
	color: inherit;
}

.pf-poem a:hover {
	text-decoration: underline;
}

/* 心中情：列数由 --myg-mood-cols 决定，行高均分撑满 */
.pf-moods {
	height: 100%;
	display: grid;
	grid-template-columns: repeat(var(--myg-mood-cols, 4), minmax(0, 1fr));
	grid-auto-rows: 1fr;
}

.pf-mood {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 8px 0 4px;
	border-right: 1px dotted #7b8996;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}

/* 末列的无线，由后台按实际列数输出（见 inc/portal-style.php） */

.pf-mood:hover .pf-mood-t {
	text-decoration: underline;
}

.pf-mood-t {
	font-size: 14px;
	line-height: 19px;
}

.pf-mood-q {
	font-size: 12px;
	line-height: 17px;
	color: #4a5a66;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-mood-src {
	font-size: 11.5px;
	line-height: 15px;
	color: #8695a0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 心中情的句子与出处各自成链接，点了直接到那首诗 */
.pf-mood-t,
.pf-mood-q,
.pf-mood-src {
	display: block;
	text-decoration: none;
}

.pf-mood-q:hover,
.pf-mood-src:hover {
	text-decoration: underline;
}

/* 眼前景：字墙吃满中段，说明与摘句贴底 */
.pf-words {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0 6px;
}

.pf-w {
	text-decoration: none;
	color: inherit;
	line-height: 1;
	font-family: "KaiTi", "Kaiti SC", "STKaiti", "SimSun", serif;
}

.pf-w:hover {
	color: #c62828;
}

.pf-w1 { font-size: 40px; }
.pf-w2 { font-size: 35px; }
.pf-w3 { font-size: 30px; }
.pf-w4 { font-size: 26px; }
.pf-w5 { font-size: 23px; }

.pf-words-note {
	font-size: 12px;
	color: #6b7883;
}

.pf-wnote {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0 16px;
	margin: 4px 0 0;
	padding: 4px 0 0;
	border-top: 1px dotted #7b8996;
}

.pf-wnote li {
	font-size: 12px;
	line-height: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-wn-w {
	margin-right: 4px;
	font-size: 13px;
	text-decoration: none;
	color: inherit;
}

.pf-wn-q {
	color: #4a5a66;
	text-decoration: none;
}

.pf-wn-src {
	margin-left: 4px;
	font-size: 11px;
	color: #8695a0;
	text-decoration: none;
}

.pf-wn-q:hover,
.pf-wn-src:hover {
	text-decoration: underline;
}

/* 心头诗：列数由 --myg-line-cols 决定，行高均分撑满 */
.pf-lines {
	height: 100%;
	display: grid;
	grid-template-columns: repeat(var(--myg-line-cols, 2), minmax(0, 1fr));
	grid-auto-rows: 1fr;
}

.pf-line {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	padding: 0 10px 0 4px;
	border-right: 1px dotted #7b8996;
	overflow: hidden;
}

/* 末列的无线，由后台按实际列数输出（见 inc/portal-style.php） */

.pf-line-cell {
	overflow: hidden;
}

.pf-line-q {
	display: block;
	font-size: 12px;
	line-height: 15px;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-line-q:hover {
	text-decoration: underline;
}

.pf-line-src {
	font-size: 11px;
	line-height: 13px;
	color: #8695a0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- 5. 诗人索引（自然高度，不与上面四条等高） ---------- */

.pf-poets .siderbar_main {
	padding: 4px 8px 5px;
}

.pf-letter-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	line-height: 18px;
}

.pf-letter-row a {
	text-decoration: none;
	color: inherit;
	padding: 0 2px;
}

.pf-letter-row a:hover {
	text-decoration: underline;
}

.pf-poet-row {
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px dotted #7b8996;
	font-size: 13px;
	line-height: 18px;
}

.pf-poet-row a {
	margin-right: 12px;
	text-decoration: none;
	color: inherit;
}

.pf-poet-row a:hover {
	text-decoration: underline;
}

.pf-stat-row {
	margin-top: 3px;
	font-size: 12px;
	color: #6b7883;
}

/* ============================================================
   7. 内页（诗词详情 / 检索 / 诗人 / 意象 / 场景 / 心境 / 名句）
   ------------------------------------------------------------
   同样只写结构与中性色，标题条与底纹仍由皮肤的 .siderbar_head 提供。
   ============================================================ */

.pf-crumb-sep {
	margin: 0 4px;
	font-size: 12px;
	opacity: 0.55;
}

.pf-crumb-cur {
	font-weight: bold;
}

.pf-page-main {
	padding: 8px 10px 10px;
	min-height: 60px;
}

.pf-search-inpage {
	margin-bottom: 8px;
}

.pf-hint,
.pf-empty-big {
	padding: 22px 6px;
	font-size: 13px;
	color: #6b7883;
	text-align: center;
}

.pf-result-head {
	margin: 2px 0 6px;
	padding-bottom: 4px;
	border-bottom: 1px dotted #7b8996;
	font-size: 12.5px;
	color: #4a5a66;
}

.pf-result-filter {
	margin-left: 8px;
	padding: 0 4px;
	font-size: 11.5px;
	color: #6b7883;
	border: 1px solid #a4b1bb;
}

.pf-result-adv {
	float: right;
}

.pf-result-list {
	list-style: none;
	margin: 0;
	padding: 0;
	/* 两栏排布：除诗人索引外，诗词列表都走两列；minmax(0,1fr) 保证长标题压得下去、不撑破列宽 */
	display: grid;
	grid-template-columns: repeat(var(--myg-result-cols, 2), minmax(0, 1fr));
	column-gap: 20px;
}

.pf-result-list li {
	min-width: 0;
	overflow: hidden;
	padding: 6px 2px 7px;
	border-bottom: 1px dashed #6f7e8b;
}

.pf-result-list li:nth-last-child(-n+2) {
	border-bottom: none;
}

.pf-ri-main {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.pf-ri-title {
	font-size: 13.5px;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-ri-title:hover {
	text-decoration: underline;
}

.pf-ri-meta {
	font-size: 12px;
	color: #6b7883;
	white-space: nowrap;
}

.pf-ri-excerpt {
	margin-top: 1px;
	font-size: 12.5px;
	line-height: 17px;
	color: #4a5a66;
}

.pf-hit {
	font-style: normal;
	color: #c62828;
	font-weight: bold;
}

.pf-pager {
	margin-top: 10px;
	padding-top: 6px;
	border-top: 1px dotted #7b8996;
	font-size: 12.5px;
	color: #6b7883;
}

.pf-pager a {
	margin-left: 12px;
	text-decoration: none;
	color: inherit;
}

.pf-pager a:hover {
	text-decoration: underline;
}

.pf-pager-info {
	margin-right: 6px;
}

/* 诗词详情 */
.pf-detail {
	padding: 4px 2px 2px;
	text-align: center;
}

.pf-detail-title {
	margin: 6px 0 4px;
	font-size: 19px;
	line-height: 26px;
	font-weight: bold;
	letter-spacing: 1px;
}

.pf-detail-meta {
	font-size: 12.5px;
	color: #6b7883;
	margin-bottom: 12px;
}

.pf-detail-dot {
	margin: 0 5px;
	opacity: 0.5;
}

.pf-detail-body {
	margin: 0 0 14px;
	font-family: "KaiTi", "Kaiti SC", "STKaiti", "SimSun", serif;
	font-size: 17px;
	line-height: 30px;
	letter-spacing: 1.2px;
}

.pf-detail-body p {
	margin: 0;
}

.pf-detail-excerpt {
	display: inline-block;
	margin: 0 auto 12px;
	padding: 5px 12px;
	border-top: 1px dotted #7b8996;
	border-bottom: 1px dotted #7b8996;
	font-size: 13px;
	color: #4a5a66;
}

.pf-de-label {
	margin-right: 6px;
	font-size: 11.5px;
	color: #8695a0;
}

.pf-detail-actions {
	margin: 0 0 12px;
	font-size: 12.5px;
}

.pf-detail-actions a {
	margin: 0 8px;
	text-decoration: none;
	color: inherit;
	opacity: 0.85;
}

.pf-detail-actions a:hover {
	opacity: 1;
	text-decoration: underline;
}

.pf-detail-rel,
.pf-rel-block {
	text-align: left;
	margin-top: 10px;
}

.pf-rel-title {
	margin: 8px 0 4px;
	font-size: 13px;
	font-weight: bold;
	border-bottom: 1px dotted #7b8996;
	padding-bottom: 3px;
}

.pf-detail-rel ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pf-detail-rel li {
	font-size: 12.5px;
	line-height: 18px;
}

.pf-detail-rel a {
	text-decoration: none;
	color: inherit;
}

.pf-detail-rel a:hover {
	text-decoration: underline;
}

.pf-detail-rel span {
	margin-left: 6px;
	color: #6b7883;
}

/* 诗人索引 */
.pf-letter-grid {
	display: grid;
	grid-template-columns: repeat(14, 1fr);
	gap: 3px;
	margin: 4px 0 8px;
	text-align: center;
}

.pf-letter-grid a {
	padding: 3px 0;
	font-size: 13px;
	text-decoration: none;
	color: inherit;
	border: 1px solid #a4b1bb;
}

.pf-letter-grid a:hover {
	border-color: #8695a0;
}

.pf-letter-on {
	font-weight: bold;
	border-color: #8695a0 !important;
}

/* 「其他」：不是 A–Z 起首的诗人（initial 为 # 的 16 位） */
.pf-letter-other {
	font-size: 12px !important;
	color: #6b7883 !important;
}

.pf-stat-line {
	margin: 4px 0 8px;
	font-size: 12px;
	color: #6b7883;
}

.pf-poet-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 4px 8px;
	margin-top: 4px;
}

.pf-poet-grid a {
	display: block;
	padding: 3px 5px;
	text-decoration: none;
	color: inherit;
	border: 1px solid #a4b1bb;
	overflow: hidden;
}

.pf-poet-grid a:hover {
	border-color: #8695a0;
}

.pf-pg-name {
	display: block;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pf-pg-meta {
	display: block;
	font-size: 11px;
	color: #8695a0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 意象总览：与首页同一套圆圈，排成 10 列网格 */
.pf-words-page {
	padding: 18px 6px 12px;
}

.pf-words-circle {
	justify-content: center;
	gap: 0 10px;
}

.pf-words-page.pf-words-circle {
	display: grid;
	grid-template-columns: repeat(10, 46px);
	justify-content: center;
	gap: 14px 10px;
}

/* 一个意象一个圆圈：边框取继承色，四套皮肤各用各的正文色，不写死 */
.pf-wc {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	color: inherit;
}

.pf-wc:hover {
	border-color: #c62828;
	color: #c62828;
}

/* 场景总览 */
.pf-scene-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 10px;
}

.pf-sg {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 10px 9px;
	text-decoration: none;
	color: inherit;
	border: 1px solid #a4b1bb;
	height: 106px;
	overflow: hidden;
}

.pf-sg:hover {
	border-color: #8695a0;
}

.pf-sg-name {
	font-size: 14px;
	margin-bottom: 4px;
}

.pf-sg-q {
	font-size: 12px;
	line-height: 16px;
	color: #4a5a66;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.pf-sg-src {
	margin-top: 3px;
	font-size: 11px;
	color: #8695a0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 心境总览 */
.pf-mood-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.pf-mg {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 10px 11px;
	text-decoration: none;
	color: inherit;
	border: 1px solid #a4b1bb;
	height: 84px;
	overflow: hidden;
}

.pf-mg:hover {
	border-color: #8695a0;
}

.pf-mg-name {
	display: block;
	font-size: 14px;
	margin-bottom: 3px;
	text-decoration: none;
	color: inherit;
}

.pf-mg-q {
	font-size: 12px;
	line-height: 16px;
	color: #4a5a66;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	text-decoration: none;
}

.pf-mg-q:hover,
.pf-mg-src:hover {
	text-decoration: underline;
}

.pf-mg-src {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	color: #8695a0;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 心头诗 */
.pf-quote-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 18px;
}

.pf-quote-list li {
	padding: 7px 2px 8px;
	border-bottom: 1px dashed #6f7e8b;
}

.pf-quote-list li:nth-last-child(-n+2) {
	border-bottom: none;
}

.pf-ql-quote {
	font-family: "KaiTi", "Kaiti SC", "STKaiti", "SimSun", serif;
	font-size: 15px;
	line-height: 22px;
}

.pf-ql-quote a {
	text-decoration: none;
	color: inherit;
}

.pf-ql-quote a:hover {
	text-decoration: underline;
}

.pf-ql-src {
	margin-top: 2px;
	font-size: 12px;
	color: #6b7883;
}

.pf-ql-more {
	margin-left: 8px;
	text-decoration: none;
	color: inherit;
	opacity: 0.7;
}

.pf-ql-more:hover {
	opacity: 1;
}


/* ============================================================
   8. 窄屏：列数降级
   ============================================================ */

/* 主题正文 .wrap 本身就是 716 固定宽（header 里 viewport 也写的 760），
   所以断点要压到 719 以下才降级，否则 720–760 的桌面窗口会把满宽版面误判成小屏。 */
@media (max-width: 719px) {

	.home-layout,
	.home-layout .content {
		width: 100%;
		max-width: 100%;
	}

	.pf-cat {
		height: auto;
		min-height: 150px;
	}

	.pf-scenelist {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 6px;
	}

	.pf-moods {
		grid-template-columns: repeat(3, 1fr);
	}

	.pf-lines {
		grid-template-columns: repeat(2, 1fr);
	}

	.pf-words {
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 4px 10px;
		padding: 4px 0;
	}

	.pf-wnote {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- 首页 · 最新日志 ---------- */
.pf-latest-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 两列／三列用 CSS 分栏而不是网格：column-rule 能画出一条贯穿的竖虚线，
   网格只能给每个 li 单加左边框，条目高度一参差就断成一截一截。 */
.pf-latest-c2 {
	column-count: 2;
	column-gap: 18px;
	column-rule: 1px dashed #6f7e8b;
}

.pf-latest-c3 {
	column-count: 3;
	column-gap: 14px;
	column-rule: 1px dashed #6f7e8b;
}

.pf-latest-list li {
	margin: 0 0 5px;
	padding: 0;
	break-inside: avoid;
	page-break-inside: avoid;
}

.pf-latest-line {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
}

.pf-latest-t {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	text-decoration: none;
}

.pf-latest-t:hover {
	text-decoration: underline;
}

.pf-latest-date {
	flex: 0 0 auto;
	color: #8a8a8a;
	font-size: 12px;
	line-height: 1.5;
}

/* 摘要占两行：短摘要也撑到两行，条目高度才整齐；截断交给 line-clamp，
   高度写死像素（12px 字 × 18px 行高 = 36px 两行），别用 em 换算，
   中文行盒凑不满整除时，第二行底下会漏出第三行的半个字。 */
.pf-latest-x {
	display: -webkit-box;
	overflow: hidden;
	height: 36px;
	margin: 1px 0 0;
	padding: 0;
	color: #5e5e5e;
	font-size: 12px;
	line-height: 18px;
	text-align: justify;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
