/* แผนที่เส้นทาง ชชช ในหน้า "เส้นทางชุมชน" — ใช้โทนเดียวกับหน้าแรก (landing.html)
   เนื้อหาข้างในสร้างด้วย landing/tour-map.js จึงต้องใช้คลาส ไม่ใช่ inline style แบบส่วนอื่นของหน้า */
.twm { --twm-ink:#151A11; --twm-muted:#4B5344; --twm-soft:#7C846F; --twm-line:#D3D9C9; --twm-card:#FBFCF9; --twm-health:#B5482A;
  --twm-mono:'IBM Plex Mono',ui-monospace,monospace; --twm-serif:Trirong,serif; }
:where(.twm button) { font:inherit; color:inherit; }

.twm-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.twm-tab { display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; border:1px solid var(--twm-line);
  background:var(--twm-card); font-size:14.5px; cursor:pointer; transition:background .2s ease,color .2s ease,border-color .2s ease; }
.twm-tab:hover { border-color:#AEB8A0; }
.twm-tab[aria-pressed="true"] { background:#23331A; border-color:#23331A; color:#F0F3E8; }
.twm-dot { width:10px; height:10px; border-radius:50%; background:var(--c); box-shadow:0 0 0 2px rgba(255,255,255,.7); }

.twm-grid { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(290px,1fr); gap:20px; align-items:start; }
@media (max-width:900px) { .twm-grid { grid-template-columns:1fr; } }

.twm-mapbox, .twm-card { background:var(--twm-card); border:1px solid var(--twm-line); border-radius:22px;
  box-shadow:0 1px 2px rgba(21,26,17,.05),0 16px 34px -24px rgba(21,26,17,.4); }
.twm-mapbox { overflow:hidden; }
.twm-map { height:clamp(380px,68vh,620px); width:100%; background:#2B3A33; }
@media (max-width:900px) { .twm-map { height:clamp(320px,58vh,480px); } }
.twm-offline { margin:0; padding:28px; color:#C6D3B2; font-size:15px; }
.twm-legend { display:flex; flex-wrap:wrap; gap:8px 18px; padding:12px 18px; border-top:1px solid var(--twm-line); font-size:13px; color:var(--twm-muted); }
.twm-legend span { display:inline-flex; align-items:center; gap:7px; }
.twm-legend svg { flex:none; }
.twm-hint { color:var(--twm-soft); margin-left:auto; }
@media (max-width:600px) { .twm-hint { margin-left:0; } }

.twm-panel { display:flex; flex-direction:column; gap:14px; }
.twm-card { padding:22px; }
.twm-card h3 { font-family:var(--twm-serif); font-weight:600; font-size:26px; line-height:1.3; margin:4px 0 0; }
.twm-card h3 small { display:block; font-family:inherit; font-size:15px; font-weight:400; color:var(--twm-muted); margin-top:2px; }
.twm-code { font-family:var(--twm-mono); font-size:11.5px; letter-spacing:.08em; color:var(--twm-soft); }

.twm-ov { display:flex; flex-direction:column; gap:6px; margin-top:16px; }
.twm-ovr { display:block; width:100%; text-align:left; background:none; border:0; border-left:4px solid var(--c); border-radius:0 12px 12px 0;
  padding:10px 12px 10px 14px; cursor:pointer; transition:background .2s ease; }
.twm-ovr:hover { background:#EEF1E9; }
.twm-ovr b { font-family:var(--twm-serif); font-weight:600; font-size:20px; }
.twm-ovr .twm-code { display:block; }
.twm-nums { display:block; margin-top:2px; font-family:var(--twm-mono); font-size:12.5px; color:var(--twm-muted); font-variant-numeric:tabular-nums; }
.twm-sub { font-size:13.5px; color:var(--twm-muted); line-height:1.5; }

.twm-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:16px; }
.twm-stats div { border-top:3px solid var(--c); padding-top:8px; }
.twm-stats b { display:block; font-family:var(--twm-mono); font-weight:500; font-size:19px; line-height:1.3; font-variant-numeric:tabular-nums; }
.twm-stats span { font-size:12px; color:var(--twm-soft); line-height:1.4; display:block; }

.twm-day { display:flex; justify-content:space-between; gap:10px; margin:20px 0 4px; font-family:var(--twm-mono); font-size:11.5px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--twm-soft); }
.twm-day em { font-style:normal; letter-spacing:0; text-transform:none; }
.twm-legs { list-style:none; margin:0; padding:0; }
.twm-legs li { display:grid; grid-template-columns:28px 1fr; gap:12px; padding:10px 0; border-top:1px solid var(--twm-line); }
.twm-num { width:26px; height:26px; border-radius:50%; background:var(--c); color:#fff; font:600 12px var(--twm-mono); display:grid; place-items:center; }
.twm-stop { font-weight:600; line-height:1.4; }
.twm-stop a { color:inherit; border-bottom:1px dotted #AEB8A0; }
.twm-stop a:hover { color:#3A6733; border-bottom-color:#3A6733; }
.twm-hop { display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:6px; padding:3px 8px; margin-left:-8px; border:0; border-radius:8px; background:none;
  cursor:pointer; text-align:left; font-family:var(--twm-mono); font-size:12.5px; color:var(--twm-ink); font-variant-numeric:tabular-nums; }
.twm-hop:hover, .twm-hop:focus-visible { background:#EEF1E9; }
.twm-hop span { color:var(--twm-soft); }
.twm-note { margin:16px 0 0; padding-top:14px; border-top:1px solid var(--twm-line); font-size:13.5px; color:var(--twm-muted); line-height:1.6; }

/* สิ่งที่ Leaflet วางบนแผนที่ */
.twm .leaflet-container { font-family:"IBM Plex Sans Thai","Noto Sans SC",system-ui,sans-serif; }
.twm .leaflet-popup-content-wrapper { border-radius:14px; }
.twm .leaflet-popup-content { font-size:14px; line-height:1.55; margin:12px 16px; }
.twm .leaflet-control-attribution { font-size:10.5px; }
.twm-pin { width:28px; height:28px; border-radius:50%; color:#fff; font:600 13px var(--twm-mono); display:grid; place-items:center;
  border:2.5px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.35); }
.twm-xh { width:16px; height:16px; border-radius:3px; background:var(--twm-health); color:#fff; font:700 13px/16px sans-serif; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.3); }
.twm-pill { display:inline-block; transform:translate(-50%,-50%); white-space:nowrap; background:#fff; color:var(--twm-ink); border:1.5px solid;
  border-radius:999px; padding:1px 9px; font:500 12px var(--twm-mono); box-shadow:0 1px 3px rgba(0,0,0,.2); }
.twm .leaflet-tooltip.twm-lbl { background:rgba(251,252,249,.94); border:0; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.25);
  color:var(--twm-ink); font-size:13px; font-weight:600; padding:1px 7px; }
.twm .leaflet-tooltip.twm-lbl.is-sm { font-size:11px; font-weight:500; }
.twm .leaflet-tooltip.twm-lbl::before { display:none; }
.twm .leaflet-tooltip.twm-tt { font-size:13px; border-radius:8px; }
