:root {
  --ink: #1b2433;
  --ink-2: #2c3a4e;
  --paper: #fbf9f4;
  --paper-2: #f2eee4;
  --border: #e3dccc;
  --accent: #d94f2b;        /* vermilion 朱 */
  --accent-dark: #b23c1e;
  --muted: #6b7482;
  --muted-2: #949caa;
  --focus: #d94f2b;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
  color: var(--ink);
  overflow: hidden;
  font-size: 13px;
}
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

#map { position: fixed; inset: 0; background: #dfe6ea; }
.leaflet-tile { filter: saturate(0.82) sepia(0.06); }

/* ---------- floating chrome ---------- */

#topbar {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
#brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand-name {
  background: var(--ink);
  color: #fff;
  padding: 8px 14px 9px;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(27,36,51,.3);
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 3px solid var(--accent);
  white-space: nowrap;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  align-self: center;
}
.brand-mark { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-family: "Shippori Mincho", serif; color: #aeb9c9; font-size: 11.5px; font-weight: 600; letter-spacing: 1px; }
@media (max-width: 380px) { .brand-sub { display: none; } }

#navbtns { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- source + destination search fields ---------- */

#searchstack { display: flex; align-items: center; gap: 8px; width: 350px; }
.sf-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-field {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px 8px 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 3px 14px rgba(27,36,51,.18);
}
.sf-field.editing:focus-within { outline: 2px solid var(--accent); border-color: transparent; }
.sf-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--ink);
}
.sf-dot.source { background: #ffd400; }
.sf-dot.dest { background: var(--accent); border-color: var(--accent-dark); }
.sf-input {
  flex: 1; min-width: 0;
  border: none; background: none; outline: none;
  font-size: 14px; font-family: inherit; color: var(--ink);
  padding: 1px 0;
}
.sf-input::placeholder { color: var(--muted-2); }
.sf-chip {
  flex: 1; min-width: 0; text-align: left;
  border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; align-items: baseline; gap: 7px; padding: 0;
  color: var(--ink); overflow: hidden;
}
.sf-chip-en { font-size: 14px; font-weight: 700; white-space: nowrap; }
.sf-chip-ja { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-chip:hover .sf-chip-en { color: var(--accent-dark); }
.sf-clear {
  border: none; background: var(--paper-2); color: var(--ink-2);
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.sf-clear:hover { background: var(--border); }
.sf-clear svg { width: 11px; height: 11px; }
.sf-swap {
  flex-shrink: 0; align-self: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--paper); color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 14px rgba(27,36,51,.18);
}
.sf-swap:hover { background: var(--paper-2); }
.sf-swap svg { width: 16px; height: 16px; transform: rotate(90deg); }
.sf-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  margin-top: 6px;
  z-index: 30;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(27,36,51,.24);
  overflow-y: auto;
  max-height: 330px;
}
.sr-row {
  padding: 7px 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f0ebdf;
}
.sr-row:last-child { border-bottom: none; }
.sr-row:hover, .sr-row.hl { background: #f0e9da; }
.sr-names { flex: 1; min-width: 0; }
.sr-en { font-size: 13px; font-weight: 500; }
.sr-ja { color: var(--muted); font-size: 11.5px; display: block; }
.sr-badge { font-size: 9.5px; color: var(--accent); font-weight: 700; letter-spacing: .5px; border: 1px solid currentColor; border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }

.mapbtn {
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(27,36,51,.3);
  white-space: nowrap;
}
.mapbtn .ja { font-weight: 400; font-size: 10px; color: #aeb9c9; margin-left: 4px; }
.mapbtn:hover { background: var(--ink-2); }
.mapbtn.active { background: var(--accent); }
.mapbtn.active .ja { color: #ffd9cc; }

/* ---------- starter suggestions (Map view of the pane) ---------- */

.starter {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 8px 10px 9px;
  margin-bottom: 10px;
}
.starter-head {
  display: flex; align-items: center;
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 6px;
}
.starter-x {
  margin-left: auto; border: none; background: none; cursor: pointer;
  color: var(--muted-2); padding: 0 1px; display: inline-flex;
}
.starter-x svg { width: 12px; height: 12px; }
.starter-x:hover { color: var(--ink); }
.starter-btns { display: flex; flex-direction: column; gap: 6px; }
.starter-btns .lp-btn { text-align: left; }
.starter-btns .lp-btn .ja { color: var(--muted-2); font-size: 10px; margin-left: 6px; font-weight: 400; }

/* ---------- panels ---------- */

.panel {
  position: fixed;
  z-index: 1090;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(27,36,51,.26);
  width: 350px;
  max-height: calc(100vh - 148px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#pane { top: 118px; left: 12px; }
.panel[hidden] { display: none; }

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 15px 11px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(#fff8, transparent);
}
.ph-title { font-size: 15px; font-weight: 700; flex: 1; line-height: 1.3; min-width: 0; }
.ph-title .ja-line { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.ph-title .ctx { display: block; font-weight: 400; color: var(--muted-2); font-size: 11px; margin-top: 2px; }
.icon-btn {
  border: none; background: var(--paper-2); color: var(--ink-2);
  width: 27px; height: 27px; border-radius: 50%;
  cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.icon-btn:hover { background: var(--border); }
.icon-btn svg { width: 14px; height: 14px; }
.star-big {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: #cfc8b8; padding: 0 2px; flex-shrink: 0; line-height: 1.2;
}
.star-big.on { color: #eda12f; }

.panel-body { padding: 11px 15px 13px; overflow-y: auto; }
.panel-note { font-size: 12px; color: var(--muted); margin: 9px 0 2px; line-height: 1.45; }

/* pills */
.pill-row { display: flex; background: var(--paper-2); border-radius: 10px; padding: 3px; margin: 5px 0 10px; }
.pill {
  flex: 1;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.pill.active { background: var(--ink); color: #fff; }
.pill-label { font-size: 11px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .5px; margin-top: 5px; }

.summary { font-size: 13px; font-weight: 700; margin: 4px 0 9px; }
.summary small { font-weight: 400; color: var(--muted); }

.toggle-btn, .ghost-btn {
  width: 100%;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.toggle-btn:hover, .ghost-btn:hover { background: var(--paper-2); }

.filter-input {
  width: 100%; padding: 7px 11px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 9px; margin: 6px 0;
  background: #fff; color: var(--ink);
}
.mini-toggle {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 4px 11px; cursor: pointer; margin: 2px 0 7px;
}
.mini-toggle.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* reach list */
.result-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px; font-size: 12.5px; cursor: pointer;
}
.result-row:hover, .result-row.sel { background: #f0e9da; }
.result-row .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(27,36,51,.35); }
.result-row .st-name { flex: 1; min-width: 0; line-height: 1.25; }
.result-row .st-name .ja-line { display: block; color: var(--muted); font-size: 10.5px; }
.result-row .st-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-row .st-xfers { color: var(--muted-2); font-size: 11px; width: 22px; text-align: right; }
.result-row .go-btn {
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  border-radius: 7px; font-size: 11px; font-weight: 700; padding: 3px 8px; cursor: pointer; flex-shrink: 0;
}
.result-row .go-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* route cards */
.route-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 9px;
  cursor: pointer;
  position: relative;
}
.route-card:hover { border-color: var(--muted-2); }
.route-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217,79,43,.18); }
.route-card.selected::before {
  content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.rc-time { font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-meta { font-size: 11.5px; color: var(--muted); flex: 1; }
.rc-star { background: none; border: none; font-size: 16px; cursor: pointer; color: #cfc8b8; padding: 0; flex-shrink: 0; }
.rc-star.on { color: #eda12f; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 7px; }
.rc-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  background: var(--paper-2); color: var(--ink-2);
  border-radius: 5px; padding: 2px 7px;
}
.rc-tag.hot { background: #fbe3da; color: var(--accent-dark); }

.leg { display: flex; gap: 9px; padding: 4px 0; }
.leg-rail { width: 4px; border-radius: 2px; flex-shrink: 0; }
.leg-rail.walk { background: repeating-linear-gradient(180deg, var(--muted-2) 0 4px, transparent 4px 8px); }
.leg-body { flex: 1; min-width: 0; }
.leg-line-en { font-size: 12px; font-weight: 700; line-height: 1.25; }
.leg-line-ja { font-size: 10.5px; color: var(--muted); }
.leg-stations { font-size: 12px; margin-top: 2px; }
.leg-stations .ja-line { display: block; color: var(--muted); font-size: 10.5px; }
.leg-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xfer-note {
  font-size: 10.5px; color: var(--muted-2);
  padding: 1px 0 1px 13px; border-left: 2px dotted var(--border); margin-left: 1px;
}

/* line list */
.line-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 6px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
}
.line-row:hover { background: #f0e9da; }
.line-row .swatch { width: 16px; height: 5px; border-radius: 3px; flex-shrink: 0; }
.line-row .ln-name { flex: 1; line-height: 1.25; min-width: 0; }
.line-row .ln-name .ja-line { color: var(--muted); display: block; font-size: 10.5px; }
.badge {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .3px; flex-shrink: 0;
}
.badge.shinkansen { background: #fbe3da; color: var(--accent-dark); }
.badge.jr { background: #ddefe6; color: #0d6b4f; }
.badge.private { background: #fcefd7; color: #92600a; }
.badge.subway { background: #ddebf7; color: #23689b; }
.line-row .ln-freq { font-size: 11px; color: var(--muted); width: 30px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.star-btn { background: none; border: none; font-size: 15px; cursor: pointer; color: #cfc8b8; padding: 0 2px; flex-shrink: 0; }
.star-btn.on { color: #eda12f; }
.section-title { font-size: 12.5px; margin: 13px 0 5px; color: var(--ink-2); font-weight: 800; }
.section-title .ja { font-weight: 500; color: var(--muted-2); font-size: 11px; margin-left: 6px; }
.empty-note { font-size: 12px; color: var(--muted-2); font-style: italic; padding: 3px 6px; }

.saved-trip .trip-meta { font-size: 11px; color: var(--muted); display: block; }

/* ---------- legend bits (rendered inside the pane) ---------- */

.lg-row { display: flex; align-items: center; gap: 8px; padding: 1.5px 0; font-size: 12px; }
.lg-row .ja { color: var(--muted-2); font-size: 10px; margin-left: 4px; }
.lg-swatch { width: 15px; height: 4px; border-radius: 2px; flex-shrink: 0; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(27,36,51,.3); }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.lg-note { color: var(--muted-2); font-size: 10.5px; margin-top: 5px; }
.lg-label {
  font-size: 9.5px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .5px; margin: 8px 0 4px;
}
/* on-map threshold labels drawn at each time band's frontier */
.iso-label-wrap { background: none; border: none; }
.iso-label {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  transform: translate(-50%, -145%);
  background: rgba(255, 255, 255, .93); color: #1b2433;
  border: 1.5px solid var(--band, #999);
  font-size: 11px; font-weight: 800; font-family: inherit;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.iso-label::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--band, #999); flex-shrink: 0;
  border: 1px solid rgba(27, 36, 51, .35);
}
/* name pill anchored to the selected origin — the strongest label on the map */
.origin-label-wrap { background: none; border: none; }
.origin-label {
  position: relative;
  display: inline-flex; align-items: center; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 15px));
  background: #1b2433; color: #fff;
  border: 2px solid #ffd400;
  font-size: 12px; font-weight: 800; font-family: inherit; letter-spacing: .2px;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.origin-label::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%); margin-top: -1px;
  border: 5px solid transparent; border-top-color: #ffd400;
}

/* combined legend + layer toggle: one clickable row per layer */
.layer-list { display: flex; flex-direction: column; gap: 4px; }
.layer-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  border: 1px solid var(--border); background: #fff;
  border-radius: 9px; padding: 8px 10px;
}
.layer-row:hover { background: var(--paper-2); }
.layer-swatch { width: 20px; height: 4px; border-radius: 2px; flex-shrink: 0; opacity: .4; }
.layer-name { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.layer-name .ja { font-weight: 400; font-size: 10px; color: var(--muted-2); margin-left: 5px; }
.layer-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: var(--muted-2); background: var(--paper-2); border-radius: 4px; padding: 1px 5px;
}
.layer-check { width: 14px; text-align: center; color: var(--accent); font-weight: 800; font-size: 13px; }
.layer-row.on { border-color: var(--ink); }
.layer-row.on .layer-swatch { opacity: 1; }
.layer-row.on .layer-name { color: var(--ink); }
.lg-solo {
  display: flex; align-items: center; gap: 7px;
  background: #fbe3da; border-radius: 8px;
  padding: 5px 8px; margin-bottom: 3px;
  font-size: 11.5px; font-weight: 700; color: var(--accent-dark);
}
.lg-solo .lg-swatch { width: 14px; flex-shrink: 0; }
.lg-solo-x {
  margin-left: auto; border: none; background: none; cursor: pointer;
  color: var(--accent-dark); font-size: 12px; font-weight: 700; padding: 0 2px;
}
.line-row.solo { background: #fbe3da; }
.line-row.solo:hover { background: #f7d6c9; }

/* collapsible sections inside the pane */
.sect { border-top: 1px solid var(--border); margin-top: 9px; }
.sect-head {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 8px 2px 6px;
  font-family: inherit; font-weight: 700; font-size: 12px; color: var(--ink);
  cursor: pointer; text-align: left;
}
.sect-head:hover { color: var(--accent-dark); }
.sect-head .ja { color: var(--muted-2); font-weight: 500; font-size: 10.5px; }
.sect-head .lg-chev { margin-left: auto; color: var(--muted-2); font-size: 10px; }
.sect-body { padding: 0 0 8px; }

/* station hover tooltip */
.st-tip {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(27,36,51,.2);
  padding: 4px 9px;
}
.st-tip::before { display: none; }

/* ---------- credits (required attribution: see DATA-LICENSES.md) ---------- */

.credits-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(251, 249, 244, .88);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 9px;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(27, 36, 51, .14);
}
.credits-btn:hover { color: var(--ink); background: var(--paper); }
.credits-btn .ja { font-weight: 400; font-size: 10px; color: var(--muted-2); margin-left: 5px; }

#credits {
  width: min(430px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(27, 36, 51, .34);
  overflow: hidden;
}
#credits[open] { display: flex; flex-direction: column; }
#credits::backdrop { background: rgba(27, 36, 51, .45); }
.credits-body { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.credits-body a { color: var(--accent-dark); }
.credit { margin-bottom: 11px; }
.credit p { margin: 0; }
.credit-label {
  font-size: 9.5px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px;
}
.credit-label .ja { text-transform: none; letter-spacing: 0; margin-left: 5px; }
.credits-body .panel-note { border-top: 1px solid var(--border); padding-top: 9px; }

/* ---------- loading ---------- */

#loading {
  position: fixed; inset: 0;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Shippori Mincho", serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 4px;
}
#loading small {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400; color: #8b98ab; font-size: 13px; letter-spacing: .5px;
}
#loading::after {
  content: ""; width: 42px; height: 3px; border-radius: 2px;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .35; transform: scaleX(.6);} 50% { opacity: 1; transform: scaleX(1);} }

/* ---------- map elements ---------- */

.lp-btn {
  padding: 5px 10px; font-size: 11.5px; font-weight: 600; font-family: inherit;
  border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--ink); cursor: pointer;
}
.lp-btn:hover { background: var(--paper-2); }
.lp-btn.starred { color: #b07708; border-color: #eda12f; }

/* clickable city titles (the basemap carries no place names) */
.city-mark { pointer-events: auto; }
.city-zoom .city-mark { pointer-events: none; }
.city-label {
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  line-height: 1.15;
  font-family: "Noto Sans JP", sans-serif;
  text-shadow: 0 1px 0 #fff, 0 -1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 2px 6px rgba(255,255,255,.9);
  white-space: nowrap;
  width: max-content;
}
.city-label b { font-weight: 800; color: var(--ink); letter-spacing: .12em; }
.city-label .cl-ja { color: var(--muted); font-weight: 500; }
.city-label.t1 b { font-size: 15px; }
.city-label.t1 .cl-ja { font-size: 10.5px; }
.city-label.t2 b { font-size: 12px; }
.city-label.t2 .cl-ja { font-size: 9.5px; }
.city-label.t3 b { font-size: 10.5px; letter-spacing: .08em; }
.city-label.t3 .cl-ja { font-size: 9px; }
.city-label:hover b { color: var(--accent); }

/* line / station detail bits (rendered inside the pane) */
.ip-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; z-index: 1; }
.ip-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 5px 0; }
.ip-stat { font-size: 11.5px; color: var(--muted); }
.ip-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ip-ends { font-size: 12px; font-weight: 700; margin: 3px 0 2px; }
.ip-ends .ja-line { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400; }
.ip-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ip-lines { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; max-height: 168px; overflow-y: auto; }
.ip-line-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--paper);
  border-radius: 8px; padding: 5.5px 9px;
  font-size: 11.5px; font-weight: 700; color: var(--ink);
  cursor: pointer; text-align: left; font-family: inherit;
}
.ip-line-chip:hover { background: var(--paper-2); }
.ip-swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.ip-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.leaflet-container { font-family: "Noto Sans JP", sans-serif; }
