/* 東北見聞録 コア:旅の道筋の地図 (0.8.0) */
.tk-route,.tk-routes,.tk-spot-routes,.tk-reader__maps{
  --tkr-ink:var(--tk-ink,#252B29);--tkr-green:var(--tk-green,#40584C);--tkr-slate:var(--tk-slate,#3E4F57);
  --tkr-muted:var(--tk-muted,#4F5F67);--tkr-line:var(--tk-line,#BDB8A8);--tkr-paper:var(--tk-paper,#F9F7F1);--tkr-cream:var(--tk-cream,#F4F1E9);
  --tkr-mincho:var(--tk-mincho,"Noto Serif JP","Hiragino Mincho ProN","Yu Mincho",serif);
  box-sizing:border-box;color:var(--tkr-ink)
}
.tk-route *,.tk-routes *{box-sizing:border-box}
/* 本文の幅より広く使う */
.tk-route[data-tk-route],.tk-routes[data-tk-routes],.wp-site-blocks .tk-route[data-tk-route]{width:min(1100px,calc(100vw - 2rem));max-width:none!important;margin:1rem 0 3rem calc(50% - min(550px,50vw - 1rem))!important}

/* 見出しまわり */
.tk-route__head{margin:0 0 1rem}
.tk-route__who{display:flex;align-items:center;gap:.5rem;margin:0 0 .3rem;font-family:var(--tkr-mincho);font-weight:700;letter-spacing:.08em;color:var(--tkr-slate)}
.tk-route__swatch{display:inline-block;width:1.6em;height:4px;background:var(--tkr-color,var(--tkr-green));border-radius:2px}
.tk-route__lead{margin:0 0 .3rem;line-height:1.8}
.tk-route__book{margin:0;font-size:.88rem;color:var(--tkr-muted)}
.tk-route__book a{color:var(--tkr-green)}

/* 章ごとの絞り込み(スマホでは横にすべらせる) */
.tk-route__chapters{display:flex;gap:.4rem;overflow-x:auto;padding:.1rem 0 .6rem;margin:0 0 .3rem;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.tk-route__chip{flex:0 0 auto;min-height:40px;padding:.35rem .85rem;border:1px solid var(--tkr-line);background:var(--tkr-paper);color:var(--tkr-ink);font:inherit;font-size:.86rem;font-family:var(--tkr-mincho);letter-spacing:.04em;cursor:pointer;border-radius:0;white-space:nowrap}
.tk-route__chip:hover{border-color:var(--tkr-green);color:var(--tkr-green)}
.tk-route__chip.is-on{background:var(--tkr-green);border-color:var(--tkr-green);color:#F9F7F1}
.tk-route__chip:focus-visible,.tk-route__go:focus-visible{outline:2px solid var(--tkr-green);outline-offset:2px}

.tk-route__canvas,.tk-routes__canvas{height:clamp(340px,64vh,660px);height:clamp(340px,64svh,660px);border:1px solid var(--tkr-line);background:var(--tkr-cream);z-index:0}

/* 見方 */
.tk-route__legend{display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;list-style:none;margin:.6rem 0 0;padding:0;font-size:.78rem;color:var(--tkr-muted)}
.tk-route__legend li{display:flex;align-items:center;gap:.45rem}
.tk-route__key{display:inline-block;width:28px;height:0;border-top:3.5px solid var(--tkr-color,var(--tkr-green))}
.tk-route__key--dash{border-top-style:dashed}
.tk-route__key--out{border-top-width:2px;opacity:.45}
.tk-route__key--view{width:0;height:0;border-top:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid var(--tkr-muted);opacity:.7}
.tk-route__status,.tk-routes__status{margin:.6rem 0 .8rem;font-size:.9rem;color:var(--tkr-muted);min-height:1.5em}

/* 地図の上の印 */
.tk-route .tk-route__mark-wrap{background:none;border:0}
.tk-route__mark{display:block;margin:5px;width:10px;height:10px;background:var(--tkr-color,var(--tkr-green));border:1.5px solid #F9F7F1;border-radius:50%;box-shadow:0 0 0 1px rgba(37,43,41,.2);transition:transform .15s,opacity .15s}
.tk-route__mark--shrine{border-radius:1px}
.tk-route__mark--pass{border-radius:1px;transform:rotate(45deg) scale(.85)}
.tk-route__mark--water{background:#F9F7F1;border:2.5px solid var(--tkr-color,var(--tkr-green))}
.tk-route__mark--mount{width:0;height:0;margin:3px 4px;background:none;border:0;border-radius:0;box-shadow:none;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:11px solid var(--tkr-color,var(--tkr-green))}
.tk-route__mark.is-out{opacity:.5}
.tk-route__mark.is-guess{background:#F9F7F1;border-style:dashed;border-color:var(--tkr-color,var(--tkr-green))}
/* 道の上にない場所(眺めた山など):小さな淡い別の印 */
.tk-route__mark.is-view{width:0;height:0;margin:4px 5px;background:none;border:0;border-radius:0;box-shadow:none;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:9px solid var(--tkr-muted);opacity:.7;transform:none}
.tk-route .leaflet-marker-icon.is-dim .tk-route__mark{opacity:.22}
.tk-route .leaflet-marker-icon.is-ch .tk-route__mark{transform:scale(1.3)}
.tk-route .leaflet-marker-icon.is-ch .tk-route__mark--pass{transform:rotate(45deg) scale(1.1)}
.tk-route .leaflet-marker-icon:hover .tk-route__mark{transform:scale(1.3)}
.tk-route.tkr-far .tk-route__mark{width:7px;height:7px;margin:6.5px;border-width:1px}
.tk-route.tkr-far .tk-route__mark--mount,.tk-route.tkr-far .tk-route__mark.is-view{width:0;height:0;margin:6px 7px;border-left-width:4px;border-right-width:4px;border-bottom-width:7px}

/* 地名(近づいたときだけ) */
.tk-route .leaflet-tooltip.tk-route__label{display:none;padding:0 .3em;background:rgba(249,247,241,.82);border:0;box-shadow:none;border-radius:0;color:var(--tkr-ink);font-family:var(--tkr-mincho);font-size:12px;font-weight:600;letter-spacing:.04em;white-space:nowrap}
.tk-route .leaflet-tooltip.tk-route__label::before{display:none}
.tk-route .leaflet-tooltip.tk-route__label.is-view{color:var(--tkr-muted);font-weight:400}
.tk-route.tkr-labels .leaflet-tooltip.tk-route__label{display:block}
.tk-route.tkr-labels-ch .leaflet-tooltip.tk-route__label.is-ch{display:block}
.tk-route .leaflet-tooltip.tk-route__label.is-dim{display:none!important}

/* 吹き出し */
.tk-route .leaflet-container,.tk-routes .leaflet-container{font-family:inherit;background:var(--tkr-cream)}
.tk-route .leaflet-tile-pane,.tk-routes .leaflet-tile-pane{filter:sepia(.18) saturate(.8) brightness(1.02)}
.tk-route .leaflet-bar,.tk-routes .leaflet-bar{border:1px solid var(--tkr-line);box-shadow:none;border-radius:0}
.tk-route .leaflet-bar a,.tk-routes .leaflet-bar a{width:40px;height:40px;line-height:40px;color:var(--tkr-slate);background:var(--tkr-paper);border-radius:0!important}
.tk-route .leaflet-control-attribution,.tk-routes .leaflet-control-attribution{background:rgba(249,247,241,.85);color:var(--tkr-muted);font-size:11px}
.tk-route .leaflet-control-attribution a,.tk-routes .leaflet-control-attribution a{color:var(--tkr-slate)}
.tk-route .leaflet-popup-content-wrapper,.tk-routes .leaflet-popup-content-wrapper{border-radius:0;background:var(--tkr-paper);color:var(--tkr-ink);box-shadow:0 2px 10px rgba(37,43,41,.18);border:1px solid var(--tkr-line)}
.tk-route .leaflet-popup-tip,.tk-routes .leaflet-popup-tip{background:var(--tkr-paper);box-shadow:none}
.tk-route .leaflet-popup-content,.tk-routes .leaflet-popup-content{margin:.8rem 1rem;line-height:1.55;min-width:190px}
.tk-route__pop-name{display:block;font-family:var(--tkr-mincho);font-weight:700;font-size:1.05rem;letter-spacing:.04em}
.tk-route__pop-now{display:block;font-size:.8rem;color:var(--tkr-muted);margin:.1rem 0 .3rem}
.tk-route__pop-route{display:flex;align-items:center;gap:.4rem;font-size:.85rem;font-family:var(--tkr-mincho);font-weight:600}
.tk-route__pop-route::before{content:"";display:inline-block;width:1.2em;height:3px;background:var(--tkr-color)}
.tk-route__pop-dl{display:grid;grid-template-columns:auto 1fr;gap:.1rem .6rem;margin:.3rem 0;font-size:.82rem}
.tk-route__pop-dl dt{color:var(--tkr-muted);margin:0}
.tk-route__pop-dl dd{margin:0}
.tk-route__pop-links{display:flex;flex-direction:column;gap:.2rem;margin:.45rem 0 0;font-size:.86rem}
.tk-route__pop-links a{color:var(--tkr-green)!important}
.leaflet-tooltip.tk-route__tip{border-radius:0;border:1px solid var(--tkr-line,#BDB8A8);background:#F9F7F1;color:#252B29;font-size:12px;box-shadow:none}

/* 道順の一覧 */
.tk-route__table-wrap{overflow-x:auto;margin:.5rem 0 0;-webkit-overflow-scrolling:touch}
.tk-route__table{width:100%;border-collapse:collapse;font-size:.9rem;line-height:1.5}
.tk-route__table caption{text-align:left;font-family:var(--tkr-mincho);font-weight:700;font-size:1.15rem;letter-spacing:.08em;padding:.4rem 0 .6rem}
.tk-route__table th{font-weight:400;font-size:.76rem;color:var(--tkr-muted);text-align:left;padding:.3rem .5rem;border-bottom:1px solid var(--tkr-line);white-space:nowrap}
.tk-route__table td{padding:.5rem .5rem;border-bottom:1px solid var(--tkr-line);vertical-align:top}
.tk-route__num{color:var(--tkr-muted);font-size:.8rem;text-align:right;width:2.5em}
.tk-route__go{padding:0;border:0;background:none;color:var(--tkr-ink);font:inherit;font-family:var(--tkr-mincho);font-weight:700;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:var(--tkr-line);text-underline-offset:3px;min-height:28px}
.tk-route__go:hover{color:var(--tkr-green);text-decoration-color:currentColor}
.tk-route__name span{font-family:var(--tkr-mincho);font-weight:700}
.tk-route__now{color:var(--tkr-muted);font-size:.85rem}
.tk-route__date{white-space:nowrap;font-size:.85rem}
.tk-route__ch{white-space:nowrap;font-size:.85rem}
.tk-route__ch a,.tk-route__spot{color:var(--tkr-green)}
.tk-route__tag{display:inline-block;margin-left:.35em;padding:0 .35em;font-size:.68rem;line-height:1.6;border:1px solid var(--tkr-line);color:var(--tkr-muted);vertical-align:.1em;white-space:nowrap}
.tk-route__tag--guess{border-style:dashed}
.tk-route__tag--nopos{background:var(--tkr-cream)}
.tk-route__table tr.is-out td{color:var(--tkr-muted)}
.tk-route__table tr.is-view .tk-route__go,.tk-route__table tr.is-view .tk-route__name span{font-weight:400}
.tk-route__table tr.is-ch td{background:var(--tkr-paper)}
.tk-route__table tr.is-ch .tk-route__num{box-shadow:inset 3px 0 0 var(--tkr-color,var(--tkr-green))}
.tk-route__table tr.is-dim td{opacity:.45}
.tk-route__back{margin:1.2rem 0 0;font-size:.9rem}
.tk-route__back a{color:var(--tkr-green)}

/* 比べる地図の一覧 */
.tk-routes__list{display:grid;gap:1.5rem;margin:.5rem 0 0}
.tk-routes__group-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem;border-bottom:1px solid var(--tkr-line);padding:0 0 .3rem;margin:0 0 .2rem}
.tk-routes__group-head h2{margin:0;font-family:var(--tkr-mincho);font-size:1.15rem;letter-spacing:.1em}
.tk-routes__group-btns{display:flex;gap:.4rem}
.tk-routes__group-btns button{min-height:36px;padding:.2rem .7rem;border:1px solid var(--tkr-line);background:var(--tkr-paper);font:inherit;font-size:.78rem;color:var(--tkr-slate);cursor:pointer}
.tk-routes__group ul{list-style:none;margin:0;padding:0}
.tk-routes__item{display:flex;gap:.8rem;align-items:flex-start;padding:.7rem .1rem;border-bottom:1px solid var(--tkr-line)}
.tk-routes__toggle{position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-.3rem 0;cursor:pointer}
.tk-routes__toggle input{position:absolute;opacity:0;width:44px;height:44px;margin:0;cursor:pointer}
.tk-routes__swatch{display:block;width:26px;height:26px;border:2px solid var(--tkr-color);background:transparent;position:relative}
.tk-routes__swatch::after{content:"";position:absolute;left:7px;top:2px;width:7px;height:13px;border:solid #F9F7F1;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);opacity:0}
.tk-routes__toggle input:checked+.tk-routes__swatch{background:var(--tkr-color)}
.tk-routes__toggle input:checked+.tk-routes__swatch::after{opacity:1}
.tk-routes__toggle input:focus-visible+.tk-routes__swatch{outline:2px solid var(--tkr-green);outline-offset:2px}
.tk-routes__body{flex:1 1 auto;min-width:0}
.tk-routes__name{font-family:var(--tkr-mincho);font-weight:700;font-size:1.05rem;color:var(--tkr-ink);text-decoration:none}
.tk-routes__name:hover{color:var(--tkr-green);text-decoration:underline}
.tk-routes__meta{display:block;font-size:.8rem;color:var(--tkr-muted)}
.tk-routes__lead{display:block;font-size:.88rem;line-height:1.7;margin-top:.15rem}
.tk-routes__draft{margin-left:.5em;padding:0 .35em;border:1px solid var(--tkr-line);font-size:.68rem;color:var(--tkr-muted)}
.tk-routes .screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}

/* スポットのページ「この場所を通った旅」 */
.tk-spot-routes{margin:2rem 0}
.tk-spot-routes__title{font-family:var(--tkr-mincho);font-size:1.15rem;letter-spacing:.1em;margin:0 0 .6rem}
.tk-spot-routes ul{list-style:none;margin:0;padding:0;border-top:1px solid var(--tkr-line)}
.tk-spot-routes li{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem 1rem;padding:.65rem .2rem .65rem .9rem;border-bottom:1px solid var(--tkr-line);box-shadow:inset 3px 0 0 var(--tkr-color,var(--tkr-green))}
.tk-spot-routes li>a:first-child{flex:1 1 16rem;text-decoration:none;color:var(--tkr-ink)}
.tk-spot-routes__who{display:block;font-family:var(--tkr-mincho);font-weight:700;letter-spacing:.04em}
.tk-spot-routes__who small{margin-left:.6em;font-weight:400;font-size:.78rem;color:var(--tkr-muted)}
.tk-spot-routes__ch{display:block;font-size:.85rem;color:var(--tkr-muted)}
.tk-spot-routes li>a:first-child:hover .tk-spot-routes__who{color:var(--tkr-green);text-decoration:underline}
.tk-spot-routes__read{font-size:.85rem;color:var(--tkr-green)}

/* 章の通読ページ「この章の地図」 */
.tk-reader__maps{display:flex;flex-wrap:wrap;gap:.4rem 1rem;margin:.4rem 0 0;font-size:.88rem}
.tk-reader__map{color:var(--tkr-green);text-decoration:none;border-bottom:1px solid currentColor}

@media (max-width:600px){
  .tk-route[data-tk-route],.tk-routes[data-tk-routes],.wp-site-blocks .tk-route[data-tk-route]{width:calc(100vw - 1rem);margin-left:calc(50% - 50vw + .5rem)!important}
  .tk-route__table{font-size:.86rem}
  .tk-route__legend{gap:.2rem .9rem}
}
@media (prefers-reduced-motion:reduce){.tk-route *,.tk-routes *{transition:none!important;animation:none!important}}
