/* 巡礼工作台版式：宽屏面板、封面作品卡、可折叠目录、更清晰的层级。 */

/* 1. 巡礼标签使用更宽的工作台，地图仍然可见 */
@media (min-width:1180px){
  body[data-fan-tab="pilgrimage"] #inspector{position:fixed;top:86px;right:16px;bottom:16px;width:var(--right);z-index:31}
}
@media (min-width:900px) and (max-width:1179px){
  body[data-fan-tab="pilgrimage"] #inspector{position:fixed;top:78px;right:12px;bottom:12px;width:var(--right);z-index:31}
}

/* 2. 字号与节奏：正文不再一律 9–10px */
body[data-fan-tab="pilgrimage"] #railfan-content{padding:20px 20px 28px}
body[data-fan-tab="pilgrimage"] .fan-heading{font-size:22px;line-height:1.3}
body[data-fan-tab="pilgrimage"] .fan-sub{font-size:12px;line-height:1.65;color:#5f7268}
body[data-fan-tab="pilgrimage"] .fan-filter-title{font-size:11px;font-weight:500;letter-spacing:.02em}
body[data-fan-tab="pilgrimage"] .fan-filter-count{font-size:11px}
body[data-fan-tab="pilgrimage"] .fan-source-block p,
body[data-fan-tab="pilgrimage"] .fan-source-legal{font-size:11px;line-height:1.75}
body[data-fan-tab="pilgrimage"] .fan-source-block h3{font-size:13px}
body[data-fan-tab="pilgrimage"] .fan-result-heading b{font-size:13px}

/* 3. 统计条 */
body[data-fan-tab="pilgrimage"] .fan-stat-row>div{padding:11px 8px}
body[data-fan-tab="pilgrimage"] .fan-stat-row b{font-size:20px}
body[data-fan-tab="pilgrimage"] .fan-stat-row span{font-size:10.5px;margin-top:5px}

/* 4. 作品卡：封面 + 文本，宽面板下更像目录 */
.fan-work-cover{position:relative;flex:0 0 60px;width:60px;height:80px;border-radius:6px;overflow:hidden;background:var(--cover,#2d6b4f)}
.fan-work-cover i{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:18px;color:#ffffffd0}
.fan-work-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}
.fan-work-main{display:flex;flex-direction:column;flex:1;min-width:0}
.fan-work-card:not(.external){flex-direction:row;align-items:stretch;gap:11px}
.fan-work-card:not(.external) .fan-work-card-top{margin-top:0}
.fan-work-card:not(.external) strong{font-size:14px;line-height:1.4;margin-top:3px}
.fan-work-card:not(.external) .fan-work-native{font-size:11px}
.fan-work-card:not(.external) .fan-work-region{font-size:11px}
.fan-work-card .fan-work-year{font-weight:500}
.fan-work-card .fan-work-count{color:#5f7a6d}

/* 5. 全年代目录改为可折叠，避免把本地结果压到屏幕之外 */
.fan-archive-details{margin:16px 0 4px;border:1px solid #dfe8e3;border-radius:10px;background:#fff;overflow:hidden}
.fan-archive-details>summary{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;list-style:none;color:#284537}
.fan-archive-details>summary::-webkit-details-marker{display:none}
.fan-archive-details>summary b{font-size:13px;font-weight:500}
.fan-archive-details>summary span{font-size:11px;color:#7b8a82}
.fan-archive-details>summary::after{content:"＋";font-size:12px;color:#5f7a6d}
.fan-archive-details[open]>summary{border-bottom:1px solid #e5ede8}
.fan-archive-details[open]>summary::after{content:"−"}
.fan-archive-details .fan-era-browser{margin:0;border:0;border-radius:0;box-shadow:none;background:#fcfdfc}

/* 6. 作品详情：操作区更紧凑，时间轴成为独立工具条 */
.fan-work-detail-head{padding-bottom:14px}
.fan-work-kicker{font-size:11px}
.fan-work-detail-head .fan-work-native{font-size:12.5px;color:#5f7268}
.fan-timeline{margin:12px 0 10px;padding:11px 13px;border:1px solid #dce7e0;border-radius:10px;background:#f7faf8}
.fan-timeline-head{font-size:11px}
.fan-timeline-head span{color:#3d5a4c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fan-timeline input[type="range"]{height:22px}
.fan-timeline-foot{font-size:10.5px}
.fan-point-search{margin:6px 0 2px}
.fan-point-search .fan-input{height:40px;font-size:12px}
.fan-place-list .fan-card h3{font-size:14.5px;line-height:1.4}
.fan-place-list .fan-card p{font-size:11.5px;line-height:1.65}
body[data-fan-tab="pilgrimage"] .fan-place-list .fan-actions{gap:6px;flex-wrap:wrap}
body[data-fan-tab="pilgrimage"] .fan-place-list .fan-button{font-size:11px;min-height:34px}

/* 7. 列表卡片图片比例统一，避免长短不一 */
.fan-place-list .fan-card .fan-photo{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:#eef1ee}

/* 8. 空状态与提示 */
.fan-empty{border:1px dashed #d9e3dd;border-radius:10px;padding:18px 14px;color:#6c7d74;font-size:12px;line-height:1.7;background:#fbfcfb}

@media (max-width:900px){
  body[data-fan-tab="pilgrimage"] #railfan-content{padding:14px}
  .fan-work-cover{flex:0 0 46px;width:46px;height:62px}
  .fan-work-card:not(.external) strong{font-size:13.5px}
}

/* 9. 目录首屏：标题不再被右侧周期块挤压 */
body[data-fan-tab="pilgrimage"] .fan-catalog-hero{align-items:flex-start;flex-wrap:wrap}
body[data-fan-tab="pilgrimage"] .fan-catalog-hero>div:first-child{flex:1 1 240px;min-width:0}
body[data-fan-tab="pilgrimage"] .fan-catalog-hero .fan-sub{max-width:none}
body[data-fan-tab="pilgrimage"] .fan-catalog-period{max-width:150px}
body[data-fan-tab="pilgrimage"] .fan-catalog-period span{white-space:normal;line-height:1.5}
.fan-coverage-note{margin:0 0 12px;padding:9px 11px;border-radius:8px;background:#eff5f1;color:#4f6659;font-size:11px;line-height:1.6}

/* 10. 巡礼模式下隐藏地图性能浮层，避免与工作台重叠 */
body[data-fan-tab="pilgrimage"] .rail-performance{display:none}

/* 11. 详情页：来源折叠到列表之后；地图控件让开工作台 */
.fan-source-details{margin:14px 0 4px;border:1px solid #dfe8e3;border-radius:10px;background:#fff;overflow:hidden}
.fan-source-details>summary{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;list-style:none;color:#284537}
.fan-source-details>summary::-webkit-details-marker{display:none}
.fan-source-details>summary b{font-size:13px;font-weight:500}
.fan-source-details>summary span{font-size:11px;color:#7b8a82}
.fan-source-details>summary::after{content:"＋";font-size:12px;color:#5f7a6d}
.fan-source-details[open]>summary{border-bottom:1px solid #e5ede8}
.fan-source-details[open]>summary::after{content:"−"}
.fan-source-details .fan-source-block{margin:0;padding:12px 14px;border-top:0}
@media (min-width:1180px){body[data-fan-tab="pilgrimage"] .zoom{right:486px}}
@media (min-width:900px) and (max-width:1179px){body[data-fan-tab="pilgrimage"] .zoom{right:420px}}

/* 12. 小屏：巡礼工作台盖住地图标题与地区选择，避免叠字 */
@media (max-width:900px){
  body[data-fan-tab="pilgrimage"] #inspector{z-index:31}
  body[data-fan-tab="pilgrimage"] .region-selector,
  body[data-fan-tab="pilgrimage"] .map-title,
  body[data-fan-tab="pilgrimage"] .zoom,
  body[data-fan-tab="pilgrimage"] .scale{display:none}
}

/* 13. 具体年份筛选：更紧凑的数字芯片 */
.fan-year-row .fan-chip-row{gap:4px}
.fan-year-row .fan-chip{min-width:50px;font-variant-numeric:tabular-nums;justify-content:center;text-align:center}
.fan-year-row .fan-filter-title small{color:#16815a;font-weight:500}

/* 14. 集数时间轴：集数芯片 + 当前镜头高亮 */
.fan-ep-chips{display:flex;gap:4px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin;scrollbar-color:#c4d2ca transparent}
.fan-ep-chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;border:1px solid #dae4de;border-radius:999px;background:#fff;color:#50645a;font:inherit;font-size:10.5px;padding:3px 9px;cursor:pointer}
.fan-ep-chip small{color:#8a9a91;font-size:9.5px;font-variant-numeric:tabular-nums}
.fan-ep-chip:hover{border-color:#89ad9a;color:#175b40;background:#f4f8f5}
.fan-ep-chip.active{background:#e5f1eb;border-color:#8db7a1;color:#14583f;font-weight:500}
.fan-ep-chip.active small{color:#2c6b51}
.fan-card.is-timeline-active{background:#f7fbf8;box-shadow:inset 3px 0 0 #b25b7a;border-radius:0 8px 8px 0}
.fan-card.is-timeline-active h3{color:#7a2f4c}

/* 15. 地点详情：单标题、图注与信息分离，避免文字压图 */
.fan-place-head{padding:2px 0 10px}
.fan-place-native{margin:2px 0 0;font-size:12px;color:#5f7268}
.fan-place-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.fan-place-figure{margin:12px 0 0;border-radius:10px;overflow:hidden;background:#eef1ee;border:1px solid #e4ebe6}
.fan-place-figure img{display:block;width:100%;height:auto;max-height:300px;object-fit:cover}
.fan-place-figure figcaption{padding:6px 10px;background:#f7f9f7;color:#6d7f75;font-size:10px;line-height:1.5}
.fan-place-nofigure{margin:12px 0 0;padding:12px 14px;border:1px dashed #d9e3dd;border-radius:10px;background:#fbfcfb;color:#6c7d74;font-size:11.5px;line-height:1.7}
.fan-place-facts{display:flex;flex-direction:column;gap:7px;margin:12px 0 0;padding:11px 13px;border:1px solid #e2ebe5;border-radius:10px;background:#fbfcfa}
.fan-place-facts div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.fan-place-facts dt{margin:0;color:#6b7d73;font-size:11px;flex:none}
.fan-place-facts dd{margin:0;color:#22402f;font-size:12px;text-align:right;word-break:break-word}
.fan-place-note{margin:10px 0 0;color:#5f7268;font-size:11.5px;line-height:1.75}
.fan-place-head+.fan-place-figure,.fan-place-head+.fan-place-nofigure{margin-top:10px}

/* 16. 巡礼导航：起点、方式、分段与来源 */
.fan-nav{margin:14px 0 0;padding:12px 13px;border:1px solid #dbe7e0;border-radius:10px;background:#f8fbf9}
.fan-nav-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
.fan-nav-head b{font-size:13px;font-weight:500;color:#1d3f31}
.fan-nav-head span{font-size:10px;color:#7b8a82}
.fan-nav-origin{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:11px;color:#54695d}
.fan-nav-origin label{display:flex;align-items:center;gap:6px}
.fan-nav-origin select{font:inherit;font-size:11px;padding:4px 6px;border:1px solid #cfdcd4;border-radius:6px;background:#fff;color:#22402f}
.fan-nav-from{color:#6b7d73}
.fan-nav-actions{display:flex;gap:6px;flex-wrap:wrap}
.fan-nav-summary{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-top:10px;padding-top:9px;border-top:1px solid #e2ebe5}
.fan-nav-summary b{font-size:14px;color:#14513d}
.fan-nav-summary span{font-size:10px;color:#6f8177;text-align:right}
.fan-nav-steps{margin:8px 0 0;padding-left:18px;font-size:11.5px;line-height:1.7;color:#314a3d}
.fan-nav-steps li{margin:0 0 3px}
.fan-nav-steps b{font-weight:500;color:#14513d}
.fan-nav-steps span{color:#7b8a82;font-size:10px;margin-left:6px}
.fan-nav-more{color:#7b8a82;list-style:none}
.fan-nav-note{margin:9px 0 0;font-size:10.5px;line-height:1.6;color:#6f8177}
.fan-nav-error{margin:9px 0 0;padding:8px 10px;border-radius:8px;background:#fdeeee;color:#8f2f2f;font-size:11px;line-height:1.6}
.fan-nav-links{margin:8px 0 0}
/* Place actions: one prominent cinema entrance, compact tools, then external maps. */
.fan-cinema-cta{width:100%;display:flex;align-items:center;gap:13px;padding:14px 16px;margin:12px 0 10px;border:1px solid #174f3c;border-radius:11px;background:#174f3c;color:#fff;text-align:left;box-shadow:0 4px 12px #173f2e14;transition:background .15s,box-shadow .15s}
.fan-cinema-cta:hover{background:#103e2e;box-shadow:0 5px 16px #173f2e24;filter:none}
.fan-cinema-play{width:36px;height:36px;display:grid;place-items:center;flex:none;border:1px solid #ffffff40;border-radius:50%;background:#ffffff10;color:#f4dfad}
.fan-cinema-play svg{width:24px;height:24px;fill:currentColor;stroke-width:1}
.fan-cinema-copy{display:grid;gap:4px;min-width:0}.fan-cinema-copy b{font-size:15px;line-height:1.4;font-weight:650;letter-spacing:.03em}.fan-cinema-copy small{font-size:11px;color:#d4e5dc;line-height:1.5}.fan-cinema-arrow{margin-left:auto;font-size:21px;color:#e8f0eb}
.fan-place-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0 16px}
.fan-place-quick-actions .fan-button{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 5px;min-height:42px;border:1px solid #dbe6de;border-radius:8px;background:#f4f8f5;color:#345c48;font-size:11px;line-height:1.4;white-space:normal}
.fan-place-quick-actions .fan-button svg{width:16px;height:16px;flex:none}.fan-place-quick-actions .fan-button:hover{background:#e9f2ec;border-color:#a4bfad;filter:none}
.fan-place-external{margin-top:20px;padding:15px 0 4px;border-top:1px solid #e1e8e3}.fan-place-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.fan-place-section-title h3{margin:0;font-size:13px;font-weight:650;color:#284a37}.fan-place-section-title>span{font-size:10px;color:#7c8d82}
.fan-place-external-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fan-place-external-grid .fan-external-button{display:flex;align-items:center;gap:8px;min-height:46px;padding:10px 11px;border:1px solid #dce5df;border-radius:9px;color:#365c47;background:#fff;text-decoration:none;font-size:11px;font-weight:500;line-height:1.45;transition:background .15s,border-color .15s}
.fan-external-button>svg{width:18px;height:18px;flex:none;color:#668a74}.fan-external-button>span:not(.fan-external-arrow){min-width:0;overflow-wrap:anywhere}.fan-external-button .fan-external-arrow{margin-left:auto;font-size:14px;color:#8ca093;flex:none}
.fan-place-external-grid .fan-external-button:hover{background:#edf5ef;border-color:#9ebaa8;color:#164d31;filter:none}.fan-external-button:focus-visible,.fan-cinema-cta:focus-visible{outline:3px solid #bc9863;outline-offset:3px}
.fan-cinema-cta.compact{margin:10px 0;padding:10px 12px;gap:10px;border-radius:9px;box-shadow:none}.fan-cinema-cta.compact .fan-cinema-play{width:30px;height:30px}.fan-cinema-cta.compact .fan-cinema-copy b{font-size:13px}.fan-cinema-cta.compact .fan-cinema-copy small{font-size:10px}
.fan-place-figure{border-radius:11px}.fan-place-figure img{aspect-ratio:16/9;object-fit:contain;background:#edf1ed}
@media(max-width:380px){.fan-place-quick-actions{gap:5px}.fan-place-quick-actions .fan-button{flex-direction:column;gap:5px;font-size:10px}.fan-place-external-grid .fan-external-button{padding:9px 7px;gap:5px;font-size:10px}.fan-place-section-title>span{font-size:9px}}
@media(prefers-reduced-motion:reduce){.fan-cinema-cta,.fan-external-button{transition:none}}

.fan-nav-progress{margin:9px 0 0;color:#315a42;font-size:11px;line-height:1.7}.fan-nav-progress:empty{display:none}
