:root {
  --paper: #f3ecdf;
  --paper-hi: #fbf7ef;
  --card: rgba(251, 248, 241, 0.93);
  --ink: #1f2d3a;
  --ink-2: #4a5561;
  --muted: #8b8476;
  --rule: rgba(31, 45, 58, 0.11);
  --sea: #1f4e79;
  --coral: #d8572a;
  --violet: #6b4b94;
  --gold: #f2a516;
  --green: #3f7a4c;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.08), 0 8px 28px rgba(60, 40, 20, 0.12);
  --serif: 'Fraunces', Georgia, serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 14px/1.4 var(--sans);
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 55% 45%, #f8f3e9 0%, #efe6d5 70%, #e8dcc6 100%);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--sea); }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ------------------------------------------------------------- labels */
#labels, #markers { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.25s; white-space: nowrap; will-change: transform; }
.lbl.on { opacity: 1; }
.lbl .in { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: baseline; gap: 4px; }
.lbl.has-icon .in { transform: translate(-7px, -50%); }
.lbl .t { text-shadow: 0 0 3px var(--paper-hi), 0 0 6px rgba(251, 247, 239, 0.9), 0 0 1px #fff; }
.lbl i { font-style: normal; font-size: 10px; color: #6e5338; text-shadow: 0 0 3px #fff; }
.lbl .meta { font: 600 11px var(--hand); color: #7b6a58; text-shadow: 0 0 3px #fff; }
.lbl.place .t { font: 700 19px var(--hand); color: #3a3530; }
.lbl.place.r0 .t { font: italic 700 22px var(--serif); letter-spacing: 0.02em; color: #2c2a2e; }
.lbl.place.r1 .t { font-size: 22px; }
.lbl.place.r3 .t { font-size: 16px; color: #5a524a; }
.lbl.peak .t { font: 700 17px var(--hand); color: #4c3a2a; }
.lbl.lookout i { color: #2b7a78; }
.lbl.lookout .t { font: 600 16px var(--hand); color: #24605f; }
.lbl.falls i { color: #2f6fb0; font-size: 12px; }
.lbl.falls .t { font: 600 16px var(--hand); color: #2a5d92; }
.lbl.lighthouse .t { font: 600 16px var(--hand); color: #4c3a2a; }
.lbl.beach .t, .lbl.cape .t { font: 600 15px var(--hand); color: #8a6a3e; }
.lbl.beach .t { color: #9b7b3a; }
.lbl.lake .t { font: italic 600 15px var(--serif); color: #2a5d86; text-shadow: 0 0 4px rgba(220, 238, 244, 0.9); }
.lbl.lake.big .t { font-size: 22px; letter-spacing: 0.03em; }
.lbl.sea .t { font: italic 600 30px var(--serif); letter-spacing: 0.32em; color: rgba(236, 246, 250, 0.92); text-shadow: 0 1px 6px rgba(20, 50, 90, 0.35); }
.lbl.park .in { flex-direction: column; align-items: center; gap: 0; }
.lbl.park .t { font: italic 600 13px var(--serif); color: #2f6640; letter-spacing: 0.04em; }
.lbl.park.closed .t { color: #9a3e2a; }
.lbl.park .sub { font: 600 10px var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: #9a3e2a; text-shadow: 0 0 3px #fff, 0 0 5px #fff; }

/* ------------------------------------------------------------- panel */
#panel {
  position: fixed; top: 16px; left: 16px; bottom: 74px; width: 304px;
  display: flex; flex-direction: column;
  background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 18px; box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.3s;
}
#panel header { padding: 18px 20px 6px; }
h1 { margin: 0; font: 800 34px/1 var(--serif); letter-spacing: -0.01em; }
h1 .a { color: var(--sea); }
h1 .b { color: var(--coral); font-style: italic; font-weight: 700; }
.sub { margin: 6px 0 0; font: 600 17px var(--hand); color: var(--ink-2); }
.search { margin: 10px 16px 0; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; height: 40px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; color: var(--muted); }
.search:focus-within { border-color: rgba(31, 78, 121, 0.45); box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: 500 14px var(--sans); color: var(--ink); min-width: 0; }
.search input::-webkit-search-cancel-button { display: none; }
kbd { font: 600 11px var(--sans); padding: 1px 6px; border-radius: 5px; background: #eef0d8; color: #6b7140; border: 1px solid #dde0bd; }
.filters { display: flex; align-items: center; gap: 6px; padding: 12px 16px 10px; border-bottom: 1px dashed var(--rule); }
.filters button { border: 1px solid var(--rule); background: rgba(255, 255, 255, 0.65); border-radius: 999px; padding: 5px 11px; font-weight: 600; font-size: 13px; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#count { margin-left: auto; font: 600 15px var(--hand); color: var(--muted); }
.scroll { flex: 1; overflow-y: auto; padding: 8px 10px 12px; scrollbar-width: thin; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; outline: none; }
.list li:hover, .list li:focus-visible { background: rgba(31, 45, 58, 0.05); }
.list li.sel { background: rgba(242, 165, 22, 0.2); }
.list .nm { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.list .nm small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.list .km { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.list .km small { font-size: 10px; margin-left: 1px; color: var(--muted); }
#empty { color: var(--muted); text-align: center; font: 600 17px var(--hand); }
.sw { flex: none; display: inline-block; width: 20px; height: 4px; border-radius: 2px; }
.sw.bike { background: var(--coral); }
.sw.foot { background: repeating-linear-gradient(90deg, var(--violet) 0 6px, transparent 6px 9px); }
.sw.ride { background: var(--gold); height: 5px; box-shadow: 0 0 0 1.5px #fff4d6, 0 0 0 2.5px rgba(74, 44, 8, 0.35); }
.sw.park { background: repeating-linear-gradient(90deg, var(--green) 0 5px, transparent 5px 9px); height: 2px; }
.sw.closed { background: repeating-linear-gradient(90deg, #a8432e 0 5px, transparent 5px 9px); height: 2px; }

.rides { margin: 2px 0 10px; padding: 10px 6px 8px; border-radius: 14px; background: linear-gradient(135deg, rgba(242, 165, 22, 0.16), rgba(216, 87, 42, 0.08)); }
.sec-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 4px; }
.sec-head h3 { margin: 0; font: 700 16px var(--serif); color: #7a4510; }
.mini { border: 0; background: var(--ink); color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.mini:hover { background: #2f4357; }
.rides .list li { padding: 6px 8px; }
.rides .list .km { font-size: 12px; }
.rides .hint { margin: 4px 8px 0; font-size: 11.5px; color: var(--ink-2); }
.toggle { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(63, 122, 76, 0.09); cursor: pointer; }
.toggle span { flex: 1; }
.toggle b { display: block; font: 700 14px var(--serif); color: #2f6640; }
.toggle small { font-size: 11.5px; color: var(--ink-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { flex: none; width: 34px; height: 20px; border-radius: 10px; background: #cfc8b9; position: relative; transition: background 0.2s; }
.toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(14px); }
.toggle input:focus-visible + i { outline: 2px solid var(--sea); outline-offset: 2px; }

/* ------------------------------------------------------------- card */
#card {
  position: fixed; top: 16px; right: 16px; width: 340px; max-height: calc(100% - 100px); overflow-y: auto;
  background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateX(14px); transition: opacity 0.25s, transform 0.25s; scrollbar-width: thin;
}
#card.open { opacity: 1; transform: none; }
.card-inner { padding: 18px 20px 18px; position: relative; }
.close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 6px; border-radius: 8px; }
.close:hover { background: rgba(31, 45, 58, 0.06); color: var(--ink); }
.eyebrow { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--muted); margin-right: 28px; }
.badge { white-space: nowrap; font: 700 10px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #2f6640; border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 6px; }
.badge.ride { color: #a35d08; }
.card-inner h2 { margin: 8px 0 0; font: 800 26px/1.08 var(--serif); letter-spacing: -0.01em; }
.near { margin: 4px 0 0; font: 600 17px var(--hand); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.chip.walk { background: rgba(107, 75, 148, 0.12); color: var(--violet); }
.chip.bike { background: rgba(216, 87, 42, 0.12); color: #b2441b; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.stats b { display: block; font: 800 24px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.card-inner.ride .stats b { color: #c2531f; }
.stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.profile-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.profile-head .clock { color: #c2531f; letter-spacing: 0.02em; }
.profile { position: relative; background: rgba(239, 230, 213, 0.55); border-radius: 10px; padding: 6px 0 0; }
.profile svg { display: block; width: 100%; height: 92px; cursor: crosshair; touch-action: none; }
.profile .dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; pointer-events: none; opacity: 0; transform: translateY(6px); }
.profile .axis { display: flex; justify-content: space-between; padding: 4px 8px 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.profile .axis .read { color: var(--ink-2); font-weight: 600; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 6px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; }
.grade { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--g); margin-right: 6px; transform: rotate(45deg) translateY(-1px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.fine { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.link { border: 0; background: none; padding: 0; margin-top: 10px; font: italic 600 15px var(--serif); color: var(--sea); }
.link:hover { text-decoration: underline; }
.play-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.play { flex: 1; border: 0; border-radius: 12px; padding: 11px 14px; background: #24504a; color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.play:hover { background: #2c625a; }
.play .ico { display: inline-block; width: 1.2em; }
.follow { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.follow input { accent-color: #24504a; }
.ridden { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ridden h4 { margin: 0 0 2px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ridden .chips button { border: 1px solid rgba(216, 87, 42, 0.3); background: rgba(216, 87, 42, 0.07); color: #9c3d18; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.ridden .chips button:hover { background: rgba(216, 87, 42, 0.16); }
.links { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.links a { font: italic 600 15px var(--serif); color: #c2531f; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links .link { margin: 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------- markers, tip */
.mk { position: absolute; left: 0; top: 0; will-change: transform; }
.mk.flag svg { position: absolute; left: -5px; top: -33px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3)); }
.mk.rider span { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #f2a516; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(74, 44, 8, 0.6), 0 0 0 7px rgba(242, 165, 22, 0.28), 0 2px 6px rgba(0, 0, 0, 0.3); }
.mk.probe span { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--ink); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
#tip { position: fixed; left: 0; top: 0; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(31, 45, 58, 0.92); color: #fff; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; }
#tip span { color: #c9d1d8; font-size: 12px; }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }

/* ------------------------------------------------------------- chrome */
#legend { position: fixed; right: 76px; bottom: 18px; display: flex; gap: 16px; align-items: center; padding: 9px 16px; font-size: 12.5px; color: var(--ink-2); background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
#legend span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
#legend .p { display: none; }
#legend.parks .p { display: flex; }
#controls { position: fixed; right: 16px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; transition: right 0.3s; }
#legend { transition: right 0.3s; }
@media (min-width: 761px) {
  body.card-open #controls { right: 370px; }
  body.ui-hidden #mobileTitle { display: none; }
  body.card-open #legend { right: 430px; }
}
#controls button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 18px; display: grid; place-items: center; }
#controls button:hover { background: #fff; }
#compass { transition: none; }
#hint { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; font: 600 16px var(--hand); color: #8a7f6e; pointer-events: none; white-space: nowrap; }
#credit { position: fixed; left: 18px; bottom: 10px; width: 300px; font-size: 10.5px; line-height: 1.35; color: #8a7f6e; }
#credit b { font: 700 13px var(--hand); color: var(--ink-2); }
#credit a { color: inherit; }
#drop { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(243, 236, 223, 0.6); backdrop-filter: blur(3px); z-index: 20; pointer-events: none; }
#drop div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 40px; border: 2.5px dashed var(--gold); border-radius: 20px; background: var(--card); }
#drop b { font: 800 26px var(--serif); color: #a35d08; }
#drop span { color: var(--ink-2); }
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--paper); z-index: 30; transition: opacity 0.8s; }
#loading p { font: 700 28px var(--hand); color: var(--ink-2); animation: breathe 1.6s ease-in-out infinite; }
#loading.done { opacity: 0; pointer-events: none; }
@keyframes breathe { 50% { opacity: 0.45; } }

body.ui-hidden #panel, body.ui-hidden #card, body.ui-hidden #legend, body.ui-hidden #controls, body.ui-hidden #hint, body.ui-hidden #credit { opacity: 0; pointer-events: none; }

#mobileTitle, #panelBtn, #panelClose, .panel-credit, #card .grab { display: none; }
@media (max-width: 760px) {
  /* The map gets the screen; the list is a sheet you pull up. */
  #mobileTitle { display: block; position: fixed; top: 10px; left: 12px; z-index: 5; padding: 6px 12px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); font: 800 19px/1.1 var(--serif); pointer-events: none; }
  #mobileTitle .a { color: var(--sea); }
  #mobileTitle .b { color: var(--coral); font-style: italic; font-weight: 700; }
  #panelBtn { display: block; position: fixed; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 6; border: 0; border-radius: 999px; padding: 11px 18px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; box-shadow: var(--shadow); }
  body.card-open #panelBtn { display: none; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 88vh; height: 88dvh; max-height: none; border-radius: 18px 18px 0 0; z-index: 20; transform: translateY(105%); transition: transform 0.3s ease; padding-bottom: env(safe-area-inset-bottom); }
  body.panel-open #panel { transform: none; }
  #panelClose { display: block; top: 12px; right: 12px; font-size: 26px; }
  #panel header { padding: 16px 18px 4px; }
  h1 { font-size: 26px; }
  .sub { font-size: 15px; }
  .filters button { padding: 7px 13px; }
  .list li { padding: 10px; }
  .panel-credit { display: block; margin: 16px 10px 4px; font-size: 10.5px; color: var(--muted); }
  .panel-credit a { color: inherit; }

  /* Cards are a bottom sheet: peek, pull up for more, or tuck away to see the map. */
  #card { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 42vh; max-height: 42dvh; border-radius: 18px 18px 0 0; transform: translateY(14px); transition: max-height 0.3s ease, opacity 0.25s, transform 0.25s; padding-bottom: env(safe-area-inset-bottom); z-index: 15; }
  body.sheet-full #card { max-height: 86vh; max-height: 86dvh; }
  body.sheet-min #card { max-height: 104px; overflow: hidden; }
  #card .grab { display: block; position: sticky; top: 0; z-index: 2; height: 22px; margin-bottom: -10px; background: linear-gradient(var(--card) 60%, transparent); cursor: grab; touch-action: none; }
  #card .grab::after { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(31, 45, 58, 0.25); }
  .card-inner { padding: 12px 18px 18px; }
  .card-inner h2 { font-size: 22px; }
  .stats { margin: 12px 0 10px; padding-top: 10px; }
  .stats b { font-size: 21px; }

  #legend, #hint, #credit, #rotL, #rotR { display: none !important; }
  #controls { right: 10px; top: 10px; bottom: auto; gap: 6px; }
  #controls button { width: 40px; height: 40px; font-size: 17px; }
  body.card-open #controls #zoomIn, body.card-open #controls #zoomOut { display: none; }
  #tip { display: none !important; }
  #toast { bottom: auto; top: 64px; }

  .lbl.place .t { font-size: 16px; }
  .lbl.place.r0 .t { font-size: 18px; }
  .lbl.peak .t, .lbl.lookout .t, .lbl.falls .t { font-size: 15px; }
  .lbl.beach .t, .lbl.cape .t { font-size: 13px; }
  .lbl.sea .t { font-size: 22px; }
  .lbl.lake.big .t { font-size: 18px; }
  .mk.pin span { width: 30px; height: 30px; left: -15px; top: -38px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------- MTB difficulty icons */
.di { flex: none; display: inline-block; width: 11px; height: 11px; vertical-align: -1px; position: relative; }
.di.d0 { border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px #6b6b6b inset; }
.di.d1 { border-radius: 50%; background: #2f9a4c; }
.di.d2 { background: #2a6fc4; border-radius: 1px; }
.di.d3 { background: #1c1c1c; transform: rotate(45deg) scale(0.86); border-radius: 1px; }
.di.d4 { width: 19px; }
.di.d4::before, .di.d4::after { content: ''; position: absolute; top: 1px; width: 9px; height: 9px; background: #1c1c1c; transform: rotate(45deg); border-radius: 1px; }
.di.d4::before { left: 0; }
.di.d4::after { left: 9px; }
.di.none { width: 14px; height: 4px; border-radius: 2px; background: var(--coral); vertical-align: 2px; }
.filters button .di { vertical-align: -1px; }
.list-head { margin: 14px 10px 4px; font: 700 11px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tfonly a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); text-decoration: none; width: 100%; }
.tfonly .nm { font-weight: 500; }
.tfonly li { padding: 5px 10px; }
.badge.diff { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); border-color: rgba(31, 45, 58, 0.3); }
.badge.diff.d1 { color: #23763a; border-color: currentColor; }
.badge.diff.d2 { color: #22599d; border-color: currentColor; }
.badge.route { color: #8a5508; }
.chip.rating { background: rgba(242, 165, 22, 0.16); color: #8a5508; letter-spacing: 0.04em; }
.chip.rating small { letter-spacing: 0; color: var(--muted); font-weight: 600; }
.chip.status { background: rgba(47, 154, 76, 0.12); color: #23763a; }
.chip.plain { background: rgba(31, 45, 58, 0.06); color: var(--ink-2); }
dd .di { margin-right: 4px; }
dd small { color: var(--muted); }
.links span a { margin: 0; font-size: 14px; }

/* ------------------------------------------------------------- route planner */
.planner-cta { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(42, 111, 196, 0.12), rgba(47, 154, 76, 0.1)); }
.planner-cta div { flex: 1; }
.planner-cta b { display: block; font: 700 16px var(--serif); color: #1f4e79; }
.planner-cta small { font-size: 11.5px; color: var(--ink-2); }
.planner-cta .mini { white-space: nowrap; padding: 7px 12px; font-size: 13px; background: #1f4e79; }
.planner-cta .mini.on { background: var(--coral); }
body.planning #map { cursor: crosshair; }
.card-inner.route .stats b { color: #1f4e79; }
.step { margin: 14px 0 6px; padding: 12px 14px; border-radius: 12px; background: rgba(31, 78, 121, 0.08); font-size: 14px; }
.step.warn { background: rgba(216, 87, 42, 0.1); }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: -2px 0 8px; }
.bar i { display: block; min-width: 3px; }
.bar-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 14px; }
.bar-legend span { display: flex; align-items: center; gap: 6px; }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; }
.route-opts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.route-opts .slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; }
.route-opts input[type=range] { width: 100%; accent-color: #f2a516; }
.route-opts .check { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.route-opts .check input { accent-color: #1f4e79; }
.route-actions { display: flex; gap: 8px; margin-top: 12px; }
.mini.ghost { background: rgba(31, 45, 58, 0.08); color: var(--ink); }
.mini.ghost:hover { background: rgba(31, 45, 58, 0.14); }
.mini.gpx { margin-left: auto; background: #f2a516; color: #3b2508; }
.ridden .chips button .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.ridden .chips button small { color: var(--muted); font-weight: 500; }
.mk.pin span { position: absolute; left: -13px; top: -34px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); color: #fff; font: 800 12px var(--sans); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); border: 2px solid #fff; }
.mk.pin.a span { background: #2f8f6b; }
.mk.pin.b span { background: #d8572a; }
.mk.pin span::first-letter { }
#legend .r { display: none; }
body.planning #legend .r { display: flex; }
body.planning #legend .t, body.planning #legend .p { display: none; }

.chip.strava { background: rgba(252, 82, 0, 0.1); color: #c2410c; }

.unnamed { margin-top: 10px; }
.unnamed summary { cursor: pointer; list-style: none; padding: 8px 10px; border-radius: 10px; font: 700 11px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.unnamed summary::-webkit-details-marker { display: none; }
.unnamed summary::before { content: '▸'; display: inline-block; width: 14px; transition: transform 0.2s; }
.unnamed[open] summary::before { transform: rotate(90deg); }
.unnamed summary:hover { background: rgba(31, 45, 58, 0.05); }
.unnamed summary span { color: var(--muted); font-weight: 600; }

.mk.pin.mid span { background: #2a6fc4; }
.stops { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.stops li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 6px; border-radius: 8px; }
.stops li:hover { background: rgba(31, 45, 58, 0.05); }
.stops li span { flex: 1; }
.stops li small { color: var(--muted); }
.stops .rm { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.stops .rm:hover { background: rgba(31, 45, 58, 0.08); color: var(--ink); }
.stops .loop { color: var(--muted); }
.pin-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 10px var(--sans); font-style: normal; color: #fff; background: #2a6fc4; }
.pin-dot.a { background: #2f8f6b; }
.pin-dot.b { background: #d8572a; }
