/* =========================================================
   PWSZ 足迹地图 · 前台样式（中性响应式，diary / new-island 通用）
   全部类名 pt-* / pwsz-travel-*，不触碰任何主题选择器。
   ========================================================= */

.pwsz-travel-page { margin: 0 auto; padding: 16px 0 32px; }
.pwsz-travel-sheet { max-width: 1080px; margin: 0 auto; padding: 24px; background: #fbfaf7; border-radius: 10px; box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.pwsz-travel-diary { max-width: 920px; }
.pwsz-travel-island { max-width: 1080px; padding: 24px; }

/* ---------- 统计条 ---------- */
.pwsz-travel-stats {
	display: flex; align-items: center; justify-content: center; gap: 14px;
	padding: 10px 0 16px; color: inherit; font-size: 15px;
}
.pwsz-travel-stats b { font-size: 22px; margin-right: 4px; }
.pt-stat-sep { width: 1px; height: 18px; background: currentColor; opacity: .25; }

/* ---------- 地图容器：显式 aspect-ratio 保证宽高 > 0
   （jVectorMap 容器 0×0 时会算出 NaN 污染整张 SVG） ---------- */
.pwsz-travel-mapwrap {
	position: relative; width: 100%;
	aspect-ratio: 4 / 3;
	background: #253449;
	border-radius: 10px; overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
#pwsz-travel-map { position: absolute; inset: 0; width: 100%; height: 100%; }
#pwsz-travel-map svg { width: 100% !important; height: 100% !important; }

@media (max-width: 768px) {
	.pwsz-travel-mapwrap { aspect-ratio: 1 / 1; border-radius: 8px; }
	.pwsz-travel-island { padding: 12px; }
	.pwsz-travel-sheet { padding: 12px; }
}

/* ---------- 信息卡（标记点击弹出） ---------- */
.pwsz-travel-infobar {
	position: absolute; top: 10px; right: 10px; z-index: 20;
	width: min(300px, calc(100% - 20px));
	max-height: calc(100% - 20px); overflow-y: auto;
	background: #fdfcf9; color: #333;
	border: 1px solid #d8d2c4; border-radius: 8px;
	padding: 14px 16px 16px;
	box-shadow: 0 6px 24px rgba(0,0,0,.22);
	font-size: 14px; line-height: 1.7;
}
.pt-info-close {
	position: absolute; top: 4px; right: 8px;
	background: none; border: 0; font-size: 22px; line-height: 1;
	cursor: pointer; color: #999; padding: 4px;
}
.pt-info-close:hover { color: #333; }
.pt-info-title { font-size: 17px; font-weight: 700; margin: 0 24px 6px 0; }
.pt-info-title a { color: #2e7d4f; text-decoration: none; border-bottom: 1px dashed #2e7d4f; }
.pt-info-title a:hover { border-bottom-style: solid; }
.pt-info-desc { color: #666; border-top: 1px dashed #d8d2c4; padding-top: 8px; margin-bottom: 8px; white-space: pre-wrap; }
/* v1.4.0：信息卡照片固定 2 列（用户反馈 3 列太碎，要 2×2） */
.pt-info-photos {
	display: grid; grid-template-columns: repeat(2, 1fr);
	gap: 6px; margin-top: 8px;
}
.pt-info-photo {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	border-radius: 5px; cursor: zoom-in; border: 1px solid #e2ddcf;
	transition: transform .15s;
}
.pt-info-photo:hover { transform: scale(1.03); }

/* ---------- chips：大区（常显） + 城市（选中大区后出现） ---------- */
.pwsz-travel-chips, .pwsz-travel-subchips {
	display: flex; flex-wrap: wrap; gap: 8px;
	justify-content: center; padding: 14px 0 6px;
}
.pwsz-travel-subchips { padding-top: 8px; }
.pt-chip {
	border: 1px solid #c9c4b8; background: #fdfcf9; color: #555;
	border-radius: 999px; padding: 5px 14px; font-size: 13px;
	cursor: pointer; transition: all .15s; line-height: 1.4;
}
.pt-chip i { font-style: normal; opacity: .6; font-size: 12px; margin-left: 3px; }
.pt-chip:hover { border-color: #2e7d4f; color: #2e7d4f; }
.pt-chip.is-active { background: #2e7d4f; border-color: #2e7d4f; color: #fff; }
.pt-chip-region { font-size: 14px; padding: 6px 18px; }

/* v1.5.0：new-island 大区 chips 强制单行 —— 大区加到 8 个（含西北）也不换行；
 * 放不下时横向滑动（justify-content 溢出时 center 会导致左端不可达，改 flex-start）。
 * diary 走书右页窄栏，保持换行（pwsz-travel-diary 不受此段影响）。 */
.pwsz-travel-island .pwsz-travel-chips {
	flex-wrap: nowrap;
	justify-content: flex-start;
	overflow-x: auto;
	padding-bottom: 10px;           /* 横向滚动条留位，不压住下面内容 */
	scrollbar-width: thin;
}
.pwsz-travel-island .pwsz-travel-chips .pt-chip {
	white-space: nowrap;
	flex: 0 0 auto;
}

/* v1.5.0：地图悬停提示 —— 深蓝底 + 白色发光亮字（色板同地图深蓝底）。
 * 覆盖 vendor 默认样式（本 CSS 在 vendor 之后加载，同特异性后者胜）。 */
.jvectormap-tip {
	background: rgba(30, 43, 62, .94);
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 6px;
	padding: 4px 12px;
	font-size: 13px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
	pointer-events: none;
	/* v1.6.0：线上 diary（GA5.0）书页层叠上下文会盖住无 z-index 的 tip
	 * （本地旧版主题盖不住 ⇒ 本地测得出、线上看不到）。提到最上层。 */
	z-index: 99999;
}
.pt-tip {
	display: inline-block;
	color: #fff;
	text-shadow: 0 0 8px rgba(170, 225, 255, .95), 0 0 3px rgba(255, 255, 255, .85);
	letter-spacing: 1px;
}
.pt-tip-city {
	font-weight: 700;
	color: #ffe9c4;   /* 暖金色，与橙色红点呼应 */
}

/* ---------- 统一照片墙：按城市叠放，点击展开 ---------- */
.pwsz-travel-wall {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}
.pt-stack {
	margin: 0; position: relative; border-radius: 8px; cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.pt-stack.is-hidden { display: none; }
.pt-stack-cards { position: relative; }
.pt-stack-top {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	border-radius: 8px; position: relative; z-index: 3;
	background: #efece4;
}
.pt-stack-under {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	border-radius: 8px; background: #e7e2d6;
	position: absolute; left: 0; top: 0;
}
.pt-stack-under-2 { transform: translate(6px, 6px); z-index: 1; filter: brightness(.92); }
.pt-stack-under-1 { transform: translate(3px, 3px); z-index: 2; filter: brightness(.96); }
.pt-stack.is-open .pt-stack-under { opacity: 0; }
.pt-stack-count {
	position: absolute; top: 8px; right: 8px; z-index: 4;
	background: rgba(46, 125, 79, .92); color: #fff;
	font-size: 12px; padding: 2px 9px; border-radius: 999px;
}
.pt-stack figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
	padding: 18px 10px 6px; font-size: 13px; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.55));
	border-radius: 0 0 8px 8px; text-align: left;
}
.pt-stack figcaption::after {
	content: '点击展开 ▸'; font-size: 11px; opacity: .85; margin-left: 6px;
}
.pt-stack.is-open figcaption::after { content: '点击收起 ▴'; }
.pt-stack.is-open .pt-stack-top { border-radius: 8px 8px 0 0; }
.pt-stack.is-open figcaption {
	position: static; background: #2e7d4f; color: #fff;
	padding: 6px 10px; border-radius: 0;
}
.pt-stack.is-open figcaption::after { float: right; margin-left: 6px; }
.pt-stack-grid {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
	background: #2e7d4f; padding: 0 4px 4px;
}
.pt-stack-grid img {
	display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	border-radius: 4px; cursor: zoom-in;
	transition: transform .15s;
}
.pt-stack-grid img:hover { transform: scale(1.03); }
.pt-stack-grid[hidden] { display: none; }

@media (max-width: 768px) {
	.pwsz-travel-wall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
	.pt-stack-grid { grid-template-columns: repeat(2, 1fr); }
}
.pt-wall-empty { color: #999; text-align: center; padding: 30px 0; }

/* ---------- 城市列表：大区（可折叠）→ 省 → 城市 ----------
 * v1.5.0 美化：分区卡片化 + 计数徽章 + 省份细分隔线 + 城市两列 + 行 hover 底色
 * （色板与主题一致：纸白 / 米白底 / 博客绿点缀） */
.pwsz-travel-list { margin-top: 36px; }
.pt-list-title {
	font-size: 17px; margin: 0 0 14px;
	display: flex; align-items: center; gap: 10px;
}
.pt-list-title::after {
	content: ''; flex: 1; height: 1px;
	background: linear-gradient(90deg, #dcd6c6, rgba(220, 214, 198, 0));
}

/* 大区 = 一张可折叠卡片（button 做标题行，重置 UA 按钮样式） */
.pt-list-region {
	margin-bottom: 10px;
	background: #fffdf8; border: 1px solid #e7e2d4; border-radius: 8px;
	overflow: hidden;
}
.pt-list-region-title {
	display: flex; align-items: center; gap: 8px;
	width: 100%; box-sizing: border-box;
	font: inherit; font-size: 15px; font-weight: 700; color: #2e7d4f;
	text-align: left; cursor: pointer;
	padding: 10px 14px; background: #f7f4ec; border: 0;
	border-left: 3px solid #2e7d4f;
	-webkit-appearance: none; appearance: none;
	transition: background .15s;
}
.pt-list-region-title:hover { background: #eef3ea; }
.pt-list-region-title:focus-visible { outline: 2px solid #2e7d4f; outline-offset: 1px; }
.pt-list-caret { opacity: .55; font-size: 12px; }

/* 计数徽章（大区总数 / 省内城市数共用 <i>，大区的加粗底） */
.pt-list-region-title i, .pt-list-province-title i {
	font-style: normal; font-weight: 400; font-size: 12px; margin-left: 2px;
}
.pt-list-region-title i {
	color: #2e7d4f; background: #e3efe6;
	border-radius: 999px; padding: 1px 9px; margin-left: auto; margin-right: 6px;
}

/* 手机端：城市列表已统一一列，这里只缩徽章 */
@media (max-width: 768px) {
	.pt-list-region-title i { padding: 1px 7px; }
}

/* 大区内容体：默认 hidden（由 JS 控制展开） */
.pt-list-region-body { padding: 2px 10px 12px; }
.pt-list-region-body[hidden] { display: none; }

.pt-list-province { margin: 12px 6px 0; }
.pt-list-province-title {
	font-size: 12.5px; color: #8a8375; letter-spacing: .5px;
	display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
}
.pt-list-province-title::after {
	content: ''; flex: 1; height: 1px; background: #eee9db;
}
.pwsz-travel-list ul {
	list-style: none; margin: 4px 0 0; padding: 0;
	/* v1.6.0（按用户终审）：两套主题统一一列 —— 两列会挤折行/错位，
	 * 一列每行放得下「城市名 + 照片徽章 + 相关文章」。 */
	display: grid; grid-template-columns: 1fr; gap: 2px 20px;
}
.pwsz-travel-list li {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 7px 8px; border-bottom: 0; border-radius: 6px;
	transition: background .15s;
}
.pwsz-travel-list li:hover { background: #f3f7f1; }

/* 城市名 = button（点了滚到照片墙），重置 UA 按钮样式 */
.pt-list-link {
	flex: 1; min-width: 120px;
	display: inline-flex; align-items: baseline; gap: 6px;
	font: inherit; text-align: left; color: inherit;
	background: none; border: 0; padding: 0; cursor: pointer;
	-webkit-appearance: none; appearance: none;
}
.pt-list-link b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.pt-list-link:hover b { color: #2e7d4f; }
.pt-list-link:focus-visible { outline: 2px solid #2e7d4f; outline-offset: 2px; border-radius: 3px; }
/* 没有照片的城市：不可点，灰掉 */
.pt-list-link:disabled { cursor: default; opacity: .45; }
.pt-list-link:disabled:hover b { color: inherit; }
.pt-list-photo {
	font-size: 11.5px; color: #98917f; background: #f3efe4;
	border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.pt-list-article { font-size: 13px; color: #2e7d4f; text-decoration: none; white-space: nowrap; }
.pt-list-article:hover { text-decoration: underline; }
.pwsz-travel-list li:target { background: #eef5ef; border-radius: 6px; }

/* ---------- 灯箱 ---------- */
.pt-lightbox {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(10, 12, 16, .88);
	display: flex; align-items: center; justify-content: center;
}
/* 关键：display:flex 会打败 [hidden] 的 UA 样式（display:none），
   必须显式声明，否则隐藏的灯箱仍以全屏透明层拦截全页点击 */
.pt-lightbox[hidden] { display: none; }
.pwsz-travel-infobar[hidden] { display: none; }
.pt-lb-stage { margin: 0; max-width: 90vw; text-align: center; }
.pt-lb-stage img {
	max-width: 90vw; max-height: 82vh;
	border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.pt-lb-stage figcaption { color: #ddd; font-size: 13px; margin-top: 10px; }
/* v1.4.0：左右切换按钮加大加醒目（用户反馈"要有左右点击按钮"，
   旧版 44px 半透明圆钮太淡，看不出来能点） */
.pt-lb-close, .pt-lb-prev, .pt-lb-next {
	position: absolute; background: rgba(30, 34, 40, .55); color: #fff;
	border: 1px solid rgba(255,255,255,.35); border-radius: 50%; cursor: pointer;
	width: 56px; height: 56px; font-size: 30px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	transition: background .15s, transform .15s;
	z-index: 2;
}
.pt-lb-close:hover, .pt-lb-prev:hover, .pt-lb-next:hover {
	background: rgba(30, 34, 40, .85); transform: scale(1.06);
}
.pt-lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 24px; }
.pt-lb-prev { left: 48px; top: 50%; transform: translateY(-50%); }
.pt-lb-next { right: 48px; top: 50%; transform: translateY(-50%); }
.pt-lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.pt-lb-next:hover { transform: translateY(-50%) scale(1.06); }
.pt-lb-prev::before, .pt-lb-next::before {
	content: ''; width: 12px; height: 12px;
	border-top: 3px solid #fff; border-left: 3px solid #fff;
}
.pt-lb-prev::before { transform: rotate(-45deg); margin-left: 5px; }
.pt-lb-next::before { transform: rotate(135deg); margin-right: 5px; }
@media (max-width: 768px) {
	.pt-lb-prev { left: 12px; } .pt-lb-next { right: 12px; }
	.pt-lb-prev, .pt-lb-next { width: 46px; height: 46px; }
	.pt-lb-stage img { max-width: 94vw; max-height: 78vh; }
}

/* ============================================================
 * 统一灯箱缩放控件（v1.7.0，与 diary / new-island / 碎碎念同款）
 * ============================================================ */
.lb-zoom-bar {
	position: fixed;
	left: 50%; bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(20, 18, 14, .74);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	padding: 6px 14px;
	z-index: 10;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.lb-zoom-bar button {
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
	padding: 2px 6px;
	font-family: inherit;
	transition: opacity .15s;
}
.lb-zoom-bar button:hover { opacity: .75; }
.lb-zoom-bar .lb-zoom-pct {
	color: rgba(255, 255, 255, .85);
	font-size: 12px;
	min-width: 42px;
	text-align: center;
	user-select: none;
}
.lb-zoom-bar .lb-zoom-reset { font-size: 12px; opacity: .85; }
@media (max-width: 768px) {
	.lb-zoom-bar { bottom: 14px; padding: 5px 12px; gap: 6px; }
}
